0

I am in is_page and would like to get a specific url https://www.jualbotolminum.com/alaska-frozen/.

I would like to grab a first image on that url and show it. I need a wordpress code version (e.g.function) to make me able to grab an image inside the post.

I used post ID but it doesn't work. Using a url paramater is too risk I think.
Here's the demo.

Joe Kdw
  • 2,245
  • 1
  • 21
  • 38
  • Since I want a wp version code, I finally find the solution, as in; `` – Joe Kdw Jul 15 '20 at 07:56
  • This will give you the current url page you're on with wordpress: query_vars, home_url( $wp->request ) ); ?> – amarinediary Jul 15 '20 at 07:57
  • @amarinediary, I read the thread in a page of this site, and above (in this comment) has already resolved my problem, thanks. It's a matter of arrange a question - still makes me confused how to express my problem :) – Joe Kdw Jul 15 '20 at 07:58
  • 1
    @amarinediary, your suggestion will return the is_page url not is_single url I targetted. – Joe Kdw Jul 15 '20 at 08:00
  • Exactly (I didn't understand your question I think ^^) – amarinediary Jul 15 '20 at 10:56

0 Answers0