WordPress.org

Ready to get started?Download WordPress

Forums

Adding a banner image under menu (1 post)

  1. marcie4
    Member
    Posted 5 months ago #

    I need to add a banner image under the menu bar on a single page.
    I created a child theme... no worries there.
    I created a custom page template.
    I added this to the custom page template (found it on another forum post):

    <?php get_header(); ?>
    <!-- add variable banner -->
    <img src='<?php echo get_post_meta($post->ID, 'banner', true); ?>' />
    <!-- end variable banner -->
    	<?php 	get_template_part('loop', 'page'); ?>
    <?php get_footer(); ?>

    Then I added a variable image field name: banner and value: path to my image. (also found on another forum post).

    What I got was my image where I'd like it to be with just a little white space between it and the menu. I'd like to remove the whitespace.

    The big problem is, however, that none of my page content shows up under the newly placed image.

    Anyone have any suggestions to removing that white space and allowing my content to appear under the image on that one page?

Reply

You must log in to post.

About this Topic