Want to change the post every three days with in specific category

Everything is possible but you’ve got to provide the community here with an example of what you’ve attempted and what you’re working with. This sounds like what you’d want is some sort of randomization of which post get’s categorized triggered by a CRON. Randomization can be taxing though. You should see if you can come … Read more

How to Remove HTML Elements from Post Excerpt?

At first glance, this appears to be an XY Problem. If you simply want to increase the length of the excerpt auto-generated from the post content, you can use the excerpt_length hook in functions.php. function modify_excerpt_length( $length ) { return 300; } add_filter( ‘excerpt_length’, ‘modify_excerpt_length’, 99 ); Then simply call the excerpt in your template: … Read more

How do I display main query posts in random order using add_filter

Should be add_action not add_filter when using pre_get_posts add_action( ‘pre_get_posts’, ‘thefunction’); function thefunction($query) { if ( ! is_admin() && $query->is_main_query() ) { // Not a query for an admin page. // It’s the main query for a front end page of your site. // Let’s change the query using arguments. $query->set( ‘orderby’, ‘rand’ ); } … Read more