Wednesday 30 January 2013

Twenty twelve footer widgets tutorial, wordpress

from: http://zeaks.org/tutorials/twenty-twelve-footer-widgets-tutorial/


Twenty Twelve – Footer Widgets Tutorial

Adding footer widgets to Twenty Twelve theme, Part Two of a five part series on Modifying Twenty Twelve theme. If you’ve read the first part of this tutorial, we added a second sidebar, created a custom body class and designed a few three column layouts to choose from.
If you’re just now starting this tutorial, feel free to download the free Twenty Twelve blank child theme to begin creating your own theme. Each section of this tutorial is independent and can be done individually, so you can use what you want of it and in any order.
We’ll be editing three files
functions.php
style.css
footer.php
The first thing to do is to copy footer.php from the Twenty Twelve directory into your child theme folder.

Adding Footer Widget Areas

In the last tutorial we added a new sidebar (widget area), we’ll be adding three more widget areas but this time they will display within the footer area of our theme.
If you’ve done the last tutorial the following code can be placed just before this line
}
add_action( 'widgets_init', 'mytheme_widgets_init' );
If you’re just starting now, simply add it to your functions.php after the opening php tag.
    // Register footer widgets
    register_sidebar( array(
        'name' => __( 'Footer Widget One', 'mytheme' ),
        'id' => 'sidebar-5',
        'description' => __( 'Found at the bottom of every page (except 404s and optional homepage template) Left Footer Widget.', 'mytheme' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget' => '</aside>',
        'before_title' => '<h3 class="widget-title">',
        'after_title' => '</h3>',
    ) );

    register_sidebar( array(
        'name' => __( 'Footer Widget Two', 'mytheme' ),
        'id' => 'sidebar-6',
        'description' => __( 'Found at the bottom of every page (except 404s and optional homepage template) Center Footer Widget.', 'mytheme' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget' => "</aside>",
        'before_title' => '<h3 class="widget-title">',
        'after_title' => '</h3>',
    ) );

    register_sidebar( array(
        'name' => __( 'Footer Widget Three', 'mytheme' ),
        'id' => 'sidebar-7',
        'description' => __( 'Found at the bottom of every page (except 404s and optional homepage template) Right Footer Widget.', 'mytheme' ),
        'before_widget' => '<aside id="%1$s" class="widget %2$s">',
        'after_widget' => "</aside>",
        'before_title' => '<h3 class="widget-title">',
        'after_title' => '</h3>',
    ) );
This will register three widget areas. Just like the sidebar we added last time, each widget area has it’s own ID. Twenty Twelve has three widget areas with IDs sidebar-1, sidebar-2 and sidebar-3, since the extra sidebar we added used the ID sidebar-4, we’ll continue from there with 5,6 and 7.
The order these widget areas show up in Appearance > Widgets can be changed, but it involves de-registering the default widgets then adding them back in our own order. This also causes issues with a particular full-width body class in twenty Twelve. It can be done, I’ve done it in Twenty Plus Pro, but it’s really more work than it’s worth, so I’m not including it.
Save functions.php and close it. If you check Appearance > Widgets you should notice three new widget areas. Go ahead and place widgets in them, I usually put calendar widgets as they are the widest widgets available and work nicely for testing.
Don’t worry if you don’t see them on the front page, we still need to add them to our template files.

Add Widgets to Footer.php

Open footer.php that you copied to your child theme folder and find the line that reads..
<footer id="colophon" role="contentinfo">
Directly under this line add the following code
<?php
    /* footer sidebar */
    if ( ! is_404() ) : ?>
        <div id="footer-widgets" class="widget-area three">
            <?php if ( is_active_sidebar( 'sidebar-5' ) ) : ?>
                <?php dynamic_sidebar( 'sidebar-5' ); ?>
            <?php endif; ?>

            <?php if ( is_active_sidebar( 'sidebar-6' ) ) : ?>
                <?php dynamic_sidebar( 'sidebar-6' ); ?>
            <?php endif; ?>

            <?php if ( is_active_sidebar( 'sidebar-7' ) ) : ?>
                <?php dynamic_sidebar( 'sidebar-7' ); ?>
            <?php endif; ?>
        </div><!-- #footer-widgets -->
<?php endif; ?>
Save and close footer.php.
This calls each of the widget areas we registered in functions.php. Notice each one uses the same ID as we used when we registered them. Now your widgets should show up on your website, but we still need to style them.

Style Footer Widgets

Open style.css in your child theme and add the following code to it.
/* ===[ Footer Widget Areas ]=== */

#footer-widgets {
    width: 100%;
    border-top: none;
}
#footer-widgets .widget li { list-style-type: none; }

.template-front-page #footer-widgets { padding-top: 0; }

@media screen and (min-width: 600px) { 
    #footer-widgets.three .widget {
        float: left;
        margin-right: 3.7%;
        width: 30.85%;
    }
    #footer-widgets.three .widget + .widget + .widget { margin-right: 0; }
}
The first bit of code simply tells the entire footer widget area to display 100% wide, each widget area within that is 30.85% wide with a 3.7% right margin. This gives us our basic layout, a lot like Twenty Eleven used.
We also placed the CSS within an @media conditional, so the widgets will display like this only if viewed on a desktop.
Next we need to add CSS for IE8 and IE7, below what we’ve just added copy and paste this.
/* for IE8 and IE7 */
.ie #footer-widgets.three .widget {
    float: left;
    margin-right: 3.7%;
    width: 29.85%;
    clear: none;
}
.ie #footer-widgets.three .widget + .widget + .widget { margin-right: 0; }
It’s basically the same as above, but we’ve made the widget areas slightly more narrow 29.85% so they look good in IE.
Since Twenty Twelve includes a homepage template with 2 footer widgets already, we won’t display these ones on that particular template, so using a CSS conditional, we’ll hide them for that page.
/* Hide footer widgets Homepage Template */
.template-front-page #footer-widgets { display: none; }
Your new footer widgets should now look just about perfect, here’s a screenshot of how they should look.
Twenty Twelve - Footer Widgets
There’s one last thing I’ll add to this tutorial, it’s a small fix for the default Homepage Template widgets in IE8.
If you view the Twenty Twelve Official Demo in IE8 you should notice the footer widgets stack on top of each other. They don’t in IE7 or IE9 and 10, only in IE8, so here’s a fix for that. It’s entirely up to you if you want to add it or not.
/* ===[ IE Homepage Template Widget fix ]=== */
.ie .template-front-page .first.front-widgets,
.ie .template-front-page.two-sidebars .widget-area .front-widgets {
    float: left;
    margin-bottom: 24px;
    width: 51.875% ;
}
.ie .template-front-page .second.front-widgets { clear: right; }
.ie .template-front-page .first.front-widgets,
.ie .template-front-page.two-sidebars .widget-area .front-widgets + .front-widgets {
    float: right;
    margin: 0 0 24px;
    width: 39.0625% ;
}
.ie .template-front-page.two-sidebars .widget,
.ie .template-front-page.two-sidebars .widget:nth-child(even) { float: none; }
.ie .template-front-page .widget-area { clear: both; }

.ie .template-front-page .widget {
    width: 100% !important;
    border: none;
}
.ie .template-front-page .first.front-widgets { 
    width: 51.875%;
    float: left ;
}
.ie  .template-front-page .second.front-widgets {
    width: 39.0625%;
    float: right ;
}
You can view the theme so far on Github where I’ll be updating this as the tutorial continues.
I hope you enjoyed this tutorial and let me know how your theme turned out by leaving a comment!










Gilmon D. Bernal

how to move left to right, the content page and side bar onTwenty Twelve --- wordpress theme


 1. got to theme folder, select style.css

wordpress\wp-content\themes\twentytwelve



2. select: style.css


 .site-content {
        float: left;
        width: 65.104166667%;

change to:

.site-content {
        float: right;
        width: 65.104166667%;



----------------------------------------------------------
    .widget-area {
        float: left;
        width: 26.041666667%;

 change to:

    .widget-area {
        float: right;
        width: 26.041666667%;









Gilmon D. Bernal

Tuesday 29 January 2013

wordpress Dynamic Headers

http://wordpress.org/extend/plugins/dynamic-headers/installation/


These are the directions for the install. Be sure to read Directions for Use before using.
  1. Upload 'the custom-header' directory to your plugins directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Create the directory wp-content/header-images/ and make it writable (777). Don't worry if your wp-content directory is in an
  4. Read the Other Notes page for Directions for Use. These directions are also contained in the plugin.

Creating a Static Front Page

Creating a Static Front Page 

 

Creating a virtual static front page does not require editing or coding of files or templates. Using the default configuration for a "static front page" in WordPress does not remove the sidebar or change the look of the entire site, just the content area.
To create the static front page, go to the WordPress Administration Panels.
  1. Create two WordPress Pages from the "Add New Page" panel. If you will not be using WordPress blogging functionality, you can skip the second page.
    • Title the first page "Home" (or another name) as your "static" front page.
      1. Set the "Home" template to the default template or any custom template. Do not title your template home.php as this could cause a conflict.
      2. Add content you would like to see within the content area of the "Home" page.
      3. Publish the Page.
    • Title the second page "Blog" (or you could call it "News", "Articles", etc.). This page will be a place-holder for showing the Posts on your site.
      1. Do not use a custom Page template for this page! home.php or index.php will be used to generate this page.
      2. DO NOT add content to the Blog Page. Leave it blank. Any content here will be ignored -- only the Title is used.
      3. Publish the Page.
  2. Go to Administration > Settings > Reading panel.
    Reading panel
    1. Set 'Front page displays:' to 'a static page' and choose the first page you created above for 'Front page.' If your WordPress site will contain a blog section, set 'Posts page' to the page you created for this above. Otherwise, leave this blank.
    2. Save changes.
  3. Enable "Permalinks" to show the "page title" in the address, since /index.php?p=423 defeats the purpose of making a static front page. 



http://codex.wordpress.org/Creating_a_Static_Front_Page

 

WORDPRESS WIDGETS

http://wordpress.org/extend/plugins/dynamic-widgets/installation/




Dynamic Widgets gives you full control on which pages your widgets will appear. It lets you dynamicly show or hide widgets on WordPress pages. 


Installation of this plugin is fairly easy:
  1. Unpack dynamic-widgets.zip
  2. Upload the whole directory and everything underneath to the /wp-content/plugins/ directory.
  3. Activate the plugin through the 'Plugins' menu in WordPress.
  4. Visit the Dynamic Widgets Configuration page (settings link).
  5. Edit the desired widgets.

















Gilmon D. Bernal

WORDPRESS TIPS:





  1. Install Slideshow either via the WordPress.org plugin directory, or by uploading the files to your server.
  2. After activating Slideshow, click on 'Slideshows' and create a new slideshow.
  3. Click on 'Insert Image Slide' to insert an image slide, a popup will appear where you can search for the desired image. Insert the image by clicking 'Insert'. The same goes for text and video slides, don't forget to save!
  4. Go to a post or a page and click the 'Insert Slideshow' button above the editor. A popup appears where you can select your newly created slideshow to insert. You can also use the shortcode or code snippet visible in your slideshow admin panel to deploy your slideshow anywhere on your website. Use the widget to show any of your slideshows in the sidebar of your website.




http://wordpress.org/extend/plugins/slideshow-jquery-image-gallery/installation/