• Resolved Alkorr

    (@alkorr)


    Hi, this plugin is awesome, thanks for the great work! ??

    My only issue so far is that I’d like to remove the Secondary Title column from the Admin (it’s showing next to the Title Column).

    Is there a way to do that, hiding the column using some kind of a hook via the functions.php?

    Let me know, thanks a lot!

    https://www.ads-software.com/plugins/secondary-title/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author thaikolja

    (@thaikolja)

    Hi and thanks for your post.

    You can disable the secondary title column easily by clicking in the top right corner within the post overview screen called “Options”, and then unchecking the box “secondary title”.

    Let me know if it worked.

    Thread Starter Alkorr

    (@alkorr)

    Hi thaikolja, this is the basic option indeed, unfortunately, I manage all the Screen Options from the functions.php (Screen Options Panel is not available from my Admin). Hence my question about a hook via the functions.php to hide it.

    Thanks for your quick reply!

    Plugin Author thaikolja

    (@thaikolja)

    Alright, then I got you wrong.

    I’ve just implemented a filter hook for the next version. In the meantime, you can do the following changes to use it before I publish the new version.

    1. Open /includes/hooks.php in the Secondary Title folder.
    2. Add after function secondary_title_init_columns() { (should be on line 105) the following line:

    if(!apply_filters("secondary_title_show_overview_coulmn", true)) {
       return false;
    }

    3. Open your functions.php and add the following line to disable the columns for all post types:

    function dont_secondary_title_show_overview_coulmn() {
        return false;
    }
    add_filter("secondary_title_show_overview_coulmn", "dont_secondary_title_show_overview_coulmn");

    I hope it works.

    Thread Starter Alkorr

    (@alkorr)

    Hi thaikolja, thanks for your help! I’m not comfortable in modifying WP Core Files, so I tried to modify a function I already used to hide the Comments Column and changing the Comments Column ID with the one of your plugin, but it doesn’t seem to work…

    function remove_secondary_title_column( $columns ) {
    	if ( array_key_exists( 'secondary_title', $columns ) )
    		unset( $columns['secondary_title'] );
    
    	return $columns;
    }
    
    add_filter( 'manage_posts_columns', 'remove_secondary_title_column' );

    Sorry if I’m being tedious, I’m not a coder but I’m trying ??

    Plugin Author thaikolja

    (@thaikolja)

    I’m a bit confused. Nothing would require you to modify WP core files. You just have to change these 3 lines in the Secondary Title folder and in your theme’s functions.php. The new filter hook will be added to the new version anyway.

    Thread Starter Alkorr

    (@alkorr)

    Right, in fact I don’t like modifying files, either WP Core Files or the ones from a plugin. The only files I usually modify are the ones from the theme.

    I’ll try the solution you suggested, and if the new filter hook is added to the new version, them it will be the perfect plugin to me.

    Thank you very much for your quick replies! ??

    Plugin Author thaikolja

    (@thaikolja)

    Ah I see. Well, unfortunately that’s the only way to do it for now. I’ll release the update in a few days, then the filter hook will become part of the plugin. Thanks again for your input.

    Thread Starter Alkorr

    (@alkorr)

    By the way, I just realized since the Secondary Title Column is showing, the Author Column is not anymore… Did you notice it too on your side?

    Plugin Author thaikolja

    (@thaikolja)

    You’re right, I’ve never noticed that. I’ve just fixed it. Thanks!

    Thread Starter Alkorr

    (@alkorr)

    Hi thaikolja! The Author Column is back, great, thank you! ??

    Plugin Author thaikolja

    (@thaikolja)

    You’re very welcome. And feel free to post a rating ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Hide Secondary Title Description Column’ is closed to new replies.