-
AuthorPosts
-
December 13, 2017 at 5:05 pm #888453
Hi there,
I need to create a custom archive page for a custom post type.
Since there is no other way, I created a normal page with the Enfold Builder, published it here for you to see https://koltsokosan.hu/akcios-ujsagok-template/And I thought I would just copy the generated HTML into the archive-MYTERMNAME.php file.
It worked, but the layout is off, because the archive page isn’t full width, and there is a gap underneath the breadcrumb bar:
https://koltsokosan.hu/akcios-ujsag/
What should I change in the HTML code of the page to get it to look like the one I created via the builder?
Thanks,
TomDecember 14, 2017 at 4:36 am #888736Hey Tom,
Check this article: https://kriesi.at/support/topic/procedure-for-adding-custom-post-type-and-enabling-it-for-use/
Best regards,
John TorvikDecember 14, 2017 at 10:35 am #888806Hi, this doesn’t really have anything do do with my question… I’m not asking for help on CPTs at all. Please read my question again.
Best,
TomDecember 14, 2017 at 10:07 pm #889120Hi,
Please try adding this code to the Quick CSS section under Enfold > General Styling or to your child theme’s style.css file:
.post-type-archive-akciosujsag .container.template-blog { margin: 0; padding: 0; max-width: 100%; } .post-type-archive-akciosujsag .container.template-blog > .content { padding: 0; }
Please make sure that > sign is not converted to – http://i.imgur.com/IDXRZQ3.png in Quick CSS field.
Best regards,
YigitDecember 15, 2017 at 12:48 am #889158Thanks Yigit, you’re awesome, that did it :-)
Best,
TomDecember 15, 2017 at 9:06 am #889224Hi Tom,
Great, glad we could help. Please let us know if you should need any further help on the topic or if we can close it.
Best regards,
RikardDecember 15, 2017 at 4:00 pm #889323Yes, thanks.
One more thing for anyone in the future, to turn off the sidebar just for the given archive page (as opposed to globally from Enfold settings), I used this://Remove sidebar from archive-akciosujsag.php in Enfold add_filter('avia_layout_filter', 'avia_change_post_layout', 10, 2); function avia_change_post_layout($layout, $post_id){ if(is_post_type_archive('akciosujsag')) { $layout['current'] = $layout["fullsize"]; $layout['current']['main'] = "fullsize"; } return $layout; }
December 15, 2017 at 4:05 pm #889325 -
AuthorPosts
- The topic ‘Full width no sidebar archive.php templat file’ is closed to new replies.