If you want to add the different header for each category then use the following code in your index.php where “get_header()” method is called. <?php if (is_category(‘new_category’)) { get_header(‘ new_category ‘); } else { get_header(); } ?> Create the Header-new_category.php … Continue reading
Category Archives: wordpress hacks
wordpress database migration change Steps
first go to wp-config.php file and change database name(what you want) 1. wp_1_options -Table name option_name column – change(siteurl and home) 2. wp_blogs- Table name domain column – change 3. wp_site- Table name domain column – change 4. wp_usermeta meta_key … Continue reading
find replace in post wordpress and worpdressmu
Use this query for wordpressmu users “UPDATE wp_1_posts SET post_content = REPLACE(post_content, ‘www.test.com’, ‘www.secondtest.com’);” Use this query for wordpress “UPDATE wp_posts SET post_content = REPLACE(post_content, ‘www.test.com’, ‘www.secondtest.com’);” Incoming search terms:wordpress api replace
How to Display any RSS Feed icon on Your WordPress Site
How to show or exclude Certain Categories in a Menu – WordPress
If you want show only some categories in wordpress menu than use following command in header.php. <ul style=”float:left; width:840px;”> <?php wp_list_categories(‘orderby=name&include=5,4,8,9,52,65,35′); ?> </ul> If you want exclude some categories in wordpress menu than use following command in header.php. <ul style=”float:left; … Continue reading
Show Random Posts in one page with WordPress
You need to create random.php page in your template. In that page just copy paste the following code: <?php query_posts(array(‘orderby’ => ‘rand’, ‘showposts’ => 1)); if (have_posts()) : while (have_posts()) : the_post(); ?> <h1><a href=”<?php the_permalink() ?>”><?php the_title(); ?></a></h1> <?php … Continue reading
How to add the flash intro in wordpress sites
Follow my steps to create flash intro in wordpress sites. 1. Create file named intro.php and just copy paste following code <?php /* Template Name: intro */ if (have_posts()) : while (have_posts()) : the_post(); the_content(); endwhile; endif; ?> 2. Upload … Continue reading
What is Plugin API Hooks – solution for plugins are not working on wordpress theme
Whenever you developing the new theme. You need to add following code in your theme file. wp_head Goes in the HTML <head> element of a theme; header.php template. Example plugin use: add javascript code. Usage: <?php do_action(‘wp_head’); ?> -or- <?php … Continue reading
How to use conditional tags in WordPress themes and plugins.
How to check page is subpage or parent page. We got this particular requirement of wordpress menus. For that we need many times parent page menu and sub pages as submenu. Using following code we can able to find the … Continue reading
How to use conditional tags in WordPress themes and plugins
The Conditional Tags are most useful in creating the wordpress themes and plugins. The Conditional Tags can be used in your Template files to change what content is displayed and how that content is displayed on a particular page depending … Continue reading