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 Display Posts on category
- Hide wordpress field if data is empty in post!
- How can I use wp_query to show all product data using just the products ID?
- hover image appears below placeholder instead of overlayed
- combine Code 1 with Code 2
- Query all posts of a custom taxonomy term
- get current product name in functions.php
- Retrieving Author ID in wp-admin area
- get post based on category chosen in drop down – The ajax method
- How to use transient in this code for related post?
- Getting a specific post values to another div or modal
- Trying to add attribute to my posts’ featured image
- Creating a related post section based on similar categories
- Swapping wp_dropdown_categories function with wp_category_checklist
- Displaying the last post on static homepage
- Can’t get wp_insert_post to work
- Why not yield/iterable in posts interface?
- Best practice for migration friendly images in posts/pages?
- Proper syntax or method for keeping url in modified isotope / category links
- Display post category in foreach loop with category link
- How to show part of the_content?
- Filter Select results based on selection
- What is an equivalent of single_cat_title for getting the slug of the category?
- Unreadable pagination
- 200 Rewrite blog post links
- Issue adding sub category programmatically
- How to set a min number of words for a blog post
- Loop through categories and display posts title under each dropdown
- Get post id in a function when edit/add a post
- How to exclude category ID from Looper in WordPress
- Add a specific part of current category page url to shortcode
- Automatically create child pages and grandchild pages when saving a (parent) page
- WP grandchild categories in nested ul li
- Grab posts by multiple categories
- Pass Category Name, Description and Photo into variables to pass to jQuery
- How to show single category archive
- 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
- How to pick the default selected value in wordpress dropdown?
- Second transition_post_status hook fired instead of the first
- Applying A Category to Existing Posts Where Page Title Matches Regex
- Get page that displays all children of taxonomy parent
- How to store post ID’s in cookie or session to display the same posts later
- Which hook/action will help me solve my problem?
- How can I add extra word in permalink when someone click download button?
- selected option if current category is the value
- Post + form + action + results on the same page
- Open post-content in archive page in a Modal box with bootstrap
- get_template_part based upon post’s category
- how to save selected option in variable for rest api category filter
- Setting default category base on theme activation
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Hide subcategories (widget)
- Alert Bar section within WP loop is displaying even though there are no posts
- Let Users Choose Post Categories
- remove post that has no content
- Different post styles depending on category
- Display category name only once inside loop
- Loading index.php contents which located outside blog folder for post single page
- get post content of particular post by url
- Post repeating with infinite scroll
- Custom posts in different columns style
- Get children post mime type using parent post_ID wp_post
- 404 error when I acess the second page of post-type
- how to show only specific category for a template
- Redirect to another page using contact form 7? [closed]
- Display post category in foreach loop
- Dilemma of Populating all the categories in a drop down list
- 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
- Creating sub-categories via php
- Define specific category name in PHP
- WP Insert Post and then go to post
- Why am I getting a different filename? And how does WordPress load singular.php for both Page & Post? (Fresh WordPress installation)
- Returning data instead of echoing/printing
- Edit the_category (); for a hierarchical display
- JSON REST API WordPress only showing first 10 categories
- Category title output before opening title tag
- Display related posts without a plugin
- get taxonomy thumbnail and use it as a variable in code
- Counting Search results, and displaying the offset per page
- Include Parent Term in wp_list_categories