WordPress.org

Ready to get started?Download WordPress

Forums

obandes
Code in header won't go away! (13 posts)

  1. doodleoodle
    Member
    Posted 1 year ago #

    Newb here.

    I really like the look and feel of the Obandes theme.

    However, the code that shows against the background of the header won't go away!

    It's not just me, check also these sites;

    http://www.jerichocafe.com
    and
    http://www.taintedtea.com/

    If I can't get around it I'll use another theme but like I say I really like this one...

    Thanks in advance for any tips on how to correct it.

    http://wordpress.org/extend/themes/obandes/

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Can you link your website in which the problem is in?

  3. doodleoodle
    Member
    Posted 1 year ago #

    Thanks for your reply Andrew.

    The two sites shown in my post above show examples of the problematic code.

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Are any your websites?

  5. doodleoodle
    Member
    Posted 1 year ago #

    Yes I composed the JerichoCafe one :o)

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    Look at the PHP function reference when using is_object. You need one parameter.
    http://php.net/manual/en/function.is-object.php

  7. doodleoodle
    Member
    Posted 1 year ago #

    Thanks mate I'll study that.

    Much appreciated.

  8. doodleoodle
    Member
    Posted 1 year ago #

    Any idea what to put or what should go in there?

  9. Andrew
    Forum Moderator
    Posted 1 year ago #

    You could put a variable with your object in there, or remove the code all together if it's not doing anything.

  10. doodleoodle
    Member
    Posted 1 year ago #

    Okay thanks.

    The code obandes: Theme Functions (functions.php) says;

    $image_data = get_theme_mod( 'header_image_data' );
    if(is_object()){
    $width = $image_data->width;
    $height = $image_data->height;
    }

    I don't have the skill or knowledge to see what to put in there. I would be very grateful if you can suggest or tell me what to delete.

  11. Andrew
    Forum Moderator
    Posted 1 year ago #

    Try

    if ( is_object( $image_data ) ) {
    
     $width = $image_data->width;
     $height = $image_data->height;
    
    }
  12. doodleoodle
    Member
    Posted 1 year ago #

    Cheers mate, you're a diamond.

    That's exactly what it needed.

    Just out of interest; do you think it's a fault in the original theme code or was it something I did?

    ...tried to notify the author but can't find the link to him as yet, maybe later.

    Thanks again, much appreciated!

  13. Andrew
    Forum Moderator
    Posted 1 year ago #

    The fault is with whom added the is_object function or removed the is_object parameter.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic