Tag Archives: Open Sources

Display Recent Blog Posts Outside WordPress

Generally web master uses the WordPress for applying blog on their website.

 

Below is the code for the getting recent/latest post or list, can be applied to display recent posts outside anywhere in your WordPress website.

 

The key to use WordPress outside is include the wp-load.php file
Once the wp-load.php file is included, the entire wealth of WordPress functions will available for you to use.
This can be found under the root folder.

<?php

require_once 'wp-load.php';

// Recent 10 posts
 $recent_posts = wp_get_recent_posts(array('numberposts' => 10));

// Apply your design/html
 echo '<ul>';
 foreach($recent_posts as $post) {
 echo '<li><a href="', get_permalink($post['ID']), '">', $post['post_title'], '</a></li>';
 }
 echo '</ul>';

?>

If you want to pass more argument, you can do, below is the WordPress reference URL for wp_get_recent_posts function
http://codex.wordpress.org/Function_Reference/wp_get_recent_posts

 

You can also do your own custom queries with WP_Query.

 

Get a separate RSS feed for custom post type WordPress

rss feed for custom post type

Everyone is utilizing custom post types in their new WordPress sites as it is a very powerful and popular feature now days, now the next one is make a separate RSS feed for custom post type?

 

How can a user create a separate RSS feed for a specific custom post type in WordPress?

 

It’s so simple,it works just like creating a separate RSS feed for each category in WordPress.

 

You can simply go by typing this URL.

 

http://www.yourwebsite.com/feed/?post_type=location

 

Just change the post_type name to the one that you want to create a separate RSS feed for.

Are you looking to take it to the next level and make it for a specific custom post type and custom taxonomy? Well that is also not so hard at all.

 

http://www.yourwebsite.com/feed/?post_type=location&genre=newyork

 

Here genre would be the custom taxonomy, and new york would be the tag if you may call it that.
You can create a button in your site sidebar to link to that.You can also link this feed and create a separate feed burner feed for it.

 

For grabbing most popular WordPress custom post type plug-in,click on below URL.

 

http://wp-types.com/

 

 

Move WordPress Blog to New Domain/Location or in another folder/directory

You usually need to move your blog (WordPress) if you are switching your web host as we generally work on localhost.You must also need to ‘move’ your website if you are transferring it to a new domain, new folder, or creating an alternate version on a local server.

After uploading file and updating wp-config.php.We have found that there are lots of URL in the database, It is very hard to update these rows one by one with new URL.
Don’t worry. It is very simple to go

Just 4 steps to do.

1. Query to Update WordPress Settings

UPDATE wp_options SET option_value = replace(option_value, ‘http://www.old-web-url.com’, ‘http://www.new-web-url.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;

2. Query to Update Permalinks

UPDATE wp_posts SET guid = replace (guid, ‘http://www.old-web-url.com’,’http://www.new-web-url.com’);

3. Query to Update Any Links Embedded In Content

UPDATE wp_posts SET post_content = replace (post_content, ‘http://www.old-web-url.com’, ‘http://www.new-web-url.com’);

4. Query to Post Metas

UPDATE wp_postmeta SET meta_value = replace (meta_value,’http://www.old-web-url.com’,’http://www.new-web-url.com’);

Sometimes, you have omitted the www from your domain when cross-linking posts or referencing images, so you should also run these above query without the ‘www’ for your old URL.

After following these steps, hope you will found your blog or website fully functional.
If it is still not functional, make a comment below this article with explanation what issue you are facing.

Alternate of Google Map

Even Google Map is free to use and have a large library and blogs to help. It’s good news for developer that there are more Maps Library available now to integrate in your application 🙂

 

Don’t worry to increase or learn new library of Maps, as each Map library have some unique feature, so match your requirement and integrate the Map that best suit to your requirements.

 

The Advanced functionality of these Maps are available on their website, I am also adding the URL of the Map API library.
Go through from these and increase your knowledge about the MAP.

 

1. Microsoft Bing
http://www.microsoft.com/maps/
Microsoft’s Bing Maps gives you a rich set of tools to help you create amazing map experience. Choose from our super fast AJAX Control 7.0, REST Services API.A unique feature of Bing maps is their ‘Bird’s eye’ view, which gives aerial views from several perspective angles.

 

2. Nokia (Yahoo Maps)
http://developer.here.com/
Nokia purchased Navteq (one of the major suppliers of map data) in 2007, and has been powering Yahoo maps since 2011.It provides APIs for mobile applications and web browsers.
JavaScript API, REST API, Mobile HTML5 Framework, Java API, Qt API is available & working fine for Nokia Maps.

 

3. MapQuest
http://developer.mapquest.com/
MapQuest is the company that lets you choose between using licensed maps or open maps. Even using licensed map data, it has free accounts with no limits on map views. However, it does limit you to 5K calls per day for routing (including for multiple destinations), geocoding, and search.

 

4. OpenLayers
http://openlayers.org/
OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles and markers loaded from any source that shows how flexible and powerful API designed to be used in advanced mapping applications.OpenLayers has been developed to further the use of geographic information of all kinds. OpenLayers is completely free, Open Source JavaScript. It is a mature API with lots of features, but it can be difficult to use in mobile applications since it was designed before they became popular.

 

5. Leaflet
http://leafletjs.com/
Leaflet is a modern and newest open-source JavaScript library for mobile-friendly interactive maps.
Many of the companies switching away from Google Maps use the Leaflet API. It was designed to work well with both desktop and mobile applications and is small and fast. Being newer, it is not as powerful as some of the other APIs, but what it lacks in features it makes up for in flexibility. It has a powerful object model that makes it easy to add features or customize existing features to your needs.

 

6. Modest Maps
http://modestmaps.com/
As its name implies, Modest Maps is a small, extensible, and free library for designers and developers who want to use interactive maps in their own projects. It provides a core set of features in a tight, clean package with plenty of hooks for additional functionality. There are lot of ports, including for Python, PHP, Processing, and Open Frameworks facilitate using Modest Maps in desktop (non-browser-based) applications, native mobile applications, and on servers.

 

7. Polymaps
http://polymaps.org/
The goal of Polymaps is to better support rich, large-scale data overlays on interactive maps by extending the tile metaphor to vector graphics.
Other APIs use image tiles to render maps, but they still need to display geographic information (such as markers and routes) by rendering it directly. Map data can be loaded using standard formats such as GeoJSON and rendered directly.

 

If you have gone through the documentations of these all, you have found that every Map API is unique in his way, so choose the best suits.
Anyway, if you think Google Map is more better then these all, go ahead with Google Map 🙂

 

Links to download PHP library and frameworks and open sources

Download PHP Library (Core)

 

Download PHP Frameworks
 
Download PHP Open-sources