Show thumbnail on mouse hover

Discussion in 'WordPress' started by Divvy, Mar 7, 2023.

  1. #1
    Hello guys,

    Can someone please help me? This is my site: https://tbvop.com
    I'm trying to create the same feature that the site below is using, when the user puts the mouse cursor hover the post title, it shows the post thumbnail and the description (excerpt) in the header.
    Screenshot: https://prnt.sc/G6V5iinO8xve
    Site to test: https://toppornsites.com (NSFW)

    I already have the code ready in my header:

        <div class="maddos-infobar">
        <div class="infobar">
        <div class="infobar-logo"><a href="http://www.tbvop.com"><img src="//tbvop.com/wp-content/uploads/2023/03/logo.png" alt="TBVOP" height="120" width="350"></a></div>
        <div class="infobar-about"><div class="infobar-default" style="display: block;">Site description goes here.</div>
        <div class="infobar-siteinfo" style="display: none;"><div class="leftcolumn"><img src="<!-- THUMB URL HERE-->" alt="website preview"></div><div class="rightcolumn"><div class="desc"><!-- POST DESCRIPTION HERE--></div></div></div></div></div></div>
    PHP:
    But I don't know what to add to replace:
    <!-- THUMB URL HERE-->
    <!-- POST DESCRIPTION HERE-->

    This is the code that I'm using for my links:
    printf( '%s <a class="maddos-link" title="%s" %s %s href="%s">%s %s %s %s %s %s %s</a> %s', $site_icon, $title, $target, $rel, $href, $title, $sticky_icon, $additional_icon, $mobile, $new_icon, $extra, $hover, $review );
    PHP:
    Full code:
    https://paste2.org/f0XUjnnb

    Can someone please help me to show the thumbnail and excerpt here?
    https://prnt.sc/FeLGsqss6eY0

    My site: https://tbvop.com

    Thank you in advance :)
     
    Divvy, Mar 7, 2023 IP