• Resolved obewanz

    (@obewanz)


    I ran into yet another “bug” in the Hemingway Theme concerning the page templates within the theme. Even though there are almost countless CLOSED topics on this issue, none of them solved my problem. I’m running version 2.2 of the theme and as a result of this issue, will likely “fork” this theme to keep future modifications from these authors from breaking the fixes that I get implemented.

    So, and back to the bug that brought me here in the first place. Neither the “Full Width Template” nor the “No Sidebar Template” seem to change anything in my post or page display. I haven’t gone through all of the code to figure out why they aren’t working correctly on my site, I suspect it has something to do with the logic flow and not calling the is_page_template function at the appropriate time. I have examined the template files and they seem to be correct. Not being a WordPress developer, and having no desire to become one, I did however find a workaround.

    You’ll need to modify your singular.php file to match this one:

    <?php get_header(); ?>
    
    <main class="wrapper section-inner group" id="site-content">
    
    <?php	if ( is_page_template( 'template-fullwidth.php' ) ) { ?>
        <div class="site-content full-width">
    <?php	} else { ?>
        <div class="content left">
    <?php	} ?>
    
    		<div class="posts">
    												        
    			<?php 
    			
    			if ( have_posts() ) : 
    				
    				while ( have_posts() ) : the_post(); 
    
    					get_template_part( 'content', get_post_type() );
    
    				endwhile;
    			
    			endif; 
    			
    			?>
    			
    		</div><!-- .posts -->
    	
    	</div><!-- .content -->
    	
    <?php	if ( is_page_template( 'template-fullwidth.php' ) ) { 
    		//don't display sidebar
    		} else { 
    			get_sidebar();
    		} ?>
    		
    </main><!-- .wrapper -->
    		
    <?php get_footer(); ?>

    Basically this fix implements is_page_template calls to determine if the Full Width Template is being called and if it is, modifies the output accordingly. Essentially this is just changing the div element wrapper at the beginning of the content output to match that in the style.css file for this purpose, and removes the sidebar from the display output if the Full Width Template has been selected in your post or page attributes setting.

    I hope this helps someone fix their theme. I truly love the simplicity and “bloggish” design of this theme, I just wish it actually worked out of the box as it should.

    • This topic was modified 2 years, 5 months ago by obewanz. Reason: added code fix narrative for future viewers
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter obewanz

    (@obewanz)

    Oh, I’m also going to ask – PLEASE DO NOT MARK THIS AS SOLVED – until someone from the developer side actually fixes the freakin’ code!

    I’m so tired of seeing one reply to an issue from the “Hemingway” folks that may or may not actually fix the problem and then the topic is marked as “Solved”! …NOT the correct way to deal with bugs and their fixes, or support, because then folks have to search through thousands of meaningless “solved” fixes that do nothing – it’s VERY frustrating!

    Theme Author Anders Norén

    (@anlino)

    Hi @obewanz,

    First of all, nice attitude – really makes people want to reply to your support requests. Second, this is how the page templates in Hemingway work:

    • No sidebar template: Hides the sidebar and centers the content column.
    • Full width template: Sets the content column to span the entire inner width of the theme and hides the sidebar.

    Both of them work fine in the latest version of Hemingway. Since I’ve responded to your question, I’m marking the topic as resolved.

    — Anders

    Edit: Oh, and there are no “Hemingway folks”. Just me.

    • This reply was modified 2 years, 5 months ago by Anders Norén.
    Thread Starter obewanz

    (@obewanz)

    STILL NOT RESOLVED…
    I tried your “Solution” and it does not work.

    I would upload screenshots proving such if I could, but I cannot. I stand by EVERYTHING I said earlier. Hopefully when folks browse the support threads they will figure this out before they try to use this theme.

    Oh, and apparently my “attitude” was well warranted… marking a support post after a single reply as solving the issue without confirming the “solution” works doesn’t mean the issue has been resolved!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hemingway Theme won’t go fullwidth’ is closed to new replies.