How can I filter blog name?

The value is from get_option(‘blogname’), so you can filter pre_option_blogname: add_filter( ‘pre_option_blogname’, ‘wpse_78345_blogname’ ); function wpse_78345_blogname() { return ‘Haha!’; } Do not filter option_blogname. This is wrong: you are wasting time with that, because WordPress will parse the option cache for the stored result, and then you don’t even use it.

the_posts hook, which set of posts?

I’d say it’s perfectly fine to do it the way you’re doing it now, that is function my_the_posts($posts, $query = false) { if( is_search() ){ // do your thing here } return $posts; } add_filter( ‘the_posts’, ‘my_the_posts’ ); Don’t worry about those excerpts in the footer, even though they may be part of the search … Read more

How to use different short description in shop page and in product page in woocommerce

The short description template is /templates/single-product/short-description.php : <?php /** * Single product short description * * @author WooThemes * @package WooCommerce/Templates * @version 1.6.4 */ if ( ! defined( ‘ABSPATH’ ) ) exit; // Exit if accessed directly global $post; if ( ! $post->post_excerpt ) return; ?> <div itemprop=”description”> <?php echo apply_filters( ‘woocommerce_short_description’, $post->post_excerpt ) … Read more

How do I get multiple pages by title?

You will need to create a new function. My example is a fork of the core function. The following will allow you to create a query across all published posts regardless of post_type, unless you desire that specific set. function get_posts_by_title($page_title, $post_type = false, $output = OBJECT ) { global $wpdb; //Handle specific post type? … Read more

Change the name of an installed plugin

Here is the plugin directory structure yoursite\wp-content\plugins\ [editing-plugin-folder] open the folder you will find a .php file in there, edit the file using any editor. you can change the name of the plugin in commented area /* Plugin Name: Name according to you Plugin URI: */ save the file refresh your wp-admin dashboard and there … Read more