• hi Kadence team,

    I created a standard custom blog post template [mytemplate.php] with custom fields [Am using the Custom Fields Suite]. The plan is using your standard post template but adding custom fields just below the blog post/content. Reading through your threads this is what I have done:

    1. Copied the content of content-fullpost.php into another file renamed it mytemplate,php and adding the custom fields.
    By the way, what is the difference content-fullpost,php and content-fullpostfull.php?
    2, Uploaded it into the theme template folder.

    Issue – the custom fields did not appear inside my custom template. Maybe i did not place the custom fields code in the right place.

    Thanks in advance.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter astartrader

    (@astartrader)

    hey there again,

    To further add, how do i select the templates to choose from posting a blog post (with the standard blog template) and the custom blog template with the custom fields which i created.

    From your documentation, what i have done is select the blog template from a page and save it. However, when i want to crate a post I cant select a template. There is no pull-down menu like the page section.

    Regards.

    Thread Starter astartrader

    (@astartrader)

    Hi there again.

    It seems I made a mistake in using the content-fullpost.php as the template structure (correct me if i am wrong). I am now using a copy of page-blog.php (blog template) as my custom template for my customised blog post. This custom template is where I will put in my custom fields.

    To recap what I am trying to do is to have two templates, one for the ordinary standard blog template and the custom template with custom fields which i can use for special events and/or special ad-hoc posts.

    My issue now is how to select my template if I want to use either the standard blog post or my custom blog post with custom fields. When i wanted to use my custom blog post, I would go to new page, select the template to be used (which my custom appeared in the template drop-down menu)). But when I do that the blog list options disappeared (the template is selected according to blog category right?).

    Please advise. Overall am i doing this right?

    Thanks & regards

    Hey,
    I need some clarifying.

    Are you wanting two seperate loops? so that all posts that you want to display using your template would be on one page and all posts using the standard template would be on other page?

    If this is true have you considered using a custom posts type? For example if your wanting events I would suggest using this plugin: https://www.ads-software.com/plugins/the-events-calendar/

    You are correct that you would need to use a page template but simply coping a template into a child theme will not make it so that template has meta controls. For example you would need to create the meta options for your custom template regardless of what template you copied from. Those meta options are called in based on the template name.

    Kadence Themes

    Thread Starter astartrader

    (@astartrader)

    Hi thanks for your reply.

    Yes i think thats about right. One loop for the standard post template and one for the custom template. The events thingy is just an example. For events i know a lot of great plugins that I can just “plug-it-in”. So its like a reusable template that i could put in custom fields etc for future use.

    I am not what you call a coder, not just yet anyway still learning the ropes as novice going to beginner stage type. So I am looking at custom post types as you correctly suggested, especially with minimal coding as much as possible especially without much coding of the existing files/templates (dont want later issue of losing changes due to theme upgrades).

    I am now looking at pods. Does virtue have any issues with pods? Is there any similar plug-ins that is easier/not much coding involved which do not have issues with virtue. Been using and testing virtue for quite a while and this is THE template that i am using for my projects.

    Thanks again for your assistance. Keep up the Great Work.

    Hey,
    I usually recommend a custom post type plugin based on what you are wanting to do with this “post” what your wanting to show. It’s hard for me to suggest something without knowing what your end goal really is.

    I’m not super familiar with pods. It’s possible there would need to be a little filter added so it’s not getting stuck with the theme wrapper but I would have to test with the plugin. I’ll add it to my list for the next couple days.

    Kadence Themes

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘custom template with custom fields’ is closed to new replies.