• Great work on the theme! The community really owes you.

    I have built a beautiful website using your theme. I really love the feature to select unique sidebars for each page. Is there a way that I can use unique sidebar titles depending on the page too? How do I do this

    Thanks in advance

Viewing 9 replies - 1 through 9 (of 9 total)
  • for example sidebar.php
    better to use a chield-theme
    in the file sidebar.php
    <p> <? php _e ('Follow:', 'hueman'); ?> </ p>
    replaced by:

    <?php
    $pgslg = the_slug();
    if ( $pgslg == 'aboutt') {
    $namesdb = 'NO_FOLLOW:';
    }
    else {
    $namesdb = 'FOLLOW:';
    }
    ?>
    <p><?php _e($namesdb ,'hueman'); ?></p>

    where:
    aboutt – slug of your page
    NO_FOLLOW: – the name of the sidebar at the coincidence of slug
    FOLLOW: – the name of the sidebar when no coincidence slug

    or

    <?php
    $pgslg = basename(get_permalink());
    if ( $pgslg == 'aboutt') {
    $namesdb = 'NO_FOLLOW:';
    }
    else {
    $namesdb = 'FOLLOW:';
    }
    ?>
    <p><?php _e($namesdb ,'hueman'); ?></p>

    Thread Starter genothampi

    (@genothampi)

    Hello There,

    Thanks for the response. However, I was not able to find the line

    <p> <? php _e (‘Follow:’, ‘hueman’); ?> </ p>

    in the sidebar.php file

    looking attentively

    Thread Starter genothampi

    (@genothampi)

    <?php
    	$sidebar = alx_sidebar_primary();
    	$layout = alx_layout_class();
    	if ( $layout != 'col-1c'):
    ?>
    
    	<div class="sidebar s1">
    
    		<a class="sidebar-toggle" title="<?php _e('Expand Sidebar','hueman'); ?>"><i class="fa icon-sidebar-toggle"></i></a>
    
    		<div class="sidebar-content">
    
    			<div class="sidebar-top group">
    				<p><?php _e('Get Updates','hueman'); ?></p>
    				<?php alx_social_links() ; ?>
    			</div>
    
    			<?php if ( ot_get_option( 'post-nav' ) == 's1') { get_template_part('inc/post-nav'); } ?>
    
    			<?php if( is_page_template('page-templates/child-menu.php') ): ?>
    			<ul class="child-menu group">
    				<?php wp_list_pages('title_li=&sort_column=menu_order&depth=3'); ?>
    			</ul>
    			<?php endif; ?>
    
    			<?php dynamic_sidebar($sidebar); ?>
    
    		</div><!--/.sidebar-content-->
    
    	</div><!--/.sidebar-->
    
    	<?php if (
    		( $layout == 'col-3cm' ) ||
    		( $layout == 'col-3cl' ) ||
    		( $layout == 'col-3cr' ) )
    		{ get_template_part('sidebar-2'); }
    	?>
    
    <?php endif; ?>

    Hello Moonkir, This is how the code of sidebar.php looks like

    <p><?php _e(‘Get Updates’,’hueman’); ?></p>

    bdbrown

    (@bdbrown)

    You could try this. Change “000” to the page id for each page:

    .page-id-000 .s1 .sidebar-top p:first-child,
    .page-id-000 .s2 .sidebar-top p:first-child {
      display: none;
      }
    
    .page-id-000 .s1 .sidebar-top:after {
      content: "New Heading Left";
      }
    
    .page-id-000 .s2 .sidebar-top:after {
      content: "New Heading Right";
      }
    
    .page-id-000 .s1 .sidebar-top:after,
    .page-id-000 .s2 .sidebar-top:after {
      padding: 5px 0;
      color: #fff;
      font-size: 18px;
      font-weight: 600;
    }
    pmpksamy

    (@pmpksamy)

    how to change side bar width @ height…

    bdbrown

    (@bdbrown)

    @pmpksamy – you should start another thread with a separate topic.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Unique sidebar title for each page’ is closed to new replies.