• 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

Conditional Removal of Author on post/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 › General Discussion › Conditional Removal of Author on post/page

This topic is: not resolved

Tagged: Author

  • This topic has 5 replies, 2 voices, and was last updated 10 years, 1 month ago by Brad Dalton.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • February 4, 2013 at 11:37 pm #18149
    SMB-dev
    Member

    We have just set up new Manhattan Theme for Job site but now the Author Attribute is showing up on Job Postings and we would rather it not. Blog Posts are fine but not here.  I have attempted to remove it via the Code Snippets (http://my.studiopress.com/snippets/author-box/) added to the functions.php but that did not do anything.

    This is a sample job listing for reference: http://www.strategicrecruitmentsolutions.com/jobs/product-specialistsoftware-business-analyst

    Would really appreciate a  point in the right direction to remove this from our Job Listings ?

    V/r

     

     


    “Life is Social” & “Social is the Lifeblood” of a Small Business Owner.

    February 5, 2013 at 12:34 am #18153
    Brad Dalton
    Participant

    Are you referring to this: by Amy Shanks


    Tutorials for StudioPress Themes.

    February 5, 2013 at 7:22 am #18185
    SMB-dev
    Member

    Yes. We have several Recruiters that will be entering jobs data & we don't want the names to show for the job posting. We do want it on Blog Posts though.


    “Life is Social” & “Social is the Lifeblood” of a Small Business Owner.

    February 5, 2013 at 8:32 am #18204
    Brad Dalton
    Participant
    /** Customize the post info function */
    add_filter( 'genesis_post_info', 'post_info_filter' );
    function post_info_filter($post_info) {
    if ( !is_page() ) {
        $post_info = '[post_date] by [post_author_posts_link] [post_comments] [post_edit]';
        return $post_info;
    }}
    

    You can use this code to remove post info for the author based on conditional statements. You'll need to modify this code. http://codex.wordpress.org/Conditional_Tags

    This statement should work for the category jobs or you can use the cat i.d

    ! in_category( 'jobs' ) ) 

    This tutorial will also help,http://www.briangardner.com/code/customize-post-info/


    Tutorials for StudioPress Themes.

    February 5, 2013 at 11:53 pm #18385
    SMB-dev
    Member

    This is a sticky one: I have tried multiple combinations of:

    But cannot get the Author Name removed from just the (jobs) posting pages using any type of conditional statement

    ! in_category( 'jobs' ) )

    if ( !is_page(4) ) {

    !is_single( array( 4, 'jobs' ) )

    is_single( 'jobs' )

    If I use the remove_action - NP it removes all the data from all posts (not what I wanted)

    I settled on using:

    ** Customize the post info function */

    add_filter( 'genesis_post_info', 'post_info_filter' );

    function post_info_filter($post_info) {

    $post_info = '[post_date][post_comments]';

    return $post_info;

    }

    This way I just removed the names from the top of the Posts and it looks like this retains the count for Archives and retains the Author Box at the bottom of each article. So I think this will work ok.

    It's still perplexing me as to why I could not remove just the Author Name from the jobs posts ?

    The issue is identifying the Job / Posts...they are not listed anywhere but in the DB. They do not display in the Admin Posts section so I am not sure of the actual post slug id's other than the jobs/xxxxxxx

    This is where the data is coming from:

    <div class="post-9900 jobman_job type-jobman_job status-publish hentry entry">

    <strong>I very much appreciate your assistance<strong>

     

    Thanks


    “Life is Social” & “Social is the Lifeblood” of a Small Business Owner.

    February 6, 2013 at 1:21 am #18392
    Brad Dalton
    Participant

    You could have used Genesis Simple Edits for this or Genesis Simple Hooks plugins.
    Maybe jobs is a custom post type and not a category.
    By the way, your sitemap page looks a but messed up.


    Tutorials for StudioPress Themes.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 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

© 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