Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author lebasca

    (@lebasca)

    Hi there,

    I did a test using a link that calls a php page and it worked. This is the example:
    I went to the place login options page and I added the following link in the logged in links section:
    <a href="http://localhost/phpprogramming/test1.php">Test</a>

    How did you do it?

    Regards,
    Lebasca

    Thread Starter steveone86

    (@steveone86)

    Plugin Author lebasca

    (@lebasca)

    I clicked your link and it says that the page is not found. Make sure that your link exists or it has the right permissions.

    Thread Starter steveone86

    (@steveone86)

    Hi Lebasca, im still having trouble with this 🙁 What i am looking to do is link to the current logged in user author page. I have tried many things

    <?php the_author_posts_link(); ?>
    My-feed

    Is there anything i can do to link to the author page of user that is currently logged in. Author.php is usually the page that handles this but i cannot link to it. It says “page not found”

    Thread Starter steveone86

    (@steveone86)

    I also tried
    <a href="http://www.mysite.com/author/%USERNAME%"> and still does not work. Username has no output

    Plugin Author lebasca

    (@lebasca)

    Hi there,

    Please do the following:
    1) Create a page template in your theme folder. Add the following code:
    <?php
    /*
    Template Name: Author Posts
    */
    ?>
    <?php
    $current_user = wp_get_current_user();
    $authorurl = get_author_posts_url( $current_user->ID );
    wp_redirect($authorurl);
    exit();
    ?>
    2) Create a page in your administration dashboard and apply the template created above to this new page.
    3) Use the permalink of this page to put in the menu link.

    Regards,
    Lebasca

    Thread Starter steveone86

    (@steveone86)

    Thanks so much Lebasca! That worked perfect

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Is there a way to out a link in menu?’ is closed to new replies.