게시판 답변이 생성됐습니다
-
2018/12/10 2:00 오후 #53977
답변 너무너무 감사합니다
무료테마 맞습니다.
일단 알려주신 소스를 봤는데
전혀 감이 안오네요
제가 컴퓨터프로그램을 전혀 몰라서요
소스는 아래와 같습니다.
죄송하지만 한번 살펴봐주시면 감사하겠습니다.
—– content.php
<?php
/**
* Template part for displaying posts.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package University_Hub
*/?>
” <?php post_class(); ?>>
<?php $archive_layout = university_hub_get_option( ‘archive_layout’ ); ?>
<?php if ( has_post_thumbnail() ) : ?>
<?php
$archive_image = university_hub_get_option( ‘archive_image’ );
$archive_image_alignment = university_hub_get_option( ‘archive_image_alignment’ );
?>
<?php if ( ‘disable’ !== $archive_image ) : ?>
“><?php the_post_thumbnail( esc_attr( $archive_image ), array( ‘class’ => ‘align’. esc_attr( $archive_image_alignment ) ) ); ?>
<?php endif; ?>
<?php endif; ?><?php university_hub_entry_meta_date(); ?><?php the_title( sprintf( ‘ ‘, esc_url( get_permalink() ) ), ‘
‘ ); ?>
<!– .entry-header –>
<!– .entry-footer –>
<?php if ( ‘full’ === $archive_layout ) : ?>
<?php
the_content( sprintf(
/* translators: %s: Name of current post. */
wp_kses( __( ‘Continue reading %s →‘, ‘university-hub’ ), array( ‘span’ => array( ‘class’ => array() ) ) ),
the_title( ‘“‘, ‘”‘, false )
) );
?>
<?php
wp_link_pages( array(
‘before’ => ‘‘ . esc_html__( ‘Pages:’, ‘university-hub’ ),
‘after’ => ‘‘,
) );
?>
<?php else : ?>
<?php the_excerpt(); ?>
<?php endif; ?><!– .entry-content –>
<!– .entry-content-wrapper –>
<!– #post-## –>
—————- single.php
<?php
/**
* The template for displaying all single posts.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package University_Hub
*/get_header(); ?>
<main id=”main” class=”site-main” role=”main”><?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( ‘template-parts/content’, ‘single’ ); ?>
<?php
// Previous/next post navigation.
the_post_navigation( array(
‘next_text’ => ‘‘ . __( ‘Next’, ‘university-hub’ ) . ‘ ‘ .
‘‘ . __( ‘Next post:’, ‘university-hub’ ) . ‘ ‘ .
‘%title‘,
‘prev_text’ => ‘‘ . __( ‘Previous’, ‘university-hub’ ) . ‘ ‘ .
‘‘ . __( ‘Previous post:’, ‘university-hub’ ) . ‘ ‘ .
‘%title‘,
) );
?><?php
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?><?php endwhile; // End of the loop. ?>
</main><!– #main –>
<!– #primary –>
<?php
/**
* Hook – university_hub_action_sidebar.
*
* @hooked: university_hub_add_sidebar – 10
*/
do_action( ‘university_hub_action_sidebar’ );
?>
<?php get_footer(); ?>—content-single.php
<?php
/**
* Template part for displaying single posts.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package University_Hub
*/?>
” <?php post_class(); ?>> <?php the_title( ‘ ‘, ‘
‘ ); ?>
<!– .entry-header –>
<!– .entry-footer –>
<?php
/**
* Hook – university_hub_single_image.
*
* @hooked university_hub_add_image_in_single_display – 10
*/
do_action( ‘university_hub_single_image’ );
?><?php the_content(); ?>
<?php
wp_link_pages( array(
‘before’ => ‘‘ . esc_html__( ‘Pages:’, ‘university-hub’ ),
‘after’ => ‘‘,
) );
?><!– .entry-content –>
<!– .entry-content-wrapper –>
<!– #post-## –>
-
AuthorPosts