Skip to content

Instantly share code, notes, and snippets.

View jeseph's full-sized avatar

Jeseph Meyers jeseph

View GitHub Profile
@jeseph
jeseph / functions-cta.php
Last active December 10, 2023 20:46
Add a custom CTA to the end of every post.
/**
* Add a custom CTA to the end of every post.
*/
function add_post_cta() {
if (is_singular('post')) {
// Your CTA content goes here
$cta_content = '<p>Sign Up for Our Newsletter!</p><a href="[link to your newsletter signup form]">Click Here to Subscribe</a>';
// Add your CTA content after the post content
the_content( $cta_content );

Keybase proof

I hereby claim:

  • I am jeseph on github.
  • I am jeseph (https://keybase.io/jeseph) on keybase.
  • I have a public key ASCQcX_Sc7VbGaqxBk7sJxWYCqOZMJbrM8-tK1KO021HIwo

To claim this, I am signing this object:

@jeseph
jeseph / front-page.php
Last active May 1, 2019 19:09
Multiple Authors Snippet for PublishPress Support
<?php
// Set variables conditionally
if ( function_exists( 'get_the_multiple_author_meta' ) ) {
$author_list = get_the_multiple_author_meta( 'ID' );
$count = count( $author_list );
foreach ( $author_list as $author ) {
// $author_url = NOT SURE WHAT TO QUERY HERE
$first_name = get_the_multiple_author_meta( 'first_name', $author );
@jeseph
jeseph / no-index-snippet.php
Last active October 31, 2018 14:11
No-Index Subpages of WordPress archives.
<?php // paste the following in your functions.php file, ignore this line.
// Output the noindex directive within the <head> tags.
add_action( 'wp_head', 'noindex_archive_subpages' );
/**
* Set archive sub pages to noindex.
*
* @return void
*/
add_action( 'manage_product_posts_custom_column', function($column,$post_id){
global $post;
$event_id = get_post_meta($post->ID, '_tribe_wooticket_for_event', true);
$title = get_the_title( $event_id );
$terms = wp_get_post_terms( $post->ID, 'product_cat' );
foreach ( $terms as $term ) $categories[] = $term->slug;
@jeseph
jeseph / functions.php
Created May 26, 2015 18:22
WordPress - Enqueue Typekit Script
//* Enqueue Typekit and load script (replace your unique kit)
function theme_typekit() {
wp_enqueue_script( 'theme_typekit', '//use.typekit.net/fyg6ubk.js');
}
add_action( 'wp_enqueue_scripts', 'theme_typekit' );
function theme_typekit_inline() {
if ( wp_script_is( 'theme_typekit', 'done' ) ) { ?>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<?php } }