Set permalink from functions.php
To set your favorite permalink structure from the beggining, add this on functions.php:
To set your favorite permalink structure from the beggining, add this on functions.php:
OK this one was tricky, but resolved. With this method you can display most popular posts by views (not by comments, in my casi I hadn’t comment on each post). It uses a custom-value that records each hit on each post and then it is possible to query them by meta-value:
Add this on functions.php:
Easy one: this function redirects any user that hasn`t administrator capabilities to que home page of your site, if they try to access wp-admin/
Continue Reading →
With this PHP function you can create a hierarchical and navigational menu for your pages in WordPress. It will take the top parent page and keep it as a title, and then build their children pages keeping the hierarchy and the same markup used in wp_list_pages();
Continue Reading →
Put this code in your 404.php template and every page Not Found will be redirected to your index.php:
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>