Skip to content

Instantly share code, notes, and snippets.

@tylerreed
tylerreed / wp_video_thumbnails.php
Last active March 11, 2022 02:19
A snippet of code to create static featured images for a WordPress post using a YouTube or Vimeo video URL. I have used this code for several projects where video posts or embedded videos needed to be static images in order to be more mobile friendly as well as for improve page load times when used as a featured image for the post.
<?php
/*
A snippet of code to create static featured images for a WordPress post using
a YouTube or Vimeo video URL. I have used this code for several projects where
video posts or embedded videos needed to be static images in order to be more
mobile friendly as well as for improved page load times when used as a featured
image for the post.
I have added comments where it might be neccessary to modify the code or where
there is room for improvement. There are two primary functions to be used
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 27, 2025 08:16
A badass list of frontend development resources I collected over time.
<?php
/*
* WordPress Breadcrumbs
* author: Dimox
* version: 2019.03.03
* license: MIT
*/
function dimox_breadcrumbs() {
/* === OPTIONS === */
@sniperwolf
sniperwolf / ajax.php
Last active December 29, 2022 12:25
Super-Simple WordPress ajax post-popup with jQuery and Reveal plugin
<?php
/**
* Template Name: ajax
*/
?>
<?php
$post = get_post($_GET['id']);
?>
<?php if ($post) : ?>
<?php setup_postdata($post); ?>
@tinotriste
tinotriste / breadcrumbs-functions.php
Last active March 25, 2025 12:59
Wordpress: Breadcrumbs function
<?php
/*=============================================
= BREADCRUMBS =
=============================================*/
// to include in functions.php
function the_breadcrumb() {
$sep = ' > ';
@sosukeinu
sosukeinu / wp_auto_thumbnail_functions.php
Created January 29, 2013 16:07
WP function auto featured image
<?php
/*
* This function will get the first image in this order:
*
* 1) Featured image
* 2) First image attached to post
* 3) First image URL in the content of the post
* 4) YouTube screenshot
* 5) Default images for different categories [SET MANUALLY]