Okay
  Public Ticket #1306857
I'd like to be able to hide post titles.
Closed

Comments

  • graemedt started the conversation

    Hey, I'd like to be able to include a title in my posts, but hide the title text both on the banner of each post, but also on the main page. 

    I've included screenshots of how I want it to look, which is how it looks right now. I need to put titles in for each post for search engines, but If I do this, it adds text that I don't want. 

    How can I fix this? 

  •  522
    Nikita replied

    Hi.

    You can hide it using css. For example, add class on your title, that you want to hide:

    <h1 class="sr-only">Hidden Title</h1>
    

    It will be visible for search engines and screan readers only.

    Best regards, nK.

  • graemedt replied

    Great. Thanks very muck Nikita. Always really helpful. Love the theme by the way. 


    One other thing. I'm a beginner at this, so humour me. For the NK Recent Posts, on my main page, is it the same? 

  • graemedt replied

    Here is an image of what I mean. Where it says 'no title' on the image, it is blank if I leave my post title blank. If I input a title, it shows the title in the NK recent posts, which I'd like to remove. Thanks! 

  •  522
    Nikita replied

    You can also use this classname sr-only for recent-posts titles (and for any other elements on your page it will work).

  • graemedt replied

    Hey Nikita, 

    Thanks for that. Sorry to bother you with another question, but I'm a beginner at editing this stuff. 

    Where would I edit the CSS to change this? Is it on the individual post? is it in the stylesheet for the theme? I've tried a few places, but it hasn't worked. 


  •  522
    Nikita replied

    It is classname to place in php code. Where you removed the titles, you need to move it back and add this classname.

  • graemedt replied

    Hey, 

    I've been trying to change the CSS, but the titles still show. Where should I be editing the CSS? In the editor in WP admin? 

    Or in the files on my FTP? And if so which files? 

  •  522
    Nikita replied

    Hi.

    Ah, I thinking that you already changed theme files and understand what I talking about.

    Ok, we can hide these titles using custom CSS:

    .youplay-news .bottom-info h3 {
        display: none;
    }
    

    This css you can add in wp_admin > Youplay > Options > General

  • graemedt replied

    Ahhhh that worked. Awesome! 

    Also figured out how to adapt that to hide the titles on the posts: 

    .youplay-banner-parallax .info h1 {
        display: none;
    }

    Thanks very much for the help.