How to go about combining dropdowns / filter queries?

To get you started: you can make a custom form (I never worked with wp_dropdown_categories). When the form is submitted, it gets the input variables and uses them in the query. The form could be something like: <form action=”http://example.com/resultspage” method=”post”> <select name=”categories”> <option value=”categoryname1″></option> <option value=”categoryname2″></option> <option value=”categoryname3″></option> </select> <select name=”tags”> <option value=”tagname1″></option> <option value=”tagname2″></option> … Read more

woocommerce stored variable

There is $woocommerce, which is is crucial. Several classes stored into this, see woocommerce class reference and additionally WC API Docs. If you’re looking for product information: $product = get_product( $post->ID ); is certainly a good entry point. If you’re already on a product page or generally in the wc loop, you often have $product … Read more

wp_query inside the_loop

You can also try with following code: $featured = new WP_Query( array( ‘category_name’ => $category, ‘posts_per_page’ => 3 ) ); // The Loop if ( $featured->have_posts() ) { echo ‘<ul>’; while ( $featured->have_posts() ) { $featured->the_post(); echo ‘<li>’; echo ‘<div id=”title”>’ . get_the_title() .'</div>’; echo ‘<div id=”content”>’ . get_the_content() .'</div>’; echo ‘</li>’; } echo ‘</ul>’; … Read more

Move sticky posts down in main loop

You have to change the order in $wp_query->posts. Compare it to the values from get_option( ‘sticky_posts’ ). Example: function move_stickies_down( $num = 1 ) { global $wp_query; if ( empty ( $wp_query->posts ) ) return; $stickies = get_option( ‘sticky_posts’ ); if ( empty ( $stickies ) ) return; $sticky_posts = $top = $after = array(); … Read more

Loop get_theme_mod

There is get_them_mods() which will… Retrieve all theme modification values for the current theme. If no theme mods have been set, will return boolean false. https://codex.wordpress.org/Function_Reference/get_theme_mods It should return an array that you can loop over.

One custom loop with condition to check child posts

The appropriately named get_children() should be what you want. if ( have_posts() ) { while ( $loop->have_posts() ) { $loop->the_post(); $args = array( ‘post_parent’ => get_the_ID(), // the ID from your loop ‘post_type’ => ‘page’, ‘posts_per_page’ => 1, // you only need to know if you have children so one is enough ‘post_status’ => ‘publish’ … Read more

Show the page title on blog page

The call for the page title is outside the loop so you need to use this function instead: <?php echo get_the_title(); ?> Here is the updated code: <?php get_header(); ?> <section id=”primary-content” class=”col-md-9″> <?php echo get_the_title(); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <div class=”post”> <h2><a href=”https://wordpress.stackexchange.com/questions/146051/<?php the_permalink(); … Read more

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