WordPress Plugin: Custom Post Types Relationships
October 9th, 2010 - Backend, Wordpress - 2 Comments
A while ago we released CPR (Custom Post Relationships), a plugin that lets you create manual relationships among your posts. Problem was that custom post types were not supported. Custom Post Types Relationships (CPTR) is now available and solves this exact problem. Assign everything with everything. Posts, pages, post types, you name it. For detailed documentation please refer to the original post at cssigniter.com
WordPress plugin: Custom CSS stylesheet for posts or pages
June 11th, 2010 - Backend, Wordpress - 18 Comments

Having posts or pages designed a bit different from the rest of the blog/site isn’t something new. Some people i admire follow this technique in a really unique way. A friend of mine is doing it as well in a really interesting way but his site is under construction so i’ll update this bit as soon as he gets online. Note: All of them are using Expression Engine.
So what is it then?
Earlier today i needed this for a client project. Some pages need and some others will need in the future a different style than other pages. So i made this. It’s a tiny plugin that displays a list of custom CSS files stored in a sub directory of your theme and lets you choose which one you want to include in a specific post/page. In other words, no more dealing with code for this. Upload your custom CSS files, select the one that you need in a post or page and you’re done.
How it works?
First, download the Custom CSS plugin, extract and upload it. Activate it and you are good to go. Now all you have to do is create a folder called “custom-css” as a sub folder in your theme’s main directory. Like that:

In there you can now upload all the custom style-sheets that you might need for a page or post in your blog/site. Add or edit a post or a page and you will see a small list of the available style-sheets in the “custom-css” folder. Select it, update your post and that’s it.
Notes
1. The folder name must be “custom-css”. If you don’t like that, just edit the plugin file and change the first line:
define('CCSS_PATH','/custom-css/');
Make sure to add the slashes before and after the folder name.
2. This plug-in relies on wp_head() in order to include the style-sheet in your post / page. Having said that, you should have your main style-sheet ABOVE your wp_head() declaration. Otherwise how useful a set of styles that don’t override your default stylesheet would be? Not at all i guess. I am sure all of you have the wp_head() as the last thing in your header.php but i thought it would be a good idea to mention this before any hair pulling sessions.
Changelog
June 11th, 2010: Initial release v1.0
WordPress Plugin: Custom post relationships (CPR) v1.01
June 10th, 2010 - Backend, Wordpress - 48 Comments
Update: Plugin is now hosted in the official Plugin directory: http://wordpress.org/extend/plugins/custom-post-relationships/

Hello everyone. It’s been a while since the last post but i think it’s worth it. It’s a wordpress plugin and it’s all about custom post relationships. All these years i was looking for a plug-in that would let me relate posts manually. None existed. All of the good ones rely on some short of algorithm and they pull a list of related post based on that.
In various projects all i need is a simple list of posts that i can relate to each other. And that’s what i did.
How it works
So first, download the plugin, extract and upload it to your plug-ins folder. Activate it and you are all set. If you create or edit a new post you will set a screen similar to the one above. You can choose how many posts you want to see, in what order, from what category to pull posts from and of course you can filter the results by typing a few letters from any part of the post title. Then all you have to do is add the posts to the Related Posted pane by clicking “Add”. In the related posts pane you have the ability to reorder the posts just by dragging and dropping.
And that’s it actually. Your post is now in a relationship with a series of posts that YOU chose. Can you imagine the possibilities?
How to display these posts
I have put a lot of thought on that. First i was thinking to create a shortcode that you could use in your posts but that approach was limited. So i decided to go with the “hand-coded” version which also provides a flexible way of displaying related posts. It’s very easy actually. If you have put your hands on wordpress templates file, you’ll pick this up in a minute. Here it goes.
Open your single.php file and locate the place that your want to display your related posts. Enter this piece of code:
<div id="related">
<h2>Related Entries</h2>
<?php
$relations = cpr_populate(get_the_ID());
if (!empty($relations)) {
echo "<ul>";
foreach ($relations as $related) {
echo "<li><a href='".get_permalink($related->ID)."'>".$related->post_title."</a></li>";
}
echo "</ul>";
}
else {
echo "<p>No related entries</p>";
}
?></div>
Presto! This small piece of code will create a new section (div id=”related”) with a section title (Related entries) and will display an unordered list with the related posts. If there aren’t any relationships set for a post a “No related entries” message will be shown. Have in mind that in the loop (foreach) you have access to every element of a post. For example if you want to display the thumbnail for a post (2.9.0) you could add the following to the code above:
get_the_post_thumbnail($related->ID, 'thumbnail')
This should go next to the post_title for example and display the post’s main thumbnail. Actually you can display anything. Even custom fields.
Current Version
Current version of Custom post relationships (CPR) works in WordPress 2.9.0+ including WordPress 3.0 RC1. For the time being it works only for posts. So no pages for now.
Future versions
I have already created a fork of this and i am working on a version just for WordPress 3.0 that includes custom content types and pages relationships. Expect though an options page for that as things are getting a bit more complicated for WordPress 3.0.
I hope you find this plug-in useful and i’d love to let me know how you use it. Also do not hesitate to share ideas and comments. Have fun!
Changelog
June 10th, 2010 : Initial release.
Junue 11th, 2010: “All categories” option added. (thank you: @christoschiotis)
Mono Columnist: A free wordpress theme by webtoolkit4.me
April 22nd, 2010 - Backend, Free stuff, Wordpress - 10 Comments

Mono Columnist is my first free wordpress theme featured here, in webtoolkit4.me. This theme is very simple, only one column and a footer. No widgets, no troubles, no weird setup. Upload it and start writing. Mono Columnist is free and available in 4 different color schemes. In order to change to the color scheme just open up style.css and uncomment the style that you want. That’s it. Free for both personal and commercial projects but not available for redistribution of any kind. Enjoy!
ShopperPress – A shopping cart theme for wordpress
July 10th, 2009 - Backend, Wordpress - 7 Comments
ShopperPress is a fully featured shopping cart plugin for wordpress, suitable for selling any types of products, services, and digital downloads online.
Key features
- Utilises WordPress pages, or posts, to create products
- Custom Advertising Spaces (Google Adsence and normall banners)
- Products can have multiple options (weight / sizes / brands etc)
- Various methods available for listing products
- Full Google Adsence Integration for product clicks and selections





