WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Simple Portfolio

Simple Portfolio allows you to easily manage your portfolio. You can append snippets, youtube and media from the built-in Media Library to projects.

Usage

After installing simple-portfolio, you will need to update your template files in your theme in order to pull the data to the front end. Since the update to version 1.3 there's changed a lot! You can now assign projects to clients, categories or tags. More features means more knowledge of theme development and therefore this update may excludes some newbies. One of the new features is allowing comments on your projects. You have to enable this in your theme See Theme Development and Comments Template

Important is that you are aware of the API this plugin provides.

You have to create 2 extra template files to your theme

  • portfolio.php: this will list all your projects. Use the default wordpress loop to cycle through projects
  • single-portfolio.php: project detail information (single project)

API

You can use these methods to pull the project(s) data in your theme

Project Information

simple_portfolio_info($post_id = null)

Retrieves all portfolio general information for provided project post
@param $post_id int (optional) the project post id, if null pull from global $post
@return array

Example: Usage in the loop

<?php while (have_posts()) : the_post(); ?>
        <h1>Project Information</h1>
        <ul>
        <?php foreach (simple_portfolio_info() as $info): ?>
            <li><?php echo $info; ?></li>
        <?php endforeach; ?>
        </ul>
    <?php endwhile; ?>

Project Media

simple_portfolio_media($post_id = null, $type = null)

Retrieves all portfolio media for provided project post.
@param $post_id int (optional) the project post id, if null pull from global $post
@param $type string (optional) filter on type. possible values are: 'image', 'youtube', 'snippet' or 'text'
@return array

Example retrieve all project media: Usage in the loop

<?php while (have_posts()) : the_post(); ?>
        <h1>Media</h1>
        <ul>
        <?php foreach (simple_portfolio_media() as $media): ?>
            <li><?php print_r($media); ?></li>
        <?php endforeach; ?>
        </ul>
    <?php endwhile; ?>

Query Projects

simple_portfolio_query_projects( $taxonomy = null, $slug = null, $args = null )

Query projects. see wordpress query posts
You can use the loop from wordpress after calling this method.
@param $taxonomy string/array name of the taxonomy, possible values are: 'portfolio-clients', 'portfolio-categories' or 'portfolio-tags' (or combine multiple combinations in an array)
@param $slug string slug of the taxonomy for filtering projects on taxonomy slug name. @param $args custom query_posts arguments @return array

Example:

<?php simple_portfolio_query_projects(); ?>
    <?php while (have_posts()) : the_post(); ?>
        <h1><?php echo the_title(); ?></h1>
        <?php the_content('Read more '); ?>
        <?php print_r(simple_portfolio_info($post->ID)); ?>
    <?php endwhile; ?>

Or with custom query_posts arguments:

<?php simple_portfolio_query_projects(null, null, array( 'orderby' => 'title', 'order' => 'ASC', 'posts_per_page' => '1' )); ?>
    <?php while (have_posts()) : the_post(); ?>
        <h1><?php echo the_title(); ?></h1>
        <?php the_content('Read more '); ?>
    <?php endwhile; ?>

Get Projects

simple_portfolio_get_projects( $taxonomy = null, $slug = null, $args = null )

Retrieve projects in an array. When no arguments are applied, all projects will be returned. See get posts
@param $taxonomy string/array name of the taxonomy, possible values are: 'portfolio-clients', 'portfolio-categories' or 'portfolio-tags' (or combine multiple combinations in an array)
@param $slug string slug of the taxonomy for filtering projects on taxonomy slug name. @param $args custom get_posts arguments @return array

Example:

<?php $commercial_projects = simple_portfolio_get_projects('portfolio-categories', 'commercial'); ?>   
    <ul>
    <?php foreach ($commercial_projects as $post): ?>
        <?php setup_postdata($post); ?>
        <li>
            <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
            <?php the_content(); ?>
        </li>
    <?php endforeach; ?>
    </ul>

Check if XML is enabled

simple_portfolio_xml_enabled()

Is xml enabled? This way you can check easily if xml is enabled
@return Boolean

Example check and show link to xml:

<?php if (simple_portfolio_xml_enabled()): ?>
        <h1>You have enabled XML output</h1>
        <?php $xml_url = get_site_url() . '/' . get_post_type_object('portfolio')->rewrite['slug'] . '.xml';
        <a href="<?php echo $xml_url; ?>">View XML</a>
    <?php endif; ?>

List Clients

simple_portfolio_list_clients($post_id = null, $args = null)

List clients. Echo the output directly.
@param $post_id int (optional) the project post id. (default null which list all clients unrelated to a project post)
@param $args array See wp_list_categories

Example list all clients (even those who have no project posts):

<h1>Clients</h1>
    <?php simple_portfolio_list_clients(null, array('hide_empty' => 0)); ?>

Example usage in the loop

<?php while (have_posts()) : the_post(); ?>
        <h1>Client(s)</h1>
        <?php simple_portfolio_list_clients($post->ID); ?>
    <?php endwhile; ?>

Get Clients

simple_portfolio_get_clients($post_id = null, $args = null)

Same as List Clients, excepts this retrieve the clients as an array.
@param $post_id int (optional) the project post id. (default null which list all clients unrelated to a project post)
@param $args array See wp_list_categories
@return array

Example:

<?php $clients = simple_portfolio_get_clients($post->ID); ?>
    There are <?php echo count($clients); ?> clients
    <ul>
        <?php foreach ($clients as $client): ?>
            <li><a href="<?php echo $client->link; ?>"><?php echo $client->name; ?></a></li>
        <?php endforeach; ?>
    </ul>

List Categories

simple_portfolio_list_categories($post_id = null, $args = null)

List categories. Echo the output directly.
@param $post_id int (optional) the project post id. (default null which list all categories unrelated to a project post)
@param $args array See wp_list_categories

Usage see simple_portfolio_list_clients()

Get Categories

simple_portfolio_get_categories($post_id = null, $args = null)

Retrieve the categories.
@param $post_id int (optional) the project post id. (default null which list all categories unrelated to a project post)
@param $args array See wp_list_categories
@return array

Usage see simple_portfolio_get_clients()

List Tags

simple_portfolio_list_tags($post_id = null, $args = null)

List tags. Echo the output directly.
@param $post_id int (optional) the project post id. (default null which list all tags unrelated to a project post)
@param $args array See wp_list_categories

Usage see simple_portfolio_list_clients()

Get Tags

simple_portfolio_get_tags($post_id = null, $args = null)

Retrieve the tags.
@param $post_id int (optional) the project post id. (default null which list all tags unrelated to a project post)
@param $args array See wp_list_categories
@return array

Usage see simple_portfolio_get_clients()

XML Output of all your projects

When you enable XML Output in settings>portfolio the location of your xml can be found here: ~/slugname.xml

Plugin Homepage

For more information, please visit the plugin's homepage

Requires: 3.3 or higher
Compatible up to: 3.3.2
Last Updated: 2012-4-12
Downloads: 37,328

Ratings

4 stars
4.1 out of 5 stars

Support

0 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,2,2 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,2,2 100,1,1 50,2,1 100,1,1 0,1,0 100,1,1 100,1,1 100,1,1
100,2,2 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1
100,1,1 100,1,1
80,5,4 100,1,1 50,2,1 0,1,0
0,1,0 75,4,3
0,1,0
80,5,4
0,3,0 100,1,1
100,3,3
100,1,1
100,1,1
50,2,1