Replacing the title in admin list table

1. Change post title in post list column I misunderstood what you wanted – obviously. You can do that like this: add_action( ‘admin_head-edit.php’, ‘wpse152971_edit_post_change_title_in_list’ ); function wpse152971_edit_post_change_title_in_list() { add_filter( ‘the_title’, ‘wpse152971_construct_new_title’, 100, 2 ); } function wpse152971_construct_new_title( $title, $id ) { //print_r( $title ); //print_r( $id ); return ‘new’; } Making use of the admin_head-$hook_suffix … Read more

First post full width, rest in two columns

you could rewrite the full code and use the build-in loop counter $wp_query->current_post to fix the css classses and add a class for the first post per row to clear the float to prevent the ‘wacky sticking’; example: <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* … Read more

Adding an email column to a Custom Post Types Admin Screen?

May be you can try this: add_filter(‘manage_edit-movie_columns’, ‘custom_add_new_columns’); function custom_add_new_columns( $columns ){ $columns[‘author_email’] = ‘Email’; return $columns; } add_action(‘manage_movie_posts_custom_column’, ‘custom_manage_new_columns’, 10, 2); function custom_manage_new_columns( $column_name, $id ){ if (‘author_email’==$column_name){ $current_item = get_post($id); $author_id = $current_item->post_author; $author_email = get_the_author_meta( ‘user_email’, $author_id); echo ‘<a href=”https://wordpress.stackexchange.com/questions/158706/mailto:”.$author_email.'”>’.$author_email.'</a>’; } } Here, I have used custom post type movie. You need … Read more

Set div columns in a loop by post count

$post_count is a WP_Query variable. You need $the_query->post_count if( $the_query->have_posts() ): ?> <h1>Partners<h1><hr> <?php while( $the_query->have_posts() ) : $the_query->the_post(); if($the_query->post_count=1){ // … Otherwise it looks like it should work though I am not in a position to test this right now.

custom sortable column

I fixed this issue by changing some of my code. I changed: add_filter( ‘request’, ‘timeline_column_orderby’ ); function timeline_column_orderby( $vars ) { if ( !isset( $vars[‘orderby’] ) || ( isset( $vars[‘orderby’] ) && ‘Year’ == $vars[‘orderby’] ) ) { $vars = array_merge( $vars, array( ‘meta_key’ => ‘timeline_date’, ‘orderby’ => ‘meta_value’ ) ); } return $vars; } … Read more

How to show posts of an columnized different categories on the same line or row?

One way to output the same query yet style it differently is to use current_post or in combination with rewind_posts, or using rewind_posts alone. So for example: Your initial query if ($my_query->have_posts()) :while ($my_query->have_posts()) : $my_query->the_post(); $counter_id = $my_query->current_post + 1; //this is the counter // then use a conditional to style each on based … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)