Web Design Weekly #132

Headlines People Skills for Web Workers As the web continues to transform our society—in ways that both excite us and scare us—we need more than new technologies to keep up. We need collaboration. (alistapart.com) 100 Premium Infographics from Ingimage With this bundle you’ll get 100 different high-quality infographics to help bring your data to life. Available as EPS files. Normally sells for $99, but for a limited time, you can get all 100 high-quality infographics for just $18 (82% off). See the examples. (mightydeals.com) Articles Virtual Reality in the browser…

Admin toolbar shows up when not logged in

I’m running into a Major trouble. Today I found out that when visiting a specific URL on my website, the admin toolbar shows up. Also for people who are not logged in. It appears that the visitor is logged in, but that’s not true. All the links in the toolbar go to a 404 page. However, important information is being shown, like how many plugins need an update and even my login name. Is anyone familiar with this? Since it is a corporate website, I need a fix as soon…

display posts with same taxonomy term

I’m trying to display 5 related posts in the loop, those related posts being posts that share the same taxonomy value. e.g. I have a custom taxonomy set up called venues thus each post has a venue taxonomy value assigned to it, so in each post I want to display 5 others posts that share the same taxonomy value (i.e. are at the same venue). The code I have so far doesn’t work quite right: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $custom_terms…

How to add product images using script?

I have few hundred products on woocommerce without images. I am planning to upload images in future. Images have same name as the SKU of product (+.jpg). Is there a way I could write a script that adds this image as product image and featured image of the SKU = name of this image(-.jpg)? Source: https://wordpress.stackexchange.com/feeds

Throttle Bandwidth for Testing

Working with a fast internet connection on a day-to-day basis is a real privilege. it’s easy to forget that others are less fortunate. With a recent vacation to “slow internet land” this really hit home. So much so, once being back in “fast internet land” I explored the different ways to throttle bandwidth for testing. Since then, I’ve made a pact to myself to incorporate bandwidth testing into my go-live checklist. After a little research, here are few different methods that I discovered. Network Link Conditioner If you develop on…

Choose tools you’ll use

https://the-pastry-box-project.net/addy-osmani/2014-March-26 Addy Osmani: If you’re new to front-end development, I suggest staying close to the grain: just use HTML, CSS and JavaScript. Build with them, learn them inside out, experiment with them. These languages have some amazing primitives that we sometimes forget the raw power of. With so many tools being released every week it sure is easy to be overwhelmed. The main takeaway from this great post by Addy is to “keep it simple for as long as possible”. I couldn’t agree more. Source: web design weekly

Change the file path on get_template_part via plugin

I’m trying to make a plugin that will change the behavior of a theme. In the theme file I have a get_template_part(‘libs/templates/user_menu’);. I want to make my plugin « force » the get_template_part to return another slug file (a path to a file in the plugin’s folder). So far this is my code inside the plugin: function wpse21352_template_part_cb( $slug ) { if(slug == ‘user_menu’) { return WP_PLUGIN_URL.’/’.$slug; } else { return $slug; } } do_action( « get_template_part_user_menu », ‘user_menu’ ); add_action( ‘wpse21352_template_part_cb’, ‘get_template_part_user_menu’, 10, 1 ); Source: https://wordpress.stackexchange.com/feeds

WordPress taxonomy radio buttons

I am trying to change the checkboxes for the terms on the backend to radiobuttons. I found this topic: Altering the appearance of custom taxonomy inputs however wich helped me doing this. However, this will turn ALL terms checkboxes to radio buttons. Is it possible to apply this only for one taxonomy? My code: add_action(‘add_meta_boxes’,’mysite_add_meta_boxes’,10,2); function mysite_add_meta_boxes($post_type, $post) { ob_start(); } add_action(‘dbx_post_sidebar’,’mysite_dbx_post_sidebar’); function mysite_dbx_post_sidebar() { $html = ob_get_clean(); $html = str_replace(‘ »checkbox »‘,' »radio »‘,$html); echo $html; } thanks Source: https://wordpress.stackexchange.com/feeds

Custom Post Type Alerts

I setup a custom post type and everything works right. The user can submit for review and I see it’s pending in the admin area. How can I have WordPress send me an Email Notification whenever a user submits a post? add_action( ‘init’, ‘artwork_feature’); function artwork_feature() { register_post_type( ‘artwork’, array( ‘labels’ => array( ‘name’ => __( ‘Artwork’ ), ‘singular_name’ => __( ‘Artwork’ ) ), ‘public’ => true, ‘exclude_from_search’ => false, ‘capability_type’ => ‘artwork’, ‘supports’ => array(‘custom-fields’, ‘comments’), ‘capabilities’ => array( ‘publish_posts’ => ‘publish_artworks’, ‘edit_posts’ => ‘edit_artworks’, ‘edit_others_posts’ => ‘edit_others_artwork’, ‘delete_posts’…

How to tell a theme to use different .mo and .po files?

I have a theme which loads .po and .mo files to display strings in English. I want to have only one language (Polish), but those two files are en_US. I tried replacing content in the en_US.po file but nothing changed on the website, I do not know why. Where does it store strings if changing .po files changes nothing? Source: https://wordpress.stackexchange.com/feeds