• Resolved imndew

    (@imndew)


    Hi, I’m using the share shortecode in a custom post category archive page made with Elementor. The shared link is expected to be the current post category archive page, but instead the link that is shared is that of the first post displayed.

    Please help me with this, I’ve already deactivated all plugins except Elementor and Sassy Social Share, and changed to Twenty Twenty-One theme but the error is still happening.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Heateor Support

    (@heateor)

    Hi,

    You can specify the URL explicitly using the url attribute in the shortcode if that helps. More details on the shortcode are here.

    Thread Starter imndew

    (@imndew)

    Hello, I can set the url in the shortcode as you said (like this: [Sassy_Social_Share count=”1″ url=”https://inspenetdesarrollo.com/categoria_de_articulos/corrosion-materiales/”%5D) but doing so all of the other categories would have that same url, as I’ve set the url directly.

    What I need is for the url to be dynamic (and it’s to my understanding that’s the default behavior of the plugin), if I set it manually I would have to do so for all the other categories, it’s a way of fixing it but it’s not ideal, this problem is not only for the categories but all of the taxonomies (both categories and tags) the website has hundreds of tags so it’s not really a solution for this problem.

    Plugin Author Heateor Support

    (@heateor)

    Okay. You can add following code in the functions.php file of your active theme to get the URL of the current page in the sharer.

    // customize the URL being shared by the social share icons
    function heateor_sss_customize_shared_url( $postUrl, $sharingType, $standardWidget ) {
        return "https://" . esc_url_raw( $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] );
    }
    add_filter( 'heateor_sss_target_share_url_filter', 'heateor_sss_customize_shared_url', 10, 3 );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Link error in post category archive’ is closed to new replies.