Regarding the Search Results

This topic contains 9 replies, has 3 voices, and was last updated by  mb299 5 years, 3 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #508328

    mb299
    Free User
    Post count: 147

    Hello..
    I am using WP Ver :5.2.3 & GD Ver :2.0.0.66

    Its a listing website using Supreme Directory theme. The plugins that i am using are Geo Directory, Ninja Forms, Code Snippets & Ultimate Member.
    My Question : Non-logged in users are free to visit my website & use the search function too. Once the search results are displayed, they should see a brief summary of the place without any contact details. However, to see the complete details, I would want the non-logged in visitors to login/register first – A small message should pop-up that the content is restricted & then they are redirected to login page.

    Hope I have made myself clear. Looking forward to a solution.
    Many Thanks /Manish

    #508334

    Guust
    Moderator
    Post count: 29970

    Hi Manish
    You will have to ask Ultimate Member about that.
    You may be able to add some coding to the GD Search template around the phone numbers for example.
    I know that is how s2member works, but I am not familiar with Ultimate Member.
    Thanks

    #508405

    mb299
    Free User
    Post count: 147

    Hi Guust,
    Thanks for the prompt reply. Ultimate Member may not be able to help in this case though. However, i have written to them. I wrote to you because i saw so many examples of the CSS codes you have mentioned on your website regarding changing the template & all & i believe that is_user_logged() function would be able to solve the purpose if I put it in right place & that’s where i thought you would be able to help me out.

    Nevertheless , am still figuring out. Many thanks for your time Guust.

    #508508

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    Unfortunately this setting is not currently available.

    I have taken this up as a suggestion and will share it with our development team.

    For the moment we recommend the user of a 3rd party membership plugin that provides shortcodes for hiding content from the roles or logged-in/-out users. You can use those inside the Archive item and Details page template, as Guust mentioned.

    The use of is_user_logged() would be possible with something like widget logic or in a customization of any of the templates with PHP. You can read more about that here: https://wpgeodirectory.com/docs-v2/faq/customizing/

    #508552

    mb299
    Free User
    Post count: 147

    Hello Alex,Guust,

    Thank you for recommending the change to your development team. Hope it helps many of us out here.

    Ultimate member support team has replied. They suggest to wrapup the text I want to hide, between two shortcodes. The syntax is [um_loggedin] This text can only be seen by logged in users [/um_loggedin].
    You are also suggesting to use shortcodes on Archive or/and Details page.
    Can you let me know where exactly on these pages should I put the shorcode suggested by ultimate member, assuming I want to hide the phone number of the place/listing.

    Thank you for your time and prompt help.

    #508555

    Guust
    Moderator
    Post count: 29970

    Have a look at GD > Settings > Pages.
    That is where you find the different templates.
    https://wpgeodirectory.com/docs-v2/templates/
    https://wpgeodirectory.com/docs-v2/geodirectory/shortcode-builder/

    To hide the phone number for non-logged-in visitors on the search page, you would add this shortcode to the GD Archive item page:

    [um_loggedin][gd_post_meta key="phone"][/um_loggedin]

    https://docs.ultimatemember.com/article/177-restrict-content-on-a-page-post-to-logged-in-users

    Thanks

    #508645

    mb299
    Free User
    Post count: 147

    Hi Guust,

    That worked like a charm. Thank you so much for your help.
    Manish

    #508683

    mb299
    Free User
    Post count: 147

    Hi Guust,
    Am not able to find the correct page to customize this part ( see screenshot attached). Fir example, I need to change the background color from black to something else.

    Please guide me to the correct page.
    Thank you

    #508744

    Alex Rollin
    Moderator
    Post count: 27815

    Hi,

    please make a new topic for that so we can help you with it.

    #508761

    mb299
    Free User
    Post count: 147

    Sure Alex. Have done that now.
    Thanks.

Viewing 10 posts - 1 through 10 (of 10 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