• Resolved Saurabh Saneja

    (@saurabhsaneja)


    Hi, Thanks for all the hard work you’ve put into creating this plugin and maintaining and providing updates for it.

    I have a question: I have several posts on category page which have their excerpts and read more button; when someone clicks on Read More button, he/she’s redirected to the particular post page however I want post’s excerpt to expand on category page itself.

    Thanks,

    Saurabh Saneja ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter Saurabh Saneja

    (@saurabhsaneja)

    Link to the category page below:

    https://www.powerqueryanalyst.com/category/power-query/

    Thanks again ??

    Plugin Author George Gkouvousis

    (@gkouvousisg)

    My plugin uses a shortcode actually, so you can place it everywhere ??

    Thread Starter Saurabh Saneja

    (@saurabhsaneja)

    Hi,

    Thanks a lot for replying.

    I didn’t create category page neither did I add post excerpts and read more buttons to the page. I know which template file is rendering this page. I also know a little but about editing a template file into child theme but I am not sure how to add a shortcode in a template file.

    This code is rendering the post excerpts on category page.

    // Display custom excerpt if excerpt length not defined
    

    excerpt( array(
    ‘length’ => excerpt_length())

    Thanks a lot for replying!!

    Plugin Author George Gkouvousis

    (@gkouvousisg)

    You can add the shortcode directly in PHP using do_shortcode. However, adding it within posts’ content will be more complex. You need to generate a new function that will count content’s caracters and should display the shortcode after a specific number.

    However, since my shortcode needs also text, I dont think you can do it in a dynamic way.

    Its not only including [read-more] shortcode, its about including [read-more]my hidden text[/read-more] in the post loop, which is not possible, unless you set you ‘my hidden text’ in a registered variable and call it in a dynamic way.

    Unfortunately, this scenario is completely outside the scope of support levels of this plugin, so I wont be able to assist you if you go with it.

    Thread Starter Saurabh Saneja

    (@saurabhsaneja)

    Thanks again; I understand it. I will try to add the_content – the_excerpt in a registered variable. ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Can it be used on category page which already has read more buttons?’ is closed to new replies.