badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

M Srinivas

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: TH: Horizontal/Vertical Post and TH: Card/Block Posts #96702
    M Srinivas
    Participant

    Thank you. Are you indicating that I can change sort order of TH: horizontal/vertical and TH: card/block by editing newscard-widgets.php?

    In functions.php I am using this code to change the sort order of posts. I need to change the sort order of the display of the TH blocks as well.

    //ADDED THIS FUNCTION (LINES 27 TO 38) FOR CUSTOM SORTING BY TITLE NAME

    function order_posts_by_title( $query ) { 
    
       if ( $query->is_home() && $query->is_main_query() ) { 
    
         $query-set( 'orderby', 'title' ); 
    
         $query-set( 'order', 'ASC' ); 
    
       } 
    
    } 
    add_action( 'pre_get_posts', 'order_posts_by_title' );
    in reply to: Linking page to category #94476
    M Srinivas
    Participant

    I was able to resolve #1. Can you help resolve #2? How do I link the Widget Title to a particular page?

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