dakta
Forum Replies Created
-
Forum: Plugins
In reply to: [Tweet My Post] Posts not Tweeted, Log Entries are emptyYes.
By downloading another similar Plugin and discovering a similar issue, I was able to determine that the source is the same: you must provide a callback endpoint in your Twitter App configuration. Without this, all sorts of wonky stuff happens.
I confirm this issue recurs after reinstalling plugin. The only difference is that now the outdated version of files being served is the version that was current when the dependencies were first generated after reinstalling the plugin.
I have checked the wp_options table and no rows exist when dependencies have been purged. I have no idea where these values might be cached, but they are certainly being cached.
I have tested with all other plugins disabled, to no effect.
I believe I had this same issue.
When
WP_DEBUG = true, new minified dependencies are not generated. I’ve tried expiring and purging all dependencies, but it doesn’t have any effect.More annoyingly, under normal operation, *new* dependencies are not generated either. What I mean is that even if I purge or expire dependencies, in order to force them to be rebuilt due to an updated CSS file or similar, and they are regenerated, the regenerated version contains old versions of the files, even when those files no longer exist on the host filesystem.
I just purged all dependencies and reinstalled the plugin (which I had to do twice because the plugin didn’t clean up after itself on removal; you should really clear out the stored dependencies when a user removes the plugin, or have an option for it), and it appears to have worked. I will report back if issues similar to this persist.
Forum: Hacks
In reply to: Cunstom Taxonomy Archives with Custom Post TypesOK, so I have found a solution that doesn’t require writing a custom rewriting filter. Please refer to this StackOverflow answer: http://wordpress.stackexchange.com/a/57515/44750
The key is this:
Change the
has_archiveparameter of the custom post type fromtrueto the value of the custom post type’s slug. This allows us to hijack therewriteparameter to create the custom taxonomy rewrite rule and preserve proper rewriting of the custom post type archive. Next, change the value of the rewrite slug like this:'slug' => 'custom_post_type_slug/%taxonomy_slug%wherecustom_post_type_slugis the same as the value you set forhas_archiveandtaxonomy_slugis the same as the slug of the custom taxonomy. Keep the%characters.Important note: you must have a rewrite set for the custom taxonomy and for the custom post type, with
'with_front' => false. Here’s an example with the important parts marked:// Register Custom Taxonomy function example_taxonomy_init() { $labels = array( 'name' => 'Example Taxonomy', 'singular_name' => 'Example Taxonomy', 'menu_name' => 'Example Taxonomy', 'all_items' => 'All Example Taxonomies', 'parent_item' => 'Parent Example Taxonomy', 'parent_item_colon' => 'Parent Example Taxonomy:', 'new_item_name' => 'New Example Taxonomy Name', 'add_new_item' => 'Add New Example Taxonomy', 'edit_item' => 'Edit Example Taxonomy', 'update_item' => 'Update Example Taxonomy', 'separate_items_with_commas' => 'Separate example taxonomies with commas', 'search_items' => 'Search example taxonomies', 'add_or_remove_items' => 'Add or remove example taxonomies', 'choose_from_most_used' => 'Choose from the most used example taxonomies', ); // IMPORTANT! $rewrite = array( 'slug' => 'example-custom-post/example-taxonomy', 'with_front' => false, ); $args = array( 'labels' => $labels, 'hierarchical' => true, 'public' => true, 'show_ui' => true, 'show_admin_column' => true, 'show_in_nav_menus' => true, 'show_tagcloud' => true, 'rewrite' => $rewrite, ); register_taxonomy( 'example-taxonomy', 'example-custom-post', $args ); } // Hook into the 'init' action add_action( 'init', 'example_taxonomy_init', 0 );</p> <p>// Register Custom Post Type function example_custom_post_init() { $labels = array( 'name' => 'Example Custom Posts', 'singular_name' => 'Example Custom Post', 'menu_name' => 'Example Custom Posts', 'parent_item_colon' => 'Example Custom Post:', 'all_items' => 'All Example Custom Posts', 'view_item' => 'View Example Custom Post', 'add_new_item' => 'Add New Example Custom Post', 'add_new' => 'New Example Custom Post', 'edit_item' => 'Edit Example Custom Post', 'update_item' => 'Update Example Custom Post', 'search_items' => 'Search example custom posts', 'not_found' => 'No example custom posts found', 'not_found_in_trash' => 'No example custom posts found in Trash' ); // IMPORTANT! $rewrite = array( 'slug' => 'example-custom-posts/%example-taxonomy%', // keep the % characters 'with_front' => false, ); $args = array( 'label' => 'example-custom-post', 'description' => 'An example custom post type', 'labels' => $labels, 'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', ), 'taxonomies' => array( 'example_taxonomy' ), // link to our custom taxonomy 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'menu_icon' => '', 'can_export' => true, 'has_archive' => 'example-custom-posts', 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', 'rewrite' => $rewrite ); register_post_type( 'example-custom-post', $args ); } // Hook into the 'init' action add_action( 'init', 'example_custom_post_init', 0 );