Can Page Templates be Applied to Archive and Post Templates?

If you would like all Post Types to have template selection functionality, please update to WordPress version 4.7. Quoted from the codex page linked above: Page Templates for Post Types Add support for post type templates. Add support for post type templates. By opening up the page template functionality to all post types, theme developers … Read more

Tried in different ways but sidebar not working?

add_action( ‘widgets_init’, ‘Y_widget_register’ ); You have a typo – use underscores. Here is the working piece: function Y_widget_register() { register_sidebar(array( ‘name’ => esc_html__(‘Sidebar’, ‘Y-07’), ‘id’ => ‘y-sidebar’, ‘description’ => ‘Dynamic Right Sidebar’, ‘before_widget’ => ‘<section id=”%1$s” class=”y-widget %2$s”>’, ‘after_widget’ => ‘</section>’, ‘before_title’ => ‘<h2 class=”y-widget-title”>’, ‘after_title’ => ‘</h2>’ )); } add_action(‘widgets_init’, ‘Y_widget_register’);

Adding settings link to plugin doesn’t work

The code is working and tested. Activate your plugin you will see the settings link add_filter( ‘plugin_action_links_’ . plugin_basename(__FILE__), ‘apd_settings_link’ ); function apd_settings_link( array $links ) { $url = get_admin_url() . “options-general.php?page=my-plugin”; $settings_link = ‘<a href=”‘ . $url . ‘”>’ . __(‘Settings’, ‘textdomain’) . ‘</a>’; $links[] = $settings_link; return $links; }

Will setcookie work if there is a cache plugin installed?

It will most likely depend on the plugin, but you should also remember that your content might be cached also in caching proxies as well. https://stackoverflow.com/questions/9334393/proxy-cacheing-what-about-cookies In other words, if your output is different to two different users, than you can not use caching. The way to go around this is to make the decision … Read more