Opened 12 years ago
Closed 12 years ago
#30805 closed defect (bug) (duplicate)
Twenty Fourteen: bug in functions.php registering the sidebar
| Reported by: | fmarzocca | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Bundled Theme | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
Description
It is not possibile to unregister the twentyfourteen sidebar in a child theme, due to the fact that in the main functions.php the sidebar registration has no priority.
After I dig for while in the theme files I found out that in the theme functions.php there is no defined priority for the sidebars registration on line 198, it looks like this:
add_action( 'widgets_init', 'twentyfourteen_widgets_init' );
and should look something like this:
add_action( 'widgets_init', 'twentyfourteen_widgets_init', 10 );
What all that means is that my code being in child theme is called before the code in the main theme functions.php and I unregister the sidebar, but then the main theme register it.
There is no priority I could assign to my unregister_sidebar as in this case it is missing in the parent theme.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Duplicate of #30800.