Mystique 2.5.7 – pomoc z dostosowaniem
-
Witajcie!
Posiadam szablon Mystique w wersji 2.5.7
Tutaj zaznaczyłem, co mi przeszkadza:1.”Strona główna” zamiast napisu „Home”
2.datę wpisu (np. 22.07.2012 16.58) zamiast 23 godziny
3.”Kategoria (nazwa kategorii)” zamiast „by (autor) in (nazwa kategorii)”Jestem świeżym wordpressowiczem i jeszcze na wszystkim się dobrze nie znam.
Viewing 5 replies - 1 through 5 (of 5 total)
-
Pokaż kod plików header.php, index.php / home.php …
home.php
<?php /* Mystique/digitalnature */ ?> <?php get_header(); ?> <!-- main content (masks): primary + sidebar(s) --> <div id="mask-3" class="clear-block"> <div id="mask-2"> <div id="mask-1"> <!-- primary content --> <div id="primary-content"> <?php if(have_posts()): ?> <?php while(have_posts()): ?> <?php the_post(); ?> <?php get_template_part('teaser'); ?> <?php endwhile; ?> <?php if(function_exists('wp_pagenavi')): ?> <?php wp_pagenavi() ?> <?php else : ?> <div class="page-navi clear-block"> <div class="alignleft"><?php previous_posts_link(__('« Previous', 'mystique')); ?></div> <div class="alignright"><?php next_posts_link(__('Next »', 'mystique')); ?></div> </div> <?php endif; ?> <?php else: ?> <h1 class="title error"><?php _e('Oops, nothing here :(', 'mystique'); ?></h1> <?php endif; ?> </div> <!-- /primary content --> <?php get_sidebar(); ?> </div> </div> </div> <!-- /main content --> <?php get_footer(); ?>
index.php
<?php // Silence is golden? ?>
header.php<?php /* Mystique/digitalnature */ ?> <!DOCTYPE html> <html <?php language_attributes('html'); ?>> <head profile="http://gmpg.org/xfn/11"> <link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/favicon.ico" /> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <title><?php bloginfo('name'); ?> <?php wp_title('|', true); ?></title> <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo('stylesheet_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" /> <?php if(is_singular() && get_option('thread_comments')) wp_enqueue_script('comment-reply'); ?> <?php wp_head(); ?> </head> <body <?php body_class('col-2-right fixed'); ?>> <?php wp_nav_menu(array( 'container_class' => 'nav nav-top', 'menu_class' => 'menu page-content clear-block', 'theme_location' => 'top', 'fallback_cb' => '', )); ?> <!-- page --> <div id="page"> <div id="page-ext"> <!-- header --> <div id="header"> <div class="page-content"> <div id="site-title" class="clear-block"> <?php mystique_logo(); ?> <?php if(get_bloginfo('description')): ?><div class="headline"><?php bloginfo('description'); ?></div><?php endif; ?> </div> </div> <div class="shadow-left page-content"> <div class="shadow-right nav nav-main"> <?php wp_nav_menu(array( 'menu_class' => 'menu fadeThis clear-block', 'theme_location' => 'primary', 'fallback_cb' => 'mystique_page_menu', // default menu 'link_after' => '<span class="p"></span>', // pointer arrow on 1st level )); ?> </div> </div> </div> <!-- /header --> <!-- main --> <div id="main" class="page-content"> <div id="main-ext" class="clear-block">
single.php
<?php /* Mystique/digitalnature */ ?> <?php get_header(); ?> <!-- main content: primary + sidebar(s) --> <div id="mask-3" class="clear-block"> <div id="mask-2"> <div id="mask-1"> <!-- primary content --> <div id="primary-content"> <?php if(have_posts()): ?> <?php while(have_posts()): ?> <?php the_post(); ?> <div class="post-links clear-block"> <div class="alignleft"><?php previous_post_link('« %link') ?></div> <div class="alignright"><?php next_post_link('%link »') ?></div> </div> <!-- post --> <div id="post-<?php the_ID(); ?>" <?php post_class('primary'); ?>> <?php if(!get_post_meta($post->ID, 'hide_title', true)): ?> <h1 class="title"><?php the_title(); ?></h1> <?php endif; ?> <div class="post-content clear-block"> <?php the_content(); ?> </div> <?php // we need the pagination markup to match the others (page-navi, comment pages etc) $pages = wp_link_pages(array( 'before' => '<div class="page-navi clear-block"><span class="pages">'.__('Pages »', 'mystique').'</span>', 'after' => '</div>', 'link_before' => '<span class="current">', 'link_after' => '</span>', 'next_or_number' => 'number', 'echo' => 0, )); // remove the <span class="current> & </span> tags (that we added above) from inside links if($pages) echo preg_replace('@\<a([^>]*)>\<span([^>]*)>(.*?)\<\/span>@i', '<a$1>$3', $pages); ?> <?php if($tags = get_the_tag_list('', ' ')): ?> <div class="post-tags clear-block"> <?php echo $tags; ?> </div> <?php endif; ?> <?php if(!post_password_required()): ?> <div class="post-meta"> <div class="details"> <p> <?php printf(__('This entry was posted by %1$s on %2$s at %3$s, and is filed under %4$s. Follow any responses to this post through %5$s.', 'mystique'), '<a href="'.get_author_posts_url(get_the_author_meta('ID')).'" title="'.sprintf(__('Posts by %s', 'mystique'), esc_attr(get_the_author())).' ">'.get_the_author().'</a>', get_the_time(get_option('date_format')), get_the_time(get_option('time_format')), get_the_category_list(', '), '<a href="'.get_post_comments_feed_link($post->ID).'" title="RSS 2.0">RSS 2.0</a>'); ?> <?php if((comments_open()) && pings_open()) // both comments and pings are open printf(__('You can <a%1$s>leave a response</a> or <a%2$s>trackback</a> from your own site.', 'mystique'), ' href="#commentform"',' href="'.get_trackback_url().'" rel="trackback"'); elseif(!comments_open() && pings_open()) // only pings are open printf(__('Responses are currently closed, but you can <a%1$s>trackback</a> from your own site.', 'mystique'), ' href="'.get_trackback_url().'" rel="trackback"'); elseif(comments_open() && !pings_open()) // comments are open, pings are closed _e('You can skip to the end and leave a response. Pinging is currently not allowed.', 'mystique'); else // neither comments, nor pings are open _e('Both comments and pings are currently closed.', 'mystique'); ?> </p> </div> </div> <?php endif; ?> <div class="controls"> <?php edit_post_link(__('Edit', 'mystique')); ?> </div> </div> <!-- /post --> <?php endwhile; ?> <?php comments_template(); ?> <?php else: ?> <h1 class="title error"><?php _e('Oops, nothing here :(', 'mystique'); ?></h1> <?php endif; ?> </div> <!-- /primary content --> <?php get_sidebar(); ?> </div> </div> </div> <!-- /main content --> <?php get_footer(); ?>
1. wp-admin > wygląd > menu
2-3. Masz plik teaser.php w szablonie?Mam ten plik:
<?php /* Mystique/digitalnature */ ?> <!-- post --> <div id="post-<?php the_ID(); ?>" <?php post_class('clear-block thumb-left'); ?>> <div class="post-details"> <?php if(has_post_thumbnail()): ?> <a class="post-thumb" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" > <?php the_post_thumbnail(); ?> </a> <?php endif; ?> <h2 class="title"><a href="<?php the_permalink(); ?>" title="<?php printf(__('Permalink to %s', 'mystique'), the_title_attribute('echo=0')); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php if(comments_open()): ?> <a class="comments" href="<?php the_permalink(); ?>#comments"><?php echo $post->comment_count; ?></a> <?php endif; ?> <div class="post-std clear-block"> <div class="post-date"><span class="ext"><?php echo human_time_diff(get_the_time('U')); ?></span></div> <div class="post-info"> <span class="a"> <?php printf(__('by %s', 'mystique'), sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>', get_author_posts_url(get_the_author_meta('ID'), get_the_author()), esc_attr(sprintf(__( 'Posts by %s', 'mystique'), get_the_author())), get_the_author() )); ?> </span> <?php if(count(get_the_category())) printf(__('in %s', 'mystique'), get_the_category_list(', ')); ?> </div> </div> <div class="post-content clear-block"> <?php the_content(); ?> </div> <?php if($tags = get_the_tag_list('', ' ')): ?> <div class="post-tags clear-block"> <?php echo $tags; ?> </div> <?php endif; ?> </div> <div class="controls"> <?php edit_post_link(); ?> </div> </div> <!-- /post -->
Tą linijkę:
<div class="post-date"><span class="ext"><?php echo human_time_diff(get_the_time('U')); ?></span></div>
Zamień na coś takiego:
<div class="post-date"><span class="ext"><?php the_date('Y-m-d'); ?></span></div>
Te literki w środku dobierz sobie wedle tego:
http://codex.wordpress.org/Formatting_Date_and_TimeA w tym kodzie:
<?php printf(__('by %s', 'mystique'), sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>', get_author_posts_url(get_the_author_meta('ID'), get_the_author()), esc_attr(sprintf(__( 'Posts by %s', 'mystique'), get_the_author())), get_the_author() )); ?> </span> <?php if(count(get_the_category())) printf(__('in %s', 'mystique'), get_the_category_list(', ')); ?>
Możesz sobie przetłumaczyć to „by” i „in” na co chcesz …
Viewing 5 replies - 1 through 5 (of 5 total)
- Temat ‘Mystique 2.5.7 – pomoc z dostosowaniem’ jest zamknięty na nowe odpowiedzi.