You appear to be a bot. Output may be restricted
Description
Return the default selector for the theme's background imageIn the first prototype we were probably doing this all wrong… By default, the [bw_background] shortcode now applies the background to the body Using the selector parameter you can override where the background image is to be targeted Note: Some themes display the featured image prominently so using it as a background may not look right at all
Default selector | Theme | area selected |
---|---|---|
article .entry-content | Twenty Twelve | article content – not the title |
article.art-article | Artisteer 4.1 | article whole area |
article.hentry .art-postcontent | Artisteer 4.1 | article content, not the title |
body | Genesis framework? | article content, not the title |
Usage
$string = bw_default_selector_for_theme();
Parameters
Returns
string the CSS selector to targetTO DO
This code is wrong – it only produces the right result for Artisteer 4.1 themes. Extend for other themes based on table aboveSource
File name: oik-css/shortcodes/oik-background.phpLines:
1 to 7 of 7
function bw_default_selector_for_theme() { //$selector = apply_filters( "bw_default_selector_for_theme", "article .entry-content" ); //$selector = apply_filters( "bw_default_selector_for_theme", "article.art-article" ); //$selector = apply_filters( "bw_default_selector_for_theme", "article.hentry .art-postcontent" ); $selector = apply_filters( "bw_default_selector_for_theme", "body" ); return( $selector ); }View on GitHub View on Trac