-
-
Hello,
The actual behaviour is, once on the portfolio page I have to click on the title of a portfolio item to open it. This is not intuitive and I tested it on several persons and everybody tries clicking on the image not the title.
How can I have this behaviour (clicking on the images should open the related portfolio item page)
Regards,
Max
-
Hello,
Please go to file includes\view\portfolio\loop-grid.php and find these lines:
<div class="portfolio-item mix <?php echo esc_attr($sort_classes) ?> <?php echo esc_attr($extra_class) ?> <?php echo esc_attr($style) ?>" data-id="<?php echo get_the_ID() ?>"> <div class=""> <?php if($item_grid_class == 5){ ?> <img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port4', 'url')) ?>" alt=""> <?php } ?> <?php if($item_grid_class == 3){ ?> <img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port4', 'url')) ?>" alt=""> <?php } ?> <?php if($item_grid_class == 4){ ?> <img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port3_grayscale', 'url')) ?>" alt=""> <?php } ?> <?php if($item_grid_class == 6){ ?> <img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port2_grayscale', 'url')) ?>" alt=""> <?php } ?> <?php if($item_grid_class == 12){ ?> <img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port1', 'url')) ?>" alt=""> <?php } ?> <div class="project"> <h5><a href="<?php echo $link ?>"><?php echo get_the_title() ?></a></h5> <h6><?php echo esc_html($sort_classes) ?></h6> </div> </div> </div>
Replace with these:
<div class="portfolio-item mix <?php echo esc_attr($sort_classes) ?> <?php echo esc_attr($extra_class) ?> <?php echo esc_attr($style) ?>" data-id="<?php echo get_the_ID() ?>"> <div class=""> <?php if($item_grid_class == 5){ ?> <a href="<?php echo $link ?>"><img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port4', 'url')) ?>" alt=""></a><?php } ?> <?php if($item_grid_class == 3){ ?> <a href="<?php echo $link ?>"><img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port4', 'url')) ?>" alt=""></a><?php } ?> <?php if($item_grid_class == 4){ ?> <a href="<?php echo $link ?>"><img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port3_grayscale', 'url')) ?>" alt=""></a> <?php } ?> <?php if($item_grid_class == 6){ ?> <a href="<?php echo $link ?>"><img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port2_grayscale', 'url')) ?>" alt=""></a><?php } ?> <?php if($item_grid_class == 12){ ?> <a href="<?php echo $link ?>"><img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port1', 'url')) ?>" alt=""></a> <?php } ?> <div class="project"> <h5><a href="<?php echo $link ?>"><?php echo get_the_title() ?></a></h5> <h6><?php echo esc_html($sort_classes) ?></h6> </div> </div> </div>
Best regards!
-
thx, the links work on portfolio page but not on recent portfolio on the home page.
Could you please help fix that?Regards,
Max -
Hello,
Please go to file includes\view\portfolio\loop-masonry.php and find this line:
<img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port3', 'url')) ?>" alt="">
Replace with this:
<a href="<?php echo $link ?>"><img src="<?php echo esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'port3', 'url')) ?>" alt=""></a>
Best regards!
-
-
You must be logged in to reply to this topic.