Skip to content

Instantly share code, notes, and snippets.

@Elgameel
Elgameel / responsive-table.js
Last active April 6, 2019 15:45 — forked from jpen365/responsive-table.js
Get table headings to use with responsive table layout and exclude wp-block-table is-style-stripes
/* Credits:
This bit of code: Exis | exisweb.net/responsive-tables-in-wordpress
Original idea: Dudley Storey | codepen.io/dudleystorey/pen/Geprd */
var headertext = [];
var headers = document.querySelectorAll("table:not(.is-style-stripes) thead");
var tablebody = document.querySelectorAll("table:not(.is-style-stripes) tbody");
for (var i = 0; i < headers.length; i++) {
headertext[i]=[];
@Elgameel
Elgameel / functions.php
Last active December 15, 2017 13:04 — forked from reasonstousegenesis/functions.php
Edit the author box title with Genesis (Removes 'About').
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Edit the author box title with Genesis
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/author-box-title/
*/
add_filter( 'genesis_author_box_title', 'rtug_author_box_title' );
[post_date format="" before="" after="" label=""]
[post_time format="" before="" after="" label=""]
[post_author before="" after=""]
[post_author_posts_link before="" after=""]
[post_author_link nofollow="" before="" after=""]
[post_terms sep="" before="" after="" taxonomy=""]
[post_tags sep="" before="" after=""]
[post_categories sep="" before="" after=""]
[post_edit link="" before="" after=""]
[post_comments zero="" one="" more="" hide_if_off="" before="" after=""]
@Elgameel
Elgameel / functions.php
Created December 2, 2016 05:32
Add the following code to the end of your Genesis child theme's functions.php file. Read full guide here: https://wp-me.com/display-featured-image-genesis-child-themes/
/* Display featured image before single post title */
add_action( 'genesis_before_entry', 'featured_post_image', 8 );
function featured_post_image() {
if ( ! is_singular( 'post' ) ) return;
the_post_thumbnail('post-image');
}
@Elgameel
Elgameel / functions.php
Created December 2, 2016 05:31
Add the following code to the end of your Genesis child theme's functions.php file.
/* Display featured image before single post title */
add_action( 'genesis_before_entry', 'featured_post_image', 8 );
function featured_post_image() {
if ( ! is_singular( 'post' ) ) return;
the_post_thumbnail('post-image');
}
@Elgameel
Elgameel / functions.php
Last active April 29, 2022 06:17
Add the following code to your Genesis Child theme functions.php file. Read the full guide here: https://wp-me.com/last-updated-date-post-meta-data-genesis/
<?php // Ignore this line
/*
* Replace Post publish date with Post update date in Genesis
* More info: https://wp-me.com/last-updated-date-post-meta-data-genesis/
*/
add_filter( 'genesis_post_info', 'wpme_post_info_filter' );
function wpme_post_info_filter($post_info) {
if ( !is_page() ) {
$post_info = '[post_modified_date] ' . __( 'by', 'genesis' ) . ' [post_author_posts_link] [post_comments] [post_edit]';