• 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

Different fonts for body and entry content paragraphs?

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 › Different fonts for body and entry content paragraphs?

This topic is: resolved

Tagged: css, font size, selectors

  • This topic has 2 replies, 2 voices, and was last updated 9 years, 2 months ago by MM.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • November 22, 2013 at 2:04 am #74909
    MM
    Member

    I'm trying to get different font size for the content characters, displayed on blog preview pages (i.e. the page with many articles and a short text preview), and a different font size for the main body paragraphs on a single blog page.

    For some reason, the below code turns the preview content to 18px.

    But also, if I add !important to entry content, then the body changes.

    Any ideas CSS experts ? thks!

    .entry-content p {
    	margin-bottom: 20px;
    	margin-bottom: 1.25rem;
    	font-size: 15px;
    }
    
    body p {
    	font-family: "proxima-nova",sans-serif;
    	font-size: 18px!important;
    	font-weight: 500;
    	line-height: 26px;
    }
    November 22, 2013 at 7:18 am #74937
    Robin
    Member

    To target a specific page, you need to find the body class which makes it unique. If you're using the standard Genesis blog template, you can add .page-template-page_blog-php to the front of the class you want to modify, possibly (without a link to the page in question, I'm just guessing):

    .page-template-page_blog-php .entry-content p { your different code }

    The classes you're using are too broad, so will affect the entire site. To see what classes are applied to the page, use Chrome's Developer Tools, or Firebug in Firefox, and look at the body tag at the top of the source code in the HTML. HTH


    I do the best I can with what I’ve got. (say hey on twitter)

    November 22, 2013 at 9:57 am #75024
    MM
    Member

    Robin, your guess was perfect - thank you !

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

© 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