WordPress Jquery Not Defined

Add this line of code at the top of your child theme function. It should get rid of your error. If not good luck debugging 🙂

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
wp_enqueue_script('jquery');
wp_enqueue_script('jquery');
wp_enqueue_script('jquery');
Do Shortcode
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<?php echo do_shortcode("[shortcode]"); ?>
<?php echo do_shortcode("[shortcode]"); ?>
<?php echo do_shortcode("[shortcode]");  ?>
WordPress create a shortcode

Inside your themes functions.php add the below snippet and fill out the placeholders.

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
############################################################################
//////////////////////////////////////
// This is your shortcode. You reference it like you see below with the square brackets.
// [shortcode_name_here]
//////////////////////////////////////
function echo_shortcode_function_name(){
ob_start();
include '/path to our file';
return ob_get_clean();
}
add_shortcode( 'shortcode_name_here', 'echo_shortcode_function_name');
############################################################################
############################################################################ ////////////////////////////////////// // This is your shortcode. You reference it like you see below with the square brackets. // [shortcode_name_here] ////////////////////////////////////// function echo_shortcode_function_name(){ ob_start(); include '/path to our file'; return ob_get_clean(); } add_shortcode( 'shortcode_name_here', 'echo_shortcode_function_name'); ############################################################################
############################################################################
//////////////////////////////////////
// This is your shortcode. You reference it like you see below with the square brackets.
// [shortcode_name_here]
//////////////////////////////////////
function echo_shortcode_function_name(){
    ob_start();
    include '/path to our file';
    return ob_get_clean();
}
add_shortcode( 'shortcode_name_here', 'echo_shortcode_function_name');
############################################################################

Now reference your shortcode and it should load no issues if your file references are correct.

Add Custom Page To WordPress
Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<?php /* Template Name: any_name.php */ ?>
<?php /* Template Name: any_name.php */ ?>
<?php /* Template Name: any_name.php */ ?>

Search

Your Favourite Posts

  • Your favorites will be here.

Latest Content

© Garth Baker 2025 All rights reserved.

Pin It on Pinterest

Garth Baker
en
af
sq
am
ar
hy
az
eu
be
bn
bs
bg
ca
ceb
ny
zh-CN
zh-TW
co
hr
cs
da
nl
en
eo
et
tl
fi
fr
fy
gl
ka
de
el
gu
ht
ha
haw
iw
hi
hmn
hu
is
ig
id
ga
it
ja
jw
kn
kk
km
ko
ku
ky
lo
la
lv
lt
lb
mk
mg
ms
ml
mt
mi
mr
mn
my
ne
no
ps
fa
pl
pt
pa
ro
ru
sm
gd
sr
st
sn
sd
si
sk
sl
so
es
su
sw
sv
tg
ta
te
th
tr
uk
ur
uz
vi
cy
xh
yi
yo
zu
Share This