Skip to content

Total Theme ReplaCE VariabLES

/** * Add Custom Dynamic Variables. * * @link https://total.wpexplorer.com/docs/snippets/add-custom-dynamic-variables/ * @since 5.6.1 */ add_filter( 'totaltheme/replace_vars/vars', function( $vars ) { // Check if the post has a featured image if (has_post_thumbnail(get_the_ID())) { $class = 'xxx'.get_the_ID(); // Return an empty string…

Mehr Lesen

Layout for Megamenu ITEMS

Just give the item a css class like megamenu-template-1 and add this to the functions.php // Override the menu item with the 'megamenu-template-1' class with a dynamic template add_filter( 'walker_nav_menu_start_el', function( $output, $item, $depth, $args ) { //LEISTUNGEN if (…

Mehr Lesen

Total Theme Grid with Row-Spans

[vc_row full_width="stretch_row_content_no_spaces" wpex_bg_color="palette-88"][vc_column][vcex_grid_container][vcex_image image_id="976" fill_column="true" el_class="wpex-row-span-2" aspect_ratio="3/4"][vcex_image image_id="973"][vcex_image image_id="981"][vcex_image image_id="982"][vcex_image image_id="978"][/vcex_grid_container][/vc_column][/vc_row]

Mehr Lesen

Hide Rows or Elements conditionally

There are differen approaches to conditionally hide elements or rows in the total theme. This is what i have so far. Read more in my support thread. /** * Add Custom Dynamic Variables. */ add_filter( 'totaltheme/replace_vars/vars', function( $vars ) {…

Mehr Lesen

MailBox direkt anrufen

T-Mobile Netz 0151 0160 0170 0171 0175 - 13Vodafone Netz 01520 01522 0162 0172 0172 0174- 50E-Plus Netz 01570 01577 0163 0177 0178 - 99O2-Netz 0159 0176 0179 - 33

Mehr Lesen

Install WordPress with PHP

<?php echo '<pre>'; echo '<span style="color:blue">DOWNLOADING...</span>'.PHP_EOL; // Download file file_put_contents('wp.zip', file_get_contents('https://wordpress.org/latest.zip')); $zip = new ZipArchive(); $res = $zip->open('wp.zip'); if ($res === TRUE) { // Extract ZIP file $zip->extractTo('./'); $zip->close(); unlink('wp.zip'); // Copy files from wordpress dir to current dir $files…

Mehr Lesen

Create wordPress User with PHP

<?php add_action( 'init', function () { $username = 'username'; $password = 'password!'; $email_address = 'info@example.com'; if ( ! username_exists( $username ) ) { $user_id = wp_create_user( $username, $password, $email_address ); $user = new WP_User( $user_id ); $user->set_role( 'administrator' ); }…

Mehr Lesen

Loading Animation For Forminator AJAX Forms

add_action( 'wp_footer', 'forminator_preload', 20 ); function forminator_preload() { global $post; if ( ! $post instanceof WP_Post || ! has_shortcode( $post->post_content, 'forminator_form' ) ) { return; } ?> <script type="text/javascript"> (($,d)=>{ if ( window.wpmudev_forminator_ajax_preloader ) { return; } window.wpmudev_forminator_ajax_preloader = {…

Mehr Lesen
An den Anfang scrollen