> Default Theme Pages wordpress plugin resources analysis

Default Theme Pages wordpress plugin resources analysis

Download This Plugin
Download Elegant Themes
Name Default Theme Pages
Version 0.4
Author Carlos Sanz García
Rating 0
Last updated 2012-08-30 12:55:00
Downloads
1141
Download Plugins Speed Test plugin for Wordpress

Home page

Delta: 0%

Post page

Delta: 0%
Default Theme Pages plugin has no negative impact on PageSpeed score.

Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%

Default Theme Pages plugin added 15 bytes of resources to the Home page and 29 bytes of resources to the sample Post page.

Default Theme Pages plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.

Great! Default Theme Pages plugin ads no tables to your Wordpress blog database.

This plugin is intended to be useful for template developers

New in version 0.4

  • added 'object' (page object) in every $default_theme_pages item for fast access.
  • added all default pages to wp toolbar, inside 'site name', to increase user experience.

How to use

Add this code in your functions.php.

global $default_theme_pages;
$default_theme_pages = array(
    array(
        'name' => 'home',               // initial slug page / id for templating - access functions
        'title' => 'Homepage',          // page title
        'option' => 'page_on_front',    // option page id ( stores the page id in an option, use only in theese cases)
        'description' => 'homepage'     // description
    ),
    array(
        'name' => 'blog',
        'title' => 'Blog',
        'option' => 'page_for_posts',
        'description' => 'blog'
    ),
    array(
        'name' => 'contact',
        'title' => 'Contact me!',
        'description' => 'Contact form page'
    )
 );

Tips

  • After the pages are created automatically, you can change their title and slug without problem.
  • If you add an option names: page_on_front and page_for_posts, you will block the home-page and the blog-page on your site.

Templating

You can template using ID or name (setted up in $default_theme_pages global variable ), something like:

page-131.php or page-contact.php (If you change the page slug, this will still work because 'contact' was defined as pagename if $default_theme_pages global variable).

For detect if you're in that page:

dtp_is_page('contact')

Getting a default page id:

$page_id = dtp_get_page_id('contact');

This method is more quick than get_page_by_path because page ID is stored on global variable.

Screenshots

Resources added by plugin to Home page/Post page in kB
Total size of resources for Home page/Post page in kB
Random Theme Tests
volta screenshot

volta

by: niftythemes

6968
100%
tpSunrise screenshot

tpSunrise

by: eehrgott

39055
0%