- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
CherryFramework 3.x. How to add custom portfolio options to portfolio post
October 21, 2015
CherryFramework 3.x. How to add a Portfolio post custom option field
This tutorial is going to show you how to add custom portfolio options to your Portfolio post in CherryFramework 3.x. based templates.

Note that customization suggested below is being performed on the CherryFramework theme and it is going to be lost if you update the framework. Make sure you use the latest version of the framework and also make a backup of your website before updating the framework.
In order to add a Portfolio post custom option field, you need to perform the following:
-
Obtain access to your server files. You can either use FTP or a control panel file manager if you have one.
-
Open up the wp-content/themes/CherryFramework/includes/theme-portfoliometa.php file. We’re going to add a Portfolio post custom option field Price as an example.
-
In the theme-portfoliometa.php find the following piece of code:
array( 'name' => "info", 'desc' => "info_desc", 'id' => $prefix . 'portfolio_info', 'type' => 'text', 'std' => '' ),
Replace info strings with price:
array( 'name' => "price", 'desc' => "price_desc", 'id' => $prefix . 'portfolio_price', 'type' => 'text', 'std' => '' ),
-
Save the changes and upload the theme-portfoliometa.php file to the server.
-
Open up the wp-content/themes/CherryFramework/loop/loop-single-portfolio.php file. Locate the following line of code:
$portfolioInfo = get_post_meta($post->ID, 'tz_portfolio_info', true);
Duplicate it and replace info with price:
$portfolioPrice = get_post_meta($post->ID, 'tz_portfolio_price', true);
-
Find the following code in the loop-single-portfolio.php file, duplicate it and replace info with price:
if (!empty($portfolioInfo)) { echo '
- ';
echo '' . theme_locals("info").":". '';
echo '' . $portfolioInfo . '
'; echo ' ';
}
- ';
echo '' . theme_locals("price").":". '';
echo '' . $portfolioPrice . '
'; echo ' ';
}
-
In the same file, update the following if condition:
if (!empty($portfolioClient) || !empty($portfolioDate) || !empty($portfolioInfo) || !empty($portfolioURL)) { echo ''; }
By including the portfolioPrice variable.
if (!empty($portfolioClient) || !empty($portfolioDate) || !empty($portfolioInfo) || !empty($portfolioURL) || !empty($portfolioPrice)) { echo ''; }
-
Save the changes and upload the loop-single-portfolio.php file to the server.
-
Open up the wp-content/themes/CherryFramework/includes/locals.php file. Scroll down to the last localization argument (approximately line 1106, ‘nofollow_desc’).
-
Insert the following code after the last localization argument:
'price' => __('Price', $domain), 'price_desc' => __('Price of the portfolio item.', $domain),
Here you can specify the description for the new portfolio option field:
-
Save the changes and upload the locals.php file to the server.
-
Now you can use the new field to add extra meta information to your portfolio posts:
if (!empty($portfolioPrice)) { echo '

Feel free to check the detailed video tutorial below:
CherryFramework 3.x. How to add a Portfolio post custom option field