Styling last item in ul [closed]

You can use jQuery like this: jQuery(‘ul.children li:last’).addClass(‘last’); And then CSS it with: ul.children li.last { color: red; } Hope this helps. Good luck!

Divide the list into two columns (get_posts)

You could do this with the modulo operator. $posts = get_posts($args); $html=”<ul>”; $limit = 5; $i = 1; foreach ($posts as $post) { $html .= ‘<li>’ . $post->post_title . ‘</li>’; if($i % $limit == 0) { $html .= ‘</ul><ul>’; } $i++; } $html .= ‘</ul>’; echo $html;

Search form as list item in menu?

You can add any item you want to a menu by filtering wp_nav_menu_items. From the tutorial How to Add a Search to Menu, this is how you’d add a search form: add_filter(‘wp_nav_menu_items’,’add_search_box’, 10, 2); function add_search_box($items, $args) { $searchform = get_search_form( false ); $items .= ‘<li>’ . $searchform . ‘</li>’; return $items; }

Output list from each line of metabox (shortcode)

You missed $output in “for” loop, wrong $project(s) name. add_shortcode( ‘cv’, ‘vp_cv’ ); function vp_cv( $atts, $content = null ) { //….. while( $query->have_posts() ) : $query->the_post(); $title = get_the_title(); $projects = get_post_meta($post->ID, ‘resume_projects’, true); if( $projects ) $projects = explode(“\n”, $projects); $output .= ‘<p class=”cv-title”>’ . $title . ‘</p>’; $output .= ‘<p class=”cv-projects”>’; $output … Read more

List all posts, pages and custom post types in admin

There is nothing build-in to create the drop-down for you, so you have to do it yourself. To get the needed information you can use get_post_types() to get the post types you want, set the $args parameter accordingly. Additionally you can set the $ouput parameter to objects, if you need the data provided – it … Read more

List sub-taxonomies from current taxonomy

This may help you: <?php //first get the current term $current_term = get_term_by( ‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) ); //then set the args for wp_list_categories $args = array( ‘child_of’ => $current_term->term_id, ‘taxonomy’ => $current_term->taxonomy, ‘hide_empty’ => 0, ‘hierarchical’ => true, ‘depth’ => 1, ‘title_li’ => ” ); wp_list_categories( $args ); ?> Source – … Read more

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