• 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

Post Meta on Top Of .site-inner

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 › Post Meta on Top Of .site-inner

This topic is: resolved

Tagged: categories, functions.php, post meta

  • This topic has 11 replies, 3 voices, and was last updated 7 years, 8 months ago by Brad Dalton.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • June 4, 2015 at 7:36 am #154846
    itzsnider
    Participant

    All,

    I am trying to mimic the below photo

    https://www.dropbox.com/s/ovvmt7lmpthl6q9/2015-06-04%2009_23_00-Hangouts.png?dl=0

    See how it shows "geek" as the category "attached" to the content. I LOVE this look and think it would look great on my site.

    Currently I only have this in functions.php

    //* Customize the post meta function
    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
    if ( !is_page() ) {
    	$post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "]';
    	return $post_meta;
    }

    So I assume I need to somehow push the [post_categories before="Filed Under: "] to above the post area some how.

    Any ideas on where I should start hunting and pecking?

    http://www.geekdaily.co/kick-ass-superhero-alphabet/
    June 4, 2015 at 7:53 am #154850
    Erik D. Slater
    Member

    If you want to move the category to the top of an article/above the article title, this could be achieved with CSS:
    (1) ensure the article container has position: relative;
    (2) the categories container (if you have one) could be set to position: absolute;top: 0;

    Something along those lines anyway ...


    Erik D. Slater: Digital Platform Consultant • LinkedIn
    June 4, 2015 at 8:09 am #154852
    itzsnider
    Participant

    That works BUT technically it's still part of the entry-content when I need it pinned to the left side of the .full-width-content .content

    Here is what it looks like now

    How do I get it to be part of the full width content rather than the entry-content? Make sense?

    If I do something like margin-left: -200px; it works but will that show properly on mobile as well?

    June 4, 2015 at 10:35 am #154864
    itzsnider
    Participant

    Would something like this work?

    I assume I have to put this after the header

    //* Customize the post meta function
    add_filter( 'genesis_after_header', 'genesis_post_meta' );
    function genesis_post_meta($post_meta) {
    if ( !is_page() ) {
    	$post_meta = '[post_categories before="Filed Under: "]';
    	return $post_meta;
    }}

    And then I could style it?

    Or is it as simple as saying add_action( 'genesis_after_header', 'post_categories' ) ?

    June 5, 2015 at 5:39 am #154972
    itzsnider
    Participant

    Anyone able to lend a hand here?

    June 6, 2015 at 9:59 am #155111
    itzsnider
    Participant

    What am I missing here?

    My whole Functions.php is here - http://pastebin.com/yQhnLC3J

    I removed this code

    //* Customize the post meta function
    add_filter( 'genesis_post_meta', 'sp_post_meta_filter' );
    function sp_post_meta_filter($post_meta) {
    if ( !is_page() ) {
    $post_meta = '[post_categories before="Filed Under: "] [post_tags before="Tagged: "]';
    return $post_meta;
    }}

    and then I added this code

    remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    add_action( 'genesis_after_header', 'genesis_post_meta' );

    then it broke my site.... must be missing something small

    June 6, 2015 at 9:59 am #155112
    Brad Dalton
    Participant

    Tested and does exactly what you want.

    remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
    add_action( 'genesis_after_header', 'genesis_post_meta' );
    

    Using a code editor to paste this at the end of your functions file.


    Get Help – Book Consultation.

    June 6, 2015 at 10:02 am #155114
    itzsnider
    Participant

    I added it to the bottom and it brings the site white. Must be missing something.

    June 6, 2015 at 10:14 am #155116
    Brad Dalton
    Participant

    Did you use a code editor or the theme editor in WordPress?.

    Whats the error message? Also, link to the site please.


    Get Help – Book Consultation.

    June 6, 2015 at 10:18 am #155117
    itzsnider
    Participant

    For some reason this needs to be the last code

    /* Helps to remove ? content for pageload
    function _remove_script_version( $src ){
    	$parts = explode( '?ver', $src );
            return $parts[0];
    }
    add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
    add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );

    It now works, now to style it and remove tags from showing!!

    Thanks Brad!!

    June 6, 2015 at 10:28 am #155121
    itzsnider
    Participant

    Now to put that only on single pages?

    Hmmm everything is a learning item, LOVE THIS STUFF!!

    June 6, 2015 at 11:08 am #155123
    Brad Dalton
    Participant

    Try this http://wpsites.net/web-design/3-ways-to-move-post-meta-below-post-info/


    Get Help – Book Consultation.

  • Author
    Posts
Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Post Meta on Top Of .site-inner’ is closed to new replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 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