Im working on my first wordpress blog and trying to avoid plugins if at all possible for a lot of what doesn’t really need to have a plugin. I...
I’m trying to hide a post from the ‘Recent Posts’ widget in the sidebar. I know I can do this with the ‘Special Recent Posts’ plugin, but that plugin...
I want to list recent published posts of my wp blog and exclude certain posts of some categories. The following code works fine, 10 recent posts are listed and...
I want to add thumbnail to WordPress default recent posts widget, and I want to do it using any available filter. Is there any filter know to this subject/topic...
I have the following problem: I have created a custom post type matratze and currently besides the custom posts no other posts exist. Hence, nothing is being displayed under...
I have this simple shortcode to display the last posts with it’s title and except: add_shortcode('latest3', function(){ $recent_posts = wp_get_recent_posts( array( 'numberposts' => 3, 'orderby' => 'post_date', 'order' =>...
I use the bellow function (thanks to @helgatheviking!) to exclude categories from the wordpress loop. It works very well – posts of selected categories are excluded from the loop...
I added the following to my functions.php: add_action('pre_get_posts', 'keyl_get_emp_posts'); function keyl_get_emp_posts($query) { if ($query->is_main_query()) $query->set('post_type', 'employee'); } and so far it’s effectively filtering out the search results. The default...
I have author pages for each author and I want to see all of their comments (or all of their recent comments) if I click on their nickname. How...
I am working on a multisite blog network where I have to display recent post on my home page, 10 post per page navigation. I did implement it using...