Use content from one page on another one
-
Hello,
It might be a silly question, but cannot find the answer anywhere.
I need to get the featured image from “about us” page and use it on “home page”. I am using this code:<?php if ( has_post_thumbnail() ) { $post_thumbnail_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src( $post_thumbnail_id, 'full' )[0]; } <section style="background-image:url('<?php echo $image_url; ?>');"> ?>
to display image as background, but need to load exactly the same img on another page.
And can I also do the same withthe_content();
andthe_title();
?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Use content from one page on another one’ is closed to new replies.