If you pasted your code directly,
The second curly bracket here <?php if($k==0) { ?> active <?php { ?> should be a closing one, like this:
<?php if($k==0) { ?> active <?php } ?>
There is also a stray slash </a>/</li> – should be – </a></li> – but that shouldn’t cause any PHP errors.
Related Posts:
- How can I fetch loop of post titles via AJAX?
- Inject post (from specific category) between posts in Loop
- get product attributes for current product and store it in a variable
- Installing wp3.2.1 on IIS; getting empty sessions
- Want to separate sections of posts. Can you restart loop?
- MySQL query performed 4 times inside loop
- Specific Loop For 2 Within Each
- Two posts in same div – WP loop
- Infinite-Scroll Plugin and Jetpack Infinite Scroll Plugin – Adding to “Thoughts” Theme
- Woocommerce, recognize the loop of related products
- Easiest way to show total number of subpages
- Custom Loop through category menu to include sub categories
- Output 2 items within the Loop
- Custom excerpt function re-factoring
- How can I show the post thumbnail from the most recent of a certain post type, in widget?
- How can I add pagination and how can I change thumbnail size?
- ACF page while loop breaks footer while loop
- Split loop into two columns, how to favor one side over the other
- Dynamic Stylesheet loads but doesn’t finish
- Filter Select results based on selection
- Show css depending on activity type in BuddyPress activity-loop [closed]
- Increase offset while looping
- remove post that has no content
- Checking array against author id in loop
- How do I Turn This Into An if statement?
- List posts that don’t have a specific tag?
- Can we count the WordPress Loop
- Get post id within comments loop
- Syntax error when I try to insert my loop into an unordered list? [closed]
- Custom Pagination is Broken
- Display an image if odd number of posts in grid
- How to overwrite orderby with add_query_var
- What file have I to create in my custom WordPress theme to show all the post belonging to a specific category?
- 2nd page displaying the exact same posts as my first page (minus the very first post)
- Is the 404 page automatically displayed if a loop returns nothing?
- Last class on last headline?
- get_the_ID() in the footer returns wrong value
- Show ACF field with link to ultimate member profile/WordPress user profile below the post (single post layout)
- use loop to return blog details
- How to get current post category details inside “loop”?
- WP_Query multiple post results
- Convert Featured products loop into Recent products loop?
- Echoing a CSS class based on category of post in a list
- Calling function in loop causes repeat data
- Posts are not looping through correctly
- Limit tags shown in post
- How to Generate a list of Most Commented post?
- Create Div Wrapper On 3rd Iteration Or When Query Loop Items Run Out
- Php code error in wordpress if else statements [closed]
- How to add ASCII symbol after each recent post [closed]
- pagination broken – clicking next displays “page not found”
- Add class to every other posts using get_posts
- the_post(); prints out style text into my HTML?
- Wp Query : Order by distance lat,lon
- How to Add a cutsom slug to my custom author role
- How do I get pagination for get_posts() in WordPress or do I have to rewrite the whole code?
- Give ID to divs inside the loop
- Display articles with a different template in the home page | Solved |
- How to output the taxonomies that are assigned to each custom post?
- Check if current post in loop is last on current page
- Looping through dummy posts and showing them in the main index.php
- Custom Loop.php having a loop inside a loop
- ACF – Get ID of relationship field in flexible content
- WordPress Ajax filter: Create two loops for different output styles?
- How to display sticky post always at the top (before regular post) in wordpress?
- Adding PHP to an if else loop
- Accordion headings cuts off to second line on collapsing a accordion heading (used acf repeater)
- WordPress Recent Posts – Loop
- ACF background-color per post in a WordPress loop
- Advertisement in Loop Posts wordpress
- Filter loop by ‘price’ with meta_query
- PHP for loop not working as intended
- Adding custom PHP to existing loop in Genesis
- How to Pass Current Taxonomy Terms into new WP_Query?
- Problems with the WordPress loop [closed]
- WordPress while loop with aphabetic counting like one, two, three
- For each 3 posts, show a different post type
- Add post class in custom loop (WP_QUERY)
- Loop returns more items than exist?
- Modify category archive page loop on functions.php
- WP_Post is not from correct array
- Post formating on Home page
- divide custom field values in div every two values
- I want my wordpress loop to only display posts of the standard format
- Automatically create a loop for post ID
- Limit ads appearing more than three times
- Pagination on Custom Loop
- What is the best way to get the first few post from WordPress in different divs using a loop?
- why is this content-template not showing any of my blog-entries?
- Trying to display ads on only a third of posts in a loop. Keep getting Error 500?
- Custom single.php files for different post formats
- How to call the_author_meta and make it work?
- Troubleshooting “loopback requests that take too long”
- Why does a meta_query break this WP_Query?
- Excerpt all post content Content Same Size without word cutting off
- Loop on a wordpress Page instead of content coming from the WP text editor
- How to create a loop where loop changes every post?
- Help with if/else loop [closed]
- How to use a conditional statement in a post loop but not count towards the “posts_per_page” if false
- Saving meta box data from selected option’s value in database is not working