WordPress integration v1.0.2
The most recent version of the Graphite WordPress Plugin is v1.0.3
The documentation contained here is for a previous version
See latest version
Version 1.0.2 is still supported for clients on this version. New installations will use our most recent version
Unsure what version you're on? Contact us so we can help!
Implementation details
Instructions for Plugin version 1.0.2 (Previous Version)
- Get latest Graphite Internal Links API WordPress plugin version from a Graphite Project Manager
- Upload the plugin in the WordPress interface:
Download the plugin
⚠️ Make sure you have someone familiar with your Wordpress instance before you make any changes.
Graphite Internal Links API Plugin for Wordpress. Last update: March 2023.
- (Optional) In your theme, implement a function called graphite_render_links_html, this is an example of that function:
function graphite_render_links_html($links) {
echo '<div class="gp-container">';
echo '<div class="title"><span>Related Posts</span></div>';
echo '<div class="grid">';
foreach ($links as $item) {
echo "<a class=\"gp-link\" href=\"{$item->url}\">";
echo "<div class=\"parent\">";
echo "<div class=\"img\" style=\"background-image:url({$item->image_url})\" alt=\"{$item->title}\"> </div>";
echo "</div>";
echo "<p class=\"label\">{$item->title}</p>";
echo "</a>";
echo "<a class=\"gp-sublink\" href=\"{$item->url}\">";
echo "<span class=\"gp-sublink-text\">Read More</span>";
echo "<span class=\"gp-sublink-text\">→</span>";
echo "</a>";
}
echo '</div>';
echo '</div>';
}
Note: This is the default rendering, in case the theme doesn’t declare one.
Need help rendering your theme files?
Graphite can provide support via a consultant if needed.
Contact us
- Modify your theme to call the Graphite Links plugin whenever the user visits a post page:
<?php
//... Your theme code
if(function_exists("gp_render_links")) {
gp_render_links();
}
GraphiteGrowth™
Updated about 2 months ago