Loading...

Code Tag

${ code }
- usage : ${code}

This tag will allow you to add raw code/script within the PSD Text Layer contents. You can draw any paragraph text layer in your PSD, but you should try to keep the size and position of your code layer relative to your design.

Add inline CSS, JavaScript or PHP (PHP requires a server) - as text contents in the layer.
IMPORTANT: Photoshop takes longer than expected to process text layers with many characters, you should try to keep your code layers minimal or link external files.
This tag works with Paragraph Text only, and is designed for HTML5, PHP, and WordPress outputs.
Remember you can also Link External Files if required, or add external links inside your code layers (see below).

Raw HTML

You can add raw HTML code to your text layer and it will convert as is.

1
2
3
<p style="text-align:center;">
    <a href="http://exportkit.com">Click here</a> to return home.
</p>
NOTE: You will likely require an external style sheet, or styles applied to the elements for them to render correctly.
IMOPRTANT: You must draw the size and position of your code layer inside your PSD, all raw elements will render INSIDE YOUR CODE LAYER.

Raw CSS

You can add raw CSS styles to your text layer inside an additional <style /> element, or you can use <link />.

We recommend that you use external links for large CSS files.

Internal <style />

1
2
3
4
5
6
<style>
#contacts_link {
    float:right;
    padding-right:10px;
}
</style>

External <link /> (Recommended)

1
<link rel="StyleSheet" href="your_style_sheet.css" />

Raw JavaScript

You can add raw JavaScript to your text layer inside an additional <script /> element, or link an external .js file.

We recommend that you use external scripts to link large JavaScript files.

Internal <script />

1
2
3
4
5
6
7
8
9
10
<script>
jQuery('<img/>', {
    id: 'contact_icon'
}).appendTo('#details')
.css('left','3px')
.css('top','0px')
.css('width','163px')
.css('height','162px')
.attr('src','../your/path/your_image.png');
</script>

External <script /> (Recommended)

1
<script type="text/javascript" src="your_script.js"></script>

Raw PHP

You can add raw PHP to your text layer as is, but Industry Standard rules apply, you must enclose your PHP code correctly: eg. <?php //your code here ?>.

We recommend that you use include or require to link large PHP files.

Internal <?php ?>

1
2
3
4
<?php
$version = "1.2.8";
echo "Current version: ".$version;
?>

External <?php ?> (Recommended)

1
<?php include "your_code.php"; ?>
LOGIN NOW: Get instant access to our free Online Training - click here.

Products For WP Professionals


wp_developer

WP Developer Pack

wp_developer

WP Developer Pack (6 Months)

wp_designer

WP Designer Pack (6 Months)

Need a custom solution?

Try our Shop!

Using the Plugin

Layer Support

Layer Tags

How To Guides

Optimization Tips

Help Us Improve


We aim to keep our content relevant with useful information, examples, samples and links. Tell us what you think!

I found the content:

Helpful
Confusing
Outdated
Broken Links
Bad Spelling
Too Short
Too Long

This page needs:

Nothing
Better Content
Links
Examples
Videos

Free Download


Responsive Multi-Page Website

A clean responsive website with multiple pages +target screens.

Start Your 14 Day Free Trial

New users get instant access to the 14 Day Free Trial with all features enabled, and Free Online Training. We guarantee your first conversion will 100% work - we work with you to ensure this, contact us or check our FAQs for assistance.

Connect With Us

Top