I have a question and answer website and using a custom wordpress theme, which has the option to enable read more link using jquery. When i click on read more link, it expands full content of the post without opening the post.
I want to know if it is possible to expand the post by default without clicking on red more link. Could you please help me to achieve this.
I have a question and answer website and using a custom wordpress theme, which has the option to enable read more link using jquery. When i click on read more link, it expands full content of the post without opening the post.
I want to know if it is possible to expand the post by default without clicking on red more link. Could you please help me to achieve this.
Share Improve this question asked Apr 2, 2020 at 5:25 Avinash PatelAvinash Patel 398 bronze badges1 Answer
Reset to default 0You can use the solution bellow with jQuery:
jQuery(document).ready(function(){
jQuery(".post-read-more").each(function(){
jQuery(this).click();
});
// And if you want to finally disable this links
jQuery(".question-read-more").remove();
jQuery(".question-read-less").remove();
});
Bests, Camille