Display logged in user name and lastname on page

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

How do I use an iFrame for my header in WordPress twenty seventeen?

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 –>

Adding image upload in tag section – WordPress plugin development

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