Change Phone Formatting on List

This topic contains 4 replies, has 2 voices, and was last updated by  Alex Rollin 7 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #416175

    jahusdtc
    Expired Member
    Post count: 162

    List page has a phone showing, which is great!

    However, the requirements for this particular directory are that a phone link is given (which is your standard format and look) for premium directory members — but NO phone link is shown for FREE directory members.

    For the detail page, I already am able to do this within the following:
    add_action (‘sd_detail_before_cat_links’, ‘geodir_stuff_before_category_detail’ );
    function geodir_stuff_before_category_detail() {….}

    In that function I either format phone as no ahref or WITH ahref.

    Please tell me…How do I do that for listings?

    #416176

    jahusdtc
    Expired Member
    Post count: 162

    Would I best do this by adding a phone onto the end of geodir_show_post_address
    …and turning off the listing page in Place Settings?

    Or is there a separate spot especially for phones?

    Just a thought.

    #416201

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    there are built in settings that the phone link

    Go to GD > Place Settings > Custom Fields > Phone

    Choose “Show in what locations” and add to the Listings and Detail Page

    If by ‘member’ you mean a logged in user, then you can use the

    .logged-in class

    to discern who is logged in and hide the information with CSS.

    Let us know if that fits your needs.

    #416783

    jahusdtc
    Expired Member
    Post count: 162

    For the Listing page, I put it my specially-formatted phone (freebie) or phones (premium) at the end of add_filter(‘geodir_show_post_address’, ‘geodir_change_address_order’ , 100 , 2) ;
    function geodir_change_address_order($html , $vars){…}

    I don’t know how I would use PHP for custom-format phones as mentioned in your message.

    Is there a tip or trick on how to do so that would work better than what I did?

    Interesting tip about the .logged-in class. Not currently useful…but it will be!

    Thanks for your follow-up!

    #416863

    Alex Rollin
    Moderator
    Post count: 27815

    GD uses packages to hide specific fields. Have you already tried that?

    https://wpgeodirectory.com/docs/prices-and-payments-add-on-overview/#prices

    In the Post Fields area, deselect the phone fields you want to hide for the package.

    Let us know

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount