Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [columns]

WordPress displays different information about posts, pages, users and other content in a vertical format in each of the above screens, called columns. Visibility of each column can be toggled in the Screen Options.

1
vote
1answer
29 views

Admin multiple column sorting

This question seems simple enough, and I'm surprised that I don't find much while searching Google to find an answer. The only thing I've found is a pro plugin, so far. I'd just like to be able to ...
0
votes
0answers
18 views

Native admin table with search functionality: sorting by columns does not work

I display a WP_List_Table on a submenu_page and offer a search function, which works. However, if I sort by a column within a search result, all records are displayed again. I really don't know why ...
0
votes
0answers
18 views

Count posts associated with another post type

I have two custom post types in Wordpress: Events and Venues. I need to count the number of Events associated with the individual venues and have the counts displayed in a column on the Venues page in ...
0
votes
0answers
25 views

Same height on items in columns block (align-item stretch or other method)

I am building a small plugin to make it possible to add bootstrap cards as custom blocks. This works great in general. Now i'm working on their css and have an issue with alignment. I would like the ...
0
votes
1answer
21 views

Problem adding column to WC Subscription

I am having trouble adding custom column to Woocommerce Subscription. My codes are as below: add_filter( 'manage_shop_subscription_posts_columns', function ($columns) { $columns['my_field'] = __(...
0
votes
0answers
29 views

Get column count and value

I am having trouble converting this to wordpress compatible code: $result = $conn->query("SELECT * FROM {$table} WHERE id='$playlist_id'"); $num_fields = mysqli_num_fields($result); $headers = ...
0
votes
1answer
26 views

Custom column into custom taxonomy (img tag with slug-name as file name)

How to add $term->name (slug) into custom column cells as the file name? $columns = '<img src="SLUG_NAME.jpg">'; function custom_column_header( $columns ){ $columns['image'] = 'Image'; ...
2
votes
1answer
62 views

Admin Column Text Positioning

I have added a custom field to my custom post type and I have got it to output on the admin overview screen. However the text appears to be out of alignment with the column heading and I can't figure ...
1
vote
0answers
10 views

Background of panel changing to Blue [closed]

One section of the site is turning BLUE? Go to http://swwswatercolor.org .. Then "compress" the window, narrowing it to the least width. Watch the panel below the home slider turn BLUE. What is ...
0
votes
1answer
37 views

Create simple columned archive page

I'm attempting to create a custom archive page ordered in breakable columns (depending on the resolution). Ideally something that is as simple as possible under the hood. So: What would be the best ...
0
votes
0answers
296 views

Column sorting for taxonomy table using Advanced Custom Fields

I'm trying to get my admin columns on edit-tags.php to be sortable by ACF field value, but I'm missing something. I can click the column heading to sort the column, but it only sorts the table by tag ...
0
votes
0answers
83 views

How to sort custom posts including null meta-values ​in admin columns with meta_query?

SQL REQUEST SELECT post.ID, month.meta_value, year.meta_value FROM wp_posts post LEFT OUTER JOIN wp_postmeta month ON month.post_id= post.ID AND month.meta_key='mcv_end_month' LEFT OUTER JOIN ...
0
votes
1answer
39 views

Sort columns in the 'Pages' dashboard overview

I would like to alphabetically order pages in the 'Pages' dashboard either by 'title' or a custom column ('hierarchy'). Basically all pages are assigned a hierarchy code (1, 1.1, 1.1.01, 1.1.02, etc.)....
2
votes
1answer
939 views

How I can split text in the_content() into 2 columns?

I need to split one paragraph of text into two columns in wordpress the_content(); I tried different tutorials, but they not work for me. Also I can't use shortcodes. Here how I need to make it done: ...
2
votes
2answers
997 views

Make custom column sortable

I have added custom column to a custom post type, and it works fine. I just want it to sore the names by title so tried this, function sortable_custom_columns( $columns ) { $columns['...
0
votes
1answer
788 views

Check if column exists for one table in DB

In my addon, I would like to check on activation, if a column of a specific table in the DB already exists to avoid to implement it for each activation. Something like this : class MainClassAddon{ ...
1
vote
1answer
42 views

Calculations in functions.php [closed]

I've created an invoice theme for myself and I'm trying to get the invoice total in a custom column. I've tried adapting the code I'm using within the template page to display this in the functions....
0
votes
0answers
1k views

how to split vertical menu into two columns using walker nav menu

i would like to create a footer vertical menu but it should be split into two columns using walker nav menu, but i want to add <div class="col medium-3 small-12 large-3"> and h5 tag before each ...
0
votes
1answer
72 views

User sort by role administrator area

I am looking on all the internet but I can't find the answer. I want to add a column in the users administrator list to sort by user role. I don't know programming and i can't find a plugin (Admin ...
0
votes
1answer
209 views

Make custom post column sortable

I have a custom column listing a post_meta value for each post in the post list screen. I could only find information on how to make a custom post type sortable. How do I make this sortable? Thanks in ...
0
votes
2answers
402 views

manage_users_custom_columns filter not firing callback functions

I have added some custom columns to users table using the following function public function modify_users_columns( $column_headers ) { //Remove email, role, and posts column unset( $...
0
votes
1answer
966 views

How to add Edit | Delete button on rows?

I want to render columns with actions. When hover on row, Edit | Delete links show. Problem at function column_name($item). I don't know why don't run to this function. I tried to add wp_die() ...
1
vote
0answers
236 views

How to add custom classes to admin list table default rows or columns?

I usually add columns to admin tables for various tasks. This time I'd like to keep defaults but add classes to them. Is it possible in some way? I took a look to available filters and to the ...
0
votes
2answers
130 views

HowTo: Add wrapper to columns shortcode?

I have a simple columns shortcode. (How) can this be adjusted to output a containing div around multiple columns? Really don't want to nest shortcodes in the frontend. Perhaps some kind of filter? ...
0
votes
1answer
31 views

Add custom column for custom field

I created a custom field bookcode using the code below. So, how I can add a column for this meta data into my post type manager and make it sortable? function save_bookcode( $post_id ) { if ( ...
2
votes
0answers
459 views

Custom column sorting in WordPress admin post table

I have made a custom column in user administration panel showing user meta data and registered it as sortable. Made a query action to sort it by the meta numerical value (the stored user meta data is ...
0
votes
0answers
129 views

Add column and acf field content for cpt

I have a CPT and on back-end archive list I need to add two columns and display element of two ACF field (checkbox field). I try to use this code but nothing appear on back-end: CPT: /* Palinsesto ...
1
vote
1answer
253 views

how to check if custom post type column already exists?

it would be smart to check if a custom column exists when creating the logic for it when building your custom post type. what would the code be to check if_exists or similar? my CPT column code is ...
0
votes
2answers
71 views

Changer numbers of columns in woocommerce shop

I have a problem with my shop columns in WooCommerce. I would like to display 4 columns in my shop but unfortunately there is just 3 columns. I use the Storefront theme for my shop, so I have looked ...
0
votes
0answers
13 views

Sortable admin columns by 0.00 number

I have a custom admin column I want to make sortable. All the functionality is in place, but when I sort I get this order: I expect this to be in the order: 1.69, 1, 0.5 The code for the echo is: ...
2
votes
1answer
1k views

Twenty Seventeen custom section - one column layout

I have a child theme for twenty-seventeen and am trying to get the possibility to set sections to a one-column layout while the other ones still have their two-columns layout. There seems to be an ...
6
votes
1answer
77 views

Modify column_author in WP_Comments_List_Table

Is it possible to modify the values in the author column in the edit-comments.php section of the backend? A hook? I want to change the mailto field for the commenter's email to include a subject and ...
0
votes
2answers
33 views

Custom Columns for Custom Post Type Manager

Failing miserably at adding a custom column add_action('manage_edit-pricing_columns', 'manage_pricing_columns'); add_action('manage_pricing_posts_custom_column', 'manage_pricing_custom_columns'); ...
1
vote
3answers
5k views

Add custom column to custom post type overview in backend

I have a custom post type called events. In the backend/administration I can list all these custom post types, that is, events: As you can see, there are three columns in this overview: Title, Tags, ...
19
votes
2answers
36k views

Adding custom columns to custom post types

I've done this previously but I've forgotten the name of the hook, and can't find it anywhere... What I'm trying to do is add some custom columns in the listing of a custom post type in the admin. ...
0
votes
2answers
858 views

Loop Split two Columns

How can one split a loop via WP_Query into two columns without having to work with two loops and it is possible that for example in the left side those posts of category "A and B" and in the right ...
0
votes
1answer
3k views

Virtual Composer: How to horizontally align contents from two different columns? [closed]

First of all, I have never used this site before, so I am not sure if this is the right place to ask this particular question. I am trying to build a website using virtual composer. Right now I have ...
0
votes
1answer
48 views

Columns depending on posts count

What i would like to do; if there is one post in custom post type, it should show up in one full column of bootstrap. | post | If there are two posts, they should show up in two half column (...
1
vote
1answer
171 views

manage_posts_custom_column, showing serial number using increment in loop

I know that manage_posts_custom_column, is used to add or remove custom columns to the custom post type page. The function kiran_custom_column_content which is hooked to the function is called as a ...
2
votes
1answer
55 views

How to add a column to the Trash page?

I'm trying to add a column to the trash page for posts and pages but can't find a way to hook into that specific area. I've been able to use functions like manage_posts_columns and ...
0
votes
1answer
160 views

Admin: how to make a custom list filter button send GET queryvars

I've setted custom columns for a custom post type, and I want to add a filtering functionality. I need to use custom data, so I can't take advantage from things like wp_dropdown_categories and the ...
0
votes
1answer
92 views

Custom columns doesn't appear in custom post type

Hi i have a 'tour' custom post types and when i add a custom column at this post type there is not any custom column at tour post type my code is here function tour_price_col( $column, $post_id){ ...
3
votes
2answers
765 views

Remove “Comment” column in all post-types

I just want to remove Comment's column in all post-types and in a single function My current function , Have to do each post-type like this : function remove_post_columns($columns) { unset($...
0
votes
1answer
222 views

Making my custom column sortable

I am using custom post type with a relationship field with ACF and trying to get a column of number of times the "location" has been used in posts (this is my custom post type - location). I have ...
1
vote
1answer
469 views

User Last Login Sort Column

I've seen there are several ways to display a user's last login date on the Users page without having to use a 3rd party plugin. Building on that, I'd really like to have the user's last login date ...
0
votes
1answer
787 views

How to add columns to wordpress menu editor

Wondering if someone can point me in the right direction. Currently, I'm trying to figure out how to add columns and headings to sub menus. Naturally I want to create a basic megamenu where I can add ...
1
vote
0answers
77 views

Filter to shorten column content on edit-tags.php

I am trying to get the content of columns in the edit-tags.php page. I have been trying to do it, first I tried to get the columns. add_filter( 'manage_posts_columns', 'get_columns'); function ...
4
votes
0answers
105 views

How can I modify the content of default columns? [duplicate]

I have a code to add content to my custom columns, that looks like this add_action( 'manage_posts_custom_column', 'my_custom_columns', 10, 2 ); function my_custom_columns( $column, $post_id ) { ...
1
vote
1answer
222 views

Add Sortable Column For All Post Types

I am creating a hit counter that counts the number of page views across all post types. I have gotten it to work and the column displays for each post type showing the total number of page views. I ...
-3
votes
1answer
153 views

Creating two Columns on a Page. [closed]

The page I am trying to edit is as follows: http://www.blackaero.com/shop-2 I am using the Wordpress Simple PayPal Shopping Cart Plugin and I want the two items I have on the page in two columns to ...