• Hello!

    My website is amandabloom.com.

    I’m really digging Spun and having fun playing around with it. I’ve amended the front page to display pages instead of posts, and I gave also created a custom page template based on the index.php file to create a page for my “Blog” section, which will be a feed of all my posts categorized as “Blog.”

    My goal in creating the custom template was to create a feed for specific posts and have it look exactly like the front page, lovely circles and all. I got the feed going, but my circles have gone all floppy! Another post with a featured image is a square. You can see what happened with this Blog page here: amandabloom.com/blog.

    I’m probably missing something in my custom page template. I’ll copy it here. Any insight would be much appreciated! I’m planning on doing the same thing with another custom page template to create a “Portfolio” posts page.

    <?php
    /**
     * Template Name: Blog Template
     *
     *A jerryrigged file for the Blog page pulled from Spun's main index file.
     *
     * @package Spun
     * @since Spun 1.0
     */
    
    get_header(); ?>
    
    		<div id="primary" class="content-area">
    			<div id="content" class="site-content" role="main">
    			<?php if ( is_home() && ! is_paged() ) : ?>
    
    				<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    			<?php endif; ?>
    
    			<?php if ( have_posts() ) : ?>
    <?php query_posts('post_category=blog'); ?>
    				<?php /* Start the Loop */ ?>
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php
    						/* Include the Post-Format-specific template for the content.
    						 * If you want to overload this in a child theme then include a file
    						 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
    						 */
    						get_template_part( 'content', 'home' );
    					?>
    
    				<?php endwhile; ?>
    
    				<?php spun_content_nav( 'nav-below' ); ?>
    
    			<?php elseif ( current_user_can( 'edit_posts' ) ) : ?>
    
    				<?php get_template_part( 'no-results', 'index' ); ?>
    
    			<?php endif; ?>
    
    			</div><!-- #content .site-content -->
    		</div><!-- #primary .content-area -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
Viewing 15 replies - 16 through 30 (of 35 total)
  • Hi , I would like to use the same solution you are trying for your site.

    First of all I manage the homepage to have pages and not articles, but really I would like to have categoryies and not pages…it is this possible?

    I would like to have at least 3 circles and every circles is a category, clicking on then the visitor is target on an another page where are the articles… you can help me?
    I just made a topic but I think you and Roel are the only two who are near the solution I am looking for ( hoping you understand my poor english πŸ™‚ )

    Thanks a lot
    Banjer

    @ Amanda: I’ll try to have another look at my CSS but it will probably be at the end of this week.

    @ Banjer: Unfortunately, I don’t use categories, so I don’t have any experience with that.

    ok thank you …but how do you do to have articles on this page http://www.cameronlab.com/research/

    I have set the home to have page but when I write a new article how can I do to target them to one particular page as you did with reserch and Amanda with blog??

    ok thank you …but how do you do to have articles on this page http://www.cameronlab.com/research/

    I have set the home to have page but when I write a new article how can I do to target them to one particular page as you did with reserch and Amanda with blog??

    The articles on that page are child pages of the research page, not categories. How Amanda did hers I don’t know.

    Could you so kind to explain how to code it, I am not sure to understand how exactly work.

    I can, but unfortunately not right now. I’ll get back to you when I have a little more time. Sorry about that.

    Don’t worry, I don’t mean now, when you have a little more time I will appreciate your help, thanks

    Thread Starter amanduhb52

    (@amanduhb52)

    Banjer, I think you need to include this code on your index.php file:

    <?php query_posts('post_type=category'); ?>

    So the top of your code should look like this:

    <?php
    /**
     * The main template file.
     *
     * This is the most generic template file in a WordPress theme
     * and one of the two required files for a theme (the other being style.css).
     * It is used to display a page when nothing more specific matches a query.
     * E.g., it puts together the home page when no home.php file exists.
     * Learn more: http://codex.wordpress.org/Template_Hierarchy
     *
     * @package Spun
     * @since Spun 1.0
     */
    
    get_header(); ?>
    
    		<div id="primary" class="content-area">
    			<div id="content" class="site-content" role="main">
    			<?php if ( is_home() && ! is_paged() ) : ?>
    
    				<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
    			<?php endif; ?>
    			<?php if ( have_posts() ) : ?>
    <?php query_posts('post_type=category'); ?>
    				<?php /* Start the Loop */ ?>

    I will try and let you know as soon as possible …. thank you πŸ™‚

    NO , now every circles is disappeared!

    Thread Starter amanduhb52

    (@amanduhb52)

    Sorry, that was a guess. You should probably start a new thread for this issue.

    Don’t worry Amanda, and thank you very much, but I just posted two thread and no one have answerd.
    But yours solution it is what I am looking for, I only want to apply on every pages.

    This is what I mean

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘Created a custom page for category posts, circles got sloppy!’ is closed to new replies.