Title: [Plugin: Google Doc Embedder]  embed it in the codex
Last modified: August 19, 2016

---

# [Plugin: Google Doc Embedder] embed it in the codex

 *  Resolved [mm88](https://wordpress.org/support/users/mm88/)
 * (@mm88)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-google-doc-embedder-embed-it-in-the-codex/)
 * Hi, the syntax to put the GVIEW plugin into a page is: [gview file=”[http://url.to/file.pdf”%5D](http://url.to/file.pdf”%5D)
 * but what is the (PHP/WP) syntax to put it in a .php page (attachment.php for 
   ex.) in editing mode?
 * a good alternative to GVIEW and editing flexible exists?
 * thanks

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [k3davis](https://wordpress.org/support/users/k3davis/)
 * (@k3davis)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-google-doc-embedder-embed-it-in-the-codex/#post-1882499)
 * Try the following:
 * `<?php echo do_shortcode('[gview file="http://url.to/file.pdf"]'); ?>`
 * Let me know if this does or doesn’t work, as I’ve not done this in a while.
 *  Thread Starter [mm88](https://wordpress.org/support/users/mm88/)
 * (@mm88)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-google-doc-embedder-embed-it-in-the-codex/#post-1882573)
 * thanks k3davis, it works!!! But now I have a problem passing the path variable.
 * Writing
 *     ```
       <?php $filepdf = wp_get_attachment_url($post->ID);
   
       echo do_shortcode('[gview file="."$filepdf"."]'); ?>
       ```
   
 * it dosen’t work.
 * thanks again
 *  [k3davis](https://wordpress.org/support/users/k3davis/)
 * (@k3davis)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-google-doc-embedder-embed-it-in-the-codex/#post-1882783)
 * I’m not sure just what you’re doing there, so I’m not sure how much help I can
   be. What does not work when you do it this way, for starters? Does the viewer
   load but the document doesn’t display? Does nothing display at all (check the
   page source for “GDE” to see if any error is found there)?
 *  Thread Starter [mm88](https://wordpress.org/support/users/mm88/)
 * (@mm88)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-google-doc-embedder-embed-it-in-the-codex/#post-1882797)
 * It Does nothing display at all, because there’s an error in my php code syntax.
   The problem is displaying the $filepdf variable in the function echo.
 * I don’t know the correct syntax.
 * thanks
 *  [k3davis](https://wordpress.org/support/users/k3davis/)
 * (@k3davis)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-google-doc-embedder-embed-it-in-the-codex/#post-1882818)
 * I’m still not sure exactly what you’re trying to do, but you can try this:
 *     ```
       <?php $filepdf = wp_get_attachment_url($post->ID);
   
       echo do_shortcode('[gview file="'.$filepdf.'"]'); ?>
       ```
   
 * It may just be a quotes problem, but then again I’ve never tried to pass a variable
   using the do_shortcode function, so I’m not sure if this is supported or not.
 *  Thread Starter [mm88](https://wordpress.org/support/users/mm88/)
 * (@mm88)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-google-doc-embedder-embed-it-in-the-codex/#post-1882824)
 * yes, it was a quotes problem: Now it works!
 * many thanks k3davis!
 *  [k3davis](https://wordpress.org/support/users/k3davis/)
 * (@k3davis)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-google-doc-embedder-embed-it-in-the-codex/#post-1882867)
 * Glad it worked out. 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘[Plugin: Google Doc Embedder] embed it in the codex’ is closed to new
replies.

## Tags

 * [Google Doc Embedder](https://wordpress.org/support/topic-tag/google-doc-embedder/)

 * 7 replies
 * 2 participants
 * Last reply from: [k3davis](https://wordpress.org/support/users/k3davis/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-google-doc-embedder-embed-it-in-the-codex/#post-1882867)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
