SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | //csv tags for meta keywords by admindaily.com | |
3 | function tags4meta() { | |
4 | $posttags = get_the_tags(); | |
5 | foreach((array)$posttags as $tag) { | |
6 | $tags4meta .= $tag->name . ','; | |
7 | } | |
8 | if (!is_single()) { ?>FCPX,Template,apple,Motion,Motion Templates,Free Motion Templates,Motion 5 Templates,FCPX Templates,Final Cut Motion Templates, Apple Motion 4 Templates, Apple Motion 3 Templates, FREE Motion Templates, FREE Motion 4 Templates, FREE Motion 5 Templates<?php } | |
9 | echo "$tags4meta"; | |
10 | ||
11 | } | |
12 | ||
13 | // Add a second menu | |
14 | register_nav_menus( array( | |
15 | 'secondary' => __( 'Top Menu (Above the Header)', 'yourtheme'), | |
16 | 'primary' => __( 'Primary Menu', 'yourtheme' ), | |
17 | - | ) ); |
17 | + | )); |
18 | - | error_reporting(0); // Turn off all error reporting |
18 | + | |
19 | error_reporting(0); // Turn off all error reporting | |
20 | - | if ($query->is_search) { |
20 | + | |
21 | - | $query->set('post_type', 'post'); |
21 | + | |
22 | if ($query->is_search) { | |
23 | - | return $query; |
23 | + | $query->set('post_type', 'post'); |
24 | } | |
25 | return $query; | |
26 | } | |
27 | ||
28 | add_filter('pre_get_posts','mySearchFilter'); | |
29 | ||
30 | register_nav_menu( 'logged-in-menu', __( 'logged-in-menu') ); | |
31 | register_nav_menu( 'logged-out-menu', __( 'logged-out-menu') ); | |
32 | ||
33 | - | wp_deregister_script( 'jquery' ); |
33 | + | |
34 | - | wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js'); |
34 | + | |
35 | - | wp_enqueue_script( 'jquery' ); |
35 | + | |
36 | } | |
37 | ||
38 | /* Commented out | |
39 | global $is_iphone; | |
40 | if ( $is_iphone ) { | |
41 | add_filter('shadowbox-js', '__return_false'); | |
42 | } | |
43 | */ | |
44 | ||
45 | /* | |
46 | START Custom JS | |
47 | - | wp_enqueue_script('mmt_custom_js', get_bloginfo('template_url').'/js/custom.js', false, '1.0', true); |
47 | + | |
48 | function mmt_custom_js() { | |
49 | wp_deregister_script('jquery'); | |
50 | wp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js'); | |
51 | wp_enqueue_script('jquery'); | |
52 | wp_enqueue_script('mmt_custom_js', get_bloginfo('template_url').'/js/custom.js', false, '1.0'); | |
53 | } | |
54 | add_action('wp_enqueue_scripts', 'mmt_custom_js'); | |
55 | // Remove default fancybox function | |
56 | remove_action('wp_head', 'fancybox'); | |
57 | /* | |
58 | END Custom JS | |
59 | */ | |
60 | ?> |