Tag Info

New answers tagged

1

This should get you going in the right direction. Not my solution, slightly modified from here. You'll need to swap out your-post-type for the post type you're using. function adjust_post_formats() { if (isset($_GET['post'])) { $post = get_post($_GET['post']); if ($post) $post_type = $post->post_type; } elseif ( ...


0

I've customized the post formats and display them in a tab bar horizontally along the top of the post editor page. I customize their names a lil somethin like this. It is quite an involved and hackish process but I pasted it into a Gist if you'd like to check it out: https://gist.github.com/dcondrey/059dec0c5b01197c9f11 Final result comes out looking ...


3

Before we continue, I must point out this: $i=1; $temp = $wp_query; $wp_query = null; $wp_query = new WP_Query(); $wp_query -> query('post-format-audio'.'&paged='.$paged) This is exactly the same as: query_posts( 'post-format-audio'.'&paged='.$paged ); Which is terrible. When people ...


1

It looks like your syntax is a little off for the tax query. Try this: $query = new WP_Query( array( 'post_type' => 'post', 'cat' => '-1', 'posts_per_page' => 2, 'tax_query' => array( array( 'taxonomy' => 'post_format', 'field' => 'slug', 'terms' => ...


0

You would need to use WordPress Conditional Tags to query if this page is the custom post type you are wanting to target and then if it is remove shortcode. Untested but you can try this: function remove_shortcodes( $content ) { if ( get_post_type() == 'post-type-name' ) { return strip_shortcodes( $content ); } else ...


1

This will remove shortcodes for the link post type. Maybe you wanna combine it with is_main_query <?php function remove_shortcodes( $content ) { if ( 'link' == get_post_type() ) // change it to the post type you want return strip_shortcodes( $content ); else return $content; } add_filter( 'the_content', 'remove_shortcodes' ); ...



Top 50 recent answers are included