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 | |
$image = get_field('image'); | |
if( !empty($image) ): | |
// vars | |
$url = $image['url']; | |
$title = $image['title']; | |
$alt = $image['alt']; |
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 | |
// SHOW YOAST PRIMARY CATEGORY, OR FIRST CATEGORY | |
$category = get_the_category(); | |
$useCatLink = true; | |
// If post has a category assigned. | |
if ($category){ | |
$category_display = ''; | |
$category_link = ''; | |
if ( class_exists('WPSEO_Primary_Term') ) |
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
/*! | |
* Grunt | |
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev | |
*/ | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// Sass |
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 css login | |
function wpc_custom_login(){ | |
wp_enqueue_style('wpc-custom-login-css', plugins_url('css/wpc-login.css', __FILE__)); | |
} | |
add_action('login_head', 'wpc_custom_login'); | |
//Custom Logo URL | |
function c(){ | |
return esc_url(home_url('/')); | |
} |
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
//load custom admin css | |
function wpc_load_custom_admin_css(){ | |
wp_enqueue_style('wpc_admin_css', plugin_url('css/wpc-admin.css', __FILE__)); | |
} | |
add_action('admin_enqueue_scripts', 'wpc_load_custom_admin_css'); |
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
// Favicon in wordpress admin | |
function wpc_admin_favicon(){ | |
echo '<link rel="Shortcut Icon" type="image/x-icon" href="'.get_stylesheet_directory_uri().'/img/favicon.ico" />'; | |
} | |
add_action('admin_head', 'wpc_admin_favicon'); |
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
//Enable full TinyMCE by default | |
function my_mce_options( $init ) { | |
$init['wordpress_adv_hidden'] = false; | |
return $init; | |
} | |
add_filter('tiny_mce_before_init', 'my_mce_options'); | |
//Add buttons in TinyMCE, list http://www.tinymce.com/wiki.php/TinyMCE3x:Buttons/controls | |
function wpc_add_more_buttons($buttons){ | |
$buttons[] = 'charmap'; |
NewerOlder