Forum Replies Created

Viewing 4 replies - 16 through 19 (of 19 total)
  • For the hex color code, I think it′s the best to use the accent color of your website, which is defined in Leaf Options.

    In your style.css change these:

    .main-navigation li a:hover {
    	color: #yourcolor;
    }

    for the main navigation on mouse over

    .main-navigation li ul li a:hover {
    	background: #444;
    	color: #yourcolor;
    }

    for the drop down-menu on mouse over
    and

    .main-navigation .current-menu-item > a,
    .main-navigation .current-menu-ancestor > a,
    .main-navigation .current_page_item > a,
    .main-navigation .current_page_ancestor > a {
    	color: #yourcolor;
    	font-weight: bold;
    }

    for the current page or category

    If you want to have the current sub-category also to be highlighted with a custom color,
    also change this:

    .main-navigation .sub-menu .current-menu-item > a,
    .main-navigation .sub-menu .current-menu-ancestor > a,
    .main-navigation .sub-menu .current_page_item > a,
    .main-navigation .sub-menu .current_page_ancestor > a {
    	color: #yourcolor;
    }

    replace ‘yourcolor’ with the color of your choice. Should work ?? Let me know

    Thread Starter haltas

    (@haltas)

    Made it! Set $use_attachments in line 3 to ‘true’ and the function will give you the last image attached to the post. If you want to have the first image attached to the post (in most cases, I assume, the one standing nearest to the top) just add 'order' => 'ASC' like this:

    // Otherwise, and only if we want to, just use the last image attached to the post.
    		elseif ( $use_attachments == true ) {
    			$images = get_children( array(
    				'post_parent' => $post_id,
    				'post_type' => 'attachment',
    				'numberposts' => 1,
    				'order' => 'ASC',
    				'post_mime_type' => 'image'));
    			foreach($images as $image) { $attachment = wp_get_attachment_image_src( $image->ID, $size ); }
    		}

    It will have the array beginning with the last post and turn the returning variable $attachement into the source of first image attached to the post.

    Thread Starter haltas

    (@haltas)

    those “<em>“s should mark the lines I changed or edited ??

Viewing 4 replies - 16 through 19 (of 19 total)