5

I'm trying to create a part to my website http://176.32.230.43/testdigitalmarketingmentor.co.uk/ (at the bottom!)

Where the contact form/information appears inside of the screen of an iPad. I have done this already where a video appears inside the screen of a laptop, but I can't figure out how to change this to my contact form.

So far I have created the contact section as a builder layout part in Themify Builder. This generates the shortcode: [themify_layout_part id=103] to be placed around the website.

I have just put it below the iPad for now. However, how can I implement a shortcode as part of HTML? This is the code and css I have so far for the iPad with video in the screen. Any help would be much appreciated!

#ipad-panel {
    position: relative;
    padding-bottom: 75%;
    padding-left: 64%;
    height: 0;
}

#ipad-panel iframe {
    box-sizing: border-box;
    background: url(http://176.32.230.43/testdigitalmarketingmentor.co.uk/wp-content/uploads/2016/07/ipad-750x531.png) center center no-repeat;
    background-size: contain;
    padding: 11.3% 14.8% 11%;
    position: absolute;
    left: 20%;
    width: 60%;
    height: 60%;
}


<div id="ipad-panel">
    <iframe src="https://www.youtube.com/embed/BhEWkcyXYwg?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
</div>

5 Answers 5

3

You need to find the php template file with this HTML area and implement the short code there, you can use this plugin what the file to easily find out which file is it.

after you have found the template file insert <?php echo do_shortcode('[themify_layout_part id=103]'); ?>

Sign up to request clarification or add additional context in comments.

4 Comments

Hi, where do I insert that code in the file? I don't have much/any experience with php.
Add it between the divs <div id="ipad-panel"> <?php echo do_shortcode('[themify_layout_part id=103]'); ?> </div>
This still doesn't seem to work? I'm not sure if I'm doing it right. I've just put that code into the bottom of my page.php file but it just shows the iPad image (with no contact info etc) at the very bottom of my site.
Why is this answer not accepted as right? Finally someone show us how to do it ... I google it 10 times only some useless tutorials.
2

if you are going to use code in WordPress dashboard then you need to put it just [themify_layout_part id=103]

if you are going to use in files like template.php then you need to make your shortcode to hard code

now create a template for your page and then at the end

<div id="ipad-panel">
    <?php echo do_shortcode('[themify_layout_part id=103]'); ?>
</div>

OR go to your page builder and add a section with HTML section and put the code [themify_layout_part id=103]

hope you understand

2 Comments

That piece of code doesn't seem to work. Do I need to put the <?php code anywhere else?
what is your file extension name ? like .php .html etc
2

If you use Elementor plugin in WordPress. And you also want to add a short code manually, ,you can paste the code below anywhere you want!

<section>[YOUR SHORTCODE]</section>

I hope I was able to help

Comments

1

I don't really understand the question. What's stopping you from doing this?

<div id="ipad-panel">
    [themify_layout_part id=103]
</div>

1 Comment

I don't think Wordpress allows you to do that, it doesn't seem to work.
0

You cannot paste WordPress shortcode in HTML directly. To generate HTML of shortcode, you need to pase it into WordPress page or post, get HTML of it, and than copy just that HTML (inspect element in your browser).

6 Comments

I've put the shortcode onto this page, 176.32.230.43/testdigitalmarketingmentor.co.uk/?page_id=104 and have tried taking some code from it to insert however it doesn't seem to work. I'm not sure which part of the code I need and how to implement it?
did you open page editor like this one here codex.wordpress.org/images/thumb/2/26/writepage.png/… ?
No I used "inspect element" on the page I linked in my first comment. Is this not what I am supposed to do?
No, it's not. You cannot paste code into "inspect element". You should do that in wp-admin, admin dashboard of WordPress.
Oh, no thats not what I meant. I'm not sure what to take from inspect element. I know to put it into the admin dashboard.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.