How to redirect WP post with a specific word in the URL

Try using wp_rewrite: add_action(‘init’, ‘flush_rewrite_rules’); function custom_add_rewrite_rules( $wp_rewrite ) { $new_rules = array( ‘archive/(\d+)’ => ‘/?p=’ . $wp_rewrite->preg_index(1) ); $wp_rewrite->rules = $new_rules + $wp_rewrite->rules; } add_action(‘generate_rewrite_rules’, ‘custom_add_rewrite_rules’); Use the plugin activation hook for the flush_rewrite_rules, because you only want this to happen all the time while developing. In production this should only happen when activating … Read more

Why am I seeing ‘yes’ and ‘no’ in URLs crawled by Xenu?

I resolved the problem – we’re using the Zemanta Related Posts and somehow that was adding references to missing thumbnail images with src=”https://wordpress.stackexchange.com/questions/141273/yes” and src=”no”. Regenerating the missing thumbnail images got rid of this problem.

How to set global variable in functions.php

You can turn your snippet into a function that returns the post thumbnail URL of a post: function wpse81577_get_small_thumb_url( $post_id ) { $thumbSmall = wp_get_attachment_image_src( get_post_thumbnail_id( $post_id ), ‘small’ ); return $thumbSmall[‘0’]; } Usage, supplying the ID of a post: <?php echo wpse81577_get_small_thumb_url( 59 ); ?>

Populate Website URL at registration time

A few things come to mind… 1) Do users have to activate their accounts? If they do, it’s quite possible that users who haven’t activated yet are the users who don’t return an author URL 2) If this is occurring for all users, that shouldn’t matter since you already know what the expected URL is … Read more

WordPress custom form post to different page

If you choose to use contact form 7 plugin then you can find very detailed instructions here. Basically you need to create a custom filter using wpcf7_form_action_url hook. Another option would be to create child-theme and create your custom form there, but that IMHO would be a bit of an overkill.