add_filter( 'aws_title_search_result', 'my_aws_title_search_result', 10, 3 );
function my_aws_title_search_result( $title, $product_id, $product ) {
$field = 'test-text';
if ( $field ) {
$title = $title . ' ' . $field;
}
return $title;
}
]]>I am trying to add a span to blog post titles, based upon their category on the website and I don’t want it to show up in the home page in the widgets section at the bottom. Here is my code:
—
add_filter( ‘the_title’, ‘my_modify_title’, 10, 2 );
function my_modify_title( $title, $id ) {
if( in_category( ‘Fitness’, $id ) ) {
$title = ‘<span class=”fitness”></span> ‘ . $title;
} else if( in_category( ‘Recipe’, $id ) ) {
$title = ‘<span class=”recipe”></span> ‘ . $title;
} else if( in_category( ‘Life etc’, $id ) ) {
$title = ‘<span class=”life”></span> ‘ . $title;
} else if( in_category( ‘Soul’, $id ) ) {
$title = ‘<span class=”soul”></span> ‘ . $title;
}
return $title;
}
—
I tried adding:
!is_front_page() to the if and it isn’t working.
add_filter( ‘the_title’, ‘my_modify_title’, 10, 2 );
function my_modify_title( $title, $id ) {
if( !is_front_page() && in_category( ‘Fitness’, $id ) ) {
$title = ‘<span class=”fitness”></span> ‘ . $title;
} else if( !is_front_page() && in_category( ‘Recipe’, $id ) ) {
$title = ‘<span class=”recipe”></span> ‘ . $title;
} else if( !is_front_page() && in_category( ‘Life etc’, $id ) ) {
$title = ‘<span class=”life”></span> ‘ . $title;
} else if( !is_front_page() && in_category( ‘Soul’, $id ) ) {
$title = ‘<span class=”soul”></span> ‘ . $title;
}
return $title;
}
—
Please let me know if I’m doing something wrong here…
The website is currently at: https://utopiandesigns.ca/barlinfitness/
]]>The code I use only modify titles on FULL WIDTH template pages and I do not know why… Can someone help me so I can apply similar changes to other page templates, such as the ‘default’ or even custom page template I migh create in the future? Here is the code I use:
.page-template h1.entry-title {
color: blue !important;
font-weight: 300;
font-size: 33px;
font-family: times new roman;
text-align: center;
}
Thanks!
]]>I put this calendar online : https://www.armoup.ch/agenda/mois/
I have to make a little correction :
– The title is “événements pourjuillet 2013”
– The correct title should be “événements pour juillet 2013”
A space is missing before the month (juillet).
How can I correct this?
Thanks a lot in advance!
]]>I have searched everywhere for the code to modify the “Lobster” font that is on the titles of all posts, header, and widgets to no avail. I’ve managed to change the post fonts. Can anyone help? Here is my style.css. Any advice would be appreciated! Thanks!
[ 320 lines of code moderated, that’s just way too much. For that many lines of code please use pastebin.com instead. Or just post a link to your style sheet. ]
]]>Right now it says “My site name >> Blog Archive >> Post name”
I want to modify the Blog Archive portion. Is it in options? or do I have to modify this in one of the files.. which one?
Thanks.
Mike
https://michaelhaltman.com
3.0.3 MU
Can anybody help?
]]>