Tell us what you are trying to do? I am trying to append some text from a custom field to a URL I am creating... I have a custom HTML and a button option.. as I wanted to check if the shortcode option as suggested in the documentation link below works on a button too.. So I've created a custom field and then I am using this code in the custom html .. hidden link field="brand-id" output="raw"][/types]">Link with data ... Now I used the 'brand-id' in the field assuming that the slug name should be used.. it seems to work fine in the Custom HTML.. The screenshot attached will let you know the 2 links that I've created (one is a link with the code above and the other is the button with the "hidden link field="brand-id" output="raw"][/types]" pasted in the link.. It doesn't seem to work in the button.. is that expected? I mean does the shortcode thing work only in Custom HTML or will it work in buttons too..
Secondly I'd like to check how I can append a variable from a custom-field that's not directly from the current post but from another custom-post that has a relationship to the current post. For example I have the link of a brand and there's a relationship between the brand (the current custom post) and the retailer (another custom post).. and I want the shortcode to pick up a custom field data from the other custom post.. Please advise how I can achieve this
Hello and thank you for contacting the Toolset support.
I am not sure to understand what you are trying to build. This link, for example, does not have an effect, it returns the homepage hidden link
Can you explain what you are trying to create? Maybe we can suggest a different way.
Would it be possible to check your views closely and see how you are using the shortcodes? If yes, your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Thanks for the prompt response .. and yes, I am perfectly ok with you helping me.. :-)..
I think I am clearer now about the shortcode thing... will try it out now.. just had a couple of queries while I test it..
1) So there's no shortcode generator option.. I have to basically ask you and figure out the shortcode.. am I right? Is here a document or link for some help on this so that I can bookmark it?
2) Regarding the related field content, would I need to use the output='raw' or not?
3) If I use this code just once as you indicated, [types field='brand-id' item='@optician-eyewear-brand.child'][/types] ... would it display all the child ids or just the first one? I'd like to display multiple children as parameters but I am not sure which is the right format for this... is it hidden link OR is it hidden link ... please do advise which is the better option and how does Toolset output these.
4) I would like to use something like a button option with the href... could you suggest some way I could do that, rather than just text with a link? Is there a way to use the <button> option in custom html and achieve this ? if yes, could you please provide me some guidance with that?
I tried your code with the output='raw' option and it seemed to work fine.. should I still use it?
Also only one of the child is displayed.. please advise how I can display all the children's custom fields?
Just to give you an example.. I have One Organisation (parent) with multiple Brands (children) and I need to send an URL from the Parent's page with all the brand ids of the children... please help.
Regards,
Alim
New threads created by Minesh and linked to this one are listed below:
I tried your code with the output='raw' option and it seemed to work fine.. should I still use it?
==>
Yes 🙂
That is a different thing. As per our support policy we entertain only one question per ticket. This will help other users searching on the forum as well as help us to write correct problem resolution summery.
I will split the ticket for your additional question. Please feel free to close this ticket.