If this tutorial is not what you were looking for, you still have any questions, suggestions or concerns - feel free to let us know. Please help us to serve you better!

Your Name

Your Email

Your Message (required)

captcha

Featured templates

WordPress Cherry 3.x. How to change width of columns for portfolio posts single pages

WordPress. How to change width of columns for portfolio posts single pages

This tutorial shows how to change width of columns for portfolio posts single pages in WordPress templates.

WordPress. How to change width of columns for portfolio posts single pages-1

  1. We can see that left column with image has span7:

    WordPress. How to change width of columns for portfolio posts single pages-2

    Right column has span5:

    WordPress. How to change width of columns for portfolio posts single pages-3

  2. We should change spans in order to adjust width of columns. Open admin section and go to
    Appearance -> Editor. Open custom-function.php file for editing:

    WordPress. How to change width of columns for portfolio posts single pages-4

  3. Add the following code before closing php tag:

    if ( !function_exists('cherry_get_layout_class') ) {
    		function cherry_get_layout_class($layout) {
    			switch ($layout) {
    
    				case 'full_width_content':
    					$layout_class = apply_filters( "cherry_layout_wrapper", "span12" );
    					break;
    
    				case 'content':
    					$layout_class = apply_filters( "cherry_layout_content_column", "span8" );
    					$layout_class .= ' '.of_get_option('blog_sidebar_pos');
    					break;
    
    				case 'sidebar':
    					$layout_class = apply_filters( "cherry_layout_sidebar_column", "span4" );
    					break;
    
    				case 'left_block':
    					$layout_class = apply_filters( "cherry_layout_left_block_column", "span7" );
    					break;
    
    				case 'right_block':
    					$layout_class = apply_filters( "cherry_layout_right_block_column", "span5" );
    					break;
    			}
    
    			return $layout_class;
    		}
    	} 
  4. We should change spans for left_block and for right_block:

    WordPress. How to change width of columns for portfolio posts single pages-5

  5. We have changed span for right_block to span7 and span for left_block to span5. Basically, it will make right column with image smaller. Click on Update file in order to save changes:

    WordPress. How to change width of columns for portfolio posts single pages-6

  6. Refresh page. We have changed width of left and right columns:

    WordPress. How to change width of columns for portfolio posts single pages-7

Feel free to check the detailed video tutorial below:

WordPress. How to change width of columns for portfolio posts single pages