• PHoward188

    (@phoward188)


    Hi I am trying to put a different quote on every page by using a custom field. I am using the new weaver theme. I have a custom field set up as headquote. I have setup in the (Site Header Insert Code in weaver admin-advanced) the following code

    <div class=”headquote”>This is a quote…</div>

    I want to replace the “This is a quote…” with what ever I put in the custom field headquote.

    The website is https://hypnotherapypurley.co.uk/weight-loss/

    Any ideas?

    Thanks in advance

    Paul Howard

Viewing 2 replies - 1 through 2 (of 2 total)
  • <?php if( get_post_meta($post->ID, "headquote", true) ): ?>
         <div class="headquote">
              <?php echo get_post_meta($post->ID, "headquote", true); ?>
         </div>
    <?php endif; ?>

    This should work. If it is for a page, I don’t think you need a loop or anything, see if this does what you need….

    Thread Starter PHoward188

    (@phoward188)

    Should I insert this code in the “Site Header Insert Code in weaver admin->advanced”

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘displaying a custom field in on the header image’ is closed to new replies.