Forum Replies Created

Viewing 15 replies - 571 through 585 (of 5,192 total)
  • Forum: Fixing WordPress
    In reply to: Register link

    Lol… you’re very welcome πŸ™‚

    Have fun!!

    Plugin Contributor Josh

    (@josh401)

    Excellent. It was probably your browser cache (I altered the javascript responsible for displaying that dropdown).

    Thank you for the confirmation.

    Forum: Fixing WordPress
    In reply to: Register link

    Okay, try this one:

    add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 );
    function add_loginout_link( $items, $args ) {
    
    	if($args->theme_location == 'primary') {
    		if (is_user_logged_in()) {
    			$items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>';
    		}
    		else {
    			$items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>';
    			$items .= '<li><a href="'. site_url('wp-login.php?action=register') .'">Register</a></li>';
    		}
    	}
        return $items;
    }

    The problem was the primary-menu should be just primary.

    Forum: Fixing WordPress
    In reply to: Register link

    Hmm… I don’t like the ob_start() method…

    One sec…

    I think you have an extra slash.

    require_once plugins_url('php/hooks.php', __FILE__);

    Forum: Fixing WordPress
    In reply to: Register link

    Weird?!

    Let’s go back to your original code, then:

    add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 );
    function add_loginout_link( $items, $args ) {
        if (is_user_logged_in() && $args->theme_location == 'primary-menu') {
            $items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>';
        }
        elseif (!is_user_logged_in() && $args->theme_location == 'primary-menu') {
            $items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>';
            $items .= '<li><a href="'. site_url('wp-login.php?action=register') .'">Register</a></li>';
        }
        return $items;
    }

    They are probably showing in the order they appear in your admin panel “Plugins” page.

    When a WordPress page is rendered (put together for final output); WordPress goes through the list of plugins; and adds any hooks or filters in the order they are found (alphabetically).

    Using Priority Parameter
    The developers, when hooking to ‘the_content()’, can set a priority number as the third argument of the action call.

    So you get something like add_action('the_content', 'test_function', 100).

    [More Info]

    Manual Workaround
    If you know the name of the function used in the action hook; you can write a function in your child theme to 1) Remove the action hook, 2) Re-Fire the action hook with the third argument added.

    So, if your Easy Social Share is using `easy_social_content’ as the action hook name hooked to “the_content” filter; we could do this:

    remove_action('the_content', 'easy_social_content');
    add_action('the_content', 'easy_social_content', 100);

    Do this for each of the three plugins; and change the priority argument to be the sequence you wish them to appear.

    Since a child theme code is executed last (after the theme and after all plugins are loaded)… this code will execute last… and will give you the order you desire.

    Good Luck πŸ™‚
    Lemme know how you do.

    Plugin Contributor Josh

    (@josh401)

    Hi @wasbah80,

    I apologize. Can you please be a little more specific? Are you receiving any errors? “What” exactly is not working?

    Can you please create a test page; and share the link here for me to take a look?

    Thank you very much.

    Forum: Fixing WordPress
    In reply to: Register link

    Try this (I’ve modified/enhanced your code a little):

    add_filter( 'wp_nav_menu_items', 'add_loginout_link', 10, 2 );
    function add_loginout_link( $items, $args ) {
    
    	if($args->theme_location == 'primary-menu') {
    		if(is_user_logged_in()) {
    			$items .= '<li><a href="'. wp_logout_url() .'">Log Out</a></li>';
    		}
    		else {
    			$items .= '<li><a href="'. site_url('wp-login.php') .'">Log In</a></li>';
    			$items .= '<li><a href="'. site_url('wp-login.php?action=register') .'">Register</a></li>';
    		}
    	}
        return $items;
    }
    Plugin Author Josh

    (@josh401)

    Hi Kevin,
    Yep, I know your pain all too well πŸ™‚

    Yes, the Pro version will allow the preservation of the onclick event.

    You can manually set (in the WP Edit Pro tinymce configuration options) to specifically allow the onclick attribute to be preserved when switching editor views; and saving content.

    Please feel free to use our support forum if you have any questions regarding it’s usage.

    Forum: Plugins
    In reply to: [WP Edit] Contact Form 7
    Plugin Author Josh

    (@josh401)

    Hi,

    I do have a bit of experience with CF7.

    What area would you like to use the editor?
    For what reason would you like the rich text editor?

    Thanks.

    Plugin Author Josh

    (@josh401)

    Hi,

    The code shown by @dfaltermier (OP) in the first comment is actually a function he has added to his child theme.

    It allows you to add a font name to the tinymce editor “Font Select” dropdown box. However, it does not add the font to your theme; front-end of website. You would still have to do that manually.

    Also, to get the font to render properly in the dropdown box; you would also need to add your custom font to the admin section header.

    I’ve written a fairly detailed tutorial on my Knowledge Base.

    Lastly, the Pro version of WP Edit handles all this, magically.

    Let me know how you do πŸ™‚

    Plugin Author Josh

    (@josh401)

    Most likely a javascript issue.

    Can you please read the section on how to Diagnose Javascript in your Browser… and let me know if you are receiving any errors when you attempt to close the pop-up window?

    Thanks.

    Plugin Author Josh

    (@josh401)

    Yeah, you’ll need to update to at least version 4.0 of WP for the tables to work properly. I’ll have to update my “requires at least” in the plugin info section.

    What is preventing you from updating to the latest WP version?

    Plugin Author Josh

    (@josh401)

    My pleasure.
    Thank YOU.

Viewing 15 replies - 571 through 585 (of 5,192 total)