• 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

Part 2: Adding Text/Html to Category Page

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 › General Discussion › Part 2: Adding Text/Html to Category Page

This topic is: resolved
  • This topic has 2 replies, 2 voices, and was last updated 4 years, 3 months ago by defree99.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • September 28, 2018 at 2:36 pm #223440
    defree99
    Participant

    I am using the Corporate Pro theme here:

    http://mindpranabody.com/category/personal-trainer/

    How do I add html and/or text on the category page(s), above the grid of individual posts?

    1) I know I can use the category Archive feature, but that is not what I want because it puts the content in the maroon header area

    2) I want to put the text and html in the white area, above the grid of posts. But still inside the area with the white background

    3) How can I do this?

    October 1, 2018 at 8:19 pm #223480
    James
    Participant

    Hi

    The quick way would be to hook in your html/text and hard code the content for it to show in the personal-trainer category.

    This goes in your functions.php

    
    add_action ( 'genesis_before_content_sidebar_wrap', 'mindpranabody_before_category_posts_text' );
    /**
     * Add text before the posts on personal trainer category.
     *
     * @since 1.0.0
     */
    function mindpranabody_before_category_posts_text() {
    
    	if (  is_category('personal-trainer') ) {
    
    		?>
    
    		<div class="before-category-posts">
    
    			<p>Add your content</p>
    
    		</div>
    
    		<?php
    
    	}
    
    }
    
    

    The other way would be to modify the hero section code itself, but that's a lot trickier.

    October 8, 2018 at 6:39 am #223592
    defree99
    Participant

    Thanks!

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Part 2: Adding Text/Html to Category Page’ 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

© 2023 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