<?php
$currentUser = get_current_user_id(); //get currently logged user ID
$user = get_user_by( 'id', $currentUser ); // Get the user Object by id
$userUrl = get_bloginfo('home').'/author/'.$user->user_login; //Formulate the outout
echo $userUrl; //echo the output
?>
Related Posts:
- Custom WordPress+PHP+MYSQL+AJAX form, submit event not captured by Javascript, but does POST data to the DB
- Submitting a form, using Ajax, to run a SQL Select query based on user input from the form
- Change Query Arguments (filter) with jQuery/Ajax or PHP?
- Testing a Form’s Zipcode Field with Regular Expressions to Determine WordPress Page Behaviour
- Using Ajax to submit a form, and run a SQL Select query based on user input from the form
- Cascading dropdown select search based on Parent Page & Child Page
- WordPress Custom Form – Getting Query Vars, Weird Glitch?
- Javascript / PHP – closing the loop
- Validate a custom form with js and php
- Custom PHP contact form issue
- Colorbox ajax loading of outside HTML content works perfect on localhost but not on server
- How to make custom total price reactive in navigation
- Adding tawk.to code just before body tag on functions.php file
- How do I fetch all comments per post via WP REST API?
- Deregistering a script in WordPress seems impossible
- Slide in Panel WordPress Post
- Sending jsPDF documents to the server
- How to prevent those PHP variables from being cached on WordPress?
- Ajax return code 400
- Multiple choice in a custom taxonomy
- How can I add an alert (like the old javascript alerts) to my WP page?
- Pass PHP variable to JavaScript without inline JS
- Upload Image in a WordPress page using PHP
- Show post in slider
- How can I output a php value into a JS file within WordPress?
- Get all user meta by meta key instead of ID
- Using shipped version of jquery
- Using Multiple Submit buttons to trigger customised php functions
- Putting PHP variables into javascript [duplicate]
- Get Admin Email Address From External PHP page
- Bridging TinyMCE js and WordPress PHP?
- Adding Custom Forms
- How do I let users upload files to a chosen location?
- Why is variable not working on custom sql query using wpdb?
- Trying to implement Ajax comments in WordPress, getting WP error
- How to test nonce with AJAX – Plugin development
- woocommerce registration form with klaviyo(don’t work with current user)
- How to get a list of all possible values of a specific user meta key?
- How do I display a user’s previous orders as a select box option on a product?
- Simple Plugin with custom javascript wont work – no console error
- How does this WordPress Plugin (Thrive Comments) apply their custom comment sort? [closed]
- How can I use a modal window to display the current post in loops featured image?
- js file in root loading without
- class click counter save number
- Get stock by custom meta field on all Woocommerce variable products
- Trigger popup in a php if/else statement
- Any possible way to make $wpdb->get_results() return anything else than array?
- Slider loading issue
- Custom filter in admin edit custom post type responding with invalid post type?
- AJAX request status 200 but no actual “response”
- Button not refreshing page
- Ajax not working es expected (Returns 0)
- Use menu link or onClick to set a variable
- Accessing the database from a plugin outside of action hooks
- Echo a hierarchical list of post data from custom fields
- How to create a form and display its content as table in admin panel?
- How to select the contents in the text view textrea in wp_editor?
- Creating a Multi-Level Associative Object Using AJAX
- Custom Form Processing Issue
- Create WP_Query to search for posts by their categories or their parent/child categories
- WP Query with custom Shortcode
- My form action url is being prepended with a directory that does not exists
- WP functions in .js
- Adding custom directory and PHP files in wordpress
- Storing Array from returned database query and using the array in a new query
- Ajax – Call to undefined function get_option()
- Custom profile field with birthday. Troubles with
- mysql query from wordpress page using custom table
- WordPress 3.2 query_posts and pagination, permalinks issue
- only show container with next/prev links if they exist?
- How can I reuse the code to capture a param in a URL and place in a value in a hidden form?
- Populate dropdown with Child Pages based on Parent Page chosen
- remove wp floating submenu in wp dashboard
- WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?
- What query string parameter is available for index.php, that works for both pages and blog articles?
- ACF: how do I get the fields and its values of a specific group?
- How to store data from multiple forms using ajax and php
- Displaying admin notices inside the block editor from rest_after_insert_{$this->post_type} hook
- How to use $query->set with post__in?
- search and replace preword from author
- How to prevent XSS alter custom global javascript object & methods in WordPress
- Ajax loaded form replaces form action with Ajax url
- How to complete two other input fields, completed the first
- prevent default not stopping page refresh. Passing form information to and from php with ajax in a wordpress site
- Status 400 for AJAX POST Request with admin-ajax.php
- How to inject variables into public-facing JS using wp_enqueue_script
- How to pass aa JS variable to PHP?
- How to limit the number of forgot password reset attempts in WordPress?
- Customize Theme comment template to Insert VoteUp and VoteDown buttons
- Custom search results page not working with empty search
- Ajax random number always the same
- Modify HTML structure of fields in woocommerce checkout form
- Image upload via FormData API and AJAX is not working ($_FILES always empty)
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- JS file work only in index page
- Set WP_query ‘order’ option by another tables value
- Need Help Fixing My Iframes [closed]
- wp_enqueue_scripts leads to error
- Javascript file is not working on single.php wordpress [closed]
- WordPress default Search function inconsistent in WooCommerce Product Titles