Wednesday 17 December 2014

Wordpress: How to set thumbnail image for a child theme

Create image file in PNG Format having name screenshot.png and save it in themes root folder.The recommended image size is 880x660. Even recommended image size is 880x660 though it will only be shown as 387x290 but the double-sized image allows for high-resolution viewing on HiDPI displays.
For more information see this page.
If you don’t already have a screenshot of your theme, You can create one easily by following below steps:
  1. Point your browser to the blog currently using the theme.
  2. Press the Print Screen button on the keyboard.
  3. Open a new file in Photoshop.
  4. Change the size to 300 by 225 (in pixels)
  5. Press Ctrl + v or Right click > Paste.
  6. With the Move tool activated, resize the screenshot to in the 600 x 450 space.
  7. Go to File > Save for Web…
  8. Save it as a PNG file.
  9. Name it screenshot.
  10. Place your image file in the theme’s folder.

Wordpress: How to install child theme


  1. Open the file manager from your hosting (bluehost) cPanel
  2. Go to folder, wp-content->themes
    • Create a folder, with the same name - child. For example for mystile theme, folder name will be: mystile-chile
      • Copy the style.css file from the main theme folder, and edit the style.css folder
        1. Change the Theme name to Mystile Child Theme
        2. Add a line, Template: mystile (parent theme name). Template name is case sensitive. The name should according to the folder name.
        3. Import the styles from the parent theme
        4. You can add your customized css style
      • Copy the header.php,  footer.php or any other files if necessary into the child theme folder. Never copy function.php file. If you copy function.php file you will see blank page.
  3. Now go back to your wordpress admin, wp-admin
    1. In the Appearance->Themes you will see new theme name mystile-child
/*
Theme Name: Mystile Child Theme
Theme URI: http://www.woothemes.com/
Version: 1.3.0
Description: Designed by <a href="http://www.woothemes.com">WooThemes</a>.
Author: WooThemes
Author URI: http://www.woothemes.com
Tags: woothemes
Template: mystile

Copyright: (c) 2009-2011 WooThemes.
License: GNU General Public License v2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html

*/
/* =Imports styles from the parent theme
-------------------------------------------------------------- */
@import url('../mystile/style.css');

/* =Theme customization starts here
-------------------------------------------------------------- */
head + body{
background: url("http://www.bestcarpets.co/wp-content/uploads/2014/06/body-bg-retina-wood.jpg");
background-position: center center;
padding: 0 13%;
}
/*
body.term-carpets{
background: url("http://www.bestcarpets.co/wp-content/uploads/2014/05/body-background1.jpg");
background-position: center center;
padding: 0 10%;
}
*/