• Resolved TaskWrangler

    (@taskwrangler)


    I’ve been trying to figure this out for the last three days and I’m at a total loss. I really need the cavalry to come to my rescue.

    My client’s web site has a static homepage and several static info pages. I tried to set it up so that post titles, nav links, and widgets only show up on the blog page and posts, and not on the static pages. It ALMOST worked — all of these things show up fine on single post and archive pages, but on the main blog index the only thing displayed is the post content — no permalinks, titles, comment links or widgets. I’ve tried everything I can think of to get these things to show up but I’m at my wit’s end.

    Also, it only shows content from a single post (there’s only one post in my client’s dashboard, but I did everything first on my hard drive where there are three test posts in the queue).

    Main site: https://beelercounselingservices.com
    Blog page: https://beelercounselingservices.com/blog/
    Single post: https://beelercounselingservices.com/2009/12/21/hello-world/
    Archive: https://beelercounselingservices.com/2009/12/

    I would ultimately like the blog page to look like the archive page (with permalink title and meta links at the bottom) and display up to 10 posts.

    Any help will be muchly appreciated.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter TaskWrangler

    (@taskwrangler)

    If it helps, here’s the page.php code:

    <?php get_header() ?>
    
    	<div id="container">
    		<div id="content">
    
    <?php the_post() ?>
    
    <h2 class="entry-title" id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>">
    				<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    				<?php the_title() ?></a>
    
    				<div class="entry-content">
    <?php the_content() ?>
    
    <?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'sandbox' ) . '&after=</div>') ?>
    
    <?php edit_post_link( __( 'Edit', 'sandbox' ), '<span class="edit-link">', '</span>' ) ?>
    
    				</div>
    			</div><!-- .post -->
    
    <?php if ( get_post_custom_values('comments') ) comments_template() // Add a key+value of "comments" to enable comments on this page ?>
    
    		</div><!-- #content -->
    	</div><!-- #container -->
    
    <?php get_sidebar() ?>
    <?php get_footer() ?>

    What about setting up a page template for the custom static pages. See “Page Templates” at the link below.
    https://codex.www.ads-software.com/Pages#Creating_Your_Own_Page_Templates

    Change the page.php back, then make the changes to the index.php file for how you want the blog page to look like the archive page?

    Thread Starter TaskWrangler

    (@taskwrangler)

    I don’t think that’s it. As far as I can tell, everything that needs to be there in both the page.php and index.php files to make everything show up correctly is there, and there’s nothing to change.

    What’s weird is that if I remove the posts from the Blog page in the Reading settings, the Blog page title and the sidebar widgets appear. But when I set it to be the Posts page all of that disappears and all you see is the universal sidebar and post content as described above. I can’t figure out where it’s breaking down.

    Here’s the index.php code. Maybe you or one of the other WordPress smarties around here can see what I’m missing:

    <?php get_header() ?>
    
    	<div id="container">
    		<div id="content">
    
    			<div id="nav-above" class="navigation">
    				<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&laquo;</span> Older posts', 'sandbox' )) ?></div>
    				<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&raquo;</span>', 'sandbox' )) ?></div>
    			</div>
    
    <?php while ( have_posts() ) : the_post() ?>
    
    			<div id="post-<?php the_ID() ?>" class="<?php sandbox_post_class() ?>">
    				<h2 class="entry-title"><a href="<?php the_permalink() ?>" title="<?php printf( __('Permalink to %s', 'sandbox'), the_title_attribute('echo=0') ) ?>" rel="bookmark"><?php the_title() ?></a></h2>
    				<div class="entry-date"><abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>"><?php unset($previousday); printf( __( '%1$s – %2$s', 'sandbox' ), the_date( '', '', '', false ), get_the_time() ) ?></abbr></div>
    				<div class="entry-content">
    <?php the_content( __( 'Read More <span class="meta-nav">&raquo;</span>', 'sandbox' ) ) ?>
    
    				<?php wp_link_pages('before=<div class="page-link">' . __( 'Pages:', 'sandbox' ) . '&after=</div>') ?>
    				</div>
    				<div class="entry-meta">
    					<span class="author vcard"><?php printf( __( 'By %s', 'sandbox' ), '<a class="url fn n" href="' . get_author_link( false, $authordata->ID, $authordata->user_nicename ) . '" title="' . sprintf( __( 'View all posts by %s', 'sandbox' ), $authordata->display_name ) . '">' . get_the_author() . '</a>' ) ?></span>
    					<span class="meta-sep">|</span>
    					<span class="cat-links"><?php printf( __( 'Posted in %s', 'sandbox' ), get_the_category_list(', ') ) ?></span>
    					<span class="meta-sep">|</span>
    					<?php the_tags( __( '<span class="tag-links">Tagged ', 'sandbox' ), ", ", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?>
    <?php edit_post_link( __( 'Edit', 'sandbox' ), "\t\t\t\t\t<span class=\"edit-link\">", "</span>\n\t\t\t\t\t<span class=\"meta-sep\">|</span>\n" ) ?>
    					<span class="comments-link"><?php comments_popup_link( __( 'Comments (0)', 'sandbox' ), __( 'Comments (1)', 'sandbox' ), __( 'Comments (%)', 'sandbox' ) ) ?></span>
    				</div>
    			</div><!-- .post -->
    
    <?php comments_template() ?>
    
    <?php endwhile; ?>
    
    			<div id="nav-below" class="navigation">
    				<div class="nav-previous"><?php next_posts_link(__( '<span class="meta-nav">&laquo;</span> Older posts', 'sandbox' )) ?></div>
    				<div class="nav-next"><?php previous_posts_link(__( 'Newer posts <span class="meta-nav">&raquo;</span>', 'sandbox' )) ?></div>
    			</div>
    
    		</div><!-- #content -->
    	</div><!-- #container -->
    
    <?php get_sidebar() ?>
    <?php get_footer() ?>

    Just trying to talk this through. So the main problems are:

    “the main blog index the only thing displayed is the post content — no permalinks, titles, comment links or widgets”

    and

    the index page “only shows content from a single post.”

    You are using Sandbox theme. What plugins?

    Thread Starter TaskWrangler

    (@taskwrangler)

    That’s it. The plugins I’m using are Page Menu Editor, Widget Logic and Dagon Design Form Mailer.

    Question… what are you using the element ‘sandbox’ for. I see that littered all over your code. It really is not necessary, even for a theme. Some of the best themes I have seen do not have to have this. You just put a code and CSS style it the way you wish.

    Truthfully, I would like to take a direct stab at this issue to find out what is going on. I might even find reason to issue a child theme of Sandbox because this is just not something I would do when coding a theme.

    https://www.ads-software.com/extend/themes/sandbox …that is the theme you used for the framework? (just making sure) If it is, I will go download and check it out.

    Thread Starter TaskWrangler

    (@taskwrangler)

    Yep, that’s the theme. I don’t yet know enough about WordPress to have known it wasn’t something I needed. I’ll try removing it and see what happens. Thank you! If you have any more insight I’d love to hear it. I’m sure it’s something I did — the basic theme (sans my modifications) works fine with all of my settings.

    Any luck with this? It seemed like a complex problem and I wondered what the solution was.

    I would suggest stripping out the sandbox attributes and if you are familiar with HTML, and CSS, you can design the site to your specifications.

    I apologize for not getting back sooner. This is what I intended on doing to the layout.

    I also was going to make sure the code was up-to-date with the most current 2.9.1 version.

    Thread Starter TaskWrangler

    (@taskwrangler)

    @steviesue – Not so far. I let it simmer on the back burner all week hoping my subconscious would work out the problem.

    @blindishnet – I will try that and see how it goes. I was also thinking of just copying code from a different theme – right now I’ll call that Plan B and your suggestion Plan A. Thanks.

    Thread Starter TaskWrangler

    (@taskwrangler)

    In case anyone’s curious, I finally got it working. None of the suggested fixes worked — it seems that directing posts to the Blog page under the Reading settings was making things fall apart for some reason I could never figure out.

    Instead I undid the Posts page setting and got rid of the blog page, and just created a sidebar permalink to the Category archive. Now the client has to be sure to check the Blog category every time he posts, or it won’t show up. But that’s a minor annoyance compared to how many hours were spent trying to make it work the other way.

    Thanks to everyone who offered their input.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Title, nav links and widgets not showing up on blog page’ is closed to new replies.