• Hi, in my attempts at ridding the page title from my site pages, I went into the page.php file of my theme and deleted the following line of code: <?php the_title(); ?>

    Well, not only did this do nothing to resolve my problem, but worse – I cannot remember where it was that I deleted it from. Can someone please help me figure out where to repaste it and hopefully also help me successfully do what I set out to do in the first place – that of removing the page title from the pages themselves? I have pasted my theme’s Single Page (page.php) html code below.

    Thank you kindly!

    [Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Jay

    (@jkd987324)

    Hello, I think the quickest way to do this download the theme to your desktop, copy that code in it’s entirety from the original file into the the template.

    I believe the title tag you are looking for is likely in the header file though.

    Are you using a child theme? If not any changes will be lost when you update the theme.

    You can hide the title by adding #site-title {display: none;} css to either in the child theme css or the jetpack custom css plugin

    Thread Starter refractor999

    (@refractor999)

    Hey Jay, you were spot on with your suggestion of just copying it to the desktop, opening it up in Word and simply finding where it was originally located! Wouldn’t have even thought about doing that, but with your help it took a few seconds to relocate it. Thank you!!

    As for my second question, yes – I am using a child theme called Origin. Would I just open up the stylesheet (style.css) in Editor? Or if using jetpack, which Plugin file would I be needing to access? Are you saying I could do it one way or the other? Just where exactly would I add #site-title {display: none;}? I appreciate your help. I am a total noob in all this and am learning it for the first time. By the way, this is the header section of the css stylesheet as shown in Editor:

    [Large code excerpt removed by moderator per forum rules. Please use the pastebin for all large code excerpts. It works better anyway.]

    Thread Starter refractor999

    (@refractor999)

    https://pastebin.com/gTkrjH2y

    My Header code can be found here

    Jay

    (@jkd987324)

    Hi, I would just use the jetpack plugin, and turn on the custom CSS module. And then add any custom CSS in there.

    Cheers.

    hi, change display to none at line 49.
    [please do back up any files you want to edit before editing it]
    here is your code:

    .site-title {
        display: inline-block;
        max-width: 320px;
        font-size: 2.2em;
        font-weight: 600;
        line-height: 1.1;
        margin: 0px;
        padding: 24px;
        word-wrap: break-word;
    }

    change to

    .site-title {
        display: none;
        max-width: 320px;
        font-size: 2.2em;
        font-weight: 600;
        line-height: 1.1;
        margin: 0px;
        padding: 24px;
        word-wrap: break-word;
    }

    *note that this would affect your entire site title.
    and if you want to put back <?php the_title(); ?> you have removed before, then find a line like this:
    <h1 class="some-class-for-the-title"></h1>
    then put back your <?php the_title(); ?> between the tag marks ‘><‘.
    so it would be something like this:
    <h4 class="some-class-for-the-title"><?php the_title(); ?></h4>

    h4 can be anything like h1, h2, h3, or p or something like that, class can be id or both and the some-class-for-the-title is your class or id name.
    if you could provide your page.php code, maybe i can help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Accidentally removed a line of code and don't exactly know where to put it back’ is closed to new replies.