WordPress.org

Ready to get started?Download WordPress

Forums

If Menu
Bugfix for readme.txt (1 post)

  1. BramNL
    Member
    Posted 1 year ago #

    In the FAQ-section, starting on line 38, the text should be:

    add_filter( 'if_menu_conditions', 'my_new_menu_conditions' );
    
    function my_new_menu_conditions( $conditions ) {
    	$conditions[] = array(
    		'name'		=>	'If single custom-post-type',	// name of the condition
    		'condition'	=>	function() {					// callback - must return TRUE or FALSE
    			return is_singular( 'my-custom-post-type' );
    		}
    	);
    
    	return $conditions;
    }

    Changes:
    - Removed duplicate backticks
    - Added "return $conditions;"

    http://wordpress.org/extend/plugins/if-menu/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags