WordPress.org

Forums

WordChimp
Select Pages as well as Posts? (3 posts)

  1. papergecko
    Member
    Posted 1 year ago #

    Hi

    Thanks for the great plugin. Everything seems to work well, but I have a couple of questions:

    In the plugin the user can select blog posts to include in their MailChimp campaigns. I wondered how I would go about tweaking the plugin so that they can also select Pages?

    Secondly, when I set the plugin to include excerpts of posts rather than the full post, it only includes the post title and date, but no excerpt. Can you suggest how to fix this?

    Many thanks

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

  2. vdowsett
    Member
    Posted 1 year ago #

    I would like to know how to add pages too.

    To answer your second question - you need to make sure you have manually added the excerpts in each post.

  3. papergecko
    Member
    Posted 11 months ago #

    Figured out how to include pages:

    In the plugin you need to change the query on line 632

    from

    $sql = "SELECT id, post_author, post_date, post_content, post_title, post_excerpt, post_name FROM {$wpdb->prefix}posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 40";

    to

    $sql = "SELECT id, post_author, post_date, post_content, post_title, post_excerpt, post_name FROM {$wpdb->prefix}posts WHERE post_type = 'post' OR post_type= 'page' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 40";

    Hope that helps someone

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags