Skip Navigation

[Resolved] PHP conditional statements not working after update to Toolset Types 3.4.14

This support ticket is created 3 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.

Our next available supporter will start replying to tickets in about 7.73 hours from now. Thank you for your understanding.

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

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 23 replies, has 3 voices.

Last updated by LandruF8417 3 years, 1 month ago.

Assisted by: Shane.

Author
Posts
#2184943

I had errors using the all in one option due to the size of the site. I can try again using filters to not include the larger files but I won't get to work on that today.

#2184949

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Landru,

Thank you.

You don't need to include any of the media files so its good enough to test this with just a stripped down version of the site with only text.

Thanks,
Shane

#2184987

Can you sent the private form again. I have a new file for you.

#2185015

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Private Fields

#2185017

e

#2185021

I'm not sure if you sent me the right form. I have the duplicator files.

#2185133

Shane,

If you still have the original duplicator file link I sent you, I replaced the files there. So hopefully, when you get back, you can access it.

Please confirm

Thanks

#2186939

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Landru,

I managed to setup the duplicator and the following statement works

<?php if( get_post_meta(get_the_ID(), 'wpcf-publications',true) ): ?>
<h2><span>Publications</span></h2>
<?php echo get_post_meta(get_the_ID(), 'wpcf-publications', true); ?>
<?php endif; ?>

Now I wasn't able to replicate your issue where you stated that if you create a new post the condition won't work or if you edit an old post it also fails.

In both scenarios the above statement works. Not the change that was made was to add "true" to the conditional.

This should now resolve the issue.

Thanks,
Shane

#2186959

Thanks Shane. That fixed it.