How can I temporarily remove content from all pages, but leave up URL?

Depends on what you mean by “content”. If you just want to remove the post body then… function remove_body_wpse_97291($content) { return “Content temporarily removed”; } add_filter(‘the_content’,’remove_body_wpse_97291′,100); If you want more aggressive content removal… function remove_all_content_wpse_97291($content) { include(‘license.txt’); // example loads the WordPress license agreement as raw text; not pretty exit; } add_filter(‘template_redirect’,’remove_all_content_wpse_97291′,1); The URLs stay … Read more

Woocommerce: Set thumbnail detail (clipping area)

You can fix this using the following code snippet from Brian Krogsard, that I modified. This code should preferably be placed into the functions.php file of your child theme. Instead of taking the original 150×150 thumb it now takes the correct, cropped 150×150 thumb. /* This snippet removes the action that inserts thumbnails to products … Read more

Order posts of a custom post type by the event date using FT Calendar Plugin

My guess is that the calendar date is some sort of meta field for the custom post type. I’d find that out and add that as a variable for my query. You might be able to use something like this <?php $loop = new WP_Query( array( ‘post_type’ => ‘events’, ‘meta_key’=>’start_datetime’, ‘orderby’ => ‘meta_value’, ‘order’ => … Read more

How to auto strip hyperlinks & images in wordpress post

Here is one idea to strip link- and image tags from the post content (before you save it) by using the edit_post_content filter and the wp_kses function: add_filter( ‘edit_post_content’, ‘my_edit_post_content’, 10, 1 ); function my_edit_post_content( $content ) { if (!current_user_can(‘manage_options’)) { // only strip for non-admins global $allowedposttags; $mytags = $allowedposttags; unset($mytags[‘a’]); // don’t allow … Read more

Hook functions for Wp e-commerce? [closed]

1.customer register success event WordPress: user_register 2.customer login WordPress: wp_login 3.sales order place after WP E-Commerce: wpsc_purchase_log_save 4.Hook function to change order shipping status from wp-admin end WP E-Commerce: wpsc_update_purchase_log_status To identify the status: INCOMPLETE_SALE = 1; ORDER_RECEIVED = 2; ACCEPTED_PAYMENT = 3; JOB_DISPATCHED = 4; CLOSED_ORDER = 5; PAYMENT_DECLINED = 6; REFUNDED = 7; … Read more

Replace video url with video player

There appear to be a few problems with your plugin as written. As mentioned in the comments above, WordPress has the built-in ability to automatically embed certain types of media, including YouTube videos, given a URL. See the Codex page on Embeds. So it’s likely that your plugin isn’t necessary, at least for a YouTube … Read more