!This section is under development!
UNIQUE theme can be change in a easy way modifying the css, javascript and php files. Some changes can be made very easy using the admin panel. For that please read "Use UNIQUE plugin".
If you want to make core changes please follow the instructions of this chapter.
Pagetypes
CSS files
Images structure
Functions reference
Javascript functions
Unique theme includes many pagetypes that will help you to create a corporate or a product catalog website:
Homepage
File: index.php
Functions: get_promo_thumbnails(), get_promo_articles(), get_promo_buttons(), get_homepage_articles()
CSS files: homepage.php
Pages - all articles created as a page - this type of pagetypes don't have a listing pagetype attached
File: page.php
Functions: normal_post()
CSS files: listing.php, article.php, form.php
Blog Listing
File: archive.php
Functions: blog_listing()
CSS files: listing.php, normallisting.php, blog.php
Blog Post
File: single.php
Functions: blog_post()
CSS files: listing.php, article.php, blog.php, form.php
Products Listing
File: archive.php
Functions: products_listing()
CSS files: listing.php, boxbig.php, boxsmall.php, listbig.php, listsmall.php
Products Post
File: single.php
Functions: products_post()
CSS files: listing.php, article.php, form.php
Portfolio listing
File: archive.php
Functions: potfolio_listing()
CSS files: listing.php, boxbig.php, boxsmall.php, listbig.php, listsmall.php
Portfolio Post
File: single.php
Functions: portfolio_post()
CSS files: listing.php, article.php, form.php
Normal posts listing
File: archive.php
Functions: normal_listing()
CSS files: listing.php, normallisting.php
All archives pages: by month, day, tag are displayed in the same way as a normal post listing
Normal Post
File: single.php
Functions: normal_post()
CSS files: listing.php, article.php, form.php
Contact
File: page.php
Functions: get_contact_form()
CSS files: article.php, form.php
Search results
File: search.php
Functions: no function
CSS files: listing.php, normallisting.php, search.php, blog.php
There are also some elements that apears in more than one pagetype. Here is the list:
Sidebar
File: sidebar.php
Function: get_sidebar()
CSS files: sidebar.php, by case: sidebar_left.php or sidebar_right.php
Breadcrumbs
File: no file
Function: the_breadcrumbs()
CSS files: listing.php
Fontsize selector
File: no file
Function: print_fontsize_selector()
CSS files: listing.php
Comments and leave a reply form
File: comments.php
Function: no function
CSS files: form.php
Header
File: header.php
Function: get_header()
CSS files: mainstyle.php
Footer
File: footer.php
Function: get_footer()
CSS files: mainstyle.php
Main menu
File: no file - printed in header.php
Function: get_main_menu('menu')
CSS files: mainstyle.php
Drop downs
File: no file - printed in header.php
Function: get_main_menu('dropdown')
CSS files: mainstyle.php
Search form
File: no file - printed in header.php
Function: get_search_form()
CSS files: mainstyle.php
First of all there is note that the style files except one, have the .php extension instead of a normal .css file. This is because there was made a trick that permits the apache server to parse the style files as a common .php file. This change was made because the Unique plugin generates a list of variables for colors and types values. Anyway all css properties and structure is the same as a normal .css file.
All style files are located in wp-content/themes/unique/styles/. The original css files was disabled, but not deleted because you can't install the theme without it.
The css files structure was created in order to offer the possibility to change elements just for a specific pagetype not for the whole website pages. Below you can find all css files reference:
reset.css
Is the reset file for the most common elements. Because is not necessary to rediscover the wheel i used one of the best reset file recommended by http:meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
article.php
Here will find all elements included in a post: Headings, p, address, blockquote, pre, unordered lists, orderes lists, and some additional elements for products and portfolio detail pages like price, custom fields, request for quote buttons
blog.php
In this file are included the icons for date, categories, tags and comments and some adjustments for h1 heading when is a link
boxbig.php
This file includes all elements for first list type of a products or portfolio listing. It also includes adjustment to the icon of the selected list.
boxsmall.php
This file includes all elements for second list type of a products or portfolio listing. It also includes adjustment to the icon of the selected list.
config.php
Is used just to include the other css config files: config_colors.php, congif_elements_color.php and config_types.php
config_colors.php
In this file is opened the styles/xml/colors.xml file generated from the admin panel and are created the 5 colors varibles. The variables name are simply: $color1, $color2, $color3, $color4 and $color5.
config_elements_color.php
In this file is opened the styles/xml/colorelements.xml file generated from the admin panel and are created all variables that are used in style files for color or background-color properties.
config_types.php
In this file is opened the styles/xml/types.xml file generated from the admin panel and are created all variables that are used in style files for font-family property.
fonts.php
This is the file where are installed all custom fonts you can see in these theme or you can use from the admin panel in Unique types plugin. I used of course @font-face method, and it works on all browsers. You can find all fonts files in styles/types. There youll find the .ttf or .otf files by case and ofcourse the .eot files for ie browsers.
form.php
In this file you will find styles for inputs and adjustmets to form buttons.
homepage.php
Homepage style file, here will find all styles for homepage promo and homepage articles
ie8.php
Some fixes for Internet Explorer 8 - is included after a browser check just for this version of InternetExplorer.
listbig.php
This file includes all elements for third list type of a products or portfolio listing. It also includes adjustment to the icon of the selected list.
listing.php
Here you'll find styles for: breadcrumbs, fontsize selector, list style selector and pages. There are also the h1 heading for listings and category description styles.
listsmall.php
This file includes all elements for fourth list type of a products or portfolio listing. It also includes adjustment to the icon of the selected list.
mainstyle.php
Here are all styles for header elments: logo, motto, social networking links, main menu, drop downs and footer elements.
normallisting.php
All elements of a normal lisiting, headings, p, and thumbnails.
nosidebar.php
Some adjustments if the sidebar is removed.
opera.php
Some fixes for opera browser - is included after a browser check just for this browser
safari.php
Some fixes for safari browser - is included after a browser check just for this browser
search.php
Some adjustments to modify a normal listing in search listing.
sidebar.php
All elements from sidebar: categories menu and widgets.
sidebar_left.php
Some adjustments if the sidebar is setted to be on the left side.
sidebar_right.php
Some adjustments if the sidebar is setted to be on the right side.
All images are .png files and are located in wp-content/themes/unique/images/, there will find a directories structure with sugestive names. The directories structure represents all website elements ignoring the pagetypes structure.
One of the most important directory is [backgrounds] because there you'll find all pictures which creates visualy the website structure. You'll find the backgrounds for sidebar on left or right or pages with no sidebar.
Tips: Modifying just the images of the website is a fast way to change or adjust the look of this theme, without removing any feature of it.
All functions are located in wp-content/themes/unique/functions.php. Below you can find all functions reference.
get_allimages
Description:
- Used for geting all images of a post or page
Parameters:
- postID: id of the post or page
- size: can be thumbnail, medium, large or orginal
- excludefirst: set it with the position of the image you want to exclude
Returns:
- the HTML code with all images for a post or page
get_promo_images
Description:
- Used for geting the images for homepage promo
Parameters:
- postID: id of the post or page who apears on the promo
- PromoNr: the number of promo starting with 1 - is used to create ids of the objescts in order to be used in javascript functions
Returns:
- the HTML code for creating promo images for a page or post
get_one_image
Description:
- Used for geting an images - is used in listing pagetypes and for getting the big picture for pages and posts
Parameters:
- postID: id of the post or page - if you set it -1, or not set it will retreive an array with all images
- pos: the position of the image you want to retreive
- size: can be thumbnail, medium, large or orginal
Returns:
- the url of an image
the_breadcrumbs
Description:
- Used for creating the breadcrumbs for all pages
Parameters:
- no parameter
Returns:
- the HTML code for breadcrumbs
portfolio_listing
Description:
- Used for creating the portfolio listing page
Parameters:
- no parameter
Returns:
- the HTML code for portfolio listing page content
products_listing
Description:
- Used for creating the products listing page
Parameters:
- no parameter
Returns:
- the HTML code for products listing page content
blog_listing
Description:
- Used for creating the blog listing page
Parameters:
- no parameter
Returns:
- the HTML code for blog listing page content
get_category_pages
Description:
- Used for creating pages buttons on listing pages
Parameters:
- total_posts: number of total post of a category
- cat_id: the category id
Returns:
- the HTML code for pages buttons
get_current_page
Description:
- Used for getting the curent page for categories with pages browsing
Parameters:
- opt: can be:
- currentpage - for returning the current page
- offset - for returning the last post of the previous page
Returns:
- see parameters
normal_listing
Description:
- Used for creating the code for a normal posts listing
Parameters:
- no parameter
Returns:
- the HTML code for normal post listing
archive_listing
Description:
- Used for creating the code for archive listings
Parameters:
archive_posts: ids list of archive posts
Returns:
- the HTML code for archive listing
blog_post
Description:
- Used for creating the code for a blog post
Parameters:
- no parameter
Returns:
- the HTML code for blog post
get_contact_link
Description:
- Used for getting the url for contact page
Parameters:
- ret: can be:
- link: for retreiving the url for contact page
- id: for retreiving the id for contact page
Returns:
- see parameters
portfolio_post
Description:
- Used for creating the portfolio detail page
Parameters:
- no parameters
Returns:
- the HTML code for portfolio detail page
products_post
Description:
- Used for creating the products detail page
Parameters:
- no parameters
Returns:
- the HTML code for products detail page
normal_post
Description:
- Used for creating a normal article detail page
Parameters:
- no parameters
Returns:
- the HTML code for normal posts detail page
get_shortcode
Description:
- Used for getting a shortcode name from a string
Parameters:
- content: string for parsing
Returns:
- the shortcode name without brackets
get_ordered_sections
Description:
- Used for getting all sections, pages, posts or categories ordered. This function uses sections.xml file - generated from the admin section
Parameters:
- parent: the parent of the posts, pages and categories
- exclude_posts: the ids of the posts witch must be excluded from the list
Returns:
- array with all sections ordered
get_main_menu
Description:
- Used for creating the main menu and the drop down menus
Parameters:
- echo_data: can be:
- menu: for creating the main menu
- dropdown: for creating the dropdown menus
Returns:
- see parameters
get_contact_form
Description:
- Used for creating the contact form and sending emails to administrator email address
Parameters:
- act: url of contact page - is used to set the form action
Returns:
- echo the contact form HTML
get_browser
Description:
- retreive the browser name
Parameters:
- no parameter
Returns:
- the browser name: Chrome, Safari, Gecko, Netscape, Firefox, MSIE 6, MSIE 7, MSIE 8, Opera
get_shortcodename
Description:
- retreive the shorcode name of a category, or a parent category if is loaded a post page
Parameters:
- no parameter
Returns:
- the shorcode name
get_headerinfo
Description:
- retreive all information for website header
Parameters:
- $ret - can be logo, header_tag, facebook_link, facebook_name, twitter_link, twitter_name
Returns:
- see parameters
get_promo_thumbnails
Description:
- prints the promo thumbnails
Parameters:
- no parameter
Returns:
- echoes the HTML code for promo thumbnails
get_promo_articles
Description:
- prints the promo information
Parameters:
- no parameter
Returns:
- echoes the HTML code for promo text and title
get_promo_buttons
Description:
- prints the promo buttons
Parameters:
- no parameter
Returns:
- echoes the HTML code for promo buttons
get_homepage_articles
Description:
- prints the homepage articles boxes
Parameters:
- no parameter
Returns:
- echoes the HTML code for homepage articles
print_fontsize_selector
Description:
- prints the font size selector buttons
Parameters:
- no parameter
Returns:
- echoes the HTML code for font size selector
get_right_categories
Description:
- gets and prints the sidebar categories menu
Parameters:
- no parameter
Returns:
- echoes the HTML code for sidebar categories menu
All .js files are located in wp-content/themes/unique/js/. All js uses jQuery for creating fade or slide effects. To change them please read the follow specification and please read the documentation on http://jquery.com/
Homepage promo
Filename: promo.js
Functions:
- setPositions() - this is executed to set up the start position for thumbnails
- switchPromo() - this is executed to change the position of actual promo item. It changes the actual promo content and the style of actual promo button
- showPromo() - this is the function which creates the animation for showing a promo item
- hidePromo() - this is the function which creates the animation for hiding a promo item
Because the default promo transition is a slide effect, if you want to change this probably you'll need to change the start position of the thumbanail too, modifing the setPositions() function.
Please read also the inline comments from fontsizeselector.js
Drop down
Filename: dropdown.js
Functions:
- ShowDropDown() - this function is the one that set up the position of each dropdown (this is automatic, you don't need to change anythig). It also shows the drop down menu.
- HideDropDown() - this function hides the drop down menu.
Drop downs are shown and hided with a simple display: none / display: block, property.
Font size selector
Filename: fontsizeselector.js
Functions:
- ChangeFont() - This is the function you must execute to change the font size. Here you need to set up the default sizes of each element.
- Parameters: Opt - can be increase, decrease or reset - this paremeter is trasmited to CangeFontSize function
- ResetFontSize() - This is the function you must execute to reset the font size to default. This function executes also ChangeFontSize
- ChangeFontSize() - This is the function which changes the font size for each element of the page, depending of Opt parameter.
Please read also the inline comments from fontsizeselector.js
Portfolio and products list switcher
Filename: listings.js
Functions:
- SwitchListType() - This is the function you must execute to change the list type for products and porfolio listings
- Parameters : title - Is the title of the stylesheet file you want to show
<link title="boxbig" type="text/css" href="http://localhost/wp/wordpress/wp-content/themes/unique/styles/boxbig.php" rel="stylesheet">
Can be: boxbig, boxsmall, listbig, listsmall.