• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Category heading above content and next to sidebar

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Category heading above content and next to sidebar

This topic is: not resolved

Tagged: category, heading

  • This topic has 8 replies, 3 voices, and was last updated 12 years, 4 months ago by SoZo.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • February 2, 2013 at 2:48 am #17319
    stl99
    Member

    Hi there,

    I'm using the following code found in the StudioPress forums to display a heading on category pages. The problem is that the heading is displayed above the content AND above the sidebar. Even when I reduce the width of the heading the sidebar keeps being pushed down instead of being at the same level as the category heading.

    <code>

    /** Display category title */
    add_action ( 'genesis_before_content','my_category_title' );
    function my_category_title() {
    if ( is_category() ) {
    $term = get_category(get_query_var('cat'),false);
    $name = $term->name;
    echo '<h4 class="widgettitle"><span class ="widget-headline">'. $name .'</span></h4>';
    }
    }

    <code>

    I already tried several other hooks but no luck so far - any ideas?

    Cheers,

    Thomas

    February 2, 2013 at 6:32 am #17327
    Brad Dalton
    Participant

    Not sure exactly where you got that code but you may be interested in another solution.

    You can add text using the Archive Headline & Archive Intro Text fields for each category.

    Another option is to install a plugin which also enables you to add HTML and images before your category archive pages.

    Rich Text Tags, Categories, and Taxonomies plugin

    This tutorial includes the correct code for adding a widget anywhere there;s a Genesis hook and you can change the conditional tag.


    Tutorials for StudioPress Themes.

    February 2, 2013 at 9:01 am #17349
    stl99
    Member

    Actually I didn't know about the Archive Headline & Archive Intro Text fields feature which does exactly what I want - thanks!

    If only there was a way to display the correct taxonomy names automatically instead of filling them all in manually...

    Cheers,

    Thomas

    February 2, 2013 at 7:47 pm #17505
    Brad Dalton
    Participant

    You can edit the name for each category also.


    Tutorials for StudioPress Themes.

    February 3, 2013 at 3:48 am #17578
    stl99
    Member

    Thanks for your help and last question:

    I definitely have to insert the title for each category manually? Is there no way to have the category title automatically returned and only the description inserted manually?

    Cheers,
    Thomas

    February 3, 2013 at 7:57 pm #17727
    Brad Dalton
    Participant

    There is a way to do pretty much anything with WordPress but i don't have the answer at the moment. Try wordpress.stackexchange.com


    Tutorials for StudioPress Themes.

    February 3, 2013 at 8:02 pm #17729
    SoZo
    Member

    You can put this in functions.php

    add_action('genesis_before_loop', 'add_cat_title');
    function add_cat_title() {
    	if(is_category())
    	echo single_cat_title();
    }

    Add divs and style rules to suit.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    February 4, 2013 at 2:42 am #17786
    stl99
    Member

    Thanks, that finally worked!

    February 4, 2013 at 8:19 am #17836
    SoZo
    Member

    You're welcome 🙂


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

  • Author
    Posts
Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Category heading above content and next to sidebar’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble