Can anyone tell some online tuts for plugin development for beginner? [closed]

A good place to start is creating a plugin to replace adding code to your functions.php file and making it “must use”. That way your code additions are independent of your theme. It’s basic and useful and won’t be accidentally removed, or disabled. http://wpninjas.com/how-to-create-a-simple-wordpress-plugin/ https://premium.wpmudev.org/blog/why-you-shouldnt-use-functions-php/ Hope that helps! PS I’m new, so please excuse me … Read more

woocommerce show cities state as dropdown list

I achieved something similar using the woocommerce_default_address_fields filter You can do something in the lines of this to create your new cities: // UPDATE CHECKOUT CITY FIELD add_filter( ‘woocommerce_default_address_fields’ , ‘custom_override_default_address_fields’ ); // Our hooked in function – $address_fields is passed via the filter! function custom_override_default_address_fields( $address_fields ) { // Billing City $address_fields[‘city’][‘type’] = ‘select’; … Read more

WordPress Smart Iframe Browser [closed]

This should get you on track… <iframe src=”https://wordpress.stackexchange.com/questions/224947/javascript:void(0);” frameborder=”0″ style=”display:none;width:100%;margin:0;padding:0;” id=”fullsizeframe”></iframe> <a href=”http://website2.com” onclick=”loadfullsize(this.href);”>Website 2</a> <script>function loadfullsize(url) { fullsizeframe = document.getElementById(‘fullsizeframe’); fullsizeframe.href = url; fullsizeframe.style.height = window.clientHeight; return false; } </script> Note the problem here is you have to insert the iframe HTML directly after the <body> tag (and have no CSS width rules on … Read more

WordPress restriction to the whole website

This can be done as concisely as follows (in your theme functions.php or a plugin): function wpse_231970_lockdown() { if ( ! is_user_logged_in() ) { global $wp; /** * Redirect to login page with redirect back to current request. */ wp_redirect( wp_login_url( $wp->request ) ); exit; } } add_action( ‘template_redirect’, ‘wpse_231970_lockdown’ );

How can i display portfolio images in WordPress?

First Try this to get the thumbnails, $size default is ‘thumbnail’: wp_get_attachment_image( $attachment_id, $size, $icon, $attr ); Second This code not tested with your code. Swap out the (taxonomy) for your tag. Check out this page for more information about the columns you are building in your category page. Manage $taxonomy id columns function my_custom_(taxonomy)_columns( … Read more

Retrieve a post with its ACF repeater fields in wordpress

<?php $the_query = new WP_Query(array( ‘post_type’ => ‘our-partners’, ‘posts_per_page’ => 1, ‘order’ => ‘DESC’ )); if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); if( have_rows(‘slider_partenaires_hp’) ): //”slider_partenaires_hp” is the repeater field // loop through the rows of data while ( have_rows(‘slider_partenaires_hp’) ) : the_row(); // display a sub field value echo “<li … Read more

ACF Plugin WP with list-group – Vimeo [closed]

This code is right ? <?php if(get_field(‘yo’)): ?> <div class=”list-group”> <?php while(has_sub_field(‘yo’)): ?> <a href=”#” data-id=”vimeo-player-1″ data-seek=”<?php the_sub_field(‘dataseek_meta’); ?>” class=”timecode list-group-item list-group-item-action”><i class=”fa fa-play-circle-o” aria-hidden=”true”></i><?php the_sub_field(‘seek_name’); ?><span class=”badge”><?php the_sub_field(‘dataseek’); ?></span></a> <?php endwhile; ?> Thanks