How to Custome Wp Page Reading Query getting?

Below code for sameple custome page reading query.
Post Thumbnail URL Finding :

<?php //$mini_tennis_rewards_thumb = get_the_post_thumbnail($mini_tennis_rewards_data->ID, array(63,63));
$mini_tennis_rewards_thumb_src = wp_get_attachment_image_src( get_post_thumbnail_id( $mini_tennis_rewards_data->ID ), “thumbnail” );
?>

<a href=”<?php echo get_permalink($mini_tennis_rewards_data->ID); ?>”><img src=”<?php echo $mini_tennis_rewards_thumb_src[0]; ?>” /><span><?php echo $mini_tennis_rewards_data->post_title; ?></span></a>

<?php
$page_name = array(134,4778,4780,4782,4784,4786);

$privateCoaching_data = get_page($page_name[0]);
$proVideos_data = get_page($page_name[1]);
$calendar_data = get_page($page_name[2]);
$tipsOfTheWeek_data = get_page($page_name[3]);
$juniorPathway_data = get_page($page_name[4]);
$adultPathway_data = get_page($page_name[5]);
?>
<h1><a href=”<?php echo get_permalink($privateCoaching_data->ID); ?>”>Private Lessons</a></h1>

<img src=”<?php bloginfo( ‘stylesheet_directory’ ); ?>/images/privateLessons.jpg” />
<a href=”<?php echo get_permalink($privateCoaching_data->ID); ?>”><img src=”<?php bloginfo( ‘stylesheet_directory’ ); ?>/images/read-more.jpg” border=”0″ /></a>
<?php
//$privateCoaching_data_content = apply_filters(‘the_excerpt’, $privateCoaching_data->post_excerpt); // Get Content and retain WordPress filters such as paragraph tags. Origin from: http://wordpress.org/support/topic/get_pagepost-and-no-paragraphs-problem
//echo $privateCoaching_data_content;
echo $privateCoaching_data->post_excerpt;
?>

<!– Below line showes the post image –>

<?php echo get_the_post_thumbnail($mini_tennis_rewards_data->ID, ‘full’); ?>

This is line shows only for Image URL :

$thumbnail_src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), "size" );

this is useful for custom post reader or page reader purpose.

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 Current Browser URL via javascript?

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

function DinkyToy()
{
var pageURL = document.location.href;
var MyArray = pageURL.split(“?”)  ;
var BaseURL = MyArray[0];
var MyLangArray = pageURL.split(“/”);
var LangURL = MyLangArray[3];
/* Any variables would be appended */
/* using the ? and would appear in */
/* MyArray[1] */

//alert(‘pageURL = ‘ + pageURL)
//alert(‘BaseURL = ‘ + BaseURL)
alert(‘LangURL = ‘ + LangURL)

}
window.onload = DinkyToy();
</script>

How to Solve WP Nav Menu Dissapears in Category Pages?

I found this is mostly plugins problem.

My site hidding the “external video” plugin. So, your side also check this happen some plugin.

Otherwise go to This url : http://wordpress.org/support/topic/wp-nav-menu-dissapears-in-category-pages-1?replies=15

And Search This Keyword to Google you will find good solution : “wp nav menu disappear in wordpress”

How to call Magento images and Scripts in inside CMS Page?

This is the path of  “{{skin url=” for magento root directory.
1. Example for Images Load :
{{skin url=’images/welcome.jpg’}}

2. Example for Scripts Load :
{{skin url=’js/onLoad.js’}}

3. Example for Direct Scripts Load :
<script type=”text/javascript”>// <![CDATA[
document.write(‘<center><iframe width=”190″ height=”172″ src=”http://www.youtube.com” frameborder=”0″ allowfullscreen></iframe></center>’);
// ]]></script>

How to Connect multi blog in one WP-Admin?

First Install WordPress main blog.
Fixed the everthing what you are using.

1. After install open the config file.php
place this code (what domain you want change here) :
define(‘WP_SITEURL’, ‘http://www.example.com/folder/blog2’); –> This is second blog URL
define(‘WP_HOME’, ‘http://www.example.com/folder/blog1’); —> This is first blog URL

2. And Edit Second Blog folder inside — copied all fist blog content OR first blog config only copied(other wordpress file you can use your fress wordpress directory files).

3. Edit Second Blog config file.php
$table_prefix = ‘wpArras_’; –> Place Same Table prefix
define(‘WP_HOME’, ‘http://www.example.com/folder/blog2’); –> This is second blog URL

now you go and check this working well.

More Details contact.

that’s all fine :).

How to Popular Tag add & remove in Magento?

1. Go to Admin Panel

2. Select the Catalog => Select Add Tag

3. And what tag you want add here.

And watch below video tutorial url also :

http://fastdot.co.uk/magento-ecommerce/how-to-create-and-approve-tags-in-magento.html

Add :

appdesignfrontenddefaultyourthemelayouttag.xml

<default>

<!– Mage_Tag –>

<reference name=”right”>

<block type=”tag/popular” name=”tags_popular” template=”tag/popular.phtm”>

<action method=”setTemplate”><template>tag/popular.phtml</template></action>

</block>

</reference> </default>

Remove :

go to below URL.

http://stackoverflow.com/questions/2654515/removing-the-block-popular-tags-from-the-index-view-in-magento

Here some more useful things.

that’s all 🙂

This is custome tag add in home page option : {{block type=”tag/popular” template=”tag/popular.phtml”}}

How to chnage qTranslate language switcher?

You put below 1 line query only in your page. Other queries you want use your style.

1. qtrans_generateLanguageSelectCode(‘dropdown’);

2. How to get current qTranslate language : qtrans_getLanguage();

3. How to avoid home link reset the current language : just put this line “bloginfo( ‘url’ );” in link part.

You find this line echo "<li $current>
<a href='".get_settings('home')."'>Home</a></li>"; 
and remove the href quotation part. then you put above line you can use very nice.

4.  Create dropdown fields for each language
<?php
foreach(qtrans_getSortedLanguages() as $language) {
echo $language;
}

?>

5. qtranslate language convert url :  <?php echo qtrans_convertURL($url, $lang); ?>

🙂 that is all. Enjoy…

thanks for all google users. I found lot of time to spent this. I search more keyword then i find this above topics. So, again i tell you thanks for all google users.

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. 🙂

© 2020 Spirituality