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

    (@eventualo)

    No, it isn’t. But you use this trick.
    You can assign categories to newsletters, adding this script in your functions.php or mu-plugins folder:

    function custom_easymail_add_categories ( $args ) {
    	$args['taxonomies'] = array( 'category' );
    	return $args;
    }
    add_filter ( 'alo_easymail_register_newsletter_args', 'custom_easymail_add_categories' );

    So now you can assign categories in newsletter edit screen.
    Then, you can show only newsletters related to a category using the shortcode with category argument (ID of category):

    [ALO-EASYMAIL-ARCHIVE numberposts=5 category=2]

    I hope this helps.

    Thread Starter jc_vermeulen

    (@jc_vermeulen)

    It is not work.

    I have the code insert in to the page: alo-easymail_functions.php

    function custom_easymail_add_categories ( $args ) {
    	$args['taxonomies'] = array( 'category' );
    	return $args;
    }
    add_filter ( 'alo_easymail_register_newsletter_args', 'custom_easymail_add_categories' );

    I have the shortcut insert on the page.

    I see nothing on the page.

    Plugin Author eventualo

    (@eventualo)

    It’s better to paste the code into functions.php of your theme or into a php file (no matter the filename) inside wp-content/mu-plugins folder (if it does not exist yet, simply create the folder). BTW it should work too as you did.
    I made a test and it works for me. Remember that the shortcode shows only the already sent newsletters, by default:
    https://www.eventualo.net/blog/easymail-newsletter-for-developers/#shortcodes

    Thread Starter jc_vermeulen

    (@jc_vermeulen)

    It is not working. What we do:

    1) Create a new folder wp-content/mu-plugins
    2) Have uploaded a file (functions.php) with code:

    <?php
    function custom_easymail_add_categories ( $args ) {
    	$args['taxonomies'] = array( 'category' );
    	return $args;
    }
    add_filter ( 'alo_easymail_register_newsletter_args', 'custom_easymail_add_categories' );
    ?>

    3) Make a new newsletter
    4) Filter from mailinglist name Admin (id=11)
    5) On the page newsletter we input the shortcode

    [ALO-EASYMAIL-ARCHIVE category=11]

    6) We send the newsletter to the users (me)
    7) We see not on the page. We have 2 newsletters on this filter.
    Link page on website

    What can we do?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shortcode with mailing list’ is closed to new replies.