badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Put page title in the breadcrumbs bar

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #4286
    Sanjip Shah
    Participant

    @Petrichor Making this file wp-content/themes/attitude-pro-child/library/structure/content-extensions.php is a wrong approach.
    Making the same file name in the child theme will not overwrite the parent file so it has no meaning (as it is not a template but a fucntion extension file) and is wrong. Create the functions.php file in the child theme and paste the following code. That’s it.

    <?php
    function attitude_header_title() {
    	if( is_archive() ) {
    		$attitude_header_title = single_cat_title( '', FALSE );
    	}
    	elseif( is_404() ) {
    		$attitude_header_title = __( 'Page NOT Found', 'attitude' );
    	}
    	elseif( is_search() ) {
    		$attitude_header_title = __( 'Search Results', 'attitude' );
    	}
    	elseif( is_page_template()  ) {
    		$attitude_header_title = get_the_title();
    	}
    
    	elseif( is_page()  ) {
    		$attitude_header_title = get_the_title();
    	}
    
    	else {
    		$attitude_header_title = '';
    	}
    
    	return $attitude_header_title;
    
    }
    function attitude_theloop_for_page() {
    	global $post;
    
    	if( have_posts() ) {
    		while( have_posts() ) {
    			the_post();
    
    			do_action( 'attitude_before_post' );
    ?>
    	<section id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<article>
    
    			<?php do_action( 'attitude_before_post_header' ); ?>
    
      			<?php do_action( 'attitude_after_post_header' ); ?>
    
      			<?php do_action( 'attitude_before_post_content' ); ?>
    
      			<div class="entry-content clearfix">
        			<?php the_content(); ?>
        			<?php
        				wp_link_pages( array( 
    						'before'            => '<div style="clear: both;"></div><div class="pagination clearfix">'.__( 'Pages:', 'attitude' ),
    						'after'             => '</div>',
    						'link_before'       => '<span>',
    						'link_after'        => '</span>',
    						'pagelink'          => '%',
    						'echo'              => 1 
                   ) );
        			?>
      			</div>
    
      			<?php 
    
      			do_action( 'attitude_after_post_content' );
    
      			do_action( 'attitude_before_comments_template' ); 
    
             comments_template(); 
    
             do_action ( 'attitude_after_comments_template' );
    
             ?>
    
    		</article>
    	</section>
    <?php
    			do_action( 'attitude_after_post' );
    
    		}
    	}
    	else {
    		?>
    		<h1 class="entry-title"><?php _e( 'No Posts Found.', 'attitude' ); ?></h1>
          <?php
       }
    }
    ?>
    #4288
    Petrichor
    Participant

    I am not noticing any change. The title remains beneath the grey breadcrumbs bar, rather than in it, when I use the Default Template for a page.

    http://injestfestival.com/shows/

    Should the code be modified because I’m using the Attitude Pro template?

    #4290
    Sanjip Shah
    Participant

    @Petrichor I visited your site you are using the Attitude Pro. You need to create the child theme of the Attitude Pro and paste the above code in the child theme’s functions.php file.

    #4314
    Petrichor
    Participant

    Ugh! Thanks. I had set up the child theme, but not activated it as the theme. It works now… BUT I’ve lost the attitude pro functionality the the theme settings… Could you direct me to info for how I can set-up the attitude pro child theme without losing functions, like setting the colour of the slogan bar?

    What I have done:

    • create folder wp-content/themes/attitude-pro-child
    • create file wp-content/themes/attitude-pro-child/style.css with content @import url(“../attitude-pro/style.css”);
    • create file wp-content/themes/attitude-pro-child/functions.php with the code you provided

    Thanks for your help (and patience)!

    #4337
    Sanjip Shah
    Participant

    @Petrichor The steps that you have followed are correct.
    In the style.css file you should have the following lines.

    /*
     Theme Name:     Attitude Pro Child
     Theme URI:      http://example.com
     Description:    Description goes here.
     Author:         Example Author
     Author URI:     http://example.com
     Template:       attitude-pro
     Version:        1.0
    */
    
    /* =Imports styles from the parent theme
    -------------------------------------------------------------- */
    @import url('../attitude-pro/style.css');
    #4341
    Petrichor
    Participant

    It all works! I must have had a typo in my child style.css
    Thank you.

    #4376
    Sanjip Shah
    Participant

    @Petrichor Okay. Great!

    #4529
    Petrichor
    Participant

    Is there a way to make a blog post’s title in the breadcrumbs bar?

    #4553
    Sanjip Shah
    Participant

    @Petrichor The customization in this case will be similar, please hire a developer on this one.

Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.