(Plugin) Icon needed beside the post title [closed]

This can be done easily by using the filter the_title. Below is the custom code which you can use in your theme’s functions.php file. function new_title( $title ) { $new_title=”nic ” . $title; return $new_title; } add_filter( ‘the_title’, ‘new_title’ ); The above will add “nic” prior to post title. Similarly you can use the icon … Read more

Add to cart option to have multiple of 6

In the bleeding edge of WooCommerce 2.1 you can filter woocommerce_quantity_input_min and woocommerce_quantity_input_step directly. That should get you 6,12,18, etc. I have no idea if these filters are in WC2.0.?. Note the $product object is passed to the filter in case you don’t want this to be a universal change. You can get the bleeding … Read more

how to change location of the plugins & wordpress themes folder

You can’t move only those folders. You can move the plugins folder in the wp-config.php file: Quoted text from WordPress Codex: Set WP_PLUGIN_DIR to the full local path of this directory (no trailing slash), e.g. define( ‘WP_PLUGIN_DIR’, dirname(__FILE__) . ‘/blog/wp-content/plugins’ ); OR: Set WP_PLUGIN_URL to the full URI of this directory (no trailing slash), e.g. … Read more

Making WordPress-built website mobile friendly

To make your WordPress site more mobile-friendly, your easiest choices are to install either a plugin or a theme that is mobile-friendly. I don’t have any specific recommendations for you (and asking for recommendations is off-topic on this site), but there are lots of options to choose from. Don’t run more than one “mobile” plugin … Read more

How to show more than 10 order on woo commerce order view [closed]

It appears the shortcode uses the key order_count and not per_page. You can modify this on the View Order page, where the shortcode exists. [woocommerce_view_order order_count=”20″] If you would want some kind of AJAX order loader you may have to make some significant changes. A note order_count also accepts the parameter all which will get … Read more

Make a plugin work on specified domain only

You could use a combination of the file content and the domain to create a unique hash. Example: $md5 = md5( file_get_contents( __FILE__ ) . $_SERVER[‘HTTP_HOST’] ); if ( ‘be5d38f32a5d4a897e6c878f0c2f1b14’ !== $md5 ) deactivate_plugins( plugin_basename( __FILE__ ) ); Additionally, you could check each week per remote request to your server, if the hash is registered … Read more

WordPress Customer Reviews Error: Line 239?

Replace that line with the following: if(!is_object($val) && !is_array($val)){ $this->p->$c = trim(stripslashes($val)); } else { $this->p->$c = $val; } This is just a temporary solution so the error will go away. All this does is check the variable to see if it’s an object or an array. If it is the variable just gets saved … Read more

What is wrong with this dbDelta syntax?

The dbDelta function is super nitpicky. Everything has to be exactly correct. In this case, the lack of space between the table name and the parentheses following it will cause your call to fail, because it can’t figure out the table name without that space. The relevant code in dbDelta() is this: if (preg_match(“|CREATE TABLE … Read more