• Resolved Guido

    (@guido07111975)


    Hi,

    I have created a child theme and want to add my 2-columns shortcode styling in the page/post editor (so the 2 columns are visible while editing a page/post).

    So I have added this in child theme file functions:

    function my_theme_add_editor_styles() {
    	add_editor_style( 'custom-editor-style-child.css' );
    }
    add_action( 'admin_init', 'my_theme_add_editor_styles' );

    But when I copy-paste the shortcode styling from my child theme stylesheet into child theme file ‘custom-editor-style-child’, no result:

    .column_left {width:49%; float:left; margin:0 0 10px; text-align:justify;}
    .column_right {width:49%; float:right; margin:0 0 10px; text-align:justify;}

    Other changes (such as font-size) are visible.
    When am I doing wrong here?

    Guido

Viewing 2 replies - 1 through 2 (of 2 total)
  • If your columns are created with a shortcode then that styling isn’t going to have any effect. You would need to add some placeholder html like with the wp gallery, or put the actual html markup in the editor rather than a shortcode.

    Thread Starter Guido

    (@guido07111975)

    Thanks for your response. Guess the shortcode is php, which isn’t supported in editor?

    Will look into the wp gallery, maybe I can use that for my shortcode too..

    Guido

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom editor style in child theme’ is closed to new replies.