원하는 포스트나 페이지에 카테고리 내용/리스트를 출력해주는 플러그인이다.
list category posts
https://wordpress.org/plugins/list-category-posts/
원하는 기능과 간결한 구조라서 지금까지 써본것중 가장 용이하게 잘 쓴 플러그인.
(물론 더 좋은것이 있겠지만 개인적으로 여태 워드프레스 개발했던 나날을 비교했을때..)
템플릿 지원하여 페이지 디자인 반영시 원하는데로 변경 가능.
다양한 shortcode 기능 제공.
2015년 2월 11일 수요일
2015년 2월 10일 화요일
[WP 플러그인] Media Library Assistant : 워드프레스 미디어 라이브러리 관리
Media Library Assistant : 워드프레스 미디어 라이브러리 관리 플러그인
https://wordpress.org/plugins/media-library-assistant/
현재 개발중인 워드프레스 사이트는 오픈 이후 운영시점에서 고려될 사항이 있었는데,
바로 업로드 해놓은 특정 이미지 몇가지를 따로 관리할 이슈였다.
포스팅을 위한 이미지 외에 지정 썸네일 같은거는 향후 포스팅시에도 지속적으로 써야하기 때문에 그런 이미지들만 따로 카테고리 지정해두어서 운영시에 유용하게 활용하도록 하였다.
비슷한 기능을 하는 다른 플러그인도 있었지만, 관리자>미디어 메뉴 접근 외,
직접 포스팅시 선택하는 미디어 선택창에서는 원하는 카테고리만 소팅해서 볼수 있는 컴포넌트가 없어서 패스.
Media Library Assistant 플러그인은 그밖에 여타 다양한 기능을 지원한다.
The Media Library Assistant was inspired by our work on this site. As you can see, we have hundreds of images and download files to manage and several custom taxonomies such as products, artisans, stories and Fair Trade Organizations to keep them organized.
http://fairtradejudaica.org/media-library-assistant-a-wordpress-plugin/
The Assistant allows us to see where our images and downloads appear in the site as featured images or are inserted in page and post bodies. We can quickly find attachments in a particular category or tag as we add pages and posts to the site. We can re-assign attachments to a different author and change meta data such as the attachment name/slug.
2015년 2월 6일 금요일
[WP 팁] 워드프레스 특정 포스트ID를 통해 카테고리 값 얻는 방법
워드프레스에서 특정 포스트에 해당하는 카테고리 정보를 얻는 방법.
<?php
$category = get_the_category( $custompost );
echo $category[0]->cat_name;
?>
카테고리 ID를 얻고싶다면
$category[0]->cat_ID; 으로 지정한다.
* 참고 https://wordpress.org/support/topic/get-category-name-by-post-id
2015년 2월 4일 수요일
[WP 팁] 워드프레스 해당 포스트 페이지 에서 지정된 카테고리 가운데 가장 최상위 카테고리 추출
바로 상단의 카테고리는 category_parent로 가져올수 있으나,
가장 최상단의 카테고리는 아래와 같은 코드를 이용하여 추출한다.
참고 : http://www.wpbeginner.com/wp-themes/how-to-display-only-parent-category-in-your-wordpress-post-loop/
를 이용하여 재가공.
가장 최상단의 카테고리는 아래와 같은 코드를 이용하여 추출한다.
$parentscategory ="";
foreach((get_the_category()) as $category) {
if ($category->category_parent == 0) {
$parentscategory .= $category->cat_ID .' , ';
}
}
$rootcategory_id = substr($parentscategory,0,-2);
참고 : http://www.wpbeginner.com/wp-themes/how-to-display-only-parent-category-in-your-wordpress-post-loop/
를 이용하여 재가공.
피드 구독하기:
글 (Atom)