WordPress how and what Custom Fields – theme template view

Step 1: Create a New Post

In your local testing environment, create a new posting in the WordPress admin panel, and scroll to the bottom, until you see the “Custom Fields” widget.

Custom Fields

This section allows for a key, and a value. For example, if you aren’t taking advantage of the new “Post Thumbnail” feature, available in WordPress 2.9, and need a way to attach a thumbnail to each posting, this is where you’d accomplish that task. You could assign a key of “thumb,” and a value, which is equal to a path to the desired thumbnail. Go ahead and fill this section with some test data – anything you wish. I’ll use “difficulty” as my key,” and “hard” as the value.


Step 2: Edit Index.php

Now visit your theme, and within the WordPress loop in your index.php page, reference the get_post_meta() method.

  1. <?php echo get_post_meta($post->ID, ‘difficulty’, true); ?><
<?php echo get_post_meta($post->ID, 'difficulty', true); ?><

This method accepts three parameters.

  • The id for the desired post. You can use $post->ID or “the_id()” to insert this value.
  • The key that you require. Remember, you can insert multiple custom fields. This is why we need to reference the key, in my case, “difficulty.”
  • A boolean, which determines whether you want the information returned as a string, or an array. As I’m echoing out my value, I’ve chosen true (or string).

Step 3: What If…

If you view run the website, you’ll see the correct value. If you went with a thumbnail path in your custom field, make sure that you echo out that string from within an IMG tag, accordingly. However, there’s one problem here; it’s possible that not EVERY single post will have this “difficulty” custom field attached, yet we’re blatantly assuming that there will be. This is inefficient. Instead, why don’t we first create an “if” statement, and determine whether our desired key exists first. Smarter right?

  1. <?php if ( get_post_meta($post->ID, ‘difficulty’) ) :  ?>
  2. <small> <?php echo get_post_meta($post->ID, ‘difficulty’, true); ?></small>
  3. <?php endif; ?>
<?php if ( get_post_meta($post->ID, 'difficulty') ) :  ?>
   <small> <?php echo get_post_meta($post->ID, 'difficulty', true); ?></small>
<?php endif; ?>

Conclusion

Custom fields are a staple in every experienced WordPress designer’s toolbox. Learn them, and use them! Thanks for reading or watching!

thanx tutsplus.com for this nice tut

PHP vs ASP.NET VS J2EE


Area

LAMP

ASP.NET

J2EE

Licensing cost

·
No licensing cost

·
Expensive licensing cost

·
No licensing cost

Support options and cost

·
Free support via community

·
Paid support options available

·
Free support via community

·
Paid support options available

·
Free support via community

·
Paid support options available

Platform(s)

·
Multiple

·
Windows only

·
Multiple

Hardware

Costs

·
Runs on very inexpensive servers

·
Requires slightly more expensive servers

·
Requires expensive servers

Staffing

·
Somewhat difficult to find qualified people

·
Very easy to find qualified people

·
Reasonably easy to find qualified people

External Hosting

·
Widely available and inexpensive

·
Widely available, but more expensive

·
Not widely available

Security

·
Very good

·
Historically very bad, but improved recently

·
Good

Performance

·
Very good

·
Often requires more expensive hardware to perform well

·
Often requires substantial configuration and expensive hardware

Scalability

·
Scales very well

·
Can be difficult to scale

·
Scales well when configured properly

Administration

·
Difficult: Often requires reading documentation and editing
text files

·
Easy: Often can be done through point and click interface

·
Moderate: Sometimes can be done visually

Configuration

ease of use

·
Can be difficult to configure properly

·
Easy to configure

·
Moderately difficult to configure

Configuration flexibility

·
Extremely flexible

·
Not very flexible

·
Moderately flexible

Framework(s)

·
Many available – often difficult to choose

·
One standardized framework

·
One standardized framework

Components

·
Widely available

·
Widely available

·
Widely available

Compatibility

·
Very good: New versions usually backwards-compatible

·
Moderate: New versions often break functionality

·
Bad: Many problems between old and new versions

Prepared
by:

Jason M. Hanley, B.Math, MBA, PMP
President and Senior Consultant
Syllogistic Software Inc.

connect win server 2003 two domain controler DC Two different Server

 

for my friend ahmed ads

if u have two domain controller running on two different win 2003 server
and u need to connect them and there is no firewall
so u have some choices 

1- use ADMT to migrate two domains into one but make sure yiu arent using SBS version on server

and the second i prefer two you and i will go on its details for u

2- zone transfer or forwardYou will have to make each domain be able to resolve the other, by
configuring zone transfer or forward.
Then you will make a trust between both

but make sure that there is no time different bettwen the two domains max 2 - 4 min no more than this
(use etisalte egypt 15pst per min and config time)

lets go
On the DNS MMC, right click property on the server,
forwarders tab
new
type in the dns domain of the other AD domain
add the IP of the other domain dns servers

do this stepes on the two servers

then test dns i hope this help u if any question i will be happy to help u

On the DNS MMC, right click property on the server,
forwarders tab
new
type in the dns domain of the other AD domain
add the IP of the other domain dns servers

Do the same on all dns server on both side