WordPress.org

Ready to get started?Download WordPress

Forums

How to remove the p from the default wordpress editor? (9 posts)

  1. naveenbos
    Member
    Posted 2 months ago #

    In the wordpress editor shows a P as default, how can i remove this P below the text area i can see the letter P. Is it possible to remove?, in wordpress 3.6.1 i have removed this P but in latest version i couldn't see that please help

  2. p.dirac
    Member
    Posted 2 months ago #

    I would like to remove this letter p too.
    It appears in Visual mode, not Text mode.

  3. naveenbos
    Member
    Posted 2 months ago #

    Same question i have asked in the stack overflow i got one reply from there,
    One solution is

    /** Edit TinyMCE **/
    function myformatTinyMCE($in) {
        $in['statusbar'] = false;
    
        return $in;
    }
    add_filter('tiny_mce_before_init', 'myformatTinyMCE' );

    Second Solution is

    function my_theme_add_editor_styles(){
        ?>
            <style type="text/css">
                .mce-path   {display: none!important;}
            </style>
        <?php
    }
    add_action( 'init', 'my_theme_add_editor_styles' );

    it is a css option.

  4. p.dirac
    Member
    Posted 2 months ago #

    Thanks, the second solution works, although I had to tweak the css:

    function my_theme_add_editor_styles(){
        ?>
            <style type="text/css">
                .mce-path-item.mce-last {
                    display: none !important;
                }
            </style>
        <?php
    }
    add_action( 'init', 'my_theme_add_editor_styles' );
  5. p.dirac
    Member
    Posted 2 months ago #

    A 3rd solution is to add a custom css file to your theme css folder, named my-admin-style.css:

    /* removes letter p below text area in tinymce editor */
    .mce-path-item.mce-last {
        display: none !important;
    }

    Then add this function, load_custom_wp_admin_style(), to your theme functions.php file:

    function load_custom_wp_admin_style() {
            wp_register_style( 'custom_wp_admin_css',
            get_template_directory_uri() . '/css/my-admin-style.css', false, '1.0.0' );
            wp_enqueue_style( 'custom_wp_admin_css' );
    }
    add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );
  6. Dave Naylor
    Member
    Posted 2 months ago #

    Why would you want to do this?

  7. p.dirac
    Member
    Posted 2 months ago #

    A css file is where you expect to find css styles, rather than looking in a php file. It makes it convenient to add future admin css changes.

    Also, I did not like where solution two placed the style in the admin HTML web page - above the head tag, although it seemed to work ok.

  8. Dave Naylor
    Member
    Posted 2 months ago #

    No, what I meant was, why do you want to remove the p?

  9. p.dirac
    Member
    Posted 2 months ago #

    The letter p is not useful, and just clutters up the page.
    Since it is a single character with no label, it appears to the user as an extraneous character. In earlier versions of Worpress it had a label, Path, but even then it was completely worthless.

Reply

You must log in to post.

About this Topic