• 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 info and Comment weirdness

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 › Post info and Comment weirdness

This topic is: not resolved

Tagged: .post-info, comments, Enterprise theme

  • This topic has 3 replies, 2 voices, and was last updated 12 years, 7 months ago by purplepatriot.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • February 28, 2013 at 5:38 pm #23397
    purplepatriot
    Member

    I'm not sure where to start.  I've got three categories - they have IDs = 6, 7 and 8.  I have two pages set to Blog template.  Page one is set to exclude category 6 (via query_args : cat=-6 added at bottom of that page), while page two only shows ID=6 (query_args : cat=6).  So far, so good.

    I want the post-info for Page 1 to be different than that on Page 2.  So, in functions.php I added the following:

    /** Customize the post info function for The Pastor's Study and Weekly Devotions */
    add_filter( 'genesis_post_info', 'post_info_filter' );
    function post_info_filter($post_info) {
    if( is_page_template() ) {
    if ( is_page(104) || in_category( '6' ) ) {
    $post_info = '[post_date] [post_comments] [post_edit]';
    }
    if ( is_page(106) || in_category( array( 7, 8 ) ) ) {
    $post_info = '[post_date] By [post_author_posts_link] [post_comments zero="No comments" 1="One comment" more="% comments"] [post_edit]';
    }
    }
    return $post_info;
    }

    Weirdness #1: On Page 1, there are 3 posts. The first two posts are from category ID=8 and display post-info as above. The third post is from category ID=7, but it does not have a link for the comments. If I click on the post title to show just that post, same thing. I've even ticked the box to specifically allow for comments.

    Weirdness #2: On Page 2 (containing category ID=6 posts), the post-info shows the post date, by author, and edit option. It is not as I programmed it above. I also have each of the individual posts on this page tick-marked to allow comments.

    I have Genesis Simple Edits enabled, and for Post Info, I have:

    "[post_date] By [post_author_posts_link] [post_comments zero="No comments" 1="One comment" more="% comments"] [post_edit]"

    I am at a loss.  Any ideas?  Thank you.


    Eric @ Coolwater Creative – “Take a leap. Make a splash. Ripple the pond.”
    “Never sacrifice the permanent on the altar of the immediate.” – Give back and help out in the forums.

    April 12, 2013 at 10:32 am #35016
    purplepatriot
    Member

    Since I can no longer edit my original post, I need to provide two updates.  The Page 1 and Page 2 links above should now be (respectively)

    http://www.ibcwausau.org/resources/the-pastors-study

    and

    http://www.ibcwausau.org/resources/weekly-devotion

    Thanks!


    Eric @ Coolwater Creative – “Take a leap. Make a splash. Ripple the pond.”
    “Never sacrifice the permanent on the altar of the immediate.” – Give back and help out in the forums.

    April 12, 2013 at 11:44 am #35034
    essaysnark
    Participant

    **Totally** not an expert, but my suspicion is the "or" (||) in the two if(is_page(xxx)) statements -- shouldn't those be && instead?

    April 12, 2013 at 12:06 pm #35040
    purplepatriot
    Member

    Hey essaysnark - thank you for the suggestion. =)

    Basically, the code says if it's the page that shows all the posts from category 6 (i.e., pageid=104, which has Template set to 'Blog' and 'query_args' value of cat='6') OR a single post from category 6, don't show the author. But, if it's the page that shows all posts from categories 6 and 7 (i.e., pageid=106, which has Template set to 'Blog' and 'query_args' value of cat='-6') OR a single post from either category 6 or 7, then show the date, author and specific number of comments. So, I don't want the 'if' statement to be true if both conditions are met, but rather when either is condition is met.


    Eric @ Coolwater Creative – “Take a leap. Make a splash. Ripple the pond.”
    “Never sacrifice the permanent on the altar of the immediate.” – Give back and help out in the forums.

  • 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

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