Use child theme on certain pages and not others?

you can use page templates for that if you have a page template within your them, and if its a different theme all together then you can use Page Theme which is a plugin that can be used to display a different theme (not template) for each page/post of your blog.

Linking to Child Theme PHP Files

Theme/Parent Theme/Child Theme usage is irrelevant here. Content is not added via Theme template file, no matter what Theme you use. Go to Dashboard -> Pages, and add new static Pages for each of your site’s pages. WordPress will generate them, and the Theme will display them. Edit ok so I figured out that I … Read more

Localize strings for translation

Always keep in mind: your translators might need need to reorder all words. So you cannot insert dynamic values into translatable strings like you did here. Use sprintf() or printf() and placeholders instead: $string = _x( ‘This article has %s words to read’, ‘%s = number of words’, ‘your_textdomain’ ); printf( $string, number_format_i18n( str_word_count($post->post_content) ) … Read more

Order of stylesheets in child theme

The function wp_enqueue_style has the param $deps for depends. $deps (array) (optional) Array of handles of any stylesheet that this stylesheet depends on; stylesheets that must be loaded before this stylesheet. false if there are no dependencies. Default: array() Use this param to define the dependencies and you have an order. function blue_planet_scripts() { wp_enqueue_style( … Read more

How to use custom stylesheet only for a template in child theme

Try this: add_action( ‘wp_enqueue_scripts’, ‘my_custom_styles_function’, 100 ); function my_custom_styles_function(){ if (is_page_template(‘test-template.php’)) { wp_enqueue_style( ‘my-custom-css’, get_stylesheet_directory_uri() . ‘/custom-style.css’ ); } } wp_enqueue_scripts hook is used for including new stylesheet. Here template is test-template.php. Change it with your template. Stylesheet will only be included in your page template.

How to extend parent theme sections and settings to Options Tree

For anyone who want to achieve the same thing : add_filter( ot_settings_id() . ‘_args’, ‘my_ot_setting’); function my_ot_setting($custom_settings){ //do some work with the settings and the sections, ie append your settings. return $custom_settings; } This works if the parent theme applies this filter before saving the options like the example here : https://github.com/valendesigns/option-tree-theme/blob/master/inc/theme-options.php#L833 Otherwise you have … Read more

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