• hello.
    the account page has no registration link.how to add it to the page.
    regards.

    • This topic was modified 2 years, 8 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 12 replies - 1 through 12 (of 12 total)
  • Moderator bcworkz

    (@bcworkz)

    Add a link similar to example.com/wp-login.php?action=register as you would for any other web page. For example, you could add it as a custom link to your current nav menu. Such a menu item will likely appear on all pages.

    To have it only appear on the account page, add a HTML anchor link to the page’s content before or after the form.

    Thread Starter majidazad

    (@majidazad)

    thanks alot.

    Thread Starter majidazad

    (@majidazad)

    the account page was made by a shortcode of woocommerce and i have no access to html code of the page in the page editor in order to add this anchor link.

    Thread Starter majidazad

    (@majidazad)

    is it necessary to edit an especial php page in my host with notepad++

    Moderator bcworkz

    (@bcworkz)

    If you’re able to edit the template the page uses, you can add link HTML directly to the template. If the position on the template where you want the link to appear is all PHP code, include PHP delimiters in what you add. For example:
    ?><a href="example.com/wp-login.php?action=register">Register</a><?php

    You cannot insert delimiters just anywhere in PHP code, proper code syntax must be maintained. Inserting a new line after one that ends with a ; should be safe. A likely place to add the link is before or after a call to the_content(); or whatever equivalent function your theme might use. The link will appear on all pages that use the template unless further efforts are made to restrict its output.

    If you theme is subject to periodic updates, they will overwrite your added HTML. To preserve your edit, create a child theme and edit the template copied to the child.

    Thread Starter majidazad

    (@majidazad)

    thanks for the complete and clear guidence.one other thing.
    the account page was made by a shortcode of woocommerce.what is the name of the template page responsible for producing the login form?

    Moderator bcworkz

    (@bcworkz)

    Could be any number of templates, depending on your theme. Try using the template debugger plugin to learn which template is used on that page. Assuming you can manage plugins. If you only have host file manager access, place identifying HTML comments near the top of likely candidates like single.php. View the page’s HTML source after doing so to see which comment identifying the template has appeared. Be aware that caching can confuse your investigation if it’s not disabled.

    Thread Starter majidazad

    (@majidazad)

    ok.i learned very much of you.and my problem is solved.thanks.

    Thread Starter majidazad

    (@majidazad)

    let me know a good debuger plugin please.

    Moderator bcworkz

    (@bcworkz)

    Do you mean for debugging PHP code? I may be wrong, but I think that’s beyond the ability of a WP plugin. There are code “linters” that try to flag syntax errors, but to get full IDE features like breakpoints, var watches, etc. I think you’d need to install a specific PHP framework. Try searching the internet for “php ide”.

    Thread Starter majidazad

    (@majidazad)

    no.for detecting the template file that is responsible for producing login form.

    Moderator bcworkz

    (@bcworkz)

    Removing a template will not typically stop a shortcode from outputting a form. WP will just fallback to a different template. You’d need to remove the shortcode from page content (or remove the page) to remove the form from the site. The one exception would be if the shortcode were hardcoded directly on the template. That would be unusual and unorthodox, but it’s possible.

    If you’re unable to edit pages but have hosting access, you could directly edit the DB to remove pages or edit content with the phpMyAdmin app. Altering the DB this way can be dangerous if you’re unsure of what you’re doing. I recommend making a full DB backup before changing anything. It’s not that simple to cleanly remove a page this way, altering content is safer and more straight forward. But then the My Account page would still exist with no forms.

    Are you able to alter menus in the WP admin? The My Account item should be removed if you remove the related page. I believe removing the WooCommerce shortcode for the login form also removes the WC user profile form that appears after login.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘registration link’ is closed to new replies.