Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* These functions are needed for product activation
* The functions below are the same throughout all addons
* @since 0.1
*/
if ( ! function_exists( 'generate_verify_email' ) ) :
add_action('generate_license_key_items','generate_verify_email', 0);
function generate_verify_email()
<?php
/**
* The template for displaying Comments.
*
* The area of the page that contains both current comments
* and the comment form. The actual display of comments is
* handled by a callback to generate_comment() which is
* located in the inc/template-tags.php file.
*
* @package Generate
/* MENU ITEMS */
.main-navigation {
background-color: #222222;
}
.main-navigation .navigation-search input[type="search"],
.main-navigation .navigation-search input[type="search"]:active {
color: #FFFFFF;
background-color: #1e72bd;
}
<?php
// Only keep the remove_action that applies to your navigation position set in the Customizer
// Delete the other remove_action calls that don't apply
add_action('after_setup_theme','generate_custom_remove_nav');
function generate_custom_remove_nav() {
// Above header
remove_action( 'generate_before_header', 'generate_walker_navigation_position', 5 );
// Float right
/**
* Fix page template issue causing metaboxes not to save
*/
add_action('admin_init','generate_update_page_template_issue');
function generate_update_page_template_issue()
{
global $post;
$args = array(
'post_status' => 'publish',
@generatepress
generatepress / gist:40edc2e0b2b588229856
Created September 29, 2014 20:14
Move the floating navigation below the header content
add_action('after_setup_theme','generate_float_navigation_below');
function generate_float_navigation_below()
{
remove_action( 'generate_before_header_content', 'generate_add_navigation_float_right', 5 );
add_action( 'generate_after_header_content', 'generate_add_navigation_float_right', 5 );
}
add_filter( 'the_content', 'generate_move_page_links' );
function generate_move_page_links( $content ) {
$page_links = wp_link_pages( array(
'before' => '<div class="custom-page-links page-links">' . __( 'Pages:', 'generate' ),
'after' => '</div>',
'echo' => 0,
'link_before' => '<span>',
'link_after' => '</span>',
<?php if ( function_exists('yoast_breadcrumb') ) { ?>
<div class="grid-container grid-parent">
<div class="page-header">
<?php yoast_breadcrumb('<p id="breadcrumbs">','</p>'); ?>
</div>
</div>
<?php } ?>
add_action('generate_paging_navigation','generate_pagenavi_integration');
function generate_pagenavi_integration()
{
wp_pagenavi();
}
<?php if ( function_exists( 'bp_is_active' ) ) : ?>
<?php if ( bp_is_active( 'activity' ) ) { ?>
<div class="page-header-content generate-page-header generate-content-header">
<div class="inside-page-header-container inside-content-header grid-container grid-parent">
This is where you put what you want to show up in here (and delete this text).
For example, an image: