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

URLs of plugin resources?

I am trying to add in a script and css file for my plugin into the admin header. Then like any good developer you should be using wp_enqueue_script or wp_enqueue_style so you’re not hard-coding those script/style includes into the plugin(meaning a user can unhook them if he/she needed to). http://codex.wordpress.org/Function_Reference/wp_enqueue_script http://codex.wordpress.org/Function_Reference/wp_enqueue_style If the styles/scripts are … Read more

Dynamic URL generates dynamic content

I would actually tackle it with the .htaccess file, using RewriteCond and RewriteRule, something like: RewriteCond %{REQUEST_URI} ^/advice-on-(\[a-zA-z])$ RewriteRule ^/?(.*) http://domain.com/customadvice?advice=$1 [L] Note that the Regex in the parenthesis will be reused as $1 in the RewriteRule. You should then have a WordPress page on /customadvice and use the $_GET attribute from the page template … Read more

How to Include the Parent and Child Category in the Permalink if the Post is Added to Both

There are a few answers, scattered around this forum. To summarise: Configure your Permalinks: Head to Dashboard > Settings > Permalinks Scroll down to ‘Product Permalinks’ and select ‘Custom Base’. Enter /%category%/ into the text field and then select ‘Save’. Assign Product Categories: If your products are still not showing the Child Categories, within the … 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

How do I amend the fixed “author” part in the URL?

Use the plugin Edit Author Slug: This plugin allows an Admin to change the author slug (a.k.a. – nicename), without having to actually enter the database. You can also change the Author Base (the ‘/author/’ portion of the author URLs). Two new fields will be added to your Dashboard. The “Edit Author Slug” field can … Read more

Creating multiple page URL without creating the pages in WordPress

This is a simple outline so don’t use this in production but it’s a working example. Define your template and place it in templates/template-portfolio-template.php inside your theme. <?php /* * Template Name: Portfolio Template * Description: Page template to display portfolio custom post types */ echo ‘This is the Portfolio Template!’; Next, you’ll need to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)