The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Template Tags inside includes (2 posts)

  1. bluedrag
    Posted 4 years ago #

    Hello WordPress Community,

    I have a website with a ton of posts, all of which have an php include in them which calls a kind of navigation to navigate through all the posts. (using the execphp plugin)

    I'm just curious if anyone knows if it's possible to out a template tag in side this include... for example

    Section 1
     <?php get wp_category1 ?>
    Section 2
     <?php get wp_category2 ?>
    Section 3
     <?php get wp_category3 ?>

    are there any other requirements (besides the file having to be a .php file) to using Wp template tags inside an include?


  2. An include is just like a theme file - you can use any WP template tags in them, if I'm understanding your question correctly. Think of it this way - sidebar.php, header.php, footer.php are also includes, and they are full of template tags.

Topic Closed

This topic has been closed to new replies.

About this Topic