Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
1.1 kB
13
Indexable
Never
add_action('salesking_extend_menu', function($menu){
	?>
	<li class="nk-menu-item">
		<a href="<?php echo esc_attr(get_page_link(apply_filters( 'wpml_object_id', get_option( 'salesking_agents_page_setting', 'disabled' ), 'post' , true))).'newpage';?>" class="nk-menu-link">
			<span class="nk-menu-icon"><em class="icon ni ni-navigate-fill"></em></span>
			<span class="nk-menu-text"><?php echo 'New Page!';?></span>
		</a>
	</li><!-- .nk-menu-item -->
	<?php
}, 10, 1);

add_action('salesking_extend_page', function($page){
	
	if ($page === 'newpage'){
		?>
		<div class="nk-content salesking_products_page">
			<div class="container-fluid">
				<div class="nk-content-inner">
					<div class="nk-content-body">
						<div class="nk-block-head nk-block-head-sm">
							<div class="nk-block-between">
								<div class="nk-block-head-content">
									<h3 class="nk-block-title page-title"><?php esc_html_e('New Page!','salesking'); ?></h3>
								</div><!-- .nk-block-head-content -->
							</div>
						</div>
						<div>
							New content here!
						</div>
					</div>
				</div>
			</div>
		</div>
		<?php
	}
});