Adding Affiliate WP Dashboard to WooCommerce My Account Page

·

I was recently working on integrating Affiliate WP into one of my friend’s sites. And after I set it up, I was a bit disappointed that the affiliate users would have a separate account page from the WooCommerce users.

For example, users that were checking order history, saved payment details, and more would go to /my-account. But, users that wanted to check their affiliate details would need to go to /affiliates.

The ideal situation seemed to be to add the affiliate page within the WooCommerce “My Account” page. So, I set about on a journey to make that happen.

Some discovery

It’s always nice to find out if others have solved the problem already. And I was in luck, as there were a few tutorials out there that discussed how to add menu items to the WooCommerce “My Account” page :

Tom writes great stuff, but this article I found of his is simply to add a menu item to the WooCommerce “My Account” page. It does not discuss how to add content to the tab. So, I worked mainly off of Rodolfo Melogli’s article which does cover how to add content to the tab.

What I ended up with

With just a few tweaks, I was able to integrate Affiliate WP in to the WooCommerce “My Account” page. I’ve included some high-level comments that explain what each section is for.

// Add the rewrite endpoint so that we don't 404 on the new My Account tab
function moh_add_aff_wp_endpoint() {
  add_rewrite_endpoint( 'aff', EP_ROOT | EP_PAGES );
}
add_action( 'init', 'moh_add_aff_wp_endpoint' );

// Add the new affiliate area link to the "My Account" menu
// if Affiliate WP is enabled and the current user is an affiliate.
//
// Ensure that the logout link stays at the bottom of the menu ;)
function moh_add_aff_wp_link_my_account( $items ) {
  if ( function_exists( 'affwp_is_affiliate' ) && affwp_is_affiliate() ) {
    $logout = array_pop( $items );
    $items['aff'] = 'Affiliate Area';
    $items[] = $logout;
  }
  return $items;
}
add_filter( 'woocommerce_account_menu_items', 'moh_add_aff_wp_link_my_account' );

// Render the Affiliate WP Content within the new tab if Affiliate WP is enabled
function moh_aff_wp_content() {
  if ( ! class_exists( 'Affiliate_WP_Shortcodes' ) ) {
    return;
  }
  $shortcode = new Affiliate_WP_Shortcodes;
  echo $shortcode->affiliate_area( null );
}
add_action( 'woocommerce_account_aff_endpoint', 'moh_aff_wp_content' );

// Make sure that the Affiliate WP tabs properly work
function moh_filter_aff_tabs( $url, $page_id, $tab ) {
  return esc_url_raw( add_query_arg( 'tab', $tab ) );
}
add_filter( 'affwp_affiliate_area_page_url', 'moh_filter_aff_tabs', 10, 3 );

Final result

Here are a couple of screenshots demonstrating what this should look like when you’re done.

Closing thoughts

As you can see, just this little bit of code gives us a pretty good visual integration between Affiliate WP and WooCommerce. I found myself asking if Affiliate WP should do this within the plugin, but with how many integrations that they handle, I’m not sure if it would make sense for them.

In the future, and after more testing to make sure that nothing breaks if one of the plugins is not enabled, perhaps this could be factored in to a plugin. Until then, you should be able to get this working by copying the code in to a small plugin on your site or throwing it in the functions.php of your theme.

Comments

49 responses to “Adding Affiliate WP Dashboard to WooCommerce My Account Page”

  1. Steve Avatar

    very helpful – been thinking that this is a method that makes a lot of sense for a while now – if we tried the plugin route, do you happen to know how (what code is required to call the plugin) and where we’d place that (which template files) – thanks in advance, and thanks again for the insight

    1. Eric Binnion Avatar

      To get this working as a plugin, the only thing you should need is to add a plugin header which you can read about here: https://codex.wordpress.org/File_Header#Plugin_File_Header_Example

      Then you’d create a directory in wp-content/plugins called something like woo-affiliate-wp-integration. Then you’d create a PHP file called woo-affiliate-wp-integration.php and place the code above in that file. Be sure to add the beginning <?php.

      I’m currently running this on friend’s site as an mu-plugin and haven’t had any issues. Do let me know if you run into issues though.

      1. Steve Avatar

        all seems to be working great – thanks again for the share
        one issue that may be unrelated but the LOGOUT tab at the bottom is not functioning properly, even though the signout text link on the same page seems to work (uses the WOO endpoint)
        … my-account/0/ is where the LOGOUT tab redirects
        whereas the signout redirects to … my-account/customer-logout/ (which works and is the default WC endpoint)

        is there anything in the code that may be causing this OR is it a theme issue

        thanks in advance

  2. Steve Avatar

    cheers, we’ll give it a try and let you know what, if any, issues we encounter

  3. Josh Avatar

    I had issues with the log out too. try using:

    // Ensure that the logout link stays at the bottom of the menu đź‰
    function moh_add_aff_wp_link_my_account( $items ) {
    if ( function_exists( ‘affwp_is_affiliate’ ) && affwp_is_affiliate() ) {
    return
    array_merge(
    array_slice( $items, 0, count( $items ) – 1 ),
    array( ‘aff’ => ‘Affiliate Area’ ),
    array_slice( $items, count( $items ) – 1 )
    );
    }
    return $items;
    }
    add_filter( ‘woocommerce_account_menu_items’, ‘moh_add_aff_wp_link_my_account’ );

    1. Steve Avatar

      ok – thanks – the code above causes a fatal error with the plugin (at least for me)
      – did notice the emojis and removed, but perhaps there is something else that i am missing?

  4. SDK Avatar

    This is great! BTW, getting:

    Warning: Missing argument 1 for Affiliate_WP_Shortcodes::affiliate_area(), called in /nas/content/staging/osana/wp-content/themes/uncode-child/functions.php on line 176 and defined in /nas/content/staging/osana/wp-content/plugins/affiliate-wp/includes/class-shortcodes.php on line 25

    with latest version of AffiliateWP

  5. brokermodel Avatar
    brokermodel

    Hey guys, I notice that you are having trouble with the logout, as it is written in Eric’s code – by the way, thanks for the great post Eric. Here is the issue…

    Change this line:
    $items[] = $logout;

    To this:
    $items[‘customer-logout’] = $logout;

    That should fix it! – Let me know when this works for you.

  6. Glenn Koehler Avatar

    Eric,

    I’ve added the code above as you indicated. It does in fact show up in the menu under the my account page, but when I click on it nothing happens.

    So when I view the link on the tab that shows up on the menu it displays the following: https://www.thedomain.com/store/my-account/?tab

    The /?tab displays no matter what menu item I’m on I can go to dashboard, then go to (Affiliate Area) and that shows up. I can do Orders then go to Affiliate Area and the/?tab shows up. Doesn’t matter.

    My affiliate page is named affiliate-area so in the code where the section talks about the logout link staying at the bottom I have it setup as such and left the rest of the code alone as indicated above.

    // Ensure that the logout link stays at the bottom of the menu đź‰
    function moh_add_aff_wp_link_my_account( $items ) {
    if ( function_exists( ‘affwp_is_affiliate’ ) && affwp_is_affiliate() ) {
    $logout = array_pop( $items );
    $items[‘affiliate-area’] = ‘Affiliate Area’;
    $items[‘customer-logout’] = $logout;
    }

    What am I missing or not doing to make this work?

    1. Glenn Koehler Avatar

      If I leave the default $items[‘aff’] = ‘Affiliate Area’; in play I receive TWO Menu items on the My account menu top one shows /aff and the second shows /?tab and both doesn’t work.

      1. Glenn Koehler Avatar

        ok found the issue of the displaying, affiliatewp updated and provided an option to display the affiliate area link in the my account menu. I’ve disabled that by taking the check out and then copied the code above into the functions and received this error when I clicked on the Affiliate Area Menu item:

        “Warning: Missing argument 1 for Affiliate_WP_Shortcodes::affiliate_area(), called in /functions.php on line 129 and defined in /wp-content/plugins/affiliate-wp/includes/class-shortcodes.php on line 25”

        I’ve reviewed the lines and they in fact do match, I’ve logged out and back in with a test account and admin account and both display the same thing.

        ALL LINKS WORK AND EVERY LINK USED DISPLAYS THE SAME ERROR AT THE TOP OF THE AFFILIATE MENU.

        What am I missing?

  7. koehlercafe Avatar

    Good morning, so the Warning missing argument 1 has not been resolved. At first it was at line 129, but now it’s on 133 on the functions.php file.

    Warning: Missing argument 1 for Affiliate_WP_Shortcodes::affiliate_area(), called in /wp-content/plugins/theme-customisations-master/custom/functions.php on line 133 and defined in /wp-content/plugins/affiliate-wp/includes/class-shortcodes.php on line 25

    Not sure what I’m missing here, Here is the snippet of code I’ve put into the custom functions.php in the child theme:

    // *****Starting the My Account Page Affiliate Menu option addition section*****
    // Add the rewrite endpoint so that we don’t 404 on the new My Account tab
    function moh_add_aff_wp_endpoint() {
    add_rewrite_endpoint( ‘aff’, EP_ROOT | EP_PAGES );
    }
    add_action( ‘init’, ‘moh_add_aff_wp_endpoint’ );
    /** ——————————————————————————————————————————————————– */

    /**
    Add the new affiliate area link to the “My Account” menu
    if Affiliate WP is enabled and the current user is an affiliate.

    Ensure that the logout link stays at the bottom of the menu
    */
    function moh_add_aff_wp_link_my_account( $items ) {
    if ( function_exists( ‘affwp_is_affiliate’ ) && affwp_is_affiliate() ) {
    $logout = array_pop( $items );
    $items[‘aff’] = ‘Affiliate Area’;
    $items[‘customer-logout’] = $logout;
    }
    return $items;
    }
    add_filter( ‘woocommerce_account_menu_items’, ‘moh_add_aff_wp_link_my_account’ );
    /** ——————————————————————————————————————————————————– */

    // Render the Affiliate WP Content within the new tab if Affiliate WP is enabled

    function moh_aff_wp_content() {
    if ( ! class_exists( ‘Affiliate_WP_Shortcodes’ ) ) {
    return;
    }
    $shortcode = new Affiliate_WP_Shortcodes;
    echo $shortcode->affiliate_area();
    }
    add_action( ‘woocommerce_account_aff_endpoint’, ‘moh_aff_wp_content’ );

    // Make sure that the Affiliate WP tabs properly work

    function moh_filter_aff_tabs( $url, $page_id, $tab ) {
    return esc_url_raw( add_query_arg( ‘tab’, $tab ) );
    }
    add_filter( ‘affwp_affiliate_area_page_url’, ‘moh_filter_aff_tabs’, 10, 3 );
    // *****ENDing the My Account Page Affiliate Menu option addition section*****

    And on line 25 of the functions.php file is shows this:

    /**
    * Renders the affiliate area
    *
    * @since 1.0
    * @return string
    */
    public function affiliate_area( $atts, $content = null ) {

    // Ending line 25 code

    So I’m not sure as to where this error is actually taking place or how to fix it. Any idea?

  8. NnochiriOnye Avatar

    Hey Eric
    Thanks for the code, but unfortunately, the code only add a tab called AFFILIATE to MY ACCOUNT page and when clicked on it, it redirects out of woo MY ACCOUNT page to affiliate area page.
    I coppied the code as you provided it on the post without any modification.

    1. koehlercafe Avatar

      @NnochiriOnye, look for an _blank added somewhere, or make sure it’s rendering the menu item that’s what places the content inside the my account page.

      @eric, I found my issue, the missing arguments in section where it calls for the shortcode for the WP Content rendering the echo request $shortcode->affiliate_area (); is the code, but I had to place this inside the Parenthesis ( $atts, $content = null )

      Here is my corrected code for the function.php file to insert the Affiliate Area Menu item into the My Account Page and is functional according to today’s Version’s standard.

      *****Starting the My Account Page Affiliate Menu option addition section*****
      Add the rewrite endpoint so that we don’t 404 on the new My Account tab
      */
      function moh_add_aff_wp_endpoint() {
      add_rewrite_endpoint( ‘aff’, EP_ROOT | EP_PAGES );
      }
      add_action( ‘init’, ‘moh_add_aff_wp_endpoint’ );
      /** ——————————————————————————————————————————————————– */

      /**
      Add the new affiliate area link to the “My Account” menu
      if Affiliate WP is enabled and the current user is an affiliate.

      Ensure that the logout link stays at the bottom of the menu
      */
      function moh_add_aff_wp_link_my_account( $items ) {
      if ( function_exists( ‘affwp_is_affiliate’ ) && affwp_is_affiliate() ) {
      $logout = array_pop( $items );
      $items[‘aff’] = ‘Affiliate Area’;
      $items[‘customer-logout’] = $logout;
      }
      return $items;
      }
      add_filter( ‘woocommerce_account_menu_items’, ‘moh_add_aff_wp_link_my_account’ );
      /** ——————————————————————————————————————————————————– */

      // Render the Affiliate WP Content within the new tab if Affiliate WP is enabled

      function moh_aff_wp_content() {
      if ( ! class_exists( ‘Affiliate_WP_Shortcodes’ ) ) {
      return;
      }
      $shortcode = new Affiliate_WP_Shortcodes;
      echo $shortcode->affiliate_area();
      }
      add_action( ‘woocommerce_account_aff_endpoint’, ‘moh_aff_wp_content’ );

      // Make sure that the Affiliate WP tabs properly work

      function moh_filter_aff_tabs( $url, $page_id, $tab ) {
      return esc_url_raw( add_query_arg( ‘tab’, $tab ) );
      }
      add_filter( ‘affwp_affiliate_area_page_url’, ‘moh_filter_aff_tabs’, 10, 3 );
      // *****ENDing the My Account Page Affiliate Menu option addition section*****
      /**

      1. NnochiriOnye Avatar

        @koehlecafe, thanks for the reply. But as I mentioned on my first comment, I did not make any change to the code. I just highlight, copy and paste the code. I tried the one you supplied in your reply, but it deactivated the custom plugin I added it to and reported that the code triggered a fatal error.
        More help please.

        1. koehlercafe Avatar

          Do you have a child theme created? If so the child theme folder /wp-content/themes/childtheme/functions.php is where you should add this code. I attempted a customisation plugin (they spelled it that way not me) and it worked for awhile, but decided to move away from a storefront child theme and storefront altogether and picked up another one that was WooCommerce friendly, a lot of my errors started disappearing. Give us a break down of your setup without passing security information to us and let’s see if we can help.

          1. NnochiriOnye Avatar

            Am running sudney theme with a child theme I created using child theme configurator plugin. I added the code on a custom code, which only shows the AFFILIATE menu that redirects to the main affiliate area page.
            Am running latest woocommerce plugin and wordpress.

            To be specific, which exact information do you which to have?

          2. koehlercafe Avatar

            WordPress 4.8.2 running a parent Hestia Theme and a custom Child Theme.
            Plugins I’m running are:
            AffiliateWP v2.1.6
            AffiliateWP – Affiliate Info
            AffiliateWP – Lifetime Commissions
            AffiliateWP MLM
            AffilaiteWP Ranks
            Paid Memberships Pro v1.9.3
            Paid Memberships Pro – Advanced Levels Page Shortcode Add-On
            Paid Memberships Pro – Custom Level Cost Text Add On
            Paid Memberships Pro – Email Templates Add On
            Paid Memberships Pro – WooCommerce Add On
            Paid Memberships Pro – WP Affiliate Platform Integration Add On
            WooCommerce v3.2.1
            WooCommerce Services

            I have some other plugins, but nothing that pertains to the main objective here.

            The code I have in please as stated above in the Child Theme Functions.php file is as follows:

            *****Starting the My Account Page Affiliate Menu option addition section*****
            Add the rewrite endpoint so that we don’t 404 on the new My Account tab
            */
            function moh_add_aff_wp_endpoint() {
            add_rewrite_endpoint( ‘aff’, EP_ROOT | EP_PAGES );
            }
            add_action( ‘init’, ‘moh_add_aff_wp_endpoint’ );
            /** ——————————————————————————————————————————————————– */

            /**
            Add the new affiliate area link to the “My Account” menu
            if Affiliate WP is enabled and the current user is an affiliate.

            Ensure that the logout link stays at the bottom of the menu
            */
            function moh_add_aff_wp_link_my_account( $items ) {
            if ( function_exists( ‘affwp_is_affiliate’ ) && affwp_is_affiliate() ) {
            $logout = array_pop( $items );
            $items[‘aff’] = ‘Affiliate Area’;
            $items[‘customer-logout’] = $logout;
            }
            return $items;
            }
            add_filter( ‘woocommerce_account_menu_items’, ‘moh_add_aff_wp_link_my_account’ );
            /** ——————————————————————————————————————————————————– */

            // Render the Affiliate WP Content within the new tab if Affiliate WP is enabled

            function moh_aff_wp_content() {
            if ( ! class_exists( ‘Affiliate_WP_Shortcodes’ ) ) {
            return;
            }
            $shortcode = new Affiliate_WP_Shortcodes;
            echo $shortcode->affiliate_area( $atts, $content = null );
            }
            add_action( ‘woocommerce_account_aff_endpoint’, ‘moh_aff_wp_content’ );

            // Make sure that the Affiliate WP tabs properly work

            function moh_filter_aff_tabs( $url, $page_id, $tab ) {
            return esc_url_raw( add_query_arg( ‘tab’, $tab ) );
            }
            add_filter( ‘affwp_affiliate_area_page_url’, ‘moh_filter_aff_tabs’, 10, 3 );
            // *****ENDing the My Account Page Affiliate Menu option addition section*****
            /** ——————————————————————————————————————————————————– */

          3. koehlercafe Avatar

            Please post your error messages, compare the lines of code you copied over and make sure there was nothing lost in the copy.

            You’ll have to go line for line and check to ensure everything expression is exact. If the error code is pointing to another file like an includes class file for example like mine did a while back you’ll need to compare those lines as well and see what’s missing.

  9. Amanda Lucas Avatar

    WOW!!!! Thank you SO MUCH!!! This was EXACTLY what I needed! Dropped into my custom PHP file that loads like a plugin 🙂

    FWIW:
    WordPress 4.9.5
    Woocommerce 3.3.4

  10. Chris Avatar

    For others, if you run into an error: Too few arguments to function Affiliate_WP_Shortcodes
    Make sure you pass the required arguments like so:
    echo $shortcode->affiliate_area($content = null);

  11. Muhammad Faizan Haidar Avatar
    Muhammad Faizan Haidar

    Trying To change the referrals amount with in woo-commerce integration in AffiliateWp searching for hook…
    Need help

  12. Ken Jackson Avatar
    Ken Jackson

    So I added the code but when I click the “Affiliate Area” link in My Account (which does have a url of “https://sitename.com/my-account/aff/” it redirects instead to “https://sitename.com/affiliate-area/”. Any way to keep it within My Account instead of it redirecting to the normal affiliate area.

    Any help would be greatly appreciated.

    Ken

  13. Ken Jackson Avatar
    Ken Jackson

    I used your code example above, but when I click on the Affliates Area link it redirects to the Affliates Area page instead of keeping it within the tabs. How can I prevent that from happening?

    Please advise.

    Ken

  14. Paul Avatar

    Hello Eric!

    Nice article! The ONLY ONE with this integration online 🙂

    I’m just having a little issue. The affiliate page is blank when I click on the Affiliate link in the Dashboard. ANy idea as to why? I’m getting this error in the Console (I’m not a developer so I have no way of knowing what to do by editing the code to make it work).

  15. Nicolas Avatar

    Hi Eric!

    The affiliate area shows correctly on my account page but on top it displays this error:

    Warning: Missing argument 1 for Affiliate_WP_Shortcodes::affiliate_area(), called in /srv/users/desarrollo/apps/muscle/public/wp-content/plugins/code-snippets/php/snippet-ops.php(361) : eval()’d code on line 27 and defined in /srv/users/desarrollo/apps/muscle/public/wp-content/plugins/affiliate-wp/includes/class-shortcodes.php on line 26

    Any idea how to solve this?

    Thank you!

  16. Nic Avatar

    Hi Eric,

    Log out button does not work. Any ideas on how to fix it?

    This code really helped a lot.

    Thanks

  17. Jenny Avatar

    Thanks a lot, Eric. I’ve found the way to solve same problem. I will try your guide and tell you how it works.

  18. Leland Avatar
    Leland

    Hey Eric,

    Suddenly the [affiliate_area] and function mentioned above show nothing on the WC account tab. Just blank screen. I can output other content in that same function so it’s related to the shortcode function somehow. Any ideas?

  19. Bob Avatar

    This post sorely needs an update. Wasted a lot of time here with no success. OP remarks in the thread applauding fixes with no code updates. Some commenters code is poorly formatted and riddled with errors. A seasoned post that seems to be the only resource online is worthy of some TLC. Just sayin’.

  20. Jess Avatar

    Thanks so much for this snippet! It’s exactly what I needed to integrate AffiliateWP with the WooCommerce My Account area. I had the same problem others mentioned, with the logout link not working, but Josh’s code worked perfectly for the work around.

    function moh_add_aff_wp_link_my_account( $items ) {
    if ( function_exists( ‘affwp_is_affiliate’ ) && affwp_is_affiliate() ) {
    return array_merge(
    array_slice( $items, 0, count( $items ) – 1 ), array( ‘aff’ => ‘Affiliate Area’ ), array_slice( $items, count( $items ) – 1 )
    );
    }
    return $items;
    }
    add_filter( ‘woocommerce_account_menu_items’, ‘moh_add_aff_wp_link_my_account’ );

    1. Miranda Avatar

      I used the org code and added it via my Snippets plugin. Worked – sort of.

      There’s a link to the Affiliate Area on the My Account page, but the Logout link in the left nav is duplicated, and I’ve tried replacing that bit of code with ALL the options listed in the replies above, but none of them work. The code Jess refers to above (supplied by Josh) doesn’t work. I get a whole whack of syntax errors for this portion of the code:

      array_slice( $items, 0, count( $items ) – 1 ), array( ‘aff’ => ‘Affiliate Area’ ), array_slice( $items, count( $items ) – 1 )

      The Affiliate link also simply redirects to the Affiliate page, and doesn’t open any content on the my account page, which isn’t a big deal. But the duplicate Log Out link (one of which doesn’t work) is a dealbreaker. If anyone knows why this code from Josh worked for Jess but not me, I’d appreciate your thoughts. Thanks!

  21. Awogor Matthew Avatar

    Thank you Eric,

    For me, I discovered the Affiliate area tab appears even though the user haven’t registered for affiliate. Not to leave them stranded on that page, with the help of my friend, I was able to display a custom text that directs them to where to register for affiliates using Javascripts and CSS.

    I’m using Yith woocommerce account page customizer to add the affiliates dashboard tab with the [affiliate-area] shortcode.

    On the Yith Page I entered this codes (I don’t know if comments here supports HTML)

    If you're on this page and not an affiliate of this website, you won't see anything So, Visit the Affiliate Program page to find out more how to participate.
    [affiliate_area]

    Then I used this custom JS to disable the above paragraph from showing to accounts with affiliates approved.

    jQuery(document).ready(function( $ ){

    if($('#affwp-affiliate-dashboard').length){
    $(".customclass").hide();
    }else{
    $(".customclass").css("display", "block");
    }
    });

    I hope this helps

  22. Benny Avatar

    I consolidated some of the comments and made it works on my site

    function moh_add_aff_wp_endpoint() {
    add_rewrite_endpoint( “aff-area”, EP_ROOT | EP_PAGES );
    }
    add_action( “init”, “moh_add_aff_wp_endpoint” );

    function moh_add_aff_wp_link_my_account( $items ) {
    if ( function_exists( “affwp_is_affiliate” ) && affwp_is_affiliate() ) {
    return array_merge(
    array_slice($items, 0, count($items)-1),
    array(“aff-area”=>”Affiliate Area”),
    array_slice($items, count($items)-1 )
    );
    }
    return $items;
    }
    add_filter( “woocommerce_account_menu_items”, “moh_add_aff_wp_link_my_account” );

    // Render the Affiliate WP Content within the new tab if Affiliate WP is enabled
    function moh_aff_wp_content() {
    if ( ! class_exists( “Affiliate_WP_Shortcodes” ) ) {
    return;
    }
    $shortcode = new Affiliate_WP_Shortcodes;
    echo $shortcode->affiliate_area( $atts, $content = null );
    }
    add_action( “woocommerce_account_aff-area_endpoint”, “moh_aff_wp_content” );

    // Make sure that the Affiliate WP tabs properly work
    function moh_filter_aff_tabs( $url, $page_id, $tab ) {
    return esc_url_raw( add_query_arg( “tab”, $tab ) );
    }
    add_filter( “affwp_affiliate_area_page_url”, “moh_filter_aff_tabs”, 10, 3 );

  23. Roel Avatar

    Hey Thanks!

    This is very helpfull. When I open my affilliate page, I don’t get the my account menu next to it (so it seems like it is part of the my account page).

    It opens a separate page now. How do I fix that?

  24. Marcel Brown Avatar

    Benny’s updated code from his comment on October 28, 2020 seems to still work in April of 2022. However, you do need to clean up the text to incorporate the simple double quote before pasting it into your WordPress installation. The “fancy” double-quotes that copy out of this web site cause syntax errors.

  25. Eddie Avatar

    Thanks for this! What is the latest working code as we are near the end of 2023?

Leave a Reply to koehlercafeCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Eric Binnion

Subscribe now to keep reading and get access to the full archive.

Continue reading

Discover more from Eric Binnion

Subscribe now to keep reading and get access to the full archive.

Continue reading