Add Template Selector Drop-Down to LearnDash Custom Post Types Array

I have a set of functions that I found online which add a meta box for templates to my WP Post editor and it works perfectly (http://pastebin.com/0WdPAWM1).

I tried to modify it to be applied to an array which includes the LearnDash custom post types I need the metabox to also show up for (http://pastebin.com/755bEtJc), but all I managed to do was to get the metabox to appear. Unfortunately, the drop-down menu didn’t populate (it only shows the templates on the normal “post” editor).

I know that it is just my ignorance of PHP keeping me back, but I tried to replace every instance of ‘post’ in the original set of functions to $types which is my array variable and that didn’t work either.

These are the custom post types I need the template selector on:

'sfwd-courses', 'sfwd-lessons', 'sfwd-topics', 'sfwd-quiz'

Replay

Category: custom post types Time: 2016-07-28 Views: 0

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.248 (s). 12 q(s)