WordPress.org

Ready to get started?Download WordPress

Forums

Pinboard
Highlight bar when exploring Pages (1 post)

  1. PirataRX
    Member
    Posted 8 months ago #

    Hi since a few days... i'm trying to show the "highlight bar" in pages, i found the code that make this possible, by default this bar is shown when exploring categories, tags and archives, i want to display it too when exploring pages, except in homepage (in homepage i got the default slider and show the highlight bar will overload it).

    Here i got the code,

    function pinboard_current_location() {
    	global $pinboard_page_template;
    	if ( ! ( is_home() && ! is_paged() ) && ! is_singular() || isset( $pinboard_page_template ) ) {
    		if( is_author() )
    			$archive = 'author';
    		elseif( is_category() || is_tag() ) {
    			$archive = get_queried_object()->taxonomy;
    			$archive = str_replace( 'post_', '', $archive );
    		} else
    			$archive = ''; ?>
    		<hgroup id="current-location">
    			<h6 class="prefix-text"><?php _e( 'Estas Explorando', 'pinboard' ); ?> <?php #echo $archive; ?></h6>
    			<<?php pinboard_title_tag( 'location' ); ?> class="page-title">
    				<?php if( isset( $pinboard_page_template ) ) {
    					echo the_title();
    				} elseif( is_search() ) {
    					__( 'Search results for', 'pinboard' ) . ': &quot;' .  get_search_query() . '&quot;';
    				} elseif( is_author() ) {
    					$author = get_userdata( get_query_var( 'author' ) );
    					echo $author->display_name;
    				} elseif ( is_year() ) {
    					echo get_query_var( 'year' );
    				} elseif ( is_month() ) {
    					echo get_the_time( 'F Y' );
    				} elseif ( is_day() ) {
    					echo get_the_time( 'F j, Y' );
    				} elseif ( is_page() ) {
    				    echo "I want show the title page!";
    				} else {
    					single_term_title( '' );
    				}
    				if( is_paged() ) {
    					global $page, $paged;
    					if( ! is_home() )
    						echo ', ';
    					echo sprintf( __( 'Page %d', 'pinboard' ), get_query_var( 'paged' ) );
    				}
    				?>
    			</<?php pinboard_title_tag( 'location' ); ?>>
    			<?php if(is_category() || is_tag() || is_tax()) : ?>
    				<div class="category-description">
    					<?php echo term_description();  ?>
    				</div>
    			<?php endif; ?>
    		</hgroup>
    		<?php
    	}
    }

    if you see...

    elseif ( is_page() ) {
    	   echo "I want show the title page!";
    			}
    That's what i add to the code and this don't work, need help in order to do all the above.

    Thanks in advance.

Reply

You must log in to post.

About this Theme

About this Topic