[Resolved] Displaying posts where one of the fields is null
This support ticket is created 8 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.
I have just noticed that this view is not working properly now that I have moved it to my main site. Please allow me to send you login details privately.
Hello. Thank you for contacting the Toolset support.
Please share link of the page where I can reproduce your issue.
*** 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.
I've reopen this ticket as I can see that the issue is "posts_where" filter is not working that we've added to functions.php file where we apply the condition that we should only display posts where field called 'Job reference or reason' is empty.
Could you please try to resolve your issue by deactivating all third-party plugins as well as with the default theme to check for any possible conflicts with any of the plugins or themes?
I just noticed that the Open Leads view had a filter set for Post Author to be the same as the current logged in user which is incorrect. I have removed this.
Yes, that's changed by me. If will replace your original view ID and after that you will see that you will get different result as current view ID is not obtained at this point. Its strange that it was working with your previous site.
1) The code does seem to be working on the other site.
2) I have changed the theme to the original 'Starter' theme instead of 'Starter Child' and added the code to functions.php and it has the same problem. I don't get it. It's the same theme on both sites..
I was just going to try and copy the changes I've made in the Child theme over to the other test site to see if I could recreate the problem and isolate what is causing it. However, when I tried to reactivate the Starter Child theme I just get this error message:
Fatal error: Cannot redeclare posts_where() (previously declared in /home/gammamag/coastline/wp-content/themes/toolset-starter-child/functions.php:68) in /home/gammamag/coastline/wp-content/themes/toolset-starter/functions.php on line 252
Please enable the Private message so I can send you ftp details.
*** 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.
Unfortunately FTP access details are not working at this end. What I can suggest you should login to your FTP and open functions.php file and go to line number 252 and remove posts_where filter you have added and try to check if your site back to work.
Also, please don't forget to send me FTP access details again.
Whoops, sorry. My host provides FTP Access Control which is set by default to only allow access from South Africa. I have allowed access from India (I'm assuming that's where you are??).
I have tried adding all the same changes I've made to styles.css and functions.php to the top1 site and it still works. The only other difference I can see is the conditional on the coastline site, which I commented out and it still didn't work.
I haven't tried a clean install. I'm hoping it doesn't come to that as I'd hate to start again. But I guess if I have to I have to..