Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    Can you explain why? That will prevent users accessing sections.

    Thread Starter ctuxboy

    (@ctuxboy)

    It broke the webpage layout.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Wouldn’t it be better to fix the layout by styling it then ?? See if your theme has an update available.

    Thread Starter ctuxboy

    (@ctuxboy)

    Hi okay.

    I understand why adding this nav-links, but my layout is a full width-layout, and this works very useful for my case.

    This nav-links are new in the latest WC version?

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Thread Starter ctuxboy

    (@ctuxboy)

    Very useful blogpost.
    Thank you for this info Mike.

    I having a somewhat different issue as the orders and payment-methods endpoints are returning 404 pages for me. I looked into the woocommerce_account_orders_endpoint hook and it seems like the page is re-directing to a 404 before the woocommerce_account_orders method is even called.

    Plugin Contributor Mike Jolley

    (@mikejolley)

    Make sure to re-save permalinks which can resolve most 404s. Post your own thread if stuck.

    For future readers looking for a legitimate way to remove the navigation you may remove the action hook:

    remove_action(
    	'woocommerce_account_navigation',
    	'woocommerce_account_navigation'
    );

    It is also a pluggable function which means you can supplement it with something else if you choose:

    function woocommerce_account_navigation() {
    	// The code here will *replace* the account navigation
    }

    For more information:

    • This reply was modified 8 years, 3 months ago by Howdy_McGee. Reason: Testing code formatting
    • This reply was modified 8 years, 3 months ago by Howdy_McGee. Reason: Code Formatting :)
    domrobertmtl

    (@domrobertmtl)

    Thank you for the tip @howdy_mcgee

    I removed the navigation by adding the remove_action function in my theme’s function.php and it work.

    However, it leaves a blank space where the navigation was. Is there an easy way to make the content stretch full-width?

    Thanks

    Dom

    domrobertmtl

    (@domrobertmtl)

    Well, I found an answer to my question. I just added this css line.

    .woocommerce-MyAccount-content {width:100% !important;}

    This is well helpful. Thanks to everyone who contributed to these solutions.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Remove WC My Account navigation links’ is closed to new replies.