WordPress.org

Forums

ALO EasyMail Newsletter
newsletter in blogroll (2 posts)

  1. bschaich
    Member
    Posted 1 year ago #

    Hi,
    what i want to achieve is to list the newsletters in blogroll. They do appear on /newsletters as i checked the option for "publish newsletter online", but they do not appear in the blogroll. Is that possible or am I getting something wrong here?

    Regards,
    Benny

    https://wordpress.org/plugins/alo-easymail/

  2. eventualo
    Member
    Plugin Author

    Posted 1 year ago #

    If I understand well you like to publish newsletters in homepage.
    This snippet makes it possible:

    add_filter( 'pre_get_posts', 'my_get_posts' );
    
    function my_get_posts( $query ) {
    
    	if ( is_home() && $query->is_main_query() )
    		$query->set( 'post_type', array( 'post', 'newsletter' ) );
    
    	return $query;
    }

    It based on:
    http://justintadlock.com/archives/2010/02/02/showing-custom-post-types-on-your-home-blog-page
    You can read the comments in that page to have more ideas and code.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • ALO EasyMail Newsletter
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic