Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to sort on menu_order #73

Open
sanderdewijs opened this issue Jul 24, 2018 · 0 comments
Open

Unable to sort on menu_order #73

sanderdewijs opened this issue Jul 24, 2018 · 0 comments

Comments

@sanderdewijs
Copy link

sanderdewijs commented Jul 24, 2018

Hi,

I have added the menu_order to the admin screen for a CPT. I can make the column sortable and display the values inside the column. However when I click the column header to sort, the sorting action displays an empty list. Can't figure out what is going wrong here:

	'cb' => '<input type="checkbox" />',
	'title' => 'Title',
	'video_type' => 'Type',
	'menu_order' => 'Order',
	'sticky' => 'Sticky',
	'date' => 'Date',
    ));
    $videoPost->sortable(array(
	'sticky' => array('sticky', false),
	'menu_order' => array('menu_order', true),
    ));
    $videoPost->populate_column('menu_order', function($column, $post){
	echo $post->menu_order;
    });
    $videoPost->populate_column('video_type', function($column, $post){
	echo ucfirst(get_field('video_type'));
    });
    $videoPost->populate_column('sticky', function($column, $post){
	if(get_field('sticky')) {
		echo 'Yes';
	}
    }); 

Thank you,
Sander
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant