Home › Forums › General Issues › ACF Image as div background in page template › Reply To: ACF Image as div background in page template
I think I found a simpler way to do this –
// Get the page title
echo '<h1 class="template-title">';
$title = the_title();
echo '</h1>';
Then add css to put it over the hero image:
/* Custom Template Pages
---------------------------------------------------------*/
.template-title {
position: relative;
top: 70%;
z-index: 100;
color: white;
text-align: center;
font-size: 50px;
font-size: 5rem;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.