Hi there. I’ve got a site using MemberPress and I’d like to style posts that are members-only on the category and tag archive. I have the logic worked out on how to tell if each post is a member post or not. But I can’t figure out how to apply a class to a each post in the loop. Is there a filter or something that will allow me to do this? If you can’t give me specific directions on this, can you point me in the right direction?
Thanks!
Hey Kevin,
Are you using Blog Posts in Advanced Layout Builder?
Best regards,
Nikko
I actually need to be able to do it in the ALB and in the archive with the blog format set to grid in the Theme Options.
Hi,
If you are using a child theme, I would suggest doing the instructions in this thread: http://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/
Then copy postslider.php (located in enfold/config-templatebuilder/avia-shortcodes) to the shortcodes folder of the child theme, then find this code (line 297 in Enfold 4.0.5):
$post_class = "post-entry post-entry-{$the_id} slide-entry-overview slide-loop-{$post_loop_count} slide-parity-{$parity} {$last}";
Just insert the class that you want to add, it would be better if it’s dynamic. Hope this helps :)
Best regards,
Nikko
This makes sense for the ALB blog block and I’ll look into it. But what about on a regular archive?
Thanks!
Hi,
If you have set Blog to grid, the archive and categories would use the same, you can test it out and see what I mean :)
Best regards,
Nikko