Atlantic Business Technologies, Inc.

Author: Atlantic BT

  • WordPress 3.3 Shortcode Issue

    If you find yourself scratching your head over why your shortcodes have stopped working in WordPress 3.3, we’ve discovered a funny quirk. Granted, this fix may actually be the right way to call all shortcodes, but previously we’ve been able to lazily call it directly from our functions.php file and no one cared. But, now it seems, with the upgrade, that WordPress 3.3 does care. It requires your add_shortcode() function to be called within their init() hook. Calling it directly after your newly declared shortcode function won’t work anymore.

    The lazy method we got away with before:

    [php]
    function abtcore_shortcode_button( $atts, $content = null ) {
    extract( shortcode_atts( array(
    ‘color’ => ‘blue’
    ), $atts ) );
    return ‘<p>’ . $content . ‘</p>’;
    }

    add_shortcode( ‘button’, ‘abtcore_shortcode_button’ );
    [/php]

    The better way that is now required by WordPress 3.3:

    [php highlight=”7″]
    function abtcore_shortcode_button( $atts, $content = null ) {
    extract( shortcode_atts( array(
    ‘color’ => ‘blue’
    ), $atts ) );
    return ‘<p>’ . $content . ‘</p>’;
    }
    add_action(‘init’, ‘abtcore_register_my_shortcodes’, 100);
    function abtcore_register_my_shortcodes() {
    add_shortcode( ‘button’, ‘abtcore_shortcode_button’ );
    }
    [/php]

    Notice the add_action() call on the ‘init’ on line 7. This will properly register your shortcode function when WordPress initiates.

    I hope this helps.

  • How to add custom fields to Drupal 7 breadcrumb

    Breadcrumbs in Drupal 7 are normally based on the menu title.  However, what if you wanted different breadcrumb text than what appears in the menu?  For example, you have a small space and long titles, and would rather use abbreviations in your breadcrumb to save space (usability concerns aside).
    I’m aware of modules like Custom Breadcrumb, but I wasn’t able to find anything that allowed me to:

    1. Create a custom field on a node
    2. Optionally use that field (if populated) instead of the menu title in the breadcrumb list

    So, add the following to your template.php file after creating a node field field_breadcrumb. If you have a better idea, let me know in the comments!

    Based on digging through hook_menu_breadcrumb_alter and menu_get_active_breadcrumb.
    [php]

    /**
    * Reconfigure the breadcrumb trail to use each parent’s custom field
    * @see hook_menu_breadcrumb_alter
    * @see menu_get_active_breadcrumb
    *
    * @param array $active_trail the current page active trail
    * @param whatever $item the current trail item
    */
    function YOURTHEME_menu_breadcrumb_alter(&amp;$active_trail, $item) {

    // must step through each menu item, check to see if it has the ‘custom breadcrumb’ field
    foreach( $active_trail as &amp;$crumb ) :
    $node_id = str_replace(‘node/’, ”, $crumb[‘link_path’]);
    if( $node_id ) :
    // get the node to find the field
    $node = node_load($node_id);
    // best…function…ever
    $crumb_text = field_get_items(‘node’, $node, ‘field_breadcrumb’);

    // replace existing text if we should
    if( $crumb_text ) :
    $crumb[‘link_title’] = $crumb_text[0][‘safe_value’];
    $crumb[‘title’] = $crumb_text[0][‘safe_value’];
    endif;

    endif;
    endforeach;

    // add a sacrificial final item, since that gets removed later on
    $active_trail []= $crumb;

    }//– fn YOURTHEME_menu_breadcrumb_alter

    /**
    * Return a themed breadcrumb trail.
    *
    * Implements Zen theme `zen_breadcrumb`. Paired with XYZ_menu_breadcrumb_alter, which appended a sacrificial duplicate
    *
    *
    * @param $variables
    * – title: An optional string to be used as a navigational heading to give
    * context for breadcrumb links to screen-reader users.
    * – title_attributes_array: Array of HTML attributes for the title. It is
    * flattened into a string within the theme function.
    * – breadcrumb: An array containing the breadcrumb links.
    * @return
    * A string containing the breadcrumb output.
    */
    function YOURTHEME_breadcrumb($variables) {
    if( isset( $variables[‘breadcrumb’]) &amp;&amp; !empty( $variables[‘breadcrumb’] )) :
    // Don’t show a link to the current page in the breadcrumb trail.
    // this should automatically take into account theme settings…
    $last_key = end( array_keys( $variables[‘breadcrumb’] ) );
    $end = end( $variables[‘breadcrumb’] );
    $current_path = url(request_path(), array(‘absolute’ =&gt; false));
    if ( false !== strpos($end, $current_path) ) {
    $variables[‘breadcrumb’][$last_key] = strip_tags( $end );
    }
    endif;
    // business as usual
    return zen_breadcrumb($variables);
    }//– fn YOURTHEME_breadcrumb
    [/php]
    Todo: make this a module…

  • Content Curation Contest Announced

    Curation Contest From Atlantic BT Coming Soon

    Yes! Content Curation Contest Is On

    February 7 Update
    Thanks to everyone of the 27 GREAT curators who’ve applied for our first Content Curation Contest. Use the link above or click on Curate This to enter our first Content Curation Contest.

    Who will win the iPad or Kindle? Keep the Entries coming!

    Content Curation Contest…coming soon
    We are working on a Content Curation Contest to identify and reward great content curators such as Robin Good, Anise Smith and Michele Smorgon (maxOz). If you are a great content curator and would like details about the contest, please follow @Atlanticbt and use #curationcontest in a Tweet (or two or three). If you know content curators such as Karen Dietz, Alex Butler and Morten Myrstad please let them know about our contest.

    Pre-Contest Tweets & Email
    Use #CurationContest in a Tweet to be on the contest mailing list. Curation Contest will start before Christmas. Or email Martin.Smith(at)AtlanticBT(dot)com with “Curation Contest” in subject.

    Will be running the Content Curation Contest on Atlantic BT, so be sure to follow @Atlanticbt and look for details soon.

    Thanks and stay tuned.   Martin

    More on Content Curation and our Content Curation Contest on ScentTrail.

  • Business Intelligence Dashboards: The best thing since sliced bread?

    I hate how complicated my Web Analytics tool seems to be.  Why can’t it be smart and show me what I need to know?

    The speed in which your internet marketer identifies wins and losses is vital to your businesses success.  However, in most cases – businesses fail to realize just how important that human element is when it comes to internet marketing.  Web Analytics is an ever changing box of puzzle pieces that define how and why your online presence benefits your businesses success.  As you put the pieces together to create a clearer picture of how your website is doing and what is driving outcomes rather than failures, you will begin to realize any “wasted” time spent on data analysis translates to opportunity cost that could be invested into creating new pieces to yield.  The above situation is a catch-22 though; because on the flipside creating pieces without data analysis leads to overhead when incorrect pieces are made that simply do not fit.

    You better be creating a business intelligence dashboard before the deep-dive.

    Here are my two conclusions in regards to data analysis versus making marketing moves online.

    1. You are damned if you do too much data analysis and you are damned if you don’t do enough data analysis.
    2. Let’s make it easier for the internet marketer to see the relevant data that helps them decide which pieces need to be created.  (Custom dashboards!)

    There is such a thing of digging your own grave when it comes to data analysis.  Focusing on the wrong metrics and the wrong dimensions can lead to this.

    Defining your custom dashboards based off of which business questions and marketing channels you are analyzing will save you lots of time and avoid unnecessary digging.

    Here is a scenario I have encountered myself during my tenure at Atlantic Business Technologies.

    My rules of thumbs when creating business intelligence dashboards in Google Analytics

    Take the time to define which groupings of metrics, segments and dimensions you plan to keep track of a day.  My golden rules for data and dashboards are the following:

    1. If you can’t explain how the data affects the bottom line of your business, don’t include it.
    2. If you can’t drill deeper into the dashboard, it is most likely too specific of a report to be considered a dashboard.
    3. If you don’t have at least one dashboard that focuses on growth opportunities, make one.
    4. Grow a habit of using the dashboards frequently.
    5. Grow the dashboard as needed.  Adapt.

    Some examples of dashboards I’ve created:

    Visitor / Client Retention (Customer Lifetime Value)

    -# of Visits for returning visitors.

    -Bounce Rate

    -Traffic Sources of Returning members

    -Trend data for Facebook / Twitter for Returning visitors

    -Top Content viewed by these individuals

    -Days from last visit

    Market Channel Performance (focused on new visits / conversions and conversion rate)

    -New Visits broken out by marketing channel which includes SEO, PPC, Email, Direct / Branded Searches and Referral traffic

    -Conversion Rate by channel

    -Total conversions by channel

    -Bounce rate by channel

    Non-Branded SEO Channel Performance

    Total # of visits

    -Top 10 visits by state

    -Top 10 goals by state

    -Conversions by sport type

    -Landing pages compared to bounce rate

    -Keywords that did not lead to conversions

    -Keywords that lead to conversions

    Pay Per Click Channel Performance

    Total # of visits

    -Top 10 visits by state

    -Top 10 goals by state

    -Conversions by sport type

    -Landing pages compared to bounce rate

    -Keywords that did not lead to conversions

    -Keywords that lead to conversions

    -Conversions by Campaign

    -Total Cost vs. Total Conversions

    Market Channel Performance (focused on new visits / conversions and conversion rate)

    -New Visits broken out by marketing channel which includes SEO, PPC, Email, Direct / Branded Searches and Referral traffic

    -Conversion Rate by channel

    -Total conversions by channel

    -Bounce rate by channel

    My question to you is this, what dashboards would you create for your business and why?

  • In the News: JT’s Landscaping’s on WRAL

    Our clients are making news! Jimmy Tompkins of JT’s Landscaping was featured in this article on WRAL for his innovative approach to keeping his Raleigh Landscaping business going through the winter.

    Although landscaping tends to be a seasonal industry, Jimmy Tompkins has found a way to not only maintain his business during the typical off-season but to grow his company and keep his employees working through the winter. Every fall, we help JT’s Landscaping transition his focus from lawn maintenance to holiday decorating by updating his website, re-optimizing for search engines and targeted pay-per click campaigns for the holiday season. Innovative clients such as Jimmy make our job easy!

    JT’s Landscaping provides holiday lighting and holiday decorating services for the Triangle, including Raleigh, Durham, Cary, Chapel Hill, and Wake Forrest. This year his team is decorating more than 160 homes in the Raleigh area.

    As marketers, we admire Jimmy’s ability to recognize a void in a market and capitalize on it. This helps grow his business, develop his brand, and maintain jobs for his employees when traditional landscaping work is slow.

  • WordPress Plugin – Razoo Donation Widget

    Razoo is a free donation platform for non-profits to easily accept donations. They provide an embeddable widget for your site. This plugin exposes this form as a shortcode for you to drop in your pages and posts. See also Razoo Widget Creator.

    Actually based on the “share” widget creator (from the “embed this on your site” link on the widget) to customize the options and basic appearance.

    Download the plugin – razoo-donation-widget v0.9

    (now on  WordPress.org!)