Home » WordPress Themes

Category Archives: WordPress Themes

Adding a WordPress PHP file to a theme without FTP


Looking to add a  php file to your theme, but no FTP then try this. Some hosting servers will not let you do this for security reasons

In WordPress’ Dashboard’s  menu:

  • Choose Appearance/Editor then select your function.php  or header.php file.
  • At the top  add
    <?php touch(‘wp-content/themes/yourthemefolder/whatever.php’); ?>
    Obviously yourthemefolder and  whatever.php should be changed to your theme’s folder name and the new file name respectively.
  • Click Update and then view one of your web pages, this will execute the php line you just added.
  • Switch to the WordPress’ Dashboard’s  menu  and choose  Appearance/Editor again. You should now be able to see your new file in the list.
  • Re-select and edit the  function.php  or header.php file you used  –  remove the line you added above and then press Update.
  • Select your whatever.php file and start adding your content as normal.

This is useful to create different page layouts for the content area, i.e. page templates.


How do I set up a theme ‘preview image’ for my child theme?

When choosing a WordPress theme in the Appearance sub-menu, the themes usually have an image you can see to identify them and to check them out.  The image cab can be set up by upload a png image to the theme’s parent folder, e.g. for a twentysixteem child them this would be:


The image should be 1200 W X 900 H pixels in size.

The image should be called screenshot.png.


It’s as simple as that…

Sub-sub menu Twenty fourteen secondary menu is not aligned

A work round for where your sub menus in  Twenty fourteen secondary menu is not aligned, detached or overlaps.
If you have customised your 2014 secondary menu  and the sub or sub-sub menu doesnt’ work then add a style change in your twenty fourteen child’s CSS. Simply change the xxxpx width of  the CSS “class secondary-navigation ul ul” rule to whatever fixes the problem. Simpy use firebug or keep changing the setting until you get what works.

.secondary-navigation ul ul {


.secondary-navigation ul  {

will set the WordPress twenty fourteen initial submenu width.

How do I add a background image to WordPress’s Twenty Fourteen’s content area?

You should always create a child theme before modifying your sites CSS.

Aim: To achieve the results you can see on this page, in this case, a stainless steel background image on the content area.

Set the id #main to your background image then set the various classes areas making up the Twenty Fourteen content area to transparent allowing the background image to show through on your WordPress website page.

#main {    background-image:url('/img/yourimage.jpg');}

.site-content .entry-header,
.site-content .entry-content,
.site-content .entry-meta,
.page-content {