New Front EN › Support Forums › Ikebana Theme Support › Side bars on portfolio
- This topic has 11 replies, 3 voices, and was last updated 11 years ago by satori.
-
AuthorPosts
-
November 5, 2013 at 6:26 pm #1919elliottrileyParticipant
We are working on a site that we are using portfolio tags to break up the different sections of the site – such as About Us, what We Do, etc etc. We have some items, such as contact us, testimonials that we would like to place on a sidebar of the portfolio page that has a specific tag – is it possible to put a sidebar on a portfolio page and if so, is it just a case of changing the type from full width to right sidebar – which I have tried?
November 6, 2013 at 9:48 am #1920satoriKeymasterHey Elliott,
first of all, thank you for the purchase!
The portfolio tag archive page template does not contain a sidebar by default, which means that a back-end switch is not envisaged by the theme (mostly for aesthetic purposes). However, the sidebar can be added to the template by adding one line of code to the “taxonomy-tagportfolio.php” template file: the “get_sidebar()” tag, right before the footer call.
Sincerely,
Andrew / Satori StudioNovember 7, 2013 at 2:10 pm #1921elliottrileyParticipantThanks very much!
I have another question…
There is a Post Box size of Large or Normal. Is it possible for me to create a small and control the size of that through the theme options?
November 7, 2013 at 10:26 pm #1923satoriKeymasterYes, sure: please use the “Portfolio page items: box dimensions” setting on the “Portfolio Page” tab of the Theme Options panel can be used to set the dimensions of the “Normal” portfolio item boxes; the “Large” size is computed automatically and is twice the size of the “Normal” box plus one margin.
Sincerely,
Andrew / Satori StudioNovember 7, 2013 at 10:37 pm #1924elliottrileyParticipantHi Andrew,
Thanks for that, but I meant add on a third option either larger than the large or smaller than the normal.
November 7, 2013 at 10:57 pm #1925satoriKeymasterAh, I see now. The back-end allows for two sizes (“Normal” and “Large”), mostly for aesthetic purposes and to preserve the theme’s visual concept. In order to add a third size, several theme files should be customized, namely:
– functions.php (add a new size choice option for project item editor mode).
– custom-styles.php (add the new size in pixels and well as link to the Theme Options hook).
– header-functions.php (adjust the column width in the Isotope settings to match the new dimensions.Since this functionality is not envisaged by the theme, the standard ThemeForest support offer does not cover such deep customization; unfortunately, I am not available for a paid ad-hoc project at the moment, but I can advise a website with decent value-for-money in terms of good-quality WordPress customization services: Tweaky.com.
Sincerely,
Andrew / Satori StudioNovember 7, 2013 at 11:03 pm #1926elliottrileyParticipantThanks for the quick response Andrew, I’ll have a look. Loving the theme and the flexibility for our corporate website – http://www.relfm.com
December 11, 2013 at 6:35 pm #2079hatchmediaParticipantHi Andrew,
I hope you could help with this. I have added my new size to the files you mentioned above to the OP, however, I am unable to add this new size to the required class. When I test it in Firebug, it seems to work.
Would you be able to tell me where to add my new size so that it adds to the class on the portfolio page?
Cheers
Damien
December 11, 2013 at 6:44 pm #2080hatchmediaParticipantActually Andrew, I have found where my issue is and wondering if you could help with this. This is from my functions.php:
`// Add custom post class for box size
function size_class($classes) {
global $post;
$postclass = ”;
if ( get_post_meta($post->ID, ‘satori_post-size’, true) == ‘Large’ ) {
$postclass .= ‘post-size-large’;
}
$classes[0] = $postclass;
return $classes;
}
add_filter(‘post_class’, ‘size_class’);// Add custom post class for box size
function size_class_long($classes) {
global $post;
$postclass1 = ”;
if ( get_post_meta($post->ID, ‘satori_post-size’, true) == ‘Long’ ) {
$postclass1 .= ‘post-size-long’;
}
$classes[0] = $postclass1;
return $classes;
}
add_filter(‘post_class’, ‘size_class_long’);`When this is in, my new Long size works, however, the Large size stops working. What have I done wrong :)
Cheers
Damien
December 12, 2013 at 10:58 am #2083satoriKeymasterHey Damien,
could you please clarify: in which sense does the “Large” size stop working when you add the code above? The class is not included into the post class, the meta box does not show, or the boxes do not receive a proper size?
Have you added an additional option for the size drop-down metabox (also in the functions.php file, look for the “Add meta box to portfolio items with post box size options” title)?
Regarding the code, please try merging the two functions into one:
// Add custom post class for box size
function size_class($classes) {
global $post;
$postclass = ”;
if ( get_post_meta($post->ID, ‘satori_post-size’, true) == ‘Large’ ) {
$postclass .= ‘post-size-large’;
}
if ( get_post_meta($post->ID, ‘satori_post-size’, true) == ‘Long’ ) {
$postclass1 .= ‘post-size-long’;
}
$classes[0] = $postclass;
return $classes;
}
add_filter(‘post_class’, ‘size_class’);
Sincerely,
Andrew / Satori Studio -
AuthorPosts
- You must be logged in to reply to this topic.