Yet another replacing text header with image
-
Hello. I need small help with the WordPress header. I want to replace the text from the header with an image and I don’t know how to do it. I already searched the forums but I think that the available solutions does not apply to my code. Thank you.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?> xmlns:og="http://ogp.me/ns/fb#" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:addthis="http://www.addthis.com/help/api-spec"> <head profile="http://gmpg.org/xfn/11"> <meta charset="<?php bloginfo( 'charset' ); ?>" /> <!--Set Viewport for Mobile Devices --> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" /> <title><?php wp_title(); ?></title> <!-- Setup OpenGraph support--> <?php if(get_option("ocmx_open_graph") !="yes") { $default_thumb = get_option('ocmx_site_thumbnail'); $fb_image = get_fbimage(); if(is_home()) : ?> <meta property="og:title" content="<?php bloginfo('name'); ?>"/> <meta property="og:description" content="<?php bloginfo('description'); ?>"/> <meta property="og:url" content="<?php echo home_url(); ?>"/> <meta property="og:image" content="<?php if(isset($default_thumb) && $default_thumb !==""){echo $default_thumb; } else {echo $fb_image;}?>"/> <meta property="og:type" content="<?php echo "website";?>"/> <meta property="og:site_name" content="<?php bloginfo('name'); ?>"/> <?php else : ?> <meta property="og:title" content="<?php the_title(); ?>"/> <meta property="og:description" content="<?php echo strip_tags($post->post_excerpt); ?>"/> <meta property="og:url" content="<?php the_permalink(); ?>"/> <meta property="og:image" content="<?php if($fb_image ==""){echo $default_thumb;} else {echo $fb_image;} ?>"/> <meta property="og:type" content="<?php echo "article"; ?>"/> <meta property="og:site_name" content="<?php bloginfo('name'); ?>"/> <?php endif; ?> <?php } ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Yet another replacing text header with image’ is closed to new replies.