How can I use get_post_meta with add_rewrite_rule to build custom permalinks?

Not sure the rewrite rule is good, but to answer the question about getting the post meta – you already have the post Object, so you don’t need to run a function to get the global $post, which might also fail or be wrong – you can simply use: $metaText = get_post_meta( $post->ID, ‘test_text_field’, true); … Read more

.htaccess rules for blocking bots with an extra condition

Try it like this: RewriteCond %{HTTP_USER_AGENT} (ADmantX|Proximic|Barkrowler|X-Middleton) [NC] RewriteRule ^ – [F] This will block any request where the User-Agent string contains either ADmantX, Proximic, Barkrowler or X-Middleton. The NC flag makes this a case-insensitive match – whether this is strictly required or not in this example I don’t know, but generally this should be … Read more

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