Improve sidebar inclusion
This commit is contained in:
parent
b07325d47e
commit
2b97a1c024
@ -694,6 +694,9 @@ Fires before closing the site’s `<main>` container.
|
||||
**Parameters:**
|
||||
* $context (string|null) – Context of the action call, typically related to the template. Unsafe.
|
||||
|
||||
**Hooked Actions:**
|
||||
* `fictioneer_sidebar() – Renders the sidebar if enabled (depends on location). Priority 10.
|
||||
|
||||
---
|
||||
|
||||
### `do_action( 'fictioneer_main_wrapper' )`
|
||||
|
@ -311,7 +311,11 @@ function fictioneer_sidebar( $context ) {
|
||||
}
|
||||
|
||||
if ( ! get_option( 'fictioneer_disable_all_widgets' ) ) {
|
||||
add_action( 'fictioneer_main', 'fictioneer_sidebar' );
|
||||
if ( get_theme_mod( 'sidebar_style' ) === 'right' ) {
|
||||
add_action( 'fictioneer_main_end', 'fictioneer_sidebar' );
|
||||
} else {
|
||||
add_action( 'fictioneer_main', 'fictioneer_sidebar' );
|
||||
}
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
|
Loading…
x
Reference in New Issue
Block a user