Tagged: x
-
AuthorPosts
-
November 10, 2016 at 6:20 am #1251582
Kade McConvilleParticipantHi guys,
Added this code given to me from these forums before;
add_filter( 'pre_get_posts', 'custom_search' ); function custom_search( $query ) { if ( $query->is_search ) { $query->set( 'post_type', array( 'post','page','x-portfolio','product' ) ); } return $query; }But when validating it gives me the following errors;
2 Parse Error add_filter( ‘pre_get_posts’, ‘custom_search’ );
5 Lexical error at line 3, column 26. Encountered: “q” (113), after : “$” query ) {query->is_search ) {query->set( ‘post_type’, array( ‘post’,’page’,’x-portfolio’,’product’ ) );
6 Parse Error }
7 Lexical error at line 7, column 13. Encountered: “q” (113), after : “$” query;
8 Parse Error }Any ideas on how to fix this?
Cheers!November 10, 2016 at 3:34 pm #1252320
RadModeratorHi Kade,
Thanks for posting in.
I tried that code and it’s not throwing errors on my end. Would you mind providing your site’s URL, admin and FTP login credentials? Please provide a video recording on how we can reproduce this, maybe I’m just doing it differently.
Thanks!
November 10, 2016 at 4:56 pm #1252375
Kade McConvilleParticipantHi there,
https://jigsaw.w3.org/css-validator/validator
Adding the code in there comes up with errors. The CSS always appears to make my customiser global CSS code appear off too?
Will look to follow up with a video ASAP.Cheers.
November 10, 2016 at 7:15 pm #1252569
Kade McConvilleParticipantThis reply has been marked as private.November 11, 2016 at 1:25 am #1252916
RadModeratorHi there,
Now I know what you mean 🙂
That’s a PHP code and not related to CSS. It should be added to child theme’s functions.php
Cheers!
November 11, 2016 at 6:18 am #1253234
Kade McConvilleParticipantD’oh!
Thanks a lot 🙂
November 11, 2016 at 8:51 am #1253368
RahulModeratorGlad we were able to help you out!
If you have anything further to ask, kindly let us know. We’d be happy to assist you with anything.
Thanks for choosing the X-theme.
November 14, 2016 at 3:38 am #1256100
Kade McConvilleParticipantRight,
So adding this code, stops my forums topics from appearing…
See issue at https://community.theme.co/forums/topic/forum-topics-not-displaying/
November 14, 2016 at 4:29 am #1256153
ChristopherModeratorPlease keep posting on your original thread.
Thanks.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1251582 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
