Home Forums Plugin Support WP Project Manager Pro Template PHP Tag

This topic is: not resolved

This topic contains 4 replies, has 2 voices, and was last updated by  fueledbydreams 5 years, 11 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5438

    fueledbydreams
    Participant
    Post count: 2

    I would like to make a custom page template for the Project Mangers page other then the do_shortcode function I would prefer to use a PHP call. I tend to stay away from shortcode after reading (http://kovshenin.com/2013/dont-do_shortcode/) Is there a PHP call I can use in my template.

    #5447

    Tareq Hasan
    Keymaster
    Post count: 2831

    Currently there isn't any special templating function like that, you could use a static call and see if that works. Cause I haven't tried yet.

    [php]
    if ( class_exists( ‘CPM_Frontend' ) ) {
    CPM_Frontend::shortcode( array(‘id' => '37') ); // pass the project ID
    }
    [/php]

    #5450

    fueledbydreams
    Participant
    Post count: 2

    What if I dont want it to show a specific project, created a login page that requires the user to login then I wanted it to show only projects they are assigned to. So basically I am looking for the PHP call to replace [cpm]

    #5460

    Tareq Hasan
    Keymaster
    Post count: 2831

    In that case, don't pass the ID: CPM_Frontend::shortcode();

    #5477

    fueledbydreams
    Participant
    Post count: 2

    That didn't work, the php failed at that line.

    Its not too big of a deal but it would be nice in a revision that a template tag could be added ๐Ÿ™‚

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

The topic ‘Template PHP Tag’ is closed to new replies.