Add Featured Images to RSS Feeds

/** * Add the post thumbnail, if available, before the content in feeds. * * @param string $content The post content. * * @return string */ function wpcode_snippet_rss_post_thumbnail( $content ) { global $post; if ( has_post_thumbnail( $post->ID ) ) {…Continue reading

Untitled Snippet

add_filter( ‘woocommerce_product_add_to_cart_text’, ‘fmd_change_select_options_button_text’, 10, 2 ); if(!function_exists(“fmd_change_select_options_button_text”)) { function fmd_change_select_options_button_text( $label, $product ) { if ( $product->is_type( ‘variable’ ) ) { return ‘Comprar ahora’; } return $label; } }Continue reading

mlm

— phpMyAdmin SQL Dump — version 5.0.2 — https://www.phpmyadmin.net/ — — Host: localhost — Generation Time: Nov 20, 2021 at 08:35 AM — Server version: 10.4.13-MariaDB — PHP Version: 7.2.32 SET SQL_MODE = “NO_AUTO_VALUE_ON_ZERO”; START TRANSACTION; SET time_zone = “+00:00”;…Continue reading

WooCommerce – Add multiple products to cart

// Add products to the cart function add_products_to_cart() { // Define the products to be added to the cart $products = array( array( ‘product_id’ => 20070, ‘quantity’ => 1 ), array( ‘product_id’ => 19968, ‘quantity’ => 1 ) ); //…Continue reading

Add WPCode Custom Field Smart Tag

add_filter( ‘wpcode_smart_tags’, function( $tags ) { $tags[‘custom’] = array( ‘label’ => ‘Custom’, ‘tags’ => array( ‘custom_field_tag’ => array( ‘label’ => ‘Custom Field Tag’, ‘function’ => ‘wpcode_custom_field_tag’, ), ), ); return $tags; } ); function wpcode_custom_field_tag() { // Replace custom_field_tag below…Continue reading

Detail

$indextls = htmlspecialchars($_REQUEST[‘indextls’]); //echo ‘indextls = ‘.$indextls; $Host = “localhost”; $User = “i9065950_wp2”; $Password = “E.SaEj4ol3IAOnlC0ur27”; $DBName = “i9065950_wp2”; $Table = “cemdata”; //error_reporting(0); //echo ‘Add additional information for this person‘; $query = “SELECT * from cemdata where indextls = ‘$indextls’”;…Continue reading