GusRuss89
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Custom Taxonomy Archive Template Doesn't Think I Have PostsThis is the code that creates the custom taxonomy. My guess is that it must be a problem somewhere in here.
/* Add a new "categories" taxonomy to growers posts */ add_action( 'init', 'create_grower_taxonomy', 0 ); function create_grower_taxonomy() { // Add new taxonomy, make it hierarchical (like categories) $labels = array( 'name' => _x( 'Categories', 'taxonomy general name' ), 'singular_name' => _x( 'Category', 'taxonomy singular name' ), 'search_items' => __( 'Search Categories' ), 'all_items' => __( 'All Categories' ), 'parent_item' => __( 'Parent Category' ), 'parent_item_colon' => __( 'Parent Category:' ), 'edit_item' => __( 'Edit Category' ), 'update_item' => __( 'Update Category' ), 'add_new_item' => __( 'Add New Category' ), 'new_item_name' => __( 'New Category Name' ), 'menu_name' => __( 'Categories' ) ); $args = array( 'hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true //'query_var' => true //'rewrite' => array( 'slug' => 'gp_categories' ) ); register_taxonomy( 'gp_categories', array( 'grower_posts' ), $args ); }
Forum: Fixing WordPress
In reply to: Custom Taxonomy Archive Template Doesn't Think I Have PostsThanks for the reply.
It’s definitely correct. The template actually works, it’s just that the loop doesn’t work inside it – or it doesn’t think it has any actual posts.
I found the function responsible. It was a jQuery function added by the original theme (Shelflife by WooThemes) that turns the menu into a select under certain widths.
I wasn’t using that function anyway, but if anyone feels like debugging it for funsies, here’s the code that was causing the issue.
Does anyone have any idea where I should start looking into this problem?
Forum: Fixing WordPress
In reply to: Error in wp-includes/functions.phpHere’s the function that includes line 2758 (line 2758 is the line starting with trigger_error).
/** * Marks something as being incorrectly called. * * There is a hook doing_it_wrong_run that will be called that can be used * to get the backtrace up to what file and function called the deprecated * function. * * The current behavior is to trigger a user error if WP_DEBUG is true. * * @package WordPress * @subpackage Debug * @since 3.1.0 * @access private * * @uses do_action() Calls 'doing_it_wrong_run' and passes the function arguments. * @uses apply_filters() Calls 'doing_it_wrong_trigger_error' and expects boolean value of true to do * trigger or false to not trigger error. * * @param string $function The function that was called. * @param string $message A message explaining what has been done incorrectly. * @param string $version The version of WordPress where the message was added. */ function _doing_it_wrong( $function, $message, $version ) { do_action( 'doing_it_wrong_run', $function, $message, $version ); // Allow plugin to filter the output error trigger if ( WP_DEBUG && apply_filters( 'doing_it_wrong_trigger_error', true ) ) { $version = is_null( $version ) ? '' : sprintf( __( '(This message was added in version %s.)' ), $version ); $message .= ' ' . __( 'Please see <a href="https://codex.www.ads-software.com/Debugging_in_WordPress">Debugging in WordPress</a> for more information.' ); trigger_error( sprintf( __( '%1$s was called <strong>incorrectly</strong>. %2$s %3$s' ), $function, $message, $version ) ); } }