Fixed height of the_content()

If you run a wp_kses() on the_excerpt() (through a filter) you can whitelist specific HTML tags and such. In your case, the code would probably look something like this: if( is_page( ‘your_page’ ) ) { add_filter( ‘the_excerpt’, ‘wpse44363_filter_the_excerpt’ ); } function wpse44363_filter_the_excerpt( $excerpt ) { // this allows no html, you can allow only links … Read more

Add classes + taxonomy terms to wp_list_pages() output

Doesn’t WordPress already at the class current_page_parent, current_page_ancestor and current_page_item (see source). The filter you are using is called on 1046. As for your question, you create the array $content_type and then attempt to make a string out of $the_content_type. Try: function wpse56088_page_css_class( $css_class, $page, $depth, $args, $current_page ){ $terms = get_the_terms( $page->ID, ‘content-type’ ); … Read more

Target admin page body via CSS class

Found this, but it really should be in WordPress Core: // Body class for admin // http://www.kevinleary.net/customizing-wordpress-admin-css-javascript/ function base_admin_body_class( $classes ) { // Current action if ( is_admin() && isset($_GET[‘action’]) ) { $classes .= ‘action-‘.$_GET[‘action’]; } // Current post ID if ( is_admin() && isset($_GET[‘post’]) ) { $classes .= ‘ ‘; $classes .= ‘post-‘.$_GET[‘post’]; } … Read more

Equal height sections in custom Headway Theme

We can do this without touching theme files either by using a child theme or Writing a Custom Plugin, To include only css I’d use plugin rather than a child theme. Example – <?php /* Plugin Name: My Styles Description: My Custom Styles for THEME-NAME */ //Create a `my-style.css` in plugin folder add_action( ‘wp_enqueue_scripts’, ‘wpse64258_custom_styles’ … Read more

customize continue reading

the css class .meta-nav might or might not be referenced in style.css or any other stylesheet of the theme. if your theme is Twenty Ten then the css class is not used in style.css – add it as a new style if you need.

calling an additional css and js links for a custom page template

wp_register_script( $handle, $src, $deps, $ver, $in_footer ); wp_register_style( $handle, $src, $deps, $ver, $media ); if (!is_admin()) { add_action(‘wp_enqueue_scripts’, ‘my_js’); // for js add_action(‘wp_enqueue_scripts’,’my_style’); // for css } function my_js(){ if(is_page(page id)){ // or is_page_template(page slug) wp_register_script( ‘port-js’, get_template_directory_uri() . ‘/portfolio-js.js’); wp_enqueue_script( ‘port-js ‘); } } function my_style(){ if(is_page(page id)){ // or is_page_template(page slug) wp_register_style( ‘port-style’, … Read more

Loading bbPress CSS file only on forum directory

The styles are enqueued in the function enqueue_styles() inside the file /wp-content/plugins/bbpress/templates/default/bbpress-functions.php. It’s a matter of using is_bbpress() and wp_dequeue_style. Only one of the styles is enqueued, but here we’re removing all 3 possibilities. add_action( ‘wp_enqueue_scripts’, ‘bbpress_enqueue_wpse_87081’, 15 ); function bbpress_enqueue_wpse_87081() { // Check if bbpress exists if( !function_exists( ‘is_bbpress’ ) ) return; if( !is_bbpress() … Read more

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