#wordpress 2019-11-10

2019-11-10 UTC
[chrisbergr], gRegorLove, [tantek], [jeremycherfas], [LewisCowles], AbedB, [fluffy], [jgmac1106] and Alexander-47u joined the channel
#
Alexander-47u
hi all
[grantcodes], stefanos82, [KevinMarks] and [jgmac1106] joined the channel
#
GWG
[jgmac1106]: I gave you a line yesterday
#
[jgmac1106]
what do you mean?
#
[jgmac1106]
ohh I see, I like the irony
#
GWG
[jgmac1106]: adactio's indy map made me bump up archive maps on my list of things to do
#
GWG
Although mine is a bit...simple
[jeremycherfas], [tantek], [voss], [schmarty], blzDiscord[m], testy, [KevinMarks], [chrisbergr], [snarfed] and [fluffy] joined the channel
#
GWG
I'm having trouble finding a query var to disable paging on a WordPress archive
#
[chrisbergr]
Does this the job? $query = new WP_Query( array( 'nopaging' => true ) );
#
GWG
[chrisbergr]: Not on an existing query
#
GWG
nopaging is not a public query variable
#
GWG
So you can't do ?nopaging-1
#
GWG
I think I'll have to be creative
#
[chrisbergr]
Oh, sorry, confused by the same naming of url part and wp query args.
#
[chrisbergr]
Is it possible to modify the template?
#
GWG
Not in this case, I'd need everyone to mod their theme
#
GWG
Look at the map at the top
#
GWG
That's what I'm generating, but it only shows the locations of the posts on the archive page
#
[chrisbergr]
There is a filter navigation_markup_template
#
[chrisbergr]
used in the function _navigation_markup
#
GWG
Yes, won't work.
#
GWG
I'm using the description filter that came in at the same time
#
GWG
Either way, going to finish the feature
#
GWG
I can see if I can add a query variable that will disable paging
#
[chrisbergr]
Oh, but you want the locations from all posts in this archive? then I understood "disable paging" wrong.
#
GWG
Yes, sorry
#
GWG
How does the map look though? Useful?
#
[chrisbergr]
I love the idea of what you want to do 🙂 The map is a bit dark in my opinion.
#
GWG
The style is a setting
#
[chrisbergr]
With this static map image from mapbox you're able to define the dimensions of the image, right? Maybe you choose something 16:9 and do width:100% with auto height?
[jeremycherfas] joined the channel
#
GWG
Map height and width is also a setting in the app.
#
GWG
Although it is global.
#
GWG
Not sure if I want to have a different width/height for archive views
#
[chrisbergr]
https://wpdev.gwg.us/2018/11/06/2216/ here I would also prefer it 16:9 / width: 100%
#
Loqi
[David Shanske] Gate 426, Dublin Airport
#
GWG
Static maps require an absolute height and width.
#
GWG
I suppose I could figure out some sort of Auto calc setting
#
GWG
I imported these posts from my live site
#
[chrisbergr]
840px * 473px
#
GWG
[chrisbergr]: Is that for my theme or all themes?
#
GWG
Again, have to think about everyone
#
[chrisbergr]
This would perfectly fit your case with the twentysomething theme. And also a good default. And you said that this can be defined via settings
#
[chrisbergr]
oh wait. Every theme has this content width variable, right?
#
[chrisbergr]
if ( ! isset( $content_width ) ) {
#
[chrisbergr]
$content_width = 1920;
#
GWG
Does it?
#
GWG
Will look
#
[chrisbergr]
can you access this value and use it for the with of the mapbox image? and then just /16*9 for the height
#
GWG
That might work as an option
#
GWG
First I have to finish the archive feature. But I'll note it
#
Loqi
[dshanske] #132 Add Auto-Size for Maps
#
[chrisbergr]
there is an action parse_query
#
[chrisbergr]
Maybe you can do $query->set to increase the limit to an incredible heigh value in this action
#
[chrisbergr]
Nah, then you'll also display all posts on one archive page what may not be a good way.
#
[chrisbergr]
I guess you should do a custom query for the map.
#
GWG
Yes
tsrt^, efnDiscord[m], [LewisCowles] and [snarfed] joined the channel
#
GWG
Hi, [snarfed]
gRegorLove, [jeremycherfas], [jgmac1106], gray00Discord[m], testy and [Ramiro_Ruiz] joined the channel