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.

0
votes
0answers
8 views

Grid Col format in wordpress classic editor

I'm using the classical WordPress editor and having some trouble formatting it. I want to achieve the following result. Col 1 should be left blank. Col 2 and Col 3 will have content. I've tried ...
1
vote
1answer
50 views

Why is the new Gutenberg editor so narrow, and how to make it wider?

I'm beginning to like Gutenberg, but I find it too narrow, particularly when working with the 'Columns' block. Why is it so narrow, and can it safely be made wider? I could try doing so with CSS, but ...
-1
votes
1answer
20 views

How to set value in a custom column in wordpress?

It doesn't work at all. function owner_columns($columns) { $columns['views'] = 'Owner'; return $columns; } add_filter('manage_edit-listing_columns', '...
1
vote
1answer
24 views

Replace existing content from specific WooCommerce admin orders list column

How do I either replace or completely remove a column in the Woocommerce Orders list in admin? I know that there's possible to just uncheck the "Shipping address" column from the "Screen Options" and ...
0
votes
0answers
18 views

Save custom css class (and data) to core/columns block

I wish to add/change class for this div: <div class="wp-block-columns has-2-columns"> There is no possibly to use "wp.blocks.registerBlockStyle" because it doesn't work for core/columns blocks ...
0
votes
1answer
14 views

Wp-query and column blocks

Maybe this is asking too much, but the new blocks give a simple way to add columns that work well responsively. ie you can just drop image thumbs into column blocks and they work perfectly on mobile ...
1
vote
1answer
34 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
29 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
19 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
31 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
24 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
42 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
27 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
66 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
38 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
86 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
41 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
1k 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
1k 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['...
1
vote
1answer
890 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
46 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
112 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
278 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
483 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
1k 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
251 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
138 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
33 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
477 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
134 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
262 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
73 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 ...
5
votes
1answer
80 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
34 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, ...
21
votes
2answers
39k 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
885 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
52 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
186 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
64 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
167 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
99 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){ ...
2
votes
2answers
812 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
230 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
512 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 ...