Bug #7868
closedCareerplan site's header
0%
Description
Hi,
The career planning site:
https://careerplan.commons.gc.cuny.edu/
seems to have lost its header image:
https://careerplan.commons.gc.cuny.edu/wp-content/blogs.dir/1372/files/2016/07/careerplanheader.jpg
If you do not have it, I can send you what Jenny's assistant has sent me.
Also, while we are out it, can you send us the header.php file to make sure that it is pointing to the correct files?
Also, can you send us the custom-functions file? I want to make sure the og metadata is accurate.
Both in the gclibrary theme.
Files
Updated by Boone Gorges over 7 years ago
- File header.php header.php added
- File custom-functions.php custom-functions.php added
- Target version set to 1.10.15
The URL https://careerplan.commons.gc.cuny.edu/wp-content/blogs.dir/1372/files/2016/07/careerplanheader.jpg points to the site careerplantest.gc.cuny.edu. Someone must've removed some content there. The correct URL for the production site is https://careerplan.commons.gc.cuny.edu/wp-content/blogs.dir/2368/files/2016/07/careerplanheader.jpg, or simply https://careerplan.commons.gc.cuny.edu/files/2016/07/careerplanheader.jpg.
I've made the manual change to the production site, so that the image continues to appear.
I've attached header.php and custom-functions.php for you to review.
Updated by Stephen Klein over 7 years ago
Thank you, Boone. Yes, I just examined the custom-functions file and they do not have their OG meta-data defined and not pointing to a different logo to allow for optimal social media posting. If their tweeting does not work, I will have them investigate, edit and send you the files.
FYI:
https://gist.github.com/fjaguero/3904423
https://blog.kissmetrics.com/open-graph-meta-tags/
https://moz.com/blog/meta-data-templates-123
For example, the library has an image:
gc-cuny-og-logo.jpg
at:
http://library.gc.cuny.edu/images/new/gc-cuny-og-logo.jpg";
allowing for optimal posting.
If neededm I will have them edit this:
function insert_fb_in_head() {
global $post;
if ( !is_singular()) //if it is not a post or a page
return;
echo '<meta property="fb:admins" content="17402839"/>';
echo '<meta property="og:title" content="' . get_the_title() . '"/>';
echo '<meta property="og:type" content="article"/>';
echo '<meta property="og:url" content="' . get_permalink() . '"/>';
echo '<meta property="og:site_name" content="The Graduate Center Library"/>';
echo '<meta property="og:description" content="The Graduate Center Library supports the research, teaching, and learning activities of the Graduate Center by connecting its community with print materials, electronic resources, research assistance and instruction, and expertise about the complexities of scholarly communication. It also serves as a gateway to the collections of other CUNY libraries, the New York Public Library (NYPL), and libraries worldwide."/>';
if(!has_post_thumbnail( $post->ID )) { //the post does not have featured image, use a default image
$default_image="http://library.gc.cuny.edu/images/new/gc-cuny-og-logo.jpg"; //replace this with a default image on your server or an image in your media library
echo '<meta property="og:image" content="' . $default_image . '"/>';
}
else{
$thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'medium' );
echo '<meta property="og:image" content="' . esc_attr( $thumbnail_src0 ) . '"/>';
}
echo "
";
}
Updated by Boone Gorges over 7 years ago
- Category name set to WordPress Themes
- Status changed from New to Resolved
I committed the header path fix to the repo in https://github.com/cuny-academic-commons/cac/commit/d3d38e6629f37c5aa1ba77d72c4519cec4ad67f4
Thanks for the additional info, Stephen. I'm going to close this ticket, so that I have a record of which version the header fix went into by the time of tomorrow's release. If your team needs more modifications to your theme, please open a separate ticket (ideally referencing this one).
Updated by Stephen Klein over 7 years ago
Quick question:
Why do you think this file was misplaced?
Updated by Boone Gorges over 7 years ago
I don't see any items in Dashboard > Media Library with a post date later than 2015-08-13. But I do see the empty media directories on the server (2016/06, etc). This suggests that someone deleted the media items through the Dashboard interface. Is it possible that a member of your team did this?
Updated by Stephen Klein over 7 years ago
Not my team. I am just helping Jenny. I will investigate. Thanks.
Updated by Stephen Klein over 7 years ago
Boone, I am unsure why and will suggest to Jenny that she might want to have other folks edit her site, but it seems like the header's logo disappeared again.
Can you resolve?
Thank you.
Updated by Boone Gorges over 7 years ago
This might be my fault - in my previous fix, I entered a URL that might not be rewriting properly. I've just put a hotfix in place. Can you verify that it's working now?
Updated by Stephen Klein over 7 years ago
Fixed:
https://careerplan.commons.gc.cuny.edu/
thank you!
Updated by Boone Gorges over 7 years ago
Thanks for confirming, and sorry for the error.
Updated by Stephen Klein over 7 years ago
No worries and appreciate all the support.