Skip to content

Instantly share code, notes, and snippets.

@mikeschinkel
Last active January 9, 2019 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikeschinkel/86bc8c8824ae70ca0be9f98e74bd2ad8 to your computer and use it in GitHub Desktop.
Save mikeschinkel/86bc8c8824ae70ca0be9f98e74bd2ad8 to your computer and use it in GitHub Desktop.
PHP module for use in WordPress to display Bibblio v3.9 related posts element.

The code in feature-bibblio-related-posts.php does not work and I think there is a bug in Bibblio's JS file.

prepareModuleOptions() calls getCustomUniqueIdentifierFromUrl() but does not pass it the options argument.

Note: feature-bibblio-related-posts.php is using a very thin framework called RPLib that I wrote. It auto-loads "modules" where different type modules have different traits available.

<?php
// A WordPress template example
?>
<h1>This is how you might call this Bibblio module:</h1>
<?php
\AGBlog\Biblio_Related_Posts::the_related_posts(
Bibblio::LAYOUT => Bibblio::COLUMN3_LAYOUT,
Bibblio::FONT => Bibblio::TAHOMA_FONT,
Bibblio::SEPARATE_TEXT => true,
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment