The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
4answers
71 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
112 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
132 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
44 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
35 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
62 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
35 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
29 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
48 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
358 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
286 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
1k 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
35 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
48 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
162 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
151 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
347 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
261 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
24 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
496 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
265 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
211 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
2answers
4k 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
65 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
79 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
547 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
898 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
385 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
98 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
210 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
555 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
232 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
962 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
145 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
172 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
325 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
497 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
100 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
44 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
479 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
146 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
168 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
211 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: ...
0
votes
2answers
251 views

Most recent post is missing from Author page

Here is the loop from my author.php page. It is showing recent posts, but not the MOST recent. Where is my mistake? <?php if (have_posts()): the_post(); ?> <h3> ...
3
votes
3answers
2k views

Display list of most used tags in the last 30 days

I am looking for a way to display the most used tags over the last 30 days. I am no coder, but I have come up with this mashup to display a list of the most used 28 tags (preference to fit my theme). ...
1
vote
2answers
99 views

Grabbing specific content

Right now I'm doing this (pseudo code) posts = content_type("special_stuff"); $i = 0; $n = 5; $while(have_posts) { if($i == $n) { // print the content } ++$i; } This is what I'm ...
2
votes
2answers
1k views

customizing recent posts

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 am slightly familiar with php ( I don't understand it but ...
0
votes
2answers
194 views

Lists Top Authors by Most Recent Posts

I'm trying to display a table format of the top authors listed by the most recent posts. It should display the author, its avatar, the date, and the title of the post (with a link). I have it ...
2
votes
2answers
598 views

How can I show recent posts from same taxonomy as the post currently being viewed?

I'm wondering how I can show recent posts from the same taxonomy as the post that's currently being viewed (working with custom post types and custom taxonomies). If it was simply a category of a ...