• Fred

    (@fharrington86)


    Hi Everyone.

    This is my first time working on an incomplete custom theme, so please forgive me if any of my questions seem obvious. I am used to working on completed themes only.

    I am working here: https://harringtonsmarketing.co.uk/knebworth/

    My issues are mainly two pages.

    “News” page (needs to be blog posts)
    “Search resuts” page

    These both show blank results, even when I just enter simple code based on other themes. Am I missing some functions?

Viewing 1 replies (of 1 total)
  • Thread Starter Fred

    (@fharrington86)

    For example, I am using this code for Search Results (search.php).

    If you use the search box on the website, you will see what I mean
    https://harringtonsmarketing.co.uk/knebworth/

    <?php
    get_header(); ?>
    
    	<section id="primary" class="content-area">
    		<div id="content" class="site-content" role="main">
    
    			<?php if ( have_posts() ) : ?>
    
    			<header class="page-header">
    				<h1 class="page-title"><?php printf( __( 'Search Results for: %s', 'WordPress' ), get_search_query() ); ?></h1>
    			</header><!-- .page-header -->
    
    				<?php
    					// Start the Loop.
    					while ( have_posts() ) : the_post();
    
    						get_template_part( 'content', get_post_format() );
    
    					endwhile;
    
    				else :
    					print "<p>Nothing found</p>";
    
    				endif;
    			?>
    
    		</div><!-- #content -->
    	</section><!-- #primary -->
    
    <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Finishing a custom theme (blank pages)’ is closed to new replies.