Pigeon rank for WordPress

This blog is one of many I have created. They all have failed. But not for lack of trying. Let me tell you what happened and how I intend to fix this.

What happened

The first blog I started for my projects started out reasonably well. I abandoned it because I started other projects and forgot to maintain the current one and the blog. And then when I came back to it, it wasn’t the same anymore. Like trying to continue a monopoly game the next day. Don’t know why that is, though.

Later on, I started blogging on multiple subjects at the same time on a single blog, as it turned out, neither google nor the public liked this lack of consistency on my blog. For me personally, it was the easiest way to keep committed to the blog.

Next attempt; multiple blogs on all the different niches I work on. This caused two problems.

The first difficulty was classifying the post I was going to make. My projects seemed to be heavenly overlapping, so I would need to create the same post on different niche blogs.

The second issue was thin content. I would take a lot of time for any of these niche sites to get to an acceptable content size.

I considered blogging per project, but couldn’t convince myself that would be worth an attempt. My main concert would be the limited growth of the blog because at some point, my project would be finished.

How I intend to fix this

I am returning to the dump-it-all-on-a-single-blog strategy, so I am at least sure I can create enough content.

Then I will need a way to cut all the content into relevant segments or groups, both for Google and for the user.

The usual way content is grouped on a WordPress blog is in four ways:

  • Latest posts page
  • Categories
  • Tags
  • Next/previous post buttons

To break this grouping, I need to address these. The latest posts page can be disabled. Categories can be removed, except for the last one. And tags can be removed completely.

The next/previous button will be replaced by one or more post suggestions, relevant ones. This will make life much easier for me.

Plugin

Figuring out which posts are relevant to each other is not an easy task and will require a lot of code. This is why I am building a plugin for it.

I am aware of the fact that some plugins have similar features, but not in the way I want to implement it. I want to make it behave like the ranking part of Google way back in time. Which was called pigeon rank, and for a good reason.

First code

To start this project, I created a new WordPress plugin from scratch. After adding it to the plugin folder and activating it, it shows the basic information I want to use at the end of a post.

This block of information will eventually be processed and at the end of the post there will be one or more suggested and relevant links to post.

<?php
/**
* Plugin Name: pigeon-rank
* Plugin URI: https://www.krakkus.site/pigeon-rank
* Description: None
* Version: 0.1
* Author: krakkus
* Author URI: https://www.krakkus.site/krakkus
**/

require('pigeon-rank-functions.php');

add_action('init', 'init');
add_filter('the_content', 'pigeonRank');


function init() {
	if (empty($_COOKIE["uuid"])) {
		$uuid = uniqid();  // or use a real UUID
		setcookie("uuid", $uuid, time()+3600*24*30, "/");
		$_COOKIE["uuid"] = $uuid;	// Don't know if this is legal
	}
}


function pigeonRank($content) {
    // Get data for current page
	$uuid = $_COOKIE["uuid"];
	$current_url = home_url($_SERVER['REQUEST_URI']);

	// Display our data
    $content .= '<h4>Pigeon rank</h4><p>';
	$content .= 'uuid: ' . $uuid;
	$content .= '<br>url: ' . $current_url;
	$content .= '<br>time: '. time() . '</p>';
	
	return $content;
	
}

?>
Empty plugin showing the data I want to use at end of post

— to be continued in a different post, somewhere in the future

Leave a Reply

Your email address will not be published. Required fields are marked *