내가 알고 싶은 것은, 이미 만든 index.php 파일을 구현하여 사용자 정의 게시물을 적용 할 수있는 방법입니다. 내가 달성하고 싶다 무엇WordPress에 더미 용으로 맞춤 게시물을 만드는 방법은 무엇입니까?
(아래 참조) :
Display all posts(already accomplished in index.php)
--> show normal post a.k.a 'Article' (already accomplished in index.php)
If category/or post type 'Aside' is used, don't apply a <a> tag, make title lighter(can figure it out in CSS)
-->show text for the 'Aside' marked post
If category/or post type 'Link' is used, wrap title in <a> tag linking to a site(<-- how would I do that in WordPress?)
-->show text for info about the link
If category/or post type 'Photo' is used, don't wrap title in a <a> tag
-->show attached image in post, and post text as a caption
나는이 많은 것처럼 보일 수 있습니다 알고 있지만 내가 쉽게 할-수 확신합니다.
일부 소스 코드는 나에게 모든 방법을 도움이되지 않을 수 있습니다, 그래서 당신은 내가 그것으로 그것을 구현하는 데 도움이 할 수있는 경우 아래에있는 내 index.php를보고있다 : 당신이 입력이 필요한 경우
<?php get_header(); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<article>
<!-- <p><span class="metaCat"><?php the_category(', '); ?></span></p> -->
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
<p><span class="meta"><?php the_time('F jS, Y') ?></span></p>
<hr />
<div class="entry">
<?php the_content('Read the rest of this entry »'); ?>
</div>
</div>
</article>
<hr class="big" />
<?php endwhile; ?>
<?php else : ?>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?>
<?php endif; ?>
실행할 수있는 index.php 파일에 코드를 입력하면 브라우니 포인트에 대해 잘 생각하게됩니다!
감사합니다. 모든 도움을 환영합니다!
대부분의 주제가 처음부터 다루어 졌기 때문에 나는 길이에 대해 대답하지 않았습니다. 거기에 쓰여진 것을 받아들이고 필요에 맞게 적응시키지 않을 것입니다 ... 질의에 대한 올바른 응답을 훨씬 적게 투표하십시오. 나는 첫 번째 기대가 산산조각이 났으므로 두 번째가 될 것이다. 응답이 정확하지만 외부 URI에 대한 링크 인 게시 형식에 대한 부분이 누락되었습니다. (이렇게하려면 일부 get_post_custom (get_the_ID()) 헛소리가 필요합니다. –
URL 부분에 관해서는 ... 내가 성취하고자하는 것은 기본적으로 Tumblr에서 이미 수행 된 작업입니다. 사이트/기사의 링크를 게시물의 머리말로 사용하십시오. 게시물을 통해 공유하는 것과 마찬가지로 내 의견이 적혀 있습니다. –