Wordpress /page_id= order - wordpress

When using plan structure link like: https://example.com/?p=123
Wordpress gives random number, not by the order. In some cases I need to know the page id in advance. So is there are any way to get rid of the order WP gives to the link id?

Related

Gravity form does not correlate correctly when publishing a post

There is a problem, I do not know how to solve it.
The scheme is as follows.
There are categories of goods, in this form:
Category-1(term_id=1)<br>
subcategory-1(term_id=4)<br>
subcategory-2(term_id=5)<br>
subcategory-3(name Tour)(term_id=6)<br>
Category-2(term_id=2)<br>
subcategory-1(term_id=7)<br>
subcategory-2(name Tour)(term_id=8)<br>
https://docs.gravityforms.com/creating-a-feed-for-the-advanced-post-creation-add-on/
Gravity Forms will initially look for the category/tag of the same name as specified and use that. If no match is found, then a new category/tag will be created. All new categories/tags created this way will be placed at the top level of the category/tags hierarchy.
I tried everything in the Populate Anything settings, I can’t get it to correlate with the category that I need.I need this (subcategory-2(name Tour)(term_id=8)), inserts here anyway (subcategory-3(name Tour)(term_id=6))
By the way, I'll add one more thing.
https://github.com/gravitywiz/snippet-library/blob/master/gp-populate-anything/gppa-display-terms-hierarchically.php
It would seem that he chose the category that is needed, how to force the search not by name, but by term id?

Add custom columns to Woocommerce customers table

By clicking woocommerce->customers i can get a table of all of the customers.
Is there a way to add columns to it? I found that there is a manage_edit-{$post_type}_columns, but i can't find the customers post type.
woocommerce is not using wordpress tables structure.
this is easily visible by comparing woocommerce->customers table with users->All Users
manage_edit-{$post_type}_columns is defenetly not the filter you're looking for.
the columns are located in this path:
packages/woocommerce-admin/src/API/Reports/Customers/Controller.php.
and the filter to change them is: woocommerce_report_customers_export_columns

Generate and display html table with user data from wordpress

Update: With the help of the answerer below I figured out how to do this. Basically I used a WP Query to get users and their user metadata and I sorted and placed the data in a for each loop in a table.
I'm new to PHP and I need some help. Basically I want to create a leaderboard with different user data. I want to display it in an html table.
This is kinda what i want:
Username GamiPress Points Time since last login
And I want the table to be populated with these data amongst others automatically. I want two versions one that is sorted with the 15 users who have the most points and one that sorts on the 15 users that logged in last.
Can someone point me to the right place on how I can best implement this?
I basically want to create the GamiPress Leaderboard add-on that I, unfortunately, can't afford, but with some extra fields.
There are multiple steps to do if you want to achieve this:
1) Add meta field to your users, so you can store the points. For example you can use "Advanced Custom Fields" plugin for this.
2) Write a function for adding points to this field. Define when this function will be fired.
3) Query the users ordered by that meta value and display it (get_users($args) might be useful).
4) For the Last-Login value you can use a plugin (google Wordpress Last Login) and write another Query and order results by that meta field. You can also write this by your own, here is a link I found: https://www.wpbeginner.com/plugins/how-to-show-users-last-login-date-in-wordpress/
I don't know if this is what you were looking for.
Or did you want to see an example code how you use a wp query and display data in html table?

Wordpress search including multiple categories

I have a search form that has a text field and 3 drop downs, that have categories. What I'm trying to achieve is the current search query that posts appears as follows:
?s=Milk&cat=4&cat=7&cat=15.
What I'm trying to achieve is something like:
?s=Milk&cat=04,7,15
I'm relatively new to WordPress and PHP and haven't been able to find any good documentation or references to what I need to do to accomplish this.
I don't necessarily want the answer, just some guidance in the right direction.
This was already answer: multiple categories query
It must be like this:
/?cat=970,971,972 where the # is the cat id.

category url format in nopcommerce

I would like to know how I can make the url's for the categories static. For example http://localhost:3547/category/53-cellphones.aspx is what I have currently but yesterday it was http://localhost:3547/category/1-cellphones.aspx.
I want to know how can I make the number in the category name static, e.g. 1-cellphones.aspx to be like that all the time, I don't want to be changed tomorrow to 3-cellphones.aspx for example.
Is that possible?
Thanks
This is normally the id of the category in the database.
Can you check the Nop_Category table and check you don't have duplicate rows.

Resources