- This topic has 22 replies, 2 voices, and was last updated 8 years, 4 months ago by Mahesh.
-
AuthorPosts
-
June 23, 2016 at 7:34 am #94100smoothiechodeParticipant
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.
June 23, 2016 at 11:42 am #94111MaheshParticipant@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,
MaheshJune 26, 2016 at 12:21 pm #94230smoothiechodeParticipantI’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?
`
June 27, 2016 at 5:24 pm #94289smoothiechodeParticipant?
June 28, 2016 at 9:51 am #94319MaheshParticipant@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, openinc/fullframe-core.php
and find the code in 606.
Let me know if any problem.Regards,
MaheshJune 30, 2016 at 5:57 am #94448smoothiechodeParticipantDashboard=> Appearance=> Customize=> Theme Options=> Pagination Options and Select Numeric in Pagination Type.
I’ve tried this. But doesn’t work.
June 30, 2016 at 9:55 am #94451MaheshParticipant@smoothiechode: Where actually do you want this in your site, I mean in which page, can you please specify with the url.
Regards,
MaheshJune 30, 2016 at 4:41 pm #94468smoothiechodeParticipantpage 1 of 7: http://tinderprofile.com/tinder-profile-101/
page 2 of 7: http://tinderprofile.com/taking-your-photos/
page 3 of 7: http://tinderprofile.com/types-of-pictures-to-include/
page 4 of 7: http://tinderprofile.com/retouching-your-pictures/
page 5 of 7: http://tinderprofile.com/what-to-write-in-your-about-me-section/
page 6 of 7: http://tinderprofile.com/tinder-facebook-instagram-privacy/
page 7 of 7: http://tinderprofile.com/resources/June 30, 2016 at 5:01 pm #94478MaheshParticipant@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,
MaheshJuly 1, 2016 at 4:09 pm #94556smoothiechodeParticipantFound 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?
July 1, 2016 at 4:30 pm #94562smoothiechodeParticipantIt’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(); ?>July 1, 2016 at 5:18 pm #94566MaheshParticipant@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,
MaheshJuly 2, 2016 at 4:10 am #94583smoothiechodeParticipantThanks 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.
July 3, 2016 at 10:08 am #94633MaheshParticipant@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,
MaheshJuly 7, 2016 at 3:18 am #94924smoothiechodeParticipantHi 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:
Instead I just want to display the same single header image for all product pages.
Kind regards.
July 7, 2016 at 10:33 am #94940MaheshParticipant@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 modifyheader.php
for this. Go to Dashboard=> Appearance=> Customize=> Header Image and select Entire Site/Pages and Posts/Excluding Homepage in Enable Featured Header Image onHope this helps.
Let me know if any problem.Regards,
MaheshJuly 7, 2016 at 1:13 pm #94945smoothiechodeParticipantSuch 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.
July 7, 2016 at 1:53 pm #94947MaheshParticipant@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,
MaheshJuly 7, 2016 at 2:51 pm #94949smoothiechodeParticipantNo, 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:
As you can see, the main product image is automatically being replicated in the header. How do I prevent this?
July 8, 2016 at 4:47 am #94979smoothiechodeParticipant<?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
-
AuthorPosts
- The topic ‘Next and Previous page navigation links at the top and bottom of each page’ is closed to new replies.