WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Need help adding a sidebar to just one page (3 posts)

  1. sketchklubb
    Member
    Posted 4 years ago #

    Hello all,

    I am currently trying to set up http://www.sketchklubb.com/main

    Sketch Klubb is a group of artists, and we would like to use the site to showcase our many zines and publications. I am current;y using the Atahualpa theme (http://wordpress.org/extend/themes/atahualpa)

    I would like the main site to function with very little information/clutter on each page. The drop down menu at the top provides navigation.

    I would also like the "Blog" page to function as a blog. So, I would like the functionality of the sidebar(archive/rss sub/etc) on that page only. What is the best way to accomplish this?

    I appreciate any help, and thank you to WordPress. I am loving using it so far.

    -Nick

  2. acornrevolution
    Member
    Posted 4 years ago #

    I just did something similar on my site.

    In your sidebar.php, you can try code like this:

    <div id="sidebar">
    		<ul>
    <!-- Home: if its the home page, display this info -->
         <?php if ( is_home() ) { ?>
              <h2>Welcome Text</h2>
               <p>Or you can delete this to display nothing</p>
          <?php } ?>
    
    <!-- Categories: if its a category page display this info-->
         <?php if ( is_category() ) { ?>
              <?php 	/* Widgetized sidebar, if you have the plugin installed. */
    					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
         <?php endwhile; ?>
         <?php } ?>
         <?php } else { ?><?php } ?>

    If "Blog" is a specific category, you can change "is_category()" to "is_category('3')" or something like that. If "Blog" is a page, you can change it to "is_page()".

    Play around with that, and read the Codex page on conditionals.
    I'm new to PHP myself.

  3. sketchklubb
    Member
    Posted 4 years ago #

    Thank you for your quick response acorn.

    After playing with the site for a while, I realized I was overlooking a very simple solution for this.

    In the Atahualpa editor, it was just a matter of checking a few boxes. I feel silly for having overlooked it.

    For the benefit of those who want to do this:
    Go under Atahualpa Theme Options
    Then Style and Configure SIDEBARS
    Then click the boxes of the pages you want the sidebars to show up on.
    "Homepage" refers to which ever page you have designated for posts.

    -Nick

Topic Closed

This topic has been closed to new replies.

About this Topic