• hi , after i unsuccessful in put video shortcode to my short post , i decide to put a preview image of my video as image in short post and then show video player ( put shortcode) in full post

    now i need a way to hide the preview image after user see full post

    i need this only for a few post and not all of them

    s there any plugin or code that can help me ??

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    If you’re willing to assign a particular class to the preview image when it’s inserted, you could add inline <style> to your theme’s single post template that hides that class, then the preview will not display with the full post but will show on home and archive page excerpts.

    The post author may need the “unfiltered_html” capability to insert images assigned to a class, I’m unsure what HTML WP otherwise filters out.

    If manually adding a class to the image is unacceptable, the required solution will get much more complicated.

Viewing 1 replies (of 1 total)
  • The topic ‘Display image or text only in shortcode ( only for a few post)’ is closed to new replies.