Home » Ask (Forum) » Order Posts by Modified Date in Bikin Film

Question

Hi, Admin!
I want that films on the main page should be sorted out by the update rate. When I update something in film it should come on first
Now it is only sorted by film upload date

Jul 29, 2017 (3 months ago) - Posted by 8 Comments

8 Answers

  1. Mr. Shine says:

    Hello Nasha, if I’m not wrong, you want order Posts by Modified Date, is that right? If yes, follow the below instruction:
    1. Open functions.php file (inside your wordpress theme).
    2. Scroll to the end of the page and find this line:

    ?>

    3. Before that line add this code:

    function bw_update_post( $query ) {
        if($query->is_main_query() AND !is_admin() ) {
          if ( $query->is_home() ){
                $query->set( 'orderby', 'modified' );
           }
       }
    }
    add_action( 'pre_get_posts', 'bw_update_post' );

    Good luck!

    Administrator
    • nasha7861122 says:

      How to Lock Some Movies on the main Homepage?
      Means What ever we do, we update or not, those movies will stay on the main homepage

      Register Member
    • Mr. Shine says:

      You can sticky the post for that case, so the post always in top area.

      Administrator
    • nasha7861122 says:

      Kindly Help me in this forum
      Link: https://bikinwebsite.com/ask/how-to-set-the-limit-of-text-on-heading-of-film-that-shown-on-main-page-in-bikin-film/

      Register Member
    • nasha7861122 says:

      Thanks For Sticky Idea!
      But when I stick the post, then Yellowish Color came down under post.
      How to remove that color
      Image Link: https://moviesware.com/wp-content/uploads/2017/07/Capture.png

      Register Member
    • nasha7861122 says:

      And Its poster image Size Also Decreases.
      You Can See in Above Image Link

      Register Member
  2. Mr. Shine says:

    Open style.css (inside theme folder), find this line and remove it:

    .bw_postlist.sticky{background-color:#ffffcc;padding-right:10px;}

    Note: If you use cache plugin, please clear all your cache and browser cache.
    Good luck!

    Administrator
    • nasha7861122 says:

      Thank you, Mr. Shine
      Kindly Help me in this forum
      Link: https://bikinwebsite.com/ask/how-to-set-the-limit-of-text-on-heading-of-film-that-shown-on-main-page-in-bikin-film/

      Register Member

Your Answer

Your email address will not be published. Required fields are marked *