If you manage a multi-author blog and want authors to avoid using certain words or phrases, then this will come in handy. If an author has publishing rights, then the unwanted words can go live on your website. You can prevent this by taking away publishing privileges from users, but this means more work for you as you will have to review and publish posts yourself. So in this tutorial, we will show you how to create a list of forbidden words for WordPress titles.
Display Random Posts in WordPress
This method requires you to add code to your WordPress theme files, so exercise caution. Continue reading “
How to Include Category and Subcategory in WordPress URLs
WordPress comes with two built-in taxonomies to sort your content. They are called categories and tags.
As you probably know, categories are typically used for more broader topics and can have subcategories. However, if you are using the default WordPress URL structure, then your categories and subcategories are not included in the post URLs by default.
How to Link to External Links from the Post Title in WordPress
Do you want to add an external link as post title in WordPress? Sometimes you may just want to share a link with your users. Instead of sending them to a post, you may want the post title to link to the other website. In this tutorial, we will show you how to link to external links from the post title in WordPress.
Manually Create a Sticky Floating Footer Bar in WordPress
A sticky floating footer bar allows you to prominently display your important content to users. This bar remains visible to users at all time, so they are more likely to click on it and discover more useful content.
This method requires you to add code in your WordPress files, so we will be using the File Manager plugin, already installed on the DkIT WordPress servers.
Getting Started with the Computing Department WordPress Infrastructure
The Department of Computing & Mathematics at DkIT has a very advanced WordPress Infrastructure for use by students in their class work and end of year projects. We use a Viglen IX2300 (2 x Quad Core Xeon CPUs, 12 GB RAM, 2 x 146 GB SATA disks) for the primary web server, and two Viglen HX2220i units provide MySQL Database Replication, failover and load balancing services to the master web server. These servers are all powered by Debian Linux.
Also, traffic to the servers is cached at the college’s main reverse proxy server (regardless of source). The result is a very fast setup indeed!
Using the WordPress functions.php file
functions.php or the theme functions file is a template used by WordPress themes. It acts like a plugin and gets automatically loaded in both admin and front-end pages of a WordPress site. Usually this file is used to define functions, classes, actions and filters to be used by other templates in the theme. It can be used to add features and extend the functionality of both the theme, and the WordPress installation.
Use Google’s Copy Of JQuery in WordPress
Grabs jQuery from Google’s CDN which your visitors will hopefully have cached. This can then be called in your header with <?php wp_enqueue_script("jquery"); ?>
// Call the google CDN version of jQuery for the frontend // Make sure you use this with wp_enqueue_script('jquery'); in your header function itlc_jquery_enqueue() { wp_deregister_script('jquery'); wp_register_script('jquery', "http" . ($_SERVER['SERVER_PORT'] == 443 ? "s" : "") . "://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js", false, null); wp_enqueue_script('jquery'); } if (!is_admin()) add_action("wp_enqueue_scripts", "itlc_jquery_enqueue", 11);
Custom Excerpt Length in WordPress
Define how many words to return when using the_excerpt();
.
//custom excerpt length function itlc_custom_excerpt_length( $length ) { //the amount of words to return return 20; } add_filter( 'excerpt_length', 'itlc_custom_excerpt_length');
Post Thumbnails in WordPress RSS Feed
Include the post thumbnail in your RSS feed.
// Put post thumbnails into rss feed function itlc_feed_post_thumbnail($content) { global $post; if(has_post_thumbnail($post->ID)) { $content = '' . $content; } return $content; } add_filter('the_excerpt_rss', 'itlc_feed_post_thumbnail'); add_filter('the_content_feed', 'itlc_feed_post_thumbnail');