PremiumPress Documentation

Exploring the PremiumPress responsive framework

Getting Started

Getting started with the PremiumPress responsive framework is easy. This page will walk you through the complete process from setting up your website to developing your own child themes and plugins.

Using this documentation

This documentation has been written to help you better understand the PremiumPress responsive themes and framework. The contents of this documentation may include some programming and computer terminology however where possible jargon free advice is given.

To get started, simply select your desired page from the left navigation menu.

Documentation Notes

This documentation is an on-going development and designed only to explain how the PremiumPress framework works.

Last Updated: Oct 16th, 2015

Theme Installation

Theme Folder Structure

Where possible all folder and file names have been labeled to make navigation as easy as possible.

A basic overview of the folder structure is as follows;

    /framework/admin/ <-- admin area files
    /framework/class/ <-- core class functions
    /framework/css/ <-- core style sheets
    /framework/img/ <-- core images
    /framework/fonts/ <-- core fonts
    /framework/pdf/ <-- core pdf files
    /framework/sampletheme/ <-- sample theme content
    /framework/js/ <-- core javascript files
    /framework/widges/ <-- core widget files
    /framework/slider/ <-- core slider files
    /framework/player/ <-- core video/audio player
     /framework/objects/ <-- core home page object templates
    /templates/ <-- child theme storage

Note The contents of the theme folder may change over time and additional folders maybe added/removed.

3. License Key

Where do i find my license key?

Your theme license key can always be found within your members area;

My key doesn't work, what should i do?

Contact our support team and they will investigate for you.

Key Usage

You may use your license key on any website that you own, it can be used as many times as you like as long as each website is owned by you.

Under no circumstances should your key be distributed or given out to third-parties.

You are responsible for the distribution and usage of your license key, if your key is abused and/or distributed your account will be closed without appeal.

Hooks & Filters

Getting started with built in hooks and filters.

The basic concept

Hooks and filters essentially enable you to modify content through your own plugin's/functions without modifying the core theme files. This is useful because you can then create additional plugin's/functionality that is not overwritten during a core system update and can be re-used/shared between projects.

What's the difference?

Hooks - enable you to drop in new content

Filter - enables you to modify content before its displayed.

More information about the fundamentals of hooks and filters and be found in the official WordPress guide below.

Hooks & filters within White-label themes

We have added a number of our own hooks and filters so that you can fully utilize the feature we have added and modify them if and where required.

You will find hooks for both front and back end allowing you to build additional plugin's that can be used over multiple website's.

All hooks can be found in the file:


Additional Resources & Useful Links

Basic Layout

	function hook_container_before(){  do_action('hook_container_before');  }  
	function hook_container_after(){  do_action('hook_container_after');  }  

Header (header.php)

	function hook_header($c){ return  apply_filters('hook_header', $c);  }	
	function hook_header_navbar($c){ return  apply_filters('hook_header_navbar', $c);  }
	function hook_logo_wrapper($c){ return  apply_filters('hook_logo_wrapper', $c);  } 		 
	function hook_menu($c){ return  apply_filters('hook_menu', $c);  }		 



    function hook_breadcrumbs($c){ return  apply_filters('hook_breadcrumbs', $c);  }		 
	function hook_breadcrumbs_func($c){ return  apply_filters('hook_breadcrumbs_func', $c);  }	
	function hook_breadcrumbs_before(){  do_action('hook_breadcrumbs_before');  }		 
	function hook_breadcrumbs_after(){  do_action('hook_breadcrumbs_after');  }	

Footer (footer.php)

	function hook_footer($c){ return  apply_filters('hook_footer', $c);  } 
	function hook_includes($c){ return  apply_filters('hook_includes', $c);  } // CORE JAVASCRIPT INCLUDES


Home Page

	function hook_homepage_before(){  do_action('hook_homepage_before');  }  
	function hook_homepage_after(){  do_action('hook_homepage_after');  } 
	function hook_default_slider($c){   return  apply_filters('hook_default_slider', $c);   }	 
  	function hook_slider_after(){  do_action('hook_slider_after');  }

Listing Page

	function hook_single_before(){  do_action('hook_single_before');  }  
	function hook_single_after(){  do_action('hook_single_after');  }  
 	function hook_single_content($c){   return  apply_filters('hook_single_content', $c);   }
 	function hook_single_images($c){   return  apply_filters('hook_single_images', $c);   }


My Account Page

	function hook_account_before(){  do_action('hook_account_before');  }  
	function hook_account_after(){  do_action('hook_account_after');  }  
	function hook_account_menu(){  do_action('hook_account_menu');  }  

Add Listing Page

	function hook_packages_before(){  do_action('hook_packages_before');  }  
	function hook_packages_after(){  do_action('hook_packages_after');  } 
 	function hook_packages_block($c){   return  apply_filters('hook_packages_block', $c);   }
	function hook_add_before(){  do_action('hook_add_before');  }  
	function hook_add_after(){  do_action('hook_add_after');  } 

Search Results Page

	function hook_gallerypage_before(){  do_action('hook_gallerypage_before');  }  
	function hook_gallerypage_after(){  do_action('hook_gallerypage_after');  }  
 	function hook_gallerypage_item($c){   return  apply_filters('hook_gallerypage_item', $c);   }


Callback Page

	function hook_payments_gateways($gateways){ return  apply_filters('hook_payments_gateways', $gateways);  }		 
	function hook_callback($c){ return  apply_filters('hook_callback',$c);  }	 
	function hook_callback_success(){  do_action('hook_callback_success');  }  
	function hook_callback_error(){  do_action('hook_callback_error');  }  


Image Hooks

	function hook_upload_delete($post_id,$imagename,$user_id){return apply_filters('hook_upload_delete',array($post_id, $imagename,$user_id));}
	function hook_upload_edit($post_id){   return  apply_filters('hook_upload_edit', $post_id);   }
	function hook_upload($postID, $file, $featured = false){  return  apply_filters('hook_upload',array($postID, $file, $featured) );   } 	
	function hook_upload_return($file){   return  apply_filters('hook_upload_return', $file);   }


Admin Area Hooks & Filters

White-label themes have a number of additional hooks/filters that enable you to modify the theme admin pages.

	function hook_admin_0_tabs($c){   return  apply_filters('hook_admin_0_tabs', $c);   }
  	function hook_admin_0_content(){  do_action('hook_admin_0_content');  } 
	function hook_admin_1_tabs($c){   return  apply_filters('hook_admin_1_tabs', $c);   }
  	function hook_admin_1_content(){  do_action('hook_admin_1_content');  } 
	function hook_admin_1_tab1_left(){  do_action('hook_admin_1_tab1_left');  }
	function hook_admin_1_tab1_right(){  do_action('hook_admin_1_tab1_right');  }
	function hook_admin_1_tab2_left(){  do_action('hook_admin_1_tab2_left');  }
	function hook_admin_1_tab2_right(){  do_action('hook_admin_1_tab2_right');  }
	function hook_admin_1_tab3_left(){  do_action('hook_admin_1_tab3_left');  }
	function hook_admin_1_tab3_right(){  do_action('hook_admin_1_tab3_right');  }
	function hook_admin_1_tab4_left(){  do_action('hook_admin_1_tab4_left');  }
	function hook_admin_1_tab4_right(){  do_action('hook_admin_1_tab4_right');  }
	function hook_admin_2_tabs($c){   return  apply_filters('hook_admin_2_tabs', $c);   }
  	function hook_admin_2_content(){  do_action('hook_admin_2_content');  }	
	function hook_admin_2_tab1_left(){  do_action('hook_admin_2_tab1_left');  }
	function hook_admin_2_tab1_right(){  do_action('hook_admin_2_tab1_right');  }
	function hook_admin_2_tab2_left(){  do_action('hook_admin_2_tab2_left');  }
	function hook_admin_2_tab2_right(){  do_action('hook_admin_2_tab2_right');  }
	function hook_admin_2_tab3_left(){  do_action('hook_admin_2_tab3_left');  }
	function hook_admin_2_tab3_right(){  do_action('hook_admin_2_tab3_right');  }	
	function hook_admin_2_tab4_left(){  do_action('hook_admin_2_tab4_left');  }
	function hook_admin_2_tab4_right(){  do_action('hook_admin_2_tab4_right');  }	
	function hook_admin_2_tab5_left(){  do_action('hook_admin_2_tab5_left');  }
	function hook_admin_2_tab5_right(){  do_action('hook_admin_2_tab5_right');  }		
  		function hook_admin_2_tags_listing(){  do_action('hook_admin_2_tags_listing');  } 
  		function hook_admin_2_tags_search(){  do_action('hook_admin_2_tags_search');  } 
		function hook_admin_2_homepage_settings(){  do_action('hook_admin_2_homepage_settings');  } 
		function hook_admin_2_homepage_subtabs(){  do_action('hook_admin_2_homepage_subtabs');  }
		function hook_admin_2_homepage_subcontent(){  do_action('hook_admin_2_homepage_subcontent');  }	 
	function hook_admin_5_tabs($c){   return  apply_filters('hook_admin_5_tabs', $c);   }
  	function hook_admin_5_content(){  do_action('hook_admin_5_content');  }
	function hook_admin_5_tab1_left(){  do_action('hook_admin_5_tab1_left');  }
	function hook_admin_5_tab1_right(){  do_action('hook_admin_5_tab1_right');  }
	function hook_admin_5_tab2_left(){  do_action('hook_admin_5_tab1_left');  }
	function hook_admin_5_tab2_right(){  do_action('hook_admin_5_tab1_right');  }
		function hook_admin_5_packages_edit(){  do_action('hook_admin_5_packages_edit');  }
		function hook_admin_5_customfields_edit(){  do_action('hook_admin_5_customfields_edit');  }
	function hook_admin_6_tabs($c){   return  apply_filters('hook_admin_6_tabs', $c);   }
  	function hook_admin_6_content(){  do_action('hook_admin_6_content');  } 


Custom Home Page Object Hooks/Filters

	function hook_object($c =array()){   return  apply_filters('hook_object', $c);   } // FORMATS THE OUTPUT FRONTEND
	function hook_object_list($c){   return  apply_filters('hook_object_list', $c);   } // FORMATS ARRAY LIST BACKEND
	function hook_object_settings(){ do_action('hook_object_settings'); }


Misc Hooks

Video Tutorial Box
      	function hook_admin_videotutorials(){  do_action('hook_admin_videotutorials');  } 


Cart Hooks

	function hook_cart_data($c){   return  apply_filters('hook_cart_data', $c);   }
	function hook_addcart_small($c){   return  apply_filters('hook_addcart_small', $c);   }
	function hook_addcart_big($c){   return  apply_filters('hook_addcart_big', $c);   }
	function hook_checkout_paymentoptions($c){   return  apply_filters('hook_checkout_paymentoptions', $c);   }
	function hook_checkout_before_paymentoptions(){ do_action('hook_checkout_before_paymentoptions'); }
	function hook_checkout_after_paymentoptions(){ do_action('hook_checkout_after_paymentoptions'); }

MISC Hooks

Banner Hooks

	function hook_banner_header($c){ return  apply_filters('hook_banner_header', $c);  }	
		function hook_banner_header_wrapper($c){ return  apply_filters('hook_banner_header_wrapper', $c);  }
	function hook_banner_footer($c){ return  apply_filters('hook_banner_footer', $c);  }

Basic Setup


You create plugin's for PremiumPress themes the same way you do every other WordPress plugin. All plugin files go in the WordPress plugin's folder;


Additional Resources & Useful Links

Creating Admin Plugin's

New Admin Menus

You can add a new admin menu page within your plugin's using the syntax below;

    $GLOBALS['new_admin_menu'][] = array("50" => array("title" => "New Page","function" => "_new_page_function" ));
    function _new_page_function(){
    /* your page content here */


Adding New Admin Tabs

You can add a new tab to an existing admin page using the syntax below;

    function new_admin_tab($c){
    return $c."< li>< a href='#example_new_content' data-toggle='tab'>New Tab< /li>";

Adding New Admin Tab Content

You can add content for your new tab using the syntax below

    function new_admin_tab_content(){
    < div class="tab-pane fade" id="example_new_content">
    /* your page content here */
    < /div>


Creating New Payment Gateways


Creating a payment gateway is simple and contains 3 main elements;

    1. Admin Options - For the webmaster to enter their gateway details
    2. Payment Form - Passes the data to the payment gateway
    3. Callback - Handles the responce from the payment gateway and creates the order

1. Admin Options - Creating the admin interface

Payment gateways are stored in one big Array, to add a new one you simply add a new value to the array.

function example_new_gateway($gateways){

    $nId = count($gateways)+1;
    $gateways[$nId]['name'] 		= "My Gateway Name"; // STRING - NAME OF YOUR GATEWAY
    $gateways[$nId]['logo'] 		= ""; // STRING - http:// link to your logo file
    $gateways[$nId]['website'] 		= ""; // STRING - http:// link to the merchants website for more details
    $gateways[$nId]['function'] 	= "gateway_example"; // STRING - name of your callback function
    $gateways[$nId]['callback'] 	= "no"; // YES/NO - FOR DISPLAY PURPOSES ONLY
    $gateways[$nId]['fields'] 	= array(
    '1' => array('name' => 'Enable Gateway', 'type' => 'listbox','fieldname' => $gateways[$nId]['function'],'list' => array('yes'=>'Enable','no'=>'Disable') ),
    '2' => array('name' => 'Example Text Box', 'type' => 'text', 'fieldname' => $gateways[$nId]['function'].'_textbox'),
    '3' => array('name' => 'Example List Box', 'type' => 'listbox', 'fieldname' => $gateways[$nId]['function'].'_listbox' ,'list' => array('1'=>'Display Value 1','2'=>'Display Value 2', '3'=>'Display Value 3','text value' => 'Display Value 4')), 
    '4' => array('name' => 'Display Name', 'type' => 'text', 'fieldname' => $gateways[$nId]['function'].'_name', 'default' => 'Pay Now - Example Text') ,
    return $gateways;


2. Payment Form

The payment form is simply the HTML form that sends the user to the payment gateway.

The import thing to remember here is that the FUNCTION NAME must match the one you have set in your gateway array function above

$gateways[$nId]['function'] 	= "gateway_example"; // STRING - name of your callback function

AND your function name matches the one the user can enable;

 '1' => array('name' => 'Enable Gateway', 'type' => 'listbox','fieldname' => 'gateway_example','list' => array('yes'=>'Enable','no'=>'Disable') ),

The payment form function might look like;

    function gateway_example($data){  
    // shopping cart
    $GLOBALS['global_cart_data'] <-- array 

    < FORM METHOD="POST" ACTION="" name="example_gateway">
    < INPUT TYPE="HIDDEN" NAME="ButtonAction" VALUE="checkout">
    < INPUT TYPE="HIDDEN" NAME="custom" VALUE="">
    < INPUT TYPE="HIDDEN" NAME="total" VALUE="">
    < BUTTON TYPE="submit">Process Payment< /BUTTON>
    < /FORM>

3. Handling The Callback

Once the payment has been made you will want to handle the data sent back to the website by the payment gateway.

function example_callback(){ 

	global $CORE;

        $order_data = array();
		$order_data['orderid'] 		= "";
		$order_data['description'] 	= "";
		$order_data['items']		= "";
		$order_data['shipping']		= "";
		$order_data['tax']			= "";
		$order_data['total']		= "";
		$order_data['status']		= 3;	 // 3 = COMPLETED / 0 = FAILED
		$order_data['email']		= "";
    	$order_data['shipping_label'] =  ""; // BLOB, STORE ADDRESS FROM THE PAYER
		return "success";
		return "error";


What are Child Themes?

Understanding the concept and usage of child themes.

Child themes are simply 'extra designs' for your website. We create child themes so that our design changes are not overwritten with framework updates.

Why should i create a Child Theme?

Creating a child theme has a number of advantages, these includes;

  • Child theme design files will not be overwritten with theme updates.
  • Child themes can be exported, shared and used again on other PremiumPress themed websites.
  • Child themes allow you to modify core code without modifying the core files.
  • Child themes can extend the functionality of the existing theme, allowing you to add-on new features.

Who can build Child Themes?

Anyone can build a child theme, however, you will require a good understanding of Wordpress, PHP and HTML.

Where are Child Themes stored?

All child themes are stored in the normal WordPress themes folder: wp-content/themes/

Child Theme Folder Structure

Understanding where everything is located

What files make up a child theme?

For a child theme to be detected by the system it must follow a few basic rules and contain a few basic files.

  • /template_basic_childtheme/ <-- the folder name for our new theme.
  • /template_basic_childtheme/style.css <-- styles file containing our CSS styles.
  • /template_basic_childtheme/screenshot.png <-- a screen shot of our theme.
  • /template_basic_childtheme/images/ <-- (optional) location of your images
  • /template_basic_childtheme/images/logo.png <-- (optional) location of your logo

1. Folder Name

Child Theme folder names must start with either 'template_basic' or the name of the template_basic theme, such as 'shopperpress'. For example, 'template_basic_childtheme' or 'shopperpress-child-theme-one'.

The difference between the two is that 'shopperpress-child-theme-one' would only be visible within the ShopperPress system where as 'template_basic_childtheme' could be used within all template_basic themes. This is useful if you are designing a child theme suitable for all template_basic themes.

2. Images Folder Name

Within your child theme there should be images folder, this typically is named 'images'. This folder will store the location of your child theme images. Example structure: template_basic_childtheme/images/

The child theme logo will be generated by default from the file 'logo.png' which should be included within this folder. Best sizes are: W:350px; H:100px

3. CSS stylesheet

Within your child theme there should be a file with the name "style.css". This should be lowercase and within the file, there should be the following comments added to the top;

Theme Name:  Child Theme Name
Theme URI:   http: // 
Description:  This is a child theme for the PremiumPress responsive framework.
Author:     Mark Fail
Author URI:   http: //
Template:    [XXX]
Version:    1.0

Note: Leave [XXX] just like this, it will be replaced automatically by the theme.

4. Screenshot .PNG

A file which contains a screenshot of your child theme should be included so the user can preview the theme before selecting it. the filename should be 'screenshot.png' and be no bigger than 200px width.

Adding Theme Design Files

Learning how to modify core framework files

Remember Where possible, always use hooks and filters to modify content instead of including core files in your child theme.

All theme files should be added within the main child theme folder.

  • /template_basic_childtheme/
  • /template_basic_childtheme/file1.php
  • /template_basic_childtheme/file2.php
  • /template_basic_childtheme/file3.php

Core System Pages and Filenames

Once you have created your new child theme folder, you may want to start creating your own page variations. To create your own variations of default theme files you need to know the file names we have associated them with, a complete list is found below.

Remember If you create your own page variation, new updates to that page will not be used when the framework is updated and this may prevent newly added features from working.

Where possible (especially the header/footer files) please use hooks and filters to adjust the default design.
      functions.php = custom functions for your child theme.
      header.php  = overwrites the default header.php file
      footer.php  = overwrites the default footer.php file
      home.php = new home page
      page.php = normal WordPress page
      page-login.php = login page
      page-register = register page
      page-forgottenpassword = forgotten password page
      page-noresults = no search results page
      single-listing.php = listing display page
      single-post.php = blog display page       
      payment-error = payment failed page
      payment-thankyou = payment thank you page
      style.css = your own CSS styles (*)
      language_english.php = your own language file
      screenshot.png = screenshot of your child theme, recommended size: 200px X 200px (*)

* represent files which are expected to be part of any child theme.

Recap So, to create a new home page, you simply create a new PHP file called (home.php) and add this to your child theme folder. When you load your home page you'll notice that instead of loading the default one, it now loads your new child theme variation.

Custom Functions

Modifying content with your own functions

You should, where possible, always modify core framework content via hooks and filters and add your new changes to your functions.php file.

Adding custom functions.

A functions file allows you to add-on your own PHP functions that are loaded when the core theme is loaded and before the theme files are displayed. The functions file name is "functions.php".

  • /template_basic_childtheme/
  • /template_basic_childtheme/functions.php

Hooks and Filters

Using hooks and filters in your child themes


Hooks allow you to inject code into your website. If you hook into an page item you are essentially adding code into the page for display purposes.


A filter allows you to filter content before its displayed or stored within the database. For example if you filter a description, you are could remove words and phrases before its displayed.

Wordpress Hooks & Filters

The majority of hooks and filters are provided by Wordpress core. You can find a list useful resources below;


Getting started with shortcodes.

Available Shortcodes

Below is a list of all the currently available shortcodes for PremiumPress responsive framework;

  • [FIELDS]
  • [FILES]
  • [IMAGE]
  • [RATING]

More details about each are found in their corresponding sections below;

[FIELDS] Shortcode

Short Description

This shortcode is used to display a list of listing custom fields. It should be used on the listing page only.

[FIELDS show="" hide=""]

Example would be: [FIELDS show="field1|field2|field3" hide="my_custom_field"]

[TOOLBAR] Shortcode

Short Description

This shortcode is used to display a toolbar on the listing page.

[TOOLBAR show=""]

Example would be: [FIELDS show="category"]

[TOOLBOX] Shortcode

Short Description

This shortcode is used to display a toolbox style list on the listing page.

[TOOLBOX show=""]

Example would be: [FIELDS show="views,date,category,comments,price,rating,social"]

[FILES] Shortcode

Short Description

This shortcode is used to display a list of files attached to a listing. Must be displayed the listing page.

[FILES type="" info=true]

Example would be:

[FILES type="image"]

[FILES type='music']

[FILES type='video']

[FILES type='doc']

For multiple types use;

[FILES type="image|music|video|doc"]

[MEMBERSHIP] Shortcode

Short Description

This shortcode is used to restrict content based on the currently logged in users membership level.

[MEMBERSHIP show=""]

Example would be: [MEMBERSHIP show=1,2,3] content here [/MEMBERSHIP]

[GOOGLEMAP] Shortcode

Short Description

This shortcode is used to display a google map on the listing page. This will only show if the users listing has the option enabled.

[GOOGLEMAP tab=false]

Example would be: [GOOGLEMAP]

[CATEGORIES] Shortcode

Short Description

This shortcode is used to display a list of categories.

[CATEGORIES SHOW="123,456" HIDE="678,890" COUNT="1"]

Example would be: [CATEGORIES SHOW="123,456" HIDE="678,890" COUNT="1"]

[TAXONOMY] Shortcode

Short Description

This shortcode is used to display a list of taxonomy categories.

[TAXONOMY name='XXXX' count=true icon=true]

Example would be: [TAXONOMY name='store' count=true icon=true]

[MEMBERS] Shortcode

Short Description

This shortcode is used to display a list of members.

[MEMBERS show="XX"]

Example would be: [MEMBERS show="1"] where XX is the user ID.

[LISTINGS] Shortcode

Short Description

This shortcode is used to display a list of your website listings.

[LISTINGS cat='' orderby='' order='' show=10]

Example would be: [LISTINGS cat='1' orderby='post_title' order='desc' show=10]

[TIMESINCE] Shortcode

Short Description

This shortcode is used to display a timer between the date the listing was create and the current date.

[TIMESINCE text_before="", text_after =""]

Example would be: [TIMESINCE text_before="This listing was posted", text_after ="ago"]

[RATING] Shortcode

Short Description

This shortcode is used to display a star rating for a listing.

[RATING size=16 id=177]

Example would be: [RATING size=16 id=xxxx] where xxxx is the post ID.

Sample Query Strings

Below are a few samples of query strings;

  • Featured Listings: meta_key=featured&meta_value=yes
  • Latest products :: orderby=ID&order=desc
  • Most visited products :: meta_key=hits&orderby=meta_value_num&order=desc
  • Random products : orderby=rand

Admin -> General Setup

Admin -> Home Page Setup

Customzing your website page setup

Admin -> Design Setup

Admin -> Email Setup

Setting up your website emails

Admin -> Listing Setup

Setting up your listing and membership packages

Custom Fields

In this video tutorial you'll learn how to setup custom fields.

Listing Packages

In this video tutorial you'll learn how to setup listing packages.

Membership Packages

In this video tutorial you'll learn how to setup listing packages.

Admin -> Advertising Setup

Creating and managing your advertising spaces

Admin -> Payment Setup