I solved issue with putting integer to -1,don’t know really why this helped but if someone get same problem then maybe this will help to him.
<?php $i = -1;
if (have_posts() ) : while ( have_posts() ) : the_post();
if ($i%2 == 1) echo '</li><li>';
?>
Related Posts:
- Should all plugins be encapsulated in a Class?
- Consuming an external API in WordPress?
- How can I import a class privately into a plugin?
- How do I extend one plugin I’m writing with another I’m writing using classes?
- Generate custom output for page/URL in a plugin
- Post source link plugin – small modification
- Add CSS animation as Preloader to WordPress
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Setting up widgets in wordpress with a unique ID for the after_title argument
- Modifying Footnote Plugin for Descriptive Title Attributes
- How to Replace Words with Hypertext Link But Ignore Previously Existed Links?
- force customers to add only single item to card per purchase EDD [closed]
- Auto delete WordPress users according to time
- Edit Yoast SEO breadcrumbs output [closed]
- How would I go about creating a user ranked post popularity page?
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Redirect to another page using contact form 7? [closed]
- Inserting custom PHP script on homepage
- Is there a function to list all uploaded images? How can I add one?
- Loop in elementor custom widget not working
- I am trying to make a field show and save from quickedit screen
- .php file for woocommerce edit category? [closed]
- Customize Menu | Styling LESS/SCSS code formats
- Why is it important to check for isset and is_array before checking in_array in this example?
- Comment “like” problem – “users who like this” avatar linking to current user profile instead of “liker’s” profile
- Calling a save function from a “submit” button
- same user role or copy the user role to be same as the other role
- How to fix these PHP Warnings with the “Feed JSON” plug-in?
- woocommerce remove coupon link does not work
- implement custom roles in custom plugin
- Post source link plugin – small modification
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- Adding discount functionality to the cart
- How to assign a specific service to a specific provider based on location
- Precheck fields when I add a new post
- Rename a folder via HTML POST request
- Move plugin pages from dashboard to front-end
- working code, not working – Plugin Dev
- Cron job shedules replace?
- Custom shortcode being shown in WPBakery backend rather than the block
- Move plugin upload folder from mywebsite.com/wp-content/uploads/pdfuploads to mywebsite.com/pdfs?
- Woocommerce list variations that are added already to cart in Single Product
- Custom SportsPress list
- How to fix vanilla comments extra iframe space
- I want to remove the register/login WordPress top bar from my website
- How to delete remain data in WP database after deleting custom post via admin interface
- What can I do to customize a widget provided with this plugin? from where have I to start?
- WordPress: code structure
- How to make a Template page to show the information of different things Shop and Product page?
- Uncaught Error: Call to undefined function wp_generate_attachment_metadata() @ wp-cron
- Using require_once in a Plugin?
- How to call plugin path in JS?
- Get Current user email as a return string value
- Plugin.php: PHP Notice: Undefined offset: 0 in
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- Replace existing pages with new pages, keep menu links
- WooCommerce get_price returning wrong price when used via ajax
- Open Post Thumbnail in New Child Theme File in WordPress
- WordPress on AWS with ELB
- Executing my function once on a specific time
- How to access data in wordpress database externally using php
- WooCommerce: Building a page with user input which is used to query order status and external API and return a result
- Why “Call to a member function on a non-object” in plugin only?
- After upgrade to php 7 plugin/them updates broke [closed]
- How to echo text in browser instead of download junk file?
- WordPress 4.8.1 php getting commented
- Issue running db create table query from static method
- Allowing users to Sign-up > Login > Post articles that need approval
- Use $variable from file1.php in file2.php (different file paths)
- How to include a custom field in the woocommerce email?
- WordPress – source link plugin – how to modify it?
- Adding a simple Javascript file with a plugin
- Wierd site output [closed]
- How to write to a separate PHP file in plugin settings
- Dynamic Image Replacement through call rail phone call tracking plugins in wordpress
- Advanced custom fields and Slideshow gallery desn’t work together? [closed]
- How to display results from a data table with an encrypted user id?
- Checkbox show / hide output result
- How to keep plugin (media-sync) running even the tab is closed?
- Custom Logo Link WordPress
- Attempting to list all product categories and the price range of all products within them
- WP Import All Multiple Dynamic Link Imports
- admin_notices show after load completed
- Plugin which unlock free gift when you reach some amount in cart
- is there a way to display product gallery images via cdn
- How can I create a secure file download in WordPress?
- Ajax call to php function doesn’t work PHP code
- Echo custom admin field into a is_single()
- Am I using an action hook correctly?
- How to create a dashboard for logged-in users with custom functionality? [closed]
- Cannot access variables within a widget
- Postal address auto-complete on profile page
- Remove the ‘Press This’ Tool
- WordPress Related Plugin – Adding an image
- Woocommerce Product Add-ons – Auto-select first option
- Strict Standards: Non-static method in sidebar generator
- Fast Tranfering my WordPress site to another server
- Duplicating wordpress install issue
- Can’t use updated variables in handle function
- Is there any WordPress Plugin that provides video editing from front end side? [closed]