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.

41 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
1answer
2k views

Split content into multiple columns using more tag?

First of, this is pretty much an exact duplicate of: Split columns into three+ divs? But the given solution does not work (returns blank). I'm guessing it collides with qTranslate which adds some ...
3
votes
1answer
2k views

initial sort order for a sortable custom column in admin

I have created a number of 'views' column in the admin area of my posts. There are several tutorials for this and I did in fact use a number of these to arrive at my end result. It works as expected ...
2
votes
0answers
483 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 ...
1
vote
0answers
258 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 ...
1
vote
0answers
80 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 ...
1
vote
1answer
836 views

Can you have the users list pre sorted by specific column?

I would like to organise users by date registered every time an admin visits the users page, without having to click again from: http://localhost:8888/wp-admin/users.php I can add the date ...
1
vote
1answer
370 views

Order a custom post type admin screen by a second custom post type title

I have two custom post types: Products and Brands. The Product slug is 'eproduct'. The Brand slug is 'brand-listing'. On the Product admin page, I have added a custom column that lists the Brand ...
1
vote
0answers
237 views

Why does pre_get_posts() return “date” as the orderby parameter for every sortable column?

I am stuck trying to get a custom column to sort according to a custom field. I have two custom post types: Brand and Product. I would like the Product admin screen to have a "Brand" column, and for ...
1
vote
2answers
283 views

Sort by site/blog column in Multisite

I use WordPress Multisite and made a plugin that adds columns with some data. My code is based on this WP Engineer article. The key function in WordPress Multisite is manage_sites_custom_column. And ...
1
vote
0answers
46 views

Show image on the left and content on the right using ul li

Well im looking for a way to do this. In the index to show each post, with the "thumb" on the left and the content of the right using ul li to do so.(http://ae.tutsplus.com/ for example) So far i ...
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 ...
0
votes
0answers
24 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 ...
0
votes
0answers
39 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
36 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
26 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
55 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
0answers
89 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
42 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.)....
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
0answers
137 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 ...
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: ...
0
votes
1answer
54 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 (...
0
votes
1answer
243 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 ...
0
votes
1answer
220 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 ...
0
votes
1answer
118 views

display wordpress user who published a pending post of another user

I have a custom post type, when I view my posts of this type in the dashboard I see: Title Author Date Added as well as a few more I have added My question is how can I display (like the author ...
0
votes
1answer
233 views

Two blogs one page

The idea is basically to create a blog, and have status updates/quotes beside the blog in a separate column. How does one go about making that happen? EDIT: The goal is not to create two separate ...
0
votes
1answer
357 views

Display Custom Column in CPT Taxonomy

I am trying to add a column to one of my custom post types, but only on the edit taxonomy page. I have a taxonomy registered called "event-categories" for my custom post type "events". I can ...
0
votes
0answers
26 views

Default custom column to off

Im currently building a plugin, that adds around 15 custom columns to a custom post type listing with meta data. When registering these columns they all default to being "on" in the screen options tab....
0
votes
0answers
1k views

Adding custom fields to the Quick Edit screen - puzzled about the column concept

We've been told that: The quick_edit_custom_box action hook will not fire unless there are custom columns present. (Source^) If so, then adding a custom field edit functionality to the Quick Edit ...
0
votes
0answers
2k views

Change column of row action (Quick Edit) links in WP_List_Table

Is it possible to move the "Edit | Quick Edit | Trash", etc... links (A/K/A "Quick Edit links") from a table generated by a custom post type registration into a different column other than the "Title" ...
0
votes
2answers
2k views

Make custom post type column sortable

My site has two custom types: Auction and Lot. Lots are connected to an Auction via the post_parent field. I added an Auction column to the Lots list in the admin area. function ...
0
votes
0answers
558 views

displaying child pages in columns when on a parent page

I would like to display sub pages in columns. Some parent pages have a lot of sub pages and the scroll is very long. I am currently using the below code to display sub pages. if($post->...
0
votes
2answers
148 views

How to create three columns from selected posts

I would like to create a three columns with 3 selected posts. They must include image and title. Like this http://i.imgur.com/tXg0bv3.png How to create it in CSS and HTML? This is very important for ...
0
votes
1answer
178 views

Placing the content of one post in two side by side columns, newspaper style

I'm trying to place two columns side by side like a newspaper does and display one post's content within both. I've been trying to explode the content at my h4/90 words and echo the rest of the ...
0
votes
1answer
87 views

Sortable columns by meta value holding a date - can't get it to work

I'm trying to sort the posts (in the edit screen (wp-admin/edit.php)) by meta value corresponding to an event date but I can't get it to work properly... For example, ASC returns: 2012/10/12 2012/...
0
votes
1answer
306 views

Add ASC / DESC to custom post columns

Im using the following code to create custom columns in the backend of the posts menu. add_filter('manage_edit-post_columns', 'post_edit_columns'); function post_edit_columns( $columns ) { ...
-1
votes
1answer
23 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
votes
1answer
547 views

Can't sort custom column on user.php by number / meta_value_num?

Everything else works fine but it's still not sorting by number. Would just like to know what I'm doing wrong here Here's the code function add_user_columns( $defaults ) { $defaults['...
-1
votes
1answer
928 views

How can I get on the same row two post of different categories?

Let me explain better, I have two categories and I want to show a page with two columns one for each category, after this I like to show in the same row each post of each category on each column, just ...