• I am trying to get just an excerpt of my blog to print in my Mailchimp email to subscribers. I am using the manual excerpt section in WordPress and have put in the following:

    We’re in Week Two of Stampin Up’s Special Offers! Here are the items this week that are 25% off!
    “> Read More…

    However when I tested this email with Mailchimp by sending it to myself, the Read More link did not work (didn’t go anywhere)…what step am I missing? thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter stamperjo

    (@stamperjo)

    I got this info from the www.remarpro.com help section for manual excerpts

    How to add a link beneath an excerpt to the full post
    When using the excerpt feature WordPress does not automatically provide a link to a page containing the full post. To generate a link include the following code in the loop directly below <?php the_excerpt(); ?>

    “> Read More…

    You can probably tell that I am not very knowledgeable as I cannot even get the code to show in here without it changing to a link

    ..“> Read More…

    Let’s try that…

    • This reply was modified 8 years, 2 months ago by stamperjo.

    Hi, @stamperjo. It looks like your quote about the Read More link code came from this Codex article, so I’m going to include that code here (wrapped in backticks aka code tags to make it legible):

    <a href="<?php echo get_permalink(); ?>"> Read More...</a>

    So now, the question I have is: where exactly are you pasting that code?

    • This reply was modified 8 years, 2 months ago by girlieworks.
    Thread Starter stamperjo

    (@stamperjo)

    Thanks girlieworks,
    I pasted it in directly beneath my excerpt wording, so the “…25% off.” then a return then pasted it underneath.

    • This reply was modified 8 years, 2 months ago by stamperjo.

    The correct way to approach this would be via your theme’s functions.php file using something like:

    function my_theme_continue_reading_link() {
    	return ' <a href="'. esc_url( get_permalink() ) . '">' . __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'my_theme' ) . '</a>';
    }
    
    function my_theme_auto_excerpt_more( $more ) {
    	if ( ! is_admin() ) {
    		return ' &hellip;' . my_theme_continue_reading_link();
    	}
    	return $more;
    }
    add_filter( 'excerpt_more', 'my_theme_auto_excerpt_more' );
    Thread Starter stamperjo

    (@stamperjo)

    So esmi, how and where in that functions.php file would I copy that? Would I just copy and paste that beneath what is already there? Before the <{endif;> or somewhere else?

    Before the <{endif;> or somewhere else?

    Sorry? what endif;?>? That sounds like you are looking at breaking into an if...endif loop in functions.php. That is rarely (if ever) a good idea…

    I would be looking at placing the above code at the bottom of your theme’s functions.php file – before an final closing ?> and well away from any other existing functions. As always, do keep a copy of the original, unedited, file as a backup. We’ve all put code in the wrong place and brought a whole site down like this, so a quick upload of a backup file is a god-send.

    Thread Starter stamperjo

    (@stamperjo)

    I am using a Divi theme and I see there are all kinds of function.php templates that I can adjust. The Theme functions specifically is very lengthy but I do not see a final closing as you indicate above so I will just paste it below as you indicate after backing up and try to see if that works.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘manual Excerpt and MailChimp Read More Link not working’ is closed to new replies.