Articles of recent posts

Display recent posts on another site

I have created a recent post type plugin and it displays recent posts from another website, but the permalinks are not working properly. The permalink does not show the post’s URL, it shows the same website URL. Can anyone help me? Here is my own code: // db parameters $db_hostname = ‘localhost’; $db_username = ‘root’; […]

Posts modified in the last 48 hours

I am using the code below to generate posts created in the last 48 hours. function filter_where($where = ”) { $where .= ” AND post_date > ‘” . date(‘Y-m-d’, strtotime(‘-2 days’)) . “‘”; return $where; } add_filter(‘posts_where’, ‘filter_where’); But I also want to get the posts modified in the last 48 hours. Even if their […]

List recent posts with link to first category

I’m looking to get a list of the recent 4 posts and with it a link the the first (and only) category that the post is in. $args = array( ‘numberposts’ => ‘4’, ‘offset’ => ‘0’ ); $recent_posts = wp_get_recent_posts($args); foreach ($recent_posts as $recent) { echo ‘<li>’ ‘<a href=”‘ . get_permalink($recent[“ID”]) . ‘” class=”previous-post-thum”>’ get_the_post_thumbnail($recent[“ID”], […]

Add thumbnail to recent posts widget using filters

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

how to show post content with post name in sidebar?

I started working on a wordpress website, I need to show 20 words from every post with post name in Sidebar. I am new to wordpress, I am finding difficult to do it.

Modifying recent post widget to include icons for post titles

I have downloaded a plugin from the wordpress repository which allows adding font icons to the titles of posts, you can select a different icon for individual posts according to preference. Now, the plugin displays the icon just fine in the post archive template and single post template, but does not show the featured icon […]

Sort / display recent posts by publish date

I recently renovated some sites and made many small (usually typos) corrections to several posts. That of course changed the last update date, so that now, if I display recent posts in a widget, they are sorted in a totally useless way. The best sort order would be by publish date, but I don’t see […]

How to display Most Recently Read 10 Posts by a logged in user in wordpress

I’m wordpress newbie and working on a website where users can register and maintain their profile. One of the main function of the logged in users is displaying their most RECENTLY READ 20 or 10 posts on their profile. How can I do that without using a plugin? Thanks.

Display css ONLY on most recent post of specific category?

The below is just a scenario to provide context so you understand what im trying to accomplish, However please keep your answers related to the title if possible and a css solution/function. I have a podcast site that im working on. And i have “next” and “prev” buttons on the podcast post pages that take […]

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( ‘numberposts’ => ‘5’ ); $recent_posts = wp_get_recent_posts( $args ); So for example I have a page of archives […]