enable comments for custom post type

In wordpress we can create the custom post types. Now everybody is using custom post types in wordpress and need comments functionality for custom post types also. Custom post types are very important feature of wordpress. For enabling the comments for custom post type just use the following line.

enable comments for custom post type

'supports' => array('title','editor','author','thumbnail','excerpt','comments')

Following line will add the title, thumbnail, excerpt and comments functionality to your custom post type.

enable comments for custom post type
enable comments for custom post type

For more information use check my following code. I used following code in my functions.php file.

add_action('init', 'wordpress_themes');
 function wordpress_themes() {
 $wp_themes_args = array(
 'label' => __('Wordpress Themes'),
 'singular_label' => __('Wordpress Themes'),
 'public' => true,
 'show_ui' => true,
 'capability_type' => 'post',
 'hierarchical' => false,
 'rewrite' => true,
  'supports' => array('title','editor','author','thumbnail','excerpt','comments'),
           'taxonomies' => array('category', 'post_tag') // this is IMPORTANT

 );
 register_post_type('wordpress-themes',$wp_themes_args);
 }

mysql create user and grant all privileges on database

When we do the fresh installation of Mysql we got the root user without any password. Keeping and using the root user for application is not safe.

mysql create user and grant all privileges on database

mysql create user and grant all privileges on database
mysql create user and grant all privileges on database

For creating new user use the following commands.

CREATE USER 'wordpressapi'@'localhost' IDENTIFIED BY 'Test@123456';
GRANT ALL ON *.* TO 'wordpressapi'@'localhost';

How to remove the AuthType Basic

For putting the web authentication we always use the .htaccess or apache configuration file. For removing the web auth from folder you need put following code in .htaccess file.

 

How to remove the AuthType Basic

<Directory /var/www/html/>
#AuthType Basic
#AuthName "By Invitation Only"
#AuthUserFile /etc/httpd/passwd/passwords
#Require user wpapi
#Require valid-user
</Directory>

<Directory /var/www/html/>
AuthType None
Require all granted
Satisfy Any
</Directory>

without directory use the following code.

#AuthType Basic
#AuthName “By Invitation Only”
#AuthUserFile /etc/httpd/passwd/passwords
#Require user wpapi
#Require valid-user

AuthType None
Require all granted
Satisfy Any

disable html code in comments wordpress

WordPress tutorial for, disable html code in comments wordpress. We given code sample for functions file to prevent html code in wordpress comments section.

If you are wordpress developer then only use following code. Open your functions.php file from your theme and put following code in that file. Just copy and paste the following code on your functions.php file:

disable html code in comments wordpress

function wordpress_comment_post( $incoming_comment ) {
	$incoming_comment['comment_content'] = htmlspecialchars($incoming_comment['comment_content']);
	$incoming_comment['comment_content'] = str_replace( "'", '&apos;', $incoming_comment['comment_content'] );
	return( $incoming_comment );
}

function wordpress_comment_display( $comment_to_display ) {
	$comment_to_display = str_replace( '&apos;', "'", $comment_to_display );
	return $comment_to_display;
}
add_filter( 'preprocess_comment', 'wordpress_comment_post', '', 1);
add_filter( 'comment_text', 'wordpress_comment_display', '', 1);
add_filter( 'comment_text_rss', 'wordpress_comment_display', '', 1);
add_filter( 'comment_excerpt', 'wordpress_comment_display', '', 1);
disable html code in comments wordpress
disable html code in comments wordpress

add search form to wordpress navigation menu

In many wordpress premium theme search form added in navigation menu and many clients are demanding for same So here we created tutorial for adding search form.

WordPress tutorial for, add search form to wordpress navigation menu. If you are wordpress developer then only use following code. Open your functions.php file from your theme and put following code in that file.

add search form to wordpress navigation menu

add search form to wordpress navigation menu
add search form to wordpress navigation menu

Using following code in you can add the search form in your menu bar.

function add_search_box($items, $args) {
ob_start();
get_search_form();
$searchform = ob_get_contents();
ob_end_clean();
$items .= '
<ul>

<ul>
<ul>
	<li class="search-form">' . $searchform . '</li>
</ul>
</ul>

</ul>
';
return $items;
}
add_filter('wp_nav_menu_items','add_search_box', 10, 2);

There is very nice wordpress plugin which will add search box in navigation menu.

Search box on Navigation Menu

Search box on Navigation Menu
Search box on Navigation Menu

This plugin will add the default search box on main navigation menu that will save the space and flexibly fit with the menu.

Big role of facebook and twitter in egyptian revolution

Egyptian protesters thanking to facebook and youtube and twitter’s role in the revolution against the country’s ruling government.

Big role of facebook and twitter in egyptian revolution

Big role of facebook and twitter in egyptian revolution
Big role of facebook and twitter in egyptian revolution

Key Facebook page

An anti-Mubarak Facebook page started by Ghonim, a Google Inc. marketing manager in the Middle East, was credited with helping embolden millions of Egyptians to take to the streets to demand that Mubarak step down after three decades of authoritarian rule.

Even when the government made the unprecedented move to shut the country’s Internet connections with the outside world for several days, engineers from Twitter and Mountain View’s Google developed a “Speak-to-Tweet” service, giving people on the inside a way to send voice messages transmitted by Twitter.

Several memorable news photos showed handmade cardboard signs and wall paintings that read “Thank you, Facebook” in Arabic and English.

Facebook and Twitter executives need to remain circumspect with their public statements about Egypt as they “thread the needle” of international diplomacy.

One protest leader, Wael Ghonim, said he wanted to meet Facebook CEO Mark Zuckerberg and thank him.

“This revolution started online,” he said in an interview Friday on CNN. “This revolution started on Facebook.”

But as a company, Facebook Inc. – and to a similar extent Twitter Inc. – has taken great pains to appear neutral about the uprisings in Egypt and elsewhere in the Middle East because taking too much credit could leave the Palo Alto company open to blame or being shut off from other countries.

And that, experts say, would not help its long-term business prospects.

Add Twitter and Facebook buttons to wordpress posts

wordpress tutorial, how to Add Twitter and Facebook buttons to wordpress posts.  we need to install the various plugins without installing any wp plugin.

Add Twitter and Facebook buttons to wordpress posts

For showing the facebook and twitter button in wordpress post many times we need to install the various plugins but with following code you dont need to install the wordpress plugin.

Add Twitter and Facebook buttons to wordpress posts
Add Twitter and Facebook buttons to wordpress posts

If you are wordpress developer then only use following code. Open your functions.php file from your theme and put following code in that file.

function facebook_twitter_button($content){
    if(!is_feed() && !is_home()) {
        $content .= '<div class="facebook-twitter-button">
                    <a href="http://twitter.com/share"
class="twitter-share-button"
data-count="horizontal">Tweet</a>
                    
src="http://platform.twitter.com/widgets.js">
                    <div class="facebook-share-button">
                        <iframe
src="http://www.facebook.com/plugins/like.php?href='.
urlencode(get_permalink($post->ID))
.'&amp;layout=button_count&amp;show_faces=false&amp;width=200&amp;action=like&amp;colorscheme=light&amp;height=21"
scrolling="no" frameborder="0" style="border:none;
overflow:hidden; width:200px; height:21px;"
allowTransparency="true"></iframe>
                    </div>
                </div>';
    }
    return $content;
}
add_action('the_content', 'facebook_twitter_button');

20 best CSS tips and Techniques for web designers

In this article we collected some of the best CSS tips and Techniques for web designers. CSS is most important part of every web application.

CSS tips and Techniques
CSS tips and Techniques

CSS tips and Techniques

How To Use CSS3 Orientation Media Queries
Take Your Design To The Next Level With CSS3
15. CSS3 Font-Face Or How To Use A Custom Font For Your Website
CSS3 Fundaments – CSS3 Transitions
Design A Prettier Web Form With CSS3
Create A Sticky Note In 5 Easy Steps With CSS3 And HTML5
Quick Tip : The Multi Column CSS3 Module
Exciting Functions And Features
Quick Tip : Understanding CSS3 Gradients
How To Create Inset Typography With CSS3
Build Awesome Practical CSS3 Buttons
The State Of CSS3
CSS3 Transitions – Are We There Yet?
Create A Color Changing Website Using CSS3
Photoshop Effect vs CSS3 Properties
Create A Beautiful Looking Custom Dialog Box With jQuery And CSS3
Get The Best Out Of CSS3
Fundamental Problems With CSS3
Pretty CSS3 Buttons
Going Nuts With CSS3 Transitions

Future of PSD to WordPress Conversion

PSD is the design layout made in Photoshop, which needs to be converted as PSD files cannot be launch in any browser. In such scenario PSD to WordPress conversion gives a lot of advantages like easy to update, install and import. Code generated by WordPress is compliance with W3C standards.

Future of PSD to WordPress Conversion

W3C validation helps to check errors during the development phase. User registration feature of WordPress helps visitors to register themselves and can communicate to back end. Customization and integration of WordPress theme becoming most sought -after for web development.

Future of PSD to WordPress Conversion
Future of PSD to WordPress Conversion

Interestingly, more than 12 percent of the top million websites across the globe are using open source blog publishing WordPress CMS for creating great user experiences. With such a rapid growth, PSD to CSS/Wordpress conversion will be one the most sought-after forms of markup conversion service.

A WordPress empowered website is search engine friendly and helps in generating more traffic. One of the in-built features of WordPress is user registration. It allows users to register on website for further communication. Another feature provided by WordPress is password protection which helps users to keep their comments, feedback and transaction protected.

how to check robots.txt file in website

Robots.txt file is very important for Search Engine. If this file is not witten in proper way then search engine will crawl your site and your website never come in search engine result so you need to be very care ful about this file.

how to check robots.txt file in website

For Checking robots.txt file you should go for following website I really like this website.

http://tool.motoricerca.info/robots-checker.phtml

You should write your robots.txt file following way.


User-agent: *
Disallow:

Sitemap: https://purabtech.in/sitemap.xml.gz
# WordPressAPI.com 18 April 2010

how to check robots.txt file in website
how to check robots.txt file in website