Skip Navigation

[Resolved] How to create a view to display custom fields from a post.

This support ticket is created 5 years, 4 months 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 15 replies, has 2 voices.

Last updated by angelapiqui 5 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1285563

Hi guys, I would like to create a view to display custom fields that I created for my posts. I'm not sure what to set in query filter.

This is the documentation I've read:
https://toolset.com/documentation/user-guides/filtering-views-by-custom-fields/
https://toolset.com/documentation/user-guides/using-custom-fields/

I attached an image to show what I kinda want to display.

Thank you.

#1285565
Screenshot from 2019-07-06 18-04-48.png

Sorry, I forgot to attach the image 😛

#1285877

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

If you just want to create a view to list the posts belongs to your desired post type you do not need to add any query filter to your view.

Please check the following Doc that will help you to understand what you can do with view's and also check the video:
=> https://toolset.com/documentation/user-guides/learn-what-you-can-do-with-views/

In addition to that, you can also take reference from our free test platform discover-wp.com where you can create a test with any of our available reference sites and learn how the views are integrated.
=> https://toolset.com/faq/how-and-why-to-create-a-test-site-in-discover-wp/

#1286877

Hi Minesh, thank you for writting back!

I'm sorry, I made a mistake. I should have said that, in fact, what I'm not able to do is to set the view to show only the custom fields from the current post. I created the view, exactly as the video you mentioned, but can't find an option to set only current post. I know that if I select taxonomies, for example, there is a option in query filter that I can set only results for current post, but I didn't find this option for post types.

#1287025

Minesh
Supporter

Languages: English (English )

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

Can you please share access details and problem URL and what fields you want 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 have set the next reply to private which means only you and I have access to it.

#1288513

Minesh
Supporter

Languages: English (English )

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

When I try to access the wp-admin I see the following message instead of login page:

Detectada petición de login incorrecta!

Can you please make sure that I can access your site. Do you have any IP restrictions?

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

#1288777

Hi Minesh,

That's is because the hosting company block requests for files that are frequently attacked such as WordPress login in browsers that don't have a few languages installed. The languages are: Spanish, Catalan, Galician, Euskera.
I kindly ask that you set one of those languages up (perhaps Spanish). It is not necessary to enable them all, or that they are the main use, simply that there is one installed is enough. This measure is designed to prevent bots access.

Let me know if you have any problems.

Thank you.

#1288819

Minesh
Supporter

Languages: English (English )

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

I installed the Spanish language on browser but still there is no luck. Would you mind to remove these restrictions that will help me to dive into admin and quickly fix the issue for you.

#1288861

I can't remove the restrictions. I'll have to contact the hosting support to report this problem and will come back to you as soon as possible.

Talk soon,

#1289025

Hi Minesh,

The restriction is removed, you can try again.

Let me know if you have any problems.

#1289299

Minesh
Supporter

Languages: English (English )

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

Ok great - Now I successfully able to login to wp-admin.

I am checking the boat single post page - Can you please confirm where exactly you want to display the boat details fields?
=> hidden link

I checked the view you shared but I see the view is not added anywhere? Once you tell me where exactly you want to display the fields I will be able to guide you in the right direction.

Or

Do you mean that you want to build a custom search view where you want to filter your view with custom fields?

#1289819
boats-template-1.jpg
boats-template-2.jpg

I'm using a single page template to display the posts (please see screenshot 1).

For the place where I want to display the boats details, please see screenshot 2. At the moment, I'm using another elements from Elementor to display the details (temporarily) but I don't like the way I did it, that's why I think that creating a view to display them would be a better solution.

You can't see the view yet because the one that I created is not working properly, so I didn't put it there. The problem is that my view is showing the details of all boats at once, instead of only details from current post.

#1290233

Minesh
Supporter

Languages: English (English )

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

Can you please check now.

I've added query filter to "Query filter" section to filter the view by shortcode attribute:
=> hidden link

I've created the following content template and added the view as given under:
hidden link

[wpv-view name="boat-details" ids="[wpv-post-id]"]

Then I've added the shortcode element just above the "EQUIPMENTS" section and added the content template we created:
=> hidden link

I can see its working fine - can you please confirm.

#1291001
Screenshot from 2019-07-13 10-08-44.png

Ok, now I get it! Thank you for that!

I have one last question, I forgot to mention that I also would like to display the field's names (screenshot). Is it possible?

#1291495

Minesh
Supporter

Languages: English (English )

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

You should write the field names (label) manually.