Skip to content

Instantly share code, notes, and snippets.

View shesgottadevelopit's full-sized avatar

shesgottadevelopit shesgottadevelopit

View GitHub Profile
shesgottadevelopit /
Created March 6, 2020 04:43 — forked from patric-boehner/
Single Post Navigation (Pagination)

#Customize and display links to previous and next post, from a single post

This snippet is for displaying and customizing the links to previous and next posts, for single post entries within the Genesis Framework.

Normally the links to the previous and next post are displayed in the entry footer as the title of the next and previous posts. I wanted to customize the function to swap the link order so that the newest article was accessible from the link on the left and the previous article was accessible form the link on the right, to better navigate posts in an ascending order. I also wanted to add the text "Previous Post" and "next Post" above the linked post titles for better clarification. See the comment in the code for more detail.

For additional customizable permeates, see the codex links under References.

shesgottadevelopit / validate_gravatar.php
Created July 14, 2016 20:39 — forked from justinph/validate_gravatar.php
In wordpress, a better way to check if an author has a gravatar or not. Sometimes you might want to check to see if a gravatar exists and not display any image if there isn't one. Uses the wordpress HTTP and caching apis. A better version of this:
* Utility function to check if a gravatar exists for a given email or id
* @param int|string|object $id_or_email A user ID, email address, or comment object
* @return bool if the gravatar exists or not
function validate_gravatar($id_or_email) {
//id or email code borrowed from wp-includes/pluggable.php
$email = '';