WordPress.org

Forums

Including a sidebar on every page + category question. (14 posts)

  1. Alexgeek
    Member
    Posted 7 years ago #

    1. I want to include a sidebar on every page (custom one but get's called just like get_siderbar() ). How can I do this so it appears on all pages? What file do I put it in?

    2. I have the main category 2007, with child categories for months june -> november. Each of these months also has child categoies (articles, faq etc). The problem is, wordpress won't let me have more than one category with the same name, regardless of whether they are in the same section.
    e.g.
    I can't have:
    2007->october->articles
    &
    2007->november->articles

    Is there anyway I can allow wordpress to let me do this?
    thanks

  2. moshu
    Member
    Posted 7 years ago #

    1. Are we talking about Pages? - they, usually, are displayed by the page.php template file.
    Learn about Template_Hierarchy...
    1a. No, you cannot use the get_sidebar for anything else than the default sidebar.php.
    It has been posted zillion times, here you go again:
    <?php include (TEMPLATEPATH . '/custombar.php'); ?>
    (use it as it is, change only the file name)

  3. Alexgeek
    Member
    Posted 7 years ago #

    Moshu, I know what the code is.
    I just don't know where to put it! ha.
    Where can i put it so that it will be on every page, and not page as in a wordpress page, a page as in everything. Including blog posts, categories, pages etc.
    Thanks

  4. moshu
    Member
    Posted 7 years ago #

    I don't understand what are you talking about.
    Where is the sidebar (url, theme etc.) that doesn't show up on every page?

  5. timethief
    Member
    Posted 7 years ago #

    I'm a newbie so please go easy on me if I'm off-base. At wordpress.com we have adapted themes from wordpress.org. Some of these themes display sidebars on every page and some do not. Is that a factor here?

  6. moshu
    Member
    Posted 7 years ago #

    Maybe... but I hate theoretical discussions. Have a theme issue? Show it and we'll deal with it.

  7. Alexgeek
    Member
    Posted 7 years ago #

    Okay, home-page shows the sidebar:
    http://www.creativecoding.net/development/
    This page and others like it doesn't:
    http://www.creativecoding.net/development/2007/october/articles-october/off-line-promotional-techniques-for-your-website/

    More importantly, the category thing.
    If it isn't possible to have categories with the same name but with different parent categories, everything I have done is a complete waste.

  8. moshu
    Member
    Posted 7 years ago #

    1. The sidebar is a matter of theme design and template file editing.

    2. I really don't know any solution for the same name category issue, sorry :(

  9. Alexgeek
    Member
    Posted 7 years ago #

    Thanks, so for the first one will I have to put the sidebar function in: category.php, page.php, archive.php, archives.php.. anymore?

    For the second. Do any of the coders who made WP ever post here? Maybe they could help, otherwise my next few weeks will be spent on coding a CMS from scratch :(

  10. Chris_K
    Member
    Posted 7 years ago #

  11. Alexgeek
    Member
    Posted 7 years ago #

    umm What is that? It just tells me to sign up for something.

  12. Chris_K
    Member
    Posted 7 years ago #

    Sorry. I thought the name was self-evident, but I often assume too much.

    That's a mailing list where you'll find developers. As you were looking for some, I thought you might find it useful.

    Apologies.

  13. Alexgeek
    Member
    Posted 7 years ago #

    Don't apologize! Great link thanks.
    Will try that.
    If anyone knows of a solution to my problems in the meantime, please shout!

  14. soundgraphs
    Member
    Posted 7 years ago #

    Was looking 4 the same thing, got it to work.

    In themes, look for the theme being applied on your website. In this folder, look for the file single.php.

    In this file add the following code:

    <?php get_sidebar(); ?>

    at the end of the page, just before

    <?php get_footer(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.