Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8047421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:05:32+00:00 2026-06-05T06:05:32+00:00

I am using wordpress for my website and I am trying to set up

  • 0

I am using wordpress for my website and I am trying to set up my pages so that a user has to click a button to view the content. Yes, very simple with show/hide etc but the button I Want the user to click is this http://www.facebook.com/plugins/like.php

To display that in my page i need to use an iframe which is where it gets tricky. I have set up the show/hide code so that when a user clicks the like button (or anywhere in the iframe) it will display the content. But, no such luck!

This is my code

<div id="imagebox" style="display:none;"><?php $image = wp_get_attachment_image_src(get_field('image'), 'full'); ?>
                                <img src="<?php echo $image[0]; ?>" alt="<?php get_the_title(get_field('image')) ?>" /> </div>

    <div onclick="ShowDiv()"><iframe src="http://www.facebook.com/plugins/like.php?  href=http://www.facebook.com/BrandBang&amp;" allowTransparency="true">
            </iframe></div>

    <script language="javascript">
    function ShowDiv()
    {
    document.getElementById("imagebox").style.display = '';
    }
    </script>

I know that it is hard to use iframes to do what I am trying to do, but i am a total newbie when it comes to this stuff. Any help would be great!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T06:05:34+00:00Added an answer on June 5, 2026 at 6:05 am

    Have tried giving your div an id="imagebox"?

    EDIT:

    This was already answered here.
    But, I didn’t realize at first sight that you’re loading something in the iframe that is not coming from your own domain, so you’re going to fall in a cross site scripting event, which is not allowed.

    Afaik, you have to redesign some way your implementation.
    For instance, you could retrieve the generated html from facebook using curl and then outputting in your own div. Something like that should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to create a portfolio website using wordpress, each post has view costum
I'm building Wordpress website where all content pages are loaded using Ajax. This is
I'm using Wordpress for my website. What I'm trying to achieve is that if
I have a wordpress website (buddypress plugin/themes). I'm using a plugin that requires access
I'm going to create a website using Wordpress static pages feature. It's going to
I'm trying to add a payment method to working website that is using a
I have a WordPress website ( abetterworldbydesign.com ) which has user-agent detection to redirect
I'm building Wordpress website where all pages are being loaded using Ajax. I'm using
Im using Wordpress as a CMS for this website. Basically the site has products
I am using wordpress as my cms and building a website. I use Graphene

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.