Skip to content

Instantly share code, notes, and snippets.

View RichardRottman's full-sized avatar

Richard Rottman RichardRottman

  • Hagerstown, Maryland
  • 21:23 (UTC -04:00)
View GitHub Profile
@RichardRottman
RichardRottman / functions.php
Last active January 18, 2025 17:02
OceanWP - Add Yoast Breadcrumbs Above Single Post Title
<?php
/**
* WordPress Theme: OceanWP
*
* Add this code snipit to functions.php to place the Yoast breadcrumbs above the post title on
* single posts.
*
*/
function yoast_breadcrumb_above_title() {
@RichardRottman
RichardRottman / content-single.php
Last active June 7, 2018 09:21
Where to insert Yoast SEO breadcrumb in Twenty Sixteen part 2
<?php
/**
* The template part for displaying single posts
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
@RichardRottman
RichardRottman / stylesheet-remove-last-breadcrumb.css
Created October 24, 2017 12:52
Remove the post's title from the Yoast SEO breadcrumb
.breadcrumb_last {
display: none;
}
@RichardRottman
RichardRottman / single.php
Last active October 24, 2017 11:50
Where to insert Yoast SEO breadcrumb into Twenty Sixteen
<?php
/**
* The template for displaying all single posts and attachments
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
get_header(); ?>
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize the author box title
add_filter('genesis_author_box_title', 'custom_author_box_title');
function custom_author_box_title()
{
return '<strong>About Rick Rottman</strong>';
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//Change search form text
function themeprefix_search_button_text($text)
{
return ('Search Bent Corner...');
}
add_filter('genesis_search_text', 'themeprefix_search_button_text');
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
// breadcrumbs
add_filter('genesis_breadcrumb_args', 'remove_breadcrumbs_yourarehere_text');
function remove_breadcrumbs_yourarehere_text($args)
{
$args['labels']['prefix'] = '';
return $args;
}
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
// Automatically adds the featured image to the top of every post entry, below the title and the post meta data.
add_action('genesis_entry_header', 'single_post_featured_image', 15);
function single_post_featured_image()
{
if (!is_singular('post'))
return;