The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
31 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
29 views

Show all posts of all categories but excluding a category on custom blog page with pagination of my theme

<h3>Recent Posts</h3> <?php // Display blog posts on any page @ http://m0n.co/l $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $temp = $wp_query; $wp_query= ...
-1
votes
1answer
47 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.
0
votes
1answer
17 views

Have latest post and recent posts display differently

I have a situation where I want the latest post to display with a larger image and more text than the recent posts which would display thereafter. So the most recent post might show about 500 ...
0
votes
2answers
43 views

How to make slider show 4 recent news and news start from begining not from 4th

I am kinda new to wordpress and I wanted to know how to make my wordpress site to show recent 4 news in this slider and again all news below: class s_naujienos extends WP_Widget { function ...
0
votes
1answer
32 views

Showing recent post of category in page

Any ideas, how I should do this: Recent post (with comments) shown in page? I need fixed url example.com/question that shows the most recent post, style should be same as in normal one post? Can I ...
0
votes
4answers
297 views

How to exclude categories from recent posts, recent comments & category widgets?

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 on the main blog ...
0
votes
1answer
165 views

display recent posts with thumbnail within masonary

On a page-template, I need to display recent 10 posts. So I tried to use, wp_get_recent_posts, found here in the codex, which I think is an appropriate hook for the purpose.The rest of the code is ...
0
votes
1answer
395 views

How to get excerpt of the recent posts

Right now, i am using code below to show title and its link of recent posts from my custom post category, but for one of my category i want to show excerpt, how can i achieve that. CODE i am using to ...
0
votes
1answer
60 views

Show recent posts in single-post page

I'm trying to show recent custom posts in single-events.php I can make it work by using get_posts what I don't know how to do is exclude the post that is active so if I'm on 'Event 1' just now using ...
-1
votes
1answer
64 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 ...
0
votes
0answers
89 views

display recent posts title in a text box on home page

I've created two text boxes on my home page using z-edity short code and I want to display recent posts titles as a marquee text in the first link and some text also as marquee in the second box. ...
0
votes
0answers
38 views

Recent posts widget

I use the normal 'recent posts' widget on a website. But it is also including my custom post type, I don't want this. I only want to show the posts from the real posts post type. I think it has ...
0
votes
1answer
35 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
0answers
52 views

List all recent post by categories at the front page (WordPress MU)

I'm looking how can I put on the network homepage all recent post of my WPMU Network. I tried that script but there are not so much informations (I want the same presentation such as a normal post) : ...
0
votes
1answer
421 views

How to show 3 most recent/viewed posts in a special tiles on home page using wordpress?

I have these tile elements on the top of my homepage: <div class="tile1"> <div class="tile-textbox" style="color: #22284f;">Just Some Title</div> </div> ...
0
votes
1answer
418 views

What's the difference between “get_posts” and “wp_get_recent_posts” when used with “setup_postdata”?

This might be a completely "I'm still new to WP" type question, but I ran into some interesting output when using get_posts() and wp_get_recent_posts() in a custom function I wrote with ...
0
votes
3answers
2k views

How do I use wp_get_recent_posts?

I'm trying to display the title and excerpt of the most recent 8 posts on the sidebar. I'm getting a list where: All items link to the oldest post All titles are "id number of a post that should be ...
0
votes
0answers
16 views

Recent Post Widget With Thumbnail [duplicate]

I'm using the below code to display recent post with thumbnail (the_post_thumbnail) in my theme. Is that possible using the below code to create a recent post widget with thumbnail ...
0
votes
1answer
40 views

Recent post on single page from specyfic category

i have problem. I use this code before comment form. <?php global $post; $args = array( 'posts_per_page' => 5, 'offset'=> 1, 'category' => 1 ); $myposts = get_posts( $args ); foreach ...
0
votes
1answer
53 views

Where to add offset

I want to use the offset function to skip the first post and i have this code inside which i need to put an offside=1 , but wherever i insert it, I receive the error...any idea where i can add it ...
0
votes
2answers
197 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
1answer
169 views

How to get most recent commented post above new submitted post in Wordpress?

I have this function: $ids = $wpdb->get_col("SELECT DISTINCT comment_post_ID FROM $wpdb->comments ORDER BY comment_date DESC LIMIT 0 , 30"); foreach ($ids as $id) { $post = &get_post( ...
0
votes
1answer
511 views

How to hide a post from 'Recent Posts' widget?

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 really uses up a lot of resources. I've got the ...
0
votes
3answers
309 views

shortcode for recent custom type post

I'm not a coder so I may have done some "coding" crimes, apologies. I've bought a theme who has shortcodes for last posts but not for last "custom post type". So I tried to create last "custom post ...
0
votes
0answers
25 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 ...
2
votes
2answers
692 views

Display all comments or recent comments per user on author page

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 can I do this? I tried the beneath code, but that does ...
0
votes
1answer
310 views

Manual excerpt length on recent posts slider

I need to change the character/word limit of manual excerpts which will be displayed on recent posts slider. I think it's 55 characters right now without counting spaces and punctuation marks. Am i ...
0
votes
0answers
269 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 ...
2
votes
2answers
6k views

Code for Recent Posts Widget

I want to make changes to code of the Recent Posts widget – could anyone please tell me where that code is located? Thank you in advance!
0
votes
2answers
70 views

Adjust layout most recent post, taking pagination into account

I'm displaying two posts on my main page, and using post pagination to go through the older posts. My problem is I want to change the layout a bit of the most recent post. This sounds like a very ...
0
votes
1answer
89 views

List most recently added posts (with a twist)

At first I thought the task was trivial. I'd like to list the most recently added posts (say, 15 of them), but I am adding posts that are dated a few years back, yet I'd like them to show in the ...
0
votes
2answers
612 views

Recent Posts slider, using WP_Query(), loads duplicate sliders

I have written a small piece of code for Wordpress that will show the most recent top 4 posts in a slider (the Filament Group Responsive Carousel). It works, displaying the posts and sliding them etc, ...
0
votes
1answer
1k views

How to get date of post when using wp_get_recent_posts()?

I get the latest posts this way: $args = array( 'numberposts' => '2' ); $recent_posts = wp_get_recent_posts( $args ); Then I loop through them and get information about the post this way: ...
0
votes
3answers
456 views

Recent posts on homepage

I have made a page where you people can find al the teasers (teaser made with the read more tag) from my posts.( By clicking one of them you "open" the whole article, including photo's, ... . This is ...
0
votes
1answer
100 views

Homepage custom recent news

Is there anyway of telling wordpress, by some plugin or whatever, not to show Recent news from Category X, on my home page? Or I may do it only by modifying the home.php code?
0
votes
1answer
240 views

How to add a recent post function to a text widget I created for practice?

I am currently being trained to create widgets and my mentor has asked me to create a text widget then add the ability to display the 5 most recent posts (all categories) on it. I am a little stumped ...
3
votes
1answer
660 views

Querying post from a multisite network

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 wpdb object with one complex sql statement. I got ...
0
votes
1answer
288 views

Offset Loop by 1 , Limit next loop to 1 (Most Recent) Post

I have a loop that I would like to Offset by 1 so the most recent post is not displayed, and another loop where I only want 1 item which would be the most recent post. These are the loops I tried: ...
0
votes
2answers
1k views

Show latest posts on responsive theme

I've installed Responsive theme on my new blog. I want the home page to show my recent posts, so I configured Settings->Reading to show my 10 recent posts, instead of a static page. Alas, the ...
0
votes
1answer
155 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: ...
1
vote
1answer
178 views

Add inline HTML to posts published within last 24hrs

Basically I'm looking to add this line of code to posts published within the last 24hrs: <span class="new">New!</span> When the post is over 24hrs old, remove the inline HTML element. ...
1
vote
1answer
348 views

Display most recent post on homepage?

Is there any plugin that allows me to customize my blog homepage to show only most recent post? Problem is that on my home page, it displays too much posts, my blog is here, ...
0
votes
2answers
637 views

link to single most recent post, regardless of category

I have a landing page that, among other things, features an excerpt from the most recent post with a "Continue Reading" link that should take the reader to the most recent post. In my search, I've ...
1
vote
1answer
119 views

the_excerpt not showing posts

I'm using the following code to show the single most recent post on my landing page: <?php if (have_posts()) : ?> <?php if (($wp_query->post_count) > 1) : ?> <?php while ...
0
votes
1answer
46 views

showing all recent posts in theme

I am creating a wp theme & I stuck at one point. I have recent post listing on my home page of theme which have See All link which redirect user to the page which list all the recent posts except ...
0
votes
1answer
542 views

Latest posts by category — how to exclude current post?

This is the code I use to display the 4 most recent posts under the category the current post belongs to (right below the current post): <?php if (is_single()) : ?> <?php $count ...
1
vote
1answer
151 views

recent posts for different categories

I'm developing a theme that will have two recent posts section on the home page- one section for recent portfolio updates and the other for recent blog posts. I'm struggling with implementing these ...
3
votes
2answers
174 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()) ...
0
votes
1answer
225 views

post preview/thumbnails not displaying correctly- linking to “home” instead of post?

Live site In the lower portion of the landing page, I'd like there to be three blog post previews- just the headline and thumbnail for the three most recent posts. I'm using the following code: ...