Permalinks problem – Category pages don’t work

enter image description here

I tried many different solutions to get category page for wordpress to work.
Here are my settings in wordpress.

I like to have structure “ of the post/” but when I want to go to individual category page I receive an error that it doesn’t exist.

If I change permalink structure from /%postname%/ to /%postname%/%category%/
everything works fine but the structure of the post is of the post/ and I don’t want that. doesn’t work if I keep the name of the post only. It works when I change it to /%postname%/%category%/

I tried to remove . in base category and it doesn’t make any difference.

These are my entries in function.php

function comment_reply_text( $link ) {
$link = str_replace( 'Reply', 'Odgovori', $link );
return $link;
add_filter( 'comment_reply_link', 'comment_reply_text' );
function catch_that_image() {
  global $post, $posts;
  $first_img = '';
  $output = preg_match_all('/<img.+src=['"]([^'"]+)['"].*>/i', $post->post_content, $matches);
  $first_img = $matches [1] [0];

  if(empty($first_img)){ //Defines a default image
    $first_img = "/images/default.jpg";
  return $first_img;
function wpsites_query( $query ) {
if ( $query->is_home() && $query->is_main_query() ) { 
$query->set( 'posts_per_page', 10 ); }
add_action( 'pre_get_posts', 'wpsites_query' );
function custom_excerpt($word_count_limit) {
    $content = wp_strip_all_tags(get_the_content() , true );
    echo wp_trim_words($content, $word_count_limit);
add_filter( 'term_link', function($termlink){ return str_replace('/./', '.', $termlink); }, 10, 1 );

Any ideas?

Read more here:: Permalinks problem – Category pages don’t work

Leave a Reply

Your email address will not be published. Required fields are marked *