WordPress: Get featured image url of home page in another page

  php, wordpress

I have two pages created Home and About page.

I have set a featured image in my home page.

I want to get the image url of whatever featured image is set in my home page and display it on my about page (dynamic).

I am using my own custom template.

If possible I want to achieve it this way:

<img src="<?php get_homepage_featured_image_url(); //Something like this in wordpress. ?>"

Source: Ask PHP

LEAVE A COMMENT