WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#30805 closed defect (bug) (duplicate)

Twenty Fourteen: bug in functions.php registering the sidebar

Reported by: fmarzocca Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords:
Focuses: Cc:

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.

Change History (1)

#1 @ocean90
6 years ago

  • Component changed from General to Bundled Theme
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed
  • Summary changed from Twentyfourteen: bug in functions.php registering the sidebar to Twenty Fourteen: bug in functions.php registering the sidebar
  • Version 4.1 deleted

Duplicate of #30800.

Note: See TracTickets for help on using tickets.