WordPress.org

Ready to get started?Download WordPress

Forums

MailPoet Newsletters
[resolved] Adding link to '+ New' drop down (4 posts)

  1. Don46
    Member
    Posted 1 year ago #

    Is there a way to add a direct link to Dashboard / Wysija / Newsletters to the WP '+ New' dropdown in the header bar?

    http://wordpress.org/extend/plugins/wysija-newsletters/

  2. amistad18
    Member
    Posted 1 year ago #

    Hello,

    Add this code to your theme functions.php file:

    function wysija_add_admin_bar_link(){
    	global $wp_admin_bar;
    	$wp_admin_bar->add_menu(
    		array(
    			'parent' => 'new-content',
    			'id' => 'new_newsletter',
    			'title' => __('Newsletter'),
    			'href' => admin_url( 'admin.php?page=wysija_campaigns&action=add')
    		)
    	);
    }
    add_action('wp_before_admin_bar_render', 'wysija_add_admin_bar_link');

    Or you can even create plugin from it if you want to have option to enable/disable it.

  3. Don46
    Member
    Posted 1 year ago #

    Thanks for that, is some one able to provide this as a plugin, my coding skills are minimal and I hate to go into places where I can screw thing up!
    Seems like this should be built in for the next upgrade?

  4. amistad18
    Member
    Posted 1 year ago #

    Hello Don46,

    Here you go:
    http://wysija.com/screenshots/wysija-newsletters-addon-admin-bar-button.zip

    Check the code, and compare it to this one above. Now you see how simple is to create a plugin? :)

    If you want this as a Wysija default feature, add this as idea here:
    http://wysija.uservoice.com/forums/150107-feature-request

    And wait until enough users will vote on it.

    Ami.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic