-
Hello, I want to scrap the author’s google knowledge panel URL as I scraped other URLs and display them in the author bio. I want to know how to add the google knowledge panel URL in the user profile in WordPress and hence how to scrap that link to display in the author’s bio.
It is to note that there may be a number of authors, so the code should be in such a way that it only scraps the details of the particular author who wrote the post.Here is the code sample I am trying to use!!
<div class=”author-box”>
<div class=”author-avatar”>
<?php echo get_avatar( get_the_author_meta( ‘ID’ ), 250 ); ?>
</div>
<div class=”author-info”>
<div class=”author-title” itemprop=”author” itemscope itemtype=”http://schema.org/Person”>
<span itemprop=”name”><?php printf( get_the_author_meta( ‘display_name’) );?></span>
</div>
<div class=”author-summary”>
<p class=”author-description”><?php echo wp_kses( get_the_author_meta( ‘description’ ), null ); ?></p>
</div>
<div class=”author-social”>
<?php if ( get_the_author_meta( ‘facebook’ ) ) : ?>
” target=”_blank”><i class=”fab fa-facebook”></i>
<?php endif; ?>
<?php if ( get_the_author_meta( ‘twitter’ ) ) : ?>
<?php $twitter_username = str_replace(‘@’, ”, get_the_author_meta( ‘twitter’ )); ?>
” class=”twitter” target=”_blank”><i class=”fab fa-twitter”></i>
<?php endif; ?>
<?php if ( get_the_author_meta( ‘instagram’ ) ) : ?>
” target=”_blank”><i class=”fab fa-instagram”></i>
<?php endif; ?>
<?php if ( get_the_author_meta( ‘url’ ) ) : ?>
” target=”_blank”><i class=”fa fa-globe”></i>
<?php endif; ?>!!!Write the code in the same way!!!
</div>
</div>
</div>
The ticket ‘How to add author google knowledge panel url?’ is closed to new replies.