Home>Support>Onclick content in footer

Onclick content in footer

Hello,

first I want to thank you for this wonderful theme.

I’m wondering if it’s possible to get onclick content in the footer (I couldn’t find something like this in the widgets either)?

I would like to put my disclaimer and the privacy policy into the footer and to let the user open it with onclick.

You can see an example here: http://www.kolle-rebbe.de/
Click on Impressum / Datenschutz.

I found this jquery method (http://www.elmastudio.de/programmierung/webseiten-elemente-mit-jquery-auf-und-zusliden/) online but I’m wondering if it would brake the theme code.

Thanks for your help

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Hi Alexander

    I’m not sure but you could definitely give it a try.

    Put this under Appearance > Custom CSS:

    a.open-close {
    	margin:0px;
    	padding:15px;
    	text-align:center;
    	background:#FF9933;
    	font-size:14px;
    	font-weight:700;
    	text-transform:uppercase;
    	display:block;
    	color:#fff;
    	text-decoration:none;
    }
    a.open-close:hover {
    	background:#FF0000;
    }
    #content {
    	width:460px;
    	margin:0px;
    	background:#FFFF99;
    	padding:20px;
    	color:#663300;
    	line-height:23px;
    }
    

    Put this into the interface provided by this plugin: https://wordpress.org/plugins/header-and-footer-scripts/

    <script type="text/javascript"> 
    $(document).ready(function(){
        	$("#content").hide();
    
        $("a.open-close").click(function () {
          $("#content").slideToggle("slow");
        });
    
    });
    </script>
    

    Put this into Appearance > Theme Settings > General: Site Information Text:

    <div id="content">
    Dein Inhalt kommt hier rein...
    
    
    </div>
    <a class="open-close" href="#">Open / Close</a>
    

    We’re not doing the tutorial step one as WordPress has jQuery running already.

    Let us know how it goes.

  2. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    You could also try a plugin to do this job:

    https://wordpress.org/plugins/wp-showhide/

  3. 9 years, 9 months ago Alexander Hecht

    Hello Andrew,

    thanks for your fast response.

    The custom CSS somehow affected the whole site, not just he footer.

    The plugin is very nice. I tried 5 or 6 yesterday but none was as good as this. With some adjustment or this additional plugin:

    https://wordpress.org/plugins/better-wordpress-showhide-elements/
    http://akenn.org/projects/wp-showhide/

    it fits my needs perfectly.

    Thanks for your help!

  4. 9 years, 9 months ago Andrew Misplon
    Hi, I Work Here

    Awesome, glad that worked. You can think of your development process as:

    Theme Settings
    Plugins
    Custom CSS
    Child Theme/Custom Development

    As you down the list the work gets harder. So if you can achieve functionality with a plugin that’s always a win.

    All the best!

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More