« first day (625 days earlier)      last day (4319 days later) » 
02:00 - 21:0021:00 - 00:00

2:51 AM
I thought getting 1000 rep would get me editing rights... now I realize it's 2000 — all energy exhausted!
...and gone in vain :(
 
@AahanKrish But you get a hover card now. :D
 
3:08 AM
lol! yeah, except for showing off, I got nothing :D
 
Just 9000 points more and you get access to the moderator tools. And that’s really cool, trust me.
 
I know. It'll take me months because I'd learn PHP to get there
And I can't start learning PHP until I get my site ready yet, and Joost isn't really paying attention to my bug reports ;)
 
you can start right now
 
You are right. I should!
on to it right away!
Starting with this (and will move to books after this) — tizag.com/phpT — Someone warn me if it's bad.
 
do you have a Skype account?
 
3:17 AM
@toscho Yeah
(haven;t used it in days as I was using Linux)
 
open a chat with perplexifikator :)
 
downloading skype...
it's taking forever to install...
weird
 
3:38 AM
Stop installing. I have sent you an email.
 
3:56 AM
@toscho Actually it was my pup asking me to take him for a walk. :) Added you on Skype also just saw your mail
 
 
4 hours later…
8:10 AM
 
@Brady behind the program, chat was on this like week ago :)
 
8:36 AM
@Rarst yeah well I haven't been here for a week and I'm not trawling over a weeks worth of chat
 
@Brady just being petty. it's monday...
 
9:04 AM
Toscho must be AFK, plenty of flags for me to deal with this morning :)
 
@Brady must be a spike, there were none when I looked earlier
 
dealt with 5 over the past hour
 
9:37 AM
Oh great...
-1
Q: Echoing theme options

GenieThis is a WORDPRESS specific question, not a PHP issue. I'm simply asking in what instance would the format of the below code be used in Wordpress. <?php $options = get_option( 'my_theme_options' ); $meta_desc = $options['metadescription']; ?> <?php if( ( is_home() || is_front_page() ) ...

 
I wonder how soon will Jeff get bored of trolling PHP... and which language he did pick for secret project (and potential of PHP having last laugh about that :)
 
@StephenHarris Closed as off topic, and I don't care for the attitude in his question.
 
@Brady Yeah me neither, but now I think 'exact duplicate' is more appropriate. He's just reposted the question because he's annoyed that EAMann closed the original
 
@StephenHarris true
changed to duplicate
 
Brackets has nothing on my build called Fuckits.
Can anyone get brackets to run properly or what?
 
9:51 AM
@userabuser I didn't even try so far...
 
ah well... i tried, i gave up.
@Rarst Which Jeff are you talking bout?
 
@userabuser is there more than one that matters in this neighbourhood? :)
Atwood
 
lol haha
 
morning
 
I should've known better
Hola Tom!
@Rarst Is he giving PHP a hard time? I should send some people to rough him up?
 
10:06 AM
@userabuser yeah, been on trolling spree... seems he was going to do some project on it but talked himself out of it
 
oh so talks the talk but cant walk the walk...
PHP is king, end of story.
Jeff says; "I can’t even say what’s wrong with PHP, because – okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there. "
I say: "You can't code."
 
@userabuser Or "A workman always blames his tools"
 
Every language has its upsides and downsides, idiosyncrasies, nuances, whatnot... its really up to your problem solving skills.
@Brady Well said!
 
He has already made the reference to PHP being his toolbox with a set of tools :)
 
I think there is no doubt PHP has some seeeeerious language design issues... but I don't think there is a point to sulk about that... give better alternatives with comparable infrastructure and PHP will die out, right? :)
 
10:11 AM
lol...
 
@Brady Jeff doesn't blame PHP as in tools cause SE is in dot net :)
 
@Rarst yeah he is just a hardcore .NET developer :)
 
Well there is "Seaside (smalltalk)"... but seriously what can't PHP do that there's a solution for anyway?
@Brady and there in lay the problem... .NET
 
@userabuser I tried .NET a while ago and there was some niceties there but nothing that PHP couldn't do with a library that someone had already coded
 
10:25 AM
Anyone plz edit @StephenHarris answer. the ; needs to be inside the inline code block... small one, but newbies may miss it
 
@AahanKrish which one..?
 
@AahanKrish done, cheers.
 
@StephenHarris thanks! :)
 
My answers are a melting pot of syntax errors :)
 
10:27 AM
great nevertheless!
 
Stealing rep...
0
A: Using widget logic I want to show only a widget on the archive page if there are no posts

Stephen HarrisThe have_posts() function checks if the 'main query' returned any posts. is_tax can check if a certain taxonomy archive page is being shown. In this case, the solution (taken from the comments): if( is_tax( 'genre' ) && !have_posts() ){ //Display widget }

 
Arrgh! I never come across such questions! X(
 
Just go through wordpress.stackexchange.com/unanswered - you might find ones you can answer... or ones that somebody else answered in the comments
 
okay
 
anu
11:20 AM
afternoon folks
 
gosh its that time already
Hey @anu
 
anu
it's july and i've had to turn the central heating on
 
11:35 AM
@TomJNowell Where has the day gone?
 
@Brady Rhyl
 
@anu we have so many computers and printers in here that central heating is not required. We even have the windows open. You can imagine how bad it gets in here when its sunny and warm outside
Feb 16 at 9:50, by Rarst
@Brady stop one letter nonsense
@all is there an issue with meta? half of the images aint loading for me
 
@Brady for instance...?
 
@AahanKrish NVM its working now
 
11:50 AM
@StephenHarris tried searching. missed that one
Closed my question
 
@Brady not surprised not what I would have searched for
 
interrupted by close in the middle of the answer I feel like this site does just fine without me nowadays.
@drewm I have an idea for a talk about how your Rails / Python workflow can be made up to 30% more efficient by just shutting up about PHP.
this is EPIC summary :)
 
@Rarst which question was that?
 
@Brady meta
 
ahh ;)
as you are mod you can always re-open. post, then close again :)
I'd be interested in seeing what you had to say
 
12:11 PM
@Rarst That's gold! lol
 
@Brady "adjusts his glasses OH, YEEEEEEEEAH..." basically.
 
0
Q: If a question shows that it is trying to solve an issue on an older version of WordPress can it be closed as too localized?

Brady Possible Duplicate: Should we close outdated, abandoned questions? I recently watched Joel Spolsky - Cultural Anthropology of Stack Exchange and I picked up a couple of things. 1) StackExchange network is not here to service the question asker but those hundreds/thousands of users ...

 
bots a bit behind...
 
@Rarst dont get it?
 
basically, @Rarst adjusted his glasses and said "Oh, Yeeeeeeeeeeeeah! :D
 
12:25 PM
 
@Rarst dont watch it
 
@Brady neither do I anymore
 
but still you haven't answered me.

> I'd be interested in seeing what you had to say
Oh YEAAAAAH... isnt what you were going to say in response...
 
@Brady above? general agreement? yes, it is!
 
@Rarst got yeah :)
should have just said that to begin with :)
 
12:29 PM
@Brady I did! then your meme ignorance dragged the situation out :)
 
@Rarst Maybe you should take an arrow to the knee then there wouldn't be any of this tomfoolery.
 
@Brady I don't play that
 
@Rarst great you dont play and I don't watch... Shame you dont hear instead then we'd be see no evil, hear no evil
 
you know the problem with explaining the world (it took some months) that query_posts() should not be used? now they use their own re-invented version of query_posts()
 
@Rarst wait - we've successfully explained that query_posts is wrong... and people have stopped using it...?
@Rarst What have they replaced it with? :S
 
12:37 PM
@StephenHarris now it's matter of individual expression... right now I am looking at function that basically combines query_posts() and loop inside.
 
@StephenHarris Its not so much its wrong to use it. Its only wrong if you use it to alter the main query or you dont reset the global variables after using it.
 
anyway, need to commit this and henceforth I am so out of this corner of code...
 
@Rarst ah would a rose smell as sweet...
@Brady But it's rare to ever want to do that.
@Brady anyway, altering the main query is what it does isn't?
 
morning
 
@toscho afternoon
 
12:43 PM
Heh, Brady asked a duplicate? haha
Why is this question getting no good answers?
 
hey
@toscho Because no one likes rewrite stuff
 
anu
yup, what @kaiser said - i'm convinced there's an obfusticated entropy generator within the guts of WP rewrite that does $random stuff at $random time
WP - contributing to the heat death of the universe, one permalink at a time
 
@toscho accept my request :)
(skype)
 
1:07 PM
@StephenHarris what I mean by the main query is the query that is run on page load (What WordPress thought you wanted). If you are using query_posts() on the main query then you are dumping what was returned to make a second query to the database
Which is wrong as its wasteful.
@toscho not my fault EAMann named his question with some obscure title :)
 
1:58 PM
complaining There're close to no questions on first page, that are worth an answer. Only worth close voting, editing and downvoting... No chance to make it above current rep without old questions (and the good, solvable ones are already answered. stop complaining
 
Can anyone pick at this code. It works but was wondering if anyone had anything better at achieving this:
add_filter("wp_get_nav_menu_items", "add_active_to_menus_for_CPTs", 3, 10);
function add_active_to_menus_for_CPTs( $items, $menu, $args )
{
    global $post;

    static $page, $ancestors;

    if( ! isset( $page ) )
    {
        if( is_page() )
            $page = $post;
        else
            $page = get_closest_page();
    }

    if( ! isset( $ancestors ) )
    {
        $ancestors = (array) get_post_ancestors( $page->ID );
        $ancestors[] = $page->ID;
    }

    foreach( $items as $key => $item )
If I'm on a CPT post the nav looses its selected class
I have a home brew function get_closest_page() that gets the page object that is tied to my CPT
 
$ancestors = array_push( (array) get_post_ancestors( $page->ID ), $page->ID ) );
 
Is this for a bootstrap based theme?
 
@TomJNowell no its for a client site
 
@Brady I mean is the theme on the client site involving bootstrap?
 
2:02 PM
@TomJNowell no
@kaiser thanks
Just need to apply the same code above to wp_list_pages()
 
@Brady Couldn't you declare $post as static - gets filled in case anyway and would you safe some lines. You could also do is_page() AND $post = get_closest_page();.
Also I think this will fail for every second call - if this is intended.
 
@kaiser U've lost me
 
With fail I mean, that it would still have the data from the first call
 
@kaiser the code works on all calls
static $page, $ancestors; should only be calculated once
 
6 mins ago, by Brady
If I'm on a CPT post the nav looses its selected class
 
2:06 PM
so if I have five menus on the page Im not running it 5 times
@kaiser No that was the reason for coding this function
 
Ah, ok. I thought that you wanted to get the sub menu items for different cases.
 
something about the word static appearing makes me very uncomfortable
 
@TomJNowell why? Im using static for what it is intended for here
 
@Brady Im googling and I can only assume your function is a class method
 
@TomJNowell no its not a class
 
2:08 PM
even then, it's a holdover from languages where it's been deemed bad practice
 
I learnt the use of static on a variable in a function from C
 
like C++
 
What is wrong with it? You rather I clutter global namespace?
 
php.net/manual/en/language.variables.scope.php explains it, odd that its not linked to from the oop static page
 
2:10 PM
@Brady $page = is_page() ? $post : get_closes_page(); ...
 
in that case I would probably put it as a small class/object and use self::$page or $this->page instead
 
@TomJNowell ehm, elaborate what is wrong with static?..
 
@kaiser thanks
 
just so that I can initialise or declare it without using static and have more structure
at least then I have a persistent object with persistent values in a location I can see manipulate, and know where they are
 
@Brady I'm wondering if you need to run the whole function, if you're on a page, as $page equals $post...
 
2:11 PM
Don't think I'm gonna get any better than this:
add_filter("wp_get_nav_menu_items", "add_active_to_menus_for_CPTs", 3, 10);
function add_active_to_menus_for_CPTs( $items, $menu, $args )
{
    global $post;

    static $page, $ancestors;

    if( ! isset( $page ) )
        $page = is_page() ? $post : get_closest_page();

    if( ! isset( $ancestors ) )
        $ancestors = array_push( (array) get_post_ancestors( $page->ID ), $page->ID );

    foreach( $items as $key => $item )
    {
        if( in_array( $item->object_id, $ancestors ) )
            $items[$key]->classes[] = "active";
 
@TomJNowell you do realise the only difference would be declaration in different and more broad scope?
 
@Brady in_array( $item->object_id, $ancestors ) AND $items[ $key ]->classes[] = "active";
 
@kaiser if on post, get_closest_page() will get the page I'm after
 
↑ no beauty
 
@Rarst static keyword makes me uncomfortable, it's like seeing extern CObject* manager; at the bottom of a cpp file
 
2:13 PM
@TomJNowell we are not in cpp here
 
@Brady I'm talking about the other case
When you're on a page
 
@Rarst no, we're in the perverted bastardised scripted child of Cpp
with bits of Java and C frankensteined in for good measure
 
@kaiser ah ok
 
@Brady - Btw, if you already found the single active, then just return there.
 
so at the top: if(is_page()) return;
 
2:14 PM
if( in_array( $item->object_id, $ancestors ) )
    return $items[ $key ]->classes[] = "active";
@Brady Simply return $items
 
@kaiser no but it needs to apply active to all ancestors too
not just current
 
Ah, ok.
@Brady if ( is_page() ) return $items; ... Else stuff will fail.
 
oh yes
I think I'll pass on this. I think I'd rather use active even if we are on a page
saves on styling for lots of different classes
current-menu-item, current-page-item, current-page-acestor etc....
OK anyone know the filter that will work on wp_list_pages()?
 
@kaiser thanks I have this however I'm not going to bother with the page check at the top
@kaiser this doesnt work $ancestors = array_push( (array) get_post_ancestors( $page->ID ), $page->ID );
 
2:28 PM
@Brady Hm? Why not? Btw: You could also use array_unshift()
 
Would have to use array_merge
 
@Brady No. $page->ID is not an array.
You're adding a value to an array.
 
@kaiser it is now:
if( ! isset( $ancestors ) )
    $ancestors = array_merge( (array) get_post_ancestors( $page->ID ), array( $page->ID ) );
 
Haha!
array_merge( array( get_post_ancestors( $page->ID ) ), array( $page->ID ) );
 
And it's WordPressy too :)
 
2:31 PM
↑ stay in line, soldier
> Please Help - This is urgent!
by Nick
 
add_filter("page_css_class", "add_active_to_list_pages_for_CPTs", 5, 10);
function add_active_to_list_pages_for_CPTs( $css_class, $page, $depth, $args, $current_page )
{
    global $post;

    static $tpage, $ancestors;

    if( ! isset( $tpage ) )
        $tpage = is_page() ? $post : get_closest_page();

    if( ! isset( $ancestors ) )
        $ancestors = array_merge( array( get_post_ancestors( $tpage->ID ) ), array( $tpage->ID ) );

    if(in_array( $page->ID, $ancestors ) )
        $css_class = array_merge( array( $css_class ), array( "active" ) );
^^ for wp_list_pages()
any improvements to be made?
 
@Brady Why do you put so many spaces in your code?
 
@MichaelEcklund it's called WordPress Coding Standard. it's a thing, yes... :)
 
@MichaelEcklund because it looks clean and tidy and easier to read
@Rarst I follow most but not all WordPress standards
 
2:47 PM
Well I refuse to space my code like that. So WordPress can suck it.
 
to each his own
 
@MichaelEcklund If you have a decent IDE you can get it to space it like that automatically so you dont have to wear out your spacebar
 
@MichaelEcklund tabs! yay
 
Is it namespace or name space?
 
namespace
 
2:58 PM
@userabuser +1
 
thanks. my spell checker doesn’t help here. :)
 
I was looking for an image for namespace and this is what came back in results....
 
lol
 
It has even built-in inheritance!
 
3:25 PM
> Enforce custom timezone on a specific set of functions?
Good question for the main site?
 
If some has the time to check my poor English in this overly long answer I would be very grateful. :)
 
3:38 PM
Do all of you type code with all your fingers? I'm curious!
 
@AahanKrish most of them
I throw in a couple of thumbs now and then.
 
I use separate keyboards for each foot.
 
Ah... it's seems awfully hard for me :(
@toscho Is it okay to use date_default_timezone_set( ); inside a plugin? It appears that the timezone is only enforced within the plugin's jurisdiction (for example, only in sitemaps if used in a sitemaps plugin) and nowhere else.
(I have to... I don't want to mess with all the PHP code in the plugin, not right now)
okay... asking this on main site.
 
4:01 PM
0
Q: Is it safe to use 'date_default_timezone_set' in plugin file?

Aahan KrishI am using a sitemaps plugin which in very complex ways sets the timezone of <lastmod> (i.e. last modified time) for posts to GMT. Temporarily, until the plugin developer fixes it, I need to enforce a custom timezone on the plugin. The simple and straightforward way that I've found is to a...

 
4:22 PM
@toscho That answer is so long I need to charge you my hourly rate just to read it...
 
@AahanKrish why are you bothering to change the timezone at all?
so long as you indicate that its GMT
and the timestamps ARE GMT
then its fine
afterall, it's not a document intended for humans
 
@TomJNowell the plugin sets some sitemaps in GMT and other one in my blog's timezone
 
even then, why change your blogs timezone? seems pointless
instead of saying posted at 5pm
say, posted 27 minutes ago
problem solved kthxbai
 
@TomJNowell I use relative dates for 1 day, and past that it's absolute
@TomJNowell lol
 
then just indicate the date at a day level
not an hour level
 
4:28 PM
@TomJNowell Okay, so what should I do with the question? Delete?
 
leave it up
 
okay
 
who knows, someone will answer and hey presto you'll learn something new
build the big stuff and the bones first
 
I hope
 
then add the details
else you'll put details on scaffolding and itll have been for nothing
 
4:31 PM
:D
I believe everything is set now. my theme is ready to roll!
 
o rly?
have you noticed every archive listing has the carousel at the top?
and it still doesn't cycle, it only has one post in it
I'd recommend removing it on archive pages, homepage only
and adding more posts to it, as I've never seen ti cycle, it could still be broken
make your footer sticky
and when you search for a term
the term isn't in the searchbox once submitted
tell me what I searched for without looking at the url =p
You're getting closer to it being launchable, just some obvious stuff you may be overlooking, never hurts to get a fresh set of eyes
thanks for editing my answer @kaiser didn't know you could highlight blocks like that
 
@TomJNowell 8-O
final review in action
 
@kaiser whats up with it?
 
anu
@kaiser ?
 
4:43 PM
@TomJNowell haha! No it's not. It's working fine. I never really started blogging, so it got stuck there
 
@anu @TomJNowell Not too bad written code and a really nice integration with the admin UI.
 
anu
@kaiser ah - thought you didn't like it for some reason
 
Nothing else. It's just not too common that you find a well done plugin in the repo.
 
@TomJNowell what do you mean?
 
anu
@kaiser haven't used it yet - but will probably add it to the paywalled football site I built a couple of years ago - from all accounts it's fairly awesome
 
4:46 PM
@anu Stumbled upon it with a question - then got stuck with looking at it, as I just wrote one plugin to add custom post status.
now watching the session - thanks
 
anu
@kaiser lots of journalist acquaintances of mine like it a lot
 
Do you guys think the answer for this question is best solution? wordpress.stackexchange.com/questions/56454/…
 
@anu The only thing I don't like is the talk. No one standing in front, unreadable projection and sound is crappy :/
 
@PolluxKhafra It's by Milo, it'd believe it to be very good
 
anu
@kaiser pretty normal for a wordcamp filmed session, unfortunately. I tried watching nacin's talk about wp_query - had the talk in one window, and the slides from slideshare in a separate one
 
4:50 PM
:)
 
@AahanKrish say your page is 500px tall, but the browser viewport is 900 px tall, your footer is no longer at the bottom of the page
 
@TomJNowell How are you testing that?
 
@AahanKrish easy, load a page thats very short, on a monitor thats very tall
 
@anu The only two really annoying things in code are, that they're using PHP4 and dumping lots of js vars directly into global namespace instead of using localize script...
 
@TomJNowell Ah that! That has been bothering me, but I didn't know how to fix it...
 
4:53 PM
@AahanKrish yes, the solution is called a sticky footer
 
"sticky" helped
 
as it sticks to the bottom of the window
 
@TomJNowell right, thanks for that. I already see what I need to do
 
anu
@kaiser take a look at the github repo: github.com/danielbachhuber/Edit-Flow - i'm fairly sure it's PHP5 only now
 
footer {
    glue: bottom;
}
 
4:55 PM
@anu No, it isn't, but thanks for the link
last update: 3 months ago
 
anu
@kaiser ok, they do say that it needs PHP5: wordpress.org/support/topic/…
 
@kaiser maybe they're moving to PHP5, they've just started using php5 features rather than replacing php4 ones
 
@anu @TomJNowell It's not the plugin, just an old WP version and they're referencing here.
 
@toscho very funny! XD
 
@toscho broken in IE7
 
anu
4:58 PM
@kaiser sure, be interesting to see if it actually runs on a PHP 4 install though ;)
 
@TomJNowell it's effing broken everywhere! :D
 
@anu ;)
 
5:09 PM
@kaiser it may just be that he doesn't know better, I never knew about the whole localise script stuff or the ajax api until this year
 
@TomJNowell That was no criticism over all - I could also leave an issue on github. I was just trying to find something that I don't like, as I couldn't believe it so far ;)
 
Does anyone know if you an you use static::$variable in 5.2?
 
anu
Oh - AWS Console now supports creating Cloudfront invalidations - when did that happen??!
 
@StephenHarris ?? setting a var to static or what is that supposed to do?
 
@kaiser so I've declared a static variable, and I'm trying to access it via static::$variable
In answer to my question:
3
Q: Parse error: syntax error, unexpected T_STATIC

easyrider<?php class Employee { public static $favSport = "Football"; public static function watchTV() { echo "Watching ".static::$favSport; } } class Executive extends Employee { public static $favSport = "Polo"; } echo Executive::watchTV(); ?> Parse error: syntax error, unexpected T_STATIC on ...

 
5:39 PM
@TomJNowell sticky footer is a hassle as I see it. I'll make my pages longer instead :) and also make sure that the footer looks much better horizontally like a stripe.
 
I'm running wordpress locally on 127.0.0.1 on mac osx lion. All links work fine. Problem is when I add pages, and set permalinks to the page, and then associate the page with one of my template themes, I get this:
Not Found
The requested URL /gps-products was not found on this server. The thing is I have the same code and database on two different mac computers running lion. So I am thinking that something is different with the apache configurations.
 
@StephenHarris The SO answer is wrong. I have added a correction. Use self to access static variables.
 
6:06 PM
@toscho mmm... well it seems you can in PHP 5.3? php.net/manual/en/language.oop5.static.php The only difference, as I understand it, is when dealing with class extensions. In my case, I wasn't and so there is no difference, and switching to self worked.
 
print static::$var is not the same as print self::$var.
The first declares a var as static and prints it out, the second prints a variable that is already static.
 
@toscho you are sure? I was also under impression it's just different syntax for same thing in latest PHP versions
 
hmmm … maybe something has drastically changed lately. Will do some tests.
 
@toscho I'm not so sure. print static::$var works for me (5.2 excepting). And when not dealing with extensions of classes they (appear) identical.
 
ah, I see.
 
6:36 PM
The WordPress tag on SO is almost dead: just some crappy questions mostly without answers. Nice. :D
 
Is it possible to tell if a user meta number value has went up or down?
 
anu
@toscho - joking?
 
or I should say increased or decreased
 
hm?
 
anu
the WP tag on SO - looks VERY active
 
6:49 PM
0
Q: code blocks with 4 spaces not working

RaymondWhen creating a question it is not interpreting code blocks correctly when you indent with 4 spaces. For example: This should be code! But it is not. EDIT: must have a blank line before and after block code, maybe specify this in instructions?

 
anu
in terms of questions being asked
in fact, it would be great if anytime anyone tagged something as "wordpress" on SO it got auto-migrated - shame that's not possible
 
@anu But almost all of these questions are crap. And no one answers them. I don’t want most of these on our site.
 
anu
@toscho fair enough
 
7
A: Why does stackoverflow have such an active WordPress tag?

toschoWordPress questions were never declared as off topic on Stack Overflow, and there are some rules preventing migration: Low quality questions are closed, not migrated. If something could be on topic on two sites, the questions stays where it was asked. The tag wordpress on SO isn't always used p...

 
anu
Damnit, I find myself sort of agreeing with chip
 
6:57 PM
@anu scary feeling, eh? :)
 
anu
@rarst - i feel unwell
 
@anu Not much later Chip complained about the quality of questions migrated from SO to us with the tag wordpress. :)
 
anu
@toscho bless him!
 
2
Q: Do we not have control over questions that get migrated here?

Chip BennettThis question is a user-support question, and clearly outside the scope of our FAQ: Cannot Upload Custom Header Image into Wordpress Dashboard How do we stop these questions from being migrated here? Should we make our FAQ more explicit, regarding user-support questions (and directing them appr...

 
anu
Nice
 
6:59 PM
That’s exactly why I almost never ask the SO mods to migrate a question.
 
anu
I appreciate the argument that we don't want more shit questions
but it's time to eat now :)
 
how do i specify a menu order option to an attachment to a page?
 
@JohnMerlino Look here.
 
@toscho i already asked
5 days ago
 
I don’t see this question in your list.
 
7:05 PM
the questoin is titled image flexibility
do you have a link to the codex?
 
@JohnMerlino That’s another question?
 
I am stuck in a weird situation (all of a sudden) — only one Page doesn't show it's content, and it's the "Contact Us" page. Any ideas as to where I should start? I have undone all changes I could remember
this is weird enough I can't even ask it on the main site :(
 
if you doing anything beyond basic website or a blog, use ruby on rails
 
If you cannot build a web site in any language don’t build web sites. :P
 
i stand corrected
well it appears $wpdb->get_col allows direct sql which exactly what i needed in my case
 
7:43 PM
Now there's a bounty on this one
3
Q: Check if first paragraph is an image, then show custom code right after it?

Aahan KrishI would like to add some code in functions.php that does this: If the first paragraph contains an image, show my custom code right AFTER it. For example: <div class="entry-content"> <p><img src="http://example.com/example.jpg" alt="Image in 1st para" /></p> <...

beat @toscho and take the lot :P
...or he will take it
 
7:58 PM
@JohnMerlino dump $GLOBALS['wpdb'] and then you got $wpdb->query(); to do complete queries.
 
@kaiser yes I see, i been reading over this: codex.wordpress.org/Class_Reference/wpdb
 
@JohnMerlino Always keep in mind, that you've to ->prepare() stuff, which is basically something like (s)prinf(), but only supports string and integer. And don't forget to use like_escape() for LIKE stuff.
 
> query (string) The SQL query you wish to execute, with %s and %d placeholders. Any other % characters may cause parsing errors unless they are escaped. All % characters inside SQL string literals, including LIKE wildcards, must be double-% escaped as %%.
But normally there's a core function, so you need $wpdb->query() only some very rare and specific cases.
 
yeah I see there a number of them for the wpdb class
 
8:11 PM
↑ Those's the most important stuff that you need to know (aside from SQL).
 
my archive template crashed because first time in 4 years I went for a month without posts... that is one patient bug
 
8:27 PM
scratch that, Scribu's fault :)
 
@StephenHarris Thanks for the edit.
 
02:00 - 21:0021:00 - 00:00

« first day (625 days earlier)      last day (4319 days later) »