How to highlight or show new to the particular posts list

Ok, to display the latest posts you use default Recent Posts widget. You can see it here: Appearance -> Widgets This widget has no settings and is fine for getting started, you can install any plugin which will add a more sophisticated widget to your site, you just need to search for: Recent Posts Widget … Read more

Redirect old Posts URL to new URL

There are lots of solutions to redirect from the old post URL to the new post URL. You can install a plugin “Safe Redirect Manager” and set it from the admin panel. You can write some snippet in the functions.php file as: add_action(‘template_redirect’, ‘post_redirect_by_custom_filters’); function post_redirect_by_custom_filters() { global $post; // this array can contain category … Read more

WordPress rest API get Posts parent by post ID

As posts can’t have parents, there is no endpoint to get the parent ID of a post. However, pages can have parents, so the page endpoint should return a parent ID, among other things. So, by getting mysite.com/wp-json/wp/v2/pages, you should be able to get the parent attribute, which is “The ID for the parent of … Read more

Find most used words in post titles

Below MYSQL query return the 10 most common value (words) in a post_title(column) FROM wp_posts(table): SELECT post_title, COUNT(post_title) AS Appearances FROM wp_posts GROUP BY post_title ORDER BY Appearances DESC LIMIT 10

I want to add the 10 most recent posts under a parent category on the main menu

If I understand you correctly you want the latest posts to appear inside the menu as sub menu items, is that correct? Something like this: Category One top menu item | Post A sub menu item | Post B sub menu item I have found this solution published here: https://alex.blog/2011/09/20/code-snippet-add-a-link-to-latest-post-to-wordpress-nav-menu/, and changed it so it … Read more