The tag has no wiki summary.

learn more… | top users | synonyms

4
votes
2answers
11k 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!
4
votes
3answers
3k 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). ...
3
votes
1answer
1k 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 ...
3
votes
2answers
204 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()) ...
2
votes
2answers
1k 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 ...
2
votes
2answers
2k 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 ...
2
votes
2answers
767 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 ...
1
vote
2answers
103 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 ...
1
vote
1answer
198 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
383 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, ...
1
vote
1answer
132 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 ...
1
vote
1answer
1k views

How to truncate titles in Recent Posts widget?

I read the thread here about this... http://wordpress.org/support/topic/truncate-titles-in-recent-posts-widget?replies=8 but the suggested solution didn't work, because I wasn't sure what to do with ...
1
vote
4answers
263 views

Create static front-page with 3-5 recent posts

I am struggling with front/landing page customization for my custom designed theme. I have designed custom theme and pretty much coded it using the Underscore boilerplate. As I understands, the ...
1
vote
1answer
739 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 ...
1
vote
1answer
817 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, ...
1
vote
1answer
169 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 ...
1
vote
2answers
841 views

Excluding a category from wp_query breaks recent post widget

Good Afternoon, In my theme I have two separate pages for blogs. The main blog page, "news.php", holds our standard news, thoughts, events type of posts. The second blog, "questions.php", holds ...
0
votes
4answers
1k 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
3answers
4k 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
3answers
14k views

How to display last 3 posts (recent posts) in a static page?

I would like to implement something like "recent posts" in a static page: http://themes.codehunk.me/insignio/ (at the footer) How I would be able to do this without a widget?
0
votes
1answer
35 views

Author list based on recently active

My list of authors is now based on post count and I would like it to be based on recently active user. My idea was trying changing the orderby to post_date but it has no effect. Any suggestions to how ...
0
votes
2answers
285 views

Empty excerpt using wp_get_recent_posts

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( ...
0
votes
1answer
238 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
111 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
3answers
708 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
2answers
959 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 ...
0
votes
2answers
391 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> ...
0
votes
1answer
1k 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
1answer
2k 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
1answer
651 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 ...
0
votes
1answer
888 views

Customizing wordpress default widgets?

Is there anyway to customize the default WordPress widgets or do i need to create my own? For example, I want my recent post widgets to display date aswell. Thanks in advance! /Richard
0
votes
2answers
59 views

Why aren't paragraphs breaking on this page?

This page is created using a recent posts shortcode included with my theme. It is not displaying paragraph breaks that I've added in the editor and I'd like it to. How can I get the shortcode to ...
0
votes
1answer
22 views

Show recent published posts

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 posts in the listed categories are ...
0
votes
1answer
48 views

Get x recent posts by author?

So I have ten authors on my site, and I want to designate a section where it shows the ten authors and their 5 latest posts in the form of the post title linking to the post. I tried using the ...
0
votes
1answer
202 views

Problem with Front-Page.php loading recent posts

Hi I this weird problem where i have my custom front-page.php with set page (in Reading Settings) static page. What I want to have is a static page with welcoming message and later 1 recent posts ...
0
votes
2answers
62 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
38 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
1answer
1k 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
511 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
66 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
1answer
105 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
343 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 ...
0
votes
1answer
521 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
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
235 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
580 views

Related Posts loop - offset

I've been working on this for many, many, many weeks already. I've already asked similar questions here and elsewhere, but nobody seems to be able to sovle this problem. Maybe it's not possible ...
0
votes
1answer
435 views

Show recent posts starting at a specific number archive

Is there an argument to define how many posts ago will be displayed in "recent" posts. Could I add something to this and define a specific number of posts ago to start the loop? $args = array( ...
0
votes
0answers
45 views

Code for recent posts widgets

I have been using this plugin for many years now BUT the only problem is that it does not show child categories, it only shows posts that are in parent categories, how can I fix this. MY CODE: /** ...
0
votes
1answer
54 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 ...