• 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

Styling featured post text on front 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 › Design Tips and Tricks › Styling featured post text on front page ?

This topic is: not resolved

Tagged: Delicious, featured post, style, text

  • This topic has 8 replies, 3 voices, and was last updated 9 years, 6 months ago by Boblebad.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • July 22, 2013 at 4:41 am #51815
    Boblebad
    Participant

    Hi

    I'm having trouble figuring out how to style the text on the front page, the featured post.

    http://www.gittehovmand.dk/

    There are no line breaks at all as in the original post, how come, and what can i do to get the post look nice ?

    It's the Delicious theme, but i see the same on Agent theme

    All the best
    Carsten

    http://www.gittehovmand.dk/
    July 22, 2013 at 5:02 am #51816
    Debra Scott
    Member

    When you are using the excerpt or content limit it takes away all html ie line breaks, formatting..

    You can either use a custom excerpt which will get the original formatting. Or use the content with more tag.

    http://codex.wordpress.org/Excerpt


    need help with your business or personal website? Contact me at Fat Cat Designs

    July 22, 2013 at 11:34 am #51860
    Boblebad
    Participant

    So what you're saying is that i need to use the more tag inside the post, to get the post excerpt look nice or ?

    I use the more tag on the featured post widget.

    July 22, 2013 at 12:06 pm #51868
    Brad Dalton
    Participant

    You can also add back the HTML formatting tags using this code snippet:

    Please copy this PHP code from the view raw link and paste it at the end of your child themes functions.php file.


    Get Help – Book Consultation.

    July 22, 2013 at 12:27 pm #51872
    Boblebad
    Participant

    Thank you Brad

    But, it does not work, here you can see where i put it:

    <?php
    // Start the engine
    require_once(TEMPLATEPATH.'/lib/init.php');

    // Child theme library
    require_once(CHILD_DIR.'/lib/style.php');
    require_once(CHILD_DIR.'/lib/widgets/delicious-slider-widget.php');

    // Child theme (do not remove)
    define('CHILD_THEME_NAME', 'Delicious Theme');
    define('CHILD_THEME_URL', 'http://www.studiopress.com/themes/delicious');

    // Tilbagefør stylen for featured post widget
    add_filter( 'get_the_content_limit_allowedtags', 'get_the_content_limit_custom_allowedtags' );
    /**
    * @author Brad Dalton
    * @example http://wp.me/p1lTu0-a5w
    */
    function get_the_content_limit_custom_allowedtags() {
    // Add custom tags to this string
    return '<script>,<style>,<br>,,<i>,

      ,

        ,

      1. ,';
        }

        // Add support for custom background
        if ( function_exists('add_custom_background') ) {
        add_custom_background();
        }

    July 22, 2013 at 12:40 pm #51875
    Boblebad
    Participant

    Hmm, don't know why i can't insert the code, so it gets displayed right, first i tried the code-"tag", but didn't work either...

    July 22, 2013 at 4:56 pm #51941
    Brad Dalton
    Participant

    Click, This Gist and copy it from the view raw link

    Then paste it at the end of your child themes functions.php file using a text editor like Notepad++

    Tested the code and it works.

    Don't add any code tags.

    Are you using FTP or File Manager in cPanel to access the functions file?


    Get Help – Book Consultation.

    July 23, 2013 at 12:34 am #51987
    Boblebad
    Participant

    The problem with inserting the code, is here in the forum, not in the code in functions.php

    Are you sure it works with the Featured Post widget in the Delicious theme, cause i can't get it to work, and it looks exactly like in here ?

    I did it through the Dashboard in WP.

    Regarding the widget, it doesn't make any difference whether i use "excerpt" or "content limit", just a matter of button.

    July 23, 2013 at 1:42 am #51992
    Boblebad
    Participant

    Regarding using the excerpt function in WP settings/reading, it does give some formatting, it gives line breaks, but not blank lines between lines of text, so the text is still somewhat cluttered together...

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