Last active
October 2, 2018 08:30
-
-
Save deckerweb/a39987319fb7a2f51126a26c7a6ee662 to your computer and use it in GitHub Desktop.
Map the document type "Page" (now labelled as "Content") of Elementor Templates as a submenu to (regular) WordPress Pages. This results in a nice quick jump link in your left-hand admin menu ;-).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Do NOT include the opening php tag */ | |
add_action( 'admin_menu', 'ddw_map_elementor_document_type_page_submenu' ); | |
/** | |
* Map the Elementor Template document type "Page" as a submenu under WordPress | |
* regular "Pages". | |
* | |
* @author David Decker - DECKERWEB | |
* @link https://gist.github.com/deckerweb/a39987319fb7a2f51126a26c7a6ee662 | |
* | |
* @uses add_submenu_page() | |
*/ | |
function ddw_map_elementor_document_type_page_submenu() { | |
add_submenu_page( | |
'edit.php?post_type=page', | |
esc_html__( 'Elementor Template Pages', 'your-textdomain' ), | |
esc_html__( 'Elementor Template Pages', 'your-textdomain' ), | |
'edit_theme_options', | |
esc_url( admin_url( 'edit.php?post_type=elementor_library&elementor_library_type=page' ) ) | |
); | |
} // end function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment