How are the new developer brothers: P? Today appeared in Part II of WordPress coding. That's because the last episode did not post all knew better. Today, I write about what it's tuned to see the name of the tune could understand. Yes, I'll show you how a WordPress theme that will add three hours footer columns. Many people do it and are successful, others are not.
See this picture .........
Let's do it. First choose a theme where there is no footer columns. At the three of us will have to do this step.
function.php code placement on.
footer.php on code placement.
The placement of stylesheet.
Step 1: You will need to register dynamic widget area. Copy the following code for the function in the functions.php paste?> Before the tag.
Techtunes Code hailaitara - Double-click on the code, copy the code to 12345678910111213141516171819202122232425262728293031323334/* REGISTER WIDGETS ------------------------------------------------------------*/
if
(function_exists(
'register_sidebar'
)) {
register_sidebar(
array
(
'name'
=>
'Footer Widget 1'
,
'id'
=>
'footer-1'
,
'description'
=>
'First footer widget area'
,
'before_widget'
=>
'<div id="footer-widget1">'
,
'after_widget'
=>
'</div>'
,
'before_title'
=>
'<h2>'
,
'after_title'
=>
'</h2>'
,
));
register_sidebar(
array
(
'name'
=>
'Footer Widget 2'
,
'id'
=>
'footer-2'
,
'description'
=>
'Second footer widget area'
,
'before_widget'
=>
'<div id="footer-widget2">'
,
'after_widget'
=>
'</div>'
,
'before_title'
=>
'<h2>'
,
'after_title'
=>
'</h2>'
,
));
register_sidebar(
array
(
'name'
=>
'Footer Widget 3'
,
'id'
=>
'footer-3'
,
'description'
=>
'Third footer widget area'
,
'before_widget'
=>
'<div id="footer-widget3">'
,
'after_widget'
=>
'</div>'
,
'before_title'
=>
'<h2>'
,
'after_title'
=>
'</h2>'
,
));
}
- 2. Register the end of your widget area. Now you have your website desbordth> Apperence> widget allows you to view the comments area. If you can not see on the widget is the widget you want to see the bride because it does not say: P.
- So we'll call you to show the widget in footer.php. Copy the code below and paste it on the footer.php. Sufficient if the copyright text to paste before. Take a look at the picture is closed
Techtunes Code hailaitara - Double-click on the code, copy the code to 123456789101112131415161718<div id=
"footer-widgets"
>
<div id=
"footer-widget1"
>
<?php
if
( !function_exists(
'dynamic_sidebar'
) || !dynamic_sidebar(
'footer-1'
) ) : ?>
<? Php
endif
; ?>
</ Div>
<div id=
"footer-widget2"
>
<?php
if
( !function_exists(
'dynamic_sidebar'
) || !dynamic_sidebar(
'footer-2'
) ) : ?>
<? Php
endif
; ?>
</ Div>
<div id=
"footer-widget3"
>
<?php
if
( !function_exists(
'dynamic_sidebar'
) || !dynamic_sidebar(
'footer-3'
) ) : ?>
<? Php
endif
; ?>
</ Div>
</ Div>
<div style=
"clear-both"
></div>
Techtunes Code hailaitara - Double-click on the code, copy the code to 123456789101112131415161718192021222324252627#footer-widgets {
display: block;
width:950px;
margin-right:0;
background: #ffffff;
}
#footer-widget1 {
width: 260px;
float: left;
margin: 15px 10px 10px 30px;
padding: 10px;
background-color: #ffffff;
}
#footer-widget2 {
width: 260px;
float: left;
margin: 15px 10px 10px 15px;
padding: 10px;
background-color: #ffffff;
}
#footer-widget3 {
width: 260px;
float: left;
margin: 15px 10px 10px 15px;
padding: 10px;
background-color: #ffffff;
}
Now go to your theme's widget.There you can see the footer widget 1,2,3.Keep your widget over there now and see your site like This can be seen.
No comments:
Post a Comment