Archived topic
How to get the title of a post dynamically
5 replies · Started by Pablo on March 17, 2023
Hello, I want to obtain the title of a post dynamically to be able to insert in post a link of this type:
https://api.whatsapp.com/send?phone=34XXXXXXXXX&text=Hello, look what an interesting article I have read: (Post_title)
How can I do it with generate press?
Thank you
Hi there,
Not sure if I fully understand.
Where are you trying to insert it?
Can you link me to the page in question?
Hi Leo.
Look for this post:
So that users who read this post can have more information, I have put a link pointing to api.whatsapp.com
When a user clicks on that link, the WhatsApp application opens and sends a message to the phone number included in the link with this text:
Hi, I´ve seen this on test.com and I´d like more information please.
Is it possible to include the title of post in that link?
For example:
Hi, I´ve seen this post (the_title_of_post) on website.com and I´d like more information please.
Let me know if you undstand my idea.
Hi Pablo,
Unfortunately I still don't understand the requirement.
That being said, it doesn't sound like a theme-related request at all.
Post titles and content etc are WP core features so in theory, if there is a solution that works in a Twenty series WP theme, the exact solution should work in GP.
Hope this provide some insights :)
ok
Good luck!
A WordPress general forum might be helpful for a question like this as well:
https://wordpress.stackexchange.com/