arnus71
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Custom post type in own root folder?I tried this again on a new db but got the same result. Then I found out why this wasn’t working – the setting
'with_front' => true
should be'with_front' => false
giving the following:'rewrite' => array( 'slug' => 'case-studies', 'with_front' => false
And it is imperative to refresh permalinks!
Sounds pretty logical now…- This reply was modified 4 years, 1 month ago by arnus71.
Forum: Developing with WordPress
In reply to: Custom post type in own root folder?Thanks for your help. I redid the steps just like you did above but I still get the same result – /blog/case-studies. Checked in another browser but still the same. No idea. I may just try a new db and see what happens – the current one has seen a lot of experimentation and may be the cause of this not working.
- This reply was modified 4 years, 1 month ago by arnus71.
Forum: Developing with WordPress
In reply to: Custom post type in own root folder?No problem.
I had refreshed the permalinks already but no dice. Also removed the htaccess file so it would generate a new one, but still no change.
Maybe I should remove the /blog from the permalinks to get the case-studies to show in the root and then do another rewrite specifically for the blog posts to show in /blog?
Forum: Developing with WordPress
In reply to: Custom post type in own root folder?Thank you, wish me luck! ??
Forum: Developing with WordPress
In reply to: Custom post type in own root folder?Yes
Forum: Developing with WordPress
In reply to: Custom post type in own root folder?Sorry, I’m not a developer, just doing my best by trying to understand it all.
I am registering the CPT in my own code because the use of plugins wasn’t getting me where I wanted.
This is the full contents of my funcions.php in my child theme where I declare the CPT and its categories. Maybe you can spot what is wrong with this because the url for case-studies still has /blog in front of it. Thanks for any help!
/*Custom Post type start*/ function cw_post_type_casestudies() { $supports = array( 'title', // post title 'editor', // post content 'author', // post author 'thumbnail', // featured images 'excerpt', // post excerpt 'custom-fields', // custom fields 'comments', // post comments 'revisions', // post revisions 'post-formats', // post formats ); $labels = array( 'name' => _x('Case Studies', 'plural'), 'singular_name' => _x('Case Study', 'singular'), 'menu_name' => _x('Case Studies', 'admin menu'), 'name_admin_bar' => _x('Case Studies', 'admin bar'), 'add_new' => _x('Add New', 'add new'), 'add_new_item' => __('Add New Case Study'), 'new_item' => __('New Case Study'), 'edit_item' => __('Edit Case Study'), 'view_item' => __('View Case Study'), 'all_items' => __('All Case Studies'), 'search_items' => __('Search Case Studies'), 'not_found' => __('No Case Studies found.'), ); $args = array( 'supports' => $supports, 'labels' => $labels, 'public' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'case-studies', 'with_front' => true, 'pages' => true, 'feeds' => true, ), 'has_archive' => true, 'hierarchical' => false, 'menu_position' => 4, 'menu_icon' => 'dashicons-id-alt', ); register_post_type('case-studies', $args); } add_action('init', 'cw_post_type_casestudies'); /*Custom Post type end*/ /*Custom categories for Case Studies start*/ function tr_create_my_taxonomy() { register_taxonomy( 'case-studies-category', 'case-studies', array( 'label' => __( 'Categories' ), 'rewrite' => array( 'slug' => 'case-studies-category' ), 'hierarchical' => true, ) ); } add_action( 'init', 'tr_create_my_taxonomy' ); /*END Custom categories for Case Studies start*/
Forum: Developing with WordPress
In reply to: Custom post type in own root folder?Thanks FullWorks! Would this best be placed in the functions.php of my child theme? And will it overwrite the blog slug?
- This reply was modified 4 years, 1 month ago by arnus71.
Forum: Plugins
In reply to: [WP Car Manager] Back button on vehicle details pageGreat idea! I have the same request.
Regards
Arnaud.Forum: Plugins
In reply to: [WP Car Manager] Uitgelicht afbeelding op Autopagina verwijderenWat ik heb gedaan is de afbeelding die je als Uitgelichte afbeelding gebruikt NIET opnemen in de gallerij. Daardoor is deze maar een keer te zien: https://www.autokopenopcuracao.com/occasions/
Of is dit niet wat je bedoelt? Heb je een voorbeeld URL?
groeten
Arnaud.Forum: Plugins
In reply to: [WP Customer Reviews] How to get review stars in google search resultsThanks for the info, good to know some background information concerning this issue.
Forum: Plugins
In reply to: [WP Customer Reviews] How to get review stars in google search resultsGreat! I validated my page and everything looks good.
When I google for the site, the stars still do not appear in the search results. @gowebsol, you state that the rest is up to them, but there must be something I can do to get the stars to appear?