Dear Customers! We're out of the office from the 6th of October to the 11th of October. We sincerely apologize for the inconvenience. For WordPress 5.5.* related issues, please visit this article

Okay
  Public Ticket #1071597
Post listing disable enlarge image
Closed

Comments

  •  2
    Adam started the conversation

    How do I disable the enlarge image when you click on a post in the post listing?

    Ideally I'd like to change it to go through to the post rather than enlarge the image

  •  361
    Filip replied

    Hello Adam,

    This will require a little modification of the theme's code. Please open the /qaro/framework/functions/blog-functions.php file and change these two lines:

    $post_link = $imgurl[0];
    $extra_class = " mp-gallery";

    to:

    $post_link = get_permalink( $post->ID );
    $extra_class = '';
    

    Thumbnails will now behave as classic links and the lightbox will be disabled.

    Kind Regards,
    Veented Team

  •  2
    Adam replied

    Thanks but that gave me this error on my site:

    Parse error: syntax error, unexpected '$extra_class' (T_VARIABLE) in /public_html/wp-content/themes/qaro/framework/functions/blog-functions.php on line 541

  •  361
    Filip replied

    Hi there,

    This is strange. Are you sure you've copied the bit exactly as it is?

    I'm pasting it on a special site now so you get the exact bit:

    http://snippi.com/s/r3he56f

    Kind Regards,
    Veented Team

  •  2
    Adam replied

    Thanks that works now, I think it was because the original had 

    $extra_class = '';

    and the new one you gave me had 

    $extra_class = "";

    thanks for your help

  •  361
    Filip replied

    Yeah, that's what I guessed could cause the problem. Sometimes when I post single quotation marks (as it was in the first case, please note that there are TWO single quotation marks). Some browsers/computers in specific languages can switch them to apostrophes that is not supported by the PHP language and causes an error. I'm glad it works now.

    Kind Regards,
    Veented Team