How to Add Custom Code Snippets in WordPress

/* Modify the login URL to redirect to a custom login page. Original doc link: https://wpforms.com/how-to-add-custom-code-snippets-in-wordpress/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ .wpforms-container input[type=radio] { -webkit-appearance: radio !important; -moz-appearance: radio !important; appearance: radio !important; } .wpforms-container input[type=checkbox] { -webkit-appearance: checkbox…Continue reading

KI

import nltk from nltk.tokenize import word_tokenize from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense # NLP-Modell erstellen nlp_model = nltk.NaiveBayesClassifier() # Machine-Learning-Modell erstellen ml_model = Sequential() ml_model.add(Dense(64, activation=’relu’, input_shape=(100,))) ml_model.add(Dense(64, activation=’relu’)) ml_model.add(Dense(1, activation=’sigmoid’)) # Kommunikationsschnittstelle erstellen app = Flask(__name__) @app.route(‘/improve_code’,…Continue reading

Using the “Include Form Styling” Setting

/* When using Base styling and multi-column, use this CSS to correct the column layout. Original doc link: https://wpforms.com/docs/how-to-choose-an-include-form-styling-setting/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ .wpforms-field { clear: both !important; }Continue reading

Limiting Options for the Date / Time Field

/** Don’t allow date to be selected after maxDate Original doc link: https://wpforms.com/developers/customize-the-date-time-field-date-options/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_limit_date_picker() { ?>Continue reading

Creating Multi-Column Form Layouts With CSS Classes

/* Multi-column layout with conditional fields Original doc link: https://wpforms.com/docs/how-to-create-multi-column-form-layouts-in-wpforms/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ .wpforms-conditional-hide { position: absolute !important; left: -9999px !important; height: 0 !important; overflow: hidden !important; } .wpforms-conditional-hide * { visibility: hidden !important; }Continue reading

WPForms Login Page Redirect

/* Modify the login URL to redirect to a custom login page. Original doc link: https://wpforms.com/how-to-create-a-custom-login-form-for-improved-site-branding/ For support, please visit: https://www.facebook.com/groups/wpformsvip */ function sulliesflowers_custom_login_url( $login_url, $redirect, $force_reauth ) { // Change here your login page url $login_url = ‘https://sulliesflowers.com/login/’; if…Continue reading

Custom drag and drop

function enqueue_admin_reorder_scripts() { global $pagenow; // Ensure the script is not loaded on the plugins page if ($pagenow !== ‘plugins.php’) { wp_enqueue_script(‘jquery-ui-sortable’); wp_add_inline_script(‘jquery-ui-sortable’, ‘ jQuery(document).ready(function($) { var $sortableList = $(“#the-list”); var postType = $(“body”).attr(“class”).match(/post-type-([^\s]+)/)[1]; $sortableList.sortable({ update: function(event, ui) { var…Continue reading

“Generar y Publicar Posts Automáticamente con ChatGPT”

function generate_and_publish_post() { $api_key = ‘skprojXVTIVxQQ5Ehpxp775DRhT3BlbkFJcdNbKiiJVJUGkqJGmBYu’; $unsplash_api_key = ‘6Nw90BNuEg5uEnRmMqpw05JLdTQ8onddGfA5e_XYlmQ’; $youtube_api_key = ‘AIzaSyC1tv1pocoHLfHtPAMsOykbLjmgdNwxaf0’; $wp_token = ‘eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL3RlY2hub3ZlZGFkZXMuY29tIiwiaWF0IjoxNzE2MDY0Mjg5LCJuYmYiOjE3MTYwNjQyODksImV4cCI6MTcxNjY2OTA4OSwiZGF0YSI6eyJ1c2VyIjp7ImlkIjoiMSJ9fX0.SwHK1aGMTveqMnTZN04UKiFtHMZuN1312PHWYzWklv0’; $wp_username = ‘charlyl’; $wp_password = ‘L1910901$’; $topics = array( ‘tecnologia’, ‘salud y bienestar’, ‘desarrollo personal’, ‘finanzas personales’, ‘viajes y turismo’ ); $tema = $topics[array_rand($topics)]; //…Continue reading

Untitled Snippet

$u_time = get_the_time( ‘U’ ); $u_modified_time = get_the_modified_time( ‘U’ ); // Only display modified date if 24hrs have passed since the post was published. if ( $u_modified_time >= $u_time + 86400 ) { $updated_date = get_the_modified_time( ‘F jS, Y’ );…Continue reading