Portfolio Press
By [author] - without the link (7 posts)

  1. Jose B
    Posted 2 years ago #

    Hello again!

    How do I get my blog posts byline to say By [my name], but without the link?

  2. Devin Price
    Theme Author

    Posted 2 years ago #

    Hi Joe. You would need to edit the code to do that. The function is called portfoliopress_postby_meta in:


    You would need to remove the link from there.

  3. Jose B
    Posted 2 years ago #

    Thanks Devin.

    Do I make the change in the parent theme or in the child? I tried adding a template-helpers.php file to my child and delete the URL but that didn't work.

    Any advice on what I may be doing wrong?

  4. Jose B
    Posted 2 years ago #

    What I meant to ask was what exactly do I edit and to which theme?

  5. Devin Price
    Theme Author

    Posted 2 years ago #

    Paste this in your child theme functions.php:

    function portfoliopress_postby_meta() {
    	printf( __( '<span class="meta-prep meta-prep-author">Posted </span><a href="%1$s" rel="bookmark"><time class="entry-date" datetime="%2$s" pubdate>%3$s</time></a> <span class="meta-sep"> by </span> <span class="author vcard"><a class="url fn n" href="%4$s" title="%5$s">%6$s</a></span>', 'portfolio-press' ),
            esc_url( get_permalink() ),
            esc_html( get_the_date( 'c' ) ),
            esc_html( get_the_date() ),
            esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
            esc_attr( sprintf( __( 'View all posts by %s', 'portfolio-press' ), get_the_author() ) ),
            esc_html( get_the_author() )

    Then edit as needed.

  6. Jose B
    Posted 2 years ago #

    Are you sure you want me to add that to functions.php?

    Even if I add functions.php to my child theme, the website doesn't work anymore. I get a blank screen that says "the website has a programming error."

  7. Jose B
    Posted 2 years ago #

    Actually I just added this to my CSS:

    .entry-header .entry-date
    display: none;

    This hides the date link, but still shows the Author link. I think the author vcard is important for Google SEO. I would like to make the author link disappear though. Oh well.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic