-
Author
Tagged: default blog page
-
April 25, 2015 at 01:39 #56116GandamParticipant
Hi,
I haven been creating different category pages and I was thinking if you could help me to avoid the specific category/tag displaying on default blog page, so it doesn’t repeatedly show in default blog page. In any new page I can manage to set up a different “data source” to narrow its displaying on frontend, but not for default blog page, so how do I do it?! I can’t find any similar topics from your support. Thank you for providing us excellent support always.April 27, 2015 at 17:12 #56247RaduModeratorHello,
1. Activate Kleo Child Theme.
2. Then replace index.php from child theme with this file ( see attachment ).
3. Open the index.php look for $hidecategories = ‘cat=-1,-2,-3’; ( line 26 )
Replace -1 with id from category do you want to hide if you want to hide only one category the code will be like this : $hidecategories = ‘cat=-1’; but if you have more than one category to hide code will be like this : $hidecategories = ‘cat=-1,-2,-3’;
Let me know if it works.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAttachments:
You must be logged in to view attached files.April 27, 2015 at 20:45 #56282GandamParticipant@Radu – thanks for your help. I am not sure if I am doing this right, but nothing has changed after I replaced index file and amended this line to $hidecategories = ‘cat=-events′; is category id same as category name? Pls advise, thanks again.
April 27, 2015 at 21:00 #56283GandamParticipant@Radu – I’ve managed to get category id, it works!! great help, thanks!!:)
April 29, 2015 at 02:17 #56542GandamParticipant@Radu – I picked up another error after I replaced attached index.php file. It seems that this index.php breaking up blog pagination, what do I do now, pls help?! 🙁
April 29, 2015 at 14:25 #56584RaduModeratorHEllo,
Please give me the url, and the admin credentials.
I need to take a look closer.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 29, 2015 at 17:07 #56623RaduModeratorHello,
I added in your kelo-child/functions.php this function that will exclude certain categories.
COPY CODEfunction exclude_category_home( $query ) { if ( $query->is_home() && $query->is_main_query() ) { $query->set( 'cat', '-2,-80' ); } } add_action( 'pre_get_posts', 'exclude_category_home' );
If you want to add more categories, just separate them with commas.
Let me know if is ok.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 29, 2015 at 17:14 #56628RaduModeratorA small thing, just re assign a blog page from Settings -> Readings -> Front page displays -> Posts page.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionApril 29, 2015 at 17:26 #56635GandamParticipant@Radu – Everything seems to be in working order, pagination is working as well, thank you so much!! 🙂
July 31, 2015 at 23:54 #71017clickafyParticipantI was able to make the change…
But it’s not paginating correctly… it just respawns the blog posts every time…every page.
brandmediastudio.com – click on articles… to see.
Thoughts?
August 1, 2015 at 15:27 #71073RaduModeratorHi Clickafy,
What solution do you have applied ?
Regards
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 3, 2015 at 13:05 #71305RaduModeratorTry to apply only the second solution, it this doesn’t work please provide admin credentials to look closer.
Regards
RAdu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionAugust 3, 2015 at 22:28 #71409RaduModeratorYou’re welcome,
Also don’t forget to rate our theme on Themeforest and give it 5 stars 🙂
http://themeforest.net/downloads/
Best regards
Radu
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.