Forums

[resolved] How to? : remove image caption on blog roll but keep on post page? (3 posts)

  1. Michiel
    Member
    Posted 3 years ago #

    Is it possible to exclude WP Gallery image captions from the blog roll but keep the image captions on individual post page?

    Here is my scenario: on the blog roll I'd like to show all the images but to save space I'd like to exclude the captions.

  2. Michiel
    Member
    Posted 3 years ago #

    Bump... any ideas how this could be done?

  3. Michiel
    Member
    Posted 2 years ago #

    Found a solution by using the Gallery Plus plug-in. Edit the gallery-plus.php file around line 188 and add the following:

    if (is_single())  {
    $img_title = trim(htmlspecialchars($attachment->post_excerpt, ENT_QUOTES));
    $img_caption = trim(htmlspecialchars($attachment->post_excerpt, ENT_QUOTES));

    Then in the plug-in settings under title/caption select "none".

    This will show the captions on a single post page but will ensure a nice clean blog roll page.

Topic Closed

This topic has been closed to new replies.

About this Topic