Replace comment avatars and links at the same time

Maybe I was burned out from work before, but this morning I took another go at the same code and managed to get it running properly. if ( ! function_exists( ‘comment_imgs’ ) ) { add_filter( ‘get_comment_author_url’, ‘comment_imgs’ ); function comment_imgs( $avatar, $id_or_email, $size, $default, $alt ) { global $comment; // We do not get the … Read more

Rewrite sub folder dynamically with country code in WordPress using PHP

I think the most difficult part is to remove the subfolder part from the url with WordPress website on both places. What if you change subfolder name to international and change rewrite rules to have ISO codes before the urls? So you would have: http://example.com http://example.com/international/uk http://example.com/international/us To add the iso codes you try to … Read more

How To add custom radio boxes to WooCommerce Billing page and change total price by this field?

Try it add_filter(‘woocommerce_billing_fields’, ‘custom_woocommerce_billing_fields’); function custom_woocommerce_billing_fields($fields) { $fields[‘billing_options’] = array( ‘label’ => __(‘Ordering Method’, ‘woocommerce’), // Add custom field label ‘placeholder’ => _x(‘Your NIF here….’, ‘placeholder’, ‘woocommerce’), // Add custom field placeholder ‘required’ => true, // if field is required or not ‘clear’ => false, // add clear or not ‘type’ => ‘radio’, // add … Read more

How to retrieve the content (with a specific ID) via ajax by clicking a link tag

I would put the action in the post data $.ajax({ url: “/wp-admin/admin-ajax.php”, type:”POST”, data: { action: “my_custom_data”, post_link: post_ID }, success: function (response) { console.log(response); $(‘#post-data’).append(response); } }); return false; ….. Then use $_POST[‘post_link’] in your PHP function my_custom_data(){ $post_link = $_POST[‘post_link’]; echo get_the_content($post_link); die(); }

login wp impossible

You probably have a problem-causing plugin. Look at the error.log file which will tell you the file that is causing the problem. Rename that plugin’s folder (use your hosting control panel’s File Manager) and retry. That should get you into the admin area. Then you can contact the plugin’s support forum to figure out the … Read more