How can I call a WordPress shortcode within a template

0 votes

There's a plugin for the Contact us form.

All you need to do to activate the form is insert [CONTACT-US-FORM] on the page. A page template is being called by my page. Can the [CONTACT-US-FORM] shortcode be added to the PHP template? I gave it a shot, but it didn't work.

The WordPress page functioned, but not in the way I'd like.

[CONTACT-US-FORM]

Contact Us template for PHP This is what I want to do, but it didn't work. 

<?php
/*
Template Name: [contact us]

*/
get_header(); ?>
[CONTACT-US-FORM]
<?php get_footer(); ?>

Can someone please help me with this?

Aug 3 in PHP by Kithuzzz
• 4,080 points
5 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In PHP

0 votes
1 answer

How can I use jquery $.ajax to call a PHP function?

Hello @kartik, Use $.ajax to call a server context (or ...READ MORE

answered Aug 27, 2020 in PHP by Niroj
• 82,740 points
5,399 views
0 votes
1 answer

How can I use break or continue within for loop in Twig template?

Hello @kartik, This can be nearly done by setting a ...READ MORE

answered Oct 22, 2020 in PHP by Niroj
• 82,740 points
4,005 views
0 votes
1 answer

How can I get the classname from a static call in an extended PHP class?

Hello @kartik, __CLASS__ always returns the name of the ...READ MORE

answered Oct 27, 2020 in PHP by Niroj
• 82,740 points
224 views
0 votes
1 answer

How can I add PHP page to WordPress?

Hii @kartik, First, duplicate post.php or page.php in your theme folder. Rename the ...READ MORE

answered May 8, 2020 in PHP by Niroj
• 82,740 points
509 views
0 votes
1 answer

How can I expire a PHP session after 50 minutes?

Hii @kartik, Use the session_set_cookie_params funciton to set the session. If necessary call this function ...READ MORE

answered May 19, 2020 in PHP by Niroj
• 82,740 points
403 views
0 votes
1 answer

How can I connect to a Tor hidden service using CURL in PHP?

Hello @kartik, I use Privoxy and cURL to scrape Tor ...READ MORE

answered May 19, 2020 in PHP by Niroj
• 82,740 points
3,082 views
0 votes
0 answers

Setting a Custom SEO Title Using Yoast Wordpress SEO API

I've just installed this plugin on my ...READ MORE

Mar 10 in Digital Marketing by Kichu
• 19,040 points
109 views
0 votes
2 answers

Define a SQL query? What is the difference between SELECT and UPDATE Query? How do you use SQL in SAS?

HI.. SQL is Structured Query Language, which is ...READ MORE

answered Aug 8, 2020 in PHP by anonymous
4,736 views
0 votes
1 answer
0 votes
0 answers

Anyone can help me out to understand the semantic of (document.getElementBYId("demo").innerHTML="Hello") ?

Hello guys, Can Someone helps me to find ...READ MORE

Jan 17, 2020 in Web Development by anonymous
• 37,500 points
404 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP