Combining wp_current_user() and a variable

What you have is mostly just PHP errors. First, dashes are not valid characters in variable names, so are going to have trouble with this– badge-id-$badge_ID— no matter what. You should be using underscores instead. Second, you need to construct the entire object variable string beforehand, rather than try to construct it as you are … Read more

Trying to the deduce shortcode from a function

I wonder if this would work: [tabs tab1=”Tab 1″ tab2=”Tab 2″ tab3=”Tab 3″] [tab id=”1″]Content for tab one goes here.[/tab] [tab id=”2″]]Content for tab two goes here.[/tab] [tab id=”3″]]Content for tab three goes here.[/tab] [/tabs] You should also check if the shortcode definitions exists: add_shortcode( ‘tabs’, ‘some_function_for_tabs’ ); add_shortcode( ‘tab’, ‘some_function_for_tab’ );

Function to return custom post type titles from blog id 1

It’s returning just 1 post title because everytime it reads a post it replaces the content of the var $titles with the title of the current post. Try this, it will return an array with the post titles. function getctas() { $titles_array = array(); switch_to_blog(1); $args = array( ‘post_type’ => ‘location_icons’ ); $ctas = new … Read more

unregister_sidebar in child theme not working

This line is your problem add_action( ‘widgets_init’, ‘ohsik_widgets_init’, 12); You are deregistering your sidebar correctly. For some reason you are registering it, or something. I don’t see the need or use for this. The other possibility that I’m thinking of for using this code is that somewhere you are registering your own custom sidebars. If … Read more

Custom Nested WordPress Comments with avatar

Plugin recommendations are off topic, so you will need to search this on your own. As for without a plugin, you can customize the the output of wp_list_comments In wp_list_comments, there is a callback parameter which you can override with your own function. This is the customized callback function that I currently use. It differs … Read more