rwarner

Topic: Meta Tags for Job pages

I have added page descriptions and titles for the job pages but they are not changing on the live website I changed this in the admin section of the website. Is there anything I need to change on the pages for it to update?

Thanks for your help

evertsemeijn

Re: Meta Tags for Job pages

Not sure but think they are hardcoded. Meta stuff in backend is only category view

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes

Chronos

Re: Meta Tags for Job pages

For what pages are you trying to get the keywords? If you're trying to add keywords for the 'job details' pages, you'll have to add them manually. Add the code below to the 'page_job.php' file to add metatags, but do note that they will be the same for every job (I should write something for this, its a serious lack in SEO).

Code:
    $smarty->assign('seo_desc', "The generic description for job details pages");
    $smarty->assign('seo_keys', "The generic keywords for job details pages");
Member of Jobberbase Development Team - Implementation and Coding

Visit my Blog: ChronoScripts (JobberBase scripts, support and freelance)
JobBoards: Telefonisch Werk and Top Bijbaan

vrlorad

Re: Meta Tags for Job pages

Yes, Chronos, I also noticed this lack in SEO.
It would be great to have different metatags for every job details page!

Last edited by vrlorad (2009-03-09 09:20:14)

lxer

Re: Meta Tags for Job pages

ok, this is not exactly the optimal SEO stuff, but good enough if you're lazy (like me tongue )
and it is much much better than nothing

put this somewhere at line 105


//SEO stuff
        function limitWords($s, $n) {
                $a = explode(' ', $s);
                return implode(' ', array_slice($a, 0, $n));
                }
                $s =strip_tags( $info['description']);
         
          $smarty->assign('seo_desc', limitWords($s, 15));               
          $smarty->assign('seo_keys', stripslashes($info['title']));

Last edited by lxer (2009-03-22 15:44:00)

notmuffy

Re: Meta Tags for Job pages

Lxer,
What file do I add that bit of code into?

lxer

Re: Meta Tags for Job pages

notmuffy: page_job.php  (see chronos' post)

what it does is: 
use the first 15 words of the jobdescription as Description
use the words in the the pagetitle as Keywords.

of course, you can get a bit more creative with it, and add a few more things. for example:
  $smarty->assign('seo_desc', "jobs, freelance, java,".limitWords($s, 15));

Does anyone know how to get the JobLocation from the database? that would be a nice thing to add to the keywords

hobo

Re: Meta Tags for Job pages

Example location usage in description and keywords with the above mentioned mod integrated in description tag:

Replace the above mentioned:

Code:

//SEO stuff
        function limitWords($s, $n) {
                $a = explode(' ', $s);
                return implode(' ', array_slice($a, 0, $n));
                }
                $s =strip_tags( $info['description']);
         
          $smarty->assign('seo_desc', limitWords($s, 15));               
          $smarty->assign('seo_keys', stripslashes($info['title'])); 

with:

Code:

//SEO stuff
        function limitWords($s, $n) {
                $a = explode(' ', $s);
                return implode(' ', array_slice($a, 0, $n));
                }
                $s =strip_tags( $info['description']);
$smarty->assign('seo_desc', stripslashes($info['title']) . ' jobs ' . $translations['jobs']['preposition_at'] . ' ' . stripslashes($info['company']) . ' in ' . stripslashes($info['location']) . '. Search ' . stripslashes($info['location']) . ' jobs. ' . limitWords($s, 15));

$smarty->assign('seo_keys', stripslashes($info['title']) . ', ' . stripslashes($info['title']) . ' jobs, ' . stripslashes($info['company']) . ', ' . stripslashes($info['location']) . ', ' . stripslashes($info['location']) . ' jobs, ' . stripslashes($info['location']));

smile

Last edited by hobo (2009-09-27 08:05:40)

evertsemeijn

Re: Meta Tags for Job pages

Please try to prevent not using the language file. All hardcoded words should be moved to the language.ini file so you don't have to hack core files when translating to a different language.

Member of Jobberbase Development Team - Templates/Usability :: Looking for installation and/or custom design? :: Beautiful Wordpress themes

hobo

Re: Meta Tags for Job pages

OK, here it is (for 1.8 only), no hardcoded words. It is also using words from city section such as "jobs" that can not be found in older versions of translations.ini.

Code:

//SEO stuff
        function limitWords($s, $n) {
                $a = explode(' ', $s);
                return implode(' ', array_slice($a, 0, $n));
                }
                $s =strip_tags( $info['description']);
$smarty->assign('seo_desc', stripslashes($info['title']) . ' ' . $translations['jobscity']['jobs'] . ' ' . $translations['jobs']['preposition_at'] . ' ' . stripslashes($info['company']) . ' ' . $translations['jobscity']['sidebar_jobs_in'] . ' ' . stripslashes($info['location']) . '. ' . $translations['search']['default'] . ' ' . $translations['jobscity']['sidebar_jobs_in'] . ' ' . stripslashes($info['location']) . '. ' . limitWords($s, 15));

$smarty->assign('seo_keys', stripslashes($info['title']) . ', ' . stripslashes($info['title']) . ' ' . $translations['jobscity']['jobs'] . ', ' . stripslashes($info['company']) . ', ' . stripslashes($info['location']) . ', ' . stripslashes($info['location']) . ' ' . $translations['jobscity']['jobs'] . ', ' . stripslashes($info['location']));

People running previous version can use the code from previous post or if you want to use this code, you will have to add some words to the very end of your translations.ini file:

Code:

jobs = "jobs"

hobo

Re: Meta Tags for Job pages

How can I use the "function limitWords" from above example
to also add commas for each newline and remove all lines ending with ":" and also remove other characters such as slashes, brackets and periods.
Many thanks for any input on this.

mindanimal

Re: Meta Tags for Job pages

Hi Guys,

Will this work with older versions of the jobber? My version is from may/june 2008, I am afraid to update that`s why smile I updated another website of mine and it dropped like a stone from google..

So once again, this is working on older versions too, without problems? I didnt follow the whole discussion for the last months which makes me look like a baby staring at a lamp ( with big, confused eyes hehe smile.

So if I add what hobo says to my page_job.php, I will change the meta tags from being all the same to being different for each job?

That would be a giant seo leap forward!

Thank  you!

hobo

Re: Meta Tags for Job pages

@mindanimal
It could work if you replace:
$smarty->assign('seo_desc',

with

$meta_description =

Same for keywords

replace
$smarty->assign('seo_keys',

with
$meta_keywords =

also remember to remove the closing bracket ")" in both cases.

Keep in mind that the above code is just an example.
You may want to use less or more information for your keywords and description, or re-arrange the order of words, add or remove words...
It would be even more useful to be able to get filtered unique words from job postings since it would enable you to provide completely unique (read: not completely identical) tags to each page (unless you have double postings).

This code kind of provides this, but may start generating duplicate meta tags if you have many similar jobs in the same location that begin with same sentence or data structure.

RoopJeans

Re: Meta Tags for Job pages


Code:

jobs = "jobs"

what does this means here?
are you giving any correction to be inserted in above piece of code?

I simply collected the code  for 1.8 and placed it on line number 106 simply did i do right?
just one question. how much limit of  words can be extended here limitWords($s, 15));   ? 100 , 200 or what?

RoopJeans

Re: Meta Tags for Job pages

By the way doing as mentioned above works only one thing
this give key words and description of that relevant category as a job detail page's key words and description , nothing else
may be i am doing something wrong. or this was meant to do the same?

hobo

Re: Meta Tags for Job pages

Not quite sure what you mean, can you clarify a little bit?

RoopJeans

Re: Meta Tags for Job pages


Code:





//SEO stuff
        function limitWords($s, $n) {
                $a = explode(' ', $s);
                return implode(' ', array_slice($a, 0, $n));
                }
                $s =strip_tags( $info['description']);
$smarty->assign('seo_desc', stripslashes($info['title']) . ' ' . $translations['jobscity']['jobs'] . ' ' . $translations['jobs']['preposition_at'] . ' ' . stripslashes($info['company']) . ' ' . $translations['jobscity']['sidebar_jobs_in'] . ' ' . stripslashes($info['location']) . '. ' . $translations['search']['default'] . ' ' . $translations['jobscity']['sidebar_jobs_in'] . ' ' . stripslashes($info['location']) . '. ' . limitWords($s, 15));

$smarty->assign('seo_keys', stripslashes($info['title']) . ', ' . stripslashes($info['title']) . ' ' . $translations['jobscity']['jobs'] . ', ' . stripslashes($info['company']) . ', ' . stripslashes($info['location']) . ', ' . stripslashes($info['location']) . ' ' . $translations['jobscity']['jobs'] . ', ' . stripslashes($info['location']));

I simply collected the code  for 1.8 and placed it on line number 106 of page_job.php, did i do right?
but doing that didn't help much to have the SEO things work like Job post description as meta description or key words.
what this resulted is only meta description and key words of the related category showed in teh job description page.
if you check post of lxer  you will know that what it should do instead


what it does is:
use the first 15 words of the job description as Description
use the words in the the page title as Keywords.

just more one question. how much limit of  words can be extended here limitWords($s, 15));   ? 100 , 200 or what?

hobo

Re: Meta Tags for Job pages

Try placing the code right before the

Code:
?>

at the very end of the page_job.php file.

For second question answer is yes , you can put any number there, and you could try using it in keywords also:

So the code for keywords could look like:

Code:

$smarty->assign('seo_keys', stripslashes($info['title']) . ', ' . stripslashes($info['title']) . ' ' . $translations['jobscity']['jobs'] . ', ' . stripslashes($info['company']) . ', ' . stripslashes($info['location']) . ', ' . stripslashes($info['location']) . ' ' . $translations['jobscity']['jobs'] . ', ' . stripslashes($info['location']) . ', ' . limitWords($s, 2));

I hope this works for you (I don't have 1.8 installed to test now)

hobo

Re: Meta Tags for Job pages

Before I tried to also find solution to remove unwanted characters and also unwanted words from text that is fetched with function limitwords.
I found solutions for this on these three sites:
http://www.daniweb.com/forums/thread1721.html#
http://www.devdaily.com/php/php-string- … ce-numbers
http://www.experts-exchange.com/Program … 46468.html

The new code for 1.8 would look like like:

Code:

//SEO stuff
        function limitWords($res, $n) {
                $a = explode(' ', $res);
                return implode(' ', array_slice($a, 0, $n));
                }
                $s =strip_tags( $info['description']);
                $res = preg_replace("/[^a-zA-Z0-9\s]/", "", $s);
                $bad_words = explode('|', badword1|badword2|etc');  
       foreach ($bad_words as $naughty){
                $res = eregi_replace($naughty, "", $res);
                }
                $res = preg_replace('/(\S ) +/', '$1', $res);
$smarty->assign('seo_desc', stripslashes($info['title']) . ' ' . $translations['jobscity']['jobs'] . ' ' . $translations['jobs']['preposition_at'] . ' ' . stripslashes($info['company']) . ' ' . $translations['jobscity']['sidebar_jobs_in'] . ' ' . stripslashes($info['location']) . '. ' . $translations['search']['default'] . ' ' . $translations['jobscity']['sidebar_jobs_in'] . ' ' . stripslashes($info['location']) . '. ' . limitWords($res, 15));
$smarty->assign('seo_keys', stripslashes($info['title']) . ', ' . stripslashes($info['title']) . ' ' . $translations['jobscity']['jobs'] . ', ' . stripslashes($info['company']) . ', ' . stripslashes($info['location']) . ', ' . stripslashes($info['location']) . ' ' . $translations['jobscity']['jobs'] . ', ' . stripslashes($info['location']) . ', ' . limitWords($res, 5));

You have to replace badword1, badword2... with words you do not want to show in your keywords.
I tested this here:
http://freejoblistings.ca/transportatio … ronto.html

For "bad words" I picked the words that have little value like the ones showing on almost every job post.

Has anyone managed to get this working on later versions? I still have jobberbase 1.6 with some parts manually updated, so I can not say for sure if this code will work on 1.8.

Also, if anyone knows a better way to do this, don't be shy.

Last edited by hobo (2010-04-23 01:56:24)

RoopJeans

Re: Meta Tags for Job pages

@ hobo
Well  it make one thing working and other thing worse
means the SEO thing started working some how but only for those jobs who are being added after this mod
the thing it made wrong is this doesn't show all old ads at all . means if we click the ads before this mod  , those jobs only display white page

hobo

Re: Meta Tags for Job pages

Just a wild guess... try clearing the cache in your template folder. If that doesn't work try turning the error reporting on.
Good luck.

RoopJeans

Re: Meta Tags for Job pages

let me guess from where i can do both these things.....

RoopJeans

Re: Meta Tags for Job pages

Error reporting returned this.
Fatal error: Cannot redeclare limitwords() (previously declared in ..../page_job.php:142) in ..../page_job.php on line 106

RoopJeans

Re: Meta Tags for Job pages

ok . i had fixed it by deleting some similar lines of code. and it seems now its showing  old ads too.
Thanks to me and hobo ;-)

Last edited by RoopJeans (2010-05-05 07:10:25)

Ralf

Re: Meta Tags for Job pages

works fine with 1.9.1! Thanks guys!

New jobboard for germany: www.jobboard-deutschland.de it's getting better every day!
Thanks to everyone -specially within this forum- for supporting!