web stats analysis

Wordpress Archive

Limit excerpt length by characters in wordpress

Copy the below code and paste into Function.php.


function get_the_twitter_excerpt(){

$excerpt = get_the_content();

$excerpt = strip_shortcodes($excerpt);

$excerpt = strip_tags($excerpt);

$the_str = substr($excerpt, 0, 20);

return  $the_str;

}

Call this function where you want to display your limeted characters:like below

<?php echo substr(get_the_excerpt(), 0,30); ?>

     //Here..(30) is size of character.(User define)

<?php echo get_the_twitter_excerpt(); ?>

For more reference Click here..

Excerpt or Content Word Limit in WordPress: Redux.

Copy the below code and paste into Function.php.


function excerpt($limit) {

$excerpt = explode(' ', get_the_excerpt(), $limit);

if (count($excerpt)>=$limit) {

array_pop($excerpt);

$excerpt = implode(" ",$excerpt).'...';

} else {

$excerpt = implode(" ",$excerpt);

}

$excerpt = preg_replace('`\[[^\]]*\]`','',$excerpt);

return $excerpt;

}

function content($limit) {

$content = explode(' ', get_the_content(), $limit);

if (count($content)>=$limit) {

array_pop($content);

$content = implode(" ",$content).'...';

} else {

$content = implode(" ",$content);

}

$content = preg_replace('/\[.+\]/','', $content);

$content = apply_filters('the_content', $content);

$content = str_replace(']]>', ']]&gt;', $content);

return $content;

}

Call this function where you want to display your limited content:like below.


<?php echo excerpt(25); ?>

		Here..(25) is a size of word.

For more reference Click here..

How to Display Recent Posts From A Specific Category In WordPress?

Follow below code:-

Below code could be added where you want to display recent post in your theme.


<?php if ( have_posts() ) : ?>

<?php $catquery = new WP_Query( 'cat=18&posts_per_page=1' ); ?>

<?php while ($catquery->have_posts() ) : $catquery->the_post(); ?>

<?php the_content(); ?>

<?php endwhile; ?>

<?php endif; // end have_posts() check ?>

For more Reference click here.

In which area you want to display your post?

Where you want to display your post?

First you create your category.
Go to wp-admin panel -> create new category.

Use the below code where you want to display your post.


<?php if ( have_posts() ) : ?>

<?php query_posts('category_name=Your category name&showposts=1'); while ( have_posts() ) :

the_post(); ?>

<?php the_content(); ?>

<?php endwhile; ?>

<?php endif; // end have_posts() check ?>

Here I create principalmessage category like below.


<?php if ( have_posts() ) : ?>

<?php query_posts('category_name=principalsmessage&showposts=1'); while ( have_posts() ) :

the_post(); ?>

<?php the_content(); ?>

<?php endwhile; ?>

<?php endif; // end have_posts() check ?>

How to passing hidden variables to the contact Form7 in wordpress?

If you want to passing hidden variable to the contact form7 so you can esily do it.click on below image.

See in above image and select appropriate tag whaterver you want.

Now where you add the variable in contact form7?

It also easy.Add the variable into your contact form7 in message body it’s like click on below image.Here I pass the [_post_title]. It’s pass the post title.

How to add custom dynamic table in wordpress?

Create custom table in wordpress.

Follow below steps:

Step:1-Download custom table plugin by Click here
Step:2-Go to your admin panel.
Step:3-Click on Plugin -> Add New.
Step:4-Upload the custom table plugin.
Step:5-Install and active your plugsin.
Step:6-See in left side menu custom table.
Step:7-Select custom table is like click below image.

Below little description about custom table plugin.

The Admin can very simply create an new Table in the Database. The Table can filled in manually over the WordPress admin menu with new entries.The Plugin will create diffrent Shortcodes this plugin create Shortcodes like [wctable] or [wctable id="3"] to add this Tables to the WordPress sites.

Your plugin has been successfully work.

For more reference Click here

How to add arrow in wordpress menu ?

Add arrow on the sub menu with child elements in wordpress.

How can we add arrow on the sub menu with the child elements on the repsonsive theme?

I try and get simple solution:

You just add below script in your css where you want arrow in responsive menu.


.nav-menu li > a:after{

color: #888;

counter-increment:none;

content:  " \25BA";

}

.nav-menu li > a:hover:after {

color: #444;

content: " \25BA";

}

.nav-menu li > a:only-child:after {

content: '';

}

After adding script go to start -> run -> and type character map.

Character map using for choosing different different arrow purpose it’s like click below image.

Choose arrow and get the code of particular arrow here above image I make a round on code. Type this code into your content in script.

How to create a pop-up wordpress email contact form?

To create a pop-up wordpress email contact form.

Create pop-up wordpress email contact form.

If you want to create it then follow below steps:

Step:1-Download Contact Form 7 and the Easy FancyBox plugins.
Step:2-For download Contact Form 7 Click here.
Step:3-For download Easy FancyBox Click here.
Step:4-Install both plugin and active.
Step:5-We will use the example email form already created in Contact Form 7.The Contact Form administration page displays the code you must cut and paste into your WordPress editor to generate the form.
Step:6-Create a new page in wordpress.include email form.
Step:7-Then you have to paste the code contained in brackets from the contact form 7 administration page into your page.
Step:8-You paste the code where you want to appears like click below.
Now your wordpress form display on a page in your site.Now,instead of being embedded in the page,if you want it to pop-up and overlay the page when a visitor clicks a link.That is where the Easy FancyBox plugin comes in.You can make any page element appear in a pop-up window with Easy FancyBox.Edit new page, click the HTML tab, and add the following code.


<a href="#contact_form_pop">Contact Us</a>

<div style="display:none">
<div id="contact_form_pop">
<?php echo do_shortcode(' [contact-form 1 "Contact form 1"] '); ?>
</div>
</div>
Now have a link that launches your WordPress form in a pop-up window.You will probably want to do some CSS styling of the email form to ensure that the height and width are correct and that error messages are contain within the pop-up, but this should be enough to get you started.

How to use the native WordPress custom post type for easy of use and fast processing?

How to visually create your fields?

How to use the native WordPress metadata for easy of use and fast processing?

wordpress advance custom field.

Follow below steps:

Step:1-Download Advanced Custom Fields by Click here
Step:2-Go to your admin panel.
Step:3-Click on Plugin -> Add New.
Step:4-Upload the Advanced Custom Fields plugin.
Step:5-Install and active your plugsin.
Step:6-Then Click on the new menu item “Custom Fields” and create your first Custom Field Group!
Srep:7-Your custom field group will display on the page / post / template you specified in the field group’s location rules!
Step:8-Read the documentation to display your data:
Step:9- To insert the slideshow into your theme, write the following code to the appropriate theme file:

Your plugin has been work.

Below little description aboute Advanced Custom Fields

Advanced Custom Fields is very useful plugin.
It needs more flexible data like other Content Management Systems.
Advance custom field Visually create your Fields.
Select from multiple input types(like..textbox,textarea etc..).
Advance custom field Easily load data through a simple and friendly API.
Advance custom field use the native WordPress custom post type for easy of use and fast processing.
Advance custom field use the native WordPress metadata for easy of use and fast processing

wordpress advanced custom fields tutorial,

advanced custom fields wordpress image,

wordpress custom fields tutorial,

wordpress custom post type ui,

wordpress acf,visually create your fields.

How to create dropdown-list in wordpress?

how to use dropdown-list in wordpress?

Use dropdown-list in wordpress.

dropdown-list plugin in wordpress.

wordpress dropdown-list.

Follow below steps:

Step:1-Download acategory-dropdown-list plugin by Click here
Step:2-Go to your admin panel.
Step:3-Click on Plugin -> Add New.
Step:4-Upload the acategory-dropdown-list plugin.
Step:5-Install and active your plugsin.
Step:6-Configure the plugin through Settings -> acategory menu in WordPress

Below little description about acategory-dropdown-list plugin.

Using acategory-dropdown-list plugin you can,
easily select category from a dropdown list.
It create one category per post.
Limit possible choise to one category by post or organize your post
by several categories and subcategories and avoid chacking wrong extra category.

Your plugin has been successfully work.

dropdown-list,dropdown-list plugin,dropdown-list plugin in wordpress,
wordpress dropdown-list,wordpress dropdown-list plugin.