Skip to content

Instantly share code, notes, and snippets.

@jchansen
Created June 3, 2016 02:45
Show Gist options
  • Save jchansen/a6d998e88f216e296773990771db712b to your computer and use it in GitHub Desktop.
Save jchansen/a6d998e88f216e296773990771db712b to your computer and use it in GitHub Desktop.
Changes made to functions.php to get PopupMaker to work
<?php
define('PARENT_THEME_NAME', 'Moves The Needle Theme');
define('PARENT_THEME_URL', '');
define('PARENT_THEME_VERSION', '1.0');
function addHeaderAssets() {
// CSS
wp_enqueue_style('google-fonts', '//fonts.googleapis.com/css?family=Roboto:400,500,700,400italic,500italic,700italic', array(), PARENT_THEME_VERSION);
wp_enqueue_style('google-fonts2', '//fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,600italic,700,700italic,900,900italic', array(), PARENT_THEME_VERSION);
wp_enqueue_style('all-css', get_template_directory_uri() . '/assets/css/all.css', array(), PARENT_THEME_VERSION);
}
add_action( 'wp_enqueue_scripts', 'addHeaderAssets' );
function addFooterAssets() {
// JS
wp_enqueue_script('all-js', get_template_directory_uri() . '/assets/js/all.js', array('jquery'), PARENT_THEME_VERSION, false);
}
add_action('wp_footer', 'addFooterAssets');
// Config
add_theme_support( 'title-tag' );
// Images
add_theme_support('post-thumbnails');
set_post_thumbnail_size(672, 372, true);
add_image_size('start-founder', 295, 376, true);
add_image_size('resources-list', 420, 212, true);
// Menu
register_nav_menus( array(
'primary' => __('Header Menu', 'needle'),
'secondary' => __('Footer Menu', 'needle'),
) );
// Custom comments
require_once('functions-comments.php');
// Custom walkers
require_once('functions-walkers.php');
// Custom post types
require_once('functions-posttypes.php');
// Remove admin menu items
require_once('functions-removeadminmenu.php');
// Remove admin menu items
require_once('functions-addadminmenu.php');
// Change admin menu sort
require_once('functions-changeadminmenusort.php');
// Ajax
require_once('functions-ajax.php');
// Post 2 post
require_once('functions-post2post.php');
// Minify
require_once('functions-minify.php');
// Widget areas
require_once('functions-widgetareas.php');
add_action('pre_get_posts', 'add_my_post_types_to_query');
function add_my_post_types_to_query($query) {
if (is_home() && $query->is_main_query())
$query->set('post_type', array('post', 'founders'));
return $query;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment