Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NETWORK TEMPLATE BUG & VALIDATION FIXES
- Affects the following files
- wp-content/themes/network/home.php
- wp-content/themes/network/template-blognews.php
- wp-content/themes/network/page.php
- wp-content/themes/network/footer.php
- wp-content/themes/network/library/components/feature-content.php
- wp-content/themes/network/library/components/discover-header.php
- /wp-content/themes/network/template-fullwidth.php
- Adds file searchform.php to /wp-content/themes/network/
- (NOTE: If the hard coding option is chosen changes will include /wp-includes/general-template.php)
- --------------------------------------------------------------------------------------------
- wp-content/themes/network/home.php add "</div>" on line before "<?php get_footer() ?>"
- --------------------------------------------------------------------------------------------
- wp-content/themes/network/template-blognews.php - Add 2X "</div>" before "<?php get_footer() ?>"
- --------------------------------------------------------------------------------------------
- wp-content/themes/network/page.php - Add 2X "</div>" before "<?php get_footer() ?>"
- (NOTE: This fixes some things, but leaves validation errors that I was unable to locate within the theme files)
- --------------------------------------------------------------------------------------------
- wp-content/themes/network/footer.php - Add "</div>" to line 28 just before "</body>"
- --------------------------------------------------------------------------------------------
- wp-content/themes/network/library/components/feature-content.php
- Find the following lines around line 29
- nav_label_first : '<?php if ($homepage_label_first) { echo $homepage_label_first; } else { echo "<< first"; } ?>',
- nav_label_last : '<?php if ($homepage_label_last) { echo $homepage_label_last; } else { echo "last >>"; } ?>',
- nav_label_prev : '<?php if ($homepage_label_prev) { echo $homepage_label_prev; } else { echo "< prev"; } ?>',
- nav_label_next : '<?php if ($homepage_label_next) { echo $homepage_label_next; } else { echo "next >"; } ?>'
- Replace with
- nav_label_first : '<?php if ($homepage_label_first) { echo $homepage_label_first; } else { echo "« «first"; } ?>',
- nav_label_last : '<?php if ($homepage_label_last) { echo $homepage_label_last; } else { echo "last » »"; } ?>',
- nav_label_prev : '<?php if ($homepage_label_prev) { echo $homepage_label_prev; } else { echo "« prev"; } ?>',
- nav_label_next : '<?php if ($homepage_label_next) { echo $homepage_label_next; } else { echo "next »"; } ?>'
- --------------------------------------------------------------------------------------------
- wp-content/themes/network/library/components/discover-header.php
- 1. Find the following around line 26
- <div class="submit-button"><input name="wp-submit" id="wp-submit" value="Log In" tabindex="100" type="submit"></div>
- Replace with
- <div class="submit-button"><input name="wp-submit" id="wp-submit" value="Log In" tabindex="100" type="submit" /></div>
- ####################
- 2. Find the following around line 27
- <input name="redirect_to" value="<?php echo get_option('siteurl'); ?>/wp-admin/" type="hidden">
- Replace with
- <input name="redirect_to" value="<?php echo get_option('siteurl'); ?>/wp-admin/" type="hidden" />
- ####################
- 3. Find the following around line 28
- <input name="testcookie" value="1" type="hidden">
- Replace with
- <input name="testcookie" value="1" type="hidden" />
- --------------------------------------------------------------------------------------------
- /wp-content/themes/network/template-fullwidth.php
- 1. Find '<?php get_header() ?>' around line 7
- Copy it, remove it from where it is and place it just above '<div id="container-background">'
- ####################
- 2. Add 2X '</div>' just before '<?php get_footer() ?>'
- --------------------------------------------------------------------------------------------
- Non theme related bug causing site to not validate - per http://core.trac.wordpress.org/ticket/10108
- Create a form called 'searchform.php' and add the following code :
- #######################################################################################
- <?php
- $form = '<form method="get" id="searchform" action="' . home_url( '/' ) . '" >
- <div><label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
- <input type="text" value="' . get_search_query() . '" name="s" id="s" />
- <input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
- </div>
- </form>';
- ?>
- ########################################################################################
- Place searchform.php in either the root of your network theme or child-theme folder. ( e.g. /wp-content/themes/network )
- vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
- Alternatively, you can fix this by changing the hard coding in the WordPress core (less desirable as it will get overwritten on WP update)
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- To change the hard coding........
- /wp-includes/general-template.php
- Find the following around line 160
- $form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
- Replace with
- $form = '<form method="get" id="searchform" action="' . home_url( '/' ) . '" >
- --------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement