Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1400486
    cvdw
    Participant

    Hi,

    I found this code in a topic and copied it to the function.php of my child.

    add_action (‘the_content’, ‘add_next_post_item_link’ );

    function add_next_post_item_link ( $content ) {
    if ( is_singular(‘post’) ) {
    $next_name = “Next Post <i class=\”x-icon-chevron-right\”></i>”;
    $prev_name = “<i class=\”x-icon-chevron-left\”></i> Previous Post”;
    $next_link = get_next_post() ? ‘ID ) . ‘”>’ . $prev_name . ‘‘ : ”;
    $prev_link = get_previous_post() ? ‘ID ) . ‘”>’ . $next_name . ‘‘ : ”;
    $posts = ‘<div class=”wp-post-navigation-next”>’.$next_link.$prev_link.'</div>’;
    return $content . $posts;
    } else {
    return $content;
    }
    }

    It works but I only get the text previous – next, no arrows (icons) are visible.

    Is the link to the icon wrong or something?

    #1400604
    Rupok
    Member

    Hi there,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #1400670
    cvdw
    Participant
    #1400770
    Nabeel A
    Moderator

    Hi again,

    Thank you for providing the URL. Please add the following code in your Child Theme’s style.css file

    .x-icon-chevron-left:before {
        content: "\f053";
    }
    .x-icon-chevron-right:before {
        content: "\f054";
    }

    Let us know how this goes!

    #1401891
    cvdw
    Participant

    Thx! This works!
    “\f053” is the file of the icon? I know where the find the shortcodes but where can I find those f-codes for the future?

    #1402063
    Joao
    Moderator

    HI There,

    Please refer to :

    http://fontawesome.io/cheatsheet/

    Hope it helps

    Joao

  • <script> jQuery(function($){ $("#no-reply-1400486 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>