Jetpack email sharing button to include image on email sent

wp_mail does not support rich formatting, so you can’t just embed the image in the body. It does, however, support attachments. If you read about the function, you’ll see it has a parameter for attachments. Try hooking your attachment there instead: http://codex.wordpress.org/Function_Reference/wp_mail $attachments (string or array) (optional) Files to attach: a single filename, an array … Read more

Visual Editor not working when Jetpack plugin is active

I just had the same problem using Jetpack v3.3 on http://ataxproforyou.com. I deactivated the whole jetpack plugin and the features came back, reactivated the plugin and was fine, until I connected it to my wordpress site http://ataxproforyou.wordpress.com and they went away again. I deactivated spell-check setting but that didn’t resolve. I deactivated the Shortcode Embed … Read more

How can I stop Jetpack mobile theme from using full size featured images?

It turns out Minileven (the mobile theme that comes bundled with Jetpack) uses the main theme’s default post_thumbnail_size, which is set using set_post_thumbnail_size. Adding this line to my main theme’s functions.php inside a function called through the after_theme_setup action helped solve the problem: set_post_thumbnail_size( 600, 400, true );

Implementing backbone.js to retrieve category posts using JSON API

I managed to display the data returned from JSON using the code below. Note that I used JavaScript bracket notation to access the posts array rather than Backbone’s .get method. Also note that the object fetched is passed to a variable called posts, which is then passed to _.template. I’m betting it’s this that prevents … Read more

Featured posts and the loop

A simple approach could be to use a global array in which you will store posts that are selected in the featured query. You could set this array in your functions.php or index.php : $featured_post_array = array(); Then in your featured.php file first call the global array somewhere in the beginning: global $featured_post_array; and inside … Read more

how to disable jetpack for non admins?

Use the code given below, In this code we are checking if page is ‘jetpack’ and based on that showing custom error message. add_action( ‘admin_init’, ‘restrict_page’ ); function restrict_page() { if ( class_exists( ‘Jetpack’ ) && !current_user_can( ‘manage_options’ ) ) { if ( isset( $_GET[‘page’] ) && $_GET[‘page’] == ‘jetpack’ ) { wp_die( ‘no access’ … Read more