Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
How to hide an element on certain pages? « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

How to hide an element on certain pages?

(2 posts)
  • Started 4 years ago by photoman
  • Latest reply from em hr
  • This topic is not resolved
  1. photoman
    Member

    I'm creating my first child theme and trying to figure out the easiest way to hide the post title on pages but not on posts.

    At the moment I'm using the css:
    h1.entry-title {
    display: none;
    }

    The problem with this is it hides the entry title on every page and post on my site. It would be great to be able to do this just with css as it would be better for SEO but if the only way is to remove the entry title on pages with an action hook then I'd be ok with that.

    Does anyone know how I would do this?

    Thanks for your help.

    Posted 4 years ago #

  2. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    em hr

    Moderator

    Use the dynamic body class. Look at the source of the page that you want the title removed from. Pick a body class name that is specific to the desired part of your site.

    Prepend the css declaration with the bodyclass like so:

    .s-category-uncategorized h1.entry-title {
    display: none;
    }

    That will remove it for all single post views that are in the uncategorized category

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183