Skip to content

Instantly share code, notes, and snippets.

View kristarella's full-sized avatar

Kristen Symonds kristarella

View GitHub Profile
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Change Open Graph image URLs in Yoast SEO for categories + Taxonomy Images plugin */
add_filter( 'wpseo_opengraph_image', 'change_opengraph_image_url' );
function change_opengraph_image_url( $url ) {
$image_url = apply_filters( 'taxonomy-images-queried-term-image-url', '' );
if (is_category() && $image_url) {
return $image_url;
<?php
add_filter( 'the_content', 'add_thing_to_search_page' );
function add_thing_to_search_page( $content ) {
// Check if it's the search page
if ( is_search() ) {
$mycode = 'Put your HTML here';
return $mycode . $content;
@kristarella
kristarella / resume-template.html
Created March 12, 2019 07:29
Resume template for WordPress Block Editor (Gutenberg)
<!-- wp:columns {"className":"clear three-one"} -->
<div class="wp-block-columns has-2-columns clear three-one"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:heading {"align":"center"} -->
<h2 style="text-align:center" id="mce_5">Professional Experience</h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p>Text here...</p>
<!-- /wp:paragraph -->
function sequential_child_widgets_init() {
register_sidebar( array(
'name' => esc_html__( 'Sidebar', 'sequential' ),
'id' => 'sidebar-1',
'description' => '',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h1>',
) );
@kristarella
kristarella / exif-remove-location.php
Last active April 3, 2018 07:17
This plugin is for use with the Exifography plugin. It removes location data from posts published between the start and end dates; it saves you having to update the metadata for the posts in the database. You can delete lines 14, 15, 16, 18 and 20 if you want to remove location from all posts.
<?php
/*
Plugin Name: Exif remove location
Description: Hide the location from Exifography for certain dates
Version: 20180403
Author: kristarella
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
@kristarella
kristarella / exif-remove-location.php
Created April 3, 2018 03:55
This plugin removes location data from posts published between the start and end dates.You can delete lines 14, 15, 16, 18 and 20 if you want to remove location from all posts.
<?php
/*
Plugin Name: Exif remove location
Description: Hide the location from Exifography for certain dates
Version: 20180403
Author: kristarella
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
@kristarella
kristarella / index.php
Last active January 24, 2018 01:47 — forked from anonymous/index.php
<?php get_header(); ?>
<!-- BEGIN PAGE -->
<div id="page">
<?php if (of_get_option('promax_latest' ) =='1' ) {get_template_part('/includes/ltposts');} ?>
<div id="page-inner" class="clearfix">
<div id="content">
<div class="posthd"><?php promax_tiltechange(); ?></div>
<div class="three-columns group">
<?php if(have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<?php
/*
Plugin Name: Force HTTP sharing URL
Description: Make og:url HTTP in Yoast and Jetpack meta data
Version: 20181127
Author: kristarella
License: GPL2
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
@kristarella
kristarella / dabblet.css
Last active September 11, 2017 16:39
CSS Basics Example
/**
* CSS Basics Example
*/
#primary {
width: 70%;
margin: 50px auto;
padding: 20px;
background: #eee;
border: solid #ddd;
<?php
function plugins( $search ) {
$num = 10;
$order = 'ASC';
$orderby = 'name';
$fields = 'URL,title';
$url = 'https://api.wordpress.org/plugins/info/1.1/?action=query_plugins&request[search]='.urlencode( $search );