Jump to content


Photo
- - - - -

Add PostNav to custom post template

PostNav custom post template

Best Answer Danny , 28 December 2012 - 11:13 AM

OK, I understand.

 

Basically, what you're going to need to do is create a child PostNav section. Simply download a fresh copy of PageLines Framework from your Launchpad, extract the zip and navigate to the sections folder. Then upload the PostNav section folder to your child themes sections folder. If you do not use a child theme, you will need to inorder to create a child section of PostNav.

 

Once you have completed the above, edit the section.php file for the child theme PostNav section, on the Workswith: add main

 

So that, the Workswith line looks like this:

 

Workswith: main-single, main

 

Save the changes to the files, upload the file and then go to PageLines > Store, now go back to Drag and Drop, select your custom post type template and the PostNav section should be visible.

No other changes are needed, as the section will automatically support navigation between your post type.

Go to the full post


This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1 vergilst

vergilst

    Advanced Member

  • Members
  • 33 posts

Posted 28 December 2012 - 09:48 AM

Is it possible to add PostNav to the Content Area of custom template?



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 17931 posts

Posted 28 December 2012 - 10:10 AM

Hi,

 

The Post Nav only works with posts and not the page templates. Therefore, it won't work as far as I know with custom page templates.

 

May I ask why you want this section on a page when it allows you to navigate between posts.



#3 vergilst

vergilst

    Advanced Member

  • Members
  • 33 posts

Posted 28 December 2012 - 10:26 AM

Hi

 

I started work on a 'dictionary' site, based on a third party plugin.

 

The entries in the dictionary are custom post types and I have a 'Dictionary' template in PL Teplate Setup area, but I can't add the PostNav section...

 

I need it to navigate between those custom posts :)

 

Thanks



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 17931 posts

Posted 28 December 2012 - 11:13 AM   Best Answer

OK, I understand.

 

Basically, what you're going to need to do is create a child PostNav section. Simply download a fresh copy of PageLines Framework from your Launchpad, extract the zip and navigate to the sections folder. Then upload the PostNav section folder to your child themes sections folder. If you do not use a child theme, you will need to inorder to create a child section of PostNav.

 

Once you have completed the above, edit the section.php file for the child theme PostNav section, on the Workswith: add main

 

So that, the Workswith line looks like this:

 

Workswith: main-single, main

 

Save the changes to the files, upload the file and then go to PageLines > Store, now go back to Drag and Drop, select your custom post type template and the PostNav section should be visible.

No other changes are needed, as the section will automatically support navigation between your post type.



#5 vergilst

vergilst

    Advanced Member

  • Members
  • 33 posts

Posted 28 December 2012 - 12:08 PM

Thanks, Danny

 

I uploaded the PostNav section in /pagelines-template-theme/sections/ (Base Theme is active), I can see it in Store - Sections - Child Theme, but I don't know how to use 'workswith'...



#6 Danny

Danny

    Is Awesome!

  • Moderators
  • 17931 posts

Posted 28 December 2012 - 12:15 PM

You need to go to the PostNav folder you uploaded to the child themes section folder. In the PostNav folder there will be a file called sections.php, open this file which you can do if you have configured your FTP client correctly.


Once the file is open you will see a Workswith: which should be on line 8, make the changes and then save the file, once the file is saved your FTP client should upload the file with the changes.

 

Once you have completed the above, you will be able to use the PostNav section on your Custom post type template.



#7 vergilst

vergilst

    Advanced Member

  • Members
  • 33 posts

Posted 28 December 2012 - 12:39 PM

Thanks for the help Danny! It's OK now!

 

Thanks again, and best wishes for the New Year :)



#8 Danny

Danny

    Is Awesome!

  • Moderators
  • 17931 posts

Posted 28 December 2012 - 01:05 PM

No problem, happy to help and all the best for the new year too!