User Tools

Site Tools


themes:creation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
themes:creation [2015/02/16 09:59]
datiswous [Anatomy of a Theme]
themes:creation [2017/06/02 08:03] (current)
Timbow [Theme Development Tips]
Line 16: Line 16:
   * A file named ''​editor.css''​ in the theme folder will enable the CKeditor to display page content more accurately.   * A file named ''​editor.css''​ in the theme folder will enable the CKeditor to display page content more accurately.
   * Any images used in the theme, along with favicons and backgrounds   * Any images used in the theme, along with favicons and backgrounds
-  * A screenshot image of your theme saved in an //images// folder as /​path/​to/​getsimple/​theme/​your-theme/​images/​screenshot.png will be displayed on the Theme Selection Page in the Admin Pages.((Be sure to name it that exact name or else our system will not pick it up. Lowercase AND in the folder /images/ AND named screenshot.png))+  * A screenshot image of your theme saved in an //images// folder as ''​/​path/​to/​getsimple/​theme/​your-theme/​images/​screenshot.png'' ​will be displayed on the Theme Selection Page in the Admin Pages.((Be sure to name it that exact name or else our system will not pick it up. Lowercase AND in the folder /images/ AND named screenshot.png))
   * A file ''​[[theme:​advanced#​theme_functions_file|functions.php]]''​ contains any custom functions that are used within your theme.   * A file ''​[[theme:​advanced#​theme_functions_file|functions.php]]''​ contains any custom functions that are used within your theme.
   * Sometimes template files are split into parts and saved as [[theme:​advanced#​optimal_theme_files_layout|partial template files]] with names like ''​header.inc.php''​   * Sometimes template files are split into parts and saved as [[theme:​advanced#​optimal_theme_files_layout|partial template files]] with names like ''​header.inc.php''​
Line 23: Line 23:
    * Start any PHP file within your theme with ''<?​php if(!defined('​IN_GS'​)){ die('​you cannot load this page directly.'​);​ } ?>''​. This will stop any unwanted direct access to that particular file.    * Start any PHP file within your theme with ''<?​php if(!defined('​IN_GS'​)){ die('​you cannot load this page directly.'​);​ } ?>''​. This will stop any unwanted direct access to that particular file.
   * Most themes id the body of the html by writing the opening body tag ''<​body id="<?​php get_page_slug();​ ?>" >''​ It makes it easy to restyle a single page.   * Most themes id the body of the html by writing the opening body tag ''<​body id="<?​php get_page_slug();​ ?>" >''​ It makes it easy to restyle a single page.
-  * Many plugins require ''<?​php get_header();​ ?>''​ between the ''<​head>''​ tags and ''<?​php get_footer();​ ?>''​ somewhere before the end ''</​body>''​ tag.+  * Many plugins require ''<?​php get_header();​ ?>''​ between the ''<​head>''​ tags and ''<?​php get_footer();​ ?>''​ somewhere before the closing ​''</​body>''​ tag.
   * urls in php template files need to be written as absolute links not relative, in the form http://​www... or with the path called by <?php get_site_url();​ ?> or <?php get_theme_url();​ ?> so that they will always be correct even if the site is moved.   * urls in php template files need to be written as absolute links not relative, in the form http://​www... or with the path called by <?php get_site_url();​ ?> or <?php get_theme_url();​ ?> so that they will always be correct even if the site is moved.
 ======Links====== ======Links======
themes/creation.1424080770.txt.gz ยท Last modified: 2015/02/16 09:59 by datiswous