[BlueFur.com Web Hosting] WordPress Wednesday: Foursquare Map

Social media and social networking are as popular as ever. People are updating their Facebook statuses, sending out pictures through Twitter, and connecting with fellow professionals on LinkedIn. They’re also sharing their locations and favorite places with Foursquare, so how can you best integrate that network onto your blog?

One way to do it is with the recently released Foursquare Map WordPress plug-in. After installing and configuring this plug-in, you can place a widget in your blog’s sidebar that displays your most recent Foursquare check-in. This not only provides the name of the place, but an actual map to the location as well.

This way, people can stay on top of your Foursquare activities without actually having to go to the Foursquare website or using a compatible client of some kind. The plug-in was built using the Foursquare and Google Maps APIs, so you can expect “blistering fast speeds” for the map loading on your site.

Head over to DigitalCortex.net for more information and to download the Foursquare Maps plug-in for your WordPress blog.

[BuyNowShop] Ground Floor 1.5.1

The free WordPress Theme Ground Floor version 1.5.1 has just been approved into the WordPress Theme repository. Under the new review process here is its Trac ticket: http://themes.trac.wordpress.org/ticket/278.

Here is the latest changelog.txt, too:


Changelog as of Jul 5, 2010
= Version 1.5.1 = - released: July 5, 2010 - published: July 26, 2010 - style updates for the `comment_form()` function = Version 1.5 = - released: July 5, 2010 - cleaned up code to meet WP Standards - adjusted content_width value - fixed page with comments closed message - removed feed links from header; using `add_theme_support( 'automatic-feed-links' );` - removed `legacy.comments.php` file as it is no longer referenced. - add the use of `comment_form()` ****************************** * Internet Browsers Reviewed * * ========================== * * * * Apple Safari v5.0 (Mac) * * Apple Safari v5.0 (PC) * * Firefox v3.6.6 * * Google Chrome v5.0 * * Internet Explorer v8.0 * * Opera v10.10 * * * ******************************

Now that Ground Floor v1.5.1 has been published it will go back into the queue for further updates. Given the recent changes to the WordPress Theme Review process and the features from version 3.0 that I still want to add there is more code to be written … in the meantime, Enjoy!

© 2010, BuyNowShop. All rights reserved.

Related posts:

  1. Ground Floor 1.4
  2. Ground Floor 1.3
  3. Shades 1.5.1

[WP First Aid] Add the_shortlink()

I believe there are many reasons for themes to use this function or add it to your WordPress web site. I will briefly discuss a couple of the ones that come to mind. Note, if you are using the default permalink structure this may not be for you as the_shortlink() creates a URL that looks just like it.

If you are new to WordPress and are still experimenting with the permalink structure to best fit your needs, you might consider using this function to create internal links for your site. Using the URL generated by the_shortlink() will always resolve correctly, using the verbose URL of the permalink structure may cause issues if you change the structure and do not manually edit all the internal links you have previously posted.

Please note, by “internal links” I am refering to the links used within the content of a post or page on your site pointing to another post or page on your site. A WordPress installation has the “smarts” to correctly resolve the links it generates if you change the permalink structure but it will not go back and “fix” anything you manually typed yourself as part of your page or post entry.

There is great potential for the user, the designer, and the developer using this function. I recommend adding it to all themes. Here is the most basic default usage of the_shortlink():

<?php the_shortlink(); ?>

This is the code I have decided to use on this site:

<?php the_shortlink( __('Short Link'), '', ' &#124; ', '' ); ?>

… which you can see just after the comments or subscribe link in the post meta details.

Of course you can always use the ‘Get Shortlink’ button found on the page and post administration panels to get your shortlink, but making use of this single line of code allows your readers to gain that same benefit, too.

NB: If you have the WordPress.com Stats plugin installed and activated, the_shortlink() function will use the wp.me link shortening service; and, it will retain all of the usefulness I noted above.

[WPMU Tutorials] Return a list of sites on the network

Here’s a simple internal function that will return a list of all sites in the network. The code below just shows them all and unlinked.



$blog_list = get_blog_list( 0, 'all' );
foreach ($blog_list AS $blog) {
echo 'Blog '.$blog['blog_id'].': '.$blog['domain'].$blog['path'].'
';
}

Paste that somewhere in a theme file or page template and there you go. Hope someone finds it handy and gets inspired to write a snazzy plugin, possibly a shortcode.

Random Posts

     

    © andrea for WPMU Tutorials, 2010. | Permalink | No comment | Add to del.icio.us
    Post tags:

    Need real genuine helpful support? MU Support.

    Feed enhanced by Better Feed from Ozh

    [WPMU Tutorials] Theme Stats Updated

    I updated the theme stats plugin to work with new WordPress 3.0 networks as well as with MU installs upgraded to WordPress 3.0. You can download it here: WordPress Network Theme Stats.

     

    © Ron for WPMU Tutorials, 2010. | Permalink | No comment | Add to del.icio.us
    Post tags: network, statistics, stats, theme, WordPress 3.0

    Need real genuine helpful support? MU Support.

    Feed enhanced by Better Feed from Ozh

    [BlueFur.com Web Hosting] WordPress Wednesday: Custom Post Relationships

    You’ve surely encountered more than one blog out there that highlights a series of “related posts” at the end of each entry. This is a great feature to have on your blog, because it can direct interested visitors toward additional reading on your site that is relevant to what they just read. That much makes sense.

    This kind of functionality is largely attained through the use of WordPress plugins, but the majority of the plugins are algorithm-based. In this way, the selection of the so-called “related” posts is done automatically by the plugin and these kinds of associations aren’t always completely accurate. You might be writing about the produce you found at the supermarket and it pulls up a “related post” on your new Apple iPod.

    Offering a different take on the “related post” function is the Custom Post Relationships WordPress plugin. This allows for the manual selection of related posts, ensuring that you are indeed getting reading for your visitors that is relevant to the current post.

    The integrated system lets you filter through based on category and you can type in a few words to narrow the search even further. From there, you can click to add posts to the “related posts” section and even organize their order. For more information, check out webtoolkit4.me.

    [BuyNowShop] Featured in DMM v1.7

    DMM = the Desk Mess Mirrored theme

    Just a quick preview of one of the upcoming featured changes to the Desk Mess Mirrored theme: custom menus via the wp_nav_menu() function.

    The current code for Desk Mess Mirrored version 1.6 in header.php for menus is this (cleaned up for display):

    <?php if ( is_home() || is_front_page()) { ?> <?php wp_list_pages( 'title_li=&depth=1&include=2' ); ?> <?php wp_list_pages( 'title_li=&depth=1&exclude=2' ); ?>
    <?php } else { ?> <li><a href="<?php bloginfo( 'url' ); ?>"><?php _e( 'Home', 'desk-mess-mirrored' ) ?></a></li> <?php wp_list_pages( 'title_li=&depth=1' ); ?>
    <?php } ?>
    

    All of that code is simply replaced by this line:

    <?php dmm_nav_menu(); ?>
    

    The function dmm_nav_menu() is referring to this section of code now found in the functions.php template file:

     // Add wp_nav_menu() custom menu support add_theme_support( 'menus' ); function dmm_nav_menu() { if ( function_exists( 'wp_nav_menu' ) ) wp_nav_menu( array( 'theme_location' => 'top-menu', 'depth' => 1, 'fallback_cb' => 'dmm_list_pages' ) ); else dmm_list_pages(); } function dmm_list_pages() { if ( is_home() || is_front_page() ) { wp_list_pages( 'title_li=&depth=1' ); } else { ?> <li><a href="<?php bloginfo( 'url' ); ?>"><?php _e( 'Home', 'desk-mess-mirrored' ) ?></a></li> <?php wp_list_pages( 'title_li=&depth=1' ); } } add_action( 'init', 'register_dmm_menu' ); function register_dmm_menu() { register_nav_menu( 'top-menu', __( 'Top Menu' ) ); } // wp_nav_menu() end
    

    Notice the highlighted lines are identical which means at the default settings after updating to version 1.7 you should see no difference in how your site looks, but you are now able to set the menu links using the interface under Appearance | Menus. Also note, the menu is still set as a top-level or parent only menu. Future versions of DMM may offer drop-down menus and other options but they are not currently scheduled for a particular release date or version at this time.

    All of these changes were based on the article I wrote at WPFirstAid.com titled: Upgrade wp_list_pages() to wp_nav_menu().

    Enjoy!

    © 2010, BuyNowShop. All rights reserved.

    Related posts:

    1. Desk Mess Mirrored 1.5
    2. Desk Mess Mirrored 1.2
    3. Desk Mess Mirrored 1.6

    [WP First Aid] Upgrade wp_list_categories() to wp_nav_menu()

    In this third installment in the upgrade to wp_nav_menu() series of posts, I will be dealing with moving from wp_list_categories() to wp_nav_menu().

    Let’s start with the same basic outline and list the default options for each function. We will start with wp_nav_menu() 1 first:

    wp_nav_menu( array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 0, 'walker' => '', 'theme_location' => '' ) );
    

    We follow with wp_list_categories() 2, 3 which is often wrapped in a <ul class=”menu”> tag:

    <ul class="menu">
    wp_list_categories( array( 'include' => '', 'exclude' => '', 'exclude_tree' => '', 'child_of' => 0, 'hide_empty' => 1, 'orderby' => 'name', 'order' => 'ASC', 'use_desc_for_title'=> 1, 'number' => NULL, 'hierarchical' => true, 'show_count' => 0, 'pad_counts' => 0, 'style' => 'list', /* 'style' set to list "creates list items for an unordered list" */ 'show_option_all' => '', 'show_option_none' => __('No categories'), 'show_last_update' => 0, 'feed' => '', 'feed_type' => '', 'feed_image' => '', 'current_category' => 0, 'taxonomy' => 'category', 'title_li' => __( '' ), /* 'title_li' set to '' for menus from the default 'Categories' */ 'echo' => 1, 'depth' => 0, 'walker' => 'Walker_Category' ) );
    </ul>
    

    Here is the break-down of the wp_list_categories() default options from above:

    • 'include' – not used
    • 'exclude' – not used
    • 'exclude_tree' – not used
    • 'child_of' – not used
    • 'hide_empty' – not used
    • 'orderby' – not used
    • 'order' – not used
    • 'use_desc_for_title' – not used
    • 'number' – not used
    • 'hierarchical' – not used
    • 'show_count' – not used
    • 'pad_counts' – not used
    • 'style' – not used
    • 'show_option_all' – not available
    • 'show_option_none' – not available
    • 'show_last_update' – not available
    • 'feed' – not available
    • 'feed_type' – not available
    • 'feed_image' – not available
    • 'current_category' – not available
    • 'taxonomy' – not available
    • 'title_li' – not used
    • 'echo' – similar to wp_nav_menu(); true versus 1 as value
    • 'depth' – same as wp_nav_menu()
    • 'walker' – see below for additional notes

    Although there are great many options available to be used with wp_list_categoires() most are not used (as noted in the list above) in place of the user interface of wp_nav_menu() found under Appearance | Menu in the dashboard. The options that are marked as “not available” are currently not directly supported by wp_nav_menu() without the application of filters. The last few options remaining match up almost exactly with wp_page_nav() in a similar fashion as was shown with wp_list_pages().

    Just like the wp_list_pages() consideration, the wp_nav_menu() fallback_cb option may be set to 'fallback_cb' => 'wp_list_categories'. This backward compatibility may also be addressed with a custom function as was noted, too.

    Note: In most cases you would leave the wp_nav_menu() 'walker' option set to its default NULL although wp_list_categories() uses its own default walker class.

    [WPMU Tutorials] Get some simple Network stats

    I remembered this really neat internal function that is handy to display anywhere you want to show how many sites and users you have in your network.

    $stats = get_sitestats();
    echo 'There are currently '.$stats[ 'blogs' ].' sites running on this network and '.$stats[ 'users' ].' users.';

    Surround that in php tags. :)

    For added snazziness and extra bonus points on your homework, go grab a copy of the blank widget Blank Build-A-Widget (930) paste this code in there, and you’ve just made a network stats widget. Awesome, you rock

    Random Posts

       

      © andrea for WPMU Tutorials, 2010. | Permalink | No comment | Add to del.icio.us
      Post tags:

      Need real genuine helpful support? MU Support.

      Feed enhanced by Better Feed from Ozh

      [WPMU Tutorials] WordCamp Montreal

      Both Andrea & I will be speaking at WordCamp Montreal.

      I'm Speaking at WordCamp Montreal 2010 - Aug 28-29

      Andrea & I have had a fantastic time at every WordCamp we have attended and we enjoy meeting other people who use WordPress. If you have never been to one, this will be a great one for you to attend. Whatever you are doing with WordPress, you can be sure that you’ll have a chance to talk to others who have been or are interested in doing the same :)

       

      © Ron for WPMU Tutorials, 2010. | Permalink | No comment | Add to del.icio.us
      Post tags: montreal, wordcamp

      Need real genuine helpful support? MU Support.

      Feed enhanced by Better Feed from Ozh

      Planet WordPress Canada theme by WPDesigner, syndication by Pipes, FeedWordPress, and Feedburner, powered by ?