OnPoint Plugins

  • Plugins
    • Advanced Sidebar Menu
    • Go Live Update Urls
  • About
    • Services
    • Showcase
  • Blog
  • Contact
  • Support
  • Log In
← Back to support

Custom Link Text for Custom Post Types

Resolved

Requested: 3 years and 7 months ago

Hello, I purchased ASM Pro in order to utilize the custom link text available in Screen Options, but it appears that doesn’t appear on custom post types. Is that an option or is there an adjustment I can easily make to achieve this?

Plugin: Advanced Sidebar Menu

  1. OnPoint Plugins

    3 years and 7 months ago

    Hi Ralph,

    I like the idea of having support for titles on custom post types which are available to use in the widgets. I have added this feature to a list of features for an upcoming release.

    In the meantime you may add the following filter to your active theme’s functions.php file to enable this now.

    Have a great night!

    Mat Lipe

  2. Ralph Miller

    3 years and 7 months ago

    Thank you for the quick reply! I just added it, but it thows a 500 error or something that is preventing the site from loading with this in there. It says it’s getting hung up on that (?) question mark before get_post_types.

    Thoughts?

  3. OnPoint Plugins

    3 years and 7 months ago

    Hi Ralph,

    Looks like the code formatting was showing the incorrect character.

    This has been fixed.

    Have a great night!

    Mat Lipe

     

  4. Ralph Miller

    2 years and 8 months ago

    Hi Mat,

    I have this custom code you provided to implement custom link text on a custom post type. I recently upgraded to v8 and it’s causing trouble when editing post types.

    I looked at your migration guide and attempted to update it to the code below, but I’m sure it needs to be done differently now. Can you please let me know what I’d need to change this code to in order for this to work?

    Are there any updates on getting this feature added natively instead of using this custom code? Thank you!

     

    add_action( ‘add_meta_boxes’, function() {

    array_map( function ( $post_type ) {

    add_meta_box( ‘asm-custom-title’, esc_html__( ‘Advanced Sidebar Menu’, ‘advanced-sidebar-menu’ ),

    [ Advanced_Sidebar_Menu_Pro\Meta\Title::instance(), ‘metaBoxOutput’ ], $post_type, ‘side’, ‘high’ );

    }, array_keys( \Advanced_Sidebar_Menu_Pro\Widget_Options\Page\Post_Type::instance()->get_post_types() ) );

    } );

  5. OnPoint Plugins

    2 years and 8 months ago

    Hi Ralph,

    Please give this a try:

    This feature has not yet been added to an active sprint, but is currently #2 on our todo list for new features.

    Have a great weekend!

  6. OnPoint Plugins

    2 years and 8 months ago

    Hi Ralph,

    Version 8.1.0 is now available which includes support for changing the titles on, or excluding custom post types.

    You may remove your filter once you update to 8.1.0.

    Enjoy!

New Response Cancel reply

You must be logged in to respond. Only PRO members are allowed to respond to support requests.

© 2023 · WordPress Development · Terms Of Service · Privacy Policy · Cookie Policy · Log in

  • Plugins
  • Blog
  • Contact