Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Removing Title on Home Page in Thematic WordPress

  • SOLVED

Hello,

Can you help me to remove the word "Home" at the top of this page?:

http://faculty.washington.edu/swelland/wordpress/

When you just remove the title, thereby leaving the page without a title, it leaves a blank spacer in the menu bar at the top, which is not a workable option.

Any help you can offer would be very much appreciated!!

Thank you!

Warm regards,
Andrea

Answers (6)

2010-10-20

Denzel Chia answers:

Hi,

Thematic is full of filter and hooks, you need to get to the right one.
If you created your home page by creating a page named Home and making it the Home page by going to settings>reading>and select home page under static display, then my following code is your solution.

Open up functions.php
add the following code at the beginning of the file, below <?php.


function my_new_header($postheader) {

global $post;

if ( is_404() || $post->post_type == 'page') {
if(!is_front_page()){
$postheader = thematic_postheader_posttitle();
}
} else {
$postheader = thematic_postheader_posttitle() . thematic_postheader_postmeta();
}


}
add_filter('thematic_postheader','my_new_header');


You just need to filter thematic_postheader to make it disappear from front page.

Attached screenshot as prove of script working.

Thanks.


Denzel Chia comments:

To all experts,

Although this is a 4 dollar question, please do not make wild guesses, or tell asker to delete codes, which may cause php errors that asker may not be able to repair!

Thematic theme is a frame work with hooks or filters, you need to write actions or filters to alter any code in the theme, so as to make it work properly.

Please spent sometime to understand thematic framework and autofocus pro theme, so that questions to these themes may be answered properly. As you can see, there were many questions posted before regarding thematic framework.

Thanks.


Denzel Chia comments:

@rilwis

Hi,

I am the answerer here not the asker. Just shouting out to all experts here.
By the way your code works too, just that asker need to find out the page Id,
My answer does not need to look for page Id, it just hides title from front page.

Thanks.

2010-10-19

MagoryNET answers:

In your theme directory find index.php and edit it - find something like that:

<h1 class="entry-title"><?php the_title() ?></h1>

And change it to:

<?php if(!is_home()) { ?> <h1 class="entry-title"><?php the_title() ?></h1><?php } ?>


Andrea Koprowicz comments:

Thank you for your quick reply! I don't see the code that you mention. Maybe I'm just not seeing it??

The index.php file reads:

<?php

// calling the header.php
get_header();

// action hook for placing content above #container
thematic_abovecontainer();

?>

<div id="container">
<div id="content">

<?php

// create the navigation above the content
thematic_navigation_above();

// calling the widget area 'index-top'
get_sidebar('index-top');

// action hook for placing content above the index loop
thematic_above_indexloop();

// action hook creating the index loop
thematic_indexloop();

// action hook for placing content below the index loop
thematic_below_indexloop();

// calling the widget area 'index-bottom'
get_sidebar('index-bottom');

// create the navigation below the content
thematic_navigation_below();

?>

</div><!-- #content -->
</div><!-- #container -->

<?php

// action hook for placing content below #container
thematic_belowcontainer();

// calling the standard sidebar
thematic_sidebar();

// calling footer.php
get_footer();

?>


MagoryNET comments:

Looks like Thematic theme is quite non-standard theme. In that case I can't help. You would have to search where it writes <h1 class="entry-title"> in the code of all the theme files.

2010-10-19

John Cotton answers:

Looking at the output, my guess is that the HTML is being generated in one of these two functions:

// action hook for placing content above the index loop
thematic_above_indexloop();

// action hook creating the index loop
thematic_indexloop();


...probably the 2nd.

Regardless, search your PHP files for class="entity-title" and you'll find the place and then change it to

<?php if(!is_home()) { ?> <h1 class="entry-title"><?php the_title() ?></h1><?php } ?>

as MagoryNET suggested.




2010-10-19

Mike Truese answers:

Look instead in header.php for this code bit - titles are usually set in header, not index or page.

Good luck!

2010-10-20

Marvin Shaker answers:

GO to the theme directory

Then Open Up The Folder library

Then Open up The Folder extensions

Edit The File header-extensions.php

Find This Line and Delete it

<div id="blog-title"><span><a href="<?php bloginfo('url') ?>/" title="<?php bloginfo('name') ?>" rel="home"><?php bloginfo('name') ?></a></span></div>
Then make a new page Call it Home and make it redirect to the homepage using a redirection plugin

2010-10-20

rilwis answers:

Hi Denzel Chia,

I suggest using Thematic filter to remove the post title at homepage.

I see that you used a page for front page with slug "141-2" and id "141", so I made a filter to do what you need like this:

add_filter('thematic_postheader', 'remove_home');

function remove_home($postheader) {
if (is_page('141')) { // change this into your page slug or id
return '';
}
return $postheader;
}