Funn: Https://gist.github.com/staycreativedesign/85d6a8cb05d6329605fa
Filipovich: AbuDhar: before I look at that, tell me what’s not working
Funn: What am i doing wrong?
Musel: Filipovich: sure. I changed the slug of my custom post type and now I don’t see the template
Bahr: Dopie, first, you are doing it ALL wrong lol
Bahr: Dopie, 1 i will ***ume you are loading SearchFilter via the pre_get_posts hook, so i’ll skip that.
Filipovich: AbuDhar: did you change the name of the template, too?
Shelburne: But for now, I just want to focus on having hard-coded categories with a single sidebar to use for quick links and advertisements.
Funn: Add_filter’pre_get_posts’,’SearchFilter’;
Bahr: Dopie, 2 $query-set$query_var, $value;
Shelburne: Well, maybe two sidebars
Bahr: You need to run set for each parameter
Bahr: Dopie, check this link:
Filipovich: What’s the name of the template file? Did you reset permalinks after changing the CPT name/slug?
Bahr: Dopie, you still need a link?
Bley: How do I reset permalinks?
Bahr: You just need to run set multiple times. k jas
Schepker: Filipovich: how do I do that? lol
Filipovich: Settings – permalinks click save twice
Bahr: Dopie, also do you want this on the NON-ADMIN, main search only?
Shelburne: What is the_post_navigation for?
Hodsdon: Filipovich: all the clinics are gone :/
Shelburne: Wait.must be for dividing posts into more than one “page”.
Filipovich: AbuDhar: what is the template you’re using?
Debruyn: AbuDhar: Show Current Template – https://----escape_autolink_uri:a03ded6cd97ffffa8f7b4e1454f3eecc----.org/plugins/show-current-template/
Shillito: Did my CPT look right? the code of it?
Bahr: Dopie, i made some other changes for you and added some comments bc i needed a break :
Bahr: Dopie, http://bin.wpkeg.com/poklp2ify
Zamparini: Filipovich: my custom post types are gone.
Greaney: So something is wrong in the code
Bahr: Now i’m not 100% suer on your ‘cat’, as i never use the – to remove cats
Filipovich: AbuDhar: no, they’re still in the DB
Filipovich: Did you rename the CPT *after* you’d created them?
Bahr: Dopie, however i believe that’s proper
Mcglothlen: Filipovich: I know they are
Dilliner: But I am not seeing them hehe
Bahr: Dopie, if you don’t check for main query or admin, you’ll end up unintentionally modifying other queries
Geurin: If I change back I see them 😀
Filipovich: AbuDhar: please answer my questions: Did you rename the CPT *after* you’d created them?
Filipovich: Then you have to rename them in the DB, too.
Filipovich: In the post_type column
Filipovich: Think these things through!
Lounsberry: But the code looks fine? all arguments are correct?
Funn: I have a question why does it matter if admin is viewing or not?
Filipovich: I don’t care about your code
Higgason: Why do I have to change it in the DB? Why did they make it like that?
Titmus: A CMS means = you should be able to do everything from the admin panel
Filipovich: AbuDhar: you created a custom post type and stored posts of that type. then in code, you changed the name of the CPT. How is WP supposed to know to change the stuff in the DB?
Wrobbel: Yeah it should be able to recognize it somehow. :
Filipovich: If your code doesn’t work, I’ll look at it to fix a speciffic problem. But don’t show me 100 lines of code and say “”is this OK?” That’s just lazy on your part
Filipovich: AbuDhar: no, it shouldn’t. You should be smarter.