Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Hi Yigit,

    thanks for your message and the copy-and-paste example on how to activate ALB for LearnDash pages.
    Allow me to add the following line of code, which activates ALB on the “topics” level:

    $supported_post_types[] = ‘sfwd-topic’;

    Strangely enough, LearnDash’s custom taxonomies for courses and lessons are plural (sfwd-lessons, sfwd-courses), whereas the taxonomy for the lowest level of content, the topics, are labelled as singular (sfwd-topic).

    So if you are using LearnDash, the whole code to go into your functions.php should read like this:

    function avf_alb_supported_post_types_mod( array $supported_post_types )
    {
      $supported_post_types[] = 'sfwd-lessons';
      $supported_post_types[] = 'sfwd-courses';
      $supported_post_types[] = 'sfwd-topic';
      return $supported_post_types;
    }
    add_filter('avf_alb_supported_post_types', 'avf_alb_supported_post_types_mod', 10, 1);

    Best regards,
    Sebastian

    Hey Rikard,
    thanks for the link and your help, this is exactly what I was hoping for.

    While I understand the code, it seems that your instructions on that page contain an error. To be absolutely sure:

    Instead of
    “Make sure to replace the word ‘post’ with your custom post type.”
    shouldn’t it read:
    “Make sure to replace the word ‘CUSTOM_POST_NAME’ with your custom post type.”

    Thanks,
    Sebastian

Viewing 2 posts - 1 through 2 (of 2 total)