Push PHP data to an WordPress external JS script with wp_localize_script

Creating an WordPress website and you want to push the PHP data to the external JS script! But how you gonna do that? Learn it here! It’s very simple! PHP data to the external JS file There is an simple answer! Use the wp_localize_script() function from WordPress! I assume that you’re familiar with the right way to load the JS or jQuery scripts with wp_enqeue_script() function. Only than you can use wp_localize_script().

WordPress Pagination with Custom Post Type issue

If you searching for an possible solution for your problem with Custom post types and Pagination. Maybe this snippet could help you. I’ll find out the the WP_Query() function does not work if you want to make an archive page with multiple custom post type’s. After searching for some ours, i find the solution. You should use the function query_posts() to get pagination. **Source ** Copy the function in your functions.
1 of 1