• Creator
    Topic
  • #8192

    Spiros Doikas
    Spectator
    Been thanked: 0 times

    I guess it would be a good idea to provide the possibility for custom styling for this. Perhaps apply in new version. For example:

    Find in Alora

    Code:
    <?php wp_link_pages(); ?>

    (in single/page/fullwidth.php and many others)

    Replace with:
    <?php wp_link_pages( array( ‘before’ => ‘<div class=”page-links”><span class=”page-links-title”>’ . __( ‘Pages:’, ‘alora’ ) . ‘</span>’, ‘after’ => ‘</div>’, ‘link_before’ => ‘<span>’, ‘link_after’ => ‘</span>’ ) ); ?>

    Add in css:

    Code:
    /* Page links */
    .page-links {
    clear: both;
    font-size: 16px;
    font-weight: normal;
    line-height: 2.2;
    margin: 20px 0;
    }

    .page-links a,
    .page-links > span {
    background: #fff;
    border: 1px solid #fff;
    padding: 5px 10px;
    text-decoration: none;
    }

    .format-status .entry-content .page-links a,
    .format-gallery .entry-content .page-links a,
    .format-chat .entry-content .page-links a,
    .format-quote .entry-content .page-links a,
    .page-links a {
    background: #e63f2a;
    border: 1px solid #e63f2a;
    color: #fff;
    }

    .format-gallery .entry-content .page-links a:hover,
    .format-audio .entry-content .page-links a:hover,
    .format-status .entry-content .page-links a:hover,
    .format-video .entry-content .page-links a:hover,
    .format-chat .entry-content .page-links a:hover,
    .format-quote .entry-content .page-links a:hover,
    .page-links a:hover {
    background: #fff;
    color: #e63f2a;
    }

    .format-status .entry-content .page-links > span,
    .format-quote .entry-content .page-links > span {
    background: none;
    }

    .page-links .page-links-title {
    background: transparent;
    border: none;
    margin-right: 20px;
    padding: 0;
    }

    See here too: http://theme4press.com/support/current-themes-group5/alora-forum27/localizing-pages-thread900/

Viewing 15 replies - 1 through 15 (of 15 total)
Replies
  • Roman
    Keymaster
    Post count: 2543
    Been thanked: 29 times
    #8764 |

    I can add those classes in the next theme release and the user can decide to modify it by a custom css

    Spiros Doikas
    Spectator
    Post count: 49
    Been thanked: 0 times
    #8765 |

    Yes, good idea. Perhaps slightly adapt the classes I gave you as they are not ideal for Alora.

    Spiros Doikas
    Spectator
    Post count: 49
    Been thanked: 0 times
    #8806 |

    In fact, could we have the same pagination style as in category?

    3wov.png

    I tried to implement myself, but the code is quite different.

    Roman
    Keymaster
    Post count: 2543
    Been thanked: 29 times
    #8809 |

    will try 🙂

    Spiros Doikas
    Spectator
    Post count: 49
    Been thanked: 0 times
    #8811 |

    I got to this:

    Code:
    <?php wp_link_pages(array(‘before’ => ‘<div class=”pagination”>’, ‘after’ => ‘</div>’, ‘link_before’ => ‘<span class=”current”><span class=”currenttext”>’, ‘link_after’ => ‘</span></span>’, ‘next_or_number’ => ‘next_and_number’, ‘nextpagelink’ => __(‘Next’,’alora’), ‘previouspagelink’ => __(‘Previous’,’alora’), ‘pagelink’ => ‘%’,’echo’ => 1 )); ?>

    But it only shows next and previous, no numbers and no <> symbols, grrr.

    Roman
    Keymaster
    Post count: 2543
    Been thanked: 29 times
    #8812 |

    I think it’s because you are using a text with a domain.. __(‘Next’,’alora’) ….try to use only ‘Next’ . same for the previous link

    Spiros Doikas
    Spectator
    Post count: 49
    Been thanked: 0 times
    #8813 |

    No, the effect of adding the ‘alora’ bit is to ensure that localization works. When I removed it I had same results, only that they were in English.

    Roman
    Keymaster
    Post count: 2543
    Been thanked: 29 times
    #8815 |

    you have only two choices to get it to work. with numbers only:

    Code:
    <?php wp_link_pages( array(
    ‘before’ => ‘<div class=”pagination”>’ . __( ‘Pages:’ , ‘alora’ ),
    ‘after’ => ‘</div>’,
    ‘link_before’ => ‘<span class=”current”>’,
    ‘link_after’ => ‘</span>’,
    ‘next_or_number’ => ‘number,
    ‘separator’ => ‘ ‘,
    ‘nextpagelink’ => __( ‘Next <i class=”fa fa-angle-right”></i>’ , ‘alora’ ),
    ‘previouspagelink’ => __( ‘<i class=”fa fa-angle-left”></i> Previous’ , ‘alora’ ),
    ‘pagelink’ => ‘%’,
    ‘echo’ => 1
    )); ?>

    or only with previous/next link:

    Code:
    <?php wp_link_pages( array(
    ‘before’ => ‘<div class=”pagination”>’ . __( ‘Pages:’ , ‘alora’ ),
    ‘after’ => ‘</div>’,
    ‘link_before’ => ‘<span class=”current”>’,
    ‘link_after’ => ‘</span>’,
    ‘next_or_number’ => ‘next’,
    ‘separator’ => ‘ ‘,
    ‘nextpagelink’ => __( ‘Next <i class=”fa fa-angle-right”></i>’ , ‘alora’ ),
    ‘previouspagelink’ => __( ‘<i class=”fa fa-angle-left”></i> Previous’ , ‘alora’ ),
    ‘pagelink’ => ‘%’,
    ‘echo’ => 1
    )); ?>
    Spiros Doikas
    Spectator
    Post count: 49
    Been thanked: 0 times
    #8817 |

    This line

    Code:
    ‘next_or_number’ => ‘number,

    was missing an apostrophe:

    Code:
    ‘next_or_number’ => ‘number’,

    The problem with this style though is that it does not indicate on which page one is (different style for current page) as it is done in category pagination.

    And if you check around on other themes, it is implemented just fine with number + Previous/Next.

    For example: http://demo.mythemeshop.com/clock/awesome-post-with-everything-with-it/2/

    (in fact the latest code I quoted was from that theme)

    Roman
    Keymaster
    Post count: 2543
    Been thanked: 29 times
    #8819 |

    I will add this feature in the next theme release…will be using this hack http://www.velvetblues.com/web-development-blog/wordpress-number-next-previous-links-wp_link_pages/

    Spiros Doikas
    Spectator
    Post count: 49
    Been thanked: 0 times
    #8823 |

    Seems to work for me, but the last bit of code needs css (as well as the theme declarations for localization purposes), otherwise it looks bad. For example when using:

    Code:
    <?php wp_link_pages(array(‘before’ => ‘<div class=”pagination”>’, ‘after’ => ‘</div>’, ‘link_before’ => ‘<span class=”current”><span class=”currenttext”>’, ‘link_after’ => ‘</span></span>’, ‘next_or_number’ => ‘next_and_number’, ‘nextpagelink’ => __(‘Next’,’alora’), ‘previouspagelink’ => __(‘Previous’,’alora’), ‘pagelink’ => ‘%’,’echo’ => 1 )); ?>

    It looks pretty decent http://www.siderman.gr/triferos-kopilatis/3/

    The only issue still remaining is the different style needed for the active page.

    Roman
    Keymaster
    Post count: 2543
    Been thanked: 29 times
    #8824 |

    I have already implemented it in the next theme release.

    Spiros Doikas
    Spectator
    Post count: 49
    Been thanked: 0 times
    #8825 |

    Cool. I think maybe you should also have the standard link in color for post titles, as now it is black and people cannot see that it is a link. And you can make the hover colour as black like the buttons for example or a lighter shade of the specific style colour.

    Spiros Doikas
    Spectator
    Post count: 49
    Been thanked: 0 times
    #8827 |

    Another issue:
    http://www.siderman.gr/architecture-and-fantasy/

    If there are too many subpages, then display just the first and last 3-5 or so.

    Roman
    Keymaster
    Post count: 2543
    Been thanked: 29 times
    #8842 |

    will try to fix that too

Viewing 15 replies - 1 through 15 (of 15 total)
You must be logged in to reply to this topic.