Tag Info

New answers tagged

0

Note as of wordpress 3.8.2 the type of the plugin item passed to this function has changed and it is now an object. /** * @package Plugin_Filter * @version 2.0 */ /* Plugin Name: Plugin Filter Plugin URI: http://www.brideonline.com.au/ Description: Removes certain plugins from being updated. Author: Ben Wise Version: 2.0 Author URI: ...


2

All media (somewhat incorrectly) in the $wpdb->posts table will be "attachments" whether actually attached or not. "Attachments" that are actually attached will have a post_parent other than 0, so what you need are all of the attachments that have a 0 in the post_parent column, if I understand you. $args = array( 'post_type' => 'attachment', ...


0

<?php if ( $post->post_type == **'post type name'** && $post->post_status == 'publish' ) { $attachments = get_posts( array( 'post_type' => 'attachment', 'posts_per_page' => -1, 'post_parent' => $post->ID, 'exclude' => get_post_thumbnail_id() ) ); if ( $attachments ) { ...



Top 50 recent answers are included