Site5

Menu

Support Forums

Two footer.php files for one multisite install?

Home Forums SimpleCorp Two footer.php files for one multisite install?

Tagged: 

This topic contains 42 replies, has 6 voices, and was last updated by  liuchunkai 1 day, 20 hours ago.

Viewing 15 posts - 1 through 15 (of 43 total)
  • Author
  • #10756

    adcronkright
    Participant

    Hey y’all,

    Getting my footer set-up somewhat how I want it, placing shout-outs and credits down with the copywrite info, instead of in the footer widget area. Accomplished this by typing the text and links into footer.php. Problem is, I want to have my site in both English and Spanish, but the footer.php applies to both my multi-site sites (english and spanish). Is it possible for me to have separate footer.php files for the English and Spanish sites on the same install? Or, how else could I solve this?


    democracyinpractice.org

    Thanks,
    Adam

    #10765

    Guido
    Participant

    So you have the same SimpleCorp for both sites? (= WordPress multi-site)

    So the left part of your footer = Theme Options > footer?

    And the right part is hardcoded in file footer itself?

    Guido

    #10869

    adcronkright
    Participant

    Hey Guido, sorry for the delay:

    Both parts were actually hardcoded into footer.php (code below). I tried copying them with their code into Theme Options > footer but there are no breaks in any of the text (it ends up being just one long line), the coding gets erased from Theme Options > footer, and the image does not show…

    Adam

    <!-- begin #copyright -->
    				<div id="copyrights">
    					<div class="container clearfix">
    						
    						<?php if(of_get_option('sc_footer_copyright') == '') { ?>
    						<div style="float: left; float: bottom;">	
    						© All Rights Reserved<br>
    						Democracy In Practice
    						</div>
    						<div style="float: left; position: absolute; bottom: 0px; right: 150px; text-align: right;">
    						Powered by <a href="http://wordpress.org/" title="WordPress">WordPress</a> <span class="amp">&</span> <a href="http://www.site5.com" title="SimpleCorp">SimpleCorp</a>
    						<?php } else { ?>
    						<?php echo of_get_option('sc_footer_copyright')  ?>
    						<?php } ?>
    						<!-- Site5 Credits-->
    						<br>Created by <a href="http://www.s5themes.com/">Site5 WordPress Themes</a><br>Experts in <a href="http://gk.site5.com/t/568">WordPress Hosting</a> 
    						<br>Cooperative Web Hosting by<br><img src="/www/wp-content/themes/simplecorp1/library/images/gaiahost_shell_gray16x16.gif"/> <a href="http://www.gaiahost.coop">Gaia Host Collective</a>
    						</div>
    						<div style="float: right; position: absolute; bottom: 0px; right:0px; margin-bottom: -25px;">
    						<a href="http://teamlab.com?campaign=nonprofit" target="_blank" style="cursor: pointer;" rel="me nofollow"><img alt="Coordinate Projects Around the World" title="Coordinate Projects Around the World" src="/www/wp-content/themes/simplecorp1/library/images/Teamlab2.png"/></a>
    						</div>
    						
    				</div>
    				<!-- end #copyright -->
    #10874

    Guido
    Participant

    I guess this is possible, we need to attach all lines that are located in footer to the translationfile. Can do that.

    First I want to know if you still want the extensive cedits on the right side? Why not only for example ‘Created by Site5 WordPress Themes’ on the rightside?

    Guido

    #10875

    adcronkright
    Participant

    Yea, thad be much less cluttered… since it is a free template, I didn’t know if I was allowed to delete any credits.

    #10878

    Guido
    Participant

    First, never use style in php, style there = not clean. Style can be added in stylesheet or Theme Options > Custom CSS. You should add a div class to each of the 2 blocks (on rightside and on leftside) and attach the style to that class. When I display the code you will see what I mean.

    You want it to be like at your site, so with site5credits + image on the rightside and the ‘all rights reserved’ on the leftside?

    Guido

    #10880

    adcronkright
    Participant

    Good to know – when I’ll be sure to set aside some time to get ride of all styling in my php files.

    I made some changes – and I’d like it to be like it is NOW on my site – so that everything is over to the rightside. The spacing and everything just as you see it…

    Donno if it is helpful at all, but here is the code from footer.php and from main-css.css that I used to jimmy-rig it to be the way you see it:

    footer.php

    <!-- begin #copyright -->
    				<div id="copyrights">
    					<div class="container clearfix">
    						
    						<?php if(of_get_option('sc_footer_copyright') == '') { ?>
    						<div style="float: left; position: absolute; bottom: 5px; right: 170px; text-align: right;">
    						© All Rights Reserved<br>
    						Democracy In Practice<br>
    						<?php } else { ?>
    						<?php echo of_get_option('sc_footer_copyright')  ?>
    						<?php } ?>
    						<!-- Site5 Credits-->
    						<br>Created by <a href="http://www.s5themes.com/">Site5 WordPress Themes</a>
    						<br>Cooperative Web Hosting by<img src="/www/wp-content/themes/simplecorp1/library/images/gaiahost_shell_gray16x16.gif"/> <a href="http://www.gaiahost.coop">Gaia Host Collective</a>
    						</div>
    						<div style="float: right; position: absolute; bottom: 0px; right:0px; margin-bottom: -25px;">
    						<a href="http://teamlab.com?campaign=nonprofit" target="_blank" style="cursor: pointer;" rel="me nofollow"><img alt="Coordinate Projects Around the World" title="Coordinate Projects Around the World" src="/www/wp-content/themes/simplecorp1/library/images/Teamlab2.png"/></a>
    						</div>
    						
    				</div>
    				<!-- end #copyright -->

    main-css.css

    #footer{
       width: 1020px;
       padding: 30px 0px 0;
       margin:0px;
       height: auto;
       background: #333;
       color: #ffffff;
    }
    #footer h4 {   
    	color: #9dcedf; 
    	font-size: 18px;   
    	line-height: 24px;
    	margin-top: -65px;
    }
    #copyrights{
       width: 1020px;
       padding: 30px 0px;
       color: #fff;
       margin-left: 0px;
       background: #333;
       float:none;
       border-top: 1pt solid #ffffff;
       padding-top: 135px;
    }
     #copyrights .right {   float: right }
     #copyrights a {   color: #9dcedf }
     #copyrights a:hover {   text-decoration: underline }
     .backtotop{
    	float:right;
    	text-align:center;
    	background:#ffffff;
    	height:20px;
    	width:20px;
    	border-radius:2px;
    	-moz-border-radius:2px;
    	webkit-border-radius:2px;
    	margin-right:-10px;
    	margin-left:10px;
    	margin-top: 20px;
     }
    .backtotop:hover{background:#ffffff;}
    #footer{padding: 0;}

    Adam

    • This reply was modified 4 years, 2 months ago by  adcronkright.
    #10882

    Guido
    Participant

    Are you sure, I liked the part on the right more.

    I will add the code shortly, but still 2 questions.

    1) do you want the link to Gaia Webhosting in footer?
    2) do you want the ‘link to top’ back in footer? (you did remove it there)

    Guido

    #10883

    adcronkright
    Participant

    Hey, by that do you mean you liked it when the text was closer to the teamlab icon? I’ve moved it over 10px… what do you think?

    Also added a line of credits

    1) Yea the link to Gaia Webhosting get’s us 10% off and gives a shoutout to a democratically managed, worker-owned web-hosting cooperative, so we want to keep that there.
    2) I like the ‘link to top’ up in the footer widgets area… what do you think?

    Adam

    #10884

    adcronkright
    Participant

    And Guido, how hard is this translation file going to be to edit? If later-on I want to put our address and phone number neatly on the left side of the copywrite area, is that something I’ll be able to do? Or is it the kinda thing where if I want it to be there and translatable? I better do it now?

    Up-to-date code:

    footer.php

    <!-- begin #copyright -->
    				<div id="copyrights">
    					<div class="container clearfix">
    						
    						<?php if(of_get_option('sc_footer_copyright') == '') { ?>
    						<div style="float: left; position: absolute; bottom: 0px; right: 160px; text-align: right;">
    						© All Rights Reserved<br>
    						Democracy In Practice<br>
    						<?php } else { ?>
    						<?php echo of_get_option('sc_footer_copyright')  ?>
    						<?php } ?>
    						<!-- Site5 Credits-->
    						<br>Graphic art by Julian Morales
    						<br>Created by <a href="http://www.s5themes.com/">Site5 WordPress Themes</a>
    						<br>Cooperative Web Hosting by <img src="/www/wp-content/themes/simplecorp1/library/images/gaiahost_shell_gray16x16.gif"/> <a href="http://www.gaiahost.coop">Gaia Host Collective</a>
    						</div>
    						<div style="float: right; position: absolute; bottom: 0px; right:0px; margin-bottom: -15px;">
    						<a href="http://teamlab.com?campaign=nonprofit" target="_blank" style="cursor: pointer;" rel="me nofollow"><img alt="Coordinate Projects Around the World" title="Coordinate Projects Around the World" src="/www/wp-content/themes/simplecorp1/library/images/Teamlab2.png"/></a>
    						</div>
    						
    				</div>

    main-css.css

    #footer{
       width: 1020px;
       padding: 30px 0px 0;
       margin:0px;
       height: auto;
       background: #333;
       color: #ffffff;
    }
    #footer h4 {   
    	color: #9dcedf; 
    	font-size: 18px;   
    	line-height: 24px;
    	margin-top: -65px;
    }
    #copyrights{
       width: 1020px;
       padding: 30px 0px;
       color: #fff;
       margin-left: 0px;
       background: #333;
       float:none;
       border-top: 1pt solid #ffffff;
       padding-top: 145px;
    }
     #copyrights .right {   float: right }
     #copyrights a {   color: #9dcedf }
     #copyrights a:hover {   text-decoration: underline }
     .backtotop{
    	float:right;
    	text-align:center;
    	background:#ffffff;
    	height:20px;
    	width:20px;
    	border-radius:2px;
    	-moz-border-radius:2px;
    	webkit-border-radius:2px;
    	margin-right:-10px;
    	margin-left:10px;
    	margin-top: 20px;
     }
    .backtotop:hover{background:#ffffff;}
    #footer{padding: 0;}
    #10886

    adcronkright
    Participant

    Or if I want to, will I be able to put ‘Created by Site5 WordPress Themes and “Guido”‘? 😉

    #10887

    Guido
    Participant

    In my code I still have two blocks, check it out.
    Oh, you need to re-index your translationfile as well to load the textlines I’ve added in footer.

    Theme Options > Custom CSS:

    
    #footer .block-right {float:right;}
    #footer .block-left {float:left;}
    

    And this is the new copyright code:

    
    				<!-- begin #copyright -->
    				<div id="copyrights">
    					<div class="container clearfix">
    
    						<div class="block-right">
    							<p><a href="http://teamlab.com?campaign=nonprofit" target="_blank" style="cursor: pointer;"><img alt="<?php _e("Coordinate Projects Around the World", "site5framework"); ?>" title="<?php _e("Coordinate Projects Around the World", "site5framework"); ?> " src="/www/wp-content/themes/simplecorp1/library/images/Teamlab2.png"/></a><p>
    							<p><?php _e("Cooperative Web Hosting by ", "site5framework"); ?> <img src="/www/wp-content/themes/simplecorp1/library/images/gaiahost_shell_gray16x16.gif"/> <a href="http://www.gaiahost.coop" target="_blank"  title="Gaia Host Collective">Gaia Host Collective</a><p>
    						</div>
    
    						<div class="block-left">
    							<p>© <?php _e("All Rights Reserved", "site5framework"); ?> <?php bloginfo('name'); ?></p>
    							<p><?php _e("Created by ", "site5framework"); ?> <a href="http://www.s5themes.com/" target="_blank" title="Site5 WordPress Themes">Site5 WordPress Themes</a></p> 
    							<p><?php _e("Graphic art by Julian Morales", "site5framework"); ?><p>  
    						</div>
    
    					</div>
    				</div>
    				<!-- end #copyright -->
    
    #10888

    Guido
    Participant

    I notice the copyright symbol is displayed incorrect in my code, it should be: & copy ; (without whitespaces)

    You don’t have to add my name. But you can take a look at my own WordPress theme and rate it ;-):
    http://wordpress.org/themes/shipyard

    (second theme will be added within a week)

    Guido

    #10889

    adcronkright
    Participant

    Hey Guido, entered your code into my footer.php file to replace the old code. Entered the two lines into Theme Options > Custom CSS. But it isn’t quite looking right. Do I need to revert all the #copyrights code in my main-css.css file to the original? Do I need to add style to .block-right and .block-left?

    Also, is translationfile my spanish .po file?

    Adam

    #10890

    Guido
    Participant

    You should remove your own custom copyright code. So put back default code. I guess you’ve added a lot of margin/padding there?

    No, you don’t have to style the 2 blocks, because I’ve added paragraphs symbols to them they have some style already.

    Yes, that’s the file I mean. Re-index that one via the CodeStyling Localization plugin and add the Spanish translation.

    Guid

Viewing 15 posts - 1 through 15 (of 43 total)

You must be logged in to reply to this topic.