Get shop owner's phone number

Themes Forums Makery WordPress Theme Get shop owner's phone number

  • Author
    Posts
  • #40949

    Olekroer
    Member

    Hello,

    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.

    #40966
    themex
    themex
    Member

    You must be signed in and verified as a buyer of this theme to view replies by the support staff. Register Now →

    #40974

    Olekroer
    Member

    Hi,

    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!

    #40976
    themex
    themex
    Member

    You must be signed in and verified as a buyer of this theme to view replies by the support staff. Register Now →

    #40980

    Olekroer
    Member

    Hi again,

    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

    #40984
    themex
    themex
    Member

    You must be signed in and verified as a buyer of this theme to view replies by the support staff. Register Now →

    #40992

    Olekroer
    Member

    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

    global $post;

    in the top, but that did not do the magic.

    Thanks in advance!

    #41002
    themex
    themex
    Member

    You must be signed in and verified as a buyer of this theme to view replies by the support staff. Register Now →

    #41010

    Olekroer
    Member

    Hi,

    Thank you so much, every thing works now. Much appreciated!

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.