admin menu naming

This post may help you to achieve your goal. http://code.tutsplus.com/articles/customizing-your-wordpress-admin–wp-24941 example would be like below, function edit_admin_menus() { global $menu; global $submenu; $menu[5][0] = ‘Recipes’; // Change Posts to Recipes $submenu[‘edit.php’][5][0] = ‘All Recipes’; $submenu[‘edit.php’][10][0] = ‘Add a Recipe’; } add_action( ‘admin_menu’, ‘edit_admin_menus’ );

Pass the updated value of aid from form using ajax

I’m a bit confused – why the two submit buttons? And you’re outputting the same id multiple times (inside a foreach loop), which will choke jQuery. Try the following, using classes: $form = ”; foreach ( $results as $result ) { $value = esc_attr( $result->aid ); $form .= ‘<form method=”post” class=”aid-form”>’; $form .= “<input name=”aid” … Read more

how to use php in custom toolbar form

One option you have is to use JS to create cookies that store the entered information. Here is an article that explains how to do this. The cookies will last even if a form fails to submit. Just make sure you delete the cookies after you use them. I believe it is a security risk … Read more

php string inside shortcode does not work

this should work <?php echo do_shortcode(‘[shortcode_products_by_brand title=”Promozioni” per_page=”12″ columns=”4″ orderby=”title” order=”desc” brand=”‘. $entity->getSlug() .'” operator=”IN”]’) ?>

Add extra markup to WP menus

When developing a menu on a bootstrap based theme, I now use the following Walker: ‘walker’ => new Custom_Walker_Nav_Menu class Custom_Walker_Nav_Menu extends Walker_Nav_Menu { // add classes to ul sub-menus function start_lvl( &$output, $depth ) { // depth dependent classes $indent = ( $depth > 0 ? str_repeat( “\t”, $depth ) : ” ); // … Read more

Create Customization Controls from Array

Please add “;” after $i = $i++ and see if that fixes your issue foreach ($socialIcons as $icon) { $i = $i++; $wp_customize->add_setting( ‘pxk_href_’ . $icon[‘name’], // use this in twig file call to theme_mod array( ‘default’ => ”, ‘transport’ => ‘postMessage’, ‘priority’ => $i ) );