How to use Two Loops to Output Your First Blog Post Differently

WordPress loop being able to edit the WordPress Loop gives you lots of control over the design and content of your WordPress site are different layout. First blog post layout full-width image and content and second right sidebar four blog post column four layout in offset using in WordPress. add_shortcode( ‘blog_post_first’, ‘rmcc_post_listing_shortcode5’ );function rmcc_post_listing_shortcode5( $atts … Read more

How To Create table with plugin creating and active in WordPress


you will almost certainly find database table that you need to store some information in the WordPress database. Create Database Tables The first step in making your plugin create database tables automatically is to create a custom PHP function within your plugins that adds a table or tables to the WordPress MySQL database. So, it … Read more

Add columns to admin orders list in WooCommerce backend

You want to add some columns to your order listing page in the woocommerce admin area. So you if you want to add some columns in the orders Admin list page (in backend) ADDING COLUMNS IN WOOCOMMERCE ADMIN ORDERS LIST In the example below, we add 2 new custom columns, before existing “Total” and “Actions” … Read more

Use ajax without a plugin in wordpress

Plugin code is just… code, it can go in a themes functions.php, or a plugin file, there’s no magical or special difference other than the order they’re loaded . The problem you’re facing is that you’ve tried to put your logic inside the search page. Instead, the code needs to be in functions.php which is always loaded. How … Read more

Get values from an options page from Acf Repeater

we can be used  get field from an options page, however, a second parameter is required to target the options page in using while loop and get filed value show and front and for get display filed <p><?php the_field(‘field_name’, ‘option’); ?></p> <?php $variable = get_field(‘field_name’, ‘option’); // do something with $variable ?> <?php if( have_rows(‘repeater’, … Read more

How to display custom posts month by month?

wp-query be used to show posts month by month, and have it only show the past year <?php $blogtime = date(‘Y’); $prev_limit_year = $blogtime – 1; $prev_month = ”; $prev_year = ”; $args = array( ‘post_type’ => ‘asian’, ‘posts_per_page’ => 20, ‘ignore_sticky_posts’ => 1 ); $postsbymonth = new WP_Query($args); while($postsbymonth->have_posts()) { $postsbymonth->the_post(); if(get_the_time(‘F’) != $prev_month … Read more

How to assign a class “active” to the li click event using jQuery or JavaScript

I am trying to create a menu where a class “active” is assigned to the page whenever it’s selected and loaded and following this using javascript my menu its custom <ul class=”nav navbar-nav”> <li class=”active”><a href=”http://localhost/wp/index.php”>Main</a></li> <li><a href=”http://localhost/wp/news”>News</a></li> <li><a href=”http://localhost/wp/contacts”>Contacts</a></li> </ul> Its working at my end use this <script> jQuery(document).ready(function() { jQuery(“.nav.navbar-nav li”).click(function(){ jQuery(“.nav.navbar-nav li”).removeClass(‘active’); … Read more

How to Create Custom Post Types in WordPress

Custom post types are one of the more useful features in WordPress. In this article, we will show you how to create custom post types in WordPress. Creating custom post type the Easy way you can create manually  custom post type by adding the required code in your theme’s functions.php file // Our custom post type function function create_posttype() { … Read more

Submit a Custom Post Type in WordPress from the Front End

To allow users to submit content, you need to provide a form. The form fields will be used to input details, such as title, post content, tags, categories, featured image, etc. For example, you could create the form as follows: <form method=”post”><p><label for=”stackTitle”><?php _e(‘Enter the Post Title:’, ‘mytextdomain’) ?></label> <input type=”text” name=”stackTitle” id=”stackTitle” /></p> <p> … Read more