• Resolved PIX GEEKS

    (@pixgeeks)


    Hello

    Since the update the plugin adds unnecessary elements + random elements and ruins the CSS of course

    I use the following HTML coding :

    <div class="popular_post">
      <a href="{url}">
        <div class="popular_image">
          {thumb}
        </div>
        <div class="popular_caption">
          <div class="popular_caption_cut">
            <div>
              <span>
                {title}
              </span>
            </div>
          </div>
        </div>
      </a>
    </div>

    Here is an example of nonsense output generated :

    <div class="popular_post">
      <a href="...">
        <div class="popular_image">
          <a href="..." target="_self">
             <img src="..." class="wpp-thumbnail wpp_cached_thumb wpp_first_image"/>
          </a>
        </div>
        <div class="popular_caption">
          <div class="popular_caption_cut">
            <div>
              <span>
                <a href="...">TEXT</a>
              </span>
            </div>
          </div>
        </div>
      </a>
    </div>

    Thank you

    https://ww.wp.xz.cn/plugins/wordpress-popular-posts/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi there,

    I’m sorry, I’m not following what you mean here. All I see different are the CSS classes on the thumbnail. What’s the “non-sense” about that?

    Thread Starter PIX GEEKS

    (@pixgeeks)

    Hi

    Look at the output there are 2 <a> added
    – after “popular_image”
    – and inside the last span

    Plugin Author Hector Cabrera

    (@hcabrera)

    I see your confusion. You need to check the documentation, mate – see wp-admin > Settings > WordPress Popular Posts > Parameters, under “Available Content Tags“.

    The {thumb} tag displays the thumbnail linked to post/page:

    <a href="[permalink to post here]" title="[Post title here]" target="_self">
    <img src="[image URL here]" title="[Post title here]" alt="[Post title here]" width="45" height="45" class="wpp-thumbnail wpp_cached_thumb wpp_featured">
    </a>

    Same goes for {title}: it’ll return a link to the post, not just the title. There’s an alternative tag called {text_title} that returns only the post title, no links.

    Thread Starter PIX GEEKS

    (@pixgeeks)

    Thank you for your reply
    Too bad the behaviour changed but your plugin is great anyway 🙂

    Plugin Author Hector Cabrera

    (@hcabrera)

    Too bad the behaviour changed (…)

    Nope, actually the {thumb} tag has always returned a linked thumbnail. See it for yourself if you like (that’s WPP 2.3.7 source code). Same goes for the other tags, none of them were modified between 2.3.x and 3.x.

    The only thing that did change was the wpp.css stylesheet. I made some modifications to the default CSS to improve it a bit for new installations, but the HTML markup should be the same as seen on 2.3.7 (the last 2.x.x release prior to 3.x).

    Thread Starter PIX GEEKS

    (@pixgeeks)

    Well it worked perfectly before the very last update so obviously something was changed somewhere 😉

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Adding unnecessary elements and ruining the CSS’ is closed to new replies.