WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Twelve
Add link to page title (3 posts)

  1. DanielRandles
    Member
    Posted 11 months ago #

    I would like to link a pdf to the page title that appears directly under the menu.

    http://www.danielrandles.com/cv/

    The menu title "CV" appears again as a header on the page. If possible, I would like to assign a link to this header, though there doesn't appear to be a default or plugin solution for this. Any recommendations?

    Thanks

  2. paulwpxp
    Font hero
    Posted 11 months ago #

    The menu title "CV" appears again as a header on the page.

    That's the default behavior and it's a standard one. Except for the front home page, all other web pages must have page (entry) title so that users know what page they are on.

    You should instead make a download link to your pdf file just under the title and style this link, making it standout, anyway you like.

  3. First copy content-page.php to your child theme folder.

    Then on line 13 replace '<?php the_title(); ?>' with this:

    <?php
    if (get_the_title()=='CV') {
    	echo "<a href='http://www.example.com/example.pdf'>CV</a>";
    }
    else {
    	the_title();
    }
    ?>

    Just change the link to your file.

    Let me know if you have any questions.

Reply

You must log in to post.

About this Theme

About this Topic