Advertisement
fahimmurshed

Related Posts Move to the Comments sections below

Dec 29th, 2021
1,111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.58 KB | None | 0 0
  1. add_action( 'astra_entry_before', function() {
  2.     add_filter( 'astra_get_option_enable-related-posts', '__return_false' );
  3. } );
  4.  
  5. add_action( 'astra_primary_content_bottom', function() {
  6.     add_filter( 'astra_get_option_enable-related-posts', '__return_true' );
  7. } );
  8.  
  9. add_action( 'astra_template_parts_content_top', 'action_to_update_related_post_markup', 1 );
  10. function action_to_update_related_post_markup() {
  11.     $related_post_markup_instance = new Astra_Related_Posts_Markup();
  12.     add_action( 'comment_form_after', array( $related_post_markup_instance, 'astra_get_related_posts' ), 10 );
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement