• Resolved knath632

    (@knath632)


    Hi htmlBurger,

    How do I set default template while making filed? My deafault template is page.php and I code like below but it seems to be not working

    ->show_on_template(array(“home.php”,”page.php”, “blog.php”,”twocolumn.php”))

    and why I have to use ->show_on_post_type(‘page’) to show options in in selected template? I have to use this one because only show_on_template is not working.

    Please let me know.

    https://www.ads-software.com/plugins/carbon-fields/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author htmlBurger

    (@htmlburger)

    Hi @knath632,

    When you want to set your container to the default template, use default, like this:

    ->show_on_template('default')

    and if you want you can use it with an array of templates, like this:

    ->show_on_template(array("home.php", 'default', "blog.php", "twocolumn.php"))
    Thread Starter knath632

    (@knath632)

    Thanks, it’s working.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Set default template’ is closed to new replies.