Viewing 1 replies (of 1 total)
  • Thread Starter ElaineMarley86

    (@elainemarley86)

    Ok, I edited the function wpuf_edit_post_link in wpuf-functions.php but It doesn’t work, the edit link disappeared from the posts. Here’s what I wrote, can anyone help me and tell me what’s wrong with this code? Thanks!

    $override = wpuf_get_option( 'override_editlink', 'yes' );
        if ( $override == 'yes' ) {
            $url = '';
            if ( wpuf_get_option( 'enable_post_edit' ) == 'yes' ) {
    
    	    $post = get_post($post_id);
    
    	    if ($post->post_type == 'type1') {
                $url = get_permalink( 201 );
                $url = wp_nonce_url( $url . '?pid=' . $post_id, 'wpuf_edit' );
    	    }
    
    	    if ($post->post_type == 'type2') {
                $url2 = get_permalink( 203 );
                $url2 = wp_nonce_url( $url . '?pid=' . $post_id, 'wpuf_edit' );
    	    }
            }
        }
Viewing 1 replies (of 1 total)
  • The topic ‘Different edit-post pages’ is closed to new replies.