WordPress.org

Ready to get started?Download WordPress

Forums

Front-end Editor
[resolved] Edit only posts (not pages) (7 posts)

  1. rrobson-wp
    Member
    Posted 2 years ago #

    Hi, I'm simply looking to disable the edit link on my site's pages, not posts.

    I'm using this plugin to allow users to edit pages (like a wiki), but don't want them editing my site's pages.

    Thanks!

    http://wordpress.org/extend/plugins/front-end-editor/

  2. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    You can use the 'front_end_editor_disable' filter:

    https://github.com/scribu/wp-front-end-editor/wiki/Actions-and-filters

  3. rrobson-wp
    Member
    Posted 2 years ago #

    Thanks for your prompt reply! It worked perfectly.

  4. jfoster3773
    Member
    Posted 2 years ago #

    Hi there...

    I have a the same exact need. Looking over the Actions and Filters...

    Using the following looks exactly like what I need, I am just uncertain where I should implement it?

    function fee_specific_category( $allow, $data ) {
    	return $allow && in_category( 'wiki', $data['post_id'] );
    }
    add_filter( 'front_end_editor_allow_post', 'fee_specific_category', 10, 2 );
  5. Wiseg
    Member
    Posted 2 years ago #

    @rrobson-wp
    Hi did you solved this problem?

    it would be nice to know where tu put this code
    function fee_specific_category( $allow, $data ) {
    return $allow && in_category( 'wiki', $data['post_id'] );
    }
    add_filter( 'front_end_editor_allow_post', 'fee_specific_category', 10, 2 );

    Thx

  6. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    Just put in your theme's functions.php file.

  7. Wiseg
    Member
    Posted 2 years ago #

    oke thank you very much.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic