Created
February 4, 2011 02:55
-
-
Save lantrix/810669 to your computer and use it in GitHub Desktop.
How to hardcode the Dynamic Home menu item in a Wordpress network install to your top level domain (first installation)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- wp-includes/post-template.php 2010-12-31 07:45:18.000000000 +0000 | |
+++ wp-includes/post-template.php.fixhome 2011-02-04 02:30:54.000000000 +0000 | |
@@ -842,7 +842,7 @@ | |
$class = ''; | |
if ( is_front_page() && !is_paged() ) | |
$class = 'class="current_page_item"'; | |
- $menu .= '<li ' . $class . '><a href="' . home_url( '/' ) . '" title="' . esc_attr($text) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>'; | |
+ $menu .= '<li ' . $class . '><a href="http://yourtoplevelurl.com" title="' . esc_attr($text) . '">' . $args['link_before'] . $text . $args['link_after'] . '</a></li>'; | |
// If the front page is a page, add it to the exclude list | |
if (get_option('show_on_front') == 'page') { | |
if ( !empty( $list_args['exclude'] ) ) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This patch tested against Wordpress 3.0.4