• 0t15r3dd1n

    (@0t15r3dd1n)


    Hi,

    I am running the 2013 theme with a child theme that removes comments. I am running a paid for membership website. I have have noticed that there is an edit icon at the top of each post and at the bottom of each page, but until today I have not tried them out. Oh boy! talk about a security issue! Clicking on the icon leads direct to the edit page, from there anyone can gain direct access to any part of the website. Naturally enough, I want to remove these icons.

    I am no programmer but know enough to understand that the theme must be edited. I would appreciate being directed to the correct places and the correct code to delete so as to prevent these icons being displayed.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael

    (@alchymyth)

    those edit icons will only be visible and active for logged-in users with the capability and rights to edit these posts.

    if you really want to remove the edit icon links, you will need to edit content.php (and possibly the other content-{???}.php files, if you are using postformats) in your child theme, and remove this line:

    <?php edit_post_link( __( 'Edit', 'twentythirteen' ), '<span class="edit-link">', '</span>' ); ?>

    or alternatively, you can add this to functions.php of your child theme, to remove all edit icon links from all posts and pages:

    //remove 'edit' icon from site // in Twenty Thirteen child theme
    add_filter( 'get_edit_post_link', 'do_nothing_for_edit_post_link' );
    function do_nothing_for_edit_post_link( $link ) { 
    	return ''; 
    }
    • This reply was modified 8 years ago by Michael. Reason: alternative code added
    Thread Starter 0t15r3dd1n

    (@0t15r3dd1n)

    Hello Michael,

    Thanks for you help. It is greatly appreciated and comforting to know that the the back door has not been left open, so to speak. I also appreciate you going the extra mile and telling me how to delete all the edit icons.

    Best wishes,

    Robert

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘2013 Theme how to remove the edit icon from pages and post’ is closed to new replies.