Vicky Arulsingam
Forum Replies Created
-
Forum: Plugins
In reply to: [Post Avatar] Problem with custom function that adds Post Avatar og:imageYou can check to see if the avatar array has a null value and display a default url
e.g.
if( is_single() ){ $avatar_array = gkl_get_postavatar($post); If( isnull( $ avatar_array ) ) { $og_image = '<meta property="og:image" content="default url here" />'; } else { $og_image = '<meta property="og:image" content="' . esc_url( $avatar_array['avatar_url'] ) . '" />' . "\n"; } }
Forum: Plugins
In reply to: [Post Avatar] Generate meta property="og:image" for Post Avatar image?I’ve figured it out. The above code was being placed after the open graph SEO code.
Here’s an improved version of the code that hooks into WordPress SEO filters and will only show if there is no featured image:
add_action( 'wpseo_opengraph', 'gklpa_ogimage', 99 ); function gklpa_ogimage(){ global $post; $og_image = ''; if( has_post_thumbnail( $post->ID ) ) return; if( is_single() ){ $avatar_array = gkl_get_postavatar($post); $og_image = '<meta property="og:image" content="' . esc_url( $avatar_array['avatar_url'] ) . '" />' . "\n"; } echo $og_image; }
Forum: Plugins
In reply to: [Post Avatar] Generate meta property="og:image" for Post Avatar image?Let me see if there’s any conflict with Yoast SEO plugin.
Forum: Plugins
In reply to: [Post Avatar] Generate meta property="og:image" for Post Avatar image?Creating a function that hooks into the wp_head action will let you define the post avatar image as one of the Open Graph image options:
add_action( 'wp_head', 'gklpa_ogimage' ); function gklpa_ogimage(){ global $post; $og_image = ''; if( is_single() ){ $avatar_array = gkl_get_postavatar($post); $og_image = '<meta property="og:image" content="' . esc_url( $avatar_array['avatar_url'] ) . '" />' . "\n"; } echo $og_image; }
This code can go in your theme’s functions.php file or in a custom plugin.
Forum: Themes and Templates
In reply to: [Eureka] change logoThe theme does not support custom logos.
Forum: Plugins
In reply to: [Post Avatar] O plugin deu um erro no blogYour webhost has configured your server to allow scripts to access files in a certain directory. Please check with your host to allow wp-content/plugins to be included in the allowed paths.
You can also try deleting the files in the “languages” folder of “post-avatar”
Forum: Plugins
In reply to: [Post Avatar] [Plugin: Post Avatar] Duplicate Gavatar in PreviewPlease provide a link to the archive page.
I will need access to test. You contact me via email: [email protected]
I have made some changes as to how the javascript is enqueued.
Can you download the package from here to see if this resolves the issue: https://garinungkadol.com/downloads/post-avatar.zip
Thanks for the list. I’ll look into it further.
It’s mostly likely a javascript issue though the javascript that I use for Post Avatar has nothing to do with the Media Uploader.
I am able to insert media from both the Edit Post and Add New Post screens.
Are there any other plugins that you are using?
Forum: Plugins
In reply to: how to store html in wp_optionsYou could try using the function addslashes before you save the option.
example:
$html_code = addslashes($_POST[‘html_code’]);
update_option(‘myoptionname’, $html_code);Then when displaying the code you use the stripslashes function.
$myoption = stripslashes(get_option(‘myoptionname’));
echo $myoptionForum: Plugins
In reply to: [Plugin: Post Avatar] Missing several simple featuresHey Jehy, thanks for the feedback.
I’ve been debating with myself on the best way to include a default image – it’ll probably be available in the next release.
– use avatar *textarea with URL* as default.
Can you please explain what you mean by this?
As for a web upload – I’m planning on integrating that functionality through the use of WordPress media uploads.
Forum: Plugins
In reply to: A plugin for “thumbs up/ thumbs down” rating system?The closest I can find is this one: Vote It Up
Forum: Plugins
In reply to: [Plugin: Post Avatar] version for WP 2.6?I think the problem arises when you delete the post avatar plugin folder without deactivating the plugin first. Even if you upload the folder again, nothing will appear.
You have to go to the plugins page and deactivate the plugin and then reactivate it again.