Code your own WP shortcode

In your plugin file add this:

[php]

add_shortcode(‘oku-sitemap’, ‘okusitemap_handler’);

function okusitemap_handler(){
require_once(plugin_dir_path(__FILE__).’wooku-sitemap-common.php’);
$sitemap = sitemap_get_it(); //this function will echo whatever you want

return $sitemap;
}

[/php]

Then in a wp page you can call your shortcode using [oku-sitemap]

Chande product (default) sort order

</pre>
</div>
<div id="file-gistfile1-txt-LC1">/**</div>
<div id="file-gistfile1-txt-LC2">* This code should be added to functions.php of your theme</div>
<div id="file-gistfile1-txt-LC3">**/</div>
<div id="file-gistfile1-txt-LC4">add_filter('woocommerce_default_catalog_orderby', 'custom_default_catalog_orderby');</div>
<div id="file-gistfile1-txt-LC5"></div>
<div id="file-gistfile1-txt-LC6">function custom_default_catalog_orderby() {</div>
<div id="file-gistfile1-txt-LC7">return 'date'; // Can also use title and price</div>
<div id="file-gistfile1-txt-LC8">}</div>
<div>
and the following can also be used in theme’s fuction.php
add_filter('woocommerce_get_catalog_ordering_args', 'am_woocommerce_catalog_orderby');
function am_woocommerce_catalog_orderby( $args ) {
    $args['meta_key'] = '_price';
    $args['orderby'] = 'meta_value_num';
    $args['order'] = 'desc'; 
    return $args;
}

Force favicon refresh

To refresh your site’s favicon you can force browsers to download a new version using the link tag and a querystring on your filename. This is especially helpful in production environments to make sure your users get the update.

<link rel="shortcut icon" href="http://www.yoursite.com/favicon.ico?v=2" />