Advertisement
arie_cristianD

reorder_article_ads_positions

Aug 7th, 2023 (edited)
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.05 KB | None | 0 0
  1.  
  2. add_action( 'jnews_single_post_begin', 'reoder_ads' );
  3.  
  4. function reoder_ads() {
  5.  
  6.     // using Top Content Advertisement
  7.     remove_action( 'jnews_single_post_before_content', array( JNews\Ads::getInstance(), 'article_content_top' ), 10 );
  8.     // use this code for below the “Related Posts”
  9.     add_action( 'jnews_single_post_after_content', array( JNews\Ads::getInstance(), 'article_content_top' ), 45 );
  10.     // use this code for above the “Related Posts”
  11.     add_action( 'jnews_single_post_after_content', array( JNews\Ads::getInstance(), 'article_content_top' ), 35 );
  12.    
  13.    
  14.     // Using  Bottom Content Advertisement
  15.     remove_action( 'jnews_single_post_after_content', array( JNews\Ads::getInstance(), 'article_content_bottom' ), 10 );
  16.     // use this code for below the “Related Posts”
  17.     add_action( 'jnews_single_post_after_content', array( JNews\Ads::getInstance(), 'article_content_bottom' ), 45 );
  18.     // use this code for above the “Related Posts”
  19.     add_action( 'jnews_single_post_after_content', array( JNews\Ads::getInstance(), 'article_content_bottom' ), 35 );
  20. }
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement