Skip Navigation

[Resolved] Save post-id in metafield

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 21 replies, has 3 voices.

Last updated by bouchairY 6 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#598869

Hello
I have 2 cpt types : Offers and Formalities
A formality is displayed in offer if they have share the same destination (taxonomy)

[wpv-view name="liste-des-formalites-parametree" wpvportfoliocategory="[toolset_top_level_term tax='portfolio_category' id='[wpv-post-id]']"]

I need to save the formality "id" in the Offer metafield "formality_id"

Thank you for your help

#599003

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Thank you for contacting our support forum.

Actually I dont think that you need to save the IDs at all.

What you can do is to create a formality view and then add a query filter for your Destination taxonomy and then set it to filter by the taxonomy of the current page where the view is inserted. This will allow the view to be filtered by the same destination taxonomy as the offer.

Please let me know if this helps.
Thanks,
Shane

#599012

Hello
I agree with you, the formality is displayed in the offer page detail as I already mentionned in my question
The Formality id is need to be used away
Thank you

#599064

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

So to understand this better you want a list of all the formality ID's that are attached to the same taxonomy to be stored in the formality_id custom field.

If so then this is going to require some custom coding to achieve.

#599076
formality_id.jpg
formality_id1.jpg

There is only one formality displayed in a given offer

When I add : [wpv-post-id] in the formality view
You can see the formality_id = 39073 displayed in the detail page offer

formality fields are not stored in offer cpt, they are only related by destination field

I create a metafield in cpt offer and want to store in it the formality_id

I want to use : update_post_meta( $post_id, $meta_key, $meta_value, $prev_value );

Can you help ?

Thank you

#599327

Hello
Any informations please ?
Thank you

#599409

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

I have an idea but I would need admin access in order to test the solution.

Would you mind providing me with access so that I can try this.

Thanks,
Shane

#599418

Hello
You can find access in this ticket :
https://toolset.com/fr/forums/topic/display-only-some-selected-content-templates/

Thank you in advance

#599421

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

So I took another look at it.

It seems that you dont have the CRED plugin installed.

However the idea that I have is to use a CRED form to update the Offers post with the ID of the Formality.

This would mean that any user would be able to update the formality ID and not just you.

Maybe explain to me whats the usage of the formality id and I could possible suggest another method .

Thanks,
Shane

#599577

It's not really solved, I'm using a work-around

#600104

Hi Bouchair,

I see that we can fix this issue but we only need more clear details to start working on it.

I will be happy If you agreed to re-open this ticket.

Just mentioned my name in a reply @mohammed to start working on this again.

Thanks.

#600184
formality_id.jpg

Hello Mohammed
I'm happy that you can work again on this problem again
Please see attached image
Actually I have a form on the front where the admin can set the formality manullay and save it

Thank you

#600192

Hi Bouchair,

FYI, Me and Shane will work with you on this issue.

Please provide Shane the information he will ask you about and be sure that we will do our best.

Thanks.

#600193

Hello
Ok no problem
Please send me a private post and i will provide access infomations
Thank you

#600575

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

I must apologize for the delay in response.

Could you explain to me the purpose of having the ID in the other post ?

Understanding the context should allow me to provide a solution that could be done through the backend automatically.

Please let me know.
Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.