• Firstly, I have to say that I went through a million different threads on this matter, and tried some of the solutions but was unsuccessful.

    The website in question is www.cok.me/en

    Plugins are not a problem, as I deactivated them all and the problem persisted.
    It is, however, a problem in my custom theme, as a change to Twenty Fourteen does the trick just fine (navigation works). However, I would still like to fix the issue on my theme, as it worked very well before.

    index.php

    get_header(); ?>
    
    <div id="container">
    
    <?php headway_build_leafs(); ?>
    
     </div>
    
    <?php get_footer(); ?>

    functions.php

    <?php
    // THIS LINKS THE THUMBNAIL TO THE POST PERMALINK
    
    add_filter( 'post_thumbnail_html', 'my_post_image_html', 10, 3 );
    
    function my_post_image_html( $html, $post_id, $post_image_id ) {
    
    	$html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>';
    
    	return $html;
    }
    require_once TEMPLATEPATH.'/library/core/init.php';
    remove_action('wp_head', 'wp_generator');

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter GrimPG

    (@grimpg)

    May I also add that navigation on other pages (such as search http://www.cok.me/en?s=london ) works just as it should.

    It is only on the main page that navigation always redirects to first page, no matter what number is clicked.

    from my experience the pagination on the search can behave differently than with posts.

    do you have custom queries set up for your posts?
    are they set to paged?
    have you written a different pagination function in your functions file?

    Thread Starter GrimPG

    (@grimpg)

    Hello, Mr. Case, thank you for replying.

    I do not have any custom queries, nor could I find wp_query anywhere in the theme, as well as the term “paged”.

    Functions are as you see above, no custom pagination whatsoever.

    It seems that the new update broke the working pagination, but only on homepage, and I am still unable to fix it.

    those “terms” you searched would show up in the php files that write those pages. How did you search for them in your theme? I would recommend looking at the php file that writes the homepage. I am not familiar with your theme, but try ‘page.php’. I would also look in the functions file for any custom pagination functions.

    Thread Starter GrimPG

    (@grimpg)

    My theme is a modified Headway theme, so there aren’t many files at all. There is another plugin that adds additional stuff, but once I deactivated it the problem persiststed, so it has to be the theme itself.

    I just used ctrl+f on each line you gave me.
    As you can see, I’m very much a beginner, so any help is welcome.

    Thread Starter GrimPG

    (@grimpg)

    function cokcg_news()
    {
    	echo "<div class='footer_box'>";
    	echo "<h3>".__('Vijesti','hbcg')."</h3><ul>";
    	$wp_query = new WP_Query("post_status=published&posts_per_page=4&category_name=snovosti");
    	foreach ($wp_query->posts as $key=>$post){
    		$date = strtotime($post->post_date);
    		$date = date('d.m.y', $date);
    		echo "<li><div class='box-news'>";
    		echo "<a href='".$post->guid."'>".$post->post_title."</a><br/>";
    		echo "- <span>".$date."</span>";
    		echo "</div></li>";
    	}
    	echo "</ul></div>";
    }

    Perhaps this? I looked for “paged”, no results.

    there is no custom paged functions then. at least not in your functions file. i would bet there is something going on in whatever template file is writing your homepage.

    Thread Starter GrimPG

    (@grimpg)

    Ok, so this is what I identified as a problem.

    If I put the Front page to show Your latest posts, the navigation works fine.
    However, if I use A static page, navigation stops working.

    Screenshot

    Any suggestions?
    The reason I use a static page is because otherwise my mobile theme doesn’t show any posts. :/

    If you used a ‘static page’ as your home page you will have to pick what page that would be, i.e. a page you called ‘Home’. If your ‘Home’ page has a template that queries your blog posts, it would be very similar to ‘your latest posts’, but that query should be set to paged.

    what static page do you have set for your home page? on the edit screen for that page what template is it using? That information can be found in the ‘Page Attributes’ box on the right of the edit screen. If you can’t see that box make sure your screen options are set to show it.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Page navigation stopped working’ is closed to new replies.