Code Monkey home page Code Monkey logo

Comments (8)

vguenichon avatar vguenichon commented on May 29, 2024

And why the full width template is not full width... I thought it will remove the left sidebar.
I tried to unregister secondary nav and primary sidebar without success.

from unyson.

sergiubagrin avatar sergiubagrin commented on May 29, 2024

Hi @vguenichon,

Q: And why the full width template is not full width... I thought it will remove the left sidebar.
A: I suppose you mean this template: http://screencast.com/t/Fil4wnn91N. Unyson frontend is based on default wordpress theme Twenty Fourteen. Full width page template for this theme is working in this way. We made a mistake when started with Twenty Fourteen. We plan in future to create a custom template.

Q: I give it a try actually and I discovered there's no main widgets area... even in the testlab site.
A: Like you can see int his screenshot: http://screencast.com/t/nZPUHPGK7ry it is possible to create specific widget area for specific page, category. From my point of view a default widget area is not relevant it can be created when it is needed.

Q: But there's still a container (secondary) for a sidebar (primary) in the frontend.
A: In order to add/remove sidebars it is needed to make small changes for your theme: https://github.com/ThemeFuse/Unyson/blob/master/scratch-parent/framework-customizations/extensions/sidebars/config.php
Unyson Docs link: http://unyson-docs.themefuse.com/en/latest/extension/sidebars/index.html

from unyson.

vguenichon avatar vguenichon commented on May 29, 2024

I understand the different choices a company had to do. These were just questions, and with your answers I can imagine further how I should apprehend the development of my child theme.
Thanks for your very fast feedback !

from unyson.

vguenichon avatar vguenichon commented on May 29, 2024

One more thing : Is there a way for me to modify the config of the sidebars without editing the parent theme ? Should I copy the file with the same hierarchy ?

from unyson.

 avatar commented on May 29, 2024

Is there a way for me to modify the config of the sidebars without editing the parent theme ? Should I copy the file with the same hierarchy ?

Create the file with the same hierarchy

child-theme/framework-customizations/extensions/sidebars/config.php

and overwrite any config key

$cfg = array();

$cfg['sidebar_positions'] = array(...);

from unyson.

vguenichon avatar vguenichon commented on May 29, 2024

It was the way I planned to do it ;-) This subject is closed !

from unyson.

vguenichon avatar vguenichon commented on May 29, 2024

Well, it's not closed at all.
Modifying the config of the sidebars extension in the framework does just change the possibilities on the creation of sidebars.
But for now, I want to unregister the primary sidebar, which exist in the frontend (there's the container) and the menu location (the whole left sidebar), without hiding it with CSS. I tried to achieve it with some common wordpress functions but it doesn't work at all.

function remove_some_widgets(){
    unregister_sidebar('primary');
}
add_action( 'widgets_init', 'remove_some_widgets', 20 );

function wpse_remove_parent_theme_locations(){
    unregister_nav_menu( 'secondary' );
}
add_action( 'after_setup_theme', 'wpse_remove_parent_theme_locations', 20 );

from unyson.

vguenichon avatar vguenichon commented on May 29, 2024

I get rid of that by creating new templates... that will do the trick in a more stable way, especially when the parent theme will be updated

from unyson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.