• Skip to main content

Victor Font Consulting Group, LLC

Digital Business Strategists

Call Us:

+1 919-604-5828

  • Home
  • Care Plans
    • Care Articles
    • Optional Subscriptions
  • Consultations
  • Products
    • Code Snippets
    • Public GitHub Repositories
    • Gist Snippets
    • Pastebin Snippets (Free)
    • Free Plugins
  • FAQs
  • Support
    • Graphic Design
  • Contact
    • Speakers
    • Portfolio
  • Resources
    • Free WordPress Video Training
    • Tutorials
    • Articles
    • Cybersecurity
    • EU Referral Network
You are here: Home / Code Snippet / Using ThickBox with a Hyperlink on a WordPress Post or Page

Using ThickBox with a Hyperlink on a WordPress Post or Page

By Victor M. Font Jr.
August 20, 20111 Comment

Thickbox Example

There are quite a few default scripts installed along with WordPress including Scriptaculous, jQuery and ThickBox to name just a few. For a recent job, I needed to include a popup of member details, driven off of a dynamically created hyperlink. As I searched WordPress.org for a solution, I came across a Function Reference for the wp_enqueue_script. I was intrigued to learn that ThickBox was delivered with WordPress, so I started looking for ThickBox related plugins. There are many of them, but I couldn’t find any that worked through dynamic hyperlinks. They all seemed to use short codes in posts or pages.

Using ThickBox with dynamic hyperlinks is actually very simple. It’s so simple, it’s easier than installing a plugin. It requires modifying your theme’s functions.php file. To do this, open functions.php in the theme editor and add the following code at the bottom of the file:

Save the file and you’re done. Next, when you construct your hyperlink, include a class=’thickbox’ in the declaration.


To understand how the displaycode.php program works, see Raising the WP eMember Public Directory Bar to the Next Level.

  • 0share
  • Facebook0
  • Twitter0
  • Pinterest0
  • LinkedIn0
  • Print
  • SMS0

About Victor M. Font Jr.

Victor M. Font Jr. is an award winning author, entrepreneur, and Senior IT Executive. A Founding Board Member of the North Carolina Executive Roundtable, he has served on the Board of Advisors, of the North Carolina Technology Association, the International Institute of Business Analysis, Association of Information Technology Professionals, Toastmasters International, and the North Carolina Commission for Mental Health, Developmental Disabilities, and Substance Abuse Services. He is author of several books including The Ultimate Guide to the SDLC and Winning With WordPress Basics, and Cybersecurity.

Reader Interactions

VictorFont.com runs on the Genesis Framework

Genesis FrameworkThe Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Check out the incredible features and the selection of designs. It's that simple—start using Genesis now!

Click here to download The Genesis Guide for Absolute Beginners (PDF - 1.4 MB)

Leave a Reply Cancel reply

Your email address and website will not be published. Required fields are marked *
Posting a comment means that you agree with and accept our Comment & Product Review Policy

Comments

  1. Danny

    September 3, 2014 at 5:58 pm

    Thanks a lot for this post!!!

    Reply

Call: +1 919-604-5828

Send us an E-mail

Accessibility Statement | Affiliate Marketing Disclosure | Capability Statement

Cookie Policy | Comment & Product Review Policy | Privacy Policy | Site Map | Terms & Conditions

Copyright © 2003–2022 Victor M. Font Jr.

Return to top of page
Posting....
We only use analytical cookies on our website that allow us to recognize and count the number of visitors, but they do not identify you individually. They help us to improve the way our website works. By clicking Accept you, agree to cookies being used in accordance with our Cookie Policy.OkNoCookie policy