• Hi there

    I’m using a slideshow plugin which generates a slideshow and outputs a shortcode to use it in the theme or post. I’ve added a custom field to posts where that shortcode can go.

    What I’d like is for the theme to check if there’s a short code there, and if there is to display it, if not, check it there’s a featured image for the post and display that, and if there’s no short code and no featured image to do nothing. Does that make sense?

    Having a bit of trouble with it, so if anyone’s able to help that would be much appreciated.

    Thanks!
    Mark

    Note: reposting this as I got the original forum wrong.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Sorry for the slow reply, I haven’t been around.

    Shortcodes typically go in content, they will often not work in other places. However, something in a custom field can be made to work, it’s just more work. Themes that support featured images should display it by default if it is specified. You can manipulate this behavior if need be as well.

    Because of those facts, I don’t fully understand what you’re trying to do, but what you want to check can be done easily, and the logic is clear. Exactly where these are displayed is not clear. Between various filters, actions, and CSS, you can typically display anywhere.

    If you have some code that’s not working, I can probably help you. If you are looking for a fully coded solution, I can’t help you, sorry.

Viewing 1 replies (of 1 total)
  • The topic ‘Display slideshow, if not display featured image.’ is closed to new replies.