Frumph
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: get_author_posts_url() not workinghrm. are you familiar with var_dump ?
var_dump(get_the_author_meta('ID'));Which would output the contents of the return of that
Forum: Fixing WordPress
In reply to: facebook like and sharetested -> works, only works for the first one found, can be adjusted with preg_match_all to find all of the occurrences then you just loop the $matches[1] array to echo out all found
Or you could avoid all that and try this plugin out: http://wordpress.org/extend/plugins/facebook-and-digg-thumbnail-generator/
Forum: Fixing WordPress
In reply to: facebook like and shareSo you’re just putting it into a URL line and having WordPress create the player, yeah? .. Then the issue is really with the player oembed that WordPress is outputting ;/
You can grab the actual thumbnail from the youtube site like this:
http://img.youtube.com/vi/1AGBix7EwVE/1.jpg
^ the img. /vi/ is different then the 1.jpg can be 1.jpg or 2.jpg or 3.jpg
You could do this ;/
add_action('wp_head', 'opengraph_make_thumbnail_for_youtube'); function opengraph_make_thumbnail_for_youtube() { global $post; if ($post) { $pattern = '/(?:youtube\.com\/(?:[^\/]+\/[^\/]+\/|(?:v|e(?:mbed)?)\/|[^#]*[?&]v=)|youtu\.be\/)([^"&?\/ ]{11})/i'; preg_match($pattern, $post->post_content, $matches); $found_id = (isset($matches[1])) ? $matches[1] : false; if ($found_id) echo '<meta property="og:image" content="http://img.youtube.com/vi/'.$found_id.'/1.jpg" />'."\r\n"; } }This is untested and written from memory, but what it’s concept is you can filter the post_content of the current post and have it as an action that ads the og:image for the thumbnail be placed into the wp_head of your site
You would add this to your functions.php file
EDIT: Better regex pattern
Forum: Fixing WordPress
In reply to: Media references not resolvingyes, that looks correct
Which images are having the wrong links on them? is that site #1 (main site) or one of the subsites?
Forum: Fixing WordPress
In reply to: facebook like and share.. it means when you type in the youtube link, you make sure the &feature=share (or related) is at the end of it
Forum: Fixing WordPress
In reply to: Site infected with Malware & Site blacklisted.WordFence Security (plugin) will tell you exactly what files are infected and any additional files that are hiding in your installation that shouldn’t be there.
You really REALLY need to validate data on those inputs from $_POST as well
http://codex.wordpress.org/Data_Validation
like
$domain = esc_attr($_POST['domain']);.. $description = $_post[‘keywords’]; .. should probably be $keywords = $_POST[‘keywords’]; .. same with domain? .. you’re not setting the $domain var or the $keywords var
the add_post_meta requires an ID, not the whole $post object, so basically you need to save that post THEN get the returned ID it gives you and add it to the add_post_meta
Forum: Fixing WordPress
In reply to: Media references not resolvingcheck the .htaccess, it needs to direct to files.php in wp-content which redirects to the appropriate uploads directory either for the main site which should be wp-content/uploads and subsites should be wp-content/blog.whatever(forgotname)/ID/uploads
Forum: Fixing WordPress
In reply to: One button across all sites?.. you still use the code that puts it into the footer, but you add inline-css that makes the div absolute and positions it at the top of the site.
Forum: Fixing WordPress
In reply to: Date doesn't show up right, but with a lot of zeros.. the post display is still coming from the Avada theme though, not injected from a plugin or anything
I’ve had to use a plugin to do that.
Like this one:
http://wordpress.org/extend/plugins/wp-mail-smtp/and there are other’s available
Forum: Fixing WordPress
In reply to: get_author_posts_url() not workingAs for the redirect to the author.php template, no idea.. the author.php isn’t populated with anything but the author name being sent to it which then you need to load the data for that author..
example author.php: https://github.com/Frumph/easel/blob/master/author.php
Forum: Fixing WordPress
In reply to: get_author_posts_url() not workingDunno why that isn’t working for you, however this works for me…
global $authordata; $post_author = "<span class=\"post-author\">".__('Author:')." <a href=\"".get_author_posts_url( $authordata->ID, $authordata->user_nicename )."\">".get_the_author()."</a></span>\r\n"; echo $post_author;