How to Get Custome Filed in Query String Via in WP?

You Just write below code, your query loop inside :

<?php echo get_post_meta($post->ID, “field_name”, true); ?>

Before you add Custome field name and set Field Name Value also in post.

that is all.

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 Show Full Text without continue reading Option in WP?

This is remove two Way :

1. Go to function.php search the twentyten_excerpt_length.
There you change below code
//return 40;
return 3000; –> Change here what extra numbers you need.

2. Second option –> Go loop.php
Find the_content
Then you remove or hide the condition part
ex :




You Place Below Code :


‘ ) ); ?>

that’s all 🙂 now this working well.

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

© 2020 Spirituality