Forums

[resolved] Exclude sidebar content on 404 page only (3 posts)

  1. aar0on
    Member
    Posted 4 years ago #

    Sorry, I looked for an answer, but I can't find what I need.

    My 404 page has one line of content on it, so I wanted to eliminate most--but not all--of the content from the sidebar on that page only.

    I tried making a second sidebar (sidebar2.php) and referencing to it in the code of the 404.php page (basically, I replaced

    <?php get_sidebar(); ?>
    with
    <?php get_sidebar2(); ?>

    As much as that seemed like it'd work, I get an errorreferring to line 2 (the same line where 'sidebar2.php' is in the code) and the page won't load.

    Any ideas?

  2. aar0on
    Member
    Posted 4 years ago #

    Sorry, here's the error:

    Fatal error: Call to undefined function: get_sidebar2() in /homepages/43/d168146491/htdocs/blog/wp-content/themes/gluttony/404.php on line 2

  3. aar0on
    Member
    Posted 4 years ago #

    Nevermind, got it:

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.