• I’m using WordPress v3.4 and a Child-Theme based off of Twenty Ten v1.4

    To remove the page titles I did the recommended CSS entry…
    display: none;
    …to make sure the page titles aren’t showing.

    However this has the adverse effect of removing the titles of my posts on the blog page as well. Not what I wanted at all.

    How can I remeedy this? Is there an updated method that’s known, as I’ve done some searching and can only find old methods that don’t apply anymore.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Change the CSS selector so it only targets the page titles. (If you need more specific help, you’ll need to post a link to your site.)

    Thread Starter Brandon Moner

    (@ctvonline)

    @wpyogi

    As I posted above, the .entry-title CSS class selector did not work for what I needed.

    I can’t post a link to the site because I’m building locally. This is the final step in my page completion, and it’s holding me up.

    It’s not a seriously customized theme and uses the default Twenty Ten v1.4 as a base. I just need to know how to remove the page titles without it affecting the titles of the blog posts.

    On the page.php file, add your own custom class to whatever is encapsulating the title. Then in the CSS file, add display:none to your custom class. Or even simpler, just remove the_title() from the page.php file.

    Brian

    Thread Starter Brandon Moner

    (@ctvonline)

    This is the full, unaltered code from the newest Twenty Ten v1.4 theme. Please tell me where any of these arguments are located from within this file, because I’m not finding any:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

    I’ve been through the forums and Google and, so far, you guys are telling me the outdated information that obviously does not apply to version 1.4 of this theme. So either my page.php seems to not have this, or something in page.php has changed since WordPress release 3.1.x (which seems to be where I’m finding outdated information for) that has NOT been carried over to release 3.4.

    Open up the file loop-page.php

    modify:

    <?php if ( is_front_page() ) { ?>
    						<h2 class="entry-title"><?php the_title(); ?></h2>
    					<?php } else { ?>
    						<h1 class="entry-title"><?php the_title(); ?></h1>
    					<?php } ?>

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Unless you want to lose your changes at the next theme update, make a child theme first.

    https://codex.www.ads-software.com/Child_Themes

    It’s easy to do and will save you grief later on.

    @jan Dembowski totally forgot about that. Thanks!

    Thread Starter Brandon Moner

    (@ctvonline)

    So…anyone at all? I mean is this something that just can’t be done? I’m not understanding why I can’t seem to get this done WITHOUT using a plug-in.

    this is a fundamental formatting question (unless you want to go the way with editing loop-page.php) which can be solved by utilizing the output of page specific css class(es) by the body_class() function of the theme.
    https://codex.www.ads-software.com/Function_Reference/body_class

    using a tool such as Firebug https://getfirebug.com/ would help to find this css class;

    example:

    .page .entry-title { display: none; }

    https://www.w3schools.com/css/

    Thread Starter Brandon Moner

    (@ctvonline)

    @alchymyth

    Ok thank you…

    …however…

    …where is the .page class? I know I’ve been up all night, but I was looking for something like that and couldn’t find it.

    I’d just like to know where in the CSS controlled this so i can study it more now.

    the .page class is one of the classes output by body_class() if the viewer is on a static page;

    this code is in line 55 of header.php of Twenty Ten:

    <body <?php body_class(); ?>>

    I posted the link to the Codex chapter of ‘body_class()’ already.

    there might already be a few styles using this .page class in style.css of your theme; but if they are not there already, you need to add them.

    Thread Starter Brandon Moner

    (@ctvonline)

    @alchymyth

    Thank you again so much! I would’ve been stuck on that forever lol.

    Uploading the site tonight. I’ll be sure to show you how your efforts have helped me.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘HELP: Remove ONLY Page Titles from Twenty Ten v1.4?’ is closed to new replies.