- This topic has 5 replies, 2 voices, and was last updated 4 years, 1 month ago by Tom.
January 24, 2017 at 1:03 pm #267726dasigna
hope, you had a good start for the year and everything is well.
some tiny stupid questions again after some field trips to ‘foreign’ themes on demand… now coming back to GP and trying to set up some things right for dealing with ctps.
so first question would be if the dependencies of gp-(php)templates are described somewhere to get a grip for the right track setting up custom enviroments for ctps with gp? found nothing so far and would really appreciate to get around this for upcoming project.
second question: page nav for ctps works well so far, only wondering wheres the possibility to add the ctp-date to the nav-link? tried several things already, but wont get it done 🙁 programming is sadly not the first skill of mine…
why this? setting up the ctps with toolset which works great, but the setup for templates and archives is quite a mess, so i am looking for another (and proper) way.
thanks in advance again.January 24, 2017 at 2:16 pm #267781TomLead DeveloperLead Developer
1. It’s easiest just to copy a standard file from the parent theme like page.php, and merge content-page.php into the template where
Then you can make whatever changes you need to the file while keeping the required structure of the template. There’s not much there except for the sidebars action hook and some general HTML markup.
2. Not too sure what you mean here – which date? Is it a custom field in your CPT?January 24, 2017 at 11:56 pm #268028dasigna
1. o.k. i see. have to fiddle that out in detail 🙂
2. just simply meant the publish date of the post. no custom field (but theres some also…).
so showing the date besides the ‘next’- and ‘prev’-links.
found where its called, but not able to expand this with publish date …January 25, 2017 at 12:56 am #268089TomLead DeveloperLead Developer
Ah, well you could copy the date functionality from the posted_on() function:
And then overwrite the function with the next and prev links to include the date: https://github.com/tomusborne/generatepress/blob/1.3.42/inc/template-tags.php#L57-L108January 25, 2017 at 8:18 am #268420dasigna
thanks for every effort – but i thought this might be easier. seems out of my range so far to get it properly done. searched within single.php or similar for that …
so by now appears too complicated to me.
apart from that, again running into the problem, that i cant limit the page-nav only to specific ctp-taxonomy.
having to sort things out again and maybe have another try another time. pity me.
thanks so far.January 25, 2017 at 9:53 am #268512TomLead DeveloperLead Developer
Not easy, but achievable – you’ll learn a lot 🙂
For the specific category thing, this filter might help: https://generatepress.com/forums/topic/how-to-removemodify-post-navigation-folder-at-bottom-of-page/#post-206703
- You must be logged in to reply to this topic.