Skip Navigation

[Resolved] How to delete posts from database

This thread is resolved. Here is a description of the problem and solution.

Problem:
Conditional Output Leaves Empty space if nothing is returned

Solution:
All custom post type posts stored in database table posts. You should find entries in "posts" database table and delete it.

You can find proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/conditional-output-leaves-empty-space-if-nothing-is-returned/#post-920311

Relevant Documentation:

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

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

Last updated by Minesh 6 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#919038

Hi.
I have a loop item with conditional tags that sometimes returns a custom field but sometimes doesn't.
When it doesn't it leaves a blank.
View the results here: hidden link

This is the code:
[wpv-conditional if="( $(wpcf-help-line) ne '' )"]Help Line: [wpv-post-taxonomy type="help-line"][/wpv-conditional]
[wpv-conditional if="( $(wpcf-office) ne '' )"]Office Number: [types field='office'][/types][/wpv-conditional]
[wpv-conditional if="( $(wpcf-program-link) ne '' )"][types field='program-link' title='Program Web Page' target='_blank'][/types][/wpv-conditional]
[types field='organization-website-url' title='Organization Website' target='_blank'][/types]
[wpv-conditional if="( $(wpcf-email) ne '' )"][types field='email' title='Email'][/types][/wpv-conditional]
[types field='street-address'][/types]

#919146

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Well - could you please share access details and tell me what are the cases that conditional output leaves the space and where?

*** 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.

#919855

Minesh
Supporter

Languages: English (English )

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

Could you please confirm that you have take full backup of your database, once you confirm it, I will try to delete it from database.

Additionally, could you please point me out exactly where you have issue with space with which field?

[wpv-conditional if="( $(wpcf-help-line) ne '' )"]Help Line: [wpv-post-taxonomy type="help-line"][/wpv-conditional]

As you are checking help-line here and displaying taxonomy and I do not see help-line taxonomy.

#919869

hey. yes i've backed it up.
This is the code:
[wpv-conditional if="( $(wpcf-help-line) ne '' )"]Help Line: [types field='help-line'][/types][/wpv-conditional]
[wpv-conditional if="( $(wpcf-office) ne '' )"]
Phone: [types field='office' target='_blank'][/types][/wpv-conditional]
[wpv-conditional if="( $(wpcf-program-link) ne '' )"][types field='program-link' title='Program Web Page' target='_blank'][/types][/wpv-conditional]
[types field='organization-website-url' title='Organization Website' target='_blank'][/types]
[wpv-conditional if="( $(wpcf-email) ne '' )"][types field='email' title='Email'][/types][/wpv-conditional]
[wpv-conditional if="( $(wpcf-street-address) ne '' )"][types field='street-address'][/types][/wpv-conditional]

You can find it here: hidden link

#920275

Minesh
Supporter

Languages: English (English )

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

Ok - I've deleted those unwanted entries which you pointed out from database.

Well - could you please share screenshot, I'm still wondering which space you are talking about. I'm checking this page:
=> hidden link

I see each box is with same size. do I misunderstood anything here? It would be great if you can share few sceenshots of your expected output and few screenshots pointing out the issue.

#920307

hi. can you tell me where the database entries are in what table?
So if this happens again I can delete anything that is 'stuck'.
-
Conditional Output:
it's fine. Maybe it's just me. but it looks fine all of a sudden.

#920311

Minesh
Supporter

Languages: English (English )

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

an you tell me where the database entries are in what table?
=> You will find entries in "posts" database table.

Conditional Output:
Glad to know its fixed - great 🙂

#920724

Minesh
Supporter

Languages: English (English )

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

Please feel free to close the ticket 🙂