-
AuthorPosts
-
brentwilliams2 Friend
brentwilliams2
- Join date:
- January 2013
- Posts:
- 231
- Downloads:
- 0
- Uploads:
- 23
- Thanks:
- 4
- Thanked:
- 33 times in 1 posts
May 23, 2013 at 10:15 pm #187731Meta information is stored in helper/jafunctions.class.php. Find:
$document->setMetaData('keywords', replaceContentDocument($keyword, $jobs));
And you can modify this to add a few open graph tags:
$document->setMetaData('og:title', replaceContentDocument($title, $jobs));
$document->setMetaData('og:description', replaceContentDocument(substr(strip_tags ($jobs->job_detail),0,155), $jobs));In that same area, I wanted to alter the description meta tag. As it stands, it shows the entire description field, along with all html code. So I stripped out the html and limited it to 155 characters. Here is the original code:
$document->setDescription(replaceContentDocument($description, $jobs));
And I changed it to:
$document->setDescription(replaceContentDocument(substr(strip_tags ($jobs->job_detail),0,155), $jobs));
1 user says Thank You to brentwilliams2 for this useful post
timmieboy Friendtimmieboy
- Join date:
- January 2013
- Posts:
- 344
- Downloads:
- 0
- Uploads:
- 59
- Thanks:
- 9
- Thanked:
- 5 times in 1 posts
May 2, 2014 at 11:53 am #533281Can the development team add the max length description of 155 characters standard in the component, in this way we do not have to change it again after a update. Thanks
Thanh Nguyen Viet FriendThanh Nguyen Viet
- Join date:
- September 2014
- Posts:
- 1461
- Downloads:
- 0
- Uploads:
- 44
- Thanked:
- 258 times in 217 posts
May 6, 2014 at 8:50 am #533760The proper way to use Job description info as meta description of Job detail page is as follows:
– In Jobboard configuration form >> tab Meta data >> select “Job detail page” under “Page type” setting
– Then enter {JOB_DESCRIPTION} value for Page Description text box– Next, open the file: components/com_jajobboard/helper/jafunctions.class.php
Find the code line:
[PHP]$define = str_replace(“{JOB_DESCRIPTION}”, $jobs->job_detail, $define);[/PHP]And replace it with:
[PHP]$define = str_replace(“{JOB_DESCRIPTION}”, substr(strip_tags($jobs->job_detail), 0, 155), $define);[/PHP]I will notify to dev team to apply this change in upcoming version.
AuthorPostsViewing 3 posts - 1 through 3 (of 3 total)This topic contains 3 replies, has 3 voices, and was last updated by Thanh Nguyen Viet 10 years, 6 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Adding open graph meta and customizing the description meta tag
Viewing 3 posts - 1 through 3 (of 3 total)