Forums

Archive page with different sidebar. (7 posts)

  1. rocky2889
    Member
    Posted 8 years ago #

    How can I can change the archive page to have different sidebar?
    On the "archive.php" I see there is a <?php get_sidebar () ; ?>
    Can I just change to <?php get_sidebar1 () ;?> and create a file with "sidebar1.php"
    anybody please help. thanks

  2. lawtai
    Member
    Posted 8 years ago #

    I'm not sure if that would work, but you could just hardcode your sidebar into archive.php. So just copy out the contents of your current sidebar, paste it into archive.php and change it to fit your needs.

  3. rocky2889
    Member
    Posted 8 years ago #

    I just like to see on the sidebar with calendar and the archives month with no other tags.

  4. eridan
    Member
    Posted 8 years ago #

    No, you can't just rename it to get_sidebar1, since the function is named get_sidebar. You could either edit the get_sidebar function, create a new one which includes a different sidebar or edit the sidebar.php and put something like this in it. if( is_archive()) { include("something"); }

  5. lawtai
    Member
    Posted 8 years ago #

    you can do what I said in my previous post, or you can also write if/else statements in your current sidebar.php file to check what page you're on. I'm thinking it'd be easier for you to just do what I said before.

  6. eridan
    Member
    Posted 8 years ago #

    You want nothing but the calendar in the sidebar?

  7. rocky2889
    Member
    Posted 8 years ago #

    Eridan, I want to have to the calendar and the archive on the sidebar.
    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.