Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1184010

    Hi,

    I’m using the grid layout and I wanted for each post to have a background color based on its category.
    I searched in the documentation and found : https://kriesi.at/documentation/enfold/blog-post/ > Different post style for each category, which says :

    “All posts added to a specific category can be styled to look different from other posts using custom CSS code. A unique CSS class name in the format “category-xyz” is added to all of the post articles.”

    But it seem there is no category class name added … here are the classes I got in the <article> for an article in the “news” category.

    class=”slide-entry flex_column post-entry post-entry-51 slide-entry-overview slide-loop-2 slide-parity-even av_one_third real-thumbnail”

    Can you help me with this ?

    I tried to had {$cats} on this line of the config-templatebuilder/avia-shortcodes/postslider/postslider.php file but without success.
    $output .= “<article class=’slide-entry flex_column {$style} {$post_class} {$grid} {$extraClass} {$thumb_class}’ $markup>”;

    Thanks a lot

    #1184498

    Hi,

    Thanks for contacting us :)

    Could you please try replacing postslider.php file with this one – https://pastebin.com/1ryRnCN9 on your child theme – https://kriesi.at/documentation/enfold/child-theme/? You can copy the file inside “shortcodes” folder on your child theme and add this code in Functions.php file of your child theme – https://kriesi.at/documentation/enfold/intro-to-layout-builder/#add-elements-to-alb

    Let us know if you need further assistance :)

    Cheers!
    Yigit

    #1184566

    Hi,

    Works fine, great =)

    Thanks a lot !
    Regards

    #1184576

    Hi,

    Glad we could help! :)

    For your information, you can take a look at Enfold documentation here – https://kriesi.at/documentation/enfold/
    If you have any other questions or issues, feel free to start a new thread under Enfold sub forum and we will gladly try to help you :)

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘Blog Post > Grid Layout change background by category’ is closed to new replies.