I’ve created a custom post type called “News Items”
All I want to do (for now) is add a custom field where a URL can be input and displayed after the content of the post. I don’t want to change the post template, single.php, but I’m getting a message: Your theme’s template file single.php for displaying News items is missing custom fields.
When you use Toolset to create non-PHP templates for your single posts, the single.php template is still being used.
Examine such a PHP template and you will normally find that as well as the post title and various post meta, the post body is output using the WP function the_content().
*That* is what is replaced by a Content Template made with Toolset.
So, if you go to Toolset > Content Templates and make a new template for your post type, and then insert the post body (using the Fields and Views button) into the template and nothing else, then the post will look just the same as if it were rendered solely by single.php.
But you can now add additional fields—in your case, this URL field—to the template, before or after the post body, and you can use whatever markup you want.
Thanks very much. Making progress here. But what I want is for the featured image to NOT cover the entire row. Enclosing screenshots. I created a widgetized sidebar (shown).
Hello TimF454 - Nigel is on Vacation. This is Minesh here and I'll take care of this ticket and try to help you further. Hope this is OK.
Well - I need to first look at with your post type setup to know from where the Feature Image is coming from and once I review that I'll be able to guide you in right direction.
Could you please share problem URL 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.
Well - It looks like the Featured Image is controlled from the Header part of your theme and Toolset Content Template only control the Body (the_content()) part of the theme.
Please check from where the Featured Image is displayed from your theme - if its displayed from Header part of theme, Toolset cant able to control it.
Hello, we don't have a supporter available in the Pacific timezone but I'm on the east coast and we should be able to communicate more effectively that the other two supporters on this ticket. I read the comments so far and it looks like the main issue right now is you would like to have a featured image that does not span the entire width of the page on News Items posts. Since Toolset's Content Template feature does not give you the ability to modify elements outside of the main content area, that means you must take another approach here. The options are
1. Copy the single.php template file from the parent Alone theme and paste it into the child Alone theme. Rename the file single-news-items.php. Activate the child theme. Now this template file will be applied to all News Items posts, reflecting the same design as a blog post. Note that in this approach, Toolset's Content Templates can still only control the main content area, which does not include the sidebar.
2. Use custom CSS to hide the featured image at the top of the page, then add the featured image and overlay text inside the Content Template using shortcodes. Note that in this approach, your custom widgetized sidebar can still be used.
Let me know if you have questions about either approach, and then you can make a decision and I can help you move forward.
I re-read your message and it looks like Option 2 would be better. I've hidden the featured image with CSS. Trying to find shortcodes for featured image and overlay text.
Number of post views is not built-in to WordPress, so I'm not sure how your theme displays that value. It could be a custom field defined by your theme, or it could be added by another 3rd-party plugin.
OK, I've got the image set. But the sidebar isn't showing up.
I see the sidebar header "Recent Articles" but I don't see any posts appearing. Since the sidebar widget is part of the theme's files, there's not much I can offer here, you may need to ask their support team. It may not be designed to work on custom post types. Here's the theme file responsible for the widget: hidden link
One way to get around this is to replace the theme's widget in the Content Template with a View that shows similar results. You can filter the View and order the results by post date.
Did I make a mistake by adding a category "News" in addition to the custom post?
Hard to say, I'm not an expert with this theme and its nuances. Generally speaking, they have different slugs so you should be okay.