go41

Re: making category appear as page :: Reply by Joern

von Joern am 23. Feb. 2011 | Keine Kommentare

I am looking at your site sometimes, seeing all that stuff above the header or errors, I thought ‚what is she doing?‘
About your links in the category bar, I think I suggested already to code them into index.php directly. Do not redirect behind the scenes.
My suggestion is to replace the php code in the category bar (iv id="middle") with the links you actually want.
In index.php find:

Code:

<div id="middle" class="clearfloat">
   <img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/category.png" class="clearfloat" alt="" />
   <?php $display_categories = array(5,6,7,8,11); $i = 1;
   foreach ($display_categories as $category) { ?>

   <div id="cat-<?php echo $i; ?>" class="category">
      <?php query_posts("showposts=1&cat=$category")?>
      <span class="cat_title"><a href="<?php echo get_category_link($category);?>"><?php single_cat_title(); ?></a></span>
      <a href="<?php echo get_category_link($category);?>"><?php echo category_description($category); ?></a>
   </div>

   <?php $i++; ?>
       <?php } ?>

   </div>

I know this looks different in your file already, you made comments, do not load the category image and you have only 3 categories in the array.

Important is that you find the correct start and end point of what you replace.

Here from div id="middle" down to the next ‚/div‘ after the ‚?php } ?‘
Put in as replacement just this, I added your links already:

Code:

<div id="middle" class="clearfloat">

   <span class="textimg clearfloat">Empowerment Blogs</span>

   <div id="cat-1" class="category">
      <span class="cat_title"><a href="http://www.choosetoevolve.com/successtools/">Success Tools</a></span>
      <a href="http://www.choosetoevolve.com/successtools/"><p>inspiring media, empowerment, inspiration, videos</p></a>
   </div>

   <div id="cat-2" class="category">
      <span class="cat_title"><a href="http://empoweringwomenslives.com/wealthandprosperity/">Wealth and Prosperity</a></span>
      <a href="http://empoweringwomenslives.com/wealthandprosperity/"><p>wealth and prosperity, personal growth and empowerment</p></a>
   </div>

   <div id="cat-3" class="category">
      <span class="cat_title"><a href="http://empoweringwomenslives.com/selfreflection/">Self Reflection</a></span>
      <a href="http://empoweringwomenslives.com/selfreflection/"><p>self reflection, power of affirmations, change your thoughts</p></a>
   </div>

</div>

Backup the file first, if it doesn’t work as you desire – restore old version.
Now if you want to change the category discription it will be not reflected here as all this stuff is fixed in html…
____________________
you find me on Google+, Twitter and Facebook

(von: Joern)

Hier noch 10 weitere Ergebnisse dieses Threads:

making category appear as page

23. Feb. 2011 (von: kinyofu)

Hi Joern,I hope you are available to answer this question. I have been searching for a way (within Arthemia free) to have my categories, when clicked, go to a page with a different theme. I experimented with Single Post Template…

Re: making category appear as page :: Reply by kinyofu

24. Feb. 2011 (von: kinyofu)

Thanks Joern for checking in. My experiments of late has resulted in a few (above the header) errors that I was able to work through.I copied your code in index.php, but it is returning errors that are not related to…

Re: making category appear as page :: Reply by kinyofu

24. Feb. 2011 (von: kinyofu)

By the way, I am switching my index.php back to original so that my site won't show error.(the code button did not do what I thought it would. LOL.)Kinyofu Weiterlesen →

Re: making category appear as page :: Reply by Joern

24. Feb. 2011 (von: Joern)

as the error says, syntax error, unexpected '}' in .., there is one '}' where the first part is missing of.Does the top of your index.php still look like this:Code:<?php get_header(); ?>   <?php if(!is_paged()) { ?>   <div id="top" class="clearfloat">Here is…

Re: making category appear as page :: Reply by kinyofu

24. Feb. 2011 (von: kinyofu)

Hi Joern,I'm not sure if I understand. I still have <?php if(!is_paged()) { ?> in my file as well as <?php { ?> further down. Is that wrong?Kinyofu Weiterlesen →

Re: making category appear as page :: Reply by kinyofu

24. Feb. 2011 (von: kinyofu)

I now, just switched indexes so my site can be up. Let me know if you need to see the index file.Kinyofu Weiterlesen →

Re: making category appear as page :: Reply by Joern

24. Feb. 2011 (von: Joern)

You say: "I still have <?php if(!is_paged()) { ?> in my file as well as <?php { ?> further down. Is that wrong?"If it like this " <?php { ?> " it would be wrong. This kind of bracket will…

Re: making category appear as page :: Reply by kinyofu

25. Feb. 2011 (von: kinyofu)

Thank you sooooo much Joern, your brilliance never ceases to amaze me.There is one thing that I can't figure out - and it is my doing, or rather undoing. I used to have one post in the headline section, now…

Re: making category appear as page :: Reply by Joern

25. Feb. 2011 (von: Joern)

I guess you query for 2 posts in that category, likequery_posts("showposts=2&cat=20");this shows you the last two posts from that category "featuredtopic (Featured Topic)"To see only one you need to set to showposts=1Now it should show you only one, the latest…

Re: making category appear as page :: Reply by kinyofu

25. Feb. 2011 (von: kinyofu)

Thanks. Weiterlesen →

Autor:

Du findest mich auch auf Twitter und Facebook!

Schreibe einen Kommentar

Pflichtfelder sind mit * markiert.


Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.

weitere forum Beiträge: