Site logo

[Resolved] Helpful Advice to Fix Custom Posts Not Showing

Home Forums Support [Resolved] Helpful Advice to Fix Custom Posts Not Showing

Home Forums Support Helpful Advice to Fix Custom Posts Not Showing

Viewing 12 posts - 16 through 27 (of 27 total)
  • Author
    Posts
  • #1854913
    Elvin
    Staff
    Customer Support

    Okay I uploaded the two templates for “One Product Post”. Not sure how to share the link to my GIST, here goes…
    content-one_product.php

    The link isn’t working.

    You can share the GIST by sharing it’s URL. 😀

    #1854915
    Ken

    Got it. They sure don’t make it easy to understand what link to use and where it is.

    Luckily I copied the link when I set it up. Hopefully this will work;

    https://gist.github.com/iFillip/7aaa17a590e7e4bf32957de69cf00a2a

    #1854918
    Ken

    Yes! Solved the theme editor problem. I’m using Patch a security plugin, the disable editor was selected. I re-enabled it. Theme editor is back.
    Hopefully the custom post problem will be easy too. I hope. I understand this may take some time. No problem, I’m going to make a pot of tea.

    #1854919
    Ken

    Elvin,
    If for some reason you need to get access to my wordpress dashboard here’s the Temporary Login.

    #1854932
    Elvin
    Staff
    Customer Support

    Thanks.

    On your single-one_product.php.

    Can you change this line – generate_do_template_part( 'single','one_product' );

    To this line – get_template_part( 'content','one_product' ); ?

    Let us know how it goes.

    #1854934
    Ken

    Wow! Looks like you fixed part of the problem.
    All the ‘text’ typed it the fields shows up. However, the excerpt is at the bottom. Not sure if that is how it’s suppose to be.
    Links to screenshots;
    1) Yes, the content is there! But the excerpt is at the bottom.
    2) Here’s what it looks like on the backend in the post editor

    #1854937
    Elvin
    Staff
    Customer Support

    The order is something you change on the content-one_product.php template.

    Your op_content field is placed on the bottom-most part so it appears on the bottom.

    You’ll have to sort the echoed get_field() values to your preference – https://gist.github.com/iFillip/7aaa17a590e7e4bf32957de69cf00a2a#file-content-one_product-php-L71-L107

    #1854939
    Ken

    Hi Elvin,
    Sorry, looks like I may have made a wrong assumption. I found this:
    “Excerpt is an optional text associated to a Post. Most of the time, it is used as the Post summary.”

    So I believe I’m GOOD TO GO! \(*<>*)/
    Wow! You folks constantly amaze me.

    My final question: Should i go ahead and do the same for the rest of the Custom Post Types? That is, change to “get_template_part( ‘content’,’the_templates_name’);

    #1854942
    Ken

    Looks like my message crossed.
    I will check the ‘echoed get_field with my coach on where the ‘excerpt’ should be.
    But for now, I just need to confirm doing the same template changes to the other templates.
    Again thank you so much for this. She’ll be very happy. Maybe she’ll leave Kadence and come join GeneratePress…that’s what
    I did.

    #1854943
    Elvin
    Staff
    Customer Support

    My final question: Should i go ahead and do the same for the rest of the Custom Post Types? That is, change to “get_template_part( ‘content’,’the_templates_name’);

    Yeah that’s pretty much it. You’ll have to change that line on the respective single-your_CPT_template.php so it calls the appropriate content-your_CPT_template.php.

    #1854948
    Ken

    Great! Will do the changes.
    Elvin, thank you sooo much! I’m closing this ticket with a smile, hope you’re smiling too.

    #1856232
    Elvin
    Staff
    Customer Support

    No problem. Regardless of the difficulty of the ticket, we’re genuinely glad when it gets sorted. 😀

Viewing 12 posts - 16 through 27 (of 27 total)
  • You must be logged in to reply to this topic.