년, 월, 일별 모아보기

안녕하세요?

화이클 비디오 스킨을 사용하고있습니다.

현재 게시글들을 리스트에서 

년, 월, 일별 필터로 걸러서 보고 싶은데

 

 

https://wordpress.stackexchange.com/questions/33897/custom-post-type-archives-by-year-month

이 방법을 사용해보려고 했습니다.

함수들을 functions.php에 넣고, post type에 KBoard로 변경하고

사용해도 작동하진않는거같은데

좋은 방법이 있을까요?

감사합니다.

워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
워드프레스 에러 기술지원 서비스 전문가에게 맡기세요
  • 안녕하세요~^^

    KBoard 플러그인 게시글 목록 페이지에서 날짜별로 정렬하시려면

    FTP로 접속해서 /wp-content/plugins/kboard/skin/사용중인스킨/list.php 파일을 수정해주셔야 할 듯합니다.

    아래 예제 코드를 활용해보시겠어요?

    <form method="get" action="<?php echo get_permalink()?>" onsubmit="kboard_set_date_range()">
    	<input type="hidden" id="start_date" name="start_date" value="">
    	<input type="hidden" id="end_date" name="end_date" value="">
    	
    	<div class="kboard-start-date">
    		<select id="start_year" name="start_year">
    			<option value="">연도</option>
    			<option value="2019"<?php if(isset($_GET['start_year'])&&$_GET['start_year']=='2019'):?> selected<?php endif?>>2019</option>
    		</select>
    		<select id="start_month" name="start_month">
    			<option value="00">월</option>
    			<option value="01"<?php if(isset($_GET['start_month'])&&$_GET['start_month']=='01'):?> selected<?php endif?>>01</option>
    		</select>
    		<select id="start_day" name="start_day">
    			<option value="00">일</option>
    			<option value="31"<?php if(isset($_GET['start_day'])&&$_GET['start_day']=='31'):?> selected<?php endif?>>31</option>
    		</select>
    	</div>
    	
    	<div class="kboard-end-date">
    		<select id="end_year" name="end_year">
    			<option value="">연도</option>
    			<option value="2019"<?php if(isset($_GET['end_year'])&&$_GET['end_year']=='2019'):?> selected<?php endif?>>2019</option>
    		</select>
    		<select id="end_month" name="end_month">
    			<option value="00">월</option>
    			<option value="02"<?php if(isset($_GET['end_month'])&&$_GET['end_month']=='02'):?> selected<?php endif?>>02</option>
    		</select>
    		<select id="end_day" name="end_day">
    			<option value="00">일</option>
    			<option value="20"<?php if(isset($_GET['end_day'])&&$_GET['end_day']=='20'):?> selected<?php endif?>>20</option>
    		</select>
    		
    		<input type="submit" value="검색">
    	</div>
    </form>
    
    <script>
    function kboard_set_date_range(){
    	var start_year = jQuery('#start_year').val();
    	var start_month = jQuery('#start_month').val();
    	var start_day = jQuery('#start_day').val();
    	jQuery('#start_date').val(start_year+start_month+start_day);
    
    	var end_year = jQuery('#end_year').val();
    	var end_month = jQuery('#end_month').val();
    	var end_day = jQuery('#end_day').val();
    	jQuery('#end_date').val(end_year+end_month+end_day);
    }
    </script>

    위의 코드는 예제 코드이기 때문에 실제 원하시는 대로 적용하시려면

    프로그래밍에 대한 지식이 좀 있어야 할 듯합니다.

    고맙습니다.

워드프레스 에러 기술지원 서비스 전문가에게 맡기세요