Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

0

To display only assigned category you need to change hide_empty to true. Please see the modified code: $args = array( 'hierarchical' => 1, 'show_option_none' => '', 'hide_empty' => true, 'parent' => 134, 'taxonomy' => 'product_cat' ); $subcats = get_categories($args); echo '<ul class="wooc_sclist">'; foreach ($subcats as $sc) { $...


0

is_admin() is a call that does not verify if the current user role, but rather it was made to check if the code is trying to display in the backend/admin/dashboard area. https://codex.wordpress.org/Function_Reference/is_admin You can try one of three solutions: Reverse the check if(is_admin()) // if display on the dashboard, abort return; ...


1

Well, I tested a lot of WooCommerce versions (3.3.x, 3.4.x and 3.5.x) using WP Rollback and I believe that was a error in e-mail templates that was fixed in version 3.5.2. I didn't found nothing in the changelog about that: https://raw.githubusercontent.com/woocommerce/woocommerce/master/CHANGELOG.txt Here is the template in WooCommerce in version 3.5.2: I ...


-1

My solution was, and perfectly works fine for me function my_function(){ ob_start(); echo 'Long html tag here'; $output = ob_get_contents(); ob_end_clean(); return $output; }


0

I had this problem alot. I am not sure if you are using a page builder like Visual Composer but if you are you will have to use the full width element in the builder as well as changing the page template to full width template.


0

This is more of a CSS question than a template question. The class "row" is adding a max width of 75rem on your template. Looks like this in the inspector: .row { width: 100%; margin-left: auto; margin-right: auto; margin-top: 0; margin-bottom: 0; max-width: 75rem; } That's coming from this style sheet: https://tuberadar.nl/wp-...


0

There is probably some CSS you can add via Additional CSS (in Theme CUstomization) that you could use. Use the Inspector tool of your browser (F12) to see the CSS 'class' element used in the content. If the class is called 'the_content', then add this to your Additional CSS: .the_content{text-align:center !important;} You might need this, if the content is ...


0

The <br/> tags are added by wpautop function that is hooked into the_content filter. So you need to unhook it from the page where your table is displayed. There are several ways to do this. With PHP you can do something like this (change the 'your_page/post_id' with the actual ID) function wpdg_91929_remove_autop_for_page( $content ) { global $...


1

This is mostly working fine. You probably want quotes around your id in the window.superformIds array to ensure it's a string. This is a bad way of going about this. With scripts and styles you want to avoid outputting them directly on the page wherever the shortcode is placed. Here's a better method: add_action( 'wp_enqueue_scripts', 'my_enqueue_scripts'...


0

Try this code: // Conditionally show price (function ($) { window.onload = function() { if ($("#select_price_option").val() == "I need more information") { $('#price_input_div').hide(); } $("#select_price_option").change(function() { if ($(this).val() == "I need more information") { $('#price_input_div').hide(); } else { $('#...


Top 50 recent answers are included