Varying Search Result Pages

you can add an hidden filed to your search form and include a different template based on that: <form role=”search” method=”get” id=”searchsupport” action=”https://wordpress.stackexchange.com/”> <label class=”screen-reader-text” for=”s”>Search for:</label> <input type=”text” onfocus=”if (this.value == ‘Search’) {this.value=””;}” onblur=”if (this.value == ”) {this.value=”search”;}” id=”s” name=”s” value=”search” class=”search-form round”> <input type=”hidden” id=”searchsubmit”> <!– this is the magic field —> <input … Read more

How to load parent theme style.css?

At the top of your child themes style.css add: @import url(“../twentyeleven/style.css”); Obviously replace twentyeleven with your parent themes folder. 2016 – This practice has now been replaced by declaring the ‘Template’ in your theme stylesheet header: Template: twentyfifteen https://codex.wordpress.org/Child_Themes

Display a specific dynamic sidebar widgets on a specific page

I think what you might need is simply to run register_sidebar() in an ‘widgets_init’ hook. The TwentyTen theme has examples for register_sidebar() in its functions.php file, but here’s what it might look like: add_action( ‘widgets_init’, ‘twentyten_widgets_init’ ); function twentyten_widgets_init() { register_sidebar( array( ‘name’ => __( ‘News Sidebar’, ‘yoursite’ ), ‘id’ => ‘sidebar-news’, ‘description’ => __( … Read more

Changing $before_widget for certain widgets

There are 2 ways to allow separate styles on each widget. The first is to add separate classes to the widgets like this: First Method register_sidebar(array(‘name’=>’sidebar1’, ‘before_widget’ => ‘<ul class=”black-bg”><li>’, ‘after_widget’ => “</li></ul>”, ‘before_title’ => ‘<h2 class=”widgettitle”>’, ‘after_title’ => “</h2>” )); You can then use the .back-bg class to style the widget like this: #sidebar … Read more

How to Insert Shortcodes into Theme?

You can hardcode shortcodes into a theme using do_shortcode. http://codex.wordpress.org/Function_Reference/do_shortcode echo do_shortcode(‘[wp-like-locker] Your locked content here… [/wp-like-locker]’); You will most likely want to replace the hard-coded “Your locked content here…” with the function that pulls the content from the editor, like the_content http://codex.wordpress.org/Function_Reference/the_content It might look like // the loop $content = get_the_content(); echo do_shortcode(‘[wp-like-locker]’ … Read more

Translated my theme (translation not showing up)

You have incomplete code. You register your Theme’s textdomain, but don’t actually tell WordPress to load your translation files. To this: load_theme_textdomain(‘INTERluminaires’, get_template_directory() . ‘/languages’); Add this: $locale = get_locale(); $locale_file = get_template_directory() . “/languages/$locale.php”; if ( is_readable( $locale_file ) ) { require_once( $locale_file ); } Or, altogether (and wrapped properly in a callback): <?php … Read more