admin管理员组文章数量:1406913
I would like to apply two different styles for entry-title
meaning i.e. "my services: this big"
"my services:" should appear with default font size "This Big" should appear with bigger font size detection char for bigger font would be ":" so if there is a ":" in title, everything afterwards should be xy bigger
I tried for hours already in functions.php, I am to stupid thanks for help
I would like to apply two different styles for entry-title
meaning i.e. "my services: this big"
"my services:" should appear with default font size "This Big" should appear with bigger font size detection char for bigger font would be ":" so if there is a ":" in title, everything afterwards should be xy bigger
I tried for hours already in functions.php, I am to stupid thanks for help
Share Improve this question asked Nov 17, 2019 at 14:29 U2 PasU2 Pas 1 1- I found this in my content-page.php, will try to edit: <?php if ( the_title( '', '', false ) && siteorigin_page_setting( 'page_title' ) ) : ?> <h1 class="entry-title"><?php the_title(); ?></h1> <?php endif; ?> – U2 Pas Commented Nov 17, 2019 at 18:32
1 Answer
Reset to default 0ok found out - added this to my content-page.php maybe not nice, but works for now...
<?php $pieces = explode(':', the_title( '', '', false ), 2 ); if (2 == count($pieces)) : ?>
<h1 class="entry-title"><span><span style="font-size: 24px;"><?php print $pieces[0]; ?>: </span><span><?php print $pieces[1]; ?></span></span></h1>
<?php else : ?>
<h1 class="entry-title"><?php the_title(); ?></h1>
<?php endif; ?>
本文标签: reformat entrytitle with two different styles
版权声明:本文标题:reformat entry-title with two different styles 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744996436a2636702.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论