+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: Display sub-category Name in the Meta Description Tag.

  1. #1
    Senior Member
    Join Date
    Aug 2010
    Posts
    171

    Display sub-category Name in the Meta Description Tag.

    meta description tag: <meta name="description" content="" />

    I want to add a single “meta description” to my Parent category and it should be displayed under all sub-categories as well, rather than add one by one for every sub-category (which is time consuming).

    In addition, I want to include sub-category’s Names in the “meta description”, so it will look like the following:
    View in Admin Panel (parent category): Local directories of [breed_name] cats for sale…
    View in Web Browser (child category): Local directories of Russian Blue cats for sale…

    Flynax is already having this option in the previous versions of classifieds (v3); however, it does not work anymore in version 4.

    Please give some advice, how can I implement the same function in Flynax v4.
    Thanks.
    Last edited by PGGO; April 29, 2012 at 02:25 AM.

  2. #2
    Hello Petnax,

    Quote Originally Posted by Petnax View Post
    meta description tag: <meta name="description" content="" />
    I want to add a single “meta description” to my Parent category and it should be displayed under all sub-categories as well, rather than add one by one for every sub-category (which is time consuming).
    In addition, I want to include sub-category’s Names in the “meta description”, so it will look like the following:
    Please go to ftp: includes/classes/rlCategories.class.php find getCategory function

    after this code:
    Code:
    Only registered members can view the code.
    add:
    Code:
    Only registered members can view the code.
    View in Admin Panel (parent category): Local directories of [breed_name] cats for sale…
    View in Web Browser (child category): Local directories of Russian Blue cats for sale…
    Flynax is already having this option in the previous versions of classifieds (v3); however, it does not work anymore in version 4.
    Please give some advice, how can I implement the same function in Flynax v4.
    Thanks.
    I have checked it and I see New York >> Cats >> Russian Blue in front end. Would you please explain me what do you want instead of this?
    Viktor,
    Flynax technical department,
    Best wishes.

  3. #3
    Senior Member
    Join Date
    Aug 2010
    Posts
    171
    Hi Viktor,

    Thanks for the code; it works!

    However, all my sub-categories got the same meta-description now. It can hurt from SEO perspective.

    Q: is it possible to include sub-category names in the meta-description of all sub-categories by using the same meta-d from Parent category?

    Example:
    Template of parent category meta-d: Local directory of {CATEGORY_NAME} cats and kittens for sale.

    Parent category meta-d: Local directory of cats and kittens for sale.
    1. Child category meta-d: Local directory of Sphynx cats and kittens for sale.
    2. Child category meta-d: Local directory of Russian Blue cats and kittens for sale.
    3. Child category meta-d: Local directory of Siamese cats and kittens for sale.
    4. Etc.

    The example above shows that we are using template meta-d which is located in Parent category; however, it has Names of sub-categories as well which are displayed under all sub-categories.

  4. #4
    Hello Petnax,

    Please go to ftp: includes/classes/rlCategories.class.php find getCategory function
    after this code:
    Code:
    Only registered members can view the code.
    add:

    Code:
    Only registered members can view the code.
    And also in parent meta code add {CATEGORY_NAME} like you indicated in your example.
    Viktor,
    Flynax technical department,
    Best wishes.

  5. #5
    Senior Member
    Join Date
    Aug 2010
    Posts
    171
    It works!
    Thank you.

  6. #6
    Senior Member
    Join Date
    Aug 2010
    Posts
    171
    Viktor:

    I’m trying to apply the same function to the TITLE tag; however, it does not work at all.

    I used the following code:
    $category['title'] = str_replace('{CATEGORY_NAME}', $parent_category ? $category['name'] : '', $category['title']);

    Would you please give some recommendations?

  7. #7
    Hello Petnax,

    It's not working because in title not exist '{CATEGORY_NAME}'. Would you please explain me what structure should be for sub categories title?
    Viktor,
    Flynax technical department,
    Best wishes.

  8. #8
    Senior Member
    Join Date
    Aug 2010
    Posts
    171
    I want to apply the same function as we did with meta-description for sub-categories.

    Example:
    Template of parent category TITLE: {CATEGORY_NAME} Cats & Kittens for Sale

    Parent category TITLE: Cats & Kittens for Sale
    1. Child category TITLE: Sphynx Cats & Kittens for Sale
    2. Child category TITLE: Russian Blue Cats & Kittens for Sale
    3. Child category TITLE: Siamese Cats & Kittens for Sale
    4. Etc.

  9. #9
    Hello Petnax,

    Please replace your getCategory function to:

    Code:
    Only registered members can view the code.
    Viktor,
    Flynax technical department,
    Best wishes.

  10. #10
    Senior Member
    Join Date
    Aug 2010
    Posts
    171
    Viktor:

    I have replaced the code (getCategory function), but it still does not work for TITLE.
    It works for meta-description and keywords, but not for a title tag.

    Would you please check if there is an error in code that you provide?

+ Reply to Thread