Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Remove redundant Genesis meta boxes.
*
* @param string $pagehook Page hook for the Theme Settings page.
*
* @since 1.1.0
*/
add_action( 'genesis_theme_settings_metaboxes', function ( $pagehook ) {
@tasia53
tasia53 / footermenu.php
Created October 21, 2019 19:04 — forked from neilgee/footermenu.php
Add Footer or Tertiary Menu to Genesis Child Theme
<?php
//do not add in opening php tag
/**
* Add in Footer or Tertiary Menu
*
* @package Genesis Tertiary Menu
* @author Neil Gee
* @link http://wpbeaches.com/add-footer-menu-genesis-child-theme/
* @copyright (c)2014, Neil Gee
/* TargetIMC Cambiar el fondo */
body.login {
background-image: url('login-bg.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center;
}
@tasia53
tasia53 / single.php
Created October 21, 2019 19:03 — forked from kontikidigital/single.php
Snippets to customize Single Posts or Pages in Genesis
<?php
// Snippets to customize Single Posts in Genesis
// Hook this snippets in functions.php or in a template, You can use conditionals too.
// Hook Featured Image to Entry Header
add_action( 'genesis_entry_header', 'featured_post_image', 5 );
function featured_post_image() {
if ( !is_singular( array( 'post', 'page' ) )) return;
the_post_thumbnail('post-image');
}
@tasia53
tasia53 / functions.php
Created October 21, 2019 19:02 — forked from kontikidigital/functions.php
Create a Footer or tertiary Menu
<?php
//do not add in opening php tag
/**
* Add in Footer or Tertiary Menu
*
* @package Genesis Teriary Menu
* @author Neil Gee
* @link http://coolestguidesontheplanet.com/add-footer-menu-genesis-child-theme/
* @copyright (c)2014, Neil Gee
@tasia53
tasia53 / LandingPages-custom-post-type-addto-functions.php
Created September 29, 2019 01:51 — forked from dlucero23/LandingPages-custom-post-type-addto-functions.php
This useful little snippet can be added to a child theme to add a new custom post type called 'Landing Pages' which help to separate any landing pages from regular website page post_types.
// == LANDING PAGES
if ( ! function_exists('custom_post_type') ) {
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Landing Pages', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Landing Page', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Landing Pages', 'text_domain' ),
@tasia53
tasia53 / gist:16abf114e2210f7b9ba02fdd07c04ce0
Created September 29, 2019 01:50 — forked from malinky/gist:4899384e1de5e4ab3338
Wordpress Custom Post Type Landing Pages
/**
* Wordpress Custom Post Type Landing Pages
* In all examples $rewrite and $args are simplified to the discussed settings.
*/
/**
* 1. Custom Post Type has archives and the slug is rewritten.
* In this case a visit to /post-type-name will use archive-$posttype.php, $archive.php, index.php.
* Pagination will work by default assuming $rewrite[ 'pages' ] is also true (default).
* It's not possible to create a landing page called /post-type-name as the archive page controls the template hierarchy.
@tasia53
tasia53 / functions.php
Created September 29, 2019 01:50 — forked from markrowles/functions.php
Wordpress Landing Page Custom Post Type
// Register Custom Post Type
function custom_post_type() {
$labels = array(
'name' => _x( 'Landing Pages', 'Post Type General Name', 'text_domain' ),
'singular_name' => _x( 'Landing Page', 'Post Type Singular Name', 'text_domain' ),
'menu_name' => __( 'Landing Pages', 'text_domain' ),
'name_admin_bar' => __( 'Landing Page', 'text_domain' ),
'archives' => __( 'Landing Page Archives', 'text_domain' ),
'parent_item_colon' => __( 'Parent Landing Page:', 'text_domain' ),
@tasia53
tasia53 / functions-fb.php
Created September 16, 2019 06:55 — forked from DavidPeralvarez/functions-fb.php
Imagen destacada de WordPress como Facebook Thumbnail
/**
* Facebook Thumb Fixer
*/
add_action('wp_head','fbfixthumbnail');
function fbfixthumbnail(){
global $post;
//If there is a post image
if (has_post_thumbnail()) {
@tasia53
tasia53 / customizer.php
Created September 15, 2019 04:18 — forked from purzlbaum/customizer.php
Google Font select for WordPress Customizer
<?php
new theme_customizer();
class theme_customizer {
public function __construct() {
add_action( 'customize_register', array(&$this, 'customize_linje' ));
}
/**
* Customizer manager demo