Archive for Featuresfeatures category image instructions category image

features category image instructions category image My Tweets Page

If you would like to use the Twitter page on your site, you will need to make a new page and name it whatever you wish but make sure it has the slug name of ‘twitter’. Choose the Twitter Page as your page template.

Open the file called page_twitter.php and look for the following lines of code:

<?php
include_once(ABSPATH.WPINC.'/rss.php');
wp_rss('http://twitter.com/statuses/user_timeline/14542206.rss', 99);?>

You need to change the ID number to your own, i.e. 14542206

And that is it – all done!

features category image instructions category image Peel-Back Corner

Love ‘em or hate ‘em, the Peel-Back corner is gaining momentum across the Net and is surprisingly easy to add [or remove].

First thing then, I will show you how to remove it.

Open your header.php file and look for the following piece of code:

<script type="text/javascript" src="/js/peel.js" ></script>

You can either comment it out [by adding , so that you can use it later or if you prefer, remove it completely.

If you decide to remove it completely, you should also delete the directory in your theme files called 'peel'.

For those who wish to keep it but put their own little slant on things, read on...

The Peel-Back corner is also very easy to edit.

Open the 'peel' directory and look for the file called 'peel.js'. This is a javascript file and even if you do not know much about code, it is very easy to make the necessary changes.

Open the peel.js file in a text editor and look for the following line [line 3]

jaaspeel.ad_url = escape('http://www.freshlypressed.net');

Change the http:// address to wherever you wish the Peel-Back to link.

Next, take a look at the next two lines of code:

jaaspeel.small_image = escape('/WP284/wp-content/themes/FreshlyPressed/peel/fp75.png');

This is the first of two images you need to change. The first one is the little image you see in the corner before you peel back. You can place any image here. A recommendation though – make sure it is 75×75 pixels and I would also recommend you save it as a png.

One last step:

Slightly further down in the code you will see the following:

jaaspeel.big_image = escape('/WP284/wp-content/themes/FreshlyPressed/peel/fp500.png');

This is the larger image that you see when you peel the corner back. It is 500×500 in size and you just need to edit it and place your own in it’s place.

Save it all and make sure your images in the correct location [as specified in the code above] and hey presto – you have your own, new Peel-Back.

Life huh – it’s so easy sometimes!

Difficulty Level: Easy to Medium

features category image instructions category image Option to Add Your Own Custom Avatar

By adding this little bit of code [below] to the functions.php file, this theme has the ability for you to change your own avatar within the WordPress Dashboard – Discussion section.

So, go open your functions.php file and make the two small changes which refer to ‘FreshlyPressed’ above. Upload your image to the correct directory and then go into Admin – Discussion and down the bottom of the page you will see your shiny new, customised avatar ready to use as the default.

// CHANGE THE DEFAULT AVATAR IN WordPress
// -----------------------------------------------------------------------------
add_filter( 'avatar_defaults', 'newgravatar' );

function newgravatar ($avatar_defaults) {
    $myavatar = get_bloginfo('template_directory') . '/img/freshlypressedgravatar.png';
    $avatar_defaults[$myavatar] = "FreshlyPressed";
    return $avatar_defaults;
}

your_own_gravatar

features category image instructions category image Easily Editable Meta Description for Individual Pages

SEO, SEO, SEO!“,  screams the Net wherever you surf these days. And one big area they will rave about when discussing Search Engine Optimisation [SEO], is making sure you use valid and well thought out Meta Descriptions.

The trouble with the basic WorPress installation though, is that it does not allow you to make much headway in this area. Yes, I know there are many plugins available to cater for this need, but just for moment, let’s NOT use a plugin for this.

By adding the following code to our little functions.php file, we can make it so that in all of your pages [not posts], you can write a valid, and more importantly, DIFFERENT meta description by simply writing in your excerpt box.

<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta name="description" content="<?php
      if (is_single() || is_page()) {
           # Single post / page.
           # Use the 'description' custom field.
           echo get_post_meta($post->ID, 'description', true);
      } elseif (is_category()) {
          # Category page.
          # Use category's description
          echo trim(strip_tags(category_description()));
      } else {
          # Default meta description
          # Blog's description
          echo bloginfo('description');
      }
?>" />

features category image instructions category image Shortcodes Built-in

Just in case you have been visiting your Aunt Zoraphelia on Pluto for the last few years, here is a brief explanation of what a shortcode actually is:


… a WordPress-specific code that lets you do nifty things with very little effort. Shortcodes can embed files or create objects that would normally require lots of complicated, ugly code in just one line.
[via]


Plugins often make great use of them. WordPress.COM has lots of them built in and you may already have some yourself. Anyway, here are few that are incorporated into this theme:

Please note: tags changed from [ ] to { }

{raw}{/raw} – disables the automatic post formatting [Note: When you use this one, you need to add your own html coding within a post]

{note}{/note} – provides a means of adding a note to a post or page that only the admin of the site can see

{adsense}{/adsense} – enables the addition of your Adsense within post and pages

{mailto}{/mailto} – to obfuscate an email address within your posts or pages. It renders as the following code.

&amp;#101;&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#64;&amp;#101;&amp;#109;++

{php}{/php} and {css}{/css} – which are provided via the Syntax Highlighter plugin

{contact-form 1 \”Contact form 1\”} – used by the Contact 7 plugin

It is also possible to make your own simple text shortcodes. This is handy if you tend to type the same string of text over and over again. In the functions.php file you can find the following code:

// SHORTCODES - SIMPLE TEXT
// Add as many shortcodes as you wish. Very handy for sites that use the same text, wording etc again and again. For instance, add Have you checked out FreshlyPressed today? to any post and it displays the text within the code below]
// -----------------------------------------------------------------------------
function freshlypressed() {
    return 'Have you checked out <a href="http://freshlypressed.net">FreshlyPressed</a> today?';
}

add_shortcode('fpr', 'freshlypressed');

This means that if I type in {fpr}, it will automatically pump out “Have you checked out FreshlyPressed today?”

You can make as many of these as you like using the above code as a simple example.

Oh, almost forgot to mention: Just for a bit of fun you can make your text talk like a pirate by using the {pirate}{/pirate} shortcode. Take a look at how it changes this news story from the BBC:

ORIGINAL TEXT:
Net pirates to be ‘disconnected’
Peter Mandelson, Business Secretary
Peter Mandelson intervened to toughen up UK piracy policy
People who persistently download illegal content will be cut off from the net, Business Secretary Peter Mandelson has announced.
Speaking at a government-sponsored forum to debate copyright issues he said the UK would introduce a similar policy to France.
It means persistent pirates will be sent two warning letters before facing disconnection from the network.
The issue has divided the telecoms and media industries.
Mr Mandelson said that cutting internet connections would be a “last resort”.
“I have no expectation of mass suspensions. People will receive two notifications and if it reaches the point [of cutting them off] they will have the opportunity to appeal,” he told the audience at the C&binet Forum, a talking shop set up by government to debate the issues facing the creative industries.

PIRATE TEXT:

Net pirates t’ be ‘disconnected’
Peter Mandelson, Business Secretary
Peter Mandelson intervened t’ toughen up UK piracy policy
People who persistently download illegal content will be cut off from th’ net, Business Secretary Peter Mandelson has announced.
Speakin’ at a government-sponsored forum t’ debate copyright issues he said th’ UK would introduce a similar policy t’ France.
It means persistent pirates will be sent two warnin’ letters before facin’ disconnection from th’ network.
The issue has divided th’ telecoms an’ media industries.
Mr Mandelson said that cuttin’ internet connections would be a “last resort”.
“I have no expectation o’ mass suspensions. People will receive two notifications an’ if it reaches th’ point [o' cuttin' them off] they will have th’ opportunity t’ appeal,” he told th’ audience at th’ C&binet Forum, a talkin’ shop set up by government t’ debate th’ issues facin’ th’ creative industries.

features category image instructions category image Post Word Count and Total Posts

Two more simple but useful functions have been added to this theme via the functions.php file.

1. Post Word count which displays under the post title on the single post page. Use this code to implement.

<?php echo wcount(); ?>

2. The Total Posts on the site which can be seen on the front page [very close to the bottom of the page]. Use this code to implement.

<?php echo $numposts.' '; ?>