• Hi,

    I’ve seen several similar questions but the answers don’t seem to apply in this case.

    I’m set up as follows:

    wordpress blog is here –> domain.com/blog
    my index.html file is here –> domain.com/index.html

    I want the home button in the blog to point to domain.com/index.html, not to domain.com/blog/index.php

    My index.html page is just a normal page, it’s not wordpress, it’s not a blog, I don’t want it to have the same layout as the blog, it’s just a simple non-blog html page.

    So how/where can I change the url the home page button goes to?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Presumably in the sidebar/navbar template file within your current theme.

    Thread Starter stansmith

    (@stansmith)

    Yes, but I’m a html person not a php person, so I’m having trouble finding the bit of code that is the home button.

    I also assume that it uses a variable rather than a hardcoded URL.

    While I could (if I could find it) replace the variable with a hardcoded URL it would be cleaner (and safer) to find out where the variable is declared and change it there. Unless it just uses the same variable for the blogs location in which case I guess I’d have to hardcode it…?

    Thread Starter stansmith

    (@stansmith)

    ok, this looks like the home button code – but where the heck do I hardcode the url???

    <!-- main navigation -->
         <div id="nav-wrap1">
          <div id="nav-wrap2">
            <ul id="nav">
             <?php
              if((get_option('show_on_front')<>'page') && (get_option('arclite_topnav')<>'categories')) {
               if(is_home() && !is_paged()){ ?>
                <li id="nav-homelink" class="current_page_item"><a class="fadeThis" href="<?php echo get_settings('home'); ?>" title="<?php _e('You are Home','arclite'); ?>"><span><?php _e('Home','arclite'); ?></span></a></li>
               <?php } else { ?>
                <li id="nav-homelink"><a class="fadeThis" href="<?php echo get_option('home'); ?>" title="<?php _e('Click for Home','arclite'); ?>"><span><?php _e('Home','arclite'); ?></span></a></li>
              <?php
               }
              } ?>
             <?php
               if(get_option('arclite_topnav')=='categories') {
                echo preg_replace('@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i', '<li$1><a class="fadeThis"$2><span>$3</span></a>', wp_list_categories('show_count=0&echo=0&title_li='.get_option('arclite_excludenav')));
                }
               else {
                 echo preg_replace('@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i', '<li$1><a class="fadeThis"$2><span>$3</span></a>', wp_list_pages('echo=0&orderby=name&title_li=&exclude='.get_option('arclite_excludenav')));
               }
              ?>
            </ul>
          </div>
         </div>
         <!-- /main navigation -->

    can we just have a real url to your site to look at your template and stuff?

    Thread Starter stansmith

    (@stansmith)

    Blog is here:

    dymo99010.com/blog/

    I want the home button to point here:

    dymo99010.com

    Check this thread and see if the first plugin mentioned solves your problem:

    https://www.ads-software.com/support/topic/320143?replies=3#post-1243919

    Dave

    Thread Starter stansmith

    (@stansmith)

    ok, I’ve just tried that and it’s kind of a half-arsed solution.

    If I setup a new ‘home’ page, put a redirect on it using the plug-in and then in ‘reading’ tell it to use that static page then it redirects the whole blog to the root page. ie. if I type dymo99010.com/blog into the browser it redirects to dymo99010.com
    so now I can’t actually see the blog – so that’s no good.

    However, I can create an extra page – so ‘home’ goes to the blog and then a new button goes to the root. Now that could work ok, with some rewording of the buttons, but ‘home’ is not the best wording for the button (‘blog’ would make more sense).

    So it there a way to rename the home button so it says something different?

    If I’m thinking along the right lines, as I also wish to do this …

    <li id="nav-homelink" class="current_page_item"><a class="fadeThis" href="<?php bloginfo('siteurl'); ?>/index.php" title="<?php _e('You are Home','arclite'); ?>"><span><?php _e('Title of Link Here','arclite'); ?></span></a></li>

    Then just order your pages links correctly, i.e; 0 1 2 3 etc.

    But thats just my judgement based on my knowledge, haven’t actually tested this yet …

    Index.php file is totally corrupted and I don’t have previous backup. But I believe most of other files from my blog is still good.

    Is there anyway that I can build a new index.php and replace it so that the rest of the files is still hooked up correctly?

    Any help is appreciated.

    Thanks.

    <li id="nav-homelink" class="current_page_item"><a class="fadeThis" href="<?php echo get_settings('home'); ?>" title="<?php _e('You are Home','arclite'); ?>"><span><?php _e('Home','arclite'); ?></span></a></li>
    <?php } else { ?><li id="nav-homelink"><a class="fadeThis" href="<?php echo get_option('home'); ?>" title="<?php _e('Click for Home','arclite'); ?>"><span><?php _e('Home','arclite'); ?></span></a></li>

    In:

    href="<?php echo get_settings('home'); ?>"

    replace <?php echo get_settings('home'); ?>
    with “domain.com/index.html”

    In:

    href="<?php echo get_option('home'); ?>"

    replace <?php echo get_option('home'); ?>
    with “domain.com/index.html”

    Problem solved. Keep at it. Don’t forget to backup.

    If you want to take a look I’m at alxfoo.com

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Changing the home link to a non wordpress page’ is closed to new replies.