<link href="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>

با استفاده از مشاغل ستنو، در دنیای مجازی واحد صنفی خودتان را به دیگران معرفی یا واحد صنفی مورد نظرتان را جستجو کنید

مجموعه ها

جستجوی مشاغل و خدمات

در حال حاضر تعداد
1400
گزینه در سایت ستنو موجود است.

جستجو توسط دسته بندی یا مناطق

404 OOPS!

page Not found!

"Sorry, it appears the page you were looking for doesn't exist anymore or might have been moved.
Please try your luck again."

Take me home

This is Joomla! Article, You can change text and titile in Article Manager, click the Content → Article Manager menu item and find article Error 404 .

If you want select other article you can change article ID in /templates/template-name/error.php



دسته بندی

نمایش تصادفی مشاغل

سواری - پراید - پزو -L90
انواع قطعات خودروهای سبک داخلی ...
تهیه و توزیع انواع لوازم یدکی خودروهای سایپا و ایر ...
سنگ زدن میل لنگ - تراش سرسیلندر ، شیم گیری سرسیلند ...

پر بازدیدترین مشاغل

لوازم یدکی نو و دسته دوم (استوک) زانتیا و پراید ...
فروش انواع دوچرخه و نمایندگی ktm-q-trinx-flash-rap ...

How to Use WordPress Functions In Your Site The Search Engine Friendly Way « Laboratory Lingo | Industry Forge
Get a free consultation now
Name  
Phone  
Email  

Client: PSIwebware.com

“The design team at Industry Forge listened to what we needed and made it even better than we expected. They helped us structure our site effectively for Search Engine Optimization, and we landed the number one spot on the first page on our key search terms within a few months. It was a pleasure to work with everyone involved.”

– John Harris, PSIwebware.com

How to Use WordPress Functions In Your Site The Search Engine Friendly Way

Written by on June 29th, 2009 at 10:30:06 am

I use a really simple MVC framework that I’ve developed over the years to create many of the websites I’ve built. I recommend that my clients have some portion of their site that is updated frequently with new relevant text. Sometimes I use WordPress to handle the blog portion of the site. WordPress provides a nice user interface for creating new content, managing comments, and is relatively simple to make search friendly. In most cases, I like to include portions of WordPress generated content outside of the blog itself. We’ve even done this on our own Industry Forge website.

I thought there might be a simple way to include the WordPress functions I needed outside of WordPress. I went to Google and searched for “show wordpress posts outside of wordpress.” I found a few articles on how to include the wp-blog-header.php file from WordPress to give your php script access to all the WordPress functions. They all provided a bad solution:

Wrong Way to Include WordPress Functions In Your Site

define('WP_USE_THEMES', false);
require('./blog/wp-blog-header.php');

This seemed to be a pretty simple way to get what I wanted quickly. I was happy with the solution for a few days until I saw the 404 errors begin to show up in my Google Webmaster Tools account for this domain. I was a little perplexed that Google had been picking up 404 errors from pages that actually existed. You don’t want your site to throw 404 errors on pages that actually exist. It’s not search engine friendly at all (even though users don’t know the difference unless they’re closely examining all the headers received by their browser). I realized that this method was not the right choice for me. It was not search engine friendly at all, and would cost me big-time in my own SEO efforts.

It turns out that since I was loading the wp-blog-header.php file before loading any of the rest of my own framework, and because WordPress could not find the specific requested page in its database it sent a 404 header. I verified this with the Live HTTP Headers add-on for Firefox. I never intended for WordPress to actually handle the delivery of the page—I only wanted a few of the recent blog posts—but how was WordPress to know that? Its built to be a full CMS system (I know, I should rethink using it this way). But wait! There is a simple fix.

The Simple Fix

I did a bit of poking through the massive WordPress codebase this morning looking for all the lines the would produce a 404 error. Of course after just a few minutes I thought, “what am I doing? Certainly some astute web developer has had this issue before and has likely posted a solution on his or her blog.” I was right. Thanks to a writing style much more succinct than my own, I was able to look at the post by the nice folks at Adrogen (a Denver website design company) and quickly implement the solution they offer. They suggest using the following 5 lines of code to include WordPress instead of just including the entire WordPress framework:

Correct Search Engine Friendly Way to Include WordPress Functions In Your Site

require('blog/wp-config.php');
$wp->init();
$wp->parse_request();
$wp->query_posts();
$wp->register_globals();

Thanks, Adrogen. You saved me a lot of headache and a lot of illegitimate 404 errors being sent to Google.

Leave a Reply