Hi,
I am getting following warning in debug log –
2017 11:48:57 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Baw_Widgetarchives_Widget_My_Archives has a deprecated constructor in /home/radiofre/public_html/wp-content/plugins/better-archives-widget/widget-archives.php on line 6
PHP Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts
, admin_enqueue_scripts
, or login_enqueue_scripts
hooks. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.) in /home/radiofre/public_html/wp-includes/functions.php on line 4139
I’m using Woocommerce and I want to use this widget to filter post_type=product. I’ve got it to work by editing the widget-archives.php,
before:
“WHERE post_type = ‘post’ ”
after:
“WHERE post_type = ‘product'”
That works great. But the default permalink still points to the root, https://website.com/2017/03
I need to change it to:
https://website.com/product/2017/03
Where would I do that?
Thanks!
Hello,
I was wondering how to load names of month as per default lang of WP site? I’m using it on a website with lang Catalan but months are loading in ENG.
How can I change it to Catalan?
Thanks in advance
Regards,
Abd Ur Rehman
]]>I would like to use the archives on two different pages (I have a widget shortcode maker), but on each page, I need the archives to only show items from certain categories. How can I do that (if I can with this plug-in)? Thank you!
]]>Hi, it would be just wonderful to add post count to Category Archive widget. Can you please suggest how it can be done?
I am sure, many of us will jump out of joy, if Category Archive widget has this feature. Please advice.
]]>On this line:
The getarchives_where
filter should have an extra parameter passed to it.
Hi!
I just like to know how to change mouse hover effect to onclick effect?
If someone hovers archive year with a mouse it automatically loads a list of months, however I want that it loas month when people click on the year.
Thans you and sorry about my band english
]]>Hi and thanks for the widget plugin.
Can this be set to a dropdown menu with any settings?
]]>Hi!
Month names were in English instead of my WordPress installation language , so I modified one line in “widget-archives.php”.
<li class="baw-month">
<a href="<?php echo esc_url( get_month_link( $month->year, $month->numMonth ) ); ?>"><?php echo esc_html( date_i18n( 'F' , strtotime( $month->month) ) . ' ' . $month->year ); ?></a>
</li>
I decided to post this if someone else needs to do the same ??
]]>Hi guys,
I was wondering if someone know how to edit the js in order to get the current year opened every time you load the page.
Thanks
]]>For WPML support, filters need to be applied on the query that gets the results (as is done in wp_get_archives()). I found the following to be working:
/**
* Filter the SQL WHERE clause for retrieving archives.
*/
$where = apply_filters( 'getarchives_where', "WHERE post_type = 'post' AND post_status = 'publish'" );
/**
* Filter the SQL JOIN clause for retrieving archives.
*/
$join = apply_filters( 'getarchives_join', '' );
//the following is the query from widget-archives.php:59 with added $jon and $where
if ( $months = $wpdb->get_results( "SELECT YEAR(post_date) AS <code>year</code>, MONTH(post_date) AS <code>num_month</code>, DATE_FORMAT(post_date, '%M') AS <code>month</code>, count(ID) as <code>post_count</code> FROM $wpdb->posts $join $where GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date" ) ) {
// rest of the code follows
]]>
Error in WP 4.3.0
widget-archives.php line 20
$this->WP_Widget( 'baw_widgetarchives_widget_my_archives', 'Custom Archives Widget', $widget_ops );
This $this->WP_Widget
causes an error, please change to this:
parent::__construct
Text domain seems to be added to be loaded but strings in functions are not translation ready nor is there a .pot or .po. Any chance for this to be added or location elsewhere where I can get my hands on this?
]]>This plugin is very cool and easy to implement. I just need to modify one thing i.e the post counts.
I want to display post count for each year and month.
Can you please guide me how to achieve this functionality.
Thanx
I am using the archives plugin and it shows up in my sidebar with the years and months, but clicking a link takes me to the front page not the archive page
]]>Hi!
I’ve been using your plug-in for one site I maintain.
But the thing is that I needed to be able to exclude some stuff from Archives.
What I wanted to achieve is to exclude category IDs, but the query did not accept that for some reason, though I tried in different ways.
I’ve come up with a hook – excluding one tag ID (which I added to all the posts I wanted to exclude).
That’s what I’ve got https://pastebin.com/vTSDLPCM
Diff:
28, 32 – Updated widget form (very basic)
40 – Added to update()
51, 62 – Updated query.
I triyed to use arrays, uniting vars with commas etc, but that didn’t work.
I am closing work on this project now, so maybe of no help with this.
So consider as FYI.