Community Forums › Forums › Archived Forums › General Discussion › HELP! I just edited the header.php and site is not working!!!!
Tagged: header.php
- This topic has 21 replies, 3 voices, and was last updated 12 years ago by
benconnor.
-
AuthorPosts
-
February 7, 2013 at 3:43 am #18605
benconnor
MemberHi,
Um... I was just trying to insert open graph tags into the header.php of the genesis folder – I couldn't find it in my new theme folder.
Anyway, stupidly I didn't save a copy of the code before entering it.
I'VE ACCIDENTALLY DELETED SOMETHING VITAL
The vital piece of code is somewhere in here:
wp_head();</** we need this for plugins **/>
</head>Please HELP?
Can someone please just copy and paste what this code is in here please?
I will be eternally grateful
Cheers,
Ben
February 7, 2013 at 5:05 am #18615vajrasar
MemberI believe you edited files in the parent folder of themes->genesis->*code files*. Am I right?
If yes, then you may want to download Genesis 1.9 and replace the old installation of genesis.
OR
[I don't know if this would work] You can try and insert this whole code in theme->genesis->header.php
_______________________________________
<?php
/*
WARNING: This file is part of the core Genesis framework. DO NOT edit
this file under any circumstances. Please do all modifications
in the form of a child theme.
*//**
* Handles the header structure.
*
* This file is a core Genesis file and should not be edited.
*
* @category Genesis
* @package Templates
* @author StudioPress
* @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
* @link http://www.studiopress.com/themes/genesis
*/do_action( 'genesis_doctype' );
do_action( 'genesis_title' );
do_action( 'genesis_meta' );wp_head(); /** we need this for plugins **/
?>
</head>
<body <?php body_class(); ?>>
<?php
do_action( 'genesis_before' );
?>
<div id="wrap">
<?php
do_action( 'genesis_before_header' );
do_action( 'genesis_header' );
do_action( 'genesis_after_header' );echo '<div id="inner">';
genesis_structural_wrap( 'inner' );
I make WordPress websites using Genesis Framework.
February 7, 2013 at 5:19 am #18616benconnor
MemberHi Vajrasar,
Thank you so much!!!!
That worked a charm.
All i had to do was whack this back in:
wp_head(); /** we need this for plugins **/
?>
</head>I accidentally removed the ?> bit.
Thanks!!!
Just quickly, can you tell me where to add the following facebook metatags so I don't stuff up again:
<meta property="og:title" content="Ben Connor Music" />
<meta property="og:type" content="musician" />
<meta property="og:url" content="http://benconnormusic.com/q" />
<meta property="og:image" content="http://benconnormusic.com/?attachment_id=1620" />
<meta property="og:site_name" content="Ben Connor Music" />
<meta property="fb:admins" content="663220279" />My Easy Facebook Share Thumbnail just says 'Open Graph tags are
<meta>
tags that you add to the<head>
of your website'I'm hoping they will ensure that the image that appears on people's status when they facebook like me is the one that I add to the one above, but I can't figure out where to put them.
Cheers,
Ben
February 7, 2013 at 5:23 am #18618vajrasar
MemberRefer to this -
See the "Facebook Like in Genesis" Section.
I make WordPress websites using Genesis Framework.
February 7, 2013 at 5:26 am #18620vajrasar
MemberFor things like this and many, try and use "Genesis Simple Hooks" Plugin.
http://www.studiopress.com/plugins/simple-hooks
I make WordPress websites using Genesis Framework.
February 7, 2013 at 6:19 am #18632benconnor
MemberHi Vajrasar,
Unfortunately that doesn't work for me as I need to use it for the jetpack plugins I have.
My major issues seems to be that my facebook Graph API is this:
{
"url": "http://benconnormusic.com/",
"type": "article",
"title": "Ben Connor",
"image": [
{
"url": "http://www.yourfamilyyourmoney.com/images/CAP-Affiliate/BIB-banner-160x80.jpg"
}
],
"description": "Alternative blues folk rock singer-songwriter",
"site_name": "Ben Connor",
"updated_time": "2013-02-07T12:13:05+0000",
"id": "226841744111572"
}Where is this situated? All i want to do is to change it so the that url is this: http://benconnormusic.com/?attachment_id=1620
If I can do that I wont have a crappy advertisement appearing when on people's feeds when they like my stuff.
Ben
February 7, 2013 at 6:28 am #18636vajrasar
MemberSee this tread. I believe, this is some issue with Jetpack and they will update it
http://wordpress.org/support/topic/facebook-publicizing-clients-posts-with-wrong-avatar
I make WordPress websites using Genesis Framework.
February 7, 2013 at 7:06 am #18644AnitaC
KeymasterThe plugin is recognizing the first image on the site which is the ad code in the Header Right Widget area. Just to test things - drag that off of there into the Inactive Widgets and let's see what image it picks up first. Let's start there. No need in fumbling around with all the other stuff yet.
Need help with customization or troubleshooting? Reach out to me.
February 7, 2013 at 7:14 am #18645AnitaC
KeymasterI am using this same plugin on a client using the same theme. Under Settings > Easy Facebook Share Thumbnails - did you upload a default thumbnail? Did you Debug or Validate Your Pages on the plugin page?
One key point here - the plugin works if there is a "Featured Image" attached to your posts. If there isn't one, it is to look for the default thumbnail you place in the plugin.
I went to a post and LIKED it and also tried to Share. I was provided two thumbnail images for the post because the post doesn't have a featured image attached to it.
Need help with customization or troubleshooting? Reach out to me.
February 7, 2013 at 7:58 am #18649benconnor
MemberHi Anitac 🙂
Unfortunately I just tried the featured image approach and that didn't work either.
The crazy thing is that that image is not the ad code in the right widget. It's an old ad code that has since been well and truly eradicated - if you look closely you'll see its different to the one that's on the site now.
I've tried all sorts of things. I've removed the code, deactivated the ad sense plug in, cleared all data from the plug in etc. Each time, I tried the link button and the image remained.
Oh, I've also had a default thumbnail set up on the Easy Facebook Share Thumbnails plugin to no avail.
The issue is this (as expressed above):
I did do a debug on the Easy Facebook Share Thumbnails plugin
Among other things it told me that my Facebook Graph API is this:
{
“url”: “http://benconnormusic.com/”,
“type”: “article”,
“title”: “Ben Connor”,
“image”: [
{
"url": "http://www.yourfamilyyourmoney.com/images/CAP-Affiliate/BIB-banner-160x80.jpg"
}
],
“description”: “Alternative blues folk rock singer-songwriter”,
“site_name”: “Ben Connor”,
“updated_time”: “2013-02-07T12:13:05+0000″,
“id”: “226841744111572″
}The url for that yourfamilyyourmoney banner is lodged into the graph API and I can't for the life of me determine how to alter the facebook graph API to get it out of there.
I just want this one put it in it's place: http://benconnormusic.com/?attachment_id=1620
The other thing it told me was that I have...
Errors That Must Be Fixed
More Than One OG URL Specified:
Object at URL 'http://benconnormusic.com' of type 'article' is invalid because it specifies multiple 'og:url' values: http://benconnormusic.com, http://benconnormusic.com/.I haven't been able to locate my og:urls either!
I've been at this for five hours and my blog page numbers issue also remains unresolved.
I'm like the Antithesis to a hacker 🙂
Ben
February 7, 2013 at 8:04 am #18650vajrasar
MemberI can suggest an alternate fix, but this NOT a standard solution and I have not tried it myself.
You may navigate to this link via your FTP or cPanel- http://www.yourfamilyyourmoney.com/images/CAP-Affiliate/BIB-banner-160x80.jpg
Delete the file 'BIB-banner-160x80.jpg '.
Upload your image (that you want to show) and name it 'BIB-banner-160x80.jpg '
That might trick the system into showing that image.
REMEMBER - Backup the Original Image in any case.
I make WordPress websites using Genesis Framework.
February 7, 2013 at 8:08 am #18651AnitaC
KeymasterThat could work. Have you optimized your database lately to remove a lot of dead files, etc.? You can use the WP-Optimize plugin - http://wordpress.org/extend/plugins/wp-optimize/screenshots/. You can also use Quick Cache to dump your cache files - http://wordpress.org/extend/plugins/quick-cache/.
Need help with customization or troubleshooting? Reach out to me.
February 7, 2013 at 8:09 am #18652AnitaC
KeymasterOh and this - http://benconnormusic.com/?attachment_id=1620 is actually leading to a Image Post. It will need to have the actual URL of the image on that post.
One more thing... changes won't happen immediately. It takes the search engines and Facebook a little bit of time to catch up to the changes.
Like I said, I have used both the plugin and theme together for 8 months and my recommendations have worked well for me. I'll unsubscribe and let someone else chime in here now. Good luck.
Need help with customization or troubleshooting? Reach out to me.
February 7, 2013 at 8:20 am #18653benconnor
MemberWeird...
When I 'like' this post (http://benconnormusic.com/song-idea-1/) it shows the YouTube icon.
I swear to you anitac, I have made the feature image of this post the main photo in the header.
My brain is melting and it's 1.18am! Got to be up at 7am.
Oh dear.
Be great if you could help 🙂
Ben
February 8, 2013 at 12:21 am #18870benconnor
MemberHi Vajrasar,
I've tried to navigate to http://www.yourfamilyyourmoney.com/images/CAP-Affiliate/BIB-banner-160?—80.jpg through my cpanel and FTP, but can't find it.
Where would it be?
Actually, are you sure it would be there?
The url was generated by yourfamilyyourmoney, of whom I am an affiliate.
Is there no way to alter the facebook graph API to get it out of there?
February 8, 2013 at 12:29 am #18873benconnor
MemberHi Anitac,
Thanks for the info on being sure to put the actual URL of the image rather than the image post.
Will do when I can actually figure out where to put it.
I understand that the plugin has worked for you, but it isn't working for me and I can't figure out why.
Am I right in thinking that there isn't a way, or you don't know anyway to alter the facebook graph API?
Do you know what it means when your Easy Facebook Share Thumbnails debug says this:
More Than One OG URL Specified:
Object at URL ‘http://benconnormusic.com’ of type ‘article’ is invalid because it specifies multiple ‘og:url’ values: http://benconnormusic.com, http://benconnormusic.com/.Any help would be much appreciated
Cheers,
Ben
February 8, 2013 at 1:55 am #18878benconnor
MemberEureka!!!!!
Problem solved.
All I had to do was enter the following code into the function.php:
add_filter(
'jetpack_enable_opengraph'
,
'__return_false'
, 99 );
Jetpack was to blame.
The website's post has all the answers
Cheers,
Ben
February 8, 2013 at 1:55 am #18879benconnor
MemberEureka!!!!!
Problem solved.
All I had to do was enter the following code into the function.php:
add_filter(
'jetpack_enable_opengraph'
,
'__return_false'
, 99 );
Jetpack was to blame.
The website's post has all the answers
Cheers,
February 8, 2013 at 1:56 am #18880benconnor
MemberOops here's the website:
February 8, 2013 at 2:55 am #18888vajrasar
Membernice to know that you found the solution. Please mark the topic as resolved.
I make WordPress websites using Genesis Framework.
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.