WordPress.org

Ready to get started?Download WordPress

Forums

Wanted: NEW sidebar for other pages (21 posts)

  1. yuh
    Member
    Posted 9 years ago #

    hello there, i´ve got a problem wich i can´t handle myself

    i would like to use an other sidebar in my archives page and if i know how this works or how can i do this, also in my about page.

    let me explain:

    in my archives page there should be in the sidebar most recent comments, perhaps the last posts and the db stats.
    i know how to make a static page and i know how to use those plugins, but what makes me think is....how can i make the new sidebar or a second sidebar with other features?

    i´m very thankfull of any help links and your answers. have a nice evening

  2. moshu
    Member
    Posted 9 years ago #

    What theme are you using?

  3. freshpolitics
    Member
    Posted 9 years ago #

    Send us a link or something so we know what you're talking about... coding a second sidebar should be easy, more or less the same code to create your first one..

  4. Jinsan
    Member
    Posted 9 years ago #

    For recent commetns, posts blah blah try this thread:

    http://wordpress.org/support/topic.php?id=27900

    For a second sidebar - ok this is a bit confusing because I did it the hard way, but try this:

    1) duplicate your sidebar.php file
    2) change everything you want inside
    3) in your archives.php files put this at the top or replace any existing reference to the sidebar.php with this:

    <?php load_template( TEMPLATEPATH . '/sidebarx.php'); ?>

    replace sidebarx.php with whatever the sidebar is called. Upload your new sidebar and check if it works.

    This should work.

  5. moshu
    Member
    Posted 9 years ago #

    It would say it would rather be archive.php (no S at the end).
    see: http://codex.wordpress.org/Theme_Development#Query-based_Templates

  6. yuh
    Member
    Posted 9 years ago #

    the page is still alpha version....don´t be too bad

    the base of this first step is a mix between kubrick and gespaa and my chaos.

    i knew how to create this new sidebar but the way its shown on the page itself is bad...its hard for me to explain this in english, im austrian hope you can see what i mean

  7. yuh
    Member
    Posted 9 years ago #

    hm something went wrong, pls excuse

    http://acidsugar.net

  8. moshu
    Member
    Posted 9 years ago #

    Well, I don't see any difference - all the sidebars are the same for me. Did you implement a different sidebar for any of the categories, Pages?

    (There is a WP support site in German: http://wordpress.de )

  9. yuh
    Member
    Posted 9 years ago #

    the position of the sidebar and the post doesn´t fit together...how can i change this that it make a nice view?

    atm everything is a bit moved out of place if you can understand me.

    the sidebar in the mainpage, the index works perfectly, but the generatet ( in a statical page ) doesn´t fit

    i would like to get the headline and the latest posts in the same line....how can i do this, if its possible?

  10. moshu
    Member
    Posted 9 years ago #

    Well, in your only working page ( http://acidsugar.net/archive.php ) you are calling the sidebar BEFORE the content. Try to move it where in the other files is called.

  11. yuh
    Member
    Posted 9 years ago #

    when i position the calling of the sidebar like in the index.php the new sidebar is again moved out of place. when i copy the php line at the end of the page, to the calling of the footer, the new sidebar is at the lower right corner, at the bottom of the content page

    when i put it between the first headline "blog archives" there it makes a terribly space, but its always working.

    i would like to position this calling of the new sidebar, that its shown exactly in the same height like the first headline, in my case the "blog archives"
    the only question is, how is this possible?!

    thx for all your answers

  12. yuh
    Member
    Posted 9 years ago #

    i still have this problem....
    if there is someone who had modified those sidebars on his side. pls feel free if your time alows it to contact me

  13. Jinsan
    Member
    Posted 9 years ago #

    can you grab a screenshot of the problem in effect or at lesat leave the problem on your site unless it's critical you can't have it there. everytime i check it looks fine.

    I have the recent thing working in my sidebar, but then I don't have half of the other stuff like about etc that you do

  14. Root
    Member
    Posted 9 years ago #

    I have got a solution to this which is so butt ugly I dare not demonstrate it. First I cleared everything out of footer.php. Most of it was junk which easily fitted somewhere else. Then I turned the file footer.php into a menu :). So I could use get . Then I split them for my 3 col template. :)

  15. yuh
    Member
    Posted 9 years ago #

    my sidebar works technically perfect, but its strange how its displayed. i cleared everything out of my cache in every browser but it didn´t help. so i thought it was a mistake or a little thing i had forgotten....

    and i upped 2 pics your you so you can see what i mean with " moved out of place"
    http://acidsugar.net/sbinie.png (sidebar shown in ie)
    http://acidsugar.net/sbinff.png (sidebar shown in the ultimate browser)

    perhaps i did a wrong way to get a static page. i used this code here:

    <?php
    require('./wp-blog-header.php');
    $themes = get_themes();
    $current_theme = get_current_theme();
    $current_template_dir = $themes[$current_theme]['Template Dir'];
    include($current_template_dir . "/header.php"); ?>

    mein content

    <?php include($current_template_dir . "/sidebar2.php"); ?>
    <?php include($current_template_dir . "/footer.php"); ?>

    would be great if someone has an idea.
    in my css i used the <h1> for the headlines in the content. i also tried to use the h1 from the entrybody but its still displayed a bit wrong ....

    could this be a reason that i used a wrong headline??

  16. moshu
    Member
    Posted 9 years ago #

    http://wordpress.org/support/topic.php?id=28259
    Here is a nice solution Avenir provided for different sidebar problems...

  17. yuh
    Member
    Posted 9 years ago #

    thx moshu thats exactly that for i was looking for

    i thought i take a look at the default theme in wp 1.5 the "kubrick" and in this sidebar he also uses the "if" calling.

    for example in the default theme....so you can browse to archives. the sidebar loads the content, text, pictures whatever for this section and the place where you are right now....even in the archiv section.

    i took a look at this sidebar and i think i can use this for my problem. and perhaps i can write u soon about succes or a miss :)

    one question is still unanswered, am i right with my doing to create a static page with this phpcode a post before, or is there something wrong?

    thx really really a lot for helping....i´m on my way to handle this now

  18. moshu
    Member
    Posted 9 years ago #

    one question is still unanswered, am i right with my doing to create a static page with this phpcode a post before, or is there something wrong?

    Im not sure I understand exactly what you mean. Could you re-phrase it, please!

  19. yuh
    Member
    Posted 9 years ago #

    is the way i create a static page. im not sure if this is a static page okay, or is there another way to get a new page?

    hm not better :)

    i want a new page with the content in the archiv at my webpage. left the content with stats, categories and perhaps something else and on the right should be displayed a new createt sidebar with comments and recent posts.

    and so i did on my page. i used this code to get a new page which i gave a hyperlink in the header.
    thats the code:

    <?php
    require('./wp-blog-header.php');
    $themes = get_themes();
    $current_theme = get_current_theme();
    $current_template_dir = $themes[$current_theme]['Template Dir'];
    include($current_template_dir . "/header.php"); ?>

    mein content

    <?php include($current_template_dir . "/sidebar2.php"); ?>
    <?php include($current_template_dir . "/footer.php"); ?>

    is this okay how i build a new page with this content i would like or should i use something else. the stats i use atm are 4 plugins and so i decided to get a page like that...its the only way i know do do this

  20. moshu
    Member
    Posted 9 years ago #

    I think you need to study a little bit the Pages section in the Codex. To have a "different looking" page (or a page with some special template tags in it) you need to create a template.
    You can also study how it is done in the deafult theme, you can also see the use of some special Pages and templates (e.g. Search) in my theme.

  21. yuh
    Member
    Posted 9 years ago #

    the default template is a perfect example, but first of all is to get in touch with the basics i missed and read the article you postet me.

    hope i can post you a succes very soon, thx alot to give me the right way moshu

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.