Travis Smith
Forum Replies Created
-
I will be checking on this today!!
Try something like this in your functions.php. Assuming you have home-bottom as the instance custom field.
add_action( 'pre_get_posts', 'wps_gfwa_posts_per_page' ); function wps_gfwa_posts_per_page( $query ) { if ( 'home-bottom' == get_query_var( 'gfwa' ) && ! is_admin() ) { $query->set( 'posts_per_page', '4' ); // CHANGE ME! } } add_filter( 'gfwa_query_args', 'wps_gfwa_query_args', 10, 2 ); function wps_gfwa_query_args( $query_args, $instance ) { $query_args['gfwa'] = $instance['custom_field']; return $query_args; }
Nick may want to add the wps_gfwa_query_args() as part of his plugin in the future.
To clear the characters during activation, it appears that you are missing a global var. Line 127ff add
global $current_blog;
:
global $current_blog;if (postExpirator_is_wpmu()) add_action ('expirationdate_delete_'.$current_blog->blog_id, 'expirationdate_delete_expired_posts'); else add_action ('expirationdate_delete', 'expirationdate_delete_expired_posts');
Then to clear the notice on line 196, add
$enabled = '';
at about line 184.if (empty($expirationdatets)) { $defaultmonth = date('F'); $defaultday = date('d'); $defaulthour = date('H'); $defaultyear = date('Y'); $defaultminute = date('i'); $enabled = ''; $disabled = ' disabled="disabled"'; $categories = get_option('expirationdateCategoryDefaults'); } else { $defaultmonth = date('F',$expirationdatets); $defaultday = date('d',$expirationdatets); $defaultyear = date('Y',$expirationdatets); $defaulthour = date('H',$expirationdatets); $defaultminute = date('i',$expirationdatets); $categories = get_post_meta($post->ID,'_expiration-date-category',true); $enabled = ' checked="checked"'; $disabled = ''; }
Forum: Networking WordPress
In reply to: Convert FROM Multisite, Cannot edit Custom Post TypesRegistered them in a core functionality plugin. Simple one file plugin.
There is an easier solution (IMHO). Just create a new argument (‘type’) when registering the taxonomy:
function set_taxonomies() { global $wp_taxonomies; $this->taxonomies = get_taxonomies(array( 'type' => 'radio' ), 'objects'); print_r($this->taxonomies); // Now that we know which taxonomies we're dealing with, let's set show_ui to true and remove the meta box. foreach ($this->taxonomies as $tax) { //$wp_taxonomies[$tax->name]->show_ui = true; // No longer needed // Default show_none to false if (!isset($wp_taxonomies[$tax->name]->show_none)) $wp_taxonomies[$tax->name]->show_none = false; } }
Also line 44,
'name' => apply_filters( 'the_title', $term->post_title ),
Forum: Plugins
In reply to: ImageFX not working for portfolio itemsIf you are using the WordPress media uploader, ImageFX is running as part of the wp_generate_attachment_metadata filter. However, it is not run on a thumbnail regeneration plugin most times.
Forum: Plugins
In reply to: [Visual Subtitle] Filter to remove Visual Subtitle Meta Box?Hello Bruce,
You can just remove the metabox based on which post types you want to remove.
add_action( 'admin_init', 'wps_remove_visual', 15 ); function wps_remove_visual() { if ( class_exists( 'Visual_Subtitle' ) remove_meta_box( 'visual-subtitle', 'minfolio_portfolio', 'normal' ); }
Forum: Plugins
In reply to: ImageFX not working for portfolio itemsAre you uploading via Add New under the Media admin page (domain.com/wp-admin/media-new.php)?
Forum: Plugins
In reply to: [WP Biographia] Display user_contactmethods added outside of WP BiographiaI have some recommendations but it would call for some major re-writes of the plugin…
Be sure you are using the ORIGINAL IMAGE.
Forum: Plugins
In reply to: [WP Accordion Slider] wp-accordion-sliderThanks techstacy. I fixed this now!
Bruce,
It would be better, even cleaner, to use the new (in 1.8) genesis_formatting_kses() function, so…
add_filter ( 'pre_user_description' , 'genesis_formatting_kses' );
This would make it much easier for you to control and be consistent on your site.
Gary, we could consider rolling the plugin’s own with a filter for theme developers to short-circuit or apply their theme kses/allowedtags.
Thanks,
Travis
Forum: Plugins
In reply to: [WP Biographia] [Plugin: WP Biographia] Add Paragraphs to Author BioNot unless the changelog says that they did something to that filter.
Forum: Plugins
In reply to: [WP Biographia] [Plugin: WP Biographia] Add Paragraphs to Author BioJust insert it into functions.php.