Adding comments section to website integrated WordPress instance

Could be as simple as using the full function in the template file: <?php comments_template( ”, true ); ?> Be sure you have a comments.php file in the theme folder. And be sure you’re using the full loop: <?php require(‘/the/path/to/your/wp-blog-header.php’); ?> <?php $posts = get_posts(‘numberposts=10&order=ASC&orderby=post_title’); foreach ($posts as $post) : setup_postdata( $post ); ?> <?php … Read more

How to allow users to write jetpack custom post types? [closed]

No need to use Jetpack Post Types feature for that. Just use the following code to enable Jetpack Plublicize for any custom post type of your theme/plugin. Place it in functions.php: /** * Enable Jetpack Publicize Support for CPT * ————————————————————————– */ function wpse20150812_jetpack_publicize_support() { add_post_type_support( ‘mycpt’, ‘publicize’ ); } add_action(‘init’, ‘wpse20150812_jetpack_publicize_support’); Replace the mycpt … Read more

Jetpack Infinite Scroll – changing number of posts

Found the code that works here: https://themeshaper.com/2013/10/08/how-to-override-jetpack-infinite-scroll-settings-in-a-child-theme/ /* * Change the posts_per_page Infinite Scroll setting from 10 to 20 */ function my_theme_infinite_scroll_settings( $args ) { if ( is_array( $args ) ) $args[‘posts_per_page’] = 20; return $args; } add_filter( ‘infinite_scroll_settings’, ‘my_theme_infinite_scroll_settings’ );

Hiding Jetpack Ads from users who are signed in?

Your code should be the good one. You just have to use is_user_logged_in() into a hook instead of calling it directly, and probably to early. function wp_se_339916() { if ( is_user_logged_in() { add_filter( ‘wordads_excerpt_disable’, ‘__return_true’ ); add_filter( ‘wordads_content_disable’, ‘__return_true’ ); add_filter( ‘wordads_inpost_disable’, ‘__return_true’ ); add_filter( ‘wordads_header_disable’, ‘__return_true’ ); } } add_action( ‘template_redirect’, ‘wp_se_339916’ ); Using … Read more

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