How can we add wpform to custom theme

Adnan

I create custom theme and I am trying to create a contact form using wpform but for some reasons the form doesn't show on my page

here is a code from the custom theme

<?php 
    /* Template Name: CallUS*/
    get_header();?>

<section>
      <div class="u-clearfix u-sheet u-valign-middle-xs u-sheet-1">
        <h1>
          call us
        </h1>
        <img
          class="u-image u-image-default u-image-1 u-hidden-xs"
          src="<?php bloginfo('template_directory');?>/images/---1113.png"
          alt=""
          data-image-width="800"
          data-image-height="972"
        />
      </div>
</section>
<?php get_footer();?>

and this picture from the form that I have created using wpform

Akhtarujjaman Shuvo

Way 01: You must have the_content() function in order to show page contents. I've edited your code so you can see how to do it:

<?php 
    /* Template Name: CallUS*/
    get_header();?>

<section>
      <div class="u-clearfix u-sheet u-valign-middle-xs u-sheet-1">
        <h1>
          call us
        </h1>
        <img
          class="u-image u-image-default u-image-1 u-hidden-xs"
          src="<?php bloginfo('template_directory');?>/images/---1113.png"
          alt=""
          data-image-width="800"
          data-image-height="972"
        />
       <?php
        while ( have_posts() ) :
            the_post();

            the_content();

        endwhile; // End of the loop.
        ?>
      </div>
</section>
<?php get_footer();?>

Then you've to select CallUS Page Template from below page: enter image description here

Way 02: If you go to the WPForms from the menu then you can see the shortcode column on each row. it will be like [wpforms id="123"]

WP form shortcode

Copy your design shortcode from there and use that directly into your file like below:

<?php 
    /* Template Name: CallUS*/
    get_header();?>

<section>
      <div class="u-clearfix u-sheet u-valign-middle-xs u-sheet-1">
        <h1>
          call us
        </h1>
        <img
          class="u-image u-image-default u-image-1 u-hidden-xs"
          src="<?php bloginfo('template_directory');?>/images/---1113.png"
          alt=""
          data-image-width="800"
          data-image-height="972"
        />
        <?php echo do_shortcode('[wpforms id="3306"]');?>
      </div>
</section>
<?php get_footer();?>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Vuetify how to add custom theme

How can we add universal search for the custom new screens in Acumatica

Keycloak FTL: how can we access error messages within the login template on a custom theme

How can I add my custom component to Mui Theme options so that I can override it?

Can we add UITableView into Custom UITableViewcell?

Can we add custom validations in formik YupValidationSchema?

How to add custom item in android Theme declaration?

How to add custom theme to Ionic 5 application?

How to add new font to custom magento theme?

how to add a logo on custom wordpress theme

How I can add my own CSS to the Sitecore SXA custom component with the existing wireframe theme?

How can I add a custom CSS class to a main menu button on Astra Theme for Wordpress

How can i add dynamic sections withing dynamic sections in shopify custom theme developement?

Hi my Wordpress theme not supportimg pagination.How can i add custom pagination in wordpress?

How can I apply a custom theme?

In the Karate DSL Framework, how can we add custom step definitions to expand its functionalities beyond REST capabilities?

How to add custom methods to eloquent model in a way we can chain them?

How can we update the value of a array field/add a field in nested array in mongodb with a custom value

How we can add additional UILabels to UINavigation?

With Prisma, How can we add a comment for a Type?

How can we add Menu to Label in swt

how can we add link in angular 8?

How can we add video to a tableview?

How can we add a UIGestureRecognizer to Outlet Collection?

SwiftUI How can we add conditions to modifiers

Can we add custom aggregated value in Elastic Search

Can we add custom values to a CakePHP Table Object?

How to add a gradient color in daisyui custom theme colors?

How to theme add/edit form for custom content type in drupal 7