how to display specific post from home page in wp?

<div>
<?php
if (have_posts()) : the_post();
query_posts(‘category_name=Home Pink’);
endif;
//The Loop Below content take your blog theme post coding content start…
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>

<h2 style=”margin:0;”><a href=”<?php the_permalink(); ?>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyten’ ), the_title_attribute( ‘echo=0’ ) ); ?>” rel=”bookmark”><?php the_title(); ?></a></h2>
<div style=”background:#EF4584;”>
<?php twentyten_posted_on(); ?>
</div><!– .entry-meta –>
<div>&nbsp;</div>
<div>
<?php  home_the_content(); ?>
</div><!– .entry-content –>

</div><!– #post-##  Coding Content End –>
<?php
endwhile;
endif;
?>
</div><!– Green Bg End –>

Reference url :

http://codex.wordpress.org/Function_Reference/query_posts

http://codex.wordpress.org/Template_Hierarchy

How to Custom Page display in Front Page?

<?php
$page_name = array(9,10,11); // 123 should be replaced with a specific Page’s id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123.

$company_solution_data = get_page( $page_name[0] ); // You must pass in a variable to the get_page function. If you pass in a value (e.g. get_page ( 123 ); ), WordPress will generate an error.
$company_portfolio_data = get_page( $page_name[1] );
$company_testimonials_data = get_page( $page_name[2] );
?>
<div id=”solutionzone”>
<?php
$company_solution_content = apply_filters(‘the_content’, $company_solution_data->post_content); // Get Content and retain WordPress filters such as paragraph tags. Origin from: http://wordpress.org/support/topic/get_pagepost-and-no-paragraphs-problem
$company_solution_title = $company_solution_data->post_title; // Get title
echo ‘<h2>’.$company_solution_title.'</h2>’;
if (strlen($company_solution_content)>130)
{            echo “<p>”.substr($company_solution_content,0,128).”…</p><div class=’clr’></div>”; // Output Content
echo ‘<a href=”?page_id=9″>more</a><div></div>’;
}
else{
echo $company_solution_content;
}
?>

Css padding techniques

Here i mention some of css techniques.

1.  /*padding: top right+left bottom;*/

padding:20px 22px 18px;

2.  /*padding: top right bottom left;*/

padding:20px  10px 18px 22px;

3.  /*padding: top+bottom left+right;*/

padding:20px  22px;
4.  /*     margin: top left+right bottom !important;*/

margin: 0 6px 20px !important;

How to change the Translation Inline?

Hi,

Anybody want to change the developer things going to change below url section.

1. Login Admin

2. Click System –> Configuration –> Developer

3. Click Translate Inline

4. Change Enable to Frontend “Yes”

5. Click Save Config

that is enough for all.

🙂

How install magento Language Translation?

Download Languages :

http://www.magentocommerce.com/translations

1. download language files and place them into the right folders (app >design >frontend >default >default >local)
2. Login to admin panel and go to System > Manage stores
3. Create a new store view or modify
4. Now go to: Configuration -> Current Configuration Scope (Select your language from the dropdown) and on the right side under “Locale options” choose the desired language.

5. Clear the cache (System – Cache Management)

Now go to: Configuration -> Current Configuration Scope (Select your language from the dropdown) and on the right side under “Locale options” choose the desired language.

How can I Print All MySQL Database Tables & Fields Using PHP?

<?php
/****************
* File: displaytables.php
* Date: 1.13.2009
* Author: design1online.com
* Purpose: display all table structure for a specific database
****************/

//connection variables
$host = “localhost”;
$database = “your_db_name”;
$user = “your_username”;
$pass = “your_pass”;

//connection to the database
mysql_connect($host, $user, $pass)
or die (‘cannot connect to the database: ‘ . mysql_error());

//select the database
mysql_select_db($database)
or die (‘cannot select database: ‘ . mysql_error());

//loop to show all the tables and fields
$loop = mysql_query(“SHOW tables FROM $database”)
or die (‘cannot select tables’);

while($row = mysql_fetch_array($loop))
{

echo “
<table cellpadding=2 cellspacing=2 border=0 width=75%>
<tr bgcolor=#666666>
<td colspan=5><center><b><font color=#FFFFFF>” . $row[0] . “</font></center></td>
</tr>
<tr>
<td>Field</td><td>Type</td><td>Key</td><td>Default</td><td>Extra</td>
</tr>”;

$i = 0;

$loop2 = mysql_query(“SHOW columns FROM ” . $row[0])
or die (‘cannot select table fields’);

while ($row2 = mysql_fetch_array($loop2))
{
echo “<tr “;
if ($i % 2 == 0)
echo “bgcolor=#CCCCCC”;
echo “><td>” . $row2[0] . “</td><td>” . $row2[1] . “</td><td>” . $row2[2] . “</td><td>” . $row2[3] . “</td><td>” . $row2[4] . “</td></tr>”;
$i++;
}
echo “</table><br/><br/>”;

}
?>

Reference : http://jadendreamer.wordpress.com/2009/01/13/print-all-mysql-database-tables-fields-using-php/

thanks above content for the above url.

Custom Pagination

Custom Pagination without WordPress Plugins

http://wordpress.org/support/topic/wp-31-custom-post-pagination

http://wordpress.org/support/topic/wp-query-pagination-and-offeset

For Magento left navigation IE7 issue css Problem Solved.

First you set #left-nav li {

position:relative;

}

#left-nav li ul, #left-nav li:hover ul ul, #left-nav li a:hover ul ul, #left-nav li ul li:hover ul ul, #left-nav li ul li a:hover ul ul, #left-nav li ul li ul li:hover ul ul, #left-nav li ul li a ul li a:hover ul ul, #left-nav li ul li ul li ul li:hover ul ul, #left-nav li ul li a ul li a ul li a:hover ul ul, #left-nav li ul li ul li ul li ul li:hover ul ul, #left-nav li ul li a ul li a ul li a ul li a:hover ul ul{
left:-1000px;
position:absolute;
z-index:999;
}
#left-nav li:hover ul, #left-nav li a:hover ul, #left-nav li ul li:hover ul, #left-nav li ul li a:hover ul, #left-nav li ul li ul li:hover ul, #left-nav li ul li ul li a:hover ul, #left-nav li ul li ul li ul li:hover ul, #left-nav li ul li ul li ul li a:hover ul, #left-nav li ul li ul li ul li ul li:hover ul, #left-nav li ul li ul li ul li ul li a:hover ul, #left-nav li ul li ul li ul li ul li ul li:hover ul, #left-nav li ul li ul li ul li ul li ul li a:hover ul{
position:relative;
left:0px;
top:0;
z-index:999;
width:193px;
}

this is very intersting. I found this solution for IE 7 drop down menu purpose.

Text Shadow

This is “text-shadow” proberty. Below I mention the some of example for text shdow proberty.

Ex:
color: #000;
background: #fff;
text-shadow: 2px 0px 10px #000;

Below i mention text-shadow property field explantion.

text-shadow: x-offset y-offset Blur color;

How to install magento extensions?

http://blog.magentomagik.com/how-to-install-magento-extensions-magento-extension-installation-guide/

© 2020 Spirituality