remove () from category number [closed]

This should make you good to go: $args = array( ‘hide_empty’ => FALSE, ‘title_li’=> __( ” ), ‘show_count’=> 1, ‘echo’ => 0 ); $links = wp_list_categories($args); $links = str_replace(‘</a> (‘, ‘</a> <span>’, $links); $links = str_replace(‘)’, ‘</span>’, $links); echo $links; The ( and ) were in the code. And if you only want to show … Read more

Continuous jQuery Slider / Carousel Plugin with linkable slides [for WooCommerce]

If you view the source for your carousel, you’ll see a lot of how it is implemented. The first step would be reproducing their markup with your products. Essentially their markup looks like one #carousel container div and all the items inside their own div. <div id=”carousel”> <div> <img src=”https://wordpress.stackexchange.com/questions/106915/img/fruit1.png” alt=”fruit1″ width=”200″ height=”200″ /> <span>Apple</span> … Read more

php code for image fetching

How to fetch the featured image in wordpress post[?] echo get_the_post_thumbnail( $post_id ); Or, inside a proper Loop, the_post_thumbnail(); But I have a feeling that there is information missing from the question. You aren’t using any Core functions and there is no explanation why, or reasons why not. For example, WP_Query would be far easier … Read more

Custom navigation / menu output (walker?)

This should do it for you.. (UNTESTED) Create a file in your theme folder called nav-menu-walker.php and include this file in your theme functions.php file. nav-menu-walker.php class My_Nav_Menu_Walker extends Walker_Nav_Menu { function start_el( &$output, $item, $depth = 0, $args, $id = 0 ) { $indent = ( $depth ) ? str_repeat( “\t”, $depth ) : … Read more

Good practical way to do loop within loop to show child custom type using a template code

<?php global $post; foreach ($event_photos_obj as $post) : … … // set up product in order to use native wordpress api setup_postdata($post); /* Include the single view for the product (photo). */ include ….. endforeach; wp_reset_postdata();?> my mistake my code is that setup_postdata with $product instead of $post as the tutorial said : https://codex.wordpress.org/Function_Reference/setup_postdata This … Read more

get_option returning a different value from what’s saved

In the plugin_options_validate() function the return value of get_option( ‘plugin_options’ ) is never used. Let’s step through the function by adding some comments: // Retrieve the options. $options = get_option(‘plugin_options’); // Replace the options without checking if // trim( $input[‘text_string’] ) and trim( $input[‘text_string_name’] ) // actually return strings and if $input[‘text_string’] and // $input[‘text_string_name’] … Read more

How to use WordPress to embed a SoundCloud download link?

As you may have already found out, presently, soundcloud do not allow modification of parameters with the HTML5 widget and only when using the flash player. See here for more info: http://help.soundcloud.com/customer/portal/articles/241151-can-i-change-parameters-on-embedded-players- The options for the flash player can be found here: https://github.com/soundcloud/Widget-JS-API/wiki/widget-options I hope this answers your question anyway.