WordPress aggressively caching CSS

WordPress doesn’t actively participate in the process of actually serving your stylesheet file. It links to it in page source, but as actual physical file the handling of it isn’t done by WordPress core and passed to the webserver to be served as any static file would be. ?ver=3.9.1 is added by default, if actual … Read more

prevent HTML output if custom field is empty [closed]

Just a simple php if to check the contents of the field before outputting markup. <?php if( $second_comment = get_field(‘second_content_block’) ){ ?> <div class=”page-content-text-additional”> <?php echo do_shortcode(“[vr_jsp] $second_comment [/vr_jsp]”); ?> </div> <?php } ?> You can eliminate the need for adding the class via js using the same method. Some friendly advice- spending a day … Read more

Use special fonts on a non-hosted WordPress blog

@Clemzd First off you @font-face css is missing a few lines that are required for a font to work correctly across all browsers and platforms. You only have one src url in your @font-face css. Take a look at how my @font-face css is written. My font files are inside a folder called fonts inside … Read more

Overwriting forced wordpress CSS styles [closed]

Some of these plugins and frameworks allow you to disable the default styles which then allows you to copy theirs and then alter it for your theme. But let us say that isn’t going to be possible. Then you need to have a higher CSS selector precedent than their CSS. The easiest way to copy … Read more

WordPress Caption Formatting

Don’t know what was the actual problem. Using following syntax to display content solved problem. <div> <h tag><?php the_title(); ?></h tag> ………….other things like date and author <div> <?php the_content(); ?> </div> </div> Any way, thanks for everybody who tried to answer my question.

How to style text in WordPress

In the latest version of WordPress, there a text color option in the default WYSIWYG, which is TinyMCE. Look for this option: Custom styling for tables is not supported by default in WordPress.

Conditionally print css style in WordPress

Use the function body_class() in your templates: <body <?php body_class(); ?>> This creates extra classes on the body element. Then filter its values in your functions.php: add_filter( ‘body_class’, function( Array $classes ) { if ( $GLOBALS[ ‘isBoxedLayout’ ] ) $classes[] = ‘isBoxedLayout’; return $classes; }); Now you can move all CSS declarations for that to … Read more

With over a page of content the footer remains where the bottom of the screen was at top scroll

Good news, I seem to have fixed the code. I cleaned up the code for #colophon. I changed it from this: #colophon { background:url(http://kjel.ca/wp-content/uploads/2014/12/footer-img.jpeg) repeat-x bottom center; height:80%; width:100%; position:absolute; margin:0; padding:0; bottom:0; min-width:100%; min-height:1%; } To this: #colophon { background: url(“http://kjel.ca/wp-content/uploads/2014/12/footer-img-2.jpeg”) repeat-x scroll center bottom transparent; height: 100%; position: absolute; width: 100%; background-size: 100% … Read more