In my post I have a shortcode for than text content. Single post page displays first entry-meta, than title, than content + text.
What I need is to add some condition in single.php so that the order for display to be ->entry-meta ->title ->text.
Or maybe there is a function to check if I have shortcode in post to display it first than the title and after rest of the content.
Can anyone please help?
I know that tut but I don’t know how to use it in single.php.
if(has_shortcode('your_short_code')) {
// perform actions here ...
// I want to have: do shortcode or something like this
}
I need an example in single.php
I just want to have in single.php displayed first the after meta than Title +Content
OR
the_content([with video]);
the_content(without video);
There’s a fast and easy tutorial for writing your own
has_shortcode()
function over at WP tuts.