shortcode id usage (7 posts)

  1. MakSider
    Posted 3 years ago #

    Hi. I can't find project ID to use it in [collabpress id=#]. Could anyone help me please? Is the ID hidden inside CP plugin code so that I can unhide it for admin purpose or even for everyone?


  2. MakSider
    Posted 3 years ago #

    Also using [collabpress 31] or [collabpress id=31] (one per page) site hangs and I see not complete page. If use twice: ... [collabpress] ... [collabpress 31] - all projects are displayed twice in the post beginning.

  3. MakSider
    Posted 3 years ago #

    collabpress/includes/menus/dashboard.php on line 155
    required() some '.../content-.php' file. Added
    if ( $cp->view != '' )
    into beginning of
    line 144 collabpress/includes/menus/dashboard.php
    (right before 'cp_load_template( $template );').
    Page with '[collabpress 31]' or '[collabpress id=31]' is now generated, but without 31-st project or any other one.

  4. MakSider
    Posted 3 years ago #

    Can anyone use IDs at all? How?

  5. slashCreations
    Posted 3 years ago #

    I've read your post, but i serisously does not understand why you would use an id inside shortcode.
    This is a very bad way of thinking the developpement.
    This amazing plugin (not mine, i'm just an user like you), let you insert in a page, with a really simple shortcode, all the Collabpress system.
    So, why whould you have an id ? If you do this, you will need to create a new page for each new project .. There will be no more automatic process .. If you do this, you break the main functionnalities of this plugin.
    Maybe that you have a really good reason, that make you want to use id inside shortcode, but i'm pretty sure that there is a very better solution, in copying templates files to your theme folder, and then edit them. You can recreate or rewrite all the functions beeing called from there .. THIS IS how you have to modifiy the plugin.
    Else, you can also create a "sub-plugin", which will 'extends' the collabpress plugin (work only if the plugin is written with classes (don't remember this is the case here :p)
    If you're not familiar with plugin or shortcode creation, i strongly recommened to change the way.

    Maybe that you should consider explaining why you want to use IDs in shortcodes, instead of modifying templates files.


  6. MakSider
    Posted 3 years ago #

    This was the reason for my question.

  7. slashCreations
    Posted 3 years ago #

    Well .... if you read the given function, you'll see that the data ID is extracted, but not used in the function.

    I can read this:

    if ( cp_check_permissions( 'shortcode_user_role' ) ) {
        } else {

    But it should be something like this :

    if ( cp_check_permissions( 'shortcode_user_role' ) ) {
        } else {

    It means that they created the shortcode, but they didnt activated yet.
    If you look at the cp_admin_menu_page_load function, you'll see that nothing is written to check the current item ID, and then use it the template view.
    I think that this shortcode is in current developpement by the plugin team. You should wait before using it, or rewrite your own custom cp_admin_menu_page_load function ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • CollabPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic