• nutellino

    (@nutellino)


    I have installed autochimp plugin

    I have selected: “Only use an excerpt of the post (AutoChimp will include a link back to the post)”

    the newsletter regularly comes received with excerpt text but do not include a link to the post

    please how can I fix this problem ?

    Thanks

    http://wordpress.org/extend/plugins/autochimp/

Viewing 6 replies - 1 through 6 (of 6 total)
  • whytester

    (@whytester)

    Am having the same problem , in fact I have selected not to show an excerpt so I would assume the full post should be showing but all that is happening is the first 15 words are still being displayed , same when using a template ( with the div tag mc-edit=”main” added to the template source code)

    Any possible fixes for this?

    ThroughMEMS

    (@throughmems)

    @whytester: When you’re using a template, is actually any of your content showing up? And what if you’re sticking to no template, same thing happens? (also, making an own thread for your problem would be nicer)

    @nutellino: try enabling the excerpt (topright of the screen, click screen options, tick excerpt) and using that space for the excerpt. Do a real test run and what happens?

    I had this problem as well, and a quick look at the code revealed that no link was being added to posts that didn’t have an excerpt. I copied the following snipped from the excerpt case:

    // Add on a "Read the post" link here
    			$permalink = get_permalink( $postID );
    			$postContent .= "<p>Read the post <a href=\"$permalink\">here</a>.</p>";
    			// See http://codex.wordpress.org/Function_Reference/the_content, which
    			// suggests adding this code:
    			$postContent = str_replace( ']]>', ']]>', $postContent );

    and I added it to line 746 (of 88-autochimp.php). I now get a back link even if my post doesn’t have an excerpt. (It would be best to move this part of the code out of the conditional blocks altogether, of course, but I think this is the simplest way to convey the solution without confusing those who aren’t comfortable with the code. The alternative, to move the closing curly bracket } from line 756 to 750, keeps the code concise and tidy.)

    notkristina, Thank you so much for posting the above. One thing, however. Now it shows the Read Post link which is excellent but it doesn’t show the excerpt at all. I have “use only excerpt of the post” selected. If I unselect the “use only excerpt of the post”, the Read Post link disappears. Is there any way to have it show the excerpt AND show the post all the time? Thanks in advance. =)

    Apart from the “Read Post” link appearing or not appearing, was all the rest of that stuff working the way it should before you made the change above? The change above should have affected nothing other than adding a “Read Post” link regardless of whether you have the excerpt enabled.

    If something more has changed, perhaps you inserted the code in a different place—I specified line 746 because that’s where it was in my document, but if we’re using different versions (or if you’ve made other changes to the document above this line) then the line number might be different for you. The code is very similar in each of the cases of that statement, so I’d suggest making sure it’s logically in the same spot as the case you copied it from. Or, if you moved the curly bracket, double-check that everything is still being executed where/when it should.

    Beyond that, it sounds like it might be a separate issue, in which case we’d need more information in order to help, because I’m not getting the problem on my site.

    Thank you for your reply. In my original PHP file, line 746 was the end cirly bracket for the following code (lines 742-745)
    {
    // Handmade function which mimics wp_trim_excerpt() (that function won’t operate
    // on a non-empty string)
    $postContent = AC_TrimExcerpt( $post->post_content );

    I inserted the lines you mentioned above after line 745. So now my code looks like this (lines 738-763)

    // Get the excerpt option; if on, then show the excerpt
    if ( ‘1’ === get_option( WP88_MC_CAMPAIGN_EXCERPT_ONLY ) )
    {
    if ( 0 == strlen( $post->post_excerpt ) )
    {
    // Handmade function which mimics wp_trim_excerpt() (that function won’t operate
    // on a non-empty string)
    $postContent = AC_TrimExcerpt( $post->post_content );
    $postContent = apply_filters( ‘the_excerpt’, $post->post_excerpt );
    // Add on a “Read the post” link here
    $permalink = get_permalink( $postID );
    $postContent .= “<p>Read the post here.</p>”;
    // See http://codex.wordpress.org/Function_Reference/the_content, which
    // suggests adding this code:
    $postContent = str_replace( ‘]]>’, ‘]]>’, $postContent );
    }
    else
    {
    $postContent = apply_filters( ‘the_excerpt’, $post->post_excerpt );
    // Add on a “Read the post” link here
    $permalink = get_permalink( $postID );
    $postContent .= “<p>Read the post here.</p>”;
    // See http://codex.wordpress.org/Function_Reference/the_content, which
    // suggests adding this code:
    $postContent = str_replace( ‘]]>’, ‘]]>’, $postContent );
    }

    I am not very familiar with PHP and can make minor modifications but this may be a little over my knowledge level. To answer your question, my posts were never showing the “read post” link, regardless of the option I selected AND they always had an excerpt…

    <<scratching my head>>

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘AutoChimp not include a link back to the post’ is closed to new replies.