I have set up our bakeries web store in a way that any woo commerce page is only accessible for logged in users. Now I am looking for a way to change the title of h1 on the My Account page in order to display something different for not logged in users. Has anyone an idea how to achieve that? Thanks for your input! Saludos!
2 comments
Comments are closed.
WordPress has a built in function to check if a user is logged in.
You will need to modify the Woocommerce template by overriding it.
—-(Update)—-
I was wrong⦠Woocommerce My account is a page. The
<h1>page title</h1>
is the title of your page, so you will need to change it, in the wordpress template for pages in your theme (Each theme is different) and not in woocommerce templates.Once you have found this template in your theme folder, you will use a conditional in an if statement around the
<h1>page title</h1>
:This code is just a closer example, you will need to customize it a bitâ¦