• Hi,

    I’m trying to make life a bit simpler for myself by creating a template I can use for custom post types, however I don’t profess to be a developer & I’m trying (and failing) to get this to work.

    I’m trying to set two variables, which can be the used throughout the functions when needed, but I can’t pass them across from function to function.

    Can any one help me please?

    Here’s my code http://pastebin.com/SLbdvWiV

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator keesiemeijer

    (@keesiemeijer)

    You can’t pas arguments like this to the function custom_post_type_name:

    'labels' =>  post_type_labels( custom_post_type_name ($custom_post_type_name['title']) ),

    What you can do is this:

    // you don't really need to pass a argument to this function because you set it in the function anyway.
    $my_label = custom_post_type_name();
    // in the $args array
    'labels' =>  post_type_labels( $my_label['title'] ),

    Thread Starter Ash

    (@ashbryant)

    Thanks keesiemeijer

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘help to make custom post types even more simple’ is closed to new replies.