Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #937986
    #939699

    Hey inMotionGraphics,

    Thank you for using Enfold.

    I’m not sure if that’s possible but you can try to create a custom script (javascript or jQuery) that alters the href attribute of the share buttons. You can then append the window.location.hash or the url fragment to the value of the href attribute or url. Or just append the href attribute value of the tab section title to the share link url or href value. This seems to be doable because the url query of each share links is at the very end of the pattern.

    Best regards,
    Ismael

    #941340

    Thanks for getting back to me on this Ismael.

    So is there no way to query the slug of the tab directly via a function added to functions.php? That’s not a bad suggestion to use the tab section title to determine the slug with a bit of manipulation, but would be easier to just query the slug directly if there were such a function. Of course even if I use the title of the tab, how would I query the title of each tab? Do you guys have a function for this that I can use?

    A custom script would definitely be doable, but I was hoping to avoid that, as I imagine a query in my functions.php file would be easier to maintain.

    Thanks.

    Brendon

    #942394

    Hi,

    So is there no way to query the slug

    There’s no built-in function for that, unfortunately, so you won’t be able to use the social share filter. This will require some modification directly in the frontend.

    Best regards,
    Ismael

    #950781

    Did you even fix this? Having the same issue :)
    Maybe an external plugin that works?

    #951851

    Hi,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Basilis

    #952021

    Hi Pixelbits,

    Just to add to what Basilis said above, I wanted to point out that there is nothing wrong with the theme, and the way the theme currently works is the right way and doesn’t need fixing so to speak. There’s nothing broken there. The reason for this is because PHP and WordPress can’t query the fragment or anchor (# part of the URL) because the anchor is changed on the client side, not the server side. So you’ll need some fancy Javascript trickery to query the # part of the URL, or you need to find another way to predict what the anchor will be on the server side, which is the method I am interested in exploring. In particular, I want to use the title or slug of my tabs (because I know what these are, and should be able to query them with a custom function) to modify the share URL via the social share filter.

    However I haven’t had a chance to work on this yet, but if I do develop a solution, I will definitely post how I did it here.

    Also keep in mind that under normal circumstances, you actually wouldn’t want the theme’s social media sharing feature to include the anchor of a URL, as you’d prefer the clean page URL to be shared and promoted. So this is a very specific use case that we’re looking at adding.

    Brendon

    #952909

    Hi,

    Thank you for your clarification, it is much appreciated.

    Best regards,
    Basilis

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.