Getting category posts from a certain year

Is there a trick to get for wwx.example.com/year/category/ The main query is open to public query variables like year and cat so without pretty permalinks you could try www.example.com/?year=2022&cat=5 where 5 is the category id as an example and with pretty permalinks it would be redirected to www.example.com/2022/?cat=5

featured posts order

It sounds like you want to use the ‘sticky’ functionality as a replacement for a tag or a category. Why not just put all the posts you want in a ‘tab’ category, then call your query for that category. You can use orderby in fancy ways (such as by post_meta($tab = get_posts(‘category=tab&orderby=date’);

post to subcategory and parent in wp_insert_post

The problem is, you can’t make an array like that in PHP. Trying to cast a string that contains a comma separated list as an array just produces an array with a single value–your comma separated string. You want to use php’s explode function to create the array. It takes a string an splits it … Read more

Get the most repeated post contents from a search?

The problem with your approach is that post’s content pretty much ignored in WordPress query architecture. It is meant to be textual information, as opposed to technical meta information. You have several options: Try to modify raw SQL of query request through filters, such as posts_where. Assign school name to custom field and use custom … Read more

Specifying # of Posts per page using inline post plugin (:

According to the plugin’s description in order to embed a post, you need to enter the post ID in the square brackets. For example [42] will embed the post with ID 42. So I assume to include multiple posts you have to include multiple IDs using the same short code. Example [22][37][42] P.S – Didnt … Read more

Tags to Post-ID mysql query. Tag Search

These are normal IN mechanics – it matches anything in set, not all of set combined. Type of match you want is called tag_slug__and in WP query arguments. You can see code that generates SQL for it in source of WP_Query->&get_posts() method. Resulting SQL is like this: SELECT p.ID FROM wp_posts p INNER JOIN wp_term_relationships … Read more

How to make the post summary taller?

You can either manually enter content into the_excerpt section or use this code in your functions.php file in your theme function custom_excerpt_length( $length ) { return 200; } add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 ); Change the number 200 to the number of characters you want until it’s the number of lines you’re looking for.