통신 무화과 홈 페이지뉴 스피드 통신 무화과이메일로 통신 무화과통신 무화과 가장 인기있는 게시물
중요 인물
Helping you, by helping myself with blogging, browsing, and tech tips 당신을 돕는을 도움으로써 자신과 블로깅, 검색, 그리고 기술 팁

Widgetizing Your Blog 귀하의 블로그 widgetizing

June 15th, 2007 · by David Bradley 2007년 6월 15일로 데이비드 브래들리

If you have already upgraded to Wordpress 2.2, then this post is not for you. wordpress이 이미 2.2로 업그레이 드하는 경우,이 게시물이 당신을 위해서가 아니라합니다. But, if you are languishing on an earlier installation and running a theme that does not support widgets, then you may like to check out how to get widgetized. 하지만, 오래 끄는 경우에는 이전 버전을 설치하고 실행하는 테마를 지원하지 않는 위젯, 다음 같은 경우를 widgetized 방법을 알아 보려고합니다. But, first what are widgets? 하지만, 먼저 위젯 무엇입니까? Well, they’re little snippets of code that sit in their own boxes within your sidebar and can be reordered with a simple drag and drop. 글쎄, 그들은 그들 자신의 자리에 앉아 작은 미리보기를 상자에 코드가 귀하의 사이드바와 시간 reordered 수있는 간단한 드래그 앤 드롭합니다. So, your search box is at the bottom and your Feedburner count at the top but you want them the other way around? 그래서, 당신과 당신의 하단에 검색 상자는 feedburner 카운트 상단에 그들을 다른 방법으로 원하는하지만 근처에 있나요? It’sa lot of cutting and pasting with the standard sidebar in Theme Editor, but if your blog is widgetized all you do is drag the search widget to the top of the stack and the Feedburner block to the bottom. 이것을 표준 사이드바에 많은 절단 및 붙여넣기를 테마 편집기를하지만 만약 귀하의 블로그는 widgetized이해야 할 일은 검색 위젯을 드래그하여 상단의 블록을 바닥에 스택과 feedburner합니다. And save the new settings. 새로운 설정을 저장합니다.

The Automattic site has the full skinny on the 자동차 사이트가 마른 체형의 전체를 widgetizing your site 귀하의 사이트에 widgetizing and provides you with the necessary downloads, so I am not going to repeat their wise words here. 다운로드하는 데 필요한 기능을 사용하고, 그래서 나는 그들의 현명한 단어를 반복하지 않을 여기에있습니다. But, one aspect of widgetizing the Sciencebase site earlier this year, prior to the release of version 2.2, was that I simply could not eradicate an orphaned bullet point that was appearing at the top of the sidebar with no entry to which is was associated. 하지만, widgetizing the sciencebase 사이트를 한 측면 올해 초 버전 2.2의 릴리스하기 전에는 고아가 총알을 간단히 말해서 나는 당신을 근절하지 못했습니다의 상단에 표시되는 포인트는 사이드바에있는가 관련이없는 항목을합니다. I messed around with the li and ul tags in the widgets themselves, played with the css in the widgets.php (adding the list-style-type: none; tag to all and sundry to try and delete the little dot). 나는 li, ul 태그를 노닥거리고 위젯을 자신의 연주와 전투 근무 지원 widgets.php (추가의 목록 - 스타일 - 유형 : 없음; 태그를 떠벌리는을 시도하고 삭제하는 작은 점). Actually, I grew quite fond of the little critter in the end, but knew that most visitors would prefer not to see the bullet, it was far too distracting. 사실, 난 작은 동물의 성장에 매우 좋아 끝,하지만 알고있다 총알을 보지 못하도록 대부분의 방문자를 선호, 그건 너무 산만합니다.

Finally, after searching the web and reading the manual a dozen times or more I went back to the Automattic site, where it finally dawned on me that a hack they mentioned in regard to formating non-standard sidebars ready to be widgetized might actually work for me too. 마지막으로, 웹 및 읽기를 검색한 후 12 회 이상의이 매뉴얼에 갔었어요 자동차 사이트를 해킹하는 날 dawned 어디 마침내 그들이 이와 관련해 언급한 조판 - 표준 측면 해설 준비가 된 것 아닌가 실제 일하는 widgetized me too.

To make widgets work in versions of Wordpress pre-2.2 you have to have a file called functions.php in your theme’s folder. wordpress 이전 버전의 작업을 위젯 - 2.2이 필요 해요 당신의 주제의 폴더에라는 파일을 functions.php합니다. This file holds nothing but a conditional tag to render the widgetized sidebar as appropriate, but you can add an extra argument or two to make the widget plugin ignore some of the formating in its inbuilt CSS: 이 파일을 보유 widgetized 아무것도하지만 조건부 태그를 렌더링하는 사이드바에 적절하게,하지만 엑스트라를 추가할 수있습니다 위젯을 인수 또는 두 개의 플러그를 무시 조판의 붙박이의 일부 전투 근무 지원 :

<?php <함수
if ( function_exists(’register_sidebar’) ) 만약 (function_exists ( 'register_sidebar'))
register_sidebar(array( register_sidebar (배열 (
‘before_widget’ => ”, // Removes the list tag 'before_widget "=>", / / 제거하는 목록 태그
‘after_widget’ => ”, // Removes removes the end list entry tag 'after_widget "=>", / / 제거 목록 항목을 제거합니다 태그를 종료
‘before_title’ => ”, // Removes the head tag 'before_title "=>", / / 머리를 태그를 제거합니다
‘after_title’ => ”, // Removes the end head tag 'after_title "=>", / / 끝 머리를 태그를 제거합니다
));
?>

Once I’d added this code, fixing the angle brackets to be the actual html enclosures, and reloaded the Sciencebase site up it popped, sans bullet. 한 번 난이 코드를 추가, 고정 브래킷이의 실제 html 인클로저의 각도, 그리고 그것을 다시로드 사이트를 sciencebase the 가해져, sans 총알을합니다. I will miss the little critter though. 비록 작은 동물보고 싶을거야.

2 responses so far ↓ 지금까지 2 개의 응답 ↓

Leave a Comment 코멘트를 남겨주세요

Comments are checked for spam before appearing, no need to post it twice. 코멘트가 게재되기 전에 스팸 메일을 확인,이 두 차례에 게시 필요가없습니다.

Related Posts 관련 기사