Get shop owner's phone number
I want to display the shop owner’s phone number (it is a custom string made in the theme settings) next to the Have a question? button when viewing a product. I know which file I have to edit and where to put the information, but I can not figure out how the code looks like. I have managed to get information about the current user that is logged in (e.g. email), but not how to get that information from the shop owner.
I hope you can help me out!
Thanks in advance and have a nice day.
Thanks a lot, but unfortunately I can’t make it work. The custom field’s name is Mobiltelefon and of course I changed it from phone to Mobiltelefon, but it ain’t showing anything on the site. If I write a simple HTML text it is showing up on the website, so it is not because I’m putting the code in the wrong place.
I hope you can help me sort it out! Thanks!
It still does not work, the temporary WP access should still work. I am testing on this product: https://agrotradingworldwide.com/shop/staldtilbehoer/koeletanke-horisontale/roeka-rkc-5000/
And the code is placed on line 59 in /wp-content/themes/rokachildtheme/woocommerce/single-product/add-to-cart/simple.php
Thanks a lot, it works perfectly!
Now I just have one more question: What do I have to do if I want the same code to work in the file template-shop.php? I have tried to put in
in the top, but that did not do the magic.
Thanks in advance!
Thank you so much, every thing works now. Much appreciated!
You must be logged in to reply to this topic.