WordPress.org

Ready to get started?Download WordPress

Forums

Prettify Code Syntax
[resolved] Line numbers not showing (3 posts)

  1. ifmeister
    Member
    Posted 1 year ago #

    Hi. First of all, great plugin! Everything seems to be working well for me except line numbers. I've used the following snippet in the text editor:

    <pre class="prettyprint"><code class="language-html" line="1">
    // Code here
    <a href="url">sample text</a>
    </code></pre>

    Is there something wrong with my syntax?

    Please help!

    http://wordpress.org/extend/plugins/prettify-code-syntax/

  2. ifmeister
    Member
    Posted 1 year ago #

    Issue solved! There was indeed a problem with my syntax. The proper way of doing it is:

    <pre class="prettyprint linenums"><code class="language-html">
    // Code here
    <a href="url">sample text</a>
    </code></pre>
  3. ifmeister
    Member
    Posted 1 year ago #

    Use a pre class of "linenums".

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic