Categories sheet in the Menu

Dear Aigars,

Sorry to bother you again! I’m still playing with your theme. I don’t if it’s a bug or what. I created in the Menu a category section where all the post with the category ‘Fruit’ are going to be showed. Actually, it works because when I click on it, all the articles with the tag fruit are collected over there. The problem is that when I click in one of them. When I clicked in one of theme, I could see the full article and in the bottom the buttons that has the name of the previous/next article in order of time. The point is that some of this articles are not a ‘Fruit’ category (e.g. I’m getting the Featured artciles where I have just the image on the slider). This is normal or it is a bug? If it is normal, I think it is good to hide the buttons that link to the other articles (e.g. the featured ones).

Thanks in advance for your precios support and explanation!

P.S. Is it possible to remove the sidebar and have a full-widh page also when I have categories?

Could you please post your website URL, so I can test it in an actual website. Right now I am a bit confused with your question as I can’t visualize it.

Unfortunatly I can’t. I will try to explain it better. I created a menu with 4 elements: 3 pages (1 it is the home) and 1 it is a category. The category one shows the articles that belong to the ‘News’ category. So, when I click on Category I could visualize all the ‘News’ articles in a list. Perfect. Now, if I click on an article I could read it entirely and below it there are the buttons to move trough the previous and next articles. The problem (maybe it’s me that I didn’t do something) is that the articles that are previous/next doesn’t belong to the News category. I would like to avoid this behaviour because the articles doesn’t belong to the News category. Another possibility is to remove these buttons.

I don’t know if I’m clear right now.

In the end I have a stupid one related to the type of the page. I would like to remove the sidebar (Archive/Meta) and the search button. I tried to copy and paste the file named ‘page-fullwidth.php’, rename as ‘page.php’. I though that it was going to have always the full-width template but it doesn’t. Well, right now I think that I was acting like a noob!

In the end I have a stupid one related to the type of the page. I would like to remove the sidebar (Archive/Meta) and the search button. I tried to copy and paste the file named ‘page-fullwidth.php’, rename as ‘page.php’. I though that it was going to have always the full-width template but it doesn’t. Well, right now I think that I was acting like a noob!

I found the solution to this :D. I will explain if someone else needs. To avoid the sidebar in a post it is need to open the file called single.php and change like this:

class="content-area col-sm-12 <strong>col-md-12</strong>

and comment the function in the end ( or remove):

<?php <strong>//</strong>get_sidebar(); ?>

I didn’t fix yet is the button stuff. I tried to list the Tag instead of the Category. The list works as before but when I click on one of that post, below appears two buttons related to the previous/next articles also the ones that doesn’t belong to the Tag/Category. The only thing that I could think to achieve myself (with a lot of hope) is to hide these buttons. I don’t know how to fix these buttons to the correct next/previous articles of the same Tag/Category.

This is not a bug it is expected behavior because WordPress simple works that way and most theme has the same approach. It shows the same the next and previous post in WordPress instead of just category.

However, you can modify this behavior. Here you can find code examples on how to get it done: http://codex.wordpress.org/Template_Tags/next_post_link

File that you need to edit is template-tags.php which you can find in theme folder - inc. There look specifically for dazzling_post_nav function.

Yeah, I made it. I added:

$in_same_cat = true

within the two functions:

<?php
	previous_post_link( '<div class="nav-previous">%link</div>', _x( '<i class="fa fa-chevron-left"></i> %title', 'Previous post link', 'dazzling' ), $in_same_cat = true);
	next_post_link(     '<div class="nav-next">%link</div>',     _x( '%title <i class="fa fa-chevron-right"></i>', 'Next post link',     'dazzling' ), $in_same_cat = true);
?>

It works! Thanks a lot for your support!

Thanks for posting your code! Now others can benefit from it in case they are looking for the same thing.