• 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 5 replies - 31 through 35 (of 35 total)
  • Hi Amanda,

    I have looked at your site and you have the structure I want.
    A constantly visible heading ie no opacity/hover
    and I want my circles to go to pages rather than posts

    I have been trying to get the heading to change on and off for the past few weeks with no luck. I’m not sure if this is the “done” thing, but is it appropriate to ask for the code you have put in your child theme, so I can upload that? My current Style.css file is below, which I have put together from reading the style.css tutorial and copying code from forum posts.

    /*
    Theme Name:	spun child
     theme
    URI:	https://example.com/
    Description:	Child theme for spun theme
    Author:	 Magick
    Author URI:	https://example.com/about/
    Template:	spun
    Version:	0.1.0
    
    */
    @import url("../spun/style.css");
    
    */
     #masthead { opacity: 1; }
     #secondary { display: block; }
    
    .main-navigation a,
    #colophon,
    #colophon a {
     color: #999;
     font-family: sans-serif;
    }
    
    <?php /* Display Pages */ ?>
    
    			<?php query_posts('post_type=page'); ?>
    
    			<?php if ( have_posts() ) : ?>
    
    				<?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 /* Start the Loop */ ?>

    Any and all help welcome
    Magick

    Hi Amanda,

    I had a look at my CSS again and maybe if you try to copy everything I did that is related to my research page it might work. If it does work, you van delete stuff that you don’t think you need. I think it’s probably the .page-id-9 .hentry code.
    Just make sure you swap the id number in my code for the id number of your blog page:

    .page-id-9 #primary {
    	margin: 8em 13em 1.5em;
    	padding: 0;
    	width: 100%;
    }
    
    .page-id-9 #content {
    	margin:alignment-adjust:central;
    	width:40em;
    }
    
    .page-id-9 .hentry {
    height: auto;
    margin: 10px;
    padding: 0px;
    z-index: 10;
    float: left;
    width: 180px !important;
    }

    If this doesn’t work, I’m afraid I have no clue how to help you unless I get a brilliant brain wave in the near future.

    Good Luck!

    Thread Starter amanduhb52

    (@amanduhb52)

    That sort of worked. It moved my sloppy circles to the middle of the page. It’s a start!

    Hi ShaiRoelud,

    I saw your website. And you create awesome theme, I need that theme. can you please sujjest me? or if possible to purchase theme?

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