• 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

Customizing Category Archive Content Post entries

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 › Customizing Category Archive Content Post entries

This topic is: resolved

Tagged: archive, category, content, css, custom, post

  • This topic has 7 replies, 2 voices, and was last updated 12 years, 4 months ago by [email protected].
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • February 12, 2013 at 4:56 pm #19943
    [email protected]
    Participant

    At http://test4.e9designs.com/sample-post-with-headlines/
    I have a 174px padding set above each #content .post

    #content .post {
    padding: 174px 20px 15px 20px;
    overflow: hidden;
    margin: 0px 0 0;
    border-bottom:1px solid #DFDFDF;
    }

    However, on the category archives pages, I do NOT want the top padding to be there above each post excerpt:
    http://test4.e9designs.com/category/business/

    Is there any easy way to customize the category archive page like this?
    Thank you!
    ~Anne

    February 13, 2013 at 1:51 am #20032
    Brad Dalton
    Participant

    Custom Body Class

    Add a custom class for cat archives and change the padding.


    Tutorials for StudioPress Themes.

    February 13, 2013 at 4:34 pm #20164
    [email protected]
    Participant

    Brad, thank you so much! I'm doing something wrong, because now I've received an error message:

    Fatal error: Cannot redeclare add_body_class() (previously declared in /home/e9design/public_html/test4/wp-content/themes/custom-theme/functions.php:15) in /home/e9design/public_html/test4/wp-content/themes/custom-theme/functions.php on line 27

    This is what I pasted into the functions.php file:

    /** Add custom body class to the head */
    add_filter( 'body_class', 'add_body_class' );
    function add_body_class( $classes ) {
    if ( is_category( 'business' ))
    $classes[] = 'custom-class';
    return $classes;
    }

    I *so* much appreciate your help!

    ~Anne

    February 14, 2013 at 1:33 am #20254
    Brad Dalton
    Participant

    Its already added it in your child themes functions.php file.

    You can grab the body class from your source code:

    <body class="archive category category-business category-3 custom-background custom-header header-full-width full-width-content custom-class">
    

    I tested this and it works:

    .category-business {
    background: yellow;
    }
    

    Tutorials for StudioPress Themes.

    February 14, 2013 at 11:13 am #20335
    [email protected]
    Participant

    Ahhhh.... thank you *very* much!

    This code worked:

    .category-business #content .post {
    padding: 0px 20px 15px 20px;
    }

    I will learn eventually, right? 🙂

    (Following your blog... maybe that will speed up the learning process...)

    ~Anne

    February 14, 2013 at 1:01 pm #20355
    [email protected]
    Participant

    May I ask one more question?

    The client now asks, "Can you please allow people to click on the Business or Wisdom or Nature header to bring them back to that specific page?"

    Oi vey!

    February 14, 2013 at 1:53 pm #20373
    Brad Dalton
    Participant

    Please start a new thread for new questions as it will be answered faster


    Tutorials for StudioPress Themes.

    February 14, 2013 at 1:59 pm #20376
    [email protected]
    Participant

    Thank you! Done...

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and 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