DJABHipHop
Forum Replies Created
-
Forum: Plugins
In reply to: [Admin and Site Enhancements (ASE)] Improvements over LoginI agree
Forum: Plugins
In reply to: [Admin and Site Enhancements (ASE)] [Suggestion]: Preloader Feature?
Forum: Plugins
In reply to: [Admin and Site Enhancements (ASE)] Feature Request: SEO-Friendly Search URLs@qriouslad this what i’m using since my theme has search filter to filter search result by post format with works but not 100% if you decide to not add my suggestion please let me know what i’m doing wrong with my code instead.
/**
* Change search page slug.
*/
function wpb_change_search_url() {
if ( is_search() && ! empty( $_GET['s'] ) ) {
$paged = '';
$post_format = '';
if ( get_query_var( 'paged' ) > 0 ) {
$paged = '/page/' . urlencode( get_query_var( 'paged' ) );
}
if ( isset( $_GET['post_format'] ) && ! empty( $_GET['post_format'] ) ) {
$post_format = '/type/' . urlencode( sanitize_text_field( strtolower( $_GET['post_format'] ) ) );
}
wp_redirect( home_url( "/search/" ) . urlencode( get_query_var( 's' ) ) . $post_format . $paged );
exit();
}
}
add_action( 'template_redirect', 'wpb_change_search_url' );
/**
* Adds the rewrite rule for search with post_format and pagination.
*/
function custom_search_rewrite_rule() {
if ( '' != get_option( 'permalink_structure' ) ) {
// Search with post format
add_rewrite_tag( '%type%', '(.+)', 'post_format=' );
add_rewrite_tag( '%page%', '(.+)', 'paged=' );
add_rewrite_tag( '%search%', '(.+)', 's=' );
// Search with post format and pagination
add_rewrite_rule( 'search/(.+)/type/?([^/]+)/page/?([0-9]{1,})/?$', 'index.php?s=$matches[1]&paged=$matches[2]&post_format=$matches[3]', 'top');
// Search with post format only
add_rewrite_rule( 'search/(.+)/type/?([^/]+)/?$', 'index.php?s=$matches[1]&post_format=$matches[2]', 'top');
// Search with pagination only
add_rewrite_rule( 'search/(.+)/page/?([0-9]{1,})/?$', 'index.php?s=$matches[1]&paged=$matches[2]', 'top');
// Search only
add_rewrite_rule( 'search/(.+)/?$', 'index.php?s=$matches[1]', 'top');
}
}
add_action( 'init', 'custom_search_rewrite_rule' );
/**
* Flush rewrite rules on theme activation or plugin activation (run once).
*/
function flush_search_rewrite_rules() {
custom_search_rewrite_rule();
flush_rewrite_rules();
}
add_action( 'after_switch_theme', 'flush_search_rewrite_rules' );
add_action( 'activated_plugin', 'flush_search_rewrite_rules' );- This reply was modified 1 month, 1 week ago by DJABHipHop.
Forum: Plugins
In reply to: [Admin and Site Enhancements (ASE)] Feature Request: SEO-Friendly Search URLsits valid in 2024, and im using a code snippet the old AF
@qriouslad Bug gone with the fix
@qriouslad lasted version
Forum: Plugins
In reply to: [Admin and Site Enhancements (ASE)] Undefined array key “DISALLOW_FILE_EDIT”Undefined index: DISALLOW_FILE_EDITPlugin: Admin and Site Enhancements (ASE)
File: /wp-content/plugins/admin-site-enhancements/classes/class-wp-config-transformer.php
Line: 199@qriouslad Nope it’s not a plugin, what browser are testing on try on Safari
- This reply was modified 1 month, 2 weeks ago by DJABHipHop.
Maybe
try resizing the window
Sure
disable full height editor classic editor
@qriouslad yes, & first stupid autocorrect & it happened if I set thumbnail image & disable full height editor otherwise no
- This reply was modified 1 month, 2 weeks ago by DJABHipHop.
- This reply was modified 1 month, 2 weeks ago by DJABHipHop.