Support Forum
G'mornin Everyone.. Happy Holiday..
I'm looking to increase the open graph description output in my forum.
Looks like SimplePress open graph is internally set the same as the meta description length 120 characters or so. It's said Facebook renders around 300 characters, but longer is OK as it will be truncated.
Is this controlled by a file i can edit?
Thanks, Ed
- Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
Under SEO there is an option to use the first 120 characters for the topic meta description.
Remembering the open graph (og) inclusion came later. It looks like that 120 characters is duplicated for the og description tag.
These days I'm finding out that og description is too short, especially when sharing to Facebook or Google plus. I'm hoping to bump it up to around 300 characters. The meta description could be safely increased to 160 characters for the best seo.
- Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
This does seem to be the case if you are using the excerpt option... I guess the 120 was a typical, albeit arbitrary, size of an excerpt...
if you like, you can use the 'sph_meta_description' to adjust the meta description as you see fit... but if you want more chars, you will essentially have to regenerate it... something like:
global $spVars; global $spVars; $content = spdb_table(SFPOSTS, "topic_id={$spVars['topicid']}", 'post_content', 'post_id ASC', 1); $description = wp_html_excerpt($content, 120);
but of course change the 120 to what you want... hook into the filter above, and then add the code above and return $description...
better than changing core code...
Visit Cruise Talk Central and Mr Papa's World
Created the file and put it in the wp-content directory. Something was echoed to the top of the screen, and the length did not increase. Would i have to uncheck the 120 characters in the seo component settings?
Is there a core file i can edit to increase the characters?
Thanks..
- Doc ~ An old Fidonet SysOp. Just hanging out in cyberspace keeping up with tech.
not sure I follow... you did something like this??
add_filter('sph_meta_description', 'my_meta_description'); function sph_meta_description($description) { global $spVars; $content = spdb_table(SFPOSTS, "topic_id={$spVars['topicid']}", 'post_content', 'post_id ASC', 1); $description = wp_html_excerpt($content, 300); return $description; }
shouldnt echo anything... search for the $description line in the core files and you will find it...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)