Pages not showing content
-
Hello guys i know its probably not the place, but im still trying to get your help or at least a hint, please, my pages are not displaying the content on my new theme, but i switch back to twelve, it works…please guys would you help me? here is the code of the page.php, loop.php and loop-page.php files, maybe you could tell me what to change to fix it? thanks in advance.
page.php
<?php /** * Static Page template */ ?> <?php get_header(); ?> <?php get_template_part( 'loop', 'page' ); ?> <?php get_footer(); ?> loop.php <?php /** * Loop template part file */ ?> <div class="row"> <div class="eightcol"> <?php /* Main loop - displays posts */ if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <article <?php post_class(); ?>> <h1><a>"><?php the_title(); ?></a></h1> <?php if ( has_post_thumbnail() ) { ?> <p class="img-wrap"><?php // the_post_thumbnail( 'post-featured-image' ); ?></p> <?php } ?> <?php the_content( night_filter_excerpt_more( 'Read More' ) ); ?> <?php wp_link_pages( array( 'before' => '<p class="link-pages"><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number' ) ); ?> <div class="postmetadata"> <?php if ( 'post' == get_post_type() ) { ?> <p>posted on <?php the_time( get_option( 'date_format' ) ); ?> in <?php the_category(', '); ?> with <a>#comments"><?php comments_number( '<span class="count">0</span> comments', '<span class="count">1</span> comment', '<span class="count">%</span> comments' ); ?></a></p> <?php } ?> </div> </article> <?php if ( ! post_password_required() && ( is_single() || ( is_page() && comments_open() ) ) ) { /** * Output the comments template */ comments_template( '', true ); } ?> <?php endwhile; /* If no posts, then serve error message */ else: ?> <article class="post"> <h1><?php _e( 'Not Found', 'indiefest' ); ?></h1> <p><?php _e( 'Sorry, but you are looking for something that isn\'t here.', 'indiefest' ); ?></p> </article> <?php endif; ?> <div class="postsnavlinks"> <?php if ( function_exists( 'wp_pagenavi' ) ) { wp_pagenavi(); } else if ( function_exists( 'foxhound_get_paginate_archive_page_links' ) ) { echo foxhound_get_paginate_archive_page_links( 'list', 1, 3 ); } else { ?> <span class="postsnavnewer"><?php previous_posts_link( 'Newer Entries' ); ?></span> <span class="postsnavolder"><?php next_posts_link( 'Older Entries' ); ?></span> <?php } ?> </div> </div> <div class="fourcol last"> <div id="side"> <?php dynamic_sidebar( 'sidebar' ); ?> </div> </div> </div> loop-page.php <?php /** * Loop template part file */ ?> <?php global $post; $fullwidth = ( 'template-full-width.php' == get_post_meta( $post->ID, '_wp_page_template', true ) ? true : false ); ?> <div class="row"> <div class="<?php echo ( $fullwidth ? 'twelvecol' : 'eightcol' ); ?>"> <?php /* Main loop - displays posts */ if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <article <?php post_class(); ?>> <?php } ?> <?php the_content( night_filter_excerpt_more( 'Read More' ) ); ?> <h1><a>"><?php the_title(); ?></a></h1> <?php if ( has_post_thumbnail() ) { ?> <p class="img-wrap"><?php the_post_thumbnail( 'post-featured-image' ); ?></p> <?php wp_link_pages( array( 'before' => '<p class="link-pages"><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number' ) ); ?> <div class="postmetadata"> <?php if ( 'post' == get_post_type() ) { ?> <p>posted on <?php the_time( get_option( 'date_format' ) ); ?> in <?php the_category(', '); ?> with <a>#comments"><?php comments_number( '<span class="count">0</span> comments', '<span class="count">1</span> comment', '<span class="count">%</span> comments' ); ?></a></p> <?php } ?> </div> </article> <?php if ( ! post_password_required() && ( is_single() || ( is_page() && comments_open() ) ) ) { /** * Output the comments template */ comments_template( '', true ); } ?> <?php endwhile; /* If no posts, then serve error message */ else: ?> <article class="post"> <h1><?php _e( 'Not Found', 'indiefest' ); ?></h1> <p><?php _e( 'Sorry, but you are looking for something that isn\'t here.', 'indiefest' ); ?></p> </article> <?php endif; ?> <div class="postsnavlinks"> <?php if ( function_exists( 'wp_pagenavi' ) ) { wp_pagenavi(); } else if ( function_exists( 'foxhound_get_paginate_archive_page_links' ) ) { echo foxhound_get_paginate_archive_page_links( 'list', 1, 3 ); } else { ?> <span class="postsnavnewer"><?php previous_posts_link( 'Newer Entries' ); ?></span> <span class="postsnavolder"><?php next_posts_link( 'Older Entries' ); ?></span> <?php } ?> </div> </div> <?php if ( false == $fullwidth ) { ?> <div class="fourcol last"> <div id="side"> <?php dynamic_sidebar( 'sidebar' ); ?> </div> </div> <?php } ?> </div>
[Moderator Note: Please post code or markup snippets between backticks or use the code button. Or better still – use a pastebin. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Pages not showing content’ is closed to new replies.