WordPress.org

Ready to get started?Download WordPress

Forums

Next and Prev Post Problem and confing (11 posts)

  1. szakal161
    Member
    Posted 3 years ago #

    hello
    my Single post.php looks like :

    <script src="http://pastebin.com/embed_js.php?i=B3yv7VGn"></script>

    where and what I should change to have as a next post from same category and as a prev another post from same category.
    somehow I have been trying to play with that but I dont know nothin on PHP so I cant figure how to make it work ;/ I have been trying smart navigation plugin but somehow I got only errors;/
    Im using costum template made with artiser.
    plz help ;/

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

  3. szakal161
    Member
    Posted 3 years ago #

    yeah I read I have been trying to aply that like 3h but somehow I cant get it work right ;/
    http://wordpress.org/extend/plugins/smarter-navigation/

    But I prefer do not use it it is kinda old ;/

    I would like to do changes in my post.php that is more simpler but dont know how ;/

  4. szakal161
    Member
    Posted 3 years ago #

  5. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    change this:

    $prev_link = get_previous_post_link('&laquo; %link');
    $next_link = get_next_post_link('%link &raquo;');

    into this:

    $prev_link = get_previous_post_link('&laquo; %link','%title',true);
    $next_link = get_next_post_link('%link &raquo;','%title',true);

    that is assuming that the theme specific function get_previous_post_link('&laquo; %link') uses the parameters in the same way as the wordpress function previous_post_link('&laquo; %link')

    (untested)

  6. szakal161
    Member
    Posted 3 years ago #

    wow it works somehow ^^ nice ^^ ty ^^
    but there is only one little problem;/
    how to change ( Older Entries and
    Newer Entries) for Title of that post.?

    and I see that some strange pages are created like category/page2(that should be title of post)/
    any idea??

  7. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    how to change ( Older Entries and
    Newer Entries) for Title of that post.?

    and I see that some strange pages are created like category/page2(that should be title of post)/
    any idea??

    to me, this more an indicator that i did not work; i.e. that your theme is not prepared to have the links in the same category only.

  8. szakal161
    Member
    Posted 3 years ago #

    so it is my theme function ? http://pastebin.com/u6K6eH5B
    and do you could be able to change that few things what need to be changed if I will give you admin pass? cuzz Im totally lost ;/

  9. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    this is an edited version of functions.php:

    http://pastebin.com/gMVg4kfq

    before you change anything, make a full backup copy of your theme files

    the edited functions.php should hopefully work in connection with my earlier suggestion:

    $prev_link = get_previous_post_link('&laquo; %link','%title',true);
    $next_link = get_next_post_link('%link &raquo;','%title',true);
  10. szakal161
    Member
    Posted 3 years ago #

    Did not work ;/
    any way I did send U email with informations where U can log in to my www to see what is going on ^^
    ps I can leave link to ur site later on my site (my site is 3years old now) ^^

  11. szakal161
    Member
    Posted 3 years ago #

    ugh It did start to work in proper way ^^ Thx a lot ^^ I dont know if this was you or it was some of plugins with one I have been played BUT THX Alot ^^

Topic Closed

This topic has been closed to new replies.

About this Topic