Unlimited $1.99 domain names - We use goDaddy 무제한 $ 1.99 도메인 이름 - 우리가 사용 godaddy
Powered by MaxBlogPress 의해 제공됩니다 maxblogpress

매우 쉽습 wordpress 테마 마차 : 범주 이미지를보기 | jtpratt의 블로그 실수를
블로깅의 실수 jtpratt


Home » Very Easy Wordpress Theme Hack: Show Category Images »매우 쉽습 wordpress 테마 마차 : 범주 이미지를 표시



Posted in: 게시 :

블로그 - 설치 프로그램을 범주 이미지블로그 - 실수를 범주 이미지분류 이미지를 wordpress
4,858 views 4858 조회


Please note: This page was originally written in English. 참고 사항 :이 페이지는 원래 영어로 작성된합니다.

The original post can be viewed 게시물의 원래으로 볼 수있습니다 here 여기에 . 합니다.

Please note: This page was originally written in English.

The text has been translated using an online service such as Google or Babelfish.

The original post can be viewed here.


I’m going to show you how to add some simple PHP code to your Wordpress template and make linked images appear instead of text for your categories in posts. 나는 간다를 추가하는 방법을 보여 드리고 wordpress 간단한 코드를 템플릿과 연결된 이미지를 만들어 귀하의 범주를 게시물에 대한 텍스트 대신에 나타납니다. All you need to know is simple PHP, some basic HTML, and how to make your own graphics. 당신들이 알아야 할 모든는 간단하다 php, 일부 기본, 그리고 자신의 그래픽을 만드는 방법.

**UPDATE** May 2008 ** 업데이 트를 ** 2008년 5월
As the last comment at the end of this page shows there is now a 마지막으로이 페이지의 끝에 코멘트를 보여줍니다가 이제는 Category Icons Wordpress Plugin 범주 아이콘 플러그 접속식 you can download to install to manage your category icons right in your dashboard. 다운로드하실 수있습니다 범주 아이콘을 관리하는 권리를 설치하는 대시보드에있습니다. If you prefer to hack your theme, the code below will work just fine! 해킹하고자 할 경우 귀하의 테마를 아래의 코드가 잘 작동! The cool thing about the plugin is that they give you ways to do one or multiple category icons, but also a methods for putting icons with your categories in the side bar as well! 차가운 생각이 플러그인은이 방법을 그들이 너에게 다음 중 하나 또는 여러 개의 범주 아이콘지만 퍼팅 방법을 또한 귀하의 범주를 옆 표시줄에 아이콘을 좋아! I’m always very grateful when a good plugin come along! 나는 항상 좋은 때 매우 감사 플러그 접속 시작합시다! Now back to the original post… 현재 게시물을 다시 원래…

Have you ever wanted to hack Wordpress and just make it do something you always wanted it to do? 해킹 적이 있습니까? wordpress, 단지 그것을 항상 갖고 그것을 할 필요합니까? I think of things I want it to do all the time but don’t always have the hours to devote to finding the answer. 난 그것이 당신이 할 일들에 대한 내 생각이 모든 시간이 얼마 안에 항상 그 대답을 찾는 데 시간을 할애합니다. I’ve searched for PHP code snippets for Wordpress and tutorials and how-to articles as well and haven’t seen much that really helped me. 나는 wordpress 및 자습서를 검색한 코드 발췌 -이 기사를하는 방법도하고, 정말 도움 많이 보지 못했합니다. Until today - when I read 오늘까지 - 언제 읽었 the tutorial page at WPDesigner today 오늘이 튜토리얼 페이지를 방문 wpdesigner . 합니다. I didn’t get exactly the code I needed, but pretty close. 나는 필요로의 코드를 정확하게 파악하지 못했다,하지만 매우 닫습니다. I just needed to hack it a bit to get it to do what I wanted. 단지 약간를 해킹할 필요가 그것을 무슨 싶었합니다.

First, this Wordpress tutorial hack assumes a few things. 첫째로,이 wordpress 자습서 해킹라고 생각하는 몇 안되는 것들도있습니다.

  1. You’ve modified your Wordpress template code before 템플릿 코드를 업데이 트하기 전에 귀하의 wordpress
  2. You can modify simple PHP 을 수정할 수있습니다 간단한 php
  3. You can write simple HTML 작성할 수있습니다 간단한
  4. You can make your own graphics 자신의 그래픽 만들 수있습니다

First things first - here’s the code: 먼저 할 일은 먼저 - 여기는 코드 :

 <h3><b>Posted in:</b></h3> <?php foreach((get_the_category()) as $cat)  {  $catname =$cat->category_nicename;  echo "<a href\"/category/";  echo $catname;  echo "/\">";  echo "<img src\"/wp-content/cat-icons/";  echo $catname;  echo ".png\" alt=\"$catname category image\" border=\"0\" /></a>\n";  } ?><br /> <h3> <b>에 게시된 : </ b> </ 토론 내용보기> <함수 foreach ((get_the_category ())로 $ 고양이) ($ catname = $ 고양이 -> category_nicename; 에코 "<a href \"/ 분류 / "; 에코 $ catname; 에코"/ \ ">"; 에코 "<공간 src \"/ wp-content/cat-icons / "; 에코 $ catname; 에코"합니다. png \ "높음 = \"$ catname 분류 이미지를 \ "국경 = \"0 \ "/> </> \ n";)?> </> 

I hacked this code from this tutorial page on WPdesigner 나는이 튜토리얼 페이지를 wpdesigner에서이 코드를 해킹 . 합니다. The code they had was only good to display one category per post. 이 코드는 유일하게 좋은 그들은 게시물마다 하나의 범주를 표시합니다. I hacked it because my blogs all have posts assigned to multiple categories. 해킹 때문에 나는 내 블로그의 모든 게시물은 여러 개의 카테고리에 할당합니다. Also, I wanted the images to all be linked so people can just click them and go right to that category page. 또한, 나는 그 이미지를 원하는 사람들은 모두가 연결된 그래서 그들을 클릭하면 해당 카테고리 페이지로 이동 권리를합니다. Let’s look at the pieces of this code you might need to modify. 이 코드는, 그 조각을 살펴 봅시다을 수정해야 할 수도있습니다.

In line 1, you might want change “Posted in:” to alternate text like “Filed under:”, etc. 서열 1,셔야 변경 "에 게시된 :"로 대체 텍스트를 같이 "밑에 :", 등등

In line 5, if your permalink structure is different than the default, you may need to change /category/ to what you are using. 서열 5 일 영구 링크 구조가 다를 경우 기본값을 변경해야 할 수도있습니다 / 범주 / 어떤을 사용합니다.

In line 8 change /wp-content/cat-icons/ to wherever you will be storing your category icons in your site. 8 호선을 변경 / wp-content/cat-icons / 당신의 범주를 어디에서 아이콘이 귀하의 사이트에 보관합니다.

In line 10, if you are using gif’s or jpg’s change .png to your graphic file format. 서열 10, gif를 사용하는 경우 또는 jpg의 변경합니다. png의 그래픽 파일 형식을합니다.

Now all you have to do is create one image for every category you have an place them in the folder you just created on the server. 지금은이 모든 것들이 하나의 이미지가해야 할 일은 각 카테고리를 만들 곳에 그들을이 서버에서 방금 만든 폴더를합니다. Make sure that the graphics are named exactly as your categories, and if your categories have multiple words just add a hyphen in between each word. 그래픽의 이름이 정확하게되었는지 확인합니다 귀하의 범주, 그리고 만약 당신의 범주가 여러 개있는 단어 각 단어 사이에 하이픈 추가합니다. That’s it! 바로 그거야! All you have to decide now is where you want these category icons to appear, before or after your post - and add them into the appropriate place. 모두가 할 수있는 것은 이제는 이러한 분류 아이콘을 원하는 위치를 표시 귀하의 게시물을하기 전 또는 후에 - 그리고 적절한 위치에 배치를 추가할 수있습니다. I placed mine just after the title of the post on my single post pages - as you can see at the top of the post on this page. 나는 나의 바로 뒤에 배치 게시물을 내 단일 게시물의 제목을 페이지 - 보시다시피이 페이지의 상단에 게시합니다. You can hack this category icon code a hundred other ways to do what you want. 이 범주 아이콘을하실 수있습니다 코드를 해킹하고 싶은대로 다른 방법을 백합니다. I think in the future I’m going to use it to replace the text category links in my sidebar. 나중에 내 생각을 이용하려고 나는 그것을 내 사이드바에있는 링크를 텍스트로 바꾸십시오 분류합니다. The only caveat to this (and the code hack above) would be the fact that if you don’t have an image a text link will display (in FF, or broken image in IE). 유일하게 경고를 (그리고 코드를 해킹 위)는 사실을이 이미지를하지 않은 경우에 텍스트 링크가 표시됩니다 (ff, 또는 깨진 이미지를 예 :). So - if you create new categories in the future, make sure you create a new image for each. 그래서 - 새로운 카테고리를 작성하면 나중에 새로운 이미지를 만들 각각 있는지 확인합니다.

My Blogging Mistake for this post is that I didn’t decide to customize and hack my Wordpress Theme before now to create my own layout. 이 게시물에 대한 실수를 내 블로그가 안 내 wordpress 테마하기로 결정하기 전에 사용자 정의 및 해킹을하려면 지금 나의 자신의 레이아웃을 작성합니다. Do you have a question or a new way to hack up this wordpress category icon PHP code? 당신도 해킹을하는 새로운 방법을 질문 또는 카테고리 아이콘이 wordpress 코드? Comments and post it now! 코멘트와 포스트 지금 당장!


18 Responses to “Very Easy Wordpress Theme Hack: Show Category Images” 18 응답을 "매우 쉽게 wordpress 테마 마차 : 카테고리 표시 이미지"

  1. The Smorgasbord the 뷔페 Has the following to say... 는 다음과 같은 말할 것도없이 ...

    This was very easy to do - thanks for the code and the tip! 이것은 매우 쉬운 일은 아닙니다 - 주셔서 감사합니다 코드와 팁!

    The Smorgasbord’s last blog post.. the 뷔페의 마지막 블로그 게시물 .. Convert Vinyl Records to MP3 비닐 레코드를 mp3로 변환

  2. 50 tips y trucos para optimizar Blogger y WP | Blog en Serio 50 팁 및 trucos 파라 optimizar 블로그 및 백린 | 블로그 엉 우호적 Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] Imágenes para las categorías [...] [...] 이미지 파라 라스 종류 [...]

  3. Blogbuster: блоги, blogs, blogging, RSS, Wordpress, социальное blogbuster : блоги, 블로그, 블로깅, rss, wordpress, социальное Has the following to say... 는 다음과 같은 말할 것도없이 ...

    25 неотстойных хаков для WordPress 25 неотстойных хаков для wordpress

    Динамическое слайдшоу в шапке — позволяет крутить картинки в шапке вашего блока, придает динамику; демоверсия. динамическое слайдшоу в шапке - позволяет крутить картинки в шапке вашего блока, придает динамику; демоверсия합니다.
    Пузырь комментариев — гр… пузырь комментариев - гр…

  4. 25 hacks para dinamizar seu Wordpress! 25 hacks 파라 wordpress dinamizar 여러분! — Bytes a Go-go! - 바이트로 가라 -가! Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] Imagens para categorias. [...] 이미지 카테고리 이동합니다. Adiciona imagens para cada categoria do seu blog e são mostradas no post se você preferir. 각각의 범주 adiciona 이미지 이메일 서울시 종로구 mostradas하지 서으 블로그 게시물 남동, 호텔 preferir없습니다. [...]

  5. Blog Verde » 25 Hacks pra dinamizar o Wordpress 블로그 초록색»25 hacks 프라 dinamizar 오 wordpress Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] Imagens para categorias. [...] 이미지 카테고리 이동합니다. Adiciona imagens para cada categoria do seu blog e são mostradas no post se você preferir. 각각의 범주 adiciona 이미지 이메일 서울시 종로구 mostradas하지 서으 블로그 게시물 남동, 호텔 preferir없습니다. [...]

  6. 63 Essential Wordpress Hacks, Tutorials, Help Files and Cheats | Speckyboy - Wordpress and Design 63 필수적인 wordpress hacks, 자습서, 도움말 파일 및 사기꾼 | speckyboy - wordpress 및 디자인 Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] Show Category Images (Source: [...] [...] 분류보기 이미지 (출처 : [...]

  7. 63 essenziali Wordpress Hacks, Tutorials, Help Files e Cheats : technorati.it 63 essenziali wordpress hacks, 자습서, 도움말 파일을 이메일 사기꾼 : technorati.it Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] Show Category Images (Source: [...] [...] 분류보기 이미지 (출처 : [...]

  8. Wordpress Tutorials/Hacks « The house of software freeware wordpress 자습서 / hacks«의 집 소프트웨어를 프리웨어 Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] Show Category Images (Source: [...] [...] 분류보기 이미지 (출처 : [...]

  9. Mastering Your WordPress Theme Hacks and Techniques 귀하의 wordpress 테마 hacks과 기술 습득 Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] 10)Show Category Images- How to add some simple PHP code to your WordPress template and make linked images appear instead of text for your categories in posts. [...] 10) 카테고리보기 이미지 - 간단한 코드를 추가하는 방법을 wordpress 템플릿과 연결된 이미지를 만들어 귀하의 범주를 게시물에 대한 텍스트 대신에 나타납니다. [...]

  10. letrodectus letrodectus Has the following to say... 는 다음과 같은 말할 것도없이 ...

    Great hack! 큰 해킹! thanks 감사합니다 =

  11. 63 Essential Wordpress Hacks, Tutorials, Help Files and Cheats | Speckyboy - Wordpress and Design » 쟈스민(JASMIN) 63 필수적인 wordpress hacks, 자습서, 도움말 파일 및 사기꾼 | speckyboy - wordpress 및 디자인»쟈스민 (재스민) Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] Show Category Images (Source: [...] [...] 분류보기 이미지 (출처 : [...]

  12. paidnetpedia.com paidnetpedia.com Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] sticky”- When we need to have certain articles ’stay at the top’ longer than others. [...] 스티커 "- 우리가 특정 기사를해야합니다 '숙박 상단에'다른 사람보다 오래합니다. 10)Show Category Images- How to add some simple PHP code to your WordPress template and make linked images appear instead [...] 10) 범주 이미지를 표시 - 간단한 코드를 추가하는 방법을 wordpress 템플릿을 만들어 [...] 링크된 이미지 대신에 나타납니다

  13. Submarine 잠수함 Has the following to say... 는 다음과 같은 말할 것도없이 ...

    Hi 안녕

    here is a plugin that do the job : 여기에 플러그 접속하는 일을 :

    Category Icons Plugin 범주 아이콘 플러그 접속식 . 합니다.

  14. Remkus remkus Has the following to say... 는 다음과 같은 말할 것도없이 ...

    That is a very nice Hack! 그것은 아주 좋은 해킹! I realize there is a plugin now, but I think I am going to just edit this in one of my projects. 지금이 플러그 접속을 알지만,하지만 제 생각에 갈 나는 단지 내 프로젝트 중 하나에서 편집합니다. Thanks for writing it down! 서면 내려 주셔서 감사합니다!

  15. What is Category Icons ? 범주 아이콘 무엇입니까? « Category Icons «범주 아이콘 Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] : JTPRATT’s Blogging Mistakes ( here & here ), Performancing Helping Bloggers [...] [...] : jtpratt의 블로그의 실수는 (여기서 & 여기에), Performancing - 도움이 블로거 [...]

  16. 155 Wordpress Resources, Tutorials, Plugins, Themes, AJAX, Podcasting…WP Monster List | Speckyboy - Wordpress and Design 155 wordpress 자원, 자습서, 플러그인, 테마, ajax, 포드 캐스팅… 백린 몬스터 목록 | speckyboy - wordpress 및 디자인 Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] 84. [...] 84. No More CSS Hacks. 더 이상 전투 근무 지원 hacks합니다. 85. Create a Dynamic Sticky. 동적 스티커를 만듭니다. 86. Styling Individual Posts Using the_ID. the_id를 사용하여 개별 게시물 스타일링합니다. 87. Show Category Images. 분류 이미지를 표시합니다. 88. Separate WordPress Comments and Trackbacks. 별도의 wordpress 코멘트와 트랙백합니다. 89. Customize your WordPress Login. 사용자 정의 wordpress 로그인합니다. 90. Date Image [...] 날짜 이미지를 [...]

  17. 155个 WordPress 资源、指导、插件、主题、AJAX、播客…… —— WP 详细清单(译) | 晴天里的一道�… 155个wordpress资源,指导,插件,主题, ajax,播客…… - 백린详细清单(译) |晴天里的一道… Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] 84. [...] 84. No More CSS Hacks 85. 더 이상 hacks 85 전투 근무 지원합니다. Create a Dynamic Sticky 86. 86 동적 스티커를 만듭니다. Styling Individual Posts Using the_ID 87. the_id를 사용하여 개별 게시물 스타일링 87. Show Category Images 88. 분류 이미지를 표시 88. Separate WordPress Comments and Trackbacks 89. 별도의 wordpress 코멘트와 트랙백 89. Customize your WordPress Login 90. 사용자 정의 wordpress 로그인 90. Date Image [...] 날짜 이미지를 [...]

  18. 155个 WordPress 资源、指导、插件、主题、AJAX、播客…… —— WP 详细清单 | Awesomer 155个wordpress资源,指导,插件,主题, ajax,播客…… - 백린详细清单| awesomer Has the following to say... 는 다음과 같은 말할 것도없이 ...

    [...] Hacks84. [...] hacks84합니다. No More CSS Hacks85. 더 이상 전투 근무 지원 hacks85합니다. Create a Dynamic Sticky86. 동적 sticky86을 만듭니다. Styling Individual Posts Using the_ID87. the_id87를 사용하여 개별 게시물 스타일링합니다. Show Category Images88. 분류 images88 표시합니다. Separate WordPress Comments and Trackbacks89. 별도의 wordpress 의견과 trackbacks89합니다. Customize your WordPress Login90. wordpress login90을 맞춤 구성하십시오. Date Image [...] 날짜 이미지를 [...]

Question or Comment?? 질문이나 코멘트를?가? Spill it Now... 누출 지금은 ...

기쁨을 통해 의견을 점프!

We Reward Comments! 우리가 보상 코멘트!


We dofollow links, and get your latest blog post as a byline under every new comment from the "CommentLuv" plugin! 우리가 dofollow 링크, 그리고 당신의 최신 블로그 게시물 작성자 표시줄 아래로 매일 새로운 코멘트에서 "commentluv"플러그 접속식! Top commenters for every month are listed on every page of this site in a sidebar widget linked back to your URL! 매월 commenters에 대한 상위는 본 사이트의 모든 페이지에 나와 위젯을 사이드바에 연결된 위로하십시오! We would like to reward you for becoming part of our community! 우리가이되기위한 자격의 일부를 보상하려는 우리의 공동체를! Your comment is valuable not only to us, but also all the other readers of this blog! 귀하의 의견은 귀중한 우리에게뿐만 아니라, 또한이 블로그의 다른 모든 독자!


Click to add smilies to your post! 귀하의 게시물을 클릭하여 장바구니에 웃음! == []^ = (= ((= (|=) 연구= | 8= 0= 0) ~= 00= (=;;= 0)]=;;;