Skip to content

Commit

Permalink
fixed page sidebar issue
Browse files Browse the repository at this point in the history
  • Loading branch information
davy440 committed May 9, 2024
1 parent 0a1fa03 commit ce711d0
Show file tree
Hide file tree
Showing 22 changed files with 17,882 additions and 17,447 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,7 @@ Just Install the Theme from the WordPress Repository.
* v2.5.2
Code Sorting and Bug Fixes

* v2.5.3
Fixed Page Sidebar issue

Good luck!
35,234 changes: 17,831 additions & 17,403 deletions assets/cache/google-web-fonts.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/min/bigSlide.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/min/color-alpha.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/min/custom.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/min/customize_controls.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/min/customizer.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/min/dismiss-notice.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/min/jquery.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/min/navigation.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/min/owl.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/min/plugins-install.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/min/property-map.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/min/property.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/min/typography.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

if ( ! defined( 'ITRE_VERSION' ) ) {
// Replace the version number of the theme on each release.
define( 'ITRE_VERSION', '2.5.2' );
define( 'ITRE_VERSION', '2.5.3' );
}

/**
Expand Down
3 changes: 2 additions & 1 deletion inc/css-mods.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ function itre_custom_css() {
$css .= 'body.post-type-archive-property #secondary, body.tax-location #secondary, body.tax-property-type #secondary {width: ' . $secondary_width . ';}';
}

if (!is_front_page() && is_page() && is_active_sidebar('sidebar-page') && get_post_meta(get_the_ID(), 'enable-sidebar', true) !== '' ) {

if (!is_front_page() && is_page() && is_active_sidebar('sidebar-blog') && get_post_meta(get_the_ID(), 'enable-sidebar', true) !== '' ) {
$css .= 'body.page-template-default #primary {width: ' . $primary_width . ';}';
$css .= 'body.page-template-default #secondary {width: ' . $secondary_width . ';}';
}
Expand Down
8 changes: 4 additions & 4 deletions inc/template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function itre_body_classes( $classes ) {
}

// Adds a class of no-sidebar when there is no sidebar present.
if ( is_home() && is_active_sidebar( 'sidebar-blog' ) && !empty(get_theme_mod('itre_blog_sidebar_enable', '') ) ) {
if ( ( is_home() && is_active_sidebar( 'sidebar-blog' ) && !empty(get_theme_mod('itre_blog_sidebar_enable', '') ) ) ||
!is_front_page() && is_page() && is_active_sidebar( 'sidebar-blog' ) && get_post_meta( get_the_ID(), 'enable-sidebar', true ) ) {
$classes[] = 'has-sidebar';
}

Expand Down Expand Up @@ -52,7 +53,7 @@ function itre_get_header() {
function itre_get_top_bar() {
?>
<div class="container-lg">
<div class="d-flex align-items-center">
<div class="d-flex align-items-center gap-3">

<div class="branding-wrapper col-7 col-sm-5 col-lg-3">
<?php get_template_part('framework/sections/header/modules/site', 'branding'); ?>
Expand Down Expand Up @@ -236,8 +237,7 @@ function itre_get_sidebar( $template ) {
if ( is_page() &&
!is_front_page() &&
'' !== get_post_meta($post->ID, 'enable-sidebar', true) ) {

get_sidebar('null', ['page' => 'page']);
get_sidebar('null', ['page' => '']);
}
break;
default:
Expand Down
Loading

0 comments on commit ce711d0

Please sign in to comment.