• Resolved Timdec

    (@timdec)


    I’m using a plugin called goods-catalog , which allows me to add posts as a ‘good’ and organize them in categories. It works, but the editor page of the categories has a weird unwanted editor field.

    screenshot
    relevant code

    The code starts with 1 normal line from the <head> part : the meta viewport. Directly after that comes the code for the editor field that should not be there and that I want to get removed.

    In the screenshot you can see the start of a second editor field below (‘description’). When looking at the code and class/id’s I can see that this is the exact same tem. So that second editor field (which is the normal position for it) is somehow duplicated in the head tags. Leaving me with a big ugly field that is partly hidden behind the admin menu, and is pushing everything in the menu down.

    I have tracked down the generation of this field to admin-header.php , to the line with do_action( 'admin_enqueue_scripts', $hook_suffix ); . If I disable this line, the unwanted field goes away too. But it also removes other things I need, so it’s not a real solution.

    I tried to remove it with remove_post_type_support() in functions.php in my child theme. I got the right posttype value from the plugin, yet I see no difference. I can use that function to correctly remove a thumbnail field for the page editor, so I’m using it in the right way. But for this editor field in that posttype, it does not work.

    I tried to remove it with css, but that doesn’t work either. Probably because that code is in the wrong place, long before the body tag.

    I went through all the files of the plugin, but I can not find anything that somehow sets up this admin page. So that does not give me a way to influence that admin page, it’s probably a general admin template.

    I do not need that description editor field at all, so I’m certainly ok with a solution that removes both instances of that form field.

    Any suggestions ?

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

    (@timdec)

    allright, I might have found some kind of solution.

    plugin ‘Admin CSS’ is needed, this allows to add some css only for admin pages. But other ways to insert css will work fine too.

    Then i added to that css:
    #wp-description-editor-container { display:none; }
    #wp-description-editor-tools { display:none; }

    I could not make it work with the parent div, for some reason there was always some other css overriding my css. But targetting the child parts of the editor field did work after all. Strangely enough, similar editor fields on other pages do not seem affected, so that is nice.

    In hindsight this fix makes sense of course. I hope that this might help someone else one day.

Viewing 1 replies (of 1 total)
  • The topic ‘how to remove unwanted duplicated editor field in head tags’ is closed to new replies.