Template setting is not saving in wordpress

Try naming the file page-template-articles.php but leave the file contents and header name – “Template Name: Articles” the same. Right now, you might be running into a reserved naming collision within WP with how Custom Post Type templates are named, i.e. articles-page.php is a page template name for a CPT called articles.

how to register / add multiple options into one field in wordpress?

Just set the name attribute in your checkbox tag in the format like: favourite_colors[]. The following code is derived from this thread. add_settings_field( ‘favourite-colors’, ‘Select your favourite colour’, ‘favourite_colors_checkbox_callback’, ‘my-settings’ ); function favourite_colors_checkbox_callback() { $options = get_option( ‘favourite_colors’ ); $html=”<input type=”checkbox” id=”red” name=”favourite_colors[red]” value=”1″” . checked( 1, $options[‘red’], false ) . ‘/>’; $html .= ‘<label … Read more

How to support extra color options for shortcodes?

You have multiple options. A) Use inline-CSS: <button style=”background: <?php echo CHOSEN_COLOR_HERE (possibly validated) ?>;”> … </button> B) Write (ID-specific) CSS styles into your page. In your shortcode function, echo a <style> tag, for instance like so: <style> #shortcode-button-1 { background: <?php echo CHOSEN_COLOR_HERE (possibly validated) ?>; } #shortcode-button-2 { background: <?php echo CHOSEN_COLOR_HERE (possibly … Read more

Custom page template in warp7 (Yootheme template)

The whole doco thing for Warp is confusing. You are supposed to use one of the styles configured under the theme, and you’ll find those in a folder such as: /wp-content/themes/yoo_avenue_wp/styles/red Add your /layouts folder under here, then copy in any file you want to override from the folder: /wp-content/themes/yoo_avenue_wp/warp/systems/wordpress/layouts These are then the files … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)