Custom Post type and Custom taxonomy with URL rewrite worked but template did not

function my_custom_post_work() { $labels = array( ‘name’ => _x( ‘Store’, ‘post type general name’ ), ‘singular_name’ => _x( ‘Store’, ‘post type singular name’ ), ‘add_new’ => _x( ‘Add New’, ‘Store’ ), ‘add_new_item’ => __( ‘Add New Store’ ), ‘edit_item’ => __( ‘Edit Store’ ), ‘new_item’ => __( ‘New Store’ ), ‘all_items’ => __( ‘All Store’ … Read more

Custom urls in WordPress involving page slugs

This exact piece of code works, the reason for redirect was some other plugin. To create as many child pages you want dynamically you just need to this just hook it to ‘init’ hook. add_action(‘init’,’my_custom_rewrite_rules’ ); function my_custom_rewrite_rules(){ add_rewrite_tag( ‘%make%’, ‘([^/]+)’ ); add_rewrite_rule(‘^cars/([^/]+)/?’,’index.php?make=$matches[1]’,’top’); //or To go to a published page. add_rewrite_rule(‘^cars/([^/]+)/?’,’index.php?pagename=page-slug&make=$matches[1]’,’top’); } If you want … Read more

Fully mask *all* traces of WordPress installation subdirectory?

For the sake of anyone interested in the answer to this question, I am posting here the following answer that I received in the WordPress.org support forums. leejosepho graciously provided the following answer: Yes, that is possible. Save ‘http://dem0site.net‘ in both boxes at Dashboard > Settings > General, then cPanel-assign and -point your domain to … Read more

How to show my application as referral in WordPress Stats

It is not possible to directly set a referrer. See: https://stackoverflow.com/questions/14235377/http-referer-and-bookmark You can still track this data by passing a parameter in the url and then listening for that parameter in WordPress. For example, you could set the parameter from_desktop in the url, so your url would look like www.example.com/page-slug/?from_desktop=1. Once you’ve got this going … Read more