Tag Archives: Wordpress

Floating images with the Display Posts plugin

It’s a great plugin bit the view is a bit clunky if you are displaying thumbnails and exerpts. Try adding the CSS below:

/* ICENI CUSTOM CSS */
.display-posts-listing img{
    float: left;
    margin: 0px 10px 10px 10px;
}
.display-posts-listing li{
    clear: both;
    list-style: none;
}

This can be added at the bottom of a CSS file or through the GUI at Appearance > Customise > Additional CSS

Tags and Categories on Pages

I’ve thrown together this plugin to sort this!

<?php
/*
Plugin Name: Enable Tags in WordPress Pages
Plugin URI: http://www.sitepoint.com/
Description: Enables tags in all content
Version: 1.0
Author: Craig Buckler
Author URI: http://twitter.com/craigbuckler
License: Free to use and adapt
*/

// add tag support to pages
function tags_support_all() {
	register_taxonomy_for_object_type('post_tag', 'page');
}

// ensure all tags are included in queries
function tags_support_query($wp_query) {
	if ($wp_query->get('tag')) $wp_query->set('post_type', 'any');
}

// tag hooks
add_action('init', 'tags_support_all');
add_action('pre_get_posts', 'tags_support_query');

Excerpts on Pages

Add the following to the Functions.php file…

/**
 * Enables Excerpts on Pages
 */
function enable_page_excerpt() {
  add_post_type_support('page', array('excerpt'));
}
add_action('init', 'enable_page_excerpt');

Adding it manually is a bad idea and I should stop being lazy so here is the same thing as its own plugin!

<?php
/*
Plugin Name: Enable Excerpts in WordPress Pages
Plugin URI: http://www.icenidesign.com/
Description: Enables Excerpts on pages
Version: 1.0
Author: Tom Nickel
Author URI: http://twitter.com/icenidesign
License: Free to use and adapt
*/


function enable_page_excerpt() {
  add_post_type_support('page', array('excerpt'));
}
add_action('init', 'enable_page_excerpt');

Save it as a php file in a folder of the same name and upload it to the plugins folder.

SSL for WordPress

https://wpbarista.com/force-wordpress-ssl-https/

http://www.wpbeginner.com/wp-tutorials/how-to-fix-error-too-many-redirects-issue-in-wordpress/

https://managewp.com/blog/wordpress-ssl-settings-and-how-to-resolve-mixed-content-warnings

The links above are pretty good so follow them but I would use the following amendment to the .htaccessfile…

# HTTP to HTTPS redirect
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://alliance-systems.co.uk/$1 [R=301,L,NE]

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

Make sure you put the rewrite section ABOVE the default WordPress section.