Community Forums › Forums › Archived Forums › General Discussion › Create Archive page for Custom Post Type
Tagged: archive, Custom Post Type
- This topic has 5 replies, 4 voices, and was last updated 9 years, 5 months ago by PFX.
-
AuthorPosts
-
November 6, 2014 at 12:16 pm #130701TGScreativeMember
I created a custom post type and added some custom fields with Types plugin. Now I want to create a custom archive template to feature the content. If have looked at various source but they either don't reflect Genesis () or are way too complicated (). I even get conflicting instructions (should I name the template with the prefix "archive-" or "page_"). Is there any source to help an experienced WordPress user but PHP newbie how to get started? I took the page-archive.php file, copied it and renamed it and edited
http://artbaseweb.artbase.com/exhibitions/function genesis_page_archive_content()
to reflect custom type. Now what?November 6, 2014 at 12:42 pm #130706surefirewebservMemberIf you're using Types, have you tried the Views plugin? You'd be able to build an archive page in no time at all without touching a single line of PHP.
If you copied the page template, you'll have to start editing the loop with the new custom fields. I'm not gonna lie, if you don't know PHP that well, it's going to be a bit complex.
You can take a look at Sridhar's site, he's got a bunch to look at:
http://sridharkatakam.com/custom-archive-page-template-genesis/
http://sridharkatakam.com/single-archive-templates-custom-post-type-genesis/Those should definitely put you on if you want to code the page out.
SureFireWebServices.com | Genesis Tuts and More
Genesis Theme Starter Kit | It’s FreeNovember 6, 2014 at 1:06 pm #130711TGScreativeMemberThanks
I was hoping to avoid needing to buy Views. I mean I should be able to do this myself at some point right if I am going to call myself a WordPress designer/developer? But you might be right that this is way over my head, because I don't just want to feature post content but also to organize it in by custom field date, i.e. if the custom field end date is past, it goes under heading "Past", etc. ThanksNovember 6, 2014 at 1:24 pm #130717surefirewebservMemberYeah, It may not be over your head, but it's not something you learn over night, know what I mean.
You can always copy and paste someones code, and tinker around with it, but you'll need the time and patience to go through each bit.
If you have it, I would suggest implementing Sridhar's code, then messing around and seeing what works, what breaks, etc... but if you don't have the time and just want to get it up and working. I would suggest Views. Simple HTML/CSS/ and a few shortcodes and you'd be set. But that's just me, you ultimately know what's best for you =)
SureFireWebServices.com | Genesis Tuts and More
Genesis Theme Starter Kit | It’s FreeNovember 6, 2014 at 10:30 pm #130755MealtogMemberI wonder if Query Wrangler will work with custom post types. I have tested it in the past, I know it works for Posts, just not Pages yet. At least based on the author of the plugin.
https://wordpress.org/plugins/query-wrangler/
Hope this works for you.
November 7, 2014 at 12:38 pm #130835PFXMemberI have been exploring similar page template ideas and I did read that it is now best practice to name them 'template' and not 'page' … eg. my-project-template.php instead of my-project-page.php
one thing I have found useful is exploring Genesis Extender - although I haven't used it fully yet but can help to better understand how things are coded and this tutorial demonstrates creating a custom template page and adding customised widget areas to manage content
another tut that might be helpful is by Carrie Dills
http://www.carriedils.com/custom-page-template-genesis/hope these are of some help
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.