I am trying to: Display content on a single page through a simple content template. This will be for building a listing of people to display faculty, staff and graduate students.
Link to a page where the issue can be seen: Dev server - not available off our network
I expected to see: My view is fine, but my content template is not showing anything.
Instead, I got: Nothing - no data from my custom fields. Only the wordpress post title is being displayed on the page.
Please see the attached images. Here are descriptions of each. Again, this is super-simple test that I'm working on!
1) Dashboard.png - shows the overall configuration
2) View.png - Presentation of the list of content items is fine. It is showing exactly what I tell it to show through my view.
3) Matt.png - This content view shows what is essentially an empty page
4) View-TEMPLATE.png - Shows the code that works in my view
5) Content-TEMPLATE.png - Shows the code that does NOT work in my content display. Please note that this template IS associated with the correct single page
6) Matt-Content.png - This shows the actual content being edited. I circled the custom fields and the content template that should be used to display.
Again, this should be a super simple test. But I can't get any content to display on the single page output. Hopefully there is something SIMPLE that I'm missing here!
There is something in our University developed theme that was causing the problem. I switched to the WP 2017 theme and the fields that were not being displayed previously are now being displayed.
See attached image.
Do you have any suggestions on what to look for that might break the presentation of content templates?
Hello. Thank you for contacting the Toolset support.
Well - as you acknowledge that the current theme you are using is the issue - there is no issue with default theme.
Content Templates modify the content when called from the WordPress’ built-in the_content function. Some themes do not use the_content function, but define their own function. In this case, Content Templates are not applied to selected posts on the front-end.
To solve this, you can enter the name of the function your theme uses on the Toolset->Settings page, under the Front-end Content tab. You can find the appropriate field in Theme support for Content Templates section.
Thanks for your reply and suggestions. I found that the "Enable theme support debugging" function did not display the call function name (or any informatiion) when my problematic template was activated. However, this debugging information IS displayed when the WP 2017 theme was activated. So again, Views is acting normal.
I was able to trace down the PHP code used to display the information in the entry-content DIV:
As you can see "the_content" is there, however it's part of the IF statement "get_the_content". I'm at the end of my knowledge of how wordpress actually works, so I'm not sure if this "if" statement could be tripping up the Content Template display.
Oh, here is one more thing I should ask. Since I have full access to the template source code, I should be able to find the function name to enter into the "Theme support for Content Templates" override, correct?
As I turned this on for the default 2017 WP theme I get this output from my page using the content template which really didn't help me reverse engineer what I should be looking for in my theme...
Content Template debug:
Calling functions are Types_Field_Type_Wysiwyg_View_Frontend::get_value, Types_Field_Type_View_Frontend_Abstract::get_decorated_value, Types_View_Decorator_Wysiwyg::get_value, WP_Hook::apply_filters
Well - could you please share problem URL and access details that will help me to debug this issue further and I can better guide you in right direction.
*** 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.