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

VortexNode E3-1220 8GB RAM New York Dedicated Server Simple Review

The configuration is as follows : New York – E3-1...

Use Baidu Netdisk to backup your WordPress website

The backup of wordpress website has been introduc...

kimsufi.com 9.9 Euro dedicated server graphic tutorial

kimsufi is an OVH alias. The dedicated servers pr...

KamHost: $49/month/L5520/24GB memory/960GB SSD hard drive/10TB traffic/New York

KamHost, an American hosting provider, was establ...

bitaccel: $5/month/2GB RAM/95GB HDD/2TB bandwidth/OpenVZ/Dallas

bitaccel, an American hosting company, was founde...