Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #527285

    Hello!
    My client want’s to have the previous and next portfolio links inside de page, like this image: http://giselabreu.com/next-previous.jpg
    Can you point me the away to do this, maybe with code block.
    Thanks.

    Gabreu

    #528009

    Hello,

    This would require some custom work, fortunately WordPress has built-in functions that could help you with this:
    http://codex.wordpress.org/Function_Reference/previous_post_link
    http://codex.wordpress.org/Function_Reference/next_post_link

    You could wrap them in a shortcode and then paste it on a Text Block or similar.

    Best regards,
    Josue

    #528026

    Hi Josue,
    Thank you for your answer.
    I don’t understand most of technical words, what do you mean by wrap a function in a shortcode?

    Thanks
    Gabreu

    #528031
    #528160

    Hi Josue!
    Yessss i did it! It’s working! It took a while because i do not have much experience with PHP, and my english is not so good, but i did it.
    I have to say thank you for this.

    I also have one task left to finish this site. I have already start a topic few days ago, but have no answer.
    I really appreciate your help again. Can we keep talking here or should i guide you to the topic?

    Best Regards,

    Gabreu

    #528191

    Glad to hear that, i’ll check your other topic.

    Best regards,
    Josue

    #528950

    Hi Josue, i’m sorry to bore you again with this issue.
    As i told you the previous and next post is working in the site, but now i have another relating issue.
    I need that it works only in the same category. I followed the codex.wordpress.org instructions but no results.
    So the code i have in functions.php is this, and as i told you is working:

    add_shortcode( ‘prev’, ‘prev_shortcode’ );
    add_shortcode( ‘next’, ‘next_shortcode’ );
    function next_shortcode($atts) {
    global $post;
    ob_start();
    next_post_link( ‘<div class=”nav-next”>%link</div>’, ‘Next project’ );
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
    }

    function prev_shortcode($atts) {
    global $post;
    ob_start();
    previous_post_link( ‘<div class=”nav-previous”>%link</div>’, ‘Previous project’ );
    $result = ob_get_contents();
    ob_end_clean();
    return $result;
    }

    Can you help again?
    Regards
    Gabreu

    #530479

    Have you tried passing true as the third parameter here?

    next_post_link( ‘<div class=”nav-next”>%link</div>’, ‘Next project’, true);
    

    Regards,
    Josue

    #530483

    Hey, i’ve tried that and the link disappears from portfolio page.
    Regards
    Gabreu

    #530818

    Hi!

    Make sure the portfolio items and its taxonomies are properly set, if the links disappear when you enable the in_same_term parameter then it means there is no other portfolio items within that category.

    Cheers!
    Josue

    #531408

    Hi!
    I did some research and tried to read and learn something to get this working, but i don’t know how to manage this.
    I have some portfolio projects with several categories that i set. I gave the portfolio projects is respective categories.
    They are working under the menus, if you get a look to the site you will see that.
    I really don’t know what else to do, i don’t have the knowlegde to resolve this, there must be something that i’m missing.

    I just want to say thanks for your help.

    Best Regards.

    Gabreu

    #532534

    Glad to hear that, let us know if you need further assistance.

    Best regards,
    Josue

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.