About this plugin↑ Back to Top
Nice Portfolio displays your work in a clean, responsive and beautiful way. You can show your projects in a specific page, using a shortcode, widgets or template tags (PHP functions).
This plugin is fully integrated with WordPress. It makes use of its native architecture to show your projects, and includes a huge set of hooks, so you can customize it in any way you need.
Nice Portfolio works right out of the box with any theme.
Installation↑ Back to Top
Using The WordPress Dashboard
- Navigate to the “Add New” link in the plugins dashboard.
- Search for “Nice Portfolio”.
- Click “Install Now”.
- Activate the plugin on the Plugin dashboard.
Uploading in WordPress Dashboard
- Navigate to the “Add New” in the plugins dashboard.
- Navigate to the “Upload” area.
- Select
nice-portfolio.zip
from your computer. - Click “Install Now”.
- Activate the plugin in the Plugin dashboard.
Using FTP
- Download
nice-portfolio.zip
. - Extract the
nice-portfolio
directory to your computer. - Upload the
nice-portfolio
directory to the/wp-content/plugins/
directory. - Activate the plugin in the Plugin dashboard.
Setting up↑ Back to Top
Once you installed and activated the plugin, you can go to Portfolio > Settings and tweak the options there. You can set a custom page for your portfolio, which will display your projects using the settings your enter in that section.
Those settings will also be used as the default ones for the shortcode and template tag when you’re not specifying any values for them.
Shortcode↑ Back to Top
The basic usage of the shortcode is just [portfolio]
. That will display a list of your projects using the settings you entered in Portfolio > Settings.
However, you can specify values for the shortcode using the following fields:
columns
: The number of columns to be displayed in a portfolio gallery.limit
: The number of projects to be displayed in a portfolio gallery. A value of zero means nothing will be displayed. Use-1
for no limit.orderby
: The ordering criteria that will be used to display your projects. Accepted values:ID
,title
,menu_order
,date
,random
.order
: The sorting criteria that will be used to display your projects. Accepted values:asc
(ascendant),desc
(descendant).category
: Comma-separated numeric IDs of portfolio categories that you want to display. A value of zero means that all categories will be considered.exclude_category
: Comma-separated numeric IDs of portfolio categories that you want to exclude. A value of zero means that no categories will be excluded.tag
: Comma-separated numeric IDs of portfolio tags that you want to display. A value of zero means that all tags will be considered.exclude_tag
: Comma-separated numeric IDs of portfolio tags that you want to exclude. A value of zero means that no tags will be excluded.avoidcss
: Choose if you want to remove the default styles for the current list of projects. Accepted values:1
(avoid styles),0
(not avoid styles).
If any of these values is not declared explicitly, the default value will be the one set in Portfolio > Settings.
A typical usage of the shortcode with these fields would be the following:
[portfolio columns="2" limit="5" orderby="date" order="asc" category="20,34"]
Template tag (PHP function)↑ Back to Top
You can include projects in your own templates by using our nice_portfolio()
function. This is a very basic usage example:
<?php if ( function_exists( 'nice_portfolio' ) ) : nice_portfolio(); endif; ?>
As it happens with the shortcode, that code snippet will display a list of your projects using the settings you entered in Portfolio > Settings. However, you can give the function an array of options with specific values on how to show the list of projects:
columns
: The number of columns to be displayed in a portfolio gallery.limit
: The number of projects to be displayed in a portfolio gallery. A value of zero means nothing will be displayed. Use-1
for no limit.orderby
: The ordering criteria that will be used to display your projects. Accepted values:ID
,title
,menu_order
,date
,random
.order
: The sorting criteria that will be used to display your projects. Accepted values:asc
(ascendant),desc
(descendant).category
: Comma-separated numeric IDs of portfolio categories that you want to display. A value of zero means that all categories will be considered.exclude_category
: Comma-separated numeric IDs of portfolio categories that you want to exclude. A value of zero means that no categories will be excluded.tag
: Comma-separated numeric IDs of portfolio tags that you want to display. A value of zero means that all tags will be considered.exclude_tag
: Comma-separated numeric IDs of portfolio tags that you want to exclude. A value of zero means that no tags will be excluded.avoidcss
: Choose if you want to remove the default styles for the current list of projects. Accepted values:1
(avoid styles),0
(not avoid styles).
If any of these values is not declared explicitly, the default value will be the one set in Portfolio > Settings.
Using these options, you can have something like this in your code:
<?php if ( function_exists( 'nice_portfolio' ) ) : nice_portfolio( array( 'columns' => 2, 'limit' => 5, 'orderby' => 'date', 'order' => 'asc', 'category' => '20,32', ) ); endif; ?>
Widgets↑ Back to Top
Nice Portfolio includes two widgets: Portfolio Categories and Recent Projects.
Portfolio Categories works pretty much as the default Categories widget: you just need to check if you want to display the categories as a dropdown (the default is a list), the number or projects in each category, and show categories hierarchically as a tree view.
The Recent Projects widget will display your projects by date, from newer to older. It lets you enter the maximum number of projects you want to show, the project’s excerpt and the featured image using a specific size.
Resizing images↑ Back to Top
If you go to Portfolio > Settings > Images, you can adjust the size of the images that will be displayed within projects there. Once you modified these settings, you may need to regenerate your thumbnails using the Regenerate Thumbnails plugin.
Changing the slug↑ Back to Top
By default, the links to your projects will look something like http://my-site.me/portfolio/my-project
. If you want to change that portfolio
base to something more fit to your needs (for example, http://my-site.me/paintings/my-project
, if you’re a painter), you can do so going to Portfolio > Settings > Advanced, and modifying the “Project Slug” option.
Using custom CSS↑ Back to Top
You can load a custom stylesheet by using wp_enqueue_script() and adding your custom CSS to your own file. However, if you really want to get rid of the default CSS of Portfolio by NiceThemes, so you can avoid overriding our styles, you can check the “Avoid Plugin CSS” option in Portfolio > Settings.
Using custom templates↑ Back to Top
Inside wp-content/plugins/nice-portfolio/public/templates
you will find the following default templates:
portfolio
: The default template for the page you selected as the portfolio page in Portfolio > Settings.portfolio-project
: The default template for all single portfolio projects.portfolio-category
: The default template for a portfolio category index.portfolio-tag
: The default template for a portfolio tag index.portfolio-archive
: The default template for the index of theportfolio_project
custom post type.
All you need to do is copy these files to wp-content/themes/my-theme/portfolio
, and modify them to your own needs.
If you want more specific templates, you can take a look at the Template Hierarchy article in the Codex.