WordPress styling recent post

You can just list them as a list regularly, and style them with css li:nth-child(even) { background: #000 } li:nth-child(odd) { background: #CCC } If you are worried about browser support you could add different classes when you’re populating the list in PHP using $i or something like for($i = 0; $i < count($list); $i++) … Read more

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”]’) ?>