Including a template that is defined in a wordpress custom field?

Discussion in 'PHP' started by wavefront, Mar 25, 2008.

  1. #1
    Hey guys,

    I have a wordpress based site and I have special submenus for certain types of posts on the site, using a custom field for the submenu.

    Example:
    <?php $exercises = get_post_custom_values(exercises); print $exercises[0]; ?>

    This forces me to manually update all posts with new menu html code that would have new menu items i just added.

    I want to be able to use php include to include a menu html file instead, but I do'nt know PHP.... This is what i'm trying:

    <?php include("http://www.sitename.com/common/submenu/$submenu_exercises = get_post_custom_values(submenu_exercises); print $submenu_exercises[0];"); ?>

    Of course this is not working. Can someone help?
     
    wavefront, Mar 25, 2008 IP