• 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

Removing Post Info Data – Not Working | Pretty Pictures ChildTheme

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 › Removing Post Info Data – Not Working | Pretty Pictures ChildTheme

This topic is: not resolved

Tagged: .post-info, pretty picture

  • This topic has 13 replies, 2 voices, and was last updated 13 years, 5 months ago by SoZo.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • January 22, 2013 at 12:13 pm #13749
    KBordonaro
    Member

    Hello!

    I am having problems getting the Post Info to remove.

    I've followed the directions in this tutorial, placing the snippet code in my childtheme's functions php, but the post info remains.

    I've tried refreshing and viewing in a different browser (in case its cached) but my site still shows the post info.

    What am I doing wrong?

    Thanks,

    Kimberly

    汎?”?性が高く人?—の?—ログラミング言語

    January 22, 2013 at 12:17 pm #13753
    SoZo
    Member

    Did the theme come with the post info already edited in functions.php?


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 22, 2013 at 12:47 pm #13768
    KBordonaro
    Member

    Hi, John.

    I'm not sure...

    I'm trying to remove the post info that came with the function. So I'm guessing, yes?

    --Kimberly

    January 22, 2013 at 12:48 pm #13769
    SoZo
    Member

    Look in functions.php for a preexisting function that edits the post info


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 22, 2013 at 12:51 pm #13771
    KBordonaro
    Member

    Okay, cool. This is what I found....

     

    /** Customize the post info function */
    add_filter( 'genesis_post_info', 'pp_post_info_filter' );
    function pp_post_info_filter( $post_info ) {

    return __( 'Posted on', 'pictures' ) . ' [post_date] [post_comments] [post_edit]';

     

    Should I remove this all together from the function and enter the other code snippet instead?

    January 22, 2013 at 12:53 pm #13774
    SoZo
    Member

    Yep, just remove that and then the remove action you added should work


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 22, 2013 at 1:04 pm #13791
    KBordonaro
    Member

    I erased that snippet and I put in the other snippet from the tutorial, but the post info is still showing up.

     

    I checked on a different browser for cache problems, too.

    January 22, 2013 at 1:05 pm #13792
    SoZo
    Member

    Post the contents of functions.php


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 22, 2013 at 1:18 pm #13796
    KBordonaro
    Member

    /** Remove the post info function */
    remove_action( 'genesis_before_post_content', 'genesis_post_info' );

    January 22, 2013 at 1:19 pm #13798
    SoZo
    Member

    Post the entire content of functions.php


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 22, 2013 at 1:22 pm #13801
    KBordonaro
    Member

    D-oh! Blonde Moment... Here you go:

     

    <?php
    /** Start the engine */
    require_once( get_template_directory() . '/lib/init.php' );

    load_child_theme_textdomain( 'pictures', apply_filters( 'child_theme_textdomain', get_stylesheet_directory() . '/languages', 'pictures' ) );

    /** Child theme (do not remove) */
    define( 'CHILD_THEME_NAME', __( 'Pretty Pictures Theme', 'pictures' ) );
    define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/pretty-pictures' );

    /** Add Viewport meta tag for mobile browsers */
    add_action( 'genesis_meta', 'pp_add_viewport_meta_tag' );
    function pp_add_viewport_meta_tag() {
    echo '<meta name="viewport" content="width=device-width, initial-scale=1.0"/>';
    }

    /** Register default layout setting */
    genesis_set_default_layout( 'full-width-content' );

    /** Unregister layouts */
    genesis_unregister_layout( 'content-sidebar' );
    genesis_unregister_layout( 'sidebar-content' );
    genesis_unregister_layout( 'content-sidebar-sidebar' );
    genesis_unregister_layout( 'sidebar-sidebar-content' );
    genesis_unregister_layout( 'sidebar-content-sidebar' );

    /** Unregister sidebars */
    unregister_sidebar( 'sidebar' );
    unregister_sidebar( 'sidebar-alt' );

    /** Add support for structural wraps */
    add_theme_support( 'genesis-structural-wraps', array(
    'header',
    'nav',
    'subnav',
    'inner',
    'footer-widgets',
    'footer'
    ) );

    /** Add support for custom header */
    add_theme_support( 'custom-header', array(
    'default-image' => get_stylesheet_directory_uri() . '/images/header.jpg',
    'flex-height' => true,
    'flex-width' => true,
    'header-text' => false,
    'height' => 550,
    'width' => 1600
    ) );

    /** Reposition the primary navigation */
    remove_action( 'genesis_after_header', 'genesis_do_nav' );
    add_action( 'genesis_before_header', 'genesis_do_nav' );

    /** Unregister secondary navigation menu */
    add_theme_support( 'genesis-menus', array( 'primary' => __( 'Primary Navigation Menu', 'pictures' ) ) );

    /** Add support for post formats */
    add_theme_support( 'post-formats', array(
    'gallery',
    'quote'
    ) );

    /** Remove elements for post formats */
    add_action( 'genesis_before_post', 'pp_remove_elements' );
    function pp_remove_elements() {

    // Remove if post has quote format
    if ( has_post_format( 'quote' ) ) {
    remove_action( 'genesis_before_post_content', 'genesis_post_info' );
    remove_action( 'genesis_post_title', 'genesis_do_post_title' );
    remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
    }

    // Remove if post has gallery format
    elseif ( has_post_format( 'gallery' ) ) {
    add_action( 'genesis_post_title', 'genesis_do_post_title' );
    add_action( 'genesis_after_post_content', 'genesis_post_meta' );
    }

    // Add back, as post has no format
    else {
    add_action( 'genesis_before_post_content', 'genesis_post_info' );
    add_action( 'genesis_post_title', 'genesis_do_post_title' );
    add_action( 'genesis_after_post_content', 'genesis_post_meta' );
    }

    }

    global $current_class;
    $current_class = 'odd';

    /** Add odd/even post class */
    add_filter ( 'post_class' , 'pp_alt_post_class' );
    function pp_alt_post_class ( $classes ) {
    global $current_class;
    $classes[] = $current_class;
    $current_class = ( $current_class == 'odd' ) ? 'even' : 'odd';
    return $classes;
    }

    /** Customize the post meta function */
    add_filter( 'genesis_post_meta', 'pp_post_meta_filter' );
    function pp_post_meta_filter($post_meta) {

    return __( '&copy; Copyright', 'pictures' ) . ' [post_author_posts_link]';

    }

    /** Modify the size of the Gravatar in the author box */
    add_filter( 'genesis_author_box_gravatar_size', 'pp_author_box_gravatar_size' );
    function pp_author_box_gravatar_size( $size ) {
    return '76';
    }

    /** Load Backstretch script and prepare images for loading */
    add_action( 'wp_enqueue_scripts', 'pp_enqueue_scripts' );
    function pp_enqueue_scripts() {

    wp_enqueue_script( 'stretch-backstretch', get_bloginfo( 'stylesheet_directory' ) . '/js/backstretch.js', array( 'jquery' ), '1.0.0', true );
    wp_enqueue_script( 'stretch-backstretch-set', get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'stretch-backstretch' ), '1.0.0', true );

    }

    add_action( 'wp_enqueue_scripts', 'pp_set_background_image' );
    function pp_set_background_image() {

    $image = array( 'src' => get_header_image() );

    wp_localize_script( 'stretch-backstretch-set', 'BackStretchImg', $image );

    }
    /** Register newsletter widget area */
    genesis_register_sidebar( array(
    'id' => 'newsletter',
    'name' => __( 'Newsletter', 'custom-theme' ),
    'description' => __( 'This is the newsletter section.', 'custom-theme' ),
    ) );

    /** Add the newsletter widget after the post content */
    add_action( 'genesis_after_post_content', 'custom_add_newsletter_box' );
    function custom_add_newsletter_box() {
    if ( is_singular( 'post' ) )
    genesis_widget_area( 'newsletter', array(
    'before' => '<div id="enews widget-area">',
    ) );
    }

    /** Add support for 2-column footer widgets */
    add_theme_support( 'genesis-footer-widgets', 2 );

    /** Add support for structural wraps */
    add_theme_support( 'genesis-structural-wraps', array(
    'header',
    'nav',
    'subnav',
    'inner',
    'footer-widgets',
    'footer'
    ) );
    /** Remove the post info function */
    remove_action( 'genesis_before_post_content', 'genesis_post_info' );

    January 22, 2013 at 1:33 pm #13806
    SoZo
    Member

    Ok, try removing
    add_action( 'genesis_before_post_content', 'genesis_post_info' );

    from

    // Add back, as post has no format
    else {
    add_action( 'genesis_before_post_content', 'genesis_post_info' );
    add_action( 'genesis_post_title', 'genesis_do_post_title' );
    add_action( 'genesis_after_post_content', 'genesis_post_meta' );
    }


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    January 22, 2013 at 1:41 pm #13810
    KBordonaro
    Member

    SoZo, you rock my world.

    Thank you!

    January 22, 2013 at 2:24 pm #13818
    SoZo
    Member

    You're welcome 🙂


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

  • Author
    Posts
Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Removing Post Info Data – Not Working | Pretty Pictures ChildTheme’ 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

© 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