Dynamic URL, not a physical page within the database

add_rewrite_rule can help you sniff the request and let you handle it however you want. if( ! class_exists(‘PropertiesEndpoint’)): class PropertiesEndpoint { // WordPress hooks public function init() { add_filter(‘query_vars’, array($this, ‘add_query_vars’), 0); add_action(‘parse_request’, array($this, ‘sniff_requests’), 0); add_action(‘init’, array($this, ‘add_endpoint’), 0); } // Add public query vars public function add_query_vars($vars) { $vars[] = ‘__properties’; $vars[] = … Read more

htaccess or redirect to cloak portion of a link?

What you need to do is set up a custom rewrite. This can change something like http://site.com/rotate/1 to http://site.com/wp-content/plugins/ad-rotating-plugin/rotate.php?trackerid=1 Here is some untested code that might help: <?php /* Plugin Name: Your Plugin Plugin URI: Description: Version: 0.1 Author: Author URI: */ // Add rewrite rule and flush on plugin activation register_activation_hook( __FILE__, ‘ad_rotate_activate’ ); … Read more

Moving wp-content outside of web root?

See Ben Word – How to Hide WordPress Summary: In the Roots Theme we’re taking several steps to help make it not so obvious that you’re using WordPress: Cleaning up the output of wp_head and removing the generator from RSS feeds Hiding /wp-content/ by rewriting static theme assets (CSS, JS, and images), rewriting the plugins … Read more

WordPress Rewrite

assuming u is a custom query var, you have to first add it to the array of recognized query vars: function wpa_query_vars( $query_vars ){ $query_vars[] = ‘u’; return $query_vars; } add_filter(‘query_vars’, ‘wpa_query_vars’); Then add an internal rewrite rule that accepts anything appended to vendors and passes that as the u query var: function wpa_rewrite(){ add_rewrite_rule( … Read more

How to attach region identifier to a pretty url?

Referencing this question I was able to resolve this issue: Need help with add_rewrite_rule To briefly display the changes I made here it goes, in my theme functions.php I added the following action: add_action(‘init’,’custom_rewrite_rule’); function custom_rewrite_rule(){ add_rewrite_rule(‘^student/([^/]*)/’,’index.php?pagename=student&country=$matches[1]’,’top’); } This above allows for my urls to be the pretty form of: {{site_url}}/student/ca/ {{site_url}}/student/us/ However this form … Read more