MEET SITKA | A super-customizable modern WP theme!

Okay
  Print

Add "Read More" link to Grid & List Layout posts in Florence

Please note: This FAQ Article is specifically for the Florence theme.


By default, the "Continue Reading" button won't appear for Grid Layout or List Layout posts. If you would like to have this button appear below each grid item, you can follow the steps below.


Add "continue reading" button to Grid Layout:


Navigate to WP Dashboard > Appearance > Editor > and open up the file titled "content-grid.php".

Between Lines 24 - 28, you'll see this bit of code:

    <div class="post-entry">
        
        <p><?php echo sp_string_limit_words(get_the_excerpt(), 32); ?>…</p>
        
    </div>


On the blank line right ABOVE the closing tag ( /div ) in this code, you can copy and paste the following:

<p><a href="<?php echo get_permalink() ?>" class="more-link"><span class="more-button"><?php _e( 'Continue Reading', 'solopine' ); ?></span></a></p>


Save changes to the file when you're finished.

If you decide you would like to add a bit of top and bottom margin spacing above and below the grid items' "Continue Reading" button, you can go to Appearance > Customize > Custom CSS and copy & paste in the following:

.grid-item .more-button {margin-top: 20px; margin-bottom: 12px;}




Add "continue reading" button to List Layout:


Navigate to WP Dashboard > Appearance > Editor > and open up the file titled "content-list.php".

Between Lines 25 - 41, you'll see this big block of code for the "post-entry" element:

<div class="post-entry">
    
    <?php if(is_home()) : ?>
        <?php if(get_theme_mod('sp_home_layout') == 'list-full') : ?>
            <p><?php echo sp_string_limit_words(get_the_excerpt(), 34); ?>…</p>
        <?php else : ?>
            <p><?php echo sp_string_limit_words(get_the_excerpt(), 19); ?>…</p>
        <?php endif; ?>
    <?php else : ?>
        <?php if(get_theme_mod('sp_archive_layout') == 'list-full') : ?>
            <p><?php echo sp_string_limit_words(get_the_excerpt(), 34); ?>…</p>
        <?php else : ?>
            <p><?php echo sp_string_limit_words(get_the_excerpt(), 19); ?>…</p>
        <?php endif; ?>
    <?php endif; ?>
    
</div>


On the last line of this block of code is a closing div tag which looks like:

</div>


Directly ABOVE this closing tag, on the blank line, you can copy and paste the following code:

<p><a href="<?php echo get_permalink(); ?>" class="more-link"><span class="more-button">Continue Reading</span></a></p>


Please be sure to save changes to the file when finished.