Support » Plugin: The SEO Framework » SEO metabox not shown on custom post types by default

  • Resolved Dalton Rooney

    (@daltonrooney)


    Hi Sybre,

    Great plugin, thanks! A quick question: I have a custom post type registered called “book”. By default, the SEO metabox is not shown on the bottom of the page when I edit a book.

    I added the following to functions.php

    add_filter( 'the_seo_framework_supported_post_types', 'add_custom_post_types' );
    function add_custom_post_types($defaults) {
        $defaults[] = 'book';
        return $defaults;
    }

    That seems to work! But I see that filter is deprecated. Am I missing something else?

    Also, is there an easy way to filter the priority of that box so that it always shows up at the very bottom of the page?

    Thanks!
    Dalton

    https://wordpress.org/plugins/autodescription/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hi Dalton,

    Thanks! 🙂

    If the post type supports a Title and Editor (content) then all The SEO Framework functions will be activated, this includes the SEO bar and settings.

    The filter you’ve used isn’t deprecated, you got me confused there :D.

    The meta box position is saved per author, so you can manually drag it to the bottom (or top) if you wish. This way it will stay like this on every other page as well.

    If you wish to automate the position of the metabox, please let me know :).

    I hope this helps!
    Let me know if you require any more assistance 🙂

    Thanks and have a wonderful weekend!

    Dalton Rooney

    (@daltonrooney)

    Thanks for your quick response!

    If the post type supports a Title and Editor (content) then all The SEO Framework functions will be activated, this includes the SEO bar and settings.

    Aha, that explains it, we do not use the “Editor” field on most of our CPTs, so that’s why the metabox wasn’t showing up. Now that I know the filter for supported post types, it’s no problem.

    We would like to change the priority of the metabox, that would be helpful. We would like it to automatically be at the bottom for each user without having to drag it around. Yoast had a filter like that:

    add_filter( 'wpseo_metabox_prio', 'low');

    Dalton

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi Dalton,

    I’ll see if I can implement it in 2.6.0, I’ll keep you posted!

    Thanks and have a great day :).

    Plugin Author Sybre Waaijer

    (@cybr)

    Hi Dalton,

    I’ve added a filter in the next version which will allow you to change the Metabox priority.

    add_filter( 'the_seo_framework_metabox_priority', 'my_seo_metabox_priority' );
    function my_seo_metabox_priority() {
    	//* Accepts 'high', 'default', 'low'. Default is 'high'.
    	return 'high';
    }

    I hope this helps! Stay tuned for the next update; ETA unknown as I’m unfortunately currently overwhelmed with other projects.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘SEO metabox not shown on custom post types by default’ is closed to new replies.