Title: Customizing jetpack portfolio shortcode
Last modified: August 22, 2016

---

# Customizing jetpack portfolio shortcode

 *  Resolved [digger149](https://wordpress.org/support/users/digger149/)
 * (@digger149)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/)
 * Hello
 * I have customised the code in /jetpack/modules/custom-post-types/portfolios.php
   to display the projects in a bootstrap theme framework.
    Is there any way that
   I can put this code somewhere else to prevent it being overwritten by a jetpack
   upgrade?
 * Cheers
 * [https://wordpress.org/plugins/jetpack/](https://wordpress.org/plugins/jetpack/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [11 years, 7 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299537)
 * Instead of editing plugin files, I would recommend that you place your code in
   a separate plugin, or in your theme. You should be able to customize most functions
   via filters. If you find that a filter is missing, let me know and we’ll add 
   it to the Jetpack in the next release!
 *  [Styled Themes](https://wordpress.org/support/users/gejay/)
 * (@gejay)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299548)
 * This was set as “resolved”, but I don’t see what was done. I would like to override
   the template layout for varying columns and rows to utilize the Bootstrap framework
   as well (especially for responsive layout), but to also customize the layout 
   based on what is entered in the shortcode.
 * I have to say, this jetpack portfolio is a major plus. As a side note, I did 
   manage to setup a archive-jetpack-portfolio.php override…just need the column
   layout now (somehow).
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [11 years, 7 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299552)
 * > I would like to override the template layout
   >  […] I did manage to setup a archive-
   > jetpack-portfolio.php override
 * Jetpack itself doesn’t create any templates for the Custom Post Type. It uses
   your theme’s template files. You can consequently create new template files for
   each Custom Post Type view. You already created a custom template for the Archive
   view. You can also create one for single post views, named `single-jetpack-portfolio.
   php`. You can add columns and customize the look of each template with CSS, within
   your theme.
 *  [Styled Themes](https://wordpress.org/support/users/gejay/)
 * (@gejay)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299554)
 * Sorry, I meant I made a single-jetpack-portfolio.php file, not the archive one,
   my mistake. The archive version can work separately, but. I was referring to 
   the method of using the portfolio shortcode in a page template. The jetpack plugin
   sets the layout structure, and is the part I want to customize if someone wants
   to use the shortcode method instead of the archive method via menu item for a
   Project Type. These are two different layouts, the shortcode gives you columns
   in a standard page template, but the menu item for a project type gives you an
   archive type layout via the theme’s archive template (or a archive-jetpack-portfolio.
   php). Ultimately the goal is to have it so both methods of displaying project
   items can look and function the same.
 * I can start a new topic for this if necessary, as this one is already set as 
   resolved…?
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [11 years, 7 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299556)
 * You should be able to customize the look of the Portfolio shortcode with CSS,
   and by using the different [shortcode attributes](http://en.support.wordpress.com/portfolios/portfolio-shortcode/).
   You can for example control the number of columns thanks to the `columns` shortcode
   parameter. You can also change the width of each post by applying custom CSS 
   and using the `.portfolio-entry` class.
 * You can look at how the shortcode was customized in the Illustratr theme, for
   example:
    [https://themes.trac.wordpress.org/browser/illustratr/1.1.4/style.css#L2819](https://themes.trac.wordpress.org/browser/illustratr/1.1.4/style.css#L2819)
 * This theme also uses a custom `single-jetpack-portfolio.php`, as well as a custom
   view for Portfolio items in the content loop:
    - [https://themes.trac.wordpress.org/browser/illustratr/1.1.4/single-jetpack-portfolio.php](https://themes.trac.wordpress.org/browser/illustratr/1.1.4/single-jetpack-portfolio.php)
    - [https://themes.trac.wordpress.org/browser/illustratr/1.1.4/content-portfolio-single.php](https://themes.trac.wordpress.org/browser/illustratr/1.1.4/content-portfolio-single.php)
 * All in all, it really is up to the theme. You decide how portfolio items will
   look like there.
 *  [Saskia Teichmann](https://wordpress.org/support/users/jyria/)
 * (@jyria)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299630)
 * Is there a filter for the shortcode function output of [portfolio]?
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [10 years, 11 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299631)
 * [@saskia](https://wordpress.org/support/users/saskia/) No, we didn’t add any 
   filter to customize the ouput of the shortcode.
 * [https://github.com/Automattic/jetpack/blob/3.5.3/modules/custom-post-types/portfolios.php#L393](https://github.com/Automattic/jetpack/blob/3.5.3/modules/custom-post-types/portfolios.php#L393)
   
   [https://github.com/Automattic/jetpack/blob/3.5.3/modules/custom-post-types/portfolios.php#L521](https://github.com/Automattic/jetpack/blob/3.5.3/modules/custom-post-types/portfolios.php#L521)
 * We could add one, though! Could you create a [GitHub issue](https://github.com/Automattic/Jetpack/issues/)
   with an example of the things you’d like to customize, or create your own thread
   here, as per the [Forum Welcome](http://codex.wordpress.org/Forum_Welcome)?
    
   [http://wordpress.org/support/plugin/jetpack#postform](http://wordpress.org/support/plugin/jetpack#postform)
 * Thank you!
 *  [mjasia](https://wordpress.org/support/users/javad-asia/)
 * (@javad-asia)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299632)
 * Hi
    I also was surfing web about customize jetpack portfolio and after reading
   this topic, understood that by editing “portfolio.php” file in “\modules\custom-
   post-types” folder portfolio shotcode is customizable.
 * I found following code:
 *     ```
       static function portfolio_shortcode( $atts ) {
       		// Default attributes
       		$atts = shortcode_atts( array(
       			'display_types'   => true,
       			'display_tags'    => true,
       			'display_content' => true,
       			'show_filter'     => false,
       			'include_type'    => false,
       			'include_tag'     => false,
       			'columns'         => 2,
       			'showposts'       => -1,
       			'order'           => 'asc',
       			'orderby'         => 'date',
       		), $atts, 'portfolio' );
       ```
   
 * and changed “true” options to “false” and now use shortcode for displaying only
   thumbnail images. that’s so easy 🙂
    [@jeremy](https://wordpress.org/support/users/jeremy/)
   may you add this option in setting page in the next release? thanks
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [10 years, 11 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299633)
 * [@m](https://wordpress.org/support/users/m/).Javad You do not need to edit the
   plugin files to change the shortcode parameters. You can change these values 
   when adding the shortcode to your posts or pages, as explained here:
    [https://en.support.wordpress.com/portfolios/portfolio-shortcode/](https://en.support.wordpress.com/portfolios/portfolio-shortcode/)
 *  [Saskia Teichmann](https://wordpress.org/support/users/jyria/)
 * (@jyria)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299634)
 * Github filter request added
    [https://github.com/Automattic/jetpack/issues/2194](https://github.com/Automattic/jetpack/issues/2194)
 * Thanks Jeremy!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Customizing jetpack portfolio shortcode’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

 * 10 replies
 * 5 participants
 * Last reply from: [Saskia Teichmann](https://wordpress.org/support/users/jyria/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/customizing-jetpack-portfolio-shortcode/#post-5299634)
 * Status: resolved