Now we comes to the last php changes in my template: function.php! It contains several functions to adjust the way my template should behave.
1 2 |
add_theme_support( 'post-thumbnails' ); add_image_size( 'portfolio-thumb', 270, 189, true ); // 270 width, 189 height |
1 |
add_filter('wp_list_pages', create_function('$t', 'return str_replace("<a ", "<a class=\"external\" ", $t);')); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
function trma_scripts() { wp_enqueue_style( 'Bootstrap', get_template_directory_uri() . '/include/css/bootstrap.min.css' ); wp_enqueue_style( 'Main Style', get_template_directory_uri() . '/include/css/main.css' ); wp_enqueue_style( 'Fancybox', get_template_directory_uri() . '/include/css/fancybox/jquery.fancybox.css' ); wp_enqueue_style( 'Font Icons', get_template_directory_uri() . '/include/css/fonts.css' ); wp_enqueue_style( 'Shortcodes', get_template_directory_uri() . '/include/css/shortcodes.css' ); wp_enqueue_style( 'Bootstrao Responsive', get_template_directory_uri() . '/include/css/bootstrap-responsive.min.css' ); wp_enqueue_style( 'Responsive', get_template_directory_uri() . '/include/css/responsive.css' ); wp_enqueue_style( 'Own Style', get_stylesheet_uri() ); wp_enqueue_script( 'Modernizr', get_template_directory_uri() . '/include/js/modernizr.js', array(), '2.5.3', false ); wp_enqueue_script( 'Bootstrap', get_template_directory_uri() . '/include/js/bootstrap.min.js', array(), '2.0.0', true ); wp_enqueue_script( 'WayPoints', get_template_directory_uri() . '/include/js/waypoints.js', array('jquery'), '2.0.2', true ); wp_enqueue_script( 'Waypoints for Header', get_template_directory_uri() . '/include/js/waypoints-sticky.js', array('WayPoints'), '2.0.2', true ); wp_enqueue_script( 'Isotope Filter', get_template_directory_uri() . '/include/js/jquery.isotope.js', array('jquery'), '1.5.25', true ); wp_enqueue_script( 'Fancybox', get_template_directory_uri() . '/include/js/jquery.fancybox.pack.js', array(), '2.1.4', true ); wp_enqueue_script( 'Fancybox for Media', get_template_directory_uri() . '/include/js/jquery.fancybox-media.js', array('Fancybox'), '1.0.5', true ); wp_enqueue_script( 'Plugins', get_template_directory_uri() . '/include/js/plugins.js', array('jquery'), '', true ); wp_enqueue_script( 'Default JS', get_template_directory_uri() . '/include/js/main.js', array('WayPoints','Isotope Filter','Fancybox'), '', true ); } add_action( 'wp_enqueue_scripts', 'trma_scripts' ); |