better wordpress custom fields
declare all custom fields first
Copy this code and paste it in your HTML
$bg_img = get_post_meta($post->ID, 'bgimg', 1);
$heading = get_post_meta($post->ID, 'mainheading', 1);?>
<div class="int-head-pic" style="background:url(
<?php echo $bg_img;
?>) no-repeat;" >
<h2 class="mainheading">
<?php echo $heading;
?></h2>
Report this snippet