Tag Archives: WordPress

Workarounds for problems using Jetpack and https on Azure Websites

This is a follow up post on: Moving the blog to azure web sites: https://www.stefanjohansson.org/2013/05/moving-the-blog-to-azure-websites/

2013-07-09: Update 2 – As of Version 2.3.1 the Jetpack plugin and the WordPress cloud have  been updated to support more SSL scenarios. Jetpack should now work without issues and configuration changes. The post below is still valid for other connected systems that doesn’t like mismatched SSL certificates.

Introduction

One key feature missing from Azure Web Sites is the possibility to run your own SSL certificate for encrypted https traffic.

2013-06-03: Update 1 – https, SSL and certificates for custom domain names are now launched and available (for sites running in “reserved mode”) – read more here: http://www.windowsazure.com/en-us/develop/net/common-tasks/enable-ssl-web-site/ The information below still applies in case you don’t want to use a reserved mode site.

This pretty much disables it for any real business use whatsoever.

Every single professional I have spoken with regarding this have chosen alternate solutions for their projects and tests. As usual a key problem here is no official words on availability and firm delivery dates to relate to. Finding a blog post or discussion thread where someone says it might be available as a feature in the future just doesn’t enable project budgets to be spent on Azure Web Sites even for tests and explorations.

Continue reading

Moving the blog to Azure Web Sites

This weekend an issue with another website running in the same tenant as this blog made the whole system go down. This episode made me finally spend some time moving the blog to Azure Websites. It should be running fine and exactly as before, but if you find anything out of the ordinary or not working, please let me know.

The earlier host was LAMP-based so I had to do some changes to get everything working as before:

1, I had to upload a web.config file to support pretty links and remove the need for index.php in the url. More information here: http://stackoverflow.com/questions/9965124/how-to-rewrite-the-index-php-of-codeigniter-on-windows-azure

and here: http://codex.wordpress.org/Using_Permalinks#Permalinks_without_mod_rewrite

2, I had to trick Jetpack into working properly since there was an error message about a self signed certificate that made the whole thing go overboard: http://www.tpateman.co.uk/reboot/error-activating-jetpack-plugin/

Apart from that there was just the usual parts, update the dns configuration to support the new dns name in Azure (https://www.stefanjohansson.org/2012/12/how-to-configure-custom-dns-names-for-multiple-subdomain-based-azure-web-sites/), update the dns to point to the new host, migrate the content from the old host to the new and make sure everything was still configured as before.

While doing all of that I also managed to learn about the Core Control plugin (http://wordpress.org/extend/plugins/core-control/),

I also updated a few posts with manual Excerpts so that the posts displayed on the front page are truncated and a sticky post about migrating to Australia…

Update 2013-05-20: I have explored the JetPack issues some more and describe it here:  https://www.stefanjohansson.org/2013/05/workarounds-for-problems-using-jetpack-and-https-on-azure-websites/

How to: move or remove the “Leave A Reply” link in the Twenty Twelve theme

This post describes how to move or remove the “Leave a reply” link that appears below the post heading in the Twenty Twelve theme for WordPress.

before

Link placement before edit…

The fastest and easiest way for a self hosted blog is to simply override the CSS styles that governs the link by editing the custom CSS that is part of WordPress:

wordpress_css

Link to Edit CSS in the WordPress admin site.

By adding the following CSS styles the link is moved:

#content .post {
    position: relative;
}

#content .comments-link {
    position: absolute;
    bottom: 1em;
}

#content .post {
    padding-bottom: 3em;
}

 

css

(The first two rules moves the link to the bottom, the last one adds some padding that I felt was needed)

The result is that the “Leave a reply” link is below the post, as seen below:

after

Link placement after edit…

If you rather not have the link at all, it is easily removed by adding the following CSS:

#content .comments-link {
    display: none;
}

 

cssnodisplay

Result after display:none;

nolink

The actual comments box is still visible and available in the post itself in case you still want to be able to get comments on posts.

How to: remove the WordPress link in the Twenty Twelve Infinite Footer

Updated Post:

(2013-02-23)

Ok, so the first try, described below, wasn’t really working out for me. The original files are updated too often during updates, meaning the link changes back all the time.

So, instead I use the CSS to override the original information.

Change the site CSS by going to the admin site, choose Appearance, choose Edit CSS.
the div holding the “Proudly powered by WordPress”-link and the “Theme: Twenty Twelve”-text uses the CSS-class “blog-credits”.
There are several approaches one might use to alter the appearance. I will use the quick and not so very sophisticated option of just removing the content. Since there is no information I need to replace the existing with, I’ll just use the display:none; CSS rule to remove it.

So, add the following code to the CSS Stylesheet Editor content and the information should stay hidden even after updates to the core files.

.blog-credits {
    display: none;
}

Original Post:

In the original plain Twenty Twelve theme for WordPress (currently in use on this site) there is an infinite scroll feature. This feature introduces a footer once it kicks in. That footer links back to WordPress. To change this footer credits information I did the following.

Please note that this will be overwritten when the theme updates. So this is a note to self once it updates and I wonder why…

Step 1, go to the WordPress dashboard.

Step 2, go to the Plugins editor

plugins_ss

Step 3, Choose the correct plugin to edit. The infinite scroll feature is in the Jetpack plugin.

edit_plugin_ss

Step 4, Choose the correct file to edit. The footer credits is defined in the “jetpack/modules/infinite-scroll/infinity.php”

choose_file_to_edit_ss

Step 5, change the credits lines to your liking. The definition of $credits is in the infinite blog footer function towards the end of the file.

rows_to_edit

A lingering question is if the infinite scroll is a good feature or if it should be removed and the blog front page changed back to the paging of old…

Stefan Johansson

December 11, 2012

Testing the new “Status” post type with a status update saying that the blog has been successfully updated to WordPress 3.5…

Updating the Blog

Some meta about the blog itself.

I have been using the DejaVu theme by MySiteMyWay for a while but haven’t been that happy with the theme, the features, the look and feel, available updates and the update process. Any day now WordPress will release version 3.5 and with it the new 2012 default theme. its already available and very much less is more in the default look and feel. Since I currently don’t publish much more that normal blog posts about SharePoint, SQL Server and BI in general I thought I’d try the new theme for a while.

Some things aren’t working the same way, search and links to additional social media sites are in need of updating. I hope that the new version of WP will add some new features and that a similar Theme, with additional features, will become available.

I have also started with a series manager to see if some posts can be managed in a series manner. Lets see how that works out. I might need to post a proper series to get it working?

How to: get WordPress, FeedBurner and LinkedIn to cooperate

When setting up this blog, I ran into a snag when I enabled one of the FeedBurner redirection plug-ins in WordPress and simultaneously wanted the blog to be visible in the WordPress application for LinkedIn.

If I use the FeedBurner plugin, the WordPress application for LinkedIn fails to read the blog (since it uses the RSS feed) with the following error message:

Sorry, we can’t find a WordPress blog at this address.

I fiddled around for a while trying to find a way to enable everything at the same time but gave up and just edited the header.php file for the theme.

Original line:

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?>
RSS Feed” href=”<?php bloginfo(‘rss2_url’); ?> />

 

Modified:

<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?>
RSS Feed" href="http://feeds.feedburner.com/stefanjohansson" />

 

That fixes the standard RSS feed that web browsers etc pick up automagically (i.e. the feed icon in Internet Explorers toolbar)

Then i just changed the link for the follow: area at the top of the theme with the same hardcoded link further down in the file.

Its currently working, the feeds from the web page redirect to the FeedBurner feed and the WordPress app for LinkedIn integration is happy.

One drawback is naturally that the LinkedIn feed isn’t managed by FeedBurner.