Issue understanding and using WordPress filters and actions
Issue understanding and using WordPress filters and actions
Issue understanding and using WordPress filters and actions
I have 2 plugins using the same wp_login action hook and one is not working
What you should do: Read Where to put my code: plugin or functions.php? and apply the lessons to your theme. Themes are for presentation only. Remove everything not related to presentation: do not touch link and meta elements in the header. That’s plugin territory. Remove redundant code. add_theme_support(‘menus’); is not necessary, if you call register_nav_menus(). … Read more
date_error seems to be a function of that class, so you’ll have to use add_action(‘edit_user_profile’, array($this, ‘date_error’)); However I am not entirely sure that’ll work because I don’t know when this function is called. It might already be too late to register the hook.
How to customize the “Insert/edit link” popup box?
External Script Using WP – Hooks / Actions Not Working?
Untested: function custom_home_exclude( $where=”” ) { $exclude = array(); $newsQuery = new WP_Query (array( “post_type” => “news”, “meta_key” => “post_to_blog”, “meta_value” => 1, “meta_compare” => “!=”, “posts_per_page” => “-1″, )); while ($newsQuery->have_posts()) { $newsQuery->the_post(); array_push($exclude, get_the_ID()); } wp_reset_query(); $exclude = join(‘,’, $exclude); $where .= ” AND `ID` NOT IN ($exclude)”; return $where; } function custom_home_loop($query) … Read more
My suggestion would be to create a custom walker for the navigation. You can check the post_type of every item and if it’s your custom post type get the parent items.
Multiple Loops Meta Data
Hooking action once but called twice