Retrieve options set through a plugin

First of all, the_content is a filter hook and not action. Secondly, it will only work when post content will be access on your site front end. You can probably make use of global variables instead. e.g. $options = get_option( ‘wpglobalsettings’ ); and then use wherever you want to access as follows – global $options;

wp_ajax action responds with 0

Change your wp_localize_script-Call to the right Action: wp_localize_script( ‘addItemToNav’, ‘menuItems’, array( // URL to wp-admin/admin-ajax.php to process the request ‘ajaxurl’ => admin_url( ‘admin-ajax.php’ ), // generate a nonce with a unique ID “myajax-post-comment-nonce” ‘postCommentNonce’ => wp_create_nonce( ‘update_nav_items-nonce’ ), ‘action’ => ‘wp_ajax_update_nav_items’ ) ); As ‘action’ you currently Input the function Name, but that is wrong. … Read more

Problem in using Customizer

Hey Only Change the code like this function cult_customizer_register( $wp_customize ) { $wp_customize->add_section( ‘cult_topic_thumb’ , array( ‘title’ => __( ‘Topic of the Week’ ), ‘priority’ => 36, ‘description’ => ‘Allows you to upload an image for your topic of the week section.’, ) ); $wp_customize->add_setting( ‘display_topic_thumb’ ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, ‘display_topic_thumb’, array( ‘label’ => … Read more

Never actually adding the action? Or do I have to call the action?

You are using after_theme_switch action but the correct name is after_switch_theme. Also, you won’t see the echo statements on after_theme_switch and switch_theme. To debug things in that hooks you can use, for example, error_log() function and look for messages in PHP error log file (you need to have errors “On” and/or WP_DEBUG enabled). I’ve tested … Read more