Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * MyFirstTheme's functions and definitions
- *
- * @package MyFirstTheme
- * @since MyFirstTheme 1.0
- */
- /**
- * First, let's set the maximum content width based on the theme's design and stylesheet.
- * This will limit the width of all uploaded images and embeds.
- */
- if ( ! isset( $content_width ) )
- $content_width = 800; /* pixels */
- if ( ! function_exists( 'activebox_setup' ) ) :
- /**
- * Sets up theme defaults and registers support for various WordPress features.
- *
- * Note that this function is hooked into the after_setup_theme hook, which runs
- * before the init hook. The init hook is too late for some features, such as indicating
- * support post thumbnails.
- */
- function activebox_setup() {
- /**
- * Make theme available for translation.
- * Translations can be placed in the /languages/ directory.
- */
- load_theme_textdomain( 'activebox', get_template_directory() . '/languages' );
- /**
- * Add default posts and comments RSS feed links to <head>.
- */
- add_theme_support( 'automatic-feed-links' );
- /**
- * Enable support for post thumbnails and featured images.
- */
- add_theme_support( 'post-thumbnails' );
- /**
- * Add support for two custom navigation menus.
- */
- register_nav_menus( array(
- 'header-menu' => __( 'Header Menu', 'activebox' ),
- 'blog-menu' => __( 'Blog-menu', 'activebox' )
- ) );
- /**
- * Enable support for the following post formats:
- * aside, gallery, quote, image, and video
- */
- add_theme_support( 'post-formats', array ( 'aside', 'gallery', 'quote', 'image', 'video' ) );
- }
- endif; // activebox_setup
- add_action( 'after_setup_theme', 'activebox_setup' );
- function add_scripts_and_styles() {
- if ( ! is_admin() ) {
- // For styles
- wp_enqueue_style( 'foundation', get_template_directory_uri() . '/foundation.css', null, null );
- wp_enqueue_style( 'style', get_template_directory_uri() . '/style.css', null, null );
- // For scripts (js)
- // wp_enqueue_script( 'global', get_template_directory_uri() . '/js/global.js', null, null, true );
- }
- }
- add_action( 'wp_enqueue_scripts', 'add_scripts_and_styles' );
Add Comment
Please, Sign In to add comment