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!
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!
I’d use the default Links section in the dashboard, then write a custom loop to sort them alphabetically (and with the rad big letters of the alphabet as headings). Throw this in your theme’s functions.php file, then use it on any page with the [bookmarks] shortcode: function bookmarks_by_alphabet( ) { $letter=””; // For tracking which … Read more
<?php wp_nav_menu( array( ‘items_wrap’ => ‘%3$s’ ) ); ?> Source http://codex.wordpress.org/Function_Reference/wp_nav_menu#Removing_the_ul_wrap
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;
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; }
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
Check out this plugin: http://wordpress.org/plugins/preserved-html-editor-markup/ It helps clear up some of the inconsistencies between the two tabs.
Use the Multibyte String functions, in this case mb_strtoupper(). This is a general rule: in WordPress, output is usually encoded in UTF-8. Avoid single-byte functions like strlen(), substr() and others when there is a better mb_* function.
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
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