Skip Navigation

[Closed] Custom values not displaying correctly in category page

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Caridad 9 years, 7 months ago.

Assisted by: Caridad.

Author
Posts
#239940

Hello
I have created a custom post type and and custom meta data, everything works fine except in category page, the custom meta values does not show the corrected value.
in the post listing , the custom meta values only show the value of first post. Below are two links you cna check, in first the number of days are shown from first post only.
hidden link
hidden link

Both are pages are category pages, in the first link, the number of days are showing as 2 nights/3 days, which is only for forst tour packages, for the rest of the tour packages it shown be different but here it is showing the value of the first only.

In the second link where there is only one package, it is showing correct /changed duration.

The code I am using is
This is how I am storing the value of the field in a variable

 <?php $noofdays = types_render_field("no-of-days", array("output"=>"raw"));  ?>

and I am printing euse the below code

<?php  echo  $noofdays  ?>  

Thanks in advance

#240241

Dear Anuj,

It sounds like the global $post variable doesn’t have the correct value.

Can you post the code around that? Specifically the code for the loop.

Regards,
Caridad

The topic ‘[Closed] Custom values not displaying correctly in category page’ is closed to new replies.