Php 如何拉链接并放入href?

Php 如何拉链接并放入href?,php,wordpress,themes,Php,Wordpress,Themes,我有一个网站,我正试图填充链接。现在,如果你从电脑上看这个网站,你会看到一个浮动的文本框,然后在地图上到处都是点。如果将鼠标悬停在其中一个点上,它将显示站点名称以及相关的时间段 添加标记(尝试使用 <?php $i = 0; while ( have_posts() ) : the_post(); $et_location_lat = get_post_meta( get_the_ID(), '_et_listing_lat', true ); $et_location

我有一个网站,我正试图填充链接。现在,如果你从电脑上看这个网站,你会看到一个浮动的文本框,然后在地图上到处都是点。如果将鼠标悬停在其中一个点上,它将显示站点名称以及相关的时间段


添加标记(尝试使用

<?php
$i = 0;
while ( have_posts() ) : the_post();
    $et_location_lat = get_post_meta( get_the_ID(), '_et_listing_lat', true );
    $et_location_lng = get_post_meta( get_the_ID(), '_et_listing_lng', true );

    $et_location_rating = '<div class="location-rating"></div>';
    if ( ( $et_rating = et_get_rating() ) && 0 != $et_rating )
        $et_location_rating = '<div class="location-rating"><span class="et-rating"><span style="' . sprintf( 'width: %dpx;', esc_attr( $et_rating * 17 ) ) . '"></span></span></div>';

    if ( '' != $et_location_lat && '' != $et_location_lng ) {
?>
        et_add_marker( <?php printf( '%1$d, %2$s, %3$s, \'<div id="et_marker_%1$d" class="et_marker_info"><div class="location-description"> <div class="location-title"><h2><a href="%6$s">%4$s</a></h2><div class="listing-info"><p>%5$s</p></div> </div> ' . $et_location_rating . ' </div> <!-- .location-description --> </div> <!-- .et_marker_info -->\'',
                $i,
                esc_html( $et_location_lat ),
                esc_html( $et_location_lng ),
                get_the_title(),
                wp_strip_all_tags( addslashes( get_the_term_list( get_the_ID(), 'listing_type', '', ', ' ) ) ),
                get_the_permalink()
            ); ?> );
<?php
    }

    $i++;
endwhile;

rewind_posts();
?>

添加标记(尝试使用

<?php
$i = 0;
while ( have_posts() ) : the_post();
    $et_location_lat = get_post_meta( get_the_ID(), '_et_listing_lat', true );
    $et_location_lng = get_post_meta( get_the_ID(), '_et_listing_lng', true );

    $et_location_rating = '<div class="location-rating"></div>';
    if ( ( $et_rating = et_get_rating() ) && 0 != $et_rating )
        $et_location_rating = '<div class="location-rating"><span class="et-rating"><span style="' . sprintf( 'width: %dpx;', esc_attr( $et_rating * 17 ) ) . '"></span></span></div>';

    if ( '' != $et_location_lat && '' != $et_location_lng ) {
?>
        et_add_marker( <?php printf( '%1$d, %2$s, %3$s, \'<div id="et_marker_%1$d" class="et_marker_info"><div class="location-description"> <div class="location-title"><h2><a href="%6$s">%4$s</a></h2><div class="listing-info"><p>%5$s</p></div> </div> ' . $et_location_rating . ' </div> <!-- .location-description --> </div> <!-- .et_marker_info -->\'',
                $i,
                esc_html( $et_location_lat ),
                esc_html( $et_location_lng ),
                get_the_title(),
                wp_strip_all_tags( addslashes( get_the_term_list( get_the_ID(), 'listing_type', '', ', ' ) ) ),
                get_the_permalink()
            ); ?> );
<?php
    }

    $i++;
endwhile;

rewind_posts();
?>


添加标记(问题是?我如何才能将页面链接复制到每个pin的悬停图标?例如,你进入该网站,它显示在左上角的印第安岛网站上作为标题,你可以单击该网站以阅读更多内容。我想尝试将链接复制到悬停框,以便移动用户可以在没有大悬停框的情况下导航。以及问题是?我如何才能将页面链接复制到每个pin的悬停图标?例如,你进入该网站,它显示在左上角的印第安岛网站上作为标题,你可以单击该网站以阅读更多内容。我想尝试将链接复制到悬停框,以便移动用户可以在没有大悬停框的情况下导航。