Date specific header image in the Witcher World WordPress theme

Have you ever wanted to display specific images on certain dates in the header of your WordPress page like Google does?

If you want to automatically set the header image based on the date there is an easy way to do it. This way you can display a prepared image on certain dates like Independence Day, your birthday, or as in this example on the International Women’s Day, March 8th.

In the original Witcher World WordPress theme there are two ways to display header images: one selected image or a random image from multiple uploaded header images.

If you have access to your site via FTP and are not afraid of changing some PHP script in your Witcher World WordPress theme follow the simple steps below:

  • Upload a 988 pixel wide and 300 pixel high image to the “images” folder of the your Witcher World WordPress theme
    • Name the image “header_womens_day.jpg” (without the quotes)

wordpress witcherworld images folder

 

  • Log into your WordPress site as an administrator,
  • On the left side click “Appearance” and “Editor”,

wordpress appearance editor select

 

  • On the right side select “Header”,

wordpress theme header edit select

 

  • In the editor find the following line. That sets the header image of the theme.

<div id=”header”<?php if(get_header_image() != “”) echo ” style=’background-image: url(“.get_header_image().”);'”; ?>>

 

  • Replace it with the following script:

<div id=”header”
<?php
$today = date(“m-d”);
$templatedir = get_template_directory_uri();
$background_image_url = “”;
if ( “03-08″ == $today ) {
// Women’s day
$background_image_url = $templatedir.”/images/header_womens_day.jpg”;
} elseif (get_header_image() != “”) {
$background_image_url = get_header_image();
}
echo ” style=’background-image: url(“.$background_image_url.”);'”;
?>
>

 

  • At the bottom of the page click the “Update File” button

wordpress theme edit update file button

 

On every March 8th the “header_womens_day.jpg” image will be your header image. The  date(“m-d”) function returns the month and day in the  UTC time zone, so you will only see the change when it is March 8th in London (8 hours ahead of Los Angeles).

 

Print a web page in a printer friendly format

If you want to print a web page on your printer without header images and advertisement

  • Highlight the address of the page in the address bar and
    • Press CTRL-C or
    • Right click it and select “Copy”,

printfriendly copy address

  • Open a new tab and navigate to printfriendly.com
  • Paste the address into the field that says: “enter a url”
    • Click the field and press CTRL-V or
    • Right click the field and select “Paste”

printfriendly paste address

  • Click the “print preview” button to see the printer friendly version of the page

You can even delete sections of the document:

  • Move the mouse above the paragraph,
  • Click the red “Click to delete” link.

printfriendly delete paragraph

Click the buttons on the top menu to

  • Print,
  • Save as PDF or,
  • Email the page.

printfriendly buttons

You can remove the images by clicking the “Remove Images” box and adjust the size of the text with the “Text Size” drop down list.

Where are the uploaded images stored in WordPress?

When you upload an image for a page or a post WordPress stores the image at the following location:

wp-content\uploads\YEAR\MONTH

where YEAR and MONTH are the year and month of the upload date.

wordpress image upload location

WordPress creates a new folder every month to reduce the number of files per folder. This way you can find your files easier and the server can also find the files faster, because it can work with a smaller list of directory entries.

How can I remove an image from the Uploaded Images list in WordPress?

When you upload an image as a theme header images the image will be stored in the Media library.

WordPress Theme Header Wrong Images

If you upload multiple header images and you want to remove some of them

  • Log into your WordPress site as an administrator,
  • On the left side select “Library” in the Media menu,

WordPress Media Library Select

  • Click the “Delete permanently” link next to the unwanted image

WordPress Media Library Delete

  • Click “OK” to confirm the deletion of the file.

WordPress Media Library Delete Confirm

How can I create a custom header image for the Witcher World theme in WordPress?

The Witcher World is a great theme and it is very easy to customize it. The original header image is beautiful, but if you want to display your custom header image you have to take some simple image editing steps to make sure it looks as good as the original.

The original image contains the left and right borders of the header, so if you add your image you have to add those to your custom image.

Create the custom header image

Click the image below to open the header image template with transparent areas for your custom image in a new tab of your web browser. On the new tab right click the image and select “Save image as…” (“Save picture as…” in Internet Explorer) and save the image to your computer. When it is done close  the new tab to return to this page.

Witcher World header transparent template

 

Select a picture on your computer that you want to use as the header image. The following steps show how to do it in Colrel Paintshop Pro XI. All other graphics editor programs should have similar feature to do the same.

  • To resize the image to 988 pixel wide select “Resize” in the Image menu

Paint Shop Pro Resize Select

  • Set the width to 988 pixels and check the “Lock aspect rato” to set the height automatically and avoid distortion, and click OK,

Paint Shop Pro Resize

  • In the View menu select “Zoom to 100%” to see the larger view of the image,

Paint Shop Pro Zoom To 100%

  • To crop the image to 988 wide  and 300 high on the left side select the crop icon and in the header enter 988 pixel width and 300 pixel height,

Paint Shop Pro Crop Select

  • Move the crop rectangle to the desired place and click the “Apply” button on the header,

Paint Shop Pro Crop

  • Set the background color to blue to enable the transparency during the paste of the template,

Paint Shop Pro Background Color Is Blue

  • Double click the background color indicator,

 Paint Shop Pro Background Color Select

    • Click the blue color and click OK,

Paint Shop Pro Background Color Blue

  • Open the Witcher_World_header_transparent_template.png in the same application,
  • In the Selections menu click “Select All”

PaintShopPro_SelectAll

  • In the Edit menu click “Copy”,

PaintShopPro_Copy

  • Switch to the cropped image by selecting the file in the Window menu,

Paint Shop Pro Window Menu

  • Paste the Witcher_World_header_transparent_template.png on top of it as a “Transparent selection” exactly on top of your cropped image,

Paint Shop Pro Paste Transparent Selection

  • Save the new composite image on your computer. Click Yes to allow Paint Shop Pro to merge the parts of the image.

PaintShopPro_SaveMerge

Upload the custom header image

  • Log into your WordPress site as administrator,
  • On the left side select “Appearance,” and “Header”,

WordPress Theme Header Change Select

  • On the middle pane in the Select Image section select “Choose File” under Choose an image from your computer,

WordPress_ThemeHeaderChangeChooseFile

  • Select the new file and click the Open button,

WordPress Theme Header Change Browse File

  • Click the “Upload” button on the page,

WordPress Theme Header Change Upload File

  • You can upload multiple images and select  “Random: Show a different image on each page” in the Uploaded Images section to display a different image at every page load.

WordPress Theme Header Change Random

  • Click the “Save Changes” button at the bottom of the page.

WordPress Theme Header Change Save Changes

How to set up WordPress in five minutes

It really takes five minutes to set up WordPress.

If your site is hosted by an other Internet  Service Provider the process can be slightly different than the steps below, but it should be similar enough to be relevant to your situation.

If your site is hosted by Winhost.com

  • Log into your Winhost control panel at www.winhost.com
    (
    When you set up your site they gave you a user name and you selected a password to access the account administration pages)
  • On the main menu select “Sites” to administer you web site

Winhost Sites Link

 

  • On the Site List select the “Manage” link next to your site

Winhost Sites Manage Link

  • On the Site Manager window select the “App Installer” icon

Winhost App Installer Link

  • In the list of applications scroll down to the bottom to WordPress and click

Winhost App Installer WordPress Install Link

 

  • Enter the name of the folder where you want to install WordPress,

Winhost App Installer WordPress Install FolderName

  • Write down the full “AppPath” you entered. That will be the address of your WordPress site,
  • Click the “Install Application” button,
  • The confirmation page appears, but don’t click the link of your application yet,

Winhost App Installer WordPress Install Success Message

  • For advanced users only:
    • Before you continue make a note of the WordPress version your provider offers. It is 3.5.  At the time of  the writing of this post the latest version of WordPress is 3.5.1, so later we will overwrite the Winhost version using an FTP client.,
  • First we have to set up the MySql database that WordPress will use to store the content of your site, so click the “Site Manager” link below the top menu,
  • The link will take you to the Site Tools page,

Winhost MySql Setup Link

  •  Click the “MySQL” icon to set up the MYSQL database,

Winhost MySQL Setup Add

  • Click the “Add” button to create the MySQL database,

Winhost MySQL Setup Create

  • Enter
    • a name for the database 
    • username
    • the size of the data that the user can use in the database (if WordPress is the only applications you want to connect to this database enter the maximum value into the Quota field)
  • Click the “Create” button,

Winhost MySql Setup Success Message

  • To see the connection details for the newly created database click the “Manage” link,

Winhost MySql Manage

  • Copy the connection details to a text file, because you will need to enter these values into the WordPress configuration form,
  • Click the “Edit” link to set the database password,

Winhost MySql Change Password

 

  • Open a new tab in your web browser and enter the address of your wordpress site. In our example it is YOURSITE.com/blog

WodrPress Setup Config File

  • WordPress will create the missing configuration file when you click the “Create a Configuration File” button,

WodrPress Setup Config File Lets Go

  • Click the “Let’s go!” button,

WodrPress Setup Config Enter Values

  • Enter the values that you saved earlier,
    • Database Name
    • User Name
    • Password
    • Enter the Database Server name to the “Database Host” field
  • Click the “Submit” button

WodrPress Setup Config Run Install

  • Click the “Run the Install” button to create the WordPress configuration file,

WodrPress Setup Config Site Values

  • Fill out the form and click the “Install WordPress” button,

WodrPress Setup Config Success Message

  • Done! Click the “Log in” button to open your site manager page.

 

How to clear the saved authentication data in TortoiseSVN

If  your TortoiseSVN client stores an incorrect username or password it will try to access the Subversion server with that stored data. To force TortoiseSVN to ask for a new username and password clear the stored data. TortoiseSVN is a shell extension, so you have to start Windows Explorer to access the TortoiseSVN menu.

  • Start Windows Explorer,
  • Right click on any folder and select “TortoiseSVN”, “Settings”,

TortoiseSVN Settings Select

  • On the left side of the TortoiseSVN Settings window  select “Saved Data”.

TortoiseSVN Settings Clear Authentication data

  • On the right side click the  Authentication data “Clear” button.

Next time you try to access the Subversion server TortoiseSVN will ask for your user name and password.

 

How to set up VisualSVN Windows authentication

If you get the access to ‘…’ forbidden error message in an svn client most likely the Subversion server authentication is not set up correctly.

Users can access the VisualSVN repository using the Windows user accounts of the server. To set up the Windows user account authentication:

  • Install VisualSVN on the Windows server,
  • In the start menu select VisualSVN, VisualSVN Server Manager,
  • On the left side right click Repositories and select  “Create New Repository…”,
  • Enter a repository name, and check “Create default structure…”,

VisualSVN New Repository

  • Create user accounts for the VisualSVN users,
    • In the Start menu Right click the “Computer”,
    • Select “Manage”,
    • In the Configuration, Local Users and Groups section right click “Users” and select “New User…”,

Windows New User

    • Enter the user information and click “Create”,
  • Create a security group for the VisualSVN users,
    • In the Local Users and Groups section right click “Groups” and select “New Group…”,

Windows_NewGroup

    • Create a Security Group for the VisualSVN users, name it “VisualSVN Users”,
  • Add the users to the Security Group,
    • On the left side in the Local Users and Groups section left click “Groups”,
    • In the list of groups double click the “VisualSVN Users” Security Group,

Windows Group Add Users

    • Click the “Add…” button,
    • Enter the user name into the field on the popup window and click “OK”,
    • Click “OK” on the Security Grpoup property window to save the user list,
  • Set up VisualSVN to use the server’s Windows users and groups
    • In the start menu select VisualSVN, VisualSVN Server Manager,
    • On the left side right click “VisualSVN Server (Local)” and select “Properties”

VisualSVN Properties Select

    • On the Authentication tab select “Use Windows Authentication”and “Basic authentication”

VisualSVN_PropertiesAuthentication

  • Add the Windows Security Group to the VisualSVN
    • In the start menu select VisualSVN, VisualSVN Server Manager,
    • On the left side right click the repository and select “Properties”

VisualSVN Repository Properties Select

    • On the Properties window click “Add…” and enter “VisualSVN Users” to enable the Security Group members to access the repository and click “OK”,

VisualSVN Repository Properties

    • To allow the members to read and write the repository leave “Read /Write” checked at the bottom of the window,
    • Click “OK” to save the changes.

Windows desktop doesn’t show any icons

If your Windows XP or Windows 7 desktop is empty and does not show any icons the following steps can enable the display of your desktop icons:

Windows Desktop No Icons

    • Right click the desktop,
    • In Windows XP,
      • Select “Arrange Icons By”,

 

  • In Windows 7,
    • Select “View”,

Windows Desktop Show Icons

 

  • If “Show desktop icons” is not checked, click on it to enable the display of the desktop icons.