How to avoid wordpress from auto inserting p and span tags when posting code in a blog post?

  • Unknown's avatar

    I have a very annoying problem with wordpress. I use the [code lang='bash'] [/code] tags to post code in my blog post but wordpress makes the code very ugly and auto inserts all kinds of ugly tags like p and span. I have posted a screenshot of what the result looks like at https://pasteboard.co/HU1ISRU.jpg. How can I avoid this please? It is super annoying and I have spent hours and days searching for how to fix this problem without any success.

    The blog I need help with is: (visible only to logged in users)

  • The topic ‘How to avoid wordpress from auto inserting p and span tags when posting code in a blog post?’ is closed to new replies.