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