• michaelmcguk

    (@michaelmcguk)


    Hi,

    I have created my own navigation area on my site.

    Now this is standard across all pages, so I would like to make a function to store this in.

    I noticed ones like get_header retrieve data from ‘header.php’.

    Can I do the same with get_nav from a ‘nav.php’ page?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • mendezki

    (@mendezki)

    You can include a .php file this way:

    <?php include (TEMPLATEPATH . '/yourfilenamehere.php'); ?>

    Where the yourfilenamehere.php is placed in your theme’s directory (hence the TEMPLATEPATH).

    Thread Starter michaelmcguk

    (@michaelmcguk)

    Brilliant.

    Many thanks for your speedy reply ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to… create standard ‘blocks’ on site?’ is closed to new replies.