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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
713 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 ...
Mark's user avatar
  • 321
1 vote
2 answers
413 views

Problem adding column to WC Subscription [closed]

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'] = __(...
Aniruddh Joshi's user avatar
0 votes
1 answer
96 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'; ...
CvsN's user avatar
  • 3
2 votes
1 answer
231 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 ...
Burgi's user avatar
  • 373
1 vote
0 answers
12 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 ...
Tom Relth's user avatar
0 votes
1 answer
61 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 ...
eightnaut's user avatar
0 votes
0 answers
214 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 ...
Philippe Angel Gonzalez's user avatar
0 votes
1 answer
280 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.)....
user1660874's user avatar
2 votes
1 answer
4k 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: ...
Belial's user avatar
  • 123
16 votes
3 answers
24k views

Make custom column sortable

I have a added custom column to a custom post type, and it works fine. I just want it to sort the names by title, so I tried this, function sortable_custom_columns( $columns ) { $columns['...
thatryan's user avatar
  • 423
2 votes
2 answers
4k 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{ ...
J.BizMai's user avatar
  • 850
1 vote
1 answer
106 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....
Jen's user avatar
  • 29
0 votes
0 answers
2k 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 ...
user avatar
1 vote
1 answer
1k 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 ...
user131527's user avatar
2 votes
1 answer
3k 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 ...
Dan L's user avatar
  • 21
0 votes
2 answers
2k 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( $...
ShahRukhMlk's user avatar
2 votes
1 answer
3k 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() ...
vanloc's user avatar
  • 125
1 vote
0 answers
554 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 ...
Luca Reghellin's user avatar
0 votes
2 answers
313 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? ...
user avatar
0 votes
1 answer
75 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 ( ...
Democloak's user avatar
2 votes
0 answers
596 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 ...
fIshy's user avatar
  • 21
0 votes
0 answers
209 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 ...
MTB Lover's user avatar
1 vote
1 answer
542 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 ...
Zach Smith's user avatar
0 votes
2 answers
220 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 ...
Davalexz28's user avatar
0 votes
0 answers
18 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: ...
bigdaveygeorge's user avatar
2 votes
2 answers
2k 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 ...
Martin's user avatar
  • 31
6 votes
1 answer
314 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 ...
lost.in.userspace's user avatar
0 votes
2 answers
65 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'); ...
Kevin's user avatar
  • 181
2 votes
3 answers
14k 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, ...
beta's user avatar
  • 203
59 votes
6 answers
116k 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. ...
Chin Leung's user avatar
1 vote
2 answers
2k 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 ...
Jamal's user avatar
  • 38
0 votes
1 answer
6k 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 ...
Gesan's user avatar
  • 3
0 votes
1 answer
183 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 (...
Mike Cosgrove's user avatar
1 vote
1 answer
864 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 ...
Kiran Dash's user avatar
2 votes
1 answer
182 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 ...
j08691's user avatar
  • 765
0 votes
1 answer
468 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 ...
Luca Reghellin's user avatar
0 votes
1 answer
217 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){ ...
user3725280's user avatar
2 votes
2 answers
2k 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($...
l2aelba's user avatar
  • 857
0 votes
1 answer
406 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 ...
Roy Savion's user avatar
1 vote
2 answers
1k 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 ...
timmyg's user avatar
  • 115
0 votes
1 answer
1k 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 ...
550's user avatar
  • 45
1 vote
0 answers
101 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 ...
Nemuri's user avatar
  • 49
3 votes
0 answers
110 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 ) { ...
Nemuri's user avatar
  • 49
1 vote
1 answer
1k 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 ...
user1889580's user avatar
-3 votes
1 answer
180 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 ...
BLKKROW's user avatar
1 vote
1 answer
3k views

Advanced Custom Fields: Sorting custom columns with custom fields sorts only by date

I have a custom post type – “members”. With help of Advanced Custom Fields(AFC) I’ve created a Field Group with 5 fields and assigned that group to my “members” post type. I followed this article to ...
Acidon's user avatar
  • 147
-1 votes
2 answers
3k views

Make default template two columns?

I'm sure this must be super simple, but Google isn't helping me! I am using an up-to-date WordPress and I have a two-column layout on my blog section (content left, Twitter feed right) that I am very ...
Richard's user avatar
  • 137
4 votes
1 answer
2k views

manage posts custom column is not populating data from meta boxes

My custom post name is "employee". Here is the code for creating and populating admin columns. Columns have been created but it is not populating. Also, what is the meaning of the "10, 2" in action ...
rushdi's user avatar
  • 45
0 votes
1 answer
68 views

How can I use this code on a custom database table?

I have a custom database table that contains some data. At the moment, I just want to display an overview of the values contained in the table in WordPress Admin area. add_filter('...
alex's user avatar
  • 1,122
0 votes
1 answer
253 views

Full width thumbnail

I have a post part that is called into my single.php and looks like this: <div class="main-content col-md-8" role="main"> <?php while (have_posts()) : the_post(); ?> <?php ...
Madeirense's user avatar