1 | <?php
|
---|
2 | # check to see if any of these SEO plugins is installed. If yes, the Bytes For All SEO options will be
|
---|
3 | # deactivated, not matter what the option "Use Bytes For All SEO options?" is set to
|
---|
4 | # (at Admin -> Design|Presentation -> [Theme Name] Theme Options)
|
---|
5 | #
|
---|
6 | if(class_exists('All_in_One_SEO_Pack') OR // if "All-In-One_SEO" Plugin (http://semperfiwebdesign.com) is installed
|
---|
7 | class_exists('wpSEO') OR // if "WpSEO" Plugin (http://www.wpseo.de/) is installed
|
---|
8 | class_exists('HeadSpace2_Admin') OR // if "HeadSpace2" Plugin (http://urbangiraffe.com/plugins/headspace2/) is installed
|
---|
9 | function_exists('seo_title_tag_options_page') OR // if "SEO Title Tag" Plugin (http://www.netconcepts.com/seo-title-tag-plugin/) is installed
|
---|
10 | class_exists('Another_WordPress_Meta_Plugin') OR // if "Another WordPress Meta Plugin" (http://wp.uberdose.com/2006/11/04/another-wordpress-meta-plugin/) is installed
|
---|
11 | class_exists('Platinum_SEO_Pack') OR // if "Platinum_SEO_Pack" Plugin (http://techblissonline.com/platinum-seo-pack/) is installed
|
---|
12 | function_exists('headmeta') OR // if "HeadMeta" Plugin (http://dougal.gunters.org/blog/2004/06/17/my-first-wordpress-plugin-headmeta) is installed
|
---|
13 | function_exists('bas_improved_meta_descriptions') OR // if "Improved Meta Description Snippets" Plugin (http://www.microkid.net/wordpress-plugins/improved-meta-description-snippets/) is installed
|
---|
14 | function_exists('head_meta_desc') OR // if "Head META Description" Plugin (http://guff.szub.net/head-meta-description/) is installed
|
---|
15 | class_exists('RobotsMeta_Admin') OR // if "Robots Meta" Plugin (http://yoast.com/wordpress/robots-meta/) is installed
|
---|
16 | function_exists('quickkeywords') OR // if "Quick META Keywords" Plugin (http://www.quickonlinetips.com/) is installed
|
---|
17 | class_exists('Add_Your_Own_Headers') OR // if "Add Your Own Headers" Plugin (http://wp.uberdose.com/2007/03/30/add-your-own-headers/) is installed
|
---|
18 | function_exists('SEO_wordpress') OR // if "SEO_Wordpress" Plugin (http://www.utheguru.com/seo_wordpress-wordpress-seo-plugin) is installed
|
---|
19 | $bfa_ata_use_bfa_seo == "No") { // if the option "Use Bytes For All SEO options?" is set to "No" (at Admin -> Design|Presentation -> [Theme Name] Theme Options)
|
---|
20 | ?>
|
---|
21 | <title><?php bloginfo('name'); ?> <?php wp_title(); ?></title>
|
---|
22 | <?php } else { ?>
|
---|
23 | <title><?php
|
---|
24 | if ( is_home() ) {
|
---|
25 | bloginfo('name');} else {
|
---|
26 | if ( is_single() OR is_page() ) {
|
---|
27 | # $bfa_ata_page_title = htmlentities(single_post_title('', false),ENT_QUOTES); }
|
---|
28 | $bfa_ata_page_title = single_post_title('', false); } // post and page titles get their own filter from WP
|
---|
29 | elseif ( is_category() ) {
|
---|
30 | $bfa_ata_page_title = htmlentities(single_cat_title('', false),ENT_QUOTES); } // cat titles don't get a filter, so htmlentities is required
|
---|
31 | elseif ( function_exists('is_tag') && is_tag() ) {
|
---|
32 | # $bfa_ata_page_title = htmlentities(single_tag_title('', false),ENT_QUOTES); }
|
---|
33 | $bfa_ata_page_title = single_tag_title('', false); } // tag titles get their own filter from WP
|
---|
34 | elseif ( is_search() ) {
|
---|
35 | $bfa_ata_page_title = htmlentities(wp_specialchars($s),ENT_QUOTES); } // no WP filter, htmlentities required
|
---|
36 | elseif ( is_day() ) {
|
---|
37 | $bfa_ata_page_title = get_the_time(__('l, F jS, Y','atahualpa')); }
|
---|
38 | elseif ( is_month() ) {
|
---|
39 | $bfa_ata_page_title = get_the_time(__('F Y','atahualpa')); }
|
---|
40 | elseif ( is_year() ) {
|
---|
41 | $bfa_ata_page_title = get_the_time('Y'); }
|
---|
42 | # elseif ( is_author() ) {
|
---|
43 | # $bfa_ata_page_title = htmlentities(the_author(),ENT_QUOTES); } // this won't work
|
---|
44 | elseif ( is_404() ) {
|
---|
45 | $bfa_ata_page_title = __('404 - Page not found','atahualpa'); }
|
---|
46 | else {
|
---|
47 | $bfa_ata_page_title = wp_title('', false); }
|
---|
48 |
|
---|
49 | switch ($bfa_ata_title_separator_code) {
|
---|
50 | case 1: $bfa_ata_title_separator = " « "; break;
|
---|
51 | case 2: $bfa_ata_title_separator = " » "; break;
|
---|
52 | case 3: $bfa_ata_title_separator = " : "; break;
|
---|
53 | case 4: $bfa_ata_title_separator = ": "; break;
|
---|
54 | case 5: $bfa_ata_title_separator = " > "; break;
|
---|
55 | case 6: $bfa_ata_title_separator = " < "; break;
|
---|
56 | case 7: $bfa_ata_title_separator = " - "; break;
|
---|
57 | case 8: $bfa_ata_title_separator = " ‹ "; break;
|
---|
58 | case 9: $bfa_ata_title_separator = " › "; break;
|
---|
59 | case 10: $bfa_ata_title_separator = " • "; break;
|
---|
60 | case 11: $bfa_ata_title_separator = " · "; break;
|
---|
61 | case 12: $bfa_ata_title_separator = " — "; break;
|
---|
62 | case 13: $bfa_ata_title_separator = " | "; break;
|
---|
63 | }
|
---|
64 | //
|
---|
65 | // 3 different styles for meta title tag: (1) Blog Title - Page Title, (2) Page Title - Blog Title, (3) Page Title
|
---|
66 | // To be set in WP Admin -> Design ("Presentation" in WP 2.3 and older) -> [Theme Name] Theme Options
|
---|
67 | //
|
---|
68 | if ($bfa_ata_add_blogtitle == "Blog Title - Page Title") {
|
---|
69 | bloginfo('name'); echo $bfa_ata_title_separator . $bfa_ata_page_title; }
|
---|
70 | elseif ($bfa_ata_add_blogtitle == "Page Title - Blog Title") {
|
---|
71 | echo $bfa_ata_page_title . $bfa_ata_title_separator; bloginfo('name'); }
|
---|
72 | elseif ($bfa_ata_add_blogtitle == "Page Title") { echo $bfa_ata_page_title; }
|
---|
73 | }
|
---|
74 | // END TITLE TAG
|
---|
75 | //
|
---|
76 | ?>
|
---|
77 | </title>
|
---|
78 | <?php
|
---|
79 | //
|
---|
80 | // META DESCRIPTION Tag for (only) the HOMEPAGE.
|
---|
81 | // To be set in WP Admin -> Design ("Presentation" in WP 2.3 and older) -> [Theme Name] Theme Options
|
---|
82 | //
|
---|
83 | if ( is_home() && trim($bfa_ata_homepage_meta_description) != "" ) {
|
---|
84 | echo "<meta name=\"description\" content=\"" . htmlentities($bfa_ata_homepage_meta_description,ENT_QUOTES) . "\" />\n";
|
---|
85 | }
|
---|
86 | //
|
---|
87 | // META KEYWORDS Tag for (only) the HOMEPAGE.
|
---|
88 | // To be set in WP Admin -> Design ("Presentation" in WP 2.3 and older) -> [Theme Name] Theme Options
|
---|
89 | if ( is_home() && trim($bfa_ata_homepage_meta_keywords) != "" ) {
|
---|
90 | echo "<meta name=\"keywords\" content=\"" . htmlentities($bfa_ata_homepage_meta_keywords,ENT_QUOTES) . "\" />\n";
|
---|
91 | }
|
---|
92 | //
|
---|
93 | // META DESCRIPTION Tag for CATEGORY PAGES, if a category description exists:
|
---|
94 | //
|
---|
95 | if ( is_category() && strip_tags(trim(category_description())) != "" ) {
|
---|
96 | // the category description gets its own ASCII code filter from WP,
|
---|
97 | // but <p> ... </p> tags will be included by WP, so we remove them here:
|
---|
98 | echo "<meta name=\"description\" content=\"" . strip_tags(trim(category_description())) . "\" />\n";
|
---|
99 | }
|
---|
100 | //
|
---|
101 | // prevent duplicate content by making archive pages noindex:
|
---|
102 | // To be set in WP Admin -> Design ("Presentation" in WP 2.3 and older) -> [Theme Name] Theme Options
|
---|
103 | //
|
---|
104 | // If it's a date, category or tag page:
|
---|
105 | if ( ($bfa_ata_archive_noindex == "Yes" && is_date()) OR
|
---|
106 | ($bfa_ata_cat_noindex == "Yes" && is_category()) OR
|
---|
107 | ($bfa_ata_tag_noindex == "Yes" && is_tag()) ) { ?>
|
---|
108 | <meta name="robots" content="noindex, follow" /> <?php echo "\n"; } ?>
|
---|
109 | <?php } ?> |
---|