- This topic has 26 replies, 3 voices, and was last updated 4 years, 10 months ago by
Elvin.
-
AuthorPosts
-
July 13, 2021 at 9:54 pm #1854913
Elvin
StaffCustomer SupportOkay I uploaded the two templates for “One Product Post”. Not sure how to share the link to my GIST, here goes…
content-one_product.phpThe link isn’t working.
You can share the GIST by sharing it’s URL. 😀
July 13, 2021 at 9:56 pm #1854915Ken
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
July 13, 2021 at 10:00 pm #1854918Ken
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.July 13, 2021 at 10:02 pm #1854919Ken
Elvin,
If for some reason you need to get access to my wordpress dashboard here’s the Temporary Login.July 13, 2021 at 10:25 pm #1854932Elvin
StaffCustomer SupportThanks.
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.
July 13, 2021 at 10:36 pm #1854934Ken
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 editorJuly 13, 2021 at 10:43 pm #1854937Elvin
StaffCustomer SupportThe 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
July 13, 2021 at 10:45 pm #1854939Ken
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’);
July 13, 2021 at 10:49 pm #1854942Ken
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.July 13, 2021 at 10:51 pm #1854943Elvin
StaffCustomer SupportMy 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.
July 13, 2021 at 10:59 pm #1854948Ken
Great! Will do the changes.
Elvin, thank you sooo much! I’m closing this ticket with a smile, hope you’re smiling too.July 14, 2021 at 10:11 pm #1856232Elvin
StaffCustomer SupportNo problem. Regardless of the difficulty of the ticket, we’re genuinely glad when it gets sorted. 😀
-
AuthorPosts
- You must be logged in to reply to this topic.