• Can you add a blog template to the theme?

    Also, the menu on the sidebar sometimes disappears depending on the width of the browser.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Theme Author Shaped Pixels

    (@shaped-pixels)

    A blog template?

    As for the sidebar menu issue, someone else brought this to my attention as well and I am working on a fix for that. As the browser window decreases, there’s around 180px of width that it disappears, so I will have to adjust the responsive break points to solve that. Watch for an update coming.

    Thread Starter PSA@PUHSD

    (@psapuhsd)

    Yes, at Blog template, so we can have a dedicated page to blog posts. Other themes have them. The one I want to migrate from has one, so I was hoping this one would too.

    Theme Author Shaped Pixels

    (@shaped-pixels)

    Perhaps I am not understanding this one, but if you can provide me with an example theme that has one, I can get a better idea of what you are referring to.

    Generally you have two methods to show blog posts, either by default where your front page is automatically the blog that displays posts, or you can create a page, then using the Settings >> Reading, you can change your blog posts to display on that page instead of the front. This theme can do that. It’s also known as a Creating a Static Front Page

    Thread Starter PSA@PUHSD

    (@psapuhsd)

    In the index of the theme, it’s a file called templete-blog.php.
    You can select the templates when your creating a new page.

    <?php
    /*
    Template Name: Blog
    */
    ?>
    <?php get_header(); ?>
    <?php global $woo_options; ?>
    
        <!-- #content Starts -->
    	<?php woo_content_before(); ?>
    
        <div id="title-container">
    	  <h1 class="title col-full"><?php the_title(); ?></h1>
    	</div>
    
        <div id="content" class="page col-full">
    
            <!-- #main Starts -->
            <div id="main" class="col-left">      
    
    		<?php if ( $woo_options[ 'woo_breadcrumbs_show' ] == 'true' ) woo_breadcrumbs(); ?>  			
    
            <?php if ( get_query_var('paged') ) $paged = get_query_var('paged'); elseif ( get_query_var('page') ) $paged = get_query_var('page'); else $paged = 1; ?>
            <?php query_posts("post_type=post&paged=$paged"); ?>
            <?php if (have_posts()) : $count = 0; while (have_posts()) : the_post(); $count++; ?>
    
                <!-- Post Starts -->
                <div <?php post_class(); ?>>
    
                    <?php if ( $woo_options[ 'woo_post_content' ] != "content" ) woo_image('width='.$woo_options[ 'woo_thumb_w' ].'&height='.$woo_options[ 'woo_thumb_h' ].'&class=thumbnail '.$woo_options[ 'woo_thumb_align' ]); ?> 
    
                    <h2 class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    
                    <?php woo_post_meta(); ?>
    
                    <div class="entry">
    					<?php global $more; $more = 0; ?>
                        <?php if ( $woo_options[ 'woo_post_content' ] == "content" ) the_content(__('Read More...', 'woothemes')); else the_excerpt(); ?>
                    </div>
        			<div class="fix"></div>
    
                    <div class="post-more">
    					<span class="comments"><?php comments_popup_link(__('Leave a comment', 'woothemes'), __('1 Comment', 'woothemes'), __('% Comments', 'woothemes')); ?></span>
                    	<?php if ( $woo_options[ 'woo_post_content' ] == "excerpt" ) { ?>
    					<span class="post-more-sep">&bull;</span>
                        <span class="read-more"><a href="<?php the_permalink() ?>" title="<?php _e('Continue Reading &rarr;','woothemes'); ?>"><?php _e('Continue Reading &rarr;','woothemes'); ?></a></span>
                        <?php } ?>
                    </div>   
    
                </div><!-- /.post -->
    
            <?php endwhile; else: ?>
                <div <?php post_class(); ?>>
                    <p><?php _e('Sorry, no posts matched your criteria.', 'woothemes') ?></p>
                </div><!-- /.post -->
            <?php endif; ?>  
    
                <?php woo_pagenav(); ?>
    			<?php wp_reset_query(); ?>                
    
            </div><!-- /#main -->
    
    		<?php get_sidebar(); ?>
    
        </div><!-- /#content -->    
    
    <?php get_footer(); ?>

    Theme Author Shaped Pixels

    (@shaped-pixels)

    That is obviously a WooThemes theme…which theme is that from?

    Anyway, My next theme will have something similar to that. The idea is to have pre-defined template layouts for the blog instead of doing it the old WP method of creating a blog page and using the Settings >> Reading option settings.

    Theme Author Shaped Pixels

    (@shaped-pixels)

    Quick follow up…I will be uploading an update to the theme today. I’m just testing the adjustment to the sidebar/menu so it doesn’t disappear at a certain width. So far it looks 100% on my test site.

    Theme Author Shaped Pixels

    (@shaped-pixels)

    I’ve uploaded version 1.0.7 which should solve the issue of the menu disappearing at a certain width of the viewing window. The update won’t go live until the WP Theme Review Team approves the update….hopefully we won’t have to wait long.

    Thread Starter PSA@PUHSD

    (@psapuhsd)

    Looking forward to the update.
    Hopefully the re-sizing of the sidebar will work now too?
    Thanks!

    And FYI, and a side note:
    I also removed the forced UPPERCASE in the CSS for the headers – it’s too much uppercase.
    I was able to accomplish getting Blog posts on the Static homepage by adding this code:

    <div id="content">
    
            <?php query_posts('post_type=post&post_status=publish&posts_per_page=2&paged='. get_query_var('paged')); ?>
    
    	<?php if( have_posts() ): ?>
    
            <?php while( have_posts() ): the_post(); ?>
    
    	    <div id="post-<?php get_the_ID(); ?>" <?php post_class(); ?>>
    
            	<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( array(200,220) ); ?></a>
    
                    <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    
    		<?php the_content(__('Continue reading »','example')); ?>
    
                </div><!-- /#post-<?php get_the_ID(); ?> -->
    
            <?php endwhile; ?>
    
    	<?php else: ?>
    
    		<div id="post-404" class="noposts">
    
    		    <p><?php _e('None found.','example'); ?></p>
    
    	    </div><!-- /#post-404 -->
    
    	<?php endif; wp_reset_query(); ?>

    Theme Author Shaped Pixels

    (@shaped-pixels)

    The sidebar resize setting is also working too.

    Thread Starter PSA@PUHSD

    (@psapuhsd)

    Another side note, for me, there’s a TON of things on the menu, so I added overflow to be scrolled. If (for some weird reason) someone wanted to open up all the menus, you were unable to see the bottom half.

    .primary-navigation {
        display: block;
        overflow-y: auto;
        max-height: 500px;
    }

    I’m also working on adding a 100px~ margin at the top that will use the same picture as the sidebar. ie, so that white doesn’t go all the way to the top.
    Example: http://i.imgur.com/7gzm55c.png

    Still waiting for the update to be pushed through; thanks again!

    Theme Author Shaped Pixels

    (@shaped-pixels)

    Generally a theme like this is not really meant to have very large menus, so it will definitely depend on how many items you have for both the parent and submenu groups. This theme is categorized as a “blog”, but if you need a bit more space, you can also adjust the #sidebar-inner padding, as well, adjust the menu font size to be smaller…which should gain you additional space.

    Of course, that is the beauty of any theme, you can modify them to a user’s needs 🙂

    Anyway, hopefully the update will get approved soon. Looks like about a 2 day wait when I looked at the queue timetable.

    Thread Starter PSA@PUHSD

    (@psapuhsd)

    Got the update.
    There was still some weird stuff that was happening around 1024 and 992 pixels. I think I got it fixed by editing some of CSS myself. In my case, the menu primary-navigation wasn’t displaying from 992 to 1024. Also, AT the exact pixel width of 993 (I think), the sidebar was not 100% width or height, so it was only taking up the top-left corner, and the content was sitting in the bottom-right corner.

    Otherwise, loving the theme, thank you!

    Theme Author Shaped Pixels

    (@shaped-pixels)

    Thanks for the update information. I’m wondering if something was caught in the cache…anyway, are things now working out for you?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Blog Template – and Sidebar menu’ is closed to new replies.