Custom User Account Links

For non-IgnitionDeck themes, the IDC Account Links (i.e. Create Account/My Account, Login/Logout) can be added to the designated main navigation menu using the option within the Appearance » Customize » IDC Account Links.

Automatic method of adding IDC Account links

If you want to add these links to a widget or a custom Elementor Header, then the links must be created using the Custom Link option in Appearance » Menus, and CSS applied to display or hide the links according to the user's status (i.e. logged in vs. logged out).

How it works

The CSS rules mentioned here using the WP user status and applied class of .logged-in to the body element to dynamically display or hide the appropriate links.

Example of manually adding dynamic IDC Account links using the user status

Good to know

Before beginning these steps, click on the Screen Options tab at the top of the Appearance » Menus page and ensure that Custom Links under "Screen elements", and CSS Classes under "Show advanced menu properties" have been enabled.

  1. Under Appearance » Menus, create a new or select an existing menu you wish to add the IDC Account links to,
  2. Using the Custom Link interface, add each menu item to your menu:

    Add custom links to menu
  3. Add the class hide-loggedin to the Create Account and Login links

    Add class to menu items
  4. Add the class hide-loggedout to the My Account and Logout links

    Add class to menu items
  5. Save the menu. The published menu will now appear as:

    Manually added IDC Account links
  6. Add the following CSS rules Appearance » Customize » Additional CSS, your child theme's custom stylesheet, or your preferred method for inserting custom CSS rules:
/* HIDE LOGGED IN OPTIONS WHEN LOGGED OUT */
body:not(.logged-in) li.hide-loggedout {
	display: none;
}

/* HIDE LOGGED OUT OPTIONS WHEN LOGGED IN */
body.logged-in li.hide-loggedin {
    display: none;
}
  1. Save the CSS rules. The navigation will now display the appropriate link according to the visitor's status:

    Dynamic display of the IDC Account links

Still need help? Contact Us Contact Us