I’m not sure why the space is a bad idea.
Here is the code you would need with a space for the login:
$items .= '<li><a href="' . get_permalink( woocommerce_get_page_id( 'myaccount' ) ) . '">Log In </a></li>';
seems a simple solution.
IF you want to try css, it’s relatively simple as well.
change the same line to this instead:
$items .= '<li><a class="custom-nav-link" href="' . get_permalink( woocommerce_get_page_id( 'myaccount' ) ) . '">Log In</a></li>';
then in your css add this line:
.custom-nav-link {
margin-right: 15px;
}
Obviously you could change the 15 to any value you want. Repeat for the logout. But you don’t need to add the css again.
Related Posts:
- How do I make an HTML table from a database table?
- dbDelta support for FOREIGN KEY
- How can I save a multiple select array with the settings API for a plug-in options page?
- Modify previous and next text from pagination links
- Does WordPress cache get_user_meta() results?
- wp_customize_image_control default value
- Initialize WordPress environment to use in a real cron script
- “wp_enqueue_style();” don’t load new edited style
- Allowed memory size of 268435456 bytes exhausted (tried to allocate 64 bytes)?
- How to Add a Link to the Drop-Down User Menu in the Admin Bar?
- After upgrading to PHP 7.0 my contact form outputs error
- Count number of published posts by type
- Remove username in emails or swap username for email
- Get/Set wp.customize.previewer.previewUrl
- Can A Shortcode Get HTML/Text From Content And Return It Twice With Added HTML?
- Why is ‘admin’ missing from my admin links?
- List of posts by day of the week
- How to add custom taxonomy slug in CPT permalink?
- What SQL / WordPress queries would need a nonce?
- Do changes to WordPress permalink custom structure affect old urls?
- Creating bulk posts with Youtube videos
- Adding hreflang tags automatically in WordPress subdirectory multisite
- How to test nonce with AJAX – Plugin development
- add_image_size for header_image
- Wp-login appears White Screen, Error: Cannot modify header information
- Creating user status mode in WordPress
- Need Help Fixing My Iframes [closed]
- Implementing update_user_meta
- Return a numerical function value in Customizer controls
- Enable custom logo upload if logo is not in header
- theme_root returning a truncated URI
- Change “en-US” to “en”
- Remove the last X characters of a custom field value
- Only first shortcode gets executed
- Notify users only on post publish
- What is the latest WordPress that will work on PHP 5.2.17?
- Echo a shortcode div after every 3 posts
- Get all categories post is not in
- Function returns post URLs rather than retrieving Facebook Graph API data
- Error while setting role
- Editing a PHP file to include a small text piece on every page
- Code snippet to show current php version inside “At a Glance” box in admin
- getting url from variable that calls picture of current page, not working. Only displays everything instead of url
- str_replace with the_content is not working
- How to disable send e-mail notification new comments for some posts
- trying to put an active hover to my custom nav category buttons [closed]
- Make textarea required. Help [closed]
- Login to wordpress using another sites authentication.
- echo var into wp_query
- Using wordpress function to retrieve data
- Creating a child theme after numerous edits to parent theme
- Get the alt text of the image in a array
- Admin Menu new tab external link
- Editing Theme Files on WordPress.com-hosted Site [closed]
- Editor capabilities – admin_init
- Unzip file in functions.php, and add it to cron
- Download file and redirect to page or vice versa
- Password protect URLs
- Add Block Before Entry Title Using PHP
- How to correctly escape an echo
- Give ID to divs inside the loop
- Dynamically populate parameter in Gravity Forms using PHP
- Display values of current POST request on page
- I have a button in homepage theme in 2 language
- How to get specific multiple pages excerpts at homepage?
- Having trouble creating two shortcodes, one for logged in user and one for visitors
- Trying to get post ID outside loop on blog page
- Learndash: Customize user enroll time
- WordPress Slider is not working
- Comments on my custom post type
- Including user data in “new user notification email”
- get Woocommerce product format json for WP_Query
- WordPress login with external php script
- Wp-query output correct, but the loop shows one less item (only sometimes)
- Get list of posts from attachment
- Refresh page after login with litespeed cache
- The plugin generated 225 characters of unexpected output during activation
- remove_action() not working in page template – Genesis
- Create dynamic content from one WP page to multiple other pages
- ajax form with multiple submit buttons and values
- How to map my php files as the files for pages
- Property value of null when value is assigned inside a method hooked to the wp action hook
- Unserializeing multiple column values that are stored in one database results variable
- WordPress Errors after Host Migration
- Keeps asking Connection Information upon update to 3.5.1 (but not for plugins?)
- split searchresults into different topics?
- How can I add more code to this?
- Display custom meta box in my template file
- wp_enqueue_style conflict when using in different action hooks
- WordPress developer
- Use HTML Form Data in PHP Function – WordPress Admin Page
- Front-end major break after upgrade PHP 8.0 [closed]
- wp_enqueue_scripts with JS script as a string
- Why can’t I enter the wordpress admin interface?
- Add/alter image attribute before render
- How do I do so that people can register on my wordpress site?
- Custom taxonomy pagination shows 404
- Internal server error when enabling Multisite in WordPress
- duplicating page templates
- Upload multiple files via ajax from an HTML file input