WordPress.org

Ready to get started?Download WordPress

Forums

wordpress navigation outside wordpress? (1 post)

  1. Anointed
    Member
    Posted 5 years ago #

    Simple job.
    I want to use the dynamic navigation generated by wordpress outside of my wordpress directory.

    Simply put I am going to use phpmotion for my video portion of my website, but want the website to use the navigation from wordpress above the navigation for phpmotion.

    I do NOT want to hardcode the navigation from wordpress on my phpmotion side as wordpress is dynamic in it's navigation. Meaning if I add a page to wordpress it automaticallly shows up on the navigation bar. If I hardcode it, then everytime I add a page I have to go and update it. That sucks.

    I'm not a coder but I am guessing that all is necessary is
    1. a call in my other programs header to a 'config' file of sorts that defines the wordpress variables I am going to use.
    2. a hook to the wordpress db so it can define the variables
    3. a way of printing out that information to use in my other programs.

    Make sense?

    I'm not sure if it will paste here or not, but here is the navigation code from wordpress that I want to use in it's entirety.

    <div id="wrap">
    
     <div id="topnavbar">
    
      <div class="topnavbarleft">
       <p><script src="<?php bloginfo('template_url'); ?>/javascript/date.js" type="text/javascript"></script></p>
      </div>
    
      <div class="topnavbarright">
      <p><a href="<?php bloginfo('rss_url'); ?>"><img style="vertical-align:middle" src="<?php bloginfo('template_url'); ?>/images/rss.gif" alt="Subscribe to <?php bloginfo('name'); ?>" /></a><a href="<?php bloginfo('rss_url'); ?>">News Feed</a><a href="<?php bloginfo('comments_rss2_url'); ?>"><img style="vertical-align:middle;margin-left:10px;" src="<?php bloginfo('template_url'); ?>/images/rss.gif" alt="Subscribe to <?php bloginfo('name'); ?>" /></a><a href="<?php bloginfo('comments_rss2_url'); ?>">Comments</a></p>
      </div>
    
     </div>
    
    <div id="header">
    
     <div class="headerleft">
      <a href="<?php echo get_settings('home'); ?>/"><img src="<?php bloginfo('template_url'); ?>/images/logo.gif" alt="<?php bloginfo('description'); ?>" /></a>
     </div>
    
     <div class="headerright">
      <h3>Search the website</h3>
      <form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
      <input type="text" value="Type keywords and hit enter..." name="s" id="s-head" onfocus="if (this.value == 'Type keywords and hit enter...') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Type keywords and hit enter...';}" /></form>
     </div>
    
    </div>
    
    <div id="navbar">
    
     <ul id="nav">
      <li><a href="<?php echo get_settings('home'); ?>">Home</a></li>
      <?php wp_list_pages('title_li=&depth=2&sort_column=menu_order'); ?>
     </ul>
    
    </div>
    
    <div id="subnavbar">
     <ul id="subnav">
      <?php wp_list_categories('sort_column=name&title_li=&depth=2'); ?>
     </ul>
    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic