How can I exclude tags from category_rss function?
Try this – think I found this from little mike. add_filter(‘get_the_tags’, ‘strip_tags_from_feeds’); function strip_tags_from_feeds($terms) { if (is_feed()) return array(); return $terms; }
Try this – think I found this from little mike. add_filter(‘get_the_tags’, ‘strip_tags_from_feeds’); function strip_tags_from_feeds($terms) { if (is_feed()) return array(); return $terms; }
You need to specify a list of allowed mime types. You could make it easy by just getting the allowed mime types like: $file = $_FILES[‘the-file’]; $upload_file = wp_handle_upload($file, array( ‘test_form’ => false, ‘mimes’ => get_allowed_mime_types() )); If you look at the codex for Default allowed mime types, you could manually specify which ever mime … Read more
I think wpcf7_before_send_mail is what you’re looking for. You can find some examples of it in action in this unofficial documentation and in this support thread where the plugin developer gives some guidance on using it..
Does it work any better added to a hook with the conditionals inside? function my_deregisters() { if ( !is_single() ) { remove_action(‘wp_head’, ‘wp_page_numbers_stylesheet’); //wp_deregister_style( ‘fancybox’ ); // i think this can be removed //wp_deregister_script( ‘fancybox’ ); // i think this can be removed wp_dequeue_script(‘fancybox’); wp_dequeue_style(‘fancybox’); remove_action(‘wp_print_scripts’, ‘mfbfw_load’); remove_action(‘wp_print_styles’, ‘mfbfw_css’); remove_action(‘wp_head’, ‘mfbfw_init’); remove_action(‘wp_head’, ‘cforms_style’); } } … Read more
This is activated within the sanitize_post_field() function: Calls ‘edit_{$field}’ and ‘{$field_no_prefix}_edit_pre’ passing $value and $post_id if $context is ‘edit’ and field name prefix is ‘post_’. So in the case of the post_content_filtered field, the filters are edit_post_content_filtered and content_filtered_edit_pre
For posts is set up by loop (see setup_postdata()) it is split into parts and array of those parts is assigned to global $pages variable. Even if it’s not paginated this is still where data goes. Then that variable is actually where get_the_content() looks for post content to process and output, not actual post object. … Read more
The issue was that the $query->set in the filter function was updating the main query used to count the number of posts. Likely due to the order in which they were called. I tried to flush and run a new wp_query but what ultimately worked best was the function below that uses a custom query. … Read more
If you look in source, you’ll see the filter applied to get_the_author_meta calls: return apply_filters( ‘get_the_author_’ . $field, $value, $user_id ); So your filter should hook get_the_author_display_name.
You could try using one of the following methods, I don’t think there is a specific way to do this other than these two options below. Option 1 In your template file, add the post_class(); to your div like this: <div id=”your-div” <?php post_class(); ?> > Then you can use post_class filter in your themes … Read more
The filter works when placed in active theme’s functions.php file. Just tested that, and the result was positive.