Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
Just add: $query->query_vars[‘meta_compare’] = ‘LIKE’;
Just add: $query->query_vars[‘meta_compare’] = ‘LIKE’;
You can use the WP query_posts to filter about your custom values; ean example: query_posts(‘meta_key=my_type&meta_compare=<=&my_value=20&orderby=my_value’); if (have_posts()) : while ( have_posts() ) : the_post(); But, i think you must replace the time-values for readable string, maybe woth strotime, that you have the same format for the query.
While I understand it’s not really the answer to your question, it might give your inspiration on how someone else did it: Clear W3C Total Cache
add_filter with retrieve_password_message() not working in plugin, but works in functions.php
You’ll have to abort depending on the $_REQUEST[‘action’], $_POST[‘action’] or $_GET[‘action’].
Here’s the hacky way I figured it out: if ( preg_match( ‘/<!–more–>/’, $post->post_content ) ) { $content = apply_filters( ‘the_content’, get_the_content( ” ) ); echo ( $content ); } else { the_excerpt(); } (Note that I have a separate “Read More” link after this snippet; if you’re wanting to use The Content’s default Read More … Read more
here is a shorter version that assumes the GET parameter ?time=[integer] (for example ?time=8) add_filter(‘posts_where’, ‘filter_where’, 11); function filter_where($where=””) { if(isset($_GET[‘time’])){ $time = $_GET[‘time’]; $time=(int)$time; // only allow integers if(in_array($time,array(8,24,72))){ $where .= ” AND post_date > ‘”.date(‘Y-m-d H:i:s’, strtotime(‘-“.$time.” hours’)).”‘”; } } return $where; }
wp_mail works with add_action(‘save_post’, …) but not an ajax action
Sorting a specific taxonomy by archive date using URL
The solution that I’ve found is to add this line just before doing the import: if (function_exists(‘kses_remove_filters’)) { kses_remove_filters(); } That will disable the kses filters responsible for stripping HTML tag inside the post_content. I have successfully added this to the first plugin. Once this is disabled, it seems that when the import call to … Read more