Forum Replies Created
-
AuthorPosts
-
Thank you very much, works great!
Hello,
I know this is an old thread but it showed up on Google when I searched for the same possibility.
I figured to make it work : display a 2:3 ratio image to Pinterest share pins.First, you need to create a custom size with 2:3 ratio, here I took 600×900 :
add_image_size( 'pinterest-size', 600, 900, true ); add_filter( 'image_size_names_choose', 'custom_pinterest_size' ); function custom_pinterest_size( $sizes ) { return array_merge( $sizes, array( 'pinterest-size' => __( 'Ratio 2:3' ), ) ); }
Then, you can edit the pinterest URL pattern with avia_add_social_share_link_arguments :
add_filter('avia_social_share_link_arguments', 'avia_add_social_share_link_arguments', 10, 1); function avia_add_social_share_link_arguments($args) { if(is_single() && get_the_ID()){ $args['pinterest'] = array("encode"=>true, "encode_urls"=>true, "pattern" => "https://pinterest.com/pin/create/button/?url=[permalink]&description=[title]&media=".get_the_post_thumbnail_url(get_the_ID(), 'pinterest-size'), 'label' => __("Share on Pinterest",'avia_framework')); } return $args; }
And that’s it !
Hope it will help some other who get to this thread from Google with the same issue.April 25, 2018 at 3:50 pm in reply to: Enfold: Roles allowed to see WYSIWYG Shortcode button #946647Hello,
For those wo want a correct answer and because it’s the only question that comes out in Google results when you have this problem, here are the capabilities needed to allow the WYSIWYG TinyMCE shortcode button :- edit_posts
- edit_pages
Grant these capabilities to the desired limited role and tada ! The button will show up.
-
AuthorPosts