Jetpack Infinite scroll conflicting with theme’s pre_get_posts custom posts_per_page

You’ve specified a priority of 1 for your pre_get_posts function here: add_action( ‘pre_get_posts’, ‘mytheme_portfolio_archive_pages’, 1 ); Jetpack doesn’t specify a priority: add_action( ‘pre_get_posts’, array( $this, ‘posts_per_page_query’ ) ); So that gets added with the default priority for add_action, which is 10: $priority (int) (optional) Used to specify the order in which the functions associated with … Read more

Allow latex in wordpress excerpt

If I’m not mistaken, this could be as simple as add_filter(‘get_the_excerpt’, ‘latex_markup’); if the Latex markup isn’t removed by another filter before that (it shouldn’t, I believe). latex_markup is the function jetpack adds to the list of filters on the_content. It might get interesting when your latex code is at the edge of the excerpt … Read more

Jetpack infinite scroll render – make different depending on post type?

Replace the above mytheme_render_infinite_scroll function with this: function mytheme_render_infinite_scroll() { while ( have_posts() ) : the_post(); if (‘mytheme_portfolio’ == get_post_type()) : get_template_part( ‘content’, ‘archive-portfolio’ ); else : get_template_part( ‘content’, get_post_format() ); endif; endwhile; }

Placeholders in Jetpack Contact Form [closed]

You can do this by means of jQuery (which means this is rather a jQuery/JavaScript question). Put the following in one of your (already included) JS files, or create a new JS file and enqueue it, or hard-code it in between <script>…</script> tags: jQuery(document).ready(function($) { $(‘#my-form-field’).attr(‘placeholder’, ‘Please enter your name…’); });

Custom post metadata not appearing in public API

Try using the rest_api_allowed_public_metadata filter to whitelist the facebook custom field. It will then appear in the response: add_filter( ‘rest_api_allowed_public_metadata’, ‘jeherve_allow_fb_metadata’ ); function jeherve_allow_fb_metadata() { // only run for REST API requests if ( ! defined( ‘REST_API_REQUEST’ ) || ! REST_API_REQUEST ) return $allowed_meta_keys; $allowed_meta_keys[] = ‘facebook’; return $allowed_meta_keys; }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)