Avoid duplicate content on pretty URLs with htaccess

To ensure that your URLs have a consistent trailing slash and avoid duplicate content, you can use the following .htaccess rules. These rules will enforce a single trailing slash for URLs and redirect any URLs without or with multiple trailing slashes to their correct form. Here’s the updated .htaccess code: # Enable rewrite engine RewriteEngine … Read more

Taxonomy entries are spawning copies of existing entries with the new title as the existing ID, since upgrade

I’ll answer this myself, though kudos to @jacob-peattie for noticing the selection box was non-standard and a likely culprit. So we had the ‘Radio Buttons for Taxonomies’ plugin running (up to date) with the affected taxonomy types selected there. When we removed the taxonomies from there, the problem stopped. But we wanted radio buttons here … Read more

Prevent duplicating specific column from database table

This is more of a general PHP question than a WordPress one. Use an array with the county as a key to group up your results. $groups = array(); foreach( $results as $result ) { $groups[$result->county][] = $result; } var_dump or print_r on $groups to see how this groups up your results. You can then … Read more

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