HD Quiz

Twitter Share Button is Not Clickable

Published: March 20, 2025
Support status: closed

For some reason, the Twitter Share button is not clickable. I can only share Twitter if I right-click and open in a new tab which is not user-friendly. I need help with this. Also, when I try to share with Facebook, it only shares the link of the post without the Share Text. This has been happening for years

thread author: Godwin

Hi Godwin,
first, for Facebook, sharing the score is impossible. This is a limitation of Facebook. A few years ago, HD Quiz had integration with Facebook by creating a Facebook app that allowed sharing of custom content – but Facebook no longer allows this, only allowing sharing the page itself.

As for Twitter – this is directly caused by a script on your theme. Specifically ./themes/zoxpress/js/scripts.js. If you look at that file, on line 21, you will see a function that modifies all links on your page, including the Twitter Share link. The real issue is that it includes e.preventDefault(); which is what is stopping the link from… being a link. It looks like this function was designed to enable smooth scrolling on your site when a user clicks on an internal link.

Unfortunately, it doesn’t look like the function has any kind of exclusions built in – it’s an all or nothing. So you have three options.

  1. Contact them theme developer for support. Your theme was purchased from Theme Forest, so you can contact the developer there to see if there is a way to disable the smooth scroll function without needing to modify the code of your site.

If not, there are two easy solutions that require a minor edit to one of your theme files.

  1. Manually edit the previously mentioned js file to remove that function. From what I can see, it really doesn’t provide much value. For example, going through some random pages on your site, I failed to find a single link that it should be used on since you are not really using any internal links. The specific lines to remove are lines 21 to 29.

  2. Modify that function to check to see if the link’s parent has a class hdq_social_icon. Basically, before the e.preventDefault(); line, add: if (e.parentElement.classList.contains("hdq_social_icon")) {return;}. That will tell the function to ignore the social share links of HD Quiz.

20 March 2025 — 19:22 support admin - Dylan

Thanks, Dylan. Issue fixed. Went with option 3

20 March 2025 — 19:39 thread author - Godwin

If you are enjoying HD Quiz please leave a review here on the official WordPress.org page. HD Quiz is developed by me, just some dude, and is supported and available for free. It may seem dumb, but truly nothing makes me happier than knowing that people are using and loving HD Quiz and my hard work.

This thread has either been marked as complete or has been automatically closed due to inactivity.