Sti cumva cum se poate face fara plugin
Am deja foarte multe plugin-uri instalate
Eu vreau doar la imaginea din chenar sa apara textul Vizualizare poza
Sa fie la fel la toate imaginile din chenarul cu rosu textul Vizualizare poza
Merci de raspuns
Introdu asta in <head>
dupa care in style.css formeaa tooltip-ul!
<a href="img.jpg" class="tooltip" title="Vizualizare poza"></a>
Vezi asa: <a href="img.wp-post-image" class="tooltip" title="Vizualizare poza"></a>
Ciao
nu cred ca este asa de simplu
Am mai gasit un link
wpbeginner.com/wp-themes/how-to-add-tooltip-testimonials-in-wordpress-themes/ cu www. in fata
menucool.com/tooltip/css-tooltip cu www. in fata
Eu cred ca trebuie facut un folder js un cod css care il adaug in style.css si dupaia un cod care il adaug in function.php
Merci de raspuns daca sti alta metoda incerc cum zici tu
Daca cu js doresti sa o faci da,daca cu simplu css ,nu aidecit sa introduci HTML in pagina si restul in style.css
Am incercat functioneaza urmatorul cod
menucool.com/tooltip/css-tooltip cu www. in fata
Trebuie pus codul css si codul html
Am pus codul in header mi-a aparut pe site cuvantul tooltip si functioneaza
Problema e ca mie imi trebuie pentru poza mica thumbnail si trebuie sa pun codul in function.php
In function.php am gasit uramtorul cod
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 = ‘<img src=”‘.$img[0].'” alt=”” width=”‘.$img[1].'” height=”‘.$img[2].'” title=”‘.$title.'” class=”wp-post-image” />’;
}
}
}
Cum sa adaptez codul html pentru function.php
Merci de raspuns