WordPress twenty eleven sidebar on Pages
Funny you should ask, I’ve just posted an How to tutorial on how to add a sidebar on posts and pages in Twenty Eleven
Funny you should ask, I’ve just posted an How to tutorial on how to add a sidebar on posts and pages in Twenty Eleven
The protected post system uses POST so by default, no you can’t. However, here is a bare-bone mechanism that will let you do this. function bypass_protected_post() { if (is_single()) { global $post,$_GET; if (isset($post->post_password)) { $bypasskey = get_post_meta($post->ID, ‘bypasskey’, true); if (isset($_GET[‘bypasskey’]) && $_GET[‘bypasskey’] == $bypasskey) { $post->post_password = null; } } } } add_action(‘wp_head’,’bypass_protected_post’); … Read more
Post Navigation Here’s the way its done in the Twenty Twelve themes single.php file however it looks like Twenty Fourteen has a better solution which works for pages as well. <nav class=”nav-single”> <h3 class=”assistive-text”><?php _e( ‘Post navigation’, ‘twentytwelve’ ); ?></h3> <span class=”nav-previous”><?php previous_post_link( ‘%link’, ‘<span class=”meta-nav”>’ . _x( ‘←’, ‘Previous post link’, ‘twentytwelve’ ) . … Read more
How to limit page pagination
How-to simplify your life I’d go a fairly simpler route: Add a “main/parent” page Apply your template there Add “child” pages to this main page Alter the query to include them Code example as plugin for a quick test Here’s an (untested) plugin that modifies the query args to not only reduce it to a … Read more
The Template Hierarchy has a set of filters to let you modify what template gets loaded for each type of query. In this case you can use home_template. You’ll have to do some work to implement your own interface for choosing a template, via the Theme Mods API/Customizer API, or there are also a number … Read more
Unfortunately the details you’ve provided are a bit limited. For example, what sort of hosting are you on and what sort traffic are you dealing with here? If you have a shared hosting account then you should know that shared hosts provide you with limited cpu and memory resources as it’s shared across multiple hosting … Read more
When dealing with WordPress and Flash, we have to use always absolute URLs. When embedding, when referencing inside the ActionScript, in XML files and when dealing with Remoting. This way is hassle free. I put my SWFs inside wp-content/swf/ and use the URL http://example.com/wp-content/swf/my-flash.swf. There’s nothing virtual about this, it has to be real.
If I understand you well, you can do that with add_rewrite_rule(); function to map the url to specific query variables. https://codex.wordpress.org/Rewrite_API/add_rewrite_rule function myfunc_rewrite_rules() { add_rewrite_rule(‘user/?([^/]*)’, ‘index.php?pagename=user&username=$matches[1]’, ‘top’); } function myfunc_username_query_vars($vars) { $vars[] = ‘username’; return $vars; } add_action(‘init’, ‘myfunc_rewrite_rules’); //add query vars (username) to wordpress add_filter(‘query_vars’, ‘myfunc_username_query_vars’); function myfunc_display() { $userpage = get_query_var(‘pagename’); $username = … Read more
To remove the header image of the Twenty Eleven theme on other pages then your homepage, change the following code in header.php (in wp-content/themes/twentyeleven) Before: <?php // Check to see if the header image has been removed $header_image = get_header_image(); if ( ! empty( $header_image ) ) : ?> After: <?php // Check to see … Read more