WordPress.org

Ready to get started?Download WordPress

Forums

Where are these extra tags coming from? (8 posts)

  1. databell96
    Member
    Posted 2 years ago #

    Having a very strange issue with this page I'm creating. I'm using the HTML portion of the WYISWYG editor. Not the Visual and for some reason, even though I didn't put it there, there seems to be an additional opening <p> tag being inserted throughout my code. I didn't place it there though, so where would it be coming from? It's appearing something like this:

    <ol class="artists50-ol"><a title="Kermit Ruffins" href="http://www.rubyartsentertainment.com/artists/kermit-ruffins">
    <li class="figure50"><img src="http://rubyartsentertainment.com/wp-content/themes/arts/images/artists/ruffins.jpg" alt="ruffins Artist Roster"  title="Artist Roster" /><span class="figcaption">Kermit Ruffins</span></li>
    <p></a></ol>

    it should appear like this:

    <ol class="artists50-ol"><a title="Kermit Ruffins" href="http://www.rubyartsentertainment.com/artists/kermit-ruffins"><li class="figure50"><img src="http://rubyartsentertainment.com/wp-content/themes/arts/images/artists/ruffins.jpg" alt="Kermit Ruffins" /><span class="figcaption">Kermit Ruffins</span></li></a></ol>

    See? Right near the end it slips in an extra opening <p> tag. Why?

  2. vtxyzzy
    Member
    Posted 2 years ago #

    Welcome to the quirks of the TinyMCE editor! Try using the CKEditor plugin. Many people find it better than TinyMCE.

    The only drawback I have found is that it interferes with a few plugins that depend on TinyMCE.

  3. databell96
    Member
    Posted 2 years ago #

    Well, I'll certainly give it a try although I'm also using Magic Fields 2, which might depend on just that.

  4. databell96
    Member
    Posted 2 years ago #

    OK, it's an improvement, vtxyzzy. However, it's still adding a text link that isn't necessary at all, to the text when it's already being used around the li element. How do I get rid of that text link while keeping the a href around the li?

  5. vtxyzzy
    Member
    Posted 2 years ago #

    By 'adding a text link', do you mean that it is making 'Kermit Ruffins' into a link and you don't want that? If so, I think the a tag needs to be inside the li, enclosing only the img.

  6. databell96
    Member
    Posted 2 years ago #

    Correct. I didn't make 'Kermit Ruffins' into a text link. WP did that for me and it's obviously not necessary since the entire li is a link. I wanted it where the entire li element is a link. You're seeing this more and more especially with mobile designs.

  7. databell96
    Member
    Posted 2 years ago #

    Let me just make it clear, vtxyzzy that I do want both the image and text to link, not just the image. But I also want the boundaries of the entire height and width of the li element to link. So why do links from the img and span elements and make two links when in reality, you only need one?

  8. vtxyzzy
    Member
    Posted 2 years ago #

    Sorry, I am not enough of a CSS guru to answer that.

Topic Closed

This topic has been closed to new replies.

About this Topic