Pull posts from all categories if quantity is not met?

I would start by creating an array to put your posts into, to create a counting system of some kind. Dump your list item output into that array, count it, and use the remaining count to call your second query. <?php $term = get_term_by(‘slug’, get_query_var(‘term’), get_query_var(‘taxonomy’)); $sticky = get_option(‘sticky_posts’); // Moved the base arguments into … Read more

wp_remote_post and form post

wp_remote_get returns a json string. You have different function to work with this json response. wp_remote_head() wp_remote_retrieve_body(), wp_remote_retrieve_header(), wp_remote_retrieve_headers(), wp_remote_retrieve_response_code(), wp_remote_retrieve_response_message() The example from the codex: $response = wp_remote_get( ‘http://www.example.com/index.html’ ); if( is_array($response) ) { $header = $response[‘headers’]; // array of http header lines $body = $response[‘body’]; // use the content } Depending on the … Read more

Blog posts not displaying on blog posts page

Your index.php is calling a template part (template-content/content-blog.php), which logically should contain the post content, but it’s commented out. Change: <?php //get_template_part( ‘template-content/content’, ‘blog’ ); ?> To This: <?php get_template_part( ‘template-content/content’, ‘blog’ ); ?> See if that helps.

Pagination not working on my archive page for a custom post type

So I got this to work by adding this function to functions.php // Custom query for events function set_posts_per_page_for_events_cpt( $query ) { if ( !is_admin() && $query->is_main_query() && is_post_type_archive( ‘events’ ) ) { // set date $currentdate = date(“Y-m-d”,mktime(0,0,0,date(“m”),date(“d”),date(“Y”))); $meta_query = array( array( ‘key’=>’event_date’, ‘compare’ => ‘>=’, ‘value’=> $currentdate, ‘type’ => ‘DATE’, ), ); $query->set(‘meta_query’, … Read more

Pull new posts using feed

All that I’m aware of out of the box is that you can limit the amount of posts in your feed. Go to Reading>Settings and change: Syndication feeds show the most recent to 10. You can also customize feeds: https://codex.wordpress.org/Customizing_Feeds

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