Conditional Removal of Author on post/page

Community Forums Forums General Discussion Conditional Removal of Author on post/page

This topic is: not resolved

Tagged: 

This topic contains 5 replies, has 2 voices, and was last updated by  braddalton 1 year, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #18149

    mediaguru
    Participant
    Post count: 56

    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

     

     

    #18153

    braddalton
    Participant
    Post count: 10356

    Are you referring to this: by Amy Shanks


    #18185

    mediaguru
    Participant
    Post count: 56

    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.

    #18204

    braddalton
    Participant
    Post count: 10356

    [php]
    /** 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;
    }}
    [/php]

    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

    [php]! in_category( ‘jobs’ ) ) [/php]

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


    #18385

    mediaguru
    Participant
    Post count: 56

    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

    #18392

    braddalton
    Participant
    Post count: 10356

    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.


Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.