One option would be to just replace category template with another file from the plugin using category_template filter:
function change_category_template( $template ) {
$category_template = plugin_dir_path( __FILE__ ) . 'new-category.php';
return $category_template;
}
add_filter( 'category_template', 'change_category_template', 999 );
So, in the new file you could have the structure you want.
The main problem is that you are replacing the entire template file and if you want something that would work with any theme it’s more difficult to achieve that.
Related Posts:
- Inject post (from specific category) between posts in Loop
- Looking to exclude blog posts from category Previous/Next buttons
- How to display related posts from parent category
- Use template for posts with a particular category grandparent
- how do I get a specific post from a post with a subcategory in WP
- How to show only subcategories in parent category not parent category?
- Get latest post from all categories except one
- Add new post in existing categories using wp_insert_post
- Do not duplicate posts with multiple categories in multiple loops
- Loading Posts & Category with Ajax
- Pagination at category doesnt work with same name of page
- How to show categories and date on posts
- Trying to show the category of a post in the post display
- Displaying 3 Category Posts differently
- Unable to get Post Category Name and URL
- Trying to see if page is category or single and displaying title with appropriate heading tag
- Display post of specific category on page
- How to update custom fields using the wp_insert_post() function?
- Disable External Pingacks on WordPress Posts and Only Allow ‘Self Pings’
- Categories Template Assistance
- Go to / Scroll to Password Field on WordPress Posts After Submit With Message(s)
- New Plugin Review
- Problems with function on function.php
- “before delete post” action fire when the post is updated?
- Custom category code not showing all posts
- Automatically add custom CSS to new posts using a category template
- Query all posts of a custom taxonomy term
- Displaying the last post on static homepage
- Can’t get wp_insert_post to work
- Why not yield/iterable in posts interface?
- What is an equivalent of single_cat_title for getting the slug of the category?
- 200 Rewrite blog post links
- Automatically create child pages and grandchild pages when saving a (parent) page
- Pass Category Name, Description and Photo into variables to pass to jQuery
- wp_trim_words() does not work with my code Am I doing any mistake in my code?
- Move category description below post list in blog
- Second transition_post_status hook fired instead of the first
- Applying A Category to Existing Posts Where Page Title Matches Regex
- How can I add extra word in permalink when someone click download button?
- Let Users Choose Post Categories
- Custom posts in different columns style
- 404 error when I acess the second page of post-type
- Which PHP page is the Default Posts Page
- Display most popular posts of category
- retrieve post data and insert it in seperate static html page without WordPress
- get taxonomy thumbnail and use it as a variable in code
- Counting Search results, and displaying the offset per page
- Copy taxonomy terms from one post to another programmatically
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- How to catch wordpress post ID when it’s published
- Find Site ID From WP_Post
- Only show size attributes in product box woocommerce when available
- Argument for if term-> have child?
- WordPress upload file size error even after raising php limits
- How can I get “Previous” and “Next” to show in the navigation besides the links?
- WP_Query() load selected post
- how to edit a specific post slug using a php code?
- How to pick “full/thumbnail” images in the loop?
- Why when I create a new post I found 2 record related to this post into the posts database table?
- Saving a post ID to use in a form elsewhere on website
- is user member of a group, show them categories [closed]
- Using multiple variables to assign categories to an array
- displaying the categories post
- Get category id when SEO URL is turned on
- Prevent post from being published and show error
- List sub categories and corresponding posts of a parent category
- Dropdown category field inside repeatable metabox
- Child-Theme Category View with modified permalinks (%category% removed)
- How to move a post from one category to another
- Time Stamp In A WordPress Post Title That Does Not Keep Refreshing
- Create category after theme setup and modify the default one
- Change upload URL by mime type
- How to pull date/time in french format for wordpress post?
- WordPress post insertion from PHP file
- How to display last whole post on the homepage
- WordPress Single Post Pagination Numbered and Navigational
- Let user select the number of posts shown per page jquery error
- Add wp posts to cutom masonry grid
- How to list categories by page id in wordpress
- WordPress using get_term to retreive slug not working as expected
- How to add style in functions.php depending on conditions?
- Showing the project type in HREF
- ‘posts_per_page’ in costum page type
- Front end post submissions do not get submitted in the category
- Dynamic form variables for post meta
- List of child pages fetch next results at link click
- Trying to exclude posts from a category on the home page
- Auto create description in post
- Different image and background color depending on page type
- Showing Subcategory’s Name and Link Instead of Parent Category’s
- Show a Category Specific Info Box
- get_category only returning details for ‘uncategorized’
- Hide empty categories from get_categories
- How to modify this function to exclude also the post belonging to a specific category?
- Remove /category/ from category (archive) page URLs (without using a plugin)
- How to list all the posts in a personalized page? WordPress
- Get Products within Current Product Category
- Set post to draft if matching word is found in the post
- Disable single posts, but keep archive
- Add multiple HTML attributes to an Elementor button