WordPress.org

Ready to get started?Download WordPress

Forums

header markup in Code & pagination (10 posts)

  1. Jinsan
    Member
    Posted 9 years ago #

    I've run into an odd one here.

    I've written an entry which contains something like

    <h2>blah blah</h2> to demonstrate an example, the out put is that the h2 marup is applied and therefore the text is formatted with it, which wasn't the intention because then the reader only things I'm being odd.

    Anyone know why this is? What is the workaround without breaking up the code and then having to explain that the code is broken because the tags don't work as such?

    Additionally, I've written an entry with the use of the next page tag - now I know how to use it, Ive' written enough entries to know how, but hey, treat me like an idiot and ask me the basics, I may easily have forgotten something. It would not shock me in the slightest

    I've added an extra space above and below the nextpage tag to be certain but no joy. The site is using the Blix theme, so I wonder if it's a theme issue?

    Cheers

  2. kingcosmonaut
    Member
    Posted 9 years ago #

    Jinsan, I'd like to help but unfortunately I can't figure out what you are trying to ask.

    Are the <h2> tags applied? Did you wrap you code inside `[...]´?
    What's the problem with the next page tag?

  3. kingcosmonaut
    Member
    Posted 9 years ago #

    Well, that should read <code>[...]</code>.

  4. Jinsan
    Member
    Posted 9 years ago #

    n/m king it the tag for pages wasn't in there, so simply added it :)

    as for the code...

    I used <code><h2>some crap</h2></code> so you're saying that should read <code>[<h2>some crap</h2>]</code>

  5. kingcosmonaut
    Member
    Posted 9 years ago #

    Jinsan, no [] necessary. However you need to encode your tags.:
    <code><h2>some crap</h2></code>

    Hope this helps.

  6. kingcosmonaut
    Member
    Posted 9 years ago #

    Wow, again, it didn't work. Too stupid for this forum... Just take a look at the source and you'll see what I mean.

  7. Jinsan
    Member
    Posted 9 years ago #

    hmmm it's all encoded in ampersands, I see:

    .< then I see .> after that there is .< h2 .> and finally it ends with .<. >. and then <. .>. so not sure it will show properly because it will probably try to fix it or it will show compelte with amsperands bleh

    Hmm ok so it's wrap a code tag with code tags which contain the h2 tags?

  8. kingcosmonaut
    Member
    Posted 9 years ago #

    Did encoding you markup work? Here's an extremly basic encoder I threw together in a couple of minutes a while ago. Jens was nice enough to put it online.

  9. Lorelle
    Member
    Posted 9 years ago #

    If you are trying to write HTML code within your post so it "looks" like code:

    http://codex.wordpress.org/Writing_Code_in_Your_Posts

  10. Jinsan
    Member
    Posted 9 years ago #

    thanks king & lorelle - perhaps this can be changed for the next WP update so that anything that anyting inbetween code tags is displayed as code and code alone

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags