How to implement related logs in WordPress without using plugins

How to implement related logs in WordPress without using plugins

Many comrades use plug-ins to implement related logs, but in order not to affect the running speed of WordPress, it is better to use fewer plug-ins.
The following is a method that can implement relevant logging functions without using plug-ins.
1. Calling method

 <div class="related">
			<h3>Articles you may be interested in</h3>
			<?php include('related.php'); ?>
		</div>

On the log page, call the related.php file. This file can realize related log functions.
2. CSS adjustment To keep the page neat, it is recommended to adjust the CSS. Here is a CSS beautification provided:

 .related h3, #coms-title, #reply-title {
	height: 21px;
	line-height: 21px;
	padding: 0 5px;
	border-bottom: 3px solid #BFBFBF;
	color: #66ccff; }
.related ul { padding: 5px 0 15px; }
.related li { padding: 0 5px; }
	.related li span { float: right; }
	.related li span, .related li small {
		color: #cccccc;
		font-size: 10px; }

3. Download related.php
related
After downloading, upload related.php to the root directory of the theme you are using.
4. This blog demonstrates the method used. For reference: the theme of wpbus is mainly used as a reference.

<<:  MySQL large capacity database backup method

>>:  Web Host Directory selected high-quality hosting

Recommend

HK Serverworks: $7/month/1GB memory/60GB space/200GB bandwidth/OpenVZ/Hong Kong

HK Serverworks, Hong Kong Serverworks Data Centre...

adf.ly: Making money with URL shorteners

Adf.ly now supports Chinese. Adf.ly's profile...

VPSBiT: $7/month/512MB memory/350GB space/3TB traffic/XEN/Hong Kong

VPSBiT, a European hosting provider, has been int...

How to solve the problem of foreign space being blocked by GFW?

What should I do if the IP address of the foreign...

VP Easy: $12.6/year/1GB/15GB SSD/1TB traffic/1 IP/KVM/Las Vegas

VP Easy is a new hosting provider, but it is owne...

$6.99/month/512M memory/25G space/500G traffic/KVM VPS —— XFuseSolutions

xFuseSolutions was founded in July 2012, which is...

prometeus Latest Super Offers

The previous 50% discount is still valid, and the...