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 Solve WordPress Error: Warning: Cannot modify header information – headers already sent?

This is mostly white space proble.

1. You go your theme

2. First you check the function.php any unwanted “White Spaces” before <?php OR ?> after.

3. Or header.php before the php tag unwated white space is there. Thta’s most of the problem. so, kindly remove that’s working fine.

I solved this that white space type only.

that’s all 🙂

How can i get magento import data’s?

First Go Admin Page => Select System => Click tools => Import Option.

Then Go below Instruction:

1. Go to FTP –>

2. Select Var/import/

Here you get your importing data’s.

that’s all 🙂

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 configure gmail for WP?

Gmail / Google Apps
To send email via Gmail or Google Apps, use these settings:

Mailer: SMTP
SMTP Host: smtp.gmail.com
SMTP Port: 465
Encryption: SSL
Authentication: Yes
Username: your full gmail address
Password: your mail password

How to reduce expert length in WP?

This is reduce all Expert length in your word press :
add_filter(‘excerpt_length’, ‘my_excerpt_length’);
function my_excerpt_length($length) {
return 22;
}

This is reduce your categorie wise Expert length in your word press :
I getting below code for reference this site : http://www.wprecipes.com/wordpress-tip-change-excerpt-length-depending-of-the-category
add_filter(‘excerpt_length’, ‘my_excerpt_length’);
function my_excerpt_length($length) {
if(in_category(14)) {
return 13;
} else {
return 60;
}
}

thanks for above categories wise code.

🙂

another one i finding… below site
http://themehybrid.com/support/topic/correct-method-to-reduce-length-of-teaser
I just copied and inform to all. Hi above site guy thanks for your code.
function excerpt($num) {
$limit = $num+1;
$excerpt = explode(‘ ‘, get_the_excerpt(), $limit);
array_pop($excerpt);
$excerpt = implode(” “,$excerpt).”…”;
echo $excerpt;
}

function content($num) {
$theContent = get_the_content();
$output = preg_replace(‘/]+./’,”, $theContent);
$limit = $num+1;
$content = explode(‘ ‘, $output, $limit);
array_pop($content);
$content = implode(” “,$content).”…”;
echo $content;
}
——————————————————————————————————-

function limit_content($max_char, $more_link_text = ‘Read More »’, $stripteaser = 0, $more_file = ”) {
if(is_numeric($max_char) &amp;&amp; $max_char &gt; 1) :
$max_char = (int)$max_char;
$title = get_the_title();
$title = apply_filters(‘the_title’, $title);
$title = strip_tags($title);
$title = strlen($title);
$max_char = $max_char – $title;
$content = get_the_excerpt($more_link_text, $stripteaser, $more_file);
$content = apply_filters(‘the_excerpt’, $content);
$content = str_replace(‘]]&gt;’, ‘]]&gt;’, $content);
$content = strip_tags($content);
$char = $content;
if((strlen($char) &gt; $max_char) &amp;&amp; ($espacio = strpos($char, ” “, $max_char))) :
$content = substr($content, 0, $espacio); $content = $content;
echo ”
<p>”;
echo $content; echo “…”;
if($more_link_text) :
echo ” <a title=”&quot;; the_title(); echo &quot;” href=”&quot;; the_permalink(); echo &quot;”>”.$more_link_text.”</a>”;
endif;
echo “</p>
“;
elseif(strlen($_GET[‘p’]) &gt; 0) :
echo ”
<p>”;
echo $content;
if($more_link_text) :
echo ” <a title=”&quot;; the_title(); echo &quot;” href=”&quot;; the_permalink(); echo &quot;”>”.__(‘Read More »’,’options’).”</a>”;
endif;
echo “</p>
“;
else :
echo ”
<p>”;
echo $content;
if($more_link_text) :
echo ” <a title=”&quot;; the_title(); echo &quot;” href=”&quot;; the_permalink(); echo &quot;”>”.__(‘Read More »’,’options’).”</a>”;
endif;
echo “</p>
“;
endif;
endif;
}

thanks 🙂
http://themehybrid.com/support/topic/correct-method-to-reduce-length-of-teaser

How to Get Custome Page Id view in Query?

<?php
// All Categorie Lagest Post Code
$the_query = new WP_Query( ‘page_id=14’ );
// 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>
<h2><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();
?>

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 Page Attribute template View in Page Section?

Easy Solution :
I think you mean the temple “option” in the attributes admin isn’t showing. If so, you may notice that you don not have an “active” theme after an upgrade. Re-activate your theme.

🙂
This is above line i can find good url :http://wordpress.org/support/topic/i-cant-see-the-page-templates-under-attributes, This is says this guy : premiumdw

I have no more english knowledge. So, thank you very much premiumdw 🙂

Another Post Template Create Option one guy telling here if anybody want kindly check it below url.
http://wordpress.stackexchange.com/questions/2765/adding-page-attributes-metabox-and-page-templates-to-the-posts-edit-page

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

© 2020 Spirituality