Free Plugin: Bottom Fixed Logo for Divi

July 16, 2019 | Divi, FREE!, PHP, Plugins, Plugins, Wordpress | 3 comments

A couple of weeks ago I saw a request for a fixed logo in the bottom corner of a site on one of the Divi Facebook groups. I had a spare ten minutes so threw together a little plugin for the poster. It seemed quite a cool little thing so I thought I’d share it. This doesn’t interfere with the header logo in any way or change any of the Divi settings. It’s just a supplementary logo in the bottom corner, similar to a live chat icon/bubble so may be usable for custom support or information links. Give it a go and let me know what you think!

There is no interface or settings page although it’s easy enough to edit.. in fact I’ve built in the ability to set your own logo and link in the code. I’ll paste the code below for reference but it’s packaged as a downloadable plugin at the bottom of this post for your convenience.

Download


Bottom Fixed Logo for Divi (121 downloads)

Screenshot

Not wonderful but this shows a logo floating in the bottom right of the browser window. A neat little effect

Code

<?php
/*
Plugin Name: Bottom Fixed Logo for Divi
Description: A basic plugin to show a plugin in the bottom right of the screen
Author: Sean Barton (Tortoise IT)
Author URI: http://www.tortoise-it.co.uk/
Version: 1.1
*/

add_action( 'wp_footer', 'bfl_logo' );

function bfl_logo() {
   if ( ! function_exists( 'et_get_option' ) ) {
      return; //just in case it's not divi
   }

   $html           = $hide_css = '';
   $hide_on_mobile = true;
   $max_width      = 100;
   $logo           = et_get_option( 'divi_logo' );
   $link           = site_url();

   //uncomment this line and change the URL to use a different image and link. Leave link as '' (empty) to not link it anywhere
   //$logo = 'https://www.sean-barton.co.uk/wp-content/uploads/2019/06/Screenshot-2019-06-25-at-09.49.19-200x183.png';
   //$link = 'https://www.sean-barton.co.uk';

   $logo_html = '<img src="' . $logo . '" />';

   if ( $link ) {
      $logo_html = '<a href="' . $link . '">' . $logo_html . '</a>';
   }

   if ( $hide_on_mobile ) {
      $hide_css = '@media screen and (max-width: 768px) {
                  .bfl_container {
                     display: none;
                  }
               }';
   }

   $html .= '<div class="bfl_container">' . $logo_html . '</div>';

   $html .= '<style>
         .bfl_container {
            position: fixed;
            bottom: 5%;
            right: 5%;
            z-index: 99999;
         }  
         
         .bfl_container a, .bfl_container img {
            display: block;
            border: none;
            ' . ( $max_width ? 'max-width: ' . $max_width . 'px;' : '' ) . '
         }
         
         ' . $hide_css . '
   </style>';

   echo $html;
}

?>

A Donate Button!

3 Comments

  1. Randy

    Cool idea. Looks good. But . . . .
    You knew that was coming, right?
    I am using a logo with white and red lettering.
    MOST of my site BG is white so only the red shows up.
    Then, when I get to the black footer, where it really looks good,
    the log sits under part of my “Move to top” button.
    So, to be truly effective, I need to be able to select a different version of my log
    and move it around somewhat.

    I guess that sounds like too much work for a freebie, eh?

    Reply
    • Sean Barton

      Nice and easy, edit the code and you’ll see I commented out the line where you can add your own url. Just uncomment it and add your logo url and it should work.

      Reply
  2. Robert Kash

    Hi Sean,
    Great Ideas!!!

    Firstly, thanks for your sharing article. I am a beginner WordPress developer. I have read this post. The title sounds very easy & effective for web development. I’m using a logo with white and red lettering. I want to more tips about plugins. Can you help me?

    Thank You!!!
    –Robert

    Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

CommentLuv badge

Stay in touch!

Page Builder Cloud

Page Builder Cloud

A truly universal template library for WordPress Page Builders.

Page Builder Recommendation

Elementor Banner

We are BIG fans of the Elementor page builder. Give it a look!

About this site and Sean Barton

Picture of Sean
Sean Barton is a Freelance PHP Website Developer in Crewe, Cheshire. He is a Wordpress and CMS/Framework specialist and Co-Founder of Page Builder Cloud.
This site was set up in 2008 as a tutorial and scripting resource for the PHP language and Wordpress.
Find out more about Sean on the About Me page or use the Hire Me page to get in touch. For more information about Sean's work take a look at the Portfolio

Our Services

  • Wordpress plugin/theme development
  • Divi specialist
  • Ecommerce (Woocommerce, WPSC, Shopify, Magento)
  • PSD to Wordpress theme conversion (Responsive)
  • Website design work (Banners, Logos, Full Site, etc)
  • Website analysis (security, usability, SEO)
  • API Integrations (InfusionSoft, SalesForce, Ontraport, Customer Thermometer, etc..)
  • Wordpress consultancy & expert advice
  • Crisis support
  • Website hosting

The main services offered are Wordpress based although we do a great deal of technical programming for bespoke systems. From troubleshooting, extending frameworks, finding bugs to writing them from scratch.

Find out more by looking through our past projects or get a quote.

Be the first to hear about new products/updates!

This is a mailing list for those people interested in being told when we release a new product (Divi plugin or Theme).

We shall also use this list to let you know about product updates and releases.

You have Successfully Subscribed!