• 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

Using custom field and category to populate blog page

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 › Design Tips and Tricks › Using custom field and category to populate blog page

This topic is: not resolved
  • This topic has 5 replies, 3 voices, and was last updated 13 years, 5 months ago by Wheeler.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • January 4, 2013 at 4:07 pm #9588
    Wheeler
    Member

    Hi, I've not had much luck getting an answer to my other question, so thought I'd try this idea to design my "VeloGarage" page. I thought this idea might work to replicate that page on my site now pulling in a custom post type with a custom function ... and I guess it uses the WP loop in a similar way (?)

    The problem is, it overwrites the existing introductory content (text and image) on the page. Does anyone know if it is possible to maintain existing content and have the posts begin after that content? Solving this conundrum would enable to convert my site over to Genesis.

    Thanks in advance for any help.

    January 7, 2013 at 10:11 pm #10265
    Jen Baumann
    Participant

    Sure, here's a tutorial: http://dreamwhisperdesigns.com/genesis-tutorials/add-content-genesis-blog-page-template/ to keep content at the top of the blog page.

    If you want to explore custom post types you should check out http://wpsmith.net/ and http://www.billerickson.net/blog/.

    January 7, 2013 at 11:18 pm #10277
    wpsmith
    Member

    Jen's post is accurate and a nice shortcut. You will need to create a page_blog.php and place that in your child theme. The current blog page template that is packaged in Genesis by default will not accomplish what you want. Another option would be to do this:

    add_action( 'genesis_before_loop', 'child_custom_introduction', 25 );
    /**
    * Add introduction content to page_blog.php template
    */
    function child_custom_introduction() {
    if ( is_page_template( 'page_blog.php' ) ) {
    global $post;
    echo apply_filters( 'the_content', $post->post_content );
    }
    }

    Also see how to use the query_args Easter Egg here and here.


    Travis Smith | Recommended StudioPress Developer & Contributor
    WP Smith | @wp_smith | GitHub

    Due to the forums, please paste code using Pastebin, JS Fiddle (for JavaScript) or GitHub.
    How to use Firebug for Designers by SixRevisions

    January 10, 2013 at 2:03 am #10883
    Wheeler
    Member

    Thanks for the replies (though I'm a bit foggy on the answers). I just realized I need to maintain my custom post types and taxonomy, so need to pull those into the page.

    It took me months to figure out how to do this in the present theme (Thesis) ... hope it's not going to take as long to figure out the PHP to use in Genesis.

    January 10, 2013 at 8:43 pm #11116
    wpsmith
    Member

    Using custom post types and taxonomies is the same across themes since that is primarily a WordPress functionality. The hooks are mainly the only things that will change. If you could be more specific, we could help you better.


    Travis Smith | Recommended StudioPress Developer & Contributor
    WP Smith | @wp_smith | GitHub

    Due to the forums, please paste code using Pastebin, JS Fiddle (for JavaScript) or GitHub.
    How to use Firebug for Designers by SixRevisions

    February 20, 2013 at 2:37 pm #21792
    Wheeler
    Member

    OK. I got discouraged and put this project on the back burner, but I really need to move my site to something new, so here goes again.

    First, thanks to those who have spent the time to try to help.

    I want to replicate this page, which pulls in the custom page type "garage" with own taxonomy. Presently, it used this code in the Thesis custom.php (and, of course references the Thesis custom loop):

    //display latest teasers on garage page
    class garage_page extends thesis_custom_loop {
    function page() {
    //display normal page if not paged
    if(!is_paged()) {
    thesis_loop::page();
    }
    global $wp_query;
    //prepare & run new query (no saving needed so it will respond on post_type_archive() conditional and
     enable pagination)
    $paged = ($wp_query->query_vars['paged'] != 0 ) ? $wp_query->query_vars['paged'] : 1 ;
    $args = array(
    'post_type' => 'garage',
    'posts_per_page' => '14',
    'paged' => $paged
    );
    $garage = query_posts($args);
    //display posts
    global $thesis_design;
    $thesis_design->display['archives']['style'] = 'teasers';
    $thesis_design->home['body']['content']['features'] = 0;
    thesis_loop::home();
    }
    }
    //check if the garage display needed
    function custom_check_garage_page() {
    //you need to modify the parameter in the next line to make it work
    if(is_page('garage')) {
    $garage_page = new garage_page();
    }
    }
    add_action('wp_head','custom_check_garage_page');
    //end garage page

    I'd really, really like to move to Genesis. I've got everything else on my test site to the point I can live with until I learn more. This barrier is pretty much the only thing holding me back now.

    Thanks in advance.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ 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