WordPress.org

Forums

Remove the Private Label (6 posts)

  1. rosemckay
    Member
    Posted 6 years ago #

    Hello,
    I'm wondering if it's possible to remove the word "Private" before the titles of posts and pages that are marked private in the back-end. Where is this set (ie. which file and line of code)? I can't seem to find it. Is it possible to replace the text with an image? Thanks for any help you can give.

  2. main1media
    Member
    Posted 6 years ago #

    i also need this answer

  3. Ben Sutcliffe
    Member
    Posted 6 years ago #

    This will be set in index.php, archive.php, category-x.php, search.php - where they exist in your template.

    It will appear before the call for the_title().

    A link to your site will allow me to direct you to the actual lines.

  4. lonewolfonline
    Member
    Posted 6 years ago #

    I need this as well.

    I don't think it is set in the index.php because the output from the_title produces "Private: Post Title".

    There must be a filter or hook that is set some place and needs removing.

    Failing that, take a look at wp-includes/post-template.php around line 115 is the code that adds the "Private: " to the title. I simply commented it out. I'm closing my site anyway and as I move content off I just set it to private and put on a redirect. This way I know what I have done and what I haven't.

    Hope that helps
    Tim

  5. t31os
    Member
    Posted 6 years ago #

    I answered this question in another thread...

    Here.
    http://wordpress.org/support/topic/257930

    Hope that helps.

  6. PSG
    Member
    Posted 5 years ago #

    Easier way out
    a Plugin called 'Exclude Pages'
    works super and easy no codes or core files to mess with.

    http://wordpress.org/extend/plugins/exclude-pages/

    Cheers
    P

Topic Closed

This topic has been closed to new replies.

About this Topic