This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* WordPress WP_Query with just sticky posts - page.php or index.php template | |
**/ | |
get_header(); // loads header.php template ?> | |
<?php $custom_query = new WP_Query('posts_per_page=1'); ?> | |
<div id="wrap-sample" class="blog-sample clearfix"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Adding WordPress Taxonomy title and description (category, tag, taxonomy) | |
/** | |
* Add Category Heading to Each Page in Pagination in Genesis | |
* @link https://gist.github.com/neilgee/6c0414cfef06e41a6606 | |
* Prints a category's title and description in Genesis | |
* @link https://gist.github.com/EngageWP/df43e156e76fa5cdd6c0 | |
*/ | |
remove_action( 'genesis_before_loop', 'genesis_do_taxonomy_title_description', 15 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Custom permalink structure only for default WordPress posts | |
// https://wordimpress.com/how-to-add-a-custom-permalink-structure-for-only-the-wordpress-default-post-type/ | |
add_action( 'init', 'my_new_default_post_type', 1 ); | |
function my_new_default_post_type() { | |
register_post_type( 'post', array( | |
'labels' => array( | |
'name_admin_bar' => _x( 'Post', 'add new on admin bar' ), | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Remove post titles from home page in Genesis Framework | |
//* http://my.studiopress.com/snippets/entry-header/ | |
//* http://www.billerickson.net/genesis-h1-front-page/ | |
//* http://wpsites.net/web-design/remove-titles-specific-conditions/ | |
add_action( 'get_header', 'remove_titles_home_page' ); | |
function remove_titles_home_page() { | |
if ( is_front_page() ) { | |
//* Remove the entry title (requires HTML5 theme support) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Disable the emoji's | |
* https://woorkup.com/disable-emojis-in-wordpress/ | |
*/ | |
function disable_emojis() { | |
remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); | |
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); | |
remove_action( 'wp_print_styles', 'print_emoji_styles' ); | |
remove_action( 'admin_print_styles', 'print_emoji_styles' ); | |
remove_filter( 'the_content_feed', 'wp_staticize_emoji' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WP Super Cache + Leverage Browser Caching WordPress .htaccess | |
# http://notlaura.com/wp-super-cache-and-browser-caching/ | |
# BEGIN WPSuperCache | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
#If you serve pages from behind a proxy you may want to change 'RewriteCond %{HTTPS} on' to something more sensible | |
AddDefaultCharset UTF-8 | |
RewriteCond %{REQUEST_URI} !^.*[^/]$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Fonts | |
--------------------------------------------- */ | |
@font-face {font-family: "Century Gothic"; | |
src: url("fonts/century-gothic.eot"); | |
src: url("fonts/century-gothic.eot?#iefix") format("embedded-opentype"), | |
url("fonts/century-gothic.woff2") format("woff2"), | |
url("fonts/century-gothic.woff") format("woff"), | |
url("fonts/century-gothic.ttf") format("truetype"), | |
url("fonts/century-gothic.svg#Century Gothic") format("svg"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `DATABASENAME`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'USER', MD5('PASSWORD'), 'YOUR NAME', '[email protected]', 'http://www.domain.com/', '2011-06-07 00:00:00', '', '0', 'YOUR NAME'); | |
INSERT INTO `DATABASENAME`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); | |
INSERT INTO `DATABASENAME`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Genesis Framework Full Width Page Template | |
* | |
* @author Fernan Díez | |
* @license GPL-2.0+ | |
* @link http://www.fernan.com.es/ | |
*/ | |
// Template Name: Full Width |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adds shortcode content in Genesis Before Content | |
add_action( 'genesis_before_content', 'genesis_slider_header_home' ); | |
function genesis_slider_header_home() { | |
if ( is_front_page() && is_home() ) { | |
echo '<br></br>'; | |
} elseif ( is_front_page()){ |