0
Following,
I have a website on wordpress
, I created a page inside that site and on that page I will have a list of companies more or less like this:
Company A - (Company name)
- Company data (This data will be hidden, will appear when the user clicks on the company name).
Company B
Company C
I’ll feed this list manually, then may day I’ll add company that starts with X the next day company that starts with B and so on.
It is possible to make an automatic organization via javascript, where I put one company below the other independent of the initial letter of her name and when it goes to air go alphabetically?
I do not know if it was very clear the doubt, but in short I want to know how to organize a list automatically in alphabetical order.
Thank you.
Guys, how I’m wearing wordpress
I chose to use custom post type
as colleagues suggested in the answers, legal created the post type
is working right, but it is still a bit complicated to organize them in alphabetical order, was reading Codex what is a bit too complicated alias FOR ME, and la says that the query function is in the query.php file, but in my theme does not have this file. I took a look at the functions.php files and also found nothing query, which exact file should "stir"?
if each company is a post, you just order the loop, no?
– Caio Felipe Pereira
It will not be a post each company, they will all be on the same page, I will only hide the details of each one that will only appear if the user clicks on it... But the list of companies will all be on the same page at the bottom of the same one in the example of the post.
– user27585
Yes, but why not make each company a post, or a custom post? It facilitates (and greatly) your life. Ordering posts the wp does alone, no need to reinvent the wheel.
– Caio Felipe Pereira
I understand, it would really help me a lot, I will have to read about custom post so to try to do, have any example or reference I can take a look at? Thank you. @Caiofelipepereira
– user27585
https://codex.wordpress.org/Post_Types Codex always saving lives. I also gave that answer since maybe I can give you some light. Read about the Wp_query also
– Caio Felipe Pereira
@Caiofelipepereira ok vlw thanks.
– user27585
@Caiofelipepereira sorry to bother you again, I edited the question if you can take a look. vlw thanks
– user27585
Let’s go continue this discussion in chat.
– Caio Felipe Pereira