V
V
Vince2015-11-11 06:38:03
Slider
Vince, 2015-11-11 06:38:03

How to display posts of the same category in a slider in wordpress?

Greetings.
The question is fully asked in the topic)
I need to somehow intelligently display posts from a certain category in the post slider (in the form of a post - slider).
Can you tell me how to do better?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
L
lynnikvadim, 2015-11-12
@lynnikvadim

codex.wordpress.org/%D0%A6%D0%B8%D0%BA%D0%BB_WordPress
Everything is described in detail there.
Well, the slider - take it to your heart's content.

A
Alexander, 2013-11-29
@Toddams

I can offer you this option. We make a plate cars_usage_profile
car_id, client_id, elapsed_usage_time ,
where elapsed_usage_time - let's say the total time the client rolls over in seconds, if the tariff is calculated in the code, and I'm sure that this is correct. You never know how tomorrow they will still want to calculate what to do with the existing base?
The car_usage_history order history can then look like this:
cars_usage_profile_id, date_start, date_finish ,
from where you can easily calculate the time difference.
Further, each time a line is added to the rental history, we calculate the time of use. There is a quick option here when you can take the previous value from cars_usage_profileand add a new one, and there is a slower one with running through all the lines of the history with the specified cars_usage_profile_id , which, if it doesn’t suit you, can be loaded into cron to completely recalculate the usage time. Purely so, for peace of mind, that everything converges.
The search will work very fast.

N
Nikita Gusakov, 2013-11-29
@hell0w0rd

I would enter coefficients for each of the machines. Further, in the logging table, you can record which client took how much, which car. Then, with a simple query using aggregate functions (sum, count), the coefficients and time were added according to the formula you needed, from here the cost coefficient was obtained

S
Sergey Savostin, 2013-11-29
@savostin

Enter a field for the client - the current tariff.
Write a trigger that, when inserting into the table of orders, recalculates the current tariff of the client with a "heavy" query (which is difficult to say - you did not specify the calculation logic) and update the value in the table of clients.
You can not trigger, but on the crown.

P
papahoolio, 2013-11-29
@papahoolio

we combine the solution toster.ru/q/54424#answer_198854 with toster.ru/q/54424#answer_198864 and get the structure that is optimal for starting,
i.e. there is a log table
in the customer table there is an attribute with the value of the current tariff and a trigger on insert into the log table that recalculates the client's tariff
coefficients for cars may or may not be - depends on business processes and the possibility of changing them in the future

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question