Category archives: WordPress

 

 

 

 

 

0

Show Urgent Messages In WordPress Dashboard

If you use WordPress dashboard then I’m sure you would of noticed the error messages that are displayed at the top. These will normally be messages from WordPress to let you know a new version has come out and it’s time to upgrade you current version. These messages can be really be useful to WordPress developers as you can let your users know about changes you are currently making. Using the below snippet you can add a Message to the dashboard, these can either be error messages or just a notice messages. Add the following to the functions.php file to add the error messages or notice messages. function showMessage($message, $errormsg = false) { if ($errormsg) { echo '<div id="message" class="error">'; } else { echo '<div id="message" class="updated fade">'; } echo "<p><strong>$message</strong></p></div>"; } function showAdminMessages() { showMessage("Welcome to the new WordPress theme.", true); } add_action('admin_notices', 'showAdminMessages');

Read more

 

 

1

Migraciones a WordPress desde Posterous aumentan un 250%

Apenas han pasado 24 horas desde que Posterous anunció que había sido adquirida por Twitter en una operación orientada hacia la incorporación de talento en Twitter de la que no había trascendido el montante económico. Si bien Posterous indicó en el comunicado que nada iba a cambiar por el momento, y en el caso de hacerlo lo comunicarían adecuadamente a los usuarios, también comentaron que publicarían herramientas para migrar los contenidos a otras plataformas en el caso de no querer permanecer en el servicio. Si bien estas herramientas de Posterous…

Read more

 

 

0

Create QR Codes For Your WordPress Posts

QR can be used by mobile devices to scan and get bits of data, they can even be used to display a web page. They are starting to become more and more popular the more mobile devices are being used. But creating your own QR codes can be difficult and if you want one for each post of your blog it can be very time consuming. There is a company called QR-Server which provide an API to create QR codes, all you have to do is query this API with the width and height of the QR code you want, the website you want it to redirect to and it will generate a QR code for you. http://api.qrserver.com/v1/create-qr-code/?size=150×150&data=url-or-text WordPress Shortcode Using this API we can create a QR code for any page, now we are going a WordPress shortcode to generate the QR of the current page. Just copy and paste the following into your […]

Read more

 

0

Add Facebook Open Graph Tags To WordPress

When a link is shared on Facebook it will be crawled to get the page title and description. The way Facebook will get this information is to search for Open Graph tags, these are meta tags added to your page with a title, description and image data. This data is then used to populate the Facebook status box when someone shares your link. WordPress doesn’t come with the functionality to add Facebook open graph meta tags, but you can use the below snippet to add open graph meta tags to all your posts. Simply add the following code to your functions.php page and it will automatically create the Facebook open graph tags for you, so no need to have the Facebook plugins on your WordPress site. // Facebook Open Graph add_action('wp_head', 'add_fb_open_graph_tags'); function add_fb_open_graph_tags() { if (is_single()) { global $post; if(get_the_post_thumbnail($post->ID, 'thumbnail')) { $thumbnail_id = get_post_thumbnail_id($post->ID); $thumbnail_object = get_post($thumbnail_id); $image = $thumbnail_object->guid; } else { […]

Read more

 

0

WordPress Widget Boilerplate

Here is a WordPress snippet to create your own WordPress Widgets. A Widget is a piece of PHP Code which will run when it is placed inside a Sidebar. A good example of a widget is data displayed in the sidebar of a blog. Like this blog I use widgets to display the Google badge, Twitter Feed and Facebook like box. Having these as Widgets mean I can place them in multiple places of the WordPress theme directly in the WordPress dashboard. You can create a WordPress widget to do anything you want, the easiest way to create a WordPress widget is to inherit the WP_Widget class. This way you can use the inbuilt functions to update the widget, display the widget and create an admin page for the widget. Below is the boilerplate of a WordPress widget, when you create a new widget just copy and paste the below code as a starting point […]

Read more