irislines web design
irislines web design

Posts Tagged ‘WordPress’

Continue Reading in Warp 7 themes

This from a yoo_theme support thread:

Step 1: Make a copy of the file below:

/yoo_theme_wp/warp/systems/wordpress/layouts/_post.php 

create the /styles/STYLE-NAME/layouts directory, copy the file in there and start adding your own PHP code. 

Placing the <!–more–> will always show the text link for more content as well as serve as a way to identify where the post content should be cut off on archive / search pages. If you place the <!–more–> tag at the end of the post content, the text link for more content will still display.

In addition to Bruce’s suggestion, I’d use the following line instead:

<div class="content clearfix"><?php the_content(__('Continue Reading', 'warp')); ?></div>

This will preserve your theme translations via the theme provided PO file.

Also, remember to remove or comment out the line below:

<a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php _e('Continue Reading', 'warp'); ?></a>

WordPress – error in establishing database connection.

This happened today when trying to view the front end of a site.

1.  I  tried to access the wp-admin.

2. A message came up saying one or more tables needed to be repaired.

3. I followed instructions for adding define(‘WP_ALLOW_REPAIR’, true);  to the config.php file.

4.  I tried again to load wp-admin and was offered the choice to have it attempt database repair.

5.  It failed.

6.  I went to phpMyAdmin and selected the wp_options table and initiated repair.

7.  Happy Ending.   All is well again.

 

yoo_master2 theme lacks support for “readmore” in WP

Solution:

in warp/systems/wordpress/layouts/_post.php  find this:

<?php the_content(''); ?>

and replace with :

<?php global $more; $more = 0; the_content('Read the full article...');?>

Then lower down in the document find and comment out the Continue Reading link which would appear whether you had added “more” break or not.

<!--<li><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>">
<?php _e('Continue Reading', 'warp'); ?></a></li>-->

 

 

WordPress 3.9 TinyMCE4 Custom Styles

WP 3.9 TINYMCE4   modifications:

I added this:

function mce_mod( $init ) {

   $init[‘block_formats’] = ‘Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4’;

   $style_formats = array (

       array( ‘title’ => ‘testimonial’, ‘block’ => ‘blockquote’, ‘classes’ => ‘testimonial’ ),

       array( ‘title’ => ‘bold but not LOUD text’, ‘inline’ => ‘span’, ‘styles’ => array( ‘font-weight’ => ‘bold’ ) ),

      

   );

   $init[‘style_formats’] = json_encode( $style_formats );

   $init[‘style_formats_merge’] = false;

   return $init;

}

add_filter(‘tiny_mce_before_init’, ‘mce_mod’);

function mce_add_buttons( $buttons ){

   array_splice( $buttons, 1, 0, ‘styleselect’ );

   return $buttons;

}

add_filter( ‘mce_buttons_2’, ‘mce_add_buttons’ );

to yoo_master/functions.php

I also added my styles to   wp-content.css   at

wp-includes/js/tinymce/skins/wordpress/wp-content.css

WordPress BigMailChimp pluggin caused conflict with Contact forms

I tried multiple Contact forms and none of them would display Thank You message or redirect to a Thank You page.   Forms were submitting data just fine as I got all the emails  (sender and admin emails).

So… I began to disable other plugins to see if the conflict would be solved.   Lucky me!   The first plugin I disabled was BigMailChimp  – a signup form plugin and with it gone,  everything was fine.

Widgetkit provides responsive slideshow solution

I had discovered widgetkit when I needed a great mp3 player that did not rely on flash.  Widgetkit ALSO provides a pretty friendly slideshow solution that does not combine cropping and resizing as the ckslideshow extension does.

CK Slideshow might be a good solution if your slide images won’t suffer from being cropped — the smaller images delivered on a mobile device will be a vertical slice of your horizontal banner image, rather than just a proportionately reduced banner.    In some cases this would be a better solution — but banner images would have to have good content in the middle of the banner image and often that is NOT the composition we’d prefer for the larger images.

Tradeoffs!  

Omeka and Word Press on same server…

I’m working on a project that started out as a word press blog with an installation of Omeka in a sub-directory.   Once enough work was done in Omeka  they wanted that at the root url.   OK.  Rather than uninstalling the WP site,  I moved it to a sub-directory,  moved Omeka up and all was well.   I tested access the the WP site in its new location before moving Omeka, and all was well.

But…   today they tell me they want a blog, too — so I figure I’ll just link to the install we already have and all will be well.

Not.   Omeka’s htaccess includes code to disable any .php other than their own index.php and although I could SEE the blog,  I couldn’t access the wp-admin.

Omeka’s Google group archive revealed the solution:

I added this:

 

# suggested in Omeka google group # Disable URL rewriting within this directory
RewriteEngine Off

# Undo Omeka’s .php blocking

    Order Deny,Allow
    Allow from all

to the .htaccess in the wordpress  subdirectory  and — problem solved!

Let’s hear it for support groups,  and google for helping us find the relevant posts!

 

wordpress line breaks…

I was pasting in nice clean html code on Scott Kellogg’s new site and Word Press was providing me with a line break on every line of the paragraphs.  Not coded,  in html view, there were no <br /> tags — just short lines of text — much narrower than the stylesheet would allow.

I googled “pasting html into word press line breaks”  and instantly found a cure.

I had to modify some core php file in the /wp-includes/ folder  so I’ll have to remember this when upgrading.

In the file formatting.php

I had to find the line:

function wpautop($pee, $br = 1)

and change it to :

function wpautop($pee, $br = 0)

It worked!

IrisLines LLC
101 Washington Street
Brattleboro, VT 05301

802 257 7391

info@irislines.com