How to Use the Custom Code Settings

[edit] Please Note

These docs are now deprecated, we have a new Support area located here

Revision as of 16:46, 1 December 2011 by MrFent (Talk | contribs)

This is where you can insert all of your custom coding.

Contents

Custom CSS

Custom CSS is by far the best way to customize your site.

It would be easy to add tons of theme options to every little thing in your site; but when trying to customize colors, shapes, text, and control each entity’s size… options aren’t always the best solution. This is because you could add 20 options just to control one block of text in a theme; so adding options for everything leads to an overly-complicated product.

The below example shows how to add or modify a site's CSS. Follow similar steps for all Custom CSS. From your WordPress Administration Panel:

  1. Under Pagelines, select the "Custom Code" panel.
    Custom Code Panel
    Custom Code Panel
  2. In the CSS Rules box, enter the Custom CSS code you want to use to modify or add a specific CSS rule
  3. For example, to change the margin at the top of your page: You would add, body {padding-top: 15px;}
  4. Next, click the "Save Options" button in the upper right hand corner
  5. The Custom Code is dynamic which means that it will over-write the default Pagelines CSS settings.
  6. Remember: Proper CSS code format must be used in Custom CSS:
  	#navigation_rss {position: absolute;
       left: 720px;
       font-family: Verdana, Arial, Helvetica, sans-serif;
       text-transform: uppercase;
       color: #897567;
       line-height: 2.5em;}

In addition to being able to add Custom CSS in the Custom CSS Panel, javascripts can be added to both the header and the footer.There is also a section to add Google asynchronous analytics code script.

  1. To add script, simply paste the desired script into the header or footer sections of the Custom CSS Section.
  2. To add Google Analytics, simply copy the Google script from your Google Analytics account into the Google section of the panel.
  3. Next, click the "Save Options" button in the upper right hand corner.

The Difference Between the PageLines Customize plugin & the Custom CSS section

The "Custom CSS" section is a simple quick way to add custom styles to your current site design.

The PageLines Customize plugin is a more comprehensive way to customize your theme. It is a way to create child themes for your site through the plugin to add CSS but also functions, hooks and anything you want to customize your site.

Some of the differences

  1. The Custom CSS section only allows you to customize CSS
  2. In version 1.5 of PagelinesPro there was a base child theme
  3. The PageLines Customize plugin replaces the base child theme, allowing you to do the same types of customizations from the plugin rather than from an entirely separate child theme
  4. The Custom CSS is just for quick CSS changes, you would not want to use it to re-theme your entire site
  5. It also gives you the ability to customize child themes without your changes being overwritten when you update the child theme
  6. If you download iblogpro5 and want to customize it, those changes will stick around when you update to iblogpro6

Activate the Pagelines Customize Plugin

Customize Plugin
Add Plugin
  1. Go to your PageLines Settings
  2. Click on the "Store" tab
  3. Click on the "Plugins" tab
  4. Click on the "Add Plugins" tab
  5. Click on the "Top Free" tab
  6. Find the "Pagelines Customize" plugin and click Activate
  7. The physical path to the style.css is (wp-content\plugins\pagelines-customize)
  8. Repeat the process to activate the "Child Editor" plugin

How To Activate the Child Editor
Custom Code
Custom Code

Once the PageLines Customize plugin has been installed and activated, you can use the Child Editor plugin to modify the "style.css" From your WordPress Administration Panel:

  1. Go to your PageLines Settings
  2. Choose "Store"
  3. Then choose "Plugins"
  4. Then "Top Free"
  5. Install the Child Editor plugin
  6. The physical path to the style.css file is located (wp-content\plugins\pagelines-customize)

Using the Child Editor to edit files

Note: You must install and activate the PageLines Customize plugin in order for the Child Editor to have something to modify.
Child Editor
Child Editor

From your WordPress Administration Panel:

  1. Go to your PageLines Settings
  2. Then click on "Child Editor"
  3. Next, insert the custom css under the "Style" tab
  4. Save your work
Other Functions of Child Editor Plugin
Child Editor
Other Uses
  1. The Child Editor plugin allows you to edit the "Functions.php" created by the PageLines Customize plugin
  2. It also allows you edit the site's "Page Base" theme created by the PageLines Customize plugin

How to use CSS Inspection Tools

Installing Firebug

There are a couple of FREE CSS Inspection Tools which can be used to do this. They are Firebug and Google's Chrome Inspection tool.

Install Firebug
Install Firebug

From Mozilla Firefox:

  1. Go to http://getfirebug.com/
  2. Download and install the Firebug extension
  3. Once installed you will see the Firebug icon in the upper right-hand corner of Firefox.


Using Firebug To Change Padding of an element

Selecting elements
Selecting elements with Firebug

From Mozilla Firefox:

  1. Go to your site
  2. Click on the Firebug icon in the upper right-hand corner of your browser
  3. Click on the Inspection icon on the Firebug interface
  4. Next, click on the section of the page to be inspected
  5. Upon clicking any element you will see the corresponding HTML and CSS code highlighted in Firebug
  6. Copy the CSS code you are wanting to change
  7. Return to the Pagelines Settings and select "Custom CSS"
  8. Paste the CSS code that is being altered into the Custom CSS section
  9. "Save Options" and refresh your browser to see the changes


Using Google's Chrome To Change Padding of an element

Selecting elements
Selecting elements with Chrome's Inspection Tool

From Google Chrome: (The CSS Inspection Tool is built into Chrome)

  1. Go to your site
  2. Right Click anywhere on the page and then click "Inspect Element"
  3. Click on the Inspection icon on the bottom row of the Inspection interface
  4. Next, click on the section of the page to be inspected
  5. Upon clicking any element you will see the corresponding HTML and CSS code highlighted in Firebug
  6. Copy the CSS code you are wanting to change
  7. Return to the Pagelines Settings and select "Custom CSS"
  8. Paste the CSS code that is being altered into the Custom CSS section
  9. "Save Options" and refresh your browser to see the changes