ThemeShaper Forums » Thematic

[closed]

'Edit' link on bottom of Pages

(6 posts)
  • Started 2 years ago by andycheeseman
  • Latest reply from andycheeseman
  • This topic is resolved
  1. Hi,

    I can't seem to find where the 'Edit' (hover 'edit page') link is being generated from at the bottom of page's. This doesn't happen on individual posts. I've been through content-extensions.php many time but I'm stumped.

    Any suggestions would be grand.

    Thanks,
    Andy.

    Posted 2 years ago #
  2. fwunder
    Member

    hi @andycheeseman

    I think what you are looking for is a wordpress core function: function edit_post_link()

    It's only shown to logged in admins. If it's annoying you, can't you simply add this to your css?

    .page .edit-link {
        display: none;
    }
    Posted 2 years ago #
  3. it is in page.php

    when you can't find something try searching files (you are hopefully using a decent text editor such as notepad++ ) for the html markup... so IDs and CLASSes. in this instance the class equals edit-link which would bring you right to page.php if you didn't think to look there after realizing that it was appearing on pages and wasn't in content-extensions anywhere.

    Posted 2 years ago #
  4. Thanks. I'm using TextWrangler on the mac and 'inspecting elements' in google chrome to try and trace original code. Is it possible to use functions.php to somehow filter or remove the code from page.php, or is this a case of just duplicating page.php in my child theme?

    Posted 2 years ago #
  5. yes you could duplicate page.php if you are desperate to remove it. as fwunder said, it doesn't appear if you aren't logged in.

    digging into the wordpress codex (since this isn't a thematic function)

    it appears you might be able to wipe it out with

    function kia_kill_edit_link(){
    //sound of one hand clapping
    }
    add_filter('get_edit_post_link','kia_kill_edit_link');

    untested, ymmv

    Posted 2 years ago #
  6. Thanks.

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.