Title: Relevant function to use in shortcode
Last modified: March 8, 2023

---

# Relevant function to use in shortcode

 *  Resolved [mllapan](https://wordpress.org/support/users/mllapan/)
 * (@mllapan)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/relevant-function-to-use-in-shortcode/)
 * I tried using:
 *     ```wp-block-code
       $output.= "the_ad('74712')";
       ```
   
 * It jumps outside div at the top of the page.
 * Full code is here: [https://test.mllapan.com/test](https://test.mllapan.com/test)
    -  This topic was modified 3 years, 3 months ago by [mllapan](https://wordpress.org/support/users/mllapan/).
    -  This topic was modified 3 years, 3 months ago by [mllapan](https://wordpress.org/support/users/mllapan/).

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

 *  Plugin Author [Thomas Maier](https://wordpress.org/support/users/webzunft/)
 * (@webzunft)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/relevant-function-to-use-in-shortcode/#post-16540723)
 * Hey mllapan,
 * thanks for reaching out.
 * `the_ad()` echos the ad. Please try `get_ad()`.
 * In case you haven’t, please see the [ad theme functions](https://wpadvancedads.com/codex/theme-functions/)
   for other options.
 * Please let me know if you need anything else.
 * Thomas
 *  Thread Starter [mllapan](https://wordpress.org/support/users/mllapan/)
 * (@mllapan)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/relevant-function-to-use-in-shortcode/#post-16542888)
 * Hi, Thomas.
 * Thanks, it works, solved.
    -  This reply was modified 3 years, 3 months ago by [mllapan](https://wordpress.org/support/users/mllapan/).

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

The topic ‘Relevant function to use in shortcode’ is closed to new replies.

 * ![](https://ps.w.org/advanced-ads/assets/icon-256x256.gif?rev=2773443)
 * [Advanced Ads – Ad Manager & AdSense](https://wordpress.org/plugins/advanced-ads/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-ads/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-ads/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-ads/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-ads/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-ads/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [mllapan](https://wordpress.org/support/users/mllapan/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/relevant-function-to-use-in-shortcode/#post-16542888)
 * Status: resolved