WordPress.org

Ready to get started?Download WordPress

Forums

TPG Get Posts
[resolved] How to display "Previous and later" entries (8 posts)

  1. bensontheartist
    Member
    Posted 7 months ago #

    Hi! I would really appreciate some help with this plugin/code. I have put it on a static page (my starpage) and it works great showing the latest two post. But I would love tto have "buttons" below the two post with "Previous entries" on. Is this possible some how?

    Anna

    http://wordpress.org/plugins/tpg-get-posts/

  2. cswaim
    Member
    Plugin Author

    Posted 7 months ago #

    I think what you are looking for is pagination. That is supported in the extension. Look at this example and see if it does what you need.

  3. bensontheartist
    Member
    Posted 7 months ago #

    I really tried but unfortunately I seem not to get it work... I have this code in my content of the page. See below. I want 2 post to be shown (not all of it) and I want navigation below to display previous posts. I also have a space between the header. If you can help me get rid of that as well would be great... Here is my page http://annabenson.se.preview.binero.se/

    [tpg_get_posts posts_per_page=2 shorten_content="w600" more_link_text="Läs mer" field_classes="pagination=tpg-pagination-class navigation"]

    Anna

  4. cswaim
    Member
    Plugin Author

    Posted 7 months ago #

    Nice Site!

    The space above the header - I assume for the first post is the one showing the extra space. This is due to the css for h2 having a margin of margin: 1em 0; at line 2648 in the css file. You can override the h2 margin for the get_post entry by referencing the class and then h2

    .tpg-title-class h2 {margin: 0;}

    Not being familiar with your theme, you will need to determine where to place it to override the existing css. You can set up a custom css file as part of the get_post plugin (see doc on styling) if you are comfortable with putting new files on your server.

    For the pagination:
    Make sure the plugin and extension are current - version 3.1.0. Then make sure the ext is active on the settings tab for the plugin.

    Try the pagination without the field class option and see if it displays the pagination links. It it does then the next step is to apply the theme formatting - but we need to get the pagination showing first.

    This theme puts a lot of styles on the paging nav
    "pager page-nav-default fix previous previous-entries

    I would suggest starting with the last class and adding each after the pagination is showing.
    field_classes="pagination=tpg-pagination-class previous previous-entries"

    If the pagination does not appear, email me webmaster tpginc.net

  5. bensontheartist
    Member
    Posted 7 months ago #

    Your are fast! Thank u!

    I don't get the space above the header to disappear. Don't know why...?

    I use Pageline theme.

    And if you can see I got the pagination there now. Not as I would like since I want previous post to be shown not pages. And also I would like the "button" to look similar to the ones on my "real" blog page...

    My code now is [tpg_get_posts posts_per_page=2 shorten_content="w600" more_link_text="Läs mer" field_classes="pagination=tpg-pagination-class pager page-nav-default fix previous previous-entries]

    REALLY appreciate your help. Thank you!!

    Anna

  6. cswaim
    Member
    Plugin Author

    Posted 7 months ago #

    Anna:
    The plugin uses the standard WP pagination process, as I understand it. I will look at the pageline theme and see how they are generating the pagination links. It will take some time to do this but I should be able to give you an update at the end of the week.

    For the header spacing, if you use Firefox and have the Firebug extension installed, you can highlight the header and see the css that is generating the space. You can dynamically change the css setting and see how it alters the display.

    the code you added .tpg-title-class h2 {margin: 0;} is being overridden by the theme. change it to

    .tpg-title-class h2 {margin: 0 !important;} to stop any overriding of this css rule.

    I will update on the pagination later in the week.

    Criss

  7. bensontheartist
    Member
    Posted 7 months ago #

    Thank you Criss! U r my hero :)! I really appreciate.

    I managed to change the space between the header and the text. Looking much better! I don't know if you can see but on the second post the post starts just above the first post. Would it be possible to have some space there? Not necessary but would be great.

    One more question - I have the "Read More inline" plugin installed and I want the "Read more" - link to apply to that in your code. Which means if you want to read more you don't need to go to another page. It's like a popup where you are.

    The pagination would be so grateful since my visitors can navigate between the post (not the pages) would that.

    Looking forward to hear from u. Thanks again!

    Best,

    Anna

  8. cswaim
    Member
    Plugin Author

    Posted 7 months ago #

    I just released version 3.1.1 which addresses the next/previous link. You will need to apply the css style to the links. Look in the options for for the page_next option. Hope this is close to what you need.

    I don't know about the Read More Inline. At this release, the two plugins conflict and I don't have a clear solution at this time.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.