Viewing 1 post (of 1 total)
  • Author
    Posts
  • Metsis
    Guest

    Hello!

    I want to use Shortcoder to put out custom css. Let me explain.

    I have in the template’s Additional CCS a style definition to put out a superscript P:

    Code:


    pk::before
    {
    content: ” P”;
    vertical-align: super;
    font-size: smaller;
    font-weight: bold;
    color: #003f87;
    }

    I can write in the editor in the text mode

    Code:

    lorem ipsum

    to produce the effect I want. But ,as you certainly know, my tag gets stripped, if I ever switch to the visual mode.

    I created a shortcode “pk” with the content “” and now I can write

    Code:

    lorem ipsum[sc name="pk"]


    which is preserved between text and visual modes.

    Then I realised, that I could put CSS definition directly into the content of the shortcode instead of creating an html tag. But if I put it directly, then the CSS definition gets displayed and not the superscript P. Do I need to wrap my CSS definition into ,say, a span tag or how can I accomplish my goal?

    TIA

Viewing 1 post (of 1 total)
  • The topic ‘How to write custom css?’ is closed to new replies.

Subscribe to our Newsletter

Get updates on the WordPress plugins, tips and tricks to enhance your WordPress experience. No spam. View newsletter

By using this website, you agree to our Terms