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
0 votes
0 answers
34 views

How to set 'column-primary' to backoffice 2nd column by default

I'm customizing the way custom posts are displayed in the backoffice. I'm trying to shift the section that appear on hover (I'm refering to the four buttons Edit, Quick edit, Trash, Preview) in the ...
user avatar
  • 1
0 votes
1 answer
13 views

custom filtering admin columns

i'm trying to add custom filters to a CPT job-offer, for example, i'm starting by locations. the filters works fine except when i try to filter by all locations. this is my code function ...
user avatar
1 vote
1 answer
16 views

How can I replace the text at the top of a custom column into a icon?

Question How can I change the text at the top of the column into an icon ? Example a star or a thumbs up. Like the "Comment" field. There is no text, just a icon. The files for the plugin is ...
user avatar
  • 21
0 votes
0 answers
36 views

Search & column order by meta value in admin

So, my posts have a custom field named "company" and I would like to have a sortable column for this field in the admin area list of posts and also be able to search posts by it's content. I'...
user avatar
  • 121
0 votes
0 answers
17 views

WP List Table custom column wrapping issue

A table list of Products menu of WooCommerce plugin has a custom/extra column, which breaks the text inside it (image-1). If I change the default overflow-wrap: break-word to normal, the text ...
user avatar
  • 115
0 votes
1 answer
77 views

Creating a new Sortable Column in WordPress Admin

I have a press release category on my WordPress site and there is too much posts being submitted and its taking up space in the All Posts and Published section of my WordPress admin, I'm wondering if ...
user avatar
2 votes
1 answer
124 views

Is it possible to create column width presets in Gutenberg?

Gutenberg gives you some good choices out of the box but is it possible to add a custom preset? I understand I can change the columns manually but was hoping for a preset to make it easier on the ...
user avatar
0 votes
0 answers
25 views

Sortable Custom Column?

I'm sorry, I speak a little English. My MySQL table: CREATE TABLE wp_visitors ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY, `post_id` INT NOT NULL ); The ~/wp-content/themes/mycustomtheme/...
user avatar
0 votes
1 answer
13 views

Custom column on CPT not showing correct value when meta data not set

Basically I have 2 custom columns in the 'edit.php' of my custom post type. What I need is when $item_type is set to 'page' but there is no page selected, 'No selection' is echoed (same for when '...
user avatar
0 votes
1 answer
90 views

Add taxonomy column with meta field (ACF) content

Trying to populate the column with meta field, this way (ACF): add_filter('manage_artist_custom_column', function ($content,$column_name,$term_id){ $term= get_term($term_id, 'artist'); switch (...
user avatar
  • 462
1 vote
0 answers
15 views

how to remove thumbnail and LiteSpeed Optimization column in media library list-view?

I've searched on the internet, and found out this code from this link function remove_upload_columns($defaults) { unset($defaults['comments']); unset($defaults['author']); return $defaults; } ...
user avatar
  • 111
0 votes
0 answers
16 views

make two custom columns sortables

I have 2 custom columns, typeconsole and console: add_filter('manage_edit-post_sortable_columns', function( $columns ) { $columns['typeconsole'] = 'typeconsole'; $columns['console'] = ...
user avatar
  • 1
1 vote
0 answers
60 views

WP CPT Custom Sortable Column in Admin Dashboard Sort Order Random

I am trying to add sorting to the custom posts list on the ID column in the admin dashboard, however, I would like to override the behavior of Sorting. Currently, it sorts by ascending or descending ...
user avatar
0 votes
1 answer
23 views

Create a trailing block with programatically generated Gutenberg columns

I'm pulling some custom data into wp-block-columns with three columns in each row using this shortcode (example code): $array_chunks = array_chunk($array_of_posts, 3); foreach($array_chunks as $posts) ...
user avatar
1 vote
0 answers
9 views

Columns Block no longer appears when searching

I have a strange problem. the core columns block has gone missing. https://wordpress.org/support/article/columns-block/ I can no longer search for it. Has anyone else experienced this? Odd thing is I ...
user avatar
1 vote
0 answers
14 views

Set specific number of columns for top level term on product category archives

I'am a bit desperate about this issue im facing. I have tried so much o code tweaking, asking for help and nobody really could help me, maybe this is the place where some one could at least explain ...
user avatar
0 votes
1 answer
29 views

how can sort my column

How can I add order? add_filter('manage_articles_posts_columns', function ( $columns ) { if( is_array( $columns ) && ! isset( $columns['post_views'] ) ) $columns['post_views'] = ...
user avatar
1 vote
1 answer
244 views

How do I change the default sort order of a custom column on the posts page?

I have a fancy custom column on the posts page in the WordPress admin. I have this column set up to be sortable. The first time that you click on the column header, the URL in the address bar changes ...
user avatar
1 vote
1 answer
28 views

How to add 'total' value to custom column title on the posts list page

I have added custom column to all posts page by this code: // ADD NEW COLUMN function len_columns_head($defaults) { $defaults['post_len'] = 'Symbols'; return $defaults; } // SHOW POST LENGTH ...
user avatar
  • 11
0 votes
1 answer
298 views

Responsive loop with 3 columns inside row then 2 columns

I created a loop in my archive page displaying the posts in 3 columns (33% width) inside a row with 100% width. Each column is a post. What I would like to achieve is to make the loop more flexible ...
user avatar
0 votes
1 answer
35 views

Getting post attchment URL to populate a CPT Admin Page Column

Just trying to work out how to get the url of a file attached to a Post and displaying that in the admin page for that CPT. The file is attached to the post via an ACF file upload field called '...
user avatar
1 vote
1 answer
288 views

How to show first name and last name in custom post type columns

With the below code I am showing the user who created the custom post type's entry but only their username. This isn't helpful enough as I want to show their full name ie: first name and last name but ...
user avatar
0 votes
1 answer
1k views

Putting footer links into different columns

Essentially I would like to drag each footer menu item to the column of my choice. I've created 3 widgets for each footer column, but I can't figure out how to separate the navigation menu items on ...
user avatar
0 votes
2 answers
531 views

Custom sorting in post columns by ACF Pro Select Field

I'm adding a custom column to the admin display for a custom post type. The custom column should display the selected options from an ACF Pro select field. Instead, it always triggers as containing ...
user avatar
0 votes
1 answer
27 views

Undeletable column in Posts

there is something strange happening on my site. I have in Posts section column called post_views which isn't created by any plugin and it is also undeletable. I've tried searching column name in ...
user avatar
0 votes
2 answers
2k views

How to get a count of all posts in foreach loop and split into fourths

I have this loop: <?php $categories = get_terms('my_category'); foreach ( $categories as $category ) : ?> I want to split the posts into 4 separate div columns so that post titles will be ...
user avatar
  • 27
2 votes
1 answer
2k views

How to make 2/3 width column in Gutenberg

I created a 2 column layout block, gave the columns block a CSS class of .first-col-2-3 and added this CSS to my theme: .first-col-2-3 > div:nth-child(1) {background:red;width:67%!important;} ....
user avatar
  • 127
1 vote
0 answers
32 views

adding images column to admin edit columns not working for SVG

I added the ability to use SVG as graphics on my site. They are showing up fine on the front end, but I'm having 2 issues on the backend. The problem is that I want to show post thumbnails on the ...
user avatar
  • 5,257
1 vote
0 answers
23 views

Columns are so narrow I can't edit

First, I am not a coder. Why are the columns so narrow that I can't see enough to edit? I need to be able to link the text but can't see it to click on it. So frustrated.
user avatar
  • 11
0 votes
0 answers
27 views

How to center entire columns on a page, and have it stay responsive?

Page in question: https://princetonfireandsafety.com/contact-info/ I just want the two columns to be centered in the page (but the text left-aligned still). I would prefer to use the columns block ...
user avatar
-1 votes
1 answer
23 views

Images at the same vertical position in multiple columns

I have in a page a multiple column layout (in my case 5 columns, but that doesn't really matter). In each column, I have a heading, then an image and then some text, so like so: Heading 1 ...
user avatar
  • 1
2 votes
3 answers
1k 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 ...
user avatar
  • 148
-1 votes
1 answer
158 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', '...
user avatar
2 votes
1 answer
1k 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 ...
user avatar
0 votes
1 answer
86 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 ...
user avatar
1 vote
1 answer
460 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 ...
user avatar
  • 321
1 vote
2 answers
254 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'] = __(...
user avatar
0 votes
1 answer
54 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'; ...
user avatar
  • 3
2 votes
1 answer
154 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 ...
user avatar
  • 363
1 vote
0 answers
11 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 ...
user avatar
0 votes
1 answer
58 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 ...
user avatar
0 votes
0 answers
163 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 ...
user avatar
0 votes
1 answer
179 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.)....
user avatar
2 votes
1 answer
3k 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: ...
user avatar
  • 123
11 votes
3 answers
15k 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['...
user avatar
  • 373
1 vote
1 answer
3k 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{ ...
user avatar
  • 770
1 vote
1 answer
95 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....
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
0 votes
1 answer
792 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 ...
user avatar
2 votes
1 answer
2k 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 ...
user avatar
  • 21

1
2 3 4 5