Support

Account

Home Forums ACF PRO ACF \"Listing news\" conditional?

Solved

ACF \"Listing news\" conditional?

  • Hi guys, i was looking for a condition to target “news page” (listing post) but can’t find it. I need it because i’m working on a local environment and a production site (using acf-json and git) and using a “page” conditional (if is not “bla bla page”) won’t work due to different pages ID from local and production. How can i solve that?

  • Unfortunately, there isn’t a solution. You need something that can uniquely identify the page. You might try using a different page template, but that’s the only thing I can think of for this situation.

  • Understood, i can’t use a template page cause it refers to index.php, i though there should be a way to identify the page that wp refers to “listing posts” but that seems to be not possible. Anyone else has ideas?

  • Ah, there are a couple of options I think.

    Page Type is equal to Front Page for the home page of the site
    OR
    Page Type is equal to Posts Page for the “blog home page”

    This uses the settings under “Settings => Reading” for using static pages for homepage and posts page.

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

The topic ‘ACF \"Listing news\" conditional?’ is closed to new replies.