• Hello..

    I want to make my links visible only on home page.I have two link categories (Links and Friends), but for now i’m using only second(friends).
    Do i need to remove links widget or to leave it on a sidebar?I tried both, and nothing..

    I use this code

    <?php if(is_home() && !is_paged()) : ?>
    <?php wp_reset_query(); ?>
    <?php wp_list_bookmarks('categorize=0'); ?>
    <?php endif  ?>

    Is this OK?
    How to make it working?

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Try:

    <?php
    if(is_home() && !is_paged()) :
    wp_list_bookmarks('categorize=0');
    endif  ?>
    Thread Starter yabate

    (@yabate)

    Thanks for the code, but i couldn’t make it work.

    The point of wp_reset_query() is to requery the current page. WPress only allows for one is_home() or is_front_page() type of query per rendering.

    If it isn’t working that means the query is being used somewhere else when the page is being built.

    Place wp_reset_query() above the if statement and you’ll be fine.

    <?php wp_reset_query(); ?>
    
    <?php if(is_home() && !is_paged()) : ?>
    <?php wp_list_bookmarks('categorize=0'); ?>
    <?php endif  ?>

    This syntax works.

    <?php
            wp_reset_query();
    	if (is_front_page()) {?>
    	<?php wp_list_bookmarks('categorize=0'); ?>
    <?php }?>
    Thread Starter yabate

    (@yabate)

    Thanks Tamara ??
    Thank you very much.
    Its working now… finally ?? ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘wp_list_bookmarks and is_home problem..’ is closed to new replies.