Portfolio gallery problem

Hi there,

I created a portfolio page and added one portfolio item.

First I added a post image. Then I set ‘Gallery’ as media type and 'Thumbnail as 'featured content. Afterwards I added the images in the text field (including the post image again and two other pictures).

I have two problems on the portfolio item page:

  1. The post image is missing in the gallery.

  2. Beneath the gallery the images I added to the text field are shown a second time. How can I remove them beneath the gallery so the images are only shown in the gallery?

Best regards

Hi,

The login provided doesn’t seems to work.

Kindly check again and let us know.

Thanks

Hi there,

sorry for the wrong credentials. The user name was wrong. Please check the secure note. Thank you!

Hi There,

For the image to display on the gallery, it should be uploaded on the specific portfolio item. This process will make the image attached to the portfolio item. Add media and upload. If the image is selected from the existing images on your media, it will not work. No need to click the insert image on the lower right part of the popup if you don’t want the image to appear on the content area.

Hope this helps.

Hi there,

sorry but that is no solution to the above mentioned problems. When I remove the post image in the portfolio item settings that image is displayed in the gallery, but it is also no longer displayed as the post image on the portfolio page (overview).

Furthermore the images I added to the text field are shown a second time beneath the gallery in the portfolio item page.

Best regards

Please go to your Media Library, find the image attached to your post and click the Detach link.

That will remove the image from your gallery.

Inserting or Adding Media to your content uses the attach method. Deleting them in the content or “text editor” won’t remove them from your gallery because that way does not use the detach method. You need to detach them in the media gallery. They will only be removed in the content area.

See https://youtu.be/yH4m5JpwLzg for attaching and detaching an image.

Thanks.

1 Like

Hi there,

I just reconstructed the procedure as shown in the video you linked to. I added three pictures to the gallery (one of them should also be the post image).

The only problem I have is when I want to set an post image:

It does not show up in the gallery anymore. How can I use the image at same time as a post image and one of the gallery images?

Sure, I can copy that image and it will work but to my mind that is not the perfect solution.

Best regards

1 Like

Hi There,

By default, featured image is excluded from the list of images on the gallery. You can see it on this function: x_featured_gallery() on this file: wp-content\themes\pro\framework\functions\global\featured.php
You may upload another instance of the image if you didn’t want this to happen or you may customize that function on your child theme.

Hope this helps.

1 Like

Hi there,

thank you, it kind of worked.

Best regards

You are most welcome. :slight_smile:

what do you mean by “customize that function on your child theme.”? i have tried moving pro/framework/functions/ to pro-child/framework/functions/ and editing the featured.php file from the child theme and it will not update / override the original. as a matter of fact, php doesnt really allow for function override anyway so is there some code in pro that does this? it would be great though if all themeco functions were hookable / filterable though and then we could do this no problem without having to edit all occurrences of x_featured_gallery within the views

Hi There,

What I meant was, copying the x_featured_gallery() functions to your child theme functions.php file.
Copying the file on the exact location on your child theme only works for view templates on this folder: wp-content\themes\x\framework\views

For the content on \wp-content\themes\x\framework\functions, we just need to copy the specific functions code that we need to customize to your child theme functions.php file. In this case, the function needed to customize is x_featured_gallery()

Hope this helps.