All Entries Tagged With: "Amp"
Press Row Wordpress Theme
2 Column, Black & White, Cars, Wordpress Themes
Megaupload Download:
http://www.megaupload.com/?d=OD25EFXY
Night Life Wordpress Theme
2 Column, Black & White, Cars, Personal Pages, Wordpress Themes
Megaupload Download:
http://www.megaupload.com/?d=V3D5U8NX
Crisp Black and Orange Wordpress Theme
Megaupload Download:
http://www.megaupload.com/?d=LJ4ELAC2
How To Add Private Pages In Navigation Menu Of WordPress Blog
If you are using private pages and want to display then in navigation menu then use this hack. For that open the file where your navigation code is and add this code:
<ul>
<?php
wp_list_pages(‘depth=1&title_li=0&sort_column=menu_order’);
if(current_user_can(‘read_private_pages’)) :
?>
<li><a href=”<?php echo get_permalink(10); ?>”>For Authors only</a></li>
<?php endif; ?>
</ul>
Now, navigation menu displays private pages when specific user is login into blog.
That’s it!
How To Use CSS Sliding Door Technique In WOrdpress Blog
WordPress functions wp_list_pages() and wp_list_categories() does not allow to embed span elements in your code. We can bypass it with some php regular expressions. For that copy this code where you want to appear your blog menu:
<ul id=”nav”>
<li><a href=”<?php echo get_option(‘home’); ?>/”><span>Home</span></a></li>
<?php echo preg_replace(‘@\<li([^>]*)>\<a([^>]*)>(.*?)\<\/a>@i’, ‘<li$1><a$2><span>$3</span></a>’, wp_list_categories(’echo=0&orderby=name&exlude=181&title_li=&depth=1′)); ?>
</ul>
Once you modified your theme file, you have to [...]
Code To Find List Of Posts Which Has No Tags In WordPress Blog
In order to find and display the untagged posts in blog, you need to use this code:
<?php query_posts(‘orderby=title&order=asc&showposts=-1′); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php
$tag = get_the_tags();
if (!$tag) { //Theses posts have no tags
the_title();
}
endwhile;
endif; ?>
Add this code in any template where you want to display untagged posts of the blog.
That’s it!
Code to Display Categories In Two Columns In WordPress Blog
In order to display categories in two columns you need to use this code:
<?php
$cats = explode(“<br />”,wp_list_categories(‘title_li=&echo=0&depth=1&style=none’));
$cat_n = count($cats) – 1;
for ($i=0;$i<$cat_n;$i++):
if ($i<$cat_n/2):
$cat_left = $cat_left.’<li>’.$cats[$i].’</li>’;
elseif ($i>=$cat_n/2):
$cat_right = $cat_right.’<li>’.$cats[$i].’</li>’;
endif;
endfor;
?>
<ul>
<?php echo $cat_left;?>
</ul>
<ul>
<?php echo $cat_right;?>
</ul>
Add this code where you want to display categories.
That’s it!
Code To Display Scheduled Posts In WordPress Blog
This is the code to display scheduled posts in wordpress blog. You can add it where you want to display the scheduled posts:
<?php
$my_query = new WP_Query(‘post_status=future&order=DESC&showposts=5′);
if ($my_query->have_posts()) {
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID; ?>
<li><?php the_title(); ?></li>
<?php endwhile;
}
?>
That’ s it!
How To Make Search Result Unlimited In WordPress Blog
Sometimes wordpress users want make the search results unlimited. This is a code which allows search to return unlimited results, altering the standard WordPress Loop by using a custom query. If you have a search template search.php you can simple add the following line of code above your Loop.
Find:
<?php if (have_posts()) : ?>
<?php while (have_posts()) [...]
How To Separate Categories With Blogroll In WordPress
WordPress blogroll has gone through many changes over the past year and a lot of the WordPress themes authors out there did not update their themes with the new code used to call the blogroll.
The old code still works but it does not give you the advantage of the new blogroll capabilities. If you have [...]
How To Hide Individual Page In WordPress Blog
In many cases we need to hide the page from the menu or on the list. This should be the code for the menu in your theme:
<?php wp_list_pages(‘sort_column=menu_order&depth=1&title_li=’);?>
If you have created a page but do not want to display it in blog menu then you need to add an exclude command and the page number [...]
How To Remove Ads From Individual Categories
Many wordpress users uses ads on their blog. But in some cases we may require that Ads can not be displayed on specific category. In this case you need add this code into your blog around your advertisement code:
<?php if ( !in_category(1) && !in_category(11) ) { ?>
This is your existing advertising code.
<?php } ?>
Where it [...]
How To Limit Display Of Archive Months In WordPress
Most of the wordpress themes are with standard code to display blog archives by month with no limit to the number of archives to display. Default Code of it as this:
<h2>Archives</h2>
<ul>
<?php wp_get_archives(‘type=monthly’); ?>
</ul>
If your blog is well established and you are displaying archive on the page which can drag your page too long which web [...]
How To Resize Thumbneil Image In WordPress
First thumbnail generated by the WordPress system defaults, therefore its size should be 128 pixel and automatically alters the height aspect ratio to match. But Many times we need to resize the thumbnail image on our blog. Instead of doing for each thumbnail image you can do it by editing simple wordpress core file. I [...]
Code To Display Categories In Drop Down Format In WordPress Blog
You can use this code to display your categories in drop down format:
<form action=”<?php bloginfo(‘url’); ?>/” method=”get”>
<?php
$select = wp_dropdown_categories(‘show_option_none=Select category&show_count=1&orderby=name&echo=0′);
$select = preg_replace(“#<select([^>]*)>#”, “<select$1 onchange=’return this.form.submit()’>”, $select); echo $select; ?>
<noscript><input type=”submit” value=”View” /></noscript>
</form>
Code To Display Archives In Drop Down Format In WordPress Blog
You can use this code to display Archives in drop down format:
<select name=\”archive-dropdown\” onChange=’document.location.href=this.options[this.selectedIndex].value;’>
<option value=\”\”><?php echo attribute_escape(__(‘Select Month’)); ?></option>
<?php wp_get_archives(‘type=monthly&format=option&show_post_count=1′); ?> </select>
Case Study: MySQL ErrorCode 13: Can’t Create/Write To File
Problem: The MySQL variable tmpdir is set to a directory that cannot be written to when using PHP to access MySQL. To verify this enter MySQL at the command line and type show variables. You will get a long list and one of them will read:
tmpdir = /somedir/
Solution: Alter the tmpdir variable to point to [...]
Difference Between User Access Manager and Role Manager Plugins In WordPress
User Access Manager and Role Manager Plugins are used to assign access to the wordpress user. But have some different features and they are as under:
User Access Manager:
If you just want to control access to your pages & posts, the way to go is User Access Manager. This allows you to set up posts and [...]
Featured Post Sidebar Widget In WordPress
Many of the wordpress users requires to display featured post in the sidebar using sidebar widget. For that here is the solution:
1. Download and install the PHP Code Widget. This will allow to use PHP code in a custom text widget.
http://wordpress.org/extend/plugins/php-code-widget/
2. Add this code in body of the text widget:
<?php
$featuredPost = new WP_Query();
$featuredPost->query(‘tag=featured&showposts=1&orderby=date’);
while ($featuredPost->have_posts()) : [...]
How To Install WordPress Blog On XAMPP?
This is an article which describes on how to install wordpress blog on XAMPP server:
1) Download XAMPP from this URL:
http://apachefriends.org/en/xampp-windows.html
2) Install XAMPP- Double Click xampp-win32-?.?.?-installer.exe to launch the installer.
3) Click “Next” to Continue -> Set the Destination Folder and click “Next”.
4) Select the Apache & MySQL as Service And Click on “Install”.
5) Once the installation [...]
