• Resolved mocha

    (@mocha)


    Instead of displaying the “Archives” and “Categories” in the sidebar, I would like to create links from the main page to separate archives and categories pages. My attempt to accomplish this was met in error and any suggestions would be greatly appreciated.

    I created a file called archs.php and linked to it from the main page. The first line of code in archs.php calls <?php get_header(); ?>. The following error occurs when I attempt to link to this page from my main page: Fatal error: Call to undefined function get_header() in /home/mocha/www/wp-content/themes/default/archs.php on line 1. I don’t understand why I’m unable to call this function as it is no different than index.php or any other WP document.

    If someone has a better method for accomplishing this, I’m all ears (eyes)!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Do you mean something like this?

    hi

    I have the same problem. I would like to create a page (not an archive) that would help my guest to navigate, but when refer to get_header() function I get an error.. I have placed this page I’m creating in my theme directory and I thought that if I call functions everything should be alright.. its not.. 🙁

    does anybody has any suggestions?

    Ok solved, you have to do something like that:

    <?php
    define(‘WP_USE_THEMES’, false);
    require(‘wp-blog-header.php’); /* here write the path to your wp-blog-header */
    get_header();
    ?>

    after this you can call functions normaly.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Separate Archives Page’ is closed to new replies.