Community Forums › Forums › Design Tips and Tricks › Executive Child Theme – Remove Page Title
This topic contains 7 replies, has 4 voices, and was last updated by facupuig 5 months, 2 weeks ago.
-
AuthorPosts
-
November 25, 2012 at 8:18 pm #1665
Hi there, I tried to remove using the following code:
/** Remove page titles */
add_action( ‘get_header’, ‘child_remove_page_titles’ );
function child_remove_page_titles() {
if ( is_page() && ! is_page_template( ‘page_blog.php’ ) )
remove_action( ‘genesis_post_title’, ‘genesis_do_post_title’ );
}place that code in the functions.php, but it tells me:
Parse error: syntax error, unexpected T_STRING in /home/user/public_html/wp-content/themes/executive/functions.php on line 190
How can I fix it? Thank you
November 25, 2012 at 8:26 pm #1666There are no erros in what you posted. Where did you place it? Did you try at the very end?
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
November 26, 2012 at 10:04 am #1720Yup at the very end.
November 27, 2012 at 3:06 pm #1928Which theme are you using? Is there “?>” at the end of the functions file? If so you need to keep everything before that.
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
November 30, 2012 at 11:38 pm #2731Hi. I am having a similar problem. I tried to add the suggested code to remove the author box on single posts and I got this error:
Parse error: syntax error, unexpected $end in /home/vietnam/public_html/wp-config.php on line 1
So I tried to follow Nick’s tips and tricks tutorial for wp-config debugging and I also deleted my functions.php using filezilla and re-uploaded it. I also checked for the ?> and it’s not there. After all this, I still have the dreaded white screen.
Can you help me figure out what the heck I am doing wrong?
http://216.172.181.96/~vietnam
Thank you!
December 1, 2012 at 9:57 pm #2825@SoZo I am using the Exceutive Child Theme, you can take a look at http://www.souldrivers.net and there is no “?>” at the end of the file, should I add that?
Thank you.
December 1, 2012 at 10:15 pm #2827if you tried using
add_action( ‘genesis_before’, ‘child_remove_page_titles’ );instead ofadd_action( ‘get_header’, ‘child_remove_page_titles’ );?
Ozzy Rodriguez | Twitter | Google+ | Facebook
December 3, 2012 at 3:59 pm #3143I got it! Coda was pasting
add_action( 'genesis_before', 'child_remove_page_titles' );
function child_remove_page_titles() {
if ( is_page() && ! is_page_template( 'landing.php' ) )
remove_action( 'genesis_post_title', 'genesis_do_post_title' );
}
Instead of && was &&I fixed that and it is working, now… what is the difference between ‘genesis_before’ and ‘get_header’ for this matter?
Thank you!!!
-
AuthorPosts
The topic ‘Executive Child Theme – Remove Page Title’ is closed to new replies.