Title: Insert in php?
Last modified: September 1, 2016

---

# Insert in php?

 *  Resolved [Manux_oS](https://wordpress.org/support/users/manux_os/)
 * (@manux_os)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/)
 * Hi and thanks for this great plugin.
 * Is there a way to use the shortcode inside php files for better positioning?
 * [https://wordpress.org/plugins/grid-wud/](https://wordpress.org/plugins/grid-wud/)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/insert-in-php/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/insert-in-php/page/2/?output_format=md)

 *  Plugin Author [AccountClosed](https://wordpress.org/support/users/wistudatbe/)
 * (@wistudatbe)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701283)
 * Hi Manux_oS,
 * In practical terms this can be done with the following code:
 *     ```
       echo do_shortcode('[gridwud slug="your-slug"]');
       ```
   
 * Just see that you include this inside a <div> to avoid lay-out problems:
 *     ```
       <div style="width:xxx; ... ; ...">
       echo do_shortcode('[gridwud slug="your-slug"]');
       </div>
       ```
   
 * Let me know the results!
    Regards, Danny
 *  Plugin Author [AccountClosed](https://wordpress.org/support/users/wistudatbe/)
 * (@wistudatbe)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701294)
 * This is a better sample:
 *     ```
       if (function_exists('grid_wud_funcs')) {
       	echo '<div style="type-here-css-values">';
       		echo do_shortcode('[gridwud slug="type-here-your-slug"]');
       	echo '</div>';
       }
       ```
   
 * This will check or Grid WUD is active and if yes it displays the grids.
    Change:“
   type-here-css-values” in real CSS values. Change : “type-here-your-slug” in a
   real slug.
 * If you disable the Grid WUD plugin, it will not be displayed.
 * Regards, Danny
 *  Thread Starter [Manux_oS](https://wordpress.org/support/users/manux_os/)
 * (@manux_os)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701300)
 * Thanks for your support,
 * For a start i tried the following:
 *     ```
       <div class="wud">
       <?php echo do_shortcode('[gridwud slug="smartphone" button="1"]'); ?>
       </div>
       ```
   
 * Worked nice! You can check here: TechValue.gr
 * Is there any way to control the height?
 *     ```
       .wud {
       clear: both;
       margin: auto;
       max-width: 960px;
       padding-top: 10px;
       text-align: center;
       }
       ```
   
 * Thanks 🙂
 *  Thread Starter [Manux_oS](https://wordpress.org/support/users/manux_os/)
 * (@manux_os)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701301)
 * I took a screenshot for you to check your cool plugin in action:
 * [https://techvalue.gr/wp-content/uploads/2016/08/wud.jpg](https://techvalue.gr/wp-content/uploads/2016/08/wud.jpg)
 * I had to remove the code, it’s a live site.
 *  Plugin Author [AccountClosed](https://wordpress.org/support/users/wistudatbe/)
 * (@wistudatbe)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701318)
 * Hi Manux_oS,
    If you can provide me an URL from a page/post where i can see Grid
   WUD in action, i can help you with your height question. Regards, Danny
 *  Thread Starter [Manux_oS](https://wordpress.org/support/users/manux_os/)
 * (@manux_os)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701331)
 * Thanks so much Danny,
 * You can have a look now. TechValue.gr
 * Let me know if you need any help testing etc
 *  Plugin Author [AccountClosed](https://wordpress.org/support/users/wistudatbe/)
 * (@wistudatbe)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701351)
 * Your welcome Manux_oS,, but can you provide me an **URL** where **Grid WUD** 
   is **in action**?
    On your front page is nothing to see with Grid WUD. Regards,
   Danny
 *  Thread Starter [Manux_oS](https://wordpress.org/support/users/manux_os/)
 * (@manux_os)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701352)
 * Sorry Danny, had to disable it again for some time, you can have a look now.
 * [https://techvalue.gr/](https://techvalue.gr/)
 * Clean your cache if you don’t see it.
 * Thanks
 *  Thread Starter [Manux_oS](https://wordpress.org/support/users/manux_os/)
 * (@manux_os)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701353)
 * It’s ok i managed to control the height.
 * Thanks for your time
 *  Plugin Author [AccountClosed](https://wordpress.org/support/users/wistudatbe/)
 * (@wistudatbe)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701356)
 * Hi Manos,
    I’ve seen now the grids on top of your page and it looks great! Your
   site rocks 😉 Regards, Danny
 *  Thread Starter [Manux_oS](https://wordpress.org/support/users/manux_os/)
 * (@manux_os)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701358)
 * Hey Danny,
 * Thanks 🙂
 * It’s not done yet 😉 I will need your support again! I have also complete the
   contact form in your website!
 *  Thread Starter [Manux_oS](https://wordpress.org/support/users/manux_os/)
 * (@manux_os)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701359)
 * Here is my code if someone wants to show it only at home page:
 *     ```
       <div class="wud">
       <?php if( is_front_page())	: ?>
       <?php echo do_shortcode('[gridwud slug="smartphone" button="1"]'); ?>
       <?php endif;?>
       </div>
       ```
   
 *  Plugin Author [AccountClosed](https://wordpress.org/support/users/wistudatbe/)
 * (@wistudatbe)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701360)
 * Hey Manos,
 * The contact form we are using is: [Clean and Simple Contact Form](https://wordpress.org/plugins/clean-and-simple-contact-form-by-meg-nicholas/).
   
   And the security is [reCAPTCHA ](https://www.google.com/recaptcha/admin) from
   Google. For those who want to see this in action, click [HERE](http://wp.wistudat.be/contact-us/).
   Regards, Danny
 *  Plugin Author [AccountClosed](https://wordpress.org/support/users/wistudatbe/)
 * (@wistudatbe)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701361)
 * Hey Manos,
    Your code seems to be oké 😉 You can simplify it like this:
 *     ```
       <div class="wud">
       <?php
        if( is_front_page() || ishome())	:
        echo do_shortcode('[gridwud slug="smartphone" button="1"]');
        endif;
       ?>
       </div>
       ```
   
 * I have added the ishome() check.
 * is_front_page() returns true if the user is on the page or page of posts that
   is set to the front page on Settings->Reading->Front page displays
 * is_home() return true when on the posts list page, This is usually the page that
   shows the latest 10 posts.
 * (explained [here](http://wordpress.stackexchange.com/questions/30385/when-to-use-is-home-vs-is-front-page))
 * And for NOW … i go to start and enjoy my weekend 🙂
 * Regards, Danny
 *  Thread Starter [Manux_oS](https://wordpress.org/support/users/manux_os/)
 * (@manux_os)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/#post-7701362)
 * Thanks Danny, for sure you have to go and enjoy the weekend!

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/insert-in-php/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/insert-in-php/page/2/?output_format=md)

The topic ‘Insert in php?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/grid-wud_b6d1ea.svg)
 * [Grid WUD](https://wordpress.org/plugins/grid-wud/)
 * [Support Threads](https://wordpress.org/support/plugin/grid-wud/)
 * [Active Topics](https://wordpress.org/support/plugin/grid-wud/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/grid-wud/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/grid-wud/reviews/)

 * 18 replies
 * 2 participants
 * Last reply from: [AccountClosed](https://wordpress.org/support/users/wistudatbe/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/insert-in-php/page/2/#post-7701398)
 * Status: resolved