Hey mate.
You can do that – please try that in text mode.
If [description] is blocking you or causing conflicts, you can add a PHP block (just ensure that PHP is allowed in your editor, using a proper plugin) and call it using
<?php echo do_shortcode( '[description]' ); ?>
Thread Starter
pickme
(@pickme)
Hello!
Shortcode [description] inside [read more][/read] populates the text but it is all hidden and displayed in full with the read more toggle.
The problem with populating the long text with shortcode [description] is that I cannot display a certain portion of the text, say 3 sentences, above the read more toggle that will display the rest of the text.
I do not think I can use php in the theme’s custom text block but only shortcodes.
I can add a snippet though using code snippets plugin.
Can this be achieved?
Ty
-
This reply was modified 4 years ago by
pickme.
Just use your PHP code in a snippet and use the snippet’s shortcode there.
Thread Starter
pickme
(@pickme)
Hi @gkouvousisg,
I not sure I have understood exactly what to do. I will try your solution and if I encounter difficulties I might contact you again.
Thank you!
Thread Starter
pickme
(@pickme)
Hello George,
I use [description] to display user generated content from an input textarea form field.
By embedding the shortcodes in the sequence of [read more][description][/read] all of [description] content is hidden and displays by the read more toggle. This is not what I aim for.
Is there a way to extract, say, 3 sentences or extract a certain number of letters (always different content since it is user generated) from shortcode [description] in order for the read more/less toggle to be displayed below the content that is always visible (eg the 3 sentences)?
Thanks
-
This reply was modified 4 years ago by
pickme.
-
This reply was modified 4 years ago by
pickme.
-
This reply was modified 4 years ago by
pickme.
Unfortunately, thats an advanced scenario which requires custom development and unfortunately, I cannot provide support for it. My plugin’s goal is very specific.
While dynamic parts may be included / wrapped in the shortcode of RMWR, static text is supposed to be found there.
Thread Starter
pickme
(@pickme)
Hello George,
Thank you for clarifying this!
I have alternatively used jQuery to accomplish it.
Regards
-
This reply was modified 4 years ago by
pickme.
Glad you sorted it out!
Cheers!