boro2g
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Thats resolved the issue – thanks!
FYI if anyone else needs the fix, the change left the determineReplacements function beginning:
function determineReplacements($defaults){ //posts if(is_single()){ //print_r("Single"); //Post-type sidebar if($this->replacements_todo > 0){ $post_type = get_post_type($post); foreach($this->replaceable_sidebars as $sidebar){ if(isset($defaults['post_type_posts'][$post_type]) && isset($defaults['post_type_posts'][$post_type][$sidebar])) $this->replacements[$sidebar] = array($defaults['post_type_posts'][$post_type][$sidebar], 'defaults', $post_type); $this->replacements_todo--; } } //Post sidebar global $post; $replacements = get_post_meta($post->ID, $this->postmeta_key, TRUE); foreach($this->replaceable_sidebars as $sidebar){ if(is_array($replacements) && !empty($replacements[$sidebar])){ $this->replacements[$sidebar] = array($replacements[$sidebar], 'particular', -1); $this->replacements_todo--; } } //Parent sidebar if($post->post_parent != 0 && $this->replacements_todo > 0){ $replacements = get_post_meta($post->post_parent, $this->postmeta_key, TRUE); foreach($this->replaceable_sidebars as $sidebar){ if(!$this->replacements[$sidebar] && is_array($replacements) && !empty($replacements[$sidebar])){ $this->replacements[$sidebar] = array($replacements[$sidebar], 'particular', -1); $this->replacements_todo--; } } } //Category sidebar global $sidebar_category; if($this->replacements_todo > 0){ $categories = $this->getSortedCategories(); $i = 0; while($this->replacements_todo > 0 && $i < sizeof($categories)){ foreach($this->replaceable_sidebars as $sidebar){ if(!$this->replacements[$sidebar] && !empty($defaults['category_posts'][$categories[$i]->cat_ID][$sidebar])){ $this->replacements[$sidebar] = array($defaults['category_posts'][$categories[$i]->cat_ID][$sidebar], 'category_posts', $sidebar_category); $this->replacements_todo--; } } $i++; } } return;
Its worth noting, if I iterate through the registered sidebars using
<?php foreach ( $GLOBALS['wp_registered_sidebars'] as $existingSidebars ) { echo ucwords( $existingSidebars['id'] ); } ?>
I see:
Sidebar-1
Sidebar-2
Sidebar-3
Sidebar-4
Sidebar-5I’ve tried replacing
`<?php dynamic_sidebar( ‘top-right-column’ );?>’
with
‘<?php dynamic_sidebar( ‘Sidebar-3′ );?>’But still get the same thing unfortunately.
Viewing 2 replies - 1 through 2 (of 2 total)