Skip to content
Cobalt Apps Docs
  • CobaltApps.com

FAQs

7
  • There Are A TON Of WP Frameworks Out There, Why Choose Freelancer?
  • If Freelancer Is Free Than Why Does It Require A License?
  • What Is A Theme Framework And How Is It Different Than The Default WordPress Themes?
  • What Are WordPress Conditionals And How Do I Use Them?
  • What Are Filter Hooks?
  • What Are Action Hooks?
  • How Do I Renew My Cobalt Apps Product License?

Dynamik Website Builder

29
  • Dynamik Website Builder Change Log
  • How To Add New Google Fonts To Dynamik
  • How To Add Custom Fonts To Dynamik
  • How To Setup Your Site Just Like A Dynamik Skin Demo
  • Dynamik Vitality Skin Demo Setup
  • Dynamik ThemeShop Skin Demo Setup
  • Dynamik Startup Skin Demo Setup
  • Dynamik Promote Skin Demo Setup
  • Dynamik Parallax Skin Demo Setup
  • Dynamik NonProfit Skin Demo Setup
  • Dynamik Journal Skin Demo Setup
  • Dynamik Impact Skin Demo Setup
  • Dynamik Impress Skin Demo Setup
  • Dynamik RealEstate Skin Demo Setup
  • Dynamik Commerce Skin Demo Setup
  • How To Add A Retina-Ready Logo To Dynamik
  • Dynamik Custom PHP Builder
  • Dynamik Layout Widths
  • Dynamik Custom Widget Areas
  • Dynamik Custom Hook Boxes
  • Dynamik Custom Conditionals
  • Dynamik Custom Labels
  • Dynamik Custom Templates
  • Dynamik Custom Javascript
  • Dynamik Custom Functions
  • Dynamik Custom CSS
  • Dynamik Settings/Custom Import/Export
  • How The Dynamik Skins Feature Works
  • How To Install The Genesis Framework And Dynamik Website Builder

Instant IDE

12
  • Comparing Instant IDE With The Instant IDE Manager Plugin
  • Editing The Instant IDE HTACCESS File
  • Uninstalling Instant IDE
  • About Instant IDE Security
  • How To Manually Update The Instant IDE Manager Plugin
  • What To Do If You Forget Your Admin Access Pin Number
  • Securing The Instant IDE Manager Admin
  • How To Unzip A File In Instant IDE
  • How To Install WordPress Using Instant IDE
  • How To Resolve Form Validation Errors
  • Instant IDE Keyboard Shortcuts
  • How To Install Instant IDE

Simple Sandbox Pro

1
  • How To Enabled The PHP “exec” Function On Your Server

Genesis DevKit

10
  • DevKit Journal Theme
  • DevKit Promote Theme
  • DevKit Impact Theme
  • DevKit Startup Theme
  • DevKit Default Theme
  • What Is A DevKit Theme?
  • DevKit Parallax Theme
  • DevKit Impress Theme
  • Previewing Mobile Fixed Header When Logged Into Dashboard
  • Genesis DevKit Plugin Options And General Functionality

Extender Pro

9
  • Extender Pro Custom Hook Blocks
  • Extender Pro Custom Hook Boxes
  • Extender Pro Custom Widget Areas
  • Extender Pro Custom Conditionals
  • Extender Pro Custom Labels
  • Extender Pro Custom Templates
  • Extender Pro Custom Javascript
  • Extender Pro Custom Functions
  • Extender Pro Custom CSS

Themer Pro

10
  • Advanced File Editor Controls
  • Ace Editor Themes
  • Frontend Dev Tools
  • Frontend Hooks Map
  • Child Theme Editor
  • Child Theme Image Manager
  • Ace Editor Syntax Validation Checking
  • Child Theme Creator
  • Themer Pro Keyboard Shortcuts
  • Quick-Edit Page Templates With Front-End “Edit Code” Button

Freelancer Framework

13
  • Hide Freelancer Admin Pages
  • Adding Custom Body Classes To Freelancer
  • Debugging Freelancer Scripts
  • Set Custom Icons URL
  • There Are A TON Of WP Frameworks Out There, Why Choose Freelancer?
  • If Freelancer Is Free Than Why Does It Require A License?
  • Setting Up The Freelancer Child Theme Default Settings
  • Freelancer Action Hooks
  • Getting And Defining Freelancer Layouts
  • Freelancer Child Theme Setup
  • How To Add Footer Widgets To Freelancer
  • Freelancer Layouts
  • Freelancer Filter Hooks
View Categories
  • Home
  • Articles
  • Themer Pro
  • Quick-Edit Page Templates With Front-End “Edit Code” Button

Quick-Edit Page Templates With Front-End “Edit Code” Button

3 min read

When creating custom Page Templates in Themer Pro you’ll find that you can use the following code snippet to provide quick access to such files from the front-end pages of your website.

if ( function_exists( 'themer_pro_admin_bar_add_node') )
    themer_pro_admin_bar_add_node( $file = 'page-builder.php', $subdir = '', $fullscreen = false );

Note that the “function_exists” code is necessary so that if/when you de-activate the Themer Pro Plugin on sites using this code there will be no “function does not exist” errors on your template pages. Since Themer Pro would not be active at that point this code would no longer have a function to point to and this “function_exists” code essentially turns off this snippet in such cases.

Just paste that code to the top of your Page Template file as shown in the screenshot below:

Note the following three variables:

  1. $file = The actual file name of the template file in question. (e.g.. ‘page-builder.php’)
  2. $subdir = The subdirectory of the template file in question. If the template file is located in the root of your Child Theme folder then you can simply leave that set to the default value found in the example code above. (e.g.. ”) But, for example, if this template file is located in a /page-templates/ subdirectory inside your Child Theme folder then you’d set this value to ‘page-templates’.
  3. $fullscreen = Whether or not you want Themer Pro to display your template code in full screen mode or the default display mode. (true = Full Screen Mode | false = default display mode) Note that this value is meant to be set without single quotes, so it would be: true and not ‘true’.

Once you’ve added the code snippet from above to your template file and you’ve assigned that template to a particular page or post, then you when view that page or post on the front-end of your site you should now see an “Edit Code” button in the WordPress Admin Bar at the top of your page. Note that if you do not see your WordPress Admin Bar then you’re either not logged into WordPress or you don’t have that set to display in your User Profile Settings. So your Admin Bar should now look like the screenshot below, when viewing pages or posts that have the custom template in question:

When you click that “Edit Code” button it should take you directly to your template file inside the Themer Pro Child Editor and display it as you specified in your code snippet. You should also then see a “Go Back” button at the top of your file editor as seen in the following screenshot:

When you click that you should be taken directly back to that page where you came from (the one with the “Edit Code” button in the WP Admin Bar). So these two buttons allow you to seamlessly click back and forth between the page displaying your template code and the template file itself.

What are your Feelings

  • Happy
  • Normal
  • Sad
Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
AboutSales & Support PoliciesProduct Support GuidelinesPrivacy PolicyAffiliatesTerms of ServiceContact Us
Cobalt Apps DocsCopyright © 2025