FXBot – Add language code to external link

function append_language_to_external_links($content) { // Get the current language of your blog $current_language = apply_filters( ‘wpml_current_language’, NULL ); if ($current_language == “en”){ $current_language = “”; } // Create a DOMDocument instance to parse the content $dom = new DOMDocument(); libxml_use_internal_errors(true); //…Continue reading

Add Multiple Checkboxes To Donation Form

/** * Add a collection of checkboxes to the donation form. * * This snippet only works in Charitable 1.5 or above. * */ function wpchar_charitable_register_new_checkboxes_field() { if ( ! class_exists(“Charitable_Donation_Field” ) ) { return; }; /** * Define a…Continue reading

Exclude All Posts of a Category from News Sitemap

add_filter( ‘aioseo_sitemap_exclude_posts’, ‘aioseo_sitemap_filter_excluded_posts’, 10, 2 ); function aioseo_sitemap_filter_excluded_posts( $ids, $type ) { if ( ‘news’ === $type ) { $category_id = 136; $posts_in_category = get_posts(array( ‘category’ => $category_id, ‘numberposts’ => -1, ‘fields’ => ‘ids’ )); $ids = array_merge($ids, $posts_in_category); }…Continue reading

Adding Text/Currency To Progress Bar On Campaign Pages

add_filter( ‘charitable_campaign_builder_progress-bar_field_display’, ‘test_campaign_builder_field_display’, 10, 2 ); function test_campaign_builder_field_display( $html, $campaign_data ) { // search for “Goal:” and add a £ symbol to the goal amount. $html = str_replace( ‘Goal: ‘, ‘Goal: £’, $html ); return $html; }Continue reading

//bitlash Login

add_filter( ‘login_head’, function () { // Update the line below with the URL to your own logo. // Adjust the Width & Height accordingly. $custom_logo = ‘https://bitla.sh/wp-content/uploads/2024/03/Bitlash-Logo-Outline.svg’; $logo_width = 260; $logo_height = 70; printf( ‘ ‘, $custom_logo, $logo_width, $logo_height );…Continue reading