How to view Page Expert only in WP?

Hi People this is used for wp page excerpt only view.
<?php
$page_name = array(134,4754,4750); // 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.

$content_data1 = get_page( $page_name[0] );
$content_data2 = get_page( $page_name[1] );
$content_data3 = get_page( $page_name[2] ); // 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.

//Content Expert only view
echo $content_data1->post_excerpt;
?>

It is worked for me. Try your side.

<?php
$page_name = array(134,4754,4750); // 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.

$privateCoaching_data = get_page( $page_name[0] );
$facebook_data = get_page( $page_name[1] );
$newsletter_data = get_page( $page_name[2] ); // 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.
?>

How to Read Javascript Via Query String?

Below I mention that Reading Query String Script:

<!– Query String Read Code Start
function querySt(queryValue) {
queryString = window.location.search.substring(1);
urlSplitQuery = queryString.split(“&”);
for (i=0;i<urlSplitQuery.length;i++) {
finalQueryTxt = urlSplitQuery[i].split(“=”);
if (finalQueryTxt[0] == queryValue) {
return finalQueryTxt[1];
}
}
}
var queryFunction = querySt(“queryFunction”);
//document.write(queryString);

// Query String Read Code End  –>

If you feel check conditon below i mention the query string condition:

if(queryString==”query”){
document.write(‘Yes query here’);
}
else{
document.write(‘no query’);
}

How to Retrieving css values via javascript?

Hi this is one of good solution from my side, If anybody find new solution give me & Introduce people.

<div id=”hideProperty” style=”display:none”>
Test Hide Script getting value in javascript via.
</div>

<script type=”text/javascript” language=”javascript”>

var GLOBAL_Hide = “none”;
//alert(GLOBAL_Hide);

var hideProperty = document.getElementById(‘hideProperty’).style.display;

if(hideProperty == GLOBAL_Hide){
alert(hideProperty);
}
else {
document.write(‘<style type=”text/css”>#hideProperty{display: block; }</style>’);
}
</script>

Here what you want? you can write above script inside. that is your knowledge.

How to view in Catgory Name wise Recent Post view in WP?

You can add below code where you want in your php file inside :
<?php query_posts(‘category_name=pre-work-out&showposts=10’); ?>
<?php while (have_posts()) : the_post(); ?>
<h3><a href=”<?php echo get_permalink($page->ID); ?>”><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
<?php endwhile;?>

This is show what you like in your recent post from your specific category wise. What you like change you “query_post” inside.

How to Create New Banner Position in Interspire?

1. Go to ->/httpdocs/language/en/admin/banners.ini

Add this code :
BannerTopOfPage = “Top of Page”
TopOfHomePage = “Top of Home Page”

2.  Go to -> /httpdocs/admin/includes/classes/class.banners.php
a.) Find this -> “if ($banner['location'] == "top") {

when you find this line there you can add below type:

if ($banner[‘location’] == “homeTopBanner”) {
$GLOBALS[‘IsLocationHomeTopBanner’] = “selected=”selected””;
}
else if ($banner[‘location’] == “top”) {
$GLOBALS[‘IsLocationTop’] = “selected=”selected””;
}
else {
$GLOBALS[‘IsLocationBottom’] = “selected=”selected””;
}

b.) Find this ->”if ($banner['location'] == "top") {"

when you find this line there you can add below type:

if ($banner[‘location’] == “homeTopBanner”) {
$GLOBALS[‘Location’] .= sprintf(” (%s)”, GetLang(‘BannerTopOfHomePage’));
}
else if ($banner[‘location’] == “top”) {
$GLOBALS[‘Location’] .= sprintf(” (%s)”, GetLang(‘BannerTopOfPage’));
}
else {
$GLOBALS[‘Location’] .= sprintf(” (%s)”, GetLang(‘BannerBottomOfPage’));
}

3. Go to -> “/httpdocs/includes/classes/class.banner.php”

a.) Find this ->”if($banner[‘location’] == “top” && !isset($GLOBALS[‘Banners’][‘top’])) {”

when you find this line there you can add below type:

if($banner[‘location’] == “homeTopBanner” && !isset($GLOBALS[‘Banners’][‘homeTopBanner’])) {
$GLOBALS[‘Banners’][‘homeTopBanner’] = $banner;
}
else if($banner[‘location’] == “top” && !isset($GLOBALS[‘Banners’][‘top’])) {
$GLOBALS[‘Banners’][‘top’] = $banner;
}
else if($banner[‘location’] == “bottom” && !isset($GLOBALS[‘Banners’][‘bottom’])) {
$GLOBALS[‘Banners’][‘bottom’] = $banner;
}

b.) Find this -> “if($banner['location'] == "top" && !isset($GLOBALS['Banners'][$banner['catorbrandid']]['top'])) {"

when you find this line there you can add below type:

if($banner[‘location’] == “homeTopBanner” && !isset($GLOBALS[‘Banners’][$banner[‘catorbrandid’]][‘homeTopBanner’])) {
$GLOBALS[‘Banners’][$banner[‘catorbrandid’]][‘homeTopBanner’] = $banner;
}
else if($banner[‘location’] == “top” && !isset($GLOBALS[‘Banners’][$banner[‘catorbrandid’]][‘top’])) {
$GLOBALS[‘Banners’][$banner[‘catorbrandid’]][‘top’] = $banner;
}
else if($banner[‘location’] == “bottom” && !isset($GLOBALS[‘Banners’][$banner[‘catorbrandid’]][‘bottom’])) {
$GLOBALS[‘Banners’][$banner[‘catorbrandid’]][‘bottom’] = $banner;
}

4. Go to ->”/httpdocs/lib/templates”

a.) Find this -> "if(isset($GLOBALS["Banners"]["top"])) {"

when you find this line there you can add below type:

// Is there a Header top template?
if(isset($GLOBALS[“Banners”][“homeTopBanner”])) {
// Replace it out
$tplData = str_replace(“%%Banner.homeTopBanner%%”, $GLOBALS[“Banners”][“homeTopBanner”][“content”], $tplData);
}
else {
// Replace it with nothing
$tplData = str_replace(“%%Banner.homeTopBanner%%”, “”, $tplData);
}

b.) Find this ->” if(isset($GLOBALS["Banners"][$id])) {"

Add this below lines :
// Is there a Header top template?
if(isset($GLOBALS[“Banners”][$id][“homeTopBanner”])) {
// Replace it out
$tplData = str_replace(“%%Banner.homeTopBanner%%”, $GLOBALS[“Banners”][$id][“homeTopBanner”][“content”], $tplData);
}
else {
// Replace it with nothing
$tplData = str_replace(“%%Banner.homeTopBanner%%”, “”, $tplData);
}

c.) Find final add this line in this page any where–> $tplData = str_replace(“%%Banner.TopBanner%%”, “”, $tplData);

When you find this line you can add the same type, that line below or above:

$tplData = str_replace(“%%Banner.homeTopBanner%%”, “”, $tplData);

5. Go to this page -> /httpdocs/admin/templates/banner.form.tpl
Find this line for form view : <option value=”top” %%GLOBAL_IsLocationTop%%>%%LNG_TopOfPage%%</option>
Add you type code : <option value=”homeTopBanner” %%GLOBAL_IsLocationHomeTopBanner%%>%%LNG_TopOfHomePage%%</option>

6. Where you want add this final line in your front template file :
%%Banner.homeTopBanner%%

7. And one more changes is important :
Go to mysql query, Add below query for your Banner Position Stored Database Purpose :
"ALTER TABLE `isc_banners` CHANGE `location` `location` ENUM( ‘top’, ‘bottom’, ‘homeTopBanner’, ‘rightBanner1’, ‘rightBanner2’, ‘rightBanner3’, ‘rightBanner4’, ‘leftBanner1’, ‘leftBanner2’, ‘leftBanner3’, ‘leftBanner4’ ) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT ‘top’ "
(OR)
Go to Phpmyadmin – Select table “isc_banners” and Edit the filed location.

Now the new banner position is added.

More reference in some other option advice you can use this url also :
http://www.shoppingcartcommunity.com/forum/viewtopic.php?f=12&t=200
AND
https://www.interspire.com/support/kb/questions/916/How+to+add+a+flash+file+or+movie+to+my+store%3F

thanks,
J.
http://www.srinesiga.com

how split & substr & find numeric value in php?

Below Example is substr :
$check_allowed = substr($total,35);

Below Example is finding only in numberic value:
echo ereg_replace(“/[^0-9.]/”, “”, $total);

Below Example is convert float :
$check_allowed =(float)$total;
Below Example is finding dollar sign :

$price= $total;
list($symbol, $price) = sscanf($price,’%[^0-9]%s’);
echo var_dump($symbol).'<br />’;
echo var_dump($price);
Below Example is SPlit :
$check_allowed = split(‘;’,$total);
echo $check_allowed[1];

checking if condition :
if($check_allowed[1] >= “10.00”){
?>
<a target=”_parent” href=”<?php echo get_option(‘shopping_cart_url’); ?>” title=”<?php _e(‘Checkout’, ‘wpsc’); ?>”><?php _e(‘Checkout’, ‘wpsc’); ?></a>
<?php
}
else{
?>
<a target=”_parent” href=”javascript:alert(‘Sorry, your order does not meet the minimum order value of &euro;10’);” title=”<?php _e(‘Checkout’, ‘wpsc’); ?>”><?php _e(‘Checkout’, ‘wpsc’); ?></a>
<?php
}
?>

How to install IDEAL Payment extension in Magento 1.5.1?

Go Below URL :

http://www.magentocommerce.com/magento-connect/Magento+Core/extension/159/ideal-extension

Then You go Magento Connect Manager ->
Again You login same admin user & password.

Now go setting  –> There you change Preferred State to “beta”.

In the settings tab of the magentoconnect manager set the preferred state to: Beta and the install wil go.

then you go to install that is working well.

That’s all. 🙂

How to Display Post in Categories Wise in WP?

<div>LATEST ARTICLES</div>
<?php
$args = array(‘orderby’ => ‘date’, ‘numberposts’ => 3, ‘category’ => 6, ‘order’=> ‘DESC’);
$postslist = get_posts( $args );
foreach ($postslist as $post) :  setup_postdata($post); ?>
<div>
<?php //the_date(); ?>
<div>
<?php //echo get_the_post_thumbnail($page->ID, ‘thumbnail’);
echo get_the_post_thumbnail($page->ID, ‘full’);
?>
</div>
<h3><a href=”<?php echo get_permalink($page->ID); ?>”><?php the_title(); ?></a></h3>

<?php the_excerpt(); ?>
</div>
<?php endforeach; ?>
<div></div>

<?php
// All Categorie Lagest Post Code
$the_query = new WP_Query( ‘cat=6&posts_per_page=10&offset=3’ );
// The Loop
while ( $the_query->have_posts() ) : $the_query->the_post();
?>
<div>
<?php //the_date(); ?>
<div>
<?php //echo get_the_post_thumbnail($page->ID, ‘thumbnail’);
echo get_the_post_thumbnail($page->ID, ‘full’);
?>
</div>
<h3><a href=”<?php echo get_permalink($page->ID); ?>”><?php the_title(); ?></a></h3>
<?php the_excerpt(); ?>
</div>
<?php
endwhile;

// Reset Post Data
wp_reset_postdata();
?>
<div></div>
<?php
// Get Categorie Slug Name
function get_cat_slug($cat_id) {
$cat_id = (int) $cat_id;
$category = &get_category($cat_id);
return $category->slug;
}
?>
<?php
// Get the categories
$category = get_the_category();

// Get the 3 Latest Article
$string = get_category_link( $category[0]->cat_ID );
//        echo $string;
?>
<div><a href=”http://www.anotherway.org/category/<?php echo get_cat_slug(6); ?>”>View All Save Your Health</a></div>

How to get Categories Slug Name?

<?php
// Get Categorie Slug Name
function get_cat_slug($cat_id) {
$cat_id = (int) $cat_id;
$category = &get_category($cat_id);
return $category->slug;
}
?>

<div><a href=”http://www.yourdomain.com/category/<?php echo get_cat_slug(8); ?>”>View All</a></div>

that’s all. 🙂

How to Creating dynamic table in PHP?

<?php
echo ‘
<table border=”1″ width=”50%”>
<tbody>
<tr>’;
$content = array(1, 2, 3, 4, 5, 6, 7, 8, 9);
$counter = 0;
foreach($content as $data) {
if($counter != 0 && $counter%3 == 0) {
echo “</tr>
<tr>”;
}
echo ”
<td>”;
echo $data;
echo “</td>
“;
$counter++;
}
echo ‘</tr>
</tbody>
</table>
‘;
?>
<table border=”0″ cellspacing=”0″ cellpadding=”0″>
<tbody>
<tr>
<?php
$args = array(
‘numberposts’ => -1,
‘post_parent’ => $post->ID,
‘post_type’ => ‘page’,
‘post_status’ => ‘publish’,
‘orderby’ => ‘menu_order,title’,
‘order’ => ‘ASC’
);
$my_pagelist = &get_children($args);

if ($my_pagelist) {
//                  echo count($my_pagelist);
//echo get_the_post_thumbnail($my_child->ID, ‘thumbnail’, array(‘class’ => ‘ourservices-thumb’));
//echo get_the_post_thumbnail($my_child->ID, ‘medium’, array(‘class’ => ‘ourservices-thumb’));
//echo get_the_post_thumbnail($my_child->ID, ‘full’, array(‘class’ => ‘ourservices-thumb’));
//echo sizeof($my_child).” – “.count($my_child);
//                $count = count($my_child);
$counter = 0;
foreach($my_pagelist as $my_child) {
$my_child_slug = $my_slug . ‘/’. $my_child->post_name.’/’;
if($counter != 0 && $counter%3 == 0) {
echo “</tr>
<tr>”;
}
echo ‘
<td>’;
echo get_the_post_thumbnail($my_child->ID, array(200,120), array(‘class’ => ‘ourservices-thumb’)).’
<h3><a href=”‘.$my_child_slug.'”>”‘.$my_child->post_title.'”</a></h3>
‘;
echo ‘</td>
‘;
$counter++;
}

}
?></tr>
</tbody>
</table>
enjoy just for fun: This is easy for coding guys.
other guys is very diffcult. I am searching more things in google. then i found the solution for this. Thanks for all google users.

That’s all. :)

© 2020 Spirituality