• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Custom Blog Template

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Custom Blog Template

This topic is: not resolved

Tagged: blog templates

  • This topic has 3 replies, 3 voices, and was last updated 10 years, 2 months ago by dimensionseo.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 25, 2016 at 2:07 pm #182248
    brettatkin
    Member

    Given the following (http://foralles.com/community/), I've created a grid layout for the blog "Home" page. I have a Page in WP called "Community" that uses this blog template.

    I want to display the PAGE Title and Content but not the POST title and content from each post. Here is my code for a file called page_blog.php

    <?php
    
    /**
     * Template Name: Blog
     * This is your custom Blog page
     */
    
    //* Show page content above posts
    add_action( 'genesis_loop', 'genesis_standard_loop', 5 );
    
    //* Add the featured image after post title
    add_action( 'genesis_entry_header', 'foralles_grid' );
    function foralles_grid() {
    
    	if ( has_post_thumbnail() ){
    		echo '<div class="archive-featured-image">';
    		echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
    		echo get_the_post_thumbnail($thumbnail->ID);
    		echo '</a>';
    		echo '<a href="' . get_permalink() .'" title="' . the_title_attribute( 'echo=0' ) . '">';
    		echo the_title( '<h2>', '</h2>' );
    		echo '</a>';
    		echo '</div>';
    	}
    
    }
    
    //* Remove the ad widget
    remove_action( 'genesis_before_loop', 'adspace_before_loop' );
    
    //* Remove author box
    remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );
    
    //* Remove the post meta function
    remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    
    //* Remove the post info function
    remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
    
    //* Force full width content layout
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    
    //* Remove the entry title (requires HTML5 theme support)
    remove_action( 'genesis_entry_header', 'genesis_do_post_title' );
    
    //* Remove the post content
    remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
    
    genesis();

    This block of code is doing nothing...I can remove it and the page looks the same.

    //* Show page content above posts
    add_action( 'genesis_loop', 'genesis_standard_loop', 5 );

    If I remove this block of code, the page AND post title/content gets displayed (which I don't want - I just want the page content).

    //* Remove the post content
    remove_action( 'genesis_entry_content', 'genesis_do_post_content' );
    http://foralles.com/community/
    March 26, 2016 at 7:17 am #182277
    Victor Font
    Moderator

    The loop query retrieves posts, not pages. I am not understanding what you mean by you want to display the page title and content and not the post title and content. Posts are not pages, neither are they associated with pages. When displayed as a single post, the post title is the page title. Unless you modify the loop query, you can only display posts. You need to be more specific with content examples if you want help with this.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 26, 2016 at 11:28 am #182294
    brettatkin
    Member

    Victor, I want to do what the default WooCommerce Shop page does. It the Dashboard, WC creates a page called "shop". What I enter on that page for the Title and Content shows up on the Shop page above the product output.

    http://foralles.com/shop/

    I hard-coded the Title and Content into the page_blog.php template file, but I want to make this dynamic - the client can update.

    http://foralles.com/community/

    Does that help?

    Thanks

    Brett

    March 28, 2016 at 6:16 am #182358
    dimensionseo
    Member

    Hello Victor,
    I was also facing same problem when i was trying to fix my website layout and after reading your post i got to know where am i doing wrong thing. Thanks!

    I love to be here.

    Thanks


    http://www.greencoffeebean.co.in || http://www.dianaboluk.co.uk

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble