ACF if else statements and repeater template
-
I am using AJAX Load More plugin to load more posts on my website. It’s working great. I need to do something a little different for the returned posts.
I have an ACF radio button for each post to select if the post is Portrait or Landscape for example. Then in my loop I add a class to the post based on this selection. Which works well for the effect I need. However, I can’t replicate this for the repeater template. Is there any way I can do this?
Here is my simple if/else statement.
if (get_field('landscape_or_portrait') == 'Portrait') { $gridsetting = 'news-post-third'; } else { $gridsetting = 'news-post-two-thirds'; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘ACF if else statements and repeater template’ is closed to new replies.