After updating the plugin from 2.65 to 2.70 the postbar() function which is suggested to use for manual call now giving error as the function does not exist in the latest version, do suggest a solution for this.
]]>Hi,
how can I make the plugin multilingual?
This old example does not work.
if (function_exists('wp_pagebar')) {
wp_pagebar(array('before'=>'SEITEN', 'tooltip_text'=>'Seite', 'next'=>'>', 'prev'=>'<'));
For example, how do I translate the word “page”, “previous” or the tooltip-text which is entered in the backend mask?
Thanks
]]>My name’s Antonio and I’m one of the developers of Nelio Content. Recently, we identified that your plugin is breaking the UI of ours.
Please avoid overwriting jquery-ui.css
script. Check your plugin (line 191, pagebar_options.php
) where you include the script directly from https://ajax.googleapis.com
. You should only enqueue that script on the pages you need it. Right now you’re enqueueing the script everywhere, which breaks WordPress’ default styles (and ours).
The Plugin Handbook states the following:
The admin_enqueue_scripts hook passes the current page filename to your callback. Use this information to only enqueue your script on pages where it is needed. The front-end version does not pass anything. In that case, use template tags such as is_home(), is_single(), etc. to ensure that you only enqueue your script where it is needed.
For more information about a similar issue we found with another plugin and the proposed solution please read this.
]]>as I said in the thread title: Seems not to work with author pages
]]>The automatic option works fine but it also inserts a navigation after my recent posts widget, see screenshot please: https://screencast.com/t/nzX5UaFNsw5b
Otherwise all good. Do you think this is a fault of my widget or of this plugin?
]]>Hi,
just curious if you could take a look at this?
The author uses load_textdomain instead load_plugin_textdomain function. This may change the behavior of WordPress, because some filters and actions now no longer be executed. Please contact the author.
Also, is the plugin still compatible with the latest WP version?
]]>Message from Scripting Guard:
Compatibility
The author uses load_textdomain instead load_plugin_textdomain function. This may change the behavior of WordPress, because some filters and actions now no longer be executed. Please contact the author.
I hope you understanding what I’m trying to tell, my english is not the best ^^
]]>Fatal error: Class ‘FB’ not found in /home/domain.com/tgt/wp-content/plugins/pagebar/activate.php on line 6
]]>get
Fatal error: Class ‘FB’ not found in /home/dbaker/public_html/wp-content/plugins/pagebar/activate.php on line 6
upon activation
]]>I use this code in my functions.php to create a meta box where I can enter custom CSS for each post separately. If I uncomment the line below pagebar shows the pagebar twice. Any idea where the problem lies?
//Custom CSS Widget
add_action('admin_menu', 'custom_css_hooks');
add_action('save_post', 'save_custom_css');
//add_action('wp_head','insert_custom_css');
//custom CSS Widget
function custom_css_hooks() {
add_meta_box('custom_css', 'Custom CSS', 'custom_css_input', 'post', 'normal', 'high');
add_meta_box('custom_css', 'Custom CSS', 'custom_css_input', 'page', 'normal', 'high');
}
function custom_css_input() {
global $post;
echo '<input type="hidden" name="custom_css_noncename" id="custom_css_noncename" value="'.wp_create_nonce('custom-css').'" />';
echo '<textarea name="custom_css" id="custom_css" rows="5" cols="30" style="width:100%;">'.get_post_meta($post->ID,'_custom_css',true).'</textarea>';
}
function save_custom_css($post_id) {
if (!wp_verify_nonce($_POST['custom_css_noncename'], 'custom-css')) return $post_id;
if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return $post_id;
$custom_css = $_POST['custom_css'];
update_post_meta($post_id, '_custom_css', $custom_css);
}
function insert_custom_css() {
if (is_home() || is_page() || is_single()) {
if (have_posts()) : while (have_posts()) : the_post();
echo '<style type="text/css">'.get_post_meta(get_the_ID(), '_custom_css', true).'</style>';
endwhile; endif;
rewind_posts();
}
}
]]>
I’m using Coraline theme and on the index.php, it’s calling for loop.php and the code for navigation is this one below
<?php /* Display navigation to next/previous pages when applicable */ ?>
<?php if ( $wp_query->max_num_pages > 1 ) : ?>
<div id="nav-below" class="navigation">
<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', 'coraline' ) ); ?></div>
<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', 'coraline' ) ); ?></div>
</div><!-- #nav-below -->
<?php endif; ?>
How do I edit it for pagebar? What do I have to change? Thanks in advance!
]]>I only see the general options, but I want to set options for multipage posts…
something wrong? only empty page for the 2nd and the 3rd configuration
]]>to show the “all pages link”
i replaced in class-basebar.php line 204
echo '</div>';
with
$this->div_end();
otherwise the function allPagesLink()
for the multibar wouldn’t called.
also i deleted class="ui-tabs-hide"
in pagebar_options.php lines 236 and 242 (divs) to see all three tabs. the multibar and commentbar tabs were always hidden.
Hi.
Is there an option to add pagination with Pagebar to single post site -> single.php?
I added postbar();
, but it doesn’t work.
Hello,
have installed the theme “German Newspaper”. Since I have a lot of comments per page, I want to integrate the plugin in the comments.php. Tried it but it does not work. This is my comments.php where should I insert the CodeSnippet:
<?php
// Do not delete these lines
if ( isset($_SERVER[‘SCRIPT_FILENAME’]) && ‘comments.php’ == basename($_SERVER[‘SCRIPT_FILENAME’]) )
die (‘Please do not load this page directly. Thanks!’);
if ( !empty($post->post_password) )
{ // if there’s a password
if ( $_COOKIE[‘wp-postpass_’ . COOKIEHASH] != $post->post_password )
{ // and it doesn’t match the cookie
echo ‘ <p class=”nocomments”>’ . __(‘This post is password protected. Enter the password to view comments.’, ‘german_newspaper’) . ‘</p>’ . “\n”;
return;
}
}
/* This variable is for alternating comment background */
$oddcomment = ‘class=”alt” ‘;
// <!– You can start editing here. –>
if ( $comments )
{
echo ‘ <h3 id=”comments”>’;
comments_number(__(‘No Responses’, ‘german_newspaper’), __(‘One Response’, ‘german_newspaper’), __(‘% Responses’, ‘german_newspaper’));
echo ‘ ‘;
printf(__(‘to “%s”’, ‘german_newspaper’), the_title(”, ”, false));
echo ‘ </h3>’ . “\n\n”;
echo ‘ <ol class=”commentlist”>’ . “\n”;
foreach ( $comments as $comment )
{
echo ‘ <li ‘ . $oddcomment . ‘id=”comment-‘ . get_comment_ID() . ‘”>’ . get_avatar( $comment, 32 ) . “\n”;
printf(__(‘<cite>%s</cite> Says:’, ‘german_newspaper’), get_comment_author_link());
if ( $comment->comment_approved == ‘0’ )
{
echo ‘ ‘ . __(‘Your comment is awaiting moderation.’, ‘german_newspaper’) . ‘‘ . “\n”;
}
echo ‘
‘ . “\n”;
echo ‘ <small class=”commentmetadata”>‘;
printf(__(‘%1$s at %2$s’, ‘german_newspaper’), get_comment_date(__(‘F jS, Y’, ‘german_newspaper’)), get_comment_time());
echo ‘ ‘;
edit_comment_link(__(‘edit’, ‘german_newspaper’),’ ‘,”);
echo ‘</small>’ . “\n\n\n”;
comment_text();
echo “\n\n\n” . ‘ ‘ . “\n”;
/* Changes every other comment to a different class */
$oddcomment = ( empty( $oddcomment ) ) ? ‘class=”alt” ‘ : ”;
}
echo ” . “\n\n”;
}
else
{
// this is displayed if there are no comments so far
if ( ‘open’ == $post->comment_status )
{
// <!– If comments are open, but there are no comments. –>
}
else
{
// comments are closed
// <!– If comments are closed. –>
echo ‘ <p class=”nocomments”>’ . __(‘Comments are closed.’, ‘german_newspaper’) . ‘</p>’ . “\n”;
}
}
if ( ‘open’ == $post->comment_status )
{
echo ‘ <h3 id=”respond”>’ . __(‘Leave a Reply’, ‘german_newspaper’) . ‘</h3>’ . “\n”;
if ( get_option(‘comment_registration’) && !$user_ID )
{
echo ‘ <p>’;
printf(__(‘You must be logged in to post a comment.’, ‘german_newspaper’), get_option(‘siteurl’) . ‘/wp-login.php?redirect_to=’ . urlencode(get_permalink()));
echo ‘ </p>’ . “\n”;
}
else
{
echo ‘ <form action=”‘ . get_option(‘siteurl’) . ‘/wp-comments-post.php” method=”post” id=”commentform”>’ . “\n”;
if ( $user_ID )
{
echo ‘ <p>’;
printf(__(‘Logged in as %2$s.’, ‘german_newspaper’), get_option(‘siteurl’) . ‘/wp-admin/profile.php’, $user_identity);
echo ‘ ‘ . __(‘Log out »’, ‘german_newspaper’) . ‘</p>’ . “\n”;
}
else
{
echo ‘<p><input type=”text” name=”author” id=”author” value=”‘ . $comment_author . ‘” size=”22″ tabindex=”1″ />’ . “\n”;
echo ‘<label for=”author”><small>’ . __(‘Name’, ‘german_newspaper’) . ‘ ‘;
if ( $req ) _e(“(required)”, “german_newspaper”);
echo ‘</small></label></p>’ . “\n”;
echo ‘<p><input type=”text” name=”email” id=”email” value=”‘ . $comment_author_email . ‘” size=”22″ tabindex=”2″ />’ . “\n”;
echo ‘<label for=”email”><small>’ . __(‘Mail (will not be published)’, ‘german_newspaper’) . ‘ ‘;
if ($req) _e(“(required)”, “german_newspaper”);
echo ‘</small></label></p>’ . “\n”;
echo ‘<p><input type=”text” name=”url” id=”url” value=”‘ . $comment_author_url . ‘” size=”22″ tabindex=”3″ />’ . “\n”;
echo ‘<label for=”url”><small>’ . __(‘Website’, ‘german_newspaper’) . ‘</small></label></p>’ . “\n”;
}
echo ‘<!–<p><small>’;
printf(__(‘XHTML: You can use these tags: %s
‘, ‘german_newspaper’), allowed_tags());
echo ‘</small></p>–>’ . “\n”;
echo ‘<p><textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″></textarea></p>’ . “\n”;
echo ‘<p><input name=”submit” type=”submit” id=”comment_submit” tabindex=”5″ value=”‘ . __(‘Submit Comment’, ‘german_newspaper’) . ‘” />’ . “\n”;
echo ‘<input type=”hidden” name=”comment_post_ID” value=”‘ . $id . ‘” />’ . “\n”;
echo ‘</p>’ . “\n”;
do_action(‘comment_form’, $post->ID);
echo ‘</form>’ . “\n\n”;
}
// If registration required and not logged in
}
?>
Thanks for your help!!
]]>Hello,
I’m using pagebar2 2.60.1 and gantry template and have a strange issue.
The total page which is displayed within pagebar is not the right one but correspond to the number of posts!
For exemple, I have currently 19 posts and with 5 posts per page, I should have 4 pages in total, but pagebar display 19 pages in total!
Is there something to do?
Many thanks
As topic title, someone please help.
]]>Is there any possibility to add a class to the next/previous links? I’d like to style them as buttons but I didn’t get that done so far because they don’t differ from the page numbers…
]]>Hello,
I tried to use that code this way, but it didn’t give me what I need.
<?php if (function_exists('postbar')) : ?>
<div class="mystyle">
<?php postbar(); ?>
</div>
<?php endif; ?>
I want to display “mystyle” class just in case postbar function exist.
Is it possible ?
Thanks
]]>Since I was upgrade WP to most current version, PageBar Plugin has some difficulties to put the Links at the right place. The bottom of PageBar works fine, just the top Pagebar isn’t (*). Funny thing once I am touching the settings for PageBar is it not longer working anymore. I have to disable the PlugIn and remove setting who were left in wp-options SQL-tab.
Any help would be appreciated.
regards ruediger
(*)
https://imageshack.us/photo/my-images/217/bildschirmfoto20120125u.png/
please see screenshot, I can’t check any of the positioning boxes so the plugin is useless to me, any ideas?
]]>When I tried to validate my site, I found a stray </span> closing tag after the end of the separator ( …</span>)
In class-basebar.php, I changed this:
function transit($place) {
if ($place > 0) echo '<span class="break">';
echo $this->pbOptions["connect"] !== "" ? $this->pbOptions["connect"] : '...';
echo '</span>';
}
to this:
`function transit($place) {
if ($place > 0) {
echo ‘<span class=”break”>’;
echo $this->pbOptions[“connect”] !== “” ? $this->pbOptions[“connect”] : ‘…’;
echo ‘</span>’;
}
}
It now seems to work without problems, but since I’m not sure what this function was supposed to do, I’m not sure if it will still work with that change.
Just wanted to report this so it can be fixed in the latest update.
]]>I noticed that navigation on paginated posts was not appearing so I modified the basebar class initialization method from:
global $wp_query, $pbOptions; //line 46
//
//
$this->max_page = is_singular() ? $numpages : $max_page; // line 49
to:
global $wp_query, $pbOptions, $numpages; //line 46
//
//
$this->max_page = is_singular() ? $numpages : $max_page; // line 49
Great plugin! I found it particularly useful for paginated single posts, where the default WordPress options leave something to be desired. Thank you!
I have one minor suggestion:
Add class names to next and previous page links. Let’s use previous page link as an example:
<a class="prev-page" href="#">Previous Page</a>
<span class="inactive prev-page">Previous Page</a>
I think doing this for both the previous and next page links would add a nice bit of flexibility to your plugin, with minimal changes to the plugin itself. I edited the plugin to do this like so:
function previousPage($paged) {
if ($this->pbOptions ["pdisplay"] == "never")
return;
if (($this->paged == 1) && ($this->pbOptions ["pdisplay"] == "auto"))
return;
$text = $this->tagReplace($this->pbOptions ["prev"], $this->paged);
echo ($this->paged == 1) ? '<span class="inactive prev-page">' . $text . "</span>\n" : '<a class="prev-page" href="' .
$this->create_link ( $this->paged - 1 ) . '"' . $this->tooltip ($this->paged - 1 ) . '>' .
$text . "</a>\n";
}
Pretty simple, but you may want to handle it differently (if at all). Feel free to take or leave this suggestion — just putting it out there in case it seems sensible to you. Thanks again for a great plugin!
]]>hello i need to change position pagebar i want that pagebar is on the middle of blog, how can do this?
]]>I’ve just upgraded plugin and the following code stopped inserting pagebar:
if (function_exists(‘postbar’)) postbar();
]]>THe plugin works nicely, but the case when you have custom post page.
WP setting>Readings>Front page displays static Page
When you make your own Front page and the go to see all pages as like in default installation is done on index, then the pagination, creates probably correct number of pages but links to the paged page. It’s hard to explain because this is more or less mixture of word terms.
Anyway.
When you have your custom frontpage, then you have to choose page for posts that substituting the regular index page, right?
And when you have the pagebar there it links to a pagination of that page (because it’s a page originally) but it has to link to another say 10 posts in a row.
hope you understand what I mean.
]]>Using the new version of pagebar added over 100 database hits (queries) to every page on my site, including those that didn’t incorporate the pagebar!
If you need a replacement, try adding this to your functions.php file: (Tweak it if necessary) – call the function using my_pagebar();
// ========= My Pagebar Replacement Function
function my_pagebar() {
global $paged;
global $ppp;
global $search_results;
if (empty($ppp)) { $ppp = 12; };
$num_pages = ceil($search_results/$ppp);
if ($num_pages > 1) {
$current_search_link = 'https://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
$add_page = "/page/";
if ($paged) {
$current_search_link = preg_replace('#\d+$#', '', $current_search_link);
$add_page = "";
}
$mypagebar = '<div class="pagebar">Pages: ';
if ($paged == 0) { $paged = 1; }
$x = 1;
while ( $x <= $num_pages ) {
$y = $paged - 2;
$z = $paged + 2;
if ( $x == $paged ) {
$mypagebar .= "<span class=\"this-page\">$x</span> ";
} elseif ( ($x < 4) || (($num_pages - 3) < $x) || ($x >= $y && $x <= $z) ) {
$mypagebar .= "<a href=\"{$current_search_link}{$add_page}{$x}\" title=\"Page $x\">$x</a> ";
} elseif (($x < $paged) && ($did_the_b4 != 1)) {
$mypagebar .= " ... ";
$did_the_b4 = 1;
} elseif (($x > $paged) && ($did_the_aft != 1)) {
$mypagebar .= " ... ";
$did_the_aft = 1;
}
$x++;
}
$mypagebar .= "</div>";
}
echo $mypagebar;
}
]]>