How to add Meta box to wordpress admin post page

This article will tell you about, How to add Meta box to wordpress admin post and page.Use following code and create wordpressapi.php file and upload this file to wp-content/plugins/ folder.


<?php
/*
Plugin Name:  WordPressapi Meta Box
Plugin URI: http://images.purabtech.in/
Description: Adding the Meta box to admin panel -> post
Version: 0.0
Author: WordPressapi
Author URI: http://images.purabtech.in/
*/

function wordpressapi_meta_box() {
add_meta_box(
'wordpressapi',
'Wordpressapi Box', //Meta box title
'write_in_meta_box',
'post' // You can define here where to add the Meta box(post, page, link)
);
}

function write_in_meta_box(){
echo "Wordpressapi is writing something in admin meta box";
}

if (is_admin())
add_action('admin_menu', 'wordpressapi_meta_box');
?>
add Meta box to wordpress admin
add Meta box to wordpress admin

Go to your Plugin tab and activate the “WordPressapi Meta Box” plugin.
After activating the plugin you are able to see the Meta box on post page.

How to create or add new tables using wordpress theme

With custom professional theme you need to add the custom table in wordpress database, Using this code you can, add new tables using wordpress theme

add new tables using wordpress theme

If you want to add one more table to wordpress database you need to just use the following code.

Open the functions.php file and copy paste the code.

[viral-lock message=”Solution code is Hidden! It’s Visible for Users who Liked/Shared This article on Facebook or Twitter or Google+. Like or Tweet this article to reveal the content.”]


$wordpressapi_db_version = "1.0";

global $wpdb;
global $wordpressapi_db_version;

$table_name = $wpdb->prefix . "liveshoutbox";
if($wpdb->get_var("show tables like '$table_name'") != $table_name) {

$sql = "CREATE TABLE " . $table_name . " (
id mediumint(9) NOT NULL AUTO_INCREMENT,
time bigint(11) DEFAULT '0' NOT NULL,
name tinytext NOT NULL,
text text NOT NULL,
url VARCHAR(55) NOT NULL,
UNIQUE KEY id (id)
);";

require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
dbDelta($sql);

$welcome_name = "Mr. WordPress";
$welcome_text = "Congratulations, you just completed the installation!";

$insert = "INSERT INTO " . $table_name .
" (time, name, text) " .
"VALUES ('" . time() . "','" . $wpdb->escape($welcome_name) . "','" . $wpdb->escape($welcome_text) . "')";

$results = $wpdb->query( $insert );

add_option("wordpressapi_db_version", $wordpressapi_db_version);

}

[/viral-lock]

register_activation_hook(__FILE__,'YOUR_FUNCTION_NAME');
add new tables using wordpress theme
add new tables using wordpress theme

wordpress get child pages of current page

Using following code you can able to display the subpages of parent page. Tutorial for wordpress get child pages of current page. We have given code sample in this article.

<?php $subpages = wp_list_pages('title_li=&child_of='.$post->ID.'&echo=0'); ?>

<?php if ($subpages) { ?>
<ul>
<?php echo $subpages; ?>
</ul>
<?php } ?>

Note: This code you need to copy paste in loop only.

Using following code you can able to display the subpages and subpages of that.

<?php
if($post->post_parent)
$subpages = wp_list_pages(“title_li=&child_of=”.$post->post_parent.”&echo=0″);
else
$subpages = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);
if ($subpages) { ?>
<ul>
<?php echo $subpages; ?>
</ul>
<?php } ?>

Using css you modify the UI of menu.

wordpress get child pages of current page
wordpress get child pages of current page

More details you can found on following page
http://codex.wordpress.org/Template_Tags/wp_list_pages

Text wrapping around image in wordpress theme

Many people do not care about what CSS they are putting for p tag and div tag. Text wrapping around image in wordpress theme. So far they are not able to use wordpress default functionality of text wrapping around the image.

Text wrapping around image

wordpress-logo-cristal_thumbnail-300x300
I am suggesting use following CSS in your wordpress theme whenever you are creating the new theme. You can do care about your theme preview but with that keep an eye you are not breaking the default CSS of wordpress.

Use following CSS in your wordpress theme and you will be able to use wordpress text wrapping around the image for your wordpress theme.

/* wordpress’s default CSS */
/* Begin Images */
p img {
padding: 0;
max-width: 100%;
}

/* Using ‘class=”alignright”‘ on an image will (who would’ve
thought?!) align the image to the right. And using ‘class=”centered’,
will of course center the image. This is much better than using
align=”center”, being much more futureproof (and valid) */

img.centered {
display: block;
margin-left: auto;
margin-right: auto;
}

img.alignright {
padding: 4px;
margin: 0 0 2px 7px;
display: inline;
}

img.alignleft {
padding: 4px;
margin: 0 7px 2px 0;
display: inline;
}

.alignright {
float: right;
}

.alignleft {
float: left;
}
/* End Images */
/* Captions */
.aligncenter,
div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}

.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}

.wp-caption img {
margin: 0;
padding: 0;
border: 0 none;
}

.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
padding: 0 4px 5px;
margin: 0;
}
/* End captions */

wplogo-notext-rgb

Note: Dot not assign p tag globally to body tag, Use p tag alignment tag as per your custom theme requirement.

Create Horizontal page Menus in WordPress theme

Many people are new in development of wordpress theme. They are searching for how to Create the Horizontal page Menus in WordPress theme. Here is code for creating the Horizontal page Menus in WordPress theme.

Create Horizontal page Menus in WordPress theme

Here I am going to show the simple technique of creating the horizontal page menu with wordpressapi.

Just create pages in wordpress first. Add following lines to your header.php file where you want to show the page menu.


navmenu">
<ul>

<ul>

<ul>
	<li>php echo get_settings('home'); ?>">HOME</li>
</ul>

</ul>

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php wp_page_menu(); ?>
</ul>
</div>

Add folliowing lines in your style.css file.


#navmenu ul {margin: 0; padding: 0; list-style-type: none; list-style-image: none; }
#navmenu li {display: inline; }
#navmenu ul li a {text-decoration:none;  margin: 4px; padding: 5px 20px 5px 20px; color: blue; background: pink;}
#navmenu ul li a:hover {color: purple; background: yellow; }

Horizontal page Menus in WordPress
Create Horizontal page Menus in WordPress theme

 

That sit!

Torrent sites now stealing the users logon information

Torrent sites acts as indexes of links to TV, film and music files. Torrent sites now stealing the users logon information.

Torrent sites now stealing the users logon information
Torrent sites now stealing the users logon information

Scammers were then able to use the data to gain access to Twitter and other sites because many people use the same logon for multiple services.

Around 47% of users share both their user ID and password with at least one nonfinancial website, it found.

“We strongly suggest that you use different passwords for each service you sign up for.”

The conclusion is echoed by security researchers who say it is a particular problem for banking websites.

The firm has reset the accounts of affected users, it said.

“The takeaway from this is that people are continuing to use the same email address and password (or a variant) on multiple sites,” the firm said in a blog post.

A survey of millions of people conducted by the security firm Trusteer, suggests that 73% of people share the passwords which they use for online banking, with at least one nonfinancial website.

Facebook was branded the “riskiest” network, although the firm also pointed out that it was also the largest and would therefore attract the most attention form cybercriminals.

One of its findings that spam and attacks on social networks – such as Twitter and Facebook – had risen 70% in the last year.

Installing WordPress With Clean Subversion Repositories

Many people have used Subversion to install WordPress or have installed WordPress into its own directory. You can combine these techniques to create a “clean” Subversion installation in which the user’s custom files (wp-config.php and wp-content/) are stored outside of the WordPress application directory, so that user files and files under version control never overlap. (Original credit to Sam Bauers for presenting these instructions at WordCampUK.)

Installing WordPress With Clean Subversion Repositories
Installing WordPress With Clean Subversion Repositories

Check out a working copy and install

Create the new location for the core WordPress files to be stored (we will use /wordpress in the examples).

Following the New Install using Subversion instructions, check out (Subversion command co) the stable version of WordPress you have chosen. Do not type the $ characters — they are just indications of the command prompt. Here is the command (assuming the version you want is 2.9.1):

$ svn co http://core.svn.wordpress.org/tags/2.9.1 .

When the download is complete, edit the wp-config.php (see editing wp-config.php) ignoring the Advanced Options and save the file within the root directory (http://example.com/).

Above commands will fun on any linux distribution.

For more information go to following links

Source link

http://wordpress.org/download/svn/

http://wordpress.org/extend/plugins/about/svn/

WordPress for Android 1.0 Release

WordPress for Android is now available in the Android Market. The initial release has focused on giving you the ability to manage your blog while on the go.

WordPress for Android 1.0 Release

Features include the ability to:

  • Configure and manage multiple blogs
  • Comment moderation including the ability to reply to comments
  • Create and Edit Posts including categories, tags and photos
  • Create and Edit Pages
  • Get notified of new comments in the Android notification bar
WordPress for Android_1265186035480
WordPress for Android 1.0 Release

Users of the popular wpToGo app for Android will feel right at home in WordPress for Android 1.0, as the source from wpToGo has been used as the foundation for the WordPress app. wpToGo will be discontinued as all development efforts move forward with the Open Source WordPress for Android app. If you are interested in contributing to the development efforts, please visit our dev site at dev.android.wordpress.org.

So grab the new app by visiting the download page and if you have questions or issues visit the forums to get help or suggest new features.

Source Link

All time Best WordPress Ebooks

Some years back in start of 2007, When we started working on wordpress that time, we did not so much help or ebooks on wordpress. All time Best WordPress Ebooks. But now we can found pretty much good ebooks and forum help on internet. we found useful ebooks for new blogger and wordpress developer.

List of All time Best WordPress Ebooks

1. WordPress For Dummies, 2nd Edition

All time Best WordPress Ebooks
All time Best WordPress Ebooks

Bloggers love WordPress! If you’re ready to start using this free blogging software, WordPress For Dummies, 2nd Edition is just what you and your blog need to make a splash.

Professional blog designer Lisa Sabin-Wilson shows you how to use all the latest upgrades to WordPress and helps you decide whether to use the WordPress.com hosted service or self-host your blog with WordPress.org. Whether you’re just venturing into the blogosphere or you want to shift an existing blog to WordPress, WordPress For Dummies, 2nd Edition will help.

Explore theme development and learn where to find free WordPress themes Extend WordPress through plug-ins, CSS, custom fields, and more Find out about archiving, interacting with readers through comments, tracking back, and handling spam Get the scoop on domain registration, Web hosting providers, basic tools like FTP, and more Create a unique blog theme and presentation by using template tags with CSS Sign up for WordPress.com, log in, set options, and create a profile Install WordPress.org, set up a MySQL database, explore RSS feeds, and organize a blogroll Discover the secrets of creating a blog that draws readers Get tips on wonderful widgets, upgrades, and plugins you can add to make your blog extra cool Learn how to use the Dashboard, manage comments, and make permalinks work with your Web server With WordPress For Dummies, 2nd Edition on hand, it’s easy to make the most of the free software and build a blog that stands out in a crowd.

2. WordPress: Visual Quickstart Guide

wordpress-visual quick All time Best WordPress Ebooks
wordpress-visual quick All time Best WordPress Ebooks

This book gives readers the tools they need to create beautiful, functional WordPress-powered sites with minimal hassle. Using the WordPress user interface as a baseline, authors Jessica Neuman Beck and Matt Beck walk new users through the installation and setup process while providing valuable tips and tricks for more experienced users. With no other resource but this guide, readers can set up a fully-functional and well-designed WordPress site that takes advantage of all the features WordPress has to offer.

3. Building a WordPress Blog People Want to Read

building a wordpress blog, All time Best WordPress Ebooks
building a wordpress blog, All time Best WordPress Ebooks

Having your own blog isn’t just for the nerdy anymore. Today, it seems everyone—from multinational corporations to a neighbor up the street—has a blog. They all have one, in part, because the folks at WordPress make it easy to get one. but to actually build a good blog—to create a blog people want to read—takes thought, planning, and some effort. From picking a theme and using tags to choosing widgets and building a community, creating your blog really starts after you set it up. In this book by blogger extraordinaire Scott McNulty, you learn how to:

4. WordPress 2

wordpress 2,  All time Best WordPress Ebooks
wordpress 2, All time Best WordPress Ebooks

WordPress is an open-source personal publishing platform that is easy to use, flexible, and highly customizable. Although used primarily for publishing blogs, WordPress can easily be used to create and maintain complete Web sites.

Taking the average blogger further than blogspot can, WordPress allows bloggers to create more complicated sites with their open-source technology, rather than blogger which is limited by HTML changes to their templates.

This easy-to-follow, step-by-step guide shows you how to install, use, and customize WordPress to get the most from the software. Includes tips that explain why certain techniques are better than others, how to watch for potential problems, and where readers can find more information.

5. WordPress theme design

All time Best WordPress Ebooks
All time Best WordPress Ebooks

This book walks through clear, step-by-step instructions to build a custom theme for the WordPress open-source blog engine. The author provides design tips and suggestions and covers setting up your WordPress sandbox, and reviews the best practices from setting up your theme’s template structure, through coding markup, testing, and debugging, to taking it live. The last three chapters cover additional tips, tricks, and various cookbook recipes for adding popular site enhancements to your WordPress theme designs using 3rd-party plugins as well as creating API hooks to add your own custom plugins. Whether you’re working with a pre-existing theme or creating a new one from the ground up, WordPress Theme Design will give you the know-how to effectively understand how themes work within the WordPress blog system enabling you to have full control over your site’s design and branding.  more >>

6. WordPress 100 Success Secrets: Start Your Blog Today: WordPress Complete

WordPress is a free blogging platform available to everyone. WordPress has two components, one is a free, Web-based blog-hosting service called WordPress.com. The other is WordPress.org, which provides users with software to run a more feature-rich version of the blogging tool on their own servers.

Both services offer a very easy way to blog, with administrative options to work collaboratively on one or several blogs using the same log-in. Bloggers can write their posts on a WYSIWYG editor, or switch over to a code view on the fly.

This is a great introduction to WordPress. As simple as WordPress is to administer, you will still need hand holding. Before this there has not been a book on WordPress that got you on your way.

This book assumes no blogging or technical background and does a good job of explaining the basics.

For the non-technical the hosted version of WordPress is a great place to begin. For those needing more there are the install-it-yourself versions. You will find everything you need in regards to hosting companies that offer 1 click installs of the regular version WordPress.

Once you’re set up, you’ll be so educated about WordPress that you’ll not only be blogging on the most democratic platform but also involved with one of the most friendly, intelligent and devoted open source communities in the world. Soon you’ll be customizing your blog to the bliss you’ll be following for the rest of your life.

Not sure where to start blogging? Stuck fiddling around with your blog’s limitations? Interested in improving the world through a remarkable blogging platform? Then do yourself a big favor and invest in this book.

Highly recommended to anybody who needs to run a blog or to budding web designers who would like to extend their toolkit.

IE8 becomes most popular web browser in the world

The rise represented a jump from 20.86 per cent in December, and meant that the browser took just nine months to reach market dominance after its launch in March.

IE8 becomes most popular web browser in the world

However, the figures from market intelligence firm NetApps showed that IE6 share dropped to 20.07 per cent. The browser has been widely criticised by governments around the world after it was discovered that the hackers who attacked Google in January exploited an IE6 flaw.

ie8-logo1
IE8 becomes most popular web browser in the world

Microsoft’s Internet Explorer 8 (IE8) became the world’s most popular browser during January, gaining 22.31 per cent of the market and overtaking IE6 for the first time.

Mozilla also benefited from the fall in IE6 use, as it predicted in January, seeing Firefox 3.5 market share rise from 16.32 per cent in December to 17.1 per cent in January. Google’s Chrome also saw a gain, up 3.75 per cent to 3.92 per cent.

Despite IE8’s rapid growth, Microsoft’s overall browser usage slumped from 66.92 per cent in December 2009 to 62.16 per cent in January, while Firefox’s overall use climbed from 23.29 to 24.41 per cent.

NetApps also released figures for Windows 7 uptake, which it tracked on a day-by-day basis in January. The operating system passed the 10 per cent mark on the last day of the month to reach 10.16 per cent.