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

CSS images don’t show up with bloginfo

If your style.css is in /wp-content/themes/themedirectory, and your image is at /wp-content/themes/themedirectory/images/image.jpg, then your css will be this: background-image: url(“images/image.jpg”); You can’t use php in a css file, it will not parse unless included via php (instead of with <link>).

Use conditionals with wp_enqueue_style to attach stylesheet according to post type displayed

The issue in your first block of code is syntax: if( get_post_type() == ( ‘activity’ OR ‘dining’ OR ‘heritage’ OR ‘hiking’ OR ‘nightlife’ ) ) : this isn’t proper use of OR and will evaluate true regardless of what get_post_type() returns. The issue in your second block is again syntax, you have to break; at … Read more

WordPress Plugin Authoring question about jquery and css

One point for using wp_enqueue_script is for that very reason. Never assume anything, enqueue jQuery so that if it is there already it does nothing, but if not , it will queue it up. If your talking about the image path for your plugin, you can use the following, http://codex.wordpress.org/Determining_Plugin_and_Content_Directories The examples for plugins_url should … Read more

How to separate each individual blog post?

You can do that entirely with CSS, almost no PHP coding required… try something like this: <div id=”services”> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> <?php the_content(); ?> </div> <?php endwhile; ?> <?php endif; ?> </div> … that way, each … Read more