• first of all, kudos to Alessandro – this looks like a very well-done plug-in

    couldn’t find any info in the docs or here for how to post all newsletters as regular blog posts

    i’m guessing either an EasyMail edit template would have to be changed, or code added to the WP post edit template, but i don’t know where to begin

    if i can make that happen, then i don’t need the newsletter archive page (if i want i can just create a new cat to display letter archives)

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author eventualo

    (@eventualo)

    Hi werdpres, you can set in plugin options if publish newsletters: go in Newsletters > Settings > tab General > check Publish newsletters online.
    In this way the newsletter are published and visible on your blog like other posts.

    Thread Starter werdpres

    (@werdpres)

    yes, i realize that – what i wanted to do was publish the newsletters on the blog page along with the regular WP blog posts instead of having them displayed on a separate page

    Plugin Author eventualo

    (@eventualo)

    You can use some hooks to show newsletter together with posts.
    E.g. the following piece of code shows also newsletters on homepage and in search results. It’s only a starting point and you can write your own, I hope it helps.

    
    function custom_add_newsletters_get_posts ( $query ) {
        if ( ! is_admin() && $query->is_main_query() ) {
            if ( $query->is_home() || $query->is_search ) {
                $query->set('post_type', array( 'post', 'newsletter' ) );
            }
        }
    }
    add_action ( 'pre_get_posts', 'custom_add_newsletters_get_posts' );
    
    • This reply was modified 6 years, 1 month ago by eventualo.
    • This reply was modified 6 years, 1 month ago by eventualo.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘publish newsletters as normal blog posts?’ is closed to new replies.