Viewing 20 posts - 1 through 20 (of 23 total)
  • Author
    Posts
  • #94100
    smoothiechode
    Participant

    Having problems adding simple next> and <previous links to the top and bottom of the pages on my site.

    Tried various plugins but no luck. I feel like maybe there’s something in the settings for the theme that’s stopping the plugins from the working.

    Site URL: http://www.TinderProfile.com

    Thanks in advance.

    #94111
    Mahesh
    Participant

    @smoothiechode: Do you mean the navigation links for Posts or Pages? If you mean it for posts, WordPress comes up with a built in functionality. Go to Dashboard=> Appearance=> Menu and check Automatically add new top-level pages to this menu option in Menu Settings.
    Which plugin are you using? Is it working on WordPress core themes (Twenty Fourteen)?

    Regards,
    Mahesh

    #94230
    smoothiechode
    Participant

    I’m using the WP-PageNavi plugin.

    I need to find calls to next_posts_link() and previous_posts_link() in the code and replace them with the following code:

    <?php wp_pagenavi(); ?>

    Could you direct me to exactly where the lines in the theme code for calls to next_posts_link() and previous_posts_link() are so I can replace them?

    `

    #94289
    smoothiechode
    Participant

    ?

    #94319
    Mahesh
    Participant

    @smoothiechode: This is already built-in in the theme. But you’ll need to change some settings in Customizer. Go to Dashboard=> Appearance=> Customize=> Theme Options=> Pagination Options and Select Numeric in Pagination Type
    If you do want to check for code, open inc/fullframe-core.php and find the code in 606.
    Let me know if any problem.

    Regards,
    Mahesh

    #94448
    smoothiechode
    Participant

    Dashboard=> Appearance=> Customize=> Theme Options=> Pagination Options and Select Numeric in Pagination Type.

    I’ve tried this. But doesn’t work.

    #94451
    Mahesh
    Participant

    @smoothiechode: Where actually do you want this in your site, I mean in which page, can you please specify with the url.

    Regards,
    Mahesh

    #94468
    smoothiechode
    Participant
    #94478
    Mahesh
    Participant

    @smoothiechode: I do understand what you mean, but since this is the page and not post, the navigation here won’t work. It only works on post single pages or the list page. You’ll need to customize the code to make it work for the pages. I recommend you to hire a customizer.

    Regards,
    Mahesh

    #94556
    smoothiechode
    Participant

    Found this plugin that works specifically for pages instead of posts:

    https://wordpress.org/plugins/next-page-not-next-post/

    But can’t get it to work. Is it possible to use this plugin with your theme? If so, how?

    #94562
    smoothiechode
    Participant

    It’s telling me to add the following code but not sure where it goes in this theme:

    <?php echo next_page_not_post(); ?>
    <?php echo previous_page_not_post(); ?>

    #94566
    Mahesh
    Participant

    @smoothiechode: For this you’ll need to create a child theme. You can find more on creating child theme HERE. Then in you child theme folder create page.php file and copy the codes below into it.

    <?php
    /**
     * The template for displaying all pages
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package Catch Themes
     * @subpackage Full Frame
     * @since Full Frame 1.0
     */
    
    get_header(); ?>
    
    	<main id="main" class="site-main" role="main">
    
    		<?php while ( have_posts() ) : the_post(); ?>
    			<?php fullframe_post_navigation(); ?>
    			<?php get_template_part( 'content', 'page' ); ?>
    			<?php fullframe_post_navigation(); ?>
    			<?php
    				/**
    				 * fullframe_comment_section hook
    				 *
    				 * @hooked fullframe_get_comment_section - 10
    				 */
    				do_action( 'fullframe_comment_section' );
    			?>
    
    		<?php endwhile; // end of the loop. ?>
    
    	</main><!-- #main -->
    
    <?php get_sidebar(); ?>
    <?php get_footer();

    This will put navigation links below and above the content for pages.

    Note: If you want to use navigation only above or only below then remove the code as necessary.
    Line 20 is for above navigation links.
    Line 22 is for below navigation links.

    Hope this helps.

    Regards,
    Mahesh

    #94583
    smoothiechode
    Participant

    Thanks very much for the info.

    I have added a child theme folder in the directory entitled ‘full-frame-child’ and added to this folder the following files:

    1. file name = style.css

    /*
    Theme Name: Full Frame Child Theme
    Theme URI: https://catchthemes.com/themes/full-frame/
    Author: Full Frame Team
    Author URI: http://catchthemes.com
    Description: Full Frame is a free theme created by Catch Themes
    Version: 1.0
    License: GNU General Public License, version 3 (GPLv3)
    License URI: http://www.gnu.org/licenses/gpl-3.0.txt
    Tags: dark, light, blue, white, black, gray, one-column, two-columns, left-sidebar, right-sidebar, fixed-layout, fluid-layout, responsive-layout, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-image-header, featured-images, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
    Text Domain: fullframe
    Template: full-frame
    */
      
    /* =Child Theme Custom CSS
    -------------------------------------------------------------- */

    2. file name = functions.php

    <?php
    /**
     * Child Theme functions and definitions
     *
     */
     /**
     * Loading Parent theme stylesheet
     *
     */
    add_action( 'wp_enqueue_scripts', 'catchbox_child_enqueue_styles' );
    function catchbox_child_enqueue_styles() {
        wp_enqueue_style( 'catchbox-parent-style', get_template_directory_uri() . '/style.css' );
    }
    

    3. file name = page.php

    <?php
    /**
     * The template for displaying all pages
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package Catch Themes
     * @subpackage Full Frame
     * @since Full Frame 1.0
     */
    
    get_header(); ?>
    
    	<main id="main" class="site-main" role="main">
    
    		<?php while ( have_posts() ) : the_post(); ?>
    			<?php fullframe_post_navigation(); ?>
    			<?php get_template_part( 'content', 'page' ); ?>
    			<?php fullframe_post_navigation(); ?>
    			<?php
    				/**
    				 * fullframe_comment_section hook
    				 *
    				 * @hooked fullframe_get_comment_section - 10
    				 */
    				do_action( 'fullframe_comment_section' );
    			?>
    
    		<?php endwhile; // end of the loop. ?>
    
    	</main><!-- #main -->
    
    <?php get_sidebar(); ?>
    <?php get_footer();
    

    I have activated the child theme and can see the page navigation that I wanted has been added. The pages are in the wrong order but nevertheless it looks good.

    My question to you Mahesh is this… Am I supposed to just stay on the child theme now and just manually change the settings back so they are the same as the parent theme? While the page navigation is now there, i’ve lost all the settings I set for the parent theme such as the featured content, header images and everything else.

    OR

    Is there a way to go back to working on the parent theme and simply just add the page navigation from the child theme to the parent theme? I presume this was the purpose of adding the child theme in the first place, but i’d be grateful if you could help me execute this final step.

    Thanks again.

    #94633
    Mahesh
    Participant

    @smoothiechode: Glad to know you’ve got the navigation working. Yes, you’ll need to set the setting for the child theme. The purpose of child theme is to customize the theme and preserve the customization even after theme updates. Because if you customize the core theme, then you’ll lost all the customization after every update.
    Hope this helps. Let me know if any problem.

    Regards,
    Mahesh

    #94924
    smoothiechode
    Participant

    Hi Mahesh.

    Thanks for the clarification.

    I just upgraded to full frame pro and so will need to create another child theme so that this page nav will be in my new premium child theme.

    My question is:

    How will the code for the page.php file in the premium child theme be different compared to the the full frame child theme page.php you sent me earlier in the thread?

    I am also looking to add a header.php file to my new full frame pro child theme that will prevent the product pages from displaying the product image as the header image, like in this page:

    http://tinderprofile.com/product/canon-eos-rebel-t5-digital-slr-camera-kit-with-ef-s-18-55mm-is-ii-lens/

    Instead I just want to display the same single header image for all product pages.

    Kind regards.

    #94940
    Mahesh
    Participant

    @smoothiechode: Thank you for using Full Frame Pro. page.php file that I’ve provided you earlier will work fine in the Pro theme too.
    Instead I just want to display the same single header image for all product pages.
    If so, you don’t have to modify header.php for this. Go to Dashboard=> Appearance=> Customize=> Header Image and select Entire Site/Pages and Posts/Excluding Homepage in Enable Featured Header Image on

    Hope this helps.
    Let me know if any problem.

    Regards,
    Mahesh

    #94945
    smoothiechode
    Participant

    Such an option does not exist.

    Do you mean: Entire Site, Page/Post Featured Image

    If so, the product pages are still displaying the product image as the header image so doesn’t work.

    #94947
    Mahesh
    Participant

    @smoothiechode: You mean to display the same header image throughout the site right? If so, select options without Featured Image and it will display the same header image in all you pages.
    Let me know if any problem.

    Regards,
    Mahesh

    #94949
    smoothiechode
    Participant

    No, not the same header throughout the site.

    For pages containing woocommerce products, it is currently automatically displaying the ‘product image’ as the header image, which i do not want as the product is already displayed on the page. For example:

    http://tinderprofile.com/product/canon-eos-rebel-t5-digital-slr-camera-kit-with-ef-s-18-55mm-is-ii-lens/

    As you can see, the main product image is automatically being replicated in the header. How do I prevent this?

    #94979
    smoothiechode
    Participant
    <?php
    /**
     * The template for displaying all pages
     *
     * This is the template that displays all pages by default.
     * Please note that this is the WordPress construct of pages
     * and that other 'pages' on your WordPress site will use a
     * different template.
     *
     * @package Catch Themes
     * @subpackage Full Frame
     * @since Full Frame 1.0
     */
    
    get_header(); ?>
    
    	<main id="main" class="site-main" role="main">
    
    		<?php while ( have_posts() ) : the_post(); ?>
    			<?php fullframe_post_navigation(); ?>
    			<?php get_template_part( 'content', 'page' ); ?>
    			<?php fullframe_post_navigation(); ?>
    			<?php
    				/**
    				 * fullframe_comment_section hook
    				 *
    				 * @hooked fullframe_get_comment_section - 10
    				 */
    				do_action( 'fullframe_comment_section' );
    			?>
    
    		<?php endwhile; // end of the loop. ?>
    
    	</main><!-- #main -->
    
    <?php get_sidebar(); ?>
    <?php get_footer();

    Also, how can I edit this page.php file so that the resulting previous and next page links correspond to the order numbers assigned to each page in the Pages section of the backend (Pages >> Quick Edit >> Order). At the moment the pages are in completely the wrong order.

    Kind regards

Viewing 20 posts - 1 through 20 (of 23 total)
  • The topic ‘Next and Previous page navigation links at the top and bottom of each page’ is closed to new replies.