WordPress FAQ

WordPress FAQ

Q. What are the types of hooks in WordPress
a. There are two types of hooks 1) Action hooks 2) Filter hooks

Q. What is custom field in wordpress?
a. Custom field is a meta-data that allows you to store arbitrary information to the wordpress post.

Q. What is the prefix of wordpress tables by default ?
a. By default, wp_ is the prefix for wordpress.

Q. What is WordPress Loop
a. To display post WordPress use PHP code, this code is known as loop.

Q. Why widget does not show up in the sidebar?
a. While using widget you have to ensure whether your theme supports the widget and if it does then it must show the sidebar. If in any case if it happens that you don’t see the sidebar then it might be missing the “function.php” file or file similar to that. This can also happen if you have forgot to save the changes in the widget or refreshing the older display of the page.

Q. What are meta-tags?
a. Meta-tags are keywords and description used to display website or page information.

Q. What are the reasons why one should not hack WordPress core file?
a. The best reason not to hack the core files is that whatever you might be doing has to be reworked as a patch.

Q. How to hide the top admin bar at the frontend in WordPress?
a. Add below line in function.php
add_filter('show_admin_bar', '__return_false');

Q. How to hide Directory Browsing in WordPress from server?
a. Add following code in htaccess file
Options -Indexes

Q. How to display custom field in wordpress?
a. echo get_post_meta($post->ID, 'keyName', true);

PHP interview questions and answers

PHP interview questions and answers

1)    What does a special set of tags <?= and ?> do in PHP?

2)    What’s the difference between include and require?

3)    I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?

4)    Would I use print “$a dollars” or “{$a} dollars” to print out the amount of dollars in this example?

5)    How do you define a constant?

6)    How do you pass a variable by value?

7)    Will comparison of string “10” and integer 11 work in PHP?

8)    When are you supposed to use endif to end the conditional statement?

9)    Explain the ternary conditional operator in PHP?

10) How do I find out the number of parameters passed into function?

11) If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?

12) What’s the difference between accessing a class method via -> and via ::?

13) Are objects passed by value or by reference?

14) How do you call a constructor for a parent class?

15) What’s the special meaning of __sleep and __wakeup?

16) Why doesn’t the following code print the newline properly?

17) Would you initialize your strings with single quotes or double quotes?

18) How come the code <?php print “Contents: $arr[1]”; ?> works, but <?php print “Contents: $arr[1][2]”; ?> doesn’t for two-dimensional array of mine?

19) What is the difference between characters 23 and x23?

20) With a heredoc syntax, do I get variable substitution inside the heredoc contents?

 

 Just press Like button to download Answers

 

Web Designer interview Questions

Web Designer interview Questions

  1. How do you place two paragraphs next to each other?
    1. Float one or both inner divs with float left and width
  2. What is CSS declaration?
    1. A declaration is made up of a property name and a value, separated by a colon
  3. What are CSS pseudo-classes?
    1. CSS pseudo-classes are used to add special effects to some selectors.
      1. Selector:pseudo-class {property:value;}
      2. selector.class:pseudo-class {property:value;}
      3. Example : a.red:visited {color:#FF0000;}
  4. Can Style Sheets and HTML stylistic elements be used in the same document?
    1. yes
  5. I made a 10px-height div, but IE makes it 20px height how to solve this ?
    1. when you make a div just to contain the bottom border of a box solution is make font size is zero
  6. What is grouping in CSS?
    1. If you want to apply same styles to few properties then grouping is best to use the syntax is below
      1. .copyright, .tagline, .hint {font-style: italic}
  7. What is parent-child selector?
    1. Parent-child selector is a selector representing the direct descendent of a parent element. Parent-child selectors are created by listing two or more tilde (~) separated selectors.BODY ~ P {background: red; color: white} The P element will be declared the specified style only if it directly descends from the BODY element:<BODY> <P>Red and white paragraph </P> </BODY>
  8. What is cascade?
    1. Cascade is a method of defining the weight (importance) of individual styling rules thus allowing conflicting rules to be sorted out should such rules apply to the same selector.
  9. Is Style Sheets case sensitive?
    1. No
  10. How to include comments in Style Sheet?
    1. Syntax: /* This is a CSS-comment */
  11. How do you target a certain browser?
    1. IE can be targetted by preceding your properties with ‘* html’. For example…
      #nav {position:relative;}
      * html #nav { /* this will target IE */
      position:absolute; }

    2. and the second way is
      <!--[if IE]> <link href="ieonly.css" rel="stylesheet" type="text/css"> <![endif]—>
  12. What is !important ?
    1. It will override declarations with normal weight .
  13. Can CSS be used with other than HTML documents?
    1. Yes. CSS can be used with any structured document format.
  14. Which characters can CSS names contain ?
    1. A to Z, a to z, 0 to 9 and Unicode characters 161 to 255
  15. How do you make a tool tip that appears on hover?
  1. <a title="This is some information for our tooltip." class="tooltip">CSS3 Tooltip</a>
    .tooltip
    {
    display: inline;
    position: relative;
    }

    .tooltip:hover:after{background: #333;
    background: rgba(0,0,0,.8);
    border-radius: 5px;
    bottom: 26px;
    color: #fff;
    content: attr(title);
    left: 20%;
    padding: 5px 15px;
    position: absolute;
    z-index: 98;
    width: 220px;
    }
PHP FAQ

PHP FAQ

  1. What does a special set of tags <?= and ?> do in PHP?
    – The output is displayed directly to the browser.
  2. What’s the difference between include and require?
    – It’s how they handle failures. If the file is not found by require(), it will cause a fatal error and halt the execution of the script. If the file is not found by include(), a warning will be issued, but execution will continue.
  3. I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what’s the problem?
    – PHP Interpreter treats numbers beginning with 0 as octal. Look at the similar PHP interview questions for more numeric problems.
  4. Would I use print “$a dollars” or “{$a} dollars” to print out the amount of dollars in this example?
    – In this example it wouldn’t matter, since the variable is all by itself, but if you were to print something like “{$a},000,000 mln dollars”, then you definitely need to use the braces.
  5. How do you define a constant?
    – Via define() directive, like define (“MYCONSTANT”, 100);
  6. How do you pass a variable by value?
    – Just like in C++, put an ampersand in front of it, like $a = &$b
  7. Will comparison of string “10″ and integer 11 work in PHP? – Yes, internally PHP will cast everything to the integer type, so numbers 10 and 11 will be compared.
  8. When are you supposed to use endif to end the conditional statement?
    – When the original if was followed by : and then the code block without braces.
  9. Explain the ternary conditional operator in PHP?
    – Expression preceding the ? is evaluated, if it’s true, then the expression preceding the : is executed, otherwise, the expression following : is executed.
  10. How do I find out the number of parameters passed into function?
    – func_num_args() function returns the number of parameters passed in.
  11. If the variable $a is equal to 5 and variable $b is equal to character a, what’s the value of $$b?
    – 100, it’s a reference to existing variable.
  12. What’s the difference between accessing a class method via -> and via ::?
    – :: is allowed to access methods that can perform static operations, i.e. those, which do not require object initialization.
  13. Are objects passed by value or by reference?
    – Everything is passed by value.
  14. How do you call a constructor for a parent class?
    – parent::constructor($value)
  15. What’s the special meaning of __sleep and __wakeup?
    – __sleep returns the array of all the variables than need to be saved, while __wakeup retrieves them.
  16. Why doesn’t the following code print the newline properly? <?php
    $str = ‘Hello, there.nHow are you?nThanks for visiting TechInterviews’;
    print $str;
    ?>
    Because inside the single quotes the n character is not interpreted as newline, just as a sequence of two characters – and n.
  17. Would you initialize your strings with single quotes or double quotes?
    – Since the data inside the single-quoted string is not parsed for variable substitution, it’s always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.
  18. How come the code <?php print “Contents: $arr[1]“; ?> works, but <?php print “Contents: $arr[1][2]“; ?> doesn’t for two-dimensional array of mine?
    – Any time you have an array with more than one dimension, complex parsing syntax is required. print “Contents: {$arr[1][2]}” would’ve worked.
  19. What is the difference between characters �23 and x23?
    – The first one is octal 23, the second is hex 23.
  20. With a heredoc syntax, do I get variable substitution inside the heredoc contents?
    – Yes.
Web designer adobe Photoshop,html,css interview questions and answers

Web designer adobe Photoshop,html,css interview questions and answers

  1. What is difference between properties and attributes ?
  1. Every body thinks that property and attributes are same but in real those are different.
    the syntax of property and attributes is
    <property attribute="attributeValue">proopertyValue</property>
    for more details you can visit here
  • write a border radius for all browsers ?
    1. -webkit-border-radius: 5px;
      -moz-border-radius: 5px;
      border-radius: 5px;
  • if you are writing a special css file for ie you will attach  it in head section and we will comment it but how the browser read it ?
    1. it was called as conditional comments. for example
      <!--[if IE ]> <link href="iecss.css" rel="stylesheet" type="text/css"> <![endif]—>
      we will write the code as above we have closed the IE in conditional statement called “if “ in square braces.
      The enclosed HTML content—a <link> tag—will be revealed to all IE browsers that support conditional comments. It links to a style sheet that only IE will see. All browsers other than IE versions 5 and later will see the code above as one simple HTML comment. If we remove the brackets and text for the sake of clarity, we’re basically left with a normal comment structure as follows:
      <!–
        <link href="iecss.css" rel="stylesheet" type="text/css" >
      –>
  • What is the shortcut key for 100% zoom in Photoshop ?
    1. Double click on zoom tool
  • What is CS in adobe version numbers ?
    1. CS means Creative Suit
  • What a lasso tool? For what purposes it can be used?
    1. The lasso tool was an  selection tools (shortcut L). It was used for selection .
  • Can you make gif animations using Photoshop tool?
    1. yeas Photoshop has a small tool called Imgeready to do 2d animations.
  • Which tool(s) will you choose to slice up an image in Adobe Photoshop?
    1. Crop tool
  • What is the use of notes tool(N) in adobe Photoshop ?
    1. To make comments.
  • How do you export the Photoshop file to web ?
    1. Slice the image with Slice tool (k) and press alt+shift+ctrl+f, select the save button in the next dialogue box and save type is Images and HTML.
    Adobe Photoshop Interview questions and answers

    Adobe Photoshop Interview questions and answers

    1. For Photoshop is cs3 really that much better than cs2 on an Intel Mac?
    2. How do I slice up an image in Adobe Photoshop CS4 Extended ?
    3. How do you select an exact color to match?
    4. What is gradient tool?
    5. What do you mean by Gaussian Blur? What is Smart object?
    6. How to Unlock Background?
    7. How to achieve Black/White with Color Detail?
    8. How do you print the grid?
    9. How do you create an artistic border?
    10. What is a heal tool?
    11. How to Use the NEF Software with Photoshop?
    12. Name few open source alternatives of Photoshop.
    13. Which color models Photoshop uses?
    14. What are the layers & masks in Photoshop?
    15. What is PSB & how it is different from PSD?
    16. What is a Photoshop plug-in? Name few of them.
    17. What are main components of Photoshop workspace?
    18. What is the shortcut to zoom back to 100%?
    19. What is default color for foreground & background in Photoshop?

     

    Download