Skip Navigation

[Resolved] Displaying content not working

This support ticket is created 4 years, 2 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 8 replies, has 2 voices.

Last updated by Christian Cox 4 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#2089679
image1.jpg
image2.jpg
image3.jpg

So I created custom template, when I view what I've done, I can see it . However, when I create a page and try to display the content, it's empty. I have followed your courses and it's still not working. I've attached images, please help.

hidden link

#2089711

Hello, I can see in the Page content for TA Test Page you have inserted a shortcode to display a Content Template:

[wpv-post-body view_template="template-for-ta-post"]

It looks like the same Content Template is assigned to the Page in the right sidebar, a template called Template for TA Post. That could be part of the problem, because embedding a Content Template inside itself (or inside a post where the template is assigned) like this might produce an infinite loop. So the first thing I would try is removing the wpv-post-body shortcode from the Page contents, or unassigning the Template for TA Post from the Page itself, depending on where you want to style the Page.

Test the Page again after that, and if it does not solve the problem, I can take a closer look.

#2090929
image2.jpg
image4.jpg

Hello Mr. Cox,

I tried that and it's still not displaying any content. Kinda weird because I was watching the course and performed everything based on that info. I even removed all instances of a post title and still not working. How can I get this to work? What am I not doing correctly?

Thx,

#2091021

I'll be glad to take a closer look in wp-admin. It is not obvious to me what the problem could be based on these screenshots. Please provide login credentials in the private reply fields here so I can give you some feedback. I'll try adjusting the test page and content template to see if I can make the assignment work correctly.

#2097245

I thought I'd be able to figure this out, but I'm not having any luck. Weird, because the older version was a lot easier to use. Also, with all the website hacking going on, I'm a little skeptical with providing admin right to my clients website. You have access to all my code on the backend as well. Not to say that you'd do anything wrong, but I need to be safe. This seems straight forward, but it's not and it looks like your courses are out of date as well.

How can we get this right?

#2097961

I'm a little skeptical with providing admin right to my clients website. You have access to all my code on the backend as well. Not to say that you'd do anything wrong, but I need to be safe....How can we get this right?
If it helps, you can limit access to files by disabling theme and plugin edits in wp-admin with the following code in wp-config.php:

define( 'DISALLOW_FILE_EDIT', true );

That turns off the wp-admin editors for theme and plugin files. See more info about this here:
https://www.wpbeginner.com/wp-tutorials/how-to-disable-theme-and-plugin-editors-from-wordpress-admin-panel/

You can further limit access by not providing FTP information. I don't need access to files on the server at this point. You can create a temporary User account for me in wp-admin and delete it whenever you are ready to turn off my access.

You can create a complete site backup of files and database before sharing access, then create a temporary account for me. After diagnosis, you can revert to the backed up version, overwriting any hacks I theoretically put in place (which I won't).

Those steps would add some level of security for you. Feel free to review our Support Policy and information about privacy and security when sharing site access:
https://toolset.com/toolset-support-policy/
https://toolset.com/toolset-support-policy/privacy-security-providing-debug-information-support/

If you'd prefer not to provide any level of wp-admin access to your live site, you could set up a staging environment or test site and clone/migrate the existing site into the new environment. That would keep your live site private, and it would give me the ability to investigate the problem in a nearly identical setup. Otherwise diagnosis of the problem is going to be tedious and time intensive.

If you do not have a staging server or staging environment available, I could also work with a clone of the site you create using the Duplicator plugin, or the All-in-One WP migration plugin. You can delete any sensitive content, passwords, etc. in the clone, then share the clone files with me. I can install the clone on my local environment to see the problem locally without accessing the live site. I can create my own User account in the cloned site so you would not be required to share login credentials. You can post the clone files to Drive, Dropbox, or any secure location and provide a download link in your next reply. All URLs you share here in the forum are obscured from public view by default for your privacy and security.

I work with downloadable site clones and cloned staging environments frequently, and those are probably the two most effective ways to proceed without providing admin access. If you have another idea I'm open to suggestions.

#2100279
conditional.jpg
screen.jpg
screen1.jpg

Hey Chris,

I actually read your first reply and really thought about your infinite loop theory, which I did not setup. Everything is working at the moment, thx for that info. However, when I set a condition, it still displays all the content. I'd like this particular view to only display post with a specific taxonomy (Leadership). How can I fix this issue?

Thx again,
daL

#2100567
Screen Shot 2021-06-27 at 9.14.16 AM.png
Screen Shot 2021-06-27 at 9.13.03 AM.png

I'd like this particular view to only display post with a specific taxonomy (Leadership).
It sounds like you would like to filter a View by a specific taxonomy term. You can add a taxonomy term Query Filter in the View block's Content Selection panel. We have some information about adding a Query Filter in the block editor here: https://toolset.com/course-lesson/creating-a-view/#filter-the-list-of-posts

If you are using the legacy View editor experience instead of building the View in the block editor, you should see the Query Filter editor panel near the top of the screen. If you do not see the Query Filter panel, scroll to the top right corner of the page and click "Screen Options". You can toggle the Query Filter panel on or off here. Turn it on, then you can add a Query Filter as described in the Block Editor documentation linked above.
Let me know if you have questions about that.

#2100605

I actually read your first reply and really thought about your infinite loop theory, which I did not setup.
To explain a bit further, an infinite loop would have been created in this case if your Content Template "Template for TA Post" included the post contents with a shortcode like this:

[wpv-post-body view_template="None"]

That would have included the post contents in the template output. Since the post contents for the page TA Test Page also included a shortcode to display the same template Template for TA Post, that would have created the Infinite Loop I was talking about: a Content Template applied to a post that also contains the same Content Template in its contents. But it appears the Template for TA Post did not include the post content shortcode, so the infinite loop was avoided. Still, it's a good idea not to include the Template for TA Post template inside the TA Test Page contents, since the Template for TA Post is applied to this page already.