We are Web Technology Experts Team who provide you Important information on Web Development, Interview Questions and Answers, live project problem and their solution and online free tutorials.
Showing posts with label Wordpress. Show all posts
Showing posts with label Wordpress. Show all posts
Tuesday, 22 October 2019
Friday, 5 August 2016
What html tags are allowed by wordpress.com?
Question: What html tags are allowed by wordpress.com?
Following HTML Tags are allowed in wordpress.com
.
address, a, abbr, acronym, area, article, aside, b, big, blockquote, br, caption, cite, class, code, col, del, details, dd, div, dl, dt, em, figure, figcaption, footer, font, h1, h2, h3, h4, h5, h6, header, hgroup, hr, i, img, ins, kbd, li, map, ol, p, pre, q, s, section, small, span, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var
Question: Can we add javascript in wordpress.com?
No, You can add.
script Tags are not allowed.
Question: How to embed youtube video?
Just add following code in post.
[youtube=http://www.youtube.com/watch?v=w0wflz6Iwqs]
Question: Give list of URL which videos is allowed by wordpress.com?
YouTube Vimeo DailyMotion blip.tv Flickr (both videos and images) Viddler Hulu Qik Revision3 Scribd Photobucket PollDaddy Google Video WordPress.tv (only VideoPress-type videos for the time being) SmugMug (WordPress 3.0+) FunnyOrDie.com (WordPress 3.0+)
Best Related Posts are Following:
- How to create wordpress Shortcode?.
- XMLRPC Wordpress Attack.
- Wordpress insert record into table and get last insert Id.
- Wordpress Interview Questions and Answers for experienced.
- How do I get wordpress global variable and functions in custom file [SOLVED].
- How to send Email in wordpress.
- How to change the author of a post in Wordpress.
- How can delete a user without deleting the post and comments in wordpress?.
- Wordpress redirect https to http with htaccess [SOLVED].
- Wordpress title repeated two times in browser header [SOLVED].
- Wordpress Interview Questions and Answers.
Wednesday, 13 April 2016
How to create wordpress Shortcode?
Question: What is Shortcode in Wordpress?
A shortcode is code that lets you do nifty things with very little effort.
Question: What is use Shortcode in Wordpress?
Shortcodes can be embed in post Or page which can do lot of things like Image Gallery, Video listing etc.
Question: Give a simple Shortcode example?
[gallery]
It would add photo gallery of images attached to that post or page.
Question: What is Shortcode API in Wordpress?
Shortcode API is set of functions for creating shortcodes in Page and Post.
The Shortcode API also support attributes like below:
[gallery id="123" size="large"]
Question: What is name of function which is used to register a shortcode handler?
add_shortcode
It has two parameter.
first is shortcode name and second callback function. For Example:
add_shortcode( 'shortcode', 'shortcode_handler' );
Question: How many parameter can be passed in callback function?
- $atts - an associative array of attributes.
- $content - the enclosed content
- $tag - the shortcode tag, useful for shared callback functions
Question: How to create shortcode in wordpress? Give working example? Create Shortcode
function testdata_function() { return 'This is testing data. This is testing data. This is testing data. This is testing data. This is testing data. This is testing data.'; } add_shortcode('testdata', 'testdata_function');
Use Shortcode
[testdata]
Question: How to create shortcode with attributes in wordpress? Give working example?
Create Shortcode
function testdata_function($atts) { extract(shortcode_atts(array( 'header' => 'This is default heading', 'footer' => 'This is default footer', ), $atts)); return ''.$header.' This is testing data. This is testing data. This is testing data. This is testing data. '.$footer.''; } add_shortcode('testdata', 'testdata_function');
Use Shortcode
[testdata header="Custom Heading" footer="Custom footer"]
Question: How to create shortcode with in wordpress? Give working example?
Create Shortcode
function testdata_function($attr, $content) { return $content.' This is testing data. This is testing data. This is testing data. This is testing data. This is testing data. This is testing data.'; } add_shortcode('testdata', 'testdata_function');
Use Shortcode
[testdata]This is content[/testdata]
Question: What to do if Ampersand (i.e &) converted to &?
Use html_entity_decode function (PHP inbuilt function).
Question: How to use meta tags in shortcode?
If you want to add meta tags in head tag. then use below function.
add_action('wp_head', 'add_meta_tags'); function add_meta_tags() { echo ''; }
Best Related Posts are Following:
- XMLRPC Wordpress Attack.
- Wordpress insert record into table and get last insert Id.
- Wordpress Interview Questions and Answers for experienced.
- How do I get wordpress global variable and functions in custom file [SOLVED].
- How to send Email in wordpress.
- How to change the author of a post in Wordpress.
- How can delete a user without deleting the post and comments in wordpress?.
- Wordpress redirect https to http with htaccess [SOLVED].
- Wordpress Website title repeated two times in browser header [SOLVED].
- Wordpress Interview Questions and Answers.
Saturday, 9 January 2016
XMLRPC Wordpress Attack
Queston: What is XMLRPC?
XML-RPC is one of the protocols that use XML for messages between two server. It is used to "Remote Procedure Calls" using XML.
Queston: Question: What is JSON-RPC?
JSON-RPC is one of the protocols that use JSON for messages between two server.
It is used to "Remote Procedure Calls" using JSON.
Queston: What is xmlrpc in wordpress?
WordPress uses an XML-RPC interface.
XML-RPC protocol is used to post entries.
Question: How to protect your website from xmlrpc attack?
Add following code in bottom of .htaccess file in root folder.
Order Allow,Deny deny from all
Question: How to stop abusing XML-RPC file?
Open functions.php file in your add theme and following code.
add_filter( 'xmlrpc_methods', function( $methods ) { unset( $methods['pingback.ping'] ); return $methods; } );
Best Related Posts are Following:
- Wordpress insert record into table and get last insert Id.
- Wordpress Interview Questions and Answers for experienced.
- How do I get wordpress global variable and functions in custom file [SOLVED].
- How to send Email in wordpress.
- How to change the author of a post in Wordpress.
- How can delete a user without deleting the post and comments in wordpress?.
- Wordpress redirect https to http with htaccess [SOLVED].
- Wordpress Website title repeated two times in browser header [SOLVED].
- Wordpress Interview Questions and Answers.
Sunday, 31 May 2015
Wordpress insert record into table and get last insert Id
In Wordpress, Record insertion into table is quite simple.
1. Create an Object of $wpdb;
2. Set the data in an Array.
3. Set the table name.
4. Use insert function to insert record.
5. In insert function, first argument is table name and Second argument is array.
See Example Below:
global $wpdb; $tableName = $wpdb->prefix . "users"; $saveFieldArray=array( 'user_login' => 'mylogin', 'user_pass'=>'pass', 'user_nicename' => 'Poonam', 'user_email' => 'email@no-spam.com', 'user_registered' => date('Y-m-d H:i:s',time()), 'user_status' => '1', 'display_name' => 'Arun Kumar'); //Insert Into Database $wpdb->insert( $tableName, $saveFieldArray); //get the last inert Id $lastInsertId = $wpdb->insert_id;
Best Related Posts are Following:
- Wordpress Interview Questions and Answers for experienced
- How do I get wordpress global variable and functions in custom file [SOLVED]
- How to send Email in wordpress
- How to change the author of a post in Wordpress
- How can delete a user without deleting the post and comments in wordpress?
- Wordpress redirect https to http with htaccess [SOLVED]
- Wordpress Website title repeated two times in browser header [SOLVED]
- Wordpress Interview Questions and Answers
Subscribe to:
Posts
(
Atom
)