Remove updates text on plugin or themes list page

Add define(‘DISALLOW_FILE_MODS’,true); to your wp-config.php file. This will block users being able to use the plugin and theme installation/update functionality from the WordPress admin area. Setting this constant also disables the Plugin and Theme editor (i.e. you don’t need to set DISALLOW_FILE_MODS and DISALLOW_FILE_EDIT, as on it’s own DISALLOW_FILE_MODS will have the same effect). http://codex.wordpress.org/Editing_wp-config.php#WordPress_Upgrade_Constants … Read more

Separate jQuery for Individual Comments?

Replace your jquery with this <script type=”text/javascript”> (function($){ $(document).ready(function() { var $option = $(‘.option’); var $fruit = $(‘.fruit-name’); var $last; var parent $option.click(function() { parent=$(this).parents(‘.comment-form-rating’); $(‘.fruit-name’,parent).val(this.innerHTML) }) }); })(jQuery); </script> your script not working because .fruit-name not contain correct reference variable. Updated for debugging put code and check. <script type=”text/javascript”> (function($){ $(document).ready(function() { var $option … Read more

Add background image/layout for single page?

This assumes that you want to add a background image for a specific page: Create your CSS class for the background you want. body.custombg {background: url(“images/background.gif”); } In the header, you can use something like this to check for a specific page. <body <?php if(is_page(123)) echo ‘class=”custombg”‘ ?>> See Conditional Tags for more ideas of … Read more

How to get a notification when the plugin is installed?

I do not recommand using is_plugin_active() because if you rename your plugin directory which is done sometimes for security needs you’re screwed. If I were you I’d look into plugin you want to detect and select a core class or a core function of the plugin and test it with if(class_exists(‘name_of_the_class’)) or if(function_exists(‘name_of_the_function’)). Hope this … Read more

count the number of views of a post excluding own views

The plugin appears to be processing the view on the wp_head hook. That means you ought to be able to do something like this: function remove_view_counter_wpse_102637() { global $post; $current_user = wp_get_current_user(); if ( is_single() && !empty($current_user) && $post->post_author == $current_user->ID ) { remove_action(‘wp_head’, ‘process_postviews’); } } add_action(‘wp_head’, ‘remove_view_counter_wpse_102637′,1); No guarantees. I don’t use that … Read more

Woocommerce Product Page edit “from” text [closed]

You can use a filter to change the text or the min price, this will affect all variable products. add_filter(‘woocommerce_variable_price_html’, ‘custom_price_text’, 10, 2); function custom_price_text( $price, $product ) { $price=””; $price .= ‘<span class=”from”>’ . _x(‘A4 Sample’, ‘min_price’, ‘woocommerce’) . ‘ </span>’; $price .= woocommerce_price($product->get_price()); return $price; }