• Resolved buttercookie

    (@buttercookie)


    Hello,

    i am currently trying to change your Theme along to my wishes.
    (The Theme is really great, so only minor changes).

    My request:

    I really need to be able to display the author name along with the date at a post.
    In an other support-thread you said it was possible with a child theme, but unfortunately you didn’t post any information below that.

    Well, i am using this theme as a child-Theme and tried adding functions by my own, but i didn’t succeed…

    Would you be so nice to tell me the code-snippets and where i have to put them..?

    I have basic knowlede with wordpress / html / php, but i am not really creative by my own..

    The code would really help!

    Thank you very much in advance.

    Best regards
    buttercookeie

Viewing 2 replies - 1 through 2 (of 2 total)
  • The Sela Theme already includes the Date so all we have to do is, to add the author.

    The Post meta is defined within the sela_entry_meta() function inside the inc/template-tags.php

    You have to copy this function into you childthemes function php

    Then you have to add this line where you want to display the autor:

    echo '<a href="' . get_author_posts_url( get_the_author_meta( 'ID' ), get_the_author_meta( 'user_nicename' ) ) . '">' . get_the_author() . '</a>';

    The entire code, which you insert into the functions.php need can be found here:
    https://gist.github.com/derweili/661c92259929e16664e9

    Thread Starter buttercookie

    (@buttercookie)

    Thank you very much,
    this completely answered my problem!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Meta_data / Add Author in Frontend’ is closed to new replies.