Tag Info

Hot answers tagged

3

Solution from a cross post over at StackExchange from @birgire: The problem is that you run the clientarea_default_order callback too late. To fix that you only have to change the priority from the default one that's 10: add_action( 'pre_get_posts','clientarea_default_order'); to the priority of 9: add_action( ...


2

You don't need to worry to much about your query as there is not much you can do about it. You can unfortunately not just only query categies, post titles and images natively using WP_Query. Post categories needs to be called separately inside the loop, just like featured images. If you dig deeper into core, you will see that all postdata and post terms are ...


2

Here is the fixed and modified code which was having the nonce action issue. <?php /* Plugin Name: Test Plugin Plugin URI: Test Description: Test Author: Test Version: 007 Author URI: */ // add all post types $clinical_post_types = array(); $post_types = get_post_types(); foreach ( $post_types as $post_type ) { $clinical_post_types[] = ...


1

EDIT: If you use $post in a function, you have to define it of course: function xyz(){ global $post; //Your code } Initial answer, might help others: It appears to me, you do not use it inside an action or if so, you use it to early. It should work inside the 'init' action. So you could do something like <?php add_action( 'init', ...


1

This is an issue with the creation of the nonce. wp_create_nonce( plugin_basename(__FILE__) ) . '/seo_fields.php" /> should probably be wp_create_nonce( plugin_basename(__FILE__) . '/seo_fields.php' ) . '" /> because otherwise !wp_verify_nonce($_POST['clinicalmeta_noncename'], plugin_basename(__FILE__).'/seo_fields.php') would not check for ...



Only top voted, non community-wiki answers of a minimum length are eligible