Rewrites organization
- Create lib/rewrites.php and move everything from lib/htaccess.php
except the H5BP htaccess functionality into it
- In the config, change add_theme_support('rewrite-urls') to
add_theme_support('rewrites')
- Remove the Apache/LightSpeed HTTPD check for rewrites
- Update docs with better Nginx rewrite rules
This commit is contained in:
@@ -5,12 +5,11 @@
|
||||
|
||||
// Enable theme features
|
||||
add_theme_support('root-relative-urls'); // Enable relative URLs
|
||||
add_theme_support('rewrite-urls'); // Enable URL rewrites
|
||||
add_theme_support('rewrites'); // Enable URL rewrites
|
||||
add_theme_support('h5bp-htaccess'); // Enable HTML5 Boilerplate's .htaccess
|
||||
add_theme_support('bootstrap-top-navbar'); // Enable Bootstrap's fixed navbar
|
||||
add_theme_support('nice-search'); // Enable /?s= to /search/ redirect
|
||||
|
||||
|
||||
/**
|
||||
* Define which pages shouldn't have the sidebar
|
||||
*
|
||||
@@ -65,12 +64,10 @@ define('GOOGLE_ANALYTICS_ID', ''); // UA-XXXXX-Y
|
||||
define('POST_EXCERPT_LENGTH', 40);
|
||||
|
||||
/**
|
||||
* $content_width is a global variable used by WordPress for max image upload sizes and media embeds (in pixels)
|
||||
*
|
||||
* Example: If the content area is 640px wide, set $content_width = 620; so images and videos will not overflow.
|
||||
*
|
||||
* Default: 940px is the default Bootstrap container width.
|
||||
*
|
||||
* This is not required or used by Roots.
|
||||
*/
|
||||
* $content_width is a global variable used by WordPress for max image upload sizes
|
||||
* and media embeds (in pixels).
|
||||
*
|
||||
* Example: If the content area is 640px wide, set $content_width = 620; so images and videos will not overflow.
|
||||
* Default: 940px is the default Bootstrap container width.
|
||||
*/
|
||||
if (!isset($content_width)) { $content_width = 940; }
|
||||
|
||||
Reference in New Issue
Block a user