Support » Plugin: Simple Calendar - Google Calendar Plugin » Delete “Edit Calendar” link

  • isabelgalvez

    (@isabelgalvez)


    Hi!
    How can I delete a link the “Edit calendar” link which appears on the top of my calendar?
    Thanks!

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • You might try:

    /**
     * Remove post edit link from Simple Calendar calendars.
     */
    function simcal_remove_edit_post_link( $link, $id ) {
    
    	// Check if the ID is a post type of calendar and if so return an empty string
    	if( get_post_type( $id ) == 'calendar' ) {
    		return '';
    	}
    
    	// Return the normal link for all other uses
    	return $link;
    }
    add_filter( 'edit_post_link', 'simcal_remove_edit_post_link', 10, 2 );
Viewing 1 replies (of 1 total)
  • The topic ‘Delete “Edit Calendar” link’ is closed to new replies.