1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

generating meta desc from chosen DIV?

Discussion in 'Blogging' started by aidenhera, May 16, 2017.

  1. aidenhera

    aidenhera Elite Member

    Joined:
    Nov 30, 2016
    Messages:
    1,865
    Likes Received:
    403
    Gender:
    Male
    i have a specific div and i want my website meta desc to be generated from that div (or to literally copy whats there)

    But i cant put that meta desc directly there cause if someone from G reads it he will get suspcious and ban my website

    I want to put some code there so when he checks source he will see only code and not the risky text

    any clues? Ty!
     
  2. S4xbox360

    S4xbox360 Junior Member

    Joined:
    Aug 22, 2016
    Messages:
    103
    Likes Received:
    18
    Gender:
    Male
    Google bot will also get suspeciuos if you use codes instead of risky text.
     
  3. aidenhera

    aidenhera Elite Member

    Joined:
    Nov 30, 2016
    Messages:
    1,865
    Likes Received:
    403
    Gender:
    Male
  4. littlewebdragon

    littlewebdragon Jr. VIP Jr. VIP

    Joined:
    Dec 30, 2007
    Messages:
    1,708
    Likes Received:
    1,041
    Occupation:
    Occupation
    Location:
    Location
    So you want actually to cloak that page / part of a page?
     
    • Thanks Thanks x 1
  5. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,492
    Likes Received:
    11,190
    Occupation:
    CHEAP
    Location:
    DATASETS
    Home Page:
    What he's described here definitely requires cloaking.
     
  6. littlewebdragon

    littlewebdragon Jr. VIP Jr. VIP

    Joined:
    Dec 30, 2007
    Messages:
    1,708
    Likes Received:
    1,041
    Occupation:
    Occupation
    Location:
    Location
    For a moment I thought some code obfuscation will do, but nope, looks more like cloaking. :)
     
    • Thanks Thanks x 1
  7. aidenhera

    aidenhera Elite Member

    Joined:
    Nov 30, 2016
    Messages:
    1,865
    Likes Received:
    403
    Gender:
    Male
    for example tumblr has some additional spintax in their html code, i just write
    <meta name="description" content="{Title}">
    </head>

    and tahts gonna set page title as meta description.

    in my case id love it to be something like
    <meta name="description" content="auto-generated from #content">

    its much better than:
    <meta name="description" content="come here grab this porn sex on drugs tape free">


    but not sure how yh
     
  8. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    12,492
    Likes Received:
    11,190
    Occupation:
    CHEAP
    Location:
    DATASETS
    Home Page:
    Something like this should do:

    Code:
    $("meta[name='description']").attr("content", $("#content").html());
    But Google will see this. Unless you cloak out that JS.
     
    • Thanks Thanks x 1
  9. S4xbox360

    S4xbox360 Junior Member

    Joined:
    Aug 22, 2016
    Messages:
    103
    Likes Received:
    18
    Gender:
    Male
    Won't that effect the quality of the meta description?