Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How can I write $dmeta to have the category meta description  (Read 2016 times)

Sven

  • ULTIMATE member
  • ******
  • Karma: 88
  • Posts: 2029
  • Chasing MY bugs!
    • hiseo.fr - rédacteur Web

Hello pals,
Google isn't pleased with this tiny piece of code coming from this thread:
Quote
[    if (!empty($categoryName)) {  //<-- new addition, like NaEnr mod...
      $title = $categoryName;
      $dmeta='All articles under '.$title.' category';
      $kmeta=$title;     
   }
It seems Google would prefer to have the meta description I have in the DB for each category.
What should I put there to display its content:
Quote
$dmeta=...
???

Trying, $dmeta = $r['description_meta'];
returns Website description  ::)
« Last Edit: June 27, 2008, 05:40:14 pm by Sven »
Logged

funlw65

  • Hero Member
  • *****
  • Karma: 96
  • Posts: 771
    • Country Lab
Re: How can I write $dmeta to have the category meta description
« Reply #1 on: July 02, 2008, 12:19:14 pm »

Mr. Sven,
An idea:
If you stay on a defined number of categories, then make an array with descriptions and display them accordingly (depending on category name). Look at db array for example and how you retrieve values from that.

-----------------------------------
Solved with query but I like also the above idea...
« Last Edit: July 27, 2008, 08:56:15 pm by funlw65 »
Logged