I am trying to:
Display my custom post type with custom taxonomies
Link to a page where the issue can be seen: hidden link
I expected to see:
The custom layout. See imgur link here: hidden link
Instead, I got:
No layout displayed. hidden link
Can you switch theme (to twentyseventeen, for example) and check again?
You are using the Newspaper theme and I'm not sure that it is compatible with Views and Layouts because it uses a non-standard way of rendering content in the theme template files.
Yes the layouts work on other themes; it just seems to be this one. I had to change to this theme after my old one was not working properly. Since I have a database of 4,000 movies I really don't want to go through and copy/paste shortcodes so everything displays (should Layouts not be compatible with this theme), so is there any way I could automate the process or automatically add the shortcodes to all existing custom post types?
The reason the templates don't work with the Newspaper theme is that the theme uses something other than the_content() in its PHP templates to output the post content.
I think a better solution would be to copy the single.php template to single-movie.php (so that it will be used for all movie single posts) and then edit that template file so that where it outputs the post content you modify this to use the_content().
If you know a little PHP you can compare the templates from twentyseventeen and modify single-movie.php so that it does something similar, specifically using the_content().
If you are not able to do that let me know and I will have a look tomorrow.
Hmm okay. If you could take a look at it that would be wonderful. I may contact the theme developers and see if they know anything about this issue. I really don't want to change themes again, but if Toolset just won't work with Newspaper I may have to.
So, the culprit here I think is that the Newspaper theme uses a custom function to output the content instead of the standard the_content() which is expected by Toolset.
Here's what I suggest you try. This is for displaying single movie posts, you would need to do something similar if you had other post type templates affected. (We could simply change this universally for all single posts, but I don't want to risk breaking things on, for example, your standard WordPress posts.)
1. make a duplicate of wp-content/themes/newspaper/single.php in the same location called single-movie.php (this will be used to display Movie posts, assuming the post type slug is 'movie').
2. edit this file and locate the following line (28 in my copy)
locate_template('loop-single.php', true);
Change loop-single.php to loop-single-toolset.php, and save.
3. In the same folder make a duplicate of the file loop-single.php and name it loop-single-toolset.php
4. Edit the file and locate the following line (51 in my copy):
<?php echo $td_mod_single->get_content();?>
Replace it with
<?php the_content(); ?>
Can you try that and let me know if it displays the Layout template now?
Nigel, you are a genius. That worked perfectly! Thank you so much! It's so much better than inputting shortcodes manually 😉 You are a lifesaver.
I hate to be a bother but I have one more issue. I'm not sure if it's a Toolset issue or a theme issue. On the archive pages for my custom taxonomies created through WordPress they don't display correctly; the sidebar isn't on the side and sometimes overlaps with the content. Example (scroll up and down to see the overlapping): hidden link
Would you know anything about this? It's also totally fine if you can't help; you've been a big help already.