I have understand that you want return 2 different things with the same function. If what I understood is correct then:
With your javascript ajax function you can pass a var which save the page that need the correct loop and you can check the content of this var in your misha_filter_function() to echo one loop or another.
You can now add different styles for each loop.
I recommend you that you save the html tags of your output in a var. ( $output.=… ) and finally you should use echo $output.
If this is not the answer that you are looking for, you can clarify it in a comment.
Related Posts:
- Modify category archive page loop on functions.php
- AJAX: WordPress filters inside $html do not work as intended
- How to make a image-size selected by default in Media upload – WP v3.5
- What is This esc_html_e() i wordpress php?
- static variable loop not working in WordPress
- adding a filter to a shortcode?
- Set media upload attachment link to none and hide it in WP v3.5
- Change the footer text on the login page
- add_filter to post-gallery and remove all ‘s?
- Can i check if user is doing any ajax request?
- Displaying post per day
- How to overwrite youtube embed?
- Rewriting search and pagination base
- Change comments form title on a page by page basis
- Display only text to WordPress loop without loosing the text formatting
- Remove class that has been added by parent theme
- How to add active class to custom menu using while loop and wp_list_pages
- delete an array element when its date expires
- How can I loop into two different DIVS without repeating the DIVs
- How to add default images into theme customizer image control?
- How do I know what variables are passed in a filter/action and what their meaning is?
- Is the regular ajax request method safe or I should use admin-ajax.php?
- Click loads template via ajax
- Run a filter when a walker runs
- Handling Body class based on Template
- Get_avatar filter?
- How can I remove a function that has been added to wordpress with add_filter?
- PHP 8, AJAX mail form to function.php doesn’t work
- How do I add custom bulk actions to multiple custom post types?
- Add data attribute to each li in menu
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- get author_name from queried post
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- WordPress Gravatar filter is removing my custom attributes
- dynamic dependent select dropdown
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- Blog posts repeat
- Unique icons next to each WordPress menu item
- how to refresh div on template part?
- Can’t find infinite loop cause
- how to make custom ajax handler?
- How to disable controls in theme customizer?
- Alter required message using comment form api
- Override a function defined in wp-includes/comment-template.php
- is_user_logged_in() not working in AJAX validation call
- Filtering a function’ output for a new continued function
- Using data sent via AJAX in multiple functions on a WP plugin
- Function won’t run onclick using Ajax
- Deleting Certain terms from appearing on the front end as links
- Content filter won’t work
- Simple AJAX notification when the new post is added to the database
- Warning: in_array() null given in PHP function
- Upload multiple files in randomly generated folder using wp_upload_bits
- Create page template via functions.php?
- How to have different site identity logos on each page on Astra Theme [closed]
- use loop to return blog details
- Get the name of menu item with wp_nav_menu
- Calling function in loop causes repeat data
- How to add aria role and schema markup to custom walker container
- How to get post category list as select in front-end?
- Is there a hack for using is_page() within the function.php file?
- Execute Jquery when a specific page in my plugin is loading
- Strip from or something better?
- AJAX function not working [closed]
- User filter posts by year
- Disclaimer that will show every refresh of the page
- How do I make these combination select filters work when only one dropdown is set? They work in WordPress 5.8.2 but don’t in 5.8.3
- Products listing check if meta checkbox is checked
- Multiple AJAX handler functions conflict in functions.php
- How to remove get_header From all single pages in wordpress with functions.php without plugin?
- Ajax filter with loadmore button
- update_user_meta as multiple value but with same meta key
- Change lost password url to a mailto URL in WordPress
- How to change this ajax function to submit to the default wordpress content area instead of the custom field ‘seller notes’?
- Remove span tags from WooCommerce Downloads page
- register_block_type is not working properly
- get_the_author_meta( ‘ID’ ) just return 1
- Update $wpdb query with AJAX
- cURL needing to loop through all “next_page”
- How to bind each “the_content” elements to a custom variables
- Filtering custom posts by using checkboxes for taxonomy in an ajax loop always gives server 500 error
- Offset with ajax load more posts duplicates
- ajaxurl usage for a custom function
- How can I get my pagination loop to display the correct number of total pages?
- Custom Bulk Actions handler not firing
- How to generate customized filtered output for the gallery
- How fix error in the WordPress loop?
- AJAX Returning Way Too Many Posts
- wordpress ajax return 0
- wp_delete_comment is doing nothing
- Pagenav Not appearing on custom Template
- Search box background on a different page template
- Why not showing all post by default in my jquery filter
- Loop on a wordpress Page instead of content coming from the WP text editor
- Assign new post author IF another user in custom field on post transition
- Add attribute to featured image with filter (wp_get_attachment_image_attributes)
- How to add different menu items on different menus?
- How to pass value to add_filter wpcf7_form_tag from another function?
- Add text below WooCommerce short description if metabox value is true
- Is there a hook that I can use when a fatal error occurs?