Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #281969

    Hello:

    How would I create a new sidebar and choose it? I would like to know for these occasions:

    1) I am using a custom post type and would like to use a custom sidebar
    2) When using the normal blog, I would like to change to a different sidebars once a week (rotating 4 per month) without creating new ones each time.

    #282042

    Hey!

    You create a new sidebar here (Appearance > Widgets):

    And you set it here (page edit):

    Regarding the rotating widget, it’s possible but you’d need to seek for a third-party plugin for that or look for a developer to create that for you.

    Cheers!
    Josue

    #282047
    This reply has been marked as private.
    #282048

    No, you can actually do that in Enfold, please see the first part of my message.

    Regards,
    Josue

    #282086

    Excellent! I see what you’re saying now. Can you also advise on how to increase the width of the right sidebar by 70px?

    Thanks!

    #282111

    Hey!

    Thank you for the update.

    Please add this on functions.php in order to increase the sidebar width:

    
    
    function avia_increase_sidebar_size() {
    	global $avia_config;
    	
    	$avia_config['layout']['fullsize'] 		= array('content' => 'twelve alpha', 'sidebar' => 'hidden', 	 'meta' => 'two alpha', 'entry' => 'eleven');
    	$avia_config['layout']['sidebar_left'] 	= array('content' => 'eight', 		 'sidebar' => 'four alpha' ,'meta' => 'three alpha', 'entry' => 'eight');
    	$avia_config['layout']['sidebar_right'] = array('content' => 'eight alpha',   'sidebar' => 'four alpha', 'meta' => 'three alpha', 'entry' => 'eight alpha');
    }
    add_action( 'init', 'avia_increase_sidebar_size', 1);
    

    Regards,
    Ismael

    #282160

    Thanks! Before I do this, what do I do when complete?

    Does this:
    1) turn on some toggle or field in settings that I need to enter values for the width of the main body and sidebar? Or…
    2) does this manually make the change? If so, which numbers are the values to set the main content width and which are the values for the sidebar width? I’ll need to adjust a little once I see how the contents look.

    Thanks!

    #282162

    (Sorry for the 2-part Question)

    Also, the Dev Team at WPMU Plugins are asking about the theme’s sidebar functionality. Their question is as follows:

    My question was:
    “I am using the professional theme Enfold and with this theme you can choose whatever sidebar you like in blog posts or page posts.

    You can easily choose Sidebar under Edit Post > Layout > Sidebar Setting. See link below:
    https://www.dropbox.com/s/uzgryvhsdcpgu9n/layout.png

    However with the Fundraiser Post Plugin, the option for Layout is missing entirely. I do not think the theme is the issue, but see link below:
    https://www.dropbox.com/s/fw2k0p8ydgpusrv/campaign%20post.png”

    Their response and question to you:
    “Does the Enfold theme support custom post types for its layouts? Or is it just for posts and pages? From its product page it doesn’t seem like it supports these. Have you tried it with any other custom post type? (besides WooCommerce products… I believe it supports these). Have you tried contacting the theme developer on this one?? Perhaps their insights would help us resolve this and add support for all custom post types…”

    #282286

    Hey!

    1) There’s no setting for the sidebar/content width. You can use the code Ismael posted here: https://kriesi.at/support/topic/creating-and-using-a-different-sidebar/#post-282111 to change the sidebar width. If you want to change it again you need to edit the code. You can place the code into the functions.php file (child theme functions.php or enfold/functions.php).

    2)

    
    function avia_increase_sidebar_size() {
    	global $avia_config;
    	
    	$avia_config['layout']['fullsize'] 		= array('content' => 'twelve alpha', 'sidebar' => 'hidden', 	 'meta' => 'two alpha', 'entry' => 'eleven');
    	$avia_config['layout']['sidebar_left'] 	= array('content' => 'eight', 		 'sidebar' => 'four alpha' ,'meta' => 'three alpha', 'entry' => 'eight');
    	$avia_config['layout']['sidebar_right'] = array('content' => 'eight alpha',   'sidebar' => 'four alpha', 'meta' => 'three alpha', 'entry' => 'eight alpha');
    }
    add_action( 'init', 'avia_increase_sidebar_size', 1);
    

    To change the sidebar size you need to replace “eight” and “four” with a different value. I.e. change “eight” to “nine” and “four” to “three” to decrease the width of the sidebar. You can also replace “eight” with “seven” and “four” with “five” to increase the width of the sidebar. Note that you must not exceed the width of “twelve” units because our css grid just supports twelve units in one row. If you want to change the sidebar size for a certain post type only add a post type check to the function like:

    
    function avia_increase_sidebar_size() {
    	global $avia_config;
    	if(get_post_type() != "mycpt") return;
    
    	$avia_config['layout']['fullsize'] 		= array('content' => 'twelve alpha', 'sidebar' => 'hidden', 	 'meta' => 'two alpha', 'entry' => 'eleven');
    	$avia_config['layout']['sidebar_left'] 	= array('content' => 'eight', 		 'sidebar' => 'four alpha' ,'meta' => 'three alpha', 'entry' => 'eight');
    	$avia_config['layout']['sidebar_right'] = array('content' => 'eight alpha',   'sidebar' => 'four alpha', 'meta' => 'three alpha', 'entry' => 'eight alpha');
    }
    add_action( 'init', 'avia_increase_sidebar_size', 1);
    

    and replace “mycpt” with your post type.

    3) By default Enfold supports the layout options only for posts and pages because you must create a custom template (i.e. based on page.php and loop-page.php or single.php and loop-index.php) to use the layouts with another post type. Then you can use this code:

    
    add_filter('avf_builder_boxes','custom_post_types_options');
    function custom_post_types_options($boxes)
    {
    	$boxes[1]['page'][] = 'mycpt';
    	return $boxes;
    }
    

    to add the layout options to the cpt editor screen. Probably these options won’t work properly if you do not use a cpt template based on page.php and loop-page.php or single.php and loop-index.php…

    Regards,
    Peter

    #551990

    Hello Enfold Support,
    My question is related but more about changing the width of the sidebar for an individual page. Is this possible? Currently the theme doesn’t provide the ability to changed the width of the sidebar at the page level but throughout the entire site. Thanks in advance for any help you can provide.

    #552156

    Hey @kbreslin!

    Can you please create another thread including a link to your site.

    Cheers!
    Josue

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