Web Design Weekly #112

Headlines Snap.svg SVG is an excellent way to create interactive, resolution-independent vector graphics that will look great on any size screen. And the Snap.svg JavaScript library makes working with your SVG assets as easy as jQuery makes working with the DOM. (snapsvg.io) Ten years of Sliding Doors of CSS (stuffandnonsense.co.uk) eBook: jQuery Trickshots This useful ebook offers 100 advanced techniques for using jQuery. Based on hands-on knowledge from the author’s experience as a JavaScript programmer, you’ll get a large collection of incredibly useful tips and tricks. Includes 100 HTML5 &…

Web Design Weekly #111

Headlines Ghost Launches to The Public Early this week, Ghost was released to the public. After lots of hype I was a little sceptical but after downloading it and installing it in a few minutes I think it’s a great addition to the blogging world! Congrats to all involved. (ghost.org) Sass site redesigned (sass-lang.com) Find a job with this clever new tactic A lot of web designers and developers are turning to their email for help finding a job. A new service named Jobety delivers jobs in an organized well…

Functions.php in Child Theme – load JS

My theme uses this function to load Javascript and CSS function aitEnqueueScriptsAndStyles() { // just shortcuts $s = THEME_CSS_URL; $j = THEME_JS_URL; aitAddStyles(array( ‘ait-jquery-prettyPhoto’ => array(‘file’ => « $s/prettyPhoto.css »), ‘ait-jquery-fancybox’ => array(‘file’ => « $s/fancybox/jquery.fancybox-1.3.4.css »), ‘ait-jquery-hover-zoom’ => array(‘file’ => « $s/hoverZoom.css »), ‘ait-jquery-fancycheckbox’=> array(‘file’ => « $s/jquery.fancycheckbox.min.css »), ‘jquery-ui-css’ => array(‘file’ => « $s/jquery-ui-1.10.1.custom.min.css »), )); aitAddScripts(array( ‘jquery-ui-tabs’ => true, ‘jquery-ui-accordion’ => true, ‘jquery-ui-autocomplete’ => true, ‘jquery-ui-slider’ => true, ‘ait-jquery-fancycheckbox’ => array(‘file’ => « $j/libs/jquery.fancycheckbox.min.js », ‘deps’ => array(‘jquery’)), ‘ait-jquery-html5placeholder’ => array(‘file’ => « $j/libs/jquery.simpleplaceholder.js », ‘deps’ => array(‘jquery’)), ‘ait-googlemaps-api’ => array(‘file’ => ‘http://maps.google.com/maps/api/js?sensor=false&language=en’, ‘deps’ => array(‘jquery’)), ‘ait-jquery-gmap3-label’ => array(‘file’ => « $j/libs/gmap3.infobox.js »,…

Multiple tag cloud filtering

I am writing a plugin which creates a custom post type and two associated custom taxonomies. The custom post type list/archive page should be filterable by terms in one or both taxonomies i.e not just a filter by one taxonomy term. The filters should be displayed as two separate tag clouds. Does anyone have experience of implementing this functionality and can recommend any suitable plugins? Source: https://wordpress.stackexchange.com/feeds

Custom Taxonomy Leads to 404 Page – Permalink Structure Flushed

I have a CPT: function CPT_init(){ register_post_type(‘custcpt’, array( ‘labels’ => array( ‘name’ => __(‘Products’), ‘singular_name’ => __(‘Product’), ‘all_items’ => __(‘View Products’), ‘add_new’ => __(‘New Product’), ‘add_new_item’ => __(‘New Product’), ‘edit_item’ => __(‘Edit Product’), ‘view_item’ => __(‘View Product’), ‘search_items’ => __(‘Search Products’), ‘no_found’ => __(‘No Products Found’), ‘not_found_in_trash’ => __(‘No Products in Trash’) ), ‘public’ => true, ‘publicly_queryable’=> true, ‘show_ui’ => true, ‘query_var’ => true, ‘show_in_nav_menus’ => false, ‘capability_type’ => ‘post’, ‘hierarchical’ => false, ‘rewrite’ => array(‘slug’ => ‘/products/’, ‘with_front’ => false), ‘menu_position’ => 21, ‘supports’ => array(‘title’,’editor’, ‘thumbnail’), ‘has_archive’ =>…

Use an anchor link to open an iframe inside a WordPress page

My Question: How do you make an anchor link to an offsite webpage that when clicked opens up the offsite webpage as an iframe that is inside a new WordPress page where the WordPress header and footer remain but the iframed webpage shows where the content would normally be? For Example: You have a wordpress page with a series of offsite links. Each link goes to a registration page. The registration page is hosted by a 3rd party website. ____ get_header() ____ Logo.png ____ get_the_content(); Which class do you want…

Set posts of a custom post type to be private by default?

Say I created a custom post type called ‘Private Posts’ ($post_type = itsme_private_posts) and want all posts under the custom post type to be set to ‘Private’ automatically when published i.e. by default. How do I do it? Based on @brasofilo’s answer to a related question on StackOverflow, I tried this: add_filter( ‘wp_insert_post_data’, ‘itsme_cpt_private’, ’99’, 2 ); function itsme_cpt_private( $data , $postarr ) { if( $postarr[‘post_type’] == ‘itsme_private_posts’ ) { $data[‘post_status’] = ‘private’; } return $data; } It doesn’t work i.e. it doesn’t do anything; everything’s the way it was…

Web Design Weekly #110

Headlines Strong words by Mr Coyier Behind the scenes the CodePen team is dealing with a serious spam problem. Chris explains the current situation and shares his thoughts. I feel for you buddy! (the-pastry-box-project.net) Articles Flexbox layout isn’t slow Thanks to a few blog posts about Flexbox some action was taken and now we all have a faster Flexbox to enjoy going forward. A few demos and data explain things clearly. (updates.html5rocks.com) Node.js and the new web front-end Node.js is powerful and opens up amazing possibilities for front-end developers. In…

Get page content and execute shortcodes on a page

I would like to get show multiple page’s content on one page with shortcodes. If I use return $html; the shortcodes not working, if I use return do_shortcode($html); the shortcode working, but the content of the page dissapear. What is the working solution? function get_page_func( $atts ){ extract(shortcode_atts( array( ‘title’ =>  » ), $atts ) ); $page = get_page_by_title($title); $args = array( ‘include’ => $page->ID, ); $pages = get_pages($args); $html = $pages[0]->post_content; return do_shortcode($html); } add_shortcode( ‘get_page’, ‘get_page_func’ ); Source: https://wordpress.stackexchange.com/feeds

WPMU site in subdirectory: When I clone a site with NS Cloner Pro plugin, how do I remove the subdirectory from the URL?

I have a WPMU site in a subdirectory /new/. So my main URL is example.com/new. I have been able to use .htaccess and copy the index.php file into the domain to achieve just example.com for my main site. However… I have the ‘NS Cloner Pro’ plugin which clones WPMU sites in one click (great plugin!) but every clone still has the /new/ subdirectory. So what I want is example.com/clone-site-1/ but what I’m getting is example.com/new/clone-site-1. I’ve tried using www.interconnectit.com « search-and-replace » script to remove /new/ but what happened was I was…