Category: PHP

  • Show Custom field in WordPress Post, Custom Field in WordPress

    Custom fields are very useful in WordPress and we can attach lot of information as metadata in our Post. Now we may have requirement in which we want to display these Meta data or Custom field in our Post. If you want to display the custom field data in your post or anywhere just use…

  • Limit the Post Title in WordPress

    Sometime we have very long post title and we want that only some part of title should display on main page and whole title should only display on single post page. Following code you can use to perform this task. <?php             foreach( $myposts as $post ):setup_postdata($post)      …

  • Use jQuery or JavaScript in PHP, Hide or Show a DIV

    How to use jQuery or JavaScript in PHP Some time we have a such type of logic in which we want to use jQuery within PHP code. It is very useful and sometime you can perform a very difficult task by using jQuery and PHP in no time. Here i am using jQuery/JavaScript code for…