Categories
Sosiale Web Web Publisering WordPress

How to embed a Facebook post on WordPress

It happens time and again that you want to keep valuable resources gathered from Facebook in a central place. Using your WordPress blog for this is ideal because it makes your collection of posts easier to share. Here are instructions to embed a post from Facebook on WordPress.

To embed a Facebook post or video on WordPress can be difficult if you are intimidated by code. You may face the following challenges:

  • You are not fimilliar with the structure of a webpage
  • You are not registered on WordPress with at least the role of Editor (or Super Admin on Multisite)
  • You do not have access to WordPress’s theme files

If you have no problem with the above, proceed to embed a post by following these steps:

  1. Edit the header.php file in your WordPress theme and add the Javascript SDK ideally right after the opening <body> tag:
    <div id="fb-root"></div>
    <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v2.2";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
  2. Go to the post on Facebook you want to embed.
  3. In the right hand top corner of the post click on the drop-down arrow to reveal a drop-down menu.
  4. Choose “More options” and then “Embed post”
  5. Copy and paste the given code
  6. Edit a post in WordPress and switch to Text view
  7. Paste the code and publish the post

The embedded post will look like this, but only with functional buttons and links:

matrix in ascii torrent

Categories
Design Op die internet Web Publisering WordPress

Apps vs. Responsive Design

When you have a website, how do you get your content on mobile? Sure, visitors could just fire up their favourite mobile browser and zoom in and out until the cows come home but that’s not ideal right?

As I see it, you’ve got two choices:

  1. build an app for every smartphone to syndicate your content, or
  2. adapt a responsive design for your website

Pros and Cons

I’ll start with the conclusion: it depends on what you want to do, but building an app for every device is expensive and overkill most of the time. Writing an app does however have the flexibility if you want to make it more interactive with inputs from the GPS, camera or accellerometer.

On the other hand if you publish alot of news on your website or just plain old blog posts, there are simpler ways to make your content more friendly towards the legions of different gadgets that troll the web these days. It is called Responsive Design.

The idea is to design your website in such a way that it adapts to whatever resolution it is displayed at. This means that a visitor on a computer with a large display would see the normal layout while a visitor on a 320 x 240 display (for example) would see an adapted layout where text and images fit on the screen at normal zoom levels.

Here’s an example (see Designmodo for more):

The Boston Globe - a different layout for different screen sizes

As I mainly focus on WordPress, I’ll be trying out a theme framework called Reverie from ThemeFortress for a few upcoming projects.

Tell me about your experiences while adapting to the mobile world by leaving a comment.

Categories
Op die internet Tegnologie Web Publisering WordPress

Help I think my WordPress has been hacked

Taken from the WordPress FAQ

So you’ve carefully installed WordPress, you’ve made it look exactly how you like with a decent theme, you’ve maybe installed some fancy plugins and you’ve crafted some fine posts and Pages. In short, you’ve put a lot of time and effort into your site.

Then, one day, you load up your site in your browser, and find that it’s not there, or it redirects to a porn site, or your site is full of adverts for performance-enhancing drugs. What do you do?

Categories
Tegnologie Web Publisering WordPress

Essential plug-ins for your WordPress 3.1 website

I use WordPress every day and find that some plug-ins are just better than others. A robust plugin will be compatible with most WordPress versions or at least degrade gracefully when others will break the design or even show a blank page.

Here are a few plug-ins I use regularly (listed from A to Z):

  • Akismet
    Anti-spam plugin from the guys at Automattic. Included with WordPress by default.
  • All in One SEO Pack
    Out-of-the-box SEO for your WordPress blog. For when your theme needs further optimization.
  • cforms
    Recently turned open source. Easily create multi-page form-to-emails while capturing it in the database as well.
  • Google Analyticator
    There are plenty of good Google Analytics plug-ins availible. This one creates a dashboard widget with a graph and popular keywords.
  • Google Analytics Dashboard
    Google Analytics graph integration. Shows a mini graph along side every post and page.
  • Google XML Sitemaps
    Generates a special XML sitemap which will help search engines like Google, Yahoo, Bing and Ask.com to better index your blog.
  • Twitter Tools
    A complete integration between your WordPress blog and Twitter. Bring your tweets into your blog and pass your blog posts to Twitter. Show your tweets in your sidebar, and post tweets from your WordPress admin.
  • WP-PageNavi
    Adds a more advanced paging navigation to your WordPress blog.
  • WP Security Scan
    Perform security scan of WordPress installation and helps reduces the risk of being hacked.

Which plug-ins you will use depends on what you want to do, but these are the ones I most frequently use. Post your favourite plug-ins in the comments below.