WordPress.org

Ready to get started?Download WordPress

Forums

Place Login
[resolved] Is there a way to out a link in menu? (8 posts)

  1. steveone86
    Member
    Posted 1 year ago #

    Hello and thanks so much for this plugin. I've hit a wall trying to figure this problem out. I want to link the users author post page and display it in the menu but it dosent allow links with php code in them. Any thing I can do?

    http://wordpress.org/extend/plugins/place-login/

  2. lebasca
    Member
    Plugin Author

    Posted 1 year ago #

    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

  3. steveone86
    Member
    Posted 1 year ago #

  4. lebasca
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. steveone86
    Member
    Posted 1 year ago #

    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"

  6. steveone86
    Member
    Posted 1 year ago #

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

  7. lebasca
    Member
    Plugin Author

    Posted 1 year ago #

    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

  8. steveone86
    Member
    Posted 1 year ago #

    Thanks so much Lebasca! That worked perfect

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.