Adding wp users ID into a link address from a DIVI modul
Adding wp users ID into a link address from a DIVI modul
Adding wp users ID into a link address from a DIVI modul
You can always do a var_dump() of $current_user to see what it contains. You’ll see there is a similar property to user_firstname: user_lastname. You’ll probably want a space between the first and last name, so a small edit should add the last name: function custom_shortcode_func() { ob_start(); $current_user = wp_get_current_user(); echo ‘Willkommen ‘ . $current_user->user_firstname … Read more
This is possible, but it’s not a best practice. Animations are cool, but iframes add complications and slow down the page load speed. If you want to see what it looks like, edit this file: ../wp-content/themes/twentyseventeen/template-parts/header/header-image.php And change the custom header div to this: <div class=”custom-header”> <iframe scrolling=”no” width=”100%” height=”1000px” src=”http://robinseggstudio.com/homePage_12-5c/RobinSketch/”></iframe> </div><!– .custom-header –>
If it is the user ID, that you need to pass to the shortcode, then you can first use get_current_user_id() to get the ID. After that, use it int the shortcode string. Depending on the shortcode and your exact use case either check, if the ID is 0, or don’t. With check, // user ID … Read more
How to detect and handle the time difference between server and user in WordPress?
PHP Warning: exif_imagetype
How do I set a hidden field to a value?
I handle this with AJAX. Bellow is the solution. HTML: <label><?php _e( ‘Featured Image’, EG360_TEXT_DOMAIN ); ?></label> <div id=”eg360_tax_image” style=”float: left; margin-right: 10px;”> <img src=”<?php echo esc_url( eg360_placeholder_image() ); ?>” width=”60px” height=”60px”/> </div> <div style=”line-height: 60px;”> <input type=”hidden” id=”eg360_tax_image_id” name=”eg360_tax_image_id”/> <button type=”button” class=”upload_image_button button”><?php _e( ‘Upload/Add image’, EG360_TEXT_DOMAIN ); ?></button> <button type=”button” class=”remove_image_button button”><?php _e( … Read more
This is what you want to achieve as I understand: If a post is assigned to a child category, then remove it and show only its parent on the categories list of that post. You can use the following code to achieve that for any child category: add_filter(‘get_the_terms’, function($terms, $postId, $taxonomy) { // Return early … Read more
Decode and Decrypt Azure B2C OpenID Authorization Token, Use Response in API Call (Example Token Within)