• Hi,

    I am creating a site from scratch… its 99% done. I have run into a problem. The site has links for all 50 states on it. Each state is created from a page or can be created from a post. Each state has 6 static links. I would like to be able to add 2 or 3 links dynamically to the page. My idea was to create a link category and then assign that category to that post. However, all links are appearing on all pages. Where did I go wrong? Here is the link to my page. http://notjustanotherjones.com/27/. Any help would be greatly appreciated.

    <div id="nav_menu">
    	<ul>
    		<li><a href="http://notjustanotherjones.com/27/">Home</a></li>
    		<li><a href="#">What is SR22 Insurance?</a></li>
    		<li><a href="#">What is Non-Owner Insurance?</a></li>
    		<li><a href="#">Financial Responsibility Form</a></li>
    		<li><a href="#">Auto Insurance Definitions</a></li>
    		<?php wp_list_bookmarks('title_li=&categorize=0'); ?>
    		<li><a href="#">Contact Us</a></li>
    	</ul>
    </div>
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter djones101

    (@djones101)

    It would be absolutely fabulous if anyone had some sort of a solution for this… I forgot to put “Thank You” at the end of my original post. I have been racking my brain for almost 8 hours now with this problem. Obviously I am missing something simple. Any Point in the direction would be most gracious.

    Thank You,

    Dan

    Thread Starter djones101

    (@djones101)

    Does anyone know if what I am trying to do is Possible?

    I think the problem here is that it’s not very clear on what you’re trying to accomplish.

    Wait – okay – after reading it 4 times, I *think* I get what you’re trying to do.

    So you have a Page (say it’s “Colorado”) and you have a blogroll category of the same name, and you want that to show up on it’s page?

    you’ll need a bit more of a function to get this to work – especially when it comes to children. Off the top of my head (no guarantees this will work):

    <?php global $post;
    $vars = get_post($post->ID);
    $name = $vars['post_title'];
    
    $categories = get_categories('type=link');
    foreach($categories as $cat) {
    $catname = $cat->cat_name;
    }
    
    if($name == $catname) { ?>
    <ul>
    <?php wp_list_bookamrks('title_li='); ?>
    </ul>
    <?php } ?>

    Basically, what you’re doing is grabbing your bookmark categories as an array. When the array name of the link category matches the category name of the post you’re on, it’ll display the links that match it. Make sense?

    Like I said, don’t know for sure that’ll work, but it’ll give you an idea.

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

The topic ‘Dynamic Bookmarks for Current Category’ is closed to new replies.