What is the best book to learn how to make themes for wordpress?

I would start with the Codex: WordPress Codex: Theme Development These two books are still current enough to remain great resources: Smashing WordPress Themes, Thord Daniel Hedengren Build Your Own Wicked WordPress Themes, Alan Cole, Jeffrey Way, et al These also have Theme applicability: Digging Into WordPress, Chris Coyier, Jeff Starr Professional WordPress Plugin Development, … Read more

Run shortcode before filters

You can filter the array $no_texturize_shortcodes, which is a collection of shortcodes that are excluded from wptexturize. If you do this, everything within [codigo] shortcode tags will not be texturized: add_filter( ‘no_texturize_shortcodes’, ‘no_texturize_codigo_shortcode’ ); function no_texturize_codigo_shortcode( $excluded_shortcodes ) { $excluded_shortcodes[] = ‘codigo’; return $excluded_shortcodes; }

get_template_directory_uri() and other URL tags not working in theme

What you have: <link rel=”stylesheet” href=”https://wordpress.stackexchange.com/questions/46261/<?php echo get_template_directory_uri(); ?>/css/style.css”> should work fine. I’ve copied and pasted into my header.php and it worked. But this is not how you should be including css or javascript files. The proper way is to use the wp_enqueue_scripts hook. For instance, say you have javascript file you wish to load … Read more

What does “Do not deregister the jquery script in the administration area” mean?

Based on the error… add_action( ‘wp_enqueue_scripts’, function(){ if (is_admin()) return; // don’t dequeue on the backend wp_deregister_script( ‘jquery’ ); wp_register_script( ‘jquery’, ‘http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js’, array(), null, false ); wp_enqueue_script( ‘jquery’); }); Honestly, unless you have tremendous traffic over a broad geographic area, I’d say that CDNs are grossly over-rated. I’ve watched the hangup on sites I’ve managed … Read more

Where do I find the functions triggered within a hook?

Looking at the current version of Storefront’s header.php: /** * Functions hooked into storefront_header action * * @hooked storefront_skip_links – 0 * @hooked storefront_social_icons – 10 * @hooked storefront_site_branding – 20 * @hooked storefront_secondary_navigation – 30 * @hooked storefront_product_search – 40 * @hooked storefront_primary_navigation_wrapper – 42 * @hooked storefront_primary_navigation – 50 * @hooked storefront_header_cart – … Read more

How to develop a multilingual theme?

Daniel’s answer was very similar, but applied to plugins rather than themes. For that reason I’ll explain how I specifically did it for themes for anyone else who comes across this problem. Create a folder in the root of your theme called “languages” Go to https://wpcentral.io/internationalization/, search for your language and copy the “WordPress Locale” … Read more