• Resolved aar0on

    (@aar0on)


    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter aar0on

    (@aar0on)

    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

    Thread Starter aar0on

    (@aar0on)

    Nevermind, got it:

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude sidebar content on 404 page only’ is closed to new replies.