I am using Featured Inages of the Posts on Home Page to dispay my Posts. On Clicking the Featured Iage, the visitor goes to my Post and can read.
I there a way wher I can disable the “Click” on the Featured Inage on the Home Page. The Faetured Image is shown but when visitor clicks on it nothing should happen ie he should not be taken to the Post to read it.
-
This topic was modified 4 months by
AjitSirohi.
I am displaying Featured Iage on the Home Page for a Post. Once a Visitor cicks on the Image he is taken to the Post to read it. This is what the setup is.
My Posts are all blank. There is no content in them. I have just attached a Featured Image in the Post which then I display on the home page. What I want that once a visitor clicks on the Featured Image on the Home Page, he should contonue to stay on Home Page. ie the Clicking on the featired Inage should not take him to the Post. This is what I meant by disabling the Clicking on Featured Inage on the Home Page.
I see, in this case you can use this custom css:
body .td-image-wrap {
pointer-events: none;
}
Set the code in Theme Panel → Custom Code → Custom CSS.
This will ensure that when a user clicks on an image, nothing happens, but clicking on the title will still link to the article.
For a more general solution that prevents clicks on the entire block, you can use the following code:
body .td-module-container,
body .td_module_wrap {
pointer-events: none;
}
Thanks, it is working. I need a sligh modification.
I have three Sections/Modules on Home Page. All three sections/modules use Flex-Block-1. Is it possible that I can disable Clicks on Block-1/Module-1 but allow it on Blok-1 & Block-3. Right now it disables Click throughout the website. That is not what I want. Please help.
Hi,
What you can do is to add to teh code an extra class and set that class on the blocks you want to remove the click option https://i.imgur.com/Fimm5LS.png and the class should be set in the provided css after body, for example:
body .disable-click .td-image-wrap {
pointer-events: none;
}
I hope this will help!
I am sorry I am not able to understand. I am not a technical person. Can you please just tell me what text to put in what field.
Also, should I remove the previous code which is working sitewise and just do it Section/Moduele wise.
Hi,
I will try to explain it better this time.
You need to use tagDiv Composer, edit the homepage and select the blocks where you want to disable the clicks and add the class “disable-click” in the general tab in extra class – https://i.imgur.com/Fimm5LS.png, then based on the above code you used repalce it with this one:
body .disable-click .td-image-wrap {
pointer-events: none;
}
or
body .disable-click .td-module-container,
body .disable-click .td_module_wrap {
pointer-events: none;
}
Just to reconfirm.
I remove the previosu CSS codes that you had sent. Replace them with the following.
body .disable-click .td-image-wrap {
pointer-events: none;
}
or
body .disable-click .td-module-container,
body .disable-click .td_module_wrap {
pointer-events: none;
}
AND
I put “disable-click” in “Extra Class” field of that Module where the click is to be disabled. Have I understood right. Thanks.