Strict Standards: Redefining already defined constructor for class bbdb in /home/themes/public_html/forums/bb-includes/db-mysql.php on line 12

Strict Standards: Declaration of BB_Walker_Blank::start_lvl() should be compatible with BB_Walker::start_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_lvl() should be compatible with BB_Walker::end_lvl($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::start_el() should be compatible with BB_Walker::start_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127

Strict Standards: Declaration of BB_Walker_Blank::end_el() should be compatible with BB_Walker::end_el($output) in /home/themes/public_html/forums/bb-includes/classes.php on line 1127
Featured Image on a page (not a post) not showing up « ThemeShaper Forums

ThemeShaper Forums » Thematic

[closed]

Featured Image on a page (not a post) not showing up

(11 posts)
  • Started 3 years ago by aaronrelph
  • Latest reply from helgatheviking
  • This topic is resolved
  1. aaronrelph
    Member

    On each of my pages I have a header image and using the 'featured image' would work perfect but when i set a featured image nothing is showing up on page. Any ideas on what I might be doing wrong?

    Again I am trying to set a full size featured image on a page - not a post.

    Posted 3 years ago #
  2. aaronrelph
    Member

    Anyone out there have an idea what I'm doing wrong?

    Posted 3 years ago #
  3. proto
    Member

    Can you post your website URL in reply if you're not developing locally, that way we can look and try and work out what's causing the problem.

    Posted 3 years ago #
  4. aaronrelph
    Member

    This is the only page I've set a featured image on so far

    http://www.imgonnarelph.com/mha/?page_id=10

    I looked in the code to see why it's not displaying - not seeing any issues though.

    Posted 3 years ago #

  5. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    not doing anything wrong per se, but featured images don't display on pages by default. you can look at page.php and see that the_post_thumbnail() is nowhere to be found... nor is it hidden in something like thematic_content() b/c page.php just uses wp default the_content(). depending on where you'd like the image to appear you can add it to a hook or filter it into the the_content

    Posted 3 years ago #
  6. aaronrelph
    Member

    @helgatheviking - Thanks so much!!! That's all i need - working perfect now!

    Posted 3 years ago #

  7. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    @aaron, maybe you could share what you did in case someone else is trying to do the same thing.

    Posted 3 years ago #
  8. aaronrelph
    Member

    I added this code to header.php just above the <main> element. I used a conditional tag so it doesn't show on the front page. All other pages will have a header image if the featured image is set.

    <?php if ( ! is_front_page() ) {?>
    <div class="header-image">
    <?php the_post_thumbnail( 'full' ); ?>
    </div>
    <?php }?>

    Posted 3 years ago #

  9. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    i get what i asked for. but 'round here we don't advise hacking the thematic core files. and i don't really even advocate creating a child header.php unless you are doing something really whacky.

    you can do what you're trying easily from your child's functions.php

    function kia_add_thumbnail(){
        if ( ! is_front_page() ) {?>
            <div class="header-image"><?php the_post_thumbnail( 'full' ); ?></div>
        <?php }?>
    }
    add_action('thematic_belowheader','kia_add_thumbnail');

    you will need to add another condition so it only will appear on pages and not on blog posts or archives

    Posted 3 years ago #
  10. Bennyboy
    Member

    Helga - that code was exactly what I needed, thanks for posting!

    I have a question related to it - if I wanted child pages of a parent page to display the parent page featured image, what would I use? I assuming it's using 'get_the_post_thumbnail', but I can't get it to pull the parent image.

    Any clues?

    Posted 3 years ago #

  11. Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512


    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 440

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 510

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/themes/public_html/forums/bb-includes/kses.php on line 512
    helgatheviking

    Moderator

    http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail

    the first parameter is post ID. you'll need to find the ID of the parent and use that in get_the_post_thumbnail.

    maybe something like :
    http://www.webcitizenmag.com/2010/05/20/how-to-get-top-parent-page-id-in-wordpress/

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method GA_Filter::spool_analytics() should not be called statically in /home/themes/public_html/forums/bb-includes/wp-functions.php on line 586

Strict Standards: Non-static method GA_Filter::spool_this() should not be called statically in /home/themes/public_html/forums/my-plugins/googleanalytics.php on line 183