WordPress.org

Support

Support » Plugins and Hacks » Hacks » [Resolved] 404 When Editing Posts

[Resolved] 404 When Editing Posts

  • mrtoner

    @mrtoner

    I’m using Yinjie Soon’s DF-Style Linked List plugin. Rather than modifying the theme I’m using, I’m using separate code to change the behavior of the links on my post titles:

    add_filter('post_link','df_fix_permalink');
    
    function df_fix_permalink () {
      if (get_the_linked_list_link() == '') {
        return get_permalink();
      }
      else {
        return get_the_linked_list_link();
      }
    }

    This works fine: for posts with a linked_list_url it changes the post title link to that URL. However, attempts to edit the post now end up in a 404. To edit a post, I must comment out add_filter().

    Any suggestions to fix this?

Viewing 1 replies (of 1 total)
  • mrtoner

    @mrtoner

    Based on an example here I was able to solve the problem:

    add_filter('post_link','df_fix_permalink');
    
    function df_fix_permalink ($permalink) {
      if (get_the_linked_list_link() == '') {
        return $permalink;
      }
      return get_the_linked_list_link();
    }
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] 404 When Editing Posts’ is closed to new replies.
Skip to toolbar