Grow your CSS skills. Land your dream job.

Word Press Code Block

  • # May 6, 2008 at 1:35 am

    Hello all,

    After searching, installing, demoing and uninstalling about a million different Plug-ins for getting a block of code on a blog post I figured it was time to email Chris and ask for his expertise. He replied back with two links:

    Code Markup: http://www.thunderguy.com/semicolon/wor … ss-plugin/

    Syntax highlighting: http://softwaremaniacs.org/soft/highlight/en/ (Theres an english link on there Chris. (he had sent me a german link))

    I have them both installed and enabled however… They don’t seem to be working at a full 100%

    My problems are:

    With Code Markup, the syntax was lacking so I created a style for it

    Code:
    code {
    display: block;
    font-family: monospace, mono;
    width: 100%;
    margin:20px auto;
    padding: 0.5em;
    background-color: #f8f8f5;
    border: 1px solid #ccc;
    white-space: pre;
    overflow: auto;
    line-height: .8em;
    }

    So that looks pretty good, im happy. However its not syntax colouring is not taking effect. Looking at the source it looks as if its taking < > and turning them into ">" I beleve that this is because something isnt working with Code Markup. Thus resulting in Syntax Highlighting not being able to identify what the language is.

    The code within the blog post looks like this

    Code:


    < ?php _e('Written By'); ?>
    < ?php the_author(); ?>


    < ?php the_time('l, F jS, Y') ?>

    Any help to get me on the right track would be most appreciated. Thanks in advance!
    -Cody

    # May 6, 2008 at 1:48 pm

    Maybe you could try not using the Code Markup one and escaping the code yourself, just to see if it works.

    There is an auto-escaping tool here that works great:
    http://www.elliotswan.com/postable/

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".