Wp Navi not working?

  • raindance

    #1928

    Hi

    I’m still wrestling with page navigation for pages (not posts).

    I’ve installed and activated WP Navi but no navigation buttons show up on anything.

    I want to have navigation specifically for say ten page articles. Where the parent page is page one (and not linked to anything else at it’s level) and want it to be linked to the ten subpages in the article.

    Ia WP Navi the way to do this? I thought maybe the Ambrose next/previous but I haven’t been able to get it to work either as it’s requiring installation on child loop-single. which then makes it show up on posts too.

    I really need some page navigation help if anyone can help.

    Thanks

    raindance

    #17867

    It occurs to me that we hid the standard nav so that I could use the Ambroseite next/previous plug in for nav in posts. Could that be why PageNavi isn’t showing up for pages?

    My functions file is like this:

    <?php
    function graphene_slider_post_types(){
    return array('post', 'page');
    }
    add_filter( 'graphene_slider_post_type', 'graphene_slider_post_types' );
    // attaches the function my_post_nav to the hook graphene_post_nav
    add_action ('graphene_after_post_content', 'my_post_nav');
    // our function

    function my_post_nav(){
    // this will allow us to use other hooks but still only show on single posts
    if ( is_single() && ! is_page() ) : ?>
    <div id="my-post-nav"> <!-- div to contain your links -->
    <?php previous_post_link_plus( array(
    'order_by' => 'menu_order',
    'loop' => false,
    'max_length' => 0,
    'tooltip' => 'Previous page',
    'in_same_cat' => true,
    'ex_cats' => '12'
    ) );?> |
    <?php next_post_link_plus( array(
    'order_by' => 'menu_order',
    'loop' => false,
    'max_length' => 0,
    'tooltip' => 'Next page',
    'in_same_cat' => true,
    'ex_cats' => '12'
    ) );?>
    </div>
    <?php endif;
    }

    /******
    * these next two remove the graphene breadcrumb and then add one
    * which does not appear on the home page
    *****/

    // has to be called after the action is added
    add_action ('after_setup_theme', 'wmrt_remove_graphene_bc');

    function wmrt_remove_graphene_bc() {
    remove_action ('graphene_top_content', 'graphene_breadcrumb_navxt');
    }
    add_action('graphene_top_content', 'wmrt_breadcrumb_navxt');

    function wmrt_breadcrumb_navxt () {
    //by calling this at this point is_home() works!
    if ((function_exists('bcn_display')) && (!(is_front_page()))) {
    echo '<div class="breadcrumb">';
    bcn_display();
    echo '</div>';
    }
    }

    function graphene_filter_gettext( $translated, $original, $domain ) {
    $strings = array(
    'View full post' => 'Read More',
    );
    if ( ! empty( $strings[$original] ) ) {
    $translations = &get_translations_for_domain( $domain );
    $translated = $translations->translate( $strings[$original] );
    }
    return $translated;
    }
    add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
    function laura_sharethis (){
    ?>
    <div id="sharethis"><span class='st_facebook_hcount' displayText='Facebook'></span><span class='st_twitter_hcount' displayText='Tweet'></span><span class='st_plusone_hcount'></span><span class='st_fblike_hcount'></span></div>
    <?php
    }
    add_action( 'graphene_after_post_content', 'laura_sharethis' );

    I really need to get some kind of navigation happening for pages and nothing seems to be working.

    Any help?

    Anonymous

    #17868

    It looks like this function is removing your default navigation and replacing it with your custom one.

    function wmrt_remove_graphene_bc() {
    remove_action ('graphene_top_content', 'graphene_breadcrumb_navxt');
    }
    add_action('graphene_top_content', 'wmrt_breadcrumb_navxt');

    Anonymous

    #17869

    Okay, do you remember enough to UNDO everything you’ve done with this plugin, and let’s start from scratch?

    Anonymous

    #17870

    Picking up from your email…

    Isn’t there two different plugins from Ambrosite? One specifically for posts, and one specifically for pages?

    raindance

    #17871

    Correct, I’ve got them both activated and somewhat working but the pages ones are showing up on the posts, and, I haven’t been able to make them stick to their own parent.

    raindance

    #17872

    Josh-

    this is the thread where we tweaked it into place as it is…

    I’m going to undo it all I guess and try to start over?

    Surely I can use both the ambrosesite post and page plugins at the same time.

    Doesn’t seem like it should be hard I just don’t know what I’m doing.

    raindance

    #17873

    I’ve given up on it.

    I’m not going to use posts.

    I will just use pages and break them up with the nextpage tag, and use either Easy Paginator or Multi Page Toolkit.

    Even after removing all ambrosesite code from functions and css, I still can’t get WP Page Navi to work. No idea why.

    I can’t stay stuck on how to paginate something anymore, it’s making me too frustrated. Onward.

    Thanks for all the help Josh. I really appreciate it.

    Anonymous

    #17874

    You are more than welcome. Don’t get discouraged 🙂

    Take a break and focus on some other areas which need improvement. When you come back to it, you might realize that it’s not what you originally wanted in the first place.

    However, if you want to get this working properly, I’ll be happy to stick with you and get it implemented correctly.

    Just let me know.

    Note: I do think one problem you were having with all this, is you were trying to experiment with more than one navigation item at a time, without getting them fully functional.

    A word to the wise…. when experimenting with plugins. Only download one at a time, fully experiment with it until you decide it will NOT do what you need it to. Then completely remove the plugin and any associated code you inserted elsewhere. Now, move on to another related plugin.

    When you try to add two or three at a time, and none of them are working as expected, and then you go in a try to tweak, AHHHHHHH… you’re asking for a headache.

    One plugin at a time 🙂

    Anonymous

    #17875

    Post a copy of your child functions and style files. And we’ll try to get your WP Page Navi set up properly.

Viewing 10 posts - 1 through 10 (of 41 total)

  • You must be logged in to reply to this topic.