Solved

Is posible create link with post id

  • 24 November 2021
  • 2 replies
  • 21 views

Badge

Hello, I am creating site with jobs opportunities using Jet engine. I create everything i need it. But i still don't solved “Apply” button at he end of job description. I wan to have button with link to form site something line /job-application/?post_id=%PostID% which is referring to post with specific job. I wan to use WP Query to load some data from original post. 

I read lost of post on internet, so I am connived that it is possible. But don’t know how to do it with elementor. 

Many thanks for any help!

icon

Best answer by Harry Martin 24 November 2021, 14:30

View original

2 replies

Userlevel 2
Badge +3

you can do this via linking dynamic to a shortcode :

This shortcode could be inserted via the code snippets plugin (or the custom code feature inside Elementor, but no PHP there I think …)

 

 

function parameterlink() {
$value = get_site_url().'/somepage/?parameter='.get_the_ID(); // somepage and the id as an example for a target and parameter
return $value;
}

add_shortcode('parameterlink', 'parameterlink');

 

Badge

That is great idea! It works really well. 

Thanks!

Reply