Landing Page – Redirect Loop?

What’s happening is you’re sending an unauthenticated visitor to a certain page. The code in that page also picks up that the user is unauthenticated, and sends them to the page that they’re already on. Because the page keeps on sending the visitor to the same page, the visitor can’t go anywhere. This is called … Read more

“Blog pages show at most” in The Loop

The only reasonable guesses that come to my mind are that the theme (or a plugin): Modifies the main Query with a filter on pre_get_posts, so look for that filter. Just creates a new Loop with new WP_Query($args). You will have to dig through the template file to find out. Interrupts the post_per_page save process … Read more

loop query exclude meta_key with meta_value

Do NOT use query_posts() – it is bad, very bad to be exact. For more information read: When should you use WP_Query vs query_posts() vs get_posts()? When to use WP_query(), query_posts() and pre_get_posts Use WP_Query instead. Example with meta_key, meta_value and meta_compare parameters in use: $args = array( ‘meta_key’ => ‘clpr_excoupon’, ‘meta_value’ => ‘0’, ‘meta_compare’ … Read more

Too many nested wp_query loops in this hypothetical query?

When you need to retrieve and present a lot of information there is bound to be complexity. Mostly it is finding right balance between complex querying and complex sorting in PHP (which is often overlooked option). Your logic looks mostly fine, what could use tweaking as for me: Genre seems more like a taxonomy than … Read more

Display page of custom posts?

I think your problem is in the exact code that you’ve mentioned. pre_get_post is a bastard if you don’t use it correctly. With any archive type conditions used in pre_get_posts, it will affect both front end and back end. This include archives pages, category and taxonomy pages, tag pages and author pages. You’ll need to … Read more

Related Posts loop – offset

Do you mean you want to display three blocks of four related posts, and flip between the three blocks using scrollable? If so, does the below help (not tested)? Assuming scrollable needs its content in separate divs, you could do something like this. It should produce a containing div with up to three divs inside, … Read more

as a shortcode within the loop?

Using the the_posts filter: Here’s one idea using the the_posts filter, that fires before setup_postdata() is activated: /** * Replace [nextpage] with <!–nextpage–> through the ‘the_posts’ filter. * * @see http://wordpress.stackexchange.com/a/183980/26350 */ ! is_admin() && add_filter( ‘the_posts’, function( $posts ) { $posts = array_map( function( $p ) { if ( false !== strpos( $p->post_content, ‘[nextpage]’ … Read more

Previous and Next Post link doesn’t work

EDIT Referring back to one of your previous questions I’ve answered, you are using custom taxonomies, so this is most likely your problem then. You then have to set the taxonomy parameter accordingly. See my original answer ORIGINAL ANSWER There are a few things to check here Where is your next_post_link. Did you leave out … Read more

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