Introduction
Topic: [keys] [CSS] [Improving b2evo] [SEO] [JavaScript][/keys]
Versions: [keys][1.8][/keys]
Gentlemen, Optimize Your Search Engines!
Information: This plugin is AM Update enabled. This ensures that you always have the latest version of the code installed on your blog
If you have even the slightest interest in SEO then you may have realized that your b2evolution blog suffers a major flaw - your "description" and "keyword" meta tag content is identical for every single page. (G'won ... have a look)! For White-hat SEO purposes and to be semantically correct, the keywords, description and title should reflect the content of your page, whether you're looking at five disparate posts or one, in single-view mode. In other words, the content in these tags should change!
If you blog about your Persian Cat winning the National Cat Show, but your blog is predominantly about computer programming, it doesn't make much sense to have keywords like "PHP, JavaScript, XHTML, CSS, Perl, C++" when someone is viewing the article about your precious feline, does it?
The "AM Custom Plug-in" allows your tags always reflect your post content. It does this by allowing you to add a post-specific title, description and/or keywords. However, it goes a couple of steps farther, by concatonating post-specific keywords, when more than one post is viewed at a time. It also removes duplicate keywords (something Google doesn't like and bans sites for doing). It doesn't end here, as this plugin also lets you add more meta tags (whichever you might want to add) directly from your posts!
Post-specific CSS Anyone?
Until now, if you've wanted to add one-off styling to your posts, you've had only two choices: put it in your skin's CSS file and load it regardless if the post is being viewed or not -or- add it in-line (mind you, you first have to hack _formatting.php to allow 'style' as a core attribute). Neither are ideal. The first bloats your CSS file and the second undermines the whole point of a CSS file and doesn't allow you to use the pseudo-class ":hover".
Here's a demonstration! If you "view source", you'll see the class name "am_custom_demo". It'll only show if and when THIS post is shown. (Check it out). ;)
No longer! The "AM Custom Plug-in" allows you to put post-specific CSS directly into a post. It'll only load the CSS into the <HEAD> whenever that post is displayed. What could be better than that?
How About a Bit of Milk in Your JavaScript?
That's right! The "AM Custom Plug-in" even lets you add JavaScript, directly in your b2evolution posts. It's a popular request on the b2evolution forums and we're pleased to let you know that it can be done with this plugin.
Want it? Read on for install and usage instructions ...
Install and Information
To make the plugin work properly just delete the bits in red in your skin
[color=red]<title><?php[/color]
[color=red]$Blog->disp('name', 'htmlhead');[/color]
[color=red]request_title( ' - ', '', ' - ', 'htmlhead' );[/color]
[color=red]?></title>[/color]
<base href="#" data-code="?php skinbase(); /* Base URL for this skin. You need this to fix relative links! */ ?>" />
[color=red]<meta name="description" content="<?php $Blog->disp( 'shortdesc', 'htmlattr' );?>" />[/color]
[color=red]<meta name="keywords" content="<?php $Blog->disp( 'keywords', 'htmlattr' );?>" />[/color]
How to use the tags
The tags to use are fairly simple, and pretty self explanatory :-
- <!--title [i]title to use[/i] -->
- The [b]title to use[/b] will be used as the pages html title in single post mode.
- <!--description [i]post description[/i] -->
- The [b]post description[/b] will be used as the pages description in single post mode
- <!--keywords [i]keywords to add[/i] -->
- The [b]keywords to add[/b] will be appended to the pages keywords. The plugin also ensures that there are no duplicate keywords
- <!--meta [i]meta tag data[/i] -->
- This will add a meta tag <meta [b]meta tag data[/b] />
- <!--css [i]custom css for post[/i] -->
- The [b]custom css for post[/b] will be output between <style> tags
- <--script [i]javascript to add[/i] -->
- The [b]javascript to add[/b] will be output between <script> tags
- WARNING : This will allow any user with posting rights to post javascript, it's disabled by default. To enable javascript you need to manually change the setting in the plugin code.
Recent Comments