Alex Howes
Forum Replies Created
-
AuthorPosts
-
I’m writing it programmatically as part of a snippet. The snippet creates a new tab on the user’s profile and adds links to other users’ CVs. The $cv_id is a string containing the id of the listing, in this case ‘438’ (I’ve checked this). The tab and link are being created fine. When you click on the link, it reloads the page (the user’s account page) but with the url appended by /[gd_cv_link%20id=cv_id]/. I’ve also checked it using ‘438’ rather than $cv_id, but this doesn’t make a difference. The section of my code is:
$cv_url = gd_cv_link($cv_id); echo '<a href="[gd_cv_link id=$cv_id]">View Worker CV</a>';
Thanks for your response Kiran.
I’ve added it, but instead of the link going to the user’s CV, it reloads the same page but with [gd_cv_link%20id=cv_id]/ appended on the end of the url. Do you know what the problem might be?
Thanks,
AlexHi Stiofan,
I’m most concerned about the personal data that is entered into listings, like email addresses, telephone numbers, and names.
Alex
Thanks Paolo, no problem. Hope you’re enjoying memorial day 🙂
Hi Alex, I don’t want to get the listing data, I want to get the url of the listing page.
Alex
Sorry, I’ll try to explain better.
One of my CPTs is CVs. I’m adding some extra information to a custom tab on the profile page as part of a snippet, to allow some users to view some other users’ CVs. I’ve written:
echo '<a href="url">View Worker CV</a>';
where the url I’d like to go to is a user’s listing detail page. I have the listing id of the listing. Is this possible? I’m not sure how to get the url because the page is dynamic.
Thanks,
AlexIn the end I used CSS to swap the sidebar and main content, and then resize them, and then put the add listing form in the new “sidebar”. Probably a bit of an ugly way to do it, but quite simple and it worked 🙂
Cool, thanks for the info 🙂
As a way to get around this problem I thought I’d put the listings in the main content and the add listing form in a widget, but the add listing form isn’t working in a widget. Is there a way to solve that?
Ok, thanks.
Alex
Oh, sorry, I didn’t realise that. Is there a way to get round it?
The thing is that I want users to see a list of unclaimed listings before they register one, to try to minimise multiple submissions of the same listing.
Thanks Kor
I think I’ll write a snippet to add a “claimed” or “unclaimed” tag to them and then filter them that way.
Great, thanks Kiran, it’s working now 🙂
Sorry, it isn’t working. It was adding the wrong tag. I’ve written the code:
$tag = $value; geodir_save_post_meta( $value, 'post_tags', array( $tag ) ); wp_set_object_terms( $value, array( $tag ), get_post_type( $value ) . '_tags' ); echo do_shortcode('[gd_listings post_type=gd_cv layout=1 tags=$tag]');
where $value is a string of the listing ID, which I’m also using as a unique tag for the listing. The tag is attached to the listing correctly (I checked the JSON endpoint), so the problem is in the GD listings shortcode. Currently it prints every listing of type gd_cv, rather than just the ones tagged with $tag.
Is it possibly because it’s looking for literally ‘$tag’ rather than the contents of $tag?
Cool, that’s working, thanks a lot for your help with this 🙂
-
AuthorPosts