WordPress Themes, Plugins and HTML Templates › Forums › Prana WordPress Theme › Remove “Category Archives” from a category page header
- This topic has 8 replies, 1 voice, and was last updated 9 years, 4 months ago by
Anonymous.
-
AuthorPosts
-
October 8, 2013 at 6:17 am #414
Anonymous
GuestHow do i remove “Category Archives” from a category page header?
Thank you for assistanceOctober 8, 2013 at 5:44 pm #1044admin
ParticipantHello,
Prana does not support to remove LOOP META HEAD i.e Category Archives etc in the current version.
Thanks
October 11, 2013 at 2:58 pm #1045Anonymous
GuestI was able to remove this by using my browsers search function inside the loop-meta editor file, a simple deletion of the words “Category Archives:” from the echo field removed this for me. Has been like this for over a week with no issues.
October 11, 2013 at 5:02 pm #1046admin
ParticipantHi,
Yes, you may edit loop-meta.php file if you are comfortable with coding.
If you want to hide loop meta headings at all pages – simply remove all the code from loop-meta file – Don’t forget to take backup of your file.Thanks
November 2, 2013 at 6:16 pm #1047Anonymous
GuestI am using Prana Pro in Word Press. I want to be able to post to specific categories and have the post only show in the category I choose. Currently everything I post also shows up on my home page. I’ve been trying to do this with the Plug-in Advanced Category Excluder, but it doesn’t seem to be working. Any suggestions. I’m not by far familiar with code, although I’ve managed to figure a few things out with some help. Is there a way to do this simply?
November 3, 2013 at 5:56 pm #1048admin
ParticipantHello,
I am using Prana Pro in Word Press. I want to be able to post to specific categories and have the post only show in the category I choose.
You have to modify the WordPress loop which involves a sort of programming. I have forwarded this question to our DEV team so they may be able to share a code snippet with you.
Thanks
November 3, 2013 at 9:29 pm #1049Anonymous
Guestadmin, post: 478, member: 1 wrote:Hello,You have to modify the WordPress loop which involves a sort of programming. I have forwarded this question to our DEV team so they may be able to share a code snippet with you.
Thanks
November 4, 2013 at 7:20 am #1050admin
ParticipantHello,
You may use the following code snippets to satisfy your requirements,Edit File
Write any of the following code snippet in the prana/functions.php file,
Code Snippet
[PHP]/** Exclude categories on your main page */
function kamn_exclude_category( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( ‘cat’, ‘-2,-6’ );
}
}
add_action( ‘pre_get_posts’, ‘kamn_exclude_category’ );[/PHP][PHP]/** Specific categories on your main page */
function kamn_specific_category( $query ) {
if ( $query->is_home() && $query->is_main_query() ) {
$query->set( ‘cat’, ‘5,2’ );
}
}
add_action( ‘pre_get_posts’, ‘kamn_specific_category’ );[/PHP]Reference:
http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts
Thanks
November 4, 2013 at 7:42 pm #1051Anonymous
GuestThanks! The first one worked perfectly. I inserted my category IDs where you have -2 and -6.
-
AuthorPosts
- You must be logged in to reply to this topic.