Hi guys, I’ve been trying to implement this within the sidebar but haven’t had luck. The link from the Supreme detail header has been removed and we are trying to relocate to the side bar. However, part of the code isn’t being accepted – and the link isn’t conditional and remains visible even if there is not email address input for the listing.
I have tried several options, including hard-coding the geodirectory-compatibility.php but I’m stuck. This is the code I’m using:
I have followed this post: https://wpgeodirectory.com/support/topic/send-enquiry-form/
I have tried to use it within a text widget that has been edited to accept php and also within a php widget. Please see the attached results. Adding an opening php code doesn’t have any effect also. Thank you.
As you saw, in the posts you referenced, this is based on the existing link functionality within the theme. A developer should be able to get your customization implemented with the filter so it can be used again outside the theme https://wpgeodirectory.com/support/topic/listing-detail-author-link/#post-361147
We are currently working hard on GeoDirectory V2 which will make some of the most common requests easier regardless of what theme is being used.
I am trying to do exactly that – use a link with the existing functionality of the theme. The link you referenced is to change the function of the “Send Enquiry” link, which is not what I am looking for.
I simply want to add the “Send Enquiry” link into the sidebar instead of it being in the Supreme header.
If you removed the link, then you cannot recall the functionality with the snippet.
If you did restore the theme functionality then the snippet could be used to duplicate the link, not move it.
But that’s the problem. I have attached the image of the way the snippet is displaying when used in a php widget in my original post. The link and the pop-up form is just fine, but the conditions are being lost – meaning it should/should not display based on the listing email field being populated. The link for the “Send Enquiry” option is being displayed on listings with an without an email. Even if there is not action when an email is not present, it could be confusing, so I’m trying to figure out why half of the code is being lost.
The functionality isn’t removed, it’s hidden in the header with CSS. Couldn’t I hide the supreme header link and rename this div so that it’s visible? It seems that the contact link can be set up more than once on a page so it should be a problem.
You can post the code you are using here and we can take a look at it.
I have posted it on my very first attempt with this thread. Please reread the first post. Thank you.
Just to confirm again, this is a site with Supreme?
Please send over the site URL and WP Admin so we can take a look.This reply has been marked as private.
You have used incorrect logic in code. You have missing opening & closing PHP tags.
I have updated snippet code in your widget:
Thank you so much Kiran! I really appreciate that.
Is there a way that I can have the actual php widget to respond to the same “if” statements used in this code? I have styled the widget to look good with the theme, the only problem I have now is that if there is no email address – the link does not show up, but there is a blank stylized button that will still appear. Any ideas?
The logic i used will not display link if there is blank value for email field.
1) With email
2) Without email
Let us know.
Thank you. I actually meant if I could apply the logic to a widget. On the site I am working on I styled the “Send Enquiry” link so that there was a background because I added it to the sidebar with css. So when the link isn’t visible, the background would still show. It looked strange.
But no worries, the client decided to use a default email address for listings without an email contact, so the link shows all the time anyway. Thank you again.
Thanks for letting us know 🙂
The topic ‘Supreme, Send Enquiry – Sidebar’ is closed to new replies, this may be for inactivity, please open a new topic if you have a similar question.