Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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,
    Tom

    #888736
    #888806

    Hi, 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,
    Tom

    #889120

    Hi,

    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,
    Yigit

    #889158

    Thanks Yigit, you’re awesome, that did it :-)
    Best,
    Tom

    #889224

    Hi 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,
    Rikard

    #889323

    Yes, 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;
    }
    
    #889325

    Hi!

    Thanks for sharing your solution Tom!
    Let us know if you have any other questions or issues and enjoy your weekend :)

    Best regards,
    Yigit

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Full width no sidebar archive.php templat file’ is closed to new replies.