• 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

Customization Question

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 › Customization Question

This topic is: not resolved

Tagged: border, class, post, read more, widget

  • This topic has 6 replies, 2 voices, and was last updated 10 years ago by pixeldroid.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • November 21, 2015 at 9:32 pm #171736
    pixeldroid
    Member

    I am customizing the LifeStyle Pro theme and I'd like to place a border around the individual Widgets on the homepage and also around each of the posts. The problem is that when the posts are loaded into the widgets, they have the exact same classes as they do on the pages which display the individual posts, so I'm getting 2 borders on the homepage.

    Looking at http://thepixelfarm.com/mmob01/, note how the widgets on the home page and the the posts inside those widgets each have an outline. Looking at http://thepixelfarm.com/mmob01/category/breastfeeding/patient-education/, we see that each post has an border. What I want is to have the border on the widgets and the posts, but not on the posts when they are inside the widgets. Is it possible to add a class to the posts which won't be included when the post is loaded into a widget?

    Also, I'm not getting the "Read More" text in my home page widgets, but it does show in the individual posts – any idea why?

    Thanks.

    November 22, 2015 at 12:06 am #171743
    Porter
    Participant

    Due to the way your .widget and .post share so much common styling, the easiest way is to honestly override the border when on the home page, like so:

    .home .post {
        border: none;
    }

    Add that to style.css, and it's a quick and easy fix. If you're up to it, you can decouple your .widget and .post code a bit (if they don't share every aspect, separate it), and then make some classes specific to the areas needed. That being said, the above works, so don't over-complicate things if you don't feel the need.


    Buy me a beer? | Try DigitalOcean VPS Hosting

    November 23, 2015 at 1:25 pm #171850
    pixeldroid
    Member

    Thanks a lot for that. I see that the classes assigned to body can be very useful in customizing the styles in a number of situations. That is great.

    When embedded in a widget, a post includes all of its classes, so without modifying the php, I don't think there would be any way to to decouple the widget and post classes.

    November 23, 2015 at 1:32 pm #171853
    Porter
    Participant

    Yeah, doesn't look like there's a simple way to decouple that, and really, as long as you're writing specific rules that apply only in certain circumstances, there's no need. Glad it worked out for you!


    Buy me a beer? | Try DigitalOcean VPS Hosting

    November 23, 2015 at 1:47 pm #171854
    pixeldroid
    Member

    Looking at the same page, can you see why I’m not getting the “Read More” text in my home page widgets? It does show in the archive pages (see the posts on http://thepixelfarm.com/mmob01/category/breastfeeding/patient-education/).

    November 23, 2015 at 1:58 pm #171858
    Porter
    Participant

    Are the excerpts being used on the front page widgets created manually, or grabbed automatically?


    Buy me a beer? | Try DigitalOcean VPS Hosting

    November 24, 2015 at 5:23 am #171904
    pixeldroid
    Member

    I tested various Widget/'More Tag' settings and figured it out.
    For the record, here's what I learned:

    Results of Featured Post Widget - 'Content Type'/with 'More' tag in post:
    Show Content – Show excerpt and 'Read More' link. Else show whole post.
    Show Excerpt – Show excerpt, no 'Read More' link. Else, not sure how it determines excerpt length, no 'Read More' link.
    Show Content Limit - Show excerpt and 'Read More' link. Else, obey 'Limit content to # characters' and show 'Read More' link. # Chars is approximate and appears to include the 'Read More' text.
    No Content - Only show what is set in widget – e.g. Post Title, Featured Image.

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 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