• Hello, my site is https://beingboldinnyc.com/

    For each blog post, you can only see a few lines on the homepage before you have to click on the “Read Only” to read the rest of it. A couple things with this:

    1. How do I get more text to show? Like if I want to show a couple paragraphs of it so the reader can get an actual feel for what the post is about?

    and

    2. How do I format the text that is shown? It’s all jumbled together as of now, with no differentiation between lines and paragraphs.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey there dmcguigan88,

    Hope you’re well! ??

    Use child themes for any customisation you will make. Read more about it here: https://codex.www.ads-software.com/Child_Themes

    Put this code inside your functions.php or use Code Snippet plugin

    add_filter( 'excerpt_length', 'dmc_excerpt_length' );
    function dmc_excerpt_length( $length ) { return 150; }

    Let me know if it helps! ??

    Take care,
    Calvin

    I wasn’t too impressed when I was using the_excerpt. It seems so limited in terms of using the <!–more–> tag. I made a couple of changes in the theme editor which allowed me to use the <!–more–> tag to full effect. It is also worth noting that I not that great at php so all of this was down to trial and error.

    In the file inc\structure\content-extensions.php, on line 162, change

    <?php the_excerpt(); ?>
    to
    <?php the_content(); ?>

    If you want to change the default text, (more…) then put some text inside the brackets with single quotes, ie, ‘Text You Want To Display’.

    Another change I made was to the Read More button. I didn’t like when you click on the button it takes you to the very start of the blog. I needed something that would allow me to display the full blog but go straight to where I left off. To do this edit edit the same file as above but on line 173, change

    echo '<a href="' . get_permalink() . '" title="'.the_title( '', '', false ).'">'.__( 'Read more', 'interface' ).'</a>';
    to

    echo '<a>ID . '"title="'.the_title( '', '', false ).'">'.__( 'Read more', 'interface' ).'</a>';

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to format and get more text to show before "Read Only" blurb on homepage’ is closed to new replies.