WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Calling an item from theme options and drop into a template tag (3 posts)

  1. Brett
    Member
    Posted 4 years ago #

    Okay, so basically I have setup a Theme Options page. I have a few options in there already that I can call back into the template itself. It's mostly just text that is dropped in, but now I want to drop in $args code into a template tag. Not knowing too much PHP has me stuck, obviously.

    I want to give the user the ability to edit which pages appear in the menu using the wp_list_pages template tag. For example I have a box for them to type something like "exclude=1,17,12" and then be placed inside the template tag as an $args.

    For all the other items in the Theme Options page, I add this to the template to get the results:

    <?php $office_hours = get_option('laketext_office_hours'); echo stripslashes($office_hours); ?>

    What do I need to type into wp_list_pages() to allow the ID: _page_navigation to appear correctly?

  2. MichaelH
    Member
    Posted 4 years ago #

    If that echoed option is of the value exclude=1,17,12 then wp_list_pages($office_hours); should work.

  3. Brett
    Member
    Posted 4 years ago #

    Thank you so much!

Topic Closed

This topic has been closed to new replies.

About this Topic