Updating a theme

The name change by itself will not cause any problems, as long as the file header info is unique between them. https://codex.wordpress.org/File_Header Why not use the version meta on the theme and retain the same name and directory structure for the theme? You could also place the files in a proper version control system. Host … Read more

Using activated_plugin to run code

Why not try simply: $SiteOriginOptions=”a:14:{s:10:”post-types”;a:2:{i:0;s:4:”page”;i:1;s:4:”post”;}s:10:”title-html”;s:39:”<h3 class=”widget-title”>{{title}}</h3>”;s:16:”add-widget-class”;b:1;s:15:”bundled-widgets”;b:0;s:19:”recommended-widgets”;b:1;s:10:”responsive”;b:1;s:13:”tablet-layout”;b:1;s:12:”tablet-width”;i:991;s:12:”mobile-width”;i:480;s:13:”margin-bottom”;i:30;s:22:”margin-bottom-last-row”;b:0;s:12:”margin-sides”;i:30;s:20:”full-width-container”;s:4:”body”;s:12:”copy-content”;b:1;}”; update_option(‘siteorigin_panels_settings’, $SiteOriginOption); Also, you may want to set a flag to say the options have been initiated so the user can change them later and not have them overridden whenever they activate a plugin.

Media previews on posts

Okay so I figured out what was happening – either the new theme or an unintentional wordpress update, lead to media links being handled differently. My new theme now only needs the URL – no shortcodes or iframes – and it seems to automatically process it to display how it used to display them. Only … Read more

How to assign a Category to a Page, when both are created on theme initiation?

figured out how to accomplish my task : // function to fetch tag ID from name function get_tag_ID($tag_name) { $tag = get_term_by(‘name’, $tag_name, ‘post_tag’); if ($tag) { return $tag->term_id; } else { return NULL;} } // add categories & tag taxonomy to pages register_taxonomy_for_object_type( ‘category’, ‘page’ ); register_taxonomy_for_object_type( ‘post_tag’, ‘page’ ); // let’s create some … Read more