show_admin_column
-
Hello. Thanks for your plugin, but I have a question. Can you tell me how to display show_admin_column on edit.php?post_type page, after creating taxonomies?
I would appreciate any help)
-
You need to ensure that on the Visibility tab has the
Display a column on admin lists ?
value set to True for each taxonomy required.Regards,
Neil James
Thank you very much for your answer. I have everything active ((
That’s why I askedTo my previous post: on the screenshot All items are active but “Display a column on admin lists” is not displayed. Any other ideas on how to fix this?
-
This reply was modified 3 months, 4 weeks ago by
webbymaster.
I have been away for some days, so sorry for a delay in replying.
There is a capability to choose the ordering of the columns on the admin screen. It is the sixth option under the Taxonomies tab. There could be an issue there.
Please select that option; and it will give tabs for all post types involved in the taxonomies. Click on the appropriate post type. You will see a list of taxonomies that will be the order of display. Change the order of the taxonomies and then click the save button. You can move the order to back as it was; the important thing was you had to move something to activate the save button.
Then look at the
edit.php?post_type
screen to see if resolved.Regards,
Neil James
Thank you very much! I understand everything and thank you for any opportunity to help me! I can’t find the “sixth option”, I just don’t understand where it is))
But now my taxonomy columns are not displayed ((
Perhaps this is a shortcoming of my post category. In standard posts, the columns are present and displayed. Could you tell me how I can display them in my post category? Maybe there is a code that needs to be added to the functions.php file?
Maybe I didn’t set everything up correctly? ((
Please tell me.
-
This reply was modified 3 months, 3 weeks ago by
webbymaster.
-
This reply was modified 3 months, 3 weeks ago by
webbymaster.
Sorry for confusion. I am referring to the Menu on the left side of the Admin page where you can create or modify the Taxonomy definitions, or add another, etc.
When you click on the item called Taxonomies, it opens a sub-menu with
All Taxonomies
,Add Taxonomy
, …and one calledTaxonomy List Order
. When you click on that option, it will give you a tabbed list of all post types that haveshow_admin_column
set to true (if there is more than one). and for each one all of its allowed taxonomies.It allows you to change the order of the admin columns for any post type by dragging the taxonomy names to their required position.
You should see all of the taxonomies assigned to each post type there. Please check that you see all of the taxonomies there. (Note. If there is only one taxonomy for any post type, then there is no display for that post type.)
As I said, make a change by dragging a taxonomy name to another position. and save it.
Hope this is of use,
Neil James
Here’s how it looks for me now (screenshot). The first tab is the default WP posts. The second tab is my taxonomies. I swapped them around and saved them, but the columns still don’t show anything. What should I do here?
??????
And these are all my taxonomies:
Screenshots didn’t come out well.
Please choose one of your taxonomies that does not appear (ideally one on a standard WP type – posts or pages) and, from the All Taxonomies tab, click the Export PHP button and share the download file (copy/paste the text file) with me here. I’ll try to install it on my own machine and try to see what is happening.
Thanks,
Neil James
Sorry. The screenshots didn’t come out – until I pressed submit – and then they displayed.
Do you have a definition of your post_type
employees
that you can share? Please do the export onourteacher-jobtitle
Thanks
Neil
Thank you for sending through this file. I have loaded it and no issues, but it did make me think of a possible problem of timing. Since you are using a custom post type it might be that the taxonomy is being defined before the custom post tyoe with the result that the taxonomy is not actually being linked to it.
Would it be possible to change one line of the plugin please?
Line 53 of the file
/includes/class-simpletaxonomyrefreshed-client.php
isadd_action( 'init', array( __CLASS__, 'init' ), 1 );
Would it be possible to change it to
add_action( 'init', array( __CLASS__, 'init' ), 99 );
In this way, we can be reasonably certain that the ourteacher post type is created before the taxonomy is (and so it will be properly linked).
Thanks for your continued help,
Neil James
Thank you very much for your attention! I changed the value in line 53 of this file, but nothing changed. The column is still not added ((
Thank you for trying it. There is a problem to be fixed, but clearly this is not affecting you.
You can output the detailed values being used by the wordpress table function with this code that you can add to your
functions.php
file:add_filter( "manage_taxonomies_for_ourteacher_columns", 'output_taxonomy', 999, 2 );
add_filter( "manage_ourteacher_posts_columns", 'output_taxonomy', 999, 1 );
function output_taxonomy( $taxonomies, $post_type="ourteacher" ) {
echo '<p id="taxonomy_columns">' . implode( ', ', array_keys( $taxonomies ) ) .'</p>';
echo '<p id="taxonomy_columns">' . implode( ', ', array_values( $taxonomies ) ) .'</p>';
return $taxonomies;
}It puts some output on the ourteacher custom post page somewhere (for my test in the help dropdown, but just before the
<form>
tag for the table, You may need to look at the html page source to find it. There you can search fpr the texttaxonomy_columns
The first set is the set of taxonomy slugs that it will use and consists of the numeric keys of the array (0,1,2, …) followed by the taxonomy slugs.
The second set is the set used by the table
get_columns
function and consists of the keys of all columns followed by the texts to be displayed. The key for a taxonomy with slugXXX
will betaxonomy-XXX
. Using this pattern, it then completes the post values by getting the taxonomy values.I hope this gets you closer to finding where the issue is.
Regards
Neil James
Thank you very much for paying attention to me.
These columns are very important to me. The most interesting thing is that the taxonomy filter works. But the columns are not displayed.
After adding your code, this is what is displayed in my “Screen Settings”: (screenshot).
I would not like to seem intrusive to you, but unfortunately I am not very strong in PHP, and I do not understand at all what I should write in this code… Apparently I will have to work without these columns.
If you are already tired of my presence, you can not react, I will understand you. I am grateful to you for all the time that you devoted to my person.
This is helpful – but raises an issue that I cannot help with. The code can be removed. The output shows that 5 taxonomies
ourteacher-XXX
have been added to the custom post type. The last two lines of my code give the list of columns to be added. The first line are the internal names, and the second line the labels to be displayed.As far as I can see, my plugin is working as expected.
Regarding your comment in red, this is just outputting information, it is not functionally active.
However I had thought that this screen options would be where your problem is. On that dropdown, there is a section labelled Columns and under it 3 fields.The first,
Qualification
, has a ticked checkbox next to it. Untick it, and you’ll see the column disappear.I had thought that you might find the taxonomy entries there – and you would need to tick them. But no luck.
In the columns are two other values that don’t come from the list output. They appear to come from a screen-related structure. How this is generated/created I do not know, their names may give you an idea.
Regards,
Neil James
-
This reply was modified 3 months, 4 weeks ago by
- You must be logged in to reply to this topic.