yachinyou
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Error when opening pagesA complete manual update is just way too time consuming and daunting for a non-technical person like me. But I agree that editing the file yourself is also risky. This time I downloaded the latest copy of wordpress and replaced the troubled file with the new one. It worked.
Forum: Fixing WordPress
In reply to: Error when opening pagesgo to wp-includes/template.php
Insert this chunk of code
// in wp-includes/post-template.php /** * Get the specific template name for a page. * * @since 3.4.0 * * @param int $id The page ID to check. Defaults to the current post, when used in the loop. * @return string|bool Page template filename. Returns an empty string when the default page template * is in use. Returns false if the post is not a page. */ function get_page_template_slug( $post_id = null ) { $post = get_post( $post_id ); if ( 'page' != $post->post_type ) return false; $template = get_post_meta( $post->ID, '_wp_page_template', true ); if ( ! $template || 'default' == $template ) return ''; return $template; }After this chunk of code
function get_page_template() { $id = get_queried_object_id(); $template = get_page_template_slug(); $pagename = get_query_var('pagename'); if ( ! $pagename && $id ) { // If a static page is set as the front page, $pagename will not be set. Retrieve it from the queried object $post = get_queried_object(); $pagename = $post->post_name; } $templates = array(); if ( $template && 0 === validate_file( $template ) ) $templates[] = $template; if ( $pagename ) $templates[] = "page-$pagename.php"; if ( $id ) $templates[] = "page-$id.php"; $templates[] = 'page.php'; return get_query_template( 'page', $templates ); }That’s what worked for me. Good luck!
I wanted to incorporate the slideshow on top of the posts, similar to the “featured content” widget. I figured out how to display the slideshow outside of a post/page and still have the navigation bar show up. Please go to
wp-content/plugins/nextgen-gallery/widgets/widgets.php
around line 61 is this code
$swfobject->add_flashvars( 'shownavigation', 'false', 'true', 'bool');now swap the value “false” with the value “true”, so the code looks like this:
$swfobject->add_flashvars( 'shownavigation', 'true', 'false', 'bool');Now you have swapped the default value to show the navigation bar, so if you embed the slideshow widget into the sidebar or other places other than inside of a post or page it should show the navigation bar.
Forum: Fixing WordPress
In reply to: Eliminate Sidebar and Comment FormWow, this is so cool, thanks so much !!