Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #249276

    We want to change the way posts are listed on one particular page – (it’s made using the avia posts content element at the moment) removing images and author meta, but adding other elements. and maybe wrapping in divs to control the appearance.
    I have searched here but have seen reference to various files and it is now not clear to me what would be the starting point for the new template.
    I guess that I would need a new file based on either template-archive.php or archive.php that is called up when on that particular page, and in that page the posts called up would be from a modified template. If I created a page ” archive-articles.php ” then WP heirarchy says that this should be selected whenever my page is of that post type – Does that also apply to ‘blog posts’ chosen as a content element with the pagebuilder?

    If I copy the contents of index.php into my new one I can then change the instances of get_template_part( ‘includes/loop’, ‘index’ ); to get_template_part( ‘includes/loop’, ‘index-articles’ ); , and then I could edit a copy of loop-index.php. Does that work, or do I need to register the new page somewhere?
    Would I need the same for any archive pages called up by clicking on the meta-links for category, tags etc. or would the “archive-posttype.php take care of that also ?

    Am I heading in the right direction? Can these new files be in the child theme? If so, do I set up the same folder structure to place them in? Any pointers would be gratefully received
    Tim

    • This topic was modified 10 years, 7 months ago by KingConga.
    #250136

    Hi Tim!

    If you use the ALB on a page then it ignores the normal hierarchy and uses the ALB page template. So if you have a specific layout in mind it would be best to re-construct it using the loops and the archive.php files within a template file and ignore the ALB for that specific page.

    Regards,
    Devin

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.