• У меня тема от artisteer, по этому просто сменит что то в каком либо шаблоне на раз два не получается, а как и где что либо изменить, кроме как только в на странице шаблона я не знаю. Помогите пожалуйста.
    Мне нужно место ссылки на автора, вставить нужную мне ссылку, а именно <?php the_author_posts_link(); ?> (чтобы плагин Author Exposed работал).

    Код шаблона single.php:

    <?php 
    
    /**
     *
     * single.php
     *
     * The single post template. Used when a single post is queried.
     *
     */	
    
    get_header(); ?>
    <div class="art-layout-wrapper">
        <div class="art-content-layout">
            <div class="art-content-layout-row">
                <div class="art-layout-cell art-sidebar1">
                  <?php get_sidebar('default'); ?>
                  <div class="cleared"></div>
                </div><table width="830" border="0" align="center">
      <tr>
        <td>
                <div class="art-layout-cell art-content">
    			<?php get_sidebar('top');  ?>
    			<?php
    				if (have_posts()){
    					/* Display navigation to next/previous posts when applicable */
    					if (theme_get_option('theme_top_single_navigation')) {
    						theme_page_navigation(
    							array(
    								'next_link' => theme_get_previous_post_link('« %link'),
    								'prev_link' => theme_get_next_post_link('%link »')
    							)
    						);
    					}
    
    					while (have_posts())
    					{
    						the_post();
    						get_template_part('content', 'single');
                                                    get_sidebar('bottom');
                                                     /* Display comments */
    						if ( theme_get_option('theme_allow_comments')) {
    							comments_template();
    						}
    					}
    
    					/* Display navigation to next/previous posts when applicable */
    					if (theme_get_option('theme_bottom_single_navigation')) {
    						theme_page_navigation(
    							array(
    								'next_link' => theme_get_previous_post_link('« %link'),
    								'prev_link' => theme_get_next_post_link('%link »')
    							)
    						);
    					}
    
    				} else {    
    
    					theme_404_content();
    
    				}
    			?>
    
                  <div class="cleared"></div>
                </div></td>
      </tr>
    </table>
            </div>
        </div>
    </div>
    <div class="cleared"></div>
    <?php get_footer(); ?>

Просмотр 2 ответов — с 1 по 2 (всего 2)
  • Может я что-то не доглядел, но в том коде что ты выложил я вообще не вижу вывода ссылки на автора.
    В общем нужно сам файл смотреть, так не смогу помочь.
    У тебя вот тут get_template_part(‘content’, ‘single’); подключается видимо шаблон, вот его скорее всего и нужно править.

    Это я знаю, но поменять я там не чего не смог.
    Можете еще подсказать с этим: как сделать вывод этих функций из content-single.php? Чтобы контент, меки, рубрики, выводились с помощью этих функций theme_get_content(), theme_get_metadata_icons('category,tag', 'footer') и тд. Просто вставка тега <?php не помогает.

    content-single.php:

    <?php
    
    /**
     *
     * content*.php
     *
     * The post format template. You can change the structure of your posts or add/remove post elements here.
     *
     * 'id' - post id
     * 'class' - post class
     * 'thumbnail' - post icon
     * 'title' - post title
     * 'before' - post header metadata
     * 'content' - post content
     * 'after' - post footer metadata
     *
     * To create a new custom post format template you must create a file "content-YourTemplateName.php"
     * Then copy the contents of the existing content.php into your file and edit it the way you want.
     *
     * Change an existing get_template_part() function as follows:
     * get_template_part('content', 'YourTemplateName');
     *
     */	
    
    	global $post;
    	theme_post_wrapper(
    		array(
    				'id' => theme_get_post_id(),
    				'class' => theme_get_post_class(),
    				'title' => theme_get_meta_option($post->ID, 'theme_show_post_title') ? get_the_title() : '',
    				'heading' => theme_get_option('theme_single_article_title_tag'),
    				'before' => theme_get_metadata_icons('date,author,edit', 'header'),
    				'content' => theme_get_content(),
    				'after' => theme_get_metadata_icons('category,tag', 'footer')
    		)
    	);
    ?>

Просмотр 2 ответов — с 1 по 2 (всего 2)
  • Тема «Помогите с single.php, пожалуйста)» закрыта для новых ответов.