WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Advanced Custom Fields] get_field working in page.php but not in page-template (2 posts)

  1. WhispersAndSons
    Member
    Posted 1 year ago #

    <?php wp_nav_menu( array( 'menu' => get_field( 'menuname'), 'container_class' => 'side-menu' ) ); ?>

    This line is working perfectly in any page.php and single.php ... however when I put it in for example customtemplateWide.php in the page-templates folder the result is a side-menu but not the one defined in the 'menuname' field ...

    Now I was wondering if this could be a because it is a page-template that is used ... otherwise I have no clue why it would work in some pages and not in others ... .

  2. WhispersAndSons
    Member
    Posted 1 year ago #

    I am not using the templates anymore so in that sense I also got the problem out of the way.

Topic Closed

This topic has been closed to new replies.

About this Topic