ergkranjan
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Customizr] Post navigation at top or just below postHi Friend,
It did the trick, but still the position is below the author details. Can I move it just below the post or you can say above the author detail.
Hey friend,
Can you please help on this topic also.
Forum: Themes and Templates
In reply to: [Customizr] Post navigation at top or just below postHi Team, Please help on this.
I am closing this topic as resolved.
Hi Friend, Sorry for this. After adding the above code, I am getting all custom posts in my archive lists also.
Thanks for your support.
I also added below line to show the count in month archive.
add_filter( ‘getarchives_where’, ‘custom_getarchives_where’ );
function custom_getarchives_where( $where ){
$where = str_replace( “post_type = ‘post'”, “post_type IN ( ‘post’, ‘post-type-mypost’ )”, $where );
return $where;
}Hi Friend,
Great support thanks. Its working fine now.You are hero of the day for me.
Just one more question related to this topic, can i also add the count of custom post in archive and get them in list of that month on clicking on the month name.
Hi Friend,
Thanks for your help. It was my bad. I have used Relavansi for search and I forgot to include my custom post type there.
But the archive problem is still there. Here is some more detail:
1. When i click on date link of custom post type, its giving me page not found error.
2. Custom post type is not displaying in author and month archive.
Please help me on these points.
In search result also, custom posts are not coming.
Displaying custom posts in archive is working but its also displaying all taxonomies and created pages with posts. Also search functionality is not working, even I have all set as you suggested.
<?php
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’, get_stylesheet_directory_uri() . ‘/style.css’, array(‘parent-style’)
);
}//Add search box
// As of 3.1.10, Customizr doesn’t output an html5 form.
add_theme_support( ‘html5’, array( ‘search-form’ ) );add_filter(‘wp_nav_menu_items’, ‘add_search_form_to_menu’, 10, 2);
function add_search_form_to_menu($items, $args) {// If this isn’t the main navbar menu, do nothing
if( !($args->theme_location == ‘main’) )
return $items;// On main menu: put styling around search and append it to the menu items
return $items . ‘<li class=”my-nav-menu-search”>’ . get_search_form(false) . ”;
}?>
After adding this line
add_filter(‘tc_include_cpt_in_archives’, ‘__return_true’);In archive, i am getting each and every thing for example, pages, categories addition etc.
I just want to add my custom post type, not pages.
Thanks.
I tried it but could not get any solution.
I am able to see my custom post in category and in tags (taxonomy allowed in custom post), but not able to see in archive and in search.Hi Friend,
Thanks for your prompt response.
I have a setting as you want but still i am not able to get mu custom posts in search result.
I also want to display my custom posts with regular posts in latest posts and in archive.Please help me on this.
Forum: Fixing WordPress
In reply to: Site being redirected to spam pages sometimes but bot alwaysGreat! Thanks for your action on this Mark.
Forum: Fixing WordPress
In reply to: Site being redirected to spam pages sometimes but bot alwaysHi Mark,
It was “Automatic Page Numbers – PageNavi” plugin. I don”t know why it behaved like that. But after uninstalling this plugin, its not directing to any spam page now.I also tried with reinstalling this plugin and it was again redirecting to some random spam pages shared in starting of the thread. I tried the several times and got the same behavior with this plugin.
Kindly look into this. This plugin is in store.