Articles of posts

Using the “Latest posts” feature on a different site

I want to display the “latest x posts“, like you see per default on the index-page, but on a completely different site. E.g. /blog/ Installing WP into the directory /blog/ is not an option, as the other pages will be managed with WP. Currently I’m using the NuRelm Get Posts plugin to get the content […]

How to generate numbers indistinguishable for the IDs of the posts

For a few days I’ve been after a filter or a function that creates more random ID’s for posts like: 1920363522091 or Hpw_027991m-q Instead of the wordpress pattern that is: 1, 2, 3, 4 … It can be in sequence too, but starting with a very high number that with time becomes indistinguishable. I researched […]

Pagination on single post page?

I’ve found many pagination tutorials/plugins that work on pages displaying a list of posts such as index.php E.g. – http://design.sparklette.net/teaches/how-to-add-wordpress-pagination-without-a-plugin However I want this to display on single post pages (single.php) so you can navigate through to the next/prev post. Any ideas?

How to pull blogposts using shortcodes

I want to grab the two latest blog posts on my homepage. i would also like the option to select the category if I want to also, but mainly just pulling the latest 2 blog posts. Thanks

Adding footers to posts?

I’m trying to add footers to the end of my posts. I need to be able to assign different footers to different posts (not globally). I tried using WP Post Footer, but it’s not working on WP 3.1.2.

WordPress – Hide posts in admin from user who did not write them

Working on a site and the user only uses two roles. Admin and Author. He has hundreds of authors writing on his blog and wants the ability to hide all Posts under the Posts section of the admin panel that the current logged in author did not write. Basically when an author logs in he […]

WordPress Orderby Numeric Value Not Working

I am trying to get all products from the wpsc-product post type and then display them by a custom meta field called release_date_year. However, it doesn’t appear to be ordering my posts by this custom meta value. I have read through countless blog posts, support posts on the WordPress forums and a lot of questions […]

Add Post Tags to Body Class

Want to add post tag name to body class – I am successful in using the code below to add category to body class – //adds new body class for post category add_filter(‘body_class’, ‘add_category_class_single’); function add_category_class_single($classes){ global $post; $category = get_the_category($post->ID); $slug = $category[0]->slug; $classes[] = ‘post-category-‘ . $slug; return $classes; } however when i […]

Injecting JavaScript into a Post with WP3.x

I have a client who is trying to inject some JS directly into a post using the web interface. The script is stripped out on the live site. I am unable to replicate this behavior on a local installation. The JS is added as expected. The main difference between my installation and the client’s is […]

Server-side sorting of posts

I have seen on some websites that you can sort posts server-side by passing in some queries like so: domain.com/?sort=date or domain.com/?sort=name How would I do this with WordPress posts on a page?