- This topic has 23 replies, 4 voices, and was last updated 11 years, 2 months ago by Sanjip Shah.
-
AuthorPosts
-
September 30, 2013 at 8:00 am #4286Sanjip ShahParticipant
@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 } } ?>
September 30, 2013 at 9:30 am #4288PetrichorParticipantI 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?
September 30, 2013 at 10:43 am #4290Sanjip ShahParticipant@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.
October 1, 2013 at 3:22 pm #4314PetrichorParticipantUgh! 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)!
October 2, 2013 at 7:44 am #4337Sanjip ShahParticipant@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');
October 2, 2013 at 9:10 am #4341PetrichorParticipantIt all works! I must have had a typo in my child style.css
Thank you.October 3, 2013 at 7:25 am #4376Sanjip ShahParticipant@Petrichor Okay. Great!
October 9, 2013 at 5:57 pm #4529PetrichorParticipantIs there a way to make a blog post’s title in the breadcrumbs bar?
October 11, 2013 at 2:28 am #4553Sanjip ShahParticipant@Petrichor The customization in this case will be similar, please hire a developer on this one.
-
AuthorPosts
- You must be logged in to reply to this topic.