WordPress.org

Ready to get started?Download WordPress

Forums

Kubrick sidebar color carrying over to post page (17 posts)

  1. Stryke11
    Member
    Posted 9 years ago #

    Hello, just upgraded to 1.5 and with some tweaking and probably ugly code have managed to get my blog sorta looking the way it used to. One formatting thing that I can't seem to figure out is that before I had a sidebar of a different color on the main page, but if I clicked on a specific post and brought up the post & comments page that colored sidebar was gone. The formatting is still correct now, but I need to have it call up kubrickbgwide.jpg instead of kubrickbg.jpg, and I'm not sure which file I need to do it in. If you need an example of what I'm talking about go to http://www.cruzcontroller.com/blog and then click on a post header.

    Also, in the backend menus, it allows me to put a <br> between the sidebar links and their descriptions (in fact, it's the default), but on the blog page this shows up as just a space, while on the older version the description started below the link. Like it says:

    LINK. This is a cool link.

    Instead of:

    LINK
    This is a cool link.

    Thanks in advance everyone. The upgrade party was very cool.

  2. desk003
    Member
    Posted 9 years ago #

    First, your blog looks great, and Second, your blog looks fine other than your entries are centered instead of on to the left on the individual post pages. Thirdly, you use <br /> instead of <br> because < br /> validates.

  3. Stryke11
    Member
    Posted 9 years ago #

    1. Thank you.
    2. Individual post pages used to not have the green sidebar. I would like to continue not having them. I like them centered.
    3. I just checked. It *is* using 'br /'. Still doesn't work.

  4. trendsurfer
    Member
    Posted 9 years ago #

    The call for the background image is in the header.php template file. Maybe you accidently named both images the same.

  5. Michael Adams (mdawaffe)
    Member
    Posted 9 years ago #

    Specifically, check out the #page id. There's some PHP if statements that control which of two #page lines is used. See the default Kubrick header.php file that comes with WordPress 1.5 for an example.

  6. Stryke11
    Member
    Posted 9 years ago #

    Ah, I see the diffence now. The old kubrick said this:

    body { background: url("<?php echo get_settings('siteurl'); ?>/images/kubrickbgcolor.jpg"); } <?php /* Checks to see whether it needs a sidebar or not */ if ((! $withcomments) && (! $single)) { ?>
    #page { background: url("<?php echo get_settings('siteurl'); ?>/images/kubrickbg.jpg") repeat-y top; border: none; } <?php } else { // No sidebar ?>
    #page { background: url("<?php echo get_settings('siteurl'); ?>/images/kubrickbgwide.jpg") repeat-y top; border: none; } <?php } ?>

    while the new one just says:

    body { background: url("http://cruzcontroller.com/blog/images/kubrickbgcolor.jpg"); }
    #page { background: url("http://cruzcontroller.com/blog/images/kubrickbg.jpg") repeat-y top; border: none; }

    So I guess the new version of Kubrick took out that functionality and the second page command.

    I'll try to copy it over and see if that works. If not, any help would be appreciated by people know know Kubrick.

    UPDATE: Nope, just copying it did not work. Suck.

  7. trendsurfer
    Member
    Posted 9 years ago #

    Stryke11, the code you show doesn't include the "if" statement ... you may have missed it since it extends way off to the right outside visibility. It begins directly after the "body" background style.

  8. Stryke11
    Member
    Posted 9 years ago #

    Ha! Copied someone else's Kubrick 1.5 page, and now it works. For some reason mine didn't have the new "if" statement. Now it does.

    Sweet.

    Any ideas out there on making the link description in the sidebar go below the links instead of next to them?

  9. Michael Adams (mdawaffe)
    Member
    Posted 9 years ago #

    http://codex.wordpress.org/Template_Tags#Links_Manager_tags

    Check some of the "Links Manager tags" out. Links Manager refers to the Links Panel in your site's Administration Panels.

  10. Stryke11
    Member
    Posted 9 years ago #

    Sorry, that's a ton of info, but it doesn't help me. I think it's a bug, but I'm not sure. If you go to the WP 1.5 backend and click links, and then link categories, there will be a line after every link category that says Before:, Between:, and After:. The default for each one is Before - 'li'. Between 'br /'. After '/li'.

    Checking out the source of my page reveals there is indeed a 'li' before each link and a '/li' after the description, but no 'br /' between them. My mission then, is to find away, aside from just doing my links myself in html outside of the backend, to put that 'br /' in there.

  11. Michael Adams (mdawaffe)
    Member
    Posted 9 years ago #

    Sorry: http://mosquito.wordpress.org/view.php?id=169

    You'll have to use wp_get_links instead of get_links_list. That means you'll have to make a call to wp_get_links for each link category.

    The following does just that and (I think) reproduces the output of get_links_list except it uses the before, between, and after settings. It's a bit of a hack, but I think it works.

    <?php $link_cats = $wpdb->get_results("SELECT cat_id, cat_name FROM $wpdb->linkcategories");
    foreach ($link_cats as $link_cat) { ?>
    <li id="linkcat-<?php echo $link_cat->cat_id; ?>"><h2><?php echo $link_cat->cat_name; ?></h2>
    <ul>
    <?php wp_get_links($link_cat->cat_id); ?>
    </ul>
    </li>
    <?php } ?>

  12. Stryke11
    Member
    Posted 9 years ago #

    Thanks for coming up with that, mdawaffe!

    Would this go into sidebar.php? In place of what's already there for links or in addition to it?

  13. Michael Adams (mdawaffe)
    Member
    Posted 9 years ago #

    Yes. In place of. Good luck! :)

  14. Stryke11
    Member
    Posted 9 years ago #

    It works perfectly. Thanks!!!

  15. whoispauladams
    Member
    Posted 9 years ago #

    Wow, this worked perfect for me as well. Thanks a ton! Looks SO much better now.

  16. mindless
    Member
    Posted 9 years ago #

    Big thank-you for this. Shouldn't this be considered a bug in 1.5? I mean, it allows you to choose formatting options, but then doesn't use them!

    Or maybe it's a template bug? Either way, this is the default config for 1.5 and it shouldn't be "shipped" this way. The average user isn't going to want to hack their templates.

  17. HARVEYK
    Member
    Posted 8 years ago #

    11/14/05 Same bug still exists! The <BR> between link name and description does not work. Thanks for the fix above.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.