images action in single post

  • Posted in : TheBlogger
  • Steve B
    Participant

    So we have now gone live with 2 websites (1 more to go) using “the blogger” theme.
    One of them, when you click on the images in the single post, nothing happens.
    http://www.thebudgetdecorator.com/easy-diy-chunky-throw-blankets/

    The other, when you click on the images they come out into I guess you call it a lightbox with the rest of the page dimmed out.

    Is there a setting for this somewhere that I don’t know about?

    Thanks!

    serkan
    Moderator

    Hi Steve,
    Edit the images in the single post and choose link to media file instead of link to none.
    Thanks

    Steve B
    Participant

    Hey guys!
    Finally have time to investigate this problem again.
    For some reason, when we changed our 3 blogs over to ‘the blogger’ theme, it looks like something happened and that setting ( link to ) got changed to ‘media file’ on many of the images. We had them all on ‘none’. We have probably over 1000 images and hundreds of posts, it is virtually impossible to go back and change them one by one! I’ve searched all over for a bulk or global way to change all of them at once but can’t find anything. I can only find how to change the default for new images.
    Do you know of any way to do this in bulk? Is there a way to edit the database or something? Any help would be appreciated. We want to change them all back to ‘none’.

    Thanks!

    serkan
    Moderator

    Hi, We have not made any changes in this regard. I would advise you to ask this question on WordPress forums.
    Thanks

    Steve B
    Participant

    Thanks Serkan – I’ll try that!

    serkan
    Moderator

    Please keep me updated. Thanks

    Steve B
    Participant

    I will. Waiting for a response from wordpress!

    Steve B
    Participant

    So somebody on the wordpress forum said this:

    Add below code to your theme function.php file.

    add_filter( ‘the_content’, ‘attachment_image_link_remove_filter’ );

    function attachment_image_link_remove_filter( $content ) {
    $content =
    preg_replace(
    array(‘{<a(.*?)(wp-att|wp-content\/uploads)[^>]*><img}’,
    ‘{ wp-image-[0-9]*” />}’),
    array(‘<img’,’” />’),
    $content
    );
    return $content;
    }

    Does that seem like it would work? If so, would I put it in the function.php file that is in the blogger – child theme folder? And would that be after the line that says “custom functions”?

    Thanks!

    serkan
    Moderator

    Hi, get your backup before making any changes. Also, modify the child theme. Do not edit the main theme files directly.
    Thanks for the feedback.

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register