When does WordPress wrap inline scripts in CDATA?

Actually, it is not WordPress that is inserting the CDATA tags, but the visual editor, TinyMCE. Details of TinyMCE are offtopic here, but you can read a solution to this on Stackoverflow. That said, stopping TinyMCE may not be the full solution you want. WordPress itself also has a function for adding CDATA tags, wxr_cdata, … Read more

Can I obtain differents links for different installed theme?

I’ve done for this myself using the plug-in theme switcher: http://wordpress.org/plugins/theme-switcher/ (yes, it hasn’t been edited in 2+ years). These theme stores a cookie in the browser indicating which theme the user has selected (themes are displayed as a drop-down / link list widget – and selecting a theme changes the cookie and redirects you … Read more

Edit raw HTML of the landing page

It is very strange to me that you are using WordPress and want a “pure html+css+js page”. That sort-of defeats the purpose of using WordPress, and honestly building with PHP is so much more convenient and powerful that I never want pure HTML anymore. But here is how to do it… You could dig through … Read more

Move custom code out of theme’s functions.php file

In previous questions you mentioned that you created a child theme and installed the multiple themes plugin so that you could put code on a specific page on your site. So you’ve been using child themes in a way that they weren’t intended to be used. Instead, think of a child theme as a transparency, … Read more

How can I customize the search results in Bones theme?

Filter ‘the_excerpt’ on the search page only: add_filter( ‘the_excerpt’, ‘wpse_99415_search_excerpt’ ); function wpse_99415_search_excerpt( $excerpt ) { if ( ! is_search() ) return $excerpt; global $post; // create a custom excerpt return $custom_excerpt; }

Register theme customizer settings when theme activates [duplicate]

You need only use the default value on the wp_customize and that is all $wp_customize->add_setting(‘mytextoption’, array( ‘default’ => ‘defaultvalue’, ‘capability’ => ‘edit_theme_options’, ‘type’ => ‘option’, replace defaultvalue for the value you want, and when the user activate the theme this line will register the default value on the DB only when not exist on the … Read more