|
|||||||
WP3 и мои глупые вопросы 2Обсуждение темы WP3 и мои глупые вопросы 2 в разделе HTML, CSS, JavaScript, часть категории ВЕБ-ПРОГРАММИРОВАНИЕ; на главной странице отображаются малые копии картинок в каждом посте http://cherpachjok.ru/ внутри 1го поста также отображаются http://cherpachjok.ru/2011/яблочный-чай-с-пряностями/ а вот если перейти в рубрику ... |
![]() |
|
|
|
Опции темы |
|
|
#1 |
|
|
на главной странице отображаются малые копии картинок в каждом посте
http://cherpachjok.ru/ внутри 1го поста также отображаются http://cherpachjok.ru/2011/яблочный-чай-с-пряностями/ а вот если перейти в рубрику или по меткам ... картинок в списке постов нет http://cherpachjok.ru/category/vtoryie-blyuda/ понимаю что проблема в шаблоне архивов, но понять какой кусок кода за это отвечает я хз вот шаблон основной Код:
<?php get_header(); ?>
<div id="maintop"></div>
<div id="wrapper">
<div id="content">
<div id="main-blog">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="clear"> </div>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<div class="post-comments">
<?php if ( ! post_password_required() ) {
comments_popup_link( __( '0', 'desk-mess-mirrored' ), __( '1', 'desk-mess-mirrored' ), __( '%', 'desk-mess-mirrored' ), '',__( '-', 'desk-mess-mirrored' ) );
} ?>
</div>
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'desk-mess-mirrored' ); ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<div class="postdata">
<?php _e( 'Posted by ', 'desk-mess-mirrored' ); the_author(); _e( ' on ', 'desk-mess-mirrored' );
if ( get_the_title() == "" ) { /* for posts without titles - creates a permalink using the post date referencing the post ID */ ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to post ', 'desk-mess-mirrored' ); the_id(); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a>
<?php } else {
the_time( get_option( 'date_format' ) );
}
_e( ' in ', 'desk-mess-mirrored' ); the_category( ', ' ); edit_post_link( __( 'Edit', 'desk-mess-mirrored' ), __( ' | ', 'desk-mess-mirrored' ), __( '', 'desk-mess-mirrored' ) ); ?>
</div><!-- .postdata -->
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail( 'thumbnail', array( 'class' => 'alignleft' ) );
} ?>
<?php the_content(" Читать полностью => " . the_title('', '', false)); ?>
<div class="clear"></div> <!-- For inserted media at the end of the post -->
<?php wp_link_pages( array( 'before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number' ) ); ?>
<p class="single-meta" style="float:right; margin-top:5px; margin-right:10px; font-size:11px; "> <?php the_tags(); ?></p>
</div> <!-- .post #post-ID -->
<?php endwhile; ?>
<div id="nav-global" class="navigation">
<div class="left">
<?php next_posts_link( __( '« Previous entries', 'desk-mess-mirrored' ) ); ?>
</div>
<div class="right">
<?php previous_posts_link( __( 'Next entries »', 'desk-mess-mirrored' ) ); ?>
</div>
</div>
<?php else : ?>
<h2><?php printf( __( 'Search Results for: %s' ), '<span>' . esc_html( get_search_query() ) . '</span>' ); ?></h2>
<p class="center"><?php _e( 'Sorry, but you are looking for something that is not here.', 'desk-mess-mirrored' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
</div><!--end main blog-->
<?php get_sidebar(); ?>
<div class="clear"></div>
</div><!--end content-->
</div><!--end wrapper-->
<?php get_footer(); ?>
<?php /* Last Revision: Jan 23, 2011 v1.8.3 */ ?>
Код:
<?php get_header(); ?>
<div id="maintop"></div><!--end maintop-->
<div id="wrapper">
<div id="content">
<div id="main-blog">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<div class="clear"> </div>
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<div class="post-comments">
<?php if ( ! post_password_required() ) {
comments_popup_link( __( '0', 'desk-mess-mirrored' ), __( '1', 'desk-mess-mirrored' ), __( '%', 'desk-mess-mirrored' ), '',__( '-', 'desk-mess-mirrored' ) );
} ?>
</div>
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'desk-mess-mirrored' );?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h1>
<div class="postdata">
<?php _e( 'Posted by ', 'desk-mess-mirrored' ); the_author(); _e( ' on ', 'desk-mess-mirrored' );
if ( get_the_title() == "" ) { /* for posts without titles - creates a permalink using the post date referencing the post ID */ ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to post ', 'desk-mess-mirrored' ); the_id(); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a>
<?php } else {
the_time( get_option( 'date_format' ) );
}
_e( ' in ', 'desk-mess-mirrored' ); the_category( ', ' ); edit_post_link( __( 'Edit', 'desk-mess-mirrored' ), __( ' | ', 'desk-mess-mirrored' ), __( '', 'desk-mess-mirrored' ) ); ?>
</div>
<?php the_excerpt(); ?>
<p class="single-meta" style="float:right; margin-top:5px; margin-right:10px; font-size:11px; "> <?php the_tags(); ?></p>
</div> <!-- .post #post-id -->
<?php endwhile; ?>
<div id="nav-global" class="navigation">
<div class="left">
<?php next_posts_link( __( '« Previous entries', 'desk-mess-mirrored' ) ); ?>
</div>
<div class="right">
<?php previous_posts_link( __( 'Next entries »', 'desk-mess-mirrored' ) ); ?>
</div>
</div> <!-- .navigation -->
<?php else : ?>
<h2><?php printf( __( 'Search Results for: %s' ), '<span>' . esc_html( get_search_query() ) . '</span>' ); ?></h2>
<p class="center"><?php _e( 'Sorry, but you are looking for something that is not here.', 'desk-mess-mirrored' ); ?></p>
<?php get_search_form(); ?>
<?php endif; ?>
</div><!--end main blog-->
<?php get_sidebar(); ?>
<div class="clear"></div>
</div><!--end content-->
</div><!--end wrapper-->
<?php get_footer();?>
<?php /* Last Revision: Nov 20, 2010 v1.8.2 */ ?>
p.s. тема называется Desk Mess Mirrored и над ней надстройка для нееже Multi Спасибо. |
|
|
|
|
#2 |
|
|
Лучше всего написать тему самому, тк так вы сможете использовать все возможности wp
А так попробуйте вставить PHP код:
|
|
|
| Этот пользователь сказал спасибо Niemans за это полезное сообщение: | vitaly-go (19.09.2011) |
|
|
#3 |
|
|
спасибо но неспасло...
на другом сайте пару месяцев назад сделал такиеже правки, http://vjazanie-kreativ.ru/ но там тема совсем по другому построена а тут ... |
|
|
|
|
#5 |
|
|
пробовал и так, непомогло, я во все уже пытался вставлять, толку 0
может в функциях темы надо чегонибудь исправить Код:
<?php
global $wp_version;
// Get the page number
if ( ! function_exists( 'dmm_get_page_number' ) ) {
function dmm_get_page_number() {
if ( get_query_var( 'paged' ) ) {
print ' | ' . __( 'Page ' , 'desk-mess-mirrored' ) . get_query_var( 'paged' );
}
}
}
// end get_page_number
// Start Register Widgets
register_sidebars( 3, array(
'description' => '',
'before_widget' => '<li id="%1$s" class="widget %2$s">',
'after_widget' => "</li>\n",
'before_title' => '<h2 class="widgettitle">',
'after_title' => "</h2>\n",
) );
// End Register Widgets
// Start Theme Version
if ( ! function_exists( 'bns_theme_version' ) ) {
function bns_theme_version () {
$theme_version = ''; /* Clear variable */
/* Get details of the theme / child theme */
$blog_css_url = get_stylesheet_directory() . '/style.css';
$my_theme_data = get_theme_data( $blog_css_url );
$parent_blog_css_url = get_template_directory() . '/style.css';
$parent_theme_data = get_theme_data( $parent_blog_css_url );
/* Create and append to string to be displayed */
$theme_version .= '<br /><span id="bns-theme-version">' . $my_theme_data['Name'] . ' v' . $my_theme_data['Version'];
if ( $blog_css_url != $parent_blog_css_url ) {
$theme_version .= __( ' a child of the ', 'desk-mess-mirrored' ) . $parent_theme_data['Name'] . ' v' . $parent_theme_data['Version'];
}
$theme_version .= __( ' theme from ', 'desk-mess-mirrored') . '<a href="http://buynowshop.com/" title="BuyNowShop.com">BuyNowShop.com</a>.';
/* Display string */
echo $theme_version . '</span><!-- #bns-theme-version -->';
}
}
// End Theme Version
// Tell WordPress to run desk_mess_mirrored_setup() when the 'after_setup_theme' hook is run. */
add_action( 'after_setup_theme', 'desk_mess_mirrored_setup' );
if ( ! function_exists( 'desk_mess_mirrored_setup' ) ):
function desk_mess_mirrored_setup(){
// This theme uses post thumbnails
add_theme_support( 'post-thumbnails', array( 'post', 'page' ) );
// Add default posts and comments RSS feed links to head
add_theme_support( 'automatic-feed-links' );
// Add theme support for editor-style
add_editor_style();
// This theme allows users to set a custom background
add_custom_background();
// Add wp_nav_menu() custom menu support
function dmm_nav_menu() {
if ( function_exists( 'wp_nav_menu' ) )
wp_nav_menu( array(
'theme_location' => 'top-menu',
'fallback_cb' => 'dmm_list_pages'
) );
else
dmm_list_pages();
}
function dmm_list_pages() {
if ( is_home() || is_front_page() ) {
wp_list_pages( 'title_li=' );
} else { ?>
<li><a href="<?php echo home_url( '/' ); ?>"><?php _e( 'Главная', 'desk-mess-mirrored' ) ?></a></li>
<?php wp_list_pages( 'title_li=' );
}
}
add_action( 'init', 'register_dmm_menu' );
function register_dmm_menu() {
register_nav_menu( 'top-menu', __( 'Top Menu' ) );
}
// wp_nav_menu() end
// Make theme available for translation
// Translations can be filed in the /languages/ directory
load_theme_textdomain( 'desk-mess-mirrored', TEMPLATEPATH . '/languages' );
$locale = get_locale();
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
if ( is_readable( $locale_file ) )
require_once( $locale_file );
}
endif;
// Start BNS Modified Post - requires WordPress version 3.0 or greater
if ( ! function_exists( 'bns_modified_post' ) ) {
function bns_modified_post(){
/* If the post date and the last modified date are different display modified date */
if ( get_the_date() <> get_the_modified_date() ) {
echo '<div class="bns-modified-post">'; /* CSS wrapper for modified date details */
echo 'Last modified by ' . get_the_modified_author() . ' on ' . get_the_modified_date();
echo '</div><!-- .bns-modified-post -->';
}
}
}
// End BNS Modified Post
// Set the content width based on the theme's design and stylesheet, see #main-blog element in style.css
if ( ! isset( $content_width ) ) $content_width = 580;
?>
<?php /* Last Revised Jun 7, 2011 v1.8.5 */ ?>
|
|
|
|
|
#7 |
|
|
|
|
|
|
|
#9 |
|
|
вставил вот так
Код:
<div class="postdata">
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail( 'thumbnail', array( 'class' => 'alignleft' ) );
} ?>
<div style=" background:aqua ; border:medium fuchsia; width:100px; height:100px; "></div>
<?php printf( __( 'Posted by %1$s on ', 'desk-mess-mirrored' ), get_the_author() );
http://cherpachjok.ru/category/vtoryie-blyuda/ ![]() Добавлено через 5 минут нихрена непонимаю в чем проблема втавил здесь но не сразу после postdata, а после вывода титла внутри него http://you-domik.ru/2011/09/19/ работает но работает если смотреть\сортировать по датам ,а там где надо именно по рубрикам - неработает ![]() Последний раз редактировалось vitaly-go; 19.09.2011 в 15:52.. Причина: Добавлено сообщение |
|
|
|
|
#10 |
|
|
вытащите код из <div class="postdata"> и вставьте после
а так оч странно Добавлено через 3 минуты http://you-domik.ru/2011/09/19/ это шаблон архивов http://cherpachjok.ru/category/vtoryie-blyuda/ категории соответственно трабла в нем Последний раз редактировалось Niemans; 19.09.2011 в 15:53.. Причина: Добавлено сообщение |
|
|
![]() |
|
| Метки |
| wp3, вывод картинок |
|
|
| Похожие темы | ||||
| Тема | Автор | Раздел | Ответов | Последнее сообщение |
| HostCMS и мои глупые вопросы 3 | vitaly-go | HTML, CSS, JavaScript | 6 | 25.10.2011 15:46 |
| WP3 и мои глупые вопросы | vitaly-go | HTML, CSS, JavaScript | 19 | 14.04.2011 13:40 |
| HostCMS и мои глупые вопросы 2 | vitaly-go | HTML, CSS, JavaScript | 2 | 07.02.2011 13:29 |
| HostCMS и мои глупые вопросы | vitaly-go | HTML, CSS, JavaScript | 139 | 27.09.2010 09:43 |
| Движок форума phpBB и все мои глупые вопросы с ним связанные | sokol666 | ASP, Perl, PHP и MySQL | 18 | 08.12.2009 15:05 |
|
Реклама на форуме
Условия размещения рекламы
Биржа ссылок
Заработай на сайте!
|