Balance Theme: Swap Breadcrumbs with Title

Community Forums Forums Design Tips and Tricks Balance Theme: Swap Breadcrumbs with Title

This topic is: not resolved

This topic contains 10 replies, has 2 voices, and was last updated by  csbeck 1 year, 8 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #25896

    tylerkelley
    Participant
    Post count: 5

    I’m using Simple Hooks and I am familiar with functions.php. I am looking for the best way to swap the breadcrumbs with a page or post title in the Balance theme. It just makes sense.

    http://aaatennis.org/about/

    #25903

    csbeck
    Participant
    Post count: 135

    I guess I’m thick-sculled but I don’t understand what you are asking. Your breadcrumbs look appropriate on this link. What do you want them to be instead of the page or post title?

    Or do you mean you want the title on top and the breadcrumbs under the title?

    Perhaps this will help:

    http://my.studiopress.com/snippets/breadcrumbs/#reposition

    Chris

    #25922

    tylerkelley
    Participant
    Post count: 5

    Yes – I would like the actual title sit where the breadcrumbs are right now and put the breadcrumbs beneath the gray area. I think the breadcrumbs are way too prominent on each page. I will check out your link and see if that helps.

    #25923

    tylerkelley
    Participant
    Post count: 5

    I see that I can remove the breadcrumbs but in doing so I lose the full width gray background that looks so nice in this theme: Balance. Is there a way to just put the post title in that spot so I don’t lose the gray bar? Hope this makes sense.

    #25928

    csbeck
    Participant
    Post count: 135

    Well you could add a new div by using Genesis Simple Hooks and put a div above the inner section. Then style that div like the breadcrumb section is now styled. Then change the breadcrumb styling to something less prominent.

    Were you able to still see the breadcrumbs but after the title of the page? That was the part that I didn’t check to see if it actually worked.

     

    #26068

    tylerkelley
    Participant
    Post count: 5

    I’m beginning to think this is not possible or at least not very easy and that’s why Studiopress did not do it. The problem occurs when trying to take the post title and remove it from the loop and into the area after the header.

    http://aaatennis.org/forums/

     

     

    #26073

    csbeck
    Participant
    Post count: 135

    Looks like you’re almost there. Did you want it to look differently? Perhaps send a mockup of what you are hoping.

    If you are close, how did you accomplish this? Did you use the Simple Hooks code from that sample post?

    If you like the page title in that grey bar (the way it is now), then you could make a new div and put the entry-title within that div (do this in your Simple Hook code). Give the new div a style and make it have the grey background and keep it 100% wide. Then make the entry-title the same width of your inner div (960px) and set the margins to 0 auto with no background.

    Let me know if that helps.

    Chris

     

    #26101

    tylerkelley
    Participant
    Post count: 5

    I appreciate the assistance – I wish it were as simple as CSS. I’m using this code:

     

    /** Reposition the Titles */
    /*———————————————————— */
    # removes default title display
    remove_action(‘genesis_post_title’, ‘genesis_do_post_title’);
    # adds action to header to check and output the different titles based on what is being viewed
    add_action(‘get_header’,’canishowtitle’);
    function canishowtitle() {
    if ( is_page() || is_single() ) { # check if page or single post
    add_action(‘genesis_after_header’, ‘genesis_do_post_title’);
    # check if using the blog template that comes with most genesis themes
    if ( is_page_template(‘page_blog.php’) ) {
    # add titles back to posts in the loop
    add_action(‘genesis_post_title’,’genesis_do_post_title’);
    }
    }
    else if ( is_category() ) { #check if viewing a category
    # add the category title
    add_action(‘genesis_after_header’, ‘add_category_title’ );
    # add titles back to posts in the loop
    add_action(‘genesis_post_title’,’genesis_do_post_title’);
    }
    else if ( is_tag() ) {
    # add the tag title
    add_action(‘genesis_after_header’, ‘add_tag_title’ );
    # add titles back to posts in the loop
    add_action(‘genesis_post_title’,’genesis_do_post_title’);
    }
    else if ( is_archive() ) {
    # add the archive title including if it is a date archive
    add_action(‘genesis_after_header’, ‘add_archive_title’ );
    # add titles back to posts in the loop
    add_action(‘genesis_post_title’,’genesis_do_post_title’);
    }
    else if ( ! is_home() ) {
    # if all else fails, display it anyways, except on the home page
    add_action(‘genesis_after_header’, ‘genesis_do_post_title’);
    }
    }
    function add_category_title() {
    # display the current category title
    echo ‘<h1 class=”entry-title”>’ . single_cat_title( ”, false ) . ‘</h1>';
    }
    function add_tag_title() {
    # display the current tag archive title
    echo ‘<h1 class=”entry-title”>’ . single_tag_title( ”, false ) . ‘</h1>';
    }
    function add_archive_title() {
    # display the current date or blog archives title
    if ( is_day() ) { # day archive
    echo ‘<h1 class=”entry-title”>’ . get_the_date() . ‘</h1>';
    }
    elseif ( is_month() ) { #month archive
    echo ‘<h1 class=”entry-title”>’ . get_the_date( ‘F Y’ ) . ‘</h1>';
    }
    elseif ( is_year() ) { #year archive
    echo ‘<h1 class=”entry-title”>’ . get_the_date( ‘Y’ ) . ‘</h1>';
    }
    else { # general archive default
    echo ‘<h1 class=”entry-title”>Blog Archives</h1>';
    }
    }
    /*———————————————————— */

     

    Unfortunately, this does not cover the bbpress pages like http://aaatennis.org/forums/

    It should say “Player Forums” not “Blog Archives”

    #26161

    csbeck
    Participant
    Post count: 135

    Yeah, that’s a lot.

    OK, so we can get rid of the lower “Player Forums” now using CSS – just create a new style called:

    #inner .wrap #content-sidebar-wrap #content. h2.entry-title and set display: none;

    One of your last lines – the last else says to name the general archive default to Blog Archives. If you change that to Player Forums, won’t that wrap it up?

     

    #26175

    tylerkelley
    Participant
    Post count: 5

    Thanks for all your help. Looks good.

    #26186

    csbeck
    Participant
    Post count: 135

    Great! You’re welcome.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.