Looking to modify the SQL in get_calendar() to only return one category – in this case, category ID 1. SQL isn’t my strong point, can someone help guide me on what I’d add change in this function?
]]>I need to get the get_calendar function to use both published AND future posts, and need to be able to choose which category of posts (or taxonomy) to use.
I’ve tried pretty much every plugin there is out there but they all just have too many functions or just don’t work. I just need to hack get_calendar.
I assumed this would be done by duplicating the get_calendar function and passing the post_status array and adding an extra field to the function, but I’ve seen it would involve using wpdb->posts and what not and from there on out I’m left hanging.
Anyone knows how to do it or has seen a similar solution?
Thank you so much in advance!
]]>I need to display only post from CPT.
Pippins plugins didn’t work.
]]>I’m interested in displaying a calendar of my posts using get_calendar. But I’d like to display the previous month — NOT the current month. I haven’t found a way to do this, nor have I found a plugin that can do it, either.
Any suggestions?
Thank you for your time,
Osgood
I hope someone out there can help me with this little snippet of code. I wish to alter the layout of the default WordPress calendar by altering the table. This link shows how I’d like it to look.
I’ve found the part of the get_calendar function that needs changing, but I can’t figure out how I need to change it. Basically for the first 3 rows, after 4 colums, I need to initiate a new row. The for the following rows there will be 7 columns.
[Code moderated as per the Forum Rules. Please use the pastebin]
Can anyone give me a hint about how to accomplish this? Any response will be greatly appreciated.
Many thanks,
Amal
Hope somebody out there can help me or point me in the right direction…
I’d like get_calendar to show [four] months when called in a theme I’m working on.
I’ve been hitting Google looking for an answer for a couple of hours and have found nothing. I guess it’s possible to hack the function but that’s beyond me right now.
]]>For certain months, those starting on a monday like June 2009, the weekday calculation that adds the padding gets it all wrong. It adds 6 days of padding instead of 0. Like so:
<td colspan="6" class="pad"> </td><td>1</td><td>2</td><td>3</td><td><a href="https://www.eimermusic.com/2009/06/04/" title="StarSchema (OLAP) setup for reporting in CakePHP">4</a></td><td>5</td><td>6</td><td>7</td>
The padding calculation ends up like this:
$pad = calendar_week_mod(date('w', $unixmonth)-$week_begins); // == 6
translates to:
6 = calendar_week_mod(0-1);
That is: calendar_week_mod() gets a negative number whenever a month stars on a Sunday and the setting for the blog has a week_begins other than Sunday. I tried switching to the week starting on Tuesday and then I get even more strangeness.
]]>i would like some information on how to format the title tag in the links provided by the calendar.
Can anyone help out?
Thx!
]]>I’m trying to edit get_calendar() function / hack it, so it can accept new parameter – category. I need this because I need to show links in calendar only from specific (“events” category).
Any ideas how to do it? I already tried editing the SQL in the core files, but it not worked for me.
I’ve also find this plugin: https://www.qogo.com/wpplugins/cats-widgets.phps which is probably old and not works with the current WP tables structure.
Any help will be really appreciated. If needed I can pay you as well.
]]>The middle column with THursday is like 5x too wide.
https://www.rhinowebservices.com/issues/calendarwide.png
I am not sure where to look to edit it to make it look better.
Any tips would be appreciated.
]]>