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:
- How to add custom css file in theme?
- get_template_part vs action hooks in themes
- Do I actually need to link my theme’s style.css in the theme files
- CSS classes for theme
- How to remove search bar from a wordpress theme? [closed]
- Get url of thumbnail from the media uploader
- Should I use set_transient or update_option?
- Template for individual post designs
- Best practice way to implement custom sections into a WordPress theme
- Pushing updates to your premium theme
- Where can I find a good reviewed collection of Twenty Ten child themes?
- Front End Post Submit Form
- How do I remove RSS feeds from themes?
- CSS in child theme not overriding the parent theme [closed]
- First post of each category
- Advantages of using instead of wp_enqueue_style()?
- Style.css redirects to 404 Page not found
- Displaying wp menus by name without using theme locations
- How to add dynamic inline style?
- Optimal solution to develop a wordpress theme?
- How to add suggest plugin to theme?
- Prevent update check for specific theme
- Do I really need the div class entry?
- How Can I Create a List of Values to Be Iterated Through via WordPress Customization API?
- Am I supposed to create a child theme for every theme I use?
- If I build a custom theme, will it update?
- using wordpress without javascript
- Recommended tools for Theme Development with SASS [closed]
- What tags should be used for themes to show the type of layout?
- Theme Check: Could not find post_class
- What are non-printable characters doing in my theme?
- Why wp_head() function not loading style.css?
- Override theme programmatically
- Set multiple templates per post
- WP 3.1 upgrade breaks AutoFocus+ theme
- How can I display/hide certain content based on a Theme Option field?
- create-guten-block in wordpress theme?
- How can I make that when I clic on one of the menu items, that page shows only posts with the same category?
- Lightweight framework [closed]
- Theme Splash Image within the “Appearance -> Themes” control panel [duplicate]
- Theme Loading Into Dashboard
- How to make theme elements customizable in wordpress?
- How to add “Template” option in page attributes panel?
- How to edit my theme for full width?
- Which html elements should be styled in wordpress theme
- Folder name for a pro version of a WordPress.org theme?
- Echo all category names, apart from one
- Admin: sub menu doesnt display under apperance when activate my themes
- Does code in function.php differ from theme to theme
- How to Have a Pure HTML Sub Directory In WP Site
- Theme not showing up
- Theming Using Bootstrap Glyphicons and WordPress Dashicons
- Change image size depending on page
- What are the critical theme files when building a custom theme?
- Having issue with WordPress wp_enqueue_style
- Starting point for custom Themes [closed]
- Theme Development -> Specific Homepage
- Why still output /wp-content/themes/twentynineteen?
- get_header action not working
- Unable to change the priority with ‘remove_action’ and ‘add_action’ in child theme
- Remove h1 from 2015 theme
- WordPress pulling in random page themes
- Some doubts about WordPress handle the horizontal main menu visualization
- Can’t change theme name
- How to remove permalinks links presents in each page of my site?
- Is there a way to serve different resolution images to different devices?
- How to make a function occurs for one time?
- How do I restructure the comment HTML layout?
- Trying to link to a php template file but its blank
- Custom Enfold theme tab layout not compatible with WPML
- Theme: dropdown hover menu not showing up in IE/Edge
- Problem with pagination link (error 404)
- how to ensure responsiveness in wp themes? [closed]
- How to test another theme in a live WordPress website instead of live preview?
- home is not working in wordpreess
- Is there a way to create sections under “Colors” panel in the Theme Customizer?
- Local theme changes upload on server but theme changes not showing
- WordPress Custom font not found
- WordPress uploads do not show up and I see the white screen of death in some cases
- Can’t upload images on new theme
- New created Theme leads to malfunctioning Xampp Apache –> functions.php is cause
- WordPress Blog Page displaying nothing
- Primary Menu Showing All Pages With No Sub-Nav
- Magnific Popup – Add Caption to Images
- Why do WordPress developers use so many opening and closing PHP tags when developing themes? [duplicate]
- Safe way to echo wp_trim_words
- How can I demonstrate themes well?
- Why the slideshow is not shown in my theme?
- How to update my own theme?
- WordPress custom jquery not found
- Displaying Tags for the Page I’m On?
- Custom link color or stylesheets
- How to make navigation a list without a plugin? [duplicate]
- Showcase your wordpress themes [closed]
- What is The Best Way to Make Parallax header effect for wordpress theme ?? pure CSS or using JavaScript? [closed]
- How to remove proudly created by WordPress in theme?
- Roll my own theme or customize an existing one [closed]
- Why do some sites show themes/”themename” as the only theme?
- How do I add new layout width options in WordPress editor?
- What is the point of using the front-page.php template? [closed]