Article directory
A friend of mine works in international trade online marketing and wants the friend links in the sidebar to be placed at the bottom of the homepage.
In this way, friends in Affiliate Links can also view their connections on their phones.
Chen Weiliang found some methods on the internet and eventually found the perfect solution.
To learn how to add links to your WordPress website, you can search for and install the Link Manager plugin in the backend.
Here we will discuss how to move the link to the bottom of the website homepage, first find the footer.php file in the theme directory (Appearance → Edit → footer.php)
Note: Before editing the theme file, be sure to make a file backup.
Add Affiliate Link Code
Add the following code above footer.php:
<!--links-bottom-index-->
<div class="span12 home-links">
<div class="widget-box">
<div class="widget-title"><span class="icon"><i class="fa fa-link fa-fw"></i></span><h3>友情链接</h3></div>
<div class="widget-content">
<ul>
<?php wp_list_bookmarks('orderby=id&categorize=0&category=66,192&title_li='); ?>
</ul>
<div class="clear"></div>
</div>
</div>
</div>
<!--end links-bottom-index-->Usually, once added, it will display as usual, but if you need to adjust the style, you will need to edit the CSS file.
Affiliate link CSS is displayed horizontally at the bottom of the home page
Appearance >> Edit >> style.css for css editing, the specific code is as follows,
/*首页底部横排显示友情链接CSS*/
.widget-box {position:relative;clear:both;margin-bottom:20px;border-top:1px solid #E1E1E1;border-right:1px solid #E1E1E1;border-left:1px solid #E1E1E1;background:none repeat scroll 0 0 #fff;}
.widget-title {height:40px;border-bottom:1px solid #E1E1E1;background:#F8F8F8;}
.widget-content {position:relative;z-index:1;padding:10px 15px;border-bottom:1px solid #E1E1E1;}
After making the above changes, the code will usually display normally and the Link Manager Affiliate link will display horizontally.
Hopefully, the article "How to Display Friend Links Horizontally? CSS for Horizontal Friend Links at the Bottom of the WordPress Homepage" shared on Chen Weiliang's blog ( https://www.chenweiliang.com/ ) will be helpful to you.
Feel free to share this article's link: https://www.chenweiliang.com/cwl-2121.html
