Change title font size depending on category

Posted in: Newspaper
Post count: 2

Hi,

I would like to have a different font size for some post in block list according to the post category.
how can I accomplish that ?

Other think that I would like to accomplish is to show the excerpt in some posts in the block list, depending on the post category.

I’m using Block 9 for listing.

Tks

Post count: 22421

Hello,
Unfortunately the theme does not have any options for the setting you want. It can be done with custom work by using this functions: https://codex.wordpress.org/Function_Reference/in_categoryhttps://codex.wordpress.org/Function_Reference/is_category
Unfortunately you will need a bit of php knowledge to get it done. If you cannot manage on your own i suggest you hire a freelancer to help out.
Thank you!

Post count: 2

Tks for the reply,

I tried to add the code :
<?php
if (in_category(19))
{ echo ‘TRUE’;}
else {
echo ‘FALSE’;
}
?>

in the module , but unfurtanly it returns always FALSE.
I’m usinf block 77 from api demo , does this should work inside the td_module_77.php

Tks
Francisco

Post count: 6600

Hi,

Theme’s modules are built in the same way as module from our api example.
I suggest you try this wp function: https://codex.wordpress.org/Function_Reference/has_category to test if a post has specific category assigned to it or not.

This modifications requires customization services so, as Bogdan also suggested, if you don’t have the necessary coding knowledge, we advise you to turn to freelancer to help you on this because we cannot provide customization services. Sorry!

Thanks for the message!

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.