Portfolio Base Documentation by Sitebase v1.1.0


Portfolio Base

Created: 4-10-2011
By: Sitebase (Wim Mostmans)
Email: wim@sitebase.be

Informations about Updates and New Scripts are always announced on Twitter, Facebook and LinkedIn.

Wim Mostmans Thank you for purchasing my script. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here or on Twitter. Thanks so much!

Sitebase


Table of Contents

  1. Description
  2. How to install
  3. Get items method
  4. Portfolio item properties
  5. Overview portfolio template
  6. Single portfolio item template
  7. Taxonomie template
  8. Changelog
  9. FAQ
  10. Updates and New releases
  11. Support notes
  12. Other Scripts

Descriptiontop

With this script you can easily manage your portfolio (image and video) items on your website. Because this plugin uses a custom post type to manage your portfolio this is a very clean and powerfull way to build a portfolio into your website.


How to install top

To install the plugin go to Plugins > Add New, and select the Upload tab. Now upload and activate the portfoliobase.zip. After installation and activation you will have an extra post type menu:

Portfolio menu

Create overview of portfolio items top

Because this plugin has a build in way to query for testimonial items it is very easy to show the portfolio items you want. For example if you want to get an overview of all portfolio items you can use the following method. In this case $portfolio_items is an array of all your portfolio items.

$portfolio_items = CptPortfolioBase::get_items();

The cool thing about this is that every object in the array already contains all the info for that portfolio item but also the extra meta data like the client name, publish year, skills your selected an so on.

In the get_items method you can pass an array with settings. These setting are the same you can use in WP_Query. Below I show some examples of cool queries you can do with this:

Get all portfolio items and order the title descending

$portfolio_items = CptPortfolioBase::get_items(array('orderby' => 'title', 'order' => 'DESC'));

Get all portfolio items where the skills HTML or PHP are selected and the product Photoshop.

$portfolio_items = CptPortfolioBase::get_items(array('skills' => 'html,php', 'products' => 'photoshop'));

To display these items you now have queried you can use a loop like this:

<?php
foreach($portfolio_items as $item) {
		echo $item->post_title . '<br />';
}
?>

The above code will display a list of titles of all selected portfolio items.


Portfolio item properties top

Like I explained in previous section is the item you get back from the get_items method a array of objects. Below you see an overview of what properties these objects have.

There are some more properties available but the above are the most common.

As you can see in the list above are the skills, products and category properties again an array of objects. These are term objects, and these have the following properties

If you now for example want to display the client name of a portfolio object ($item in this example) you do that as follow:

echo $item->client;

If you for example want to show a list of skills that were needed for a specific portfolio item you do that a follow ($item is a portfolio object in this example):

<ul>
<?php
foreach($item->skills as $skill) {
echo '<li>' . $skill->name . '</li>';
}
?>
</ul>

Overview portfolio template top

What you can do is create a template that you can assign to a page in your WordPress and that then will show all the portfolio items. To do this create a file in your theme folder (wp-content/themes/[activethemefolder]) a file called template-portfolio.php. Important for this is that the top of the file contains the following;

<?php
/*
Template Name: Portfolio
*/
?>

This will make this template available under the template selection menu on your pages. For a full example of the code you can take a look at the following template example file.

Of course depending on the construction of your theme you gonna need to modify this template a bit.


Single portfolio item template top

The plugin has also a method to get information for one specific portfolio item. This is the get_item method and you can use it as follow:

$item = CptPortfolioBase::get_item(14);

You can now use this item to make a custom template for your portfolio items. This way you can totally style them like you want. You can create a custom portfolio template by making a new file in your theme folder and call it single-portfolio.php. The code for this template could look something like this file example template.

In the template I have also some code that detects if the portfolio item has a youtube URL in the video_url property. If that's the case it shows this video. If there is no video url it displays the featured image.


Taxonomie template top

Taxonomies are for example the skills, products and category of a portfolio item. What you can do is create a custom template for such a specific taxonomie. For example to display all portfolio items that have selected PHP under skills. For this you can create a taxonomie template. To do this you create a new file under your theme folder with the name taxonomy-portfolio-skills.php, taxonomy-portfolio-products.php or taxonomy-portfolio-category.php. The code for such a template could look like this example file.


Changelog top


v1.0 (10/02/2011)
* Initial version released

FAQ top

Is this a custom post type

Yes, this plugin is a custom post type.


Updates and New releases top

Updates and new release of the script are free to download once you have bought this item. To download a new version you go to My Account on Codecanyon and

How to download an update
Follow these steps to download the latest release

Support notes top

Right now I'm simply getting more emails and requests for support than I can manage in a timely manner. Some times I can answer emails the same day, but often it'll take me as long as a month (or longer!) to completely empty my inbox.

Before sending a support request make sure that you have done the following things:

  1. Read the full documentation file
  2. See if your answser isn't already answered in the FAQ section of the script on Codecanyon.

To be able to help solve a problem quickly, please read the entries below. I'll do my best to assist you. I provide a full range of Support except:

  1. I don't (and can't) support the 3rd-party code (i.e. external plugins, javascripts, flash players, etc.) In such cases you shall have to contact the authors.
  2. I don't support errors provoked by the strong modification of the original packages.
  3. I do customization but this isn't included in the price of the script. To get a cost estimate for a modification you can email me on wim@sitebase.be.
  4. If you sure that your improvement ideas will be helpful to others, please don't hesitate to share it with me. Most likely that it will became a free package update.
  5. If you have a more general question relating to the script on Codecanyon, you might consider visiting the forums and asking your question in the "Item Discussion" section.

Other scripts top

I have released a lot of other cool and handy scripts, so make sure to checkout our other scripts. To get an overview you can take a look at our portfolio on Codecanyon.


Once again, thank you so much for purchasing this script. As I said at the beginning, I'd be glad to help you if you have any questions relating to this theme/script. No guarantees, but I'll do my best to assist.

Sitebase

Go To Table of Contents