Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • in reply to: Pagination – show last page #1256426

    Thank you very much, works great!

    in reply to: Enfold Pinterest Share Image Selection #1203270

    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.

    in reply to: Enfold: Roles allowed to see WYSIWYG Shortcode button #946647

    Hello,
    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.

Viewing 3 posts - 1 through 3 (of 3 total)