Skip Navigation

[Closed] Displaying Images that belong to the custom post

This support ticket is created 8 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 8 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#402561

Good Afternoon:

I am creating a slider via Views to display on my custom post type "apartments." Each apartment has up to 20 picture custom fields that I want to display on an apartment page.

Here is where I am getting stuck > The slider view on the apartment page is displaying picture post fields from other apartments too.

What do I need to do to just have the post image fields for each apartment appear on the apartment page?

Thanks so much! 🙂

Here is what I am using in the Loop:

Slider View Code
[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<div class="container wpv-loop js-wpv-loop">
<wpv-loop wrap="6" pad="true">
<div class="row ">
[wpv-item index=1]
<div class="col-sm-2">[wpv-post-body view_template="Chicago Apartments Photo Slider - slide"][types field="apartment-pictures-1" id="$yyyy" output="raw"][/types]</div>
[wpv-item index=2]
<div class="col-sm-2">[wpv-post-body view_template="Chicago Apartments Photo Slider - slide"][types field="apartment-pictures-2" id="$yyyy" output="raw"][/types]</div>
[wpv-item index=3]
<div class="col-sm-2">[wpv-post-body view_template="Chicago Apartments Photo Slider - slide"][types field="apartment-pictures-3" id="$yyyy" output="raw"][/types]</div>
[wpv-item index=4]
<div class="col-sm-2">[wpv-post-body view_template="Chicago Apartments Photo Slider - slide"][types field="apartment-pictures-4" id="$yyyy" output="raw"][/types]</div>
[wpv-item index=5]
<div class="col-sm-2">[wpv-post-body view_template="Chicago Apartments Photo Slider - slide"][types field="apartment-pictures-5" id="$yyyy" output="raw"][/types]</div>
[wpv-item index=6]
<div class="col-sm-2">[wpv-post-body view_template="Chicago Apartments Photo Slider - slide"][types field="apartment-pictures-6" id="$yyyy" output="raw"][/types]</div>
[wpv-item index=7]
<div class="col-sm-2">[wpv-post-body view_template="Chicago Apartments Photo Slider - slide"][types field="apartment-pictures-7" id="$yyyy" output="raw"][/types]</div>
[wpv-item index=8]
<div class="col-sm-2">[wpv-post-body view_template="Chicago Apartments Photo Slider - slide"][types field="apartment-pictures-8" id="$yyyy" output="raw"][/types]</div>
[wpv-item index=9]
<div class="col-sm-2">[wpv-post-body view_template="Chicago Apartments Photo Slider - slide"][types field="apartment-pictures-9" id="$yyyy" output="raw"][/types]</div>

</div>
</wpv-loop>
<!-- wpv-loop-end -->
</div>
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]Future Apartment Pictures Coming Soon[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

#402654

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand you would like to display the custom field images for the current apartment page? If yes, you should add filter to your view and filter your view with your current appartment id.

Have you go through our Docs regarding how to display slider and how to filter views:
=> https://toolset.com/documentation/user-guides/creating-sliders-with-types-and-views/
=> https://toolset.com/documentation/user-guides/getting-started-views/part-5-slider/
=> https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/

#403455
query_filter.png

Hi:

Thanks for the references. I had actually found those and using those examples was still unable to have an image display only for the selected apartment post type.

I have broken it down as simple as I can and created a new View and added just one image (a custom post field) to be displayed, which is pictures-1 (all apartment post types have this custom field).

All custom post types (all apartments) with the field custom field pictures-1 display, not just the one that matches the apartment ! I have disabled all plugins to verify any conflicts, tried a countless shortcodes etc.

Here is an image of the latest query filter setting used...

#403665

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Sorry to hear that you can't able to make it work. I can see that you've used post ID filter with URL parameter.

Could you please share problem URL and try to explain me what exactly output you would like to display.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

The topic ‘[Closed] Displaying Images that belong to the custom post’ is closed to new replies.