• Resolved Sean T.

    (@tinothepro)


    Hi,

    I have created a bunch of containers and fields that I want only to display on the Home page edit screen of the site. I may also want to do additional pages later. I have seen the options for showing by post type, template and whatnot but those do not solve the issue. The issue I am currently dealing with is that I am using ->show_on_post_type(‘page’) (obviously it shows the fields on every page edit screen) but I have tried using something like ->show_on_page( (int) get_option( ‘page_on_front’ ) ) but I am assuming since this works by page ID, this information isn’t available yet while editing the page? I’m not sure. I would love some assistance on this as I also need to build something that creates an admin interface that allows options of what page/post/post type/template to show what containers on instead of hard coding it. Thanks!

Viewing 1 replies (of 1 total)
  • Thread Starter Sean T.

    (@tinothepro)

    Hi,

    An error on my part. ->show_on_page( (int) get_option( ‘page_on_front’ ) ) actually did work for me to target only the home page.

Viewing 1 replies (of 1 total)
  • The topic ‘Carbon Fields only show on home page edit screen’ is closed to new replies.