Rewriting search permalink

WordPress doesn’t know that you want the path /searchmyblog/ as search result base. So when it sees the a it tries to find the best match – in your case a post starting with this letter. To fix that you could modify my code for the pagination base to change the search base: if ( … Read more

removed index.php now all pages 404

If you want to remove the index.php from your URL structure, then using this rewrite rule (assuming you’re using Apache, from your question) in your .htaccess will help. # BEGIN WordPress RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress Then, flush permalinks by either using WP-CLI … Read more

Hide pages from google and visitors

Add a simple checkbox to the post editor to toggle the generation of a meta field that disallows search engines to index your content. Then hook into wp_head, check for the setting and print that field. Sample code for a plugin: add_action( ‘post_submitbox_misc_actions’, ‘show_noindex_checkbox’ ); add_action( ‘save_post’, ‘save_noindex’, 10, 2 ); add_action( ‘wp_head’, ‘insert_noindex_meta’ ); … Read more

Pagination problems with multiple custom post type archive pages

Your problem comes from a fundamental misunderstanding of how WordPress loads the main loop. Here you have a main query that goes and grabs the posts to display in your post type archive. It then decides to load archive-recept.php based on that query. The call to paginate_links then provides the pagination for that main query. … Read more

htaccess wildcard redirect misses some URLs

You’ve put the redirect directive in the wrong place. It needs to go before the WordPress front-controller, otherwise, the redirect will simply get ignored for anything other than URLs that map directly to the filesystem. Since these domains are also on the same server (same hosting account I assume) then you will need to check … Read more

Error:406 not acceptable

I had a similar problem recently with this 406 Not Acceptable error occurring when trying to update permalinks in WordPress. I also had the same problem when submitting any changes to the editor, etc. Google Webmaster tools would yield the same result. The solution is to disable the mod_security firewall within your .htaccess file. My … Read more

htaccess redirect not working

Even though you’ve placed this rule at the top of the .htaccess file, RedirectMatch is a mod_alias directive so still runs after other mod_rewrite (ie. RewriteRule) directives, so you may have a conflict. Try changing this to a mod_rewrite directive. For example: RewriteRule ^language/(.*) /members/?members_search=$1 [R=301,L] NB: No slash prefix on the RewriteRule pattern when … Read more

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