I am utilizing Alike plugin to match my customized publish sorts, Alike offers shortcode [alike_link]
to run the process and I’ve created a shortcode to show my customized publish kind.
On this shortcode I made an anchor tag, I need to put Alike shortcode in href however It is not working.
You possibly can see my code beneath, there’s a anchor tag with href="#"
, is there any answer?
operate wpb_demo_shortcode() {
$html = '';
$html .= '<div class="crypto-box">';
$args = array( 'post_type' => 'Crypto Brokers', 'posts_per_page' => 10 );
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) {
whereas ( $the_query->have_posts() ) { $the_query->the_post();
$html .= "<div class='crypto_content'>";
$html .= "<div class='crypto_left'>";
$html .= "<div class='crypto_img'>".get_the_post_thumbnail()."</div>";
$html .= '<a href="'.get_the_permalink().'">'.get_field('review_button').'</a>';
$html .= "</div>";
$html .= "<div class='crypto_center'>";
$html .= '<h4>'.get_the_title().'</h4>';
$html .= "<p>".get_the_excerpt()."</p>";
$html .= "</div>";
$html .= "<div class='crypto_right'>";
$html .= '<p><b>Location : </b>'.get_field('location').'</p>';
$html .= '<p><b>Leverage : </b>'.get_field('leverage').'</p>';
$html .= '<p><b>Deposit : </b>'.get_field('deposit').'</p>';
$html .= '<p><b>Spreads : </b>'.get_field('spreads').'</p>';
$html .= '<p><b>Devices : </b>'.get_field('devices').'</p>';
$html .= '<p><b>Platforms : </b>'.get_field('platforms').'</p>';
$html .= "</div>";
$html .= '<a href="#" class="cp_btn">'.get_field('compare_button').'</a>';
$html .= "</div>";
};
wp_reset_postdata();
};
$html .= '</div>';
return $html;
}
// register shortcode
add_shortcode('crypto', 'wpb_demo_shortcode');