Thank you for your reply Luo Yang. That works very well!
Just a question out of interest regarding my original post.
Do you know why that, in a View when there are no results from the query and therefore nothing displayed inside <wpv-loop></wpv-loop>, this also seems to affect the Custom Fields inserted within the view but outside of <wpv-loop> tags. These Custom Fields will not show in this situation.
I think I have managed to figure part this one out myself. Although the Custom Fields were inserted outside of the <wpv-loop> tags, they were still within the [wpv-items-found], so when no results were found for the query, the Custom Fields were not being displayed either.
I can make this work now by duplicating the Custom Fields and inserting them within both the [wpv-items-found] and the [wpv-no-items-found] tags.
Can I do this any other way without having to duplicate them and only having the Custom Fields inserted once in the View? I tried the below and this doesn't seem to be working. It always outputs the [/wpv-no-items-found] tag, regardless of whether there are items found, as well as the required data.
Well - I need to know what custom field you added. The thing is that when there is no items found - the custom field you try to display for which post ID? so, when no results found, from which Post ID you want to display the custom field values?
Ok - as you are trying current page - it should display the current page value for a field 'test-single-line'.
If this is not working, I need to check first on your install and for that I need problem URL where you added the view and access 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.
Minesh, I think you are misunderstanding the problem I am having now.
Those Custom Fields output fine using the code provided in reply #1163066, the only issue is that I seem to have to duplicate the Custom Fields code within both the [wpv-items-found] and the [wpv-no-items-found] tags for it to show in both instances. When I try to use the above code, (from reply #1163066) where I have "overlapped" the [wpv-items-found] and the [wpv-no-items-found] tags, I also get the physical output of "[/wpv-no-items-found"] in addition to what I want to show.
I can make it work by duplicating the Custom Fields I require to be shown both within the [wpv-items-found] and the [wpv-no-items-found] tags. I was just wondering if there was an easier way where I do not have to duplicate the code? This would mean I only have to update one area rather than two.
I hope that makes more sense now? Anything else you need, please let me know.
Well - I really need access to see whats happening because if I can see things live I can understand better rather than having reading hundreds of words. That will guide me to guide you in the right direction as well. Few screenshots?
or
What if you try to add the said shortcodes just after the [wpv-layout-start] shortcode?
Let me try simplify and explain again. If you need more of an explanation or need to see it live after this then I can grant you access to a staging version if you would prefer that.
This is working fine for what I am trying to achieve.
But, If you notice that the Custom Field has to be inserted once within the [wpv-items-found] and once within the [wpv-no-items-found] tags to ensure that they display regardless of whether the query returns any results.
I am trying to find out if there is any way I can achieve the same results without having to duplicate the line of:
I have tried overlapping the [wpv-items-found] and [wpv-no-items-found] tags, but this always causes one of the shortcut tags to output and doesn't work as required.