• Hi there,

    I’m trying to find out how to remove the word “by” from the author byline. So if X = author, I want it to read:

    X

    and not

    by X

    “by” doesn’t seem to have an ID or class so it cannot be targeted with CSS and I can’t seem to find the php file where it’s stored.

    Any ideas?

    Thanks!

    Jamie

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ajay

    (@ajay)

    @gillinghamjamie

    Would suggest doing an str_replace by filtering crp_author

    Thread Starter gillinghamjamie

    (@gillinghamjamie)

    Thanks @ajay. I don’t actually know how to do this. Do you have a code snippet by any chance?

    Plugin Author Ajay

    (@ajay)

    Please try this. You’ll need to use a plugin like Code Snippets to add custom functions.

    function remove_crp_by_from_author( $crp_author ) {
        return str_replace( ' by ', '', $crp_author );
    }
    add_filter( 'crp_author', 'remove_crp_by_from_author' );

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Remove “by” from author byline’ is closed to new replies.