How to integrate Cornerstone visual editor to edit course UNITS?

Home Forums Legacy Support Support queries How-to & Troubleshooting How to integrate Cornerstone visual editor to edit course UNITS?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #86377
    jsnmrk
    Spectator
    Hi there, I would like to know how I can use the cornerstone visual editor to edit my units. I am using it currently to edit pages and posts and course pages but I cannot see "units" as a post type that I am able to use it to edit with. I contacted the plugin author and told them about this issue. You can see that post to them here: https://community.theme.co/forums/topic/editing-custom-post-types-with-cornerstone/ I asked them how I could edit a custom post type (i.e in this case "Units") - They said to me in response the following: Please contact the developer if the post type could be queried with this <span class="pln" style="box-sizing: border-box; margin: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #444444; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa; padding: 0px 0px 0px 0px !important;">$post_types </span><span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">=</span><span class="pln" style="box-sizing: border-box; margin: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #444444; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa; padding: 0px 0px 0px 0px !important;"> get_post_types</span><span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">(</span><span class="pln" style="box-sizing: border-box; margin: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #444444; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa; padding: 0px 0px 0px 0px !important;"> array</span><span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">(</span> <span class="str" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #008800; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">'public'</span> <span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">=></span> <span class="kwd" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #000088; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">true</span><span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">,</span> <span class="str" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #008800; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">'show_ui'</span> <span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">=></span> <span class="kwd" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #000088; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">true</span><span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">,</span> <span class="str" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #008800; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">'exclude_from_search'</span> <span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">=></span> <span class="kwd" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #000088; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">false</span> <span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">)</span> <span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">,</span> <span class="str" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #008800; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">'objects'</span> <span class="pun" style="box-sizing: border-box; margin: 0px; padding: 0px; border: 0px; font-size: 12px; vertical-align: baseline; color: #666600; font-family: Consolas, Monaco, 'Lucida Console', monospace; white-space: pre; background-color: #fafafa;">);</span>   Please can you let me know about this, as this is very important for me to allow unit post types to be found. How can I do this? Thanks, Jason  
    #86391
    jsnmrk
    Spectator
    Apologies for the code mess above, here is what they said: Please contact the developer if the post type could be queried with this: $post_types = get_post_types( array( 'public'   => true, 'show_ui' => true, 'exclude_from_search' => false ) , 'objects' );
    #86400
    H.K. Latiyan
    Participant
    This query will not work with wplms because we have set the "exclude_from_search => true". As a quick fix you can change it to false for units from vibe-customtypes plugin->custom-post-types.php file, refer: http://prntscr.com/dmin1v ----------- But it will make units searchable in your website, now by default units are not searchable in the website because single unit is not directly accessible to the students. If you make this change then the units will be searchable and whenever the students will click on the unit link they will get an error to contact administrator (as the units are not accessible for them).
    #86417
    jsnmrk
    Spectator
    HI There, Thank you! This worked! For anyone else who has this issue and wants to use cornerstone here is the process I followed to get this working for units, and still NOT HAVE THEM searchable by the students. What you need to do: 1. Installed Cornerstone. 2. Made the change mentioned by Vibethemes above ( http://prntscr.com/dmin1v ) 3. Navigate back to CORNERSTONE>SETTINGS>ALLOWED POST TYPES Added 'units' (which is now discover-able) and clicked update inside of the Cornerstone settings area. 4. Then changed the custom-post-types.php file BACK to 'true' (remember we changed it to 'false') and via ftp uploaded the custom-post-types.php in its original condition to its original location. 5. You are still able to now edit units (existing and new ones) with cornerstone - even though you will now not see 'units' in the cornerstone settings. As a side note if you want to DISABLE editing of units with cornerstone after you do this, you will have to repeat the above steps and when inside of cornerstone then DELETE the 'units' from custom post types, update Cornerstone and then put back the custom-post-types.php in its original condition. Why this works: When you make this change you are essentially making units 'discover-able' by the Cornerstone plugin, so that you can add the 'units' custom post type, so after saving this inside of Cornerstone, this setting has been saved INSIDE of cornerstone, so changing back the custom-post-types.php to its original state makes it look like the units are not being able to be edited by cornerstone becasue you cant see this post type inside of Cornerstone setting BUT they are there. So essentially its a WIN WIN! Units are still NOT searchable on your installation of WPLMS but you can edit them with Cornerstone! This is the best news of my morning today! Thank you H.K for the above insights, and I hope whoever reads this in the future finds it useful. Take care, Jason
    #86426
    H.K. Latiyan
    Participant
    Thanks for sharing the information here. Closing the topic.
Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to integrate Cornerstone visual editor to edit course UNITS?’ is closed to new replies.