Support » Plugins and Hacks » TPG Get Posts » Added an extra P tag between title and content?

  • Resolved Sam

    (@samsamuelcousinscom)


    I just upgraded TGP to the latest version. And now there’s an extra <p></p> in the code between the byline and the content. How do I get rid of it?

    This is what my page tag looks like:
    [tpg_get_posts fields="post_title, post_content" numberposts="3" show_entire="false" shorten_content="w400" show_meta="false" more_link_text="Read More."]

    And this is what the code outputs for an individual item:

    <div class="tpg-get-posts-post">
      <h2 class="tpg-title-class">Le Title</h2>
      <p class="tpg-byline-class">By Author Name on Dec 1, 2012</p>
      <p></p>
      <div class="tpg-content-class tpg-post-content">
        <p>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et...
        <a href="#">Read More.</a>
        </p>
      </div>
    </div>

    See that extra tag in the middle? How do I get rid of it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author cswaim

    (@cswaim)


    Hi Sam:

    I will correct this in a release within the next week – Depending on other activities. But for now, a quick fix is:

    Go to the plugin and select edit
    select the file tpg-get-posts/inc/class-tpg-gp-process.php from the right hand menu

    scroll down until you find the function format_byline($post) it is near the bottom
    find the line

    $_byline .= ‘</p>’;
    $return $_byline;

    and change to

    //$_byline .= ‘</p>’;
    $return $_byline;

    this is a temp fix until and the next update will have this resolved.

    If you are uncomfortable with editing the file, give me your email address and I will send you the module and you can ftp it to your site.

    Sam

    (@samsamuelcousinscom)


    Sweet! That was easy enough. I made the change and it looks like it should.

    Thank you for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Added an extra P tag between title and content?’ is closed to new replies.