Site logo

Archived topic

Can't Divide Custom Post Types In Columns

7 replies · Started by Anirudh on March 24, 2021

Viewing posts 1–8 of 8

Hi there, I am working on a new sites with custom post types and custom taxonomies. What I want is this page:https://wordpress-353832-1776636.cloudwaysapps.com/index.php/movie_categories/action to display my movies posts in three columns without the title. I have searched a lot in your forum and tried a number of codes including:-

add_filter( 'generate_blog_get_column_count','generate_custom_column_count' );
function generate_custom_column_count()
{
if ( is_tax() )
return 25;

return $count;
}

and

add_filter( 'generate_blog_get_column_count','tu_search_column_count' );
function tu_search_column_count( $count ) {
if ( is_tax() ) {
return 33;
}

return $count;
}

However, nothing is working. Moreover, when I go to Customize/Layout/Blog and set columns to 3, that too is not working.

Kindly help,
Anirudh

Hi there,

can you provide a login and password in the Private information field so i can get past the maintenance mode.

Sure..

Try this:

add_filter( 'generate_blog_columns', function( $columns ) {
    if ( 'movies' === get_post_type() && ! is_singular() ) {
        return true;
    }

    return $columns;
} );

Hi David, it worked... Thank you so much for your help. Just one more thing. Is there a way to remove the titles?
Thanks again,
Anirudh.

Hi David, it worked... Thank you so much for all your help. Thank you also for bringing the Layout element to my notice. I take this opportunity to congratulate you on making this excellent theme which is high speed as well as elegant. Moreover, with your WP Show Posts plugin, one can achieve a very good looking as well as high performance website.

Thanks again,
Anirudh.

You're welcome - and thanks for the great feedback

This archived topic is closed to new replies.