Please, add option to Socail Plugin Settings (AiOSP OpenGraph)
-
Hello!
First of all thank you for this plugin.
It’s awesome. Also thank you for Social extension.I want ask you to add one more option for All in One Seo Pack OpenGraph extension: custom default og:images for different post types.
Thing is I have blog and portfolio on my website and in simple “post” post type I use first image in content as og:image, and in “works” I use thumbnail.
I already add a few lines to your extension on my server to add this function, but I hope you’ll add this function in your future versions!
Here the code I’ve inserted in file /wp-content/plugins/all-in-one-seo-pack/aioseop_opengraph.php to add thumbs for works:
/* Data Validation */ $title = strip_tags( esc_attr( $title ) ); $sitename = strip_tags( esc_attr( $sitename ) ); $description = strip_tags( esc_attr( $description ) ); if ( empty( $thumbnail ) && !empty( $image ) ) $thumbnail = $image; /* Get the first image attachment on the post */ // if( empty($thumbnail) ) $thumbnail = $this->get_the_image(); /* Nikita Spivak ADD THUMBNAIL FOR WORKS POSTS */ if( $current_post_type == "works"){ $thumbnail = $this->get_the_image_by_post_thumbnail( ); } /* END ADDING THUMBNAIL FOR WORKS POSTS */ /* Add user supplied default image */ if( empty($thumbnail) ) { if ( empty( $this->options['aiosp_opengraph_defimg'] ) ) $thumbnail = $this->options['aiosp_opengraph_dimg']; else {
I hope it would help somebody.
Thanks you.
Have a nice day!
- The topic ‘Please, add option to Socail Plugin Settings (AiOSP OpenGraph)’ is closed to new replies.