Support » Plugins » Using Google AJAX APIs in posts

  • Hi there,

    I’ve been working all day to try to bring Google visualizations into my posts.

    When I generate the code and upload it as a straight html file (i.e. not through the WordPress dashboard), everything works fine. But when I incorporate the html into a post using the WordPress dashboard, the post is blank.

    I notice that when I click on the “update post” button and then look at the source code in the post, WordPress has put in a lot of extraneous formatting tags like <p> and
    . Thinking this might be the problem, I tried a several plugins (like Raw-HTML, JavaScript Logic and FCKEditor) which claim to either prevent WP from modifying your HTML or ease the process of incorporating JavaScript into posts. Don’t know whether the extra tags are the problem, but these solutions haven’t worked for me.

    I’m wondering: Am I on the right track? Any ideas on what I might want to look into? Or better yet, have any WP users actually made use of that wealth of gorgeous functionality over at the Google APIs site?



Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi

    The WP editor mangles code, as you have discovered.

    When inserting code I sometimes create it in a custom field attached to the post. Then use a plugin called Custom Fields Shortcode to embed the custom field within the post. WP formatting does not touch anything inserted this way.

    Hey Steve,

    Tried the plugin, which promises to do the same thing as Raw-HTML, and it’s not working for me. When I activate the plugin and surround the AJAX code with the [cf] and [/cf] tags, it simply disappears from the page source:

    ‘<div class=”format_text entry-content”>’
    […here’s where my code should show up, but there is nothing…]

    Or alternately, if I surround every line with [cf] and [/cf], each line is replaced with a ‘

    I notice that the plugin is only good up to WP 2.8.1, and I have 2.8.4, so perhaps that is the problem.

    Now I’m trying the Magic Fields plugin. Not entirely clear that it will work for this purpose, but at least it’s good up to 2.8.4.

    Thanks for the help. I’m gonna keep trying things, hoping others here can offer suggestions.


    Hi – You are not understanding how the plugin works

    You do not put your source code in between [cf] and [/cf] in the post.

    You enter the source code as a custom field. You give a key name to the custom field and put the source code in the custom field’s value box.

    Then in the post you enter the custom field’s key value in between the [cf] and [/cf].

    custom field key MyCode

    custom field value ============ enter code here ==========

    in the post

    works every time

    Hi Steve,

    You’re right. I didn’t get it. In fact, the entire area of custom fields was a mystery. No more. Like you said, [cf]Works Every Time[/cf]!

    Thanks for your help!


    I need to add a image slideshow – I was trying Google Ajax and inserting the code onto the page through the HTML editor.

    When I update the page nothing comes up. If I save the code in wordpad and open it in a browser the code works.

    What can I do to upload this image slideshow onto any page?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Using Google AJAX APIs in posts’ is closed to new replies.