Support » Fixing WordPress » Template Tags inside includes

  • 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?

    Thanks!

Viewing 1 replies (of 1 total)
  • Moderator Kathryn

    (@zoonini)


    Automattic Happiness Engineer


    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.

Viewing 1 replies (of 1 total)
  • The topic ‘Template Tags inside includes’ is closed to new replies.