nanacss
Forum Replies Created
-
Forum: Plugins
In reply to: [mqTranslate] How to use the syntax within an php echo in mqtranslate?The full code I’m editing is here:
<?php /*-----------------------------------------------------------------------------------*/ /* Breadcrumbs Function Source: http://dimox.net/wordpress-breadcrumbs-without-a-plugin/ */ /*-----------------------------------------------------------------------------------*/ function minti_breadcrumbs() { global $data; $showOnHome = 1; // 1 - show breadcrumbs on the homepage, 0 - don't show $delimiter = '/'; // delimiter between crumbs $home = '[:hk]首頁[:zh]首页[:en]Home'; // text for the 'Home' link $blog = $data['text_blogbreadcrumb']; $showCurrent = 1; // 1 - show current post/page title in breadcrumbs, 0 - don't show $before = '<span class="current">'; // tag before the current crumb $after = '</span>'; // tag after the current crumb global $post; $homeLink = home_url(); if (is_home() || is_front_page()) { if ($showOnHome == 1) echo '<div id="crumbs"><a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' ' . $blog . '</a></div>'; } else { echo '<div id="crumbs"><a href="' . $homeLink . '">' . $home . '</a> ' . $delimiter . ' '; if ( is_category() ) { $thisCat = get_category(get_query_var('cat'), false); if ($thisCat->parent != 0) echo get_category_parents($thisCat->parent, TRUE, ' ' . $delimiter . ' '); echo $before . 'Archive by category "' . single_cat_title('', false) . '"' . $after; } elseif ( is_search() ) { echo $before . 'Search results for "' . get_search_query() . '"' . $after; } elseif ( is_day() ) { echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' '; echo '<a href="' . get_month_link(get_the_time('Y'),get_the_time('m')) . '">' . get_the_time('F') . '</a> ' . $delimiter . ' '; echo $before . get_the_time('d') . $after; } elseif ( is_month() ) { echo '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a> ' . $delimiter . ' '; echo $before . get_the_time('F') . $after; } elseif ( is_year() ) { echo $before . get_the_time('Y') . $after; } elseif ( is_single() && !is_attachment() ) { if ( get_post_type() != 'post' ) { $post_type = get_post_type_object(get_post_type()); $slug = $post_type->rewrite; echo '<a href="' . $homeLink . '/' . $slug['slug'] . '/">' . $post_type->labels->singular_name . '</a>'; if ($showCurrent == 1) echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after; } else { $cat = get_the_category(); $cat = $cat[0]; $cats = get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); if ($showCurrent == 0) $cats = preg_replace("#^(.+)\s$delimiter\s$#", "$1", $cats); echo $cats; if ($showCurrent == 1) echo $before . get_the_title() . $after; } } elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() ) { $post_type = get_post_type_object(get_post_type()); echo $before . $post_type->labels->singular_name . $after; } elseif ( is_attachment() ) { $parent = get_post($post->post_parent); $cat = get_the_category($parent->ID); $cat = $cat[0]; echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); echo '<a href="' . get_permalink($parent) . '">' . $parent->post_title . '</a>'; if ($showCurrent == 1) echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after; } elseif ( is_page() && !$post->post_parent ) { if ($showCurrent == 1) echo $before . get_the_title() . $after; } elseif ( is_page() && $post->post_parent ) { $parent_id = $post->post_parent; $breadcrumbs = array(); while ($parent_id) { $page = get_page($parent_id); $breadcrumbs[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>'; $parent_id = $page->post_parent; } $breadcrumbs = array_reverse($breadcrumbs); for ($i = 0; $i < count($breadcrumbs); $i++) { echo $breadcrumbs[$i]; if ($i != count($breadcrumbs)-1) echo ' ' . $delimiter . ' '; } if ($showCurrent == 1) echo ' ' . $delimiter . ' ' . $before . get_the_title() . $after; } elseif ( is_tag() ) { echo $before . 'Posts tagged "' . single_tag_title('', false) . '"' . $after; } elseif ( is_author() ) { global $author; $userdata = get_userdata($author); echo $before . 'Articles posted by ' . $userdata->display_name . $after; } elseif ( is_404() ) { echo $before . 'Error 404' . $after; } if ( get_query_var('paged') ) { if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ' ('; echo __('Page') . ' ' . get_query_var('paged'); if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() ) echo ')'; } echo '</div>'; } } ?>
Forum: Plugins
In reply to: [Async Social Sharing] Facebook share window does not open in full view.Hi ya, I hav this problem too. Any idea?
Thanks.
For eample: http://webwhalenews.com/the-ghent-altarpiece-in-100-billion-pixels/
Hi Kethlak,
Thanks for the <?php print async_share_social_box(); ?>
Is what I want 🙂
Forum: Plugins
In reply to: My Captcha Image cannot "Reset"Any idea…?
Forum: Plugins
In reply to: [Contact Form 7] [Plugin: Contact Form 7] Direct URL for the uploaded fileHi, is anyone know how to do this?
I wish I can have the download link for the attachment too.
Thanks 🙂
Forum: Plugins
In reply to: [Sociable] My Sociable Cannot Show Up On Homepage / Frontpagebump! ;p
Forum: Fixing WordPress
In reply to: Tanzaku post headersyou have to change it at the “index.php”
move
<h2 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
to the top of the post-body
Forum: Themes and Templates
In reply to: One post on a page it does’t appear.ttt-berlin, I understand it now! ;p thanks!!!
Forum: Themes and Templates
In reply to: One post on a page it does’t appear.Hi ttt-berlin, thanks for your reply!
It finally works!
Thanks so much!
Forum: Themes and Templates
In reply to: One post on a page it does’t appear.Hi ttt-berlin,
I open the web in iphone and it shows post with the latest version.
I tried to use the old version you recommended, but the posts all end up not aligning.
I think the lastest theme is okay, just that it cant show single post.
Thanks!
Anyone any solutions ? ;p
Forum: Themes and Templates
In reply to: One post on a page it does’t appear.Hi macmanx, thanks for your reply.
Example one post:
http://203.211.138.133/nana4design/category/accessories/This is page that happens to have one post:
http://203.211.138.133/nana4design/page/5/Thanks!
Forum: Themes and Templates
In reply to: grid a licious problemManage to fix that!!!
Hooray!
Forum: Themes and Templates
In reply to: grid a licious problemAnyone? Thanks 🙂