tohaitrieu
Forum Replies Created
Viewing 4 replies - 1 through 4 (of 4 total)
-
My problem is the same.
Have no change with Email Notification Settings.
I buy the pro license but. Sensei insert their link in every email footer to my customers. It’s not fair
Thanks @luisherranz
Forum: Plugins
In reply to: [Worona - Build free mobile apps with WordPress] Add Some CSS to my AppHi @luisherranz i resolved that problem with shortcode and direct css in html style.
Thanks.
Forum: Hacks
In reply to: Using pre_get_posts to update query of a child post no longer works as expectedDear Ryan i use your tut from here:
https://ryansechrest.com/2013/04/remove-post-type-slug-in-custom-post-type-url-and-move-subpages-to-website-root-in-wordpress/I change permalink of custom post type successfuly but give 404 error. And this is my code:
function custom_pre_get_posts($query) { global $wpdb; if(!$query->is_main_query()) { return; } $post_name = $query->get('name'); $result = $wpdb->get_row( $wpdb->prepare( 'SELECT wpp1.post_type, wpp2.post_name AS parent_post_name FROM ' . $wpdb->posts . ' as wpp1 LEFT JOIN ' . $wpdb->posts . ' as wpp2 ON wpp1.post_parent = wpp2.ID WHERE wpp1.post_name = %s LIMIT 1', $post_name ) ); if(!empty($result->post_type)) { switch($result->post_type) { case 'chapter': if ($result->parent_post_name !== '') { $post_name = $result->parent_post_name . '/' . $post_name; } $query->set('chapter', $post_name); $query->set('post_type', $result->post_type); $query->is_single = true; $query->is_page = false; break; } } return $query; } add_action('pre_get_posts','custom_pre_get_posts');
Could you check and fix it?
Viewing 4 replies - 1 through 4 (of 4 total)