Forums

Conditional php (2 posts)

  1. betsyg
    Member
    Posted 1 year ago #

    I have tried this 100 different ways, but I can't figure it out.

    I am using a plugin called Post Links to post related links per page, and also to do them conditionally. Because it's in the sidebar that's already a nested list, I had to wrap part of it in an

  2. tag. The problem is that the blank li leaves a space if there is no list.

    Here is the page with the related links. Here is the page without the related links . Here is the code, which I did not write so speak slowly:

    <?php  $args = array('format' => 'ul', 'div' => 'post-links', 'title' => 'Related links' ); ?>
             <li><?php post_links($args); ?><li>

    I've tried wrapping the

  3. around all kinds of things, get the look I want, but can't get rid of the dang space when I do.

    Thank you, brilliant people.

  • betsyg
    Member
    Posted 1 year ago #

    I hope someone will delete that. So sorry, let's try again.

    I have tried this 100 different ways, but I can't figure it out.

    I am using a plugin called Post Links to post related links per page, and also to do them conditionally. Because it's in the sidebar that's already a nested list, I had to wrap part of it in an li tag. The problem is that the blank li leaves a space if there is no list.

    Here is the page with the related links. Here is the page without the related links. Here is the code, which I did not write so speak slowly:

    <?php  $args = array('format' => 'ul', 'div' => 'post-links', 'title' => 'Related links' ); ?>
             <li><?php post_links($args); ?><li>

    I've tried wrapping the li tag around all kinds of things, get the look I want, but can't get rid of the dang space when I do.

    Thank you, brilliant people, and I hope I don't mess up this post a second time.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags