How to exclude some cats from wp_list_categories using shortcut

Exclude needs to be in the $cat_args, and in the shortcode_atts. Like this: extract( shortcode_atts( array( ‘exclude’ => ”, ‘categoriespostcount’ => ‘on’, ‘categorieshierarchy’ => ‘on’, ), $atts ) ); $cat_args = array( ‘exclude’ => $exclude, ‘taxonomy’ => ‘theme_portfolio_categories’, ‘show_count’ => $c, ‘hierarchical’ => $h, ‘echo’ => 0 );

How to use multiple values in “Shortcode”? [closed]

You can combine these two shortcodes into one by using a custom shortcode that includes both of them: function custom_shortcode() { $output=””; // Get the wpcode shortcode output $wpcode_output = do_shortcode(‘[wpcode id=”2658″]’); // Get the wpdiscuz_comments shortcode output $wpdiscuz_output = do_shortcode(‘[wpdiscuz_comments]’); // Combine the two outputs into a single output $output .= $wpcode_output . $wpdiscuz_output; … Read more

wordpress shortcode url decode non Latin character

It makes sense to look at the PHP function rawurldecode, which decodes URL-encoded strings. https://www.php.net/manual/en/function.rawurldecode.php For example, echo rawurldecode(get_permalink($post->ID)); will show the decoded post URL. But this isn’t really needed in hyperlink code. Sorry I didn’t just write a comment, I don’t have enough points for that option.

conditional shortcodes

Thank you, @Howdy_McGee! current_filter() is exactly what I’ve been looking for. Here is what I did: function french_example( $atts , $content = null ) { $currentFilter = current_filter(); if ($currentFilter == the_content) { return ‘<span class=”ex” xml:lang=”fr” lang=”fr”>’ . do_shortcode($content) . ‘</span>’; } elseif ($currentFilter == the_title) { return ‘<span class=”ex” xml:lang=”fr” lang=”fr”>’ . do_shortcode($content) … Read more

How to handle Ajax Calls, when using same shortcodes (with different parameters, e.g. ‘post-type’)?

The problem is that your JS needs to know the post type for each shortcode, but rather than looking at the shortcodes output, it looks at the main global kne_ajax_object, and since there is only one kne_ajax_object, there can only be one post type. Additionally, your javascript code only runs one time, and only makes … Read more

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