• I’m having a problem with image captions appearing on the front page on my blog.

    https://blog.cookandkitchen.com.au

    I’ve tried deactivating all the plugsins and messing around with CSS to get rid of the tag but they’re being imported in P tags. Can anyone help me come up with a rule to get rid of them?

Viewing 6 replies - 1 through 6 (of 6 total)
  • If you’re talking about the captions on the slides then line 205 in your CSS file, the .text class, add display:none; should do it. If you’re talking about something else then please provide some clarification.

    Thread Starter KOM_99

    (@kom_99)

    Hi there, thanks for your message.

    On the front page in post 3 you’ll see:

    There’s many things to do with Dukkah but we love this one to kick off October; we are celebrating seafood, spices and the BBQ and this quick dish brings all three together. [caption id="attachment_3353" align="aligncenter" width="300" caption="Sea Perch with Macadamia & Lemon Myrtle Dukkah"]

    Where the caption is included in the preview article from the post. This shouldn’t be there… is there anyway of getting rid of it? Apart from not actually writing any captions.

    Ah that’s an issue with the_excerpt template tag. The easiest option is to write a custom excerpt for the post. Go to Screen Options in the top right corner of the window and then check Excerpt. A new entry box will show up and you can put in your custom text for the excerpt.

    Alternatively look for a plugin that filters the caption out of the_excerpt.

    Thread Starter KOM_99

    (@kom_99)

    Hi there,

    Thanks for helping out on this.

    Adding a custom excerpt doesn’t seem to have any effect which is a bit odd. Perhaps its something to do with the theme (Foodeluxe). I’ve already got the Advanced Excerpt plugin running and have tried adding caption tag to the list of those not allowed. No effect too.

    This is really odd. Surely, there’s a solution here?

    Thread Starter KOM_99

    (@kom_99)

    I’m also getting a reproduction of a recipe SEO tool in the excerpts as well:

    [amd-recipeseo-recipe:80]

    The plot thickens!

    I just downloaded the theme and it isn’t even using the_excerpt or filtering it in the expected way which is why the post excerpt box isn’t working. They wrote a custom function called dp_clean that takes out the stock ‘[…]’. If you’re not adverse to editing some code then in your index.php file on line 51 look for:

    <p><?php echo dp_clean($post->post_content, 300); ?></p>

    change it to

    <p><?php the_excerpt(); ?></p>

    With that in place you should now be able to at least write a custom excerpt and omit the captions.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Removing caption tags from front page’ is closed to new replies.