Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author dinamiko

    (@dinamiko)

    Hi hajdarovic,

    I don’t undestand your question, can you elaborate this a little more? thanks.

    Best.

    Thread Starter hajdarovic

    (@hajdarovic)

    How can we add author name to the title?
    Like this:

    “This is the title of article” by Miljenko Hajdarovic

    Plugin Author dinamiko

    (@dinamiko)

    Hi hajdarovic,

    Your question is related to DK PDF plugin?
    If yes, please post a URL and the steps to reproduce the problem, thanks.

    Best.

    Thread Starter hajdarovic

    (@hajdarovic)

    Yes DK PDF…
    Well in options for that plugin you have that we can have Title.
    It would be great to have “title” by someone.

    Plugin Author dinamiko

    (@dinamiko)

    I get it! ??

    the first thing you’ve to do is copy dk-pdf/templates/dkpdf-header.php to your theme (or child theme) in a folder named ‘dkpdf’
    more info here: https://wp.dinamiko.com/demos/dkpdf/doc/how-to-use-dk-pdf-templates-in-your-theme/

    then you can modify this template, if you want to show the author name, change this (line 43):
    echo get_the_title( $post->ID );

    for this:

    if ( have_posts() ) : while ( have_posts() ) : the_post();
    echo get_the_title( $post->ID ) . ' by ' . get_the_author();
    endwhile; else:
    endif;

    Do it and tell me if it works, thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Author info’ is closed to new replies.