最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin2PV0评论
<!-- 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.

Post a comment

comment list (0)

  1. No comments so far