You don’t need to rename the archive.php as archive-post.php. Cause it is default to post for archive.php. If you have any other post type then use archive-{post_type}.php for pointing this template to this post type.
Now come to get_template_part(). It is used for breaking the large code base of the template to single part so it can be managed easily as well as be reused. So it’s better to use it. Cause it makes development and code maintain easy.
Hope that helps.
Related Posts:
- The the_post_thumbnail without srcset?
- after_setup_theme always runs
- Using classes instead of global functions in functions.php
- WordPress API Menu/Submenu Order
- How to move page template files like page-{slug}.php to a sub-directory?
- Add custom classes to anchor in wp_nav_menu
- What WP folder can I use to write files to?
- Are the WordPress Core CSS styles really all nessesary?
- Why I can’t add a CSS style in this WordPress theme?
- Allow Shortcode in Theme Customizer
- Where to post/upload the new theme for WordPress theme repository
- Setting multiple default background images?
- How to make a theme with more than one CSS file?
- register_sidebar ignores ‘id’ and ‘class’
- Display a different theme for not logged-in users
- Best practice (forward compatibility) for theme options
- Add colors to existing color palette without replacing it
- Single Page WordPress Theme – Using page templates
- How do I get gallery thumbnail URL and change the default thumbnail size?
- Select menu on browser resize
- add_theme_support( ‘custom-header’ ) does not add option menu in dashboard
- Can I upload WordPress-react theme in Wp theme repository
- Returning Variables back into a template
- new theme permissions don’t allow me to edit
- Upgrading a custom theme through the Dashboard
- Which theme foundry has clean coded themes, where code is poetry [closed]
- What page should I use for a contact form?
- Retrieve data using wpdb to use for customizer controls
- How can a Theme Contain no Header File or Footer File?
- Get list of months with posts
- Cannot get full thumbnail size using the_post_thumbnail
- Version control for both Vagrant config and themes being developed [closed]
- Is there a way to activate different theme for specified users? [closed]
- how can I remove the sidebar from my wp homepage [closed]
- Some translations do not work in my template class
- Does any theme support child theme?
- WordPress not registering Theme Customization Section
- How do I save a wordpress theme’s files and install them on another site?
- How to remove a file included in parent theme with locate_template() via child theme?
- “add_theme_support” for custom footer color?
- qTranslate with my own theme and settings
- Stylesheet not linking
- How to control layout of posts on page?
- Override template file i subfolders
- Theme Development for WordPress Multisite Installation
- How to add infinite scroll?
- get_option in header.php not returning value from customizer
- Include Parent functions.php in Child Theme functions.php
- Internal error 500 accessing Theme > Customize
- create category on theme setup
- Theme Development: Starter Content after hook
- Change locale by detecting viewer’s browser language setting and let them choose prefered language after
- Why is it needed to enqueue parent stylesheet in child theme?
- Customizer: save setting/control content to post/page
- WordPress Unite Theme: Footer isn’t sticking [closed]
- WordPress get_template_part() function not working
- Is accessing theme and using customizer GPL distribution?
- Where am I doing wrong in my theme menu?
- How can my theme allow users to take advantage of advanced html tags in posts
- How to enqueue javascript for WP Customize options sidebar?
- WordPress 500 Internal server error when activating custom theme [closed]
- Call to undefined function add_menu_page() on theme activation
- Is it acceptable for a WordPress theme to not accept widgets?
- Should all references to a text domain be to my current theme?
- Theme Customizer not displaying saved values in wp_head (CSS)
- How can I hard code my sidebar?
- Thesis -style Navigation
- How can I wrap all blog posts image with
- Issue when posting updates/changes to wordress
- StoreFront WordPress theme: How can i create a new Home page with Custom design same as template [closed]
- A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom
- Create theme for mobile phones and tablets only?
- Never actually adding the action? Or do I have to call the action?
- How to hide custom sidebar on mobile
- Theme Checker Text Domain
- How to copy page/post from one theme to another?
- Not sure how to debug this npm install error. This is a wordpress theme that comes with a built-in gulp/webpack task automation [closed]
- Why front-page.php doesn’t show content of file instead shows loop
- How can I not disable my theme when I want to upload a new version of it?
- Are paginated comments required for publishing Themes?
- How can I fix my theme header for my CSS stylesheet?
- Is hand coding required at all?
- Avoiding do_shortcode() loops
- Creating a Sub Category Template
- Correct was to customise theme using get_theme_mod in scripts
- Custom theme vs theme customization?
- how can I re-utilize and class on a child theme
- How to figure out which wordpress theme a site was using?
- Incorrect search results in search.php – issue triggered by using `define(‘BodyID’, ‘search’); the_post();` in search.php
- Flexslider not working for my custom theme WordPress
- “No Data Received” error in Chrome every time i try to update the theme functions file
- Redirect to custom login page
- How to close open divs in post loop
- Display Today’s date outside the loop?
- Confused on loading page content
- Turning WordPress Into full-featured website?
- Why am I getting posts back when I shouldnt
- Full site editing templates folder vs block-templates
- Export WordPress theme with modifications for other site
- how to combine wordpress and front framework