Tagged: archive pages, Custom Post Type, custom templates
-
AuthorPosts
-
September 21, 2016 at 7:03 pm #689966
Hi,
I added a CPT to enfold like I alway do. I was wondering why I can just duplicate the archive.php, drag it to my child-theme and change the name to archive-events.php and have an archive page for my new CPT. I get a 404 error when I try to go to my new archive page.
http://staging.apptium.com.php56-22.dfw3-1.websitetestlink.com/events
My CPT is called events. I have not tried this in enfold before but this normally works on custom builds that I have done.
Any advice?
Thanks
September 24, 2016 at 7:10 am #691093Hi acscreativenew!
Thank you for using Enfold.
Did you install any events plugin such as the Events Calendar or Events Manager? Or do you have any page or post called events? Please update the theme to the latest version, 3.8, and WordPress to 4.6.1.
Best regards,
IsmaelSeptember 26, 2016 at 3:48 pm #691740I will make sure and update the theme and wordpress and yes. I did have The Events Calendar Plugin loaded on the site at one time. Would that have anything to do with it?
September 26, 2016 at 4:29 pm #691774So WordPress and the enfold theme are both updated.
After updating the theme the site broke. I am using a custom header in my child theme and the php error is happening on line 12
$filterable_classes = avia_header_class( avia_header_class_string() );
Once I remove that line my site shows back up. I have not made a lot of changes to the custom header I am using I just needed to add some JS for a custom feature I am using.
Would it help if I gave you admin access into the site?
Thanks
-DanSeptember 30, 2016 at 8:23 am #693557Hi,
Thank you for the info. Please get a fresh copy of the header.php file from the parent theme and remove the old one. Is the custom post type working if you deactivate the events plugin?
Best regards,
IsmaelSeptember 30, 2016 at 3:29 pm #693827The Events plugin is deactivated. I installed and was going to use it but then after realizing that i needed extra features I disabled it and created the CPT events.
I need a custom header because i need to add a custom snippet of JS for part of my site to function.
I will give it a try tho.
Thanks
October 1, 2016 at 6:40 am #694153Hi,
Thanks for the feedback. What code are you looking to add? You could add it via a function instead of in the actual header maybe?
Regards,
RikardOctober 3, 2016 at 3:35 pm #694661Hi,
So I got the header issue worked out. I was able to add the JS to the footer and get all that sorted out.
Im still having issue with my CTP though.
I at one point did have the events calendar plugin running but that is not deactivated. I have since created a CPT called events. This is working for the most part but I am not able to create a custom archive page for this CPT. I have copied the archive.php over to my child theme and renamed it archive-events.php in hopes this would do the trick but it does not seem to work.
Any advice?
Thanks
-DanOctober 7, 2016 at 12:25 pm #696424Hi,
maybe this could help you: http://www.wpbeginner.com/wp-tutorials/how-to-create-an-archives-page-in-wordpress/
Unfortunately it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However if its really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
Andy -
AuthorPosts
- You must be logged in to reply to this topic.