Display specific main Sub Nav on Woocommerce product pages

Yes you can with conditional tags. https://docs.woocommerce.com/document/conditional-tags/ So depending on whether you wanted it to appear on all woocommerce pages (the listing page as well as the individual product pages) you could use is_woocommerce() if you wanted just on individual product pages you could use is_product() So you would use an if statement to check … Read more

Use header option on wp-login page with a second logo

For anything other than simple CSS tweaks your best bet is to use wp_login_form() in a custom Page Template and filter login_url to return that instead of wp-login.php: add_filter( ‘login_url’, ‘wpse276598_login_page’, 10, 3 ); function wpse276598_login_page( $login_url, $redirect, $force_reauth ) { return home_url( ‘/my-login-page/?redirect_to=’ . $redirect ); } If you wanted to redirect all successfully … Read more

Advanced WordPress SQL Query

In WP, you rarely need to “write SQL queries”, unless you work with custom tables, instead use its API… WP_User_Query will join for you all meta data attached to each user and return to you plain user objects, so why not use it instead? Also, see get_user_meta()…

make an array in wordpress cusmization api?

So there’s 2 Customizer specific hooks depends on what exactly you’re trying to do. The customize_controls_enqueue_scripts is exactly like wp_enqueue_scripts but it enqueues in the control panel ( left side ) frame. I suggest requiring customize-controls scripts to make sure your script has access to them: function theme_customizer_control_scripts() { wp_enqueue_script( ‘scirpt-slug’, $scirpt_url, array( ‘jquery’, ‘customize-controls’ … Read more

Vertical Menu for one page only

You’ll want to search your theme files for the part of the page template that is controlling those classes, likely page.php would be a good place to start. Then once you find the part you think is controlling the output, try adding: if( is_page(24331) ) { echo ‘vertical-header’; } For example: <div id=”page” class=”layout-fullwidth <?php … Read more

Displaying 3 Category Posts differently

Possible you’ve forgotten to reset post with wp_reset_postdata function. You can use get_posts instead of new WP_Query: <?php foreach(get_posts($args) as $post) : ?> <div class=”post”> <a class=”post-link” href=”https://wordpress.stackexchange.com/questions/277736/<?= get_permalink($post->ID) ?>” target=”_blank”><?= $post->post_title; ?></a> </div> <?php endforeach; ?>

How to add text before posts

Ok, you are using shamrock theme. To add the desirable header you can insert in header.php right after tag following code: <?php if(is_frontpage()) : ?> <div class=”head-title”> <p class=”about-me”>your text</p> </div> <?php endif; ?> Please, note, that if you want to get updates your theme, you should create child wordpress theme with custom header.php file