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 view in expert field box in WP-admin side?

Just below one line code is working very perfectly.

add_post_type_support(‘page’, ‘excerpt’);

this is very fun. But this working.

How to change expert more link label in WP?

// This link in excerpts more
function new_excerpt_more($more) {
global $post;
return ‘<a href=”‘. get_permalink($post->ID) . ‘”>Read More</a>’;
}
add_filter(‘excerpt_more’, ‘new_excerpt_more’);

Add above code in your functions.php.(This is file contain in your theme inside.)

What label you need, change the return href inside.

How to Change the Expert Length in WP?

Just add below code in functions.php inside,

add_filter(‘excerpt_length’, ‘my_excerpt_length’);
function my_excerpt_length($length) {
return 25;
}

And change the return value “25” to “Your Value”.

How to add “Shortcode” for WP Contact Form 7?

1. Example :

Copy this code and paste it into your post, page or text widget content.

Error: Contact form not found.

2. Example

Copy Below code in your php file inside where you want put this:
<?php echo do_shortcode( ‘

Error: Contact form not found.

‘ ); ?>

How to solve Warning: mail() has been disabled for security reasons?

You go and run phpinfo(), in your server.

There check  “disable_functions“. That place the server side disabled the “mail“.
You have permission to write php.ini, You enable the “mail“.
If you have no permission, inform to server guys for this.

Then check. Basically this is the problem. Other things we check later.

Welcome to all peaceful life.

How to create page excerpt in WP?

Add Below line for functions.php inside :

add_post_type_support('page', 'excerpt');

after added above code, the excerpt will show you.

How to create future OR Post Thumbnail in WP?

Go to function.php file, Insert Below Code :

// Post thumbnail OR futured Image Set
add_theme_support( ‘post-thumbnails’ );
set_post_thumbnail_size(100, 100, true);

And add below code which you want show the future Image :

<?php the_post_thumbnail(); ?>


Additional Option :

Go to function.php file, Insert Below Code :

add_image_size('loopThumb', 588, 125, true);

OR
<?php the_post_thumbnail('loopThumb', array('class'=>'loopyThumbs')); ?>
OR
add_image_size('squareThumb', 125, 125, true);

OR

if (function_exists('add_theme_support')) {
add_theme_support('post-thumbnails');
set_post_thumbnail_size(588, 250, true); // Normal post thumbnails
add_image_size('loopThumb', 588, 125, true);
}
OR
<?php add_theme_support('post-thumbnails', array('page')); ?>

And add below code which you want show the future Image :

<?php the_post_thumbnail('loopThumb'); ?>

OR

<?php the_post_thumbnail('squareThumb'); ?>
OR
<?php the_post_thumbnail('loopThumb'); ?>
OR
<?php
if (has_post_thumbnail()) {
the_post_thumbnail('loopThumb');
}
elseif (get_post_meta($post->ID, "Thumbnail", true) != '') { ?>
<img src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" alt="<?php the_title(); ?>" class="attachment-loopThumb wp-post-image" />
<?php }
else {
echo '<img src="images/defaultThumbnail.png" alt="Default Post Image" />';
}
?>




How to Redirect Contact form 7 in WP?

Go Contact Form 7 Settings Area?

Add Below Code :
on_sent_ok: “location.replace(‘YOUR URL’);”

OR
Add Message When Sent Successful that message below you can add this :
<script type=”text/javascript”>jQuery(function($){ window.location.href=”your url”; });</script>

what URL you want change there.

that’s all. 🙂

If this is not working, Kindly check google.

thanks.

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.

© 2020 Spirituality