admin管理员组文章数量:1392066
My html markup is :
<div class="quote-wrapper">
<div class="quotes">MCSE boot camps have its supporters and its detractors. Some people do not understand why you should have</div>
</div>
how can show it by wordpress function.
Thank you
My html markup is :
<div class="quote-wrapper">
<div class="quotes">MCSE boot camps have its supporters and its detractors. Some people do not understand why you should have</div>
</div>
how can show it by wordpress function.
Thank you
Share Improve this question asked Feb 7, 2020 at 4:37 sampad debnathsampad debnath 11 bronze badge 1- Welcome. Could you please add more information like what exactly you want to have as a result? It is possible to edit the markup of contents in the edit page. – Hector Commented Feb 7, 2020 at 8:25
1 Answer
Reset to default 0You could paste this code directly into the Classic Editor, or into a Block Editor HTML block.
If you don't want to manually paste the full HTML in every time, you could either create a shortcode or a block that wraps this for you. Something like
<?php
// create shortcode [wpse_quote]
add_shortcode('wpse_quote', 'output_wpse_quote');
function output_wpse_quote($content = null) {
// Wrap the content in divs
return '<div class="quote-wrapper">
<div class="quotes">' . do_shortcode($content) . '</div>
</div>';
}
?>
In the Classic Editor, you would use the shortcode by typing an opening and closing shortcode in brackets, with the quote text between them:
[wpse_quote]Enter the quote text here.[/wpse_quote]
In the Block Editor, you would add a Shortcode Block and then paste that same text in. (Though if you're using the Block Editor, a block would probably be preferable, because then you can add the actual divs and style them so they look the same on in the Editor as they do on the front end.)
本文标签: customizationChange ltblockquotegt HTML markup on blog post
版权声明:本文标题:customization - Change <blockquote> HTML markup on blog post 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744768088a2624166.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论