How to load template in i frame with in another template - wordpress

I have a archive template in which I want to try add other template in iframe but I don't know how to add this? I am trying to do like this one
<iframe id="iframeBox" src='<?php echo get_template_directory_uri();?>/archive-programmes.php' sandbox="" FRAMEBORDER="no" height="500" width="500"></iframe>

I would create a page using that template and use the page URL on to your iframe.
<iframe id="iframeBox" src='URL here' sandbox="" FRAMEBORDER="no" height="500" width="500"></iframe>

#seema,
Not sure what you are trying to achieve here but you can do such a thing using get_template_part function. Alternatively if you only want to use iframe then you will have to include the page created using the template and not the template file itself.

Related

Google Map on Listing Section Wordpress

I used business directory plugin which add listing section. Add the listing page, I try to add the map inside the listing page. The map seems to appear inside wordpress directory dashboard but it does not appear in the website. I know that this plugin got google map module, but is there any way to put google map without using the google map addon?Here is my code
<p style="text-align: center;"><img class="alignnone size-medium wp-image-291" src="https://harta-net.s3.amazonaws.com/uploads/2018/05/f84590ac-b53e-432d-9137-2241c7075f2d_tb-300x147.jpeg" alt="" width="300" height="147" /></p>
<iframe style="border: 0;" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3984.3164489624587!2d101.61260631430928!3d3.0093049978084196!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x31cdb36044fe6151%3A0x9c6f6535d01735ff!2sMasteron+Grand+Pavilion!5e0!3m2!1sen!2sin!4v1526629036980" width="600" height="450" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
directory dashboard image. Here is the link of my website
edit: Add the code and the website link
edit 2: try to use other google map plugin to add but still fail
edit 3: I found the problem is because I need to create a section for the google map inside business directory form to make it appears. Additional question, is it possible to only input adddress and auto change it from address to google map?
you can try to add this on any page,post or sections of content/text box
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3984.3164489624587!2d101.61260631430928!3d3.0093049978084196!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x31cdb36044fe6151%3A0x9c6f6535d01735ff!2sMasteron+Grand+Pavilion!5e0!3m2!1sen!2sin!4v1526629036980" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
Hi Did you added the api key for google maps for specific live url? if not then you have to create and after that you have to mention in your iframe

How would I remove this from all wordpress posts

In every wordpress post I have code like this -
<img src="http://domain/wp-content/uploads/2016/08/Black-Bosch-Avantixx-HBM13B261B-Electric-Double-Oven-300x266.jpg" alt="black-bosch-avantixx-hbm13b261b-electric-double-oven" width="300" height="266" class="alignright size-medium wp-image-367913" />
Obviously each post is a different name, how can I remove this paragraph inside all posts as I have thousands.
Is there a command I can do using phpmyadmin?
Step by step would be great thanks.
You have try to delete the img? Do you have use some plug-in downloaded from external website? I don't think you need db i think it's something in JS or php if this you can use add to your js file:
$(document).ready(function() {
$(".wp-image-367913").css("display","none")
});
If it's only the code, you need to check your article.php or single.php or your post php page file and see if there are this link write some where.

Changeable element shortcode

I'm building a website for a nutritionist in wordpress, where it has every patient area.
So I was thinking to make a section with a motivation youtube video and this code will be placed to every customer page.
Is there a way I can place for example [motivation_video] on the wordpress and that I could change the youtube link on my backend whenever I want? So I won't need to change all the pages.
Thank you so much!
Inside your wordpress functions.php file place the following code with your modifications:
function video_function($atts, $content = null){
$shortcode_return = '<iframe width="560" height="315" src="video_url_here" frameborder="0" allowfullscreen></iframe>';
return $shortcode_return;
}
add_shortcode('motivation_video','video_function');
Whenever you want a new video, just change the video_url_here

video shortcode not working in wordpress site

I want to add mp4 video to my page, but shortcode [video] not workig. I see only string in frontend with:
[video width="640" height="360" mp4="http://localhost:8080/CC/wp-content/uploads/2015/05/movie.mp4"]
Where is the problem ?
Thanks for help.
Try putting the closing shortcode tag [/video] like this
[video width="640" height="360" mp4="http://localhost:8080/CC/wp-content/uploads/2015/05/movie.mp4"][/video]
its shoudnt be a requirement but just in case try it let us know.
You neglected the short-code. You wrote mp4 instead of src
Code corrected:
[video width="640" height="360" src="http://localhost:8080/CC/wp-content/uploads/2015/05/movie.mp4"]
In my case, I was seeing a normal link to the video instead of the video element.
Removing the playsinline attribute from the video tag (which had been added via a PHP filter in my functions.php file) and making sure the video format was correct fixed the issue for me.

How to add iframe ads below title in blogspot?

i want to add an iframe ads in one of my blogspot blog below the title in a single post, i find the solution to put the ads before these line of code :
<data:post.body/>
So my ads code is just like this :
<iframe src="http://myblog.com/display?ref=0000&q=KEYWORD&smart_ad_id=002" width="200" height="200" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
<data:post.body/>
That was an easy step, but i got a problem when i want to add the title to replace the "KEYWORD" line inside those iframe. The code to call the title is here :
<data:post.title/>
When i add those line of code to replace the "keyword" line in my iframe code, i got an error :
<iframe src="http://myblog.com/display?ref=0000&q=<data:post.title/>&smart_ad_id=002" width="200" height="200" frameborder="0" scrolling="no" allowtransparency="true"></iframe>
Can anyone gives me solution on this, thanks..
I checked your post and also used your code in my blog. And I figured out that you can add in blogger template but the external link(http://myblog.com/display?ref=0000&q=KEYWORD&smart_ad_id=002) contains equal signs(=) which aren't acceptable So you can't add the above iframe instead of it you can use other which doesn't contain the equal sign.

Resources