Get first menu item of custom menu

Ok, real stupid while writing this post I was thinking about first looping of the menu items and then storing them in an array for later use. With the example on the following page I can manage that: http://codex.wordpress.org/Function_Reference/wp_get_nav_menu_items // Get the nav menu based on $menu_name (same as ‘theme_location’ or ‘menu’ arg to wp_nav_menu) … Read more

Create custom page and custom menu

If I understand you, what you are doing is almost correct. You need add_menu_page instead of add_submenu_page add_action(‘admin_menu’, ‘register_my_custom_submenu_page’); function register_my_custom_submenu_page() { add_menu_page( ‘My Custom Submenu Page’, ‘My Custom Submenu Page’, ‘manage_options’, ‘my-custom-submenu-page’, ‘my_custom_submenu_page_callback’ ); } function my_custom_submenu_page_callback() { echo ‘<h3>My Custom Submenu Page</h3>’; } As far as the “embedded” PHP, you already have it. … Read more

How to avoid website url appending problem in wp site?

Turn off all plugins and switch to Twenty Thirteen to see if the problem goes away. If yes: figure out which theme and or plugin is causing the problem and re-post a more specific question. If no: re-install WP and follow set-up procedure. Back up data first if working live.

Menu administration, how to allow special charachters

What kind of special characters do you need to put? I never used this field in WordPress, so I’m not sure of what I am saying, but maybe it works like in HTML, which needs you to use entity codes for letters like à, é, è, etc. Here’s a link to a list of entity … Read more

Active menu also for single array

Ok, found it out: <ul class=”nav navbar-nav”> <li<?php if ( is_category(‘app-functies’)) { echo ‘ class=”current”‘; } elseif ( is_singular( ‘augmented-reality’ )) { echo ‘ class=”current”‘; } ?>><a href=”https://wordpress.stackexchange.com/questions/112125/<?php echo site_url(); ?>/app-functies/”>App Functies</a></li> </ul> If you want to add more then 1 is_category() you can also use is category(”) || is_singular(”) . Basic PHP knowledge.. but … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)