WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_list_pages Sidebar tag won't work correctly (3 posts)

  1. hiddengamma
    Member
    Posted 5 years ago #

    I'm trying to use this code in a custom WP installation to list certain pages on a sidebar: <?php wp_list_pages('exclude=4,5,6,8,9,10&title_li=<h2>' . __('More Places') . '</h2>' ); ?>

    Unfortunately, it is not working the way it should. First of all, I am using the "exclude" function, because when I try to use "include" it will only list one page and ignore all the others I tell it to list. Using "Exclude," it does the opposite, and actually lists ALL of the pages I have published, but that's not my only problem. The function displays properly (other than the problem with not showing the pages I actually want to show) on all of my WP pages except one, where it is broken, and just shows a snippet of the actual code.

    Here's the URL to my home page: http://www.blu-raydefinition.com

    Here's the page where it won't display properly: http://www.blu-raydefinition.com/vcddb/

    And here's the entire block of code where function resides (I tacked it on to the sidebar_sales.php file that I use to generate my links to Amazon:

    <?php wp_list_pages('exclude=4,5,6,8,9,10&title_li=<h2>' . __('More Places') . '</h2>' ); ?>
    
    <div class="single-item"><iframe src="http://rcm.amazon.com/e/cm?t=amzn-ID&o=1&p=8&l=as1&asins=B001PPLIFU&md=10FE9736YVPPT7A0FBG2&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=FFFFFF&bg1=FFFFFF&f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
    </iframe></div>
    
    <div class="single-item"><iframe src="http://rcm.amazon.com/e/cm?t=AMZN-ID&o=1&p=8&l=as1&asins=B001R4KQDE&md=10FE9736YVPPT7A0FBG2&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=FFFFFF&bg1=FFFFFF&f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></div>
    
    <div class="single-item"><iframe src="http://rcm.amazon.com/e/cm?t=AMZn-ID&o=1&p=8&l=as1&asins=B001P9KR94&md=10FE9736YVPPT7A0FBG2&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=FFFFFF&bg1=FFFFFF&f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></div>
    
    <div class="single-item"><iframe src="http://rcm.amazon.com/e/cm?t=AMZN-ID&o=1&p=8&l=as1&asins=B001ILFUDM&md=10FE9736YVPPT7A0FBG2&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe></div>
    
    <ul>
    <li><h2>Top Sellers</h2></li>
    
    <li>
    <a href="http://www.amazon.com/gp/product/B001GAPC1K?ie=UTF8&tag=AMZN-ID&linkCode=as2&camp=1789&creative=9325&creativeASIN=B001GAPC1K">Iron Man (Ultimate Two-Disc Edition) on Blu-ray Disc<img src="http://www.assoc-amazon.com/e/ir?t=AMZN-ID&l=as2&o=1&a=B001GAPC1K" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>
    </li>
    
    <li>
    <a href="http://www.amazon.com/gp/product/B001E75QGG?ie=UTF8&tag=AMZN-ID&linkCode=as2&camp=1789&creative=9325&creativeASIN=B001E75QGG">Indiana Jones and the Kingdom of the Crystal Skull on Blu-ray Disc<img src="http://www.assoc-amazon.com/e/ir?t=AMZN-ID&l=as2&o=1&a=B001E75QGG" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>
    </li>
    
    <li>
    <a href="http://www.amazon.com/gp/product/B0013ND30W?ie=UTF8&tag=AMZN-ID&linkCode=as2&camp=1789&creative=9325&creativeASIN=B0013ND30W">Sleeping Beauty (Blu-ray Two-Disc Platinum Edition plus Standard DVD + BD Live) <img src="http://www.assoc-amazon.com/e/ir?t=AMZN-ID&l=as2&o=1&a=B0013ND30W" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>
    </li>
    
    <li>
    <a href="http://www.amazon.com/gp/product/B001EOQWFI?ie=UTF8&tag=AMZN-IDlinkCode=as2&camp=1789&creative=9325&creativeASIN=B001EOQWFI">Wall-E (Three-Disc Special Edition) [Blu-ray] + Digital Copy<img src="http://www.assoc-amazon.com/e/ir?t=AMZN-ID&l=as2&o=1&a=B001EOQWFI" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>
    </li>
    
    <li>
    <a href="http://www.amazon.com/gp/product/B001DHXT1G?ie=UTF8&tag=AMZN-ID&linkCode=as2&camp=1789&creative=9325&creativeASIN=B001DHXT1G">Incredible Hulk [Blu-ray]<img src="http://www.assoc-amazon.com/e/ir?t=AMZN-ID&l=as2&o=1&a=B001DHXT1G" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>
    </li>
    
    <li><a href="http://www.blu-raydefinition.com/shop-with-us/">More Blu-ray Titles >>></a></li>
    </ul>
    
    <ul>
    <li><h2>Upcoming and Popular</h2></li>
    
    <li>
    <a href="http://www.amazon.com/gp/product/B001EOQWFI?ie=UTF8&tag=AMZN-ID&linkCode=as2&camp=1789&creative=390957&creativeASIN=B001EOQWFI">Wall-E (Three-Disc Special Edition) [Blu-ray] + Digital Copy<img src="http://www.assoc-amazon.com/e/ir?t=AMZN-ID&l=as2&o=1&a=B001EOQWFI" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>
    </li>
    
    <li>
    <a href="http://www.amazon.com/gp/product/B001GZ6QEC?ie=UTF8&tag=AMZN-ID&linkCode=as2&camp=1789&creative=390957&creativeASIN=B001GZ6QEC">The Dark Knight (+ Digital Copy and BD Live) [Blu-ray]<img src="http://www.assoc-amazon.com/e/ir?t=AMZN-ID&l=as2&o=1&a=B001GZ6QEC" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>
    </li>
    
    <li>
    <a href="http://www.amazon.com/gp/product/B001DHXT1G?ie=UTF8&tag=AMZN-ID&linkCode=as2&camp=1789&creative=390957&creativeASIN=B001DHXT1G">Incredible Hulk [Blu-ray]<img src="http://www.assoc-amazon.com/e/ir?t=AMZN-ID&l=as2&o=1&a=B001DHXT1G" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>
    </li>
    
    <li>
    <a href="http://www.amazon.com/gp/product/B001F7MSG6?ie=UTF8&tag=AMZN-ID&linkCode=as2&camp=1789&creative=390957&creativeASIN=B001F7MSG6">Hellboy II: The Golden Army [Blu-ray]<img src="http://www.assoc-amazon.com/e/ir?t=AMZN-ID&l=as2&o=1&a=B001F7MSG6" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>
    </li>
    
    <li>
    <a href="http://www.amazon.com/gp/product/B001F76PDS?ie=UTF8&tag=AMZN-ID&linkCode=as2&camp=1789&creative=390957&creativeASIN=B001F76PDS">Hancock (Unrated) [Blu-ray]<img src="http://www.assoc-amazon.com/e/ir?t=AMZN-ID&l=as2&o=1&a=B001F76PDS" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /></a>
    </li>
    
    <li><a href="http://www.blu-raydefinition.com/shop-with-us/">More Blu-ray Titles >>></a></li>
    </ul>	
    
    <div class="single-item"><script type="text/javascript"><!--
    google_ad_client = "pub-5036635047862788";
    /* 120x90, created 3/10/09 */
    google_ad_slot = "0510949336";
    google_ad_width = 120;
    google_ad_height = 90;
    //-->
    </script>
    <script type="text/javascript"
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </script></div>
    
    <script type="text/javascript" src="http://www.assoc-amazon.com/s/link-enhancer?tag=AMZN-ID&o=1">
    </script>
    <noscript>
        <img src="http://www.assoc-amazon.com/s/noscript?tag=AMZN-ID" alt="" />
    </noscript>
  2. esmi
    Forum Moderator
    Posted 5 years ago #

    The "missing page link" to Community is visible on the top nav bar. Have you fixed the problem?

  3. hiddengamma
    Member
    Posted 5 years ago #

    Yes, I fixed the problem. Sorry for taking so long to reply, but when I tried to reply initially a while back, I was getting a message that the topic was closed. I thought that maybe I'd unknowingly violated some rule or something.

    I didn't actually get the tag to work, but instead decided to nix using the sidebar tag and just use straight HTML code in a list, and it obtains the same effect I was looking for on every page.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.