When I use rewind_post() it shows menu items in my loop

I found the problem, this function was causing the problem…. function include_custom_post_types( $query ) { $custom_post_type = get_query_var( ‘post_type’ ); if ( is_archive() ) { if ( empty( $custom_post_type ) ) $query->set( ‘post_type’ , get_post_types() ); } if ( is_search() ) { if ( empty( $custom_post_type ) ) { $query->set( ‘post_type’ , array( ‘post’, ‘page’, … Read more

My class function is not seeing GET url paramaters

As I said, I was just missing the declaration to use the global $wp_query, so it wasn’t accessing my filters. Here’s what worked incase it helps: global $wp_query; // pull variable from url if (isset($wp_query->query_vars[‘country’])) { $this->user_country = $wp_query->query_vars[‘country’]; } else { $this->user_country = ‘your country’; } if (isset($wp_query->query_vars[‘lat’])) { $this->user_lat = $wp_query->query_vars[‘lat’]; } else … Read more

register_setting and AJAX?

WordPress already provides a very nice API for admin / option page tabs. No need to reinvent the wheel on that one. Your Ajax action is “options.php” You need an action that’s linked to a PHP function that gets included by add_action( ‘wp_ajax_YOUR-ACTION-NAME*’, ‘your_php_function’); * YOUR-ACTION-NAME is the action you defined when localizing the script … Read more

Choose User to email when adding a new post?

You would want to add a custom meta box that lists all users on the site. Not sure off the top of my head how you would create one that lists users, but it shouldn’t be too hard. You would then run a hook on wp_insert_post that verifies which users have been checked, and sends … Read more

Please help me to win the battle with 2 column loop by category

You should not use query_posts more than one time. It will create errors. You have to use wp_query. Here is what it says in wordpress codex: query_posts( is meant for altering the main loop. Once you use query_posts(), your post-related global variables and template tags will be altered. Conditional tags that are called after you … Read more