[ad_1]
Hi @cpu21,
Thank you for your feedback, we’re happy you like the plugin.
Can you please give us more details about what you mean when you say the snippet is not saved?
Are you making changes to the snippet and after saving the code is the same as before or is the snippet not activating?
Are you using version 2.0.1?
Would it be possible to include a screenshot of your snippet to see how it is set up?
Thanks
- This reply was modified 1 hour, 45 minutes ago by Mircea Sandu.
Thread Starter
cpu21
(@cpu21)
Yes I am using version 2.0.1.
I linked the screenshot.
Please check in order.
1. Before Editing :
2. Editing :
3. After editing (after save) :
Hi @cpu21,
Thank you for the details, can you please try the following steps to help troubleshoot this:
1. Deactivate the snippet and save.
2. Edit the image URL and save.
3. Check if the changes are now stored & try reactivating the snippet.
Thanks
Thread Starter
cpu21
(@cpu21)
it works fine!
What is the problem, and why is this happening?
Hi @cpu21,
Thank you for confirming that.
I suspect there is something in the code you have below that is preventing the snippet from updating correctly. If it’s possible to share the whole code I’d be happy to try figuring out what is causing it.
Thanks
Thread Starter
cpu21
(@cpu21)
Here is full php snippets.
// Admin Login Logo
function my_login_logo() { ?>
<style type="text/css">
body.login div#login h1 a {background-image: url('https://fastreport.co.kr/wp-content/uploads/2022/07/auto_issue_logo.svg'); background-size: contain; width: 275px; height: 39px; margin-bottom: 32px;}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'my_login_logo' );
// Admin Login Logo URL
function custom_loginlogo_url($url) {
return 'https://fastreport.co.kr/';
}
add_filter( 'login_headerurl', 'custom_loginlogo_url' );
// Admin Login Logo URL Title
function my_login_logo_url_title() {
return 'Go to fastreport.co.kr';
}
add_filter( 'login_headertext', 'my_login_logo_url_title' );
// Yoast SEO Facebook Meta - unsupported WebP : Adding the Open Graph in the Language Attributes
function add_opengraph_doctype( $output ) {
return $output . ' xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml"';
}
add_filter('language_attributes', 'add_opengraph_doctype');
// Yoast SEO Facebook Meta - unsupported WebP : Add Open Graph Meta Info
function insert_fb_in_head() {
global $post;
if ( !is_singular()) //if it is not a post or a page
return;
// echo '<meta property="fb:app_id" content="Your Facebook App ID" />';
// 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="Your Site NAME Goes HERE"/>';
if(!has_post_thumbnail( $post->ID )) { //the post does not have featured image, use a default image
$default_image="https://fastreport.co.kr/wp-content/uploads/2022/07/auto_issue_home_featured_image.jpg";
echo '<meta property="og:image" content="' . $default_image . '"/>';
} else {
$thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'full' );
if ( wp_get_image_mime( $thumbnail_src[0] ) == 'image/webp' ) {
echo '<meta property="og:image" content="' . esc_attr( $thumbnail_src[0] ) . '"/>';
echo '<meta property="og:image:width" content="' . esc_attr( $thumbnail_src[1] ) . '"/>';
echo '<meta property="og:image:height" content="' . esc_attr( $thumbnail_src[2] ) . '"/>';
echo '<meta property="og:image:type" content="' . wp_get_image_mime( $thumbnail_src[0] ) . '"/>';
echo '<meta property="og:image:alt" content="' . get_the_title() . '"/>';
}
}
echo "";
}
add_action( 'wp_head', 'insert_fb_in_head', 5 );
Hi @cpu21,
Thank you for sharing the full snippet.
I can’t see anything in there that could cause that issue, it might be something specific to your setup from the theme or another plugin that might interfere.
Is the updating issue still happening now if the snippet is active?
