How to use WP-reCAPTCHA on a form

That plugin is only for comment, registration and email spam protection. You need a plugin like reCAPTCHA Form if you want to create contact forms protected by the reCAPTCHA system.

Url redirection using htacess for my website

That’s a strange URL structure you’ve got there – are you sure you’re running WordPress? I’d imagine that would give a 404 if so. If you are on WordPress, could you say what you’ve set in the WordPress address and Site address fields in the General Settings page, which will be at –your site URL–/wp-admin/options-general.php

One color to category link depending on category ID

Open the page which is rendering the category posts, and in the appropriate place (before running the loop) write the following code <?php $catid = get_cat_id(); $color = “#222”; //default; if ($catid == $pinkCategoryId) $color = “#8B0A50”; else if ($catid == $redCategoryId) $color = “#FF0000″; ?> <style type=”text/css”> a { color: <?php echo $color;?>; } … Read more

Wpautop stops working after get_the_excerpt

wpautop has got to be my least favorite part of working with WordPress. Just when everything else is working, it sticks its fingers into everything… The problem has to do with filter priority, as you noted earlier. In the case of the excerpt, we’re interested in the filter get_the_excerpt. I haven’t been able to figure … Read more

jaredatch metaboxes on video post formats

You can find out the post format using get_post_format(). So try adding your textarea custom field in a custom metabox library file, and then do the following: if( ‘video’ == get_post_format( $post->ID ) ) { include_once( get_stylesheet_directory_uri() . ‘/path-to-cmb-library/video-metabox-file.php’ ); } This assumes that you’re in The Loop or that you have a WordPress Post … Read more

How to skip woocommerce PayPal redirection?

On page class-wc-gateway-paypal.php -> $this->liveurl=”http://www.yourdomain.com/page-name/”; Then in the theme functions.php: remove_action( ‘load-update-core.php’, ‘wp_update_plugins’ ); add_filter( ‘pre_site_transient_update_plugins’, create_function( ‘$a’, “return null;” ) );

Problem with update_user_meta() meta_value

I fixed it doing like below: $meta_value = //data from an API (e.g.: 19, 34, 1290 etc) $meta_value_string = “”. $meta_value; $user_id = wp_insert_user( $new_user_data ); update_user_meta( $user_id, ‘my_meta_key’, $meta_value_string ); Now it works fine.