Advertisement
arie_cristianD

render jnews mobile sticky ads on desktop

Feb 9th, 2025 (edited)
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.46 KB | None | 0 0
  1. remove_action( 'wp_footer', array( JNews\Ads::getInstance(), 'sticky_footer_ads' ), 50 ); /* remove JNews Mobile Sticky hooks */
  2. add_action( 'wp_footer', 'render_jnews_sticky_ads', 50 ); /* render sticky ads with custom hooks */
  3.  
  4. function render_jnews_sticky_ads() {
  5.     $ads_class = JNews\Ads::getInstance();
  6.     $html      = '<div class="jeg_ad jnews_mobile_sticky_ads">' . $ads_class->render_ads( 'mobile_sticky' ) . '</div>';
  7.     echo jnews_sanitize_output( $html );
  8. }
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement