Deprecated: Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead. in /var/www/html/wp-includes/functions.php on line 5383

Side bars on portfolio

New Front EN Support Forums Ikebana Theme Support Side bars on portfolio

Viewing 10 posts - 1 through 10 (of 12 total)
  • Author
    Posts
  • #1919
    elliottriley
    Participant

    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?

    #1920
    mmsatori
    Keymaster

    Hey 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 Studio

    #1921
    elliottriley
    Participant

    Thanks 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?

    #1923
    mmsatori
    Keymaster

    Yes, 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 Studio

    #1924
    elliottriley
    Participant

    Hi Andrew,

    Thanks for that, but I meant add on a third option either larger than the large or smaller than the normal.

    #1925
    mmsatori
    Keymaster

    Ah, 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 Studio

    #1926
    elliottriley
    Participant

    Thanks for the quick response Andrew, I’ll have a look. Loving the theme and the flexibility for our corporate website – http://www.relfm.com

    #2079
    hatchmedia
    Participant

    Hi 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

    #2080
    hatchmedia
    Participant

    Actually 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

    #2083
    mmsatori
    Keymaster

    Hey 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

Viewing 10 posts - 1 through 10 (of 12 total)
  • You must be logged in to reply to this topic.