Jump to content

PHP-Including a wordpress custom field?


phdev

Recommended Posts

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?

Link to comment
https://forums.phpfreaks.com/topic/97925-php-including-a-wordpress-custom-field/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.