Hi,
From the image, I can understand that the wrapper element is too small. Can you inspect the elements and see if there is any max-width set there. Also, what shortcode attributes do you use? Are you using columns?
Regards,
Iulia
Hi,lulia
I checked the columns and it’s fixed now.
https://ibb.co/6R8mxV8
–
I have another two questions and will be appreciated if you answer them:
1 – I want to implant the shortcode under the post, I’ve already tried putting the shortcode using a hook in function.php file but it didn’t work, how can i do that? ( I’m using generatepress theme)
2 – how to control post title size? using a css code class or editing the shortcode?
Thank you.
Can you show me the code you add in the functions.php to display the shortcode output?
For the post size title, it depends a lot on what the shortcode exposes, like what other elements you display, and the limits you apply in the shortcode attributes. The title element can always be targeted in your CSS and change there how that to be shown, but I would need an explicit example to work with.
i used something like this with varietes of the shortcode:
add_action( ‘generate_after_content’,’re_post_un’ );
function re_post_un() { ?>
[latest-selected-content limit=”4″ display=”title” titletag=”strong” url=”yes” image=”thumbnail” elements=”3″ css=” align-right as-overlay tall” type=”post” status=”publish” orderby=”dateD”]
<?php }
To make it work you have to do something like this:
add_action( 'generate_after_content', 're_post_un' );
function re_post_un() {
echo do_shortcode( '[latest-selected-content limit="4" display="title" titletag="strong" url="yes" image="thumbnail" elements="3" css=" align-right as-overlay tall" type="post" status="publish" orderby="dateD"]' );
}
So, use the WordPress do_shortcode native function that transforms the shortcode string into the output.
Let me know if this works.
Regards,
Iulia
-
This reply was modified 5 years, 10 months ago by
Iulia Cazan.
Works very well.
Thanks again, keep it up.