You need to make a div , in which films with higher ratings will be automatically added, how to do this? I just don't understand what exactly is responsible for this, js? Tell me please, where can I read about it?

something like that

Closed due to the fact that the issue is too general for participants Vladimir Martyanov , aleksandr barakin , D-side , PashaPash ♦ Mar 30 '16 at 9:57 .

Please correct the question so that it describes the specific problem with sufficient detail to determine the appropriate answer. Do not ask a few questions at once. See “How to ask a good question?” For clarification. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Wordpress is written in the programming language PHP, which already has a ready list of references on our website. In addition, read the documentation for writing your own plugins for Wordpress'a. JavaScript can be useful to you, for dynamic content output (for example, change - Risto
  • I wrote that I would find the literature, so I came to the programmers' forum to read specifically and not the case, and not a bunch of meaningless posts on the Internet, I don’t wait for programming assistance .. you probably just didn’t read my question correctly or not read. For the documentation, thank you very much. - Oleg Logvinov
  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky ♦

1 answer 1

First of all, you need to understand the logic of how it works. I will describe how I would have acted.

  1. Determined whether it is necessary to store stored in the database mark. Since when you turn off the user's browser, this data should be saved, which means that the data should be stored in the database. Accordingly, PHP is already in use.
  2. How to create a database here Google to help me here is what made the plugins to create immediately discard here a good article and here is also a normal Sorry, but I should not choose my own way here. In the end, you can simply through phpmyadmin.
  3. The base in my opinion should contain contain id, id_post, rating,. You can write there through ajax by clicking on the record or through the form with the checkbox. Again the choice is yours.
  4. Next, through the wpdb class, receive data from the table and compute the rating using javascript based on the total amount of the rating divided by the number of posts (by id_post). I got the id_post of the posts I needed, and then I got the required posts via get_posts

But you can if you do not want to bother to use this plugin well, or similar ones, but it's boring and not programmatic.

  • Thanks a lot, I will try. - Oleg Logvinov
  • Do not forget to accept the answer if it helped. This will help you on this portal in the future :). If you work here. - Sergalas