How to preview a page instead of a category?

try and change this line: query_posts(‘posts_per_page=1&cat=7’); to: query_posts(‘posts_per_page=1&page_id=17’); or: query_posts(‘posts_per_page=1&pagename=page-slug’); (enter the actual page ID or page slug into the respective space) http://codex.wordpress.org/Class_Reference/WP_Query#Post_.26_Page_Parameters

Ugly permalinks stopped redirecting to pretty URLs

Found the following in a plugin file using grep -Ri ‘redirect_canonical’ /path/to/wordpress/plugins: remove_filter(‘template_redirect’, ‘redirect_canonical’); That disables WordPress’ built-in canonical URL redirects. Disabling the component of the plugin that contained that line fixed the problem. Beware the WordPress Mobile Pack’s Mobile Switcher. Hopefully reaching out to the plugin developer will result in a fix that allows … Read more

Remove the current item from a menu

You’ll probally want to use WP Conditional tags and do something like this: if(is_home()){ //show home menu } else if(is_page(‘mypage’)){ //show category menu for JUST that page } else{ //show the menu for all other pages } What you do inside each conditional statement is up to you. Here are 3 solutions: Use CSS and … Read more

Random HTTP 500 error in WordPress

If the problem is easily reproducible (i.e. you can make it happen again and again by following a set of steps), do this: Step 1: Document the steps required to cause the problem. Step 2: Document all of the plugins you have running Step 3: Deactivate all of your plugins! Step 4: Perform the steps … Read more