query_vars category_name only display one catgory out of multiple categories

Inside get_posts() of WP_Query class, you will see this code block. /* * Ensure that ‘taxonomy’, ‘term’, ‘term_id’, ‘cat’, and * ‘category_name’ vars are set for backward compatibility. */ if ( ! empty( $this->tax_query->queried_terms ) ) { /* * Set ‘taxonomy’, ‘term’, and ‘term_id’ to the * first taxonomy other than ‘post_tag’ or ‘category’. */ … Read more

How can I interact with a third party service that sends POST requests to me in response to the order information that I send them?

Since I doubt “pretty” URLs are important here, it’s incredibly easy to create an endpoint/handler using the AJAX api (the other option is to use the rewrite API and listen out for a hit). Don’t be put off by the term “AJAX” – this is simply a script within your WordPress install that will fire … Read more

Move a single Plugin [closed]

There is no concept of “containing” the settings of a single plugin in WP. Plugins use core APIs (such as Options) freely to store data. So on WordPress level to do this the whole plugin’s code will need to be examined to have a complete catalog of things which need to be moved. Plugins themselves … Read more

How to hide a script ( an ad) from a specific post? [closed]

You can do something like this : // remove the script from the queue if were are on the post ID 11 add_action(‘wp_enqueue_scripts’, ‘remove_script_specific_post’); function remove_script_specific_post(){ if( 11==get_the_ID() ){ wp_dequeue_script(‘my_script_handle’); } } Provided that the script has been added with wp_enqueue_script

unable to select “fullwidth” on the POST (not page)

There is no Page attributes because it’s not a page and by default WordPress doesn’t have an attribute to select template for post. The page templates are coded in the theme that you are using.It seems that the theme has a template called Full Width defined as page template so you are able to select … Read more

ACF: Not displaying ACF data from another post

There was a flexible content container with the content inside that required an extra loop to reach the content. This helped (https://support.advancedcustomfields.com/forums/topic/get-another-pages-flexible-content/) <ul class=”rslides_m16 rslides”> <?php if( have_rows(‘page_modules’, $postID) ): while ( have_rows(‘page_modules’, $postID) ) : the_row(); if(get_row_layout() == “2-carousel-featured”): if( have_rows(‘items’) ): while ( have_rows(‘items’) ) : the_row();?> <li> <img src=”https://wordpress.stackexchange.com/questions/231217/<?php echo get_sub_field(“image’);?>”> </li> … Read more

Add woocommerce.css in template?

function woocommmerce_style() { wp_enqueue_style(‘woocommerce_stylesheet’, WP_PLUGIN_URL. ‘/woocommerce/assets/css/woocommerce.css’,false,’1.0′,”all”); } add_action( ‘wp_head’, ‘woocommmerce_style’ ); paste the above code in your “functions.php”. woocommerce stylesheet will be executed to your site