• This is a great plugin but i’m having trouble linking a post categories class name into foyer slide. What would be the best way to render the categories class name to foyer plugin?

    So example if I have a post category as fruit. The class name of fruit will be print in the foyer display channel markup.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Menno Luitjes

    (@mennolui)

    Hi @kenlu89, thanks!

    Do you want the category (‘fruit’) of the post on a Post slide to appear in the HTML of the slide? For example..

    <div class="foyer-slide foyer-slide-post foyer-slide-background-image category-fruit" data-foyer-slide-duration="8">
      <div class="inner">
        ...etc...
      </div>
    </div>
    <div class="foyer-slide foyer-slide-post foyer-slide-background-image category-fruit" data-foyer-slide-duration="8">
      <div class="inner">
        ...etc...
      </div>
    </div>

    Let me know if this is what you want to achieve! If not, please send me an HTML example.

    Best!

    Thread Starter kenlu89

    (@kenlu89)

    Hi @mennolui thank you for replying. I actually want the fruit categories outside the slide example below:

    <div class="foyer-display fruit-categories">
     <div class="foyer-channel foyer-channel-6 foyer-transition-fade">
    	<div class="foyer-slides">
            <div class="foyer-slide foyer-slide-post foyer-slide-background-default foyer-slide-group-1 next" data-foyer-slide-duration="5">
    	<div class="inner">
            <figure>

    Appreciate your help.

    • This reply was modified 5 years, 6 months ago by kenlu89.
    • This reply was modified 5 years, 6 months ago by kenlu89.
    Plugin Author Menno Luitjes

    (@mennolui)

    Hey @kenlu89,

    I see! The HTML structure is clear to me.

    But where does the ‘fruit-categories’ class come from? Do you for example want the ‘fruit-categories’ class added whenever the display contains Post slides for posts that have the ‘fruit-categories’ category? Or do you simply always want the ‘fruit-categories’ class added to the HTML of the display?

    Let me know!

    Thread Starter kenlu89

    (@kenlu89)

    @mennolui

    Hi Menno,

    I wanted to add the fruit-categories class added whenever the display contains post slides for posts that have the fruit-categories category. I think this is a great way for me to style base on the type of categories. For example, orange will have orange template, apple will have green template and etc. Hope this make sense.

    Thank you for exploring this!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to use categories class into foyer display’ is closed to new replies.