Questions tagged [recent-posts]

The tag has no usage guidance.

28 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
2answers
537 views

How to target the default Recent Posts and Recent Comments widgets with pre_get_posts?

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('...
1
vote
1answer
149 views

Single-post preview repeats thumbnails in Jupiter Recent Posts widget

I'm using the Jupiter theme version 5.1.8 with WordPress version 4.6. When I preview a single post, the thumbnails displayed by the Jupiter theme's Recent Posts widget are all repeats of the current ...
0
votes
1answer
10 views

widget_posts_args not using the number of posts in widget

So I'm using the widget_posts_args filter to pull in my custom post type posts inside the core 'Recent Posts' widget. Here is the code: add_filter('widget_posts_args', function() { $params['...
0
votes
0answers
43 views

Linking to the most recent post in my podcast category

I am attempting to pulloff what the author did here: How can I link to the most recent post in a category? However, after updating my functions.php file in my child theme I can not get it to load the ...
0
votes
1answer
20 views

WordPress recent post

I have the static website template on the following domain : example.com and I have wordpress site in the sub domain : sub.example.com I want a code to get the latest post ( just post title ) from ...
0
votes
1answer
24 views

How to output only blockquotes content from recent posts in a widget?

I created a simple widget that displays recent post titles. How can I only display the content that is between < blockquote >< /blockquote > from recent posts? For example, all my posts have a ...
0
votes
0answers
27 views

Separate categories from my submenu and their latest posts

I have a menu with <? php wp_nav_menu() ?> in which I integrated a Walker menu to be able to display the latest posts for each category of my submenu! It works, but I would like to have the ...
0
votes
0answers
12 views

Add icon based on recent post to Blog submenu in wp_nav_menu

I am thinking of adding an icon to my Blog menu title in Wordpress. Like a red circle indicating there are new recent posts. The wp_nav_menu $link_after and $after attributes apply to all menu items ...
0
votes
0answers
18 views

Display authors on most recent posts widget

I would like a widget which shows the author (or the authors, with coauthors_plus) below the most recent posts (along with their dates). Is it possible? I have been looking for it here and on Google ...
0
votes
0answers
19 views

Posts Per Page with a button to add more Posts

I have $recent_posts array with a 'posts_per_page' that look like thah: <?php $num_per_page = 3; $recent_posts = wp_get_recent_posts(array( 'posts_per_page' => $num_per_page, '...
0
votes
2answers
117 views

menu item to display the most recent post

I spent most of the day reviewing past questions and answers and have not found anything that addresses what I am trying to do. Maybe I didn't word my search correctly. Lets say I have a category of ...
0
votes
1answer
151 views

Display recent post by tag

I have 6 related posts by tag in every post. But some tags have only 2 or 3 posts. So in these posts, related posts section shows only 2 or 3 post. I want to complete related posts (if not 6) with ...
0
votes
2answers
264 views

date_query problem

I'd like to get the closest post to today's post; yes, I checked and search this topic and found the code working for me: date_default_timezone_set("Europe/Warsaw"); setlocale(LC_ALL, en_GB); $year = ...
0
votes
0answers
733 views

Best way to add image to recent posts widget?

I want to add an image/thumbnail to the Wordpress recent posts widget. This is the only related question that I've seen and it uses filters and seems to be a bit round-about. I don't want to install ...
0
votes
1answer
227 views

Recent post in the middle of the content

My site has a static front page and a blog. I'm using the Foundation5 grid and I've split the content of the homepage onto three rows, like this, and I'm updating both the content and the html in the ...
0
votes
1answer
88 views

Small intro before latest blog posts

What I'm trying to achieve is quite simple (in my mind). On the homepage, my blog presents the list of latest posts and I'm ok with it. I just want to add an introduction (three lines of text) before ...
0
votes
0answers
577 views

Recent posts show thumbnail

I'm learning wordpress theme development and using Underscores as my starter theme. How can I show either a small thumbnail of a image or featured image, from each post In my recent posts custom ...
0
votes
0answers
243 views

Unable to show recent custom post types in default recent posts widget

I have a custom post type "books" and there are already 'books' added. However, I am unable to modify WP_Query to change Recent Posts widget. I know that there is filter to modify WP_Query args: ...
0
votes
1answer
56 views

Duplicate content with the same URL, google authorship

I have recently added google authorship to my wordpress blog. When I search for specific posts on my blog, they come up with the post with my google+ picture and byline. On the other hand, when I ...
0
votes
2answers
421 views

How to display posts on template

I've added a page template that is my new home page and I would like to be able simply list the last 5 blog entries. My home page currently looks like... <?php /** * This file controls the ...
0
votes
0answers
33 views

Building Menus with the latest posts included

Im looking to build a menu system much like that off the huffington post or washington post, with links on one side and the latest articles or other dynamic content on another. Before i go crazy and ...
0
votes
0answers
845 views

Query recent posts by author

I'm fairly new to wordpress but trying to get recent posts by a specific author. The following code displays only most recent bog posts. I am using a custom field to get the author ID. EDIT by ...
0
votes
1answer
383 views

Author Link in Recent Posts Widget

I want to add author link into the recent post widget. For example if any user post on my web from his LinkedIn ID (which I have allowed) so in Recent Posts where it shows, <time> By: <author&...
-1
votes
1answer
10 views

Recent posts with different class name for each post and a scrollbar?

So far i found a widget ("Ultimate Posts Widget") with different class name for each post but it has no scroll bar.. any other widget suggestions ?
-1
votes
1answer
869 views

How to filter content by language with WPGlobus

I am new in PHP and I cannot find the way or the programming logic to do this filter. I have the following code but I do not know how to filter it, Can anyone help me with the code? <?php ...
-1
votes
1answer
29 views

Help with “Recent Posts” Loop that is specific to a topic

I am getting more comfortable with WP but know zero PHP. I have a site up and running at www.wordpress-temporary.com that I am working on for a client. It's the twenty-twelve theme with some ...
-1
votes
1answer
108 views

Get Each user recent post in wordpress

I have a Multi Author Blog, I want to show Recent post of each user / author. Image has been attached for more convenient, see the Red selected area where author's recent post is showing.
-1
votes
1answer
552 views

Custom text box containing post titles

I added two text boxes to my home page on a wordpress site and I need to display recent posts titles only. What line of code should i add to do that ? Here is the code I used to create the ...