How do I add html code in functions.php
-
Hi everybody
How do I add html code in functions.php?
Code html:<a href="#"> Tooltip <span> <img class="callout" src="src/callout.gif" /> <strong>Most Light-weight Tooltip</strong> This is the easy-to-use Tooltip driven purely by CSS. </span> </a>
Code functions.php
if (!function_exists('theme_get_post_thumbnail')){ function theme_get_post_thumbnail($args = array()){ global $post; $size = theme_get_array_value($args, 'size', array(theme_get_option('theme_metadata_thumbnail_width'), theme_get_option('theme_metadata_thumbnail_height'))); $auto = theme_get_array_value($args, 'auto', theme_get_option('theme_metadata_thumbnail_auto')); $featured = theme_get_array_value($args, 'featured', theme_get_option('theme_metadata_use_featured_image_as_thumbnail')); $title = theme_get_array_value($args, 'title', get_the_title()); $result = ''; if ($featured && (function_exists('has_post_thumbnail')) && (has_post_thumbnail())) { ob_start(); the_post_thumbnail($size, array('alt' => '', 'title' => $title)); $result = ob_get_clean(); } elseif ($auto) { $attachments = get_children(array('post_parent' => $post->ID, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID')); if($attachments) { $attachment = array_shift($attachments); $img = wp_get_attachment_image_src($attachment->ID, $size); if (isset($img[0])) { $result = ''; } } } if($result !== ''){ $result = '<div class="avatar alignleft">ID).'" title="'.$title.'">'.$result.'</div>'; } return $result; } }
[please mark any posted according to the forum guidelines https://codex.www.ads-software.com/Forum_Welcome#Posting_Code – the above codes might be corrupted by the forum’s parser]
I want to add the html code for the photo small (thumbnails)
Thank you!
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘How do I add html code in functions.php’ is closed to new replies.