Web Design - Domain Name - Making Money

January 24, 2009

Display Wordpress content outside of your blog

Filed under: Web Design — admin @ 11:28 pm

The key to gaining access to the power of Wordpress from an outside page lies in the wp-blog-header.php file. This file loads the Wordpress application and makes its API, and therefore your content, available for use. Once this file is included in a page on your site, you will be able to use any Wordpress function just as if you were working in a Wordpress template.

Let’s add the latest post to the front page of our site. We’ve already got a blog at www.example.com/blog/ but it would be nice to show the latest entry alongside the rest of the information on the front page. If your front page is already a PHP file, you’re ready to go; otherwise you’ll probably need to rename your front page file extension from .html to .php. (Be sure to test to ensure that doesn’t break anything!)

The first thing we’ll do is pull in that all-powerful Wordpress file, which we can do by adding this section to the very top of the page you want your post to appear on:


The first line of this block is simply a comment describing what we’re doing. The second line tells Wordpress not to display your templates, and the third line grabs that file I told you about. The final line performs a database query to retrieve the content we want to display on this page. In this example, we want the single most recent post, but the query_posts() documentation shows how to retrieve a variety of data.

Now we’ll move down in our page and find a good spot for this post. Once you’ve figure out where to put it, we’ll add a Wordpress loop which will display the single post retrieved above:


Once the loop is in place, we just have to decide what parts of the post to display, and write some HTML for them. Let’s say we want the post title and just an excerpt, followed by a link to the full article. We’d do something like this:


Comments (0)

October 4, 2008

which is the best free site map generator?

Filed under: Web Design — admin @ 5:51 pm

http://www.xml-sitemaps.com/

this website for small/medium websites having 500 or less URLs.

if your website contain forums
try to use vbseo_sitemap V2.2

September 22, 2008

keywords study tool

Filed under: Web Design — admin @ 4:50 am

http://freekeywords.wordtracker.com/

it is very good to use.

July 27, 2008

how do you create longtails of a keyword?

Filed under: Web Design — admin @ 2:02 am

http://freekeywords.wordtracker.com/?seed=dog+training&adult_filter=off&suggest=Hit+Me

https://adwords.google.com/select/KeywordToolExternal

July 25, 2008

Detecting if user-agent corresponds to mobile phone

Filed under: Web Design — admin @ 10:00 am

I’m now using this code that should detect properly most mobile brands:
/* Return TRUE if user is using mobile phone browser */
function ismobile(){
$useragent = $_SERVER['HTTP_USER_AGENT'];
// Standard vendor-model/version user agents
if (preg_match(’/^((ACERlcatelUDIOVOXlackBerryDMricssonG\bGEotorolaOTECokiaanasonicCIAGEMAMSUNGECanyoendoHARPIEonyEricssonelitelit_mobile_TerminalsSM)[- ]?([^\/\s\_]+))(\/(\S+))?/’, $useragent)){
return true;
}else{
return false;
}
}

April 18, 2008

Content Formatting (Bolding and Italics)

Filed under: Web Design — admin @ 8:30 pm

Search Engines also place extra importance on words that are placed in bold and italics. Be sure to bold and italicize keywords/phrases within the body of your content. (more…)

« Newer PostsOlder Posts »

Web Design World, Powered by: Medical Supply Company & Modern Medical