WordPress.org

Ready to get started?Download WordPress

Forums

Request: Conditional for single post navigation css (3 posts)

  1. Sunny_Balanga
    Member
    Posted 3 years ago #

    For the record, I do try to find things before asking - just cause they're there doesn't mean I can see them - LOL.

    I style the navigation are for previous/next links with css and if I have only a single post in the category without any previous/next links, I don't want the navigation styling showing up.

    I have found that if you only set a background color and there are no links, nothing shows up. HOWEVER, if you set any of margins, padding, width and/or borders, then the styling shows up even if there are no links.

    Here's an example when there are previous/next links and how the navigation area css styling looks: http://www.sunnybalanga.com/blog/2010/10/09/wordpress-white-screen-of-death-upon-comment-post/

    And here's an example of a post that is the only post in its category. I have been able to style the navigations links as above without using margins, padding or width, but I had to keep the borders, and as you can see, they show up where the link navigation area is.

    So.. I'd like a conditional for single.php like the one there is for loop.php (<?php if ( $wp_query->max_num_pages > 1 ) : ?>)

    Apologies in advance if this exists somewhere in some form and I've missed it - it won't be my firts miss.. or my last.. :)

  2. Sunny_Balanga
    Member
    Posted 3 years ago #

    And hehe oops - that second example is here - http://www.sunnybalanga.com/blog/2010/09/26/in-the-works-for-wamp/

  3. Sunny_Balanga
    Member
    Posted 3 years ago #

    Another oops - I style the navigation are for previous/next links
    Read: I style the navigation AREA for previous/next links

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.