- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
Hi ThemeForest and CodeCanyon people (and WP gurus on the other marketplaces!)
Has anybody successfully nested a Custom Post Type under a standard WordPress page?
I have tried every recommendation on wordpress.stackexchange.com with no success.
I am trying to get all my custom wiki post types to display under the wordpress page /support/documentation-wiki/.
Setting the “slug” on the wiki post type to support/documentation-wiki works in the URL, eg:
page: http://ultimateclientmanager.com/support/documentation-wiki/
wiki: http://ultimateclientmanager.com/support/documentation-wiki/change-request/
but what I’m struggling with is the “current” menu item highlighting. When viewing a wiki page the “Documentation/Wiki” menu and the “Support” menu at the top should be highlighted. I want to avoid hardcoding page id’s (like I’ve done on the forum) as this causes issues when the same theme is used on multisite.
It would also be nice not to have to hardcode the wiki ‘slug’ in the code, just select a page parent.
Setting the wiki post_parent to the page ID in the database does not work and the custom wiki post type is hierarchical. I’ve even tried things like hardcoding the post_parent on page load (this is what wp menu checks when doing its highlighting) but that didn’t work either.
// run in the 'wp' hook when loading a wiki article.
global $wp_query;
if($wp_query){
$wp_query->get_queried_object();
if($wp_query->queried_object){
//print_r($wp_query->queried_object);
$wp_query->queried_object->post_parent = 611;
$wp_query->post = $wp_query->queried_object;
}
}
any ideas? any success?
- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
You could always give authorization after (example) 4 extended license sales. I’ll get staff to confirm if this is ok.
- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
ah this was posted here as well: http://codecanyon.net/forums/thread/the-new-licence-folder-is-breaking-wp-plugins-clean-install/93365
didn’t know it was a thing, I don’t see it in my plugins. Slow rollout?
- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
I have never been able to use the direct upload method for Plugins or Themes. Didn’t know this ever worked.
Every install instruction I’ve ever written is like unzip the downloaded file to your desktop, look for the new theme.zip / plugin.zip file, upload this file to WordPress...
This also helps if the download zip file is large (eg: contains photoshop source files) and you don’t want users uploading the source files to WordPress, just the plugin/theme.
It would be awesome if there was a direct theme/plugin download that could be uploaded straight away.
If you re-package your items again, and include the licence folder (so they don’t add it) that should work yea?
- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
Any plans on commission referrals down the track?
I’ve just started promoting microlancer on my website using a quick WordPress plugin I just created.
Quick Example:
http://dtbaker.net/envato/custom-themeforest-or-codecanyon-modifications/?microlancerservice=art-illustrationPlugin:
https://github.com/dtbaker/microlancer_wp_pluginStill gotta make it look nice (something I’m not good at doing).
- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
documentation
I’m still no good at that.
- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
haha yep:

- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
Got my wiki (kinda!) working by granting every logged in user permission to edit all pages that are underneath the “documentation-wiki” parent page, but not other pages.
Phwoar!~
if(is_user_logged_in() && !current_user_can('administrator')){
add_filter( 'user_has_cap', 'dtbaker_user_has_cap', 10, 3);
add_filter( 'map_meta_cap', 'dtbaker_map_meta_cap', 10, 4 );
}
function dtbaker_user_has_cap($allcaps, $cap, $args){
$caps_to_give = array(
'edit_others_pages',
'edit_pages',
'edit_page',
'edit_published_pages',
'publish_pages',
);
if( !in_array($args[0], $caps_to_give)){
return $allcaps;
}
$allcaps[$cap[0]] = true;
return $allcaps;
}
function dtbaker_wiki_is_page_a_wiki_page($page_id){
$post = get_post( $page_id );
$parents = get_post_ancestors( $post->ID );
foreach($parents as $parentid){
$parent = get_post( $parentid );
if($parent->post_name == 'documentation-wiki'){
return $post;
}
}
return false;
}
function dtbaker_map_meta_cap( $caps, $cap, $user_id, $args ) {
if ( 'edit_page' == $cap ) {
$post = dtbaker_wiki_is_page_a_wiki_page($args[0]);
if($post){
$post_type = get_post_type_object( $post->post_type );
$caps = array();
$caps[] = $post_type->cap->edit_posts;
}
}
return $caps;
}
- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
I useto have a support forum a few years ago based on Vanilla, but it got out of hand with spam and it was too hard to manage, so I closed it down and just offered email support. Now I’m starting up a forum again for each item.
This is a forum created recently with WordPress + bbPress plugin + bbPress Support Forum Plugin + a few tweaks.
Having a support forum is good, sometimes others help eachother, and people can find solutions to past problems.
The biggest problem is trying to get people to use the forum, rather than emailing you directly or posting a comment on the item page. But more of the time it works.
Good luck!
- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
revaxarts said
Good question. Haven’t done a Chrome extension yet. Is it the same like user scripts or do I have to add something else?
Maybe try changing @include to @match otherwise Chrome will report “Access data on all your websites” which could turn some people off.
Could just try loading the existing userscript into Chrome, then from Tools > Extensions choose the “Pack Extension” option and select the ~/.config/google-chrome/Extensions/id_of_your_extension/
This should generate a “Google Chrome” extension based off the converted userscript extension.
I’m not sure they will approve scripts that load in source from external hosts though.
