Kevin McClellan
Forum Replies Created
-
@veggie_89 Just checked some of my custom post types and bulk editing shows the post type selector. Below is a copy of the code I use for my own custom post types. Maybe you can compare and see what you might be missing.
function cpt_testpages() {
/**
* Post Type: Testing.
*/
$labels = array(
"name" => __( "Testing", "astra" ),
"singular_name" => __( "Test Page", "astra" ),
"parent_item_colon" => __("Parent Item:" ),
);
$args = array(
"label" => __( "Testing", "astra" ),
"labels" => $labels,
"description" => "",
"public" => true,
"publicly_queryable" => true,
"show_ui" => true,
"show_in_rest" => false,
"rest_base" => "",
"has_archive" => false,
"show_in_menu" => 'site-pages',
"show_in_nav_menus" => true,
"exclude_from_search" => true,
"capability_type" => "post",
"map_meta_cap" => true,
"hierarchical" => true,
"rewrite" => array( "slug" => "testing", "with_front" => true ),
"query_var" => true,
"menu_position" => 20,
"supports" => array( "title", "editor", "thumbnail", "excerpt", "custom-fields", "comments", "revisions", "author", "page-attributes", "post-formats" ),
);
register_post_type( "cwgtestpages", $args );
}
add_action( 'init', 'cpt_testpages',1 );Forum: Plugins
In reply to: [Post Type Switcher] Compatible with 6.7+I use this plugin all the time and have the latest version of WP installed and have no issues.
Forum: Everything else WordPress
In reply to: Google search website meta titleI believe you are referring to the %site_title% – %post-name% in the browser tab. If so, you can change the first part of that under the WP Dashboard under “Settings > General” and change site title there. This can also be done in the site editor > site identity if you want.
Additionally, if you would like to change something for this in Rank Math, I believe you’ll find that under WP Dashboard > Rank Math SEO > Titles & Meta
Forum: Everything else WordPress
In reply to: Removing Unnecessary SlugWordPress always “expects” a slug for a custom post type. If you remove the slug completely, and you have a page or post in another post type (such as posts or pages), or post in same category name which has the same slug for the content (ie… post-title or page-title), then it would conflict and you would most likely face issues on those pages due to those sharing the same full URL, which could be what the issue was with critical errors – though I wouldn’t imagine the whole site going down.
If you remove the slug, you would need to add custom rewrite rules.I did a little research for you and it looks like, for the video post type that this might work (please note that I have not tested this as I don’t have access to the theme). Please take a backup or know how to undo this if you have problems.
function change_post_type_slug() {
$args = array(
'rewrite' => array( 'slug' => '/' ), // Attempts to remove the slug
// other post type arguments
);
register_post_type( 'video_skrn', $args );
}
add_action( 'init', 'change_post_type_slug' );
function custom_rewrite_rules() {
add_rewrite_rule('([^/]+)$', 'index.php?video_skrn=$matches[1]', 'top');
}
add_action('init', 'custom_rewrite_rules');My suggestion would be to instead just change the slug to a different slug that makes more sense for your website. For example, to change that slug to just /video/, then you would want to use this code instead.
function change_post_type_slug() {
$args = array(
'rewrite' => array( 'slug' => 'video' ), // Sets the slug to /video/
// other post type arguments
);
register_post_type( 'video_skrn', $args );
}
add_action( 'init', 'change_post_type_slug' );If you need to do this multiple times, make sure to change the function name. So instead of change_post_type_slug() you could think about using change_video_skrn_slug()
I hope this helps or at least gets you in the right direction.
Most importantly, have a super awesome weekend.
Kevin- This reply was modified 4 months, 3 weeks ago by Kevin McClellan.
Forum: Networking WordPress
In reply to: Multisite – When is Upgrade Network needed?@rpmtl22 Yes, you would only need to “Upgrade Networks” when prompted to do so by the WordPress admin whilst logged into and viewing the Network Admin area.
I have wondered about this myself in the past. Basically, when doing any WordPress updates, there are times when you won’t see that, which is usually on minor updates, and on some major updates as well. I believe, based on what I have experienced, that most major WordPress updates tend to have some kind of update for the WordPress Network as well.
Thanks for sharing what you have found with the community here. I love using the multisite network when I have a bunch of sites that share either similar topics or use the same theme and plugins.
Have a great day ??
Kevin
Forum: Plugins
In reply to: [Heroic Table of Contents] Abandoned Plugin?Thanks @chrishadley for the response and for taking the time to push out an update. It’s much appreciated. ??
Forum: Plugins
In reply to: [Heroic Table of Contents] Abandoned Plugin?Agree 100%. Plugin author could take 1 hour of time and just test the plugin on latest WP, and then release update which says in changelog that they “Tested with Latest WP version” and then leave it at that.
I can confirm myself that this plugin works great on the latest WordPress version without any issues. It’s not a heavy plugin anyways and probably doesn’t need to be updated, but doing the above will show that this plugin is still checked occasionally and not abandoned.As issue is solved on our end I am marking as resolved. Thanks again.
- This reply was modified 1 year, 1 month ago by Kevin McClellan.
Really appreciate all the help looking into this issue. We had a small issue on our end and this is solved now.
No meaningful error log was generated. Allow me some more time to double check things.
Hi Joachim, I am curious if you have had a chance to check the PHP API?
It’s the PHP API as far as I’m aware. I’ll ask our developers to reach out as I have no idea where the code is in our plugin for handling this specific integration. Is it fine if I DM you on slack?
I have read some other threads from after the last update and just want to let you know that I am not using any language translation plugins so this issue seems different than in those threads.
Forum: Fixing WordPress
In reply to: Fatal errror after PHP 8 updateI would suggest to contact your web hosting provider and ask that they check your .htaccess file and also make sure all the correct PHP modules are loaded for your site. If it doesn’t work with all plugins deactivated and default them enabled then this is likely an issue on the hosting or you may have some directives in the htaccess file that only work on the previous PHP version which your web host can help you get rid of.
Forum: Everything else WordPress
In reply to: Query Loop’s next page link takes user to top of page@brentrambo This is expected behavior. Anytime you are using pagination features, the links can only go to the page in question but there is no way for it to automatically scroll down to where you have the posts.
In these situations my recommendation would be to use either an infinite scroll or “load more” button if that is possible. It really depends on what you used for setting this up as to what options you’ll have.