Pass post title in URL
-
Hi, I have created a contact us form. I would like to auto populate one of the fields with the title of the post they came from.
So i’m using contact form 7 and it is excepting the URL /form?instrument=XXXXX
The XXX ideally wants to be the post title from the page they pressed the button on.
So on the instrument posts I am using a plugin called Buttons Shortcode And Widgets to allow me to add a button on each post using sort codes. I current have the button code as
[otw_shortcode_button href="[otw_shortcode_button href="/shop/form?Instrument=Instrument Name" size="medium" icon_position="left" shape="square" css_class="single_add_to_cart_button button alt"]Request Freebies[/otw_shortcode_button]is there away to change Instrument Name to be the posts title? I have many posts to add this button to, and do not want to edit it each time.
Hope this makes sense…
The topic ‘Pass post title in URL’ is closed to new replies.