最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

WordPress "BeSpoke" Block Themes and title intended style renderimg Issue

programmeradmin5浏览0评论
<!-- wp:post-title {"isLink":true,"level":1,"className":"hclass"} /-->

When using the above in index.html/single.html, WordPress renders:

<h1 class="hclass"><a href="post-url">Post Title</a></h1>

But I want:

<h1><a class="hclass" href="post-url">Post Title</a></h1>

I have to create a Custom Quesry Block or some other methods are there to control the output rendering on a public Post?

<!-- wp:post-title {"isLink":true,"level":1,"className":"hclass"} /-->

When using the above in index.html/single.html, WordPress renders:

<h1 class="hclass"><a href="post-url">Post Title</a></h1>

But I want:

<h1><a class="hclass" href="post-url">Post Title</a></h1>

I have to create a Custom Quesry Block or some other methods are there to control the output rendering on a public Post?

Share Improve this question asked Mar 16 at 15:25 WordCentWordCent 1,8916 gold badges34 silver badges60 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

You can use render_block_core/post-title hook to change block output. To change output, use Wordpress html API or regex replacements.

发布评论

评论列表(0)

  1. 暂无评论