Posts

How to make index.html default instead of index.php?

How to make index.html default instead of index.php?   Put a .htaccess file in your web root directory, if there isn't one yet. Then add the line: DirectoryIndex index.html index.htm index.php or change it accordingly. That line tells apache what file to look at first when it is not specified in the URL, in the same order that you put it after DirectoryIndex. In this example it would first look for index.html, load it if found, if not look for index.htm, load it if found, and if not load index.php. 

How to call a function on mouse scroll wheel via jquery?

How to call a function on mouse scroll wheel via jquery? Simple copy and paste this code and follow the steps. <script> function handle(delta) {         if (delta < 0)         {         functionscrolldown(); // You can change here the function event according to your need on mouse wheel down         }         else         {         functionscrollup(); // You can change here the function event according to your need on mouse wheel up         } }  /** Event handler for mouse wheel event.  */  /* here mouse wheel event stop from the browser */ $(document).on("click", '.fancybox-close', function(e) { // you also need to stop the Mouse wheel function event on a certain evernt of mouse click so you need to change the ".fancybox-close" class accoding to your click button window.removeEventListener('DOMMouseScroll', wheel, false); window.removeEventListener('mousewheel', wheel, false); });  /* here mouse wheel event will start for the

How to Install Cakephp?

Image
On Cakephp Welcome Screen, you will fine two error. To remove this error, you must be change 01. Security . salt value. 02. Security . cipherSeed value.     Please Change Security.salt value: 1. Open this project in php text editor. 2. Go to app/config/core.php file 3. In line no 204 change Security . salt value. // you can change this value whatever you want 4. Then refresh the startup screen. Our 1 st error has been removed. »Change Security.cipherSeed value: 1. Open this project in php text editor 2. Go to app/config/core.php file 3. In line no 208 change Security . cipherSeed value. // you can change this value whatever you want but only in digits Then at the end of page you will find database error so for remove this error you need to edit the page 1. Open this project in php text editor 2. Go to app/config/database.php.default file and rename (remove .default ) this file. 3. Rename file will be like this database.php 4. Then refresh the startup screen.

is_home() and is_front_page() not working in wordpress?

I want to same content on home page but is_home() and is_front_page() not working in wordpress. Why? Then i search some sites and find a solution. Here is the solution:- Just add this like right before of your condition <?php wp_reset_query(); ?> <?php if(!is_home()){         echo "home page"; <?php } else { echo "Not home page"; } Thanks

How to add One Page template in Twenty thirteen theme wordpress?

Add One Page template in Twenty thirteen theme wordpress. Here i will tell you that how to create one page template in twenty thirteen theme Step 1: create a folder inside theme folder themes/twentythirteen/ Like : themes/twentythirteen/ page-templates Step 2:  Create a file named one-page.php inside page-templates folder Step 3 : Copy and paste this code in your one-page.php page <?php /**  * Template Name: One Page  *  * Author Olivia Hoback  * www.olivia.nu  * @package WordPress  * @subpackage Twenty_Thirteen  * @since Twenty Thirteen 1.0  */ get_header(); ?> <div id="primary" class="content-area">         <div id="content" class="site-content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <div class="col-lg-12 inner">                     <?php if ( has_post_thumbnail() && ! post_password_required() ) : ?>                     <div cl

How to get top parent page ID in wordpress?

How to get top parent page ID in wordpress The solution to get the top parent page id is here, it is quite easy. function wp_get_top_parent_page_id() {     global $post;     // Check if page is a child page     if ($post->ancestors) {     //  Grab the ID of top-level page from the tree     return end($post->ancestors);     } else {     // Page is the top level, so use  it’s own id     //return $post->ID;     return 1;     }     } echo wp_get_top_parent_page_id();

How to get the post link in WordPress?

How to get the post link in WordPress? <?=get_permalink(12)?> Where 12 is the id of your post.