Posts Tagged ‘WordPress’

7 June, 2015 — Blogging, Life

Wow, That was a Long Breaks…

I’m back… after a long break from Blogging… Why was I gone so long I hear you asking? Well I will outline just that has changed and what caused my lack of posting here on ThatBlogger…

New Company

Flow Online MarketingAs some of you may know I was working for a local marketing agency close to where I live. After working there for about 4 years I decided it was time to take the plunge and setup my own marketing company.

This wouldn’t be my first company, as I had already been running a first aid training company on the side to my normal job, so had already got the basics of business.

So in September 2014 I handed in my notice, got an office at a new enterprise park near where I live and started on my own. Running the two companies became very time-consuming working on client projects and sorting all the tax and accounts meant that I lost the free time I had to blog. 10 months later I am still going having secured enough work to keep me going. You can check out my company website here. Let me know in the comments what you think!

New Job

NHS-logoHaving just told you I have started my own company, I also now have another job!

For a long time now I have been trying to work my way up and gain experience with the view to join the Ambulance Service here in the UK. After years of doing just that, I found myself applying for jobs at my local NHS Trust not really thinking much about it other than filling in the application form as I had been doing for months before. However one day after coming back into the office after a meeting, to my surprise I had been asked to attend an assessment day for a chance to be selected to work in my dream job. I went to the assessment day thinking it was worth a go and if it doesn’t work, it doesn’t work but the closer it got to that day the more I wanted it.

About a week after passing all the assessment tests and interview I was waiting to see if I had been selected for a space of 200 from a list of 3000 people. Then that call came! I had got that job!

A few months on with the paperwork coming along I am not just waiting for my course to start in July. Wait… What about my companies…? Well I am still going to run those companies. Just on more of a part-time basis.

New Blog Theme

Now I am back blogging I thought it was about time I updated the ThatBlogger theme. I took a few hours our of working on client projects to quickly code up a new theme. Which is the theme you are seeing now! Let me know in the comments that you think about it?

Holiday (again)

Yep… It’s that time of year when people start to go away on their summer holidays! That is exactly what me and my girlfriend are doing. On Tuesday next week (10 June) we are off to Mexico for 2 weeks so the blogging well slow down slightly while I am away but I will make sure I upload some photo blogs so you guys can see what I am up too!

So What Now?…

I am going to try to blog now as much as I can and keep you updated with the goings on in my life, code, reviews and general day-to-day stuff.

If anyone has anything they would like to send me for review or anything please let me know via the contact page.

16 June, 2014 — Development, Snippets, WordPress

Hide A WordPress Plugin From Plugin List

I was recently working on a client site, which required me to create a custom plugin for his website. I wanted to hide the plugin from the user, as he was a beginner and the plugin contained some sensitive functions to run his website.

In this snippet, I’ll show you how you can easily hide a WordPress plugin from the plugin list. The plugin will still work, but just won’t appear in the plugin list.

Just add the following snippet to your current theme’s functions.php file:

function hide_my_plugin() {
    global $wp_list_table;
    $hidearr = array('plugin-directory/plugin-file.php');
    $myplugins = $wp_list_table->items;
    foreach ($myplugins as $key => $val) {
        if (in_array($key,$hidearr)) {
            unset($wp_list_table->items[$key]);
        }
    }
}
add_action('pre_current_active_plugins', 'hide_my_plugin');

Replace plugin-directory/plugin-file.php in above code with your plugin’s directory and file name. You can find this info by clicking on edit plugin link from the plugin list.

What about Multisite?

If you wanna hide the plugin from your WordPress Multisite, then you above snippet will not remove the plugin from the Network admin list. Here’s a snippet which will work on the WordPress Multisite

function mu_hide_plugins_network( $plugins ) {
    // let's hide akismet
    if( in_array( 'akismet/akismet.php', array_keys( $plugins ) ) ) {
        unset( $plugins['akismet/akismet.php'] );
    }
    return $plugins;
}
 
add_filter( 'all_plugins', 'mu_hide_plugins_network' );
11 May, 2014 — Development, WordPress

Sitewide Message WordPress Plugin

WordPress Sitewide Message

Sitewide Message Plugin for WordPress is a plugin to allow you to simply add a banner message to the top of your website. It will display all the time on any page.

Features

It’s a simple plugin, but here’s what’s on offer:

  • Like message to any page or website
  • Change the font colour
  • Change the background colour
  • Custom text

Coming Soon

Some funky features are coming soon!

  • Scheduled Message
  • Link Location (new window / same window)

You can install it from the plugin’s page of your WordPress dashboard or get more information and download the plugin from the official Sitewide Message page.

25 April, 2014 — Snippets, WordPress

Increase WordPress Memory Limit

If you use WordPress often or have a lot of plugins installed you may have come across a PHP memory limit error. This happens when WordPress doesn’t have enough memory to achieve what you are trying to do.

In version 2.5 the WordPress core team added a wp-config.php option WP_MEMORY_LIMIT which allows you to configure the maximum amount of memory that can be used by PHP.

Changing this option in the wp-config.php will only affect your WordPress site and not any other PHP sites.

The default memory allocated to WordPress is 40MB for normal WordPress installations and 64MB for multisite installs. The core will also take into account the php.ini file if there is one and if this number is greater than the default 40MB allocated by WordPress the higher number will then be used.

To change the WordPress memory limit you just add the following into the wp-config.php.

define('WP_MEMORY_LIMIT', '64M');

If this doesn’t change your allocated memory limit your hosts may not allow you change this setting, if this is the case you should contact your hosting company.

24 April, 2014 — Development, Life

A new look for ThatBlogger

As you might have been ThatBlogger has been quite quiet recently. This is because since the start of the year I have been extremely busy working on new projects, a new business venture and general life events.

I recently took some time to redesign That Blogger to give it a fresh new look and to finally get round to blogging again!

The New Theme

Having spent some time looking around the net for a theme to fork, saving me time designing and building a new theme. I stumbled upon a theme I really liked. It was clean, simple and used Post Formats, something I had wanted to use for a while to give my posts a facelift. This theme was Sorbet by Automattic. I knew I would have to fork a theme and adapt the code to work the way I wanted and take out the code I didn’t need for That Blogger. However after forking the code I decided to work from the ground up and build a Sorbet based theme using the Bootstrap Framework. What you see now if my finished product.

Take a look at what the theme looks like if you downloaded it right from WordPress.org and you’ll see the difference.

What else has changed?

I have been through and fixed broken links in posts so you don’t need to worry about clicking a link and the website behind it has gone! The next thing to be removed is adverts, I decided to ditch all adverts, this was simply because I want the website to be as clean as it can be to really focus on the content.

I have also made some minor speed improvements in the new theme.

Let me know what you think about the new look in the comments below. I’d love to hear your thoughts.

9 January, 2014 — Development, Snippets, WordPress

Create a “Recent Posts” Module Outside of WordPress

Not all websites run on WordPress, but some websites might decide to use WordPress as their blogging choice. They decide they want to display the recent posts from the blog on the website. However the website isn’t in the WordPress core. So how do we display the recent posts on the website?

The Code

To be able to use WordPress outside of the WordPress core is simple. Just include the 

wp-load.php
 file in your website:

// Include the wp-load from WordPress Install
include('wp-load.php');

// Get the last 10 posts
$recent_posts = wp_get_recent_posts(array(
    'numberposts' => 10
));

// Output the posts
echo '<ul>';
foreach($recent_posts as $post) {
    echo '<li><a href="', get_permalink($post['ID']), '">', $post['post_title'], '</a></li>';
}
echo '</ul>';

Once you have the 

wp-load.php
 file included, the entire WordPress core is open to use!