Posts

Showing posts from November, 2013

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();