id
stringlengths 40
40
| text
stringlengths 29
2.03k
| original_text
stringlengths 3
154k
| subdomain
stringclasses 20
values | metadata
dict | emb
listlengths 1.02k
1.02k
|
---|---|---|---|---|---|
f476e2912640cef651d20146c095fea3b9df4117 | Wordpress Stackexchange
Q: add_meta_box does not go 'side' I'm trying to add some metabox to my custom post type. So I add this:
add_meta_box(
'my_custom_meta_box_id',
'My-meta-box-title',
'my_custom_meta_box_callback',
'my-custom-post-type',
'side',
'default'
);
So the meta-box keep showing at bottom left. What could cause that problem?
A: This might be caused because you have tried to move your custom meta box to some place and Wordpress respects the user's ordering/positioning of these boxes. You can do as gmazzap has told because this will create a new user with blank preferences.
Or you can login to your database, find DBPREFIX_usermeta (DBPREFIX is your database prefix) and find related database entries. In my case:
You can see meta-box-order_PLUGINNAME (where it is your plugin's name) and screen_layout_PLUGINNAME. When I removed these entries, the problem was gone.
| Q: add_meta_box does not go 'side' I'm trying to add some metabox to my custom post type. So I add this:
add_meta_box(
'my_custom_meta_box_id',
'My-meta-box-title',
'my_custom_meta_box_callback',
'my-custom-post-type',
'side',
'default'
);
So the meta-box keep showing at bottom left. What could cause that problem?
A: This might be caused because you have tried to move your custom meta box to some place and Wordpress respects the user's ordering/positioning of these boxes. You can do as gmazzap has told because this will create a new user with blank preferences.
Or you can login to your database, find DBPREFIX_usermeta (DBPREFIX is your database prefix) and find related database entries. In my case:
You can see meta-box-order_PLUGINNAME (where it is your plugin's name) and screen_layout_PLUGINNAME. When I removed these entries, the problem was gone.
| wordpress | {
"language": "en",
"length": 129,
"provenance": "stackexchange_00019.jsonl.gz:449029",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/162071"
} | [
0.050201416015625,
-0.02447509765625,
0.0022373199462890625,
-0.02935791015625,
-0.0124053955078125,
-0.01336669921875,
0.01490020751953125,
-0.0260009765625,
0.018707275390625,
0.031280517578125,
-0.01438140869140625,
-0.0181121826171875,
0.005603790283203125,
-0.016265869140625,
-0.048675537109375,
-0.0277099609375,
0.0268096923828125,
0.005596160888671875,
0.031707763671875,
-0.01201629638671875,
0.011810302734375,
-0.00778961181640625,
0.0281982421875,
0.047607421875,
0.0023784637451171875,
-0.0460205078125,
0.08544921875,
-0.0248565673828125,
0.01369476318359375,
-0.01107025146484375,
0.0293426513671875,
0.0038089752197265625,
0.00936126708984375,
0.0011882781982421875,
0.022857666015625,
0.05157470703125,
0.02301025390625,
0.0034046173095703125,
0.03045654296875,
0.007396697998046875,
0.021484375,
-0.0025348663330078125,
-0.01849365234375,
0.006320953369140625,
-0.03436279296875,
-0.042694091796875,
0.04437255859375,
-0.00018215179443359375,
0.0117950439453125,
-0.030853271484375,
0.0212249755859375,
-0.0005588531494140625,
0.038330078125,
-0.040496826171875,
-0.0234527587890625,
-0.0272216796875,
-0.01421356201171875,
-0.004245758056640625,
0.0150909423828125,
0.01080322265625,
-0.004146575927734375,
0.0098114013671875,
0.006092071533203125,
-0.0207366943359375,
0.00783538818359375,
-0.0120697021484375,
-0.021240234375,
0.0217132568359375,
-0.042755126953125,
0.016815185546875,
0.05108642578125,
-0.0313720703125,
0.020172119140625,
-0.0273284912109375,
-0.0389404296875,
-0.0192108154296875,
0.01496124267578125,
-0.04229736328125,
0.01136016845703125,
-0.0260467529296875,
-0.0064544677734375,
0.0240631103515625,
-0.01495361328125,
-0.00396728515625,
-0.0112457275390625,
0.016571044921875,
-0.031982421875,
-0.0164642333984375,
-0.01087188720703125,
-0.032867431640625,
-0.01056671142578125,
-0.10369873046875,
0.0034389495849609375,
0.021728515625,
0.009429931640625,
-0.062408447265625,
0.0158843994140625,
0.035552978515625,
-0.0272979736328125,
-0.00531768798828125,
0.0074005126953125,
-0.023468017578125,
0.0214385986328125,
-0.0281219482421875,
-0.0009794235229492188,
-0.023712158203125,
-0.0316162109375,
-0.050018310546875,
0.0166778564453125,
0.062103271484375,
-0.0333251953125,
-0.020477294921875,
0.02642822265625,
0.0037593841552734375,
-0.043975830078125,
-0.00748443603515625,
-0.0084991455078125,
-0.0010080337524414062,
-0.0068817138671875,
0.0023250579833984375,
0.0098876953125,
0.026580810546875,
0.0204010009765625,
-0.037841796875,
0.021087646484375,
-0.0074462890625,
-0.050933837890625,
-0.0198822021484375,
-0.0765380859375,
0.038482666015625,
-0.037445068359375,
-0.003238677978515625,
0.0899658203125,
0.070068359375,
0.022796630859375,
-0.0275726318359375,
0.034881591796875,
-0.04791259765625,
-0.0189666748046875,
0.0283050537109375,
-0.00830841064453125,
-0.04876708984375,
-0.0172119140625,
-0.0096893310546875,
-0.040985107421875,
0.0411376953125,
0.022613525390625,
-0.01351165771484375,
-0.030792236328125,
-0.08447265625,
-0.00656890869140625,
-0.056304931640625,
0.018707275390625,
0.0242462158203125,
0.003406524658203125,
0.019439697265625,
0.060333251953125,
-0.038665771484375,
-0.01641845703125,
-0.044036865234375,
-0.0175018310546875,
-0.009979248046875,
0.0267486572265625,
-0.0068817138671875,
-0.01125335693359375,
0.0205535888671875,
-0.0255889892578125,
0.00502777099609375,
0.01335906982421875,
0.022735595703125,
0.0007772445678710938,
0.0631103515625,
0.0033740997314453125,
-0.01531982421875,
-0.00937652587890625,
-0.036651611328125,
0.0286865234375,
0.045013427734375,
0.005107879638671875,
0.01493072509765625,
-0.0249786376953125,
-0.05108642578125,
0.055511474609375,
-0.037811279296875,
-0.06072998046875,
0.056243896484375,
-0.00749969482421875,
-0.0012083053588867188,
0.0038433074951171875,
-0.01959228515625,
0.08319091796875,
0.072021484375,
-0.074462890625,
0.0156402587890625,
0.023223876953125,
0.01030731201171875,
-0.0294952392578125,
-0.02496337890625,
0.003063201904296875,
0.015594482421875,
-0.0469970703125,
-0.005962371826171875,
0.00489044189453125,
0.0105133056640625,
-0.039764404296875,
0.003643035888671875,
-0.0272216796875,
0.03411865234375,
0.030517578125,
0.0099945068359375,
-0.012054443359375,
-0.03143310546875,
0.0275421142578125,
-0.03704833984375,
-0.01898193359375,
0.035430908203125,
0.003711700439453125,
0.055023193359375,
-0.010223388671875,
0.0301513671875,
-0.02593994140625,
-0.0245361328125,
-0.0174560546875,
0.00730133056640625,
0.0614013671875,
0.0267486572265625,
-0.019927978515625,
-0.00856781005859375,
0.0404052734375,
0.033935546875,
-0.070556640625,
0.0173492431640625,
0.015869140625,
-0.039703369140625,
-0.07110595703125,
-0.00650787353515625,
-0.006805419921875,
-0.048797607421875,
0.01168060302734375,
0.06072998046875,
-0.00004208087921142578,
0.023193359375,
-0.003971099853515625,
0.0718994140625,
-0.0077972412109375,
-0.039825439453125,
-0.0012674331665039062,
0.03558349609375,
-0.0011110305786132812,
0.01479339599609375,
-0.0132293701171875,
-0.004329681396484375,
0.015716552734375,
-0.046875,
0.0083465576171875,
0.0260467529296875,
-0.0235748291015625,
-0.0250396728515625,
0.04290771484375,
-0.0322265625,
0.00897216796875,
-0.06097412109375,
-0.021087646484375,
-0.0233917236328125,
0.034393310546875,
-0.0008559226989746094,
0.060272216796875,
0.04766845703125,
0.01465606689453125,
-0.01152801513671875,
-0.0210723876953125,
-0.019561767578125,
-0.010498046875,
0.0007829666137695312,
0.034149169921875,
0.01534271240234375,
-0.05181884765625,
0.0116119384765625,
0.027374267578125,
0.005245208740234375,
0.007671356201171875,
0.01702880859375,
-0.036285400390625,
-0.0036563873291015625,
-0.0014972686767578125,
-0.047576904296875,
-0.0009737014770507812,
0.048065185546875,
0.0038852691650390625,
-0.0280914306640625,
0.01271820068359375,
0.01285552978515625,
-0.0156707763671875,
0.0279388427734375,
-0.0009832382202148438,
-0.0345458984375,
0.0265960693359375,
-0.0194244384765625,
0.0333251953125,
-0.039031982421875,
0.0274658203125,
0.034637451171875,
-0.053619384765625,
0.01067352294921875,
-0.011688232421875,
0.044677734375,
-0.0173492431640625,
0.0159759521484375,
0.0009250640869140625,
-0.04718017578125,
-0.0260009765625,
-0.037017822265625,
0.0296630859375,
0.02349853515625,
0.0469970703125,
-0.0058135986328125,
0.038055419921875,
0.04022216796875,
0.006916046142578125,
-0.0255126953125,
0.03973388671875,
-0.033203125,
-0.037811279296875,
-0.0142822265625,
-0.037353515625,
0.0020542144775390625,
-0.002864837646484375,
-0.0169525146484375,
0.00687408447265625,
-0.051025390625,
-0.0270843505859375,
-0.054779052734375,
-0.056915283203125,
-0.0316162109375,
0.02471923828125,
-0.005260467529296875,
-0.0009403228759765625,
0.08880615234375,
0.00603485107421875,
-0.0587158203125,
-0.006946563720703125,
0.02825927734375,
-0.01206207275390625,
0.0121002197265625,
0.02935791015625,
-0.0051116943359375,
0.032867431640625,
0.0017194747924804688,
0.0014772415161132812,
0.037841796875,
-0.04681396484375,
-0.036651611328125,
-0.042083740234375,
-0.03350830078125,
-0.018951416015625,
0.0265350341796875,
0.03228759765625,
0.00720977783203125,
0.030242919921875,
-0.0287933349609375,
-0.004276275634765625,
0.039215087890625,
0.0079803466796875,
-0.00447845458984375,
-0.050933837890625,
-0.002140045166015625,
-0.01419830322265625,
0.06396484375,
0.0285491943359375,
0.0364990234375,
0.035125732421875,
0.01148223876953125,
-0.038055419921875,
-0.0100555419921875,
-0.0148773193359375,
-0.035430908203125,
-0.011627197265625,
-0.0005283355712890625,
0.033599853515625,
-0.006633758544921875,
0.05499267578125,
0.0036468505859375,
0.0246124267578125,
-0.046966552734375,
-0.0667724609375,
0.06256103515625,
0.002716064453125,
0.0179290771484375,
-0.0206146240234375,
-0.040985107421875,
0.00395965576171875,
0.10076904296875,
-0.0599365234375,
-0.01593017578125,
0.04449462890625,
0.00917816162109375,
-0.001964569091796875,
0.0017690658569335938,
-0.06097412109375,
-0.0283203125,
-0.08184814453125,
-0.001209259033203125,
0.020111083984375,
-0.06976318359375,
0.0041961669921875,
0.0013837814331054688,
-0.06280517578125,
-0.0167694091796875,
0.05364990234375,
-0.043731689453125,
0.032073974609375,
0.0169525146484375,
0.0399169921875,
-0.03570556640625,
-0.0185699462890625,
-0.037109375,
-0.10614013671875,
-0.0254669189453125,
0.01016998291015625,
0.06707763671875,
-0.0367431640625,
0.00946044921875,
-0.032989501953125,
0.053680419921875,
0.034698486328125,
-0.023895263671875,
0.03887939453125,
0.00478363037109375,
0.0119171142578125,
-0.021881103515625,
0.0176849365234375,
-0.05108642578125,
0.0001552104949951172,
0.023101806640625,
-0.019439697265625,
0.06640625,
-0.00843048095703125,
-0.0157470703125,
0.033172607421875,
-0.043701171875,
-0.01198577880859375,
-0.069091796875,
-0.043487548828125,
0.006622314453125,
-0.007595062255859375,
-0.002079010009765625,
-0.085205078125,
-0.026885986328125,
-0.031890869140625,
-0.032379150390625,
-0.034576416015625,
0.049224853515625,
0.041229248046875,
0.0391845703125,
0.01311492919921875,
-0.06524658203125,
-0.0087432861328125,
0.03826904296875,
0.0225372314453125,
-0.0123748779296875,
0.01514434814453125,
-0.0255126953125,
-0.00083160400390625,
0.01248931884765625,
0.031646728515625,
-0.04534912109375,
0.0926513671875,
-0.046722412109375,
-0.0452880859375,
0.05511474609375,
-0.0592041015625,
-0.0273284912109375,
0.0005269050598144531,
-0.01593017578125,
-0.0188140869140625,
-0.0181121826171875,
0.0251007080078125,
-0.01313018798828125,
0.0277862548828125,
-0.0220184326171875,
-0.0133056640625,
0.0040435791015625,
-0.0250091552734375,
0.05035400390625,
0.024932861328125,
-0.0009365081787109375,
0.004329681396484375,
-0.0163116455078125,
-0.0038890838623046875,
0.003063201904296875,
-0.02899169921875,
0.003154754638671875,
-0.0005669593811035156,
0.039642333984375,
-0.007770538330078125,
0.01348876953125,
0.014007568359375,
0.0416259765625,
0.01535797119140625,
-0.0234222412109375,
-0.047149658203125,
-0.0025482177734375,
0.0186920166015625,
-0.0033664703369140625,
0.0158843994140625,
0.008544921875,
0.01172637939453125,
-0.0079803466796875,
0.016571044921875,
0.031982421875,
0.004505157470703125,
-0.01502227783203125,
0.04302978515625,
0.007904052734375,
-0.0086517333984375,
-0.0180206298828125,
0.059417724609375,
-0.0002894401550292969,
0.01262664794921875,
-0.004924774169921875,
0.00606536865234375,
-0.00844573974609375,
0.061767578125,
0.0254974365234375,
-0.041473388671875,
0.0077667236328125,
0.027679443359375,
0.007396697998046875,
-0.019775390625,
0.00936126708984375,
0.01123046875,
0.032470703125,
0.007434844970703125,
-0.0037136077880859375,
0.0099334716796875,
-0.035552978515625,
-0.0211334228515625,
0.00701904296875,
-0.01331329345703125,
-0.042724609375,
0.00514984130859375,
0.009918212890625,
0.0006175041198730469,
-0.0224151611328125,
0.00725555419921875,
-0.0122528076171875,
-0.0222625732421875,
0.01519775390625,
-0.04327392578125,
0.003814697265625,
-0.016998291015625,
-0.021026611328125,
-0.042083740234375,
-0.0151824951171875,
0.0036144256591796875,
-0.051544189453125,
-0.03424072265625,
0.0037021636962890625,
-0.0193634033203125,
0.00046825408935546875,
-0.036590576171875,
0.0279693603515625,
-0.01357269287109375,
0.017333984375,
-0.0256500244140625,
0.03497314453125,
0.0043182373046875,
0.0006852149963378906,
-0.00931549072265625,
-0.002105712890625,
-0.037078857421875,
-0.01380157470703125,
-0.028045654296875,
-0.058685302734375,
-0.02783203125,
-0.0195465087890625,
0.024017333984375,
0.034454345703125,
-0.0135498046875,
-0.05517578125,
-0.0178375244140625,
-0.00647735595703125,
0.018646240234375,
0.035491943359375,
-0.00850677490234375,
0.039886474609375,
0.0016603469848632812,
0.07537841796875,
0.007720947265625,
0.01165771484375,
-0.0034942626953125,
-0.0268402099609375,
0.02374267578125,
-0.0242767333984375,
-0.05682373046875,
-0.044403076171875,
-0.001956939697265625,
0.0379638671875,
0.0738525390625,
-0.02362060546875,
0.0031890869140625,
-0.0028133392333984375,
-0.0035457611083984375,
-0.00333404541015625,
0.03399658203125,
0.040985107421875,
0.012603759765625,
0.0457763671875,
-0.0450439453125,
-0.01088714599609375,
-0.0014858245849609375,
0.009429931640625,
0.04119873046875,
-0.0299072265625,
0.019073486328125,
0.02630615234375,
-0.08709716796875,
0.0589599609375,
0.062103271484375,
0.049713134765625,
0.06573486328125,
-0.019134521484375,
0.040802001953125,
0.016754150390625,
-0.01351165771484375,
0.024658203125,
0.0187225341796875,
0.048858642578125,
-0.0171356201171875,
-0.016876220703125,
0.035186767578125,
-0.02294921875,
0.035064697265625,
0.04083251953125,
0.07379150390625,
-0.069091796875,
0.029693603515625,
0.0234527587890625,
-0.00604248046875,
0.04046630859375,
-0.0281829833984375,
0.0266876220703125,
-0.008941650390625,
0.04193115234375,
0.0288848876953125,
-0.020599365234375,
0.02105712890625,
-0.0079345703125,
-0.0176544189453125,
-0.0269927978515625,
0.00795745849609375,
-0.00344085693359375,
-0.00658416748046875,
-0.0002579689025878906,
-0.0193023681640625,
-0.003391265869140625,
-0.0067138671875,
-0.02288818359375,
-0.01218414306640625,
-0.031524658203125,
-0.063232421875,
-0.035614013671875,
-0.045684814453125,
0.00450897216796875,
0.06866455078125,
0.002834320068359375,
0.035888671875,
0.045562744140625,
-0.02032470703125,
0.05670166015625,
-0.01690673828125,
0.0042572021484375,
-0.002033233642578125,
-0.03387451171875,
0.0014104843139648438,
0.021148681640625,
-0.0306396484375,
0.016876220703125,
0.00769805908203125,
-0.032867431640625,
-0.0181427001953125,
-0.045013427734375,
0.04876708984375,
-0.00904083251953125,
-0.01509857177734375,
0.028594970703125,
0.021636962890625,
-0.0280914306640625,
0.0144500732421875,
0.00763702392578125,
-0.0261077880859375,
-0.0032901763916015625,
0.0181121826171875,
-0.043304443359375,
-0.0399169921875,
0.02154541015625,
-0.0721435546875,
0.055145263671875,
0.00690460205078125,
0.023773193359375,
-0.0274810791015625,
0.01532745361328125,
-0.0034389495849609375,
-0.005859375,
-0.0033321380615234375,
0.0206298828125,
0.0014820098876953125,
0.02020263671875,
-0.047576904296875,
-0.02252197265625,
-0.02587890625,
0.0789794921875,
0.0341796875,
0.01145172119140625,
-0.03131103515625,
-0.02313232421875,
0.0140228271484375,
0.07659912109375,
0.039947509765625,
0.00676727294921875,
-0.01117706298828125,
0.05255126953125,
0.018310546875,
0.008209228515625,
0.046600341796875,
-0.01097869873046875,
-0.09002685546875,
0.006557464599609375,
0.003299713134765625,
-0.0104827880859375,
-0.02008056640625,
0.029296875,
0.0150909423828125,
-0.0205078125,
-0.01331329345703125,
-0.03973388671875,
-0.003086090087890625,
0.0305938720703125,
0.0160369873046875,
-0.0143585205078125,
-0.01898193359375,
-0.017608642578125,
0.036285400390625,
-0.0004189014434814453,
0.01390838623046875,
0.00701141357421875,
0.0166015625,
0.032958984375,
-0.02960205078125,
0.0059814453125,
0.0171356201171875,
-0.0322265625,
0.045166015625,
0.031768798828125,
0.02874755859375,
-0.03948974609375,
0.004001617431640625,
0.0287628173828125,
0.06585693359375,
-0.04534912109375,
-0.019134521484375,
0.015472412109375,
-0.022369384765625,
0.0016803741455078125,
-0.035430908203125,
-0.013763427734375,
-0.0096282958984375,
-0.00434112548828125,
-0.04583740234375,
0.00998687744140625,
-0.0072174072265625,
0.035369873046875,
-0.0270843505859375,
0.0002486705780029297,
-0.027191162109375,
-0.00738525390625,
-0.04010009765625,
-0.002864837646484375,
0.0234527587890625,
0.052886962890625,
0.0419921875,
0.033294677734375,
0.0215606689453125,
-0.0193634033203125,
-0.018096923828125,
0.0225067138671875,
-0.006198883056640625,
0.0185699462890625,
-0.054168701171875,
-0.0433349609375,
0.035552978515625,
0.044036865234375,
0.007427215576171875,
0.044097900390625,
0.031951904296875,
0.024261474609375,
0.0133514404296875,
0.0018739700317382812,
0.0509033203125,
-0.0209503173828125,
-0.0171051025390625,
-0.052520751953125,
0.06353759765625,
0.0494384765625,
0.03216552734375,
0.016693115234375,
0.01248931884765625,
0.056121826171875,
0.0220184326171875,
-0.0126190185546875,
0.0210113525390625,
-0.0157012939453125,
0.03778076171875,
0.023834228515625,
0.0279693603515625,
0.0276031494140625,
-0.05316162109375,
-0.016357421875,
-0.038116455078125,
-0.015655517578125,
0.0229034423828125,
0.031951904296875,
-0.0053558349609375,
0.022064208984375,
0.0021457672119140625,
0.0013437271118164062,
0.018798828125,
-0.0191650390625,
0.040069580078125,
0.050262451171875,
0.0161590576171875,
0.033294677734375,
-0.06732177734375,
-0.0382080078125,
-0.0179901123046875,
0.039459228515625,
-0.001377105712890625,
0.050323486328125,
0.004878997802734375,
0.00820159912109375,
-0.036773681640625,
-0.035552978515625,
0.01512908935546875,
-0.048187255859375,
0.033447265625,
0.026397705078125,
-0.01302337646484375,
-0.00923919677734375,
-0.0030193328857421875,
0.003803253173828125,
0.05181884765625,
-0.0307159423828125,
-0.00605010986328125,
0.01030731201171875,
0.0157318115234375,
-0.030792236328125,
-0.0149993896484375,
-0.0367431640625,
-0.007724761962890625,
-0.031219482421875,
-0.01434326171875,
0.0279693603515625,
0.0032749176025390625,
-0.01363372802734375,
0.00785064697265625,
0.040374755859375,
-0.01251983642578125,
0.0128631591796875,
0.01345062255859375,
0.0284271240234375,
0.03302001953125,
0.0026092529296875,
-0.013458251953125,
-0.0033416748046875,
-0.014739990234375,
0.03143310546875,
0.00640869140625,
0.0159912109375,
0.039520263671875,
-0.050140380859375,
0.0203704833984375,
0.0303955078125,
0.0216827392578125,
-0.0457763671875,
-0.01751708984375,
0.050384521484375,
-0.0084381103515625,
-0.0049591064453125,
0.029022216796875,
-0.00713348388671875,
-0.043670654296875,
-0.0286102294921875,
-0.00655364990234375,
-0.019439697265625,
0.007137298583984375,
-0.00733184814453125,
0.01849365234375,
0.016143798828125,
-0.00893402099609375,
-0.03717041015625,
0.0174560546875,
-0.02691650390625,
0.0276641845703125,
-0.009765625,
-0.0196685791015625,
0.021392822265625,
0.07574462890625,
-0.0131072998046875,
-0.018768310546875,
-0.004344940185546875,
0.01271820068359375,
-0.0111236572265625,
0.0191802978515625,
0.007495880126953125,
-0.0206298828125,
0.0124053955078125,
0.01267242431640625,
0.0237884521484375,
0.04364013671875,
0.03582763671875,
-0.0217742919921875,
-0.004749298095703125,
0.014251708984375,
-0.0161895751953125,
-0.05462646484375,
0.007472991943359375,
-0.050689697265625,
-0.021331787109375,
-0.0187225341796875,
0.0196075439453125,
0.03955078125,
-0.01611328125,
-0.021728515625,
-0.005519866943359375,
0.01151275634765625,
-0.0300445556640625,
-0.075927734375,
0.0009074211120605469,
0.007007598876953125,
0.03326416015625,
-0.014617919921875,
-0.025665283203125,
-0.032806396484375,
0.034393310546875,
-0.0087738037109375,
0.0121307373046875,
0.03240966796875,
-0.0267333984375,
-0.023834228515625,
-0.0272674560546875,
-0.0132293701171875,
-0.02252197265625,
-0.0220794677734375,
-0.0138092041015625,
0.01678466796875,
0.013946533203125,
-0.043975830078125,
-0.03167724609375,
0.0251617431640625,
0.04412841796875,
-0.00479888916015625,
-0.051544189453125,
0.0211029052734375,
-0.005588531494140625,
0.040802001953125,
-0.033721923828125,
0.004924774169921875,
-0.023895263671875,
0.005245208740234375,
-0.0682373046875,
-0.0097808837890625,
-0.0237884521484375,
-0.0128021240234375,
-0.053009033203125,
-0.011199951171875,
0.0146636962890625,
-0.01593017578125,
0.0127716064453125,
0.006805419921875,
-0.02191162109375,
0.0183563232421875,
0.06591796875,
0.02130126953125,
-0.06988525390625,
0.0008325576782226562,
0.06414794921875,
-0.040008544921875,
0.000698089599609375,
0.00672149658203125,
-0.0027408599853515625,
0.0241241455078125,
-0.00579833984375,
0.00618743896484375,
0.00214385986328125,
-0.034393310546875,
0.0110321044921875,
-0.00669097900390625,
0.07159423828125,
-0.042327880859375,
-0.0292205810546875,
-0.0244903564453125,
0.0191802978515625,
-0.011077880859375,
0.015899658203125,
0.00466156005859375,
0.03857421875,
0.01187896728515625,
0.052032470703125,
-0.02435302734375,
0.015350341796875,
-0.00921630859375,
0.0223846435546875,
-0.0013980865478515625,
0.00667572021484375,
0.0450439453125,
-0.0251922607421875,
-0.006855010986328125,
-0.02166748046875,
-0.006145477294921875,
-0.0277557373046875,
-0.0009694099426269531,
0.0275421142578125,
-0.03369140625,
0.0237274169921875
]
|
34c24d20265c083d63605f3123bed3097d8daba1 | Wordpress Stackexchange
Q: $wpdb->get_results(...) returns empty array despite correct query As title implies, I cannot seem to get $wpdb->get_results to give results. Running the "raw" query is successful, but this seems to be failing for some strange unknown reason.
global $wpdb;
$sql = "SELECT *
FROM something aki,
somethingelse akb,
somethingelseelse ac
WHERE aki.keyID = akb.keyID
AND akb.someID = ac.someID
AND aki.type LIKE '%thing%'";
$corps = $wpdb->get_results($sql, OBJECT);
var_dump($corps);
A: Use $wpdb->show_errors( true ) before the query and see what error comes back.
My problem (because I've experienced the same thing) was that I should use $wpdb->posts instead of wp_posts inside the query. The prefix of the tables can change from WP installation to installation or even in the same installation depending on the time (e.g. an admin can change the prefix whenever he likes). So, one should write the query like that:
$query = "select <stuff here> from $wpdb->posts where <stuff here>";
| Q: $wpdb->get_results(...) returns empty array despite correct query As title implies, I cannot seem to get $wpdb->get_results to give results. Running the "raw" query is successful, but this seems to be failing for some strange unknown reason.
global $wpdb;
$sql = "SELECT *
FROM something aki,
somethingelse akb,
somethingelseelse ac
WHERE aki.keyID = akb.keyID
AND akb.someID = ac.someID
AND aki.type LIKE '%thing%'";
$corps = $wpdb->get_results($sql, OBJECT);
var_dump($corps);
A: Use $wpdb->show_errors( true ) before the query and see what error comes back.
My problem (because I've experienced the same thing) was that I should use $wpdb->posts instead of wp_posts inside the query. The prefix of the tables can change from WP installation to installation or even in the same installation depending on the time (e.g. an admin can change the prefix whenever he likes). So, one should write the query like that:
$query = "select <stuff here> from $wpdb->posts where <stuff here>";
A: I was troubleshooting my script that produced an empty array in WordPress with a seemingly healthy MySQL string. It turned out that, unlike the person who asked the question, I used $wpdb->prepare(), but the solution I found may still be useful to someone who comes across this Q&A (as I have).
This string, AND aki.type LIKE '%thing%'", contains percentage wilcards (%) that indicate that we're looking for aki.type cell that contains the thing as part of its value.
$wpdb->prepare converts them into hashes, and the MySQL server gets something like this: AND aki.type LIKE '{399038939300d2c307c53b29a166ee90101da7b2aba7978a898694010bf1bfe6}thing{399038939300d2c307c53b29a166ee90101da7b2aba7978a898694010bf1bfe6}'. Naturally, one would get no results!
The wpdb::prepare page reads, 'Literal percentage signs (%) in the query string must be written as %%. Percentage wildcards (for example, to use in LIKE syntax) must be passed via a substitution argument containing the complete LIKE string, these cannot be inserted directly in the query string. Also see wpdb::esc_like().'
So, the LIKE part must be prepared like this (example from the wpdb::esc_like() page):
$wild = '%';
$find = 'only 43% of planets';
$like = $wild . $wpdb->esc_like( $find ) . $wild;
$sql = $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_content LIKE %s", $like );
Where $wpdb->esc_like() should go before $wpdb->prepare().
And if one wants to replace percentage wildcard placeholders manually, they should use $wpdb->remove_placeholder_escape() after $wpdb->prepare().
A: May be a bit late, but you are missing the "prepare" call necessary in wordpress:
$Table_Name = $wpdb->prefix.'Your Table Name';
$sql_query = $wpdb->prepare("SELECT * FROM $Table_Name WHERE aki.keyID=%d AND akb.someID=%d AND aki.type like %s", akb.keyID, ac.someID, ''%thing%');
$result = $wpdb->query( $sql_query );
Multiple results can be found in the array.
A: I had the same issue a, a good sql statement, no errors, but no results using wpdb.
The fix for me was a matter of having the correct collation/character encoding (e.g. COLLATE 'utf8_general_ci') for my table.
I had a query that worked, the table was replaced with a dump from an other server (and older server) and my query stopped working. It returned NULL or 0 even thought running the query in the database returned the proper results.
I create the tables both ways (a couple times because I did not believe it), ran the same data insert script, and did not change my PHP/wpdb code.
When the table was created with this this, my query did NOT work.
CREATE TABLE IF NOT EXISTS `vf_user` (
`id` mediumint(9) NOT NULL AUTO_INCREMENT,
`email` varchar(50) NOT NULL,
`full_name` varchar(25) NOT NULL,
`password` varchar(25) NOT NULL,
`role` enum('user','tester','admin') NOT NULL DEFAULT 'user',
`phone` varchar(25) NOT NULL,
`last_modified` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user_activation_key` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `email` (`email`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=325 DEFAULT CHARSET=utf8 COMMENT='users table';
When it was created with this, my query did return results
CREATE TABLE `vf_user` (
`id` MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
`email` VARCHAR(50) NOT NULL COLLATE 'utf8_general_ci',
`full_name` VARCHAR(25) NOT NULL COLLATE 'utf8_general_ci',
`password` VARCHAR(25) NOT NULL COLLATE 'utf8_general_ci',
`role` ENUM('user','tester','admin') NOT NULL DEFAULT 'user' COLLATE 'utf8_general_ci',
`phone` VARCHAR(25) NOT NULL COLLATE 'utf8_general_ci',
`last_modified` TIMESTAMP NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`user_activation_key` VARCHAR(100) NULL DEFAULT NULL COLLATE 'utf8_general_ci',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `email` (`email`) USING BTREE
)
COMMENT='users with access to the virtual festival'
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=325
;
A: Wpdb->get_results function from wordpress returns the result if successful otherwise it will return null. There can be many reasons if a query get failed.Refer in-depth article on debugging get_results() returning empty results here
Although you can use functions like wpdb->show_error() to check what was the last error after executing the sql query. sometimes this error returns empty then try to use wpdb->last_query to check the final query that get formed.
| wordpress | {
"language": "en",
"length": 768,
"provenance": "stackexchange_00019.jsonl.gz:449055",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/162170"
} | [
0.01222991943359375,
-0.006977081298828125,
-0.0023365020751953125,
0.0283203125,
-0.009765625,
-0.026641845703125,
0.053192138671875,
-0.0246429443359375,
0.04180908203125,
0.048248291015625,
-0.07318115234375,
-0.00627899169921875,
0.0004837512969970703,
0.007534027099609375,
-0.04412841796875,
-0.044403076171875,
0.059661865234375,
-0.0574951171875,
-0.005462646484375,
0.0091094970703125,
-0.005413055419921875,
0.046051025390625,
0.0087890625,
0.02764892578125,
0.0241241455078125,
-0.042236328125,
0.053802490234375,
0.025299072265625,
0.0099029541015625,
-0.0027332305908203125,
0.0205841064453125,
-0.01788330078125,
-0.00804901123046875,
0.0526123046875,
-0.00782012939453125,
0.01458740234375,
0.045166015625,
0.0045318603515625,
0.0097503662109375,
0.053802490234375,
0.0162811279296875,
0.01088714599609375,
0.0213165283203125,
0.0290679931640625,
-0.0287933349609375,
-0.0264129638671875,
0.027374267578125,
-0.00782012939453125,
0.01534271240234375,
-0.0307769775390625,
-0.0135650634765625,
0.03643798828125,
-0.00640106201171875,
-0.00675201416015625,
-0.0157470703125,
0.0156402587890625,
-0.020172119140625,
-0.00617218017578125,
0.0236663818359375,
-0.0033111572265625,
-0.0174713134765625,
-0.0272064208984375,
0.027862548828125,
-0.0124053955078125,
0.0015697479248046875,
0.01727294921875,
0.059844970703125,
-0.0000641942024230957,
-0.006252288818359375,
-0.01047515869140625,
0.01100921630859375,
0.00685882568359375,
-0.0236358642578125,
0.003917694091796875,
-0.049835205078125,
-0.03009033203125,
-0.0027942657470703125,
-0.07086181640625,
0.0148773193359375,
0.013885498046875,
-0.013916015625,
0.0012149810791015625,
-0.08599853515625,
0.02545166015625,
-0.0272064208984375,
0.0258026123046875,
-0.0179290771484375,
-0.0193328857421875,
-0.0310821533203125,
-0.00494384765625,
-0.0080718994140625,
-0.0357666015625,
-0.05322265625,
0.0154876708984375,
0.0147705078125,
-0.0435791015625,
0.0254058837890625,
0.0372314453125,
-0.0177154541015625,
0.0025882720947265625,
-0.02032470703125,
-0.031768798828125,
0.0001456737518310547,
-0.0286102294921875,
0.0311126708984375,
-0.002513885498046875,
-0.0176239013671875,
-0.00862884521484375,
0.06787109375,
0.03436279296875,
0.019775390625,
0.06829833984375,
-0.04156494140625,
-0.0247650146484375,
-0.0263671875,
0.01500701904296875,
-0.048370361328125,
-0.0296478271484375,
0.016632080078125,
-0.04876708984375,
0.006557464599609375,
0.032928466796875,
-0.050537109375,
0.039337158203125,
-0.01551055908203125,
-0.00986480712890625,
0.00946807861328125,
0.0005259513854980469,
-0.01177215576171875,
0.03863525390625,
-0.018463134765625,
0.007114410400390625,
0.0225372314453125,
0.0164642333984375,
-0.005035400390625,
-0.03131103515625,
0.007568359375,
0.0112457275390625,
0.0083770751953125,
0.00026869773864746094,
0.01221466064453125,
-0.026214599609375,
-0.0196990966796875,
0.0012464523315429688,
-0.01384735107421875,
-0.004451751708984375,
0.0276031494140625,
0.0224456787109375,
-0.0199432373046875,
-0.03961181640625,
0.004444122314453125,
0.02545166015625,
-0.0036907196044921875,
0.007785797119140625,
0.0233612060546875,
-0.01210784912109375,
0.0367431640625,
-0.0396728515625,
0.007282257080078125,
-0.03167724609375,
0.044952392578125,
-0.01424407958984375,
-0.003292083740234375,
0.00481414794921875,
-0.03326416015625,
0.01461029052734375,
-0.04913330078125,
-0.0182647705078125,
0.0174713134765625,
0.0148162841796875,
0.0133819580078125,
-0.03887939453125,
0.04620361328125,
-0.02349853515625,
-0.03460693359375,
0.0229949951171875,
0.004764556884765625,
-0.03485107421875,
0.035858154296875,
0.005084991455078125,
-0.03277587890625,
-0.0145721435546875,
0.031768798828125,
-0.00511932373046875,
-0.045196533203125,
0.054779052734375,
0.0081329345703125,
0.058013916015625,
-0.0011167526245117188,
0.0203094482421875,
0.0119476318359375,
0.050994873046875,
-0.051422119140625,
0.03057861328125,
-0.030914306640625,
-0.03338623046875,
-0.046142578125,
-0.01114654541015625,
-0.03363037109375,
0.037384033203125,
0.041046142578125,
-0.0011014938354492188,
0.002643585205078125,
-0.002227783203125,
-0.0033664703369140625,
-0.01148223876953125,
0.007289886474609375,
0.005786895751953125,
-0.0218353271484375,
-0.000823974609375,
0.01898193359375,
0.025970458984375,
-0.047943115234375,
0.0006551742553710938,
-0.028533935546875,
-0.0008454322814941406,
-0.032440185546875,
0.0250701904296875,
0.00164031982421875,
0.048980712890625,
-0.0252227783203125,
-0.03851318359375,
-0.027130126953125,
-0.02642822265625,
0.0433349609375,
-0.038360595703125,
0.01123809814453125,
-0.0258636474609375,
0.08074951171875,
-0.028533935546875,
0.0271453857421875,
0.01428985595703125,
0.039886474609375,
0.085693359375,
-0.01403045654296875,
-0.03631591796875,
-0.0177001953125,
-0.048583984375,
0.03045654296875,
0.0423583984375,
0.035552978515625,
0.0268096923828125,
-0.004123687744140625,
-0.01181793212890625,
0.05084228515625,
-0.0367431640625,
0.007762908935546875,
-0.02587890625,
-0.0034236907958984375,
0.04010009765625,
0.051025390625,
-0.0013628005981445312,
-0.00421905517578125,
0.040863037109375,
-0.0128936767578125,
0.01432037353515625,
-0.01393890380859375,
0.031402587890625,
0.0173492431640625,
-0.003322601318359375,
-0.01177978515625,
0.00021541118621826172,
0.027313232421875,
-0.0181732177734375,
0.01467132568359375,
-0.00766754150390625,
0.006916046142578125,
0.0069732666015625,
-0.016693115234375,
0.00011879205703735352,
0.01319122314453125,
-0.033294677734375,
-0.00203704833984375,
0.0206298828125,
-0.0264129638671875,
-0.0036067962646484375,
-0.022064208984375,
0.0092315673828125,
0.01277923583984375,
-0.001506805419921875,
0.017547607421875,
0.056610107421875,
-0.0150146484375,
-0.01302337646484375,
-0.0008482933044433594,
-0.031829833984375,
-0.0073089599609375,
0.013824462890625,
-0.02435302734375,
0.01029205322265625,
0.01413726806640625,
0.06683349609375,
-0.0177764892578125,
0.0523681640625,
-0.04095458984375,
0.0301361083984375,
0.07666015625,
-0.04248046875,
0.0240631103515625,
-0.036590576171875,
0.05242919921875,
0.05548095703125,
0.0025463104248046875,
-0.0177764892578125,
-0.007602691650390625,
0.005962371826171875,
0.0187530517578125,
0.0020961761474609375,
-0.0133819580078125,
-0.01678466796875,
-0.0501708984375,
-0.0005698204040527344,
0.040435791015625,
0.0947265625,
-0.01351165771484375,
-0.055084228515625,
0.0167999267578125,
0.05242919921875,
-0.0714111328125,
-0.11492919921875,
-0.007740020751953125,
0.0012826919555664062,
-0.01419830322265625,
-0.01611328125,
0.0021915435791015625,
0.0275421142578125,
-0.050506591796875,
-0.01309967041015625,
0.009765625,
0.0012140274047851562,
-0.07269287109375,
-0.045440673828125,
-0.08502197265625,
-0.005130767822265625,
-0.01087188720703125,
0.03717041015625,
0.00640869140625,
0.023406982421875,
0.0035152435302734375,
-0.033477783203125,
-0.002521514892578125,
0.05670166015625,
-0.020782470703125,
-0.0360107421875,
0.0214996337890625,
-0.00745391845703125,
0.006195068359375,
0.00013530254364013672,
0.0179290771484375,
0.02130126953125,
-0.0205841064453125,
-0.0179290771484375,
0.05230712890625,
0.02606201171875,
0.06207275390625,
-0.0054168701171875,
-0.071044921875,
0.0294342041015625,
0.04376220703125,
-0.04327392578125,
-0.007610321044921875,
-0.038330078125,
-0.0379638671875,
0.0499267578125,
0.006359100341796875,
0.000637054443359375,
0.0080718994140625,
0.025787353515625,
0.041259765625,
-0.008758544921875,
-0.0458984375,
-0.017547607421875,
0.07879638671875,
0.040130615234375,
0.07745361328125,
-0.0029735565185546875,
0.0109405517578125,
-0.002178192138671875,
-0.016754150390625,
-0.00714111328125,
0.0478515625,
0.0211029052734375,
-0.034637451171875,
-0.05316162109375,
-0.04656982421875,
0.05291748046875,
0.00039386749267578125,
-0.0032291412353515625,
-0.04150390625,
-0.0238189697265625,
-0.0309295654296875,
0.08270263671875,
-0.0021266937255859375,
-0.03594970703125,
-0.02630615234375,
0.03717041015625,
-0.068359375,
-0.06939697265625,
0.0178375244140625,
0.0122528076171875,
-0.054046630859375,
0.004940032958984375,
-0.004299163818359375,
-0.0156097412109375,
-0.00510406494140625,
-0.029083251953125,
-0.0306549072265625,
-0.043792724609375,
0.043487548828125,
-0.006748199462890625,
-0.0025234222412109375,
0.0237274169921875,
-0.006793975830078125,
-0.0111846923828125,
-0.0201873779296875,
0.004535675048828125,
-0.0745849609375,
-0.02056884765625,
0.035552978515625,
0.0274658203125,
-0.05181884765625,
0.052642822265625,
-0.0215301513671875,
0.044769287109375,
-0.010711669921875,
-0.03729248046875,
0.0296630859375,
0.048553466796875,
-0.025634765625,
-0.0305633544921875,
0.0048370361328125,
-0.05328369140625,
-0.03863525390625,
-0.056976318359375,
-0.004772186279296875,
-0.0044708251953125,
-0.006160736083984375,
-0.0075531005859375,
-0.0310211181640625,
0.00965118408203125,
0.053985595703125,
-0.00435638427734375,
-0.03192138671875,
0.033416748046875,
-0.054351806640625,
0.0093841552734375,
-0.013092041015625,
0.0233001708984375,
0.0293121337890625,
0.00980377197265625,
-0.0158843994140625,
0.007568359375,
0.0006003379821777344,
0.01532745361328125,
-0.039886474609375,
-0.052886962890625,
0.00738525390625,
0.017669677734375,
-0.01654052734375,
0.039215087890625,
0.0106048583984375,
-0.01122283935546875,
0.013153076171875,
-0.01532745361328125,
0.036163330078125,
-0.0240478515625,
0.054595947265625,
0.013092041015625,
0.0029659271240234375,
0.033447265625,
0.0103607177734375,
-0.05517578125,
0.037139892578125,
-0.003879547119140625,
-0.0272064208984375,
0.00817108154296875,
0.046142578125,
-0.01122283935546875,
0.0094146728515625,
-0.03271484375,
-0.0276336669921875,
0.0178070068359375,
0.002338409423828125,
0.0222930908203125,
-0.0262298583984375,
0.0299224853515625,
-0.014892578125,
0.025787353515625,
0.00565338134765625,
0.007175445556640625,
0.02618408203125,
0.0032863616943359375,
0.03662109375,
0.000016033649444580078,
-0.0081787109375,
-0.0281219482421875,
-0.006885528564453125,
0.045623779296875,
-0.00980377197265625,
-0.0556640625,
0.015960693359375,
-0.0183868408203125,
0.044921875,
0.0302734375,
0.002269744873046875,
0.02239990234375,
0.004974365234375,
-0.002689361572265625,
0.0194549560546875,
-0.01166534423828125,
-0.015899658203125,
-0.031341552734375,
0.0026760101318359375,
0.01593017578125,
-0.0191802978515625,
-0.01326751708984375,
0.06494140625,
-0.031158447265625,
0.039154052734375,
-0.0068817138671875,
-0.01251220703125,
-0.01611328125,
0.08038330078125,
0.0011749267578125,
-0.040313720703125,
0.00891876220703125,
0.06719970703125,
0.033111572265625,
-0.036834716796875,
-0.0034008026123046875,
-0.019317626953125,
0.0031795501708984375,
-0.01407623291015625,
-0.019927978515625,
0.07086181640625,
0.018096923828125,
-0.0272216796875,
0.06317138671875,
0.03961181640625,
-0.04351806640625,
-0.0628662109375,
-0.0134124755859375,
0.0513916015625,
0.01094818115234375,
-0.0174560546875,
0.018829345703125,
-0.033721923828125,
0.0008759498596191406,
-0.0182342529296875,
-0.025848388671875,
0.00035691261291503906,
0.01116180419921875,
-0.00884246826171875,
-0.0350341796875,
-0.0225677490234375,
-0.004207611083984375,
0.014495849609375,
-0.007343292236328125,
-0.019805908203125,
0.0137939453125,
-0.05755615234375,
0.038421630859375,
-0.03570556640625,
0.0171051025390625,
-0.061767578125,
0.01371002197265625,
0.050262451171875,
0.071044921875,
-0.004253387451171875,
-0.0211334228515625,
-0.007785797119140625,
-0.021575927734375,
0.055999755859375,
-0.002361297607421875,
-0.00972747802734375,
-0.037109375,
0.00963592529296875,
0.007617950439453125,
0.029052734375,
-0.0220947265625,
-0.04656982421875,
0.0021114349365234375,
0.031463623046875,
-0.0013246536254882812,
-0.0311279296875,
0.075927734375,
-0.0193023681640625,
0.04071044921875,
-0.00012791156768798828,
0.031768798828125,
-0.021728515625,
-0.0005402565002441406,
-0.0018405914306640625,
-0.0604248046875,
-0.01898193359375,
0.0185394287109375,
-0.03741455078125,
-0.00516510009765625,
-0.004364013671875,
0.003330230712890625,
0.035736083984375,
0.00809478759765625,
0.00476837158203125,
-0.00948333740234375,
0.0159149169921875,
-0.0198822021484375,
0.0394287109375,
0.041015625,
-0.01806640625,
0.0011415481567382812,
-0.023101806640625,
-0.00740814208984375,
-0.016143798828125,
-0.018280029296875,
-0.0218658447265625,
0.02056884765625,
0.0015478134155273438,
0.0242919921875,
0.052276611328125,
-0.01096343994140625,
0.0276336669921875,
-0.0012149810791015625,
-0.007015228271484375,
0.007080078125,
0.0010194778442382812,
0.004924774169921875,
-0.016204833984375,
0.04833984375,
-0.0026073455810546875,
-0.0305328369140625,
0.056304931640625,
-0.0401611328125,
0.00870513916015625,
0.04888916015625,
0.049530029296875,
-0.064208984375,
0.0084381103515625,
0.0157318115234375,
-0.0148162841796875,
-0.0295562744140625,
0.025482177734375,
-0.03253173828125,
-0.0511474609375,
-0.017974853515625,
-0.0163116455078125,
-0.006061553955078125,
-0.00681304931640625,
0.007747650146484375,
0.0177001953125,
-0.01358795166015625,
0.09271240234375,
0.0192108154296875,
-0.0345458984375,
0.03106689453125,
0.01247406005859375,
0.0211334228515625,
0.0036487579345703125,
0.0062103271484375,
-0.008941650390625,
-0.028900146484375,
-0.07769775390625,
-0.0271453857421875,
-0.01404571533203125,
-0.0218658447265625,
-0.0302581787109375,
0.00417327880859375,
0.0085906982421875,
0.051055908203125,
-0.0379638671875,
0.016387939453125,
0.022674560546875,
-0.004108428955078125,
-0.0328369140625,
-0.017913818359375,
-0.0059051513671875,
0.0543212890625,
-0.0233612060546875,
0.03497314453125,
-0.00792694091796875,
-0.007720947265625,
-0.005420684814453125,
-0.0396728515625,
0.03155517578125,
-0.0085296630859375,
-0.0142974853515625,
0.008148193359375,
0.0173187255859375,
0.00815582275390625,
0.01134490966796875,
0.038421630859375,
-0.0682373046875,
-0.01806640625,
0.030792236328125,
0.01690673828125,
-0.00907135009765625,
0.0252227783203125,
-0.045562744140625,
0.04681396484375,
-0.001678466796875,
-0.0121002197265625,
0.0237274169921875,
0.007183074951171875,
-0.038421630859375,
-0.0092315673828125,
-0.058258056640625,
0.045989990234375,
-0.0084075927734375,
0.0259552001953125,
-0.06365966796875,
-0.003322601318359375,
-0.0169830322265625,
0.02685546875,
0.033538818359375,
-0.0019321441650390625,
-0.0272216796875,
0.011260986328125,
0.06622314453125,
0.0168914794921875,
0.00598907470703125,
0.03814697265625,
0.0216522216796875,
0.0689697265625,
0.052032470703125,
-0.0654296875,
0.0279388427734375,
-0.0310211181640625,
0.0092010498046875,
0.039794921875,
0.008636474609375,
0.0117950439453125,
-0.0175018310546875,
0.01157379150390625,
-0.006748199462890625,
-0.0098876953125,
0.00676727294921875,
-0.016326904296875,
0.03778076171875,
0.02996826171875,
0.062286376953125,
-0.057586669921875,
-0.0296630859375,
-0.0272979736328125,
0.042816162109375,
0.0155029296875,
0.0234222412109375,
0.013641357421875,
0.0164031982421875,
0.07916259765625,
-0.032684326171875,
0.0026760101318359375,
0.01309967041015625,
-0.0152740478515625,
0.056915283203125,
0.019195556640625,
0.0323486328125,
-0.04547119140625,
-0.03265380859375,
0.03802490234375,
0.0703125,
-0.0390625,
-0.033172607421875,
0.00940704345703125,
-0.0128326416015625,
-0.007678985595703125,
0.00176239013671875,
0.0078887939453125,
0.07403564453125,
0.078369140625,
-0.006549835205078125,
-0.008087158203125,
0.0219573974609375,
-0.00569915771484375,
-0.011962890625,
-0.01849365234375,
0.02728271484375,
0.0030574798583984375,
0.01209259033203125,
-0.041656494140625,
0.0259246826171875,
0.052154541015625,
-0.0017747879028320312,
0.01336669921875,
-0.08013916015625,
-0.0005764961242675781,
-0.019561767578125,
0.04833984375,
-0.0192413330078125,
0.054718017578125,
-0.05853271484375,
-0.042999267578125,
-0.0011129379272460938,
0.041717529296875,
0.0103759765625,
-0.0229339599609375,
0.00447845458984375,
0.0098876953125,
-0.0226287841796875,
-0.006114959716796875,
0.04107666015625,
-0.007537841796875,
-0.059417724609375,
-0.0177764892578125,
-0.002170562744140625,
0.0526123046875,
0.0263214111328125,
0.030120849609375,
0.051483154296875,
0.007266998291015625,
-0.019073486328125,
0.0301055908203125,
-0.00934600830078125,
-0.0139617919921875,
0.004810333251953125,
-0.01690673828125,
0.02880859375,
0.0009303092956542969,
-0.081787109375,
-0.0218505859375,
-0.01727294921875,
-0.0114593505859375,
-0.008514404296875,
0.029541015625,
0.0163421630859375,
-0.00007522106170654297,
0.0148468017578125,
-0.040985107421875,
0.02020263671875,
0.016754150390625,
0.01418304443359375,
-0.01421356201171875,
0.0124969482421875,
-0.0223236083984375,
-0.043701171875,
-0.0239410400390625,
-0.0052032470703125,
0.01416015625,
-0.0219879150390625,
0.04986572265625,
0.01319122314453125,
0.00334930419921875,
-0.01290130615234375,
0.007297515869140625,
-0.01090240478515625,
-0.0181732177734375,
0.0176849365234375,
-0.0171356201171875,
-0.004688262939453125,
-0.0006670951843261719,
0.0036563873291015625,
0.0038013458251953125,
0.036285400390625,
-0.0271759033203125,
-0.01110076904296875,
-0.036529541015625,
0.0374755859375,
0.006961822509765625,
0.0306854248046875,
-0.0177001953125,
-0.0002295970916748047,
-0.0135498046875,
-0.022003173828125,
0.0479736328125,
0.0423583984375,
0.0045013427734375,
0.045135498046875,
0.005764007568359375,
-0.0170745849609375,
0.0287322998046875,
-0.07012939453125,
0.06256103515625,
0.050018310546875,
-0.0218658447265625,
0.01522064208984375,
-0.03594970703125,
-0.032257080078125,
-0.016876220703125,
0.01291656494140625,
-0.01256561279296875,
-0.010986328125,
0.0236358642578125,
-0.006206512451171875,
-0.01415252685546875,
0.043609619140625,
-0.00786590576171875,
0.0185089111328125,
-0.0135498046875,
0.01045989990234375,
-0.0020046234130859375,
-0.0201263427734375,
-0.0290069580078125,
-0.0316162109375,
-0.020782470703125,
-0.0038623809814453125,
-0.01611328125,
-0.053314208984375,
-0.004116058349609375,
0.020660400390625,
0.00310516357421875,
0.016448974609375,
-0.0758056640625,
0.045684814453125,
0.000316619873046875,
0.041259765625,
-0.03082275390625,
-0.0037899017333984375,
0.01464080810546875,
0.046295166015625,
-0.006134033203125,
-0.02606201171875,
0.0137176513671875,
0.0302276611328125,
0.0016384124755859375,
0.0003743171691894531,
0.0372314453125,
-0.0174102783203125,
-0.07684326171875,
0.003154754638671875,
-0.00555419921875,
0.0240631103515625,
0.0230255126953125,
-0.008087158203125,
0.0240478515625,
-0.02069091796875,
-0.0416259765625,
-0.054290771484375,
0.050689697265625,
-0.08746337890625,
-0.0283355712890625,
-0.018280029296875,
0.01389312744140625,
0.00823974609375,
-0.031524658203125,
-0.072509765625,
0.04705810546875,
-0.0140533447265625,
-0.013671875,
-0.04400634765625,
-0.0217437744140625,
0.01474761962890625,
-0.0281829833984375,
-0.040863037109375,
0.032196044921875,
-0.0684814453125,
0.003650665283203125,
0.01971435546875,
0.01029205322265625,
0.01467132568359375,
0.0274658203125,
-0.093505859375,
-0.004322052001953125,
-0.041961669921875,
0.018310546875,
-0.0115814208984375,
0.026824951171875,
-0.0144195556640625,
0.021575927734375,
-0.0312347412109375,
-0.0078887939453125,
-0.019622802734375,
-0.01457977294921875,
0.032379150390625,
0.0139007568359375,
-0.03643798828125,
-0.007747650146484375,
0.01898193359375,
0.01544189453125,
0.0238037109375,
-0.00926971435546875,
-0.0290069580078125,
0.01464080810546875,
-0.0163726806640625,
-0.029327392578125,
0.0282135009765625,
-0.0645751953125,
-0.008758544921875,
-0.016998291015625,
0.0177764892578125,
-0.0033588409423828125,
0.01119232177734375,
-0.009674072265625,
-0.042388916015625,
0.005809783935546875,
-0.006336212158203125,
-0.04388427734375,
-0.056549072265625,
0.00540924072265625,
-0.016143798828125,
-0.02642822265625,
0.0031414031982421875,
0.0404052734375,
-0.02685546875,
0.02740478515625,
0.02606201171875,
-0.004512786865234375,
0.01702880859375,
-0.006649017333984375,
0.037750244140625,
-0.055023193359375,
0.0513916015625,
-0.0328369140625,
0.006961822509765625,
0.0178680419921875,
-0.029052734375,
0.016815185546875,
0.043243408203125,
0.021636962890625,
-0.015716552734375,
0.036285400390625,
-0.00589752197265625,
0.0224609375,
-0.00762176513671875,
0.03570556640625,
0.01995849609375,
-0.0243988037109375,
0.05841064453125,
-0.03509521484375,
-0.003963470458984375,
0.031951904296875,
-0.03021240234375,
-0.032440185546875,
0.00007748603820800781,
0.06085205078125,
0.005245208740234375,
0.0089874267578125
]
|
3eb27df3cb641ede47d4a8274307bc368d34355f | Wordpress Stackexchange
Q: Get taxonomy names by post id I'm trying to create a single page where I display a few posts on one page. So far so good. Works all fine. Now I display posts in a foreach loop where I check if they are connnected to the page.
What I need ist something like wp_get_post_terms($post->ID); but that doens't work. There are custom registered_taxonomy's.
So how can I get all taxonomy names by $post->ID?
A: Ooh, thank's for the advices and help (Robert + Peter). The Term confused myself :) This worked for me:
$taxonomies=get_taxonomies('','names');
wp_get_post_terms($post->ID, $taxonomies, array("fields" => "names"));
| Q: Get taxonomy names by post id I'm trying to create a single page where I display a few posts on one page. So far so good. Works all fine. Now I display posts in a foreach loop where I check if they are connnected to the page.
What I need ist something like wp_get_post_terms($post->ID); but that doens't work. There are custom registered_taxonomy's.
So how can I get all taxonomy names by $post->ID?
A: Ooh, thank's for the advices and help (Robert + Peter). The Term confused myself :) This worked for me:
$taxonomies=get_taxonomies('','names');
wp_get_post_terms($post->ID, $taxonomies, array("fields" => "names"));
A: For any custom post type you can easily get the current post's taxonomies list. Copy and paste the following code:
<?php if(have_posts()) : the_post();
$post_type = get_post_type(get_the_ID());
$taxonomies = get_object_taxonomies($post_type);
$taxonomy_names = wp_get_object_terms(get_the_ID(), $taxonomies, array("fields" => "names"));
if(!empty($taxonomy_names)) :
foreach($taxonomy_names as $tax_name) : ?>
<p><?php echo $tax_name; ?> </p>
<?php endforeach;
endif;
endif; ?>
A: Try get_the_term_list
<?php echo get_the_term_list( $post->ID, 'taxonomy', '', ', ' ); ?>
You can use this in loop. Also, change taxonomy in above code with yours.
A: $term_list = get_the_terms($post->ID, 'your_taxonomy');
$types ='';
foreach($term_list as $term_single) {
$types .= ucfirst($term_single->slug).', ';
}
$typesz = rtrim($types, ', ');
echo $typesz;
| wordpress | {
"language": "en",
"length": 204,
"provenance": "stackexchange_00019.jsonl.gz:449058",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/162175"
} | [
0.0416259765625,
-0.00562286376953125,
0.0089263916015625,
0.0177001953125,
0.00540924072265625,
-0.0220947265625,
0.058563232421875,
-0.026214599609375,
0.00595855712890625,
0.030609130859375,
-0.0634765625,
0.00836944580078125,
-0.02716064453125,
0.0006508827209472656,
-0.03973388671875,
-0.05029296875,
0.0309600830078125,
-0.006633758544921875,
0.0386962890625,
0.00510406494140625,
0.007282257080078125,
0.0246124267578125,
0.023101806640625,
-0.01354217529296875,
0.04498291015625,
-0.020111083984375,
0.03765869140625,
-0.040496826171875,
0.025390625,
-0.0345458984375,
0.0224151611328125,
0.0184783935546875,
-0.0029697418212890625,
-0.0170745849609375,
0.04022216796875,
-0.0106353759765625,
0.00867462158203125,
0.0030841827392578125,
0.03118896484375,
0.008544921875,
0.05126953125,
-0.043212890625,
0.0069122314453125,
0.03387451171875,
-0.002216339111328125,
-0.039215087890625,
0.025238037109375,
-0.055450439453125,
0.008697509765625,
-0.0194854736328125,
0.0364990234375,
0.012237548828125,
0.04718017578125,
-0.0124053955078125,
-0.01428985595703125,
0.005702972412109375,
0.0220947265625,
-0.037567138671875,
0.04583740234375,
-0.060882568359375,
-0.06256103515625,
-0.04193115234375,
0.063720703125,
0.0011491775512695312,
-0.00888824462890625,
0.01328277587890625,
0.020660400390625,
0.0173492431640625,
-0.041168212890625,
-0.024566650390625,
0.021026611328125,
-0.0350341796875,
0.009033203125,
0.013031005859375,
0.0017423629760742188,
-0.07196044921875,
0.019989013671875,
-0.037811279296875,
0.0028057098388671875,
0.0209503173828125,
0.0038909912109375,
-0.042266845703125,
-0.060394287109375,
0.047576904296875,
-0.0031414031982421875,
0.056182861328125,
-0.004505157470703125,
-0.02276611328125,
-0.0228118896484375,
-0.040679931640625,
-0.0164337158203125,
-0.0168914794921875,
-0.0662841796875,
0.02490234375,
0.01094818115234375,
-0.0107421875,
0.0305633544921875,
0.0733642578125,
-0.03436279296875,
0.0007419586181640625,
-0.0264892578125,
-0.029693603515625,
0.005184173583984375,
-0.044097900390625,
0.02435302734375,
0.0258026123046875,
0.026885986328125,
0.0250701904296875,
0.045013427734375,
0.01143646240234375,
-0.000053942203521728516,
0.0274505615234375,
0.0013637542724609375,
-0.0180511474609375,
-0.0194091796875,
0.0012674331665039062,
-0.0200347900390625,
0.0035495758056640625,
-0.00012421607971191406,
-0.033477783203125,
0.01995849609375,
0.038238525390625,
-0.02716064453125,
0.03363037109375,
-0.008880615234375,
0.0283355712890625,
0.006591796875,
-0.04510498046875,
-0.003326416015625,
0.019195556640625,
-0.0367431640625,
0.005035400390625,
0.055084228515625,
0.03070068359375,
0.0161285400390625,
-0.027679443359375,
0.007007598876953125,
0.0201568603515625,
0.0028057098388671875,
-0.006595611572265625,
0.0168609619140625,
-0.0027256011962890625,
0.01517486572265625,
0.00360870361328125,
-0.00273895263671875,
0.00033783912658691406,
0.025726318359375,
0.025634765625,
-0.006198883056640625,
-0.022308349609375,
-0.01027679443359375,
0.0330810546875,
0.034515380859375,
-0.0004878044128417969,
-0.0005674362182617188,
-0.040863037109375,
0.056488037109375,
-0.057220458984375,
-0.024200439453125,
-0.07177734375,
0.040802001953125,
0.0048980712890625,
-0.00632476806640625,
0.02716064453125,
-0.0086212158203125,
-0.000003039836883544922,
-0.0293731689453125,
-0.0100555419921875,
0.01910400390625,
0.024871826171875,
0.0194244384765625,
-0.008453369140625,
0.0225982666015625,
-0.00800323486328125,
-0.01078033447265625,
-0.01473236083984375,
-0.0252227783203125,
-0.0170135498046875,
0.036834716796875,
0.0214080810546875,
-0.0249176025390625,
-0.030548095703125,
-0.0104217529296875,
0.01093292236328125,
-0.0574951171875,
0.022369384765625,
0.0201263427734375,
0.0587158203125,
0.01537322998046875,
0.0151519775390625,
0.04583740234375,
0.0016908645629882812,
-0.07000732421875,
0.029052734375,
0.037750244140625,
-0.0010824203491210938,
-0.039093017578125,
-0.00946044921875,
0.0191802978515625,
-0.041534423828125,
-0.003978729248046875,
-0.00791168212890625,
-0.0004181861877441406,
0.006038665771484375,
-0.0268096923828125,
-0.0158233642578125,
0.0034656524658203125,
0.01519775390625,
-0.003154754638671875,
-0.0013093948364257812,
0.0213775634765625,
-0.023712158203125,
-0.005962371826171875,
-0.0557861328125,
-0.052764892578125,
0.0251922607421875,
-0.01044464111328125,
-0.0287933349609375,
-0.0034732818603515625,
-0.037872314453125,
-0.00791168212890625,
-0.0006871223449707031,
-0.0240631103515625,
0.03656005859375,
0.01806640625,
0.01568603515625,
-0.033294677734375,
-0.01004791259765625,
0.00255584716796875,
0.019561767578125,
-0.0187530517578125,
0.0207061767578125,
-0.0026397705078125,
0.0286407470703125,
-0.0009584426879882812,
-0.0082550048828125,
0.0242156982421875,
-0.059112548828125,
0.0221099853515625,
0.030029296875,
0.0274505615234375,
0.0135040283203125,
-0.03076171875,
-0.026885986328125,
0.0489501953125,
-0.0206756591796875,
-0.0073394775390625,
-0.01456451416015625,
0.019012451171875,
0.03961181640625,
0.0172882080078125,
0.035919189453125,
0.00315093994140625,
0.004730224609375,
0.02978515625,
0.041259765625,
-0.0400390625,
0.00647735595703125,
0.0030231475830078125,
-0.00537872314453125,
-0.0109100341796875,
-0.03826904296875,
0.01357269287109375,
-0.032501220703125,
0.00530242919921875,
0.0421142578125,
0.023773193359375,
0.0296173095703125,
-0.01435089111328125,
0.0206756591796875,
-0.00775146484375,
-0.033843994140625,
0.0028820037841796875,
0.01393890380859375,
0.01020050048828125,
-0.0297698974609375,
-0.0291290283203125,
0.00681304931640625,
0.0012941360473632812,
-0.017333984375,
0.007633209228515625,
0.0531005859375,
0.0006289482116699219,
-0.013275146484375,
-0.02044677734375,
-0.045318603515625,
-0.008819580078125,
0.00897216796875,
-0.06524658203125,
-0.025177001953125,
-0.020538330078125,
0.07501220703125,
-0.017669677734375,
0.0274810791015625,
-0.0144805908203125,
0.033294677734375,
-0.0294647216796875,
-0.029510498046875,
0.0272979736328125,
-0.01953125,
0.024139404296875,
0.06396484375,
0.0177459716796875,
0.0190582275390625,
0.005889892578125,
-0.0006394386291503906,
0.031707763671875,
-0.01001739501953125,
-0.01080322265625,
0.004688262939453125,
-0.03790283203125,
0.0246734619140625,
0.0070343017578125,
0.094970703125,
-0.04638671875,
-0.07080078125,
-0.0142974853515625,
0.0204010009765625,
-0.07000732421875,
-0.045745849609375,
0.01256561279296875,
-0.039276123046875,
-0.0057830810546875,
-0.042999267578125,
-0.0184326171875,
0.00597381591796875,
-0.044891357421875,
0.0000978708267211914,
0.050872802734375,
-0.033721923828125,
-0.10198974609375,
-0.035308837890625,
-0.09051513671875,
0.026214599609375,
-0.002292633056640625,
0.0225677490234375,
0.0185699462890625,
0.044830322265625,
0.025604248046875,
-0.035736083984375,
0.046661376953125,
0.029815673828125,
-0.043609619140625,
0.017608642578125,
-0.005466461181640625,
-0.01776123046875,
-0.0252685546875,
0.0119781494140625,
-0.0260009765625,
-0.0126800537109375,
0.0021800994873046875,
-0.006374359130859375,
-0.009552001953125,
0.0191802978515625,
0.02557373046875,
-0.0187835693359375,
-0.00362396240234375,
0.04437255859375,
0.0279998779296875,
-0.011077880859375,
0.001312255859375,
-0.028839111328125,
-0.016265869140625,
0.0153656005859375,
-0.0174407958984375,
0.00506591796875,
-0.03143310546875,
0.042938232421875,
-0.0257720947265625,
-0.009857177734375,
-0.04095458984375,
-0.01947021484375,
0.02001953125,
0.00888824462890625,
0.031494140625,
0.04754638671875,
-0.01934814453125,
-0.03363037109375,
-0.0174560546875,
-0.022216796875,
0.007175445556640625,
-0.0212554931640625,
0.0232391357421875,
-0.0308074951171875,
-0.061370849609375,
0.037384033203125,
-0.0538330078125,
-0.0281829833984375,
-0.02813720703125,
-0.01113128662109375,
0.00738525390625,
0.07965087890625,
-0.0310821533203125,
-0.01363372802734375,
-0.022613525390625,
-0.006671905517578125,
-0.0009207725524902344,
-0.031646728515625,
-0.02813720703125,
-0.0246429443359375,
-0.075927734375,
-0.0107879638671875,
-0.02142333984375,
-0.0244903564453125,
-0.023468017578125,
-0.0013446807861328125,
-0.056793212890625,
-0.040496826171875,
0.00933074951171875,
-0.03668212890625,
0.0164947509765625,
-0.0038776397705078125,
-0.00946044921875,
-0.002666473388671875,
-0.01534271240234375,
-0.026824951171875,
-0.07421875,
-0.0237884521484375,
0.0298004150390625,
0.0421142578125,
-0.01525115966796875,
-0.01401519775390625,
0.0005450248718261719,
0.055419921875,
0.0128936767578125,
0.031890869140625,
0.0032634735107421875,
0.0218505859375,
-0.005046844482421875,
-0.0304718017578125,
0.00046181678771972656,
-0.0323486328125,
-0.0275726318359375,
-0.031890869140625,
-0.00400543212890625,
0.023681640625,
-0.020172119140625,
0.0101318359375,
-0.027313232421875,
-0.01459503173828125,
-0.051025390625,
-0.01195526123046875,
-0.01213836669921875,
-0.00518035888671875,
-0.015167236328125,
0.005779266357421875,
-0.0230712890625,
-0.06378173828125,
0.05340576171875,
0.037933349609375,
-0.0140838623046875,
0.002895355224609375,
0.09002685546875,
0.01213836669921875,
-0.032989501953125,
-0.09967041015625,
0.02032470703125,
0.057220458984375,
-0.0201873779296875,
0.028228759765625,
0.016021728515625,
-0.04815673828125,
0.0823974609375,
0.01715087890625,
-0.016021728515625,
0.0012788772583007812,
0.048675537109375,
-0.01297760009765625,
-0.04046630859375,
0.0186004638671875,
-0.032257080078125,
0.004276275634765625,
0.0304412841796875,
-0.029052734375,
-0.040283203125,
-0.02081298828125,
0.076416015625,
-0.02374267578125,
0.050140380859375,
-0.05670166015625,
-0.05267333984375,
0.0283050537109375,
-0.0215606689453125,
-0.0209197998046875,
0.004001617431640625,
-0.01251220703125,
-0.00634765625,
-0.0318603515625,
0.0027713775634765625,
0.0333251953125,
0.03436279296875,
0.0265655517578125,
0.0159759521484375,
0.0406494140625,
-0.005229949951171875,
-0.01103973388671875,
-0.0229034423828125,
0.0618896484375,
-0.0034160614013671875,
-0.059326171875,
0.060150146484375,
-0.036407470703125,
-0.00420379638671875,
0.042510986328125,
0.01192474365234375,
0.02978515625,
0.037506103515625,
0.0088043212890625,
-0.00036144256591796875,
-0.03369140625,
0.01251220703125,
-0.038330078125,
0.00811004638671875,
-0.0009465217590332031,
-0.005023956298828125,
0.00551605224609375,
0.04595947265625,
-0.01812744140625,
0.023651123046875,
-0.0160675048828125,
0.03656005859375,
0.004364013671875,
0.052947998046875,
0.0226898193359375,
-0.038909912109375,
-0.006435394287109375,
0.01305389404296875,
-0.0242767333984375,
-0.06488037109375,
-0.013092041015625,
0.0025196075439453125,
0.044952392578125,
0.00318145751953125,
-0.0262603759765625,
0.0307159423828125,
-0.006862640380859375,
-0.02764892578125,
0.030609130859375,
0.00666046142578125,
-0.038421630859375,
-0.034759521484375,
0.01221466064453125,
0.030303955078125,
0.0125732421875,
-0.0166168212890625,
0.0089569091796875,
-0.0248565673828125,
0.0220794677734375,
-0.01922607421875,
-0.0013990402221679688,
0.005340576171875,
0.018402099609375,
-0.02783203125,
-0.0140838623046875,
0.01514434814453125,
-0.0457763671875,
-0.0282135009765625,
-0.0077362060546875,
-0.027130126953125,
0.036834716796875,
0.0006127357482910156,
0.055419921875,
-0.00833892822265625,
-0.046661376953125,
0.0146942138671875,
-0.003536224365234375,
0.052459716796875,
0.024078369140625,
-0.07763671875,
0.0197906494140625,
-0.0625,
0.020538330078125,
0.0208587646484375,
-0.055389404296875,
-0.038421630859375,
-0.036285400390625,
-0.00848388671875,
0.005374908447265625,
0.00881195068359375,
0.0263824462890625,
0.007495880126953125,
0.02032470703125,
-0.0264434814453125,
-0.0015850067138671875,
0.012451171875,
0.0055999755859375,
0.00020503997802734375,
0.051727294921875,
0.004909515380859375,
-0.0236053466796875,
-0.048614501953125,
-0.0248260498046875,
-0.02545166015625,
-0.06976318359375,
-0.003543853759765625,
0.037139892578125,
-0.035980224609375,
0.006870269775390625,
-0.007183074951171875,
0.0164794921875,
0.00669097900390625,
-0.01305389404296875,
0.006053924560546875,
-0.006282806396484375,
-0.0168304443359375,
-0.0218048095703125,
-0.038726806640625,
0.032745361328125,
-0.0307159423828125,
-0.04278564453125,
0.02215576171875,
0.0031185150146484375,
0.01336669921875,
-0.0141143798828125,
-0.01152801513671875,
0.0212860107421875,
0.023590087890625,
-0.0081634521484375,
0.028656005859375,
0.0284423828125,
0.037445068359375,
0.0225982666015625,
0.033538818359375,
-0.00311279296875,
0.02325439453125,
-0.035736083984375,
-0.034576416015625,
0.0628662109375,
0.026763916015625,
-0.0157012939453125,
0.0521240234375,
-0.037200927734375,
-0.02459716796875,
-0.0155487060546875,
0.013824462890625,
-0.0142669677734375,
0.01316070556640625,
0.038848876953125,
0.0081329345703125,
-0.0280914306640625,
0.02349853515625,
-0.019195556640625,
-0.032196044921875,
-0.013458251953125,
0.003925323486328125,
-0.025909423828125,
-0.01027679443359375,
0.007671356201171875,
-0.0065155029296875,
-0.043060302734375,
0.050506591796875,
0.01212310791015625,
-0.00836181640625,
0.004283905029296875,
-0.003269195556640625,
0.0113677978515625,
-0.045562744140625,
-0.00768280029296875,
-0.00531005859375,
-0.004611968994140625,
-0.052093505859375,
0.044525146484375,
-0.0263671875,
0.044219970703125,
0.0256805419921875,
-0.0019779205322265625,
-0.0253753662109375,
0.04656982421875,
-0.0247802734375,
0.037841796875,
0.01551055908203125,
-0.07952880859375,
-0.006072998046875,
-0.016754150390625,
-0.02099609375,
0.006809234619140625,
-0.02276611328125,
0.0110015869140625,
-0.01776123046875,
-0.0024204254150390625,
-0.0272369384765625,
-0.0306854248046875,
0.09185791015625,
-0.0276031494140625,
-0.00994110107421875,
0.015350341796875,
0.053253173828125,
0.0034275054931640625,
0.0264434814453125,
0.0113525390625,
-0.0200347900390625,
-0.007175445556640625,
0.01029205322265625,
-0.00463104248046875,
-0.004474639892578125,
0.0180816650390625,
-0.0826416015625,
0.0889892578125,
0.019989013671875,
0.0211334228515625,
-0.0045623779296875,
0.0290985107421875,
-0.033905029296875,
0.003673553466796875,
-0.039764404296875,
0.041595458984375,
0.00266265869140625,
0.0361328125,
-0.0265045166015625,
0.0036792755126953125,
0.00846099853515625,
0.015716552734375,
0.07000732421875,
0.006786346435546875,
-0.005962371826171875,
-0.00043320655822753906,
0.050567626953125,
0.0435791015625,
-0.01107025146484375,
0.00931549072265625,
0.027374267578125,
0.02685546875,
0.042755126953125,
-0.00954437255859375,
0.040374755859375,
-0.01358795166015625,
-0.00487518310546875,
0.04522705078125,
0.0267333984375,
0.0230712890625,
0.00989532470703125,
-0.05169677734375,
-0.04608154296875,
0.01580810546875,
0.034515380859375,
-0.017822265625,
0.0033893585205078125,
0.040740966796875,
0.0279693603515625,
-0.0124359130859375,
0.0251007080078125,
-0.0262908935546875,
0.058685302734375,
-0.0119171142578125,
0.0257720947265625,
0.022918701171875,
0.020172119140625,
0.07318115234375,
-0.016357421875,
0.020355224609375,
0.01509857177734375,
-0.0048065185546875,
0.05999755859375,
0.01275634765625,
0.02008056640625,
-0.07720947265625,
-0.04736328125,
0.042144775390625,
0.07623291015625,
-0.0360107421875,
-0.039794921875,
0.01548004150390625,
0.0046539306640625,
-0.0015592575073242188,
0.02783203125,
0.0252685546875,
0.059356689453125,
0.070068359375,
-0.04217529296875,
0.0004429817199707031,
0.0231475830078125,
0.046417236328125,
-0.007343292236328125,
-0.0161590576171875,
-0.049346923828125,
-0.0144500732421875,
-0.06378173828125,
0.0246429443359375,
0.0367431640625,
0.06768798828125,
0.006114959716796875,
0.0699462890625,
-0.0163421630859375,
-0.015716552734375,
0.0227203369140625,
0.02703857421875,
0.0223846435546875,
-0.03704833984375,
0.0007796287536621094,
-0.042724609375,
0.00601959228515625,
0.0182342529296875,
0.0096435546875,
0.01255035400390625,
0.045928955078125,
0.04534912109375,
-0.0229034423828125,
-0.0147247314453125,
0.045318603515625,
-0.0102691650390625,
-0.0236663818359375,
-0.01428985595703125,
-0.004741668701171875,
0.031951904296875,
-0.01103973388671875,
0.0118865966796875,
-0.00713348388671875,
0.05999755859375,
-0.01158905029296875,
0.06317138671875,
-0.004154205322265625,
-0.01477813720703125,
0.0333251953125,
-0.03448486328125,
0.056884765625,
0.0018262863159179688,
-0.119384765625,
-0.025238037109375,
-0.0595703125,
-0.006328582763671875,
0.036163330078125,
0.034393310546875,
-0.013092041015625,
0.018768310546875,
0.024017333984375,
-0.0290985107421875,
0.0105133056640625,
0.020355224609375,
0.0263519287109375,
0.0235137939453125,
-0.001434326171875,
0.005512237548828125,
-0.04132080078125,
-0.0228729248046875,
-0.0095977783203125,
0.0157623291015625,
0.01141357421875,
0.03570556640625,
-0.005298614501953125,
0.0158538818359375,
-0.028900146484375,
0.046478271484375,
-0.08172607421875,
-0.0609130859375,
0.0802001953125,
-0.02349853515625,
-0.01441192626953125,
0.00395965576171875,
-0.04376220703125,
0.0677490234375,
0.0271148681640625,
-0.0230560302734375,
0.037200927734375,
-0.00250244140625,
-0.01165771484375,
-0.015289306640625,
0.052490234375,
-0.00727081298828125,
-0.034271240234375,
-0.045013427734375,
-0.017974853515625,
0.036224365234375,
0.06488037109375,
0.0164794921875,
0.01438140869140625,
0.015716552734375,
-0.026580810546875,
0.031494140625,
-0.020660400390625,
0.048095703125,
0.02923583984375,
0.00983428955078125,
-0.056671142578125,
0.012725830078125,
-0.008636474609375,
-0.021575927734375,
0.0259246826171875,
0.02984619140625,
-0.002140045166015625,
-0.036376953125,
0.0184173583984375,
0.0017023086547851562,
0.05047607421875,
-0.006988525390625,
0.01580810546875,
0.01404571533203125,
0.01393890380859375,
-0.036041259765625,
-0.0377197265625,
-0.025238037109375,
-0.0592041015625,
-0.0023555755615234375,
0.0305938720703125,
-0.030914306640625,
0.00821685791015625,
-0.0501708984375,
-0.024444580078125,
0.0234375,
-0.027008056640625,
0.031768798828125,
-0.0182647705078125,
-0.031158447265625,
0.003574371337890625,
-0.0257568359375,
-0.0195159912109375,
0.0184783935546875,
0.04144287109375,
-0.0197906494140625,
0.01215362548828125,
-0.01183319091796875,
-0.02032470703125,
-0.0015306472778320312,
0.01457977294921875,
0.01357269287109375,
-0.030914306640625,
-0.005847930908203125,
0.032806396484375,
0.0201416015625,
0.061492919921875,
0.05950927734375,
-0.0155029296875,
-0.0012712478637695312,
0.01554107666015625,
-0.0194549560546875,
-0.0797119140625,
0.0179290771484375,
-0.0582275390625,
-0.01120758056640625,
-0.01470947265625,
0.02410888671875,
0.040313720703125,
-0.0233306884765625,
-0.030364990234375,
0.054107666015625,
-0.01483154296875,
-0.025238037109375,
-0.0430908203125,
-0.00945281982421875,
0.006694793701171875,
-0.0287628173828125,
-0.0298614501953125,
-0.018035888671875,
-0.0182647705078125,
0.05865478515625,
0.0253448486328125,
-0.0014600753784179688,
0.045013427734375,
0.0118408203125,
-0.038238525390625,
0.00907135009765625,
-0.0020389556884765625,
0.01297760009765625,
0.03277587890625,
-0.0199127197265625,
0.0217437744140625,
0.0306396484375,
-0.059295654296875,
-0.020050048828125,
-0.0184173583984375,
0.0096282958984375,
-0.0036144256591796875,
-0.055084228515625,
-0.00966644287109375,
-0.01500701904296875,
0.019683837890625,
0.007350921630859375,
0.0063629150390625,
-0.0177764892578125,
-0.0191802978515625,
-0.01461029052734375,
-0.03607177734375,
0.005279541015625,
0.033477783203125,
-0.06866455078125,
0.0005517005920410156,
0.04046630859375,
-0.01313018798828125,
0.001800537109375,
-0.0014772415161132812,
-0.03680419921875,
-0.00881195068359375,
-0.035552978515625,
-0.0178070068359375,
-0.0225982666015625,
0.00719451904296875,
-0.0155792236328125,
-0.015655517578125,
-0.03350830078125,
-0.048614501953125,
0.019805908203125,
-0.04876708984375,
-0.057769775390625,
0.006687164306640625,
-0.002414703369140625,
0.0102386474609375,
-0.0028629302978515625,
0.032440185546875,
0.00020551681518554688,
0.0305633544921875,
0.00019025802612304688,
-0.01233673095703125,
0.03533935546875,
-0.0025501251220703125,
0.029052734375,
-0.01085662841796875,
0.042449951171875,
0.0103912353515625,
0.038421630859375,
-0.0162353515625,
0.054046630859375,
-0.0072479248046875,
0.059967041015625,
-0.02447509765625,
-0.01316070556640625,
0.005306243896484375,
-0.0499267578125,
0.0013074874877929688,
-0.01305389404296875,
-0.0157012939453125,
-0.01201629638671875,
0.0185394287109375,
0.02459716796875,
-0.027618408203125,
0.021636962890625
]
|
ddebc48372810f7dff75f797ce51ca7fef0bcc43 | Wordpress Stackexchange
Q: Exclude categories from search query I have two categories that I want to exclude from my search results, so far without luck.
I have tried adding the following piece of code but it didn't work.
$search_query = query_posts(array('category__in' => array(-22, -21)));
Here is my current code.
global $query_string;
$query_args = explode("&", $query_string);
$search_query = array();
foreach($query_args as $key => $string) {
$query_split = explode("=", $string);
$search_query[$query_split[0]] = urldecode($query_split[1]);
} // foreach
$searchq = new WP_Query($search_query);
while ($searchq->have_posts()) : $searchq->the_post();
A: You can use pre_get_posts action to exclude categories from search query.
function wcs_exclude_category_search( $query ) {
if ( is_admin() || ! $query->is_main_query() )
return;
if ( $query->is_search ) {
$query->set( 'cat', '-22, -21' );
}
}
add_action( 'pre_get_posts', 'wcs_exclude_category_search', 1 );
You should paste this code in your theme's functions.php file.
| Q: Exclude categories from search query I have two categories that I want to exclude from my search results, so far without luck.
I have tried adding the following piece of code but it didn't work.
$search_query = query_posts(array('category__in' => array(-22, -21)));
Here is my current code.
global $query_string;
$query_args = explode("&", $query_string);
$search_query = array();
foreach($query_args as $key => $string) {
$query_split = explode("=", $string);
$search_query[$query_split[0]] = urldecode($query_split[1]);
} // foreach
$searchq = new WP_Query($search_query);
while ($searchq->have_posts()) : $searchq->the_post();
A: You can use pre_get_posts action to exclude categories from search query.
function wcs_exclude_category_search( $query ) {
if ( is_admin() || ! $query->is_main_query() )
return;
if ( $query->is_search ) {
$query->set( 'cat', '-22, -21' );
}
}
add_action( 'pre_get_posts', 'wcs_exclude_category_search', 1 );
You should paste this code in your theme's functions.php file.
| wordpress | {
"language": "en",
"length": 132,
"provenance": "stackexchange_00019.jsonl.gz:449072",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/162232"
} | [
0.055908203125,
-0.01526641845703125,
-0.0034885406494140625,
-0.01568603515625,
0.0234832763671875,
-0.05987548828125,
0.08489990234375,
-0.004634857177734375,
0.0120849609375,
0.029571533203125,
-0.01216888427734375,
-0.01100921630859375,
-0.0222930908203125,
-0.01702880859375,
-0.021942138671875,
-0.026824951171875,
0.01934814453125,
-0.01068878173828125,
0.0195465087890625,
-0.00872802734375,
-0.00130462646484375,
-0.007434844970703125,
0.034454345703125,
0.024139404296875,
0.019256591796875,
-0.048492431640625,
0.05426025390625,
-0.01166534423828125,
0.0140380859375,
-0.02703857421875,
0.015625,
0.00923919677734375,
0.0142059326171875,
0.0015325546264648438,
0.0183258056640625,
0.038787841796875,
-0.01220703125,
0.0198974609375,
0.0251312255859375,
0.01898193359375,
0.0157012939453125,
-0.00931549072265625,
-0.028594970703125,
0.005794525146484375,
-0.0227203369140625,
-0.043243408203125,
0.034332275390625,
-0.0306396484375,
0.007564544677734375,
-0.0577392578125,
0.005901336669921875,
0.0170440673828125,
0.03277587890625,
-0.0810546875,
-0.01506805419921875,
0.01103973388671875,
-0.0182952880859375,
0.0260772705078125,
0.05096435546875,
0.0189361572265625,
-0.0419921875,
-0.034210205078125,
0.0059356689453125,
-0.0703125,
-0.0264892578125,
-0.0147247314453125,
0.05035400390625,
0.0007729530334472656,
-0.03631591796875,
-0.030548095703125,
0.05450439453125,
0.0179290771484375,
0.0095367431640625,
0.0145111083984375,
-0.0225677490234375,
-0.0184783935546875,
0.01352691650390625,
-0.00032401084899902344,
0.0277252197265625,
0.006305694580078125,
0.0219879150390625,
-0.015838623046875,
-0.0229644775390625,
-0.018585205078125,
0.02374267578125,
0.0022220611572265625,
0.00350189208984375,
-0.00795745849609375,
-0.03082275390625,
-0.01399993896484375,
-0.0190887451171875,
-0.036865234375,
-0.06207275390625,
0.019927978515625,
0.00800323486328125,
-0.0226287841796875,
0.03192138671875,
0.044403076171875,
-0.00020706653594970703,
0.007251739501953125,
-0.00780487060546875,
-0.033294677734375,
-0.02288818359375,
-0.01369476318359375,
0.027801513671875,
0.020751953125,
-0.0372314453125,
0.0289459228515625,
0.06414794921875,
0.05706787109375,
0.021392822265625,
0.01033782958984375,
0.00612640380859375,
-0.00970458984375,
-0.048004150390625,
0.021392822265625,
0.00363922119140625,
-0.01039886474609375,
-0.00769805908203125,
0.0282440185546875,
0.01132965087890625,
0.0301513671875,
0.0110626220703125,
-0.05572509765625,
0.0006456375122070312,
-0.022186279296875,
-0.018035888671875,
-0.01209259033203125,
0.010772705078125,
0.00969696044921875,
-0.039215087890625,
0.01971435546875,
0.0704345703125,
0.0241546630859375,
0.0002875328063964844,
-0.0256805419921875,
0.051483154296875,
0.0005249977111816406,
0.00789642333984375,
0.01186370849609375,
0.0214691162109375,
-0.00981903076171875,
0.002826690673828125,
0.00667572021484375,
0.0467529296875,
-0.0216827392578125,
0.0213470458984375,
0.053680419921875,
0.01222991943359375,
-0.00811767578125,
0.051788330078125,
0.0087890625,
0.052581787109375,
0.0159454345703125,
-0.094970703125,
0.02362060546875,
-0.00128936767578125,
-0.01076507568359375,
-0.05938720703125,
-0.0494384765625,
-0.00688934326171875,
0.01415252685546875,
0.03936767578125,
-0.0169525146484375,
-0.01166534423828125,
-0.02093505859375,
-0.029754638671875,
-0.0082855224609375,
0.01568603515625,
0.007793426513671875,
0.00907135009765625,
0.00589752197265625,
0.0511474609375,
-0.0104827880859375,
-0.01409912109375,
-0.007175445556640625,
0.0026092529296875,
-0.00836944580078125,
0.0233917236328125,
0.049835205078125,
0.00574493408203125,
-0.0172882080078125,
0.006870269775390625,
0.017974853515625,
-0.050384521484375,
0.05377197265625,
0.0234832763671875,
0.03338623046875,
-0.0384521484375,
0.0087890625,
0.06982421875,
0.06561279296875,
-0.0192108154296875,
0.00858306884765625,
-0.0157623291015625,
-0.048095703125,
0.0186004638671875,
-0.017486572265625,
-0.00750732421875,
0.0408935546875,
0.045135498046875,
0.0084991455078125,
0.008087158203125,
-0.00794219970703125,
-0.06024169921875,
0.0096435546875,
-0.0134735107421875,
0.022613525390625,
-0.02960205078125,
0.037841796875,
0.0295257568359375,
0.01096343994140625,
-0.038055419921875,
0.024993896484375,
0.0172882080078125,
-0.01143646240234375,
-0.01073455810546875,
0.028656005859375,
0.0160980224609375,
0.01415252685546875,
0.02813720703125,
-0.023895263671875,
0.0335693359375,
0.0246124267578125,
0.06005859375,
-0.01259613037109375,
-0.015625,
-0.024871826171875,
0.029388427734375,
-0.005680084228515625,
-0.043670654296875,
0.05322265625,
0.10089111328125,
0.09735107421875,
-0.023590087890625,
0.020965576171875,
0.03729248046875,
0.01898193359375,
-0.02459716796875,
0.0019321441650390625,
0.0361328125,
0.007671356201171875,
-0.03582763671875,
-0.059967041015625,
0.072998046875,
-0.059783935546875,
-0.01030731201171875,
-0.0248565673828125,
0.003597259521484375,
0.0382080078125,
0.031829833984375,
-0.0013265609741210938,
0.006809234619140625,
0.0030670166015625,
0.033660888671875,
0.0199737548828125,
0.0252227783203125,
-0.004238128662109375,
0.007747650146484375,
-0.0246429443359375,
0.0218048095703125,
-0.01465606689453125,
-0.0797119140625,
0.037353515625,
0.0217132568359375,
-0.01200103759765625,
0.0110626220703125,
0.0205078125,
-0.005840301513671875,
-0.01540374755859375,
0.0099639892578125,
-0.025787353515625,
-0.0134429931640625,
0.03363037109375,
0.0269775390625,
-0.004032135009765625,
-0.038482666015625,
0.0148773193359375,
0.00983428955078125,
0.01392364501953125,
0.014068603515625,
0.08135986328125,
0.046722412109375,
-0.0100555419921875,
-0.06951904296875,
-0.055877685546875,
0.0372314453125,
0.035064697265625,
-0.0072784423828125,
0.005771636962890625,
0.024322509765625,
0.00963592529296875,
-0.006763458251953125,
-0.0019254684448242188,
-0.0234527587890625,
-0.01308441162109375,
0.00823211669921875,
0.005985260009765625,
0.005832672119140625,
-0.019805908203125,
0.0498046875,
0.04693603515625,
-0.0239105224609375,
0.0093231201171875,
0.0112762451171875,
-0.0362548828125,
-0.001056671142578125,
0.0286712646484375,
0.002948760986328125,
0.0002321004867553711,
-0.04046630859375,
0.0215301513671875,
0.0222930908203125,
0.010101318359375,
0.02984619140625,
-0.01331329345703125,
0.0215606689453125,
0.024810791015625,
-0.01409912109375,
-0.0301666259765625,
0.02630615234375,
-0.002101898193359375,
0.01390838623046875,
0.0266265869140625,
0.00908660888671875,
-0.035491943359375,
0.02874755859375,
-0.007709503173828125,
0.0304718017578125,
-0.029449462890625,
-0.05157470703125,
-0.034423828125,
-0.042144775390625,
0.0094757080078125,
-0.0005440711975097656,
-0.0034332275390625,
0.0130615234375,
0.12103271484375,
0.034881591796875,
-0.06201171875,
0.0269775390625,
0.036895751953125,
-0.033416748046875,
0.029815673828125,
-0.01995849609375,
-0.008514404296875,
0.0194244384765625,
-0.00919342041015625,
0.10601806640625,
0.0115203857421875,
-0.01367950439453125,
0.016357421875,
-0.00542449951171875,
0.024749755859375,
0.0386962890625,
-0.045806884765625,
-0.0204315185546875,
0.0236053466796875,
0.0070648193359375,
-0.025177001953125,
0.007656097412109375,
-0.0231781005859375,
-0.0199127197265625,
0.01155853271484375,
0.01020050048828125,
-0.0005660057067871094,
-0.015655517578125,
0.0016689300537109375,
0.0307159423828125,
0.010589599609375,
-0.01605224609375,
-0.007534027099609375,
0.017974853515625,
0.0061187744140625,
0.037200927734375,
-0.0055694580078125,
-0.006591796875,
-0.051177978515625,
0.06744384765625,
-0.0016927719116210938,
-0.00827789306640625,
0.005794525146484375,
-0.01407623291015625,
-0.0014896392822265625,
0.01053619384765625,
0.029144287109375,
0.0084686279296875,
0.020599365234375,
-0.0148468017578125,
-0.03253173828125,
-0.026092529296875,
0.0498046875,
-0.04620361328125,
-0.036376953125,
-0.0345458984375,
0.016082763671875,
0.0005450248718261719,
-0.07269287109375,
0.0292816162109375,
-0.025726318359375,
-0.1026611328125,
0.019989013671875,
-0.01094818115234375,
-0.0362548828125,
-0.005641937255859375,
-0.022003173828125,
-0.05841064453125,
-0.056396484375,
0.048828125,
-0.0188140869140625,
0.01515960693359375,
-0.0242462158203125,
0.0077362060546875,
-0.0401611328125,
-0.03192138671875,
0.013031005859375,
-0.05084228515625,
0.00876617431640625,
-0.0242156982421875,
0.009918212890625,
-0.01424407958984375,
0.048065185546875,
-0.047698974609375,
0.010009765625,
0.019927978515625,
-0.00653076171875,
0.004108428955078125,
-0.023345947265625,
0.0037021636962890625,
0.04510498046875,
0.01227569580078125,
-0.0015392303466796875,
-0.001712799072265625,
-0.00882720947265625,
0.0168609619140625,
0.01934814453125,
-0.05157470703125,
-0.0312347412109375,
-0.048370361328125,
-0.019195556640625,
-0.03228759765625,
-0.040557861328125,
-0.00408172607421875,
-0.006275177001953125,
-0.033843994140625,
0.0081329345703125,
-0.01654052734375,
-0.01186370849609375,
0.0540771484375,
0.0291900634765625,
-0.007061004638671875,
-0.00884246826171875,
0.0255279541015625,
0.00441741943359375,
-0.053436279296875,
-0.01226043701171875,
0.0009407997131347656,
0.032562255859375,
-0.031524658203125,
0.046630859375,
-0.0005459785461425781,
-0.03094482421875,
0.09478759765625,
-0.01375579833984375,
-0.0116119384765625,
-0.038330078125,
0.060516357421875,
-0.0092315673828125,
-0.00948333740234375,
-0.00608062744140625,
-0.035125732421875,
0.05108642578125,
0.0032787322998046875,
0.0037822723388671875,
-0.0318603515625,
0.032440185546875,
0.03631591796875,
0.01116180419921875,
-0.0009870529174804688,
-0.0209808349609375,
0.0079498291015625,
-0.004947662353515625,
0.04107666015625,
0.04718017578125,
0.05621337890625,
-0.017059326171875,
0.001834869384765625,
0.011383056640625,
-0.00836181640625,
-0.02447509765625,
0.0175628662109375,
-0.01444244384765625,
0.021942138671875,
-0.0299835205078125,
-0.0244293212890625,
-0.0211181640625,
0.0121612548828125,
-0.01541900634765625,
-0.034576416015625,
-0.0220489501953125,
-0.030487060546875,
-0.00206756591796875,
0.017578125,
0.037017822265625,
-0.0250701904296875,
0.026611328125,
0.0237884521484375,
0.00345611572265625,
0.006595611572265625,
-0.01788330078125,
-0.03253173828125,
-0.0247344970703125,
-0.01038360595703125,
0.004608154296875,
-0.007808685302734375,
0.0288543701171875,
0.062408447265625,
-0.00620269775390625,
0.05859375,
-0.0304412841796875,
0.002292633056640625,
-0.0362548828125,
0.0226898193359375,
0.002811431884765625,
0.00958251953125,
0.025604248046875,
-0.0166473388671875,
0.027740478515625,
-0.0169677734375,
-0.0360107421875,
-0.01093292236328125,
-0.006038665771484375,
-0.026458740234375,
0.0024662017822265625,
0.0540771484375,
0.0248260498046875,
-0.002208709716796875,
0.0177764892578125,
0.02252197265625,
0.001926422119140625,
-0.0229949951171875,
-0.037200927734375,
0.006805419921875,
0.00748443603515625,
-0.00919342041015625,
0.0246429443359375,
-0.0426025390625,
-0.000056862831115722656,
0.041015625,
-0.0291900634765625,
-0.0264129638671875,
-0.005954742431640625,
-0.059417724609375,
-0.0242919921875,
-0.0017232894897460938,
-0.018096923828125,
-0.0404052734375,
0.006839752197265625,
-0.0070343017578125,
-0.0028095245361328125,
-0.00621795654296875,
0.041290283203125,
-0.02557373046875,
-0.0187225341796875,
0.0289764404296875,
0.001026153564453125,
0.041351318359375,
0.01056671142578125,
-0.045867919921875,
-0.028900146484375,
-0.0430908203125,
-0.0186004638671875,
-0.01151275634765625,
-0.0252532958984375,
-0.0283966064453125,
0.0171051025390625,
0.01029205322265625,
0.016204833984375,
0.00313568115234375,
-0.019500732421875,
-0.0147247314453125,
-0.00722503662109375,
0.0187530517578125,
-0.007564544677734375,
-0.03839111328125,
0.049957275390625,
0.00531005859375,
0.033538818359375,
-0.0205535888671875,
0.0290069580078125,
0.0266876220703125,
-0.0189208984375,
-0.01128387451171875,
-0.09918212890625,
-0.0130157470703125,
0.05078125,
-0.0810546875,
0.05157470703125,
0.041839599609375,
0.01290130615234375,
-0.0252685546875,
0.01282501220703125,
0.0070037841796875,
-0.025970458984375,
0.004573822021484375,
0.00920867919921875,
-0.01386260986328125,
0.01245880126953125,
0.0010662078857421875,
0.038482666015625,
-0.027435302734375,
-0.012603759765625,
0.00896453857421875,
-0.0236053466796875,
0.0256805419921875,
0.0178680419921875,
-0.0268707275390625,
0.06243896484375,
0.057159423828125,
0.0034332275390625,
0.03668212890625,
0.006107330322265625,
0.00719451904296875,
-0.02801513671875,
-0.00943756103515625,
0.00835418701171875,
0.0141448974609375,
0.072265625,
-0.00177001953125,
-0.0192108154296875,
0.06475830078125,
-0.04107666015625,
-0.01432037353515625,
0.038055419921875,
0.01340484619140625,
-0.0579833984375,
-0.010498046875,
0.001049041748046875,
-0.014984130859375,
-0.01074981689453125,
0.0113677978515625,
-0.01605224609375,
-0.0012960433959960938,
0.00006490945816040039,
-0.01031494140625,
-0.0426025390625,
-0.0124359130859375,
0.02081298828125,
-0.0428466796875,
0.0025920867919921875,
-0.018035888671875,
0.0164794921875,
-0.04058837890625,
0.0205535888671875,
0.0401611328125,
-0.00994110107421875,
-0.0222320556640625,
0.0242156982421875,
0.018035888671875,
-0.019775390625,
-0.10113525390625,
0.00580596923828125,
0.036041259765625,
-0.0308990478515625,
0.021453857421875,
-0.0201263427734375,
0.0296783447265625,
0.021697998046875,
0.0120086669921875,
-0.024993896484375,
0.0020313262939453125,
-0.0292205810546875,
0.0186920166015625,
0.0012025833129882812,
0.00971221923828125,
0.03369140625,
-0.062225341796875,
0.006740570068359375,
-0.034759521484375,
0.020660400390625,
-0.00827789306640625,
-0.0318603515625,
0.065185546875,
-0.061248779296875,
0.0008845329284667969,
0.0172576904296875,
-0.006938934326171875,
0.0001920461654663086,
0.005084991455078125,
0.021728515625,
-0.0158843994140625,
-0.007236480712890625,
0.003421783447265625,
0.0041656494140625,
0.0128021240234375,
0.002197265625,
-0.04705810546875,
0.0290985107421875,
-0.057464599609375,
0.049652099609375,
0.0308074951171875,
0.00011140108108520508,
0.0071258544921875,
-0.006603240966796875,
-0.06414794921875,
0.058135986328125,
0.040863037109375,
0.041961669921875,
-0.037841796875,
-0.01184844970703125,
0.01788330078125,
0.006072998046875,
0.0755615234375,
0.0018482208251953125,
-0.0175933837890625,
-0.0350341796875,
0.03948974609375,
0.0753173828125,
0.000020742416381835938,
-0.00734710693359375,
0.0178680419921875,
0.0000711679458618164,
0.049468994140625,
-0.0036144256591796875,
0.052337646484375,
-0.0304107666015625,
0.0012083053588867188,
0.02642822265625,
0.00284576416015625,
0.01113128662109375,
0.0016279220581054688,
0.038421630859375,
-0.01519775390625,
-0.00492095947265625,
0.0014705657958984375,
0.0108489990234375,
-0.0183258056640625,
0.050811767578125,
0.0274505615234375,
-0.07794189453125,
-0.040802001953125,
-0.046173095703125,
0.036895751953125,
0.0229034423828125,
0.07293701171875,
0.056976318359375,
0.02490234375,
0.1005859375,
0.039398193359375,
0.0625,
0.0292205810546875,
-0.0256805419921875,
0.0159759521484375,
0.042877197265625,
0.038848876953125,
-0.01020050048828125,
0.033172607421875,
0.031219482421875,
0.0322265625,
-0.032928466796875,
-0.042510986328125,
0.0033473968505859375,
0.0168304443359375,
-0.00025653839111328125,
-0.002056121826171875,
-0.000018596649169921875,
0.0007762908935546875,
0.0694580078125,
-0.03729248046875,
-0.000049233436584472656,
0.0163116455078125,
0.01322174072265625,
-0.0162506103515625,
-0.0187225341796875,
-0.006534576416015625,
-0.003810882568359375,
-0.0404052734375,
-0.0097198486328125,
-0.010711669921875,
0.07568359375,
0.043060302734375,
0.05767822265625,
-0.049407958984375,
-0.054779052734375,
-0.01462554931640625,
0.030731201171875,
-0.0247802734375,
0.01788330078125,
-0.0126800537109375,
-0.0298614501953125,
-0.01053619384765625,
0.021575927734375,
0.01335906982421875,
0.03643798828125,
0.033966064453125,
0.029327392578125,
-0.0228118896484375,
-0.0037326812744140625,
0.0570068359375,
-0.025848388671875,
-0.041900634765625,
-0.039703369140625,
0.037567138671875,
0.05426025390625,
0.0259857177734375,
0.0047149658203125,
0.02777099609375,
0.046173095703125,
0.0142059326171875,
-0.032562255859375,
0.00458526611328125,
-0.03515625,
0.0236968994140625,
-0.01482391357421875,
0.030975341796875,
0.02606201171875,
-0.0654296875,
-0.004909515380859375,
-0.036651611328125,
-0.045013427734375,
0.037139892578125,
0.0270233154296875,
-0.019989013671875,
0.023468017578125,
0.047454833984375,
-0.046966552734375,
-0.0032329559326171875,
0.0278472900390625,
0.026763916015625,
-0.028167724609375,
-0.006061553955078125,
-0.004047393798828125,
-0.0164794921875,
-0.0023021697998046875,
0.01337432861328125,
0.01198577880859375,
0.0271453857421875,
0.039093017578125,
0.00848388671875,
0.0167236328125,
-0.001918792724609375,
0.0309295654296875,
-0.0487060546875,
-0.01502227783203125,
0.041046142578125,
-0.052337646484375,
-0.0111083984375,
0.01763916015625,
0.019866943359375,
-0.036651611328125,
0.060394287109375,
-0.046600341796875,
-0.00858306884765625,
-0.061126708984375,
0.038909912109375,
-0.0389404296875,
0.0189361572265625,
-0.025299072265625,
0.004291534423828125,
-0.05169677734375,
-0.04937744140625,
0.048492431640625,
0.01300811767578125,
-0.016632080078125,
0.02374267578125,
0.0006146430969238281,
-0.007965087890625,
0.027130126953125,
0.006927490234375,
0.034576416015625,
0.0537109375,
-0.0433349609375,
0.044708251953125,
0.0084686279296875,
-0.0123291015625,
0.0141754150390625,
0.0452880859375,
-0.05340576171875,
0.01360321044921875,
-0.02349853515625,
-0.0469970703125,
0.02398681640625,
0.017547607421875,
-0.0190582275390625,
0.023040771484375,
-0.01323699951171875,
-0.0321044921875,
-0.005695343017578125,
-0.010986328125,
-0.038116455078125,
-0.0004696846008300781,
-0.02655029296875,
-0.0125732421875,
-0.0019502639770507812,
-0.0740966796875,
-0.0243072509765625,
-0.0029582977294921875,
0.034210205078125,
0.0016527175903320312,
-0.0244903564453125,
0.03155517578125,
-0.0341796875,
-0.01209259033203125,
-0.001239776611328125,
-0.0012578964233398438,
-0.016876220703125,
0.01153564453125,
-0.03179931640625,
-0.01367950439453125,
-0.0252227783203125,
0.01288604736328125,
-0.0174713134765625,
-0.005218505859375,
0.0311126708984375,
-0.00395965576171875,
-0.056549072265625,
0.00415802001953125,
-0.0310211181640625,
0.042877197265625,
-0.01128387451171875,
-0.0240325927734375,
0.0206146240234375,
0.0016298294067382812,
-0.0301513671875,
-0.0262451171875,
0.01062774658203125,
-0.0216827392578125,
-0.0172271728515625,
0.02490234375,
-0.01995849609375,
0.01274871826171875,
-0.028076171875,
-0.08966064453125,
0.0212860107421875,
-0.00521087646484375,
-0.04217529296875,
-0.06329345703125,
0.0199127197265625,
-0.01259613037109375,
-0.019775390625,
-0.0112152099609375,
-0.0253753662109375,
-0.025299072265625,
0.0269927978515625,
0.048675537109375,
0.0014438629150390625,
0.024688720703125,
0.043701171875,
-0.060943603515625,
0.034912109375,
-0.0018033981323242188,
0.03839111328125,
-0.005748748779296875,
0.00556182861328125,
0.033416748046875,
0.043212890625,
-0.020263671875,
0.0330810546875,
-0.005184173583984375,
-0.004596710205078125,
0.0177764892578125,
-0.0238037109375,
-0.08160400390625,
-0.059814453125,
0.063720703125,
0.0226898193359375,
0.03485107421875,
0.01309967041015625,
-0.038909912109375,
-0.037750244140625,
0.0263824462890625,
-0.00553131103515625,
0.0014057159423828125,
-0.040679931640625,
-0.0022735595703125,
-0.003971099853515625,
0.01091766357421875,
0.016937255859375,
-0.020263671875,
-0.0237884521484375,
-0.01396942138671875,
0.00324249267578125,
0.0130767822265625,
-0.06524658203125,
0.05572509765625,
-0.04071044921875,
-0.01739501953125,
-0.06396484375,
-0.02276611328125,
-0.01287078857421875,
-0.0694580078125,
-0.05670166015625,
-0.0102081298828125,
-0.01959228515625,
0.0265960693359375,
0.016876220703125,
0.01137542724609375,
-0.033660888671875,
0.025970458984375,
-0.0006670951843261719,
-0.021392822265625,
0.004947662353515625,
0.0259246826171875,
0.005344390869140625,
-0.043670654296875,
0.00931549072265625,
0.017822265625,
0.0223388671875,
0.0275115966796875,
0.02642822265625,
0.0015697479248046875,
0.04193115234375,
0.0097808837890625,
-0.036163330078125,
0.0199432373046875,
-0.033935546875,
-0.0128021240234375,
-0.0066070556640625,
-0.0616455078125,
-0.045013427734375,
0.0120086669921875,
-0.004817962646484375,
-0.0153961181640625,
0.0171051025390625
]
|
5523830a35ebf1f86cedc8063db0026a8819ccd6 | Wordpress Stackexchange
Q: Getting Post Thumbnail from RSS feed with SimplePie I am trying to pull the post thumbnail from an RSS feed to output on an external site. I am using the following function to add the post thumbnail to the site:
function rss_post_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '<p>' . get_the_post_thumbnail($post->ID, 'be_home') . '</p>' . get_the_content();
}
return $content;
}
add_filter('the_excerpt_rss', 'rss_post_thumbnail');
add_filter('the_content_feed', 'rss_post_thumbnail');
I am then using the fetch_feed function in WordPress (with this shortcode: http://www.kevinleary.net/display-rss-feeds-wordpress-shortcodes/) to generate the RSS feed. Whenever I try to get the image though, I get the following error:
Fatal error: Call to undefined method SimplePie_Item::get_thumbnail()
I have tried all of the following with the same result (though different function at the end of the error):
$image = $item->get_thumbnail();
$desc = $item->get_description();
$desc_dom = str_get_html($desc);
$image = $desc_dom->find('img', 0);
$image_url = $image->src;
$desc = $item->get_description();
$image = $desc->get_first_image_url();
$image = get_first_image_url($item->get_content());
| Q: Getting Post Thumbnail from RSS feed with SimplePie I am trying to pull the post thumbnail from an RSS feed to output on an external site. I am using the following function to add the post thumbnail to the site:
function rss_post_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '<p>' . get_the_post_thumbnail($post->ID, 'be_home') . '</p>' . get_the_content();
}
return $content;
}
add_filter('the_excerpt_rss', 'rss_post_thumbnail');
add_filter('the_content_feed', 'rss_post_thumbnail');
I am then using the fetch_feed function in WordPress (with this shortcode: http://www.kevinleary.net/display-rss-feeds-wordpress-shortcodes/) to generate the RSS feed. Whenever I try to get the image though, I get the following error:
Fatal error: Call to undefined method SimplePie_Item::get_thumbnail()
I have tried all of the following with the same result (though different function at the end of the error):
$image = $item->get_thumbnail();
$desc = $item->get_description();
$desc_dom = str_get_html($desc);
$image = $desc_dom->find('img', 0);
$image_url = $image->src;
$desc = $item->get_description();
$image = $desc->get_first_image_url();
$image = get_first_image_url($item->get_content());
| wordpress | {
"language": "en",
"length": 149,
"provenance": "stackexchange_00019.jsonl.gz:449137",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/162458"
} | [
0.0694580078125,
-0.017852783203125,
0.059417724609375,
0.00027370452880859375,
0.01143646240234375,
-0.0159454345703125,
0.06982421875,
-0.061065673828125,
0.0428466796875,
0.010467529296875,
-0.0738525390625,
-0.00009250640869140625,
-0.030792236328125,
0.004741668701171875,
-0.03076171875,
-0.03955078125,
0.07257080078125,
-0.046051025390625,
0.05535888671875,
0.017730712890625,
-0.0129241943359375,
0.058013916015625,
0.07958984375,
0.0010738372802734375,
0.0303955078125,
-0.00939178466796875,
0.0684814453125,
-0.008087158203125,
0.00432586669921875,
-0.005634307861328125,
0.026824951171875,
-0.0166473388671875,
0.034454345703125,
-0.0121307373046875,
-0.00539398193359375,
0.00748443603515625,
0.00559234619140625,
-0.020233154296875,
-0.032012939453125,
0.05841064453125,
0.00592041015625,
-0.007205963134765625,
0.00858306884765625,
-0.0161895751953125,
-0.02288818359375,
0.0156097412109375,
-0.0190887451171875,
-0.039031982421875,
-0.01336669921875,
0.0457763671875,
0.033203125,
-0.01172637939453125,
0.0279998779296875,
-0.0269317626953125,
0.01490020751953125,
0.01352691650390625,
-0.026702880859375,
-0.007518768310546875,
0.017059326171875,
-0.0014142990112304688,
-0.0184173583984375,
-0.020477294921875,
0.02740478515625,
-0.003986358642578125,
0.0103302001953125,
0.006748199462890625,
0.0300750732421875,
0.0205230712890625,
-0.018096923828125,
-0.01396942138671875,
0.00905609130859375,
-0.0165252685546875,
-0.00445556640625,
-0.0185089111328125,
0.023193359375,
0.0212554931640625,
-0.01605224609375,
-0.0241851806640625,
0.0138702392578125,
0.0239410400390625,
0.004924774169921875,
-0.031951904296875,
-0.08868408203125,
0.019256591796875,
0.0051116943359375,
0.046051025390625,
0.002452850341796875,
-0.0164337158203125,
-0.0169219970703125,
-0.004314422607421875,
-0.0154266357421875,
-0.00675201416015625,
-0.050628662109375,
0.0214996337890625,
0.019012451171875,
-0.0296630859375,
0.0233306884765625,
0.0640869140625,
-0.0253753662109375,
0.0112152099609375,
-0.0283355712890625,
-0.02105712890625,
0.01184844970703125,
-0.048095703125,
0.00817108154296875,
-0.0235443115234375,
-0.0201263427734375,
0.01544189453125,
0.060699462890625,
0.0582275390625,
-0.00824737548828125,
0.042999267578125,
-0.004856109619140625,
-0.0131072998046875,
0.005584716796875,
0.0030059814453125,
-0.038848876953125,
0.0298004150390625,
-0.007122039794921875,
0.0233154296875,
-0.004405975341796875,
-0.001773834228515625,
0.0010404586791992188,
-0.00864410400390625,
0.01238250732421875,
0.019927978515625,
-0.025421142578125,
-0.0093994140625,
-0.0196380615234375,
-0.0023059844970703125,
-0.0297698974609375,
0.03179931640625,
0.025970458984375,
0.0125579833984375,
-0.006687164306640625,
-0.00696563720703125,
-0.0037403106689453125,
-0.0228729248046875,
-0.01029205322265625,
0.015655517578125,
-0.01415252685546875,
-0.01212310791015625,
0.03955078125,
-0.0277099609375,
-0.0017871856689453125,
0.0233917236328125,
0.00724029541015625,
0.003803253173828125,
0.02362060546875,
-0.0240631103515625,
-0.0254669189453125,
-0.00498199462890625,
-0.006755828857421875,
0.037841796875,
0.023651123046875,
-0.01494598388671875,
0.06683349609375,
-0.051483154296875,
0.01067352294921875,
-0.0496826171875,
0.052001953125,
-0.0025196075439453125,
-0.005077362060546875,
-0.010528564453125,
-0.030517578125,
-0.00597381591796875,
-0.0595703125,
-0.01136016845703125,
0.022491455078125,
0.0282135009765625,
0.0158233642578125,
0.0243377685546875,
-0.019378662109375,
0.01433563232421875,
0.01439666748046875,
-0.0032596588134765625,
0.0009713172912597656,
-0.01168060302734375,
0.0301513671875,
0.0232696533203125,
-0.0287017822265625,
-0.032379150390625,
0.045257568359375,
-0.023468017578125,
-0.060882568359375,
0.03057861328125,
0.00496673583984375,
0.0477294921875,
0.0272979736328125,
0.01470947265625,
0.0096588134765625,
0.004016876220703125,
-0.0124053955078125,
0.0002027750015258789,
0.01143646240234375,
-0.0248260498046875,
-0.005397796630859375,
-0.021148681640625,
-0.00754547119140625,
0.00873565673828125,
0.0175933837890625,
0.0223388671875,
0.00875091552734375,
0.0203704833984375,
-0.04400634765625,
0.0423583984375,
-0.0267333984375,
0.040069580078125,
-0.038177490234375,
-0.0031890869140625,
0.0195159912109375,
-0.01488494873046875,
-0.002399444580078125,
-0.03240966796875,
-0.0218505859375,
0.01385498046875,
-0.0504150390625,
0.009765625,
-0.0305328369140625,
0.0704345703125,
-0.02880859375,
-0.0703125,
-0.035186767578125,
-0.0038318634033203125,
0.054962158203125,
0.0073699951171875,
-0.0179443359375,
-0.0135955810546875,
0.0224151611328125,
0.0273590087890625,
-0.05938720703125,
0.0254669189453125,
-0.0196685791015625,
-0.031707763671875,
-0.026458740234375,
0.00864410400390625,
0.037750244140625,
-0.01291656494140625,
0.004863739013671875,
0.027801513671875,
0.061279296875,
0.050933837890625,
0.029327392578125,
-0.011810302734375,
0.11083984375,
0.00748443603515625,
0.026336669921875,
-0.053955078125,
0.0032806396484375,
0.0239410400390625,
0.045196533203125,
0.00757598876953125,
0.00727081298828125,
-0.021728515625,
-0.01248931884765625,
0.035919189453125,
0.021270751953125,
0.0267791748046875,
-0.00986480712890625,
0.0390625,
-0.01512908935546875,
0.05767822265625,
0.0030307769775390625,
0.0196685791015625,
0.04144287109375,
0.0408935546875,
0.053985595703125,
0.0489501953125,
-0.0294952392578125,
0.001987457275390625,
0.0007314682006835938,
0.020050048828125,
-0.007659912109375,
0.03289794921875,
0.023651123046875,
-0.006099700927734375,
-0.0009007453918457031,
-0.02655029296875,
0.0008592605590820312,
0.018646240234375,
0.0200042724609375,
0.0465087890625,
0.004039764404296875,
-0.0010900497436523438,
-0.037261962890625,
-0.0430908203125,
0.0128326416015625,
0.04241943359375,
0.02130126953125,
0.0229949951171875,
0.0226593017578125,
0.0184326171875,
-0.01190948486328125,
0.045623779296875,
0.024322509765625,
0.00890350341796875,
0.0297088623046875,
-0.041748046875,
0.03741455078125,
-0.01111602783203125,
0.06976318359375,
0.0596923828125,
-0.0185089111328125,
0.0258026123046875,
0.006511688232421875,
-0.023895263671875,
-0.0129241943359375,
0.005184173583984375,
-0.006023406982421875,
0.0103912353515625,
-0.0582275390625,
0.0333251953125,
0.017913818359375,
0.07037353515625,
-0.031463623046875,
-0.05059814453125,
-0.01117706298828125,
0.01337432861328125,
-0.0833740234375,
-0.05755615234375,
-0.001224517822265625,
-0.06597900390625,
-0.01181793212890625,
0.01021575927734375,
-0.03448486328125,
-0.0075225830078125,
0.035797119140625,
-0.0140380859375,
-0.019989013671875,
-0.01084136962890625,
-0.06842041015625,
-0.040557861328125,
-0.08343505859375,
0.04290771484375,
-0.0125732421875,
0.03955078125,
0.0106048583984375,
-0.0185089111328125,
0.007076263427734375,
-0.00756072998046875,
0.030426025390625,
0.0810546875,
-0.00567626953125,
-0.034210205078125,
-0.006748199462890625,
0.0140533447265625,
-0.056488037109375,
-0.0030422210693359375,
0.02008056640625,
0.0124969482421875,
-0.028411865234375,
0.00803375244140625,
-0.04052734375,
-0.01494598388671875,
-0.0063018798828125,
0.0294647216796875,
0.045379638671875,
0.00287628173828125,
0.03076171875,
-0.0288238525390625,
-0.03955078125,
-0.0364990234375,
-0.07427978515625,
0.03814697265625,
0.06231689453125,
0.0247344970703125,
-0.0192718505859375,
0.0290679931640625,
-0.02099609375,
0.004642486572265625,
0.05279541015625,
-0.0139923095703125,
0.001232147216796875,
-0.035400390625,
-0.0259552001953125,
-0.038421630859375,
0.0276031494140625,
-0.008514404296875,
0.038909912109375,
0.01556396484375,
0.0172119140625,
-0.0263671875,
-0.0028514862060546875,
-0.057098388671875,
0.001308441162109375,
0.029266357421875,
-0.01389312744140625,
0.0231170654296875,
-0.01467132568359375,
-0.023956298828125,
-0.0197601318359375,
0.040740966796875,
-0.00937652587890625,
-0.021636962890625,
-0.03167724609375,
0.000016033649444580078,
0.01116180419921875,
-0.059326171875,
0.013702392578125,
-0.01293182373046875,
-0.07989501953125,
0.00330352783203125,
-0.0013036727905273438,
-0.0287933349609375,
0.031829833984375,
-0.0494384765625,
-0.0251922607421875,
-0.04315185546875,
0.016998291015625,
0.0113525390625,
0.007720947265625,
0.059173583984375,
-0.024688720703125,
0.05474853515625,
-0.01291656494140625,
-0.0197296142578125,
-0.091796875,
-0.013702392578125,
-0.007778167724609375,
0.032135009765625,
-0.002017974853515625,
-0.015594482421875,
-0.037017822265625,
0.02813720703125,
-0.040252685546875,
-0.004730224609375,
-0.007457733154296875,
0.04241943359375,
0.01013946533203125,
-0.006626129150390625,
-0.0128631591796875,
-0.015106201171875,
0.01580810546875,
0.006725311279296875,
-0.032318115234375,
0.026092529296875,
-0.053436279296875,
0.0229034423828125,
-0.0225067138671875,
-0.031219482421875,
-0.0278472900390625,
-0.007534027099609375,
0.07208251953125,
0.030975341796875,
0.00414276123046875,
0.0202789306640625,
-0.0276641845703125,
-0.00946807861328125,
0.025970458984375,
0.0034809112548828125,
-0.02166748046875,
0.0119781494140625,
0.02960205078125,
0.01476287841796875,
-0.0189056396484375,
-0.062469482421875,
-0.0190277099609375,
0.0227813720703125,
-0.0135650634765625,
0.072998046875,
0.06689453125,
0.0032176971435546875,
0.028045654296875,
0.023345947265625,
0.029937744140625,
-0.032012939453125,
0.0780029296875,
-0.006458282470703125,
-0.0079803466796875,
0.037841796875,
0.01415252685546875,
-0.0335693359375,
0.0243072509765625,
-0.022003173828125,
0.0017871856689453125,
-0.008270263671875,
-0.00366973876953125,
-0.013214111328125,
0.028289794921875,
0.006999969482421875,
-0.0406494140625,
0.0200958251953125,
-0.01241302490234375,
0.00864410400390625,
0.0225982666015625,
-0.015594482421875,
0.006496429443359375,
-0.01548004150390625,
0.0266265869140625,
-0.01012420654296875,
-0.0093536376953125,
-0.0149688720703125,
0.054595947265625,
-0.035430908203125,
0.00960540771484375,
-0.0014410018920898438,
0.02447509765625,
-0.080810546875,
-0.01031494140625,
-0.01441192626953125,
-0.06549072265625,
0.03399658203125,
0.0055389404296875,
-0.01158905029296875,
-0.00217437744140625,
0.05865478515625,
0.03765869140625,
-0.028045654296875,
-0.0186614990234375,
-0.0249481201171875,
-0.01079559326171875,
-0.0491943359375,
0.02880859375,
0.006053924560546875,
0.00556182861328125,
0.044525146484375,
0.04412841796875,
0.00811767578125,
0.042144775390625,
-0.02239990234375,
0.00445556640625,
-0.004688262939453125,
0.03875732421875,
0.0222015380859375,
-0.00673675537109375,
-0.0207366943359375,
0.030426025390625,
0.0114898681640625,
-0.0286407470703125,
-0.02099609375,
0.0133209228515625,
0.040191650390625,
-0.036590576171875,
-0.00847625732421875,
0.0194244384765625,
-0.0011816024780273438,
-0.028045654296875,
0.0357666015625,
0.042266845703125,
-0.01239013671875,
-0.029693603515625,
-0.034149169921875,
0.0294647216796875,
0.0285186767578125,
-0.0192413330078125,
-0.00681304931640625,
0.02557373046875,
0.040802001953125,
-0.01419830322265625,
-0.0299224853515625,
0.03887939453125,
0.03594970703125,
-0.0241241455078125,
-0.044921875,
-0.032958984375,
0.042144775390625,
0.008544921875,
-0.01558685302734375,
-0.0173187255859375,
0.032867431640625,
-0.03289794921875,
0.035980224609375,
-0.032135009765625,
0.01374053955078125,
-0.060394287109375,
0.0036029815673828125,
0.043365478515625,
0.05133056640625,
-0.03155517578125,
0.004138946533203125,
-0.035614013671875,
0.0017108917236328125,
0.017578125,
-0.044830322265625,
-0.020904541015625,
-0.028717041015625,
-0.033447265625,
0.0091400146484375,
-0.01010894775390625,
0.056243896484375,
0.01666259765625,
0.04083251953125,
-0.0248260498046875,
0.060882568359375,
-0.0118865966796875,
0.00937652587890625,
0.01715087890625,
0.0272369384765625,
0.0045318603515625,
-0.01555633544921875,
-0.029541015625,
-0.009429931640625,
-0.029083251953125,
-0.08892822265625,
-0.0164642333984375,
0.029327392578125,
-0.0158843994140625,
0.04449462890625,
0.019989013671875,
0.0205078125,
0.007083892822265625,
0.008819580078125,
-0.004543304443359375,
-0.0194549560546875,
-0.0112762451171875,
-0.00044274330139160156,
-0.012054443359375,
0.0194549560546875,
-0.045745849609375,
-0.021331787109375,
0.01512908935546875,
0.01236724853515625,
0.00978851318359375,
-0.0389404296875,
-0.0151824951171875,
0.067138671875,
0.006988525390625,
0.0594482421875,
0.1085205078125,
-0.048095703125,
0.0280914306640625,
0.044769287109375,
-0.03643798828125,
0.004558563232421875,
0.042205810546875,
-0.03192138671875,
-0.014312744140625,
0.0207366943359375,
0.00679779052734375,
-0.0193023681640625,
-0.00762176513671875,
-0.0269317626953125,
0.023193359375,
-0.044158935546875,
0.044586181640625,
0.060211181640625,
0.004062652587890625,
0.043792724609375,
-0.07373046875,
-0.0005483627319335938,
0.00733184814453125,
0.0032711029052734375,
0.00724029541015625,
0.046661376953125,
-0.052398681640625,
-0.0058441162109375,
0.016632080078125,
-0.035003662109375,
-0.01629638671875,
0.0026645660400390625,
-0.0085906982421875,
-0.00022649765014648438,
-0.061279296875,
-0.0208282470703125,
0.037628173828125,
-0.019256591796875,
-0.03155517578125,
0.025604248046875,
-0.0227813720703125,
-0.00957489013671875,
-0.07269287109375,
-0.019744873046875,
0.0021915435791015625,
-0.0018301010131835938,
0.0307159423828125,
0.00760650634765625,
0.005924224853515625,
0.0308074951171875,
-0.004886627197265625,
0.01898193359375,
-0.0078125,
-0.00533294677734375,
0.0200653076171875,
-0.01275634765625,
0.02655029296875,
0.01104736328125,
-0.038787841796875,
0.017059326171875,
-0.0196685791015625,
-0.003963470458984375,
-0.022186279296875,
-0.040863037109375,
0.0794677734375,
-0.01165771484375,
-0.0175628662109375,
0.01099395751953125,
0.037689208984375,
0.0024662017822265625,
-0.0122833251953125,
0.06024169921875,
-0.06829833984375,
-0.0247039794921875,
0.004974365234375,
-0.0263824462890625,
-0.019927978515625,
-0.04205322265625,
-0.071533203125,
0.08123779296875,
-0.0305938720703125,
0.036651611328125,
0.0265655517578125,
0.008544921875,
-0.01500701904296875,
-0.0186004638671875,
-0.0218658447265625,
-0.0015497207641601562,
-0.0007429122924804688,
0.0148773193359375,
-0.0285491943359375,
-0.0042572021484375,
-0.010528564453125,
0.035369873046875,
0.04852294921875,
0.01549530029296875,
-0.0218353271484375,
-0.0186309814453125,
0.0367431640625,
0.0207672119140625,
-0.0123748779296875,
0.0199127197265625,
-0.0053253173828125,
-0.01380157470703125,
0.01438140869140625,
-0.0135955810546875,
0.038665771484375,
-0.0196533203125,
-0.0155029296875,
0.0198974609375,
0.0028362274169921875,
-0.01506805419921875,
0.05023193359375,
-0.0312042236328125,
-0.06475830078125,
0.031768798828125,
0.037506103515625,
-0.030364990234375,
-0.01439666748046875,
0.0487060546875,
0.00725555419921875,
-0.00888824462890625,
-0.056549072265625,
-0.007137298583984375,
0.0301666259765625,
0.004154205322265625,
0.057098388671875,
0.032745361328125,
0.02764892578125,
0.07171630859375,
0.018646240234375,
0.0458984375,
0.029052734375,
-0.010406494140625,
0.0258331298828125,
-0.0017404556274414062,
0.0120391845703125,
-0.0633544921875,
0.00807952880859375,
0.02337646484375,
0.0345458984375,
-0.030303955078125,
-0.0218963623046875,
0.019989013671875,
0.0086517333984375,
-0.0111846923828125,
0.007778167724609375,
0.019622802734375,
-0.039459228515625,
-0.007236480712890625,
-0.06304931640625,
-0.01399993896484375,
0.05389404296875,
0.0565185546875,
-0.00029540061950683594,
-0.025360107421875,
-0.04193115234375,
-0.06610107421875,
-0.00420379638671875,
0.00220489501953125,
0.0050201416015625,
0.028472900390625,
-0.00481414794921875,
0.02764892578125,
-0.035003662109375,
-0.0030536651611328125,
0.0033969879150390625,
0.05859375,
0.01107025146484375,
0.00643157958984375,
-0.007602691650390625,
-0.0777587890625,
0.04388427734375,
0.01324462890625,
-0.01219940185546875,
-0.05706787109375,
-0.0109710693359375,
0.006099700927734375,
-0.053680419921875,
-0.03668212890625,
0.01090240478515625,
-0.01438140869140625,
-0.01462554931640625,
-0.01116943359375,
-0.02362060546875,
0.010009765625,
-0.01229095458984375,
0.0113067626953125,
0.0111541748046875,
0.01251983642578125,
-0.023162841796875,
0.043121337890625,
-0.01117706298828125,
0.004863739013671875,
0.03338623046875,
-0.0221405029296875,
0.0245513916015625,
-0.019683837890625,
-0.0850830078125,
-0.004070281982421875,
-0.01070404052734375,
-0.059356689453125,
0.017608642578125,
0.0286712646484375,
-0.0172882080078125,
0.012908935546875,
-0.016815185546875,
0.00815582275390625,
-0.00856781005859375,
-0.0205078125,
0.0161285400390625,
0.006103515625,
0.01270294189453125,
0.01483917236328125,
0.0083770751953125,
-0.020721435546875,
-0.0252227783203125,
0.066162109375,
0.0491943359375,
0.0160064697265625,
-0.0191192626953125,
0.056793212890625,
0.0008821487426757812,
-0.01158905029296875,
-0.01776123046875,
0.001194000244140625,
0.00679779052734375,
-0.0305938720703125,
-0.003772735595703125,
-0.00807952880859375,
0.0113525390625,
0.01049041748046875,
0.030242919921875,
-0.0267333984375,
-0.048828125,
0.004611968994140625,
0.030853271484375,
0.045013427734375,
0.0236968994140625,
-0.0305938720703125,
0.004058837890625,
-0.038360595703125,
-0.040283203125,
0.038116455078125,
0.0163116455078125,
0.03924560546875,
0.032745361328125,
0.04052734375,
0.00923919677734375,
0.0338134765625,
-0.0163116455078125,
0.044403076171875,
0.030914306640625,
-0.00695037841796875,
-0.0179443359375,
-0.0350341796875,
-0.0188446044921875,
0.002651214599609375,
-0.004589080810546875,
0.026397705078125,
-0.0172119140625,
0.019256591796875,
0.029144287109375,
-0.0219573974609375,
-0.001277923583984375,
-0.034332275390625,
-0.035980224609375,
0.04168701171875,
-0.0036334991455078125,
-0.056365966796875,
0.00860595703125,
-0.01012420654296875,
-0.0478515625,
-0.0297698974609375,
-0.0208740234375,
-0.016021728515625,
-0.048248291015625,
0.01319122314453125,
0.0020656585693359375,
0.0290985107421875,
0.0040130615234375,
-0.022064208984375,
0.017242431640625,
-0.026123046875,
0.0009474754333496094,
0.00933837890625,
-0.05584716796875,
0.0224151611328125,
0.029937744140625,
-0.02838134765625,
-0.034942626953125,
-0.0260162353515625,
-0.00012969970703125,
-0.048187255859375,
0.0189056396484375,
0.01395416259765625,
-0.0234222412109375,
0.0242767333984375,
0.04443359375,
0.0029144287109375,
0.09100341796875,
-0.025848388671875,
-0.0277862548828125,
-0.0163726806640625,
0.01776123046875,
-0.008697509765625,
-0.05682373046875,
0.01947021484375,
-0.0767822265625,
-0.019683837890625,
-0.01103973388671875,
0.007350921630859375,
0.0034332275390625,
-0.0299072265625,
-0.045654296875,
0.04180908203125,
0.0017576217651367188,
-0.0244903564453125,
-0.0223236083984375,
0.021942138671875,
0.0215911865234375,
-0.0294189453125,
-0.0004801750183105469,
-0.01163482666015625,
-0.036468505859375,
-0.009979248046875,
0.023162841796875,
0.011199951171875,
0.06158447265625,
0.0100860595703125,
-0.0309295654296875,
-0.0156707763671875,
-0.03802490234375,
-0.005611419677734375,
-0.02215576171875,
0.0031108856201171875,
0.005977630615234375,
0.020599365234375,
-0.0121307373046875,
-0.0445556640625,
0.01221466064453125,
-0.007518768310546875,
-0.0210723876953125,
-0.03350830078125,
-0.0615234375,
-0.01485443115234375,
0.0941162109375,
0.09130859375,
0.0372314453125,
-0.05364990234375,
0.0226287841796875,
-0.01482391357421875,
-0.05078125,
-0.04400634765625,
0.0221099853515625,
-0.07379150390625,
-0.055877685546875,
-0.00803375244140625,
-0.0187530517578125,
0.017730712890625,
-0.0555419921875,
-0.042388916015625,
0.0035858154296875,
-0.05474853515625,
0.00030303001403808594,
-0.0273284912109375,
0.01186370849609375,
0.051910400390625,
-0.038787841796875,
0.00847625732421875,
-0.0283660888671875,
0.009124755859375,
0.0230560302734375,
-0.06719970703125,
-0.018646240234375,
0.0158233642578125,
0.0048980712890625,
0.0288848876953125,
0.01513671875,
0.00811004638671875,
-0.00035691261291503906,
0.0135345458984375,
-0.024261474609375,
-0.0185394287109375,
0.022064208984375,
-0.0204620361328125,
0.01293182373046875,
-0.045379638671875,
-0.012420654296875,
-0.00018727779388427734,
-0.00966644287109375,
-0.01021575927734375,
-0.014892578125,
0.01346588134765625,
-0.0217437744140625,
-0.006191253662109375,
0.006053924560546875,
-0.01251220703125,
-0.0025081634521484375,
0.035186767578125,
-0.0299835205078125,
-0.01244354248046875,
-0.0002651214599609375,
-0.0306549072265625,
0.0005755424499511719,
-0.009307861328125
]
|
67f1815e87ab352e5740d9ca55bb0402e0ebe0f3 | Wordpress Stackexchange
Q: CPU usage: AJAX and Heartbeat API on admin pages My (shared) web host recently sent me this:
"Our server monitoring systems keep indicating high server load persistently maintained by your website (...). Most of the hits are to the /www/www/wp-admin/admin-ajax.php script. We would advise the following:
Do not stay logged into the WordPress dashboard through the day. Once you finish your work, you should log out. If you stay logged in and keep the browser window open, WordPress will keep generating hits to admin-ajax.php. ..."
When I asked them about this script, they replied:
"WordPress calls this script to auto save your posts, and some other features of the dashboard. Any stats collection plugins can also contribute to the CPU usage of the script."
What do you think? Is this likely stats collection? Or why is it consuming so much memory? I've had other WP installs, including on this host, where I stayed logged in throughout the day. It's not like I have the dashboard or even my browser open all the time, either!
| Q: CPU usage: AJAX and Heartbeat API on admin pages My (shared) web host recently sent me this:
"Our server monitoring systems keep indicating high server load persistently maintained by your website (...). Most of the hits are to the /www/www/wp-admin/admin-ajax.php script. We would advise the following:
Do not stay logged into the WordPress dashboard through the day. Once you finish your work, you should log out. If you stay logged in and keep the browser window open, WordPress will keep generating hits to admin-ajax.php. ..."
When I asked them about this script, they replied:
"WordPress calls this script to auto save your posts, and some other features of the dashboard. Any stats collection plugins can also contribute to the CPU usage of the script."
What do you think? Is this likely stats collection? Or why is it consuming so much memory? I've had other WP installs, including on this host, where I stayed logged in throughout the day. It's not like I have the dashboard or even my browser open all the time, either!
| wordpress | {
"language": "en",
"length": 175,
"provenance": "stackexchange_00019.jsonl.gz:449169",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/162569"
} | [
0.07745361328125,
-0.01290130615234375,
0.0109710693359375,
-0.0285186767578125,
0.0164947509765625,
-0.0311279296875,
0.0369873046875,
-0.0205535888671875,
0.00568389892578125,
0.01439666748046875,
-0.04461669921875,
0.0182037353515625,
-0.01522064208984375,
-0.0015964508056640625,
-0.0126953125,
-0.04327392578125,
0.04901123046875,
-0.023681640625,
0.01934814453125,
0.0169830322265625,
-0.006237030029296875,
0.05718994140625,
-0.0002541542053222656,
0.0254974365234375,
0.01214599609375,
-0.004398345947265625,
-0.00585174560546875,
0.005794525146484375,
0.0006356239318847656,
0.00013113021850585938,
0.007442474365234375,
-0.0004887580871582031,
-0.00713348388671875,
0.03778076171875,
-0.00771331787109375,
-0.0006585121154785156,
-0.00899505615234375,
0.0255584716796875,
0.031341552734375,
-0.012481689453125,
0.0003516674041748047,
-0.003025054931640625,
0.056549072265625,
-0.0200042724609375,
0.0015277862548828125,
0.014892578125,
-0.0067291259765625,
-0.05352783203125,
-0.00028324127197265625,
-0.0221099853515625,
0.021148681640625,
-0.0012645721435546875,
0.031402587890625,
0.0015439987182617188,
-0.0146636962890625,
-0.0071563720703125,
-0.01329803466796875,
0.05303955078125,
0.06658935546875,
-0.037078857421875,
-0.07568359375,
-0.04034423828125,
0.0281829833984375,
-0.039337158203125,
-0.033477783203125,
-0.0196990966796875,
-0.003437042236328125,
0.00797271728515625,
0.0009646415710449219,
-0.028961181640625,
0.025634765625,
0.0147247314453125,
-0.01043701171875,
0.01348114013671875,
-0.0033245086669921875,
-0.04583740234375,
0.0282745361328125,
-0.0222930908203125,
-0.014129638671875,
0.058563232421875,
0.022705078125,
-0.001972198486328125,
-0.0100860595703125,
0.048309326171875,
-0.040985107421875,
0.047027587890625,
-0.01233673095703125,
-0.026763916015625,
-0.0201568603515625,
-0.013427734375,
-0.0229644775390625,
-0.041717529296875,
0.001903533935546875,
0.0155029296875,
-0.02459716796875,
-0.011627197265625,
-0.0011005401611328125,
0.002475738525390625,
0.01239013671875,
0.004329681396484375,
-0.005222320556640625,
-0.01334381103515625,
-0.0179290771484375,
0.008453369140625,
-0.002841949462890625,
0.06866455078125,
0.0003123283386230469,
-0.0218505859375,
0.026611328125,
0.0115966796875,
0.024169921875,
0.0242156982421875,
0.0193634033203125,
-0.0044403076171875,
-0.0294036865234375,
-0.021026611328125,
-0.0247802734375,
0.00489044189453125,
0.005382537841796875,
-0.01556396484375,
-0.0193328857421875,
0.005573272705078125,
-0.033416748046875,
0.01499176025390625,
0.030303955078125,
0.00867462158203125,
-0.01297760009765625,
0.028411865234375,
-0.034393310546875,
0.0231170654296875,
-0.002315521240234375,
-0.00957489013671875,
0.02252197265625,
0.047943115234375,
0.00627899169921875,
-0.0084075927734375,
0.0458984375,
-0.04290771484375,
-0.004241943359375,
0.024932861328125,
0.025482177734375,
-0.060028076171875,
-0.057647705078125,
0.00418853759765625,
0.016754150390625,
-0.0164947509765625,
-0.0160980224609375,
0.034271240234375,
0.04119873046875,
0.0185699462890625,
0.0004749298095703125,
-0.007720947265625,
0.01348114013671875,
0.0191497802734375,
0.0097808837890625,
0.0244140625,
0.021575927734375,
-0.0081787109375,
-0.0207672119140625,
-0.006549835205078125,
0.0086212158203125,
0.0023250579833984375,
0.0001895427703857422,
-0.00528717041015625,
-0.042694091796875,
0.00676727294921875,
0.0023136138916015625,
-0.0027370452880859375,
0.0240478515625,
-0.036346435546875,
0.04754638671875,
-0.0089874267578125,
0.059478759765625,
-0.0136871337890625,
-0.00557708740234375,
0.00243377685546875,
0.0310821533203125,
-0.018218994140625,
0.04388427734375,
-0.060028076171875,
-0.0792236328125,
-0.047210693359375,
0.0408935546875,
-0.04022216796875,
-0.0148162841796875,
0.0273284912109375,
0.01522064208984375,
0.052001953125,
-0.0108795166015625,
0.0117950439453125,
0.006999969482421875,
0.01363372802734375,
0.0079345703125,
0.047119140625,
-0.0085601806640625,
-0.043060302734375,
-0.053985595703125,
0.00600433349609375,
-0.037109375,
-0.0340576171875,
0.040771484375,
0.0125579833984375,
-0.032958984375,
-0.01198577880859375,
-0.12493896484375,
0.0099945068359375,
-0.03314208984375,
0.04095458984375,
0.035247802734375,
0.0276641845703125,
0.0069427490234375,
0.049163818359375,
-0.0119171142578125,
-0.0567626953125,
-0.044952392578125,
-0.005069732666015625,
-0.042266845703125,
0.0113525390625,
-0.0128631591796875,
0.014862060546875,
-0.021942138671875,
-0.0184478759765625,
-0.0235137939453125,
-0.03314208984375,
0.00705718994140625,
0.00970458984375,
-0.055816650390625,
-0.006359100341796875,
-0.005931854248046875,
-0.03369140625,
0.031494140625,
0.09912109375,
0.05804443359375,
0.06903076171875,
-0.02484130859375,
-0.0341796875,
-0.0186309814453125,
-0.06915283203125,
0.00850677490234375,
0.052093505859375,
0.014923095703125,
0.0290985107421875,
0.00618743896484375,
0.05181884765625,
-0.0033512115478515625,
-0.07293701171875,
0.006298065185546875,
0.031707763671875,
0.00858306884765625,
0.039306640625,
-0.0380859375,
-0.0146636962890625,
0.0233917236328125,
-0.052642822265625,
-0.02313232421875,
0.057037353515625,
0.012939453125,
-0.0035724639892578125,
-0.004734039306640625,
0.019256591796875,
0.0167236328125,
0.00717926025390625,
-0.042266845703125,
0.00836944580078125,
-0.029876708984375,
-0.00962066650390625,
0.023712158203125,
0.030426025390625,
0.01526641845703125,
-0.0516357421875,
0.01389312744140625,
0.0062713623046875,
-0.0158233642578125,
0.0105438232421875,
0.06732177734375,
-0.048919677734375,
-0.038116455078125,
-0.005313873291015625,
0.0310211181640625,
-0.0041351318359375,
-0.021148681640625,
-0.008575439453125,
-0.035552978515625,
-0.0175323486328125,
0.0091552734375,
-0.076171875,
-0.0021419525146484375,
0.00691986083984375,
0.0188446044921875,
-0.01018524169921875,
0.0011806488037109375,
0.038116455078125,
-0.004955291748046875,
0.026275634765625,
0.026031494140625,
-0.022003173828125,
0.0584716796875,
-0.003314971923828125,
0.0107574462890625,
0.004302978515625,
0.08282470703125,
0.055694580078125,
0.003936767578125,
0.0191802978515625,
-0.00620269775390625,
0.020416259765625,
0.0267486572265625,
-0.039520263671875,
-0.0361328125,
0.01058197021484375,
-0.036041259765625,
0.03863525390625,
0.04443359375,
0.11456298828125,
-0.0278167724609375,
-0.0657958984375,
0.0094451904296875,
0.03955078125,
-0.09814453125,
-0.1324462890625,
-0.042388916015625,
-0.030914306640625,
0.00817108154296875,
-0.034423828125,
-0.004425048828125,
0.00968170166015625,
-0.0148162841796875,
0.01544189453125,
-0.031585693359375,
-0.0050506591796875,
-0.0350341796875,
-0.07366943359375,
-0.04791259765625,
-0.0288238525390625,
-0.0108795166015625,
0.003429412841796875,
0.00566864013671875,
0.033721923828125,
-0.0219573974609375,
-0.08050537109375,
-0.03265380859375,
-0.0164642333984375,
-0.01045989990234375,
0.000858306884765625,
-0.0214385986328125,
-0.035552978515625,
-0.039764404296875,
0.001285552978515625,
-0.0258026123046875,
-0.015289306640625,
0.0261077880859375,
0.00750732421875,
-0.0123443603515625,
-0.023040771484375,
0.0002617835998535156,
0.036956787109375,
-0.0019140243530273438,
0.007106781005859375,
0.02886962890625,
-0.02716064453125,
-0.01006317138671875,
0.00548553466796875,
-0.0247344970703125,
-0.03448486328125,
0.01824951171875,
-0.02911376953125,
-0.006427764892578125,
-0.0259246826171875,
0.0308685302734375,
0.0019350051879882812,
-0.0282440185546875,
0.007602691650390625,
0.014801025390625,
-0.001003265380859375,
0.0294189453125,
-0.005359649658203125,
0.0032329559326171875,
-0.042938232421875,
0.0241851806640625,
-0.0061187744140625,
-0.0205230712890625,
-0.0188140869140625,
0.0004341602325439453,
-0.01056671142578125,
0.0271148681640625,
0.036590576171875,
0.0406494140625,
0.01593017578125,
0.02508544921875,
-0.0290985107421875,
0.0005702972412109375,
0.036529541015625,
-0.004283905029296875,
-0.00690460205078125,
-0.006404876708984375,
0.030914306640625,
-0.0755615234375,
-0.057708740234375,
-0.03155517578125,
0.006351470947265625,
-0.0306549072265625,
0.0048675537109375,
-0.0079345703125,
-0.012298583984375,
-0.0224456787109375,
0.052520751953125,
-0.0231781005859375,
-0.0211029052734375,
0.02490234375,
-0.024932861328125,
0.035064697265625,
-0.0028171539306640625,
0.055694580078125,
-0.0445556640625,
0.011871337890625,
-0.04595947265625,
-0.0821533203125,
-0.0232391357421875,
-0.0208740234375,
0.0791015625,
0.01477813720703125,
-0.026611328125,
-0.01023101806640625,
0.0294647216796875,
0.00736236572265625,
0.0256195068359375,
-0.0011920928955078125,
-0.01131439208984375,
0.0204010009765625,
0.0303955078125,
0.01537322998046875,
-0.0023136138916015625,
-0.0312042236328125,
-0.044952392578125,
-0.032196044921875,
-0.0218963623046875,
0.0023517608642578125,
0.0099639892578125,
0.007343292236328125,
-0.0016689300537109375,
-0.056854248046875,
-0.049163818359375,
-0.032318115234375,
0.00927734375,
-0.035247802734375,
0.032379150390625,
-0.054779052734375,
-0.045806884765625,
0.037750244140625,
0.01306915283203125,
0.01137542724609375,
0.00954437255859375,
0.07000732421875,
0.0086669921875,
-0.0121612548828125,
-0.07208251953125,
-0.0156097412109375,
0.022613525390625,
-0.017547607421875,
0.036865234375,
-0.0211181640625,
-0.030853271484375,
0.09918212890625,
-0.0226593017578125,
0.0264739990234375,
-0.03277587890625,
0.01959228515625,
0.0251617431640625,
0.0013532638549804688,
0.012115478515625,
0.0222625732421875,
-0.005138397216796875,
0.0177001953125,
-0.006114959716796875,
-0.01617431640625,
-0.025360107421875,
0.037628173828125,
-0.00717926025390625,
0.01336669921875,
-0.04376220703125,
-0.040252685546875,
0.01541900634765625,
-0.033355712890625,
0.04949951171875,
0.00667572021484375,
0.00870513916015625,
0.0389404296875,
0.031890869140625,
-0.0082550048828125,
-0.00858306884765625,
0.03643798828125,
-0.006778717041015625,
0.0284271240234375,
0.0226898193359375,
-0.0034656524658203125,
-0.0433349609375,
-0.00618743896484375,
-0.0022068023681640625,
-0.007232666015625,
-0.08929443359375,
0.0276336669921875,
0.0058746337890625,
0.00806427001953125,
0.031341552734375,
0.0015430450439453125,
0.040679931640625,
0.0185699462890625,
-0.0148162841796875,
-0.0303955078125,
0.031951904296875,
-0.0489501953125,
-0.0487060546875,
0.0110931396484375,
-0.00395965576171875,
-0.00749969482421875,
0.006229400634765625,
-0.003078460693359375,
0.007312774658203125,
-0.01629638671875,
-0.00775909423828125,
0.08740234375,
0.01136016845703125,
0.030792236328125,
-0.00864410400390625,
0.021697998046875,
0.0188140869140625,
-0.0037593841552734375,
-0.034881591796875,
-0.0203704833984375,
0.00556182861328125,
0.0318603515625,
0.037322998046875,
0.0266571044921875,
-0.00966644287109375,
-0.01438140869140625,
-0.04339599609375,
-0.022918701171875,
0.015960693359375,
-0.009033203125,
-0.0159149169921875,
-0.0170135498046875,
0.0119476318359375,
0.0411376953125,
-0.0021514892578125,
0.0159912109375,
0.0091552734375,
0.0036792755126953125,
0.021484375,
0.01024627685546875,
-0.00815582275390625,
-0.0188751220703125,
-0.0020503997802734375,
-0.0258026123046875,
-0.01059722900390625,
0.0198516845703125,
-0.0892333984375,
-0.038726806640625,
-0.007598876953125,
0.00760650634765625,
0.035980224609375,
0.029144287109375,
0.0216217041015625,
-0.0196990966796875,
-0.026519775390625,
0.0255584716796875,
-0.0012750625610351562,
0.016693115234375,
-0.040252685546875,
-0.042694091796875,
-0.0211944580078125,
-0.0682373046875,
-0.0254058837890625,
-0.0285797119140625,
-0.026123046875,
-0.0281982421875,
0.005397796630859375,
0.01299285888671875,
0.01277923583984375,
0.008544921875,
-0.022247314453125,
-0.034423828125,
0.012725830078125,
0.0245208740234375,
0.0126495361328125,
-0.041961669921875,
0.07080078125,
-0.016815185546875,
0.00815582275390625,
-0.0243682861328125,
0.04510498046875,
0.00927734375,
0.01486968994140625,
0.0307464599609375,
0.007152557373046875,
-0.0258941650390625,
-0.023773193359375,
-0.0097503662109375,
-0.0357666015625,
0.01494598388671875,
-0.03009033203125,
0.0255584716796875,
-0.01318359375,
0.0087432861328125,
-0.0276641845703125,
0.031768798828125,
-0.036346435546875,
0.01366424560546875,
-0.0008645057678222656,
0.02191162109375,
0.0011568069458007812,
-0.0237884521484375,
-0.0640869140625,
0.01288604736328125,
0.048828125,
-0.00676727294921875,
-0.016143798828125,
-0.006099700927734375,
0.045196533203125,
0.059844970703125,
0.01186370849609375,
0.0599365234375,
0.03289794921875,
0.030609130859375,
0.0036907196044921875,
0.03875732421875,
-0.0304107666015625,
-0.0870361328125,
0.0194854736328125,
0.0200042724609375,
-0.0150299072265625,
0.03955078125,
-0.0266876220703125,
-0.0039005279541015625,
0.049041748046875,
0.048797607421875,
-0.07257080078125,
0.00931549072265625,
0.0167388916015625,
-0.00533294677734375,
-0.02398681640625,
-0.0253448486328125,
-0.0270233154296875,
-0.07904052734375,
0.066650390625,
0.038299560546875,
-0.00035452842712402344,
0.00014007091522216797,
-0.006595611572265625,
0.0200347900390625,
-0.01873779296875,
0.01727294921875,
-0.02813720703125,
-0.0281524658203125,
-0.048614501953125,
0.012664794921875,
-0.03387451171875,
-0.00847625732421875,
0.0139617919921875,
0.023651123046875,
-0.0194091796875,
-0.04241943359375,
0.0347900390625,
0.0038013458251953125,
-0.00365447998046875,
-0.02001953125,
0.0230560302734375,
0.06158447265625,
0.05877685546875,
0.00603485107421875,
-0.00323486328125,
0.031494140625,
0.051849365234375,
-0.02685546875,
-0.035675048828125,
0.016387939453125,
0.044677734375,
-0.04180908203125,
0.018798828125,
0.00417327880859375,
-0.03973388671875,
-0.00620269775390625,
0.006931304931640625,
0.0430908203125,
-0.0014629364013671875,
-0.0157470703125,
0.04693603515625,
-0.0141448974609375,
-0.031158447265625,
-0.0254669189453125,
0.0440673828125,
-0.071533203125,
-0.03582763671875,
-0.004093170166015625,
-0.042205810546875,
-0.036163330078125,
-0.042144775390625,
-0.01375579833984375,
0.062744140625,
0.003978729248046875,
-0.0300445556640625,
0.01009368896484375,
0.039794921875,
-0.041748046875,
0.01540374755859375,
-0.0168304443359375,
0.054656982421875,
-0.0282745361328125,
0.018280029296875,
-0.04742431640625,
-0.002902984619140625,
-0.0139007568359375,
0.0114288330078125,
0.011566162109375,
0.001773834228515625,
-0.00714874267578125,
-0.024993896484375,
-0.02587890625,
-0.00420379638671875,
-0.01273345947265625,
0.03131103515625,
-0.01111602783203125,
0.04351806640625,
0.0572509765625,
-0.0718994140625,
0.01378631591796875,
0.0245208740234375,
0.002529144287109375,
0.015716552734375,
0.0021495819091796875,
0.007419586181640625,
0.0309906005859375,
-0.027923583984375,
-0.0038280487060546875,
0.025299072265625,
-0.0002810955047607422,
0.0088043212890625,
-0.004810333251953125,
0.01047515869140625,
-0.0073394775390625,
-0.0557861328125,
-0.02008056640625,
-0.03570556640625,
0.029022216796875,
-0.00557708740234375,
-0.008819580078125,
0.0152587890625,
0.0230560302734375,
-0.0011835098266601562,
-0.033172607421875,
-0.017059326171875,
0.029754638671875,
-0.03302001953125,
0.0016393661499023438,
0.0063629150390625,
0.043212890625,
-0.037994384765625,
-0.05084228515625,
0.01218414306640625,
0.0178985595703125,
-0.0052947998046875,
-0.03533935546875,
-0.00040149688720703125,
0.0009322166442871094,
0.023162841796875,
0.0174407958984375,
0.0584716796875,
0.004268646240234375,
0.01232147216796875,
0.042205810546875,
-0.037750244140625,
-0.0231781005859375,
-0.00548553466796875,
0.025299072265625,
0.0804443359375,
0.03814697265625,
-0.036376953125,
0.007503509521484375,
-0.02410888671875,
0.00832366943359375,
-0.00817108154296875,
0.00865936279296875,
0.00977325439453125,
0.003192901611328125,
-0.00623321533203125,
-0.011474609375,
0.00733184814453125,
-0.013671875,
0.01611328125,
-0.051788330078125,
-0.057220458984375,
0.0220184326171875,
0.055419921875,
0.0015010833740234375,
0.0297088623046875,
0.030364990234375,
0.03662109375,
0.00475311279296875,
0.00783538818359375,
0.06805419921875,
-0.011474609375,
-0.0178070068359375,
-0.0294952392578125,
0.0005998611450195312,
0.01904296875,
-0.01024627685546875,
0.02081298828125,
0.005397796630859375,
0.0212554931640625,
-0.002338409423828125,
0.0097503662109375,
0.01557159423828125,
-0.0237274169921875,
0.0304718017578125,
0.0184478759765625,
0.00945281982421875,
0.0306549072265625,
-0.0462646484375,
-0.004833221435546875,
0.003971099853515625,
-0.031982421875,
0.0013399124145507812,
0.0205841064453125,
-0.033477783203125,
0.04791259765625,
-0.0289306640625,
0.0187530517578125,
0.0058746337890625,
-0.0219268798828125,
-0.01495361328125,
-0.03515625,
0.039093017578125,
-0.035247802734375,
-0.0030059814453125,
0.0007414817810058594,
-0.0007243156433105469,
0.0389404296875,
0.002223968505859375,
0.06817626953125,
-0.016326904296875,
0.00928497314453125,
0.0194854736328125,
-0.0164031982421875,
0.038421630859375,
0.045318603515625,
-0.0187530517578125,
0.01361846923828125,
-0.01142120361328125,
-0.032806396484375,
-0.10980224609375,
0.0650634765625,
-0.00238037109375,
0.03668212890625,
0.041748046875,
0.018951416015625,
0.0016498565673828125,
0.031280517578125,
0.032318115234375,
-0.0263214111328125,
-0.030517578125,
-0.04736328125,
-0.017822265625,
0.004047393798828125,
0.002239227294921875,
-0.01332855224609375,
0.040557861328125,
-0.007251739501953125,
0.0167388916015625,
0.01094818115234375,
-0.01922607421875,
0.00695037841796875,
0.024658203125,
-0.039642333984375,
0.0182037353515625,
-0.0018224716186523438,
-0.0299224853515625,
0.0189056396484375,
0.0019817352294921875,
0.005359649658203125,
-0.00099945068359375,
-0.0267181396484375,
-0.0298919677734375,
0.043212890625,
0.041290283203125,
-0.001125335693359375,
0.023345947265625,
-0.0183563232421875,
-0.018035888671875,
0.0166168212890625,
0.007457733154296875,
-0.0206146240234375,
-0.0176544189453125,
-0.017852783203125,
0.00010520219802856445,
-0.0052947998046875,
-0.038360595703125,
-0.04473876953125,
-0.003025054931640625,
0.05078125,
0.0097808837890625,
-0.043182373046875,
0.036590576171875,
-0.03668212890625,
-0.01181793212890625,
0.0258026123046875,
0.0243377685546875,
-0.01187896728515625,
0.01207733154296875,
-0.0094451904296875,
-0.04937744140625,
-0.02288818359375,
0.060333251953125,
-0.01617431640625,
-0.0272064208984375,
0.01457977294921875,
0.0037403106689453125,
0.0003209114074707031,
-0.0703125,
-0.03631591796875,
-0.0195770263671875,
-0.0261383056640625,
0.0033664703369140625,
0.033416748046875,
0.021026611328125,
-0.0301971435546875,
-0.05535888671875,
-0.01447296142578125,
0.01450347900390625,
0.0231170654296875,
-0.003192901611328125,
-0.011322021484375,
0.0015935897827148438,
-0.0278167724609375,
-0.0234832763671875,
0.0211639404296875,
0.00901031494140625,
-0.008453369140625,
-0.07513427734375,
0.0088348388671875,
0.03546142578125,
-0.04754638671875,
-0.0450439453125,
-0.0198822021484375,
-0.06488037109375,
0.003498077392578125,
0.0208892822265625,
-0.08026123046875,
0.08477783203125,
-0.0305938720703125,
-0.074462890625,
-0.01554107666015625,
0.0012445449829101562,
-0.0065460205078125,
-0.0233612060546875,
0.03558349609375,
0.00958251953125,
0.050048828125,
0.012359619140625,
0.037567138671875,
0.002063751220703125,
-0.0458984375,
-0.013031005859375,
-0.007671356201171875,
0.01526641845703125,
0.0272674560546875,
0.037139892578125,
0.044830322265625,
0.00832366943359375,
-0.060699462890625,
-0.055633544921875,
-0.08624267578125,
0.0262451171875,
-0.01338958740234375,
0.0004940032958984375,
-0.060760498046875,
0.040435791015625,
0.03900146484375,
0.0058135986328125,
-0.0020618438720703125,
-0.0035152435302734375,
-0.0062713623046875,
-0.000736236572265625,
0.044830322265625,
-0.003986358642578125,
0.019989013671875,
-0.00722503662109375,
-0.04473876953125,
0.018341064453125,
0.0213775634765625,
0.01461029052734375,
0.0004622936248779297,
-0.0078887939453125,
0.08599853515625,
0.040863037109375,
0.030731201171875,
-0.048583984375,
-0.0085906982421875,
0.01398468017578125,
-0.004009246826171875,
-0.033111572265625,
-0.030242919921875,
0.0008273124694824219,
-0.005977630615234375,
0.00063323974609375,
-0.0046844482421875,
0.004543304443359375,
-0.029083251953125,
-0.0146484375,
-0.00696563720703125,
-0.034820556640625,
0.01763916015625,
-0.01436614990234375,
0.007266998291015625,
0.0016841888427734375,
0.00273895263671875,
0.047943115234375,
-0.0268402099609375,
0.00738525390625,
-0.00936126708984375,
0.000843048095703125,
-0.01165771484375,
-0.025787353515625,
-0.04644775390625,
-0.002933502197265625,
-0.004665374755859375
]
|
b9fcbefe144f8f3a97fc2f963bbd9d03ca44546b | Wordpress Stackexchange
Q: How To Make Connection To WordPress Data Base In A Plugin? I am learning Plugins and I am trying to connect WordPress database wp-config.php in my Plugin PHP code. Currently for checking my code, I used the below connection and it is working fine. Now I converted it into a WordPress plugin so anyone can use this but now its time to make WordPress database connection.
//Connection To DataBase
$host = "XXXXXXXXXXXXXX";
$username = "XXXXXXXXXX";
$password = "XXXXXXXXXX";
$dbname = "XXXXXXXXXXXX";
$connection = mysql_connect($host, $username, $password);
mysql_select_db($dbname);
So How to insert wp-config.php like something require_once(wp-config.php'); in plugin instead of above code to make WordPress SQL database connection in my plugin file?
A: I found the answer my self. First open your wp-config.php and check the bottom of file that Is that contain the below code?...
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
If yes then add the below code to make the connection in your plugin PHP files to connect with wp-config.php file that contain Database Name, Database UserName, Database Password, Database Host... ...
require_once(ABSPATH . 'wp-config.php');
$connection = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD);
mysqli_select_db($connection, DB_NAME);
And you will get connection to WordPress database...
| Q: How To Make Connection To WordPress Data Base In A Plugin? I am learning Plugins and I am trying to connect WordPress database wp-config.php in my Plugin PHP code. Currently for checking my code, I used the below connection and it is working fine. Now I converted it into a WordPress plugin so anyone can use this but now its time to make WordPress database connection.
//Connection To DataBase
$host = "XXXXXXXXXXXXXX";
$username = "XXXXXXXXXX";
$password = "XXXXXXXXXX";
$dbname = "XXXXXXXXXXXX";
$connection = mysql_connect($host, $username, $password);
mysql_select_db($dbname);
So How to insert wp-config.php like something require_once(wp-config.php'); in plugin instead of above code to make WordPress SQL database connection in my plugin file?
A: I found the answer my self. First open your wp-config.php and check the bottom of file that Is that contain the below code?...
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
If yes then add the below code to make the connection in your plugin PHP files to connect with wp-config.php file that contain Database Name, Database UserName, Database Password, Database Host... ...
require_once(ABSPATH . 'wp-config.php');
$connection = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD);
mysqli_select_db($connection, DB_NAME);
And you will get connection to WordPress database...
| wordpress | {
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:449178",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/162614"
} | [
0.052734375,
-0.0177764892578125,
-0.021942138671875,
-0.040557861328125,
0.02410888671875,
-0.044769287109375,
0.0298614501953125,
0.0178375244140625,
0.0240936279296875,
0.015045166015625,
-0.042205810546875,
0.0260772705078125,
-0.034271240234375,
-0.01012420654296875,
-0.0204620361328125,
-0.0200653076171875,
0.0299224853515625,
-0.000591278076171875,
0.019622802734375,
-0.01462554931640625,
-0.0079193115234375,
0.01560211181640625,
0.026519775390625,
0.0251922607421875,
0.0193634033203125,
0.0152130126953125,
0.11663818359375,
-0.03497314453125,
0.041961669921875,
-0.00936126708984375,
0.0245208740234375,
-0.0751953125,
0.016998291015625,
0.0253448486328125,
-0.029541015625,
-0.0555419921875,
0.017608642578125,
0.0025691986083984375,
-0.0167083740234375,
0.045074462890625,
0.030059814453125,
-0.0256195068359375,
-0.0199737548828125,
0.038330078125,
-0.0240936279296875,
-0.046966552734375,
0.0265655517578125,
-0.0307464599609375,
-0.017913818359375,
-0.03350830078125,
0.0078887939453125,
0.01165008544921875,
0.04241943359375,
-0.032928466796875,
-0.0015735626220703125,
0.01375579833984375,
-0.0204620361328125,
-0.006122589111328125,
0.034698486328125,
0.0294952392578125,
-0.017120361328125,
-0.03668212890625,
0.01397705078125,
-0.0305938720703125,
-0.0268402099609375,
-0.01629638671875,
0.006168365478515625,
0.0002970695495605469,
0.00820159912109375,
-0.0225982666015625,
0.00992584228515625,
0.01451873779296875,
-0.013275146484375,
0.00553131103515625,
-0.0240020751953125,
-0.0031986236572265625,
0.0283050537109375,
-0.007343292236328125,
-0.0033779144287109375,
0.0164031982421875,
0.032958984375,
-0.0172271728515625,
0.01983642578125,
-0.00850677490234375,
0.01108551025390625,
0.033843994140625,
0.00804901123046875,
-0.02288818359375,
0.00445556640625,
-0.003021240234375,
-0.00017595291137695312,
0.035919189453125,
0.0025730133056640625,
0.006195068359375,
-0.033050537109375,
-0.0167236328125,
-0.0184478759765625,
0.0013856887817382812,
-0.02935791015625,
0.0228424072265625,
0.0148162841796875,
-0.0372314453125,
0.05865478515625,
-0.0394287109375,
0.016815185546875,
0.050048828125,
-0.01177215576171875,
-0.0269317626953125,
0.024810791015625,
0.0196685791015625,
0.01152801513671875,
-0.011749267578125,
-0.007701873779296875,
-0.043182373046875,
-0.0037708282470703125,
0.01171112060546875,
-0.029571533203125,
0.00490570068359375,
0.0041351318359375,
-0.023834228515625,
-0.0386962890625,
-0.0131072998046875,
-0.103759765625,
0.0254364013671875,
0.0123138427734375,
-0.038116455078125,
0.0200958251953125,
0.0831298828125,
-0.09625244140625,
0.012664794921875,
-0.0019235610961914062,
0.0246124267578125,
0.07440185546875,
0.0897216796875,
0.007965087890625,
0.0010318756103515625,
0.031951904296875,
0.0283050537109375,
0.019439697265625,
-0.00400543212890625,
0.0023937225341796875,
-0.02496337890625,
-0.00891876220703125,
0.0017805099487304688,
-0.006969451904296875,
-0.0018091201782226562,
0.00576019287109375,
0.0274658203125,
0.016448974609375,
-0.02099609375,
-0.00710296630859375,
-0.0034332275390625,
-0.03302001953125,
0.0267791748046875,
0.0489501953125,
0.0199737548828125,
0.0178985595703125,
0.001865386962890625,
0.0194549560546875,
0.0165557861328125,
0.008880615234375,
-0.00829315185546875,
0.01029205322265625,
-0.0251007080078125,
-0.01806640625,
-0.01401519775390625,
-0.053558349609375,
0.0009946823120117188,
0.0196075439453125,
-0.059173583984375,
0.030426025390625,
0.01065826416015625,
0.04205322265625,
0.013824462890625,
0.01520538330078125,
0.020355224609375,
-0.04730224609375,
0.023162841796875,
0.041015625,
0.00881195068359375,
0.008758544921875,
-0.01303863525390625,
0.057525634765625,
0.01329803466796875,
-0.0279998779296875,
0.016143798828125,
0.0193634033203125,
0.0634765625,
-0.0022029876708984375,
0.035888671875,
0.0150604248046875,
0.004169464111328125,
-0.03082275390625,
0.0241546630859375,
-0.0207366943359375,
-0.04608154296875,
0.04595947265625,
0.00841522216796875,
-0.0092926025390625,
0.008087158203125,
-0.01105499267578125,
-0.004924774169921875,
-0.0030269622802734375,
0.0400390625,
-0.03936767578125,
-0.004611968994140625,
-0.00958251953125,
-0.005702972412109375,
0.039794921875,
-0.02178955078125,
-0.006256103515625,
0.002216339111328125,
0.00705718994140625,
-0.07855224609375,
-0.0716552734375,
0.05487060546875,
-0.057647705078125,
0.0298309326171875,
-0.01568603515625,
0.06903076171875,
-0.035491943359375,
-0.0357666015625,
-0.019073486328125,
-0.033355712890625,
-0.0137786865234375,
0.0014085769653320312,
-0.0185089111328125,
0.0083770751953125,
-0.0167999267578125,
-0.01413726806640625,
0.0384521484375,
0.038482666015625,
-0.0103607177734375,
0.00923919677734375,
-0.0164794921875,
-0.0169219970703125,
0.0018024444580078125,
-0.04327392578125,
0.0269622802734375,
0.034759521484375,
0.04840087890625,
-0.005710601806640625,
-0.036865234375,
-0.03631591796875,
0.0003292560577392578,
-0.09783935546875,
-0.01155853271484375,
-0.0085906982421875,
0.03460693359375,
0.053680419921875,
-0.025634765625,
0.00298309326171875,
0.01910400390625,
-0.00907135009765625,
-0.0005044937133789062,
0.040557861328125,
0.005573272705078125,
0.01288604736328125,
-0.0196685791015625,
0.006561279296875,
-0.0035495758056640625,
-0.018402099609375,
-0.0098724365234375,
-0.01300048828125,
0.030181884765625,
0.017181396484375,
0.0546875,
0.0576171875,
0.0005326271057128906,
0.0005478858947753906,
-0.006011962890625,
0.003040313720703125,
-0.00916290283203125,
0.002010345458984375,
-0.0059051513671875,
0.0008101463317871094,
-0.036529541015625,
0.01477813720703125,
-0.002666473388671875,
-0.002197265625,
0.0003941059112548828,
0.0098419189453125,
0.01255035400390625,
-0.00753021240234375,
-0.00691986083984375,
-0.006572723388671875,
0.0325927734375,
0.0218963623046875,
-0.035980224609375,
-0.042205810546875,
0.007762908935546875,
0.00768280029296875,
-0.040008544921875,
0.0255584716796875,
-0.0219268798828125,
-0.0236968994140625,
0.0027332305908203125,
-0.01036834716796875,
0.00597381591796875,
-0.006160736083984375,
0.049560546875,
0.060394287109375,
0.0089263916015625,
-0.0017347335815429688,
-0.0036563873291015625,
-0.01296234130859375,
-0.007228851318359375,
-0.006099700927734375,
-0.02410888671875,
-0.01132965087890625,
-0.057830810546875,
0.0116424560546875,
0.0015630722045898438,
0.0159454345703125,
-0.01116180419921875,
-0.046173095703125,
-0.0157012939453125,
0.001750946044921875,
-0.0594482421875,
-0.049102783203125,
-0.03204345703125,
-0.0428466796875,
0.04254150390625,
-0.0322265625,
0.0074005126953125,
0.0005435943603515625,
-0.0367431640625,
0.018157958984375,
-0.0251617431640625,
-0.04766845703125,
-0.0594482421875,
-0.09320068359375,
-0.07733154296875,
-0.013580322265625,
0.004974365234375,
0.01006317138671875,
-0.00893402099609375,
0.038543701171875,
0.0008325576782226562,
-0.0189056396484375,
-0.00022649765014648438,
-0.03216552734375,
-0.01152801513671875,
-0.04449462890625,
-0.0014543533325195312,
-0.01549530029296875,
0.0179443359375,
-0.0012331008911132812,
0.035858154296875,
0.016082763671875,
-0.026336669921875,
-0.01421356201171875,
0.01861572265625,
0.0228424072265625,
0.02130126953125,
-0.005031585693359375,
-0.0187225341796875,
0.0223846435546875,
-0.006572723388671875,
-0.040130615234375,
0.008941650390625,
0.01110076904296875,
-0.0133056640625,
-0.0138702392578125,
-0.0178985595703125,
-0.0263214111328125,
0.00977325439453125,
-0.010040283203125,
0.01082611083984375,
0.0193023681640625,
-0.0032939910888671875,
-0.018768310546875,
0.0518798828125,
-0.0015192031860351562,
0.00905609130859375,
-0.009552001953125,
0.044189453125,
-0.01328277587890625,
-0.034454345703125,
-0.004474639892578125,
-0.026092529296875,
-0.004756927490234375,
-0.031280517578125,
-0.0364990234375,
-0.044921875,
0.0487060546875,
-0.01800537109375,
0.006847381591796875,
-0.0300750732421875,
-0.018951416015625,
-0.000017523765563964844,
0.0892333984375,
-0.0428466796875,
-0.0147705078125,
0.05584716796875,
0.0232391357421875,
-0.06451416015625,
-0.01959228515625,
-0.09112548828125,
-0.01509857177734375,
-0.03985595703125,
-0.031768798828125,
-0.0169219970703125,
-0.0413818359375,
0.034820556640625,
-0.046600341796875,
0.0022907257080078125,
-0.036651611328125,
-0.0017061233520507812,
0.0007205009460449219,
0.01702880859375,
0.0235595703125,
-0.0094757080078125,
0.0285491943359375,
0.021148681640625,
-0.036895751953125,
-0.09259033203125,
-0.01617431640625,
-0.01702880859375,
0.07403564453125,
0.0295867919921875,
-0.0297698974609375,
-0.025604248046875,
0.0377197265625,
0.0128631591796875,
0.0241851806640625,
0.018829345703125,
0.0301666259765625,
-0.03173828125,
-0.0300445556640625,
0.02984619140625,
-0.046173095703125,
0.00960540771484375,
-0.0284423828125,
-0.01377105712890625,
-0.00711822509765625,
-0.04510498046875,
-0.0034008026123046875,
-0.039825439453125,
-0.0244293212890625,
-0.0089263916015625,
-0.022186279296875,
-0.002384185791015625,
-0.00507354736328125,
-0.0123291015625,
-0.0005307197570800781,
-0.0178070068359375,
-0.00099945068359375,
0.06671142578125,
-0.0130462646484375,
0.02642822265625,
-0.006053924560546875,
0.10455322265625,
0.00487518310546875,
-0.0213470458984375,
-0.04229736328125,
0.010345458984375,
0.034881591796875,
0.0057373046875,
0.057647705078125,
0.03094482421875,
-0.0316162109375,
0.08856201171875,
0.0169830322265625,
0.025787353515625,
-0.00701904296875,
0.02587890625,
-0.01311492919921875,
-0.060821533203125,
0.06610107421875,
0.00164794921875,
-0.051422119140625,
0.032989501953125,
0.00963592529296875,
-0.0157928466796875,
0.028106689453125,
-0.007472991943359375,
-0.0196075439453125,
0.012420654296875,
0.0222320556640625,
-0.0584716796875,
0.0248870849609375,
-0.052490234375,
0.025054931640625,
0.0177459716796875,
-0.0011138916015625,
0.042938232421875,
-0.0018911361694335938,
-0.02301025390625,
0.0360107421875,
0.03887939453125,
0.0283203125,
0.011566162109375,
0.07647705078125,
-0.0136260986328125,
-0.0234375,
-0.0289154052734375,
0.1253662109375,
0.0241851806640625,
-0.0304107666015625,
0.02935791015625,
-0.050262451171875,
0.0311431884765625,
-0.004817962646484375,
0.00380706787109375,
0.03118896484375,
0.0035915374755859375,
-0.0341796875,
-0.01110076904296875,
-0.01568603515625,
-0.0298309326171875,
-0.036712646484375,
-0.0089263916015625,
-0.01016998291015625,
0.0014371871948242188,
0.00240325927734375,
0.0626220703125,
-0.00498199462890625,
0.032440185546875,
-0.0181121826171875,
0.045013427734375,
0.044708251953125,
0.03253173828125,
0.005702972412109375,
-0.01305389404296875,
0.0006661415100097656,
-0.01192474365234375,
0.004909515380859375,
-0.040740966796875,
-0.00441741943359375,
-0.0164947509765625,
0.03924560546875,
-0.035064697265625,
-0.037811279296875,
0.061614990234375,
-0.0164337158203125,
-0.0176544189453125,
0.03106689453125,
0.0028095245361328125,
-0.03570556640625,
-0.0285491943359375,
0.0143585205078125,
0.040557861328125,
-0.00942230224609375,
0.00688934326171875,
0.005680084228515625,
-0.002231597900390625,
0.038970947265625,
-0.005207061767578125,
0.017486572265625,
-0.01120758056640625,
-0.0185394287109375,
0.041717529296875,
-0.0135040283203125,
-0.03082275390625,
-0.00013339519500732422,
0.0194091796875,
-0.0203094482421875,
-0.004665374755859375,
0.0276031494140625,
-0.0462646484375,
0.0251617431640625,
-0.0312042236328125,
0.005878448486328125,
-0.056610107421875,
-0.00431060791015625,
0.06671142578125,
0.0557861328125,
0.01004791259765625,
-0.0162353515625,
0.00426483154296875,
-0.0179443359375,
0.038482666015625,
-0.00609588623046875,
-0.0176544189453125,
-0.03155517578125,
-0.0280914306640625,
-0.0198822021484375,
-0.019866943359375,
0.01554107666015625,
0.0049285888671875,
0.059173583984375,
-0.003894805908203125,
0.01271820068359375,
-0.0290374755859375,
0.08892822265625,
-0.00998687744140625,
0.0384521484375,
0.00469207763671875,
0.0312042236328125,
-0.02032470703125,
0.0033359527587890625,
0.0248870849609375,
-0.01251220703125,
-0.03692626953125,
-0.033477783203125,
0.006317138671875,
-0.0222625732421875,
0.00428009033203125,
-0.0260009765625,
-0.00873565673828125,
0.00997161865234375,
-0.00225067138671875,
-0.0209197998046875,
0.024505615234375,
0.01000213623046875,
-0.01006317138671875,
-0.0053253173828125,
-0.0307159423828125,
-0.0015401840209960938,
-0.0280303955078125,
0.0125274658203125,
0.005786895751953125,
-0.0289459228515625,
-0.0153961181640625,
0.00966644287109375,
-0.02801513671875,
0.051788330078125,
0.06304931640625,
0.002971649169921875,
0.04071044921875,
0.029327392578125,
0.0141448974609375,
-0.0215301513671875,
0.03167724609375,
-0.04296875,
-0.060943603515625,
0.00984954833984375,
0.0183563232421875,
-0.0186614990234375,
0.0152435302734375,
-0.02252197265625,
0.002872467041015625,
0.004749298095703125,
0.045013427734375,
-0.0076904296875,
0.0020885467529296875,
0.01371002197265625,
-0.02392578125,
0.025390625,
-0.0198516845703125,
0.00970458984375,
-0.004451751708984375,
0.029052734375,
0.0260467529296875,
-0.0261077880859375,
0.0171966552734375,
0.01125335693359375,
-0.006893157958984375,
0.01116943359375,
0.0184173583984375,
0.00955963134765625,
-0.01386260986328125,
-0.0149078369140625,
0.01421356201171875,
0.0023365020751953125,
0.040283203125,
0.0203094482421875,
-0.0189208984375,
-0.030792236328125,
-0.0297698974609375,
-0.031768798828125,
-0.02947998046875,
-0.05853271484375,
0.0276641845703125,
0.01568603515625,
0.045562744140625,
0.064208984375,
0.0088653564453125,
0.0110321044921875,
0.025177001953125,
0.047821044921875,
-0.00247955322265625,
-0.01059722900390625,
-0.0046844482421875,
0.029998779296875,
-0.07147216796875,
0.0162353515625,
-0.046295166015625,
0.0194549560546875,
-0.014068603515625,
-0.01091766357421875,
0.08905029296875,
-0.0174560546875,
-0.02716064453125,
0.0105743408203125,
0.0088958740234375,
0.00879669189453125,
-0.0029315948486328125,
0.026397705078125,
-0.045379638671875,
-0.019989013671875,
0.0134124755859375,
-0.030181884765625,
-0.0196990966796875,
-0.0006933212280273438,
-0.0213470458984375,
0.08087158203125,
-0.0186004638671875,
-0.02960205078125,
0.02325439453125,
0.042816162109375,
-0.0245208740234375,
0.0198211669921875,
-0.0499267578125,
0.050628662109375,
0.0304107666015625,
0.0184783935546875,
-0.039154052734375,
-0.00351715087890625,
-0.0058441162109375,
0.018218994140625,
0.021728515625,
-0.0010814666748046875,
-0.00807952880859375,
0.0124969482421875,
0.052093505859375,
0.01038360595703125,
-0.00812530517578125,
0.01806640625,
-0.0006237030029296875,
0.0161895751953125,
0.06719970703125,
-0.0249481201171875,
0.0377197265625,
0.01059722900390625,
0.0112152099609375,
0.019989013671875,
-0.0007481575012207031,
0.0023479461669921875,
-0.043701171875,
0.0306549072265625,
-0.00506591796875,
-0.01523590087890625,
0.00569915771484375,
-0.0032329559326171875,
0.0173187255859375,
0.01026153564453125,
0.003360748291015625,
-0.037078857421875,
-0.022613525390625,
-0.024993896484375,
0.023223876953125,
-0.01605224609375,
-0.0157318115234375,
0.026275634765625,
0.0113067626953125,
0.0221710205078125,
-0.01082611083984375,
-0.0182037353515625,
0.0129852294921875,
0.01031494140625,
0.07684326171875,
0.051910400390625,
0.022552490234375,
0.00270843505859375,
0.039947509765625,
0.008636474609375,
0.07464599609375,
-0.06280517578125,
-0.0244140625,
0.009307861328125,
0.02227783203125,
0.022216796875,
0.0244140625,
0.04925537109375,
0.02447509765625,
0.050689697265625,
-0.00815582275390625,
0.0229644775390625,
0.00009715557098388672,
-0.044830322265625,
-0.00635528564453125,
0.0195159912109375,
0.0158538818359375,
0.068603515625,
0.01151275634765625,
-0.016510009765625,
0.00873565673828125,
0.0176544189453125,
-0.0075836181640625,
0.05023193359375,
-0.005859375,
0.0010890960693359375,
-0.0123138427734375,
0.058624267578125,
-0.00115966796875,
0.0187835693359375,
-0.055755615234375,
-0.09332275390625,
0.02679443359375,
0.053802490234375,
-0.0081329345703125,
0.039581298828125,
0.03143310546875,
0.02642822265625,
-0.01177978515625,
-0.005985260009765625,
0.035919189453125,
-0.02020263671875,
-0.006877899169921875,
-0.010650634765625,
0.008880615234375,
0.007305145263671875,
0.006237030029296875,
-0.0211944580078125,
0.058135986328125,
-0.002593994140625,
-0.0111846923828125,
0.035980224609375,
-0.01082611083984375,
-0.025115966796875,
-0.0155792236328125,
-0.029937744140625,
0.02923583984375,
-0.005359649658203125,
-0.07476806640625,
-0.01519775390625,
0.0017948150634765625,
-0.0161590576171875,
0.0038433074951171875,
0.0200042724609375,
-0.028839111328125,
0.039337158203125,
0.020172119140625,
-0.0200347900390625,
0.040130615234375,
0.01396942138671875,
-0.0228424072265625,
-0.023223876953125,
0.029510498046875,
-0.037750244140625,
-0.02337646484375,
-0.02056884765625,
-0.021270751953125,
0.054168701171875,
0.0084686279296875,
0.07489013671875,
-0.04449462890625,
0.0307769775390625,
-0.02587890625,
-0.03558349609375,
0.01439666748046875,
-0.007534027099609375,
-0.0250091552734375,
0.0216217041015625,
-0.01474761962890625,
0.0015087127685546875,
0.00260162353515625,
0.01351165771484375,
0.0254669189453125,
-0.0192108154296875,
-0.01947021484375,
-0.027679443359375,
0.032012939453125,
0.004878997802734375,
0.031005859375,
-0.01517486572265625,
-0.0239715576171875,
-0.0009036064147949219,
0.005584716796875,
0.0302886962890625,
0.0293731689453125,
0.01216888427734375,
0.004444122314453125,
-0.0288543701171875,
-0.0026092529296875,
0.00701904296875,
0.0092620849609375,
0.00617218017578125,
0.0107421875,
-0.06402587890625,
-0.06964111328125,
-0.005466461181640625,
-0.021820068359375,
-0.0279998779296875,
-0.0044403076171875,
0.06402587890625,
-0.01403045654296875,
-0.050506591796875,
0.050384521484375,
0.06884765625,
0.07049560546875,
0.01412200927734375,
0.043609619140625,
0.0276336669921875,
-0.00882720947265625,
0.015533447265625,
-0.01410675048828125,
-0.042388916015625,
-0.0419921875,
-0.0126190185546875,
-0.00562286376953125,
-0.038177490234375,
-0.067626953125,
-0.054107666015625,
0.013336181640625,
0.03680419921875,
0.002452850341796875,
-0.05621337890625,
-0.0007619857788085938,
-0.0277557373046875,
0.07177734375,
-0.0171356201171875,
-0.01421356201171875,
0.003070831298828125,
0.018402099609375,
-0.0149383544921875,
-0.038970947265625,
-0.02032470703125,
0.0330810546875,
-0.0156707763671875,
0.03643798828125,
0.0272674560546875,
-0.0224609375,
-0.00836944580078125,
0.06536865234375,
0.007144927978515625,
0.111572265625,
-0.001300811767578125,
-0.0009899139404296875,
0.04046630859375,
-0.010589599609375,
-0.032958984375,
-0.0963134765625,
-0.00860595703125,
-0.0792236328125,
0.00882720947265625,
-0.03546142578125,
0.01055145263671875,
-0.0056915283203125,
-0.05999755859375,
-0.06878662109375,
0.049468994140625,
-0.01788330078125,
-0.02801513671875,
-0.053558349609375,
-0.000012576580047607422,
0.005603790283203125,
0.016845703125,
-0.0200653076171875,
0.006275177001953125,
-0.0303192138671875,
0.033294677734375,
-0.006580352783203125,
-0.03143310546875,
0.0240478515625,
-0.03570556640625,
-0.031707763671875,
0.021575927734375,
0.0369873046875,
-0.0213775634765625,
0.047454833984375,
-0.035125732421875,
0.037139892578125,
0.041778564453125,
-0.037872314453125,
-0.0182037353515625,
-0.01251983642578125,
-0.0159149169921875,
-0.0157623291015625,
-0.0301666259765625,
-0.00736236572265625,
0.00830078125,
0.043914794921875,
0.036346435546875,
0.007549285888671875,
-0.04486083984375,
-0.05682373046875,
-0.049041748046875,
0.01158905029296875,
-0.04083251953125,
0.0082244873046875,
-0.08721923828125,
-0.00930023193359375,
-0.00008821487426757812,
-0.0170745849609375,
-0.003421783447265625,
0.012298583984375,
-0.030120849609375,
-0.00936126708984375,
0.0099639892578125,
-0.03204345703125,
0.027801513671875,
-0.05352783203125,
0.07843017578125,
-0.047882080078125,
-0.01519775390625,
0.0157470703125,
0.0240936279296875,
0.01104736328125,
-0.0012006759643554688,
-0.0129241943359375,
-0.023529052734375,
0.024322509765625,
0.047760009765625,
-0.0007138252258300781,
0.01678466796875,
-0.01438140869140625,
-0.01264190673828125,
-0.016510009765625,
-0.00019669532775878906,
0.0007090568542480469,
0.005184173583984375,
-0.006160736083984375,
-0.0157928466796875,
-0.004261016845703125,
0.020050048828125,
0.006221771240234375,
-0.06256103515625,
-0.03228759765625,
0.02764892578125,
-0.0175933837890625,
-0.028289794921875,
-0.0016307830810546875,
-0.023223876953125,
-0.007843017578125,
0.0123291015625,
0.005279541015625,
-0.060302734375,
0.0369873046875,
0.004558563232421875,
0.02801513671875,
0.01055908203125
]
|
6868f72503de196f3d4d6fa189c53fe52341a018 | Wordpress Stackexchange
Q: Wordpress on Mac does not load admin page Homepage loads just fine, but I cannot log into the admin page. Looking in Chrome developer tools I notice that
/wordpress/wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common,admin-bar,wp-ajax-response,jquery-color,wp-lists,quicktags,jquery-query,admin-comments,jquery-ui-core,jquery-&load%5B%5D=ui-widget,jquery-ui-mouse,jquery-ui-sortable,postbox,dashboard,customize-base,customize-loader,thickbox,plugin-install,underscor&load%5B%5D=e,shortcode,media-upload,svg-painter,heartbeat,wp-auth-check,word-count,wplink&ver=4.0
and
/wordpress/wp-admin/load-styles.php?c=0&dir=ltr&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-check&ver=4.0
never load. I've waited about 5 minutes, but they hang.
| Q: Wordpress on Mac does not load admin page Homepage loads just fine, but I cannot log into the admin page. Looking in Chrome developer tools I notice that
/wordpress/wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common,admin-bar,wp-ajax-response,jquery-color,wp-lists,quicktags,jquery-query,admin-comments,jquery-ui-core,jquery-&load%5B%5D=ui-widget,jquery-ui-mouse,jquery-ui-sortable,postbox,dashboard,customize-base,customize-loader,thickbox,plugin-install,underscor&load%5B%5D=e,shortcode,media-upload,svg-painter,heartbeat,wp-auth-check,word-count,wplink&ver=4.0
and
/wordpress/wp-admin/load-styles.php?c=0&dir=ltr&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-check&ver=4.0
never load. I've waited about 5 minutes, but they hang.
| wordpress | {
"language": "en",
"length": 42,
"provenance": "stackexchange_00019.jsonl.gz:449222",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/162767"
} | [
0.0210113525390625,
-0.006038665771484375,
0.0172119140625,
-0.00818634033203125,
-0.0122222900390625,
-0.02447509765625,
0.00958251953125,
-0.04571533203125,
-0.02508544921875,
0.0118865966796875,
-0.009185791015625,
-0.004154205322265625,
-0.01045989990234375,
-0.0267181396484375,
0.0252838134765625,
-0.042388916015625,
0.03558349609375,
-0.0017461776733398438,
0.04510498046875,
-0.00341796875,
-0.003955841064453125,
0.01203155517578125,
0.02935791015625,
0.002834320068359375,
0.0187835693359375,
0.06585693359375,
0.037384033203125,
-0.006885528564453125,
0.01190948486328125,
0.015625,
0.0266571044921875,
-0.0606689453125,
-0.0035228729248046875,
0.03631591796875,
0.005466461181640625,
-0.044403076171875,
-0.01727294921875,
0.024688720703125,
0.0186309814453125,
-0.00994873046875,
0.009246826171875,
-0.005268096923828125,
0.0509033203125,
0.0526123046875,
0.0002865791320800781,
-0.0283355712890625,
-0.0012426376342773438,
-0.058197021484375,
0.014495849609375,
-0.08233642578125,
0.033172607421875,
-0.01092529296875,
0.06744384765625,
-0.035186767578125,
-0.0210723876953125,
0.0259857177734375,
-0.0296173095703125,
0.0298919677734375,
0.0380859375,
-0.026275634765625,
-0.0129241943359375,
-0.0227203369140625,
0.018707275390625,
-0.00934600830078125,
-0.032073974609375,
-0.020538330078125,
-0.01030731201171875,
-0.0177154541015625,
-0.0064239501953125,
-0.0110015869140625,
0.033294677734375,
0.0026683807373046875,
-0.0301361083984375,
-0.0164947509765625,
-0.0023860931396484375,
0.00638580322265625,
0.026611328125,
0.006900787353515625,
-0.012847900390625,
0.03179931640625,
0.037750244140625,
0.004180908203125,
0.00012624263763427734,
-0.01108551025390625,
0.01039886474609375,
0.0175323486328125,
-0.007083892822265625,
-0.028656005859375,
-0.01316070556640625,
-0.020355224609375,
-0.0225982666015625,
-0.053070068359375,
-0.0068206787109375,
0.03265380859375,
-0.02105712890625,
-0.00772857666015625,
0.0010271072387695312,
-0.003337860107421875,
0.007167816162109375,
-0.01187896728515625,
-0.026947021484375,
-0.00981903076171875,
-0.039276123046875,
0.011383056640625,
-0.0005822181701660156,
0.0294952392578125,
0.0161895751953125,
0.0733642578125,
0.035888671875,
0.01187896728515625,
0.00225067138671875,
-0.014373779296875,
0.00939178466796875,
0.0035305023193359375,
-0.0222930908203125,
-0.0181884765625,
-0.0127410888671875,
-0.002925872802734375,
-0.0165557861328125,
-0.012603759765625,
-0.02581787109375,
-0.003692626953125,
-0.0113525390625,
0.0168914794921875,
0.01715087890625,
0.00811004638671875,
0.0033130645751953125,
-0.005153656005859375,
-0.00730133056640625,
0.0005183219909667969,
-0.0164031982421875,
0.00469207763671875,
0.041290283203125,
0.04718017578125,
0.0169830322265625,
-0.01064300537109375,
0.0256195068359375,
-0.033660888671875,
-0.0174713134765625,
0.016815185546875,
0.0211181640625,
-0.029510498046875,
-0.019195556640625,
-0.0014696121215820312,
0.0008096694946289062,
0.01049041748046875,
0.0224151611328125,
0.0187530517578125,
-0.0225372314453125,
-0.052276611328125,
0.029510498046875,
-0.00035691261291503906,
0.02044677734375,
0.0341796875,
0.026031494140625,
0.0202484130859375,
0.10498046875,
-0.031707763671875,
-0.05657958984375,
-0.041290283203125,
0.0002617835998535156,
0.0294189453125,
0.035980224609375,
-0.0276031494140625,
-0.006893157958984375,
-0.05401611328125,
-0.043731689453125,
0.00325775146484375,
0.0146484375,
-0.0190277099609375,
0.0258331298828125,
0.0070648193359375,
0.03240966796875,
-0.00847625732421875,
-0.0067596435546875,
0.005641937255859375,
0.01500701904296875,
-0.026153564453125,
0.04595947265625,
-0.0153961181640625,
-0.040008544921875,
-0.0239105224609375,
0.04443359375,
-0.0318603515625,
-0.0238037109375,
-0.00482177734375,
0.027618408203125,
0.05206298828125,
0.00677490234375,
0.032562255859375,
-0.00489044189453125,
0.0137481689453125,
-0.0294952392578125,
0.0305023193359375,
-0.012054443359375,
-0.0101470947265625,
-0.0216064453125,
0.01351165771484375,
-0.016357421875,
-0.0139007568359375,
0.0232086181640625,
-0.006622314453125,
-0.036407470703125,
-0.0276947021484375,
-0.10040283203125,
-0.04351806640625,
-0.0276641845703125,
0.035919189453125,
0.0697021484375,
0.039306640625,
-0.0233917236328125,
0.0172882080078125,
0.0027923583984375,
-0.0416259765625,
-0.061004638671875,
0.033447265625,
-0.03436279296875,
0.058929443359375,
-0.0262298583984375,
0.055694580078125,
-0.024932861328125,
-0.06719970703125,
-0.0153045654296875,
-0.003997802734375,
-0.01261138916015625,
0.0229034423828125,
-0.03466796875,
0.0108489990234375,
-0.0178985595703125,
0.021240234375,
-0.00701141357421875,
0.0215301513671875,
0.0340576171875,
0.036773681640625,
-0.06427001953125,
-0.035888671875,
-0.0682373046875,
-0.036529541015625,
-0.00200653076171875,
0.07293701171875,
0.048614501953125,
0.01007080078125,
-0.00998687744140625,
-0.0263214111328125,
0.0648193359375,
-0.044830322265625,
0.011932373046875,
-0.032318115234375,
-0.008453369140625,
0.01441192626953125,
0.02813720703125,
0.00783538818359375,
0.0064849853515625,
0.0198211669921875,
-0.0013370513916015625,
0.0266265869140625,
-0.001430511474609375,
0.0028438568115234375,
-0.0272064208984375,
0.0013675689697265625,
0.00977325439453125,
-0.0321044921875,
-0.0341796875,
-0.0104827880859375,
-0.019622802734375,
0.017059326171875,
0.00004088878631591797,
0.01113128662109375,
-0.03155517578125,
0.01270294189453125,
0.03466796875,
0.0016269683837890625,
-0.0245819091796875,
0.0150299072265625,
0.0693359375,
-0.05657958984375,
-0.07794189453125,
0.022857666015625,
0.017181396484375,
-0.00328826904296875,
0.0294189453125,
0.0234375,
0.025665283203125,
0.003582000732421875,
0.0193023681640625,
-0.027679443359375,
0.0295867919921875,
0.056610107421875,
0.06146240234375,
0.054443359375,
0.058074951171875,
0.0243072509765625,
0.01372528076171875,
0.03387451171875,
-0.007659912109375,
-0.005664825439453125,
0.031402587890625,
-0.040374755859375,
0.0271148681640625,
-0.0143890380859375,
0.076416015625,
0.062042236328125,
0.0178375244140625,
0.01873779296875,
-0.004608154296875,
0.050201416015625,
0.03997802734375,
-0.0256195068359375,
-0.02349853515625,
0.00936126708984375,
-0.015777587890625,
0.0194854736328125,
0.044281005859375,
0.0841064453125,
-0.032196044921875,
-0.0535888671875,
-0.02325439453125,
0.03619384765625,
-0.09844970703125,
-0.12335205078125,
-0.0609130859375,
-0.07147216796875,
0.059844970703125,
-0.0079803466796875,
-0.0147705078125,
-0.0198516845703125,
0.0171051025390625,
0.0394287109375,
-0.0094757080078125,
-0.0203704833984375,
-0.058990478515625,
-0.059844970703125,
-0.04638671875,
-0.0220794677734375,
-0.0184326171875,
-0.01076507568359375,
-0.004695892333984375,
0.04266357421875,
-0.01409149169921875,
-0.09161376953125,
-0.047119140625,
-0.0225677490234375,
-0.0238800048828125,
0.00426483154296875,
-0.0343017578125,
-0.005985260009765625,
0.024322509765625,
0.0051116943359375,
0.02227783203125,
0.0018062591552734375,
0.0016202926635742188,
-0.0200653076171875,
0.01146697998046875,
-0.046600341796875,
0.01290130615234375,
-0.0009870529174804688,
-0.0182952880859375,
-0.035491943359375,
-0.004596710205078125,
-0.067626953125,
0.006465911865234375,
-0.0073394775390625,
-0.0306854248046875,
0.03558349609375,
0.02313232421875,
-0.0301055908203125,
0.01369476318359375,
-0.02001953125,
-0.0192413330078125,
-0.0161590576171875,
0.00728607177734375,
-0.065185546875,
0.036529541015625,
0.0004329681396484375,
0.007282257080078125,
0.0033473968505859375,
0.031646728515625,
-0.0177764892578125,
-0.0235137939453125,
0.00514984130859375,
-0.035858154296875,
-0.031280517578125,
0.0228118896484375,
-0.0225982666015625,
-0.04144287109375,
0.054046630859375,
-0.019744873046875,
0.011322021484375,
-0.06524658203125,
-0.0440673828125,
-0.03564453125,
0.09283447265625,
-0.01080322265625,
0.003612518310546875,
0.0184326171875,
0.0162353515625,
-0.0548095703125,
-0.054534912109375,
-0.0799560546875,
0.005855560302734375,
-0.0390625,
0.00009876489639282227,
-0.031280517578125,
-0.0183563232421875,
-0.0210113525390625,
-0.0109710693359375,
-0.019927978515625,
-0.047088623046875,
0.0262451171875,
-0.0440673828125,
0.002349853515625,
-0.0325927734375,
0.0423583984375,
-0.0933837890625,
0.037933349609375,
-0.038909912109375,
-0.109619140625,
-0.0261688232421875,
-0.006439208984375,
0.0657958984375,
-0.00818634033203125,
0.01050567626953125,
-0.03607177734375,
0.0245819091796875,
-0.036529541015625,
0.0120086669921875,
-0.0139312744140625,
0.033203125,
-0.019073486328125,
-0.00025653839111328125,
-0.01788330078125,
-0.00795745849609375,
-0.0141143798828125,
-0.02801513671875,
0.017730712890625,
-0.01788330078125,
-0.0274810791015625,
-0.034454345703125,
-0.00615692138671875,
0.0029506683349609375,
-0.0157318115234375,
-0.0202789306640625,
-0.0159759521484375,
0.00580596923828125,
0.00008469820022583008,
0.002735137939453125,
-0.01473236083984375,
-0.01171112060546875,
0.037841796875,
-0.003955841064453125,
-0.01384735107421875,
0.00394439697265625,
0.060699462890625,
0.00797271728515625,
-0.0219879150390625,
-0.01641845703125,
-0.004711151123046875,
0.0240936279296875,
-0.03436279296875,
0.0863037109375,
0.042236328125,
-0.004425048828125,
0.072509765625,
-0.00251007080078125,
0.0283966064453125,
-0.023956298828125,
0.01204681396484375,
0.00409698486328125,
-0.01039886474609375,
0.03204345703125,
0.0230560302734375,
-0.0016307830810546875,
0.016876220703125,
-0.01367950439453125,
-0.003696441650390625,
-0.0169677734375,
0.038238525390625,
0.01349639892578125,
-0.0310821533203125,
-0.0579833984375,
-0.019439697265625,
-0.003192901611328125,
-0.04376220703125,
0.05572509765625,
0.019256591796875,
-0.0020923614501953125,
0.03143310546875,
0.042999267578125,
-0.0360107421875,
0.02276611328125,
-0.0328369140625,
0.02960205078125,
-0.0157928466796875,
0.023040771484375,
-0.023406982421875,
0.0164031982421875,
-0.021392822265625,
0.1136474609375,
0.04559326171875,
-0.03741455078125,
0.041900634765625,
-0.0198974609375,
0.01849365234375,
-0.000010132789611816406,
0.0272674560546875,
-0.0045623779296875,
0.0100555419921875,
0.0034809112548828125,
-0.0209197998046875,
0.055023193359375,
-0.01117706298828125,
-0.007236480712890625,
0.0136871337890625,
-0.04400634765625,
0.0157623291015625,
0.005664825439453125,
0.040191650390625,
-0.041656494140625,
0.0313720703125,
0.00623321533203125,
-0.0038204193115234375,
-0.047698974609375,
0.0478515625,
0.01155853271484375,
-0.0102081298828125,
0.0316162109375,
0.006977081298828125,
0.012725830078125,
-0.0294342041015625,
-0.006992340087890625,
-0.006389617919921875,
0.0307159423828125,
0.000385284423828125,
-0.0186920166015625,
0.0260467529296875,
-0.042572021484375,
-0.0227813720703125,
0.050384521484375,
-0.0266265869140625,
-0.0789794921875,
-0.0207977294921875,
0.01031494140625,
0.04486083984375,
-0.03192138671875,
-0.0168609619140625,
0.004878997802734375,
-0.03179931640625,
0.0209503173828125,
0.0242767333984375,
-0.03997802734375,
0.00763702392578125,
0.006946563720703125,
0.003391265869140625,
-0.03143310546875,
-0.033966064453125,
-0.03411865234375,
0.00634765625,
-0.00628662109375,
0.003997802734375,
0.0037784576416015625,
-0.00917816162109375,
0.006641387939453125,
-0.01258087158203125,
-0.00411224365234375,
0.029998779296875,
0.012908935546875,
0.0260467529296875,
-0.0141143798828125,
-0.00830841064453125,
-0.0241851806640625,
-0.0599365234375,
-0.05706787109375,
-0.060699462890625,
0.00200653076171875,
-0.056732177734375,
0.0245819091796875,
0.01715087890625,
0.0214080810546875,
-0.01409149169921875,
-0.0440673828125,
-0.058135986328125,
0.0159759521484375,
0.04949951171875,
0.0455322265625,
-0.01369476318359375,
0.056182861328125,
-0.005153656005859375,
0.03173828125,
0.0105743408203125,
0.0648193359375,
0.0204010009765625,
-0.0401611328125,
0.01079559326171875,
-0.01386260986328125,
0.0004968643188476562,
0.002300262451171875,
-0.03375244140625,
-0.0304718017578125,
0.0362548828125,
-0.005115509033203125,
-0.0090789794921875,
-0.01995849609375,
0.0015954971313476562,
-0.027374267578125,
0.07171630859375,
-0.004108428955078125,
-0.021514892578125,
0.005390167236328125,
-0.0209503173828125,
0.019012451171875,
-0.00457000732421875,
-0.057891845703125,
0.0325927734375,
0.0151214599609375,
0.01210784912109375,
0.032073974609375,
-0.02996826171875,
0.030487060546875,
0.08721923828125,
0.00983428955078125,
0.057586669921875,
0.01157379150390625,
0.0149078369140625,
0.02093505859375,
0.03851318359375,
-0.0138092041015625,
-0.07177734375,
0.0384521484375,
0.01541900634765625,
-0.0233612060546875,
0.031585693359375,
-0.02838134765625,
-0.004726409912109375,
0.04132080078125,
0.04010009765625,
-0.07183837890625,
0.002964019775390625,
0.004093170166015625,
-0.0189666748046875,
-0.00922393798828125,
-0.004062652587890625,
-0.020477294921875,
-0.04345703125,
0.0024394989013671875,
0.029754638671875,
-0.0168914794921875,
-0.00235748291015625,
0.0221405029296875,
-0.0159759521484375,
-0.0025177001953125,
0.06103515625,
0.032867431640625,
-0.0167388916015625,
0.01473236083984375,
0.01474761962890625,
0.00362396240234375,
0.005001068115234375,
-0.00991058349609375,
0.0259246826171875,
-0.045867919921875,
-0.06744384765625,
0.0035076141357421875,
-0.0228271484375,
-0.033233642578125,
0.0262298583984375,
0.0411376953125,
0.01318359375,
0.046966552734375,
0.01284027099609375,
-0.00604248046875,
-0.01715087890625,
0.006137847900390625,
0.035888671875,
-0.0270233154296875,
-0.0188140869140625,
0.005584716796875,
-0.0372314453125,
-0.01142120361328125,
-0.004215240478515625,
-0.006290435791015625,
-0.00726318359375,
-0.033660888671875,
0.04510498046875,
0.0013952255249023438,
-0.0256195068359375,
0.01629638671875,
0.02423095703125,
-0.00909423828125,
-0.011077880859375,
0.027130126953125,
-0.03607177734375,
0.005462646484375,
0.004741668701171875,
-0.005901336669921875,
-0.02911376953125,
-0.0347900390625,
-0.0404052734375,
0.056671142578125,
-0.00033593177795410156,
0.002071380615234375,
0.01345062255859375,
0.0198974609375,
-0.03350830078125,
-0.00867462158203125,
-0.02294921875,
0.07122802734375,
-0.0205535888671875,
0.039520263671875,
-0.0247802734375,
0.01253509521484375,
0.0228118896484375,
-0.00365447998046875,
-0.0546875,
-0.02569580078125,
-0.0221710205078125,
-0.005401611328125,
0.040557861328125,
0.04522705078125,
0.0703125,
0.01198577880859375,
-0.00638580322265625,
0.0025005340576171875,
-0.017913818359375,
-0.01345062255859375,
0.025604248046875,
-0.056396484375,
-0.0521240234375,
0.007236480712890625,
-0.00421142578125,
-0.0232391357421875,
0.0261383056640625,
-0.0152740478515625,
-0.0269012451171875,
0.023895263671875,
0.0131378173828125,
-0.00913238525390625,
-0.015777587890625,
0.01934814453125,
0.00787353515625,
-0.025421142578125,
-0.0341796875,
-0.025787353515625,
0.0310211181640625,
0.01385498046875,
-0.01049041748046875,
0.01611328125,
0.0208587646484375,
-0.01361083984375,
-0.05584716796875,
-0.0013065338134765625,
0.01055145263671875,
-0.053253173828125,
0.0232086181640625,
-0.0146636962890625,
0.039337158203125,
-0.07366943359375,
-0.03704833984375,
-0.00540924072265625,
0.034698486328125,
-0.01479339599609375,
-0.055206298828125,
-0.0008535385131835938,
0.0031223297119140625,
0.00965118408203125,
0.01033782958984375,
0.0147552490234375,
-0.01568603515625,
0.0188140869140625,
0.009490966796875,
-0.007556915283203125,
0.0148468017578125,
-0.004428863525390625,
0.004795074462890625,
0.02508544921875,
0.01026153564453125,
0.0221099853515625,
0.004970550537109375,
0.0108795166015625,
0.0021839141845703125,
0.0185089111328125,
0.0005970001220703125,
0.0286865234375,
-0.03448486328125,
0.01117706298828125,
0.0030803680419921875,
0.034515380859375,
-0.045623779296875,
0.01126861572265625,
-0.04840087890625,
-0.0653076171875,
-0.01500701904296875,
0.049774169921875,
0.004604339599609375,
0.001438140869140625,
0.048828125,
0.04815673828125,
-0.030303955078125,
-0.02264404296875,
0.033905029296875,
-0.00919342041015625,
-0.072265625,
-0.00315093994140625,
0.0469970703125,
0.083251953125,
0.04412841796875,
0.024749755859375,
0.08795166015625,
0.02496337890625,
-0.0154571533203125,
0.0258026123046875,
0.001049041748046875,
-0.03216552734375,
0.026031494140625,
-0.007537841796875,
0.047149658203125,
0.018463134765625,
-0.043914794921875,
-0.0171966552734375,
-0.003040313720703125,
0.0203094482421875,
-0.0084381103515625,
0.0185394287109375,
0.01384735107421875,
0.0280303955078125,
0.000005900859832763672,
-0.01328277587890625,
-0.0243377685546875,
0.02508544921875,
0.018402099609375,
0.0214996337890625,
0.0172119140625,
0.00547027587890625,
-0.09173583984375,
-0.0369873046875,
-0.03924560546875,
-0.003559112548828125,
0.0119476318359375,
0.07598876953125,
0.0178070068359375,
0.003177642822265625,
-0.011016845703125,
0.01629638671875,
-0.0239715576171875,
0.0006079673767089844,
-0.0229339599609375,
-0.0029850006103515625,
0.0062103271484375,
0.0040435791015625,
-0.029449462890625,
0.0692138671875,
-0.019622802734375,
-0.01812744140625,
0.0285797119140625,
-0.022064208984375,
-0.0005936622619628906,
-0.0049591064453125,
0.02020263671875,
-0.019927978515625,
-0.06640625,
-0.0234527587890625,
0.049102783203125,
-0.0082855224609375,
0.0278778076171875,
-0.019866943359375,
0.045928955078125,
-0.0066986083984375,
0.00881195068359375,
-0.00722503662109375,
-0.0189208984375,
-0.01629638671875,
0.0183563232421875,
-0.00998687744140625,
-0.012664794921875,
-0.01168060302734375,
-0.01270294189453125,
0.02197265625,
0.0020904541015625,
0.031494140625,
-0.00449371337890625,
-0.008331298828125,
-0.0015287399291992188,
0.042633056640625,
0.032012939453125,
-0.02801513671875,
0.0157623291015625,
0.0302276611328125,
-0.0158233642578125,
0.053558349609375,
-0.0338134765625,
-0.03228759765625,
-0.019989013671875,
-0.01439666748046875,
0.01174163818359375,
-0.0147705078125,
-0.0533447265625,
-0.01947021484375,
0.00864410400390625,
-0.0003101825714111328,
-0.0030765533447265625,
-0.040771484375,
0.045440673828125,
-0.037261962890625,
-0.0089111328125,
-0.0177764892578125,
0.04156494140625,
-0.00616455078125,
0.02130126953125,
-0.0267791748046875,
-0.009246826171875,
-0.0160675048828125,
0.033843994140625,
-0.00890350341796875,
0.0262908935546875,
0.041168212890625,
-0.0362548828125,
-0.006374359130859375,
-0.00901031494140625,
0.0225982666015625,
0.04583740234375,
0.019317626953125,
-0.0016803741455078125,
0.0120086669921875,
0.0309295654296875,
-0.0401611328125,
-0.06817626953125,
0.0030879974365234375,
-0.024383544921875,
0.0009336471557617188,
-0.051361083984375,
0.033416748046875,
0.02264404296875,
-0.0335693359375,
-0.062103271484375,
0.007381439208984375,
-0.0035457611083984375,
-0.0296478271484375,
-0.036956787109375,
-0.0045166015625,
-0.0095062255859375,
0.00557708740234375,
-0.01458740234375,
-0.0265350341796875,
-0.010711669921875,
0.045562744140625,
0.0227813720703125,
-0.00505828857421875,
0.0230712890625,
0.03662109375,
-0.0222015380859375,
0.0552978515625,
0.053436279296875,
-0.003940582275390625,
-0.007633209228515625,
0.006061553955078125,
0.0199432373046875,
0.0753173828125,
-0.0061798095703125,
-0.042144775390625,
-0.0108184814453125,
-0.04412841796875,
-0.0022296905517578125,
-0.03741455078125,
-0.01427459716796875,
-0.003936767578125,
0.037017822265625,
0.00922393798828125,
0.00868988037109375,
-0.034271240234375,
-0.0243682861328125,
-0.0253753662109375,
-0.0091705322265625,
-0.033782958984375,
0.01456451416015625,
-0.08343505859375,
-0.01507568359375,
0.0013895034790039062,
0.0011682510375976562,
0.0014257431030273438,
0.0291595458984375,
0.0088043212890625,
-0.0032825469970703125,
0.07891845703125,
-0.014404296875,
0.007495880126953125,
0.00498199462890625,
0.0592041015625,
-0.0369873046875,
0.0003058910369873047,
0.0226287841796875,
0.00011730194091796875,
0.043914794921875,
0.033538818359375,
0.0168609619140625,
0.0183258056640625,
-0.02044677734375,
0.00994110107421875,
0.0083160400390625,
0.043060302734375,
-0.0268096923828125,
-0.02630615234375,
0.0012521743774414062,
-0.00203704833984375,
-0.019805908203125,
-0.003265380859375,
0.0340576171875,
-0.0216827392578125,
-0.0218658447265625,
0.045867919921875,
0.0014247894287109375,
0.0216064453125,
-0.01519012451171875,
0.03961181640625,
-0.0187225341796875,
-0.0153961181640625,
-0.0096893310546875,
0.0007567405700683594,
-0.006702423095703125,
0.01320648193359375,
-0.0188140869140625,
-0.03228759765625,
-0.0046539306640625,
0.0005717277526855469,
0.00263214111328125,
0.00766754150390625
]
|
49e9d75102b5821d9f26b8ac344e4ce6594b87b3 | Wordpress Stackexchange
Q: Remove Archives in category title How I can remove word "Archives" in head title in category page?
I'm using the Twenty Twelve theme and WordPress 4.
<head>
<title>"name of category" Archives | "name of sites"</title>
</head>
A: If you are using yoast SEO plugin then the easiest method is to remove the archive word from "titles & metas-> Taxonomies->category"
find:
%%term_title%% Archives %%page%% %%sep%% %%sitename%%
replace it with:
%%term_title%% %%page%% %%sep%% %%sitename%%
| Q: Remove Archives in category title How I can remove word "Archives" in head title in category page?
I'm using the Twenty Twelve theme and WordPress 4.
<head>
<title>"name of category" Archives | "name of sites"</title>
</head>
A: If you are using yoast SEO plugin then the easiest method is to remove the archive word from "titles & metas-> Taxonomies->category"
find:
%%term_title%% Archives %%page%% %%sep%% %%sitename%%
replace it with:
%%term_title%% %%page%% %%sep%% %%sitename%%
A: Some points of interest:
*
*The code for wp_title() is located with /wp-includes/general-template.php. This function performs two filters: wp_title_parts and wp_title, and in either instance you have the opportunity to manipulate the results of the standard wp_title().
*Look at functions.php within the theme; the function twentytwelve_wp_title performs some magic specific to twentytwelve, and is activated using the wp_title filter with priority 10.
If you're not familiar with filters, I strongly recommend you look into it before getting too fancy with this. However, my suggested approach takes the following steps:
*
*Allow WP and twentytwelve to do their thing.
*Come along after the fact, and just before wp_title() returns its string we have an opportunity to manipulate it using the wp_title filter.
*
*For this to work, we'll need to assume a priority of greater than 10 to ensure that we do our thing after twentytwelve has done its part.
Thus, I suggest the following function, invoked using the wp_title filter with a larger (executed later) priority of 11:
function overwrite_twentytwelve_archives_title($title, $sep)
{
// Look for the string " Archives" (note the leading space),
// and strip it out of $title:
return preg_replace("/ Archives/", "", $title);
}
add_filter("wp_title", "overwrite_twentytwelve_archives_title", 11, 2);
I took some liberty here in assuming that there would be an extra space in front of "Archives" that had to be stripped out as well (noted in the comments); adjust accordingly if you so desire. Basically, what I've suggested here is to allow Wordpress to go about its usual business, only to have the "Archives" bit stripped out just before it's actually displayed. Please note that I haven't tested this to work correctly, and if it doesn't I would be happy to put it through the ringer on my end.
A: Go this link (change www.yourwebsite.com with your domain )
www.yourwebsite.com/wp-admin/admin.php?page=wpseo_titles
then click on the tab : Taxonomies
The first tab is your target
| wordpress | {
"language": "en",
"length": 389,
"provenance": "stackexchange_00019.jsonl.gz:449286",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163010"
} | [
0.018035888671875,
0.02581787109375,
-0.0216217041015625,
0.051116943359375,
0.0233306884765625,
-0.059814453125,
0.0858154296875,
-0.037689208984375,
0.00943756103515625,
0.0284881591796875,
0.053192138671875,
-0.034027099609375,
0.028411865234375,
-0.05853271484375,
-0.01548004150390625,
0.008087158203125,
0.01410675048828125,
-0.02447509765625,
-0.005176544189453125,
-0.0129547119140625,
0.0102081298828125,
0.006877899169921875,
-0.00484466552734375,
-0.01163482666015625,
0.01282501220703125,
-0.00632476806640625,
0.0831298828125,
-0.021881103515625,
0.0197906494140625,
-0.035491943359375,
0.0260162353515625,
0.0007905960083007812,
0.032745361328125,
-0.0229339599609375,
0.032867431640625,
0.05413818359375,
-0.0225372314453125,
0.00969696044921875,
0.00984954833984375,
0.005382537841796875,
0.01161956787109375,
-0.00795745849609375,
0.022308349609375,
0.00867462158203125,
0.0234222412109375,
-0.052001953125,
0.041595458984375,
-0.047882080078125,
-0.01508331298828125,
-0.0582275390625,
0.01247406005859375,
0.031341552734375,
0.04315185546875,
-0.03973388671875,
-0.018585205078125,
0.0156707763671875,
0.00862884521484375,
-0.0157470703125,
0.02667236328125,
-0.01580810546875,
-0.0190582275390625,
-0.0098114013671875,
0.027008056640625,
0.0068359375,
0.0032100677490234375,
0.0008358955383300781,
0.0304107666015625,
0.004596710205078125,
-0.04998779296875,
0.0020294189453125,
0.0521240234375,
-0.0272674560546875,
0.001743316650390625,
-0.004058837890625,
-0.040924072265625,
0.010833740234375,
-0.011962890625,
-0.0157470703125,
0.035003662109375,
-0.01259613037109375,
0.0224456787109375,
-0.03570556640625,
0.023895263671875,
-0.01690673828125,
0.037933349609375,
0.0287017822265625,
0.005298614501953125,
-0.035125732421875,
-0.0176239013671875,
0.00989532470703125,
-0.0016384124755859375,
-0.038055419921875,
-0.036865234375,
0.051025390625,
0.036407470703125,
-0.0222930908203125,
0.018646240234375,
0.056365966796875,
-0.008392333984375,
-0.0073394775390625,
-0.01540374755859375,
-0.018646240234375,
-0.029449462890625,
-0.0228729248046875,
0.0094146728515625,
0.0086212158203125,
-0.023956298828125,
0.019775390625,
0.050018310546875,
0.038421630859375,
-0.0094757080078125,
0.014739990234375,
-0.0184173583984375,
-0.01119232177734375,
-0.0022640228271484375,
0.0596923828125,
-0.0007238388061523438,
0.013397216796875,
-0.006351470947265625,
0.02825927734375,
0.001407623291015625,
0.00732421875,
0.020233154296875,
0.007343292236328125,
0.00083160400390625,
0.0102996826171875,
-0.0369873046875,
-0.0241546630859375,
0.005340576171875,
-0.01349639892578125,
-0.038726806640625,
0.01528167724609375,
0.0225982666015625,
0.019683837890625,
-0.0025787353515625,
-0.01021575927734375,
-0.019134521484375,
-0.0104217529296875,
0.020904541015625,
-0.01195526123046875,
0.0025806427001953125,
-0.0181732177734375,
0.030242919921875,
0.007549285888671875,
0.033447265625,
-0.015106201171875,
-0.0024013519287109375,
0.053314208984375,
0.0262451171875,
-0.01226806640625,
0.047210693359375,
-0.0277557373046875,
0.047637939453125,
0.0005354881286621094,
-0.043426513671875,
-0.0187835693359375,
0.03173828125,
-0.045257568359375,
-0.02459716796875,
-0.063720703125,
0.0184478759765625,
-0.0022068023681640625,
0.00890350341796875,
0.0214080810546875,
-0.00566864013671875,
0.025146484375,
-0.03582763671875,
-0.0007271766662597656,
0.003360748291015625,
-0.031768798828125,
0.0038242340087890625,
-0.038299560546875,
-0.004573822021484375,
-0.02392578125,
-0.01136016845703125,
0.0282440185546875,
-0.01666259765625,
-0.0292510986328125,
0.004383087158203125,
0.04754638671875,
0.01261138916015625,
-0.019073486328125,
-0.038848876953125,
0.018218994140625,
-0.0196380615234375,
-0.004177093505859375,
0.0272064208984375,
0.0234222412109375,
-0.01430511474609375,
0.0217437744140625,
0.0438232421875,
0.037109375,
-0.025146484375,
-0.0164947509765625,
0.03936767578125,
-0.0166168212890625,
-0.002685546875,
-0.036376953125,
0.014617919921875,
0.0012102127075195312,
-0.005886077880859375,
0.033233642578125,
-0.0224456787109375,
0.002147674560546875,
-0.07293701171875,
0.007389068603515625,
-0.0290985107421875,
0.045135498046875,
-0.0219573974609375,
0.039947509765625,
0.002223968505859375,
-0.015380859375,
0.0035953521728515625,
-0.0482177734375,
-0.01372528076171875,
-0.0286865234375,
-0.005748748779296875,
-0.01261138916015625,
-0.01104736328125,
-0.0101470947265625,
-0.0004978179931640625,
0.013641357421875,
-0.01494598388671875,
0.040008544921875,
0.06396484375,
-0.026123046875,
-0.031280517578125,
-0.053009033203125,
0.01528167724609375,
-0.00836944580078125,
-0.1026611328125,
0.08294677734375,
0.0546875,
0.05224609375,
-0.014984130859375,
-0.0126190185546875,
-0.01251983642578125,
-0.07196044921875,
-0.0012044906616210938,
0.061920166015625,
0.022918701171875,
0.01462554931640625,
-0.03204345703125,
-0.00033283233642578125,
0.032623291015625,
-0.017425537109375,
-0.010284423828125,
0.00890350341796875,
0.040008544921875,
0.0269775390625,
-0.0034313201904296875,
-0.025604248046875,
0.02532958984375,
-0.0008411407470703125,
0.023040771484375,
0.02020263671875,
0.00507354736328125,
-0.044097900390625,
0.0179595947265625,
-0.00734710693359375,
0.0272674560546875,
-0.019500732421875,
-0.06396484375,
0.02813720703125,
0.0384521484375,
0.0369873046875,
0.045013427734375,
0.04669189453125,
-0.03289794921875,
0.02264404296875,
0.0167388916015625,
0.0192718505859375,
-0.0012731552124023438,
0.0384521484375,
0.016510009765625,
0.021026611328125,
-0.047393798828125,
0.00292205810546875,
0.00957489013671875,
0.02783203125,
0.0010042190551757812,
0.04296875,
0.027099609375,
-0.00832366943359375,
-0.01629638671875,
-0.050140380859375,
0.0250396728515625,
0.00743865966796875,
-0.04351806640625,
-0.01354217529296875,
-0.0005373954772949219,
0.0341796875,
-0.013580322265625,
0.012298583984375,
0.004726409912109375,
0.003986358642578125,
-0.007038116455078125,
-0.035125732421875,
0.0295257568359375,
-0.0297698974609375,
0.04620361328125,
0.062347412109375,
-0.00807952880859375,
0.01953125,
0.0207977294921875,
-0.0244903564453125,
0.0341796875,
-0.001941680908203125,
-0.00794219970703125,
0.039794921875,
-0.0797119140625,
0.01047515869140625,
0.01506805419921875,
-0.0009317398071289062,
0.0267486572265625,
-0.02301025390625,
0.02130126953125,
0.01145172119140625,
-0.0628662109375,
-0.08001708984375,
0.0592041015625,
-0.049835205078125,
-0.01049041748046875,
0.034820556640625,
-0.0433349609375,
-0.045135498046875,
0.0992431640625,
-0.004627227783203125,
0.042388916015625,
-0.047576904296875,
-0.0304107666015625,
-0.039093017578125,
-0.0560302734375,
-0.0662841796875,
-0.004581451416015625,
-0.032867431640625,
0.00537109375,
0.05780029296875,
-0.00537872314453125,
-0.057373046875,
0.01036834716796875,
-0.00991058349609375,
-0.00148773193359375,
0.029052734375,
0.03338623046875,
-0.034027099609375,
-0.0244140625,
0.0193328857421875,
0.02581787109375,
0.0215606689453125,
-0.021484375,
-0.0253753662109375,
-0.005496978759765625,
0.04547119140625,
0.023284912109375,
0.004436492919921875,
0.01561737060546875,
0.042327880859375,
0.01168060302734375,
-0.020538330078125,
-0.044219970703125,
0.017242431640625,
-0.039154052734375,
-0.0015592575073242188,
0.0166015625,
-0.01776123046875,
-0.0202178955078125,
0.039337158203125,
-0.008087158203125,
-0.0250701904296875,
0.0240325927734375,
-0.0572509765625,
0.029937744140625,
-0.0044403076171875,
0.0089111328125,
-0.01416778564453125,
0.0200347900390625,
-0.031829833984375,
0.0120849609375,
0.0048065185546875,
0.008544921875,
0.0197296142578125,
0.0105133056640625,
0.018890380859375,
-0.056915283203125,
0.0277099609375,
-0.047882080078125,
0.006877899169921875,
-0.0126190185546875,
-0.006488800048828125,
0.01507568359375,
0.0860595703125,
-0.07330322265625,
-0.032745361328125,
0.0177459716796875,
0.0189666748046875,
0.01358795166015625,
0.0114288330078125,
-0.01177215576171875,
-0.04217529296875,
-0.1370849609375,
0.01200103759765625,
-0.0052337646484375,
-0.049285888671875,
-0.0291595458984375,
0.025665283203125,
-0.0865478515625,
-0.04400634765625,
0.03021240234375,
-0.0229339599609375,
0.022430419921875,
-0.0300445556640625,
-0.00780487060546875,
-0.037384033203125,
-0.0121307373046875,
-0.0305023193359375,
-0.06787109375,
-0.0099029541015625,
-0.01343536376953125,
0.042938232421875,
-0.0178070068359375,
0.010040283203125,
-0.03802490234375,
0.0293121337890625,
-0.01155853271484375,
0.00669097900390625,
-0.007442474365234375,
0.0023021697998046875,
-0.020721435546875,
0.016082763671875,
-0.00237274169921875,
-0.0157623291015625,
0.00372314453125,
0.00748443603515625,
-0.03497314453125,
-0.01153564453125,
-0.028289794921875,
-0.0059661865234375,
0.01239013671875,
-0.032135009765625,
-0.051116943359375,
-0.0638427734375,
-0.00567626953125,
-0.027435302734375,
0.0082550048828125,
-0.007228851318359375,
-0.049163818359375,
-0.0109405517578125,
0.057647705078125,
0.05615234375,
-0.026214599609375,
0.0022449493408203125,
0.041961669921875,
-0.00597381591796875,
-0.053558349609375,
-0.0789794921875,
0.0267333984375,
0.02667236328125,
-0.0435791015625,
0.058624267578125,
-0.0103302001953125,
-0.0218658447265625,
0.091796875,
-0.033966064453125,
0.01160430908203125,
-0.025238037109375,
0.0189208984375,
-0.003154754638671875,
-0.044403076171875,
0.03326416015625,
0.004314422607421875,
0.027191162109375,
0.0124664306640625,
0.00801849365234375,
-0.01438140869140625,
-0.0230865478515625,
0.00948333740234375,
0.03314208984375,
-0.00469970703125,
-0.01983642578125,
-0.0169219970703125,
0.016265869140625,
0.0305633544921875,
0.007534027099609375,
0.0147247314453125,
-0.01432037353515625,
-0.014068603515625,
-0.04150390625,
0.01065826416015625,
-0.09014892578125,
-0.0296630859375,
-0.08880615234375,
-0.002872467041015625,
-0.06353759765625,
-0.04815673828125,
-0.0158233642578125,
0.004634857177734375,
-0.0174713134765625,
-0.0251617431640625,
-0.05291748046875,
-0.00820159912109375,
0.0005049705505371094,
0.053863525390625,
0.044525146484375,
-0.01439666748046875,
0.0194549560546875,
0.02337646484375,
0.0011768341064453125,
0.0061187744140625,
-0.049713134765625,
0.006622314453125,
-0.03118896484375,
-0.00154876708984375,
-0.0028533935546875,
-0.0099639892578125,
0.047760009765625,
0.0209503173828125,
-0.0088653564453125,
0.04620361328125,
-0.0263519287109375,
-0.0110626220703125,
-0.034271240234375,
0.032989501953125,
0.029632568359375,
-0.0482177734375,
0.01474761962890625,
0.018524169921875,
0.018096923828125,
-0.04217529296875,
0.006591796875,
0.0205841064453125,
0.03228759765625,
-0.00246429443359375,
-0.047210693359375,
0.032073974609375,
-0.0164337158203125,
-0.00672149658203125,
0.00952911376953125,
-0.032073974609375,
-0.04656982421875,
-0.0066986083984375,
0.0022487640380859375,
0.0018444061279296875,
-0.032318115234375,
-0.0233154296875,
-0.0180511474609375,
-0.04180908203125,
0.0098114013671875,
0.020263671875,
-0.0362548828125,
0.020782470703125,
0.0129547119140625,
0.002834320068359375,
-0.0121002197265625,
-0.00629425048828125,
-0.0124969482421875,
-0.01436614990234375,
-0.0213623046875,
-0.00943756103515625,
0.0303955078125,
-0.0098876953125,
0.054229736328125,
-0.0255126953125,
-0.0241546630859375,
0.0169525146484375,
0.0081634521484375,
0.04522705078125,
0.0244598388671875,
-0.08367919921875,
-0.00421142578125,
-0.04351806640625,
-0.016357421875,
-0.041046142578125,
-0.01302337646484375,
-0.0533447265625,
0.015899658203125,
0.01038360595703125,
0.007358551025390625,
0.0199432373046875,
0.0205078125,
0.0171051025390625,
0.04473876953125,
0.0084686279296875,
0.036712646484375,
-0.0262603759765625,
0.04327392578125,
-0.005191802978515625,
0.018768310546875,
-0.01206207275390625,
0.0178985595703125,
0.0100250244140625,
-0.0109405517578125,
0.01497650146484375,
-0.0809326171875,
-0.03314208984375,
-0.0044403076171875,
-0.053802490234375,
0.033843994140625,
0.039459228515625,
-0.0044708251953125,
-0.0306243896484375,
-0.012542724609375,
0.005096435546875,
-0.0228118896484375,
0.05145263671875,
0.006389617919921875,
-0.042327880859375,
0.007568359375,
-0.023193359375,
0.0540771484375,
-0.0242767333984375,
-0.044647216796875,
0.05511474609375,
-0.0430908203125,
0.04248046875,
0.05908203125,
-0.0171661376953125,
0.043609619140625,
0.04010009765625,
-0.007678985595703125,
0.03375244140625,
0.0166015625,
0.010040283203125,
0.0201263427734375,
0.0211029052734375,
0.02081298828125,
-0.017364501953125,
0.050445556640625,
0.00992584228515625,
0.0097808837890625,
0.038818359375,
-0.032318115234375,
-0.048370361328125,
0.0127410888671875,
-0.0009427070617675781,
-0.0177459716796875,
-0.0082244873046875,
0.01020050048828125,
0.0286712646484375,
0.00794219970703125,
0.0275421142578125,
-0.019622802734375,
-0.0223541259765625,
-0.0222930908203125,
0.041656494140625,
-0.0162811279296875,
0.0034637451171875,
0.0595703125,
0.006557464599609375,
-0.0255889892578125,
0.01265716552734375,
0.01346588134765625,
-0.054412841796875,
0.0012683868408203125,
0.049835205078125,
-0.0280303955078125,
-0.046630859375,
0.01358795166015625,
0.0609130859375,
-0.02899169921875,
-0.07135009765625,
0.07611083984375,
0.036285400390625,
-0.020294189453125,
-0.01007080078125,
0.023468017578125,
0.006427764892578125,
0.01357269287109375,
-0.0054931640625,
0.009796142578125,
-0.0189971923828125,
-0.02716064453125,
-0.0245819091796875,
-0.006580352783203125,
0.0193939208984375,
-0.0025043487548828125,
-0.049560546875,
0.0167236328125,
-0.048248291015625,
-0.006450653076171875,
-0.0272064208984375,
-0.05078125,
0.049346923828125,
-0.0025310516357421875,
-0.0263671875,
-0.0016307830810546875,
0.043670654296875,
0.0167388916015625,
0.00894927978515625,
0.049407958984375,
-0.031707763671875,
0.03326416015625,
0.035797119140625,
0.036865234375,
-0.01041412353515625,
0.039215087890625,
-0.06805419921875,
0.057525634765625,
0.0015382766723632812,
0.00562286376953125,
-0.00775909423828125,
0.0282745361328125,
-0.037322998046875,
-0.00542449951171875,
-0.00720977783203125,
0.055572509765625,
0.0400390625,
-0.030670166015625,
-0.0014390945434570312,
0.01299285888671875,
-0.016632080078125,
0.01061248779296875,
0.0192718505859375,
-0.005634307861328125,
0.0208282470703125,
-0.0184478759765625,
0.0692138671875,
0.055755615234375,
0.0203857421875,
-0.0111236572265625,
-0.016326904296875,
-0.0207061767578125,
-0.012451171875,
0.0020294189453125,
0.03509521484375,
-0.0197601318359375,
-0.0543212890625,
0.024322509765625,
0.01953125,
0.040924072265625,
0.0142669677734375,
0.03509521484375,
0.005863189697265625,
0.003055572509765625,
0.01092529296875,
-0.017425537109375,
-0.007549285888671875,
0.05120849609375,
0.031890869140625,
-0.04278564453125,
-0.034698486328125,
-0.0217132568359375,
0.04449462890625,
0.0138092041015625,
0.04632568359375,
0.061279296875,
0.0255126953125,
0.048614501953125,
-0.03302001953125,
0.03155517578125,
-0.01044464111328125,
-0.029022216796875,
0.024139404296875,
0.0222625732421875,
0.0211181640625,
-0.0293731689453125,
-0.0179290771484375,
0.042205810546875,
0.051727294921875,
-0.0279693603515625,
-0.050384521484375,
0.0041351318359375,
-0.016021728515625,
-0.003253936767578125,
0.0017538070678710938,
-0.0153045654296875,
-0.0003056526184082031,
0.044769287109375,
-0.036529541015625,
-0.0195159912109375,
0.021484375,
0.019775390625,
0.0005478858947753906,
0.019378662109375,
-0.00760650634765625,
-0.041961669921875,
-0.028900146484375,
-0.0153656005859375,
-0.01003265380859375,
0.034332275390625,
0.051544189453125,
0.0015115737915039062,
-0.021759033203125,
-0.027496337890625,
-0.0214080810546875,
0.0552978515625,
-0.0233001708984375,
0.0241546630859375,
-0.057891845703125,
-0.054534912109375,
0.0030517578125,
0.035003662109375,
0.00893402099609375,
-0.0187530517578125,
0.03826904296875,
0.055389404296875,
-0.01393890380859375,
-0.02496337890625,
-0.006011962890625,
-0.0099639892578125,
0.005706787109375,
-0.0051422119140625,
0.07403564453125,
0.052398681640625,
0.0212554931640625,
-0.0222015380859375,
0.087646484375,
0.0467529296875,
-0.01345062255859375,
-0.05194091796875,
0.01271820068359375,
-0.0672607421875,
0.0131683349609375,
-0.01763916015625,
-0.00586700439453125,
-0.0007023811340332031,
-0.06524658203125,
-0.01045989990234375,
-0.0035877227783203125,
-0.01316070556640625,
0.0299072265625,
0.03912353515625,
-0.047637939453125,
0.0294036865234375,
0.007694244384765625,
-0.040374755859375,
0.029937744140625,
0.005008697509765625,
-0.0109100341796875,
0.0222015380859375,
0.01092529296875,
-0.0157012939453125,
0.02618408203125,
0.036590576171875,
0.04345703125,
0.00630950927734375,
0.0103607177734375,
0.0034656524658203125,
0.002765655517578125,
0.019256591796875,
-0.003086090087890625,
0.035552978515625,
-0.035430908203125,
-0.002140045166015625,
0.00011092424392700195,
-0.0012531280517578125,
0.0235137939453125,
-0.01087188720703125,
-0.048614501953125,
0.0197296142578125,
0.0419921875,
-0.02069091796875,
0.03253173828125,
0.0007371902465820312,
-0.0002765655517578125,
-0.050537109375,
-0.00446319580078125,
-0.0228424072265625,
-0.00682830810546875,
-0.0394287109375,
-0.0340576171875,
0.06488037109375,
0.02490234375,
-0.034210205078125,
0.0127410888671875,
0.011199951171875,
0.00923919677734375,
0.0177764892578125,
0.0125274658203125,
0.0171051025390625,
0.0345458984375,
-0.0003101825714111328,
-0.01233673095703125,
0.040618896484375,
-0.01342010498046875,
0.041748046875,
0.01052093505859375,
0.0518798828125,
0.0161895751953125,
-0.01934814453125,
-0.048858642578125,
-0.03125,
0.007495880126953125,
0.006488800048828125,
0.00409698486328125,
-0.05841064453125,
-0.00405120849609375,
-0.035858154296875,
-0.0174102783203125,
-0.0250091552734375,
-0.04449462890625,
-0.01503753662109375,
0.0244140625,
-0.04638671875,
-0.035552978515625,
-0.08251953125,
-0.01519775390625,
0.01439666748046875,
-0.006832122802734375,
-0.015625,
0.0399169921875,
-0.0226898193359375,
-0.029022216796875,
0.010711669921875,
-0.03326416015625,
-0.01873779296875,
0.0230712890625,
-0.0221710205078125,
-0.030548095703125,
-0.08306884765625,
0.01088714599609375,
-0.07879638671875,
-0.01294708251953125,
0.01010894775390625,
-0.00188446044921875,
-0.005584716796875,
-0.019317626953125,
0.00020205974578857422,
0.0279541015625,
0.0266571044921875,
-0.01404571533203125,
0.004878997802734375,
-0.0065765380859375,
-0.0204315185546875,
-0.049285888671875,
0.0004763603210449219,
-0.01491546630859375,
-0.04345703125,
0.0074005126953125,
-0.03338623046875,
-0.027740478515625,
-0.033050537109375,
-0.04656982421875,
0.06201171875,
-0.0010061264038085938,
-0.030975341796875,
-0.032257080078125,
0.039703369140625,
0.01422882080078125,
-0.007801055908203125,
0.0013675689697265625,
0.012237548828125,
-0.00461578369140625,
-0.01023101806640625,
0.0233306884765625,
0.05877685546875,
-0.0020236968994140625,
0.036651611328125,
-0.0220794677734375,
0.03717041015625,
0.0105743408203125,
0.01229095458984375,
-0.008636474609375,
0.034423828125,
-0.01227569580078125,
0.022369384765625,
-0.03790283203125,
0.0214385986328125,
-0.024658203125,
-0.0014057159423828125,
0.00711822509765625,
-0.038055419921875,
-0.054412841796875,
-0.01207733154296875,
0.0297088623046875,
0.049591064453125,
0.012664794921875,
-0.029083251953125,
-0.030120849609375,
0.004352569580078125,
0.00722503662109375,
-0.01323699951171875,
0.011749267578125,
-0.0582275390625,
-0.0217437744140625,
0.005016326904296875,
-0.0160675048828125,
-0.0068511962890625,
-0.03326416015625,
-0.045196533203125,
-0.00836181640625,
-0.011993408203125,
0.007843017578125,
-0.0019779205322265625,
0.01702880859375,
-0.0018892288208007812,
-0.024322509765625,
-0.01898193359375,
-0.0184173583984375,
0.0172882080078125,
-0.0230712890625,
-0.04522705078125,
-0.04486083984375,
-0.035430908203125,
0.0155487060546875,
0.0240478515625,
-0.0153656005859375,
0.030914306640625,
0.000518798828125,
0.0037097930908203125,
-0.0120697021484375,
0.026123046875,
0.01116180419921875,
0.01210784912109375,
-0.0275726318359375,
0.032989501953125,
0.0015649795532226562,
0.04937744140625,
0.01090240478515625,
-0.0298004150390625,
-0.0137176513671875,
0.0467529296875,
-0.01175689697265625,
-0.042022705078125,
0.01323699951171875,
-0.047882080078125,
0.0017614364624023438,
-0.01812744140625,
0.0222930908203125,
-0.06298828125,
0.047271728515625,
-0.0455322265625,
0.006229400634765625,
0.045318603515625
]
|
29a05c11831ee0eea78f7013c472cf7826e3d97b | Wordpress Stackexchange
Q: 404 on child page when parent page slug is identical to custom post type The internet is swamped with this issue but all the results were from 2010-2011 so I wanted to check if there was any advancement in the matter.
I have the following scenario:
*
*Created a custom post type "videos"
*Created a parent page "Videos"
*Created a child page "New Video"
*Changed permalinks to %category%/%postname%
WP automatically created the permalink for the child page as www.example.com/videos/new-video but the page leads to a 404 Not Found error.
*
*Re-saving permalink settings does not solve the problem
*Changing the parent page slug to "videoss" solves the problem
*Changing the custom post type to "video" solves the problem
Is there any way to have both custom post type and parent page slug set to "videos" under the aforementioned permalink structure?
A: I ended up changing the post type to 'video' to avoid the slug conflict with page 'Videos'.
I it a WP default behavior to give priority to the post type over the page slug:
How to make pages slug have priority over any other taxonomies like custom-post, post or category
| Q: 404 on child page when parent page slug is identical to custom post type The internet is swamped with this issue but all the results were from 2010-2011 so I wanted to check if there was any advancement in the matter.
I have the following scenario:
*
*Created a custom post type "videos"
*Created a parent page "Videos"
*Created a child page "New Video"
*Changed permalinks to %category%/%postname%
WP automatically created the permalink for the child page as www.example.com/videos/new-video but the page leads to a 404 Not Found error.
*
*Re-saving permalink settings does not solve the problem
*Changing the parent page slug to "videoss" solves the problem
*Changing the custom post type to "video" solves the problem
Is there any way to have both custom post type and parent page slug set to "videos" under the aforementioned permalink structure?
A: I ended up changing the post type to 'video' to avoid the slug conflict with page 'Videos'.
I it a WP default behavior to give priority to the post type over the page slug:
How to make pages slug have priority over any other taxonomies like custom-post, post or category
| wordpress | {
"language": "en",
"length": 192,
"provenance": "stackexchange_00019.jsonl.gz:449311",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163104"
} | [
0.056884765625,
0.0169219970703125,
-0.0034694671630859375,
-0.0282135009765625,
0.01611328125,
-0.006683349609375,
0.03204345703125,
-0.041595458984375,
-0.04351806640625,
-0.00411224365234375,
-0.007236480712890625,
0.0030994415283203125,
-0.0142364501953125,
-0.05206298828125,
0.02691650390625,
-0.035186767578125,
0.0157318115234375,
0.003719329833984375,
0.029388427734375,
-0.034454345703125,
0.000827789306640625,
-0.03558349609375,
0.054351806640625,
0.00716400146484375,
0.035064697265625,
-0.043182373046875,
-0.0010318756103515625,
-0.028656005859375,
0.01403045654296875,
-0.033233642578125,
0.01363372802734375,
0.03253173828125,
0.02532958984375,
-0.024200439453125,
0.038909912109375,
-0.0078125,
0.0202789306640625,
-0.01824951171875,
-0.0022869110107421875,
0.031097412109375,
0.002529144287109375,
0.003345489501953125,
0.059722900390625,
0.024810791015625,
0.02044677734375,
-0.0274658203125,
-0.0152740478515625,
-0.0858154296875,
0.030487060546875,
-0.01557159423828125,
-0.019317626953125,
-0.0016460418701171875,
-0.0007596015930175781,
-0.0173187255859375,
-0.01103973388671875,
-0.01155853271484375,
-0.002552032470703125,
0.031585693359375,
0.0137481689453125,
-0.01232147216796875,
-0.01535797119140625,
0.040252685546875,
0.0028476715087890625,
0.01898193359375,
0.017730712890625,
-0.0153961181640625,
-0.0173187255859375,
0.02447509765625,
-0.023712158203125,
0.0106964111328125,
0.017913818359375,
-0.02337646484375,
0.01165771484375,
-0.0213165283203125,
0.02142333984375,
-0.04229736328125,
-0.007724761962890625,
-0.030670166015625,
-0.00263214111328125,
0.04229736328125,
0.0189971923828125,
-0.0107421875,
0.0029811859130859375,
-0.062103271484375,
0.032745361328125,
-0.04156494140625,
-0.0066375732421875,
0.00624847412109375,
-0.02655029296875,
-0.01013946533203125,
-0.01708984375,
-0.041015625,
-0.00260162353515625,
0.00901031494140625,
-0.00882720947265625,
-0.0232696533203125,
0.0289154052734375,
0.051605224609375,
-0.0433349609375,
0.01288604736328125,
-0.01169586181640625,
-0.025115966796875,
0.037811279296875,
-0.05120849609375,
0.025390625,
-0.017608642578125,
0.0031833648681640625,
-0.017242431640625,
0.054443359375,
0.0216827392578125,
-0.025665283203125,
0.11419677734375,
0.0022144317626953125,
-0.031890869140625,
-0.0263519287109375,
0.04443359375,
0.005748748779296875,
-0.02703857421875,
-0.0019321441650390625,
-0.001953125,
-0.00005036592483520508,
0.01007843017578125,
0.04351806640625,
-0.00971221923828125,
0.003681182861328125,
0.01114654541015625,
-0.018890380859375,
-0.058441162109375,
0.057952880859375,
0.0191650390625,
-0.058746337890625,
-0.0019931793212890625,
0.09661865234375,
0.0284576416015625,
0.036224365234375,
-0.02685546875,
-0.0028839111328125,
-0.018707275390625,
0.0020771026611328125,
-0.0025348663330078125,
0.01003265380859375,
-0.0173492431640625,
0.015960693359375,
0.0020427703857421875,
0.023468017578125,
0.03424072265625,
-0.000858306884765625,
0.00878143310546875,
0.0249481201171875,
-0.0201873779296875,
0.0127716064453125,
-0.032684326171875,
0.064697265625,
-0.00579071044921875,
-0.0259552001953125,
-0.047454833984375,
-0.0040435791015625,
-0.0352783203125,
-0.007579803466796875,
-0.044281005859375,
0.020233154296875,
-0.00213623046875,
0.0195159912109375,
-0.038421630859375,
-0.058135986328125,
0.00862884521484375,
-0.0718994140625,
-0.0297698974609375,
0.01009368896484375,
-0.0008273124694824219,
0.01319122314453125,
-0.0184173583984375,
-0.06451416015625,
-0.0168304443359375,
0.005279541015625,
-0.0014171600341796875,
-0.027740478515625,
-0.006015777587890625,
0.019134521484375,
0.035400390625,
0.030609130859375,
-0.0186004638671875,
0.0017948150634765625,
0.0238189697265625,
-0.06341552734375,
0.0333251953125,
0.0210113525390625,
0.0243988037109375,
-0.0092010498046875,
0.00506591796875,
0.06884765625,
0.060455322265625,
-0.07989501953125,
0.06805419921875,
0.0017299652099609375,
-0.0105133056640625,
-0.01448822021484375,
0.004878997802734375,
-0.00673675537109375,
-0.0273895263671875,
-0.04534912109375,
0.034698486328125,
-0.0010890960693359375,
0.0105438232421875,
0.0269775390625,
0.0186309814453125,
0.0024814605712890625,
0.039581298828125,
0.012359619140625,
0.032257080078125,
-0.0013494491577148438,
0.00345611572265625,
-0.01849365234375,
-0.036956787109375,
-0.01004791259765625,
0.020843505859375,
0.002628326416015625,
0.01319122314453125,
-0.04010009765625,
0.032958984375,
-0.051361083984375,
-0.01343536376953125,
-0.0537109375,
0.01739501953125,
0.03375244140625,
0.0107269287109375,
-0.015533447265625,
-0.001407623291015625,
0.0232696533203125,
0.026275634765625,
-0.041595458984375,
0.011383056640625,
0.043426513671875,
-0.00522613525390625,
-0.06256103515625,
0.00479888916015625,
-0.01450347900390625,
0.004047393798828125,
-0.0201263427734375,
0.0443115234375,
0.0150299072265625,
0.010894775390625,
-0.0177459716796875,
0.0032558441162109375,
0.00618743896484375,
-0.049896240234375,
-0.00421142578125,
0.006267547607421875,
0.01068115234375,
0.038848876953125,
-0.0022430419921875,
-0.01171875,
0.025390625,
-0.033172607421875,
0.00745391845703125,
0.029541015625,
0.005535125732421875,
-0.0160369873046875,
-0.00450897216796875,
0.0255126953125,
0.01403045654296875,
-0.00644683837890625,
-0.0241241455078125,
-0.00286102294921875,
-0.0020389556884765625,
0.0191192626953125,
0.01244354248046875,
0.01025390625,
-0.01325225830078125,
0.00881195068359375,
0.0012598037719726562,
-0.0181884765625,
0.0066375732421875,
0.0275115966796875,
0.0380859375,
-0.0217132568359375,
0.002773284912109375,
-0.025482177734375,
-0.00354766845703125,
0.00865936279296875,
-0.00592803955078125,
0.0218048095703125,
-0.0257110595703125,
-0.002719879150390625,
-0.0236053466796875,
-0.06243896484375,
0.01096343994140625,
0.04412841796875,
0.00028634071350097656,
-0.01299285888671875,
0.0142822265625,
0.02862548828125,
-0.01776123046875,
0.026123046875,
0.042205810546875,
-0.0299224853515625,
0.037628173828125,
-0.055023193359375,
0.060791015625,
-0.04620361328125,
0.025665283203125,
0.0521240234375,
-0.034393310546875,
0.0209503173828125,
0.005771636962890625,
-0.0109710693359375,
-0.0016155242919921875,
0.0278472900390625,
-0.004596710205078125,
-0.04022216796875,
-0.0268096923828125,
-0.014984130859375,
0.036895751953125,
0.053680419921875,
0.010284423828125,
-0.023223876953125,
0.01451873779296875,
0.0535888671875,
-0.0391845703125,
-0.08428955078125,
0.00905609130859375,
-0.0692138671875,
0.030517578125,
-0.00850677490234375,
-0.01580810546875,
-0.02825927734375,
0.01605224609375,
0.0184173583984375,
0.02740478515625,
-0.029693603515625,
-0.058929443359375,
-0.0482177734375,
-0.0750732421875,
-0.01277923583984375,
0.0038242340087890625,
0.0045013427734375,
0.01296234130859375,
-0.00334930419921875,
0.00516510009765625,
-0.0362548828125,
0.0174560546875,
0.0360107421875,
-0.0022754669189453125,
0.0022907257080078125,
0.00923919677734375,
-0.0164794921875,
0.037872314453125,
0.0027179718017578125,
0.000008463859558105469,
0.037445068359375,
-0.0201263427734375,
-0.0252685546875,
-0.025604248046875,
-0.0211029052734375,
0.001308441162109375,
0.0297698974609375,
0.0251922607421875,
0.0245208740234375,
0.057525634765625,
-0.0264434814453125,
-0.055450439453125,
-0.0254974365234375,
-0.061248779296875,
0.048675537109375,
0.031219482421875,
0.02398681640625,
-0.031036376953125,
0.04296875,
-0.0005388259887695312,
0.0049896240234375,
0.048095703125,
-0.04425048828125,
0.05584716796875,
-0.00826263427734375,
0.0027370452880859375,
-0.045654296875,
0.00876617431640625,
-0.0202484130859375,
0.008026123046875,
-0.004367828369140625,
0.01113128662109375,
-0.00164794921875,
0.020233154296875,
-0.040069580078125,
-0.0660400390625,
0.0355224609375,
-0.047454833984375,
0.0174102783203125,
-0.06329345703125,
-0.033538818359375,
-0.0168914794921875,
0.08929443359375,
-0.032318115234375,
-0.013336181640625,
-0.0236358642578125,
-0.0099029541015625,
0.016326904296875,
-0.033599853515625,
-0.01255035400390625,
-0.022735595703125,
0.0216064453125,
-0.00841522216796875,
0.00193023681640625,
-0.00598907470703125,
-0.0182647705078125,
0.03460693359375,
-0.0186767578125,
0.0010232925415039062,
0.053192138671875,
-0.03143310546875,
-0.015869140625,
0.037384033203125,
0.00390625,
-0.0167236328125,
-0.0435791015625,
0.002254486083984375,
-0.07965087890625,
-0.0254364013671875,
0.000782012939453125,
0.06878662109375,
0.00725555419921875,
-0.0292510986328125,
0.00360107421875,
0.07183837890625,
0.0279693603515625,
0.0460205078125,
-0.0034770965576171875,
-0.048095703125,
0.024871826171875,
0.043914794921875,
0.033721923828125,
0.014068603515625,
-0.007472991943359375,
-0.02783203125,
-0.043731689453125,
-0.006389617919921875,
-0.0285186767578125,
0.004413604736328125,
0.006534576416015625,
-0.0194091796875,
-0.07421875,
-0.045745849609375,
-0.047760009765625,
-0.0243682861328125,
-0.002315521240234375,
-0.027252197265625,
-0.041473388671875,
-0.08990478515625,
0.03582763671875,
0.00006103515625,
-0.0178680419921875,
0.0028228759765625,
0.0208587646484375,
0.0159454345703125,
-0.039825439453125,
-0.0112457275390625,
-0.01251983642578125,
0.006679534912109375,
-0.02313232421875,
0.032440185546875,
-0.003940582275390625,
0.0101776123046875,
0.0293426513671875,
-0.025604248046875,
-0.0146026611328125,
0.0292205810546875,
0.0282440185546875,
-0.00824737548828125,
-0.0222930908203125,
0.00960540771484375,
-0.029754638671875,
0.005519866943359375,
0.030426025390625,
-0.034515380859375,
0.0024662017822265625,
-0.05389404296875,
0.040130615234375,
-0.0177154541015625,
0.0330810546875,
-0.06158447265625,
-0.041168212890625,
0.014251708984375,
0.01299285888671875,
0.019989013671875,
0.028564453125,
-0.0121917724609375,
0.030853271484375,
-0.0352783203125,
0.025665283203125,
-0.002353668212890625,
0.049896240234375,
-0.002040863037109375,
0.055206298828125,
0.0034389495849609375,
0.02386474609375,
-0.03936767578125,
0.00710296630859375,
0.0012750625610351562,
0.019134521484375,
-0.01096343994140625,
-0.0177001953125,
0.01678466796875,
-0.0306396484375,
-0.0106048583984375,
0.015655517578125,
0.01708984375,
0.0153961181640625,
-0.005641937255859375,
-0.007198333740234375,
-0.00893402099609375,
0.0384521484375,
-0.0269012451171875,
-0.00640869140625,
0.023162841796875,
-0.0226898193359375,
-0.035858154296875,
0.048309326171875,
0.0307769775390625,
-0.016326904296875,
-0.0208282470703125,
-0.0283660888671875,
-0.008514404296875,
0.050140380859375,
0.03668212890625,
-0.047637939453125,
-0.0008683204650878906,
0.0268707275390625,
0.0222015380859375,
-0.0419921875,
-0.026458740234375,
0.0107879638671875,
0.07073974609375,
-0.017578125,
-0.01934814453125,
0.0260467529296875,
-0.021484375,
-0.0212860107421875,
-0.008636474609375,
-0.0238800048828125,
0.004390716552734375,
-0.0200347900390625,
-0.008453369140625,
0.033355712890625,
0.0254669189453125,
-0.03680419921875,
0.0382080078125,
-0.03668212890625,
0.03680419921875,
0.032257080078125,
-0.005901336669921875,
0.027801513671875,
0.0137939453125,
0.038482666015625,
-0.0301361083984375,
-0.0183258056640625,
-0.01898193359375,
0.031341552734375,
-0.04425048828125,
-0.00617218017578125,
0.0355224609375,
0.0016937255859375,
0.0548095703125,
-0.0263519287109375,
-0.0266571044921875,
0.0166473388671875,
0.008148193359375,
0.017242431640625,
-0.006931304931640625,
0.0007119178771972656,
0.0131072998046875,
-0.0200958251953125,
-0.003185272216796875,
0.0143280029296875,
-0.037078857421875,
-0.0362548828125,
-0.0443115234375,
-0.036956787109375,
-0.0098876953125,
-0.00397491455078125,
0.00919342041015625,
-0.055511474609375,
0.041412353515625,
0.0306854248046875,
-0.031890869140625,
-0.040679931640625,
0.04266357421875,
0.0018444061279296875,
-0.007175445556640625,
-0.027130126953125,
-0.0065155029296875,
0.0144195556640625,
0.0147705078125,
-0.0149993896484375,
-0.0176239013671875,
-0.0290679931640625,
0.0236358642578125,
-0.01381683349609375,
0.040008544921875,
0.07965087890625,
0.0016536712646484375,
0.0248260498046875,
-0.0277557373046875,
0.00019860267639160156,
-0.01261138916015625,
0.01021575927734375,
-0.035430908203125,
0.0186309814453125,
0.0006389617919921875,
0.01099395751953125,
0.03692626953125,
-0.016571044921875,
-0.033599853515625,
-0.00316619873046875,
0.01137542724609375,
0.016357421875,
-0.0007610321044921875,
-0.0236053466796875,
0.0318603515625,
0.040313720703125,
0.00804901123046875,
0.052032470703125,
-0.004001617431640625,
0.033721923828125,
0.039581298828125,
0.0211181640625,
0.0203094482421875,
-0.0134429931640625,
0.059783935546875,
0.007205963134765625,
-0.01947021484375,
0.0171356201171875,
-0.037384033203125,
-0.031585693359375,
0.0240631103515625,
0.0195159912109375,
-0.0345458984375,
-0.0150604248046875,
-0.007106781005859375,
-0.00373077392578125,
-0.0059051513671875,
-0.0011816024780273438,
0.01517486572265625,
0.045501708984375,
-0.0222625732421875,
-0.038360595703125,
-0.04278564453125,
-0.00942230224609375,
-0.0241546630859375,
-0.014678955078125,
-0.00701904296875,
0.02374267578125,
0.0010652542114257812,
0.004207611083984375,
-0.0202484130859375,
-0.017303466796875,
-0.01123809814453125,
0.00036406517028808594,
0.0047149658203125,
-0.03240966796875,
-0.0166015625,
-0.005321502685546875,
0.01202392578125,
-0.042388916015625,
0.0270843505859375,
0.043182373046875,
0.003513336181640625,
-0.019378662109375,
0.01605224609375,
-0.0203399658203125,
0.02410888671875,
-0.017364501953125,
-0.057373046875,
0.017425537109375,
0.0001691579818725586,
-0.00440216064453125,
-0.0033416748046875,
-0.0210113525390625,
-0.004467010498046875,
-0.039276123046875,
0.01190185546875,
-0.0010700225830078125,
-0.02703857421875,
0.04034423828125,
-0.07159423828125,
0.00864410400390625,
0.034149169921875,
0.0129547119140625,
-0.004657745361328125,
0.01654052734375,
-0.011871337890625,
-0.0360107421875,
-0.00957489013671875,
0.0035877227783203125,
-0.0281524658203125,
0.009063720703125,
0.01837158203125,
-0.06365966796875,
0.1168212890625,
0.0131072998046875,
0.042144775390625,
0.019256591796875,
0.042022705078125,
-0.035888671875,
0.01277923583984375,
-0.0303802490234375,
0.0689697265625,
0.044891357421875,
0.04974365234375,
-0.0322265625,
-0.03228759765625,
0.038482666015625,
0.059295654296875,
0.07415771484375,
0.009246826171875,
-0.044769287109375,
0.0059356689453125,
0.090087890625,
0.02813720703125,
0.00867462158203125,
0.061920166015625,
-0.00811004638671875,
0.0097808837890625,
0.031341552734375,
0.0013685226440429688,
0.031982421875,
0.006229400634765625,
-0.046600341796875,
-0.007099151611328125,
0.0153350830078125,
0.0077667236328125,
-0.0008807182312011719,
-0.004192352294921875,
-0.033233642578125,
-0.0027141571044921875,
0.03131103515625,
-0.0224609375,
0.0016851425170898438,
0.02227783203125,
0.060394287109375,
-0.1248779296875,
-0.032623291015625,
-0.039703369140625,
0.0599365234375,
0.006557464599609375,
-0.01543426513671875,
-0.02734375,
0.00032639503479003906,
-0.0305938720703125,
-0.035430908203125,
-0.0260467529296875,
0.029052734375,
-0.037628173828125,
0.037689208984375,
0.0292816162109375,
0.0270538330078125,
-0.0097808837890625,
0.0232086181640625,
0.043487548828125,
0.054931640625,
-0.053985595703125,
-0.046600341796875,
0.028839111328125,
0.0116729736328125,
0.0016622543334960938,
0.0095367431640625,
0.0171051025390625,
0.001583099365234375,
0.03155517578125,
-0.0684814453125,
-0.00370025634765625,
0.0243072509765625,
0.037322998046875,
-0.02459716796875,
-0.05206298828125,
-0.01375579833984375,
-0.0114288330078125,
-0.0521240234375,
-0.020538330078125,
0.0121002197265625,
0.0806884765625,
0.059600830078125,
0.037261962890625,
-0.0187530517578125,
-0.05511474609375,
-0.0057220458984375,
0.0017747879028320312,
0.0106048583984375,
0.010406494140625,
-0.04132080078125,
-0.0138702392578125,
0.040740966796875,
0.04083251953125,
0.00901031494140625,
0.032135009765625,
0.0272216796875,
0.00910186767578125,
-0.0242919921875,
-0.0120086669921875,
0.0235748291015625,
-0.032867431640625,
0.0226898193359375,
-0.0164337158203125,
0.0032863616943359375,
-0.0021457672119140625,
-0.01483917236328125,
-0.033111572265625,
0.0166778564453125,
0.0165557861328125,
0.016632080078125,
0.01137542724609375,
0.0185089111328125,
-0.0183258056640625,
0.057891845703125,
0.03668212890625,
0.064208984375,
0.0504150390625,
-0.050750732421875,
-0.022918701171875,
0.01549530029296875,
-0.0775146484375,
0.047698974609375,
0.06976318359375,
0.0195770263671875,
-0.048858642578125,
0.0299835205078125,
-0.02587890625,
-0.026702880859375,
0.00372314453125,
0.052947998046875,
-0.0080413818359375,
-0.0262603759765625,
0.034576416015625,
-0.040130615234375,
-0.0085296630859375,
-0.01305389404296875,
-0.00902557373046875,
0.00020110607147216797,
0.1328125,
-0.030181884765625,
-0.008453369140625,
-0.01279449462890625,
0.023284912109375,
-0.023468017578125,
-0.032257080078125,
0.062103271484375,
-0.00571441650390625,
-0.0024356842041015625,
-0.01464080810546875,
-0.040863037109375,
0.0279083251953125,
0.0172882080078125,
0.0096893310546875,
0.0225677490234375,
-0.038604736328125,
0.020965576171875,
0.005290985107421875,
-0.00246429443359375,
-0.044403076171875,
-0.045257568359375,
-0.0516357421875,
-0.013763427734375,
0.0113067626953125,
-0.0144500732421875,
-0.037109375,
0.06585693359375,
-0.0112762451171875,
-0.0059356689453125,
0.01953125,
-0.048065185546875,
0.0184326171875,
0.0213775634765625,
-0.031951904296875,
-0.02557373046875,
0.019989013671875,
-0.0009307861328125,
-0.0020313262939453125,
0.0158843994140625,
0.019561767578125,
0.03240966796875,
-0.049346923828125,
-0.02044677734375,
-0.0245208740234375,
-0.018157958984375,
-0.038116455078125,
-0.024078369140625,
-0.0117034912109375,
-0.0116729736328125,
0.021484375,
-0.061859130859375,
-0.023712158203125,
-0.028472900390625,
0.008758544921875,
0.02301025390625,
0.0092315673828125,
-0.0130767822265625,
-0.014739990234375,
0.01800537109375,
0.049835205078125,
0.01247406005859375,
-0.05462646484375,
0.055450439453125,
-0.0440673828125,
0.02471923828125,
0.0069580078125,
-0.0164031982421875,
0.013702392578125,
0.0252532958984375,
-0.0175628662109375,
0.016693115234375,
-0.0134429931640625,
-0.02911376953125,
-0.01194000244140625,
0.0310516357421875,
0.04937744140625,
-0.0440673828125,
-0.052490234375,
0.009124755859375,
0.0257110595703125,
0.050750732421875,
0.0263214111328125,
-0.032196044921875,
-0.032318115234375,
0.01739501953125,
-0.002040863037109375,
0.01203155517578125,
0.03155517578125,
-0.013214111328125,
-0.0277252197265625,
-0.01245880126953125,
-0.00007814168930053711,
0.013397216796875,
-0.03338623046875,
-0.017913818359375,
0.07769775390625,
0.005573272705078125,
-0.0179595947265625,
-0.047882080078125,
0.0206451416015625,
-0.0175628662109375,
0.03399658203125,
-0.0006213188171386719,
-0.0199127197265625,
0.0078125,
0.03515625,
0.007297515869140625,
0.0236663818359375,
-0.0142059326171875,
0.03216552734375,
-0.03076171875,
0.037994384765625,
0.0284423828125,
-0.007251739501953125,
0.044952392578125,
0.021636962890625,
-0.0012149810791015625,
0.046966552734375,
-0.039398193359375,
0.0172119140625,
-0.048828125,
-0.03411865234375,
-0.002399444580078125,
-0.022064208984375,
-0.02423095703125,
-0.01861572265625,
0.0665283203125,
0.0287017822265625,
0.0198974609375,
-0.015411376953125,
-0.0826416015625,
-0.07733154296875,
-0.052001953125,
-0.01419830322265625,
0.04376220703125,
-0.09747314453125,
0.044708251953125,
0.01953125,
0.01555633544921875,
-0.025482177734375,
-0.00254058837890625,
-0.005275726318359375,
-0.01800537109375,
0.021453857421875,
-0.01055908203125,
0.01065826416015625,
0.025054931640625,
0.037017822265625,
-0.0156707763671875,
0.0233154296875,
-0.006805419921875,
-0.00902557373046875,
0.028533935546875,
0.01142120361328125,
-0.00021839141845703125,
-0.0024509429931640625,
-0.0237884521484375,
-0.0012331008911132812,
0.006137847900390625,
0.0308837890625,
-0.0115966796875,
-0.035308837890625,
-0.0254669189453125,
0.00519561767578125,
0.00884246826171875,
-0.016387939453125,
-0.02288818359375,
0.05780029296875,
0.0151824951171875,
0.041595458984375,
0.0115966796875,
0.0169525146484375,
0.0026302337646484375,
0.03924560546875,
0.0164947509765625,
-0.0123443603515625,
0.02679443359375,
-0.02197265625,
-0.010223388671875,
0.0014810562133789062,
-0.04833984375,
-0.07391357421875,
0.02197265625,
-0.027679443359375,
-0.01009368896484375,
0.0243988037109375
]
|
6664ccca4ae128349d382c865c90d972b0165873 | Wordpress Stackexchange
Q: add_rewrite_rule - working fine but broken for pagination My setup is as follows:
*
*Taxonomy called 'region'
*Terms in this taxonomy like 'scotland'
*Various post types that use this single taxonomy
I have achieved functioning pretty permalinks of the following format using the rewrite rule below:
add_rewrite_rule(
'region/([^/]+)/([^/]+)/([^/]+)/?',
'index.php?taxonomy=region&term=$matches[1]&post_type=$matches[3]',
'top'
);
This give me a functioning URL like:
http://example.com/region/scotland/type/event/
which is exactly what I need (region/[scotland] = taxonomy, type/[event] = post type)
However, I've tried adding an additional add_rewrite_rule to deal with pagination in the following URL format (I really don't get on well with regex!) but I just can't get pagination to function correctly - I'm was aiming to achieve the following:
http://example.com/region/scotland/type/event/page/1
http://example.com/region/scotland/type/event/page/2
http://example.com/region/scotland/type/event/page/3
I think I'm nearly there as I have one rewrite rule functioning correctly - but after trying lots of different things I've just not been able to achieve the correct regex/rewrite rule combination to achieve the pagination. The not-so-pretty permalink for this query, which functions correctly is:
http://example.com/index.php?taxonomy=region&term=scotland&post_type=event&paged=1
A: Order matter, you should write :
add_rewrite_rule( 'region/([^/]+)/type/([^/]+)/page/([0-9]{1,})/?', 'index.php?taxonomy=region&term=$matches[1]&post_type=$matches[2]&paged=$matches[3]', 'top' );
before
add_rewrite_rule( 'region/([^/]+)/type/([^/]+)/?', 'index.php?taxonomy=region&term=$matches[1]&post_type=$matches[2]', 'top' );
| Q: add_rewrite_rule - working fine but broken for pagination My setup is as follows:
*
*Taxonomy called 'region'
*Terms in this taxonomy like 'scotland'
*Various post types that use this single taxonomy
I have achieved functioning pretty permalinks of the following format using the rewrite rule below:
add_rewrite_rule(
'region/([^/]+)/([^/]+)/([^/]+)/?',
'index.php?taxonomy=region&term=$matches[1]&post_type=$matches[3]',
'top'
);
This give me a functioning URL like:
http://example.com/region/scotland/type/event/
which is exactly what I need (region/[scotland] = taxonomy, type/[event] = post type)
However, I've tried adding an additional add_rewrite_rule to deal with pagination in the following URL format (I really don't get on well with regex!) but I just can't get pagination to function correctly - I'm was aiming to achieve the following:
http://example.com/region/scotland/type/event/page/1
http://example.com/region/scotland/type/event/page/2
http://example.com/region/scotland/type/event/page/3
I think I'm nearly there as I have one rewrite rule functioning correctly - but after trying lots of different things I've just not been able to achieve the correct regex/rewrite rule combination to achieve the pagination. The not-so-pretty permalink for this query, which functions correctly is:
http://example.com/index.php?taxonomy=region&term=scotland&post_type=event&paged=1
A: Order matter, you should write :
add_rewrite_rule( 'region/([^/]+)/type/([^/]+)/page/([0-9]{1,})/?', 'index.php?taxonomy=region&term=$matches[1]&post_type=$matches[2]&paged=$matches[3]', 'top' );
before
add_rewrite_rule( 'region/([^/]+)/type/([^/]+)/?', 'index.php?taxonomy=region&term=$matches[1]&post_type=$matches[2]', 'top' );
A: Have you tried:
The main one:
add_rewrite_rule( 'region/([^/]+)/type/([^/]+)/?', 'index.php?taxonomy=region&term=$matches[1]&post_type=$matches[2]', 'top' );
For pagination
add_rewrite_rule( 'region/([^/]+)/type/([^/]+)/page/([0-9]{1,})/?', 'index.php?taxonomy=region&term=$matches[1]&post_type=$matches[2]&paged=$matches[3]', 'top' );
Out of curiousity, I replaced one of the ([^/]+) with the literal 'type' since that doesn't seem to be a dynamic variable.
If the pagination doesn't work, try switching the order of when it's declared, i.e. before or after your other rewrite rules. Alot of issues have to do with what order they're declared which effects which rule is run first.
Also, the Rewrite Rules Inspector plugin can be super helpful in helping you figure out which rewrite rules are being run for specific URLs.
| wordpress | {
"language": "en",
"length": 287,
"provenance": "stackexchange_00019.jsonl.gz:449323",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163141"
} | [
0.087646484375,
-0.012359619140625,
0.0276336669921875,
-0.099365234375,
0.01158905029296875,
-0.0098876953125,
0.0178070068359375,
0.0006909370422363281,
-0.033233642578125,
-0.0010042190551757812,
-0.00623321533203125,
0.014617919921875,
-0.02313232421875,
-0.0341796875,
0.021942138671875,
-0.018341064453125,
0.00948333740234375,
-0.0124664306640625,
0.02490234375,
-0.0207672119140625,
0.03887939453125,
-0.0064544677734375,
0.0084381103515625,
0.0528564453125,
0.046173095703125,
-0.025848388671875,
0.02667236328125,
-0.01134490966796875,
0.0287628173828125,
-0.0184326171875,
0.0234527587890625,
-0.0180816650390625,
0.0288848876953125,
-0.0281829833984375,
0.035736083984375,
-0.01227569580078125,
0.057769775390625,
-0.038818359375,
0.002593994140625,
0.0277862548828125,
0.00487518310546875,
0.000789642333984375,
0.007282257080078125,
0.034332275390625,
-0.0178375244140625,
-0.046905517578125,
0.01885986328125,
-0.037841796875,
-0.015533447265625,
0.006885528564453125,
0.0228729248046875,
0.0362548828125,
-0.0019130706787109375,
0.048980712890625,
0.0248260498046875,
0.05718994140625,
0.0074310302734375,
-0.0216217041015625,
-0.007335662841796875,
-0.023895263671875,
0.0009918212890625,
0.0155029296875,
0.0281982421875,
0.039215087890625,
-0.05743408203125,
-0.0034942626953125,
0.034881591796875,
-0.01361846923828125,
-0.019073486328125,
-0.06805419921875,
0.01406097412109375,
0.0260009765625,
-0.03228759765625,
0.00579833984375,
-0.00010508298873901367,
-0.035308837890625,
0.015777587890625,
-0.047882080078125,
-0.0063018798828125,
0.06256103515625,
-0.0124053955078125,
-0.033782958984375,
0.0312042236328125,
-0.03857421875,
0.036651611328125,
-0.01018524169921875,
-0.007350921630859375,
0.00009489059448242188,
-0.05218505859375,
-0.06591796875,
-0.01413726806640625,
-0.06195068359375,
-0.10101318359375,
-0.0258941650390625,
0.0237884521484375,
-0.04791259765625,
0.04315185546875,
0.04364013671875,
0.00914764404296875,
0.01122283935546875,
0.033599853515625,
-0.06500244140625,
0.05731201171875,
-0.05133056640625,
0.01190948486328125,
0.03240966796875,
0.0338134765625,
0.0634765625,
0.061187744140625,
-0.01251220703125,
-0.0004978179931640625,
0.10662841796875,
0.012664794921875,
0.00010126829147338867,
-0.0203857421875,
-0.035614013671875,
-0.051544189453125,
0.0165863037109375,
0.00882720947265625,
-0.02569580078125,
-0.0015058517456054688,
0.0297088623046875,
-0.0118408203125,
-0.00214385986328125,
0.0261077880859375,
0.022705078125,
0.0115814208984375,
-0.03875732421875,
0.021820068359375,
0.01015472412109375,
-0.0142059326171875,
0.0418701171875,
-0.016937255859375,
-0.03802490234375,
-0.039794921875,
-0.003963470458984375,
0.050811767578125,
-0.05657958984375,
-0.035888671875,
0.0406494140625,
-0.00901031494140625,
-0.0216827392578125,
-0.00954437255859375,
-0.00991058349609375,
-0.002460479736328125,
0.020477294921875,
0.0270843505859375,
0.0237274169921875,
-0.0124053955078125,
-0.03369140625,
-0.016357421875,
-0.037628173828125,
0.08984375,
-0.0160369873046875,
-0.11322021484375,
-0.0270233154296875,
-0.01702880859375,
-0.02252197265625,
-0.057037353515625,
-0.06591796875,
0.035675048828125,
0.01507568359375,
0.0196075439453125,
-0.056121826171875,
-0.052001953125,
-0.03955078125,
-0.081787109375,
-0.0123748779296875,
0.02557373046875,
-0.050018310546875,
0.035888671875,
-0.01184844970703125,
-0.01229095458984375,
0.0205841064453125,
0.0305023193359375,
0.035552978515625,
0.0118865966796875,
0.0100250244140625,
-0.00848388671875,
0.06573486328125,
0.02569580078125,
-0.02850341796875,
0.00665283203125,
-0.004207611083984375,
-0.057403564453125,
0.04107666015625,
0.025787353515625,
0.06744384765625,
-0.0279693603515625,
0.0179290771484375,
0.041656494140625,
0.043975830078125,
-0.04205322265625,
-0.037139892578125,
0.019561767578125,
-0.01284027099609375,
0.00843048095703125,
-0.03399658203125,
0.011749267578125,
0.037872314453125,
-0.0130615234375,
0.0219268798828125,
-0.0103607177734375,
0.019683837890625,
0.0311431884765625,
-0.005191802978515625,
0.00966644287109375,
0.0151214599609375,
-0.0010614395141601562,
0.01922607421875,
0.00550079345703125,
0.0180206298828125,
-0.02960205078125,
-0.045013427734375,
-0.01300811767578125,
0.0400390625,
0.0159454345703125,
0.0253448486328125,
-0.01152801513671875,
0.034027099609375,
0.00007021427154541016,
-0.01526641845703125,
0.0037212371826171875,
0.02056884765625,
0.0221405029296875,
0.004001617431640625,
-0.0266265869140625,
-0.01413726806640625,
-0.008026123046875,
0.00568389892578125,
-0.04107666015625,
0.050628662109375,
0.025421142578125,
0.01702880859375,
-0.0250091552734375,
0.01739501953125,
0.0014505386352539062,
-0.00666046142578125,
-0.012176513671875,
0.031768798828125,
0.021240234375,
0.0019989013671875,
-0.0307464599609375,
-0.0236358642578125,
0.027374267578125,
-0.0252532958984375,
0.008331298828125,
-0.0180816650390625,
-0.0565185546875,
-0.016998291015625,
0.05596923828125,
0.01195526123046875,
-0.006988525390625,
-0.0218505859375,
-0.034637451171875,
0.0295257568359375,
-0.01366424560546875,
0.03985595703125,
-0.029693603515625,
0.0099639892578125,
-0.010589599609375,
0.00971221923828125,
0.0128173828125,
-0.011932373046875,
0.01317596435546875,
0.006591796875,
0.0019931793212890625,
0.0072021484375,
-0.007389068603515625,
-0.0018110275268554688,
0.00225830078125,
-0.02685546875,
-0.01172637939453125,
0.032928466796875,
0.0458984375,
-0.0005688667297363281,
-0.032989501953125,
0.01004791259765625,
0.01451873779296875,
0.022613525390625,
-0.01314544677734375,
0.026641845703125,
-0.024139404296875,
-0.014862060546875,
-0.007587432861328125,
-0.017730712890625,
-0.0184326171875,
-0.0038700103759765625,
-0.003726959228515625,
0.0027713775634765625,
0.0279083251953125,
0.0262298583984375,
-0.006107330322265625,
0.0182647705078125,
-0.005130767822265625,
-0.0192718505859375,
0.018218994140625,
-0.0208740234375,
0.03253173828125,
-0.0229644775390625,
0.01708984375,
0.04827880859375,
0.01360321044921875,
-0.01030731201171875,
0.0171966552734375,
-0.00360107421875,
-0.0158538818359375,
0.031219482421875,
-0.0006818771362304688,
-0.0051422119140625,
-0.040191650390625,
0.00408935546875,
0.021728515625,
-0.0296173095703125,
0.04705810546875,
-0.027008056640625,
0.02337646484375,
0.00714111328125,
-0.042236328125,
-0.03277587890625,
0.0098419189453125,
-0.058258056640625,
-0.00200653076171875,
0.01145172119140625,
-0.0335693359375,
-0.01959228515625,
0.0268707275390625,
0.00685882568359375,
0.01068115234375,
0.01044464111328125,
-0.08551025390625,
-0.067626953125,
-0.1158447265625,
-0.018890380859375,
-0.019561767578125,
0.03125,
-0.0037975311279296875,
0.07391357421875,
0.012786865234375,
-0.048309326171875,
0.0169525146484375,
-0.0050048828125,
-0.0284271240234375,
0.01458740234375,
-0.055419921875,
-0.0083770751953125,
0.01739501953125,
-0.0190277099609375,
0.06549072265625,
0.0174713134765625,
-0.0027942657470703125,
0.032470703125,
0.0175933837890625,
-0.0298309326171875,
0.0239715576171875,
-0.00563812255859375,
-0.01947021484375,
0.01544189453125,
0.03460693359375,
-0.03094482421875,
-0.02874755859375,
-0.003330230712890625,
-0.038330078125,
-0.0087127685546875,
0.019500732421875,
0.002880096435546875,
-0.007724761962890625,
-0.0004832744598388672,
-0.003871917724609375,
-0.02520751953125,
-0.003826141357421875,
-0.03570556640625,
0.052459716796875,
-0.0106353759765625,
-0.004032135009765625,
-0.03240966796875,
0.0653076171875,
-0.00004863739013671875,
-0.00858306884765625,
0.025146484375,
-0.023681640625,
-0.0460205078125,
0.022979736328125,
-0.062469482421875,
-0.045867919921875,
0.043243408203125,
-0.0380859375,
-0.056304931640625,
-0.0089111328125,
0.00482940673828125,
-0.0022563934326171875,
0.0274810791015625,
-0.034576416015625,
-0.0218048095703125,
-0.032989501953125,
0.01309967041015625,
0.0015211105346679688,
-0.054046630859375,
0.030426025390625,
-0.0300140380859375,
-0.06463623046875,
0.00469207763671875,
-0.0007028579711914062,
-0.033233642578125,
0.00838470458984375,
-0.0307464599609375,
-0.0103759765625,
-0.04364013671875,
0.0472412109375,
-0.00159454345703125,
0.004940032958984375,
0.049224853515625,
-0.002758026123046875,
0.033294677734375,
-0.062225341796875,
0.01045989990234375,
-0.06549072265625,
-0.0249786376953125,
0.043365478515625,
0.056427001953125,
-0.014984130859375,
-0.034454345703125,
-0.0250701904296875,
0.045440673828125,
0.0223388671875,
-0.02880859375,
0.0105438232421875,
-0.0059967041015625,
-0.056121826171875,
0.0284423828125,
0.005126953125,
-0.0256805419921875,
0.000019490718841552734,
0.007740020751953125,
-0.00628662109375,
0.0172576904296875,
-0.01413726806640625,
0.0174407958984375,
0.0178680419921875,
-0.03009033203125,
-0.09423828125,
-0.038177490234375,
-0.0214080810546875,
-0.0198211669921875,
-0.0207366943359375,
-0.02960205078125,
-0.021148681640625,
-0.08270263671875,
0.022918701171875,
-0.003604888916015625,
-0.03192138671875,
0.019500732421875,
0.039031982421875,
0.0092620849609375,
-0.0197601318359375,
-0.0184326171875,
0.005523681640625,
0.0222930908203125,
0.02191162109375,
-0.001125335693359375,
-0.0301361083984375,
-0.035247802734375,
0.0672607421875,
-0.02618408203125,
0.0172882080078125,
-0.0230560302734375,
0.007781982421875,
-0.001979827880859375,
-0.0310211181640625,
0.0280609130859375,
-0.01007843017578125,
0.01201629638671875,
-0.00008183717727661133,
-0.045166015625,
-0.0157318115234375,
-0.0428466796875,
0.0810546875,
0.005474090576171875,
0.0487060546875,
-0.0755615234375,
-0.0210418701171875,
0.01554107666015625,
0.030059814453125,
0.044342041015625,
-0.007602691650390625,
0.010986328125,
0.0033855438232421875,
0.006076812744140625,
-0.01396942138671875,
0.0303497314453125,
0.0209197998046875,
-0.003917694091796875,
0.03265380859375,
0.00882720947265625,
-0.0006246566772460938,
-0.01418304443359375,
0.01312255859375,
0.0011739730834960938,
-0.00811767578125,
-0.00339508056640625,
-0.028656005859375,
-0.027587890625,
0.009735107421875,
0.01546478271484375,
0.0164794921875,
-0.0007171630859375,
0.0136871337890625,
0.0367431640625,
0.00571441650390625,
-0.01092529296875,
0.031036376953125,
-0.01397705078125,
-0.0080718994140625,
0.007282257080078125,
-0.024169921875,
0.019989013671875,
0.004283905029296875,
-0.01323699951171875,
0.007282257080078125,
0.0018949508666992188,
0.00441741943359375,
0.025115966796875,
0.053741455078125,
0.0155181884765625,
-0.0246124267578125,
-0.00958251953125,
0.0614013671875,
0.01262664794921875,
-0.020721435546875,
-0.04107666015625,
0.006450653076171875,
0.049835205078125,
-0.0294189453125,
0.018524169921875,
0.0102996826171875,
-0.0036468505859375,
-0.0260467529296875,
-0.017822265625,
-0.0216217041015625,
-0.0123748779296875,
-0.0297088623046875,
0.0150909423828125,
0.04296875,
0.0211181640625,
-0.008575439453125,
0.021759033203125,
-0.02447509765625,
0.0218048095703125,
0.06280517578125,
-0.00041222572326660156,
0.0029315948486328125,
-0.0121307373046875,
-0.035491943359375,
-0.0130767822265625,
0.04443359375,
-0.0200042724609375,
-0.01230621337890625,
-0.0168304443359375,
-0.03076171875,
0.024932861328125,
0.004764556884765625,
0.036956787109375,
-0.032806396484375,
-0.0146026611328125,
0.0028285980224609375,
-0.00521087646484375,
0.019744873046875,
-0.00988006591796875,
-0.032623291015625,
0.01617431640625,
-0.05615234375,
0.005558013916015625,
-0.007701873779296875,
-0.01178741455078125,
0.00405120849609375,
0.006366729736328125,
0.00717926025390625,
0.0232696533203125,
0.004150390625,
-0.0113372802734375,
0.007232666015625,
0.006916046142578125,
-0.004047393798828125,
0.005970001220703125,
0.01291656494140625,
0.039947509765625,
-0.006435394287109375,
0.034515380859375,
0.00472259521484375,
0.014923095703125,
-0.0271759033203125,
-0.01336669921875,
-0.0033855438232421875,
-0.08392333984375,
-0.033203125,
0.0083160400390625,
-0.05328369140625,
0.051788330078125,
0.036590576171875,
0.0027904510498046875,
0.031768798828125,
-0.02435302734375,
0.005664825439453125,
-0.00879669189453125,
-0.017059326171875,
-0.03509521484375,
-0.01442718505859375,
0.0301513671875,
0.017852783203125,
0.06207275390625,
-0.00879669189453125,
0.0176239013671875,
-0.030792236328125,
-0.0176849365234375,
0.0212860107421875,
-0.0035419464111328125,
-0.0191650390625,
-0.004337310791015625,
0.02923583984375,
0.040374755859375,
0.045257568359375,
0.0219879150390625,
0.0439453125,
0.025421142578125,
0.00482940673828125,
0.023834228515625,
0.041351318359375,
0.0268402099609375,
-0.0122222900390625,
0.006908416748046875,
0.003459930419921875,
-0.0108642578125,
-0.004322052001953125,
0.026123046875,
0.006908416748046875,
-0.04595947265625,
-0.013671875,
-0.043426513671875,
0.00682830810546875,
0.05377197265625,
0.01055145263671875,
0.0082550048828125,
0.05535888671875,
-0.02716064453125,
-0.0032405853271484375,
-0.02191162109375,
0.00815582275390625,
0.0136566162109375,
-0.006641387939453125,
-0.0099639892578125,
0.0031585693359375,
-0.01137542724609375,
-0.01424407958984375,
-0.033538818359375,
0.0101318359375,
-0.017059326171875,
0.00617218017578125,
-0.00806427001953125,
0.0027217864990234375,
-0.0239715576171875,
-0.0162200927734375,
0.0404052734375,
-0.049102783203125,
0.01088714599609375,
0.01171875,
-0.0038013458251953125,
-0.0167999267578125,
0.0221099853515625,
-0.023406982421875,
0.01137542724609375,
-0.01390838623046875,
-0.05023193359375,
0.01324462890625,
0.006183624267578125,
0.00782012939453125,
-0.044403076171875,
0.017181396484375,
-0.0199737548828125,
-0.041748046875,
-0.02288818359375,
-0.015716552734375,
-0.049835205078125,
0.0711669921875,
-0.07562255859375,
0.013214111328125,
0.01322174072265625,
0.03643798828125,
0.01332855224609375,
0.0182037353515625,
-0.00803375244140625,
-0.0443115234375,
-0.037567138671875,
0.0007305145263671875,
-0.063232421875,
0.03802490234375,
-0.01494598388671875,
-0.0723876953125,
0.06402587890625,
-0.00908660888671875,
0.042022705078125,
0.0210723876953125,
0.0225677490234375,
-0.0188446044921875,
-0.01174163818359375,
0.0036602020263671875,
0.028839111328125,
-0.033599853515625,
0.0095367431640625,
-0.010955810546875,
0.002410888671875,
0.02105712890625,
0.039581298828125,
0.07708740234375,
0.0254364013671875,
-0.06329345703125,
-0.01248931884765625,
0.03955078125,
0.029022216796875,
-0.00505828857421875,
0.0355224609375,
-0.024566650390625,
-0.01105499267578125,
0.038726806640625,
-0.0198974609375,
0.00799560546875,
0.013702392578125,
-0.030059814453125,
0.0035037994384765625,
-0.00852203369140625,
-0.0144195556640625,
0.0014123916625976562,
0.0180816650390625,
-0.02618408203125,
-0.0015087127685546875,
0.0260467529296875,
-0.034393310546875,
0.0185546875,
0.017303466796875,
0.04803466796875,
-0.061798095703125,
-0.02166748046875,
-0.0272674560546875,
0.05426025390625,
0.01629638671875,
0.0408935546875,
-0.02734375,
-0.001194000244140625,
0.1087646484375,
-0.0269622802734375,
0.011566162109375,
0.0226287841796875,
-0.0194091796875,
0.053253173828125,
0.0248565673828125,
0.041595458984375,
-0.0274200439453125,
-0.0212249755859375,
0.034454345703125,
0.0799560546875,
-0.051361083984375,
-0.040863037109375,
-0.00272369384765625,
0.01375579833984375,
0.00534820556640625,
0.02301025390625,
0.0322265625,
0.01178741455078125,
0.044525146484375,
-0.06939697265625,
0.0028896331787109375,
0.02105712890625,
0.0299072265625,
-0.020263671875,
0.01520538330078125,
-0.029266357421875,
-0.01318359375,
-0.03863525390625,
0.0374755859375,
0.003326416015625,
0.046630859375,
-0.0109405517578125,
0.05023193359375,
-0.03778076171875,
-0.002132415771484375,
0.0044097900390625,
0.01131439208984375,
-0.00380706787109375,
-0.01241302490234375,
-0.034576416015625,
-0.0296173095703125,
-0.006988525390625,
0.047576904296875,
0.038482666015625,
-0.01421356201171875,
0.017303466796875,
0.0232391357421875,
-0.00982666015625,
-0.0004055500030517578,
0.0595703125,
0.0038127899169921875,
0.039764404296875,
-0.050750732421875,
0.06634521484375,
0.003753662109375,
0.007183074951171875,
-0.043792724609375,
0.024505615234375,
0.0233154296875,
-0.0005340576171875,
-0.01345062255859375,
0.0215911865234375,
-0.0305938720703125,
-0.0019855499267578125,
-0.006694793701171875,
0.00778961181640625,
0.02984619140625,
-0.06378173828125,
-0.0081634521484375,
-0.0159454345703125,
-0.09368896484375,
0.040130615234375,
0.058868408203125,
-0.0192413330078125,
-0.0241241455078125,
0.0016918182373046875,
0.0161895751953125,
-0.00948333740234375,
-0.00699615478515625,
0.0009069442749023438,
-0.0008759498596191406,
0.02911376953125,
0.0162506103515625,
-0.0005168914794921875,
-0.021270751953125,
0.0223846435546875,
0.055511474609375,
-0.015655517578125,
0.1278076171875,
-0.07476806640625,
-0.005340576171875,
-0.0200042724609375,
0.00983428955078125,
-0.025115966796875,
-0.01142120361328125,
0.0015125274658203125,
-0.002307891845703125,
0.0008578300476074219,
-0.0098724365234375,
-0.0021495819091796875,
0.02789306640625,
0.0304412841796875,
-0.051483154296875,
0.0264129638671875,
-0.0293731689453125,
-0.0006008148193359375,
-0.02874755859375,
0.038787841796875,
-0.007534027099609375,
-0.042266845703125,
-0.046539306640625,
-0.007694244384765625,
0.026031494140625,
0.048736572265625,
-0.031982421875,
0.0146636962890625,
0.035736083984375,
0.0106201171875,
0.01433563232421875,
-0.0110321044921875,
0.04931640625,
0.027374267578125,
-0.0239715576171875,
-0.004940032958984375,
0.03411865234375,
-0.004810333251953125,
0.01174163818359375,
0.01245880126953125,
0.00876617431640625,
0.030426025390625,
-0.0009121894836425781,
-0.0023021697998046875,
-0.01432037353515625,
0.0173797607421875,
0.0096588134765625,
-0.00894927978515625,
-0.037109375,
-0.00799560546875,
-0.0142822265625,
-0.0013427734375,
-0.0251312255859375,
-0.018310546875,
-0.0106048583984375,
-0.00014781951904296875,
0.00829315185546875,
-0.046600341796875,
-0.0252227783203125,
0.024627685546875,
0.02374267578125,
0.0053863525390625,
-0.053192138671875,
0.036224365234375,
-0.01727294921875,
0.04815673828125,
-0.006389617919921875,
-0.0291290283203125,
0.00913238525390625,
0.01313018798828125,
-0.02447509765625,
0.01091766357421875,
-0.050506591796875,
-0.03948974609375,
-0.032440185546875,
0.0018377304077148438,
0.038818359375,
-0.01264190673828125,
-0.00894927978515625,
-0.04229736328125,
-0.0207061767578125,
0.029449462890625,
-0.03387451171875,
-0.00359344482421875,
0.043914794921875,
-0.002521514892578125,
-0.06787109375,
-0.057861328125,
-0.0005269050598144531,
-0.03277587890625,
0.002262115478515625,
-0.004550933837890625,
-0.013671875,
0.0018672943115234375,
-0.0288848876953125,
-0.039093017578125,
0.03192138671875,
0.01898193359375,
-0.0192108154296875,
-0.10687255859375,
0.01372528076171875,
0.01105499267578125,
0.0098724365234375,
-0.0391845703125,
0.00051116943359375,
-0.033905029296875,
0.06256103515625,
0.0240936279296875,
0.042236328125,
0.00716400146484375,
0.030914306640625,
-0.00270843505859375,
0.0243072509765625,
0.004657745361328125,
0.01204681396484375,
-0.016510009765625,
-0.014923095703125,
0.05029296875,
0.045013427734375,
0.0098724365234375,
0.0146942138671875,
0.032135009765625,
-0.05462646484375,
0.0168914794921875,
-0.040435791015625,
-0.047943115234375,
-0.03778076171875,
0.076904296875,
-0.0013484954833984375,
0.020355224609375,
-0.01222991943359375,
-0.049591064453125,
-0.0286712646484375,
-0.044097900390625,
-0.026336669921875,
0.03692626953125,
-0.05816650390625,
0.021392822265625,
-0.035919189453125,
0.0107269287109375,
-0.008514404296875,
0.0235748291015625,
-0.00283050537109375,
-0.007785797119140625,
0.0174102783203125,
-0.0223388671875,
-0.03692626953125,
0.04150390625,
0.0243072509765625,
-0.035247802734375,
-0.03631591796875,
-0.017791748046875,
0.0074920654296875,
-0.0264739990234375,
-0.0499267578125,
-0.048004150390625,
0.03314208984375,
-0.000888824462890625,
-0.0074462890625,
0.01430511474609375,
0.007480621337890625,
-0.006381988525390625,
0.05474853515625,
-0.0105133056640625,
0.0157928466796875,
0.0169830322265625,
0.0235595703125,
-0.036346435546875,
0.02825927734375,
0.01593017578125,
0.038330078125,
-0.032073974609375,
0.07000732421875,
-0.0023899078369140625,
0.0151519775390625,
-0.02923583984375,
0.037567138671875,
-0.003787994384765625,
0.01094818115234375,
0.003009796142578125,
-0.024139404296875,
-0.039276123046875,
-0.04522705078125,
-0.025238037109375,
-0.051971435546875,
-0.0193634033203125,
0.0164031982421875
]
|
4c93069e3137bc2bebbd4b1b9ecb6725d415530d | Wordpress Stackexchange
Q: Getting the Site URL Including the Front Base If my permalink structure is set to /blog/%postname%/, how can I retrieve a URL for my site which retrieves domain.com/blog/?
With the permalink structure mentioned above, when using site_url();, it displays domain.com/ when I'm looking to easily get the site's URL including the front base.
Maybe I'm unclear about what the "front base" actually is.
I'm under the impression that the front base is your "Permalink Structure". (Stored in the option permalink_structure)
I've tried home_url(); and site_url(); ... Both output just domain.com/
I'm thinking about just using site_url(); then retrieving the option permalink_structure, parsing the contents of the option myself, then appending it to the site_url(); function.
$permalink_structure = get_option('permalink_structure');
$front_base = preg_replace('#(\%)(.*)(\%/)#si', '', $permalink_structure);
echo site_url($front_base, 'http').PHP_EOL;
Is there an easier way to get the site's URL including the front base?
A: I was about to suggest something like the function bellow, but lets face it @Milo's answer is just a bit smarter, so just for completeness reason and because I already wrote it down.
function wpse163163_site_url_with_fix_permalink_base() {
return
get_site_url()
. '/'
. preg_replace(
'/\%([a-z0-9]+?)\%/i',
'',
str_replace(
'/',
'',
get_option('permalink_structure')
)
)
. '/';
}
| Q: Getting the Site URL Including the Front Base If my permalink structure is set to /blog/%postname%/, how can I retrieve a URL for my site which retrieves domain.com/blog/?
With the permalink structure mentioned above, when using site_url();, it displays domain.com/ when I'm looking to easily get the site's URL including the front base.
Maybe I'm unclear about what the "front base" actually is.
I'm under the impression that the front base is your "Permalink Structure". (Stored in the option permalink_structure)
I've tried home_url(); and site_url(); ... Both output just domain.com/
I'm thinking about just using site_url(); then retrieving the option permalink_structure, parsing the contents of the option myself, then appending it to the site_url(); function.
$permalink_structure = get_option('permalink_structure');
$front_base = preg_replace('#(\%)(.*)(\%/)#si', '', $permalink_structure);
echo site_url($front_base, 'http').PHP_EOL;
Is there an easier way to get the site's URL including the front base?
A: I was about to suggest something like the function bellow, but lets face it @Milo's answer is just a bit smarter, so just for completeness reason and because I already wrote it down.
function wpse163163_site_url_with_fix_permalink_base() {
return
get_site_url()
. '/'
. preg_replace(
'/\%([a-z0-9]+?)\%/i',
'',
str_replace(
'/',
'',
get_option('permalink_structure')
)
)
. '/';
}
A: You can get the value of front in the global $wp_rewrite:
global $wp_rewrite;
echo $wp_rewrite->front;
// or
echo home_url( $wp_rewrite->front );
Though that is probably of limited use, as the front base isn't necessarily an existing page, and may 404 in many cases. If you're using that value to prepend to other URLs, you're likely doing it wrong.
If you want the page designated as the posts page, that value is stored in the page_for_posts option:
echo get_permalink( get_option( 'page_for_posts' ) );
A: You will have to get link like this.
<?php echo home_url( '/blog' ); ?>
or
<?php echo home_url( '/' ) . 'blog'; ?>
| wordpress | {
"language": "en",
"length": 302,
"provenance": "stackexchange_00019.jsonl.gz:449331",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163163"
} | [
0.033843994140625,
-0.01016998291015625,
-0.0012836456298828125,
-0.01239776611328125,
0.0003490447998046875,
-0.0258026123046875,
0.0250091552734375,
-0.0252685546875,
0.01934814453125,
-0.004119873046875,
-0.034698486328125,
-0.0258941650390625,
-0.024627685546875,
-0.046142578125,
0.0179290771484375,
-0.0280914306640625,
0.037628173828125,
-0.0280914306640625,
0.027313232421875,
0.0188140869140625,
0.01265716552734375,
0.0235443115234375,
0.0183258056640625,
0.00196075439453125,
0.0309295654296875,
-0.0150909423828125,
0.093994140625,
-0.02850341796875,
0.0236053466796875,
-0.0274658203125,
0.0253753662109375,
-0.0345458984375,
0.0122833251953125,
-0.0189971923828125,
0.045379638671875,
-0.0003490447998046875,
0.0296173095703125,
-0.0113372802734375,
0.018280029296875,
0.00783538818359375,
-0.004268646240234375,
0.0060882568359375,
0.0037994384765625,
0.04473876953125,
-0.0145721435546875,
-0.063232421875,
0.02154541015625,
-0.044036865234375,
-0.0190277099609375,
0.035491943359375,
0.0171051025390625,
0.0184326171875,
0.0130157470703125,
0.04876708984375,
-0.01001739501953125,
-0.0245513916015625,
0.0280914306640625,
-0.041595458984375,
0.0176849365234375,
-0.0214385986328125,
-0.0238037109375,
-0.0009570121765136719,
0.043853759765625,
0.0068511962890625,
-0.050201416015625,
-0.010101318359375,
-0.005786895751953125,
0.0264434814453125,
-0.0357666015625,
-0.047393798828125,
0.01126861572265625,
-0.0101165771484375,
-0.0160369873046875,
-0.0040130615234375,
-0.068603515625,
0.0015697479248046875,
-0.01390838623046875,
-0.043426513671875,
0.040252685546875,
-0.026336669921875,
-0.0100555419921875,
0.0160675048828125,
-0.052490234375,
-0.0233306884765625,
0.040069580078125,
0.0201263427734375,
-0.0052032470703125,
-0.0303802490234375,
-0.053924560546875,
-0.01424407958984375,
-0.0311126708984375,
-0.054534912109375,
-0.036041259765625,
-0.016204833984375,
0.0020046234130859375,
-0.036712646484375,
0.003635406494140625,
0.024322509765625,
-0.0389404296875,
-0.0235748291015625,
0.0148468017578125,
-0.0272369384765625,
0.0076446533203125,
-0.0181732177734375,
0.0019931793212890625,
0.0360107421875,
0.041015625,
0.0350341796875,
0.0211029052734375,
-0.00859832763671875,
-0.01230621337890625,
0.0299530029296875,
-0.039276123046875,
-0.0270233154296875,
-0.0025272369384765625,
0.05181884765625,
-0.053375244140625,
0.0019550323486328125,
-0.0194549560546875,
0.03765869140625,
-0.01399993896484375,
0.035125732421875,
0.00609588623046875,
-0.02423095703125,
-0.01108551025390625,
-0.012420654296875,
-0.0015411376953125,
-0.033233642578125,
-0.01088714599609375,
0.0311737060546875,
-0.037445068359375,
0.01058197021484375,
0.0367431640625,
-0.008209228515625,
-0.0009503364562988281,
-0.041229248046875,
-0.01226806640625,
-0.0146636962890625,
-0.00406646728515625,
-0.01116943359375,
0.0172882080078125,
-0.0132904052734375,
0.01215362548828125,
0.00011837482452392578,
-0.0011453628540039062,
0.01352691650390625,
0.022735595703125,
0.005832672119140625,
-0.00046515464782714844,
-0.01010894775390625,
-0.036865234375,
0.0235443115234375,
0.0307159423828125,
0.004825592041015625,
-0.0018787384033203125,
-0.037078857421875,
0.030181884765625,
-0.042816162109375,
-0.0165557861328125,
-0.053009033203125,
0.0259246826171875,
-0.00289154052734375,
-0.0037746429443359375,
-0.0197906494140625,
-0.054962158203125,
-0.01422119140625,
-0.035369873046875,
-0.019622802734375,
0.01251220703125,
0.002330780029296875,
0.0013494491577148438,
-0.00417327880859375,
0.01079559326171875,
0.017486572265625,
0.005840301513671875,
0.017852783203125,
-0.007709503173828125,
0.0286865234375,
-0.00991058349609375,
0.060821533203125,
0.0341796875,
-0.03167724609375,
0.0193939208984375,
0.005641937255859375,
-0.06182861328125,
0.038909912109375,
0.01898193359375,
0.0712890625,
-0.0176239013671875,
0.019775390625,
0.0154876708984375,
0.0357666015625,
-0.04730224609375,
0.0194549560546875,
-0.04205322265625,
0.0033245086669921875,
0.01898193359375,
0.0328369140625,
-0.048858642578125,
-0.0029582977294921875,
-0.00986480712890625,
0.0254669189453125,
0.014129638671875,
0.042205810546875,
0.0271759033203125,
0.0287322998046875,
-0.004360198974609375,
0.018157958984375,
0.037353515625,
0.035919189453125,
0.01345062255859375,
0.046173095703125,
-0.046295166015625,
-0.040283203125,
-0.05413818359375,
0.05279541015625,
0.004772186279296875,
0.0009298324584960938,
-0.01354217529296875,
0.022369384765625,
-0.0244293212890625,
-0.0255126953125,
-0.04412841796875,
-0.005096435546875,
0.04205322265625,
-0.0283050537109375,
-0.00624847412109375,
-0.03436279296875,
0.006168365478515625,
0.00695037841796875,
-0.0706787109375,
0.042877197265625,
0.0302734375,
0.0210418701171875,
-0.0253448486328125,
0.00041985511779785156,
0.0236053466796875,
-0.031951904296875,
0.006122589111328125,
0.050994873046875,
0.054290771484375,
0.05133056640625,
0.01511383056640625,
-0.03448486328125,
0.04595947265625,
-0.06103515625,
0.0021648406982421875,
-0.037384033203125,
0.0173797607421875,
0.0758056640625,
-0.025421142578125,
0.0245513916015625,
0.005039215087890625,
-0.0263671875,
-0.0219879150390625,
0.049957275390625,
-0.0080718994140625,
0.00788116455078125,
-0.022735595703125,
0.01180267333984375,
0.0106658935546875,
-0.0033206939697265625,
-0.0202178955078125,
-0.01010894775390625,
-0.0010538101196289062,
0.06134033203125,
0.0193328857421875,
0.053558349609375,
-0.0350341796875,
0.02606201171875,
0.0059661865234375,
0.0582275390625,
-0.0160369873046875,
0.044647216796875,
0.013946533203125,
-0.051025390625,
0.019195556640625,
-0.006992340087890625,
-0.06414794921875,
0.0004355907440185547,
-0.0088653564453125,
0.044189453125,
-0.022857666015625,
-0.00858306884765625,
-0.03594970703125,
-0.05047607421875,
0.003459930419921875,
0.033050537109375,
0.03375244140625,
0.026275634765625,
0.048553466796875,
-0.0098114013671875,
-0.027984619140625,
0.022918701171875,
-0.00952911376953125,
-0.0295257568359375,
0.015533447265625,
-0.051910400390625,
0.048980712890625,
-0.0306243896484375,
0.036651611328125,
0.05706787109375,
-0.0129547119140625,
0.0111541748046875,
0.0205841064453125,
-0.04144287109375,
0.0087432861328125,
0.01462554931640625,
-0.0090179443359375,
0.023895263671875,
-0.10308837890625,
0.00078582763671875,
0.0032329559326171875,
0.0307769775390625,
-0.01334381103515625,
-0.0328369140625,
-0.018463134765625,
0.002704620361328125,
-0.08843994140625,
-0.080322265625,
-0.00969696044921875,
-0.05877685546875,
-0.009765625,
0.006748199462890625,
-0.0285491943359375,
0.0082244873046875,
0.0127716064453125,
-0.00719451904296875,
0.05364990234375,
-0.03662109375,
-0.1112060546875,
-0.0511474609375,
-0.118896484375,
-0.01506805419921875,
-0.0137786865234375,
0.0111236572265625,
0.0010061264038085938,
-0.04638671875,
-0.0163421630859375,
-0.033355712890625,
0.0162200927734375,
0.052032470703125,
0.00919342041015625,
-0.0526123046875,
-0.0360107421875,
0.011322021484375,
-0.0228424072265625,
-0.0026302337646484375,
-0.00046825408935546875,
0.019683837890625,
-0.009185791015625,
0.018463134765625,
0.0031299591064453125,
-0.031219482421875,
0.033050537109375,
0.01393890380859375,
-0.0099334716796875,
-0.022125244140625,
0.03558349609375,
-0.05975341796875,
-0.0357666015625,
-0.01029205322265625,
-0.050048828125,
0.00783538818359375,
0.026885986328125,
0.00817108154296875,
0.006763458251953125,
0.01088714599609375,
0.026947021484375,
0.0158843994140625,
0.044769287109375,
-0.014251708984375,
0.0300750732421875,
-0.0036449432373046875,
0.004444122314453125,
-0.0517578125,
0.0751953125,
0.004405975341796875,
-0.0102081298828125,
0.0244598388671875,
0.000568389892578125,
0.003063201904296875,
-0.0269622802734375,
-0.018829345703125,
-0.03790283203125,
0.056243896484375,
-0.06549072265625,
-0.00653839111328125,
-0.06536865234375,
-0.016143798828125,
-0.0257415771484375,
0.07696533203125,
0.0007171630859375,
-0.006664276123046875,
0.000522613525390625,
0.007671356201171875,
-0.043609619140625,
-0.04852294921875,
-0.049285888671875,
0.0110015869140625,
-0.08721923828125,
0.005893707275390625,
-0.032623291015625,
-0.0247955322265625,
0.01554107666015625,
-0.035003662109375,
-0.0103302001953125,
-0.04498291015625,
0.020477294921875,
0.028228759765625,
-0.0303802490234375,
-0.0179901123046875,
-0.031890869140625,
-0.0135040283203125,
-0.00574493408203125,
0.00197601318359375,
-0.0042877197265625,
-0.03253173828125,
0.045166015625,
0.01029205322265625,
-0.0116119384765625,
-0.01546478271484375,
0.0106964111328125,
0.05413818359375,
0.00493621826171875,
-0.0248565673828125,
0.0151214599609375,
0.010894775390625,
-0.006259918212890625,
-0.0138092041015625,
-0.01253509521484375,
-0.0297698974609375,
0.00823974609375,
-0.00908660888671875,
-0.06280517578125,
0.00478363037109375,
0.0015735626220703125,
0.054443359375,
0.03570556640625,
-0.0294189453125,
0.0012769699096679688,
0.0124664306640625,
-0.0007500648498535156,
0.0171356201171875,
-0.0185546875,
0.005252838134765625,
0.007488250732421875,
-0.0216827392578125,
0.0345458984375,
0.0012493133544921875,
-0.018280029296875,
-0.00019311904907226562,
0.0283050537109375,
0.01708984375,
-0.028228759765625,
0.009429931640625,
0.01535797119140625,
0.028564453125,
0.0177764892578125,
0.040924072265625,
0.036285400390625,
-0.02899169921875,
0.048370361328125,
0.014739990234375,
0.0173187255859375,
-0.0054473876953125,
-0.01342010498046875,
0.035736083984375,
0.007232666015625,
-0.003612518310546875,
0.041961669921875,
-0.0105743408203125,
0.00856781005859375,
-0.01363372802734375,
0.0015459060668945312,
-0.0251312255859375,
0.00897216796875,
-0.016387939453125,
0.04327392578125,
-0.0089263916015625,
-0.034454345703125,
0.002315521240234375,
0.000988006591796875,
0.025115966796875,
0.01171875,
-0.003437042236328125,
0.0171661376953125,
0.0240631103515625,
-0.0160980224609375,
0.00981903076171875,
-0.00640869140625,
0.018890380859375,
0.0290374755859375,
-0.030364990234375,
-0.02923583984375,
-0.004337310791015625,
-0.00434112548828125,
0.0294952392578125,
0.00942230224609375,
-0.0283966064453125,
0.01415252685546875,
-0.005619049072265625,
0.004863739013671875,
0.0019464492797851562,
-0.004184722900390625,
0.0304412841796875,
0.0382080078125,
-0.03167724609375,
-0.0160064697265625,
-0.004543304443359375,
-0.0054779052734375,
-0.04345703125,
0.056732177734375,
0.00798797607421875,
0.0259552001953125,
0.0175628662109375,
0.10028076171875,
-0.005664825439453125,
0.068115234375,
-0.01763916015625,
-0.0028247833251953125,
0.0157928466796875,
0.035430908203125,
-0.002841949462890625,
-0.02789306640625,
0.0199737548828125,
0.0097808837890625,
0.055450439453125,
-0.0220489501953125,
0.018798828125,
0.030487060546875,
0.038543701171875,
0.007659912109375,
-0.0164337158203125,
-0.0088043212890625,
-0.0297698974609375,
-0.02618408203125,
0.05279541015625,
0.002407073974609375,
-0.0460205078125,
-0.036529541015625,
-0.006626129150390625,
0.0266876220703125,
-0.01439666748046875,
-0.004177093505859375,
0.01287841796875,
0.0219879150390625,
0.0197906494140625,
0.03021240234375,
-0.0400390625,
0.01239013671875,
0.0168609619140625,
0.0156402587890625,
-0.0209503173828125,
0.0019292831420898438,
-0.00768280029296875,
-0.0026397705078125,
-0.03173828125,
-0.01080322265625,
0.042236328125,
-0.02642822265625,
0.04290771484375,
-0.033355712890625,
-0.0065155029296875,
-0.0221405029296875,
0.0026950836181640625,
0.041534423828125,
0.0362548828125,
-0.047027587890625,
0.0185546875,
-0.045166015625,
0.0126190185546875,
0.00997161865234375,
-0.0033817291259765625,
-0.0233154296875,
-0.0263671875,
0.002948760986328125,
0.0134735107421875,
0.02294921875,
0.0506591796875,
0.035186767578125,
0.030487060546875,
-0.042266845703125,
0.043853759765625,
-0.01355743408203125,
0.08056640625,
-0.0007967948913574219,
0.0254669189453125,
0.0134735107421875,
0.031890869140625,
-0.023590087890625,
-0.021392822265625,
0.016265869140625,
-0.038543701171875,
-0.03472900390625,
-0.037384033203125,
0.03533935546875,
0.02850341796875,
0.027923583984375,
0.003711700439453125,
-0.04290771484375,
0.01358795166015625,
0.010528564453125,
-0.035125732421875,
-0.008453369140625,
-0.00263214111328125,
-0.0131988525390625,
-0.050201416015625,
0.02117919921875,
0.031158447265625,
-0.0209503173828125,
-0.03131103515625,
-0.01861572265625,
0.0281524658203125,
-0.0132293701171875,
0.01407623291015625,
-0.06573486328125,
0.048004150390625,
0.087158203125,
0.051361083984375,
0.061065673828125,
0.005809783935546875,
0.0174102783203125,
-0.006122589111328125,
0.019317626953125,
-0.03619384765625,
-0.0117034912109375,
0.020751953125,
0.0127716064453125,
-0.0002739429473876953,
0.040130615234375,
-0.000946044921875,
0.0250091552734375,
0.01476287841796875,
0.074951171875,
-0.034881591796875,
0.0075836181640625,
0.0249481201171875,
-0.006359100341796875,
0.04986572265625,
0.041595458984375,
-0.00969696044921875,
0.0017366409301757812,
-0.0087127685546875,
-0.054290771484375,
-0.01178741455078125,
0.00406646728515625,
0.007266998291015625,
-0.0188446044921875,
-0.035003662109375,
0.0197296142578125,
0.0008893013000488281,
0.01329803466796875,
-0.0204315185546875,
-0.0082855224609375,
-0.019287109375,
-0.033538818359375,
0.0171356201171875,
-0.0221099853515625,
-0.0159912109375,
-0.025665283203125,
0.0072784423828125,
0.00827789306640625,
-0.001979827880859375,
0.0010099411010742188,
-0.00823211669921875,
-0.0179443359375,
0.03369140625,
-0.0300445556640625,
0.03131103515625,
0.0031566619873046875,
-0.0290679931640625,
0.077392578125,
0.0004220008850097656,
0.029022216796875,
-0.030517578125,
0.01355743408203125,
-0.00457000732421875,
0.007061004638671875,
-0.0382080078125,
-0.025604248046875,
-0.054351806640625,
0.1278076171875,
-0.041412353515625,
-0.00919342041015625,
0.0211029052734375,
0.03436279296875,
-0.0250091552734375,
-0.0276641845703125,
0.039459228515625,
-0.04364013671875,
0.001983642578125,
-0.00820159912109375,
0.010345458984375,
-0.01593017578125,
-0.039642333984375,
-0.043792724609375,
0.08160400390625,
-0.014312744140625,
0.04949951171875,
0.05694580078125,
0.005550384521484375,
-0.03076171875,
-0.007205963134765625,
-0.031890869140625,
0.06622314453125,
0.03143310546875,
0.007293701171875,
-0.0439453125,
-0.011749267578125,
-0.004150390625,
0.039794921875,
0.06243896484375,
0.0145721435546875,
-0.051055908203125,
-0.01328277587890625,
0.06280517578125,
0.039764404296875,
0.0008678436279296875,
0.047210693359375,
-0.0025615692138671875,
0.07861328125,
0.0682373046875,
-0.05963134765625,
0.018768310546875,
0.006908416748046875,
-0.0241851806640625,
0.0203399658203125,
0.0124664306640625,
0.0176239013671875,
0.0338134765625,
-0.03082275390625,
-0.021697998046875,
0.00726318359375,
0.03485107421875,
-0.052886962890625,
-0.01238250732421875,
0.0474853515625,
0.0170745849609375,
-0.0283355712890625,
-0.01221466064453125,
-0.0272369384765625,
0.040740966796875,
-0.0090179443359375,
-0.0091552734375,
0.013458251953125,
0.020904541015625,
0.0305023193359375,
-0.0340576171875,
-0.00966644287109375,
0.0139312744140625,
-0.003826141357421875,
0.06890869140625,
0.06072998046875,
0.03302001953125,
-0.0186767578125,
-0.0111083984375,
0.04150390625,
0.07666015625,
-0.050445556640625,
-0.032257080078125,
0.0021381378173828125,
-0.0265655517578125,
0.01153564453125,
-0.0055694580078125,
0.020721435546875,
0.0343017578125,
0.002346038818359375,
0.005237579345703125,
-0.01548004150390625,
0.0201568603515625,
0.039764404296875,
-0.0002694129943847656,
-0.053009033203125,
-0.008087158203125,
-0.006443023681640625,
-0.0254669189453125,
0.00844573974609375,
-0.01263427734375,
0.0278778076171875,
0.01290130615234375,
0.036529541015625,
-0.045379638671875,
-0.0160675048828125,
-0.0080718994140625,
0.04278564453125,
-0.01280975341796875,
-0.0034961700439453125,
-0.01172637939453125,
-0.0340576171875,
-0.039306640625,
0.0258026123046875,
0.0367431640625,
0.02978515625,
0.01357269287109375,
-0.018402099609375,
0.0171356201171875,
0.0250701904296875,
0.01275634765625,
-0.010894775390625,
0.055023193359375,
-0.052947998046875,
0.031005859375,
-0.0100860595703125,
-0.0203399658203125,
0.01206207275390625,
-0.0186309814453125,
0.0299530029296875,
-0.0279388427734375,
0.024749755859375,
-0.01074981689453125,
0.027801513671875,
0.04046630859375,
-0.00812530517578125,
-0.0226898193359375,
-0.01288604736328125,
-0.023956298828125,
0.0032062530517578125,
-0.030120849609375,
-0.03277587890625,
0.0181427001953125,
0.048370361328125,
0.035064697265625,
-0.02618408203125,
-0.02093505859375,
-0.0013360977172851562,
0.02911376953125,
-0.0283355712890625,
-0.026397705078125,
0.0304718017578125,
0.03192138671875,
-0.0169219970703125,
-0.059051513671875,
-0.044708251953125,
-0.005176544189453125,
0.0160980224609375,
0.0252227783203125,
0.08343505859375,
-0.01110076904296875,
0.0018548965454101562,
-0.01160430908203125,
-0.0126953125,
-0.00884246826171875,
-0.00693511962890625,
-0.049346923828125,
-0.034271240234375,
0.013824462890625,
0.01540374755859375,
-0.0310821533203125,
0.0069732666015625,
0.03436279296875,
-0.038787841796875,
0.033050537109375,
-0.04010009765625,
0.0146026611328125,
-0.0625,
0.0160980224609375,
-0.03765869140625,
-0.059539794921875,
-0.045166015625,
-0.01244354248046875,
0.0218048095703125,
0.03863525390625,
-0.023590087890625,
0.0299835205078125,
-0.0008287429809570312,
-0.0305023193359375,
0.0265960693359375,
-0.03363037109375,
0.053466796875,
0.03765869140625,
-0.005672454833984375,
0.0008988380432128906,
0.039093017578125,
-0.0079345703125,
0.03460693359375,
0.00860595703125,
0.04254150390625,
0.0312347412109375,
-0.01126861572265625,
0.007198333740234375,
-0.0124969482421875,
0.032196044921875,
-0.0098419189453125,
0.01404571533203125,
0.013092041015625,
0.0189056396484375,
-0.0244140625,
-0.05926513671875,
0.00444793701171875,
-0.0102691650390625,
-0.0338134765625,
0.01352691650390625,
-0.0135498046875,
-0.031463623046875,
0.041534423828125,
-0.021026611328125,
0.0179290771484375,
0.007061004638671875,
-0.03790283203125,
0.0007266998291015625,
-0.00598907470703125,
0.033599853515625,
-0.035858154296875,
0.0230712890625,
0.0026264190673828125,
0.0111083984375,
-0.038848876953125,
0.005218505859375,
-0.00858306884765625,
0.0160675048828125,
0.004261016845703125,
0.03704833984375,
0.06256103515625,
-0.0231781005859375,
-0.03082275390625,
0.01104736328125,
-0.022247314453125,
0.061798095703125,
-0.0380859375,
-0.0239410400390625,
-0.0035305023193359375,
0.03021240234375,
-0.03302001953125,
-0.07012939453125,
0.004924774169921875,
-0.03887939453125,
0.005733489990234375,
-0.022308349609375,
-0.024322509765625,
-0.01117706298828125,
-0.039581298828125,
-0.0275726318359375,
0.05767822265625,
0.0009489059448242188,
-0.01641845703125,
-0.018463134765625,
-0.02276611328125,
0.0043487548828125,
0.0496826171875,
0.00959014892578125,
-0.0252532958984375,
-0.0521240234375,
0.008087158203125,
0.035797119140625,
0.054595947265625,
-0.003002166748046875,
0.03179931640625,
-0.0302581787109375,
0.04107666015625,
0.01078033447265625,
0.033782958984375,
0.034393310546875,
-0.03369140625,
0.038543701171875,
0.047698974609375,
-0.03704833984375,
0.013671875,
-0.013580322265625,
-0.005550384521484375,
-0.007366180419921875,
-0.08062744140625,
-0.0130615234375,
-0.0208740234375,
0.0733642578125,
-0.003093719482421875,
0.0114593505859375,
-0.0277557373046875,
-0.05255126953125,
-0.0191650390625,
-0.04559326171875,
-0.035614013671875,
0.045989990234375,
-0.08697509765625,
0.005596160888671875,
-0.02838134765625,
-0.01270294189453125,
-0.0184173583984375,
-0.025634765625,
-0.0382080078125,
0.00838470458984375,
-0.001483917236328125,
0.0041351318359375,
0.00899505615234375,
-0.017059326171875,
0.060791015625,
-0.04107666015625,
-0.01381683349609375,
-0.004428863525390625,
0.02813720703125,
0.00585174560546875,
-0.031280517578125,
-0.020111083984375,
0.04083251953125,
0.0079803466796875,
-0.005462646484375,
0.047821044921875,
0.0287017822265625,
0.027313232421875,
0.00406646728515625,
-0.017608642578125,
0.0243988037109375,
0.0026416778564453125,
0.004192352294921875,
-0.00356292724609375,
0.0447998046875,
0.00775146484375,
0.08392333984375,
-0.007358551025390625,
0.041534423828125,
0.0017004013061523438,
0.0313720703125,
-0.043243408203125,
0.006320953369140625,
0.005458831787109375,
-0.053741455078125,
-0.016815185546875,
0.0163726806640625,
-0.02032470703125,
-0.05029296875,
0.00681304931640625,
-0.043365478515625,
0.036895751953125,
0.01303863525390625
]
|
1a4fff5dbc178e7398357d2ec95423d6a0648fd3 | Wordpress Stackexchange
Q: Get Content From Blog Page I have a page that is assigned as the "Blog". What I'd like to allow is the user to add content to this page then display it before the posts show up on index.php. I thought I used to be able to do it using this method:
<?php
$blog = get_option('page_for_posts');
echo apply_filters('the_content', get_the_content($blog));
?>
For some reason it is deciding to pull the first post instead of actually pulling the page content. Is this a bug or is there another method to pull the blog page content?
A: With the new WP editor that uses blocks the second code block in the accepted answer won't render the blocks. To get them to render use the following.
$page_for_posts_id = get_option( 'page_for_posts' );
echo apply_filters( 'the_content', get_post_field( 'post_content', $page_for_posts_id ) );
The first code-block in the accepted answer will still work.
| Q: Get Content From Blog Page I have a page that is assigned as the "Blog". What I'd like to allow is the user to add content to this page then display it before the posts show up on index.php. I thought I used to be able to do it using this method:
<?php
$blog = get_option('page_for_posts');
echo apply_filters('the_content', get_the_content($blog));
?>
For some reason it is deciding to pull the first post instead of actually pulling the page content. Is this a bug or is there another method to pull the blog page content?
A: With the new WP editor that uses blocks the second code block in the accepted answer won't render the blocks. To get them to render use the following.
$page_for_posts_id = get_option( 'page_for_posts' );
echo apply_filters( 'the_content', get_post_field( 'post_content', $page_for_posts_id ) );
The first code-block in the accepted answer will still work.
A: You are using get_the_content() wrong, it can't take a ID, which is what get_option('page_for_posts') does return, and generally gets the content of the current post inside the loop, in which it has to be used.
To get the actual content of that page you can do:
$page_for_posts_id = get_option( 'page_for_posts' );
$page_for_posts_obj = get_post( $page_for_posts_id );
echo apply_filters( 'the_content', $page_for_posts_obj->post_content );
Or:
$page_for_posts_id = get_option('page_for_posts');
echo get_post_field( 'post_content', $page_for_posts_id );
| wordpress | {
"language": "en",
"length": 217,
"provenance": "stackexchange_00019.jsonl.gz:449352",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163250"
} | [
0.0306243896484375,
-0.036834716796875,
0.037261962890625,
0.03466796875,
-0.016998291015625,
-0.038055419921875,
0.0550537109375,
-0.055389404296875,
-0.0117950439453125,
-0.012054443359375,
-0.06494140625,
0.01776123046875,
-0.0631103515625,
-0.0048675537109375,
0.0160369873046875,
-0.073974609375,
0.034332275390625,
-0.0380859375,
0.0271759033203125,
-0.0071258544921875,
-0.0010137557983398438,
0.00489044189453125,
0.057464599609375,
0.0248870849609375,
0.04803466796875,
-0.0257568359375,
0.051788330078125,
0.0098419189453125,
0.042694091796875,
0.00925445556640625,
0.033294677734375,
-0.057159423828125,
0.0254364013671875,
0.0251007080078125,
-0.051055908203125,
0.004604339599609375,
-0.01557159423828125,
0.00905609130859375,
-0.0170440673828125,
0.039276123046875,
-0.002094268798828125,
0.01261138916015625,
-0.006404876708984375,
0.034454345703125,
-0.0125274658203125,
-0.05029296875,
-0.01038360595703125,
-0.06884765625,
0.00933837890625,
0.0150909423828125,
0.0141143798828125,
0.0167236328125,
0.0188751220703125,
0.0082550048828125,
-0.00959014892578125,
-0.016845703125,
-0.004039764404296875,
0.010986328125,
0.04193115234375,
-0.0238494873046875,
-0.03961181640625,
-0.0074462890625,
0.0268707275390625,
-0.01099395751953125,
0.002044677734375,
0.006343841552734375,
0.024139404296875,
0.0216827392578125,
-0.07843017578125,
-0.0189056396484375,
0.034423828125,
-0.053955078125,
-0.0172576904296875,
-0.03515625,
-0.01218414306640625,
0.03204345703125,
-0.0029010772705078125,
-0.0174102783203125,
-0.004650115966796875,
0.01293182373046875,
-0.024078369140625,
0.00543212890625,
-0.016693115234375,
-0.049835205078125,
0.0236053466796875,
-0.0226593017578125,
-0.016571044921875,
0.0015935897827148438,
-0.02581787109375,
-0.027801513671875,
-0.017852783203125,
0.006256103515625,
-0.03778076171875,
-0.0303802490234375,
-0.024261474609375,
-0.0286102294921875,
0.020538330078125,
0.055572509765625,
-0.0192413330078125,
0.00630950927734375,
-0.01543426513671875,
-0.039520263671875,
0.03204345703125,
-0.051544189453125,
-0.006130218505859375,
-0.01157379150390625,
-0.014739990234375,
0.00983428955078125,
0.054290771484375,
0.046295166015625,
-0.0074615478515625,
0.033721923828125,
-0.00750732421875,
-0.031219482421875,
-0.01454925537109375,
0.0218505859375,
-0.017425537109375,
-0.033477783203125,
0.007228851318359375,
-0.0350341796875,
0.035552978515625,
0.0469970703125,
-0.016387939453125,
-0.017730712890625,
0.00986480712890625,
0.00914764404296875,
-0.0222015380859375,
-0.0277557373046875,
0.00824737548828125,
0.0015821456909179688,
-0.0252685546875,
0.0189666748046875,
0.034942626953125,
0.0194244384765625,
0.00826263427734375,
-0.025604248046875,
-0.0104827880859375,
-0.01233673095703125,
0.003570556640625,
-0.01032257080078125,
0.012359619140625,
-0.0232086181640625,
-0.006439208984375,
-0.00585174560546875,
0.006694793701171875,
0.02435302734375,
0.0097808837890625,
0.0189666748046875,
-0.004718780517578125,
-0.050262451171875,
0.033294677734375,
0.0013761520385742188,
0.0323486328125,
0.0017633438110351562,
0.03594970703125,
-0.061065673828125,
0.062347412109375,
-0.0584716796875,
0.01043701171875,
-0.04425048828125,
0.06500244140625,
0.01091766357421875,
-0.01119232177734375,
0.02069091796875,
-0.0258331298828125,
-0.032135009765625,
-0.034576416015625,
-0.018035888671875,
0.0291595458984375,
0.0027790069580078125,
0.03399658203125,
-0.0275726318359375,
0.00012290477752685547,
0.032958984375,
0.00713348388671875,
0.037445068359375,
0.022247314453125,
0.01284027099609375,
-0.015472412109375,
0.05743408203125,
-0.0015249252319335938,
-0.03131103515625,
0.0229339599609375,
-0.02362060546875,
-0.045196533203125,
0.0223388671875,
0.016387939453125,
0.02630615234375,
-0.0081787109375,
0.009918212890625,
0.045745849609375,
0.0297393798828125,
-0.05279541015625,
0.030364990234375,
0.0082855224609375,
-0.03350830078125,
-0.003475189208984375,
-0.006317138671875,
-0.00688934326171875,
-0.01555633544921875,
0.024261474609375,
-0.0214080810546875,
0.02337646484375,
0.003963470458984375,
0.00217437744140625,
-0.0207977294921875,
-0.0036029815673828125,
0.006755828857421875,
0.0288848876953125,
0.00383758544921875,
0.0032634735107421875,
-0.0007295608520507812,
0.000316619873046875,
-0.04327392578125,
-0.041015625,
0.044830322265625,
-0.030517578125,
0.004810333251953125,
-0.004146575927734375,
0.03021240234375,
0.00975799560546875,
-0.01885986328125,
-0.0239715576171875,
-0.00738525390625,
0.0872802734375,
-0.023468017578125,
-0.00968170166015625,
-0.045654296875,
0.0133056640625,
0.0193023681640625,
-0.10479736328125,
0.035736083984375,
0.01507568359375,
0.024383544921875,
-0.037200927734375,
-0.0123138427734375,
-0.003570556640625,
-0.0350341796875,
0.02166748046875,
0.0406494140625,
0.03277587890625,
0.037200927734375,
-0.00460052490234375,
0.0005950927734375,
0.060821533203125,
-0.03472900390625,
0.007022857666015625,
-0.0089874267578125,
0.049072265625,
0.08892822265625,
-0.00513458251953125,
0.005733489990234375,
0.0002932548522949219,
-0.023773193359375,
0.03680419921875,
0.0250701904296875,
0.00739288330078125,
0.027374267578125,
-0.04449462890625,
0.02557373046875,
-0.007518768310546875,
-0.025543212890625,
-0.0152130126953125,
-0.031829833984375,
0.04266357421875,
0.04345703125,
0.039794921875,
0.042266845703125,
-0.053497314453125,
0.0260772705078125,
0.01019287109375,
0.03271484375,
-0.0008406639099121094,
0.037445068359375,
0.0186309814453125,
-0.0034656524658203125,
-0.00774383544921875,
-0.01947021484375,
-0.0159912109375,
0.0174407958984375,
-0.003917694091796875,
0.02294921875,
0.01070404052734375,
-0.006591796875,
0.0225677490234375,
-0.02679443359375,
-0.00337982177734375,
-0.006603240966796875,
-0.01300048828125,
0.0014400482177734375,
0.0200042724609375,
-0.0020275115966796875,
-0.0428466796875,
0.0306549072265625,
-0.025848388671875,
-0.0206298828125,
0.0218963623046875,
-0.06732177734375,
0.054229736328125,
-0.050506591796875,
0.0384521484375,
0.06500244140625,
-0.0089569091796875,
0.00931549072265625,
0.021240234375,
-0.034759521484375,
0.0238037109375,
0.0128936767578125,
0.0043792724609375,
0.0072784423828125,
-0.04095458984375,
0.033935546875,
0.0270538330078125,
0.046966552734375,
-0.0020599365234375,
-0.028900146484375,
-0.004650115966796875,
0.026763916015625,
-0.07586669921875,
-0.03936767578125,
0.0101318359375,
-0.07794189453125,
-0.0237579345703125,
-0.022796630859375,
-0.042755126953125,
0.0035877227783203125,
-0.004917144775390625,
-0.0063934326171875,
0.0036773681640625,
-0.0138092041015625,
-0.1009521484375,
-0.0374755859375,
-0.0982666015625,
0.06500244140625,
-0.02728271484375,
0.03497314453125,
0.00821685791015625,
0.043701171875,
-0.0079193115234375,
-0.09088134765625,
-0.020355224609375,
0.00946807861328125,
-0.0275726318359375,
0.0031948089599609375,
-0.0057525634765625,
-0.0265350341796875,
-0.0289306640625,
0.00376129150390625,
0.003993988037109375,
-0.01470184326171875,
0.0207672119140625,
-0.00225067138671875,
-0.057098388671875,
0.00691986083984375,
0.0010833740234375,
0.0214996337890625,
0.053558349609375,
0.0155029296875,
0.02520751953125,
-0.0268707275390625,
0.007450103759765625,
-0.01015472412109375,
-0.028900146484375,
-0.00746917724609375,
0.035797119140625,
-0.01605224609375,
-0.0235595703125,
0.00787353515625,
-0.0274505615234375,
-0.01947021484375,
0.03485107421875,
-0.0223541259765625,
0.0201263427734375,
-0.01439666748046875,
-0.026702880859375,
-0.004871368408203125,
0.0235595703125,
-0.004131317138671875,
0.01293182373046875,
0.0003180503845214844,
0.029052734375,
-0.006443023681640625,
0.014190673828125,
-0.052215576171875,
-0.027130126953125,
0.039337158203125,
-0.01425933837890625,
0.03228759765625,
-0.040283203125,
-0.021484375,
-0.0052490234375,
0.08306884765625,
-0.02532958984375,
-0.0169830322265625,
-0.0243682861328125,
0.0214080810546875,
-0.04327392578125,
-0.0411376953125,
-0.01458740234375,
-0.00865936279296875,
-0.056854248046875,
-0.0102386474609375,
-0.01654052734375,
-0.02679443359375,
-0.00785064697265625,
0.01076507568359375,
-0.01453399658203125,
-0.0167083740234375,
0.0419921875,
-0.00933837890625,
0.009124755859375,
0.03228759765625,
-0.0135498046875,
0.00897216796875,
-0.03216552734375,
0.0040283203125,
-0.040985107421875,
-0.00872039794921875,
0.055084228515625,
-0.0167083740234375,
-0.0285797119140625,
-0.0223846435546875,
0.0010051727294921875,
0.03887939453125,
0.01511383056640625,
0.0210418701171875,
0.00916290283203125,
0.006206512451171875,
0.00505828857421875,
-0.0482177734375,
-0.0015106201171875,
-0.04833984375,
-0.01450347900390625,
-0.031768798828125,
0.0287628173828125,
0.058074951171875,
-0.051483154296875,
0.0193939208984375,
-0.06903076171875,
0.016937255859375,
-0.046417236328125,
-0.0188751220703125,
-0.0016469955444335938,
0.005321502685546875,
-0.0178985595703125,
0.0124359130859375,
-0.0138702392578125,
-0.037384033203125,
0.04107666015625,
-0.000408172607421875,
-0.003826141357421875,
-0.00203704833984375,
0.08111572265625,
0.01421356201171875,
-0.01904296875,
-0.019287109375,
0.0210113525390625,
0.033416748046875,
-0.03240966796875,
0.10723876953125,
0.05755615234375,
-0.01485443115234375,
0.0770263671875,
0.005977630615234375,
0.024139404296875,
-0.031585693359375,
0.05987548828125,
0.000675201416015625,
0.0034580230712890625,
0.0202789306640625,
0.005886077880859375,
0.008697509765625,
0.019439697265625,
-0.040069580078125,
0.0182647705078125,
0.01560211181640625,
0.01381683349609375,
-0.034759521484375,
0.034576416015625,
-0.0161895751953125,
-0.0185089111328125,
-0.0023040771484375,
0.01276397705078125,
0.02587890625,
0.0269622802734375,
0.002185821533203125,
0.01512908935546875,
0.032440185546875,
0.004886627197265625,
0.030853271484375,
-0.01971435546875,
0.0034046173095703125,
0.034332275390625,
-0.021942138671875,
-0.01465606689453125,
0.0274200439453125,
-0.006927490234375,
0.020233154296875,
-0.02142333984375,
-0.051971435546875,
-0.00894927978515625,
-0.006031036376953125,
0.04156494140625,
0.05615234375,
-0.0015325546264648438,
0.0170135498046875,
0.00670623779296875,
0.00769805908203125,
-0.002353668212890625,
-0.00492095947265625,
-0.014617919921875,
-0.0250091552734375,
0.005359649658203125,
-0.0123443603515625,
0.00943756103515625,
0.0227813720703125,
0.047210693359375,
-0.05047607421875,
0.057281494140625,
-0.018951416015625,
0.041107177734375,
0.0426025390625,
0.01360321044921875,
0.01334381103515625,
0.01088714599609375,
-0.01019287109375,
-0.01007843017578125,
-0.005420684814453125,
-0.0200653076171875,
-0.0010576248168945312,
-0.002422332763671875,
0.027130126953125,
-0.017303466796875,
-0.02410888671875,
0.04107666015625,
-0.0263671875,
-0.01053619384765625,
0.0217742919921875,
0.016387939453125,
-0.01446533203125,
-0.00975799560546875,
0.0010013580322265625,
0.009368896484375,
0.017333984375,
-0.004791259765625,
0.0526123046875,
0.01129150390625,
0.042266845703125,
0.0167388916015625,
0.0012159347534179688,
-0.01910400390625,
-0.01371002197265625,
0.00887298583984375,
-0.0399169921875,
-0.016876220703125,
-0.01444244384765625,
0.02337646484375,
-0.0272064208984375,
-0.0081787109375,
0.06829833984375,
-0.01033782958984375,
0.04852294921875,
-0.040008544921875,
-0.017120361328125,
-0.06427001953125,
0.0138092041015625,
0.018707275390625,
0.026611328125,
-0.050262451171875,
0.01995849609375,
-0.06585693359375,
0.0002522468566894531,
-0.050445556640625,
-0.069580078125,
-0.04168701171875,
-0.0123291015625,
0.015869140625,
0.016876220703125,
-0.0025634765625,
-0.0297088623046875,
-0.01337432861328125,
0.00911712646484375,
0.01189422607421875,
0.03167724609375,
-0.0012454986572265625,
0.048583984375,
0.02154541015625,
0.0513916015625,
0.031768798828125,
0.03948974609375,
-0.023468017578125,
-0.04327392578125,
0.004009246826171875,
-0.0770263671875,
-0.0113677978515625,
0.02130126953125,
-0.0254058837890625,
0.01641845703125,
-0.003292083740234375,
0.0101165771484375,
0.014495849609375,
-0.0169677734375,
0.00620269775390625,
-0.013763427734375,
-0.015655517578125,
-0.0086822509765625,
-0.0421142578125,
0.030426025390625,
-0.0137481689453125,
0.00910186767578125,
0.0011701583862304688,
0.01007080078125,
-0.004673004150390625,
-0.00885009765625,
-0.01263427734375,
-0.0015392303466796875,
-0.019134521484375,
0.034515380859375,
0.08673095703125,
0.0264129638671875,
0.06640625,
0.0276031494140625,
0.021453857421875,
0.036468505859375,
0.021728515625,
-0.044281005859375,
-0.0264739990234375,
0.012969970703125,
0.007740020751953125,
-0.0020732879638671875,
0.00982666015625,
-0.010101318359375,
0.032989501953125,
0.06463623046875,
0.08013916015625,
-0.07806396484375,
0.005168914794921875,
0.0204925537109375,
-0.0305633544921875,
0.03668212890625,
0.0079498291015625,
-0.0240325927734375,
-0.0175933837890625,
0.046844482421875,
-0.0178375244140625,
-0.01023101806640625,
0.0312347412109375,
0.01058197021484375,
-0.0196380615234375,
-0.0263824462890625,
0.0245361328125,
0.02850341796875,
-0.0139007568359375,
0.045318603515625,
0.004703521728515625,
0.042327880859375,
-0.0116729736328125,
0.0303497314453125,
-0.01568603515625,
0.01319122314453125,
-0.0165863037109375,
0.0180206298828125,
-0.0179595947265625,
-0.005886077880859375,
-0.01422119140625,
-0.0174102783203125,
-0.04486083984375,
0.0494384765625,
-0.04559326171875,
0.010650634765625,
0.041259765625,
-0.064453125,
-0.01416015625,
-0.0157623291015625,
0.0236358642578125,
0.00618743896484375,
-0.0232696533203125,
0.0269012451171875,
0.00028705596923828125,
-0.042236328125,
-0.00959014892578125,
-0.04345703125,
0.058990478515625,
-0.0316162109375,
-0.007457733154296875,
0.039764404296875,
-0.01947021484375,
-0.035064697265625,
-0.005344390869140625,
0.0165557861328125,
-0.010498046875,
0.038665771484375,
-0.004535675048828125,
0.042236328125,
-0.0006146430969238281,
0.0095367431640625,
-0.07989501953125,
0.0679931640625,
-0.013580322265625,
0.048614501953125,
0.00594329833984375,
0.019134521484375,
-0.0195770263671875,
-0.0169219970703125,
-0.06219482421875,
0.07696533203125,
0.0283966064453125,
0.07196044921875,
-0.10302734375,
-0.0294036865234375,
0.0016765594482421875,
0.0662841796875,
0.03424072265625,
0.005954742431640625,
-0.03369140625,
-0.0548095703125,
-0.00955963134765625,
0.053375244140625,
0.01015472412109375,
0.0240936279296875,
0.00217437744140625,
0.03118896484375,
0.0208892822265625,
-0.059722900390625,
0.0136566162109375,
-0.0233001708984375,
-0.0140380859375,
0.0264892578125,
0.0045318603515625,
-0.020721435546875,
0.060455322265625,
-0.0036678314208984375,
-0.060455322265625,
0.03533935546875,
0.0377197265625,
-0.02362060546875,
0.00534820556640625,
0.060394287109375,
0.06268310546875,
-0.04180908203125,
-0.032470703125,
-0.0230712890625,
0.050750732421875,
0.0189666748046875,
0.02545166015625,
0.0243072509765625,
0.02752685546875,
0.04290771484375,
-0.01284027099609375,
0.0213165283203125,
0.0200958251953125,
-0.025482177734375,
0.06024169921875,
0.030731201171875,
0.0191802978515625,
-0.047576904296875,
0.0005888938903808594,
0.0221405029296875,
0.0556640625,
-0.045196533203125,
-0.004795074462890625,
0.01509857177734375,
0.00007295608520507812,
-0.01326751708984375,
-0.0215301513671875,
-0.00536346435546875,
-0.004322052001953125,
0.0009870529174804688,
-0.042449951171875,
-0.00356292724609375,
0.006954193115234375,
-0.004360198974609375,
-0.01551055908203125,
-0.006450653076171875,
0.0171661376953125,
0.0194244384765625,
-0.0179901123046875,
-0.00008785724639892578,
0.007137298583984375,
0.0298309326171875,
-0.0103759765625,
0.05474853515625,
-0.034454345703125,
-0.00582122802734375,
-0.0026531219482421875,
0.02947998046875,
-0.00797271728515625,
0.01087188720703125,
-0.0183868408203125,
-0.034881591796875,
0.01522064208984375,
0.0228118896484375,
0.004161834716796875,
-0.046600341796875,
0.009674072265625,
0.035614013671875,
-0.0167083740234375,
-0.033294677734375,
0.002655029296875,
-0.01073455810546875,
0.016326904296875,
-0.04302978515625,
0.00754547119140625,
0.004100799560546875,
-0.025299072265625,
0.00994873046875,
-0.0244140625,
0.052764892578125,
-0.0019817352294921875,
0.0552978515625,
-0.005157470703125,
-0.005626678466796875,
0.044952392578125,
-0.01517486572265625,
0.05816650390625,
0.009674072265625,
-0.09722900390625,
-0.006458282470703125,
-0.056060791015625,
-0.049102783203125,
0.0511474609375,
0.044830322265625,
-0.0333251953125,
0.0181884765625,
0.0029964447021484375,
-0.008636474609375,
0.00902557373046875,
-0.016815185546875,
0.018585205078125,
0.0462646484375,
0.0173187255859375,
0.021331787109375,
-0.07354736328125,
-0.053314208984375,
-0.0295562744140625,
0.047882080078125,
-0.0006933212280273438,
0.053466796875,
0.00173187255859375,
0.021881103515625,
-0.01922607421875,
0.02166748046875,
-0.0309906005859375,
-0.0035610198974609375,
-0.0036106109619140625,
0.023162841796875,
0.0160675048828125,
-0.0163421630859375,
-0.041961669921875,
0.0147857666015625,
0.042694091796875,
-0.004730224609375,
0.014373779296875,
-0.01442718505859375,
0.0135345458984375,
-0.034210205078125,
-0.012298583984375,
-0.029266357421875,
-0.01038360595703125,
-0.0136566162109375,
-0.007747650146484375,
0.034393310546875,
0.0338134765625,
0.01085662841796875,
0.01568603515625,
-0.00955963134765625,
-0.0270538330078125,
0.00946044921875,
-0.00801849365234375,
-0.013092041015625,
0.0100250244140625,
0.012359619140625,
-0.042449951171875,
0.04278564453125,
-0.007167816162109375,
0.0143280029296875,
0.02734375,
0.041290283203125,
0.027618408203125,
-0.001445770263671875,
0.03363037109375,
-0.003376007080078125,
0.05010986328125,
-0.0199737548828125,
0.0063323974609375,
0.017578125,
0.0191802978515625,
-0.00623321533203125,
-0.01248931884765625,
-0.0199432373046875,
-0.0232696533203125,
-0.0166778564453125,
0.002788543701171875,
-0.01070404052734375,
-0.06219482421875,
-0.040771484375,
-0.0085906982421875,
0.0247039794921875,
-0.006092071533203125,
-0.0537109375,
0.037078857421875,
-0.027313232421875,
0.031768798828125,
-0.039581298828125,
0.024932861328125,
-0.00249481201171875,
0.018035888671875,
-0.058746337890625,
0.0213623046875,
-0.0303192138671875,
-0.0205230712890625,
-0.004604339599609375,
0.01678466796875,
0.0262451171875,
-0.01525115966796875,
-0.003173828125,
0.040191650390625,
0.0010128021240234375,
0.08245849609375,
-0.032501220703125,
0.004451751708984375,
0.02252197265625,
-0.005107879638671875,
-0.0306243896484375,
-0.0587158203125,
0.018585205078125,
-0.04071044921875,
-0.00943756103515625,
0.03302001953125,
-0.014251708984375,
0.020263671875,
-0.0204315185546875,
-0.061370849609375,
0.035400390625,
-0.002960205078125,
-0.04022216796875,
-0.0211334228515625,
0.01525115966796875,
-0.017730712890625,
0.0034313201904296875,
0.01092529296875,
-0.020111083984375,
0.007709503173828125,
0.0186614990234375,
-0.0012845993041992188,
0.040069580078125,
0.0294036865234375,
-0.0277862548828125,
-0.027496337890625,
-0.0296173095703125,
-0.039794921875,
0.01288604736328125,
-0.00984954833984375,
-0.0157470703125,
0.0199737548828125,
0.0257110595703125,
-0.029632568359375,
-0.0160369873046875,
0.0130615234375,
0.012664794921875,
-0.0033512115478515625,
-0.058013916015625,
-0.035003662109375,
-0.0333251953125,
0.09112548828125,
0.0226593017578125,
0.03204345703125,
-0.0216522216796875,
0.00913238525390625,
-0.004703521728515625,
-0.1041259765625,
-0.021484375,
0.050933837890625,
-0.074462890625,
0.003719329833984375,
-0.01323699951171875,
-0.0267486572265625,
0.019317626953125,
-0.020355224609375,
-0.051116943359375,
-0.006610870361328125,
-0.0484619140625,
0.00536346435546875,
-0.06463623046875,
-0.0247802734375,
0.06744384765625,
-0.023895263671875,
0.01473236083984375,
-0.007965087890625,
0.02459716796875,
0.039093017578125,
0.0200347900390625,
0.020477294921875,
0.015838623046875,
-0.0244903564453125,
0.01125335693359375,
0.0233154296875,
0.0185546875,
-0.0177154541015625,
-0.03814697265625,
0.00629425048828125,
0.03839111328125,
-0.017822265625,
0.036590576171875,
0.0517578125,
0.01313018798828125,
-0.0229339599609375,
0.04705810546875,
-0.0242462158203125,
0.015167236328125,
-0.014984130859375,
0.0310211181640625,
-0.0060882568359375,
-0.011383056640625,
0.045989990234375,
-0.054046630859375,
-0.0253143310546875,
-0.00418853759765625,
-0.029541015625,
-0.0516357421875,
0.0192718505859375,
-0.00737762451171875,
-0.00020205974578857422,
0.0172271728515625
]
|
59e8bc6840cf10dcca0bbe6dd8d6d3679eef72a7 | Wordpress Stackexchange
Q: How to get current site id? (WPMU) I am using WordPress with MU activated. I found a function here that supposed to return an object with the current side ID. But it's returning 1 for all websites.
<?php get_current_site(); ?>
A: You're right, get_current_site()->blog_id will return 1, as it refers to the network.
To get the current site (blog) ID you can go like this:
<?php echo get_current_blog_id(); ?>
Moreover you can get the current site (blog) details like this:
<?php var_dump(get_blog_details()->blog_id); ?>
| Q: How to get current site id? (WPMU) I am using WordPress with MU activated. I found a function here that supposed to return an object with the current side ID. But it's returning 1 for all websites.
<?php get_current_site(); ?>
A: You're right, get_current_site()->blog_id will return 1, as it refers to the network.
To get the current site (blog) ID you can go like this:
<?php echo get_current_blog_id(); ?>
Moreover you can get the current site (blog) details like this:
<?php var_dump(get_blog_details()->blog_id); ?>
A: First of all check whether user belong from current site by using
<?php is_user_member_of_blog( $user_id, $blog_id ); ?>
After you get id of user create user role
$user = new WP_User( $user_id );
if ( $user ) {
$roles = $user->roles;
and in last create posts for every user by adding role in args. not tested but i'll do trick for you.
<?php
$args1 = array(
'role' => 'subscriber',
'orderby' => 'user_nicename',
'order' => 'ASC'
);
$subscribers = get_users($args1);
echo '<ul>';
foreach ($subscribers as $user) {
echo '<li>' . $user->display_name.'['.$user->user_email . ']</li>';
}
echo '</ul>';
?>
| wordpress | {
"language": "en",
"length": 181,
"provenance": "stackexchange_00019.jsonl.gz:449364",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163293"
} | [
0.0216064453125,
-0.0145263671875,
-0.004451751708984375,
0.0430908203125,
-0.002056121826171875,
-0.036956787109375,
0.06536865234375,
-0.007568359375,
0.0303497314453125,
0.003253936767578125,
-0.045989990234375,
0.0129241943359375,
-0.039093017578125,
-0.016876220703125,
-0.000044345855712890625,
-0.023681640625,
0.05438232421875,
-0.029937744140625,
0.0254669189453125,
0.006618499755859375,
-0.01605224609375,
0.0504150390625,
0.0462646484375,
0.02178955078125,
0.04541015625,
-0.0775146484375,
0.027801513671875,
-0.00617218017578125,
0.023162841796875,
-0.027557373046875,
0.0236053466796875,
0.0162506103515625,
0.01141357421875,
-0.00714111328125,
0.0211181640625,
-0.0024356842041015625,
0.04571533203125,
-0.0213775634765625,
0.021759033203125,
0.028076171875,
0.017486572265625,
-0.01506805419921875,
-0.015228271484375,
0.011871337890625,
-0.0224151611328125,
-0.0443115234375,
0.0081939697265625,
-0.034698486328125,
-0.01149749755859375,
0.0281829833984375,
0.007442474365234375,
0.0193023681640625,
0.0033168792724609375,
0.0196990966796875,
-0.00707244873046875,
-0.0203857421875,
0.04278564453125,
-0.035675048828125,
0.0174407958984375,
-0.045654296875,
-0.0281219482421875,
0.0105133056640625,
0.0550537109375,
0.0184326171875,
-0.0168914794921875,
0.01934814453125,
0.038848876953125,
0.028564453125,
-0.044677734375,
-0.048126220703125,
-0.0023784637451171875,
-0.0155792236328125,
0.00653076171875,
0.0032634735107421875,
-0.0631103515625,
-0.04168701171875,
0.024566650390625,
-0.056427001953125,
0.00797271728515625,
-0.01116943359375,
-0.0465087890625,
-0.01506805419921875,
-0.10052490234375,
0.019287109375,
-0.015838623046875,
0.06597900390625,
-0.029052734375,
-0.0253753662109375,
-0.03179931640625,
-0.0006394386291503906,
-0.017852783203125,
-0.0222625732421875,
-0.032806396484375,
-0.0101470947265625,
-0.01070404052734375,
-0.040252685546875,
0.04168701171875,
0.1121826171875,
-0.053955078125,
-0.0308380126953125,
-0.041595458984375,
-0.0009331703186035156,
-0.06390380859375,
-0.01861572265625,
0.0018291473388671875,
0.030792236328125,
0.003421783447265625,
-0.0161590576171875,
0.0122528076171875,
0.005229949951171875,
-0.0093994140625,
-0.0183868408203125,
-0.02008056640625,
-0.034637451171875,
-0.01212310791015625,
0.01186370849609375,
-0.032073974609375,
-0.01023101806640625,
0.006214141845703125,
-0.045257568359375,
-0.0024700164794921875,
0.0238494873046875,
0.01580810546875,
-0.006397247314453125,
0.01317596435546875,
0.008026123046875,
-0.0261993408203125,
-0.0292816162109375,
-0.05609130859375,
0.01273345947265625,
-0.0282745361328125,
0.01096343994140625,
0.0274658203125,
0.02545166015625,
-0.005718231201171875,
-0.0230560302734375,
0.042999267578125,
-0.0126190185546875,
0.006195068359375,
0.00453948974609375,
-0.005702972412109375,
-0.0176239013671875,
-0.0283203125,
-0.025421142578125,
-0.0231475830078125,
0.045379638671875,
0.0272674560546875,
-0.0037078857421875,
-0.0274810791015625,
-0.03509521484375,
-0.0243988037109375,
-0.0247344970703125,
0.0028133392333984375,
0.0013179779052734375,
0.040924072265625,
-0.03179931640625,
0.0238494873046875,
-0.040985107421875,
0.03179931640625,
-0.015838623046875,
0.040313720703125,
0.0006289482116699219,
0.00384521484375,
0.00316619873046875,
-0.02325439453125,
-0.0016803741455078125,
-0.045379638671875,
-0.00981903076171875,
0.0272064208984375,
0.0419921875,
-0.0004277229309082031,
-0.0382080078125,
0.049468994140625,
0.025299072265625,
-0.02667236328125,
0.028900146484375,
-0.0325927734375,
0.01444244384765625,
0.02532958984375,
0.038238525390625,
0.0098114013671875,
-0.0303192138671875,
0.018585205078125,
0.0205078125,
-0.049407958984375,
0.04437255859375,
0.01030731201171875,
0.054962158203125,
0.0233154296875,
0.00868988037109375,
0.042877197265625,
0.002239227294921875,
-0.0767822265625,
0.042816162109375,
0.0135650634765625,
0.01558685302734375,
-0.0278778076171875,
0.0169219970703125,
-0.01800537109375,
-0.04986572265625,
-0.00762176513671875,
-0.01508331298828125,
0.006580352783203125,
0.0218048095703125,
-0.04046630859375,
0.01003265380859375,
-0.01557159423828125,
0.0208282470703125,
0.0311279296875,
-0.022674560546875,
-0.005107879638671875,
-0.037200927734375,
0.01149749755859375,
-0.0100860595703125,
-0.060150146484375,
0.040863037109375,
-0.01483154296875,
0.006744384765625,
-0.0278472900390625,
0.0206146240234375,
-0.0609130859375,
0.0213623046875,
-0.058990478515625,
-0.0105438232421875,
0.060821533203125,
-0.0269622802734375,
-0.0131072998046875,
-0.04296875,
0.041412353515625,
0.00704193115234375,
-0.052734375,
0.0214385986328125,
-0.002899169921875,
0.0165863037109375,
-0.00868988037109375,
0.00583648681640625,
0.032470703125,
-0.055572509765625,
0.0247039794921875,
0.0304412841796875,
0.035125732421875,
0.0290069580078125,
0.026611328125,
0.019622802734375,
0.0249176025390625,
-0.04913330078125,
0.032073974609375,
-0.015472412109375,
0.0283050537109375,
0.055572509765625,
-0.0243988037109375,
-0.007343292236328125,
0.015289306640625,
-0.0222930908203125,
0.01403045654296875,
0.044891357421875,
-0.0293731689453125,
0.030517578125,
-0.00954437255859375,
-0.0166168212890625,
-0.01490020751953125,
-0.04791259765625,
0.005458831787109375,
-0.035858154296875,
0.01898193359375,
0.06622314453125,
0.057342529296875,
0.07244873046875,
-0.0208587646484375,
0.02587890625,
-0.014617919921875,
0.0241241455078125,
0.00551605224609375,
0.05853271484375,
0.008331298828125,
-0.028564453125,
0.004764556884765625,
-0.0230560302734375,
-0.007335662841796875,
0.00391387939453125,
-0.0167236328125,
0.0019044876098632812,
-0.059844970703125,
-0.014556884765625,
0.024322509765625,
-0.0413818359375,
-0.023345947265625,
0.0005998611450195312,
-0.00554656982421875,
-0.00738525390625,
0.0166015625,
0.0268096923828125,
-0.047149658203125,
0.0550537109375,
-0.02130126953125,
-0.0182647705078125,
0.035675048828125,
-0.0546875,
0.0299224853515625,
-0.025848388671875,
0.04736328125,
0.059783935546875,
-0.00774383544921875,
0.01462554931640625,
-0.00433349609375,
-0.0212249755859375,
-0.0272064208984375,
0.0054779052734375,
-0.01290130615234375,
0.0211334228515625,
-0.08721923828125,
0.03662109375,
0.009918212890625,
0.0230560302734375,
-0.010833740234375,
-0.048583984375,
-0.0143280029296875,
-0.009429931640625,
-0.10394287109375,
-0.07171630859375,
0.0021305084228515625,
-0.054290771484375,
-0.01465606689453125,
-0.0303497314453125,
-0.02001953125,
0.01335906982421875,
-0.022491455078125,
-0.006439208984375,
0.0079193115234375,
-0.052520751953125,
-0.0919189453125,
-0.06939697265625,
-0.11163330078125,
0.0309295654296875,
-0.00798797607421875,
0.0347900390625,
-0.00502777099609375,
0.002391815185546875,
-0.00022840499877929688,
-0.032440185546875,
-0.004730224609375,
0.016632080078125,
-0.0149688720703125,
-0.057830810546875,
-0.01105499267578125,
0.01251220703125,
-0.0238037109375,
0.0200042724609375,
-0.044219970703125,
0.00600433349609375,
0.0017194747924804688,
-0.0177459716796875,
-0.003444671630859375,
-0.00853729248046875,
0.0100860595703125,
-0.011505126953125,
-0.00865936279296875,
0.0081634521484375,
0.0131072998046875,
-0.044403076171875,
-0.020904541015625,
-0.0298004150390625,
-0.04852294921875,
0.035675048828125,
0.026885986328125,
-0.007534027099609375,
-0.0081787109375,
0.01244354248046875,
0.005283355712890625,
-0.033660888671875,
0.0186767578125,
-0.03857421875,
0.0433349609375,
0.01049041748046875,
0.0160980224609375,
-0.0196990966796875,
0.034698486328125,
-0.003204345703125,
0.0026874542236328125,
-0.00197601318359375,
0.0143280029296875,
-0.0286712646484375,
0.0012645721435546875,
-0.0770263671875,
0.00469970703125,
0.025299072265625,
-0.00853729248046875,
0.040008544921875,
-0.0109100341796875,
-0.030517578125,
0.0077667236328125,
0.09368896484375,
-0.034332275390625,
-0.021026611328125,
0.01328277587890625,
0.0193023681640625,
-0.04473876953125,
-0.016815185546875,
-0.043792724609375,
-0.00806427001953125,
-0.07415771484375,
-0.003536224365234375,
-0.028411865234375,
-0.025299072265625,
0.0017938613891601562,
0.004787445068359375,
-0.029510498046875,
-0.042083740234375,
0.04437255859375,
-0.0198211669921875,
0.0240325927734375,
0.0145111083984375,
0.0008287429809570312,
0.01210784912109375,
-0.0229644775390625,
-0.0180206298828125,
-0.0272216796875,
-0.0108489990234375,
0.022064208984375,
0.0161895751953125,
-0.01448822021484375,
0.0143890380859375,
0.004787445068359375,
0.03717041015625,
-0.0229034423828125,
-0.0138092041015625,
0.0081787109375,
0.02301025390625,
0.01041412353515625,
0.00555419921875,
-0.020355224609375,
-0.02618408203125,
-0.034515380859375,
-0.0333251953125,
-0.021575927734375,
-0.0562744140625,
-0.0194854736328125,
-0.052703857421875,
0.0285797119140625,
-0.01421356201171875,
-0.0206146240234375,
-0.01453399658203125,
0.033294677734375,
0.045379638671875,
-0.019378662109375,
0.021087646484375,
-0.00344085693359375,
-0.00518798828125,
0.047943115234375,
0.015106201171875,
-0.030517578125,
-0.007843017578125,
0.06060791015625,
0.0274200439453125,
-0.0252227783203125,
-0.0098876953125,
-0.00673675537109375,
0.0308074951171875,
-0.0132293701171875,
0.046234130859375,
0.041961669921875,
-0.01947021484375,
0.03887939453125,
0.01317596435546875,
0.0013189315795898438,
0.0175323486328125,
0.0616455078125,
-0.004001617431640625,
0.00266265869140625,
0.0122222900390625,
-0.01082611083984375,
-0.036376953125,
0.0163421630859375,
-0.05072021484375,
-0.037017822265625,
-0.0256500244140625,
0.050628662109375,
-0.044219970703125,
0.07904052734375,
-0.03900146484375,
-0.034515380859375,
0.01352691650390625,
-0.0184326171875,
-0.0023250579833984375,
0.0192413330078125,
-0.0064544677734375,
0.0174713134765625,
0.031463623046875,
-0.01471710205078125,
0.011505126953125,
-0.0163116455078125,
0.039581298828125,
0.0164642333984375,
-0.0004398822784423828,
0.003070831298828125,
-0.0047760009765625,
-0.02008056640625,
0.08758544921875,
-0.0019159317016601562,
-0.055023193359375,
0.03582763671875,
-0.03826904296875,
-0.01293182373046875,
0.02593994140625,
-0.00768280029296875,
0.056884765625,
0.028717041015625,
-0.0577392578125,
-0.0184478759765625,
-0.043731689453125,
-0.026702880859375,
-0.07574462890625,
-0.0117950439453125,
-0.031829833984375,
0.01531982421875,
0.0271453857421875,
0.073974609375,
0.00972747802734375,
0.06951904296875,
-0.05194091796875,
0.031280517578125,
0.034271240234375,
0.031463623046875,
-0.0016393661499023438,
-0.0172576904296875,
-0.00354766845703125,
0.0239105224609375,
0.0027484893798828125,
-0.0182342529296875,
0.003143310546875,
0.02001953125,
0.0258026123046875,
0.00909423828125,
0.001087188720703125,
0.00733184814453125,
-0.0217742919921875,
-0.00848388671875,
0.053619384765625,
-0.0019254684448242188,
-0.060150146484375,
-0.020355224609375,
0.012725830078125,
0.021575927734375,
-0.024139404296875,
0.0265350341796875,
-0.028167724609375,
0.006122589111328125,
0.0006952285766601562,
-0.0035610198974609375,
0.0176239013671875,
-0.03619384765625,
-0.038848876953125,
-0.0228271484375,
0.01500701904296875,
0.0223388671875,
-0.0279998779296875,
-0.032196044921875,
-0.01520538330078125,
-0.039306640625,
0.061981201171875,
-0.0103759765625,
0.046234130859375,
-0.06365966796875,
-0.003345489501953125,
-0.0018777847290039062,
-0.015716552734375,
0.052947998046875,
0.0265655517578125,
-0.0182037353515625,
0.0034656524658203125,
-0.035614013671875,
-0.004375457763671875,
0.044891357421875,
-0.017913818359375,
-0.0035037994384765625,
-0.056365966796875,
-0.012420654296875,
0.031768798828125,
0.01239013671875,
0.02532958984375,
0.00943756103515625,
0.00848388671875,
-0.0264892578125,
0.050048828125,
0.0014123916625976562,
0.0482177734375,
0.035980224609375,
0.04779052734375,
0.0433349609375,
0.043975830078125,
-0.0382080078125,
-0.031280517578125,
0.0360107421875,
-0.0218353271484375,
-0.0489501953125,
-0.0423583984375,
-0.017822265625,
-0.007221221923828125,
0.025543212890625,
-0.0244903564453125,
-0.01654052734375,
0.02423095703125,
0.006832122802734375,
-0.0072174072265625,
-0.046844482421875,
0.065673828125,
-0.0029315948486328125,
0.028472900390625,
-0.032958984375,
0.01092529296875,
0.0186309814453125,
0.033599853515625,
-0.02581787109375,
-0.02069091796875,
-0.0204620361328125,
0.0360107421875,
-0.01222991943359375,
0.05084228515625,
0.094970703125,
-0.01416778564453125,
0.0264129638671875,
0.0283203125,
-0.019134521484375,
-0.0219879150390625,
0.053863525390625,
-0.037567138671875,
-0.01174163818359375,
0.054595947265625,
0.025665283203125,
-0.0225677490234375,
0.03057861328125,
-0.023773193359375,
0.012359619140625,
0.002887725830078125,
0.05670166015625,
-0.033782958984375,
0.0195770263671875,
0.027374267578125,
-0.0236968994140625,
0.0151824951171875,
-0.003997802734375,
-0.0149078369140625,
-0.0426025390625,
0.047943115234375,
0.0178680419921875,
-0.0185546875,
0.0189971923828125,
0.0189208984375,
-0.00968170166015625,
-0.034576416015625,
0.03692626953125,
0.006893157958984375,
0.0208892822265625,
-0.03271484375,
-0.0019969940185546875,
-0.0026607513427734375,
-0.0277099609375,
0.019989013671875,
-0.0310821533203125,
0.01084136962890625,
-0.050079345703125,
0.0186920166015625,
-0.0104522705078125,
0.0240020751953125,
0.0185546875,
-0.0157623291015625,
-0.01232147216796875,
0.04571533203125,
-0.043121337890625,
0.052032470703125,
0.01160430908203125,
-0.051116943359375,
-0.0199432373046875,
-0.0258941650390625,
0.0209197998046875,
0.02752685546875,
-0.022491455078125,
0.0155181884765625,
-0.0135955810546875,
-0.031768798828125,
-0.006420135498046875,
-0.00490570068359375,
0.0865478515625,
-0.052337646484375,
-0.01450347900390625,
0.032928466796875,
0.0186004638671875,
-0.0282745361328125,
-0.01934814453125,
0.0020389556884765625,
-0.0556640625,
-0.006793975830078125,
-0.00894927978515625,
-0.00457000732421875,
-0.000637054443359375,
-0.01220703125,
-0.03436279296875,
0.044769287109375,
0.015380859375,
0.003589630126953125,
0.0270843505859375,
0.0169525146484375,
-0.033203125,
-0.01465606689453125,
-0.04290771484375,
0.03326416015625,
-0.021942138671875,
0.010498046875,
-0.0615234375,
0.00334930419921875,
-0.0255889892578125,
0.0015087127685546875,
0.053863525390625,
0.0235443115234375,
-0.0110931396484375,
-0.0085296630859375,
0.0224151611328125,
0.00690460205078125,
-0.0233306884765625,
0.042816162109375,
0.00560760498046875,
0.045135498046875,
0.047393798828125,
-0.05987548828125,
0.0082244873046875,
0.0215606689453125,
-0.0098419189453125,
0.040069580078125,
0.00855255126953125,
-0.00917816162109375,
-0.0126953125,
0.0239105224609375,
-0.030975341796875,
0.01126861572265625,
0.022705078125,
-0.01143646240234375,
0.00919342041015625,
0.059112548828125,
0.058319091796875,
-0.035491943359375,
0.046722412109375,
-0.04425048828125,
0.0775146484375,
-0.0042724609375,
-0.01071929931640625,
0.0219573974609375,
0.0222015380859375,
-0.006145477294921875,
-0.01128387451171875,
-0.0103759765625,
0.007282257080078125,
-0.0225677490234375,
0.03509521484375,
0.053375244140625,
0.024932861328125,
-0.01377105712890625,
-0.0080108642578125,
0.062255859375,
0.054443359375,
-0.02349853515625,
-0.0084228515625,
0.01593017578125,
-0.021728515625,
0.01947021484375,
0.007381439208984375,
0.055908203125,
0.03826904296875,
-0.01318359375,
0.010650634765625,
0.004566192626953125,
0.0045013427734375,
0.0274505615234375,
0.02252197265625,
0.022735595703125,
-0.037841796875,
-0.0068206787109375,
-0.052642822265625,
0.020416259765625,
0.0005297660827636719,
0.03826904296875,
0.027587890625,
0.03582763671875,
-0.0089569091796875,
-0.020263671875,
0.003986358642578125,
0.0313720703125,
-0.01340484619140625,
-0.01142120361328125,
-0.0265350341796875,
-0.05072021484375,
0.00142669677734375,
0.0269775390625,
0.0165252685546875,
0.0125579833984375,
0.038604736328125,
0.0213775634765625,
-0.0243988037109375,
-0.006145477294921875,
0.0261688232421875,
-0.0196075439453125,
0.01611328125,
-0.02447509765625,
-0.0034542083740234375,
0.0022182464599609375,
-0.0171661376953125,
0.00787353515625,
-0.01520538330078125,
0.042755126953125,
-0.0294952392578125,
0.05035400390625,
-0.0087127685546875,
0.03277587890625,
0.0129241943359375,
0.0003554821014404297,
-0.015533447265625,
0.007534027099609375,
-0.09381103515625,
-0.0010509490966796875,
-0.08563232421875,
0.00789642333984375,
0.029815673828125,
0.0301055908203125,
0.017974853515625,
0.0095672607421875,
-0.0010013580322265625,
0.0108489990234375,
0.0233001708984375,
-0.01641845703125,
0.00027871131896972656,
0.0338134765625,
0.042633056640625,
0.0255126953125,
-0.06329345703125,
-0.03790283203125,
0.004852294921875,
0.00756072998046875,
0.00626373291015625,
0.023101806640625,
0.024871826171875,
0.01031494140625,
-0.02252197265625,
-0.0014696121215820312,
-0.0274505615234375,
-0.0007042884826660156,
-0.0321044921875,
0.006500244140625,
0.029022216796875,
0.00359344482421875,
-0.065673828125,
0.0154876708984375,
0.034759521484375,
0.0007033348083496094,
0.03546142578125,
-0.016510009765625,
0.0187225341796875,
-0.01139068603515625,
0.0134429931640625,
-0.0153656005859375,
-0.03515625,
-0.02978515625,
-0.00872802734375,
0.03704833984375,
0.0322265625,
-0.0224151611328125,
0.0258941650390625,
0.0058441162109375,
-0.05938720703125,
0.011383056640625,
-0.036346435546875,
0.01264190673828125,
0.0352783203125,
0.01265716552734375,
-0.01502227783203125,
0.0038318634033203125,
-0.01425933837890625,
0.0081939697265625,
0.014007568359375,
0.0280609130859375,
-0.0074920654296875,
0.000003039836883544922,
0.054534912109375,
-0.0075836181640625,
0.04541015625,
-0.039337158203125,
-0.0005464553833007812,
0.034210205078125,
0.0279388427734375,
0.0063018798828125,
-0.07586669921875,
-0.0041656494140625,
-0.0341796875,
-0.014923095703125,
0.017547607421875,
-0.010284423828125,
-0.01291656494140625,
0.034210205078125,
-0.0282135009765625,
0.016143798828125,
-0.01439666748046875,
0.01861572265625,
0.0009198188781738281,
-0.01166534423828125,
-0.016510009765625,
-0.00902557373046875,
0.01091766357421875,
0.0001246929168701172,
0.01401519775390625,
-0.0511474609375,
-0.020843505859375,
-0.02490234375,
0.000476837158203125,
-0.0172882080078125,
0.0167083740234375,
0.0179443359375,
-0.0181121826171875,
-0.0159912109375,
0.016448974609375,
-0.00868988037109375,
0.06353759765625,
0.00713348388671875,
-0.0061798095703125,
0.023834228515625,
-0.01364898681640625,
-0.04180908203125,
-0.049835205078125,
0.02923583984375,
-0.0848388671875,
-0.024749755859375,
-0.04571533203125,
-0.004116058349609375,
0.01216888427734375,
-0.034881591796875,
-0.036407470703125,
0.0082244873046875,
-0.01508331298828125,
-0.0369873046875,
-0.0382080078125,
0.0119171142578125,
0.01751708984375,
-0.0244140625,
-0.022705078125,
-0.0411376953125,
-0.0255889892578125,
0.01473236083984375,
0.0305023193359375,
0.0309906005859375,
0.03228759765625,
0.016357421875,
-0.004238128662109375,
0.0274810791015625,
0.01248931884765625,
0.0242919921875,
-0.0092926025390625,
-0.002162933349609375,
-0.0029735565185546875,
0.01210784912109375,
-0.047943115234375,
0.00041961669921875,
-0.00223541259765625,
0.06451416015625,
-0.0218048095703125,
-0.029327392578125,
-0.01218414306640625,
0.01415252685546875,
0.07220458984375,
0.05712890625,
0.0216217041015625,
-0.04412841796875,
-0.0158233642578125,
0.0311126708984375,
-0.08172607421875,
-0.037811279296875,
0.058319091796875,
-0.11602783203125,
-0.0390625,
-0.00839996337890625,
-0.0173797607421875,
-0.0003097057342529297,
-0.0192413330078125,
-0.04461669921875,
0.0125274658203125,
-0.0115814208984375,
0.0005841255187988281,
-0.029693603515625,
0.0285186767578125,
0.036346435546875,
-0.040069580078125,
0.0097503662109375,
-0.0043792724609375,
0.00467681884765625,
0.02508544921875,
-0.041778564453125,
0.0025157928466796875,
0.01485443115234375,
-0.01268768310546875,
-0.0308380126953125,
0.032196044921875,
0.00881195068359375,
0.056915283203125,
-0.0294189453125,
-0.01337432861328125,
0.005481719970703125,
-0.0025844573974609375,
0.0018892288208007812,
0.0213165283203125,
-0.0176544189453125,
-0.007564544677734375,
0.03009033203125,
0.00959014892578125,
0.0531005859375,
-0.0020275115966796875,
0.06353759765625,
-0.02581787109375,
-0.0265960693359375,
0.0035877227783203125,
-0.0560302734375,
-0.00543212890625,
0.033966064453125,
0.0226898193359375,
-0.04815673828125,
0.028533935546875,
-0.0031070709228515625,
0.0290985107421875,
0.02716064453125
]
|
1232952dadeb758b03489a2bc8b768c6f5186e25 | Wordpress Stackexchange
Q: How to get WooCommerce Product Category Link by ID? WooCommerce's product categories are a custom taxonomy called product_cat. In a function I'm writing, I'm using get_categories with the taxonomy parameter set to product_cat. Everything works fine and I can get the term id, the name, and even the slug. What I can't figure out is how to get the link to display. Apparently get_category_link doesn't work with custom taxonomy and get_term_link isn't working either, I get an error. Here's what I have:
$prod_cat_args = array(
'taxonomy' => 'product_cat', //woocommerce
'orderby' => 'name',
'empty' => 0
);
$woo_categories = get_categories( $prod_cat_args );
foreach ( $woo_categories as $woo_cat ) {
$woo_cat_id = $woo_cat->term_id; //category ID
$woo_cat_name = $woo_cat->name; //category name
$return .= '<a href="' . get_category_link( $woo_cat_id ) . '">' . $woo_cat_name . '</a>';
}//end of $woo_categories foreach
Suggestions?
A: Thanks, I use
foreach ( $terms as $term ) {
$term_link = get_term_link( $term );
echo '<li><a href="' . esc_url( $term_link ) . '">' . $term->name . '</a></li>';
}
It works perfectly.
| Q: How to get WooCommerce Product Category Link by ID? WooCommerce's product categories are a custom taxonomy called product_cat. In a function I'm writing, I'm using get_categories with the taxonomy parameter set to product_cat. Everything works fine and I can get the term id, the name, and even the slug. What I can't figure out is how to get the link to display. Apparently get_category_link doesn't work with custom taxonomy and get_term_link isn't working either, I get an error. Here's what I have:
$prod_cat_args = array(
'taxonomy' => 'product_cat', //woocommerce
'orderby' => 'name',
'empty' => 0
);
$woo_categories = get_categories( $prod_cat_args );
foreach ( $woo_categories as $woo_cat ) {
$woo_cat_id = $woo_cat->term_id; //category ID
$woo_cat_name = $woo_cat->name; //category name
$return .= '<a href="' . get_category_link( $woo_cat_id ) . '">' . $woo_cat_name . '</a>';
}//end of $woo_categories foreach
Suggestions?
A: Thanks, I use
foreach ( $terms as $term ) {
$term_link = get_term_link( $term );
echo '<li><a href="' . esc_url( $term_link ) . '">' . $term->name . '</a></li>';
}
It works perfectly.
A: Another update (Sept. 2015):
I can use get_term_link after all. The problem was that the string needed to be converted to an integer. Used a Stack Overflow tip for the fastest way to convert it using the (int)$value in PHP.
So it would look like this if you don't want to use the slug in the foreach loop:
$woo_cat_id_int = (int)$woo_cat_id; //convert
That converted value is used instead of the slug in get_term_link. Hope it helps someone. :-)
Looks like I figured it out.
I used get_term_link. And I was getting an error because I was using it this way:
get_term_link( $woo_cat_id, 'product_cat' );
Which gave me this error:
Object of class WP_Error could not be converted to string
So I went this route instead with the slug and it worked:
$prod_cat_args = array(
'taxonomy' => 'product_cat', //woocommerce
'orderby' => 'name',
'empty' => 0
);
$woo_categories = get_categories( $prod_cat_args );
foreach ( $woo_categories as $woo_cat ) {
$woo_cat_id = $woo_cat->term_id; //category ID
$woo_cat_name = $woo_cat->name; //category name
$woo_cat_slug = $woo_cat->slug; //category slug
$return .= '<a href="' . get_term_link( $woo_cat_slug, 'product_cat' ) . '">' . $woo_cat_name . '</a>';
}//end of $woo_categories foreach
A: $prod_cat_args = array(
'taxonomy' => 'product_cat', //woocommerce
'orderby' => 'name',
'empty' => 0
);
$terms = get_categories( $prod_cat_args );
//$term_id=6;
foreach ( $terms as $term ) {
$term_link = get_term_link( $term );
echo '<li><a class="shopping-now" href="' . esc_url( $term_link ) . '">' . $term->name . '</a></li>';
}
get_term_link() does work smoothly, when using the object returned by get_categories().
A: I try this code and it works.
<?php $catTerms = get_terms('product_cat', array('hide_empty' => 0, 'orderby' => 'ASC', 'exclude' => '17,77')); ?>
<?php foreach($catTerms as $catTerm) :
$wthumbnail_id = get_woocommerce_term_meta( $catTerm->term_id,'thumbnail_id', true );
$wimage = wp_get_attachment_url( $wthumbnail_id );
$wcategory =$term_link = get_term_link( $catTerm );
?>
<ul>
<li><a class="tr" href="<?php echo esc_url( $term_link ); ?>"><?php if($wimage!=""):?><img src="<?php echo $wimage?>"><?php endif;?><?php echo $catTerm->name; ?></a></li>
</ul>
| wordpress | {
"language": "en",
"length": 485,
"provenance": "stackexchange_00019.jsonl.gz:449387",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163372"
} | [
0.01190948486328125,
-0.01436614990234375,
-0.0239410400390625,
-0.055877685546875,
0.0191192626953125,
-0.01641845703125,
0.01023101806640625,
0.0167388916015625,
-0.00695037841796875,
0.0163116455078125,
-0.0157928466796875,
-0.045318603515625,
-0.02032470703125,
-0.03570556640625,
-0.02362060546875,
-0.05670166015625,
0.0226593017578125,
0.0171661376953125,
0.0316162109375,
0.0064544677734375,
-0.0166473388671875,
0.03369140625,
0.0030536651611328125,
0.0226593017578125,
0.020233154296875,
-0.02398681640625,
0.0780029296875,
-0.039520263671875,
0.0272064208984375,
-0.037109375,
0.018096923828125,
0.0019273757934570312,
0.02215576171875,
-0.0293121337890625,
0.026458740234375,
0.0003120899200439453,
0.0182647705078125,
-0.01922607421875,
0.0071563720703125,
0.0261688232421875,
0.04437255859375,
-0.03692626953125,
0.020721435546875,
-0.002887725830078125,
0.00954437255859375,
-0.015960693359375,
0.01389312744140625,
-0.06036376953125,
-0.00560760498046875,
-0.017822265625,
0.0328369140625,
0.0185699462890625,
0.04547119140625,
-0.0250701904296875,
-0.017578125,
-0.00928497314453125,
-0.019287109375,
-0.005954742431640625,
0.027496337890625,
0.00384521484375,
-0.0193939208984375,
-0.0145721435546875,
0.0203857421875,
-0.022674560546875,
0.0028476715087890625,
0.01194000244140625,
0.0291595458984375,
0.036865234375,
-0.0369873046875,
-0.01190185546875,
0.00751495361328125,
-0.01302337646484375,
-0.005123138427734375,
0.028045654296875,
-0.03173828125,
-0.05511474609375,
0.024444580078125,
-0.019744873046875,
0.01493072509765625,
0.032470703125,
-0.003910064697265625,
-0.00904083251953125,
-0.0273284912109375,
0.01280975341796875,
-0.019256591796875,
0.0220489501953125,
-0.0201873779296875,
-0.0203857421875,
-0.0288543701171875,
-0.0570068359375,
-0.01519775390625,
0.004077911376953125,
-0.052764892578125,
0.000431060791015625,
-0.0216522216796875,
-0.027008056640625,
0.01430511474609375,
0.017364501953125,
0.01104736328125,
0.00804901123046875,
0.02044677734375,
-0.053924560546875,
0.02984619140625,
-0.0295867919921875,
-0.0022735595703125,
0.0208892822265625,
-0.00798797607421875,
0.035064697265625,
0.044189453125,
0.0312042236328125,
0.018218994140625,
0.0003879070281982422,
-0.0167694091796875,
-0.02593994140625,
0.01477813720703125,
0.025909423828125,
-0.05230712890625,
0.0438232421875,
-0.003200531005859375,
0.02410888671875,
0.006053924560546875,
0.04144287109375,
0.006618499755859375,
-0.004962921142578125,
-0.0008301734924316406,
0.01258087158203125,
0.0183563232421875,
-0.0650634765625,
0.011077880859375,
-0.023590087890625,
-0.0499267578125,
0.0273895263671875,
0.06292724609375,
0.031585693359375,
0.022125244140625,
-0.004123687744140625,
0.0052642822265625,
-0.0030345916748046875,
0.0028705596923828125,
-0.0217132568359375,
0.027679443359375,
0.03179931640625,
0.0254364013671875,
-0.025299072265625,
0.0304412841796875,
-0.0140533447265625,
-0.004909515380859375,
0.03106689453125,
0.03192138671875,
0.00740814208984375,
0.0224609375,
-0.01995849609375,
0.037322998046875,
0.007526397705078125,
0.0086669921875,
0.009796142578125,
0.049713134765625,
-0.0257568359375,
-0.04168701171875,
-0.04425048828125,
0.00888824462890625,
-0.00666046142578125,
0.0281524658203125,
-0.0228729248046875,
-0.041778564453125,
0.0010833740234375,
-0.047576904296875,
-0.01800537109375,
0.020294189453125,
0.07598876953125,
0.00785064697265625,
-0.0153350830078125,
-0.0025920867919921875,
0.01181793212890625,
-0.00439453125,
-0.0057220458984375,
-0.017181396484375,
0.0132293701171875,
0.05010986328125,
-0.004871368408203125,
-0.029693603515625,
-0.03863525390625,
0.056396484375,
-0.0131072998046875,
-0.034698486328125,
0.005924224853515625,
0.03155517578125,
0.0667724609375,
-0.01020050048828125,
0.02301025390625,
0.03948974609375,
0.0117340087890625,
-0.044830322265625,
0.01434326171875,
-0.0018672943115234375,
-0.0224609375,
-0.0008535385131835938,
0.005687713623046875,
-0.00949859619140625,
-0.0019664764404296875,
0.023834228515625,
0.00022852420806884766,
0.027984619140625,
-0.0067291259765625,
-0.032196044921875,
0.03143310546875,
-0.016937255859375,
0.04083251953125,
-0.006763458251953125,
0.035858154296875,
0.03021240234375,
0.0204010009765625,
-0.041748046875,
-0.025115966796875,
-0.0009636878967285156,
0.01485443115234375,
-0.022369384765625,
0.040985107421875,
-0.008453369140625,
0.009002685546875,
-0.0098419189453125,
-0.0423583984375,
0.00360107421875,
0.033660888671875,
0.0224761962890625,
0.0316162109375,
-0.0308685302734375,
-0.00437164306640625,
0.0052642822265625,
0.043975830078125,
-0.06512451171875,
-0.0121917724609375,
0.06634521484375,
0.023895263671875,
-0.023345947265625,
0.019012451171875,
0.0452880859375,
-0.06634521484375,
-0.011199951171875,
0.04571533203125,
0.041015625,
0.01085662841796875,
-0.033905029296875,
-0.0587158203125,
0.0841064453125,
-0.018585205078125,
-0.007266998291015625,
-0.028106689453125,
0.0013818740844726562,
0.02899169921875,
0.01568603515625,
0.0305938720703125,
0.01007843017578125,
0.040863037109375,
0.00882720947265625,
0.03668212890625,
-0.006877899169921875,
-0.02008056640625,
0.010528564453125,
0.01342010498046875,
-0.0018224716186523438,
-0.04742431640625,
-0.0330810546875,
-0.01654052734375,
0.0335693359375,
-0.0033588409423828125,
0.0210113525390625,
0.00833892822265625,
-0.03057861328125,
-0.01485443115234375,
0.0167694091796875,
0.0044097900390625,
-0.0190582275390625,
0.004756927490234375,
0.0285491943359375,
-0.04931640625,
-0.039520263671875,
0.0189056396484375,
-0.00405120849609375,
-0.0240631103515625,
0.012786865234375,
0.0601806640625,
0.047332763671875,
-0.0107421875,
-0.040313720703125,
-0.06298828125,
0.01519012451171875,
0.03515625,
-0.047882080078125,
-0.01546478271484375,
0.020050048828125,
0.04827880859375,
-0.0380859375,
0.0166168212890625,
-0.05133056640625,
0.0099029541015625,
0.01471710205078125,
-0.0017910003662109375,
0.024169921875,
-0.0211944580078125,
0.026611328125,
0.0445556640625,
-0.020904541015625,
0.03094482421875,
0.01000213623046875,
-0.031829833984375,
0.0147552490234375,
0.004299163818359375,
-0.01715087890625,
0.00664520263671875,
-0.085693359375,
-0.0007233619689941406,
0.0127716064453125,
0.050689697265625,
-0.02178955078125,
-0.051971435546875,
-0.01151275634765625,
0.0131378173828125,
-0.084228515625,
-0.07208251953125,
0.00568389892578125,
-0.03802490234375,
0.016632080078125,
-0.01049041748046875,
-0.007144927978515625,
-0.026031494140625,
-0.00412750244140625,
0.011566162109375,
0.01401519775390625,
-0.033660888671875,
-0.06591796875,
-0.0517578125,
-0.06353759765625,
-0.0005598068237304688,
-0.0014524459838867188,
-0.0065765380859375,
0.004116058349609375,
0.0008516311645507812,
-0.00015366077423095703,
-0.0127410888671875,
0.01824951171875,
0.046295166015625,
-0.001918792724609375,
-0.0146942138671875,
-0.013214111328125,
-0.02142333984375,
-0.006626129150390625,
0.003170013427734375,
0.01861572265625,
0.009521484375,
-0.0110015869140625,
0.0016489028930664062,
0.0161285400390625,
0.030548095703125,
0.05194091796875,
-0.045196533203125,
-0.02862548828125,
0.06378173828125,
0.0188446044921875,
-0.00489044189453125,
-0.01483154296875,
-0.0258026123046875,
-0.0325927734375,
0.038604736328125,
0.011749267578125,
0.01312255859375,
-0.002410888671875,
0.01258087158203125,
-0.0140380859375,
-0.0006308555603027344,
-0.022430419921875,
-0.03790283203125,
0.00917816162109375,
0.0103759765625,
0.0195159912109375,
0.0234832763671875,
0.04736328125,
-0.01031494140625,
0.0202178955078125,
0.025970458984375,
0.0257720947265625,
0.01258087158203125,
-0.0218505859375,
-0.03619384765625,
-0.052337646484375,
0.0511474609375,
-0.040863037109375,
0.00997161865234375,
-0.03973388671875,
-0.02850341796875,
-5.364418029785156e-7,
0.09820556640625,
0.007534027099609375,
-0.047637939453125,
-0.01117706298828125,
0.0121917724609375,
-0.0186309814453125,
-0.0031585693359375,
-0.004627227783203125,
-0.0155487060546875,
-0.06842041015625,
0.01143646240234375,
0.0163421630859375,
-0.0380859375,
-0.00543975830078125,
0.006927490234375,
-0.06390380859375,
-0.0215911865234375,
0.03411865234375,
-0.011566162109375,
0.0254974365234375,
0.033905029296875,
0.007640838623046875,
0.0142364501953125,
-0.048583984375,
0.004848480224609375,
0.006710052490234375,
-0.0018281936645507812,
0.04437255859375,
-0.0170440673828125,
-0.0038127899169921875,
-0.0098114013671875,
-0.02069091796875,
0.027740478515625,
0.0262908935546875,
0.0106048583984375,
0.044677734375,
0.021942138671875,
-0.004199981689453125,
-0.0249176025390625,
0.029296875,
-0.05633544921875,
-0.0047454833984375,
-0.048126220703125,
-0.047760009765625,
0.0200958251953125,
-0.00728607177734375,
0.07391357421875,
-0.00484466552734375,
-0.0132598876953125,
-0.09100341796875,
-0.0276336669921875,
0.005359649658203125,
-0.01183319091796875,
-0.0194854736328125,
0.005779266357421875,
0.0017805099487304688,
-0.06768798828125,
0.04052734375,
-0.023895263671875,
-0.0284881591796875,
-0.0012788772583007812,
0.055816650390625,
0.023406982421875,
-0.01096343994140625,
0.01971435546875,
0.005695343017578125,
0.02740478515625,
0.0077667236328125,
0.0308685302734375,
-0.0084075927734375,
-0.0154571533203125,
0.052001953125,
-0.0039825439453125,
0.0157470703125,
0.0221405029296875,
-0.00386810302734375,
0.00394439697265625,
-0.017578125,
0.010040283203125,
0.006359100341796875,
-0.0236358642578125,
0.017822265625,
-0.0284423828125,
-0.00836944580078125,
-0.0258026123046875,
0.03765869140625,
-0.004169464111328125,
0.01313018798828125,
-0.0386962890625,
-0.0106658935546875,
-0.001251220703125,
-0.0086822509765625,
0.06402587890625,
0.04046630859375,
-0.0026683807373046875,
0.0237884521484375,
0.019012451171875,
0.004367828369140625,
-0.03558349609375,
-0.04132080078125,
-0.0284423828125,
-0.00882720947265625,
-0.01204681396484375,
-0.017822265625,
0.0027294158935546875,
0.0012302398681640625,
-0.0034351348876953125,
-0.0031375885009765625,
-0.016082763671875,
-0.04150390625,
-0.0251922607421875,
-0.005657196044921875,
-0.004741668701171875,
-0.013824462890625,
0.0439453125,
0.01255035400390625,
-0.0189361572265625,
-0.0034770965576171875,
-0.0765380859375,
0.02056884765625,
-0.0531005859375,
0.038604736328125,
-0.00926971435546875,
0.01424407958984375,
-0.0005598068237304688,
0.09130859375,
-0.007568359375,
0.04962158203125,
-0.0104522705078125,
0.0017719268798828125,
-0.007266998291015625,
0.054718017578125,
0.036895751953125,
-0.051910400390625,
-0.00701141357421875,
-0.006717681884765625,
0.0029010772705078125,
-0.050140380859375,
-0.04888916015625,
0.01373291015625,
0.07196044921875,
-0.037994384765625,
-0.0207061767578125,
0.021636962890625,
-0.00971221923828125,
-0.012969970703125,
0.0212554931640625,
-0.041107177734375,
-0.01739501953125,
-0.047088623046875,
-0.022674560546875,
0.030364990234375,
-0.0004413127899169922,
-0.01824951171875,
0.00722503662109375,
-0.0120849609375,
0.01465606689453125,
-0.0184478759765625,
-0.0098419189453125,
0.008697509765625,
0.0213165283203125,
-0.039154052734375,
-0.006656646728515625,
0.031280517578125,
-0.018218994140625,
0.0006084442138671875,
-0.041961669921875,
-0.05108642578125,
0.0640869140625,
-0.0167999267578125,
0.11419677734375,
-0.029754638671875,
-0.0809326171875,
-0.00902557373046875,
-0.0029315948486328125,
0.06475830078125,
0.06536865234375,
-0.04669189453125,
0.001430511474609375,
-0.020904541015625,
0.0050506591796875,
0.02679443359375,
-0.0390625,
-0.016265869140625,
-0.029632568359375,
-0.01226043701171875,
0.02398681640625,
-0.002899169921875,
-0.0096588134765625,
-0.032684326171875,
-0.00753021240234375,
0.004497528076171875,
-0.01233673095703125,
0.02294921875,
-0.01006317138671875,
0.01500701904296875,
0.018463134765625,
0.0145111083984375,
-0.0369873046875,
-0.03607177734375,
-0.0239410400390625,
-0.0084381103515625,
-0.050750732421875,
0.0029964447021484375,
-0.0034961700439453125,
-0.033905029296875,
0.0205535888671875,
0.035614013671875,
0.0161895751953125,
0.0091552734375,
0.0005240440368652344,
0.002735137939453125,
-0.01898193359375,
0.01206207275390625,
0.006580352783203125,
-0.0220947265625,
0.06317138671875,
-0.034698486328125,
0.00962066650390625,
0.02728271484375,
0.00978851318359375,
0.031707763671875,
-0.021026611328125,
0.0390625,
-0.006256103515625,
-0.0200042724609375,
0.0400390625,
0.06158447265625,
0.00954437255859375,
0.041717529296875,
0.00579071044921875,
0.0212554931640625,
0.025634765625,
0.04461669921875,
0.02569580078125,
-0.0242767333984375,
0.055084228515625,
-0.0041351318359375,
-0.0160369873046875,
0.03314208984375,
-0.03253173828125,
-0.01093292236328125,
-0.00295257568359375,
0.03631591796875,
-0.031768798828125,
0.00716400146484375,
0.037994384765625,
0.0021686553955078125,
-0.0228424072265625,
0.0277252197265625,
-0.01293182373046875,
-0.0302734375,
-0.0010204315185546875,
-0.042205810546875,
-0.01812744140625,
-0.01153564453125,
-0.0176239013671875,
0.03179931640625,
0.0308074951171875,
0.046142578125,
-0.00492095947265625,
-0.09381103515625,
-0.052764892578125,
0.049163818359375,
-0.0270538330078125,
-0.043975830078125,
-0.0005331039428710938,
-0.0014324188232421875,
0.0150299072265625,
-0.03387451171875,
0.064208984375,
-0.0077056884765625,
0.04693603515625,
0.034759521484375,
-0.0207366943359375,
0.019439697265625,
0.0252838134765625,
0.00653839111328125,
0.01436614990234375,
-0.0157012939453125,
-0.05364990234375,
0.0162811279296875,
-0.00977325439453125,
-0.02203369140625,
0.015167236328125,
-0.04730224609375,
-0.00684356689453125,
-0.03466796875,
0.033721923828125,
-0.0213623046875,
0.0263671875,
0.050628662109375,
-0.0252685546875,
-0.01467132568359375,
0.0223541259765625,
0.0877685546875,
0.0070648193359375,
-0.0153045654296875,
0.01023101806640625,
-0.036407470703125,
-0.00016486644744873047,
-0.006256103515625,
-0.004230499267578125,
0.0022983551025390625,
-0.027252197265625,
-0.059906005859375,
0.03082275390625,
-0.040618896484375,
0.0374755859375,
0.00795745849609375,
-0.0013914108276367188,
0.026641845703125,
0.0030364990234375,
-0.03375244140625,
0.040740966796875,
0.042083740234375,
0.03179931640625,
-0.037750244140625,
-0.03521728515625,
0.0115814208984375,
0.05230712890625,
0.042877197265625,
-0.0024394989013671875,
-0.00848388671875,
0.01085662841796875,
0.0584716796875,
-0.01104736328125,
-0.036041259765625,
0.031951904296875,
0.006458282470703125,
-0.037445068359375,
0.06781005859375,
-0.01220703125,
0.03521728515625,
0.003681182861328125,
0.02294921875,
0.00843048095703125,
0.0084228515625,
0.0229034423828125,
-0.022216796875,
0.0273284912109375,
-0.0127410888671875,
-0.0165863037109375,
0.0109405517578125,
-0.0252685546875,
-0.01232147216796875,
0.04632568359375,
0.01214599609375,
0.005947113037109375,
0.0478515625,
-0.0401611328125,
0.051727294921875,
-0.0066680908203125,
0.03668212890625,
0.04193115234375,
0.01248931884765625,
0.11517333984375,
-0.022491455078125,
0.014373779296875,
-0.0030651092529296875,
0.00603485107421875,
0.06207275390625,
0.0219573974609375,
0.0162506103515625,
-0.029327392578125,
0.025543212890625,
0.048065185546875,
0.0616455078125,
-0.051116943359375,
-0.07464599609375,
0.00786590576171875,
-0.0083770751953125,
0.010101318359375,
0.038330078125,
0.0292510986328125,
0.007404327392578125,
0.041259765625,
-0.071044921875,
0.01103973388671875,
0.047607421875,
0.053131103515625,
-0.006183624267578125,
-0.01605224609375,
-0.07269287109375,
-0.03961181640625,
-0.0653076171875,
0.0587158203125,
0.0105133056640625,
0.0655517578125,
-0.0022182464599609375,
0.07708740234375,
-0.036865234375,
-0.046417236328125,
0.0263671875,
0.037445068359375,
-0.007305145263671875,
-0.03546142578125,
0.0117034912109375,
-0.037811279296875,
-0.01800537109375,
0.0208282470703125,
0.0217132568359375,
0.0274200439453125,
0.03436279296875,
0.05584716796875,
0.04931640625,
-0.004364013671875,
0.05401611328125,
0.0044708251953125,
-0.020111083984375,
-0.0280914306640625,
0.0638427734375,
0.03515625,
0.023284912109375,
0.007160186767578125,
0.034332275390625,
0.047821044921875,
-0.0258331298828125,
0.0557861328125,
-0.01007080078125,
-0.0270538330078125,
0.0283355712890625,
-0.0360107421875,
0.091552734375,
-0.0006122589111328125,
-0.0931396484375,
-0.019287109375,
-0.050811767578125,
0.0081787109375,
0.0116729736328125,
0.028167724609375,
-0.0111846923828125,
0.04913330078125,
-0.0138702392578125,
-0.0201873779296875,
0.044342041015625,
-0.0023670196533203125,
-0.0257720947265625,
-0.01168060302734375,
0.0186004638671875,
-0.032470703125,
-0.01476287841796875,
0.007389068603515625,
0.019622802734375,
-0.01361083984375,
0.0210723876953125,
0.0307769775390625,
0.0123443603515625,
-0.0016584396362304688,
-0.04473876953125,
0.030853271484375,
-0.06744384765625,
-0.059417724609375,
0.07232666015625,
-0.0136871337890625,
-0.0223236083984375,
-0.0033740997314453125,
0.0002104043960571289,
-0.00904083251953125,
0.057861328125,
-0.0261383056640625,
-0.02764892578125,
-0.003910064697265625,
0.03399658203125,
-0.005130767822265625,
0.06939697265625,
-0.016632080078125,
-0.052642822265625,
-0.045654296875,
-0.01503753662109375,
0.010498046875,
0.05865478515625,
0.036285400390625,
0.0033893585205078125,
0.0008015632629394531,
-0.0103759765625,
0.0192413330078125,
0.005809783935546875,
0.028961181640625,
0.036346435546875,
-0.0216217041015625,
0.007297515869140625,
0.0111541748046875,
-0.01485443115234375,
0.0131378173828125,
0.010833740234375,
0.0018987655639648438,
0.00498199462890625,
-0.02386474609375,
0.020904541015625,
0.06158447265625,
0.023590087890625,
-0.020843505859375,
0.01495361328125,
0.0721435546875,
-0.03643798828125,
-0.014068603515625,
-0.0165863037109375,
-0.032257080078125,
-0.0399169921875,
0.004638671875,
-0.005462646484375,
0.009979248046875,
-0.01354217529296875,
-0.0016050338745117188,
-0.0077972412109375,
0.035064697265625,
0.002593994140625,
-0.039398193359375,
-0.01216888427734375,
0.0007152557373046875,
0.045684814453125,
-0.003490447998046875,
-0.0177154541015625,
0.0030956268310546875,
0.016357421875,
-0.01507568359375,
0.01568603515625,
-0.035675048828125,
-0.01812744140625,
-0.0255584716796875,
0.007762908935546875,
0.00308990478515625,
-0.01885986328125,
-0.0131378173828125,
0.0196075439453125,
0.016510009765625,
0.05804443359375,
0.03875732421875,
-0.0355224609375,
0.0038776397705078125,
0.025482177734375,
-0.01042938232421875,
-0.05224609375,
0.00934600830078125,
-0.0291900634765625,
0.00849151611328125,
0.0328369140625,
-0.025909423828125,
0.00669097900390625,
-0.0299835205078125,
-0.03656005859375,
0.0660400390625,
0.000057697296142578125,
-0.02178955078125,
-0.03875732421875,
-0.00046372413635253906,
-0.016204833984375,
0.0132598876953125,
-0.014434814453125,
-0.00514984130859375,
-0.027801513671875,
0.0343017578125,
0.00909423828125,
-0.01837158203125,
0.031890869140625,
-0.01959228515625,
-0.049163818359375,
0.01678466796875,
0.02484130859375,
0.0002665519714355469,
-0.0084228515625,
-0.0238189697265625,
0.0165863037109375,
0.02301025390625,
-0.0258026123046875,
-0.046905517578125,
0.00867462158203125,
-0.00975799560546875,
0.03277587890625,
-0.037506103515625,
-0.033935546875,
-0.04986572265625,
-0.0106964111328125,
-0.0184326171875,
0.0034503936767578125,
0.018402099609375,
-0.027740478515625,
-0.00887298583984375,
-0.0031681060791015625,
-0.00948333740234375,
0.0219879150390625,
-0.0836181640625,
-0.0139312744140625,
0.033233642578125,
-0.006511688232421875,
0.011383056640625,
0.022674560546875,
-0.05047607421875,
-0.00009238719940185547,
-0.014129638671875,
0.00395965576171875,
-0.08782958984375,
0.0335693359375,
-0.01409912109375,
-0.02587890625,
-0.04046630859375,
-0.020233154296875,
-0.00293731689453125,
-0.0406494140625,
-0.068115234375,
-0.00975799560546875,
-0.003818511962890625,
0.00640106201171875,
0.00930023193359375,
0.0105438232421875,
0.007965087890625,
0.004329681396484375,
-0.0008101463317871094,
-0.018280029296875,
0.021209716796875,
-0.0189361572265625,
-0.00949859619140625,
0.0015239715576171875,
0.05694580078125,
0.01983642578125,
0.11968994140625,
-0.00449371337890625,
0.004547119140625,
0.0093536376953125,
0.038604736328125,
-0.01050567626953125,
-0.0063323974609375,
0.01300811767578125,
-0.055816650390625,
0.019805908203125,
-0.04296875,
-0.01457977294921875,
0.0126495361328125,
-0.0228424072265625,
-0.00466156005859375,
-0.055694580078125,
0.0019550323486328125
]
|
53e4be631c9f56f1dca57808eee7e9f5fe9feb25 | Wordpress Stackexchange
Q: Preserving theme settings in child theme My client uses Karma theme with many settings in theme options. I need to keep my CSS and PHP additions in a child theme so that theme updates don't wipe it out. However when I select my child theme in Appearance > Themes, the main theme settings are all gone.
Is there any way to preserve the main theme settings?
A: This plugin worked very well for me
Child Theme Copy Settings
| Q: Preserving theme settings in child theme My client uses Karma theme with many settings in theme options. I need to keep my CSS and PHP additions in a child theme so that theme updates don't wipe it out. However when I select my child theme in Appearance > Themes, the main theme settings are all gone.
Is there any way to preserve the main theme settings?
A: This plugin worked very well for me
Child Theme Copy Settings
A: I know this is an old question, but I needed to do this and it was quite simple:
NOTE: This is mostly useful for themes that use the WordPress Customizer to configure their settings
*
*Take a backup of your website (files and database) using a plugin such as Updraftplus
*Get access to your database whether via Cpanel's phpAdmin or alike
*Go to your {prefix}_options (wp_options) table and run the query:
SELECT * FROM {prefix}_options where option_name like 'theme_mods_%'
This will pull up the theme mods saved for all themes.
*
*Look for the option with the name of your current active theme example: theme_mods_mytheme
*Copy it's option_value and save to a text file or something.
*Go back to WordPress and activate your new child theme
*Then go back to the database and refresh the options/run query again and you should see a new option now called theme_mods_mytheme-child (assuming your child theme is called 'mytheme-child')
*Edit it's option_value, delete what's there and paste the previously copied data that you saved to the text file and save the changes.
*Go back to the site and refresh the page, you'll see that things now are the same as it was with the parent theme.
This method also works if you have a child theme folder named something like 'mytheme-child' and you maybe want to rename the folder name to 'newtheme' after you've already done Customizer changes to the site while 'mytheme-child' was active.
A: Because of the way these theme settings are stored as an array in the database, it can be difficult to copy them over with just copy and paste in phpmyadmin or some similar tactic.
The WP CLI option command is your friend here. If you don't use WP CLI already, check it out! Here's how I copied the settings from the storefront theme to a theme called storefront-sqcdy-child:
# save the existing theme settings in json format in a temporary text file
wp option get theme_mods_storefront --format=json > theme_mods_storefront.txt
# load the saved settings into the child theme option record in the database
wp option update theme_mods_storefront-sqcdy-child --format=json < theme_mods_storefront.txt
# cleanup the temp file
rm -f theme_mods_storefront.txt
A: Wordpress theme modifications are saved in wp_options database table in theme_mods_{themename} field. You can copy it and rename using your child theme name.
A: I solved by simply copying the options in the database.
Here are the step-by-step procedure:
*
*Log into your phpMyAdmin and select the database of the webiste
*Backup the database
*Execute this query in order to have a clear view of the situation: SELECT * FROM wp_options WHERE option_name LIKE "theme_mods_%"; this instruction will return a row for every theme you have activated on your website so far
*Modify the row of the parent theme settings, identified by option_name = theme_mods_parent-theme-name
*Here, in the option_value field, you have all the parent theme settings in a serialized form; copy them; you can use an unserialize tool in order to see the content in a human-friendly form
*Come back to the point 3, but now modify the row of the child theme settings
*Paste the settings you have copied before in the option_value field; save
A: You could do something like what Genesis child themes include to save default theme settings when activating and switching themes:
//* Theme Setting Defaults
add_filter( 'genesis_theme_settings_defaults', 'child_theme_defaults' );
function child_theme_defaults( $defaults ) {
$defaults['blog_cat_num'] = 6;
$defaults['content_archive'] = 'full';
$defaults['content_archive_limit'] = 150;
$defaults['content_archive_thumbnail'] = 0;
$defaults['image_alignment'] = '';
$defaults['image_size'] = 'entry-image';
$defaults['posts_nav'] = 'prev-next';
$defaults['site_layout'] = 'full-width-content';
return $defaults;
}
//* Theme Setup
add_action( 'after_switch_theme', 'child_theme_setting_defaults' );
function child_theme_setting_defaults() {
if( function_exists( 'genesis_update_settings' ) ) {
genesis_update_settings( array(
'blog_cat_num' => 6,
'content_archive' => 'full',
'content_archive_limit' => 150,
'content_archive_thumbnail' => 0,
'image_alignment' => '',
'image_size' => 'entry-image',
'posts_nav' => 'prev-next',
'site_layout' => 'full-width-content',
) );
} else {
_genesis_update_settings( array(
'blog_cat_num' => 6,
'content_archive' => 'full',
'content_archive_limit' => 150,
'content_archive_thumbnail' => 0,
'image_alignment' => '',
'image_size' => 'entry-image',
'posts_nav' => 'prev-next',
'site_layout' => 'full-width-content',
) );
Clearly you would need to modify this code to work with your themes functionality.
| wordpress | {
"language": "en",
"length": 758,
"provenance": "stackexchange_00019.jsonl.gz:449402",
"question_score": "15",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163440"
} | [
0.01497650146484375,
-0.031585693359375,
0.0243072509765625,
-0.006317138671875,
-0.026702880859375,
-0.0050201416015625,
0.03924560546875,
-0.0130157470703125,
-0.032196044921875,
0.04974365234375,
0.024932861328125,
0.008819580078125,
0.00316619873046875,
-0.01546478271484375,
-0.03466796875,
-0.002742767333984375,
0.03607177734375,
-0.04827880859375,
0.01184844970703125,
0.0013895034790039062,
0.00334930419921875,
0.0240478515625,
0.02081298828125,
0.0440673828125,
0.024627685546875,
0.0029087066650390625,
-0.0077056884765625,
-0.01235198974609375,
0.01177215576171875,
-0.00473785400390625,
0.005462646484375,
0.01160430908203125,
0.03216552734375,
-0.0193328857421875,
0.0292510986328125,
0.038330078125,
0.02313232421875,
-0.023712158203125,
0.00789642333984375,
0.016326904296875,
0.01415252685546875,
-0.00457763671875,
0.0026340484619140625,
0.0100250244140625,
-0.01085662841796875,
-0.07513427734375,
0.03411865234375,
-0.0469970703125,
0.00640869140625,
-0.051483154296875,
0.040313720703125,
-0.00379180908203125,
0.0548095703125,
-0.0262603759765625,
-0.0225677490234375,
0.0187225341796875,
-0.01727294921875,
0.0092010498046875,
0.0372314453125,
-0.007659912109375,
-0.04595947265625,
-0.03375244140625,
0.023223876953125,
-0.0199737548828125,
0.032562255859375,
-0.005519866943359375,
0.0032176971435546875,
0.02288818359375,
-0.08953857421875,
0.0243988037109375,
0.0548095703125,
-0.0633544921875,
0.0308837890625,
-0.043060302734375,
0.0150909423828125,
0.011199951171875,
-0.0228424072265625,
-0.006465911865234375,
0.0180511474609375,
-0.0056915283203125,
-0.006610870361328125,
0.0177001953125,
-0.0281524658203125,
-0.054046630859375,
0.05755615234375,
-0.0169677734375,
-0.004398345947265625,
-0.007472991943359375,
-0.0220489501953125,
0.02777099609375,
-0.010406494140625,
-0.024505615234375,
-0.01036834716796875,
0.06805419921875,
0.019256591796875,
0.010986328125,
0.004520416259765625,
0.0439453125,
-0.018157958984375,
0.0174560546875,
-0.0120697021484375,
-0.02978515625,
0.016265869140625,
-0.039337158203125,
-0.0075225830078125,
0.0172119140625,
0.02618408203125,
-0.01473236083984375,
0.003360748291015625,
0.023162841796875,
-0.0105743408203125,
0.022705078125,
0.00447845458984375,
-0.033905029296875,
0.02301025390625,
-0.0018568038940429688,
-0.026153564453125,
0.058074951171875,
0.0032196044921875,
0.0018415451049804688,
0.019500732421875,
0.0247344970703125,
-0.022064208984375,
-0.040557861328125,
-0.005496978759765625,
-0.035888671875,
-0.0626220703125,
0.017486572265625,
-0.0194244384765625,
0.046905517578125,
-0.01322174072265625,
-0.0024204254150390625,
0.0071868896484375,
0.027313232421875,
-0.007137298583984375,
-0.02001953125,
0.0273284912109375,
-0.03082275390625,
0.0032634735107421875,
-0.0086669921875,
0.05279541015625,
-0.0301971435546875,
-0.0302581787109375,
0.03021240234375,
-0.003803253173828125,
0.006145477294921875,
-0.00885009765625,
0.03765869140625,
0.0208740234375,
-0.0234527587890625,
0.03961181640625,
-0.05657958984375,
0.0316162109375,
-0.0208282470703125,
0.0029697418212890625,
-0.04156494140625,
-0.02178955078125,
-0.00467681884765625,
0.025665283203125,
-0.00949859619140625,
-0.038177490234375,
0.0010738372802734375,
0.04388427734375,
-0.008209228515625,
-0.0272216796875,
0.005786895751953125,
0.005584716796875,
-0.00267791748046875,
0.00659942626953125,
-0.0142059326171875,
0.0308685302734375,
-0.0152435302734375,
-0.0626220703125,
0.004749298095703125,
0.0115203857421875,
0.0188140869140625,
-0.01505279541015625,
-0.036712646484375,
0.034454345703125,
0.010772705078125,
-0.00621795654296875,
-0.024749755859375,
-0.0151214599609375,
0.00701141357421875,
-0.0309600830078125,
0.0118560791015625,
-0.041473388671875,
-0.0261077880859375,
0.0694580078125,
-0.02423095703125,
-0.009552001953125,
0.0087890625,
-0.06158447265625,
-0.00862884521484375,
0.03851318359375,
-0.0015869140625,
-0.00615692138671875,
-0.00646209716796875,
0.01438140869140625,
-0.026214599609375,
-0.006439208984375,
-0.0224151611328125,
0.0206298828125,
-0.0408935546875,
-0.0343017578125,
-0.035430908203125,
-0.0028247833251953125,
0.0299530029296875,
-0.003082275390625,
0.047698974609375,
0.0146026611328125,
0.0184783935546875,
-0.0146331787109375,
-0.054412841796875,
-0.019683837890625,
-0.0150909423828125,
-0.0130615234375,
0.053314208984375,
0.033477783203125,
0.0229949951171875,
0.041961669921875,
0.006694793701171875,
0.05218505859375,
-0.0037899017333984375,
0.01168060302734375,
-0.004398345947265625,
-0.0263671875,
-0.01015472412109375,
-0.0018758773803710938,
0.01401519775390625,
-0.0155029296875,
0.015899658203125,
-0.01068878173828125,
0.0111236572265625,
-0.034271240234375,
-0.025665283203125,
-0.05523681640625,
-0.06134033203125,
0.00479888916015625,
0.053436279296875,
0.0221099853515625,
0.061798095703125,
-0.01030731201171875,
-0.01385498046875,
0.06396484375,
-0.0078277587890625,
0.01404571533203125,
-0.0182647705078125,
0.038543701171875,
0.032318115234375,
0.032806396484375,
-0.034332275390625,
0.007160186767578125,
-0.041259765625,
0.01508331298828125,
0.00787353515625,
-0.02197265625,
-0.0030727386474609375,
0.0229034423828125,
-0.011260986328125,
0.004947662353515625,
0.0099639892578125,
0.005817413330078125,
-0.0011310577392578125,
0.04022216796875,
0.0284423828125,
0.0295867919921875,
0.0207366943359375,
-0.0374755859375,
0.0260009765625,
0.01120758056640625,
-0.004474639892578125,
0.0167236328125,
0.051910400390625,
0.01432037353515625,
0.012908935546875,
0.006870269775390625,
-0.03631591796875,
-0.005603790283203125,
0.038970947265625,
0.00839996337890625,
0.031402587890625,
0.0093841552734375,
-0.01517486572265625,
-0.01073455810546875,
-0.039276123046875,
0.007171630859375,
0.030120849609375,
0.013671875,
0.005832672119140625,
0.0204925537109375,
0.036041259765625,
-0.01183319091796875,
0.049163818359375,
0.005748748779296875,
-0.0009288787841796875,
0.0207366943359375,
-0.0104217529296875,
0.0100860595703125,
-0.011505126953125,
0.02703857421875,
0.03955078125,
-0.006183624267578125,
0.0045013427734375,
0.029144287109375,
0.005153656005859375,
0.037353515625,
0.0140380859375,
0.0161590576171875,
0.0177154541015625,
-0.0458984375,
-0.00748443603515625,
0.01861572265625,
0.030517578125,
-0.022979736328125,
-0.034576416015625,
-0.01511383056640625,
0.0155792236328125,
-0.022705078125,
-0.0019664764404296875,
-0.052978515625,
-0.03204345703125,
-0.026947021484375,
-0.00629425048828125,
-0.00714111328125,
0.03759765625,
-0.0150146484375,
0.01076507568359375,
0.04498291015625,
-0.0633544921875,
-0.024322509765625,
-0.054229736328125,
-0.08154296875,
-0.049407958984375,
0.0170745849609375,
0.00041103363037109375,
-0.00698089599609375,
0.09234619140625,
0.0015964508056640625,
-0.062744140625,
-0.021209716796875,
-0.0107574462890625,
-0.005443572998046875,
0.02484130859375,
-0.004756927490234375,
-0.00687408447265625,
0.0024700164794921875,
0.022064208984375,
0.00568389892578125,
0.007843017578125,
-0.0273895263671875,
-0.017822265625,
-0.02911376953125,
-0.027252197265625,
-0.03173828125,
0.04638671875,
0.053070068359375,
-0.000812530517578125,
0.025390625,
-0.0374755859375,
-0.086669921875,
-0.01358795166015625,
-0.08929443359375,
0.06268310546875,
0.07861328125,
0.0005359649658203125,
-0.0156402587890625,
0.02197265625,
0.04205322265625,
-0.0007257461547851562,
0.0307464599609375,
0.001781463623046875,
0.035675048828125,
-0.0133056640625,
0.006938934326171875,
-0.046905517578125,
-0.0244140625,
-0.042266845703125,
0.0390625,
-0.0084991455078125,
0.00876617431640625,
-0.003978729248046875,
0.01354217529296875,
-0.00553131103515625,
-0.044952392578125,
0.0222320556640625,
-0.02203369140625,
0.03985595703125,
-0.0380859375,
-0.0203399658203125,
-0.03509521484375,
0.07904052734375,
-0.1016845703125,
-0.028656005859375,
0.0183563232421875,
0.03753662109375,
-0.01357269287109375,
0.0289306640625,
-0.037994384765625,
-0.041748046875,
-0.053497314453125,
-0.00001043081283569336,
-0.00386810302734375,
-0.019500732421875,
0.009033203125,
-0.0445556640625,
-0.0139312744140625,
-0.04241943359375,
0.034332275390625,
0.0168914794921875,
0.0258941650390625,
-0.028045654296875,
0.011566162109375,
-0.02178955078125,
-0.0091705322265625,
-0.001529693603515625,
-0.05023193359375,
-0.0202789306640625,
-0.01117706298828125,
0.06298828125,
0.0305633544921875,
-0.03857421875,
0.01145172119140625,
0.06658935546875,
-0.01413726806640625,
0.01045989990234375,
-0.01126861572265625,
0.0272674560546875,
-0.02734375,
-0.0196990966796875,
-0.0122222900390625,
-0.0283203125,
-0.003597259521484375,
0.0142822265625,
-0.05755615234375,
0.01360321044921875,
0.0064239501953125,
-0.0138092041015625,
0.06097412109375,
-0.04949951171875,
-0.04730224609375,
-0.01007080078125,
-0.0160675048828125,
-0.0205078125,
-0.005764007568359375,
-0.014801025390625,
-0.0009412765502929688,
-0.041595458984375,
0.007266998291015625,
-0.048583984375,
-0.019622802734375,
0.02752685546875,
0.068359375,
0.0196075439453125,
0.01291656494140625,
-0.0305938720703125,
-0.015350341796875,
0.02783203125,
0.016571044921875,
0.0120697021484375,
-0.0067596435546875,
-0.0228271484375,
0.03094482421875,
0.00296783447265625,
0.005588531494140625,
-0.01227569580078125,
0.07586669921875,
-0.007541656494140625,
-0.0262451171875,
0.03179931640625,
-0.0167999267578125,
0.00785064697265625,
-0.012542724609375,
-0.02655029296875,
0.00772857666015625,
-0.003894805908203125,
0.0112762451171875,
-0.0097503662109375,
0.0265045166015625,
-0.011016845703125,
-0.033935546875,
0.0106353759765625,
-0.0306549072265625,
0.04632568359375,
0.0311126708984375,
-0.00441741943359375,
0.03826904296875,
0.0026397705078125,
0.007160186767578125,
-0.01464080810546875,
0.035125732421875,
-0.009490966796875,
0.045074462890625,
0.0007748603820800781,
0.01070404052734375,
-0.031951904296875,
-0.006687164306640625,
0.0204010009765625,
-0.00007164478302001953,
-0.026275634765625,
0.00733184814453125,
-0.01934814453125,
0.0254364013671875,
0.0184173583984375,
-0.0206298828125,
0.0243988037109375,
0.0313720703125,
-0.026092529296875,
-0.009368896484375,
0.01690673828125,
-0.0138092041015625,
-0.038818359375,
-0.006534576416015625,
-0.01389312744140625,
-0.019927978515625,
0.0360107421875,
-0.0313720703125,
-0.0677490234375,
0.0112762451171875,
0.01678466796875,
-0.026763916015625,
-0.0262908935546875,
0.0000776052474975586,
0.007659912109375,
0.011932373046875,
0.05328369140625,
-0.0606689453125,
0.08392333984375,
-0.004344940185546875,
-0.027008056640625,
0.042144775390625,
0.023681640625,
0.00803375244140625,
0.0303802490234375,
-0.0193328857421875,
0.017547607421875,
-0.00701904296875,
-0.0055999755859375,
-0.039947509765625,
-0.0174560546875,
-0.004947662353515625,
-0.0101165771484375,
0.01186370849609375,
0.007965087890625,
-0.004398345947265625,
-0.028961181640625,
-0.05615234375,
-0.0596923828125,
0.052642822265625,
-0.08245849609375,
-0.005580902099609375,
0.00458526611328125,
-0.078369140625,
-0.0038852691650390625,
0.00408935546875,
-0.08892822265625,
-0.084228515625,
0.0178375244140625,
0.006443023681640625,
0.003665924072265625,
-0.004375457763671875,
0.00661468505859375,
-0.033538818359375,
0.004276275634765625,
-0.0183868408203125,
-0.0022792816162109375,
0.0693359375,
0.01308441162109375,
-0.029998779296875,
0.0024166107177734375,
-0.050933837890625,
0.003406524658203125,
-0.04010009765625,
-0.06317138671875,
-0.040496826171875,
0.005706787109375,
0.01171875,
0.02935791015625,
-0.03033447265625,
-0.050628662109375,
-0.03192138671875,
0.037994384765625,
0.059112548828125,
0.08685302734375,
-0.01800537109375,
0.07879638671875,
-0.0333251953125,
0.0243988037109375,
-0.0090789794921875,
0.01012420654296875,
-0.038818359375,
0.0187530517578125,
0.0130157470703125,
0.01397705078125,
-0.036163330078125,
-0.0276947021484375,
0.0026035308837890625,
0.0229644775390625,
0.09381103515625,
-0.0044403076171875,
0.044708251953125,
-0.032562255859375,
0.0012178421020507812,
-0.025360107421875,
0.031524658203125,
-0.068603515625,
-0.0066986083984375,
0.0303802490234375,
-0.0175018310546875,
-0.00969696044921875,
0.0007534027099609375,
-0.0175323486328125,
0.035980224609375,
-0.0018396377563476562,
0.0087432861328125,
0.0063934326171875,
-0.045257568359375,
0.0335693359375,
0.033233642578125,
0.0250396728515625,
0.056488037109375,
0.0006451606750488281,
0.047882080078125,
0.007091522216796875,
0.03985595703125,
-0.060394287109375,
-0.0245819091796875,
0.0295867919921875,
0.024627685546875,
-0.01537322998046875,
0.02197265625,
-0.015869140625,
-0.036163330078125,
0.04425048828125,
0.040924072265625,
-0.0714111328125,
-0.01142120361328125,
-0.0067138671875,
0.02001953125,
-0.016815185546875,
0.0251922607421875,
-0.032135009765625,
-0.006313323974609375,
-0.03271484375,
-0.0263519287109375,
-0.034881591796875,
-0.01064300537109375,
0.0215301513671875,
-0.0162200927734375,
-0.00605010986328125,
0.030487060546875,
0.002101898193359375,
-0.03515625,
0.00811767578125,
0.02606201171875,
-0.0136566162109375,
0.009429931640625,
0.020965576171875,
0.007541656494140625,
-0.0296630859375,
-0.06524658203125,
-0.01207733154296875,
-0.015869140625,
-0.0274200439453125,
-0.0240478515625,
-0.01155853271484375,
-0.001712799072265625,
0.0208892822265625,
-0.037078857421875,
0.0266571044921875,
-0.00252532958984375,
0.0196075439453125,
-0.00861358642578125,
-0.01959228515625,
0.0307464599609375,
-0.018646240234375,
-0.043487548828125,
0.007785797119140625,
-0.04144287109375,
-0.0233612060546875,
-0.0144195556640625,
0.01270294189453125,
0.049224853515625,
-0.01934814453125,
-0.017333984375,
0.042755126953125,
0.036285400390625,
-0.020843505859375,
-0.02728271484375,
0.03729248046875,
-0.05389404296875,
-0.0180816650390625,
-0.01396942138671875,
-0.01751708984375,
-0.01042938232421875,
-0.036773681640625,
-0.05810546875,
0.09747314453125,
-0.04241943359375,
0.024078369140625,
0.017974853515625,
0.05194091796875,
-0.034912109375,
0.0008392333984375,
0.01387786865234375,
0.04205322265625,
0.01050567626953125,
-0.006343841552734375,
-0.0487060546875,
-0.03265380859375,
-0.01177978515625,
0.07086181640625,
0.038177490234375,
0.00656890869140625,
-0.0140380859375,
0.004764556884765625,
0.062286376953125,
0.033538818359375,
0.005870819091796875,
0.0275421142578125,
-0.0242462158203125,
-0.0245208740234375,
0.00905609130859375,
-0.01934814453125,
0.0257415771484375,
-0.037078857421875,
-0.0248260498046875,
-0.0172119140625,
-0.008941650390625,
-0.021026611328125,
0.030181884765625,
0.05145263671875,
-0.01357269287109375,
0.0004718303680419922,
0.0095977783203125,
-0.09429931640625,
0.0222015380859375,
-0.0254058837890625,
0.00010609626770019531,
-0.01947021484375,
-0.03546142578125,
0.0086822509765625,
0.012420654296875,
0.0123748779296875,
-0.00223541259765625,
0.0040130615234375,
0.001796722412109375,
-0.03839111328125,
-0.0031108856201171875,
-0.01097869873046875,
0.025360107421875,
-0.02032470703125,
-0.03021240234375,
0.01555633544921875,
0.04150390625,
0.006404876708984375,
0.0194244384765625,
-0.0225982666015625,
-0.032501220703125,
0.005695343017578125,
-0.0704345703125,
-0.00603485107421875,
-0.007228851318359375,
0.00400543212890625,
0.0247650146484375,
0.0020599365234375,
-0.01364898681640625,
0.048248291015625,
-0.00630950927734375,
-0.01495361328125,
0.034027099609375,
0.0187225341796875,
0.011322021484375,
0.050689697265625,
-0.034210205078125,
-0.0237884521484375,
-0.01309967041015625,
-0.023529052734375,
-0.0435791015625,
0.009429931640625,
0.07122802734375,
0.0026397705078125,
0.0212554931640625,
-0.0183258056640625,
-0.031036376953125,
0.0322265625,
0.020721435546875,
0.036865234375,
-0.0179595947265625,
0.0075225830078125,
-0.0089263916015625,
0.01311492919921875,
0.01052093505859375,
-0.01424407958984375,
0.06097412109375,
0.0391845703125,
-0.06683349609375,
-0.022674560546875,
-0.01511383056640625,
-0.02679443359375,
0.01366424560546875,
-0.007549285888671875,
0.02520751953125,
0.0382080078125,
-0.0021514892578125,
-0.032073974609375,
0.0037593841552734375,
0.07769775390625,
0.027130126953125,
-0.0013179779052734375,
0.0198822021484375,
0.0129852294921875,
0.01274871826171875,
0.0263824462890625,
-0.02679443359375,
0.060089111328125,
-0.0306549072265625,
-0.0113677978515625,
0.01291656494140625,
0.0003209114074707031,
-0.0083465576171875,
0.02252197265625,
-0.030303955078125,
0.042572021484375,
-0.00849151611328125,
-0.033721923828125,
-0.01427459716796875,
0.0177764892578125,
0.0008730888366699219,
-0.0059814453125,
-0.01474761962890625,
-0.0102996826171875,
-0.04498291015625,
-0.0212554931640625,
-0.03216552734375,
0.0296478271484375,
-0.00319671630859375,
0.09063720703125,
-0.03240966796875,
0.0205535888671875,
0.032562255859375,
-0.00960540771484375,
0.025115966796875,
0.0013818740844726562,
0.061309814453125,
-0.004314422607421875,
-0.004032135009765625,
-0.029205322265625,
-0.08935546875,
0.046844482421875,
0.041351318359375,
0.0243072509765625,
0.028839111328125,
0.043548583984375,
0.00992584228515625,
-0.0289764404296875,
0.0137481689453125,
-0.012969970703125,
-0.044647216796875,
-0.043670654296875,
-0.0103302001953125,
0.01070404052734375,
0.00647735595703125,
0.004840850830078125,
0.0286102294921875,
0.059722900390625,
0.0196990966796875,
0.0310821533203125,
0.017608642578125,
0.0196685791015625,
0.01168060302734375,
0.0035610198974609375,
-0.065185546875,
0.02362060546875,
-0.009765625,
0.0031185150146484375,
0.001438140869140625,
0.0758056640625,
0.024932861328125,
-0.05657958984375,
0.043487548828125,
0.0306549072265625,
0.038604736328125,
-0.0521240234375,
0.00699615478515625,
0.0391845703125,
0.019866943359375,
0.04656982421875,
-0.0298309326171875,
-0.027923583984375,
-0.042999267578125,
0.004947662353515625,
0.02679443359375,
-0.02850341796875,
-0.045501708984375,
-0.06378173828125,
0.008056640625,
0.053680419921875,
0.017120361328125,
-0.057952880859375,
0.024566650390625,
-0.00057220458984375,
0.0367431640625,
0.020904541015625,
-0.061126708984375,
0.00904083251953125,
-0.041046142578125,
0.0191650390625,
0.00921630859375,
-0.04034423828125,
0.0176849365234375,
0.0192413330078125,
0.0186767578125,
0.026336669921875,
0.0045623779296875,
0.043731689453125,
0.019561767578125,
-0.00677490234375,
0.08203125,
-0.05810546875,
-0.0268096923828125,
-0.004215240478515625,
0.029022216796875,
-0.00011867284774780273,
-0.014801025390625,
0.00882720947265625,
-0.00913238525390625,
-0.0113067626953125,
-0.0255279541015625,
0.0012178421020507812,
0.01439666748046875,
-0.0305938720703125,
-0.0367431640625,
0.1004638671875,
-0.01045989990234375,
-0.0213165283203125,
-0.0016326904296875,
-0.00994110107421875,
-0.00948333740234375,
0.034942626953125,
0.015777587890625,
-0.013214111328125,
-0.00827789306640625,
0.032806396484375,
0.00717926025390625,
0.042236328125,
0.00058746337890625,
-0.0029773712158203125,
-0.053863525390625,
-0.0176544189453125,
-0.03582763671875,
0.01129150390625,
0.0196380615234375,
0.002742767333984375,
0.0139617919921875,
0.0230712890625,
-0.032012939453125,
-0.00505828857421875,
-0.0181427001953125,
-0.01514434814453125,
-0.0283660888671875,
0.0067291259765625,
-0.00560760498046875,
0.0061187744140625,
0.04571533203125,
0.0523681640625,
0.002750396728515625,
-0.03179931640625,
-0.06524658203125,
-0.0098724365234375,
-0.0362548828125,
-0.00417327880859375,
0.037353515625,
-0.0716552734375,
0.023895263671875,
-0.0250701904296875,
0.00015926361083984375,
0.0207366943359375,
0.006900787353515625,
0.0020351409912109375,
-0.021148681640625,
0.004940032958984375,
-0.0145416259765625,
-0.055816650390625,
-0.0379638671875,
0.0170745849609375,
0.00823974609375,
0.031829833984375,
0.005847930908203125,
0.02032470703125,
0.041107177734375,
0.11846923828125,
0.042938232421875,
0.02520751953125,
-0.058135986328125,
-0.0038928985595703125,
0.0143890380859375,
0.03851318359375,
-0.0224151611328125,
-0.047027587890625,
0.023590087890625,
-0.006252288818359375,
-0.004398345947265625,
-0.016021728515625,
-0.029388427734375,
0.01432037353515625,
-0.049346923828125,
0.05474853515625,
-0.0012273788452148438,
0.0197906494140625,
-0.0219573974609375,
0.048858642578125,
-0.0194854736328125,
0.001377105712890625,
-0.0273590087890625,
0.0006413459777832031,
0.0078125,
-0.0212860107421875,
0.0201873779296875,
-0.066162109375,
0.032196044921875,
-0.01751708984375,
0.0005140304565429688,
0.032196044921875
]
|
30596e619dbdffff1fb0f0b837c07e4c65b6021b | Wordpress Stackexchange
Q: Are post ID's reliable? I understand that post ID's are unique, but are they reliable as persistent data ID's?
More specifically, is there a guarantee that, through a migration or another data exchange, post ID's will not change?
I understand wordpress is primarily implemented using MySQL, so ID's are governed by the AUTO_INCREMENT mechanism; however, is there any caveat on Wordpress' end that would change this behavior in the future, or potentially with another persistence implementation (such as MongoDB)?
A:
I understand that post ID's are unique, but are they reliable as persistent data ID's?
Yes.
| Q: Are post ID's reliable? I understand that post ID's are unique, but are they reliable as persistent data ID's?
More specifically, is there a guarantee that, through a migration or another data exchange, post ID's will not change?
I understand wordpress is primarily implemented using MySQL, so ID's are governed by the AUTO_INCREMENT mechanism; however, is there any caveat on Wordpress' end that would change this behavior in the future, or potentially with another persistence implementation (such as MongoDB)?
A:
I understand that post ID's are unique, but are they reliable as persistent data ID's?
Yes.
A: The pedantic answer is NO.
While IDs are unique they can change without any change in UX as long as the change retains the consistency of the DB. And while creating a new post will generate a new unique ID, you can also create a post via code to reuse some "old" ID.
In practice they are reliable, but if reliability is very important to you then you need to attach some data to the post which will be used as the reliable identifier for your own needs.
Update: totally forgot about it because it is rarely used, and most of the time I seen it used it was used incorrectly, but wordpress has a reliable unique identifier by definition and it is the GUID
A: To recap everything that has been said, the answer is:
Yes, IDs are reliable for this, as long as you don't use the WordPress XML exporter/importer to take the posts in question into a different installation. As long as you migrate the existing database and don't install WordPress from scratch, IDs will remain the same.
PS1: Yes, as Mark Kaplun states, IDs can change or be reused if you manually change or reuse them yourself, but you already know that, and it's true for any field on any database ever.
PS2: The wp_posts GUID field should not be trusted as constant, since they depend on the original posts' URLs and can inadvertently be replaced with new URLs when the website gets migrated, and obviously the GUID would change as well when using the exporter/importer.
A: The answer can be Both Yes and No.
Id needs to be unique for one site. You know, if there were two id, the content can not be served. As WP use id to serve content for post and pages. WordPress loop is designed to work like this. So, you can use it for your theme or plugin development. There will be no problem with this.
But it can be a pain for you if you export content from one website to another. As the new website might generate unique id for the newly added content. In that case the id can not be a good solution.
So you can use slug instead of ids.
P.S. Slug also can be changed. But it will not automatically changed when you import content from one website to another.
Hope this helps.
Sabbir
A: Post ID's are not necessarily unique. Ref. my answer on the post you linked to: https://wordpress.stackexchange.com/a/209832/71131
Within a Wordpress Multisite Network, id's are not unique. A blog post on one site can have the same id as a blog post on another site. Probably since each site has a separate database/table. (This just happened to me.) This is problematic if you in your code (in a plugin, or in a third party service communicating with the Wordpress installation) are using the Wordpress id's to refer to a specific unique blog post on the Wordpress Multisite Network.
Therefore, I recommend using $post->guid instead, which is what Wordpress has dedicated as the Global Unique IDentifier. Thanks to @Mark Kaplun for making me aware of this. NB: The guid must be in lowercaps for it to work.
@guidod mentioned the risk that "[the guid can] inadvertently be replaced with new URLs when the website gets migrated", because someone might do a find/replace on all URI's, and/or want to update the URI part of the GUID as well, even though they shouldn't ever change anything in the GUID. To mitigate this risk, you can also store the $post->ID as a backup. If your third party service accessing and referring to blog posts in your Wordpress installation cannot find a post based on the guid, then the post's ID can be attempted (but remember to contextualize it based on the appropriate blog/site, if you're doing it on a multisite installation).
| wordpress | {
"language": "en",
"length": 745,
"provenance": "stackexchange_00019.jsonl.gz:449482",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163737"
} | [
0.08038330078125,
0.0108489990234375,
0.01152801513671875,
-0.014404296875,
0.040008544921875,
-0.037445068359375,
0.07611083984375,
-0.033416748046875,
-0.0193328857421875,
0.051788330078125,
-0.006954193115234375,
-0.017913818359375,
0.033294677734375,
-0.0202789306640625,
-0.0283203125,
-0.0286712646484375,
0.003192901611328125,
0.007663726806640625,
-0.006618499755859375,
-0.02874755859375,
0.0100555419921875,
-0.020965576171875,
-0.0141448974609375,
0.027587890625,
0.06787109375,
-0.0198516845703125,
0.000476837158203125,
-0.022003173828125,
0.04669189453125,
0.01387786865234375,
0.037506103515625,
-0.0281219482421875,
0.0008883476257324219,
0.0135498046875,
0.0042877197265625,
-0.031402587890625,
0.03656005859375,
-0.00048613548278808594,
0.0158843994140625,
0.018463134765625,
-0.002544403076171875,
-0.007289886474609375,
0.07818603515625,
-0.035858154296875,
0.02178955078125,
0.019256591796875,
-0.035064697265625,
-0.08123779296875,
0.02569580078125,
0.01053619384765625,
0.00262451171875,
0.034759521484375,
0.01375579833984375,
0.01290130615234375,
-0.015838623046875,
-0.0102691650390625,
-0.00933837890625,
-0.06512451171875,
0.030426025390625,
-0.0055694580078125,
0.0027904510498046875,
-0.04681396484375,
0.044281005859375,
-0.0022335052490234375,
0.01163482666015625,
-0.00908660888671875,
0.0361328125,
0.03125,
-0.058197021484375,
0.00531005859375,
0.040252685546875,
-0.0289764404296875,
-0.0208892822265625,
-0.0245208740234375,
0.01168060302734375,
-0.00017118453979492188,
0.00872802734375,
-0.0304412841796875,
-0.0264892578125,
0.04071044921875,
0.020904541015625,
0.02947998046875,
-0.0180206298828125,
-0.0103912353515625,
-0.01007843017578125,
-0.0190887451171875,
-0.006076812744140625,
-0.019317626953125,
-0.049163818359375,
-0.05474853515625,
-0.0364990234375,
-0.06182861328125,
-0.037261962890625,
-0.0173492431640625,
-0.0310821533203125,
-0.0179443359375,
0.00821685791015625,
0.061279296875,
-0.0433349609375,
0.02142333984375,
-0.040435791015625,
0.0007195472717285156,
0.0029354095458984375,
-0.03192138671875,
-0.0088043212890625,
0.000020325183868408203,
0.01480865478515625,
-0.00801849365234375,
0.00984954833984375,
0.0263671875,
-0.035186767578125,
-0.002376556396484375,
0.0103607177734375,
-0.01495361328125,
-0.034881591796875,
0.02496337890625,
0.0108642578125,
-0.011444091796875,
-0.002475738525390625,
-0.007251739501953125,
0.0223236083984375,
0.050262451171875,
-0.04052734375,
-0.029266357421875,
0.00685882568359375,
0.0008234977722167969,
-0.0223846435546875,
0.005290985107421875,
-0.06951904296875,
0.018096923828125,
-0.03460693359375,
0.034820556640625,
0.0821533203125,
0.0068817138671875,
-0.01922607421875,
-0.017669677734375,
-0.03485107421875,
-0.035125732421875,
-0.004528045654296875,
-0.00475311279296875,
-0.007503509521484375,
-0.04290771484375,
0.0199432373046875,
-0.002529144287109375,
-0.01320648193359375,
0.0245819091796875,
0.0305633544921875,
0.01534271240234375,
-0.0192108154296875,
-0.057281494140625,
0.0036640167236328125,
0.0030193328857421875,
-0.010162353515625,
0.0047149658203125,
0.041473388671875,
-0.0394287109375,
0.018951416015625,
-0.039093017578125,
0.044769287109375,
-0.01331329345703125,
0.036834716796875,
0.005184173583984375,
0.0283966064453125,
0.0158233642578125,
-0.0164031982421875,
-0.006313323974609375,
-0.0304412841796875,
-0.01268768310546875,
0.017974853515625,
0.0312042236328125,
0.0028629302978515625,
-0.004669189453125,
-0.017333984375,
-0.005130767822265625,
-0.00446319580078125,
0.00620269775390625,
0.0033817291259765625,
-0.02899169921875,
0.025726318359375,
0.0225372314453125,
-0.0103759765625,
-0.0231170654296875,
0.0293121337890625,
-0.0013284683227539062,
-0.026641845703125,
0.05535888671875,
0.0191497802734375,
0.08575439453125,
-0.015380859375,
0.0250244140625,
0.0038585662841796875,
0.0175933837890625,
-0.05126953125,
0.054046630859375,
0.0164337158203125,
-0.021575927734375,
-0.023712158203125,
-0.004856109619140625,
0.0004706382751464844,
-0.037139892578125,
-0.0015573501586914062,
0.01273345947265625,
-0.02154541015625,
0.001338958740234375,
-0.08544921875,
-0.00963592529296875,
-0.0289306640625,
0.043182373046875,
0.03570556640625,
0.053192138671875,
0.00511932373046875,
0.0074005126953125,
-0.02728271484375,
0.02197265625,
-0.02252197265625,
-0.03021240234375,
-0.01617431640625,
-0.06640625,
-0.0496826171875,
0.00891876220703125,
-0.0867919921875,
0.040374755859375,
-0.10308837890625,
-0.00695037841796875,
0.002536773681640625,
-0.00860595703125,
0.0005602836608886719,
-0.01235198974609375,
0.0230560302734375,
0.0042266845703125,
0.030242919921875,
0.0002155303955078125,
-0.007305145263671875,
0.007610321044921875,
-0.01535797119140625,
-0.0270843505859375,
-0.032958984375,
-0.11798095703125,
0.0217742919921875,
0.07818603515625,
0.029876708984375,
-0.030731201171875,
-0.002658843994140625,
0.03424072265625,
-0.0230560302734375,
0.00756072998046875,
0.039031982421875,
-0.0044403076171875,
0.010009765625,
0.038177490234375,
-0.006092071533203125,
0.01255035400390625,
0.0202178955078125,
-0.0296630859375,
-0.0030002593994140625,
0.0361328125,
-0.00372314453125,
0.043670654296875,
-0.01220703125,
0.020538330078125,
-0.03387451171875,
-0.00450897216796875,
0.0426025390625,
-0.0360107421875,
0.00960540771484375,
0.01025390625,
0.0465087890625,
0.0290069580078125,
0.003078460693359375,
0.0008106231689453125,
-0.002460479736328125,
-0.0312042236328125,
-0.004512786865234375,
0.053802490234375,
0.042694091796875,
0.029632568359375,
-0.0259857177734375,
-0.032745361328125,
0.01007080078125,
0.056640625,
-0.0123138427734375,
0.0016870498657226562,
-0.01244354248046875,
-0.001941680908203125,
-0.0042724609375,
-0.0296478271484375,
0.0254058837890625,
0.01447296142578125,
0.00970458984375,
-0.01108551025390625,
0.0112152099609375,
0.0323486328125,
-0.0401611328125,
0.06549072265625,
0.0007085800170898438,
-0.0225372314453125,
-0.0276947021484375,
-0.036590576171875,
0.0203399658203125,
-0.0443115234375,
0.0281524658203125,
0.05517578125,
0.004520416259765625,
0.003936767578125,
-0.0032520294189453125,
0.0694580078125,
0.050567626953125,
-0.019073486328125,
-0.0160980224609375,
-0.0013065338134765625,
-0.019256591796875,
-0.02130126953125,
0.00525665283203125,
0.08453369140625,
-0.0137481689453125,
-0.046356201171875,
0.02276611328125,
0.0206298828125,
-0.063720703125,
-0.1142578125,
-0.0262908935546875,
0.034332275390625,
-0.021575927734375,
0.002971649169921875,
0.0303192138671875,
0.007007598876953125,
-0.0194091796875,
0.0015811920166015625,
-0.0126495361328125,
-0.01194000244140625,
-0.0550537109375,
-0.045135498046875,
-0.04962158203125,
-0.00925445556640625,
-0.0142669677734375,
0.004558563232421875,
0.0118865966796875,
0.0271453857421875,
0.0188446044921875,
-0.035308837890625,
0.0014801025390625,
0.02178955078125,
-0.02716064453125,
-0.01490020751953125,
-0.039886474609375,
0.0024566650390625,
0.0283660888671875,
-0.0003151893615722656,
-0.00254058837890625,
0.007598876953125,
0.0159759521484375,
-0.0166778564453125,
-0.00927734375,
0.0283050537109375,
0.0163421630859375,
-0.04443359375,
-0.007114410400390625,
0.0626220703125,
0.0105133056640625,
-0.0050048828125,
-0.048248291015625,
0.006439208984375,
-0.03900146484375,
-0.0153350830078125,
-0.01023101806640625,
0.00043201446533203125,
-0.0197906494140625,
0.040740966796875,
0.0003273487091064453,
-0.0242462158203125,
-0.0194244384765625,
-0.03802490234375,
0.018890380859375,
0.017364501953125,
0.030120849609375,
0.0194854736328125,
0.005725860595703125,
-0.0290679931640625,
0.0137176513671875,
-0.0183258056640625,
-0.005451202392578125,
-0.021514892578125,
0.00974273681640625,
-0.034637451171875,
-0.07159423828125,
0.038299560546875,
-0.022247314453125,
0.00560760498046875,
-0.0048828125,
-0.014678955078125,
0.0267791748046875,
0.08892822265625,
-0.0256500244140625,
-0.009490966796875,
0.0224151611328125,
0.005260467529296875,
-0.0240478515625,
0.00008803606033325195,
-0.06549072265625,
-0.01142120361328125,
0.034271240234375,
-0.020111083984375,
-0.01096343994140625,
0.0036754608154296875,
-0.0238037109375,
0.039031982421875,
0.016387939453125,
0.006244659423828125,
0.0224456787109375,
-0.036956787109375,
0.0244293212890625,
-0.00832366943359375,
0.038238525390625,
-0.0416259765625,
0.0014925003051757812,
-0.040191650390625,
-0.05615234375,
-0.017852783203125,
-0.006763458251953125,
0.03857421875,
0.00890350341796875,
-0.013092041015625,
0.01360321044921875,
0.0494384765625,
-0.0194091796875,
0.061492919921875,
0.0013523101806640625,
0.0474853515625,
-0.0266876220703125,
-0.07476806640625,
0.0132904052734375,
-0.056976318359375,
-0.017425537109375,
-0.049072265625,
0.0106353759765625,
-0.0263671875,
-0.053436279296875,
0.006072998046875,
-0.036376953125,
0.013153076171875,
-0.0322265625,
-0.020355224609375,
-0.016876220703125,
0.0300750732421875,
-0.0098114013671875,
-0.00341033935546875,
-0.0416259765625,
-0.053863525390625,
0.07806396484375,
0.02099609375,
0.0360107421875,
0.003673553466796875,
0.0927734375,
-0.0090484619140625,
-0.0367431640625,
-0.0760498046875,
0.01512908935546875,
0.0290679931640625,
0.01496124267578125,
0.03973388671875,
0.033966064453125,
-0.00675201416015625,
0.0290069580078125,
0.0138702392578125,
-0.023468017578125,
-0.0299072265625,
0.06390380859375,
-0.00818634033203125,
-0.00476837158203125,
0.00852203369140625,
-0.04681396484375,
0.0633544921875,
0.0684814453125,
0.00052642822265625,
-0.0169830322265625,
-0.0202789306640625,
0.0307464599609375,
-0.0129547119140625,
-0.0286712646484375,
-0.046051025390625,
-0.061553955078125,
0.03656005859375,
-0.051422119140625,
-0.0195770263671875,
-0.01180267333984375,
0.0069122314453125,
0.0074005126953125,
-0.018798828125,
0.003925323486328125,
0.017822265625,
0.01198577880859375,
0.0170440673828125,
0.027435302734375,
0.04510498046875,
0.01715087890625,
-0.0264739990234375,
-0.01499176025390625,
0.07135009765625,
-0.00905609130859375,
-0.051544189453125,
0.023345947265625,
-0.0210723876953125,
0.0172271728515625,
0.0413818359375,
-0.003139495849609375,
0.039276123046875,
0.011199951171875,
-0.04327392578125,
-0.0193023681640625,
-0.0242919921875,
-0.0220184326171875,
-0.067138671875,
0.00701904296875,
-0.00033164024353027344,
-0.00597381591796875,
0.0628662109375,
0.00623321533203125,
0.03753662109375,
0.00873565673828125,
-0.033172607421875,
0.067138671875,
0.0738525390625,
0.0166015625,
-0.000629425048828125,
0.00965118408203125,
-0.035980224609375,
0.025604248046875,
-0.023101806640625,
-0.0501708984375,
0.006076812744140625,
0.030181884765625,
0.045867919921875,
-0.01837158203125,
-0.034912109375,
0.01995849609375,
-0.022064208984375,
-0.01235198974609375,
0.022308349609375,
-0.027374267578125,
-0.07049560546875,
0.01519775390625,
0.0443115234375,
-0.001911163330078125,
-0.0251922607421875,
0.0095672607421875,
-0.06268310546875,
-0.043243408203125,
-0.04608154296875,
-0.037078857421875,
-0.0008807182312011719,
-0.03216552734375,
-0.028594970703125,
-0.0118255615234375,
-0.041900634765625,
-0.04388427734375,
0.03240966796875,
0.004364013671875,
-0.0171966552734375,
-0.01139068603515625,
0.0279083251953125,
0.0018177032470703125,
0.038543701171875,
-0.004695892333984375,
-0.0384521484375,
0.032745361328125,
-0.00093841552734375,
0.047760009765625,
0.01003265380859375,
-0.00530242919921875,
-0.01114654541015625,
-0.04364013671875,
-0.0243682861328125,
0.01751708984375,
-0.003875732421875,
-0.03167724609375,
-0.011474609375,
0.0117034912109375,
0.0151824951171875,
-0.004291534423828125,
-0.0159149169921875,
-0.0036163330078125,
0.011383056640625,
0.0131378173828125,
0.02703857421875,
-0.00803375244140625,
0.021453857421875,
0.00978851318359375,
0.00487518310546875,
0.0105133056640625,
0.006076812744140625,
-0.0046844482421875,
-0.0214385986328125,
-0.00945281982421875,
0.01038360595703125,
0.009796142578125,
0.004718780517578125,
0.0340576171875,
-0.037109375,
0.0005311965942382812,
-0.01062774658203125,
0.051422119140625,
-0.019134521484375,
0.002063751220703125,
-0.0021190643310546875,
-0.00724029541015625,
-0.0457763671875,
0.0012674331665039062,
0.06768798828125,
-0.0164642333984375,
-0.01488494873046875,
0.03289794921875,
0.03619384765625,
-0.035675048828125,
-0.00566864013671875,
-0.03131103515625,
-0.004505157470703125,
-0.019561767578125,
0.01187896728515625,
0.02239990234375,
0.04327392578125,
0.04168701171875,
-0.00027751922607421875,
0.039764404296875,
0.00021278858184814453,
0.04107666015625,
-0.026031494140625,
-0.022552490234375,
0.0226287841796875,
0.0002237558364868164,
-0.031402587890625,
-0.0225677490234375,
-0.0301513671875,
0.00711822509765625,
-0.0221710205078125,
0.031402587890625,
0.0252532958984375,
0.0032196044921875,
0.0031585693359375,
-0.05218505859375,
0.0162811279296875,
-0.01337432861328125,
0.025604248046875,
0.00644683837890625,
0.00714111328125,
0.031402587890625,
-0.037689208984375,
-0.0106658935546875,
-0.0162353515625,
-0.015838623046875,
-0.019195556640625,
0.0216522216796875,
0.0088958740234375,
0.00994110107421875,
-0.00928497314453125,
-0.002307891845703125,
0.0100555419921875,
-0.025726318359375,
0.00312042236328125,
0.00820159912109375,
-0.0307464599609375,
-0.049591064453125,
0.0149078369140625,
-0.00008314847946166992,
0.009735107421875,
-0.002979278564453125,
0.0170440673828125,
0.09246826171875,
0.0243682861328125,
0.0318603515625,
-0.05096435546875,
-0.005123138427734375,
0.043212890625,
-0.0504150390625,
-0.050567626953125,
0.0129852294921875,
0.048614501953125,
-0.0499267578125,
0.0477294921875,
-0.00496673583984375,
-0.02239990234375,
0.0034618377685546875,
-0.025726318359375,
0.054473876953125,
-0.05303955078125,
-0.005512237548828125,
-0.0014171600341796875,
-0.00047397613525390625,
0.023681640625,
0.0065460205078125,
-0.011016845703125,
-0.035186767578125,
-0.00563812255859375,
-0.005023956298828125,
-0.030609130859375,
0.0024166107177734375,
-0.004474639892578125,
-0.047698974609375,
0.06988525390625,
0.00391387939453125,
0.009033203125,
-0.0035419464111328125,
0.02349853515625,
-0.0168304443359375,
0.0169219970703125,
-0.013397216796875,
0.023223876953125,
-0.034332275390625,
0.021331787109375,
-0.0399169921875,
-0.0188751220703125,
-0.0069732666015625,
0.046112060546875,
0.06903076171875,
0.0142822265625,
-0.03118896484375,
-0.007213592529296875,
0.034393310546875,
0.0218353271484375,
-0.0025119781494140625,
0.034515380859375,
0.01183319091796875,
0.03369140625,
0.049896240234375,
-0.045318603515625,
0.0306243896484375,
-0.029083251953125,
0.013824462890625,
0.016143798828125,
0.0177154541015625,
0.0023670196533203125,
0.013092041015625,
-0.03436279296875,
-0.014923095703125,
0.009063720703125,
-0.002841949462890625,
0.03515625,
0.034637451171875,
0.043701171875,
0.0726318359375,
-0.0692138671875,
-0.004993438720703125,
-0.02362060546875,
0.07196044921875,
0.006389617919921875,
-0.0057220458984375,
0.02923583984375,
0.00812530517578125,
0.0268707275390625,
0.0167083740234375,
-0.004474639892578125,
0.01052093505859375,
0.00823211669921875,
0.061553955078125,
0.01453399658203125,
0.0333251953125,
-0.06146240234375,
-0.044708251953125,
0.04864501953125,
0.0882568359375,
-0.032867431640625,
-0.03253173828125,
0.016693115234375,
0.00208282470703125,
0.00013947486877441406,
-0.0201873779296875,
0.00928497314453125,
-0.0092315673828125,
0.0279083251953125,
0.0145111083984375,
-0.006465911865234375,
0.03021240234375,
0.01421356201171875,
0.02239990234375,
0.0648193359375,
-0.0380859375,
-0.01049041748046875,
-0.04974365234375,
0.0119171142578125,
0.0034942626953125,
0.041595458984375,
0.02862548828125,
0.02630615234375,
0.02020263671875,
-0.016815185546875,
-0.012420654296875,
0.021240234375,
0.026947021484375,
0.001522064208984375,
-0.0511474609375,
-0.060089111328125,
0.04833984375,
0.050140380859375,
0.009002685546875,
0.06060791015625,
0.06622314453125,
0.039031982421875,
-0.0137481689453125,
-0.0117340087890625,
0.031768798828125,
-0.0254974365234375,
0.002544403076171875,
-0.0164794921875,
-0.0279998779296875,
-0.0017004013061523438,
-0.019500732421875,
-0.0015134811401367188,
0.01476287841796875,
0.021270751953125,
0.040924072265625,
0.0333251953125,
0.016204833984375,
-0.0008382797241210938,
0.016204833984375,
0.0247650146484375,
0.03729248046875,
0.07244873046875,
-0.0015106201171875,
-0.0178070068359375,
0.003177642822265625,
0.0157470703125,
-0.01442718505859375,
0.013916015625,
-0.003749847412109375,
0.034576416015625,
0.020843505859375,
-0.0008187294006347656,
0.01036834716796875,
-0.0269775390625,
0.0203094482421875,
-0.01425933837890625,
0.0194549560546875,
0.00946807861328125,
-0.0185089111328125,
0.005756378173828125,
0.0307769775390625,
-0.0221405029296875,
-0.0241851806640625,
0.037353515625,
0.00659942626953125,
-0.0218048095703125,
-0.042724609375,
0.0288543701171875,
-0.07867431640625,
-0.01605224609375,
0.0011138916015625,
-0.02203369140625,
-0.00945281982421875,
0.0298309326171875,
0.01514434814453125,
0.007053375244140625,
0.0166168212890625,
-0.020294189453125,
0.007843017578125,
-0.05902099609375,
0.0204010009765625,
0.0106964111328125,
0.00362396240234375,
-0.0208892822265625,
-0.040557861328125,
-0.035858154296875,
0.004573822021484375,
0.02252197265625,
0.03399658203125,
-0.019134521484375,
0.0640869140625,
-0.0181884765625,
-0.01538848876953125,
0.029327392578125,
-0.08795166015625,
0.017730712890625,
0.0208892822265625,
0.0003237724304199219,
-0.00691986083984375,
-0.039398193359375,
-0.03082275390625,
-0.011688232421875,
-0.011474609375,
0.0166473388671875,
-0.0182037353515625,
-0.0250701904296875,
0.01482391357421875,
0.070068359375,
0.083251953125,
0.0149993896484375,
0.0357666015625,
0.009368896484375,
-0.0085296630859375,
0.0258026123046875,
0.03369140625,
0.00328826904296875,
0.007030487060546875,
-0.0174102783203125,
-0.002399444580078125,
0.0039215087890625,
-0.006862640380859375,
0.0029392242431640625,
-0.0269775390625,
0.017120361328125,
-0.01232147216796875,
0.0168609619140625,
-0.0087738037109375,
-0.016845703125,
-0.0200347900390625,
-0.015716552734375,
0.05340576171875,
-0.0104827880859375,
0.0208892822265625,
-0.056182861328125,
-0.0292205810546875,
-0.0134429931640625,
0.034088134765625,
-0.0247039794921875,
0.01177215576171875,
0.006710052490234375,
-0.03118896484375,
-0.0172119140625,
0.0147247314453125,
0.042083740234375,
0.039886474609375,
0.06298828125,
-0.017059326171875,
0.020294189453125,
-0.006191253662109375,
-0.01258087158203125,
-0.0667724609375,
0.0108642578125,
-0.10223388671875,
-0.01053619384765625,
-0.07049560546875,
0.0477294921875,
0.0377197265625,
-0.0141143798828125,
-0.052459716796875,
0.0731201171875,
-0.042999267578125,
-0.005706787109375,
-0.004703521728515625,
-0.033416748046875,
-0.0060882568359375,
0.005706787109375,
-0.0128326416015625,
-0.0139617919921875,
-0.03509521484375,
0.033477783203125,
0.017913818359375,
0.0235595703125,
0.044647216796875,
0.0028228759765625,
0.003963470458984375,
0.015960693359375,
0.008758544921875,
0.03814697265625,
0.0264434814453125,
-0.019500732421875,
0.0310516357421875,
0.030731201171875,
-0.057647705078125,
-0.001972198486328125,
-0.032684326171875,
0.024566650390625,
-0.0450439453125,
-0.0293426513671875,
-0.0004029273986816406,
0.0179901123046875,
0.05938720703125,
0.10772705078125,
0.001262664794921875,
-0.06915283203125,
0.0175628662109375,
-0.015350341796875,
-0.03887939453125,
-0.0007996559143066406,
0.0217742919921875,
-0.04779052734375,
-0.0053863525390625,
0.0102996826171875,
0.017364501953125,
0.0003147125244140625,
-0.032073974609375,
0.0135040283203125,
-0.01434326171875,
0.016510009765625,
-0.024932861328125,
0.04931640625,
-0.0232696533203125,
0.0004730224609375,
-0.010009765625,
-0.0139923095703125,
-0.004352569580078125,
0.0214080810546875,
-0.0141448974609375,
0.034027099609375,
0.02557373046875,
0.034393310546875,
-0.02374267578125,
0.00818634033203125,
0.030914306640625,
0.018707275390625,
-0.0228271484375,
-0.0154876708984375,
-0.00783538818359375,
0.0173492431640625,
0.02313232421875,
0.039703369140625,
-0.0225067138671875,
0.0020847320556640625,
0.0014314651489257812,
0.01384735107421875,
-0.00238037109375,
0.00621795654296875,
-0.0095367431640625,
0.0400390625,
-0.0509033203125,
-0.0052032470703125,
-0.03509521484375,
-0.0209808349609375,
0.01070404052734375,
0.01071929931640625,
-0.0015287399291992188,
-0.0369873046875,
0.009918212890625,
0.00583648681640625,
0.00992584228515625,
0.014068603515625
]
|
157aba1c29e0330fafcb548f9e680119a05c2a8a | Wordpress Stackexchange
Q: No CSS being loaded on backend I have a WordPress installation on AWS and I was facing an issue that authors are not able to submit content like media in one go and a time-out error occurs. After refreshing the page 5-6 times authors are able to upload content again.
To mitigate this issue, I deactivated all the plugins and upgraded to WordPress 4.0 from the back-end, which also raised a problem and I had to rerun the update manually.
So I downloaded the latest WordPress Zip and followed the instructions as mention on http://codex.wordpress.org/Updating_WordPress.
Finally, in the last step, when I refreshed the browser window, it asked that the database needs an upgrade too. So I followed the on-screen instructions and logged into my WordPress.
After logging in, the WordPress back-end looks like in the following screenshot:
It looks as if no CSS being loaded. How can I solve this issue?
A: In wp-config.php before require_once add below code into file :
define('CONCATENATE_SCRIPTS', false);
| Q: No CSS being loaded on backend I have a WordPress installation on AWS and I was facing an issue that authors are not able to submit content like media in one go and a time-out error occurs. After refreshing the page 5-6 times authors are able to upload content again.
To mitigate this issue, I deactivated all the plugins and upgraded to WordPress 4.0 from the back-end, which also raised a problem and I had to rerun the update manually.
So I downloaded the latest WordPress Zip and followed the instructions as mention on http://codex.wordpress.org/Updating_WordPress.
Finally, in the last step, when I refreshed the browser window, it asked that the database needs an upgrade too. So I followed the on-screen instructions and logged into my WordPress.
After logging in, the WordPress back-end looks like in the following screenshot:
It looks as if no CSS being loaded. How can I solve this issue?
A: In wp-config.php before require_once add below code into file :
define('CONCATENATE_SCRIPTS', false);
A: First of all visit: how to fix wordpress admin style problem
it is possible that one plugin incorrectly enqueued some style or jquery file
in the wp-admin/load-styles.php file, change "error_reporting(0);" to "error_reporting( E_ALL | E_STRICT );" then refresh the page, if the page style return to normal, reverse the code change to it's initial state, and your site should look fine.
also adding these line to wp-config.php
define( ‘CONCATENATE_SCRIPTS’, false );
define( ‘SCRIPT_DEBUG’, true );
could help
Then if you have time:
*
*backup your db (using phpmyadmin export)
*install a fresh wordpress from scrach,
*copy old theme folder to new wordpress (wp-content/themes/)
*go to admin->plugin page
*drop db of new wordpress,
*import old db from your backup_db file, using phpmyadmin
*refresh your plugin page
*copy plugins to your wp-content/plugins/ folder
*active them one by one to find out if one of them caused the problem
A: I had the same problem and tried the above suggestions first, but they didn't work. Then I realized my issue was coming from mixed content being delivered and I found this answer, which references this answer and explains that it's how Cloudflare's headers confuse WordPress.
Adding the following to wp-config.php worked for me:
if ($_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') $_SERVER['HTTPS']='on';
but before the line:
require_once(ABSPATH . 'wp-settings.php');
A: I found that my wordpress was set to http:// but I had installed a certificate and needed https://
Changing the default to https:// in wordpress settings fixed it.
A: Adding these two lines to "wp-config.php" worked for me. I had the same issue.
define( 'CONCATENATE_SCRIPTS', false );
define( 'SCRIPT_DEBUG', true );
Also, remember to clear cache on server and browser.
A: I had the same issue. I went into my ftp / file manager and discovered that my css folder in the wp-admin folder was missing (I have no idea how it happened). Which makes complete sense - the formatting is what is messed up on the admin site, but not on my actual website. I added the css folder back into the wp-admin folder and everything was solved.
A: I was using MAMP which runs on port 8888, and I had to change my Wordpress database's options table rows site_url and home values from http://localhost/ to http://localhost:8888/ and that fixed it for me.
A: For me it was an .htaccess file in wp-admin directory
A: This happened to me more than once, such as after migrating to a new domain.
First time: set domain in wp-config.php...
define( 'WP_SITEURL', 'https://some.domain' );
define( 'WP_HOME', 'https://some.domain' );
Second time: set domain in SQL database...
wp_options > wp_options
wp_options > home
Note http vs https can also cause a problem if it is set wrong.
| wordpress | {
"language": "en",
"length": 612,
"provenance": "stackexchange_00019.jsonl.gz:449495",
"question_score": "13",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163802"
} | [
0.050018310546875,
0.0005083084106445312,
0.0010395050048828125,
-0.0231170654296875,
0.0020160675048828125,
-0.0277557373046875,
0.007091522216796875,
-0.0229949951171875,
0.00975799560546875,
0.0042877197265625,
-0.03216552734375,
0.0254058837890625,
-0.037261962890625,
-0.0136871337890625,
-0.01251983642578125,
-0.041595458984375,
0.046844482421875,
-0.03460693359375,
0.0195465087890625,
0.0025768280029296875,
-0.023529052734375,
0.028564453125,
0.0361328125,
0.05194091796875,
0.020538330078125,
-0.0294647216796875,
0.06787109375,
-0.006626129150390625,
0.01291656494140625,
-0.0180816650390625,
0.0237884521484375,
-0.007717132568359375,
0.021392822265625,
0.0309295654296875,
-0.057708740234375,
-0.0198516845703125,
-0.00997161865234375,
0.01456451416015625,
-0.03741455078125,
0.058197021484375,
0.0193939208984375,
-0.037628173828125,
0.031707763671875,
0.042236328125,
0.020538330078125,
-0.043182373046875,
0.0382080078125,
-0.0703125,
-0.00743865966796875,
-0.03033447265625,
-0.0132598876953125,
0.039093017578125,
0.01372528076171875,
0.0010614395141601562,
-0.0015573501586914062,
0.007053375244140625,
-0.005657196044921875,
0.07855224609375,
0.0187530517578125,
-0.01476287841796875,
-0.029205322265625,
0.03021240234375,
-0.007350921630859375,
-0.005680084228515625,
0.019744873046875,
0.0046234130859375,
0.0087127685546875,
0.0221405029296875,
-0.04583740234375,
0.00963592529296875,
0.01375579833984375,
-0.04541015625,
-0.01497650146484375,
-0.00037860870361328125,
0.004364013671875,
-0.0013751983642578125,
0.01568603515625,
-0.0126953125,
0.009765625,
0.034332275390625,
0.00981903076171875,
0.01071929931640625,
-0.049530029296875,
-0.02581787109375,
0.0316162109375,
0.004314422607421875,
-0.0013904571533203125,
-0.01517486572265625,
-0.0140380859375,
0.00902557373046875,
-0.025726318359375,
-0.0244293212890625,
0.005985260009765625,
0.004077911376953125,
-0.007740020751953125,
-0.034759521484375,
0.0161895751953125,
0.022796630859375,
0.02093505859375,
0.0262451171875,
-0.034423828125,
-0.025115966796875,
0.032379150390625,
-0.037933349609375,
0.01067352294921875,
0.0256500244140625,
-0.0084381103515625,
0.00469207763671875,
0.049285888671875,
0.0170745849609375,
0.0028324127197265625,
0.0256195068359375,
0.005306243896484375,
0.0206298828125,
-0.04510498046875,
-0.010528564453125,
-0.004199981689453125,
-0.015899658203125,
-0.0191192626953125,
-0.021484375,
0.00011968612670898438,
0.0239715576171875,
-0.057708740234375,
0.0010824203491210938,
0.016876220703125,
0.01401519775390625,
0.0281219482421875,
-0.0028133392333984375,
0.023193359375,
-0.00942230224609375,
-0.036224365234375,
0.0289154052734375,
0.036163330078125,
-0.005191802978515625,
-0.0113677978515625,
-0.00885772705078125,
0.005584716796875,
-0.0137481689453125,
-0.00682830810546875,
0.0279693603515625,
-0.022552490234375,
-0.0701904296875,
-0.002147674560546875,
0.004169464111328125,
0.0285186767578125,
0.0254058837890625,
0.029510498046875,
0.0059967041015625,
-0.00322723388671875,
-0.0498046875,
0.0292816162109375,
0.006847381591796875,
0.07086181640625,
0.01523590087890625,
-0.04241943359375,
-0.035186767578125,
0.07513427734375,
-0.0677490234375,
-0.05047607421875,
-0.09130859375,
-0.002368927001953125,
0.02459716796875,
0.052276611328125,
-0.02587890625,
-0.003513336181640625,
-0.06256103515625,
-0.022430419921875,
0.006633758544921875,
0.0184173583984375,
-0.045257568359375,
-0.00843048095703125,
-0.01141357421875,
0.029693603515625,
-0.005077362060546875,
-0.00103759765625,
0.050079345703125,
0.04217529296875,
0.03582763671875,
-0.005306243896484375,
0.0189361572265625,
-0.016143798828125,
-0.0335693359375,
0.10296630859375,
-0.05950927734375,
-0.0296478271484375,
0.01030731201171875,
-0.0012531280517578125,
0.07147216796875,
0.02899169921875,
0.031646728515625,
-0.01473236083984375,
-0.0156097412109375,
0.00855255126953125,
0.0275115966796875,
0.022491455078125,
-0.03668212890625,
-0.03271484375,
0.0131072998046875,
-0.00612640380859375,
-0.03045654296875,
0.0227813720703125,
0.009735107421875,
0.0238800048828125,
-0.0017976760864257812,
-0.035736083984375,
-0.0033245086669921875,
-0.021453857421875,
0.0093994140625,
-0.007785797119140625,
0.0123291015625,
0.0261688232421875,
0.0274658203125,
-0.0231781005859375,
-0.061126708984375,
-0.0233306884765625,
0.03631591796875,
-0.02545166015625,
0.037872314453125,
0.01506805419921875,
0.043914794921875,
0.0223388671875,
-0.01473236083984375,
0.018157958984375,
-0.0151519775390625,
0.034820556640625,
0.0105743408203125,
-0.00157928466796875,
-0.0247955322265625,
0.08599853515625,
-0.00756072998046875,
0.06201171875,
0.002506256103515625,
0.044189453125,
0.045745849609375,
-0.037353515625,
-0.008056640625,
-0.0421142578125,
-0.042510986328125,
-0.0124664306640625,
0.052154541015625,
0.03277587890625,
-0.044036865234375,
-0.0264129638671875,
-0.0018892288208007812,
0.01422882080078125,
-0.0146331787109375,
0.00725555419921875,
0.0039215087890625,
-0.002147674560546875,
-0.0018262863159179688,
0.0036640167236328125,
-0.010711669921875,
0.04217529296875,
-0.07177734375,
0.02593994140625,
0.048126220703125,
0.01053619384765625,
-0.0021724700927734375,
0.00699615478515625,
-0.003162384033203125,
0.01535797119140625,
-0.014923095703125,
-0.04083251953125,
-0.01055908203125,
0.00007021427154541016,
0.02606201171875,
-0.0022335052490234375,
-0.00568389892578125,
-0.0225372314453125,
0.0287322998046875,
0.0145721435546875,
-0.08172607421875,
0.002655029296875,
0.0242919921875,
0.03759765625,
0.022613525390625,
-0.018707275390625,
-0.0208740234375,
0.0264434814453125,
0.0250091552734375,
-0.047576904296875,
-0.050262451171875,
-0.0262298583984375,
0.005100250244140625,
0.008575439453125,
-0.04498291015625,
0.043182373046875,
0.00380706787109375,
0.022857666015625,
0.053985595703125,
0.0482177734375,
0.0254974365234375,
0.02496337890625,
-0.00017905235290527344,
0.005115509033203125,
0.00846099853515625,
0.02630615234375,
0.01971435546875,
0.004688262939453125,
0.03497314453125,
0.007904052734375,
0.047760009765625,
0.01555633544921875,
0.012420654296875,
0.006504058837890625,
0.030059814453125,
0.007564544677734375,
0.0124359130859375,
-0.00972747802734375,
-0.006175994873046875,
-0.03271484375,
0.0103912353515625,
0.0361328125,
0.045074462890625,
-0.0046234130859375,
-0.04241943359375,
-0.0350341796875,
0.038970947265625,
-0.09283447265625,
-0.0675048828125,
-0.041748046875,
-0.054290771484375,
-0.036346435546875,
-0.00432586669921875,
-0.03546142578125,
0.0194091796875,
0.004974365234375,
0.0087127685546875,
0.0030498504638671875,
-0.05029296875,
-0.08050537109375,
-0.0863037109375,
-0.09130859375,
-0.021026611328125,
0.01038360595703125,
0.0128936767578125,
0.007656097412109375,
0.08355712890625,
0.005481719970703125,
-0.07086181640625,
-0.006153106689453125,
0.01861572265625,
-0.026702880859375,
0.0222015380859375,
0.0123443603515625,
-0.0221710205078125,
0.042388916015625,
-0.00688934326171875,
0.01456451416015625,
0.04571533203125,
-0.032257080078125,
-0.031890869140625,
-0.0282745361328125,
-0.07427978515625,
-0.043182373046875,
0.07196044921875,
0.049774169921875,
-0.044036865234375,
0.0258941650390625,
-0.056060791015625,
-0.037506103515625,
0.0026569366455078125,
-0.03857421875,
0.0106658935546875,
0.016387939453125,
-0.0144805908203125,
-0.02471923828125,
0.035125732421875,
-0.005748748779296875,
-0.004131317138671875,
0.04083251953125,
-0.005687713623046875,
-0.0012121200561523438,
-0.019622802734375,
-0.03155517578125,
-0.0193023681640625,
0.043701171875,
-0.01148223876953125,
0.0015935897827148438,
0.01029205322265625,
-0.0020542144775390625,
-0.00617218017578125,
-0.03155517578125,
-0.052734375,
-0.05908203125,
0.049591064453125,
0.0021953582763671875,
0.0224761962890625,
-0.046234130859375,
-0.031829833984375,
-0.00742340087890625,
0.09503173828125,
0.004589080810546875,
-0.006519317626953125,
0.046234130859375,
0.0215911865234375,
-0.07733154296875,
-0.057952880859375,
-0.076171875,
0.0147552490234375,
-0.005657196044921875,
-0.0168914794921875,
0.00012362003326416016,
-0.0262451171875,
0.01297760009765625,
-0.0863037109375,
0.006366729736328125,
-0.02032470703125,
0.009765625,
-0.0223541259765625,
-0.008270263671875,
0.007320404052734375,
-0.02777099609375,
-0.00310516357421875,
0.0026302337646484375,
-0.036895751953125,
-0.11273193359375,
-0.0141754150390625,
-0.0101470947265625,
0.0526123046875,
-0.0125579833984375,
0.0272979736328125,
-0.01898193359375,
0.056610107421875,
-0.0164031982421875,
0.0248870849609375,
-0.01531982421875,
-0.00402069091796875,
0.01358795166015625,
-0.01244354248046875,
-0.00922393798828125,
0.0013875961303710938,
-0.0073089599609375,
-0.0188140869140625,
0.0028591156005859375,
0.0089569091796875,
-0.0290374755859375,
-0.010955810546875,
-0.027984619140625,
-0.0016298294067382812,
-0.0174102783203125,
-0.0242462158203125,
-0.016021728515625,
0.00598907470703125,
0.03070068359375,
-0.0413818359375,
-0.02947998046875,
-0.0084075927734375,
0.03778076171875,
-0.031829833984375,
0.0016527175903320312,
-0.004848480224609375,
0.05792236328125,
0.02435302734375,
-0.01378631591796875,
0.0198822021484375,
-0.01227569580078125,
0.0182037353515625,
0.004756927490234375,
0.039581298828125,
0.01294708251953125,
-0.0144195556640625,
0.05523681640625,
0.0019989013671875,
0.03717041015625,
0.0037670135498046875,
0.0239105224609375,
-0.0031032562255859375,
-0.031951904296875,
0.044036865234375,
0.01392364501953125,
-0.038909912109375,
0.031097412109375,
0.006572723388671875,
0.0007042884826660156,
0.01264190673828125,
-0.0015964508056640625,
-0.001056671142578125,
-0.044677734375,
-0.02740478515625,
-0.02520751953125,
0.00016319751739501953,
-0.0293731689453125,
0.06939697265625,
0.031036376953125,
0.0053253173828125,
0.059814453125,
0.055755615234375,
-0.01885986328125,
0.0071868896484375,
-0.039093017578125,
0.008270263671875,
-0.0221099853515625,
0.044189453125,
-0.005931854248046875,
0.01277923583984375,
-0.0178375244140625,
0.08380126953125,
0.0256195068359375,
-0.044647216796875,
-0.003246307373046875,
0.0034542083740234375,
0.012298583984375,
0.0003006458282470703,
0.0006737709045410156,
0.038726806640625,
-0.0126190185546875,
-0.01108551025390625,
-0.0196533203125,
0.0149688720703125,
-0.0577392578125,
-0.04180908203125,
0.06182861328125,
-0.0035858154296875,
0.0028839111328125,
0.02313232421875,
0.01467132568359375,
0.0323486328125,
0.00615692138671875,
-0.019683837890625,
-0.007080078125,
-0.0223541259765625,
0.022003173828125,
0.020355224609375,
-0.0055389404296875,
0.0038051605224609375,
0.00887298583984375,
0.03765869140625,
-0.08123779296875,
-0.023681640625,
0.02886962890625,
0.07684326171875,
-0.02294921875,
-0.034210205078125,
0.0261993408203125,
-0.01629638671875,
-0.031768798828125,
0.01448822021484375,
-0.03857421875,
-0.04534912109375,
-0.044036865234375,
-0.00031495094299316406,
0.032257080078125,
0.01242828369140625,
0.0045928955078125,
-0.00004279613494873047,
0.0026569366455078125,
0.0233306884765625,
0.00940704345703125,
0.0115509033203125,
-0.008392333984375,
-0.006805419921875,
0.01091766357421875,
-0.038238525390625,
-0.00817108154296875,
-0.015594482421875,
0.0306854248046875,
-0.0221099853515625,
-0.01885986328125,
0.017303466796875,
-0.0198822021484375,
-0.0028591156005859375,
-0.01194000244140625,
0.01471710205078125,
-0.0023441314697265625,
0.015960693359375,
0.005764007568359375,
-0.0192718505859375,
-0.0011053085327148438,
-0.002422332763671875,
-0.038177490234375,
-0.028961181640625,
-0.0256500244140625,
-0.0244140625,
-0.0282440185546875,
-0.0033245086669921875,
-0.00617218017578125,
-0.0011701583862304688,
-0.0298309326171875,
-0.04217529296875,
-0.060577392578125,
0.05511474609375,
0.07745361328125,
0.037200927734375,
-0.001251220703125,
0.045257568359375,
-0.01190185546875,
0.0242462158203125,
0.0204620361328125,
0.04217529296875,
-0.0186767578125,
-0.01873779296875,
-0.0036449432373046875,
-0.08111572265625,
-0.040740966796875,
0.0218048095703125,
-0.0511474609375,
0.06829833984375,
0.064697265625,
-0.0007963180541992188,
0.0009713172912597656,
-0.042266845703125,
-0.0165863037109375,
-0.0014295578002929688,
0.057952880859375,
0.018096923828125,
0.00312042236328125,
0.018402099609375,
0.002777099609375,
0.03759765625,
-0.009246826171875,
-0.03363037109375,
0.027496337890625,
-0.0065155029296875,
0.033660888671875,
-0.01419830322265625,
-0.0064849853515625,
0.0103302001953125,
0.04351806640625,
-0.01409912109375,
0.04241943359375,
0.00438690185546875,
0.011383056640625,
0.055755615234375,
0.0230712890625,
-0.032196044921875,
-0.0243072509765625,
0.033721923828125,
0.0044708251953125,
-0.0045928955078125,
0.01412200927734375,
-0.014617919921875,
0.01371002197265625,
0.047637939453125,
0.06829833984375,
-0.04913330078125,
-0.0074310302734375,
0.0128021240234375,
-0.031646728515625,
0.004543304443359375,
-0.00907135009765625,
-0.02642822265625,
-0.036376953125,
0.03338623046875,
0.041534423828125,
-0.0172576904296875,
0.038238525390625,
0.0291900634765625,
0.01059722900390625,
0.0009632110595703125,
0.042724609375,
-0.0147552490234375,
-0.0517578125,
-0.04931640625,
0.043853759765625,
-0.0518798828125,
-0.024627685546875,
0.00360107421875,
0.00926971435546875,
-0.0188140869140625,
-0.05999755859375,
0.01031494140625,
-0.003002166748046875,
-0.0201873779296875,
-0.0037059783935546875,
0.040863037109375,
-0.035125732421875,
0.06353759765625,
-0.020904541015625,
0.0113983154296875,
0.04278564453125,
-0.0140380859375,
0.01079559326171875,
-0.0125274658203125,
0.007717132568359375,
0.0282135009765625,
-0.04779052734375,
0.029296875,
-0.0100860595703125,
-0.0035552978515625,
-0.008087158203125,
-0.03668212890625,
0.036956787109375,
-0.004268646240234375,
-0.0071563720703125,
0.03741455078125,
-0.00814056396484375,
-0.029205322265625,
0.00400543212890625,
0.00893402099609375,
-0.032440185546875,
-0.00856781005859375,
0.01535797119140625,
-0.0102996826171875,
-0.006404876708984375,
0.01375579833984375,
-0.038726806640625,
0.056427001953125,
-0.0233001708984375,
0.030242919921875,
0.05450439453125,
0.01253509521484375,
-0.05133056640625,
-0.03204345703125,
-0.0086517333984375,
0.0213470458984375,
-0.0095062255859375,
0.007480621337890625,
-0.031494140625,
-0.01428985595703125,
-0.00012552738189697266,
0.052154541015625,
0.004474639892578125,
-0.017791748046875,
-0.0132904052734375,
0.0007481575012207031,
0.051055908203125,
0.051788330078125,
0.022308349609375,
0.0080413818359375,
-0.0302276611328125,
0.001483917236328125,
0.0103302001953125,
-0.020263671875,
0.023284912109375,
-0.01349639892578125,
-0.05853271484375,
-0.004673004150390625,
0.0159912109375,
0.02142333984375,
0.01369476318359375,
0.03924560546875,
-0.0086212158203125,
-0.00531768798828125,
0.033935546875,
0.01053619384765625,
-0.01169586181640625,
0.03564453125,
0.00571441650390625,
-0.07830810546875,
0.0024585723876953125,
-0.0374755859375,
0.042083740234375,
-0.020843505859375,
-0.0306549072265625,
-0.00977325439453125,
0.002780914306640625,
-0.01331329345703125,
-0.01381683349609375,
-0.034637451171875,
0.0090484619140625,
0.018402099609375,
0.0151214599609375,
-0.0169525146484375,
0.032470703125,
-0.032257080078125,
-0.0106658935546875,
0.0036029815673828125,
0.00493621826171875,
-0.00647735595703125,
-0.038421630859375,
0.017913818359375,
0.000762939453125,
-0.0180511474609375,
0.0024356842041015625,
-0.013946533203125,
-0.04095458984375,
-0.0121002197265625,
0.004726409912109375,
-0.0267791748046875,
-0.0236053466796875,
0.01010894775390625,
0.008544921875,
0.0640869140625,
0.00939178466796875,
-0.031219482421875,
-0.005863189697265625,
-0.01094818115234375,
0.0311279296875,
0.0234222412109375,
-0.0174102783203125,
0.056365966796875,
-0.0029621124267578125,
-0.0014009475708007812,
-0.033538818359375,
0.03338623046875,
0.01934814453125,
0.037628173828125,
-0.0157318115234375,
0.02227783203125,
-0.0014362335205078125,
0.0156097412109375,
-0.01318359375,
0.00170135498046875,
0.0280914306640625,
0.033538818359375,
-0.037994384765625,
-0.0243988037109375,
0.05877685546875,
-0.0083465576171875,
-0.048187255859375,
-0.01551055908203125,
0.01020050048828125,
0.031402587890625,
0.0252838134765625,
-0.0164642333984375,
0.04583740234375,
0.0192718505859375,
-0.0433349609375,
0.020233154296875,
0.0007119178771972656,
-0.030120849609375,
0.0018672943115234375,
0.01230621337890625,
0.0170440673828125,
0.0027923583984375,
-0.03717041015625,
-0.0008697509765625,
-0.01129150390625,
0.00926971435546875,
-0.0062103271484375,
0.01506805419921875,
-0.00714111328125,
0.033447265625,
0.0267181396484375,
-0.033050537109375,
-0.051483154296875,
0.0526123046875,
0.051422119140625,
0.0287628173828125,
-0.006130218505859375,
0.030517578125,
-0.07708740234375,
-0.0369873046875,
-0.021759033203125,
0.0223541259765625,
-0.02691650390625,
0.11358642578125,
-0.034210205078125,
-0.015869140625,
0.0223388671875,
0.00669097900390625,
0.00890350341796875,
0.022857666015625,
-0.032470703125,
0.0038623809814453125,
0.0281982421875,
-0.01514434814453125,
-0.03387451171875,
0.03668212890625,
0.0303802490234375,
-0.004119873046875,
0.033660888671875,
0.006351470947265625,
0.0122528076171875,
-0.01483917236328125,
-0.041290283203125,
-0.0404052734375,
-0.014007568359375,
0.02496337890625,
0.0125579833984375,
-0.00966644287109375,
-0.02093505859375,
-0.0167236328125,
0.01214599609375,
0.0026149749755859375,
-0.0267791748046875,
0.027008056640625,
-0.03424072265625,
0.0280303955078125,
0.0235137939453125,
0.01090240478515625,
-0.01727294921875,
0.00931549072265625,
-0.01018524169921875,
0.0021457672119140625,
0.0238800048828125,
-0.00045108795166015625,
0.017730712890625,
-0.0178070068359375,
0.046112060546875,
0.070068359375,
0.06439208984375,
-0.024200439453125,
0.018585205078125,
0.07598876953125,
-0.00836944580078125,
-0.00469970703125,
-0.00749969482421875,
-0.01020050048828125,
-0.05914306640625,
0.00024044513702392578,
0.01230621337890625,
-0.014251708984375,
-0.01485443115234375,
0.0011806488037109375,
0.0142059326171875,
0.03692626953125,
-0.003711700439453125,
-0.0609130859375,
0.058441162109375,
-0.0548095703125,
0.042938232421875,
-0.0290679931640625,
0.008514404296875,
0.0081939697265625,
0.06427001953125,
-0.0260009765625,
-0.0269927978515625,
0.0038738250732421875,
0.02081298828125,
-0.02880859375,
-0.0270843505859375,
0.01073455810546875,
0.0162353515625,
0.01239013671875,
-0.046173095703125,
-0.0096282958984375,
0.01316070556640625,
-0.029571533203125,
0.00928497314453125,
0.0027408599853515625,
0.036956787109375,
-0.040069580078125,
-0.0772705078125,
-0.01459503173828125,
0.006557464599609375,
0.01276397705078125,
-0.08001708984375,
0.0250396728515625,
-0.007099151611328125,
-0.061187744140625,
-0.10919189453125,
0.0095672607421875,
-0.0225372314453125,
-0.0219879150390625,
-0.0234832763671875,
-0.006214141845703125,
-0.0099029541015625,
0.01183319091796875,
-0.0088653564453125,
-0.02813720703125,
-0.005718231201171875,
0.045196533203125,
0.019805908203125,
-0.00966644287109375,
0.034515380859375,
-0.0125579833984375,
-0.09136962890625,
-0.006862640380859375,
-0.010345458984375,
0.0186920166015625,
-0.0240478515625,
0.025726318359375,
0.0037250518798828125,
0.020416259765625,
-0.0188751220703125,
0.0074005126953125,
0.028594970703125,
-0.021728515625,
0.0128021240234375,
-0.02301025390625,
-0.017059326171875,
-0.00945281982421875,
0.036956787109375,
0.0205535888671875,
0.01306915283203125,
-0.01287841796875,
-0.0377197265625,
-0.026153564453125,
-0.01108551025390625,
-0.0179443359375,
0.0222320556640625,
-0.07647705078125,
0.0014181137084960938,
0.002925872802734375,
0.013641357421875,
-0.0132293701171875,
0.00460052490234375,
-0.01071929931640625,
-0.03741455078125,
-0.01739501953125,
-0.01300811767578125,
-0.0170745849609375,
-0.045654296875,
0.01136016845703125,
0.0039215087890625,
0.0275726318359375,
-0.0031414031982421875,
0.036773681640625,
0.0173187255859375,
0.0638427734375,
0.0313720703125,
0.00215911865234375,
-0.025177001953125,
0.0236663818359375,
0.0124359130859375,
0.00925445556640625,
-0.0287322998046875,
-0.034088134765625,
-0.0012979507446289062,
-0.012725830078125,
-0.023162841796875,
-0.03302001953125,
0.0279541015625,
-0.01003265380859375,
-0.040374755859375,
0.09796142578125,
-0.019378662109375,
-0.046234130859375,
-0.04644775390625,
0.033416748046875,
0.0029926300048828125,
-0.00676727294921875,
0.044189453125,
0.00788116455078125,
0.0107269287109375,
-0.022186279296875,
0.01336669921875,
-0.05963134765625,
0.041229248046875,
-0.01324462890625,
-0.0096588134765625,
0.030120849609375
]
|
7fe608f98acb1ae3464688d8ec1b56fa0a4cb11b | Wordpress Stackexchange
Q: How to create bulk page and content? I am creating a website about cars. I want to have a page for each car, with subpages (i.e. Gallery, Specs, etc...) for each car page. I have the content on my hard drive for each car. Doing this manually will take forever, so i was thinking of writing a code (maybe in python) that will fill the contents for each car into an html file; however, i read that Wordpress doesn't store files but instead keeps the content in a database. So my question is, what's the best way to create bulk pages and upload them to Wordpress? Is there a plugin which i'm missing that can do this?
Thanks.
A: I would suggest manually creating your first page (a custom post type might make more sense here?) in WordPress and then use the fantastic WP CSV plugin to export the page.
Using the first page fields as a guide, simply copy your car data into the appropriate cell in a chart and import the completed CSV data when finished.
| Q: How to create bulk page and content? I am creating a website about cars. I want to have a page for each car, with subpages (i.e. Gallery, Specs, etc...) for each car page. I have the content on my hard drive for each car. Doing this manually will take forever, so i was thinking of writing a code (maybe in python) that will fill the contents for each car into an html file; however, i read that Wordpress doesn't store files but instead keeps the content in a database. So my question is, what's the best way to create bulk pages and upload them to Wordpress? Is there a plugin which i'm missing that can do this?
Thanks.
A: I would suggest manually creating your first page (a custom post type might make more sense here?) in WordPress and then use the fantastic WP CSV plugin to export the page.
Using the first page fields as a guide, simply copy your car data into the appropriate cell in a chart and import the completed CSV data when finished.
| wordpress | {
"language": "en",
"length": 179,
"provenance": "stackexchange_00019.jsonl.gz:449540",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/163976"
} | [
-0.00753021240234375,
-0.01230621337890625,
-0.03009033203125,
-0.0170745849609375,
-0.0109100341796875,
-0.0270843505859375,
0.0003573894500732422,
-0.006011962890625,
-0.0252838134765625,
-0.0107879638671875,
-0.059783935546875,
0.0401611328125,
-0.03790283203125,
-0.00005239248275756836,
0.0270843505859375,
-0.043212890625,
0.019561767578125,
-0.0265045166015625,
0.0032596588134765625,
-0.01812744140625,
0.0139007568359375,
-0.0125885009765625,
0.0245819091796875,
0.0423583984375,
0.02777099609375,
0.0087127685546875,
-0.01110076904296875,
0.01448822021484375,
-0.0037403106689453125,
-0.0192413330078125,
0.0113677978515625,
0.0121612548828125,
0.01055908203125,
0.01959228515625,
-0.007579803466796875,
0.04522705078125,
-0.023590087890625,
0.022613525390625,
0.038116455078125,
0.00228118896484375,
0.0150299072265625,
0.01018524169921875,
0.0177001953125,
0.01491546630859375,
-0.00791168212890625,
-0.0290069580078125,
-0.003192901611328125,
-0.047119140625,
0.01309967041015625,
-0.0095367431640625,
-0.0146942138671875,
0.0279998779296875,
-0.006908416748046875,
-0.0142822265625,
-0.003917694091796875,
-0.011566162109375,
-0.0291595458984375,
0.0203094482421875,
0.044952392578125,
-0.02734375,
-0.021392822265625,
-0.035308837890625,
0.027862548828125,
0.0010538101196289062,
-0.0257415771484375,
0.013702392578125,
-0.021881103515625,
0.0008134841918945312,
-0.019500732421875,
-0.027099609375,
-0.004634857177734375,
-0.017242431640625,
0.0067291259765625,
-0.0288543701171875,
0.0277557373046875,
0.01412200927734375,
-0.019683837890625,
-0.0033321380615234375,
-0.0001621246337890625,
0.0249176025390625,
-0.01003265380859375,
0.02984619140625,
0.004253387451171875,
-0.025238037109375,
-0.0003478527069091797,
-0.0143585205078125,
-0.0269012451171875,
-0.004032135009765625,
0.006748199462890625,
0.01546478271484375,
-0.006473541259765625,
-0.020172119140625,
0.03131103515625,
0.036346435546875,
-0.0160675048828125,
-0.006946563720703125,
-0.004589080810546875,
0.039398193359375,
-0.01136016845703125,
0.05377197265625,
0.00534820556640625,
-0.060791015625,
0.10546875,
-0.07379150390625,
0.0253143310546875,
0.0261688232421875,
-0.021209716796875,
-0.0927734375,
0.034881591796875,
0.0034618377685546875,
-0.014404296875,
0.0726318359375,
-0.01033782958984375,
-0.0155487060546875,
-0.01593017578125,
0.032135009765625,
-0.025360107421875,
0.0081787109375,
0.0011453628540039062,
0.030426025390625,
0.013671875,
0.056671142578125,
-0.057891845703125,
-0.035003662109375,
-0.00949859619140625,
-0.01090240478515625,
0.00954437255859375,
-0.01336669921875,
0.0096282958984375,
0.006755828857421875,
-0.0278778076171875,
0.01323699951171875,
0.0625,
0.0251617431640625,
0.0106658935546875,
-0.01165771484375,
0.0278472900390625,
-0.00750732421875,
0.0126190185546875,
0.005764007568359375,
-0.01047515869140625,
-0.004756927490234375,
0.03204345703125,
-0.035675048828125,
-0.00743865966796875,
0.030670166015625,
0.013519287109375,
0.0144500732421875,
-0.01457977294921875,
-0.032196044921875,
-0.007633209228515625,
-0.00896453857421875,
0.07843017578125,
-0.05194091796875,
-0.06256103515625,
-0.08782958984375,
-0.0391845703125,
-0.026458740234375,
0.0082550048828125,
-0.0458984375,
0.0244598388671875,
0.0261993408203125,
0.0250396728515625,
-0.0242156982421875,
-0.0238189697265625,
-0.05096435546875,
-0.052978515625,
-0.006069183349609375,
0.02093505859375,
-0.033599853515625,
0.014434814453125,
-0.01861572265625,
0.0164794921875,
-0.0028228759765625,
-0.01337432861328125,
0.03399658203125,
0.0145263671875,
-0.034423828125,
0.019287109375,
0.04400634765625,
-0.0119171142578125,
-0.0169830322265625,
0.0251922607421875,
-0.01192474365234375,
-0.07879638671875,
0.052032470703125,
0.0032558441162109375,
0.09674072265625,
0.0162506103515625,
0.0239715576171875,
0.0325927734375,
-0.00801849365234375,
-0.03790283203125,
0.048126220703125,
0.00948333740234375,
-0.0115814208984375,
-0.031463623046875,
0.0095977783203125,
-0.0003910064697265625,
-0.047393798828125,
-0.0148468017578125,
0.0004968643188476562,
-0.0010175704956054688,
0.0238189697265625,
0.01419830322265625,
-0.003124237060546875,
0.003215789794921875,
0.01132965087890625,
-0.0279083251953125,
-0.00507354736328125,
0.0246734619140625,
0.0021953582763671875,
-0.0018310546875,
-0.055267333984375,
-0.019744873046875,
0.0109710693359375,
-0.01184844970703125,
0.02374267578125,
-0.0309295654296875,
0.005832672119140625,
-0.0017328262329101562,
-0.041839599609375,
-0.00679779052734375,
0.0423583984375,
0.01145172119140625,
0.000995635986328125,
-0.0273895263671875,
-0.01580810546875,
-0.02606201171875,
-0.01367950439453125,
0.00008785724639892578,
0.04718017578125,
0.050506591796875,
0.053619384765625,
-0.028289794921875,
0.004611968994140625,
-0.00907135009765625,
-0.01458740234375,
-0.0121612548828125,
0.03558349609375,
0.03009033203125,
0.033416748046875,
0.0158538818359375,
0.0477294921875,
0.04052734375,
-0.053680419921875,
-0.0023975372314453125,
0.0257415771484375,
0.0016145706176757812,
0.029754638671875,
-0.0006895065307617188,
-0.00881195068359375,
0.003070831298828125,
-0.052642822265625,
0.018341064453125,
0.0155792236328125,
-0.0224609375,
-0.023529052734375,
0.007537841796875,
-0.01922607421875,
0.018798828125,
-0.039154052734375,
-0.036834716796875,
-0.0301513671875,
0.034454345703125,
0.032623291015625,
0.058074951171875,
0.042694091796875,
-0.0340576171875,
0.0225067138671875,
0.005580902099609375,
0.02105712890625,
0.0018358230590820312,
-0.0020694732666015625,
0.0177459716796875,
-0.0055694580078125,
-0.031585693359375,
0.007160186767578125,
0.036865234375,
0.0008912086486816406,
-0.034759521484375,
-0.013275146484375,
-0.003940582275390625,
-0.020599365234375,
-0.005474090576171875,
-0.032470703125,
0.01450347900390625,
-0.03253173828125,
-0.034759521484375,
-0.015472412109375,
-0.0085296630859375,
0.06268310546875,
-0.0310821533203125,
0.052886962890625,
-0.0211181640625,
0.0204925537109375,
0.06964111328125,
-0.03125,
0.042633056640625,
-0.01340484619140625,
0.0731201171875,
0.06597900390625,
-0.013763427734375,
0.0103607177734375,
-0.0013256072998046875,
0.047637939453125,
0.00974273681640625,
0.0016679763793945312,
-0.00774383544921875,
-0.0037860870361328125,
-0.05078125,
-0.0236053466796875,
0.02606201171875,
0.054656982421875,
0.00974273681640625,
-0.031646728515625,
0.006542205810546875,
0.033416748046875,
-0.039794921875,
-0.038818359375,
0.03302001953125,
-0.04718017578125,
0.0212249755859375,
-0.0186309814453125,
-0.0295562744140625,
-0.034942626953125,
0.0275115966796875,
-0.01369476318359375,
-0.006908416748046875,
-0.0196685791015625,
-0.029022216796875,
-0.04327392578125,
-0.040283203125,
-0.017059326171875,
-0.003936767578125,
-0.0142669677734375,
0.0129241943359375,
0.0386962890625,
-0.00104522705078125,
-0.06683349609375,
-0.01221466064453125,
0.025970458984375,
-0.037445068359375,
0.01291656494140625,
0.016448974609375,
-0.0089569091796875,
-0.003597259521484375,
0.004108428955078125,
0.00363922119140625,
0.035675048828125,
-0.01953125,
-0.019805908203125,
-0.0280914306640625,
-0.0277557373046875,
-0.015716552734375,
-0.0022144317626953125,
0.0274658203125,
-0.031829833984375,
-0.033416748046875,
-0.07000732421875,
-0.01399993896484375,
-0.005870819091796875,
-0.03436279296875,
-0.0253448486328125,
0.0263214111328125,
0.0003476142883300781,
-0.0302276611328125,
0.01031494140625,
-0.0054931640625,
0.038604736328125,
0.01129150390625,
0.01326751708984375,
-0.034210205078125,
-0.036285400390625,
-0.0408935546875,
0.0021877288818359375,
0.0740966796875,
0.00202178955078125,
-0.0079803466796875,
0.0269622802734375,
-0.00927734375,
-0.033905029296875,
0.019256591796875,
-0.05853271484375,
-0.0714111328125,
0.042572021484375,
-0.03570556640625,
0.0214385986328125,
-0.052337646484375,
-0.0268096923828125,
-0.01496124267578125,
0.10858154296875,
-0.06109619140625,
0.0159149169921875,
-0.037109375,
0.00209808349609375,
-0.023345947265625,
-0.07623291015625,
-0.058319091796875,
0.0028629302978515625,
-0.002254486083984375,
-0.0006575584411621094,
0.0012760162353515625,
-0.0202789306640625,
-0.00984954833984375,
0.00894927978515625,
0.0082244873046875,
-0.00860595703125,
0.023529052734375,
-0.01947021484375,
-0.0289154052734375,
0.00616455078125,
-0.032470703125,
-0.0341796875,
-0.01194000244140625,
-0.0004286766052246094,
-0.08111572265625,
-0.004730224609375,
0.0043182373046875,
0.0161285400390625,
-0.0309600830078125,
0.02484130859375,
-0.021820068359375,
0.037353515625,
0.00865936279296875,
0.0125885009765625,
0.011322021484375,
0.015777587890625,
-0.00994110107421875,
-0.042633056640625,
-0.0004487037658691406,
-0.050262451171875,
-0.039459228515625,
-0.08697509765625,
0.06304931640625,
-0.00806427001953125,
-0.072265625,
-0.021820068359375,
-0.1033935546875,
0.0640869140625,
-0.0147247314453125,
-0.03912353515625,
-0.00365447998046875,
0.02728271484375,
-0.013580322265625,
0.018646240234375,
-0.03460693359375,
-0.0205535888671875,
0.022705078125,
-0.0202484130859375,
-0.007366180419921875,
0.0132293701171875,
0.062469482421875,
0.0059356689453125,
0.0010471343994140625,
-0.042205810546875,
0.01486968994140625,
0.0251007080078125,
-0.0204010009765625,
0.0279388427734375,
0.00969696044921875,
-0.0080413818359375,
0.0176544189453125,
-0.023773193359375,
-0.0162506103515625,
-0.0205535888671875,
0.0311737060546875,
0.005603790283203125,
-0.007579803466796875,
-0.006031036376953125,
-0.01422882080078125,
0.06951904296875,
0.0309600830078125,
-0.0150909423828125,
-0.01654052734375,
-0.006252288818359375,
0.050994873046875,
-0.0069732666015625,
0.005126953125,
-0.041290283203125,
-0.0203704833984375,
0.00244140625,
0.035369873046875,
0.010650634765625,
0.00856781005859375,
0.0034275054931640625,
0.00879669189453125,
0.0264739990234375,
-0.01041412353515625,
0.07305908203125,
0.004482269287109375,
0.0199127197265625,
-0.00860595703125,
0.06304931640625,
-0.019287109375,
0.0230255126953125,
0.0285797119140625,
-0.066650390625,
-0.02239990234375,
-0.0474853515625,
-0.043914794921875,
0.0303802490234375,
0.005725860595703125,
0.0304412841796875,
0.04705810546875,
0.03326416015625,
0.01367950439453125,
-0.0009889602661132812,
-0.010467529296875,
0.04656982421875,
0.005367279052734375,
-0.0469970703125,
-0.033599853515625,
-0.0006356239318847656,
-0.03314208984375,
0.0020389556884765625,
0.01222991943359375,
-0.053314208984375,
0.01131439208984375,
-0.0064544677734375,
0.047210693359375,
0.06658935546875,
0.00885772705078125,
0.0330810546875,
0.001956939697265625,
-0.03094482421875,
-0.000820159912109375,
-0.034027099609375,
-0.0218048095703125,
0.0221099853515625,
0.0302581787109375,
0.064697265625,
-0.004871368408203125,
-0.043121337890625,
-0.0034465789794921875,
-0.07452392578125,
-0.00040078163146972656,
-0.0361328125,
-0.051910400390625,
-0.00846099853515625,
-0.01123046875,
0.0012102127075195312,
0.01409149169921875,
0.006145477294921875,
0.0013256072998046875,
0.04486083984375,
-0.0133056640625,
0.04962158203125,
0.006923675537109375,
0.029632568359375,
-0.0294036865234375,
-0.04254150390625,
0.0231781005859375,
-0.00811004638671875,
0.0013208389282226562,
-0.0706787109375,
0.004077911376953125,
-0.0382080078125,
-0.008331298828125,
0.0736083984375,
-0.0110626220703125,
0.0167236328125,
-0.0162353515625,
-0.00893402099609375,
-0.0189971923828125,
0.004253387451171875,
0.0308837890625,
0.005016326904296875,
0.02001953125,
-0.0131683349609375,
-0.026153564453125,
-0.044586181640625,
0.0178070068359375,
0.01454925537109375,
-0.038909912109375,
-0.00856781005859375,
0.004974365234375,
0.007965087890625,
-0.03509521484375,
-0.024688720703125,
-0.023529052734375,
0.027587890625,
0.0169677734375,
0.023651123046875,
0.00439453125,
0.0531005859375,
-0.004955291748046875,
0.034912109375,
0.01505279541015625,
0.03082275390625,
-0.0130157470703125,
-0.02301025390625,
-0.014739990234375,
-0.07733154296875,
0.002773284912109375,
0.021759033203125,
-0.040252685546875,
0.046142578125,
0.0286407470703125,
0.01384735107421875,
0.04803466796875,
-0.034515380859375,
-0.0004780292510986328,
-0.008270263671875,
0.0155792236328125,
-0.04150390625,
0.01788330078125,
0.03753662109375,
-0.0046539306640625,
-0.0205535888671875,
-0.01055145263671875,
-0.041107177734375,
0.02001953125,
0.0179290771484375,
-0.0009603500366210938,
-0.0036106109619140625,
-0.041290283203125,
0.06414794921875,
0.06597900390625,
-0.034088134765625,
0.0257568359375,
0.0089111328125,
-0.0174713134765625,
0.0345458984375,
0.0350341796875,
-0.0279541015625,
-0.028076171875,
0.0643310546875,
0.021881103515625,
-0.03399658203125,
0.0263214111328125,
-0.0426025390625,
0.01035308837890625,
0.0281829833984375,
0.03509521484375,
-0.039215087890625,
0.0139617919921875,
-0.0015087127685546875,
-0.003139495849609375,
0.03955078125,
-0.00991058349609375,
-0.005645751953125,
-0.046142578125,
0.00678253173828125,
0.0242919921875,
-0.0257415771484375,
-0.01934814453125,
-0.0034332275390625,
0.0205230712890625,
0.023345947265625,
0.0318603515625,
-0.01268768310546875,
-0.0770263671875,
-0.0280303955078125,
0.051544189453125,
-0.0178985595703125,
-0.0247802734375,
0.00787353515625,
0.0099945068359375,
0.01052093505859375,
-0.009002685546875,
0.0545654296875,
-0.0309295654296875,
0.0177154541015625,
-0.04449462890625,
-0.01030731201171875,
0.041351318359375,
0.043701171875,
-0.01666259765625,
-0.0137939453125,
0.017791748046875,
0.0254974365234375,
0.01471710205078125,
0.0177154541015625,
0.0249786376953125,
-0.03875732421875,
-0.04217529296875,
-0.008056640625,
-0.061676025390625,
0.005504608154296875,
-0.0232696533203125,
-0.05242919921875,
0.0694580078125,
-0.00841522216796875,
-0.0201873779296875,
0.01319122314453125,
-0.00966644287109375,
-0.01136016845703125,
-0.0147857666015625,
0.03778076171875,
-0.0251922607421875,
0.007137298583984375,
0.0108184814453125,
0.005283355712890625,
-0.0223388671875,
-0.01395416259765625,
-0.06488037109375,
0.12042236328125,
-0.00991058349609375,
0.024444580078125,
-0.0033817291259765625,
0.050872802734375,
-0.0186309814453125,
0.0295562744140625,
-0.044830322265625,
0.050323486328125,
0.01250457763671875,
0.035125732421875,
-0.064453125,
-0.01189422607421875,
0.00772857666015625,
0.05145263671875,
-0.0116424560546875,
-0.0016193389892578125,
-0.0281982421875,
0.0022792816162109375,
0.039031982421875,
-0.0174713134765625,
0.001194000244140625,
0.055511474609375,
-0.021453857421875,
0.00890350341796875,
0.042938232421875,
-0.045623779296875,
0.0054931640625,
0.034820556640625,
-0.0185546875,
0.0076751708984375,
0.01465606689453125,
-0.0014324188232421875,
-0.0206756591796875,
0.02716064453125,
-0.0548095703125,
-0.00044608116149902344,
0.036712646484375,
0.026763916015625,
0.0310516357421875,
0.0167694091796875,
0.047515869140625,
-0.062042236328125,
-0.0210113525390625,
-0.019195556640625,
0.04437255859375,
0.0077667236328125,
0.00949859619140625,
0.0191650390625,
0.00238037109375,
0.0548095703125,
0.0074615478515625,
0.01445770263671875,
0.0233306884765625,
0.013671875,
0.050018310546875,
-0.004695892333984375,
0.0198516845703125,
-0.082763671875,
-0.05120849609375,
0.04962158203125,
0.074462890625,
-0.0277862548828125,
-0.0484619140625,
0.00809478759765625,
0.0217132568359375,
0.033721923828125,
0.003475189208984375,
0.0279541015625,
-0.012176513671875,
0.036651611328125,
-0.0274810791015625,
-0.01174163818359375,
0.015228271484375,
-0.017822265625,
-0.016998291015625,
0.00156402587890625,
0.02667236328125,
0.005931854248046875,
-0.0091400146484375,
-0.03216552734375,
0.0125579833984375,
0.0312347412109375,
0.0186767578125,
-0.003971099853515625,
-0.02239990234375,
0.004100799560546875,
-0.04193115234375,
0.0390625,
0.034454345703125,
0.0225677490234375,
-0.0232696533203125,
-0.00708770751953125,
0.0609130859375,
0.03076171875,
-0.04815673828125,
0.00395965576171875,
0.054931640625,
0.050140380859375,
-0.0811767578125,
-0.052703857421875,
-0.00804901123046875,
-0.04705810546875,
-0.029083251953125,
-0.0404052734375,
-0.02191162109375,
-0.0013494491577148438,
-0.0169830322265625,
0.00864410400390625,
0.0092926025390625,
0.004608154296875,
-0.0221099853515625,
0.0260162353515625,
-0.00039649009704589844,
-0.04193115234375,
-0.0022373199462890625,
-0.031341552734375,
0.047149658203125,
-0.0120697021484375,
-0.11541748046875,
-0.00461578369140625,
-0.051239013671875,
-0.048675537109375,
0.042266845703125,
0.04656982421875,
-0.034912109375,
0.0282135009765625,
0.003021240234375,
0.0184326171875,
-0.00005316734313964844,
-0.0246124267578125,
0.00926971435546875,
0.025146484375,
0.0161590576171875,
0.0288238525390625,
-0.03131103515625,
-0.025238037109375,
-0.0145111083984375,
0.05645751953125,
0.0150909423828125,
0.10601806640625,
-0.037567138671875,
0.01366424560546875,
0.043182373046875,
-0.022979736328125,
0.028228759765625,
0.037567138671875,
0.0307769775390625,
-0.01268768310546875,
-0.0282745361328125,
-0.02734375,
-0.0268707275390625,
-0.0124053955078125,
0.014404296875,
-0.0594482421875,
-0.050201416015625,
-0.004421234130859375,
0.02264404296875,
0.018096923828125,
0.00925445556640625,
-0.02655029296875,
0.00017940998077392578,
0.0138702392578125,
0.016693115234375,
0.0030422210693359375,
-0.01383209228515625,
-0.01367950439453125,
0.040374755859375,
0.0186309814453125,
-0.0191497802734375,
0.037506103515625,
-0.052337646484375,
0.06146240234375,
0.036102294921875,
0.02215576171875,
-0.06707763671875,
0.0162200927734375,
-0.005214691162109375,
-0.0007767677307128906,
0.007511138916015625,
0.054412841796875,
0.044464111328125,
-0.0291748046875,
0.045623779296875,
0.023345947265625,
0.0430908203125,
-0.027191162109375,
-0.0007123947143554688,
0.020751953125,
0.01537322998046875,
0.0221099853515625,
0.0018129348754882812,
-0.0275726318359375,
-0.040374755859375,
0.0002846717834472656,
0.0230712890625,
-0.020599365234375,
-0.0163421630859375,
-0.0721435546875,
0.0210418701171875,
-0.01268768310546875,
-0.0284576416015625,
-0.019256591796875,
0.01378631591796875,
-0.0313720703125,
0.03704833984375,
-0.055389404296875,
0.007843017578125,
-0.03338623046875,
-0.0360107421875,
-0.03289794921875,
-0.0263671875,
-0.0684814453125,
0.032806396484375,
-0.035980224609375,
0.021331787109375,
0.031280517578125,
-0.0259552001953125,
-0.0043487548828125,
0.009307861328125,
0.0284576416015625,
0.056365966796875,
0.0250091552734375,
-0.020782470703125,
0.050018310546875,
-0.032135009765625,
0.01111602783203125,
-0.0230255126953125,
-0.0396728515625,
0.0097198486328125,
0.027099609375,
-0.021148681640625,
0.01454925537109375,
0.0145263671875,
-0.037872314453125,
-0.050994873046875,
0.0562744140625,
-0.005359649658203125,
-0.0280609130859375,
0.0010881423950195312,
0.006214141845703125,
-0.0119781494140625,
-0.0159454345703125,
-0.00771331787109375,
-0.003963470458984375,
-0.0041351318359375,
0.020263671875,
-0.01010894775390625,
0.047088623046875,
-0.0185699462890625,
-0.006927490234375,
-0.0087890625,
0.0258636474609375,
0.0280303955078125,
0.0034885406494140625,
-0.005886077880859375,
0.004116058349609375,
0.0272064208984375,
0.057952880859375,
-0.01259613037109375,
-0.00669097900390625,
0.009490966796875,
-0.041046142578125,
0.00164031982421875,
-0.0184478759765625,
-0.01441192626953125,
-0.0199737548828125,
0.035064697265625,
0.047698974609375,
0.01248931884765625,
-0.0170135498046875,
0.0001302957534790039,
-0.0033512115478515625,
-0.0194091796875,
0.0004620552062988281,
0.011993408203125,
-0.033477783203125,
-0.006542205810546875,
-0.011383056640625,
-0.005214691162109375,
-0.019775390625,
-0.00144195556640625,
-0.0257110595703125,
-0.00447845458984375,
0.0279693603515625,
0.0126800537109375,
-0.014617919921875,
0.035400390625,
0.040740966796875,
-0.0285491943359375,
0.013946533203125,
-0.01312255859375,
-0.00801849365234375,
0.017578125,
0.00618743896484375,
0.0014886856079101562,
0.0107879638671875,
-0.0697021484375,
0.0215301513671875,
-0.02093505859375,
0.03863525390625,
-0.0682373046875,
-0.021697998046875,
0.0213470458984375,
0.01415252685546875,
-0.016021728515625,
0.01436614990234375,
-0.0083770751953125,
0.051239013671875,
-0.01279449462890625,
0.02618408203125,
-0.036376953125,
-0.019287109375,
-0.03948974609375,
0.033721923828125,
-0.0147857666015625,
0.00751495361328125,
0.04058837890625,
-0.0343017578125,
0.0014133453369140625,
-0.0017919540405273438,
-0.00160980224609375,
-0.0270233154296875,
0.015899658203125,
-0.033294677734375,
-0.01366424560546875,
0.01532745361328125
]
|
659b41deae2ac5d1db374018945f50515ad52de8 | Wordpress Stackexchange
Q: How to Compare Two Meta Fields Consider two meta fields balance and monthly_price. How you would get all posts that has balance < monthly_price
Thinking of creating meta query but our both fields are arbitrary or do not have specific value.
A: A rought method would be to set value of balance to 'mt1.meta_value' and then use a 'posts_request' filter to remove the escaping quotes:
$args = array(
'post_type' => 'post', // maybe not
'meta_query' => array(
array(
'key' => 'balance',
'compare' => '>=',
'value' => 'mt1.meta_value', // this will be treated as a string
'type' => 'NUMERIC'
),
// this is to force adding the needed JOIN clause
array(
'key' => 'monthly_price',
'compare' => 'EXISTS'
),
'relation' => 'AND'
)
);
$closure = function( $sql ) {
// remove single quotes around 'mt1.meta_value'
return str_replace( "'mt1.meta_value'", "mt1.meta_value", $sql );
};
add_filter( 'posts_request', $closure );
$query = new \WP_Query( $args ); // this is your query :)
remove_filter( 'posts_request', spl_object_hash( $closure ) );
I should add that I used 'mt1.meta_value' because WordPress when multiple meta queries are in the args use table aliases like "mt{$n}" where $n is incremented for each additional query.
| Q: How to Compare Two Meta Fields Consider two meta fields balance and monthly_price. How you would get all posts that has balance < monthly_price
Thinking of creating meta query but our both fields are arbitrary or do not have specific value.
A: A rought method would be to set value of balance to 'mt1.meta_value' and then use a 'posts_request' filter to remove the escaping quotes:
$args = array(
'post_type' => 'post', // maybe not
'meta_query' => array(
array(
'key' => 'balance',
'compare' => '>=',
'value' => 'mt1.meta_value', // this will be treated as a string
'type' => 'NUMERIC'
),
// this is to force adding the needed JOIN clause
array(
'key' => 'monthly_price',
'compare' => 'EXISTS'
),
'relation' => 'AND'
)
);
$closure = function( $sql ) {
// remove single quotes around 'mt1.meta_value'
return str_replace( "'mt1.meta_value'", "mt1.meta_value", $sql );
};
add_filter( 'posts_request', $closure );
$query = new \WP_Query( $args ); // this is your query :)
remove_filter( 'posts_request', spl_object_hash( $closure ) );
I should add that I used 'mt1.meta_value' because WordPress when multiple meta queries are in the args use table aliases like "mt{$n}" where $n is incremented for each additional query.
| wordpress | {
"language": "en",
"length": 194,
"provenance": "stackexchange_00019.jsonl.gz:449556",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/164032"
} | [
0.02117919921875,
0.00884246826171875,
-0.01166534423828125,
-0.0007152557373046875,
-0.005611419677734375,
-0.024169921875,
0.00974273681640625,
-0.0389404296875,
0.035186767578125,
0.031829833984375,
-0.0123138427734375,
-0.06768798828125,
-0.00264739990234375,
-0.020660400390625,
-0.063232421875,
-0.038726806640625,
0.0176849365234375,
0.0072784423828125,
-0.005832672119140625,
-0.024261474609375,
0.005828857421875,
-0.0127105712890625,
-0.01073455810546875,
-0.0023250579833984375,
0.05120849609375,
-0.046478271484375,
0.036712646484375,
-0.0115203857421875,
0.042694091796875,
0.0002722740173339844,
0.03509521484375,
-0.0290069580078125,
0.0165557861328125,
0.00511932373046875,
0.0271148681640625,
-0.00988006591796875,
0.00989532470703125,
0.009307861328125,
0.02960205078125,
-0.0212554931640625,
0.044342041015625,
-0.03564453125,
-0.052154541015625,
0.00736236572265625,
-0.03369140625,
0.01059722900390625,
0.007587432861328125,
-0.0093994140625,
0.0333251953125,
0.033111572265625,
-0.0157318115234375,
0.0161285400390625,
-0.0175933837890625,
0.0250091552734375,
-0.0187530517578125,
-0.041107177734375,
0.01334381103515625,
-0.04052734375,
0.0248870849609375,
0.0305023193359375,
-0.0059967041015625,
-0.0170440673828125,
0.00559234619140625,
-0.0421142578125,
-0.033355712890625,
0.00856781005859375,
0.01401519775390625,
0.0014257431030273438,
0.0032825469970703125,
-0.0302581787109375,
0.005069732666015625,
0.00506591796875,
-0.00382232666015625,
-0.0151519775390625,
-0.017242431640625,
-0.019775390625,
0.01531982421875,
-0.03436279296875,
0.011688232421875,
0.017364501953125,
-0.002964019775390625,
0.00800323486328125,
-0.06787109375,
0.036407470703125,
-0.00681304931640625,
0.037628173828125,
-0.02679443359375,
-0.01910400390625,
-0.00424957275390625,
-0.05316162109375,
-0.0025539398193359375,
-0.04949951171875,
-0.05657958984375,
-0.0094146728515625,
0.0102996826171875,
-0.06494140625,
-0.00047087669372558594,
0.0312347412109375,
-0.023712158203125,
-0.005794525146484375,
-0.045684814453125,
-0.00537109375,
-0.020263671875,
-0.00920867919921875,
0.0277099609375,
0.06536865234375,
-0.029052734375,
0.01910400390625,
0.068603515625,
0.0312042236328125,
0.0262298583984375,
0.0158843994140625,
-0.0284271240234375,
-0.0119476318359375,
-0.0269622802734375,
0.0252838134765625,
-0.03948974609375,
0.00043129920959472656,
-0.00830841064453125,
0.01116180419921875,
0.0130157470703125,
0.032501220703125,
0.048095703125,
-0.05706787109375,
0.0104827880859375,
-0.00148773193359375,
-0.04833984375,
-0.052886962890625,
-0.07513427734375,
0.06097412109375,
-0.01666259765625,
-0.00873565673828125,
0.07049560546875,
0.0496826171875,
-0.00788116455078125,
-0.03045654296875,
0.044219970703125,
-0.032745361328125,
-0.00928497314453125,
0.01470947265625,
0.01513671875,
-0.05975341796875,
-0.0260772705078125,
0.00724029541015625,
-0.038909912109375,
0.03167724609375,
0.0243072509765625,
-0.01100921630859375,
-0.01488494873046875,
-0.04998779296875,
-0.053192138671875,
-0.0182342529296875,
0.0262451171875,
0.01227569580078125,
-0.056549072265625,
0.0218963623046875,
0.00952911376953125,
-0.0017271041870117188,
-0.030181884765625,
-0.0399169921875,
-0.011749267578125,
-0.0205535888671875,
-0.0098876953125,
-0.0263824462890625,
-0.06622314453125,
0.039337158203125,
-0.0088653564453125,
-0.01451873779296875,
0.01468658447265625,
0.01433563232421875,
0.01001739501953125,
0.027435302734375,
0.048309326171875,
-0.0122833251953125,
-0.01849365234375,
-0.0230255126953125,
-0.005474090576171875,
0.033447265625,
0.03704833984375,
-0.013946533203125,
-0.031646728515625,
-0.032501220703125,
0.08489990234375,
-0.00872802734375,
-0.050323486328125,
-0.009307861328125,
0.01055145263671875,
-0.0020294189453125,
-0.003299713134765625,
0.0141448974609375,
0.08074951171875,
0.0325927734375,
0.0024471282958984375,
0.0350341796875,
0.0037746429443359375,
-0.06634521484375,
-0.0186614990234375,
-0.0279083251953125,
-0.004947662353515625,
0.0156707763671875,
0.01410675048828125,
0.04638671875,
-0.045867919921875,
0.0148468017578125,
-0.08575439453125,
0.01486968994140625,
-0.007617950439453125,
0.03875732421875,
-0.09814453125,
0.029022216796875,
0.061676025390625,
-0.00547027587890625,
-0.066650390625,
0.080322265625,
0.06854248046875,
-0.0283355712890625,
0.003551483154296875,
0.010406494140625,
0.005054473876953125,
-0.0227203369140625,
0.006763458251953125,
-0.0254669189453125,
-0.0112762451171875,
0.0200653076171875,
0.04486083984375,
-0.01275634765625,
-0.00811004638671875,
-0.0255584716796875,
0.0311431884765625,
0.0098419189453125,
-0.03497314453125,
0.0192718505859375,
0.0037384033203125,
-0.013763427734375,
-0.01251220703125,
0.0305938720703125,
0.02569580078125,
-0.061370849609375,
-0.0035858154296875,
0.035736083984375,
0.034637451171875,
0.036163330078125,
0.00994110107421875,
0.0026149749755859375,
0.061737060546875,
-0.0687255859375,
-0.006595611572265625,
-0.0207977294921875,
0.0372314453125,
0.0673828125,
-0.0440673828125,
-0.016571044921875,
0.0038890838623046875,
-0.011749267578125,
0.011077880859375,
0.0174102783203125,
-0.0277252197265625,
0.00678253173828125,
-0.0018167495727539062,
0.01415252685546875,
-0.0257568359375,
-0.06622314453125,
0.00891876220703125,
-0.038421630859375,
0.058380126953125,
0.0243988037109375,
0.0609130859375,
0.04278564453125,
-0.052337646484375,
0.020050048828125,
0.01546478271484375,
0.0517578125,
-0.00788116455078125,
-0.01522064208984375,
-0.0088348388671875,
0.004779815673828125,
-0.0309295654296875,
0.0282440185546875,
-0.0138397216796875,
-0.0137481689453125,
-0.0017452239990234375,
0.016021728515625,
-0.031402587890625,
0.00748443603515625,
-0.016448974609375,
0.012847900390625,
0.04052734375,
0.04296875,
0.003940582275390625,
-0.0209808349609375,
0.0126190185546875,
0.032470703125,
-0.01146697998046875,
0.032867431640625,
0.01143646240234375,
-0.026275634765625,
-0.0021457672119140625,
-0.032745361328125,
0.0396728515625,
-0.04815673828125,
0.01508331298828125,
0.037200927734375,
-0.017852783203125,
-0.00391387939453125,
-0.0106658935546875,
0.028289794921875,
0.00823211669921875,
0.014739990234375,
-0.0083770751953125,
-0.02801513671875,
-0.0275115966796875,
-0.0232086181640625,
0.00719451904296875,
-0.03997802734375,
-0.0034160614013671875,
-0.006923675537109375,
-0.0263824462890625,
-0.02679443359375,
-0.0811767578125,
-0.07666015625,
0.015045166015625,
-0.03924560546875,
-0.0161285400390625,
-0.0009527206420898438,
-0.03204345703125,
-0.0003707408905029297,
0.0112457275390625,
-0.01019287109375,
0.031982421875,
-0.046478271484375,
-0.09747314453125,
-0.07244873046875,
-0.07525634765625,
0.02117919921875,
-0.005008697509765625,
0.01158905029296875,
0.01387786865234375,
0.062469482421875,
0.013275146484375,
-0.0360107421875,
0.01971435546875,
0.033355712890625,
-0.0196533203125,
0.01513671875,
0.021728515625,
0.0065765380859375,
0.0055694580078125,
-0.0020198822021484375,
0.0305328369140625,
0.04443359375,
-0.043792724609375,
-0.01580810546875,
-0.015777587890625,
0.01332855224609375,
0.020233154296875,
-0.033111572265625,
-0.01158905029296875,
0.026397705078125,
0.0214996337890625,
-0.01342010498046875,
-0.07159423828125,
-0.0192718505859375,
-0.07501220703125,
0.01438140869140625,
0.0208282470703125,
0.02874755859375,
-0.010345458984375,
0.036529541015625,
0.00795745849609375,
-0.0230560302734375,
0.059173583984375,
-0.04852294921875,
0.04095458984375,
-0.003910064697265625,
0.01318359375,
-0.057861328125,
0.00556182861328125,
-0.0169525146484375,
-0.0000845193862915039,
-0.007152557373046875,
0.0238800048828125,
-0.0011110305786132812,
0.0025787353515625,
-0.0245513916015625,
-0.00948333740234375,
0.03277587890625,
0.0380859375,
0.057647705078125,
-0.031280517578125,
-0.04046630859375,
-0.06640625,
0.0487060546875,
-0.0416259765625,
-0.050018310546875,
0.0133209228515625,
0.0102996826171875,
-0.01096343994140625,
0.0171966552734375,
0.01416778564453125,
-0.01032257080078125,
-0.049652099609375,
-0.0233001708984375,
0.00836944580078125,
-0.046142578125,
-0.017242431640625,
-0.0014400482177734375,
-0.043853759765625,
-0.018402099609375,
0.037567138671875,
-0.0528564453125,
0.0247039794921875,
0.0010585784912109375,
0.001934051513671875,
-0.01284027099609375,
-0.024566650390625,
-0.028656005859375,
-0.0173797607421875,
-0.020477294921875,
0.003826141357421875,
0.046173095703125,
0.0138702392578125,
-0.02459716796875,
0.01210784912109375,
0.040740966796875,
-0.0185089111328125,
0.036407470703125,
-0.04473876953125,
0.019073486328125,
-0.0394287109375,
-0.01288604736328125,
-0.034332275390625,
-0.015960693359375,
-0.01108551025390625,
-0.0462646484375,
-0.0007214546203613281,
0.007259368896484375,
-0.039947509765625,
0.04095458984375,
-0.050201416015625,
0.0020427703857421875,
-0.058380126953125,
-0.013214111328125,
-0.040679931640625,
-0.0301666259765625,
-0.039642333984375,
-0.029510498046875,
0.00592803955078125,
-0.050048828125,
0.035430908203125,
0.0273590087890625,
-0.019378662109375,
0.0023250579833984375,
0.055084228515625,
0.0153350830078125,
-0.036773681640625,
-0.06097412109375,
-0.011993408203125,
0.01393890380859375,
-0.037322998046875,
0.048431396484375,
0.01055908203125,
0.002796173095703125,
0.05731201171875,
-0.0330810546875,
-0.0146026611328125,
-0.0322265625,
0.053619384765625,
0.0007519721984863281,
-0.0277252197265625,
0.0214691162109375,
-0.03021240234375,
0.026092529296875,
0.006175994873046875,
0.02496337890625,
-0.03363037109375,
0.033843994140625,
0.014923095703125,
0.006175994873046875,
-0.0090484619140625,
-0.0016546249389648438,
-0.0233917236328125,
0.004207611083984375,
-0.0007166862487792969,
0.004222869873046875,
0.02423095703125,
-0.004856109619140625,
0.006092071533203125,
0.0067138671875,
0.0004401206970214844,
-0.01027679443359375,
0.05572509765625,
-0.058868408203125,
0.01557159423828125,
-0.0003097057342529297,
-0.03790283203125,
-0.038787841796875,
-0.0090484619140625,
0.0208740234375,
0.0110321044921875,
-0.04803466796875,
0.007091522216796875,
-0.0006875991821289062,
0.035614013671875,
0.0037822723388671875,
-0.0011396408081054688,
0.0302276611328125,
0.026885986328125,
-0.01763916015625,
-0.0188751220703125,
-0.011749267578125,
-0.030120849609375,
-0.0491943359375,
-0.01099395751953125,
-0.016204833984375,
0.0026569366455078125,
-0.01476287841796875,
0.09149169921875,
-0.0428466796875,
0.0850830078125,
-0.01145172119140625,
0.0259857177734375,
0.022613525390625,
0.024505615234375,
0.019256591796875,
-0.0239715576171875,
0.0244598388671875,
-0.01024627685546875,
0.0071563720703125,
-0.0100555419921875,
-0.007289886474609375,
0.030029296875,
0.00217437744140625,
-0.00823211669921875,
-0.0056915283203125,
0.00862884521484375,
0.0034503936767578125,
-0.03277587890625,
-0.0008683204650878906,
0.01287078857421875,
-0.01593017578125,
-0.0164947509765625,
-0.017242431640625,
-0.02630615234375,
0.016845703125,
0.01190185546875,
0.0232696533203125,
-0.0031948089599609375,
0.057769775390625,
-0.0304412841796875,
0.032379150390625,
-0.041595458984375,
-0.0291900634765625,
0.04400634765625,
-0.0234527587890625,
-0.04644775390625,
-0.0017328262329101562,
-0.0006771087646484375,
-0.032501220703125,
-0.0086517333984375,
0.09979248046875,
0.01459503173828125,
0.04425048828125,
-0.05181884765625,
-0.0268096923828125,
0.006198883056640625,
-0.0173797607421875,
0.06884765625,
0.0118560791015625,
-0.0204010009765625,
-0.037994384765625,
-0.0225677490234375,
-0.03936767578125,
0.0026111602783203125,
0.01715087890625,
-0.01403045654296875,
0.0294036865234375,
0.0008559226989746094,
0.048187255859375,
-0.0245819091796875,
-0.04290771484375,
0.0230865478515625,
-0.04095458984375,
-0.0343017578125,
0.0013589859008789062,
-0.0202178955078125,
0.05279541015625,
0.01142120361328125,
0.044525146484375,
0.02606201171875,
0.0382080078125,
0.01235198974609375,
-0.0362548828125,
0.006946563720703125,
-0.070068359375,
-0.0157318115234375,
0.01194000244140625,
-0.041656494140625,
0.004589080810546875,
0.0018558502197265625,
0.00012767314910888672,
-0.011566162109375,
-0.02301025390625,
-0.0031833648681640625,
-0.0260467529296875,
0.024261474609375,
-0.0180511474609375,
0.0018033981323242188,
-0.0020008087158203125,
-0.0153961181640625,
0.042266845703125,
-0.011993408203125,
-0.022705078125,
0.043548583984375,
-0.0186614990234375,
0.048980712890625,
0.037841796875,
-0.035797119140625,
0.038177490234375,
0.06915283203125,
0.03240966796875,
0.04046630859375,
0.0240020751953125,
0.0093231201171875,
0.00957489013671875,
-0.032012939453125,
0.0105133056640625,
0.073486328125,
0.061248779296875,
-0.0263671875,
-0.017608642578125,
0.014434814453125,
-0.0338134765625,
0.02069091796875,
0.03985595703125,
0.051513671875,
-0.056854248046875,
0.00958251953125,
0.0008516311645507812,
-0.0274658203125,
0.03131103515625,
-0.019378662109375,
0.0227508544921875,
-0.01177978515625,
-0.04302978515625,
0.044647216796875,
-0.040069580078125,
-0.03656005859375,
0.023406982421875,
-0.0102081298828125,
-0.0006184577941894531,
-0.012176513671875,
0.0017328262329101562,
-0.026397705078125,
0.0209808349609375,
0.0265045166015625,
-0.0141754150390625,
-0.007801055908203125,
0.0194854736328125,
-0.0247802734375,
-0.01554107666015625,
-0.0946044921875,
-0.0533447265625,
-0.025054931640625,
-0.04150390625,
-0.01291656494140625,
0.021881103515625,
0.042266845703125,
0.058837890625,
0.0030269622802734375,
-0.01824951171875,
0.025787353515625,
0.034820556640625,
-0.06829833984375,
-0.0162200927734375,
-0.0256805419921875,
0.0009164810180664062,
-0.0007824897766113281,
0.018707275390625,
-0.0477294921875,
0.0002015829086303711,
0.01036834716796875,
-0.0023784637451171875,
0.042694091796875,
-0.017486572265625,
-0.0260162353515625,
0.0355224609375,
-0.0102691650390625,
-0.01238250732421875,
0.037322998046875,
0.006999969482421875,
-0.005290985107421875,
-0.0271453857421875,
0.00962066650390625,
-0.0634765625,
-0.0302581787109375,
-0.013702392578125,
-0.07586669921875,
0.079345703125,
0.0014619827270507812,
0.040802001953125,
0.01149749755859375,
0.017669677734375,
-0.03704833984375,
-0.0176849365234375,
-0.047454833984375,
0.08355712890625,
0.0205230712890625,
0.0413818359375,
-0.05682373046875,
-0.021148681640625,
0.024017333984375,
0.033721923828125,
0.07073974609375,
0.0154266357421875,
-0.046600341796875,
-0.0214691162109375,
0.058837890625,
0.046356201171875,
-0.007083892822265625,
0.0498046875,
0.01192474365234375,
0.0667724609375,
0.04852294921875,
-0.06072998046875,
0.044036865234375,
-0.057220458984375,
0.0124359130859375,
0.052093505859375,
0.01413726806640625,
0.01406097412109375,
-0.019378662109375,
-0.014251708984375,
0.00970458984375,
-0.0011701583862304688,
0.0007905960083007812,
0.0025177001953125,
0.045745849609375,
-0.0013933181762695312,
0.0201416015625,
-0.01523590087890625,
-0.054168701171875,
0.008056640625,
0.0264892578125,
0.0156707763671875,
-0.0264129638671875,
0.0618896484375,
0.019317626953125,
0.0204315185546875,
-0.0245819091796875,
-0.006336212158203125,
-0.0297393798828125,
0.0174560546875,
0.01207733154296875,
0.026885986328125,
-0.0003781318664550781,
-0.030364990234375,
0.0250701904296875,
0.046356201171875,
0.0246734619140625,
-0.0377197265625,
-0.046630859375,
0.0158233642578125,
-0.0181884765625,
-0.02642822265625,
-0.0130462646484375,
-0.037078857421875,
0.007488250732421875,
0.0286407470703125,
-0.06744384765625,
0.00958251953125,
0.01519775390625,
-0.0064544677734375,
-0.0290069580078125,
-0.032989501953125,
0.01322174072265625,
0.00937652587890625,
-0.048797607421875,
0.0435791015625,
0.040313720703125,
0.06658935546875,
-0.01180267333984375,
0.06463623046875,
-0.03863525390625,
-0.02154541015625,
-0.058990478515625,
0.047271728515625,
0.01030731201171875,
0.06201171875,
-0.07354736328125,
-0.0293426513671875,
0.01837158203125,
0.0550537109375,
0.031707763671875,
0.032470703125,
0.0406494140625,
0.0286102294921875,
-0.0025043487548828125,
0.0084228515625,
0.0255126953125,
-0.02032470703125,
0.006946563720703125,
-0.037994384765625,
-0.00025010108947753906,
-0.0162200927734375,
-0.017730712890625,
-0.009552001953125,
0.043792724609375,
-0.0189056396484375,
0.0285491943359375,
0.0222015380859375,
0.01372528076171875,
0.033721923828125,
-0.00789642333984375,
0.0285491943359375,
-0.037506103515625,
0.051513671875,
-0.0212860107421875,
0.0134124755859375,
-0.019073486328125,
-0.039337158203125,
-0.0018339157104492188,
0.012603759765625,
-0.0306396484375,
0.04022216796875,
-0.005901336669921875,
-0.023406982421875,
0.026275634765625,
0.0116729736328125,
-0.01258087158203125,
0.0096435546875,
0.00977325439453125,
-0.005496978759765625,
-0.0157470703125,
0.007171630859375,
0.0189361572265625,
-0.004383087158203125,
0.00006639957427978516,
0.023162841796875,
0.00412750244140625,
0.01030731201171875,
-0.00827789306640625,
0.00550079345703125,
-0.0006933212280273438,
0.00356292724609375,
0.02606201171875,
-0.0008411407470703125,
-0.022216796875,
-0.01058197021484375,
0.030914306640625,
0.0025959014892578125,
0.05145263671875,
-0.0364990234375,
-0.031646728515625,
0.007755279541015625,
0.032745361328125,
0.004669189453125,
-0.0269622802734375,
-0.025421142578125,
0.0240631103515625,
-0.01244354248046875,
-0.04156494140625,
0.043609619140625,
0.0303192138671875,
0.0338134765625,
0.01605224609375,
0.0130157470703125,
-0.023284912109375,
0.03564453125,
-0.01055145263671875,
0.064208984375,
0.03338623046875,
-0.0165252685546875,
0.017547607421875,
0.0078125,
-0.0218963623046875,
0.0294647216796875,
0.01480865478515625,
0.0042572021484375,
0.0212554931640625,
0.025421142578125,
-0.0189056396484375,
0.0232391357421875,
0.01444244384765625,
-0.009002685546875,
0.01367950439453125,
0.02093505859375,
-0.039154052734375,
-0.0031757354736328125,
0.002101898193359375,
-0.027252197265625,
-0.0386962890625,
0.0034046173095703125,
-0.01395416259765625,
0.0015010833740234375,
-0.046905517578125,
-0.00036025047302246094,
0.001338958740234375,
0.011688232421875,
-0.0011434555053710938,
-0.0248870849609375,
0.0246734619140625,
-0.026123046875,
0.003711700439453125,
-0.0036754608154296875,
-0.0257720947265625,
-0.0094757080078125,
0.0161590576171875,
-0.01238250732421875,
0.002384185791015625,
-0.03521728515625,
0.0010595321655273438,
-0.0156402587890625,
-0.0114288330078125,
0.0017452239990234375,
-0.013946533203125,
0.028533935546875,
0.0018329620361328125,
0.0156402587890625,
0.0098114013671875,
0.005519866943359375,
-0.0401611328125,
-0.0026874542236328125,
0.00652313232421875,
0.01085662841796875,
-0.050811767578125,
0.007579803466796875,
-0.06494140625,
0.001071929931640625,
-0.042022705078125,
0.0160675048828125,
0.0191802978515625,
-0.0174560546875,
-0.045684814453125,
0.03460693359375,
-0.0200653076171875,
-0.0167083740234375,
-0.045684814453125,
-0.006732940673828125,
0.005596160888671875,
0.0233612060546875,
-0.016693115234375,
0.0256500244140625,
-0.0474853515625,
0.00916290283203125,
0.015777587890625,
-0.01050567626953125,
0.0169677734375,
0.0188446044921875,
-0.08074951171875,
0.0144805908203125,
-0.0086212158203125,
0.01346588134765625,
-0.0258026123046875,
0.00991058349609375,
0.003353118896484375,
0.0222015380859375,
-0.021942138671875,
-0.0270538330078125,
0.00376129150390625,
-0.00888824462890625,
0.00420379638671875,
-0.01042938232421875,
-0.042388916015625,
-0.0014247894287109375,
0.068359375,
0.040252685546875,
0.01436614990234375,
-0.045684814453125,
0.0122222900390625,
-0.006855010986328125,
0.0153045654296875,
-0.040496826171875,
0.0044097900390625,
-0.058807373046875,
-0.0526123046875,
-0.00243377685546875,
0.0028362274169921875,
0.0003380775451660156,
-0.02557373046875,
-0.00896453857421875,
-0.01116180419921875,
0.01445770263671875,
0.003818511962890625,
-0.0021457672119140625,
0.01035308837890625,
0.0277099609375,
-0.0303192138671875,
-0.0199737548828125,
-0.0135040283203125,
0.00897979736328125,
-0.00800323486328125,
-0.0352783203125,
-0.03045654296875,
-0.057769775390625,
0.0562744140625,
0.0281982421875,
0.007965087890625,
-0.0102691650390625,
0.0284423828125,
0.0126495361328125,
-0.037628173828125,
0.0219573974609375,
0.02178955078125,
0.0216064453125,
-0.036224365234375,
0.0227813720703125,
0.03948974609375,
0.0010366439819335938,
0.01812744140625,
0.07061767578125,
-0.017333984375,
0.047119140625,
-0.0061187744140625,
-0.02593994140625,
-0.005046844482421875,
0.014373779296875,
-0.0036468505859375,
-0.01134490966796875,
-0.01800537109375,
-0.042205810546875,
0.0185546875,
0.0379638671875,
-0.0029964447021484375,
0.02203369140625
]
|
e2f58576f2754e1af3a2169dbc614b37ed4f3060 | Wordpress Stackexchange
Q: Auto Load Plugin Hooks inside Must Use Plugin I am creating a custom MU plugin to run on a multi-site network. I am working on a function that will dynamically include files containing additional action and filter hooks based on the active plugins for the current website being processed. The problem is, my function is not called when I visit a child site. Only the main site fires this event. How can I get it to execute the function regardless of the site I am on?
function my_plugin_autoload_plugin_hooks() {
$active_plugins = get_option('active_plugins');
// Include custom files from my plugin if they appear in the $active_plugin list.
}
add_action('plugins_loaded', 'my_plugin_autoload_plugin_hooks');
A: With Multisite, you need to use add_site_option/get_site_option instead of add_option/get_option.
https://codex.wordpress.org/Function_Reference/get_site_option
| Q: Auto Load Plugin Hooks inside Must Use Plugin I am creating a custom MU plugin to run on a multi-site network. I am working on a function that will dynamically include files containing additional action and filter hooks based on the active plugins for the current website being processed. The problem is, my function is not called when I visit a child site. Only the main site fires this event. How can I get it to execute the function regardless of the site I am on?
function my_plugin_autoload_plugin_hooks() {
$active_plugins = get_option('active_plugins');
// Include custom files from my plugin if they appear in the $active_plugin list.
}
add_action('plugins_loaded', 'my_plugin_autoload_plugin_hooks');
A: With Multisite, you need to use add_site_option/get_site_option instead of add_option/get_option.
https://codex.wordpress.org/Function_Reference/get_site_option
| wordpress | {
"language": "en",
"length": 122,
"provenance": "stackexchange_00019.jsonl.gz:449598",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165189"
} | [
0.05377197265625,
0.0049285888671875,
0.0143585205078125,
-0.040771484375,
0.00711822509765625,
-0.005420684814453125,
0.01904296875,
-0.007167816162109375,
-0.021728515625,
0.0131683349609375,
-0.043182373046875,
0.042388916015625,
-0.027618408203125,
-0.0047607421875,
0.01027679443359375,
-0.03387451171875,
0.045074462890625,
-0.033599853515625,
-0.0011091232299804688,
-0.00934600830078125,
-0.00792694091796875,
0.03607177734375,
0.007373809814453125,
0.07598876953125,
0.04034423828125,
-0.0599365234375,
0.01377105712890625,
-0.0166168212890625,
0.040985107421875,
0.0030670166015625,
0.02545166015625,
-0.0004317760467529297,
0.0196685791015625,
0.011688232421875,
-0.01043701171875,
-0.031280517578125,
0.05224609375,
-0.0269317626953125,
-0.0304107666015625,
0.096923828125,
0.040008544921875,
-0.0222320556640625,
0.0160369873046875,
0.05743408203125,
0.0126495361328125,
-0.055633544921875,
0.053558349609375,
-0.0640869140625,
-0.002239227294921875,
-0.048248291015625,
0.0122222900390625,
-0.00722503662109375,
0.0423583984375,
-0.04180908203125,
-0.0083465576171875,
0.00775146484375,
-0.07012939453125,
0.04998779296875,
0.00954437255859375,
0.041229248046875,
0.018890380859375,
0.00746917724609375,
-0.005268096923828125,
-0.01332855224609375,
0.00376129150390625,
-0.0159454345703125,
-0.04803466796875,
0.004917144775390625,
-0.037109375,
0.0033054351806640625,
0.048675537109375,
-0.0469970703125,
-0.005191802978515625,
0.041107177734375,
-0.052154541015625,
-0.07049560546875,
0.04180908203125,
-0.03631591796875,
0.024749755859375,
0.00031447410583496094,
-0.0256805419921875,
0.0006375312805175781,
-0.015838623046875,
-0.01287841796875,
-0.0035686492919921875,
0.019073486328125,
-0.0209503173828125,
0.0009145736694335938,
-0.02783203125,
0.0166473388671875,
-0.0272369384765625,
0.00579833984375,
-0.00827789306640625,
0.0103759765625,
-0.01519012451171875,
0.01358795166015625,
-0.0012836456298828125,
0.056610107421875,
-0.021392822265625,
0.0107269287109375,
-0.03076171875,
-0.01224517822265625,
0.0164031982421875,
-0.050140380859375,
0.0018815994262695312,
0.07989501953125,
0.0012559890747070312,
-0.0107269287109375,
-0.0024967193603515625,
0.01073455810546875,
0.0240936279296875,
-0.027496337890625,
0.029449462890625,
-0.0091094970703125,
-0.010040283203125,
-0.0253143310546875,
-0.01287078857421875,
0.0236053466796875,
-0.00273895263671875,
-0.0258636474609375,
-0.0007009506225585938,
0.001056671142578125,
0.001743316650390625,
-0.0188140869140625,
0.01287078857421875,
-0.01568603515625,
-0.032989501953125,
-0.0120086669921875,
-0.0645751953125,
-0.007656097412109375,
-0.003520965576171875,
0.02703857421875,
0.047393798828125,
0.032196044921875,
-0.003322601318359375,
-0.003200531005859375,
-0.001262664794921875,
0.043548583984375,
0.00045871734619140625,
-0.009063720703125,
0.018585205078125,
-0.05035400390625,
-0.03692626953125,
0.00969696044921875,
0.0004820823669433594,
0.00258636474609375,
0.0097198486328125,
0.0291595458984375,
0.00318145751953125,
-0.0099639892578125,
0.0240936279296875,
-0.021728515625,
0.0426025390625,
-0.0268707275390625,
0.03143310546875,
-0.03759765625,
0.04376220703125,
-0.043304443359375,
-0.0042572021484375,
-0.0190277099609375,
-0.0240020751953125,
-0.01155853271484375,
0.0078582763671875,
-0.04559326171875,
-0.0748291015625,
0.0153656005859375,
0.004764556884765625,
-0.0011415481567382812,
0.0274200439453125,
-0.0289154052734375,
0.0037021636962890625,
0.01024627685546875,
0.03204345703125,
0.040191650390625,
0.029815673828125,
0.0589599609375,
-0.02691650390625,
0.0723876953125,
0.039459228515625,
-0.00911712646484375,
-0.0065155029296875,
-0.0302276611328125,
0.11566162109375,
-0.0225677490234375,
-0.077880859375,
0.04571533203125,
0.00371551513671875,
0.07781982421875,
0.00585174560546875,
0.00800323486328125,
0.01215362548828125,
0.005596160888671875,
-0.054901123046875,
0.0198516845703125,
-0.004116058349609375,
-0.005443572998046875,
0.00702667236328125,
0.012298583984375,
-0.004344940185546875,
-0.0086517333984375,
-0.002666473388671875,
-0.03656005859375,
0.010498046875,
-0.01053619384765625,
-0.06787109375,
-0.026336669921875,
-0.033538818359375,
0.0146484375,
0.038421630859375,
0.02215576171875,
-0.0290069580078125,
-0.00382232666015625,
0.016815185546875,
-0.06201171875,
-0.015716552734375,
0.0546875,
-0.0198822021484375,
0.0472412109375,
0.01041412353515625,
0.04974365234375,
0.023468017578125,
-0.0272979736328125,
0.0218963623046875,
-0.00727081298828125,
0.04266357421875,
0.0014495849609375,
-0.0307769775390625,
-0.01468658447265625,
-0.0194549560546875,
0.018280029296875,
-0.06549072265625,
0.0511474609375,
0.009185791015625,
0.042877197265625,
-0.031524658203125,
-0.0171966552734375,
-0.036102294921875,
-0.033294677734375,
0.00591278076171875,
0.03912353515625,
0.0285797119140625,
0.02984619140625,
0.004886627197265625,
0.0298919677734375,
0.0183258056640625,
-0.059295654296875,
0.00887298583984375,
0.005756378173828125,
-0.0087127685546875,
-0.00563812255859375,
-0.005695343017578125,
0.0041046142578125,
0.0338134765625,
-0.051025390625,
0.00963592529296875,
0.045684814453125,
0.002368927001953125,
-0.031280517578125,
-0.0058135986328125,
-0.0248260498046875,
0.044342041015625,
-0.037841796875,
-0.08331298828125,
0.015869140625,
-0.006221771240234375,
-0.01349639892578125,
0.01097869873046875,
0.00875091552734375,
0.004962921142578125,
-0.0161895751953125,
0.010711669921875,
-0.032073974609375,
0.0032176971435546875,
0.017333984375,
0.02838134765625,
0.0037937164306640625,
-0.001129150390625,
-0.01922607421875,
-0.0131072998046875,
0.007511138916015625,
-0.03155517578125,
-0.00489044189453125,
-0.039520263671875,
-0.0053253173828125,
-0.0105743408203125,
-0.050811767578125,
0.00582122802734375,
-0.0004451274871826172,
0.0269775390625,
-0.00548553466796875,
0.0260467529296875,
0.0094757080078125,
-0.020751953125,
0.035552978515625,
0.0192413330078125,
-0.03167724609375,
0.039581298828125,
-0.0286407470703125,
0.026397705078125,
-0.03338623046875,
0.04736328125,
0.060638427734375,
-0.0192718505859375,
0.006870269775390625,
0.00001055002212524414,
-0.0247955322265625,
-0.01331329345703125,
0.00766754150390625,
-0.006900787353515625,
-0.008453369140625,
-0.044281005859375,
0.0224151611328125,
0.013580322265625,
0.04852294921875,
-0.02264404296875,
-0.0384521484375,
-0.0310516357421875,
0.00943756103515625,
-0.05523681640625,
-0.0305328369140625,
0.0218353271484375,
-0.069091796875,
0.021514892578125,
-0.045135498046875,
-0.024200439453125,
-0.023681640625,
-0.0306396484375,
0.002368927001953125,
-0.0555419921875,
-0.0280609130859375,
-0.02972412109375,
-0.07489013671875,
-0.064697265625,
0.035919189453125,
0.00372314453125,
0.028045654296875,
-0.001407623291015625,
0.050933837890625,
-0.01120758056640625,
-0.044158935546875,
-0.0245208740234375,
0.0083160400390625,
-0.0029735565185546875,
-0.032379150390625,
0.00649261474609375,
0.001613616943359375,
0.013214111328125,
0.00478363037109375,
0.01342010498046875,
0.048614501953125,
-0.04522705078125,
-0.00254058837890625,
-0.01035308837890625,
-0.0155487060546875,
0.015899658203125,
0.003955841064453125,
0.00205230712890625,
0.022216796875,
0.0338134765625,
-0.019927978515625,
0.018341064453125,
0.0101165771484375,
-0.007305145263671875,
0.0157928466796875,
-0.01456451416015625,
-0.0484619140625,
0.023162841796875,
0.0003962516784667969,
-0.006641387939453125,
-0.0193023681640625,
0.03399658203125,
-0.00858306884765625,
-0.00933074951171875,
-0.0222625732421875,
-0.0240325927734375,
-0.0240631103515625,
0.048370361328125,
0.01044464111328125,
-0.0064849853515625,
0.00357818603515625,
0.043365478515625,
-0.0108184814453125,
0.03094482421875,
-0.0640869140625,
0.02093505859375,
0.0231475830078125,
-0.0121612548828125,
0.019866943359375,
-0.0188140869140625,
-0.01229095458984375,
-0.0301361083984375,
0.0259246826171875,
-0.0280914306640625,
0.0010690689086914062,
0.0008397102355957031,
-0.004528045654296875,
-0.00890350341796875,
0.01282501220703125,
-0.047393798828125,
-0.006072998046875,
-0.08624267578125,
-0.0224761962890625,
-0.0268707275390625,
-0.035552978515625,
0.006786346435546875,
0.00945281982421875,
-0.036102294921875,
-0.0428466796875,
0.040252685546875,
-0.01430511474609375,
0.022918701171875,
-0.00540924072265625,
-0.00948333740234375,
-0.0190582275390625,
-0.01425933837890625,
-0.016998291015625,
-0.06500244140625,
0.00824737548828125,
-0.0908203125,
0.06378173828125,
0.059814453125,
-0.01184844970703125,
-0.0127716064453125,
0.029571533203125,
0.0135650634765625,
0.0300140380859375,
-0.01016998291015625,
-0.014739990234375,
0.0038318634033203125,
0.025177001953125,
0.031707763671875,
-0.007564544677734375,
-0.004413604736328125,
-0.003299713134765625,
-0.06884765625,
-0.01131439208984375,
-0.00850677490234375,
0.0026798248291015625,
0.03350830078125,
-0.03936767578125,
-0.037689208984375,
-0.0082244873046875,
-0.017303466796875,
-0.048248291015625,
0.0016613006591796875,
-0.060455322265625,
0.01342010498046875,
-0.0189208984375,
-0.004741668701171875,
-0.0259857177734375,
-0.0066680908203125,
0.023956298828125,
0.040069580078125,
0.0254669189453125,
0.00011944770812988281,
-0.01165771484375,
0.005237579345703125,
0.01537322998046875,
-0.0216064453125,
0.038482666015625,
0.003032684326171875,
0.00154876708984375,
0.004398345947265625,
-0.016204833984375,
0.047882080078125,
-0.046600341796875,
0.10076904296875,
-0.007244110107421875,
0.0117034912109375,
0.03167724609375,
0.01105499267578125,
-0.049072265625,
0.00980377197265625,
-0.029022216796875,
-0.018890380859375,
-0.00445556640625,
0.0386962890625,
-0.0097808837890625,
0.0310516357421875,
-0.0372314453125,
-0.0189361572265625,
0.01446533203125,
-0.001079559326171875,
0.0184173583984375,
0.0447998046875,
-0.01404571533203125,
0.0206298828125,
-0.0023136138916015625,
0.0132293701171875,
0.03253173828125,
0.04644775390625,
-0.01343536376953125,
0.045135498046875,
0.0258331298828125,
0.0030364990234375,
-0.009033203125,
-0.0199737548828125,
0.05926513671875,
-0.0216064453125,
-0.036529541015625,
-0.034027099609375,
-0.0265045166015625,
0.05548095703125,
0.035247802734375,
-0.01351165771484375,
0.031280517578125,
0.05584716796875,
-0.04034423828125,
-0.01482391357421875,
0.00888824462890625,
0.02569580078125,
-0.04632568359375,
-0.036834716796875,
-0.0243377685546875,
-0.010406494140625,
-0.003925323486328125,
0.0408935546875,
-0.0168304443359375,
0.0233917236328125,
-0.01406097412109375,
0.02532958984375,
0.00534820556640625,
0.024444580078125,
0.01308441162109375,
-0.0119171142578125,
-0.011016845703125,
0.0211639404296875,
-0.00426483154296875,
-0.0117645263671875,
-0.028594970703125,
0.007358551025390625,
0.032501220703125,
-0.00077056884765625,
0.035888671875,
-0.0004763603210449219,
0.005596160888671875,
-0.043670654296875,
0.0416259765625,
0.01308441162109375,
-0.044952392578125,
-0.04486083984375,
0.0167999267578125,
0.03948974609375,
0.0173492431640625,
-0.00963592529296875,
0.01003265380859375,
0.0030651092529296875,
0.01157379150390625,
0.0161895751953125,
-0.04827880859375,
0.0096282958984375,
0.0227508544921875,
-0.0038280487060546875,
0.0133514404296875,
0.0015115737915039062,
-0.0770263671875,
-0.049652099609375,
-0.003875732421875,
-0.0038051605224609375,
0.0487060546875,
-0.0232391357421875,
0.01131439208984375,
-0.020538330078125,
-0.00241851806640625,
-0.0010614395141601562,
0.0172882080078125,
0.043975830078125,
0.0220947265625,
-0.0858154296875,
0.001129150390625,
-0.03759765625,
-0.0197906494140625,
-0.0207977294921875,
-0.0308074951171875,
-0.0594482421875,
-0.00452423095703125,
-0.00811767578125,
0.030426025390625,
-0.01226806640625,
0.0003325939178466797,
0.00275421142578125,
-0.00946044921875,
-0.01528167724609375,
0.020477294921875,
-0.0205230712890625,
0.056976318359375,
0.005157470703125,
0.037261962890625,
0.0241241455078125,
0.0244140625,
0.0018901824951171875,
-0.019439697265625,
-0.024688720703125,
-0.031158447265625,
-0.0260162353515625,
0.0255126953125,
-0.042327880859375,
0.069580078125,
0.09051513671875,
0.0097808837890625,
-0.0054168701171875,
-0.017791748046875,
-0.006622314453125,
-0.0158233642578125,
0.039093017578125,
0.0170440673828125,
0.028289794921875,
-0.01727294921875,
-0.035797119140625,
-0.0241851806640625,
0.0008382797241210938,
-0.0185394287109375,
0.0276641845703125,
-0.007228851318359375,
0.00989532470703125,
0.00579833984375,
-0.06036376953125,
0.10052490234375,
0.051971435546875,
-0.0271148681640625,
0.0179901123046875,
0.0183258056640625,
-0.005611419677734375,
-0.016693115234375,
0.007808685302734375,
0.031219482421875,
-0.050262451171875,
0.04962158203125,
-0.003154754638671875,
-0.019073486328125,
0.033966064453125,
-0.027008056640625,
-0.031707763671875,
-0.0238800048828125,
-0.0025844573974609375,
-0.01303863525390625,
0.025054931640625,
0.0179901123046875,
0.03582763671875,
-0.0182647705078125,
-0.02532958984375,
-0.0191802978515625,
-0.0157928466796875,
0.012725830078125,
0.02520751953125,
-0.038909912109375,
0.01959228515625,
0.034332275390625,
-0.0169219970703125,
0.0087432861328125,
-0.006748199462890625,
0.0108642578125,
0.004428863525390625,
-0.0002803802490234375,
-0.015655517578125,
0.023406982421875,
0.01479339599609375,
0.006984710693359375,
-0.014556884765625,
-0.031341552734375,
-0.0201416015625,
-0.00868988037109375,
-0.04754638671875,
-0.0030364990234375,
0.006687164306640625,
-0.02593994140625,
0.0166168212890625,
0.03216552734375,
-0.013702392578125,
-0.0146942138671875,
0.0316162109375,
-0.046478271484375,
-0.0213775634765625,
-0.030364990234375,
0.01421356201171875,
0.0311279296875,
-0.054168701171875,
0.016082763671875,
-0.0193328857421875,
-0.01389312744140625,
-0.00591278076171875,
-0.02313232421875,
0.0091094970703125,
-0.01454925537109375,
-0.001888275146484375,
0.051544189453125,
0.01317596435546875,
-0.0303497314453125,
-0.00213623046875,
0.0291290283203125,
-0.041290283203125,
-0.0309295654296875,
0.0169219970703125,
-0.0269317626953125,
-0.0281829833984375,
-0.01434326171875,
-0.08074951171875,
0.140625,
-0.0036334991455078125,
0.0290069580078125,
0.003631591796875,
0.0548095703125,
-0.034912109375,
0.0160675048828125,
-0.039306640625,
0.07781982421875,
0.0584716796875,
0.0196990966796875,
-0.07293701171875,
-0.00946044921875,
-0.00952911376953125,
0.03094482421875,
-0.016448974609375,
0.00470733642578125,
-0.042694091796875,
-0.0093536376953125,
0.0158538818359375,
0.0284576416015625,
0.0270538330078125,
0.039276123046875,
0.0224456787109375,
0.0269317626953125,
0.037811279296875,
-0.00536346435546875,
0.039886474609375,
-0.000270843505859375,
-0.00804901123046875,
0.047576904296875,
0.0011377334594726562,
-0.0152435302734375,
-0.04254150390625,
0.015350341796875,
-0.0236663818359375,
-0.0213775634765625,
0.004638671875,
0.03155517578125,
0.021942138671875,
-0.006084442138671875,
0.0252532958984375,
0.002559661865234375,
0.0000028014183044433594,
-0.00537109375,
0.044219970703125,
0.0066375732421875,
-0.01322174072265625,
-0.00344085693359375,
0.0033626556396484375,
-0.0223388671875,
-0.0232696533203125,
-0.02288818359375,
0.03033447265625,
-0.01971435546875,
0.0184478759765625,
0.0210723876953125,
0.044708251953125,
0.01500701904296875,
0.0157012939453125,
0.01181793212890625,
0.0201873779296875,
-0.01169586181640625,
-0.0789794921875,
0.0017099380493164062,
-0.0177001953125,
-0.00565338134765625,
0.041717529296875,
-0.0004334449768066406,
0.01387786865234375,
0.064697265625,
-0.01177978515625,
-0.01971435546875,
-0.0091094970703125,
0.0288238525390625,
0.0009064674377441406,
0.023040771484375,
0.0012979507446289062,
-0.0484619140625,
-0.02130126953125,
0.00891876220703125,
0.0082855224609375,
0.022186279296875,
-0.01526641845703125,
0.043426513671875,
-0.02471923828125,
0.0006814002990722656,
-0.01525115966796875,
0.03753662109375,
-0.006702423095703125,
0.0226593017578125,
-0.0672607421875,
-0.0679931640625,
0.0269927978515625,
0.0638427734375,
0.01279449462890625,
0.010040283203125,
0.0521240234375,
0.05035400390625,
-0.038787841796875,
-0.004547119140625,
0.02838134765625,
-0.015625,
0.0244140625,
-0.0253448486328125,
-0.0008945465087890625,
-0.0100250244140625,
-0.0174102783203125,
-0.0280914306640625,
-0.0015048980712890625,
0.0352783203125,
-0.0321044921875,
0.04913330078125,
-0.01262664794921875,
-0.022125244140625,
0.0225677490234375,
-0.0185394287109375,
0.06805419921875,
-0.00399017333984375,
-0.047821044921875,
0.01531219482421875,
-0.05511474609375,
-0.03485107421875,
0.0156097412109375,
0.035858154296875,
0.005451202392578125,
0.018341064453125,
-0.00807952880859375,
0.007656097412109375,
0.00870513916015625,
-0.01392364501953125,
-0.0003285408020019531,
-0.01003265380859375,
0.0238189697265625,
0.00539398193359375,
0.00039005279541015625,
0.009185791015625,
-0.004230499267578125,
0.0141754150390625,
0.00908660888671875,
0.1070556640625,
-0.045928955078125,
0.0138702392578125,
0.030059814453125,
-0.062103271484375,
0.031890869140625,
0.04364013671875,
-0.07183837890625,
-0.040740966796875,
-0.02166748046875,
0.003604888916015625,
-0.006801605224609375,
0.0308837890625,
0.03302001953125,
-0.0102691650390625,
0.0011472702026367188,
0.017822265625,
0.0153656005859375,
0.01141357421875,
0.062164306640625,
-0.0157470703125,
-0.0400390625,
-0.06768798828125,
-0.004314422607421875,
0.0472412109375,
0.061279296875,
-0.01177215576171875,
-0.00193023681640625,
-0.004375457763671875,
-0.0210113525390625,
0.007091522216796875,
0.0093231201171875,
-0.0239715576171875,
0.02276611328125,
-0.01410675048828125,
-0.0263214111328125,
0.044830322265625,
-0.004730224609375,
0.0175933837890625,
0.0185394287109375,
0.0604248046875,
0.022186279296875,
-0.0123748779296875,
0.007518768310546875,
0.027801513671875,
0.041351318359375,
-0.036651611328125,
0.0285491943359375,
0.032989501953125,
0.01074981689453125,
0.027923583984375,
-0.0631103515625,
-0.03692626953125,
-0.08380126953125,
0.0178680419921875,
0.0221405029296875,
-0.0252532958984375,
-0.0207366943359375,
-0.00994873046875,
0.0202789306640625,
0.049713134765625,
0.0164642333984375,
-0.087646484375,
0.0430908203125,
-0.037200927734375,
0.046661376953125,
0.0113525390625,
-0.04736328125,
-0.0014190673828125,
0.01025390625,
0.013702392578125,
-0.017364501953125,
-0.034820556640625,
0.0241851806640625,
0.0181732177734375,
0.00792694091796875,
0.015899658203125,
-0.015106201171875,
-0.045684814453125,
0.03363037109375,
0.0199432373046875,
0.08526611328125,
0.0217742919921875,
-0.004039764404296875,
0.043975830078125,
-0.0080108642578125,
-0.023529052734375,
-0.03509521484375,
0.011566162109375,
-0.0207672119140625,
-0.004573822021484375,
-0.015899658203125,
0.003993988037109375,
0.0165557861328125,
-0.03350830078125,
-0.05389404296875,
0.058502197265625,
-0.00855255126953125,
-0.03509521484375,
-0.08721923828125,
0.03155517578125,
0.029327392578125,
-0.026397705078125,
-0.0224609375,
-0.0213470458984375,
-0.04913330078125,
0.028656005859375,
-0.005908966064453125,
-0.0067596435546875,
0.005313873291015625,
0.01511383056640625,
-0.02423095703125,
0.0311126708984375,
0.033721923828125,
-0.046356201171875,
0.0236968994140625,
-0.0183868408203125,
0.04937744140625,
0.04766845703125,
-0.0192718505859375,
0.033233642578125,
0.019012451171875,
-0.046905517578125,
-0.01439666748046875,
-0.039337158203125,
0.0004532337188720703,
0.0007195472717285156,
0.068115234375,
0.0235443115234375,
0.013031005859375,
-0.036468505859375,
0.0347900390625,
-0.005535125732421875,
-0.0418701171875,
0.00321197509765625,
0.0157470703125,
-0.0341796875,
-0.00717926025390625,
0.0139312744140625,
-0.0222625732421875,
0.00872802734375,
-0.0009274482727050781,
-0.0360107421875,
0.01043701171875,
-0.0014581680297851562,
-0.0014619827270507812,
-0.02880859375,
0.01340484619140625,
0.0673828125,
-0.043243408203125,
-0.0079803466796875,
0.03863525390625,
-0.0287933349609375,
0.0244598388671875,
0.06805419921875,
0.0281829833984375,
0.038787841796875,
-0.07196044921875,
-0.0175323486328125,
0.0070648193359375,
0.032012939453125,
-0.016082763671875,
-0.036834716796875,
-0.037353515625,
0.0128631591796875,
0.003948211669921875,
0.010498046875,
0.01427459716796875,
0.042266845703125,
0.029998779296875,
0.07794189453125,
0.00634002685546875,
0.035614013671875,
-0.0166778564453125,
0.034576416015625,
-0.006534576416015625,
-0.02008056640625,
0.01151275634765625,
-0.0245513916015625,
0.00746917724609375,
0.0226593017578125,
-0.0000852346420288086,
-0.007694244384765625,
0.01259613037109375,
-0.0107879638671875,
-0.01401519775390625,
0.006134033203125
]
|
43a96f78d04de3ff71de873885b1f83cde9fb9ef | Wordpress Stackexchange
Q: How can i avoid the permalink start with 'blog' while using the custom post type? I used the custom Structure /blog/%category%/%postname%/ for blog. also i have a custom post type named 'FAQ' while viewing the faq posts, it is showing the /blog/faq/%faq_category%/%postname%/. When I'm using the ['with_front' => false] the paged URLs ('Old entries' and 'New entries' links) http://www.example.com/faq/page/2/ are always showing the 404 page.
A: This can be set in a plugins' options if you're using a plugin to generate a Custom Post Type (such as CPT UI).
Otherwise if you've created this post type in the functions.php file you should amend or add to your your code as follows:
'with_front' => false
i.e. if your permalink structure appears as:
yourwebsite.co.uk/blog/custom-post-title
then setting this to 'false' will make your url something like:
yourwebsite.co.uk/custom-post-title
| Q: How can i avoid the permalink start with 'blog' while using the custom post type? I used the custom Structure /blog/%category%/%postname%/ for blog. also i have a custom post type named 'FAQ' while viewing the faq posts, it is showing the /blog/faq/%faq_category%/%postname%/. When I'm using the ['with_front' => false] the paged URLs ('Old entries' and 'New entries' links) http://www.example.com/faq/page/2/ are always showing the 404 page.
A: This can be set in a plugins' options if you're using a plugin to generate a Custom Post Type (such as CPT UI).
Otherwise if you've created this post type in the functions.php file you should amend or add to your your code as follows:
'with_front' => false
i.e. if your permalink structure appears as:
yourwebsite.co.uk/blog/custom-post-title
then setting this to 'false' will make your url something like:
yourwebsite.co.uk/custom-post-title
A: With custom post types, has_archive defaults to false - this will need to be explicitly set to true.
Also, in your rewrite argument, you might need to set:
'pages' => true
'pages' should default to true, but might need to be explicitly set if you've switched it off elsewhere?
Finally, if you are registering the post type inside of a plugin, call flush_rewrite_rules() in your activation and deactivation hook.
I hope this helps! All the details about these arguments can be found here:
http://codex.wordpress.org/Function_Reference/register_post_type
| wordpress | {
"language": "en",
"length": 220,
"provenance": "stackexchange_00019.jsonl.gz:449607",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165228"
} | [
0.0718994140625,
-0.0081024169921875,
0.04779052734375,
-0.007160186767578125,
-0.007171630859375,
-0.00890350341796875,
0.033905029296875,
-0.057891845703125,
-0.027496337890625,
-0.012115478515625,
0.03692626953125,
-0.0177154541015625,
0.0013113021850585938,
-0.07293701171875,
0.052459716796875,
-0.0080718994140625,
0.0201263427734375,
0.0243377685546875,
0.0628662109375,
-0.0122222900390625,
0.033782958984375,
-0.01959228515625,
0.0487060546875,
-0.01380157470703125,
0.0177154541015625,
-0.02838134765625,
0.076171875,
-0.03753662109375,
0.0176544189453125,
-0.0274200439453125,
0.0185546875,
-0.0164337158203125,
0.00670623779296875,
0.02630615234375,
-0.0134429931640625,
-0.00823974609375,
-0.0015707015991210938,
0.017242431640625,
0.0164947509765625,
0.02105712890625,
-0.0191802978515625,
0.0206146240234375,
0.01873779296875,
0.039947509765625,
0.007434844970703125,
-0.04888916015625,
-0.0257110595703125,
-0.096435546875,
0.005924224853515625,
-0.012298583984375,
0.007045745849609375,
0.00789642333984375,
0.0232086181640625,
0.003143310546875,
-0.038421630859375,
-0.03826904296875,
0.01506805419921875,
-0.07000732421875,
0.00820159912109375,
-0.00795745849609375,
0.000011086463928222656,
0.0030002593994140625,
0.020751953125,
0.012481689453125,
-0.0104522705078125,
-0.019683837890625,
0.006771087646484375,
0.03790283203125,
-0.034393310546875,
-0.022796630859375,
0.0267791748046875,
-0.00821685791015625,
0.007038116455078125,
-0.0310211181640625,
-0.045166015625,
-0.0220184326171875,
-0.0183258056640625,
-0.07476806640625,
0.0234527587890625,
-0.0204620361328125,
-0.01123046875,
-0.006801605224609375,
-0.023040771484375,
-0.058319091796875,
0.01261138916015625,
-0.037933349609375,
-0.013671875,
0.01520538330078125,
-0.01385498046875,
-0.031890869140625,
-0.0204315185546875,
-0.026336669921875,
-0.0222930908203125,
0.0015153884887695312,
-0.0138702392578125,
-0.024993896484375,
0.02874755859375,
0.040924072265625,
-0.00568389892578125,
-0.0013990402221679688,
0.0022525787353515625,
-0.03228759765625,
0.0193023681640625,
-0.033111572265625,
0.01959228515625,
0.0377197265625,
-0.0033740997314453125,
0.0197601318359375,
0.06854248046875,
0.01329803466796875,
0.004581451416015625,
0.05340576171875,
-0.01116180419921875,
-0.031982421875,
-0.0122528076171875,
0.0692138671875,
-0.01364898681640625,
0.0085601806640625,
-0.003997802734375,
0.05609130859375,
0.00820159912109375,
0.04736328125,
0.012725830078125,
-0.0168609619140625,
0.0179595947265625,
0.028076171875,
0.006153106689453125,
-0.07098388671875,
-0.020843505859375,
0.04736328125,
-0.040283203125,
-0.018341064453125,
0.060546875,
0.0305328369140625,
0.0223236083984375,
-0.044036865234375,
0.0031585693359375,
-0.0210113525390625,
-0.0193939208984375,
0.0011692047119140625,
0.006153106689453125,
-0.04119873046875,
-0.004344940185546875,
-0.034698486328125,
-0.0006961822509765625,
0.040435791015625,
0.007659912109375,
0.003536224365234375,
-0.00896453857421875,
-0.021484375,
-0.0196685791015625,
-0.026031494140625,
0.06829833984375,
-0.01552581787109375,
-0.06640625,
-0.043731689453125,
-0.0120086669921875,
-0.028076171875,
-0.0261383056640625,
-0.05279541015625,
0.0380859375,
-0.00247955322265625,
-0.00479888916015625,
-0.034027099609375,
-0.0765380859375,
0.025054931640625,
-0.0399169921875,
-0.024627685546875,
0.01154327392578125,
0.00910186767578125,
0.0013380050659179688,
0.007537841796875,
-0.06085205078125,
-0.0095977783203125,
0.0017595291137695312,
-0.0166015625,
0.0195465087890625,
0.01953125,
-0.004161834716796875,
0.075927734375,
0.015594482421875,
-0.03125,
0.0126953125,
-0.014434814453125,
-0.068359375,
0.04718017578125,
0.03369140625,
0.0758056640625,
-0.034332275390625,
0.01409912109375,
0.07757568359375,
0.039764404296875,
-0.042449951171875,
0.0226898193359375,
-0.036346435546875,
-0.02197265625,
0.01250457763671875,
0.003986358642578125,
-0.024810791015625,
0.025665283203125,
-0.01483917236328125,
0.002170562744140625,
0.0106048583984375,
0.0017919540405273438,
-0.019561767578125,
0.00887298583984375,
-0.00980377197265625,
0.041259765625,
0.0080108642578125,
0.05914306640625,
0.0197296142578125,
0.0400390625,
-0.042327880859375,
-0.01239776611328125,
0.0026073455810546875,
0.00737762451171875,
-0.000988006591796875,
0.0045318603515625,
-0.036712646484375,
0.01983642578125,
-0.03271484375,
-0.0205841064453125,
-0.0367431640625,
0.0253143310546875,
0.0352783203125,
-0.035003662109375,
0.0008983612060546875,
-0.03692626953125,
-0.01898193359375,
0.006378173828125,
-0.08721923828125,
0.030975341796875,
0.0311126708984375,
-0.00806427001953125,
-0.049041748046875,
0.0194244384765625,
0.0177154541015625,
-0.01514434814453125,
-0.00659942626953125,
0.04034423828125,
0.023651123046875,
0.0281829833984375,
-0.03070068359375,
-0.0152130126953125,
0.005931854248046875,
-0.06219482421875,
0.0012941360473632812,
-0.00037670135498046875,
0.032501220703125,
0.03289794921875,
-0.008392333984375,
-0.0201416015625,
0.0325927734375,
-0.032318115234375,
0.022613525390625,
0.021514892578125,
0.00994873046875,
-0.01352691650390625,
0.0458984375,
-0.0214385986328125,
0.0212554931640625,
0.0160675048828125,
-0.05206298828125,
0.01421356201171875,
0.04290771484375,
0.004772186279296875,
0.03912353515625,
0.038970947265625,
-0.025665283203125,
-0.01198577880859375,
0.00830841064453125,
0.02874755859375,
-0.01529693603515625,
0.01320648193359375,
0.08551025390625,
-0.030517578125,
-0.035919189453125,
-0.00443267822265625,
0.01715087890625,
0.012237548828125,
-0.04248046875,
-0.00797271728515625,
-0.03399658203125,
0.003032684326171875,
-0.0286865234375,
-0.061248779296875,
0.022064208984375,
0.0281219482421875,
-0.004146575927734375,
-0.035888671875,
-0.004993438720703125,
0.01226806640625,
-0.0232391357421875,
0.0156402587890625,
0.03021240234375,
-0.0411376953125,
-0.03485107421875,
-0.057861328125,
0.045989990234375,
-0.0413818359375,
0.06475830078125,
0.07415771484375,
-0.0099029541015625,
0.0178680419921875,
0.01508331298828125,
-0.021728515625,
-0.0015802383422851562,
0.01702880859375,
-0.0019254684448242188,
-0.01837158203125,
-0.052490234375,
-0.0034275054931640625,
0.043060302734375,
0.0443115234375,
0.02911376953125,
-0.0105438232421875,
0.029449462890625,
0.08367919921875,
-0.0172119140625,
-0.029815673828125,
0.0191802978515625,
-0.0380859375,
0.0083160400390625,
-0.015594482421875,
-0.00391387939453125,
-0.0296783447265625,
0.001995086669921875,
-0.0008630752563476562,
0.0298004150390625,
-0.0242767333984375,
-0.058746337890625,
-0.049560546875,
-0.08966064453125,
-0.0186920166015625,
0.007106781005859375,
0.017852783203125,
0.01160430908203125,
0.0162353515625,
0.01354217529296875,
-0.023834228515625,
0.04766845703125,
0.0169219970703125,
-0.00830078125,
-0.008575439453125,
0.0183868408203125,
-0.0191650390625,
0.0126190185546875,
0.0129852294921875,
0.040435791015625,
0.03680419921875,
-0.0284271240234375,
-0.0200958251953125,
-0.005645751953125,
-0.0413818359375,
0.01360321044921875,
0.041046142578125,
0.0032196044921875,
0.00372314453125,
0.04736328125,
-0.050079345703125,
-0.042755126953125,
-0.0226898193359375,
-0.06640625,
-0.006252288818359375,
0.0233154296875,
0.03277587890625,
-0.029541015625,
0.02630615234375,
0.0335693359375,
0.01265716552734375,
0.0340576171875,
-0.032989501953125,
0.0477294921875,
0.018646240234375,
0.056854248046875,
-0.056610107421875,
0.045928955078125,
-0.017974853515625,
0.0279388427734375,
0.014801025390625,
-0.00045228004455566406,
-0.008758544921875,
-0.01471710205078125,
-0.040802001953125,
-0.04937744140625,
0.029876708984375,
-0.08599853515625,
-0.0178985595703125,
-0.0310821533203125,
-0.007965087890625,
0.01053619384765625,
0.07611083984375,
-0.040771484375,
0.0021419525146484375,
-0.0190582275390625,
-0.01050567626953125,
0.01439666748046875,
-0.031005859375,
-0.052703857421875,
-0.0181427001953125,
-0.03936767578125,
-0.00872039794921875,
-0.01220703125,
-0.03228759765625,
-0.001953125,
0.00850677490234375,
-0.0285797119140625,
-0.01291656494140625,
0.0438232421875,
-0.01407623291015625,
0.006839752197265625,
-0.0018215179443359375,
0.0155487060546875,
-0.0355224609375,
-0.0292205810546875,
-0.00641632080078125,
-0.089599609375,
-0.00887298583984375,
-0.0069122314453125,
0.042633056640625,
-0.03009033203125,
0.0274200439453125,
-0.0307159423828125,
0.051910400390625,
0.0301513671875,
0.002155303955078125,
0.01268768310546875,
-0.025634765625,
0.0060882568359375,
0.0231475830078125,
0.0198822021484375,
-0.01306915283203125,
0.00634002685546875,
-0.0017499923706054688,
-0.048248291015625,
-0.0163116455078125,
-0.0304412841796875,
-0.032470703125,
0.0225677490234375,
-0.0478515625,
-0.066650390625,
-0.029083251953125,
-0.0230865478515625,
0.01824951171875,
-0.002685546875,
0.0008077621459960938,
-0.04583740234375,
-0.07421875,
0.01023101806640625,
-0.03424072265625,
0.0012454986572265625,
0.0131072998046875,
0.0467529296875,
0.00844573974609375,
-0.0030841827392578125,
-0.0281829833984375,
0.024200439453125,
0.03607177734375,
-0.02972412109375,
0.0399169921875,
0.01244354248046875,
-0.0249176025390625,
0.04705810546875,
-0.0222320556640625,
-0.01282501220703125,
-0.0161590576171875,
0.0418701171875,
-0.0233306884765625,
-0.02105712890625,
0.01018524169921875,
-0.06085205078125,
0.04925537109375,
0.0212249755859375,
0.00547027587890625,
-0.01044464111328125,
-0.002529144287109375,
0.03143310546875,
-0.018585205078125,
0.02545166015625,
-0.0111541748046875,
-0.01084136962890625,
0.021728515625,
0.0247344970703125,
0.036895751953125,
0.00936126708984375,
0.00025963783264160156,
-0.01152801513671875,
-0.0206451416015625,
-0.0024471282958984375,
0.01141357421875,
0.0267333984375,
0.01035308837890625,
0.0240631103515625,
0.0305938720703125,
-0.00794219970703125,
-0.03167724609375,
0.00238037109375,
0.005702972412109375,
-0.0187225341796875,
-0.02545166015625,
-0.043731689453125,
-0.0090789794921875,
0.0166168212890625,
0.0265045166015625,
0.007480621337890625,
0.047210693359375,
0.00223541259765625,
-0.00849151611328125,
-0.00635528564453125,
-0.017791748046875,
-0.0109100341796875,
-0.04132080078125,
0.029083251953125,
0.019378662109375,
0.0005931854248046875,
0.01084136962890625,
0.04669189453125,
0.045989990234375,
0.013031005859375,
-0.033447265625,
-0.0042572021484375,
-0.00917816162109375,
0.045623779296875,
0.028045654296875,
-0.0169525146484375,
-0.01153564453125,
0.0283966064453125,
0.006023406982421875,
-0.0328369140625,
-0.0214080810546875,
0.0148773193359375,
0.042327880859375,
-0.0316162109375,
-0.0190887451171875,
0.0189971923828125,
-0.01050567626953125,
-0.0120086669921875,
0.034515380859375,
-0.00531768798828125,
-0.02886962890625,
-0.027984619140625,
-0.0240020751953125,
0.03131103515625,
-0.01496124267578125,
-0.00010925531387329102,
0.04046630859375,
-0.006866455078125,
0.0126953125,
0.01316070556640625,
-0.0045013427734375,
-0.01090240478515625,
-0.0067291259765625,
0.02911376953125,
-0.0206451416015625,
-0.002471923828125,
0.0107574462890625,
0.023040771484375,
-0.0277252197265625,
-0.01491546630859375,
0.01210784912109375,
-0.00911712646484375,
0.0567626953125,
-0.03167724609375,
-0.0186614990234375,
0.01110076904296875,
0.01232147216796875,
0.01459503173828125,
-0.00464630126953125,
-0.05889892578125,
0.0184783935546875,
-0.042144775390625,
0.01062774658203125,
-0.03131103515625,
-0.052276611328125,
-0.0279083251953125,
-0.007965087890625,
0.0309295654296875,
-0.0028095245361328125,
0.006267547607421875,
-0.032684326171875,
-0.00734710693359375,
0.017669677734375,
0.0232086181640625,
0.015899658203125,
-0.038787841796875,
0.025543212890625,
0.0147247314453125,
0.0203704833984375,
-0.016082763671875,
-0.009063720703125,
0.01201629638671875,
-0.0139923095703125,
-0.0016832351684570312,
-0.088623046875,
-0.0311279296875,
0.026885986328125,
-0.04180908203125,
0.057891845703125,
0.03472900390625,
-0.004482269287109375,
-0.0011386871337890625,
0.0239105224609375,
0.0172882080078125,
-0.01861572265625,
-0.048431396484375,
0.0129852294921875,
-0.0024242401123046875,
0.0025157928466796875,
0.0180206298828125,
0.0169219970703125,
-0.003284454345703125,
-0.006229400634765625,
-0.033416748046875,
0.016143798828125,
-0.0018672943115234375,
-0.027313232421875,
-0.036346435546875,
0.0301513671875,
0.060546875,
0.055419921875,
0.05859375,
0.02264404296875,
0.020782470703125,
-0.0211639404296875,
0.037567138671875,
0.01666259765625,
-0.01526641845703125,
0.062042236328125,
0.0277252197265625,
-0.0026531219482421875,
0.061279296875,
-0.0269622802734375,
0.0033054351806640625,
0.07012939453125,
0.06585693359375,
-0.0699462890625,
-0.00656890869140625,
0.0002168416976928711,
0.004634857177734375,
0.050384521484375,
0.0203094482421875,
0.0018825531005859375,
0.007106781005859375,
-0.011260986328125,
-0.035003662109375,
-0.0243377685546875,
-0.01126861572265625,
-0.013092041015625,
-0.001514434814453125,
0.031036376953125,
0.03155517578125,
0.01369476318359375,
-0.025238037109375,
-0.0352783203125,
0.020111083984375,
-0.002620697021484375,
0.00595855712890625,
-0.001300811767578125,
0.006771087646484375,
-0.04498291015625,
-0.059051513671875,
-0.015960693359375,
-0.00917816162109375,
-0.01534271240234375,
0.0511474609375,
0.01036834716796875,
-0.020050048828125,
0.0164947509765625,
-0.031829833984375,
0.039337158203125,
-0.0262908935546875,
-0.031707763671875,
0.0155029296875,
-0.0172271728515625,
0.00905609130859375,
0.0196685791015625,
-0.032501220703125,
0.006072998046875,
-0.005115509033203125,
-0.0175628662109375,
-0.0246124267578125,
-0.0325927734375,
0.11236572265625,
-0.0428466796875,
-0.02606201171875,
0.0197296142578125,
-0.005413055419921875,
-0.0197906494140625,
-0.00675201416015625,
-0.012542724609375,
-0.0279998779296875,
-0.0017786026000976562,
-0.0236053466796875,
-0.026123046875,
0.0163726806640625,
-0.017425537109375,
-0.0479736328125,
0.09014892578125,
-0.039886474609375,
0.0196685791015625,
0.0262451171875,
0.0250091552734375,
0.004589080810546875,
0.01409912109375,
-0.0255889892578125,
0.057037353515625,
-0.0017528533935546875,
0.0419921875,
-0.03973388671875,
-0.0100860595703125,
0.0155181884765625,
0.0257415771484375,
0.06072998046875,
0.022796630859375,
-0.047210693359375,
-0.025909423828125,
0.0123291015625,
0.048797607421875,
-0.0001316070556640625,
0.024383544921875,
-0.0160064697265625,
0.036102294921875,
0.050048828125,
-0.01806640625,
0.034210205078125,
0.031524658203125,
-0.055877685546875,
0.006198883056640625,
0.036956787109375,
0.057525634765625,
-0.0036296844482421875,
-0.05621337890625,
0.0160369873046875,
-0.0143585205078125,
0.0196075439453125,
-0.045654296875,
0.021331787109375,
0.0262603759765625,
0.06640625,
-0.09832763671875,
-0.00007724761962890625,
-0.03997802734375,
0.06707763671875,
-0.0020751953125,
0.0180206298828125,
0.0185394287109375,
0.01157379150390625,
0.040740966796875,
-0.0241546630859375,
0.01617431640625,
0.0234832763671875,
-0.031585693359375,
0.0258941650390625,
0.040313720703125,
0.0266571044921875,
-0.020294189453125,
-0.015960693359375,
0.06207275390625,
0.05255126953125,
-0.037994384765625,
-0.036712646484375,
0.01116943359375,
0.002349853515625,
-0.002933502197265625,
-0.007244110107421875,
-0.0143585205078125,
-0.0064849853515625,
0.0232086181640625,
-0.0037994384765625,
0.02227783203125,
0.0253753662109375,
0.021636962890625,
-0.01030731201171875,
-0.0316162109375,
-0.03521728515625,
0.042449951171875,
-0.06402587890625,
0.0099334716796875,
-0.015411376953125,
0.0904541015625,
0.058013916015625,
0.0220489501953125,
-0.027740478515625,
-0.052093505859375,
-0.005970001220703125,
-0.00004857778549194336,
-0.0257415771484375,
0.007099151611328125,
-0.035797119140625,
-0.0293121337890625,
0.0076751708984375,
0.038330078125,
0.0258636474609375,
0.038604736328125,
0.034515380859375,
0.01544189453125,
0.040313720703125,
0.0165252685546875,
0.00882720947265625,
-0.006587982177734375,
0.018798828125,
-0.041748046875,
0.0079498291015625,
-0.020782470703125,
-0.01270294189453125,
-0.0002186298370361328,
0.0006699562072753906,
-0.0003597736358642578,
0.0028743743896484375,
0.01529693603515625,
0.01172637939453125,
-0.0083770751953125,
0.043701171875,
-0.02239990234375,
0.04156494140625,
0.01702880859375,
-0.06756591796875,
-0.0176849365234375,
-0.0149688720703125,
-0.0765380859375,
0.043731689453125,
0.0498046875,
-0.0178985595703125,
-0.01995849609375,
0.01137542724609375,
0.00861358642578125,
-0.0219879150390625,
-0.0382080078125,
0.04736328125,
0.0196685791015625,
-0.00905609130859375,
0.0472412109375,
-0.035186767578125,
-0.02484130859375,
-0.0005002021789550781,
0.03436279296875,
-0.00859832763671875,
0.094482421875,
-0.0219879150390625,
0.005237579345703125,
-0.01922607421875,
0.006786346435546875,
-0.0185089111328125,
-0.022857666015625,
-0.0174407958984375,
-0.0030975341796875,
0.02001953125,
0.01399993896484375,
-0.04754638671875,
-0.004116058349609375,
0.06317138671875,
-0.0355224609375,
0.0046539306640625,
-0.01117706298828125,
0.0226287841796875,
-0.048187255859375,
0.0005388259887695312,
-0.035552978515625,
-0.037994384765625,
-0.051300048828125,
-0.0119476318359375,
0.0262298583984375,
0.005535125732421875,
-0.04669189453125,
0.0361328125,
0.004543304443359375,
-0.01702880859375,
0.03582763671875,
-0.05047607421875,
0.052734375,
0.046844482421875,
0.01113128662109375,
-0.003177642822265625,
0.005268096923828125,
-0.0175933837890625,
0.01983642578125,
0.01012420654296875,
-0.00354766845703125,
0.0184326171875,
-0.050048828125,
-0.0103302001953125,
0.0034694671630859375,
0.01068115234375,
-0.023712158203125,
0.0099945068359375,
0.00264739990234375,
-0.01435089111328125,
0.00450897216796875,
-0.01517486572265625,
-0.01195526123046875,
-0.01336669921875,
-0.018646240234375,
0.02288818359375,
-0.01387786865234375,
-0.0142059326171875,
-0.033966064453125,
-0.0021152496337890625,
0.04461669921875,
-0.00937652587890625,
-0.037506103515625,
0.02276611328125,
-0.06549072265625,
0.048858642578125,
-0.03277587890625,
0.01020050048828125,
-0.01421356201171875,
0.01364898681640625,
-0.00591278076171875,
-0.0019330978393554688,
-0.028564453125,
0.02117919921875,
-0.0029296875,
0.002643585205078125,
0.03973388671875,
-0.0104827880859375,
-0.057342529296875,
-0.037322998046875,
-0.0249481201171875,
0.02032470703125,
-0.01129150390625,
0.00556182861328125,
0.027984619140625,
0.00899505615234375,
-0.051025390625,
-0.068603515625,
0.02423095703125,
-0.0718994140625,
-0.0138092041015625,
-0.0036220550537109375,
-0.04986572265625,
-0.044586181640625,
-0.04296875,
-0.03033447265625,
0.0560302734375,
0.008514404296875,
-0.02069091796875,
-0.041595458984375,
-0.041046142578125,
-0.01409149169921875,
0.054534912109375,
0.00887298583984375,
-0.0347900390625,
-0.053314208984375,
0.042083740234375,
-0.003963470458984375,
0.057861328125,
0.001613616943359375,
-0.01346588134765625,
0.01264190673828125,
0.0136871337890625,
0.02984619140625,
0.00319671630859375,
0.0109405517578125,
0.0027217864990234375,
0.0186309814453125,
0.033660888671875,
-0.03460693359375,
0.0283203125,
-0.0184173583984375,
0.016754150390625,
-0.0108184814453125,
-0.035614013671875,
-0.041015625,
-0.03375244140625,
0.0682373046875,
0.04412841796875,
0.0285797119140625,
-0.01690673828125,
-0.0416259765625,
-0.062042236328125,
-0.034423828125,
-0.0173492431640625,
0.034912109375,
-0.0751953125,
0.021484375,
0.01033782958984375,
-0.01293182373046875,
0.0000851750373840332,
-0.006603240966796875,
-0.0230712890625,
0.01461029052734375,
0.0211639404296875,
0.0040283203125,
-0.00347137451171875,
0.0494384765625,
0.0033512115478515625,
-0.023101806640625,
-0.0057220458984375,
-0.00891876220703125,
-0.0218048095703125,
0.004718780517578125,
-0.00949859619140625,
-0.05584716796875,
0.0036182403564453125,
0.0231781005859375,
0.012725830078125,
0.0014524459838867188,
0.03228759765625,
0.0027027130126953125,
0.030548095703125,
-0.004055023193359375,
0.00833892822265625,
-0.0025920867919921875,
-0.00525665283203125,
-0.0008387565612792969,
0.01422119140625,
0.00792694091796875,
0.044830322265625,
0.0218048095703125,
0.0054168701171875,
0.003787994384765625,
0.0531005859375,
-0.00009042024612426758,
-0.024993896484375,
-0.0014905929565429688,
-0.032135009765625,
-0.006671905517578125,
-0.033966064453125,
-0.05670166015625,
-0.021514892578125,
-0.02569580078125,
-0.036956787109375,
-0.046844482421875,
0.01226043701171875
]
|
3f6e8756cc350681b5516af002c16b9e2a1e0d9a | Wordpress Stackexchange
Q: Get parent id by term id I have the id of a term. Which is the function to call to get the parent id of the term?
A: If you already have the term, like the term is an actual object you could use $term->parent. Otherwise you can do something like this:
$term = get_term($id, 'YOUR_TAXONOMY_HERE');
$termParent = ($term->parent == 0) ? $term : get_term($term->parent, 'YOUR_TAXONOMY_HERE');
The 2nd portion of this is a shorthand if-else, IF it doesn't have a parent, then we assign it itself, otherwise we get the parent.
| Q: Get parent id by term id I have the id of a term. Which is the function to call to get the parent id of the term?
A: If you already have the term, like the term is an actual object you could use $term->parent. Otherwise you can do something like this:
$term = get_term($id, 'YOUR_TAXONOMY_HERE');
$termParent = ($term->parent == 0) ? $term : get_term($term->parent, 'YOUR_TAXONOMY_HERE');
The 2nd portion of this is a shorthand if-else, IF it doesn't have a parent, then we assign it itself, otherwise we get the parent.
| wordpress | {
"language": "en",
"length": 92,
"provenance": "stackexchange_00019.jsonl.gz:449619",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165270"
} | [
0.03338623046875,
0.018035888671875,
-0.0269927978515625,
-0.027984619140625,
0.01319122314453125,
-0.015472412109375,
-0.0015020370483398438,
-0.016387939453125,
0.0112152099609375,
-0.0026092529296875,
-0.055267333984375,
-0.007762908935546875,
-0.05670166015625,
-0.0186920166015625,
-0.0186309814453125,
-0.071044921875,
0.032257080078125,
-0.0282440185546875,
0.0207977294921875,
-0.01242828369140625,
0.004505157470703125,
0.00396728515625,
0.0631103515625,
0.0125274658203125,
0.054534912109375,
-0.02984619140625,
0.03656005859375,
-0.0233306884765625,
0.014801025390625,
-0.03204345703125,
0.0246734619140625,
0.0140838623046875,
0.00022113323211669922,
-0.0384521484375,
0.07586669921875,
-0.0321044921875,
0.0220184326171875,
-0.0104217529296875,
0.035369873046875,
0.0011577606201171875,
0.037811279296875,
-0.00494384765625,
-0.03302001953125,
0.04229736328125,
-0.051483154296875,
-0.0369873046875,
0.0009775161743164062,
-0.0218963623046875,
0.0087127685546875,
-0.03472900390625,
0.048492431640625,
0.021270751953125,
0.0576171875,
-0.0038299560546875,
-0.00542449951171875,
0.0175933837890625,
0.04443359375,
-0.04339599609375,
0.030853271484375,
-0.037322998046875,
-0.041595458984375,
-0.0059051513671875,
0.04345703125,
0.004039764404296875,
0.0222320556640625,
0.0165863037109375,
-0.00897216796875,
0.042510986328125,
-0.0304107666015625,
0.0164337158203125,
0.006015777587890625,
-0.04681396484375,
0.01000213623046875,
0.0090484619140625,
-0.008941650390625,
-0.092041015625,
0.037994384765625,
-0.04034423828125,
-0.00852203369140625,
0.041259765625,
-0.0149078369140625,
-0.0277252197265625,
-0.0889892578125,
0.05389404296875,
-0.0089874267578125,
0.07244873046875,
-0.03082275390625,
-0.031494140625,
-0.0323486328125,
-0.025970458984375,
-0.0204010009765625,
-0.0261993408203125,
-0.01349639892578125,
0.01222991943359375,
-0.02935791015625,
-0.023162841796875,
0.022705078125,
0.0556640625,
-0.060028076171875,
-0.035064697265625,
-0.0207672119140625,
-0.005889892578125,
-0.0239715576171875,
-0.01262664794921875,
0.0021495819091796875,
0.0155487060546875,
0.008087158203125,
-0.01336669921875,
0.017669677734375,
0.0169525146484375,
-0.0148773193359375,
0.041290283203125,
-0.0010042190551757812,
-0.006633758544921875,
-0.038330078125,
0.0222015380859375,
-0.01287078857421875,
-0.01280975341796875,
-0.0035800933837890625,
0.00170135498046875,
-0.01032257080078125,
-0.0005631446838378906,
0.002010345458984375,
0.0274200439453125,
-0.007671356201171875,
-0.0032863616943359375,
-0.024658203125,
-0.004169464111328125,
-0.021331787109375,
-0.0243072509765625,
-0.040771484375,
0.033203125,
0.07818603515625,
0.038970947265625,
0.031402587890625,
0.00437164306640625,
-0.0011768341064453125,
0.0098876953125,
0.016265869140625,
-0.0352783203125,
0.046539306640625,
0.004924774169921875,
0.022857666015625,
0.0298614501953125,
-0.02044677734375,
0.0099334716796875,
0.030914306640625,
0.0197296142578125,
-0.04107666015625,
-0.04803466796875,
0.0012664794921875,
-0.0017042160034179688,
0.046905517578125,
0.0005702972412109375,
-0.021820068359375,
-0.0194091796875,
0.027587890625,
-0.033905029296875,
-0.03759765625,
-0.050628662109375,
0.0081634521484375,
0.01181793212890625,
0.031402587890625,
0.0233612060546875,
-0.014923095703125,
-0.0095672607421875,
-0.019866943359375,
-0.0184478759765625,
0.022857666015625,
0.0245361328125,
0.058685302734375,
-0.024017333984375,
-0.034088134765625,
0.0287322998046875,
0.015869140625,
0.0038242340087890625,
-0.046234130859375,
-0.005420684814453125,
0.02947998046875,
0.0044097900390625,
-0.01491546630859375,
-0.04461669921875,
-0.03631591796875,
0.0357666015625,
0.0087738037109375,
0.0301361083984375,
-0.003612518310546875,
0.0201416015625,
-0.0208740234375,
0.0194091796875,
-0.039947509765625,
0.0389404296875,
-0.0682373046875,
0.0228118896484375,
0.024871826171875,
0.019256591796875,
-0.046783447265625,
0.00240325927734375,
-0.0081329345703125,
-0.036773681640625,
-0.0005087852478027344,
-0.01502227783203125,
-0.006992340087890625,
-0.010498046875,
-0.057708740234375,
-0.00972747802734375,
-0.01303863525390625,
0.03271484375,
0.033477783203125,
0.0148773193359375,
-0.00406646728515625,
-0.01453399658203125,
0.005878448486328125,
-0.0428466796875,
-0.04705810546875,
0.0260467529296875,
-0.03070068359375,
-0.018768310546875,
-0.021087646484375,
-0.0142059326171875,
-0.036468505859375,
0.016845703125,
-0.03076171875,
0.0106964111328125,
0.020355224609375,
0.0233001708984375,
-0.033905029296875,
0.00809478759765625,
0.013214111328125,
0.024688720703125,
-0.037841796875,
0.01129150390625,
0.049774169921875,
0.0262298583984375,
-0.007106781005859375,
-0.004547119140625,
0.03167724609375,
-0.096435546875,
0.01168060302734375,
0.0418701171875,
0.0213470458984375,
0.019775390625,
-0.0246734619140625,
-0.0188140869140625,
0.042266845703125,
-0.03936767578125,
-0.01136016845703125,
-0.014404296875,
0.0159759521484375,
0.043487548828125,
-0.00988006591796875,
-0.0032596588134765625,
0.0074005126953125,
-0.0209197998046875,
-0.004695892333984375,
0.0298614501953125,
-0.02935791015625,
-0.0155792236328125,
-0.0065460205078125,
0.002716064453125,
-0.0007567405700683594,
-0.05706787109375,
-0.004375457763671875,
-0.02294921875,
-0.026885986328125,
0.026397705078125,
0.0177154541015625,
0.0251312255859375,
-0.02197265625,
0.0032634735107421875,
0.00839996337890625,
-0.0025634765625,
0.0030536651611328125,
0.03472900390625,
0.01483917236328125,
-0.036773681640625,
-0.01140594482421875,
-0.011993408203125,
-0.0083465576171875,
0.00911712646484375,
0.002285003662109375,
0.049163818359375,
-0.00394439697265625,
-0.016937255859375,
-0.032135009765625,
-0.019256591796875,
0.01177978515625,
0.038055419921875,
-0.06256103515625,
-0.01251220703125,
0.006717681884765625,
0.0611572265625,
-0.017669677734375,
0.002277374267578125,
-0.024078369140625,
0.03021240234375,
-0.0157012939453125,
0.00675201416015625,
0.0181121826171875,
-0.027191162109375,
-0.023284912109375,
0.0164337158203125,
-0.00811004638671875,
-0.01297760009765625,
0.01024627685546875,
-0.0203704833984375,
0.0272979736328125,
-0.0088653564453125,
-0.00038242340087890625,
0.030242919921875,
-0.0677490234375,
0.0152435302734375,
0.005626678466796875,
0.07916259765625,
-0.0360107421875,
-0.04888916015625,
-0.0142669677734375,
0.0167694091796875,
-0.050384521484375,
-0.04180908203125,
0.0034236907958984375,
-0.0413818359375,
-0.026458740234375,
-0.02203369140625,
-0.0247955322265625,
0.0126800537109375,
-0.02410888671875,
-0.0008897781372070312,
0.033233642578125,
-0.036865234375,
-0.0723876953125,
-0.04901123046875,
-0.0936279296875,
-0.004611968994140625,
-0.005550384521484375,
0.0178680419921875,
0.0032138824462890625,
0.0294189453125,
-0.002307891845703125,
-0.0205841064453125,
0.00824737548828125,
0.03656005859375,
-0.00439453125,
0.0018873214721679688,
-0.02154541015625,
-0.024566650390625,
-0.01473236083984375,
-0.00452423095703125,
-0.04498291015625,
-0.010406494140625,
0.0250396728515625,
-0.01019287109375,
-0.007175445556640625,
0.03759765625,
0.03631591796875,
-0.005889892578125,
-0.004489898681640625,
0.044677734375,
0.045623779296875,
-0.00498199462890625,
-0.0178985595703125,
-0.0292205810546875,
-0.040863037109375,
0.043548583984375,
0.011322021484375,
0.004344940185546875,
-0.00737762451171875,
0.00830841064453125,
-0.01904296875,
-0.01544952392578125,
-0.025146484375,
-0.01507568359375,
0.038238525390625,
-0.00803375244140625,
-0.01126861572265625,
0.0211181640625,
0.01611328125,
-0.0232086181640625,
-0.00586700439453125,
-0.014404296875,
0.0205535888671875,
0.001972198486328125,
0.0006003379821777344,
-0.028594970703125,
-0.0709228515625,
0.041900634765625,
-0.036773681640625,
0.02423095703125,
-0.051239013671875,
-0.00872039794921875,
0.007122039794921875,
0.0953369140625,
0.0196533203125,
-0.0198516845703125,
0.0006694793701171875,
0.0016326904296875,
-0.042572021484375,
-0.0367431640625,
-0.039703369140625,
-0.012115478515625,
-0.01331329345703125,
0.006328582763671875,
0.00702667236328125,
-0.0010242462158203125,
-0.0469970703125,
0.051605224609375,
-0.0428466796875,
-0.0002275705337524414,
0.0301361083984375,
-0.0496826171875,
-0.0175628662109375,
0.052276611328125,
-0.02056884765625,
0.031524658203125,
-0.02325439453125,
-0.018585205078125,
-0.026519775390625,
-0.0108184814453125,
-0.0008196830749511719,
-0.00016796588897705078,
0.0030994415283203125,
-0.01509857177734375,
0.00872802734375,
0.047637939453125,
0.00983428955078125,
-0.0018110275268554688,
0.0010290145874023438,
0.014373779296875,
-0.03131103515625,
0.002361297607421875,
-0.003337860107421875,
-0.02850341796875,
-0.03936767578125,
-0.029052734375,
-0.0166473388671875,
0.041107177734375,
0.002803802490234375,
0.0199127197265625,
0.004627227783203125,
-0.0078582763671875,
-0.0244598388671875,
-0.040740966796875,
-0.0692138671875,
-0.01071929931640625,
-0.029327392578125,
-0.01229095458984375,
-0.042022705078125,
-0.0740966796875,
0.0498046875,
0.053985595703125,
-0.02093505859375,
-0.01456451416015625,
0.0762939453125,
0.0229034423828125,
-0.0537109375,
-0.01432037353515625,
0.01244354248046875,
0.01490020751953125,
0.0087432861328125,
0.0268707275390625,
-0.01010894775390625,
-0.0118560791015625,
0.044097900390625,
-0.01343536376953125,
0.007350921630859375,
0.0018911361694335938,
0.05322265625,
-0.0096588134765625,
-0.033477783203125,
0.033843994140625,
-0.01702880859375,
-0.01322174072265625,
0.0012044906616210938,
-0.043731689453125,
-0.041290283203125,
-0.04150390625,
0.0921630859375,
-0.050018310546875,
0.11724853515625,
-0.056976318359375,
-0.03961181640625,
0.027557373046875,
-0.046051025390625,
-0.01332855224609375,
0.0012493133544921875,
-0.0002586841583251953,
-0.0124053955078125,
-0.0195770263671875,
0.03021240234375,
-0.0125579833984375,
0.01206207275390625,
-0.020904541015625,
0.035614013671875,
-0.0026798248291015625,
0.0032825469970703125,
-0.004802703857421875,
-0.00783538818359375,
0.056640625,
-0.0011005401611328125,
-0.053741455078125,
0.046600341796875,
-0.0169219970703125,
-0.021453857421875,
0.0236663818359375,
-0.029815673828125,
0.0095367431640625,
0.01171875,
-0.00022232532501220703,
0.0030975341796875,
-0.048492431640625,
0.016815185546875,
-0.014312744140625,
-0.026214599609375,
-0.00970458984375,
-0.01467132568359375,
0.01374053955078125,
0.0487060546875,
-0.0170135498046875,
0.031463623046875,
-0.0191802978515625,
-0.01540374755859375,
-0.006259918212890625,
0.03521728515625,
0.0302581787109375,
-0.0291748046875,
0.030975341796875,
-0.018524169921875,
0.0367431640625,
-0.040130615234375,
-0.0192413330078125,
0.00424957275390625,
0.038604736328125,
-0.0212249755859375,
-0.02978515625,
0.042572021484375,
-0.01800537109375,
-0.022125244140625,
-0.011810302734375,
-0.01259613037109375,
-0.023345947265625,
0.009246826171875,
0.008392333984375,
-0.007549285888671875,
0.0283203125,
-0.0181884765625,
0.03900146484375,
-0.0139007568359375,
0.0362548828125,
-0.0200347900390625,
-0.0221710205078125,
0.01271820068359375,
0.023223876953125,
-0.0299835205078125,
-0.01560211181640625,
0.0021610260009765625,
-0.0227203369140625,
-0.0128936767578125,
-0.0296478271484375,
-0.0251922607421875,
0.050018310546875,
-0.007732391357421875,
0.058502197265625,
-0.02410888671875,
-0.02459716796875,
0.006450653076171875,
-0.002941131591796875,
0.059722900390625,
0.032958984375,
-0.040435791015625,
-0.01043701171875,
-0.055511474609375,
0.0005354881286621094,
-0.04254150390625,
-0.054229736328125,
-0.026580810546875,
0.00902557373046875,
-0.0599365234375,
0.007740020751953125,
-0.01239013671875,
0.0640869140625,
0.0267333984375,
0.0180816650390625,
-0.060516357421875,
-0.0172119140625,
0.024810791015625,
0.027099609375,
-0.03271484375,
0.03369140625,
0.0203857421875,
0.005313873291015625,
-0.039459228515625,
-0.0269012451171875,
-0.0051116943359375,
-0.044708251953125,
0.0129547119140625,
-0.01081085205078125,
0.035003662109375,
-0.006893157958984375,
-0.0084686279296875,
0.011749267578125,
0.036651611328125,
-0.01666259765625,
-0.0035724639892578125,
-0.008056640625,
0.005645751953125,
-0.0159912109375,
0.019927978515625,
0.0163421630859375,
-0.05120849609375,
-0.02838134765625,
0.02850341796875,
0.05108642578125,
0.006206512451171875,
-0.04095458984375,
0.00479888916015625,
0.01410675048828125,
-0.018524169921875,
0.035308837890625,
0.03173828125,
-0.0239410400390625,
0.0247650146484375,
0.0079803466796875,
0.0119171142578125,
0.0140838623046875,
0.06463623046875,
-0.0234375,
-0.04656982421875,
0.05291748046875,
0.02801513671875,
-0.0291595458984375,
0.0274810791015625,
-0.041473388671875,
-0.0266571044921875,
-0.057861328125,
0.00635528564453125,
0.0482177734375,
0.006683349609375,
0.017852783203125,
-0.016143798828125,
-0.004810333251953125,
0.0060882568359375,
0.0040130615234375,
-0.0160369873046875,
-0.01210784912109375,
0.0007066726684570312,
-0.0198211669921875,
-0.00902557373046875,
-0.01751708984375,
-0.00951385498046875,
-0.036895751953125,
0.0206146240234375,
0.01458740234375,
0.02099609375,
0.0157623291015625,
-0.027496337890625,
0.0229339599609375,
-0.047576904296875,
0.029052734375,
0.003635406494140625,
0.03851318359375,
-0.032073974609375,
0.0562744140625,
-0.035552978515625,
0.03863525390625,
-0.0002300739288330078,
-0.01065826416015625,
-0.009735107421875,
0.0263671875,
-0.020843505859375,
-0.0026264190673828125,
0.0025768280029296875,
-0.060028076171875,
-0.0153656005859375,
0.0117340087890625,
0.02447509765625,
0.004505157470703125,
-0.0355224609375,
0.01207733154296875,
-0.05474853515625,
0.01474761962890625,
-0.00991058349609375,
-0.046112060546875,
0.031890869140625,
-0.04949951171875,
0.00919342041015625,
0.03326416015625,
0.05224609375,
-0.0144195556640625,
-0.018890380859375,
-0.029632568359375,
-0.0343017578125,
0.0169219970703125,
-0.0172882080078125,
0.006061553955078125,
0.0305633544921875,
-0.0283355712890625,
-0.06402587890625,
0.10418701171875,
0.00722503662109375,
0.0188446044921875,
-0.005268096923828125,
0.034088134765625,
-0.033294677734375,
0.011566162109375,
-0.0297698974609375,
0.003566741943359375,
0.0289764404296875,
0.01174163818359375,
-0.00832366943359375,
-0.01439666748046875,
-0.01495361328125,
0.029266357421875,
0.0806884765625,
0.0039825439453125,
-0.0261077880859375,
-0.00720977783203125,
0.066162109375,
0.039459228515625,
-0.006107330322265625,
0.041748046875,
0.03271484375,
0.0116729736328125,
0.050750732421875,
-0.0002815723419189453,
0.033294677734375,
-0.010711669921875,
0.0184478759765625,
0.051788330078125,
0.0143280029296875,
0.01113128662109375,
-0.00800323486328125,
0.036041259765625,
-0.0151519775390625,
-0.01219940185546875,
0.011688232421875,
-0.01367950439453125,
0.01995849609375,
0.01396942138671875,
0.033538818359375,
-0.06695556640625,
0.017364501953125,
-0.0236968994140625,
0.053253173828125,
-0.0158233642578125,
0.0284881591796875,
0.037567138671875,
0.0254669189453125,
0.03875732421875,
0.0028705596923828125,
0.0261383056640625,
0.01557159423828125,
-0.02288818359375,
0.0278472900390625,
0.01541900634765625,
0.01311492919921875,
-0.062286376953125,
-0.009002685546875,
0.0281829833984375,
0.057159423828125,
-0.036895751953125,
-0.028961181640625,
0.01151275634765625,
-0.001926422119140625,
0.004711151123046875,
-0.0036563873291015625,
0.018096923828125,
0.06964111328125,
0.07977294921875,
-0.038330078125,
-0.01145172119140625,
0.033660888671875,
0.053131103515625,
0.007843017578125,
-0.0276031494140625,
-0.05694580078125,
-0.04718017578125,
-0.034637451171875,
0.00025343894958496094,
-0.01033782958984375,
0.02838134765625,
0.03021240234375,
0.03302001953125,
-0.0103912353515625,
-0.004180908203125,
0.0160675048828125,
0.00905609130859375,
0.052490234375,
-0.0345458984375,
0.025238037109375,
0.0189666748046875,
-0.00698089599609375,
-0.0057220458984375,
0.01508331298828125,
0.03448486328125,
0.044158935546875,
0.036102294921875,
-0.025054931640625,
-0.00926971435546875,
0.038909912109375,
-0.02862548828125,
0.0211029052734375,
-0.0178985595703125,
0.02923583984375,
0.037200927734375,
0.007572174072265625,
-0.0134124755859375,
0.0090484619140625,
0.0723876953125,
-0.0098114013671875,
0.07659912109375,
-0.00672149658203125,
0.0169830322265625,
0.041259765625,
0.0013713836669921875,
0.04541015625,
0.0217132568359375,
-0.05645751953125,
0.001247406005859375,
-0.0163726806640625,
-0.038848876953125,
0.0284423828125,
0.042724609375,
-0.016815185546875,
0.00832366943359375,
-0.00772857666015625,
-0.00646209716796875,
-0.006778717041015625,
0.00974273681640625,
0.0026035308837890625,
-0.0117340087890625,
0.0160980224609375,
-0.0135040283203125,
-0.03167724609375,
-0.0015745162963867188,
0.01313018798828125,
-0.006404876708984375,
0.031890869140625,
0.01007843017578125,
0.02362060546875,
0.019500732421875,
-0.0244293212890625,
0.035003662109375,
-0.05926513671875,
-0.039398193359375,
0.063232421875,
-0.04949951171875,
-0.0235137939453125,
0.01084136962890625,
-0.06976318359375,
0.0537109375,
0.006549835205078125,
0.026458740234375,
0.0654296875,
-0.033477783203125,
-0.0011110305786132812,
-0.0161590576171875,
0.060272216796875,
0.0122528076171875,
-0.0302581787109375,
-0.025970458984375,
-0.0135955810546875,
0.061676025390625,
0.09246826171875,
-0.0156097412109375,
-0.0038299560546875,
0.00977325439453125,
-0.03497314453125,
0.035736083984375,
-0.018829345703125,
0.05743408203125,
0.029541015625,
-0.019927978515625,
-0.0423583984375,
-0.00403594970703125,
-0.01059722900390625,
0.01090240478515625,
-0.0008177757263183594,
0.034637451171875,
-0.004314422607421875,
-0.049407958984375,
0.018585205078125,
0.00839996337890625,
0.0173797607421875,
-0.041748046875,
-0.00406646728515625,
0.0243682861328125,
0.0025730133056640625,
-0.004650115966796875,
-0.08489990234375,
-0.027618408203125,
-0.06463623046875,
0.01277923583984375,
0.0249786376953125,
-0.00951385498046875,
-0.01163482666015625,
0.0230560302734375,
0.005596160888671875,
0.053375244140625,
0.00701904296875,
-0.0178070068359375,
0.00865936279296875,
-0.033538818359375,
0.0234375,
0.03570556640625,
-0.0171661376953125,
0.0175018310546875,
0.0176239013671875,
-0.04254150390625,
-0.016387939453125,
-0.0260162353515625,
-0.0008826255798339844,
-0.02899169921875,
0.046051025390625,
0.0305633544921875,
-0.048675537109375,
0.0186767578125,
0.08465576171875,
0.06365966796875,
0.12152099609375,
0.048095703125,
-0.0372314453125,
-0.0059967041015625,
-0.00032019615173339844,
0.0033435821533203125,
0.00965118408203125,
0.033355712890625,
-0.0298004150390625,
-0.059051513671875,
-0.053955078125,
0.034912109375,
0.04046630859375,
-0.04571533203125,
-0.0823974609375,
0.030242919921875,
-0.03277587890625,
-0.041839599609375,
-0.0291290283203125,
0.005664825439453125,
0.0020847320556640625,
-0.0352783203125,
-0.003448486328125,
-0.00638580322265625,
0.0037384033203125,
0.0306243896484375,
0.010711669921875,
0.0012226104736328125,
0.028472900390625,
0.0032825469970703125,
-0.06378173828125,
0.008544921875,
-0.0019168853759765625,
0.013671875,
-0.0005621910095214844,
0.01238250732421875,
-0.00957489013671875,
0.035980224609375,
-0.0308685302734375,
-0.042938232421875,
-0.01287078857421875,
-0.00408172607421875,
-0.0208587646484375,
-0.037017822265625,
0.027679443359375,
0.0128173828125,
0.033721923828125,
-0.019683837890625,
-0.010162353515625,
-0.0272216796875,
-0.048553466796875,
-0.046844482421875,
-0.042633056640625,
-0.00885772705078125,
0.02197265625,
-0.06744384765625,
0.0169525146484375,
0.01187896728515625,
-0.033477783203125,
-0.0192718505859375,
-0.005031585693359375,
-0.0587158203125,
-0.0035381317138671875,
-0.0302886962890625,
-0.0038280487060546875,
-0.01788330078125,
0.024383544921875,
0.0006513595581054688,
-0.032684326171875,
-0.045684814453125,
-0.01192474365234375,
-0.003986358642578125,
-0.0340576171875,
-0.0286407470703125,
0.0177154541015625,
0.033050537109375,
0.01336669921875,
-0.003936767578125,
0.053558349609375,
-0.0155029296875,
0.04595947265625,
0.002513885498046875,
-0.0277557373046875,
0.00466156005859375,
0.0278167724609375,
-0.020050048828125,
-0.045867919921875,
0.05615234375,
0.0210113525390625,
0.041168212890625,
-0.0188140869140625,
0.049774169921875,
-0.005596160888671875,
0.0333251953125,
-0.0538330078125,
0.0135650634765625,
-0.0328369140625,
-0.0162353515625,
0.0014390945434570312,
-0.01525115966796875,
0.0184783935546875,
-0.037750244140625,
0.0313720703125,
0.00628662109375,
-0.00811004638671875,
0.03863525390625
]
|
da1ddc8630ba9a01f82181d663c1d30e3ac5cbed | Wordpress Stackexchange
Q: Empty POST data on server on AJAX request using Angular $http I use AngularJS to build an AJAX form which is then processed on a server running Wordpress.
Server-side handler is simple:
function rnr_contact_callback() {
$name = $_POST['firstName'] . ' ' . $_POST['lastName'];
wp_mail(
'[email protected]',
'Contact form submitted',
$name . '(' . $_POST['email'] . ') sent a message: ' . $_POST['comment']
);
exit;
}
Client-side controller:
angular.module('app').controller('ContactForm', function($scope, $http) {
$scope.sendContactForm = function() {
$http({
method: 'POST',
url: '/wp-admin/admin-ajax.php',
params: {
action: 'contact',
firstName: $scope.userFirstName,
lastName: $scope.userLastName,
email: $scope.userEmail,
comment: $scope.userComment
}
}).success(function(data, status, headers, config) {
$scope.contactFormSent = true;
}).error(function(data, status, headers, config) {
});
};
});
I tested the $scope consistency, and it is all right. Moreover, the POST request is handled: I receive an email. The problem is, email body looks like: () sent a message:. I make a conclusion that, on server, none of $_POST['...'] is set. Why? What do I do wrong?
A: I got it. I just should have used $_REQUEST instead of $_POST within every function which handles AJAX requests.
| Q: Empty POST data on server on AJAX request using Angular $http I use AngularJS to build an AJAX form which is then processed on a server running Wordpress.
Server-side handler is simple:
function rnr_contact_callback() {
$name = $_POST['firstName'] . ' ' . $_POST['lastName'];
wp_mail(
'[email protected]',
'Contact form submitted',
$name . '(' . $_POST['email'] . ') sent a message: ' . $_POST['comment']
);
exit;
}
Client-side controller:
angular.module('app').controller('ContactForm', function($scope, $http) {
$scope.sendContactForm = function() {
$http({
method: 'POST',
url: '/wp-admin/admin-ajax.php',
params: {
action: 'contact',
firstName: $scope.userFirstName,
lastName: $scope.userLastName,
email: $scope.userEmail,
comment: $scope.userComment
}
}).success(function(data, status, headers, config) {
$scope.contactFormSent = true;
}).error(function(data, status, headers, config) {
});
};
});
I tested the $scope consistency, and it is all right. Moreover, the POST request is handled: I receive an email. The problem is, email body looks like: () sent a message:. I make a conclusion that, on server, none of $_POST['...'] is set. Why? What do I do wrong?
A: I got it. I just should have used $_REQUEST instead of $_POST within every function which handles AJAX requests.
A: Parse action:
function angular_ajax_params_to_post() {
$is_ajax = ( defined( 'DOING_AJAX' ) && DOING_AJAX );
if($is_ajax){
$params = json_decode(file_get_contents('php://input'), true);
foreach ($params as $param_key => $param_val) {
$_POST[ $param_key ] = $param_val;
}
}
}
add_action( 'plugins_loaded', 'angular_ajax_params_to_post' );
This function parse angular post string into $_POST array
A: Just had the same issue.
The $_REQUEST is empty because angulars $http sends its data as JSON per default.
Yu have to send the data as formdata:
var app = angular.module('foo', []);
app.config(function ($httpProvider) {
// send all requests payload as query string
$httpProvider.defaults.transformRequest = function(data){
if (data === undefined) {
return data;
}
return jQuery.param(data);
};
// set all post requests content type
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';
});
A: You have to use $_REQUEST instead of $_POST in PHP:
function rnr_contact_callback() {
$name = $_REQUEST['firstName'] . ' ' . $_REQUEST['lastName'];
wp_mail(
'[email protected]',
'Contact form submitted',
$name . '(' . $_REQUEST['email'] . ') sent a message: ' . $_POST['comment']
);
exit;
}
| wordpress | {
"language": "en",
"length": 339,
"provenance": "stackexchange_00019.jsonl.gz:449621",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165286"
} | [
-0.00615692138671875,
-0.006206512451171875,
-0.059967041015625,
-0.05413818359375,
-0.0041961669921875,
-0.0209503173828125,
-0.031097412109375,
0.019439697265625,
0.007137298583984375,
-0.00701141357421875,
-0.042724609375,
-0.035186767578125,
-0.01342010498046875,
-0.03021240234375,
-0.00086212158203125,
-0.03790283203125,
0.01140594482421875,
-0.0163726806640625,
0.0005674362182617188,
-0.01465606689453125,
0.006805419921875,
-0.00887298583984375,
0.00897216796875,
-0.00507354736328125,
-0.0169830322265625,
0.0545654296875,
-0.02227783203125,
-0.003452301025390625,
-0.03363037109375,
-0.00908660888671875,
-0.01145172119140625,
0.025115966796875,
0.021270751953125,
0.05352783203125,
-0.062103271484375,
0.0017299652099609375,
0.00383758544921875,
0.0274200439453125,
-0.0081329345703125,
0.053131103515625,
0.043426513671875,
-0.04180908203125,
0.041778564453125,
-0.001499176025390625,
0.0284271240234375,
-0.016082763671875,
0.0489501953125,
-0.07171630859375,
0.039337158203125,
0.003116607666015625,
-0.0206146240234375,
0.015869140625,
-0.0016307830810546875,
-0.044036865234375,
-0.007640838623046875,
-0.00930023193359375,
-0.014495849609375,
-0.015838623046875,
0.0214385986328125,
0.047698974609375,
-0.0155181884765625,
-0.025543212890625,
-0.0117950439453125,
-0.068603515625,
-0.0141143798828125,
-0.00742340087890625,
0.033172607421875,
0.0231170654296875,
-0.0035495758056640625,
-0.015869140625,
0.00177001953125,
0.01146697998046875,
-0.017303466796875,
-0.019775390625,
0.0335693359375,
-0.007656097412109375,
0.002689361572265625,
-0.00482177734375,
-0.00524139404296875,
0.045501708984375,
-0.01549530029296875,
0.0012693405151367188,
-0.0218505859375,
-0.01197052001953125,
0.005611419677734375,
0.019683837890625,
-0.019866943359375,
-0.01462554931640625,
-0.035614013671875,
-0.0237579345703125,
-0.0209503173828125,
-0.045166015625,
-0.02313232421875,
0.02313232421875,
-0.005466461181640625,
-0.029327392578125,
-0.01189422607421875,
-0.024810791015625,
0.0238800048828125,
0.020233154296875,
0.00983428955078125,
-0.02630615234375,
0.0285186767578125,
-0.0120697021484375,
0.006072998046875,
0.05316162109375,
0.01145172119140625,
-0.0028095245361328125,
0.0294036865234375,
-0.006191253662109375,
-0.001445770263671875,
0.0267181396484375,
0.0289306640625,
0.0299530029296875,
-0.0286865234375,
-0.06414794921875,
-0.024200439453125,
0.0177001953125,
-0.01038360595703125,
-0.00785064697265625,
-0.00928497314453125,
0.00534820556640625,
-0.03485107421875,
-0.033172607421875,
0.03753662109375,
-0.005062103271484375,
-0.02227783203125,
0.02972412109375,
0.00691986083984375,
0.0129547119140625,
-0.0350341796875,
0.0130462646484375,
0.0517578125,
0.032989501953125,
0.026153564453125,
-0.00891876220703125,
0.023406982421875,
0.01641845703125,
0.00946807861328125,
-0.0198974609375,
0.00981903076171875,
-0.019256591796875,
-0.01983642578125,
0.01556396484375,
0.000865936279296875,
-0.0010805130004882812,
0.02862548828125,
0.02947998046875,
-0.01061248779296875,
-0.004306793212890625,
-0.019287109375,
0.019012451171875,
0.0254058837890625,
0.037872314453125,
-0.001026153564453125,
0.049591064453125,
0.03460693359375,
-0.0074310302734375,
-0.0555419921875,
-0.002933502197265625,
0.06732177734375,
-0.0017690658569335938,
-0.004421234130859375,
-0.046112060546875,
-0.050689697265625,
-0.021881103515625,
-0.08740234375,
-0.0139007568359375,
0.01378631591796875,
0.040496826171875,
0.0149993896484375,
0.0185089111328125,
-0.00821685791015625,
-0.0182647705078125,
-0.00467681884765625,
-0.0390625,
-0.01513671875,
-0.0265045166015625,
0.033660888671875,
0.0276947021484375,
0.00342559814453125,
-0.006427764892578125,
0.005893707275390625,
0.02215576171875,
-0.04345703125,
0.0382080078125,
0.0178680419921875,
0.0296478271484375,
-0.0255889892578125,
0.01068115234375,
0.0631103515625,
0.056396484375,
0.01922607421875,
0.0220794677734375,
-0.038787841796875,
-0.05523681640625,
-0.016845703125,
0.003108978271484375,
-0.03997802734375,
0.036102294921875,
0.00522613525390625,
-0.0012254714965820312,
0.01548004150390625,
-0.01038360595703125,
-0.01338958740234375,
-0.00019872188568115234,
-0.00649261474609375,
0.036956787109375,
-0.01538848876953125,
0.017303466796875,
0.0369873046875,
0.0189361572265625,
-0.05596923828125,
-0.00305938720703125,
-0.0309295654296875,
-0.032073974609375,
-0.045379638671875,
0.018035888671875,
-0.026458740234375,
0.033935546875,
-0.0221405029296875,
-0.053985595703125,
-0.0158233642578125,
0.024261474609375,
0.0120697021484375,
0.040008544921875,
-0.02789306640625,
-0.000545501708984375,
0.004550933837890625,
0.02423095703125,
-0.0278778076171875,
0.033447265625,
-0.01320648193359375,
0.02001953125,
-0.03179931640625,
-0.005786895751953125,
-0.04119873046875,
-0.0323486328125,
0.006237030029296875,
0.0384521484375,
0.027740478515625,
0.006587982177734375,
0.01418304443359375,
0.0477294921875,
0.00568389892578125,
-0.03607177734375,
0.01800537109375,
0.0030193328857421875,
0.0023212432861328125,
-0.0018129348754882812,
-0.037384033203125,
-0.030487060546875,
0.029876708984375,
-0.11529541015625,
-0.0035457611083984375,
0.041961669921875,
0.01055908203125,
0.0159759521484375,
-0.006504058837890625,
0.0086517333984375,
-0.01145172119140625,
0.01253509521484375,
-0.0299530029296875,
-0.0088958740234375,
-0.0210723876953125,
-0.0241851806640625,
0.006805419921875,
0.0031948089599609375,
-0.0035457611083984375,
-0.0340576171875,
0.0234222412109375,
0.0007958412170410156,
0.00870513916015625,
0.04693603515625,
0.01335906982421875,
0.05633544921875,
-0.01300048828125,
-0.0310821533203125,
0.027496337890625,
0.039703369140625,
-0.0254058837890625,
0.009765625,
0.01079559326171875,
-0.0255126953125,
0.01039886474609375,
0.0019197463989257812,
0.00594329833984375,
-0.062164306640625,
0.07080078125,
0.0272369384765625,
0.0615234375,
-0.03167724609375,
-0.039093017578125,
0.06500244140625,
-0.0227813720703125,
-0.06536865234375,
-0.0023746490478515625,
-0.01453399658203125,
0.005565643310546875,
-0.0203857421875,
0.0014734268188476562,
0.040191650390625,
0.0249786376953125,
-0.0477294921875,
-0.01491546630859375,
-0.0207061767578125,
-0.04241943359375,
0.07025146484375,
0.012664794921875,
-0.08404541015625,
0.037567138671875,
0.05780029296875,
0.014923095703125,
0.04644775390625,
-0.01384735107421875,
-0.03424072265625,
-0.019317626953125,
0.0249176025390625,
-0.09112548828125,
-0.11187744140625,
0.0105743408203125,
-0.03173828125,
0.01050567626953125,
-0.01071929931640625,
-0.015289306640625,
-0.0244293212890625,
0.004444122314453125,
-0.0008020401000976562,
-0.0301361083984375,
0.000865936279296875,
-0.0285491943359375,
-0.040496826171875,
-0.04449462890625,
0.003551483154296875,
-0.016265869140625,
0.00244140625,
0.00012010335922241211,
0.034912109375,
-0.00014913082122802734,
0.0019140243530273438,
-0.0137176513671875,
0.0185546875,
-0.036041259765625,
-0.054534912109375,
-0.01702880859375,
-0.0036945343017578125,
0.0023365020751953125,
-0.01129913330078125,
-0.0206146240234375,
0.00518035888671875,
-0.00799560546875,
-0.01247406005859375,
-0.04364013671875,
-0.0027904510498046875,
-0.0196075439453125,
0.00664520263671875,
0.05108642578125,
-0.0088348388671875,
0.0017461776733398438,
-0.0489501953125,
-0.0330810546875,
0.006683349609375,
-0.039642333984375,
-0.03631591796875,
0.0124969482421875,
0.00848388671875,
0.0044097900390625,
0.0229644775390625,
0.0157012939453125,
0.021270751953125,
-0.01036834716796875,
-0.007541656494140625,
0.059112548828125,
-0.00899505615234375,
0.015899658203125,
-0.01025390625,
0.0240631103515625,
-0.018829345703125,
-0.033599853515625,
-0.016265869140625,
-0.0011529922485351562,
-0.00789642333984375,
0.007061004638671875,
-0.025634765625,
-0.060272216796875,
0.026947021484375,
-0.0704345703125,
-0.06829833984375,
-0.0076141357421875,
0.015625,
0.032196044921875,
0.039215087890625,
0.041168212890625,
-0.0141754150390625,
-0.0093231201171875,
0.004146575927734375,
-0.060028076171875,
-0.050201416015625,
-0.0197296142578125,
0.00771331787109375,
-0.014862060546875,
0.01110076904296875,
-0.0031299591064453125,
0.01114654541015625,
-0.01123046875,
-0.0240478515625,
-0.004222869873046875,
-0.03839111328125,
0.0022716522216796875,
-0.03192138671875,
-0.0029354095458984375,
-0.0184478759765625,
-0.0128021240234375,
-0.044342041015625,
0.0191497802734375,
-0.034027099609375,
-0.0616455078125,
-0.001972198486328125,
0.007587432861328125,
0.00720977783203125,
-0.0166168212890625,
0.020965576171875,
-0.0103759765625,
0.04168701171875,
0.012725830078125,
0.01500701904296875,
-0.0014371871948242188,
-0.011016845703125,
0.0153961181640625,
-0.01410675048828125,
-0.0091552734375,
-0.0185546875,
0.01361846923828125,
0.0131072998046875,
-0.0302581787109375,
-0.01154327392578125,
-0.029144287109375,
-0.0367431640625,
0.03369140625,
-0.048065185546875,
-0.09521484375,
-0.04205322265625,
-0.003948211669921875,
0.0055694580078125,
-0.0170745849609375,
0.000972747802734375,
-0.025146484375,
-0.07818603515625,
0.035858154296875,
-0.039154052734375,
-0.0136871337890625,
0.0041046142578125,
0.0430908203125,
0.0135040283203125,
0.0025234222412109375,
-0.00323486328125,
-0.0106048583984375,
0.0650634765625,
0.05072021484375,
-0.00328826904296875,
0.01702880859375,
-0.0550537109375,
0.050018310546875,
0.054534912109375,
0.052978515625,
0.01442718505859375,
0.0257415771484375,
0.0025615692138671875,
-0.0307464599609375,
0.039581298828125,
0.056732177734375,
-0.08526611328125,
-0.030364990234375,
-0.023681640625,
0.03814697265625,
0.0074005126953125,
-0.030670166015625,
-0.04901123046875,
0.06793212890625,
0.044189453125,
-0.047271728515625,
0.0195770263671875,
-0.060302734375,
0.05181884765625,
-0.0029201507568359375,
0.00689697265625,
0.04815673828125,
0.044281005859375,
-0.016265869140625,
-0.01026153564453125,
0.00021457672119140625,
-0.01097869873046875,
-0.00542449951171875,
0.027618408203125,
-0.01256561279296875,
-0.031951904296875,
-0.0094451904296875,
0.030670166015625,
0.0213775634765625,
-0.007053375244140625,
-0.0305938720703125,
-0.004756927490234375,
0.00691986083984375,
-0.0496826171875,
-0.01052093505859375,
0.00647735595703125,
0.0285491943359375,
-0.00647735595703125,
0.0248260498046875,
0.026153564453125,
-0.0037593841552734375,
-0.023529052734375,
0.0295562744140625,
0.01107025146484375,
0.0029735565185546875,
-0.003021240234375,
0.0516357421875,
0.032470703125,
0.00457763671875,
-0.0219879150390625,
0.040252685546875,
0.022705078125,
0.033660888671875,
0.0382080078125,
-0.0295257568359375,
0.0146484375,
-0.019744873046875,
-0.00464630126953125,
-0.058746337890625,
-0.05023193359375,
0.034149169921875,
0.072509765625,
0.0215911865234375,
0.01194000244140625,
-0.0038547515869140625,
0.0185394287109375,
-0.003322601318359375,
-0.0299835205078125,
0.004589080810546875,
0.0004031658172607422,
0.00745391845703125,
-0.008331298828125,
-0.023223876953125,
0.0233154296875,
0.0179443359375,
-0.03668212890625,
0.01422882080078125,
0.0177459716796875,
-0.033538818359375,
0.00630950927734375,
-0.0194091796875,
-0.0233612060546875,
0.050384521484375,
-0.0125885009765625,
-0.0294647216796875,
-0.04901123046875,
0.022186279296875,
-0.038360595703125,
0.00495147705078125,
0.07427978515625,
-0.0204620361328125,
0.00970458984375,
-0.051849365234375,
0.031494140625,
-0.060882568359375,
-0.0113067626953125,
0.050140380859375,
0.03594970703125,
-0.01123046875,
-0.036041259765625,
-0.0297698974609375,
-0.02960205078125,
-0.00856781005859375,
-0.0033721923828125,
-0.0224609375,
0.011627197265625,
0.022674560546875,
0.005092620849609375,
0.0010271072387695312,
-0.0276947021484375,
-0.01332855224609375,
0.0019350051879882812,
0.023834228515625,
-0.009765625,
-0.01267242431640625,
0.0989990234375,
-0.052276611328125,
0.0789794921875,
0.013824462890625,
0.042449951171875,
-0.034271240234375,
-0.0089874267578125,
0.0026302337646484375,
-0.1031494140625,
-0.022918701171875,
-0.005191802978515625,
-0.044525146484375,
0.056304931640625,
0.0294952392578125,
0.007442474365234375,
0.0081634521484375,
-0.0021266937255859375,
-0.0013914108276367188,
-0.0229339599609375,
0.03155517578125,
0.01186370849609375,
-0.001468658447265625,
0.03460693359375,
0.00247955322265625,
0.0011587142944335938,
-0.0217437744140625,
-0.057159423828125,
0.0232696533203125,
0.0297698974609375,
0.002613067626953125,
0.00839996337890625,
0.0002675056457519531,
0.017425537109375,
0.06719970703125,
0.00464630126953125,
0.039581298828125,
0.015899658203125,
0.0141754150390625,
0.0018825531005859375,
0.07867431640625,
-0.10736083984375,
-0.088623046875,
0.015045166015625,
0.035247802734375,
-0.0306854248046875,
0.03814697265625,
-0.01139068603515625,
0.0306854248046875,
0.046051025390625,
0.1278076171875,
-0.0716552734375,
0.032379150390625,
0.06585693359375,
-0.02923583984375,
0.0204925537109375,
-0.02642822265625,
-0.0197906494140625,
-0.024932861328125,
0.0285186767578125,
0.028045654296875,
-0.027496337890625,
-0.00417327880859375,
0.0052490234375,
0.0032520294189453125,
-0.00206756591796875,
0.061798095703125,
-0.0036106109619140625,
-0.015045166015625,
-0.053741455078125,
0.0229339599609375,
-0.0168304443359375,
-0.00833892822265625,
0.00998687744140625,
-0.004344940185546875,
-0.0362548828125,
-0.043914794921875,
-0.0240020751953125,
0.0032215118408203125,
-0.035675048828125,
-0.0023517608642578125,
0.00927734375,
-0.00959014892578125,
0.038665771484375,
-0.014129638671875,
0.00809478759765625,
0.0156097412109375,
-0.037994384765625,
-0.0125732421875,
-0.045257568359375,
0.0255279541015625,
0.04693603515625,
-0.03778076171875,
0.041534423828125,
0.02001953125,
-0.037994384765625,
-0.011138916015625,
0.013763427734375,
0.036346435546875,
0.02972412109375,
-0.054168701171875,
0.030426025390625,
0.0144500732421875,
-0.01052093505859375,
-0.012969970703125,
-0.037750244140625,
-0.0430908203125,
-0.01094818115234375,
-0.0321044921875,
-0.060791015625,
0.01000213623046875,
-0.0287933349609375,
-0.08734130859375,
0.1038818359375,
0.0411376953125,
0.06414794921875,
0.018829345703125,
0.02294921875,
-0.058624267578125,
-0.0205078125,
-0.0188140869140625,
-0.012451171875,
-0.0217132568359375,
0.01364898681640625,
-0.03448486328125,
-0.0017938613891601562,
-0.005611419677734375,
0.0394287109375,
0.0273590087890625,
-0.00634765625,
-0.00872039794921875,
-0.003696441650390625,
0.03558349609375,
0.0100250244140625,
-0.0259857177734375,
0.0173797607421875,
-0.003368377685546875,
-0.049835205078125,
0.0251312255859375,
-0.00024819374084472656,
0.031463623046875,
-0.028900146484375,
-0.0026798248291015625,
0.0230712890625,
-0.000659942626953125,
-0.0113983154296875,
0.00389862060546875,
0.031402587890625,
-0.0258941650390625,
0.00783538818359375,
0.0078887939453125,
0.026885986328125,
-0.0084686279296875,
0.0127716064453125,
0.0088653564453125,
-0.04296875,
-0.0278167724609375,
-0.01812744140625,
0.0263214111328125,
0.011444091796875,
-0.01873779296875,
0.0208587646484375,
0.0016355514526367188,
0.0640869140625,
-0.0164947509765625,
-0.026641845703125,
0.0176849365234375,
0.03594970703125,
0.01238250732421875,
-0.0069122314453125,
0.033966064453125,
-0.04913330078125,
-0.051513671875,
0.0257110595703125,
0.040435791015625,
-0.0170440673828125,
-0.049346923828125,
0.0011930465698242188,
0.00940704345703125,
0.026275634765625,
0.017547607421875,
0.0679931640625,
-0.03118896484375,
-0.01187896728515625,
-0.05816650390625,
0.0142822265625,
-0.002056121826171875,
0.01044464111328125,
-0.023223876953125,
0.0163726806640625,
-0.0016803741455078125,
0.001094818115234375,
-0.007686614990234375,
-0.005138397216796875,
0.0257720947265625,
0.060791015625,
0.01012420654296875,
0.0178375244140625,
-0.064208984375,
-0.0199737548828125,
0.0196685791015625,
-0.006011962890625,
0.0221099853515625,
-0.0259552001953125,
0.032470703125,
0.0257415771484375,
-0.03350830078125,
0.00862884521484375,
0.0019464492797851562,
0.0447998046875,
0.042449951171875,
-0.0037899017333984375,
-0.031097412109375,
-0.002643585205078125,
0.003017425537109375,
-0.0489501953125,
0.0157928466796875,
-0.01611328125,
-0.0341796875,
-0.0460205078125,
-0.034942626953125,
-0.0005702972412109375,
0.062103271484375,
-0.0413818359375,
-0.002532958984375,
0.01380157470703125,
0.005153656005859375,
-0.034454345703125,
0.041717529296875,
-0.0279998779296875,
0.0731201171875,
0.00820159912109375,
-0.007419586181640625,
0.01004791259765625,
-0.0014123916625976562,
-0.05810546875,
0.004711151123046875,
0.031707763671875,
-0.0156402587890625,
0.0281829833984375,
0.00528717041015625,
-0.034637451171875,
0.05340576171875,
-0.0091400146484375,
-0.028778076171875,
-0.0223846435546875,
0.018829345703125,
-0.042755126953125,
-0.0084075927734375,
0.01555633544921875,
0.01538848876953125,
-0.0132904052734375,
-0.005641937255859375,
0.054656982421875,
-0.006671905517578125,
-0.015655517578125,
-0.0310516357421875,
0.04315185546875,
-0.034698486328125,
-0.0258941650390625,
0.01126861572265625,
0.0257415771484375,
0.0198974609375,
-0.00441741943359375,
-0.07318115234375,
0.0094146728515625,
0.00196075439453125,
-0.020538330078125,
0.03985595703125,
-0.0216064453125,
0.01971435546875,
-0.002033233642578125,
0.03436279296875,
-0.0278472900390625,
-0.020355224609375,
-0.04534912109375,
-0.0200042724609375,
0.0308685302734375,
0.021575927734375,
-0.0014400482177734375,
0.035675048828125,
-0.0518798828125,
-0.031707763671875,
0.0229034423828125,
-0.078369140625,
0.0201873779296875,
0.028900146484375,
-0.0219573974609375,
0.0114288330078125,
0.0043792724609375,
-0.03485107421875,
0.0194854736328125,
-0.00616455078125,
0.004383087158203125,
-0.0117340087890625,
-0.010345458984375,
-0.0006546974182128906,
0.0076141357421875,
0.023193359375,
0.004512786865234375,
-0.0033016204833984375,
-0.02532958984375,
-0.007556915283203125,
0.01306915283203125,
-0.0088348388671875,
0.00341796875,
0.0102996826171875,
-0.020050048828125,
-0.00708770751953125,
0.0189056396484375,
-0.0223541259765625,
0.003360748291015625,
-0.007610321044921875,
0.004467010498046875,
-0.0310821533203125,
0.0003056526184082031,
-0.021453857421875,
-0.041473388671875,
0.0341796875,
-0.02239990234375,
0.03900146484375,
0.0001798868179321289,
0.0308074951171875,
-0.0283966064453125,
-0.006744384765625,
0.004119873046875,
0.0185546875,
0.004528045654296875,
0.0012216567993164062,
0.062103271484375,
-0.0183868408203125,
-0.06317138671875,
-0.041107177734375,
0.00867462158203125,
0.013427734375,
-0.027923583984375,
-0.0271148681640625,
0.00899505615234375,
0.01514434814453125,
-0.00920867919921875,
-0.045379638671875,
-0.01013946533203125,
-0.0172576904296875,
0.0198974609375,
-0.0185394287109375,
0.0029449462890625,
-0.002445220947265625,
-0.040252685546875,
-0.048492431640625,
-0.022247314453125,
0.01181793212890625,
-0.039306640625,
-0.02813720703125,
-0.0267486572265625,
0.0172271728515625,
0.0115509033203125,
-0.0290679931640625,
-0.0186767578125,
-0.06396484375,
0.01557159423828125,
-0.0197601318359375,
0.026763916015625,
0.01061248779296875,
-0.0267333984375,
-0.0002570152282714844,
-0.00829315185546875,
-0.00286865234375,
-0.03955078125,
0.0316162109375,
-0.0203857421875,
0.0518798828125,
0.043304443359375,
-0.02685546875,
0.004116058349609375,
0.0139007568359375,
-0.062255859375,
-0.0027027130126953125,
-0.01290130615234375,
-0.03009033203125,
0.018280029296875,
0.0859375,
0.062225341796875,
0.024017333984375,
-0.0550537109375,
-0.054473876953125,
-0.01580810546875,
0.0220489501953125,
-0.013427734375,
-0.00615692138671875,
-0.0361328125,
0.006908416748046875,
-0.03021240234375,
-0.00861358642578125,
0.0016012191772460938,
-0.00995635986328125,
-0.03863525390625,
-0.01056671142578125,
-0.0290679931640625,
-0.02508544921875,
-0.00891876220703125,
-0.09027099609375,
0.058502197265625,
-0.0023784637451171875,
0.022247314453125,
-0.00893402099609375,
0.0836181640625,
0.0270843505859375,
0.03924560546875,
0.00846099853515625,
0.018280029296875,
-0.014892578125,
-0.004116058349609375,
0.029388427734375,
-0.0276336669921875,
0.0001245737075805664,
-0.0008821487426757812,
-0.02117919921875,
0.006160736083984375,
-0.00258636474609375,
0.006977081298828125,
-0.004199981689453125,
0.01413726806640625,
0.01085662841796875,
0.04241943359375,
-0.051177978515625,
-0.048919677734375,
-0.0372314453125,
0.0051116943359375,
0.021484375,
0.0156097412109375,
0.07794189453125,
0.0011739730834960938,
0.0014896392822265625,
0.0308074951171875,
-0.01708984375,
-0.03692626953125,
0.0269775390625,
0.011444091796875,
0.0186004638671875,
0.017425537109375
]
|
d46e4db0bdcefd21408aa9625fbc720628112412 | Wordpress Stackexchange
Q: How to get post id of static front page? I'm trying to use the front page as a default of sorts for featured images (if no featured image is set, I want to use the front page's, for example)
But I'm having trouble finding out how to get the post ID of the front page in a safe manner (so that my code still works when the front page is inevitably changed by someone)
I know I could just hard code an ID in my code, but that'll break when someone decides to use a new content item as the front page.
Would I have to use wp-query to achieve this? And if so, what is a safe way to achieve this with wp-query?
A: You should be able to use $front_page_id = get_option( 'page_on_front' );
It'll return the ID of the page you're using as your site's front page, or 0 if it hasn't been set.
Codex: get_option()
| Q: How to get post id of static front page? I'm trying to use the front page as a default of sorts for featured images (if no featured image is set, I want to use the front page's, for example)
But I'm having trouble finding out how to get the post ID of the front page in a safe manner (so that my code still works when the front page is inevitably changed by someone)
I know I could just hard code an ID in my code, but that'll break when someone decides to use a new content item as the front page.
Would I have to use wp-query to achieve this? And if so, what is a safe way to achieve this with wp-query?
A: You should be able to use $front_page_id = get_option( 'page_on_front' );
It'll return the ID of the page you're using as your site's front page, or 0 if it hasn't been set.
Codex: get_option()
A: WordPress has a few useful options. You can get the homepage ID by using the following:
$frontpage_id = get_option( 'page_on_front' );
or the blog ID by using:
$blog_id = get_option( 'page_for_posts' );
Here's a list of many useful get_option parameters.
| wordpress | {
"language": "en",
"length": 201,
"provenance": "stackexchange_00019.jsonl.gz:449644",
"question_score": "48",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165374"
} | [
0.050872802734375,
-0.0024318695068359375,
0.0311279296875,
0.0179290771484375,
0.0166015625,
-0.00787353515625,
0.057830810546875,
-0.059051513671875,
-0.0162506103515625,
-0.004962921142578125,
-0.042510986328125,
0.01153564453125,
-0.05987548828125,
-0.0154876708984375,
-0.003925323486328125,
-0.07012939453125,
0.05572509765625,
-0.0399169921875,
0.032684326171875,
-0.0003597736358642578,
0.001857757568359375,
0.0219573974609375,
0.0491943359375,
0.0537109375,
0.049224853515625,
-0.00913238525390625,
0.0151519775390625,
-0.03387451171875,
0.040679931640625,
-0.0036182403564453125,
0.0288238525390625,
-0.02447509765625,
-0.0102386474609375,
-0.0192413330078125,
0.062164306640625,
0.00910186767578125,
0.048583984375,
0.00024962425231933594,
0.0518798828125,
-0.0079498291015625,
0.0238189697265625,
0.01043701171875,
-0.0104827880859375,
0.041229248046875,
-0.0298309326171875,
-0.04644775390625,
-0.0025005340576171875,
-0.03826904296875,
0.01232147216796875,
0.021453857421875,
0.00905609130859375,
0.018096923828125,
0.007843017578125,
0.0201873779296875,
-0.00835418701171875,
-0.0139617919921875,
0.033935546875,
-0.02899169921875,
0.038665771484375,
-0.00888824462890625,
-0.0282135009765625,
-0.00937652587890625,
0.033203125,
-0.035858154296875,
-0.007106781005859375,
-0.01538848876953125,
-0.0295257568359375,
0.0279693603515625,
-0.0098114013671875,
-0.02130126953125,
0.00823974609375,
-0.0140380859375,
0.010467529296875,
-0.0150604248046875,
-0.03192138671875,
-0.0217132568359375,
0.0187835693359375,
-0.0150604248046875,
0.01131439208984375,
-0.01154327392578125,
-0.054351806640625,
-0.0094757080078125,
-0.10992431640625,
-0.015777587890625,
0.0097808837890625,
0.0141143798828125,
-0.032806396484375,
0.0020771026611328125,
-0.01861572265625,
-0.01483917236328125,
-0.0179443359375,
-0.01052093505859375,
-0.0108489990234375,
-0.00884246826171875,
-0.0322265625,
-0.028961181640625,
0.048065185546875,
0.10223388671875,
-0.042144775390625,
-0.01183319091796875,
-0.0171356201171875,
-0.037353515625,
0.007373809814453125,
-0.0438232421875,
-0.01117706298828125,
0.017852783203125,
0.04302978515625,
0.035400390625,
-0.01178741455078125,
0.01099395751953125,
-0.034820556640625,
-0.00824737548828125,
0.00860595703125,
-0.01091766357421875,
-0.037872314453125,
0.01129150390625,
-0.00911712646484375,
-0.0109405517578125,
-0.005794525146484375,
-0.004169464111328125,
0.0144805908203125,
0.0389404296875,
0.015716552734375,
-0.041259765625,
0.01039886474609375,
0.01032257080078125,
-0.034332275390625,
-0.04559326171875,
-0.03765869140625,
0.02252197265625,
-0.0587158203125,
0.016021728515625,
0.1170654296875,
0.030731201171875,
0.020782470703125,
-0.0295257568359375,
-0.008331298828125,
-0.01009368896484375,
0.01702880859375,
0.002079010009765625,
-0.0017757415771484375,
-0.03680419921875,
0.0224609375,
0.00463104248046875,
0.027069091796875,
0.030914306640625,
0.040924072265625,
0.030426025390625,
-0.0291595458984375,
-0.05615234375,
0.055450439453125,
-0.0220794677734375,
0.01849365234375,
0.0007615089416503906,
0.035614013671875,
-0.02569580078125,
0.034332275390625,
-0.0274200439453125,
-0.00006753206253051758,
-0.0226593017578125,
0.00922393798828125,
0.00589752197265625,
0.0190277099609375,
-0.01282501220703125,
-0.0226287841796875,
-0.0194549560546875,
-0.0263214111328125,
-0.0091400146484375,
0.0157623291015625,
0.0499267578125,
0.0126953125,
0.001171112060546875,
-0.044921875,
0.0112457275390625,
-0.00365447998046875,
-0.00762939453125,
-0.0135650634765625,
-0.0087890625,
0.0174560546875,
0.044158935546875,
-0.001972198486328125,
-0.046478271484375,
-0.00722503662109375,
0.0157623291015625,
-0.021026611328125,
0.0202484130859375,
0.0233154296875,
0.06622314453125,
-0.0211334228515625,
0.028778076171875,
0.002376556396484375,
-0.0019683837890625,
-0.07720947265625,
0.0168304443359375,
0.0102081298828125,
0.016571044921875,
-0.042877197265625,
-0.0128936767578125,
-0.00273895263671875,
-0.021087646484375,
0.0574951171875,
-0.01300048828125,
0.01898193359375,
-0.026580810546875,
-0.03564453125,
-0.036376953125,
0.0081787109375,
0.0187835693359375,
0.02142333984375,
0.0158233642578125,
0.017333984375,
-0.0247955322265625,
-0.0031299591064453125,
-0.04754638671875,
-0.046234130859375,
0.0223236083984375,
-0.04278564453125,
-0.02178955078125,
-0.0183563232421875,
0.029083251953125,
-0.042388916015625,
0.01218414306640625,
-0.049713134765625,
-0.01776123046875,
0.060028076171875,
-0.0081787109375,
-0.018035888671875,
-0.041900634765625,
0.047637939453125,
-0.00409698486328125,
-0.036956787109375,
0.0254669189453125,
0.022674560546875,
0.0040283203125,
-0.01800537109375,
0.0017290115356445312,
0.0241241455078125,
-0.057037353515625,
0.00962066650390625,
0.051727294921875,
0.0284576416015625,
0.0242156982421875,
-0.003177642822265625,
-0.00620269775390625,
0.038421630859375,
-0.0307769775390625,
0.006427764892578125,
-0.005977630615234375,
0.0189056396484375,
0.0290679931640625,
-0.0014801025390625,
-0.00969696044921875,
0.037322998046875,
-0.02154541015625,
-0.00653839111328125,
0.04547119140625,
-0.006443023681640625,
-0.00318145751953125,
-0.0089111328125,
0.0171356201171875,
-0.01100921630859375,
-0.0296173095703125,
-0.00267791748046875,
-0.0193328857421875,
0.0148773193359375,
0.0020923614501953125,
0.02093505859375,
0.02203369140625,
-0.02508544921875,
0.0184173583984375,
0.0185699462890625,
-0.007232666015625,
-0.01435089111328125,
0.047119140625,
0.061737060546875,
-0.0244140625,
-0.02374267578125,
-0.0311279296875,
0.0007138252258300781,
0.0178070068359375,
-0.01163482666015625,
0.0264892578125,
-0.020416259765625,
-0.002086639404296875,
-0.01812744140625,
-0.0506591796875,
0.0093536376953125,
0.033843994140625,
0.0112457275390625,
0.00850677490234375,
-0.007843017578125,
0.055389404296875,
-0.035552978515625,
0.050506591796875,
0.005329132080078125,
0.0023250579833984375,
-0.02496337890625,
-0.058074951171875,
0.0458984375,
-0.044525146484375,
0.05413818359375,
0.0855712890625,
-0.024810791015625,
0.041015625,
0.0017070770263671875,
0.021728515625,
0.01531219482421875,
0.0072021484375,
-0.00464630126953125,
0.0005640983581542969,
-0.054229736328125,
-0.0108642578125,
0.011138916015625,
0.0926513671875,
-0.05072021484375,
-0.040679931640625,
-0.0026683807373046875,
0.028411865234375,
-0.04998779296875,
-0.07159423828125,
-0.0132598876953125,
-0.039825439453125,
-0.0010223388671875,
-0.026031494140625,
-0.015777587890625,
0.004009246826171875,
-0.006542205810546875,
-0.0017375946044921875,
-0.010101318359375,
-0.0163116455078125,
-0.06890869140625,
-0.039886474609375,
-0.07861328125,
-0.002063751220703125,
-0.0171356201171875,
0.028228759765625,
-0.0010423660278320312,
0.018310546875,
-0.0036869049072265625,
-0.06201171875,
-0.00799560546875,
0.0343017578125,
-0.0186767578125,
-0.0245208740234375,
0.01175689697265625,
-0.0241546630859375,
-0.027191162109375,
0.01082611083984375,
-0.0251312255859375,
0.0076141357421875,
0.01122283935546875,
-0.0114288330078125,
-0.048553466796875,
-0.0556640625,
-0.0216217041015625,
0.056640625,
0.046783447265625,
-0.0266265869140625,
0.04913330078125,
-0.045257568359375,
-0.0254669189453125,
-0.0219879150390625,
-0.054901123046875,
-0.0029010772705078125,
0.01528167724609375,
0.0089874267578125,
-0.0275726318359375,
0.0235443115234375,
0.026885986328125,
-0.0024013519287109375,
0.0207061767578125,
-0.006801605224609375,
-0.00827789306640625,
0.0008215904235839844,
0.0165863037109375,
-0.0174407958984375,
0.00841522216796875,
-0.01129913330078125,
0.0142059326171875,
-0.00208282470703125,
0.019927978515625,
0.00035452842712402344,
-0.0020084381103515625,
-0.0254364013671875,
-0.057891845703125,
0.042083740234375,
-0.0168304443359375,
0.005908966064453125,
-0.01561737060546875,
-0.0269775390625,
0.022064208984375,
0.0849609375,
-0.03607177734375,
-0.016082763671875,
-0.036346435546875,
0.0004940032958984375,
-0.00447845458984375,
-0.05963134765625,
-0.01568603515625,
-0.0211029052734375,
-0.06793212890625,
0.0036945343017578125,
-0.00882720947265625,
-0.024871826171875,
-0.025146484375,
0.0020809173583984375,
-0.048675537109375,
-0.0372314453125,
0.0263824462890625,
-0.043426513671875,
-0.003200531005859375,
0.0477294921875,
-0.038818359375,
0.045623779296875,
-0.04852294921875,
-0.0157318115234375,
-0.0341796875,
-0.01532745361328125,
0.0234375,
0.0184478759765625,
-0.00229644775390625,
-0.030303955078125,
-0.01308441162109375,
0.040924072265625,
0.005023956298828125,
0.02569580078125,
0.002197265625,
0.02398681640625,
0.00467681884765625,
-0.06036376953125,
-0.0134429931640625,
-0.0484619140625,
0.008087158203125,
-0.01104736328125,
-0.040557861328125,
0.0011110305786132812,
-0.038360595703125,
-0.014404296875,
0.006801605224609375,
-0.0222320556640625,
-0.03399658203125,
-0.01300811767578125,
-0.0047454833984375,
0.0269622802734375,
0.0013628005981445312,
-0.015411376953125,
-0.04193115234375,
-0.045745849609375,
0.0306549072265625,
-0.0004508495330810547,
-0.01277923583984375,
0.0136566162109375,
0.0902099609375,
0.0268096923828125,
-0.0166168212890625,
-0.04022216796875,
-0.022491455078125,
0.048004150390625,
0.03131103515625,
0.02276611328125,
0.03363037109375,
-0.042877197265625,
0.04150390625,
0.03839111328125,
-0.05657958984375,
-0.0024738311767578125,
0.050323486328125,
-0.0146942138671875,
-0.03179931640625,
-0.00644683837890625,
-0.05633544921875,
0.0625,
-0.00484466552734375,
-0.042694091796875,
0.0125579833984375,
-0.0287628173828125,
0.0236968994140625,
-0.027801513671875,
0.057952880859375,
-0.0217132568359375,
-0.01451873779296875,
-0.0009374618530273438,
-0.0169830322265625,
0.029632568359375,
0.040374755859375,
-0.00015425682067871094,
0.005859375,
0.01171112060546875,
0.0007920265197753906,
0.03997802734375,
0.00307464599609375,
0.032562255859375,
0.023193359375,
0.020263671875,
0.0023784637451171875,
0.010589599609375,
-0.008148193359375,
0.06842041015625,
-0.03509521484375,
-0.06988525390625,
0.01094818115234375,
-0.01934814453125,
-0.034759521484375,
0.0576171875,
-0.021148681640625,
0.0377197265625,
0.0201263427734375,
-0.0303955078125,
-0.0167083740234375,
-0.0484619140625,
-0.0260772705078125,
-0.0560302734375,
-0.007724761962890625,
0.01277923583984375,
-0.00852203369140625,
0.022918701171875,
0.047760009765625,
0.002140045166015625,
0.035675048828125,
-0.0293426513671875,
0.0245513916015625,
-0.0025005340576171875,
0.0513916015625,
-0.01001739501953125,
0.01216888427734375,
0.010894775390625,
0.0140228271484375,
0.0004253387451171875,
-0.02032470703125,
-0.00667572021484375,
0.0240325927734375,
0.042205810546875,
-0.01532745361328125,
-0.0168609619140625,
-0.0009822845458984375,
-0.03240966796875,
-0.010406494140625,
0.050933837890625,
-0.00365447998046875,
-0.056365966796875,
-0.039703369140625,
-0.007190704345703125,
0.035858154296875,
-0.011444091796875,
-0.00647735595703125,
0.004802703857421875,
-0.0172119140625,
0.0219268798828125,
-0.0158538818359375,
-0.017425537109375,
0.0133514404296875,
0.0261993408203125,
-0.01026153564453125,
-0.0265045166015625,
-0.004878997802734375,
-0.0146942138671875,
0.0180816650390625,
-0.040252685546875,
-0.0233917236328125,
0.034423828125,
-0.01708984375,
0.0733642578125,
-0.004245758056640625,
-0.06494140625,
0.03192138671875,
0.0194854736328125,
0.031829833984375,
0.01654052734375,
-0.00577545166015625,
0.002109527587890625,
-0.056396484375,
-0.01296234130859375,
0.056884765625,
0.0101318359375,
-0.026275634765625,
-0.0267486572265625,
0.01812744140625,
0.05316162109375,
-0.037353515625,
-0.0217132568359375,
-0.0094757080078125,
0.0021305084228515625,
0.002105712890625,
0.08465576171875,
-0.01337432861328125,
0.00395965576171875,
0.0099639892578125,
0.004703521728515625,
-0.0023059844970703125,
-0.0194854736328125,
-0.014617919921875,
-0.027099609375,
-0.030120849609375,
-0.005542755126953125,
0.031768798828125,
0.0313720703125,
0.0263519287109375,
-0.0178375244140625,
0.02197265625,
0.01348114013671875,
0.00923919677734375,
-0.002101898193359375,
0.01137542724609375,
-0.016754150390625,
-0.0258636474609375,
-0.006412506103515625,
-0.0250701904296875,
0.016082763671875,
-0.0155792236328125,
-0.0235748291015625,
-0.0107574462890625,
0.036956787109375,
-0.029815673828125,
-0.0191497802734375,
-0.024261474609375,
0.019775390625,
-0.048492431640625,
0.05987548828125,
0.1094970703125,
0.043060302734375,
0.07098388671875,
0.00963592529296875,
0.01265716552734375,
0.01763916015625,
0.054656982421875,
-0.10003662109375,
-0.0428466796875,
0.04901123046875,
0.04852294921875,
-0.0219879150390625,
0.043212890625,
-0.008697509765625,
0.010101318359375,
-0.005229949951171875,
0.052154541015625,
-0.009429931640625,
0.01462554931640625,
0.0301055908203125,
-0.03155517578125,
0.00756072998046875,
0.0264892578125,
-0.00963592529296875,
0.01403045654296875,
0.02880859375,
-0.0537109375,
-0.0092620849609375,
0.029754638671875,
0.0007448196411132812,
-0.00850677490234375,
-0.034332275390625,
0.04180908203125,
0.0120086669921875,
-0.0027523040771484375,
0.0031147003173828125,
0.01123046875,
-0.01617431640625,
-0.03515625,
0.0166778564453125,
-0.01477813720703125,
-0.02215576171875,
-0.06439208984375,
0.0043182373046875,
0.018585205078125,
0.00225067138671875,
0.04156494140625,
-0.00882720947265625,
0.00864410400390625,
0.038238525390625,
-0.014495849609375,
0.031646728515625,
-0.01824951171875,
-0.01898193359375,
-0.0127105712890625,
-0.021514892578125,
0.01812744140625,
0.0006647109985351562,
-0.049530029296875,
0.022918701171875,
-0.028564453125,
-0.02935791015625,
-0.0205230712890625,
-0.051788330078125,
0.104248046875,
-0.062164306640625,
0.00966644287109375,
0.0121002197265625,
0.046661376953125,
-0.01238250732421875,
-0.031158447265625,
-0.00797271728515625,
-0.0229339599609375,
0.037353515625,
-0.0291595458984375,
0.040618896484375,
0.00731658935546875,
-0.03057861328125,
-0.0771484375,
0.0765380859375,
-0.0225067138671875,
0.0286865234375,
-0.004589080810546875,
0.0269317626953125,
-0.00969696044921875,
-0.00524139404296875,
-0.045318603515625,
0.042205810546875,
-0.03509521484375,
0.04095458984375,
-0.0699462890625,
-0.006519317626953125,
-0.000046193599700927734,
0.0218963623046875,
0.06634521484375,
0.0162506103515625,
-0.004863739013671875,
-0.01493072509765625,
0.04742431640625,
0.04534912109375,
-0.005878448486328125,
0.0273895263671875,
-0.01509857177734375,
0.020721435546875,
-0.00217437744140625,
-0.048858642578125,
0.0218353271484375,
-0.03179931640625,
-0.013519287109375,
0.012298583984375,
0.030364990234375,
0.026336669921875,
0.029510498046875,
-0.021881103515625,
-0.060150146484375,
0.0240478515625,
0.043426513671875,
-0.0171356201171875,
-0.0020732879638671875,
0.0701904296875,
0.0631103515625,
-0.0285186767578125,
0.00409698486328125,
-0.0281524658203125,
0.061553955078125,
0.0026988983154296875,
0.024139404296875,
0.0017919540405273438,
0.02154541015625,
0.0372314453125,
-0.0180816650390625,
0.0011119842529296875,
0.023895263671875,
-0.023193359375,
0.0645751953125,
0.047027587890625,
0.0173797607421875,
-0.06573486328125,
-0.043212890625,
0.060821533203125,
0.10198974609375,
-0.041839599609375,
-0.037384033203125,
0.0193939208984375,
-0.0278472900390625,
-0.01236724853515625,
-0.00833892822265625,
-0.01140594482421875,
0.0035686492919921875,
0.0172576904296875,
-0.03485107421875,
0.0192718505859375,
0.041107177734375,
0.03521728515625,
0.0019817352294921875,
-0.0003428459167480469,
-0.07574462890625,
-0.0134429931640625,
-0.041748046875,
-0.02069091796875,
0.0114593505859375,
0.027435302734375,
0.0274810791015625,
0.013427734375,
0.03204345703125,
0.002658843994140625,
0.005687713623046875,
0.038848876953125,
0.0046844482421875,
-0.0003705024719238281,
-0.00583648681640625,
-0.035491943359375,
-0.0082855224609375,
0.003314971923828125,
0.0001220703125,
0.0209503173828125,
0.0300140380859375,
0.00222015380859375,
-0.03448486328125,
-0.0179290771484375,
-0.00013756752014160156,
-0.03460693359375,
0.0006213188171386719,
-0.01812744140625,
-0.006244659423828125,
0.006999969482421875,
-0.02294921875,
0.00917816162109375,
0.0126190185546875,
0.03131103515625,
-0.001857757568359375,
0.0271453857421875,
0.00911712646484375,
-0.0133819580078125,
0.032318115234375,
0.00574493408203125,
0.029144287109375,
0.00971221923828125,
-0.10369873046875,
-0.034210205078125,
-0.0302276611328125,
-0.019378662109375,
0.024261474609375,
0.03338623046875,
0.0013360977172851562,
-0.00803375244140625,
-0.031585693359375,
0.01715087890625,
0.0122222900390625,
-0.04449462890625,
0.0121002197265625,
0.0305328369140625,
0.01531982421875,
0.01395416259765625,
-0.05224609375,
-0.0318603515625,
-0.003505706787109375,
0.004871368408203125,
0.0112152099609375,
0.02490234375,
0.0279083251953125,
0.01215362548828125,
-0.0085601806640625,
0.0295562744140625,
-0.0511474609375,
-0.0247955322265625,
0.056610107421875,
-0.02728271484375,
0.01474761962890625,
0.005496978759765625,
-0.055145263671875,
0.053802490234375,
0.0171051025390625,
0.0096588134765625,
0.04620361328125,
-0.0287322998046875,
0.004058837890625,
-0.0025806427001953125,
0.0234527587890625,
-0.01476287841796875,
-0.0083770751953125,
-0.019439697265625,
-0.0023479461669921875,
0.04266357421875,
0.01142120361328125,
-0.04034423828125,
0.036468505859375,
-0.0156097412109375,
-0.034027099609375,
0.034393310546875,
-0.06024169921875,
0.05059814453125,
0.043243408203125,
-0.0369873046875,
-0.0263671875,
0.003131866455078125,
-0.00994110107421875,
-0.01367950439453125,
0.0123443603515625,
0.033050537109375,
-0.0037994384765625,
0.003093719482421875,
-0.0007252693176269531,
-0.00034689903259277344,
0.034210205078125,
-0.0277099609375,
0.01727294921875,
0.0100250244140625,
0.019134521484375,
-0.00995635986328125,
-0.04107666015625,
-0.008941650390625,
-0.036407470703125,
-0.0021533966064453125,
0.0287933349609375,
-0.01174163818359375,
0.005306243896484375,
-0.0176544189453125,
-0.0182037353515625,
0.002956390380859375,
-0.007221221923828125,
-0.0268096923828125,
0.0231475830078125,
0.0002522468566894531,
0.019317626953125,
-0.047607421875,
0.0301666259765625,
-0.0149688720703125,
0.00970458984375,
-0.045379638671875,
-0.0027637481689453125,
-0.02716064453125,
-0.002887725830078125,
-0.0121307373046875,
0.02197265625,
0.0513916015625,
-0.0131683349609375,
-0.018218994140625,
0.0225677490234375,
-0.00531768798828125,
0.06939697265625,
-0.035430908203125,
-0.00946044921875,
0.011810302734375,
0.0122222900390625,
-0.03387451171875,
-0.055755615234375,
0.0360107421875,
-0.0673828125,
-0.0225067138671875,
-0.030975341796875,
0.00469970703125,
0.0301055908203125,
-0.0267486572265625,
-0.01390838623046875,
0.044952392578125,
-0.0172119140625,
-0.0213623046875,
0.006378173828125,
-0.01180267333984375,
-0.0035610198974609375,
-0.029571533203125,
0.0103759765625,
-0.0298004150390625,
-0.0302581787109375,
0.016357421875,
0.0194091796875,
-0.003173828125,
0.04620361328125,
0.00948333740234375,
-0.03985595703125,
-0.00392913818359375,
-0.015380859375,
0.0108642578125,
0.03460693359375,
-0.0153350830078125,
0.0229949951171875,
0.02813720703125,
-0.07757568359375,
0.0088043212890625,
-0.03619384765625,
0.042572021484375,
-0.0182342529296875,
-0.0011692047119140625,
0.0006122589111328125,
-0.001422882080078125,
0.026153564453125,
0.056304931640625,
0.00911712646484375,
-0.03515625,
-0.0233154296875,
-0.009765625,
-0.053466796875,
-0.0024871826171875,
0.04217529296875,
-0.0673828125,
0.011505126953125,
0.00524139404296875,
-0.048004150390625,
-0.0163726806640625,
0.003955841064453125,
-0.061737060546875,
0.0230865478515625,
-0.022796630859375,
-0.018585205078125,
-0.0128631591796875,
0.0298309326171875,
0.027252197265625,
-0.0263824462890625,
0.0014562606811523438,
-0.0474853515625,
0.01122283935546875,
0.0182952880859375,
-0.06005859375,
0.0460205078125,
0.043182373046875,
-0.0232086181640625,
-0.01219940185546875,
0.04864501953125,
-0.0098724365234375,
0.00913238525390625,
-0.0164794921875,
-0.0231781005859375,
0.0281829833984375,
0.0017719268798828125,
0.032470703125,
0.0202789306640625,
0.037078857421875,
0.01515960693359375,
0.043792724609375,
-0.0243377685546875,
0.05926513671875,
0.006488800048828125,
0.027862548828125,
-0.051422119140625,
0.0225067138671875,
0.0002753734588623047,
-0.056854248046875,
0.01184844970703125,
0.004215240478515625,
0.0223541259765625,
0.017608642578125,
-0.00946044921875,
0.01390838623046875,
-0.0102691650390625,
-0.003673553466796875
]
|
4defe845da7b4b1bdb1ecae18ea6f658b88edcbe | Wordpress Stackexchange
Q: Query all posts with specific tag I need to fetch all the posts with a specific tag, but I'm getting all the posts instead. My query works if I publish a post with the tag that I need and list all the posts with that tag, but when I publish a post with another tag, it's fetching the newly published post.
This is my query:
$original_query = $wp_query;
$wp_query = null;
$args=array(
'posts_per_page' => -1,
'tag' => $post_tag
);
$wp_query = new WP_Query( $args );
$post_titles=array();
$i=0;
if ( have_posts() ) :
while (have_posts()) : the_post();
$post_titles[$i]=get_the_ID() ;
$i++;
endwhile;
endif;
$wp_query = null;
$wp_query = $original_query;
wp_reset_postdata();
A: It's a lot easier to create a new WP_Query than it is to try clearing or overwriting the original.
If $post_tag is a tag slug, you could simply use:
<?php
$the_query = new WP_Query( 'tag='.$post_tag );
if ( $the_query->have_posts() ) {
echo '<ul>';
while ( $the_query->have_posts() ) {
$the_query->the_post();
echo '<li>' . get_the_title() . '</li>';
}
echo '</ul>';
} else {
// no posts found
}
/* Restore original Post Data */
wp_reset_postdata();
| Q: Query all posts with specific tag I need to fetch all the posts with a specific tag, but I'm getting all the posts instead. My query works if I publish a post with the tag that I need and list all the posts with that tag, but when I publish a post with another tag, it's fetching the newly published post.
This is my query:
$original_query = $wp_query;
$wp_query = null;
$args=array(
'posts_per_page' => -1,
'tag' => $post_tag
);
$wp_query = new WP_Query( $args );
$post_titles=array();
$i=0;
if ( have_posts() ) :
while (have_posts()) : the_post();
$post_titles[$i]=get_the_ID() ;
$i++;
endwhile;
endif;
$wp_query = null;
$wp_query = $original_query;
wp_reset_postdata();
A: It's a lot easier to create a new WP_Query than it is to try clearing or overwriting the original.
If $post_tag is a tag slug, you could simply use:
<?php
$the_query = new WP_Query( 'tag='.$post_tag );
if ( $the_query->have_posts() ) {
echo '<ul>';
while ( $the_query->have_posts() ) {
$the_query->the_post();
echo '<li>' . get_the_title() . '</li>';
}
echo '</ul>';
} else {
// no posts found
}
/* Restore original Post Data */
wp_reset_postdata();
A: In your functions.php
/* Display Related Products */
/* ======================== */
if ( ! function_exists( 'display_related_products' ) ) {
function display_related_products($post_tag) {
?>
<div class="related-products">
<!-- simple WP_Query -->
<?php
$args = array(
'post_type' => 'product',
'tag' => $post_tag, // Here is where is being filtered by the tag you want
'orderby' => 'id',
'order' => 'ASC'
);
$related_products = new WP_Query( $args );
?>
<?php while ( $related_products -> have_posts() ) : $related_products -> the_post(); ?>
<a href="<?php the_permalink(); ?>" class="related-product">
<?php if( has_post_thumbnail() ) : ?>
<?php the_post_thumbnail( 'full', array( 'class' => 'related-product-img', 'alt' => get_the_title() ) ); ?>
<?php endif; ?>
</a>
<?php endwhile; wp_reset_query(); ?>
</div>
<?php
}
}
Call from anywhere with
display_related_products('name-of-the-tag');
| wordpress | {
"language": "en",
"length": 302,
"provenance": "stackexchange_00019.jsonl.gz:449670",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165457"
} | [
0.059661865234375,
0.01666259765625,
0.007434844970703125,
-0.0032939910888671875,
0.050506591796875,
-0.050811767578125,
0.08099365234375,
-0.04180908203125,
0.0047149658203125,
0.03472900390625,
-0.042510986328125,
-0.005374908447265625,
-0.0208587646484375,
-0.017059326171875,
-0.021881103515625,
-0.052886962890625,
0.03515625,
-0.03692626953125,
0.017974853515625,
-0.01399993896484375,
0.0135498046875,
0.01091766357421875,
0.04229736328125,
0.038604736328125,
0.014373779296875,
-0.00481414794921875,
0.053070068359375,
-0.0218048095703125,
0.0021820068359375,
-0.0226287841796875,
0.0187530517578125,
-0.00600433349609375,
0.0325927734375,
-0.0001163482666015625,
-0.0330810546875,
-0.0194549560546875,
0.016265869140625,
-0.025115966796875,
-0.0249481201171875,
0.039215087890625,
0.01482391357421875,
0.0032863616943359375,
0.0141143798828125,
0.045654296875,
-0.00632476806640625,
-0.0384521484375,
0.03759765625,
-0.041839599609375,
0.0247344970703125,
-0.01314544677734375,
0.0038299560546875,
-0.0075225830078125,
0.00637054443359375,
-0.045928955078125,
-0.0198822021484375,
0.020965576171875,
0.0204010009765625,
-0.0305023193359375,
0.05078125,
-0.040008544921875,
-0.055084228515625,
-0.043853759765625,
0.044189453125,
-0.007137298583984375,
-0.005329132080078125,
0.01515960693359375,
0.06976318359375,
-0.01277923583984375,
-0.0294036865234375,
0.0014858245849609375,
0.0399169921875,
-0.0283203125,
-0.01450347900390625,
0.036346435546875,
0.0113067626953125,
-0.06524658203125,
0.0069427490234375,
-0.04486083984375,
0.00809478759765625,
0.0618896484375,
0.03558349609375,
-0.0216217041015625,
-0.047210693359375,
0.0267181396484375,
-0.011077880859375,
0.0079498291015625,
0.005859375,
-0.0026798248291015625,
-0.0233917236328125,
-0.025726318359375,
-0.0274200439453125,
-0.0305633544921875,
-0.01171875,
-0.0185089111328125,
-0.0171356201171875,
-0.026275634765625,
0.005268096923828125,
0.05029296875,
-0.0172119140625,
0.026153564453125,
-0.027984619140625,
-0.025665283203125,
0.01788330078125,
-0.042144775390625,
0.04278564453125,
0.048675537109375,
-0.0297088623046875,
0.00362396240234375,
0.0716552734375,
0.0277557373046875,
0.0210113525390625,
0.01123046875,
-0.0102691650390625,
0.0194854736328125,
-0.0241851806640625,
-0.0038661956787109375,
-0.051177978515625,
-0.01103973388671875,
-0.0355224609375,
-0.0027141571044921875,
0.005565643310546875,
0.0212249755859375,
-0.045928955078125,
-0.0112762451171875,
0.018890380859375,
0.0214691162109375,
0.0174102783203125,
-0.003108978271484375,
-0.0134124755859375,
0.0148468017578125,
-0.01029205322265625,
0.028961181640625,
0.03753662109375,
-0.004367828369140625,
-0.031158447265625,
-0.0167388916015625,
-0.0155487060546875,
-0.057098388671875,
-0.009490966796875,
-0.0006399154663085938,
0.0263214111328125,
-0.0215606689453125,
0.0159759521484375,
0.0069580078125,
0.01824951171875,
0.02154541015625,
0.026092529296875,
-0.006927490234375,
-0.01104736328125,
-0.0236663818359375,
0.006122589111328125,
-0.00963592529296875,
0.0268096923828125,
-0.0010061264038085938,
-0.017822265625,
-0.03643798828125,
-0.000024616718292236328,
-0.030029296875,
0.0135040283203125,
-0.050689697265625,
0.016937255859375,
0.00643157958984375,
0.0272064208984375,
-0.036041259765625,
-0.047760009765625,
-0.00830841064453125,
-0.06048583984375,
-0.01073455810546875,
0.00545501708984375,
-0.007312774658203125,
0.00864410400390625,
-0.0015687942504882812,
0.043212890625,
0.0027179718017578125,
-0.006702423095703125,
0.007427215576171875,
-0.006473541259765625,
-0.0238494873046875,
0.0443115234375,
0.00725555419921875,
-0.033447265625,
-0.0266265869140625,
0.02471923828125,
-0.020294189453125,
-0.08209228515625,
0.038055419921875,
0.0081634521484375,
0.07525634765625,
0.0278778076171875,
0.01776123046875,
0.068115234375,
-0.0031280517578125,
-0.06890869140625,
0.07147216796875,
0.0122833251953125,
-0.016326904296875,
-0.043243408203125,
-0.01224517822265625,
-0.0036220550537109375,
-0.029998779296875,
0.007083892822265625,
0.010711669921875,
-0.0238800048828125,
0.01549530029296875,
-0.050872802734375,
0.004673004150390625,
-0.0193634033203125,
0.035919189453125,
0.006061553955078125,
0.033477783203125,
0.02752685546875,
0.034149169921875,
-0.042083740234375,
-0.0017108917236328125,
-0.026458740234375,
0.006072998046875,
-0.0253753662109375,
-0.037109375,
-0.0153656005859375,
-0.03216552734375,
-0.0179290771484375,
0.0068359375,
-0.0289764404296875,
0.0238189697265625,
0.08868408203125,
0.0001825094223022461,
-0.0010728836059570312,
-0.0200042724609375,
0.048309326171875,
0.027618408203125,
-0.07354736328125,
0.013916015625,
0.04510498046875,
0.057464599609375,
-0.03167724609375,
-0.0015478134155273438,
0.01873779296875,
-0.0225372314453125,
0.01434326171875,
0.044708251953125,
0.029510498046875,
0.0216217041015625,
-0.0250244140625,
-0.025115966796875,
0.0296783447265625,
-0.04931640625,
-0.0008416175842285156,
-0.018096923828125,
0.027801513671875,
0.052154541015625,
0.024017333984375,
-0.0021820068359375,
0.02325439453125,
-0.0039825439453125,
0.017913818359375,
0.0182952880859375,
0.0207977294921875,
0.045196533203125,
-0.040069580078125,
0.0018863677978515625,
-0.00911712646484375,
-0.00019037723541259766,
-0.00708770751953125,
-0.007053375244140625,
0.03472900390625,
0.007236480712890625,
0.041534423828125,
0.022979736328125,
-0.0092926025390625,
-0.01629638671875,
-0.006072998046875,
-0.00750732421875,
0.0165863037109375,
0.034576416015625,
-0.0562744140625,
0.04473876953125,
-0.03143310546875,
0.006816864013671875,
0.004344940185546875,
0.015106201171875,
-0.00167083740234375,
0.057586669921875,
0.0308685302734375,
-0.0106048583984375,
-0.0430908203125,
-0.05535888671875,
0.00809478759765625,
0.0174560546875,
0.007232666015625,
0.0005769729614257812,
0.0172119140625,
0.034698486328125,
-0.04168701171875,
0.061920166015625,
0.0009593963623046875,
-0.005832672119140625,
0.0279541015625,
-0.058990478515625,
0.046630859375,
-0.03070068359375,
0.09228515625,
0.07501220703125,
-0.0023212432861328125,
0.0243682861328125,
0.00829315185546875,
-0.0079803466796875,
0.00868988037109375,
0.01061248779296875,
-0.020111083984375,
0.0013980865478515625,
-0.06890869140625,
0.0179290771484375,
0.0256500244140625,
0.05596923828125,
0.009857177734375,
-0.05902099609375,
0.0027370452880859375,
0.035980224609375,
-0.10711669921875,
-0.0997314453125,
0.0316162109375,
-0.041473388671875,
0.000522613525390625,
-0.02166748046875,
-0.01497650146484375,
-0.0133056640625,
-0.0087127685546875,
0.0027179718017578125,
-0.0170135498046875,
-0.00588226318359375,
-0.07208251953125,
-0.049285888671875,
-0.07666015625,
0.0308074951171875,
-0.00794219970703125,
0.040008544921875,
0.01132965087890625,
0.083984375,
0.023651123046875,
-0.051177978515625,
0.0107269287109375,
0.0169830322265625,
-0.049285888671875,
0.00025773048400878906,
-0.01018524169921875,
0.0061798095703125,
0.003772735595703125,
0.004512786865234375,
-0.00728607177734375,
0.01410675048828125,
0.002979278564453125,
-0.017791748046875,
0.02587890625,
0.00013935565948486328,
0.06243896484375,
-0.0167388916015625,
-0.048675537109375,
0.05364990234375,
0.058563232421875,
0.00351715087890625,
-0.035430908203125,
-0.00897216796875,
-0.04632568359375,
0.037200927734375,
0.007740020751953125,
0.0157928466796875,
0.0255126953125,
0.009124755859375,
0.021728515625,
0.0139312744140625,
0.0229339599609375,
-0.012451171875,
0.02618408203125,
0.01226043701171875,
0.02252197265625,
-0.02532958984375,
0.0092010498046875,
-0.006732940673828125,
0.002140045166015625,
-0.00496673583984375,
0.0171356201171875,
-0.0099639892578125,
-0.00276947021484375,
-0.04669189453125,
-0.00742340087890625,
0.0185089111328125,
-0.0070648193359375,
0.0184478759765625,
-0.018096923828125,
-0.031707763671875,
-0.02679443359375,
0.033050537109375,
-0.0135040283203125,
-0.01390838623046875,
-0.047607421875,
-0.006893157958984375,
-0.0048980712890625,
-0.01081085205078125,
-0.01617431640625,
0.0017499923706054688,
-0.050750732421875,
-0.00795745849609375,
-0.021728515625,
-0.02362060546875,
0.0037593841552734375,
-0.01055145263671875,
-0.02044677734375,
-0.021148681640625,
0.03814697265625,
-0.03985595703125,
0.0237579345703125,
-0.017486572265625,
0.0167083740234375,
-0.02349853515625,
-0.0208587646484375,
-0.0168609619140625,
-0.044586181640625,
-0.0041961669921875,
0.0034847259521484375,
0.006755828857421875,
-0.0157012939453125,
0.0016765594482421875,
-0.003631591796875,
0.03289794921875,
0.044708251953125,
0.0260009765625,
0.003475189208984375,
-0.025482177734375,
0.004047393798828125,
-0.0239715576171875,
0.0010442733764648438,
-0.0298919677734375,
-0.0009698867797851562,
0.0005702972412109375,
-0.0011301040649414062,
0.033935546875,
-0.05499267578125,
-0.0043487548828125,
-0.045654296875,
-0.0130462646484375,
-0.04449462890625,
0.0068817138671875,
0.01288604736328125,
-0.01026153564453125,
-0.0220947265625,
0.0080718994140625,
0.0293426513671875,
-0.035919189453125,
0.033966064453125,
0.033935546875,
-0.03009033203125,
-0.004833221435546875,
0.04986572265625,
0.0205535888671875,
-0.05010986328125,
-0.0416259765625,
-0.0144805908203125,
0.0263824462890625,
-0.015655517578125,
0.061767578125,
0.0416259765625,
-0.0213775634765625,
0.049896240234375,
0.017242431640625,
-0.0007638931274414062,
0.0088958740234375,
0.031494140625,
0.015045166015625,
0.01311492919921875,
-0.0157928466796875,
-0.0016422271728515625,
0.00542449951171875,
0.0284271240234375,
0.005619049072265625,
-0.03277587890625,
0.0221710205078125,
0.033935546875,
0.01371002197265625,
-0.00908660888671875,
-0.024932861328125,
-0.034332275390625,
0.0038928985595703125,
0.06292724609375,
0.005001068115234375,
0.036773681640625,
-0.00555419921875,
0.0200653076171875,
0.01104736328125,
-0.00988006591796875,
-0.0171661376953125,
0.0384521484375,
-0.0094146728515625,
0.02130126953125,
0.002285003662109375,
-0.01184844970703125,
-0.055450439453125,
0.005401611328125,
0.0193023681640625,
0.005840301513671875,
-0.0156097412109375,
-0.01194000244140625,
-0.009124755859375,
0.0139617919921875,
-0.0069122314453125,
0.00443267822265625,
0.0113983154296875,
0.0141448974609375,
0.0196075439453125,
-0.0013599395751953125,
-0.007541656494140625,
-0.0164642333984375,
-0.0106964111328125,
0.0011720657348632812,
0.0202789306640625,
-0.0157470703125,
0.02008056640625,
0.0634765625,
-0.02069091796875,
0.0609130859375,
-0.0178375244140625,
0.0139312744140625,
-0.0201263427734375,
0.038970947265625,
0.012908935546875,
-0.00616455078125,
0.0193634033203125,
0.0134124755859375,
0.0282135009765625,
-0.037445068359375,
0.027862548828125,
0.02099609375,
0.0379638671875,
0.016082763671875,
-0.054840087890625,
0.02978515625,
-0.0347900390625,
-0.00916290283203125,
0.035491943359375,
-0.0044403076171875,
-0.01474761962890625,
-0.04888916015625,
-0.025390625,
0.04949951171875,
0.0005707740783691406,
-0.0024776458740234375,
0.042388916015625,
0.00815582275390625,
0.04351806640625,
-0.01325225830078125,
0.0032958984375,
0.00543975830078125,
0.004547119140625,
0.0166168212890625,
-0.0310821533203125,
-0.0172271728515625,
0.0670166015625,
0.02545166015625,
-0.02557373046875,
-0.0146026611328125,
0.03924560546875,
-0.0160064697265625,
0.07281494140625,
-0.052886962890625,
-0.030029296875,
-0.021240234375,
-0.01245880126953125,
0.08367919921875,
0.062469482421875,
-0.0186309814453125,
0.00601959228515625,
-0.0260467529296875,
0.0026187896728515625,
0.06085205078125,
-0.041290283203125,
-0.01210784912109375,
-0.053863525390625,
0.01861572265625,
0.032379150390625,
-0.00844573974609375,
-0.0328369140625,
-0.0255126953125,
-0.0191802978515625,
0.012603759765625,
0.05029296875,
-0.025482177734375,
0.036834716796875,
-0.01294708251953125,
0.0035343170166015625,
-0.0256805419921875,
-0.028656005859375,
-0.0213470458984375,
0.01406097412109375,
-0.020721435546875,
-0.0899658203125,
-0.00742340087890625,
0.0269317626953125,
-0.0024166107177734375,
0.040435791015625,
0.01025390625,
0.018310546875,
0.0207366943359375,
-0.029998779296875,
-0.011749267578125,
0.0002655982971191406,
0.06524658203125,
-0.023895263671875,
0.000009119510650634766,
0.093994140625,
0.006763458251953125,
0.0017805099487304688,
-0.0167999267578125,
-0.0018606185913085938,
-0.0220489501953125,
0.0182647705078125,
-0.036346435546875,
0.0018606185913085938,
-0.00887298583984375,
-0.002197265625,
0.033416748046875,
0.0232391357421875,
0.0209808349609375,
0.0032558441162109375,
0.0108489990234375,
-0.00138092041015625,
-0.044219970703125,
0.003810882568359375,
0.018768310546875,
0.046539306640625,
-0.0218963623046875,
0.017181396484375,
0.055877685546875,
-0.0235443115234375,
-0.044586181640625,
0.0018873214721679688,
0.005901336669921875,
0.00164031982421875,
-0.0275115966796875,
0.0120391845703125,
0.00213623046875,
-0.040130615234375,
0.0171356201171875,
-0.004642486572265625,
-0.03509521484375,
0.0102691650390625,
0.00750732421875,
-0.00998687744140625,
0.0014696121215820312,
0.01372528076171875,
-0.00015282630920410156,
-0.02117919921875,
0.05987548828125,
0.0112457275390625,
-0.04791259765625,
-0.005889892578125,
0.01641845703125,
-0.01268768310546875,
-0.022491455078125,
0.004123687744140625,
-0.004871368408203125,
-0.0190277099609375,
-0.0654296875,
0.015106201171875,
-0.00653076171875,
-0.01557159423828125,
0.0250701904296875,
0.0172576904296875,
0.0019512176513671875,
0.05316162109375,
-0.0065460205078125,
0.019134521484375,
0.0155792236328125,
-0.03564453125,
-0.1190185546875,
-0.01168060302734375,
0.00008755922317504883,
0.046600341796875,
0.01442718505859375,
0.0517578125,
-0.0221099853515625,
-0.0252227783203125,
-0.0102691650390625,
-0.04730224609375,
0.028533935546875,
-0.042572021484375,
-0.0020656585693359375,
-0.0148468017578125,
0.04058837890625,
0.04168701171875,
0.0072174072265625,
0.01763916015625,
-0.033172607421875,
-0.00628662109375,
0.004116058349609375,
-0.0235595703125,
-0.01360321044921875,
-0.0098419189453125,
-0.07659912109375,
0.11962890625,
0.018829345703125,
0.03228759765625,
0.0189361572265625,
0.03692626953125,
-0.055023193359375,
-0.0056610107421875,
-0.0631103515625,
0.07965087890625,
-0.007476806640625,
0.04669189453125,
-0.08367919921875,
-0.00445556640625,
0.00897979736328125,
0.0281829833984375,
0.04534912109375,
-0.00036263465881347656,
-0.03240966796875,
-0.024139404296875,
0.0191650390625,
0.019561767578125,
-0.0123291015625,
0.033599853515625,
0.000051021575927734375,
0.05950927734375,
0.033966064453125,
-0.07012939453125,
0.01532745361328125,
-0.0176849365234375,
-0.01580810546875,
0.033935546875,
0.018646240234375,
0.0181121826171875,
0.0007648468017578125,
-0.005161285400390625,
-0.04681396484375,
-0.0032138824462890625,
0.03607177734375,
-0.0070953369140625,
0.048919677734375,
0.01885986328125,
0.061981201171875,
-0.093017578125,
-0.0855712890625,
-0.012969970703125,
0.038665771484375,
0.01268768310546875,
0.019775390625,
-0.0019178390502929688,
0.0125732421875,
0.0635986328125,
-0.027679443359375,
0.002689361572265625,
0.006206512451171875,
-0.0100555419921875,
0.0496826171875,
0.029388427734375,
0.0128631591796875,
-0.0491943359375,
0.0027942657470703125,
0.0535888671875,
0.06658935546875,
-0.056976318359375,
-0.02215576171875,
0.01496124267578125,
0.0006175041198730469,
-0.010009765625,
-0.0163116455078125,
0.0005588531494140625,
0.03033447265625,
0.03912353515625,
-0.04736328125,
0.0110931396484375,
0.041473388671875,
0.008697509765625,
-0.009857177734375,
-0.0311737060546875,
-0.00823974609375,
0.01120758056640625,
-0.060791015625,
0.040496826171875,
0.033355712890625,
0.0718994140625,
0.0114288330078125,
0.059173583984375,
-0.0261077880859375,
-0.041107177734375,
-0.007099151611328125,
0.0345458984375,
-0.0022525787353515625,
-0.00417327880859375,
-0.020843505859375,
-0.048065185546875,
-0.0108642578125,
0.0278167724609375,
0.048614501953125,
-0.01380157470703125,
0.051788330078125,
0.042510986328125,
-0.026123046875,
-0.00555419921875,
0.0189361572265625,
-0.00806427001953125,
0.01540374755859375,
-0.0152130126953125,
0.01552581787109375,
0.00835418701171875,
-0.0111083984375,
0.00695037841796875,
0.051605224609375,
-0.0001481771469116211,
-0.0050201416015625,
0.0302734375,
-0.0017309188842773438,
-0.0165252685546875,
0.032867431640625,
0.03155517578125,
0.0538330078125,
0.0271453857421875,
-0.06787109375,
-0.0003230571746826172,
-0.040496826171875,
-0.046234130859375,
0.020782470703125,
0.0335693359375,
-0.01947021484375,
0.018035888671875,
0.005245208740234375,
-0.022705078125,
0.0467529296875,
0.003955841064453125,
0.01317596435546875,
0.07183837890625,
-0.0030269622802734375,
0.0265655517578125,
-0.047332763671875,
-0.0158843994140625,
0.0186767578125,
0.000911712646484375,
-0.00010442733764648438,
-0.0071258544921875,
0.0330810546875,
0.0008702278137207031,
-0.0197296142578125,
0.0255279541015625,
-0.04046630859375,
-0.0177764892578125,
0.0284423828125,
-0.0271453857421875,
-0.0118560791015625,
-0.002838134765625,
0.027496337890625,
0.01428985595703125,
0.042572021484375,
-0.022369384765625,
-0.003932952880859375,
-0.043548583984375,
0.01568603515625,
-0.0165557861328125,
0.03460693359375,
-0.014923095703125,
0.01416778564453125,
-0.02313232421875,
-0.036895751953125,
0.055908203125,
0.0308837890625,
0.024078369140625,
0.0269317626953125,
-0.0029582977294921875,
-0.0029773712158203125,
0.01690673828125,
-0.006046295166015625,
-0.0172271728515625,
0.022125244140625,
0.015411376953125,
-0.0026950836181640625,
0.00800323486328125,
-0.00885009765625,
0.00417327880859375,
0.02996826171875,
-0.007843017578125,
0.01068115234375,
0.01322174072265625,
-0.01430511474609375,
0.0082855224609375,
0.0322265625,
-0.0116424560546875,
0.0261993408203125,
-0.0272064208984375,
-0.00688934326171875,
0.0167388916015625,
0.02294921875,
-0.03289794921875,
-0.0202178955078125,
-0.0203704833984375,
-0.011474609375,
-0.01314544677734375,
-0.05999755859375,
-0.042755126953125,
-0.02569580078125,
0.0118408203125,
-0.01189422607421875,
0.01337432861328125,
-0.00765228271484375,
-0.032928466796875,
0.0012769699096679688,
-0.0369873046875,
-0.04644775390625,
0.028411865234375,
0.011199951171875,
-0.037353515625,
0.003551483154296875,
-0.04388427734375,
-0.019012451171875,
-0.018096923828125,
0.00431060791015625,
0.019134521484375,
-0.041015625,
-0.0750732421875,
0.0286102294921875,
0.0308074951171875,
0.055572509765625,
0.05255126953125,
-0.0024013519287109375,
0.0031299591064453125,
0.0157470703125,
-0.04364013671875,
-0.07135009765625,
0.0361328125,
-0.0791015625,
-0.029937744140625,
0.031280517578125,
0.00843048095703125,
0.032196044921875,
-0.0306396484375,
-0.0811767578125,
0.078857421875,
-0.019256591796875,
-0.01788330078125,
0.0043182373046875,
0.016510009765625,
0.01177215576171875,
-0.0207366943359375,
0.012237548828125,
-0.0239715576171875,
-0.01152801513671875,
-0.01554107666015625,
-0.0080718994140625,
0.04443359375,
-0.00025200843811035156,
-0.00885772705078125,
-0.0614013671875,
-0.0010528564453125,
-0.039459228515625,
0.00946807861328125,
0.00679779052734375,
-0.0300140380859375,
0.016845703125,
0.0093536376953125,
-0.057464599609375,
-0.031463623046875,
-0.0177154541015625,
0.027618408203125,
0.00977325439453125,
0.0138092041015625,
-0.06109619140625,
-0.038177490234375,
0.03692626953125,
0.044647216796875,
0.03045654296875,
-0.004146575927734375,
-0.012969970703125,
-0.01541900634765625,
-0.0377197265625,
0.0011577606201171875,
0.0357666015625,
-0.0545654296875,
0.0079498291015625,
0.002353668212890625,
-0.0190277099609375,
-0.0246124267578125,
-0.031280517578125,
-0.06317138671875,
-0.028350830078125,
-0.075927734375,
0.026214599609375,
-0.0469970703125,
0.01317596435546875,
0.0153350830078125,
-0.0192108154296875,
-0.016357421875,
-0.02301025390625,
0.01085662841796875,
-0.003925323486328125,
-0.01806640625,
0.006072998046875,
0.01280975341796875,
0.03179931640625,
-0.005054473876953125,
0.046295166015625,
-0.0400390625,
0.045989990234375,
0.01352691650390625,
-0.0020503997802734375,
0.009735107421875,
0.01200103759765625,
0.0003044605255126953,
-0.01284027099609375,
0.027740478515625,
0.00782012939453125,
0.037841796875,
0.01369476318359375,
0.0199737548828125,
0.00243377685546875,
0.052978515625,
0.014923095703125,
-0.04962158203125,
0.0159759521484375,
-0.021453857421875,
-0.0017862319946289062,
0.00087738037109375,
0.00472259521484375,
-0.033660888671875,
0.0276031494140625,
-0.0115509033203125,
-0.005733489990234375,
0.01435089111328125
]
|
396d6a999dae58a2c667e3ff1798fba0e7868c77 | Wordpress Stackexchange
Q: Is there any advantage to emptying comment spam? Is there any advantage to performance (or otherwise) for emptying comment spam from within wp-admin on any regular basis?
I daily have been making sure that the comment spam queue is emptied out, but is this serving any purpose?
A: There is definitely a performance advantage in keeping your comment spam to a minimum. If you have a lot of comments, the query time can get pretty out of control.
To make it easier, you should install Akismet if you haven't already. Akismet will automatically detect spam comments and move them to WordPress spam section. You can then delete all the spam comments in one click, OR you can change the default empty trash days from 30 days to something much sooner.
If so, you'll want to add the following to your wp-config.php file:
define( 'EMPTY_TRASH_DAYS', 1 );
And if you're brave and would like to just delete spam comments (and everything else in the trash) without sending them to the trash, you can add the following to your wp-config.php file:
define( 'EMPTY_TRASH_DAYS', 0 );
| Q: Is there any advantage to emptying comment spam? Is there any advantage to performance (or otherwise) for emptying comment spam from within wp-admin on any regular basis?
I daily have been making sure that the comment spam queue is emptied out, but is this serving any purpose?
A: There is definitely a performance advantage in keeping your comment spam to a minimum. If you have a lot of comments, the query time can get pretty out of control.
To make it easier, you should install Akismet if you haven't already. Akismet will automatically detect spam comments and move them to WordPress spam section. You can then delete all the spam comments in one click, OR you can change the default empty trash days from 30 days to something much sooner.
If so, you'll want to add the following to your wp-config.php file:
define( 'EMPTY_TRASH_DAYS', 1 );
And if you're brave and would like to just delete spam comments (and everything else in the trash) without sending them to the trash, you can add the following to your wp-config.php file:
define( 'EMPTY_TRASH_DAYS', 0 );
| wordpress | {
"language": "en",
"length": 184,
"provenance": "stackexchange_00019.jsonl.gz:449687",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165516"
} | [
0.08685302734375,
-0.00717926025390625,
0.01422119140625,
-0.0653076171875,
0.008087158203125,
-0.0256500244140625,
0.0166778564453125,
-0.0108489990234375,
0.01397705078125,
0.044525146484375,
-0.032135009765625,
-0.0032672882080078125,
0.0191192626953125,
-0.01551055908203125,
-0.036102294921875,
-0.03131103515625,
0.006572723388671875,
0.040283203125,
0.03143310546875,
-0.00923919677734375,
0.00519561767578125,
-0.003025054931640625,
-0.0037517547607421875,
0.024200439453125,
-0.0103607177734375,
-0.0909423828125,
0.12298583984375,
-0.024932861328125,
-0.024169921875,
-0.071533203125,
-0.0012445449829101562,
0.07940673828125,
0.0039005279541015625,
0.01983642578125,
0.01497650146484375,
0.01568603515625,
0.0004024505615234375,
0.0195465087890625,
0.00974273681640625,
0.01678466796875,
0.00138092041015625,
0.0011377334594726562,
0.0173187255859375,
-0.038055419921875,
-0.0149078369140625,
0.033721923828125,
-0.039093017578125,
-0.0191497802734375,
0.035125732421875,
-0.03277587890625,
0.0291748046875,
0.00620269775390625,
0.062286376953125,
-0.006282806396484375,
-0.044281005859375,
-0.0236358642578125,
-0.0849609375,
0.04364013671875,
0.0189056396484375,
0.0008168220520019531,
0.00396728515625,
-0.02679443359375,
0.01027679443359375,
0.01209259033203125,
-0.003162384033203125,
0.008331298828125,
0.03314208984375,
0.021881103515625,
-0.0291748046875,
-0.0249786376953125,
0.005950927734375,
-0.0169219970703125,
-0.0186767578125,
-0.02752685546875,
-0.002483367919921875,
-0.01482391357421875,
-0.00508880615234375,
-0.057403564453125,
0.00971221923828125,
0.027496337890625,
-0.018280029296875,
-0.033294677734375,
-0.032257080078125,
-0.0236968994140625,
-0.0011911392211914062,
-0.01451873779296875,
-0.0115966796875,
0.00545501708984375,
-0.0183258056640625,
-0.0338134765625,
-0.021240234375,
-0.0601806640625,
-0.00518035888671875,
0.0024967193603515625,
-0.0223846435546875,
-0.020111083984375,
-0.01373291015625,
-0.00994110107421875,
-0.0218353271484375,
-0.023590087890625,
-0.0207061767578125,
0.00213623046875,
-0.046661376953125,
0.01043701171875,
0.019287109375,
0.03253173828125,
0.0006632804870605469,
-0.0718994140625,
0.00738525390625,
0.0117950439453125,
-0.00743865966796875,
0.004665374755859375,
-0.0185546875,
-0.007755279541015625,
-0.02935791015625,
0.00362396240234375,
-0.0291290283203125,
-0.0141448974609375,
-0.015869140625,
-0.012786865234375,
0.007640838623046875,
0.00566864013671875,
-0.015533447265625,
0.017913818359375,
-0.0149078369140625,
-0.0255584716796875,
-0.018646240234375,
0.0179595947265625,
-0.01073455810546875,
0.007587432861328125,
-0.03302001953125,
0.01549530029296875,
0.0258331298828125,
0.01496124267578125,
0.006931304931640625,
-0.006488800048828125,
0.0078887939453125,
0.00499725341796875,
-0.0048980712890625,
-0.0178985595703125,
0.07037353515625,
-0.02923583984375,
-0.039520263671875,
0.034088134765625,
-0.0060272216796875,
0.0343017578125,
0.004299163818359375,
-0.02093505859375,
0.017333984375,
-0.0240936279296875,
-0.05023193359375,
-0.0308837890625,
0.060516357421875,
-0.031341552734375,
-0.0243988037109375,
-0.0229644775390625,
-0.01139068603515625,
-0.0102691650390625,
-0.04095458984375,
-0.03155517578125,
0.01494598388671875,
-0.0146331787109375,
-0.0257568359375,
-0.01154327392578125,
-0.02777099609375,
0.018096923828125,
-0.00469970703125,
0.0072784423828125,
0.02008056640625,
-0.0604248046875,
0.0345458984375,
-0.020263671875,
0.00426483154296875,
-0.0147247314453125,
0.0088958740234375,
0.0099029541015625,
0.0154266357421875,
0.004596710205078125,
0.042999267578125,
-0.0360107421875,
-0.048553466796875,
-0.036895751953125,
0.10302734375,
-0.049041748046875,
-0.028289794921875,
0.004863739013671875,
0.0157623291015625,
0.03619384765625,
0.0034847259521484375,
0.0180511474609375,
0.04278564453125,
0.0025787353515625,
0.0033092498779296875,
0.0179901123046875,
0.0291748046875,
-0.048309326171875,
-0.0066375732421875,
-0.0215606689453125,
0.00899505615234375,
-0.0194091796875,
0.02618408203125,
-0.0004010200500488281,
0.015625,
-0.01438140869140625,
-0.05194091796875,
0.0243072509765625,
-0.031280517578125,
0.042144775390625,
-0.050048828125,
0.0244598388671875,
0.0193634033203125,
-0.0245361328125,
-0.03961181640625,
0.03582763671875,
0.0285797119140625,
-0.00222015380859375,
-0.01291656494140625,
0.044189453125,
0.0150604248046875,
0.038177490234375,
0.0117645263671875,
-0.030670166015625,
0.00933837890625,
-0.0123291015625,
0.0031604766845703125,
-0.007648468017578125,
-0.01209259033203125,
-0.0078887939453125,
0.01032257080078125,
-0.006633758544921875,
0.0026836395263671875,
0.0499267578125,
0.05621337890625,
0.043853759765625,
-0.01273345947265625,
-0.0030117034912109375,
0.0003485679626464844,
-0.090087890625,
-0.01244354248046875,
0.050384521484375,
0.01399993896484375,
0.02252197265625,
0.01439666748046875,
0.03955078125,
0.07794189453125,
0.0128631591796875,
0.0193328857421875,
0.0097808837890625,
-0.004833221435546875,
-0.00223541259765625,
0.0086669921875,
-0.0170745849609375,
0.03167724609375,
-0.036224365234375,
-0.01018524169921875,
0.03350830078125,
-0.01593017578125,
-0.016876220703125,
0.0019388198852539062,
0.0260772705078125,
-0.0024051666259765625,
0.014892578125,
0.01226043701171875,
-0.0013189315795898438,
0.047515869140625,
-0.056182861328125,
0.01020050048828125,
-0.0015935897827148438,
0.0016107559204101562,
-0.016204833984375,
0.01397705078125,
-0.0482177734375,
-0.0019092559814453125,
0.03271484375,
-0.01702880859375,
0.004512786865234375,
0.00458526611328125,
-0.006923675537109375,
-0.01486968994140625,
0.0071868896484375,
-0.03076171875,
-0.0204010009765625,
0.0213165283203125,
-0.0036106109619140625,
-0.001621246337890625,
-0.00725555419921875,
0.041748046875,
-0.020111083984375,
-0.0231475830078125,
-0.029541015625,
0.0013828277587890625,
0.031707763671875,
-0.00685882568359375,
0.00167083740234375,
0.0175933837890625,
-0.0102996826171875,
0.018310546875,
-0.040771484375,
0.034912109375,
-0.008331298828125,
0.0182952880859375,
0.07659912109375,
0.05596923828125,
-0.03411865234375,
0.012847900390625,
0.01201629638671875,
0.005725860595703125,
0.00400543212890625,
0.0035419464111328125,
0.0293121337890625,
-0.0511474609375,
0.0196685791015625,
-0.0012378692626953125,
0.06561279296875,
-0.04962158203125,
-0.04180908203125,
-0.0008630752563476562,
0.023681640625,
0.00383758544921875,
0.02435302734375,
-0.0067901611328125,
-0.01432037353515625,
0.014801025390625,
-0.0204010009765625,
-0.006031036376953125,
-0.0221405029296875,
-0.0202789306640625,
0.0064697265625,
0.0234222412109375,
-0.011260986328125,
-0.038177490234375,
-0.02972412109375,
-0.053375244140625,
-0.0018739700317382812,
0.00960540771484375,
0.011566162109375,
-0.00243377685546875,
0.08624267578125,
0.0028247833251953125,
-0.03607177734375,
-0.02490234375,
-0.03546142578125,
-0.0185546875,
-0.0111236572265625,
0.039306640625,
-0.037933349609375,
0.043670654296875,
-0.0021419525146484375,
0.0012674331665039062,
0.06170654296875,
-0.040679931640625,
-0.039794921875,
-0.0014047622680664062,
-0.006175994873046875,
0.017822265625,
0.004077911376953125,
0.0004611015319824219,
0.055633544921875,
0.06048583984375,
0.01151275634765625,
-0.0161590576171875,
0.0177001953125,
-0.0309600830078125,
-0.030181884765625,
0.0245819091796875,
-0.0281829833984375,
-0.00852203369140625,
-0.0245819091796875,
0.049896240234375,
0.0278778076171875,
0.00003612041473388672,
-0.01306915283203125,
0.016326904296875,
0.007778167724609375,
0.039337158203125,
-0.04168701171875,
0.028045654296875,
-0.029510498046875,
0.01403045654296875,
0.01483154296875,
0.0038299560546875,
0.01099395751953125,
-0.0027713775634765625,
0.00594329833984375,
0.01043701171875,
0.02423095703125,
-0.04541015625,
0.0073089599609375,
-0.033935546875,
-0.00044035911560058594,
-0.03302001953125,
0.032012939453125,
0.00980377197265625,
-0.0321044921875,
-0.044921875,
-0.00936126708984375,
-0.001461029052734375,
0.01201629638671875,
0.0269317626953125,
-0.0096282958984375,
-0.068359375,
0.04095458984375,
0.0151214599609375,
-0.016204833984375,
-0.046966552734375,
0.0662841796875,
-0.06341552734375,
-0.016326904296875,
0.0049285888671875,
-0.08001708984375,
0.04351806640625,
-0.04913330078125,
0.005847930908203125,
-0.03912353515625,
0.0230255126953125,
-0.0933837890625,
-0.019256591796875,
-0.009918212890625,
-0.00455474853515625,
0.0169677734375,
-0.006313323974609375,
0.0285797119140625,
0.0001856088638305664,
0.032867431640625,
0.0010652542114257812,
0.0088958740234375,
0.005706787109375,
0.0015153884887695312,
-0.036865234375,
0.0219268798828125,
0.0188140869140625,
-0.0191650390625,
-0.0189361572265625,
-0.004108428955078125,
-0.036102294921875,
0.023101806640625,
0.01666259765625,
0.0186309814453125,
0.049072265625,
-0.02435302734375,
-0.02178955078125,
-0.047637939453125,
-0.037506103515625,
0.0157623291015625,
-0.01922607421875,
0.002002716064453125,
-0.05889892578125,
-0.018951416015625,
0.05401611328125,
0.01273345947265625,
0.00066375732421875,
-0.012420654296875,
0.034942626953125,
0.00925445556640625,
-0.036590576171875,
0.00838470458984375,
-0.01010894775390625,
0.01751708984375,
-0.01849365234375,
0.0210418701171875,
0.0024738311767578125,
-0.0030059814453125,
0.0279083251953125,
-0.0237884521484375,
0.01221466064453125,
-0.042327880859375,
0.0159149169921875,
-0.0254974365234375,
-0.0198822021484375,
0.012237548828125,
-0.05267333984375,
0.06866455078125,
0.040008544921875,
-0.0005316734313964844,
-0.0139312744140625,
-0.0134735107421875,
0.0548095703125,
0.01174163818359375,
-0.02044677734375,
-0.07421875,
-0.02947998046875,
0.00930023193359375,
-0.0626220703125,
0.031890869140625,
0.00577545166015625,
-0.00504302978515625,
-0.004817962646484375,
0.0154266357421875,
-0.0220947265625,
0.01216888427734375,
-0.00885009765625,
-0.0001468658447265625,
0.0099945068359375,
0.01047515869140625,
-0.0194854736328125,
0.00914764404296875,
-0.0044097900390625,
0.041259765625,
0.01557159423828125,
-0.04791259765625,
-0.006618499755859375,
0.0255279541015625,
-0.007244110107421875,
0.0061798095703125,
0.0191192626953125,
0.039306640625,
-0.028656005859375,
0.0164947509765625,
-0.010498046875,
-0.05462646484375,
0.0039215087890625,
-0.035980224609375,
0.0025787353515625,
-0.00679779052734375,
-0.024627685546875,
0.03704833984375,
-0.0222930908203125,
-0.0261688232421875,
-0.00017654895782470703,
0.0018129348754882812,
0.0280914306640625,
0.07550048828125,
0.0101165771484375,
0.026214599609375,
0.006877899169921875,
-0.0201416015625,
0.0036602020263671875,
-0.00469970703125,
-0.007781982421875,
-0.0038318634033203125,
0.015960693359375,
-0.006282806396484375,
-0.017181396484375,
0.0013742446899414062,
0.0280914306640625,
0.01422119140625,
-0.039337158203125,
0.044708251953125,
0.106201171875,
0.01433563232421875,
-0.0282745361328125,
-0.05462646484375,
-0.00972747802734375,
0.047637939453125,
-0.00930023193359375,
-0.0174713134765625,
-0.062408447265625,
-0.028717041015625,
0.03961181640625,
-0.020660400390625,
-0.025421142578125,
-0.041778564453125,
0.00989532470703125,
-0.042022705078125,
-0.0096282958984375,
-0.0841064453125,
0.012420654296875,
-0.0285797119140625,
0.0155181884765625,
0.04241943359375,
0.0322265625,
-0.0084381103515625,
-0.00429534912109375,
-0.0114288330078125,
0.0132598876953125,
0.0081024169921875,
-0.020599365234375,
-0.05517578125,
0.0005064010620117188,
0.00783538818359375,
-0.0655517578125,
-0.043914794921875,
-0.08660888671875,
-0.04864501953125,
-0.046875,
0.0182037353515625,
0.00844573974609375,
0.026763916015625,
-0.02685546875,
-0.06512451171875,
-0.0202484130859375,
0.01335906982421875,
0.045623779296875,
0.04144287109375,
-0.05096435546875,
0.00453948974609375,
0.06866455078125,
-0.0733642578125,
-0.00004953145980834961,
0.0136566162109375,
0.05419921875,
0.00041794776916503906,
0.004428863525390625,
-0.038970947265625,
-0.014678955078125,
0.00008022785186767578,
0.005664825439453125,
-0.012542724609375,
-0.014862060546875,
-0.006130218505859375,
0.03399658203125,
-0.0006718635559082031,
-0.0014638900756835938,
-0.037353515625,
-0.01557159423828125,
-0.016632080078125,
0.06536865234375,
-0.06475830078125,
-0.00576019287109375,
-0.00037097930908203125,
-0.029449462890625,
-0.01468658447265625,
0.0181427001953125,
-0.00798797607421875,
0.0103912353515625,
-0.01192474365234375,
-0.0196380615234375,
0.051513671875,
0.0255889892578125,
-0.03857421875,
0.006999969482421875,
0.01142120361328125,
0.00762939453125,
0.00873565673828125,
-0.01045989990234375,
-0.0020923614501953125,
-0.020172119140625,
0.061614990234375,
0.0177764892578125,
0.00955963134765625,
0.07318115234375,
-0.01174163818359375,
0.03668212890625,
0.0369873046875,
0.07415771484375,
-0.038848876953125,
0.01552581787109375,
0.021240234375,
-0.057708740234375,
0.0179595947265625,
0.001155853271484375,
0.0146026611328125,
-0.052520751953125,
0.0210113525390625,
-0.01317596435546875,
-0.01085662841796875,
-0.0100250244140625,
-0.047637939453125,
0.005893707275390625,
0.007549285888671875,
0.03643798828125,
-0.00316619873046875,
-0.07989501953125,
-0.0135955810546875,
0.05438232421875,
-0.045928955078125,
-0.005298614501953125,
-0.025115966796875,
0.01389312744140625,
-0.04058837890625,
-0.0604248046875,
-0.023590087890625,
-0.046142578125,
-0.00539398193359375,
0.0123138427734375,
0.0172271728515625,
0.0182952880859375,
0.03765869140625,
-0.012237548828125,
0.00339508056640625,
0.003993988037109375,
-0.006580352783203125,
-0.045379638671875,
-0.05682373046875,
0.03875732421875,
0.021728515625,
0.008758544921875,
0.0518798828125,
0.03350830078125,
-0.114013671875,
-0.0064849853515625,
0.0066375732421875,
0.06787109375,
-0.021331787109375,
-0.021453857421875,
0.0239410400390625,
0.006992340087890625,
-0.01416015625,
-0.0234222412109375,
0.009552001953125,
-0.0313720703125,
0.0229644775390625,
-0.00936126708984375,
0.016754150390625,
-0.0006318092346191406,
-0.007724761962890625,
-0.0677490234375,
0.12255859375,
0.006259918212890625,
0.03326416015625,
0.0012941360473632812,
0.0330810546875,
-0.034454345703125,
0.0123443603515625,
0.01030731201171875,
-0.004802703857421875,
-0.049072265625,
-0.0083465576171875,
-0.0296173095703125,
0.006778717041015625,
-0.0160369873046875,
0.0250396728515625,
0.0474853515625,
0.00463104248046875,
0.01508331298828125,
0.01024627685546875,
0.05462646484375,
0.009490966796875,
-0.0240478515625,
0.0020580291748046875,
0.02001953125,
0.046051025390625,
0.06427001953125,
-0.035186767578125,
0.024993896484375,
0.004398345947265625,
0.0097808837890625,
0.0321044921875,
-0.0009670257568359375,
0.0097808837890625,
0.00855255126953125,
0.02667236328125,
-0.0189666748046875,
-0.0008416175842285156,
0.0193328857421875,
-0.057342529296875,
-0.0020999908447265625,
0.05010986328125,
0.056671142578125,
-0.07183837890625,
-0.036285400390625,
-0.021575927734375,
0.050994873046875,
0.01392364501953125,
0.0634765625,
0.07366943359375,
0.035491943359375,
0.0936279296875,
-0.026580810546875,
0.045196533203125,
-0.00815582275390625,
-0.035491943359375,
0.0247955322265625,
0.028961181640625,
0.04364013671875,
-0.0291900634765625,
-0.08441162109375,
0.04742431640625,
0.072021484375,
-0.003978729248046875,
-0.0295867919921875,
0.0031337738037109375,
-0.0001150965690612793,
0.0239105224609375,
-0.0013723373413085938,
0.039154052734375,
0.0012941360473632812,
0.01142120361328125,
-0.00203704833984375,
-0.0127105712890625,
-0.01708984375,
-0.0269012451171875,
-0.00028061866760253906,
0.0633544921875,
0.040283203125,
0.0008320808410644531,
0.005489349365234375,
-0.0391845703125,
-0.00366973876953125,
0.012054443359375,
0.0167694091796875,
0.0222930908203125,
0.024322509765625,
0.006046295166015625,
-0.0005803108215332031,
0.0231475830078125,
0.0161285400390625,
-0.0147552490234375,
0.005584716796875,
-0.021148681640625,
0.020538330078125,
0.01812744140625,
0.038543701171875,
0.0010957717895507812,
0.022003173828125,
-0.0167388916015625,
-0.0155792236328125,
0.004913330078125,
-0.026641845703125,
-0.023162841796875,
0.037261962890625,
-0.06280517578125,
-0.0031719207763671875,
-0.022247314453125,
-0.03192138671875,
-0.01268768310546875,
-0.029815673828125,
0.0276336669921875,
0.0008420944213867188,
-0.00958251953125,
0.01410675048828125,
-0.02728271484375,
0.0200042724609375,
-0.004993438720703125,
-0.023468017578125,
0.013031005859375,
-0.018280029296875,
-0.039703369140625,
0.042388916015625,
0.00838470458984375,
-0.00635528564453125,
0.0269927978515625,
0.0075531005859375,
0.0165557861328125,
-0.0255126953125,
0.0009074211120605469,
0.0141754150390625,
-0.02099609375,
0.005710601806640625,
-0.0102081298828125,
-0.0005259513854980469,
-0.0148162841796875,
-0.037506103515625,
-0.01336669921875,
-0.0142974853515625,
0.0231170654296875,
-0.01467132568359375,
0.0675048828125,
-0.01284027099609375,
0.010986328125,
-0.00655364990234375,
0.00058746337890625,
0.018798828125,
0.015289306640625,
0.0097198486328125,
0.04644775390625,
0.00009751319885253906,
-0.033782958984375,
-0.030303955078125,
0.020172119140625,
0.04541015625,
-0.00830078125,
0.0498046875,
-0.037994384765625,
0.006023406982421875,
-0.055816650390625,
0.010528564453125,
-0.01910400390625,
-0.00669097900390625,
-0.0009694099426269531,
-0.00835418701171875,
0.024200439453125,
-0.00800323486328125,
-0.0216827392578125,
0.042877197265625,
-0.0244293212890625,
0.038238525390625,
0.002361297607421875,
-0.01464080810546875,
-0.01113128662109375,
0.0265045166015625,
-0.0675048828125,
0.037933349609375,
0.02703857421875,
-0.0272064208984375,
0.0257568359375,
0.01525115966796875,
-0.01296234130859375,
0.036590576171875,
0.0215301513671875,
-0.01552581787109375,
-0.01232147216796875,
0.0238494873046875,
-0.0107574462890625,
-0.00762939453125,
-0.0198974609375,
0.0038547515869140625,
-0.003566741943359375,
-0.053497314453125,
-0.018768310546875,
-0.041900634765625,
-0.021453857421875,
0.0139312744140625,
-0.041961669921875,
-0.0489501953125,
-0.054412841796875,
-0.006916046142578125,
-0.0012655258178710938,
0.0226593017578125,
-0.06536865234375,
0.048980712890625,
0.0273284912109375,
-0.03228759765625,
-0.00423431396484375,
0.0355224609375,
-0.0333251953125,
-0.06390380859375,
-0.03741455078125,
-0.03082275390625,
-0.05902099609375,
0.065185546875,
-0.0338134765625,
0.016448974609375,
0.0218963623046875,
-0.01277923583984375,
0.0174102783203125,
-0.0014982223510742188,
0.01001739501953125,
0.04620361328125,
-0.00460052490234375,
-0.0002143383026123047,
0.04010009765625,
0.0005784034729003906,
-0.04742431640625,
-0.0462646484375,
0.00846099853515625,
-0.011871337890625,
0.002254486083984375,
-0.053985595703125,
0.03631591796875,
0.0302734375,
-0.030731201171875,
-0.0770263671875,
0.022674560546875,
-0.034912109375,
-0.02069091796875,
-0.0517578125,
-0.005001068115234375,
-0.01035308837890625,
0.012664794921875,
-0.00965118408203125,
-0.0058135986328125,
-0.0288848876953125,
0.035919189453125,
-0.0176544189453125,
0.034881591796875,
0.0078582763671875,
-0.009521484375,
0.04608154296875,
0.021697998046875,
0.039031982421875,
-0.042510986328125,
0.01447296142578125,
0.026702880859375,
0.0162811279296875,
0.0526123046875,
-0.0267486572265625,
0.065185546875,
-0.0306243896484375,
-0.01482391357421875,
-0.041168212890625,
-0.0191497802734375,
-0.0008554458618164062,
0.0297393798828125,
0.06866455078125,
0.080810546875,
-0.0020351409912109375,
-0.059051513671875,
-0.04779052734375,
-0.0152740478515625,
0.01247406005859375,
0.005084991455078125,
0.0038547515869140625,
-0.037078857421875,
0.0176849365234375,
-0.016754150390625,
0.03131103515625,
-0.0171661376953125,
-0.06036376953125,
-0.007549285888671875,
-0.017547607421875,
0.0017642974853515625,
0.00690460205078125,
0.05975341796875,
-0.0027256011962890625,
-0.0207366943359375,
0.0091094970703125,
0.0283355712890625,
-0.0251312255859375,
0.01312255859375,
-0.0028858184814453125,
0.020233154296875,
0.0027675628662109375,
-0.00757598876953125,
-0.03460693359375,
0.0269622802734375,
-0.0083465576171875,
0.0081634521484375,
-0.04156494140625,
-0.0213165283203125,
0.0276641845703125,
-0.00821685791015625,
-0.01380157470703125,
-0.000400543212890625,
0.01355743408203125,
0.008544921875,
-0.024566650390625,
-0.0306854248046875,
-0.01381683349609375,
0.07647705078125,
-0.0047760009765625,
0.04876708984375,
-0.0191802978515625,
-0.01409149169921875,
0.026458740234375,
-0.0266265869140625,
-0.0025882720947265625,
0.033538818359375,
0.01629638671875,
-0.061004638671875,
0.051971435546875,
0.0224761962890625,
0.04095458984375,
0.02960205078125
]
|
4f745c9693dab85a3f8a50112f960c6fc664635f | Wordpress Stackexchange
Q: How to get 'post_content' without stripping tags? I'm trying to retrieve the post content of a specific post:
$post = get_post(/* id */);
$content = $post->post_content;
However, this retrieves the content with no line-breaks and omits all <p> tags.
What is the proper way to retrieve the post content without stripping the <p> tags (as it is shown on the post page or the post editor "Text" tab)?
A: Found the solution:
$content = apply_filters('the_content', $post->post_content);
| Q: How to get 'post_content' without stripping tags? I'm trying to retrieve the post content of a specific post:
$post = get_post(/* id */);
$content = $post->post_content;
However, this retrieves the content with no line-breaks and omits all <p> tags.
What is the proper way to retrieve the post content without stripping the <p> tags (as it is shown on the post page or the post editor "Text" tab)?
A: Found the solution:
$content = apply_filters('the_content', $post->post_content);
A: Second method to get post content with p tag is
echo wpautop( $post->post_content );
A: Both answers so far are correct but a more thorough answer seems warranted.
If you use this:
$content = wpautop( $post->post_content );
you're applying the one function that adds paragraph tags to post content. wpautop() is one of many functions (including plugin functions at times) that hooks onto the_content, so if you do this:
$content = apply_filters('the_content', $post->post_content);
you're getting the post content run through any filters on the_content which includes wpautop() by default.
Finally, if you're in the loop, you can just do this:
$content = apply_filters( 'the_content', get_the_content() );
which is essentially a wrapper for the second code snippet, but of course it's a little nicer looking. Update 1 Sep 2018: Revised based on comment. Props @timmb.
Generally, I'd say that the preferred "right way" to do this is from last to first since using a core WP function should enable more backwards compatibility (theoretically, at least). The only other decision to make then is whether you want to allow WordPress and plugins to also modify the post content. If that's the case, definitely use the 2nd or 3rd options.
| wordpress | {
"language": "en",
"length": 275,
"provenance": "stackexchange_00019.jsonl.gz:449700",
"question_score": "28",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165583"
} | [
0.0208892822265625,
-0.01291656494140625,
0.0039825439453125,
0.0138702392578125,
0.00743865966796875,
-0.0379638671875,
0.058135986328125,
-0.029541015625,
0.01380157470703125,
0.01267242431640625,
-0.024169921875,
-0.035980224609375,
-0.01108551025390625,
-0.0246429443359375,
-0.02099609375,
-0.047210693359375,
0.0173797607421875,
-0.00453948974609375,
0.0151824951171875,
-0.00994110107421875,
-0.0004482269287109375,
-0.00539398193359375,
0.00634765625,
-0.00803375244140625,
0.0153656005859375,
0.02001953125,
0.0545654296875,
-0.004970550537109375,
0.014312744140625,
-0.0006532669067382812,
0.0214691162109375,
-0.04180908203125,
0.043731689453125,
0.030426025390625,
-0.065673828125,
0.0200042724609375,
-0.0509033203125,
0.0230712890625,
-0.004100799560546875,
-0.0031642913818359375,
-0.01105499267578125,
0.01326751708984375,
0.00926971435546875,
0.034332275390625,
-0.0308074951171875,
-0.00262451171875,
-0.04083251953125,
-0.03887939453125,
0.020263671875,
-0.007171630859375,
0.011444091796875,
-0.00897979736328125,
0.020172119140625,
-0.041839599609375,
-0.02752685546875,
-0.006885528564453125,
-0.00847625732421875,
-0.038421630859375,
0.04718017578125,
-0.031463623046875,
-0.04290771484375,
-0.036376953125,
0.04595947265625,
-0.0108489990234375,
-0.01084136962890625,
0.0051727294921875,
0.0631103515625,
0.00434112548828125,
-0.10760498046875,
-0.009552001953125,
0.0772705078125,
-0.054351806640625,
0.031036376953125,
-0.0333251953125,
-0.00968170166015625,
-0.0277862548828125,
-0.01922607421875,
-0.048492431640625,
0.0223388671875,
-0.0130462646484375,
-0.01160430908203125,
0.006984710693359375,
-0.05291748046875,
-0.0404052734375,
0.005847930908203125,
-0.02154541015625,
-0.0153961181640625,
0.010589599609375,
-0.040496826171875,
-0.031463623046875,
-0.02691650390625,
0.0115509033203125,
-0.04595947265625,
-0.0297393798828125,
-0.01497650146484375,
-0.038543701171875,
-0.01221466064453125,
-0.001068115234375,
-0.014678955078125,
0.0215606689453125,
0.0247650146484375,
-0.057403564453125,
0.0963134765625,
-0.039215087890625,
0.0239410400390625,
-0.01326751708984375,
-0.002643585205078125,
-0.0008077621459960938,
0.062744140625,
0.0290679931640625,
-0.0277862548828125,
0.05828857421875,
-0.006069183349609375,
0.0106964111328125,
-0.051361083984375,
0.0298309326171875,
-0.01132965087890625,
-0.03704833984375,
-0.018310546875,
0.004940032958984375,
0.0015649795532226562,
0.00724029541015625,
-0.016693115234375,
0.01788330078125,
0.0173187255859375,
0.02752685546875,
0.0003094673156738281,
-0.0090179443359375,
0.01413726806640625,
0.016357421875,
0.0008540153503417969,
0.0099945068359375,
-0.0092010498046875,
-0.0009722709655761719,
-0.0233154296875,
-0.0078277587890625,
-0.03570556640625,
-0.061126708984375,
-0.046417236328125,
0.036285400390625,
-0.0266265869140625,
-0.04522705078125,
0.038787841796875,
-0.040863037109375,
0.00945281982421875,
0.01910400390625,
0.0251922607421875,
0.0027923583984375,
-0.01123809814453125,
-0.032745361328125,
0.01448822021484375,
-0.002719879150390625,
0.034393310546875,
-0.00812530517578125,
-0.004756927490234375,
-0.05096435546875,
0.033660888671875,
-0.045654296875,
-0.0196533203125,
-0.058624267578125,
0.0755615234375,
-0.01024627685546875,
-0.01031494140625,
0.0325927734375,
-0.0277099609375,
0.00916290283203125,
-0.0296173095703125,
-0.0120849609375,
0.0261383056640625,
0.01174163818359375,
0.0582275390625,
-0.00897216796875,
-0.0037212371826171875,
0.0004112720489501953,
-0.0007872581481933594,
-0.0027790069580078125,
-0.00695037841796875,
-0.007415771484375,
0.01036834716796875,
0.048004150390625,
-0.00365447998046875,
-0.024017333984375,
0.00566864013671875,
-0.006580352783203125,
-0.0552978515625,
0.020263671875,
0.0197906494140625,
0.06964111328125,
0.0278167724609375,
0.01186370849609375,
0.034332275390625,
-0.0164794921875,
-0.0552978515625,
-0.018218994140625,
0.0235137939453125,
-0.0137939453125,
0.0011034011840820312,
-0.0191192626953125,
0.01678466796875,
-0.002979278564453125,
0.0193023681640625,
-0.00302886962890625,
-0.0091552734375,
0.031463623046875,
-0.0167236328125,
-0.0194854736328125,
-0.0005097389221191406,
-0.01044464111328125,
-0.026641845703125,
0.0207977294921875,
0.022705078125,
0.01439666748046875,
-0.023590087890625,
-0.0287628173828125,
-0.01073455810546875,
0.042205810546875,
-0.002685546875,
-0.006275177001953125,
-0.001796722412109375,
0.0273590087890625,
0.016082763671875,
-0.0185546875,
-0.0142822265625,
0.0259246826171875,
0.0595703125,
-0.01474761962890625,
0.01678466796875,
-0.0156097412109375,
0.06768798828125,
0.021820068359375,
-0.01165008544921875,
-0.029205322265625,
0.049530029296875,
0.053863525390625,
-0.0194244384765625,
-0.01220703125,
0.0089874267578125,
-0.051605224609375,
0.0020084381103515625,
0.055206298828125,
0.033538818359375,
0.08428955078125,
-0.02838134765625,
-0.044464111328125,
0.09161376953125,
-0.006061553955078125,
0.00232696533203125,
-0.0303955078125,
0.038604736328125,
0.057708740234375,
-0.0013856887817382812,
-0.004245758056640625,
0.030242919921875,
-0.024688720703125,
-0.0028781890869140625,
0.05438232421875,
-0.0014858245849609375,
0.035186767578125,
-0.01309967041015625,
0.019744873046875,
-0.01343536376953125,
0.01519775390625,
0.01369476318359375,
-0.0243988037109375,
0.0150604248046875,
0.041351318359375,
0.06298828125,
0.060455322265625,
-0.0225982666015625,
-0.0069122314453125,
0.0004038810729980469,
0.06524658203125,
0.0114898681640625,
0.06256103515625,
-0.028839111328125,
0.00899505615234375,
0.0013437271118164062,
-0.0306396484375,
-0.015533447265625,
0.037872314453125,
0.00984954833984375,
0.03009033203125,
0.032501220703125,
-0.00359344482421875,
0.02130126953125,
-0.018310546875,
0.013092041015625,
0.015625,
0.006412506103515625,
-0.004001617431640625,
0.0087890625,
0.050445556640625,
0.0028839111328125,
0.031463623046875,
-0.01094818115234375,
0.00970458984375,
-0.0034885406494140625,
-0.037933349609375,
0.018524169921875,
-0.0160980224609375,
0.082275390625,
0.05706787109375,
0.0011281967163085938,
0.0111846923828125,
0.0247650146484375,
0.0063323974609375,
0.03424072265625,
-0.0036640167236328125,
-0.00469970703125,
0.050048828125,
-0.09552001953125,
-0.007411956787109375,
0.0206451416015625,
0.0533447265625,
-0.027069091796875,
-0.059967041015625,
-0.02215576171875,
0.0207672119140625,
-0.110107421875,
-0.06903076171875,
0.016265869140625,
-0.06256103515625,
-0.061676025390625,
-0.01454925537109375,
-0.052642822265625,
0.018707275390625,
0.0015201568603515625,
-0.019622802734375,
-0.028839111328125,
-0.0032405853271484375,
-0.10546875,
-0.043701171875,
-0.0872802734375,
0.07989501953125,
-0.0297088623046875,
0.056121826171875,
0.017578125,
0.047821044921875,
0.0018100738525390625,
-0.06982421875,
0.011199951171875,
0.01329803466796875,
-0.03790283203125,
0.0227813720703125,
-0.03961181640625,
0.032196044921875,
-0.0085296630859375,
0.02679443359375,
-0.042266845703125,
-0.0198822021484375,
0.0153656005859375,
-0.04931640625,
-0.02545166015625,
-0.006908416748046875,
0.0325927734375,
-0.002834320068359375,
0.0090484619140625,
0.0302886962890625,
0.038421630859375,
-0.030548095703125,
-0.05474853515625,
-0.0111236572265625,
-0.07403564453125,
0.0019235610961914062,
0.060943603515625,
0.00843048095703125,
-0.03558349609375,
0.0278167724609375,
-0.0029582977294921875,
0.012359619140625,
0.031341552734375,
-0.005588531494140625,
0.01280975341796875,
-0.005687713623046875,
-0.0151824951171875,
-0.005825042724609375,
-0.0039005279541015625,
-0.0273895263671875,
0.03680419921875,
0.004695892333984375,
0.01467132568359375,
-0.00439453125,
-0.007526397705078125,
-0.037200927734375,
-0.035552978515625,
0.04541015625,
0.0093841552734375,
0.0184326171875,
-0.024383544921875,
-0.040130615234375,
-0.0149688720703125,
0.080078125,
-0.028350830078125,
-0.0164794921875,
-0.0293426513671875,
0.00994110107421875,
-0.01551055908203125,
-0.057586669921875,
-0.0100860595703125,
-0.0174407958984375,
-0.033660888671875,
0.01251983642578125,
-0.030914306640625,
0.0004181861877441406,
-0.02215576171875,
-0.0092620849609375,
-0.011566162109375,
-0.02886962890625,
0.0416259765625,
-0.01197052001953125,
0.0133819580078125,
0.002178192138671875,
0.008270263671875,
-0.0208892822265625,
-0.0280609130859375,
0.006439208984375,
-0.0272216796875,
-0.0077056884765625,
-0.00208282470703125,
0.01467132568359375,
0.0010395050048828125,
0.01302337646484375,
0.004299163818359375,
0.039215087890625,
-0.003383636474609375,
-0.01389312744140625,
0.0177001953125,
0.034210205078125,
-0.015350341796875,
-0.00849151611328125,
0.01355743408203125,
-0.037200927734375,
-0.0145721435546875,
-0.01316070556640625,
0.041229248046875,
0.05255126953125,
-0.051605224609375,
-0.018157958984375,
-0.051483154296875,
0.0131683349609375,
-0.031585693359375,
0.007266998291015625,
-0.01016998291015625,
-0.0058746337890625,
-0.0289459228515625,
0.005748748779296875,
0.0013570785522460938,
-0.0263519287109375,
0.059417724609375,
0.049072265625,
-0.03692626953125,
-0.0042877197265625,
0.05535888671875,
0.0206451416015625,
-0.052520751953125,
-0.07476806640625,
0.0277252197265625,
0.0264434814453125,
-0.035003662109375,
0.0701904296875,
0.013427734375,
-0.03472900390625,
0.10784912109375,
-0.017669677734375,
0.0221099853515625,
-0.012298583984375,
0.04266357421875,
0.0133056640625,
0.01253509521484375,
0.01300048828125,
0.0077972412109375,
0.0018053054809570312,
0.042816162109375,
0.0084228515625,
-0.0057830810546875,
0.04119873046875,
0.01107025146484375,
-0.042633056640625,
0.0076446533203125,
-0.004238128662109375,
-0.0278472900390625,
0.01328277587890625,
0.03546142578125,
-0.007434844970703125,
0.034454345703125,
-0.0019321441650390625,
-0.004241943359375,
-0.018890380859375,
0.0161285400390625,
-0.0167236328125,
-0.004955291748046875,
-0.01065826416015625,
0.032196044921875,
-0.006771087646484375,
-0.01125335693359375,
-0.012542724609375,
-0.00475311279296875,
0.0046844482421875,
-0.035186767578125,
-0.06231689453125,
-0.0197296142578125,
-0.0019626617431640625,
0.049560546875,
0.06048583984375,
-0.00995635986328125,
0.004253387451171875,
0.0124359130859375,
0.0087890625,
-0.00669097900390625,
0.0179595947265625,
-0.00531005859375,
-0.0218048095703125,
0.01190948486328125,
-0.002162933349609375,
-0.00687408447265625,
0.0609130859375,
0.033660888671875,
-0.05657958984375,
0.05841064453125,
-0.01030731201171875,
0.0028095245361328125,
-0.0157012939453125,
0.032562255859375,
0.033416748046875,
-0.034271240234375,
-0.0005478858947753906,
0.0022220611572265625,
0.016326904296875,
-0.033477783203125,
-0.015777587890625,
0.043975830078125,
0.0474853515625,
-0.004344940185546875,
-0.0032329559326171875,
-0.0081939697265625,
-0.0237579345703125,
-0.0029773712158203125,
0.01117706298828125,
0.0006403923034667969,
-0.005283355712890625,
-0.0157623291015625,
-0.0296783447265625,
0.00701904296875,
0.01421356201171875,
-0.0037994384765625,
0.039825439453125,
-0.00714874267578125,
0.00661468505859375,
0.027374267578125,
-0.050750732421875,
0.0020961761474609375,
0.0166778564453125,
0.0482177734375,
-0.015960693359375,
-0.0263824462890625,
0.0169830322265625,
0.03521728515625,
-0.034454345703125,
-0.0026531219482421875,
0.0694580078125,
-0.02471923828125,
0.047882080078125,
-0.03741455078125,
-0.006786346435546875,
-0.0435791015625,
0.0141448974609375,
0.06097412109375,
0.06365966796875,
-0.01129150390625,
0.0029392242431640625,
-0.0506591796875,
-0.006458282470703125,
0.00432586669921875,
-0.05517578125,
-0.028900146484375,
-0.0259246826171875,
0.0091094970703125,
-0.0020427703857421875,
0.0146331787109375,
0.000537872314453125,
-0.01308441162109375,
0.03875732421875,
0.00991058349609375,
0.0477294921875,
-0.0125885009765625,
0.057647705078125,
0.0010271072387695312,
0.05499267578125,
0.0096282958984375,
0.03338623046875,
-0.006465911865234375,
-0.02435302734375,
-0.011993408203125,
-0.09136962890625,
0.002471923828125,
0.0269012451171875,
0.0177764892578125,
0.01556396484375,
-0.046417236328125,
0.0202484130859375,
0.01415252685546875,
-0.021148681640625,
0.0020771026611328125,
-0.0084075927734375,
0.005706787109375,
-0.027191162109375,
-0.00334930419921875,
0.00726318359375,
0.00786590576171875,
0.01226806640625,
-0.016510009765625,
-0.00952911376953125,
-0.0015707015991210938,
0.003612518310546875,
0.0008449554443359375,
-0.016632080078125,
0.020111083984375,
-0.0093231201171875,
0.039093017578125,
-0.0156402587890625,
0.028533935546875,
0.0092010498046875,
0.00904083251953125,
0.031494140625,
0.01336669921875,
-0.0161590576171875,
-0.0200653076171875,
0.0258941650390625,
0.0130462646484375,
0.02386474609375,
0.0254669189453125,
-0.013763427734375,
0.0271453857421875,
0.050018310546875,
0.0745849609375,
-0.054656982421875,
0.006412506103515625,
0.023590087890625,
-0.0300445556640625,
0.0181732177734375,
0.02197265625,
-0.0241241455078125,
-0.0357666015625,
0.014068603515625,
-0.0192108154296875,
0.0011463165283203125,
0.008392333984375,
-0.002056121826171875,
-0.020050048828125,
-0.0307769775390625,
0.041473388671875,
0.016357421875,
-0.0272979736328125,
0.031768798828125,
0.007904052734375,
0.00786590576171875,
-0.01148223876953125,
0.0158233642578125,
-0.00847625732421875,
-0.0276336669921875,
-0.06475830078125,
-0.0049285888671875,
0.00882720947265625,
-0.040313720703125,
-0.04736328125,
-0.0126495361328125,
-0.02850341796875,
0.044403076171875,
-0.04315185546875,
-0.0072174072265625,
0.029937744140625,
-0.050872802734375,
-0.0472412109375,
-0.0128326416015625,
0.0277099609375,
0.035980224609375,
0.001338958740234375,
0.03350830078125,
0.0025463104248046875,
-0.050384521484375,
-0.01519012451171875,
-0.02838134765625,
0.059112548828125,
-0.007129669189453125,
-0.0187225341796875,
0.0176239013671875,
-0.0007681846618652344,
-0.01145172119140625,
-0.01259613037109375,
0.00495147705078125,
0.002437591552734375,
0.041534423828125,
-0.00986480712890625,
0.0300750732421875,
-0.0144805908203125,
-0.017822265625,
-0.07635498046875,
0.0745849609375,
0.0526123046875,
0.023590087890625,
0.003917694091796875,
0.0196533203125,
-0.056396484375,
-0.022369384765625,
-0.057891845703125,
0.06951904296875,
0.00391387939453125,
0.019287109375,
-0.08612060546875,
-0.006481170654296875,
-0.0151214599609375,
0.0167236328125,
0.03631591796875,
0.001438140869140625,
-0.043304443359375,
-0.036773681640625,
0.01995849609375,
0.05035400390625,
0.0251312255859375,
0.0216522216796875,
0.01505279541015625,
0.052093505859375,
0.06451416015625,
-0.0775146484375,
0.030731201171875,
-0.0223846435546875,
0.0296783447265625,
0.039306640625,
0.0280914306640625,
0.00910186767578125,
0.044586181640625,
-0.033111572265625,
-0.02777099609375,
0.02496337890625,
0.0262603759765625,
-0.0246429443359375,
0.0144195556640625,
0.045318603515625,
0.077392578125,
-0.07415771484375,
-0.08416748046875,
-0.02392578125,
0.042724609375,
0.0291900634765625,
0.061309814453125,
0.0216064453125,
0.022369384765625,
0.0958251953125,
-0.037139892578125,
0.0271148681640625,
-0.0014657974243164062,
-0.016571044921875,
0.01511383056640625,
-0.001682281494140625,
-0.0018777847290039062,
-0.06060791015625,
0.00592041015625,
0.043914794921875,
0.035797119140625,
-0.03204345703125,
0.006404876708984375,
0.0036468505859375,
-0.00839996337890625,
0.0031681060791015625,
-0.039337158203125,
-0.0036334991455078125,
0.0227508544921875,
-0.004913330078125,
-0.036163330078125,
-0.007175445556640625,
0.0275115966796875,
0.047454833984375,
-0.0011949539184570312,
0.005191802978515625,
-0.052703857421875,
-0.0445556640625,
-0.0219879150390625,
0.0200042724609375,
0.01885986328125,
0.00677490234375,
0.009033203125,
0.0171356201171875,
-0.0013942718505859375,
-0.0021686553955078125,
0.0218505859375,
-0.0009608268737792969,
-0.0233154296875,
-0.01232147216796875,
0.0312042236328125,
-0.0301666259765625,
-0.00754547119140625,
-0.003719329833984375,
0.0034275054931640625,
-0.0325927734375,
0.037109375,
0.05047607421875,
-0.019561767578125,
-0.034576416015625,
-0.0186309814453125,
-0.004161834716796875,
0.0086822509765625,
-0.0340576171875,
-0.0206298828125,
0.01364898681640625,
-0.0124359130859375,
0.0171966552734375,
-0.0323486328125,
0.047943115234375,
0.0011005401611328125,
0.0615234375,
-0.003936767578125,
0.0290374755859375,
0.017852783203125,
-0.04119873046875,
-0.016815185546875,
0.003662109375,
-0.048797607421875,
-0.01285552978515625,
-0.0167236328125,
-0.0189971923828125,
0.01556396484375,
0.037445068359375,
0.006160736083984375,
0.0006041526794433594,
-0.027984619140625,
0.00360107421875,
0.0224151611328125,
-0.0411376953125,
0.016632080078125,
0.05999755859375,
0.00457763671875,
0.021697998046875,
-0.0308990478515625,
-0.036712646484375,
-0.0203094482421875,
0.059783935546875,
0.044036865234375,
0.0341796875,
-0.0002875328063964844,
0.04937744140625,
-0.0218048095703125,
0.05633544921875,
-0.05950927734375,
-0.0214385986328125,
0.01273345947265625,
0.0160980224609375,
0.046630859375,
-0.0171051025390625,
0.003940582275390625,
0.03216552734375,
0.055145263671875,
-0.005615234375,
0.0162811279296875,
-0.0113525390625,
0.010162353515625,
-0.047088623046875,
0.002346038818359375,
-0.007297515869140625,
-0.00450897216796875,
-0.036834716796875,
-0.01371002197265625,
0.056610107421875,
0.049591064453125,
0.0027942657470703125,
0.01270294189453125,
0.0033779144287109375,
-0.034149169921875,
0.023193359375,
-0.020599365234375,
0.0246124267578125,
0.0266571044921875,
-0.0193634033203125,
-0.025848388671875,
0.0008449554443359375,
-0.014678955078125,
0.01043701171875,
0.01093292236328125,
0.0263519287109375,
0.0174713134765625,
-0.01229095458984375,
-0.0248260498046875,
0.022705078125,
0.06524658203125,
0.032073974609375,
0.02880859375,
-0.02899169921875,
0.007465362548828125,
-0.0296783447265625,
0.00519561767578125,
-0.004573822021484375,
-0.032745361328125,
-0.03436279296875,
-0.01605224609375,
-0.04180908203125,
-0.061004638671875,
-0.0284271240234375,
-0.0262908935546875,
0.002033233642578125,
-0.0093536376953125,
-0.01348114013671875,
-0.01971435546875,
-0.0026950836181640625,
0.0093994140625,
-0.0301666259765625,
-0.0013980865478515625,
-0.0014333724975585938,
0.019805908203125,
-0.033203125,
-0.00449371337890625,
-0.0443115234375,
-0.0017499923706054688,
-0.0172576904296875,
0.0297698974609375,
0.048004150390625,
-0.032562255859375,
-0.0233001708984375,
0.0447998046875,
0.02203369140625,
0.08734130859375,
-0.0003437995910644531,
0.00756072998046875,
0.01206207275390625,
0.012847900390625,
-0.0462646484375,
-0.038299560546875,
0.029022216796875,
-0.03546142578125,
-0.03955078125,
0.0012197494506835938,
-0.009552001953125,
0.0167236328125,
-0.027984619140625,
-0.0587158203125,
0.03912353515625,
-0.00659942626953125,
-0.028656005859375,
0.005077362060546875,
-0.0142974853515625,
0.00411224365234375,
0.00971221923828125,
0.0142059326171875,
-0.0186767578125,
-0.0341796875,
-0.005558013916015625,
-0.00872802734375,
0.030426025390625,
0.0221405029296875,
-0.032470703125,
-0.051544189453125,
-0.023193359375,
-0.029266357421875,
-0.007587432861328125,
-0.010467529296875,
-0.0026378631591796875,
0.005008697509765625,
0.00446319580078125,
-0.04541015625,
-0.0154571533203125,
0.01593017578125,
0.017303466796875,
0.007312774658203125,
-0.035125732421875,
-0.0256500244140625,
-0.0211639404296875,
0.040618896484375,
0.01739501953125,
0.007495880126953125,
-0.0254058837890625,
0.0145416259765625,
0.005344390869140625,
-0.056304931640625,
0.0029773712158203125,
0.031097412109375,
-0.053009033203125,
-0.009552001953125,
-0.002285003662109375,
-0.01238250732421875,
0.0199432373046875,
-0.0609130859375,
-0.043701171875,
-0.00356292724609375,
-0.047882080078125,
0.0286865234375,
-0.035736083984375,
-0.033172607421875,
0.0127105712890625,
-0.009429931640625,
-0.0003132820129394531,
0.005168914794921875,
0.022979736328125,
0.006671905517578125,
0.0621337890625,
0.0150299072265625,
0.0122528076171875,
-0.029296875,
-0.016845703125,
0.0362548828125,
-0.00214385986328125,
0.026153564453125,
-0.0162506103515625,
-0.0037403106689453125,
0.0105133056640625,
-0.0020351409912109375,
0.008209228515625,
0.0360107421875,
-0.0228271484375,
-0.022430419921875,
0.0051116943359375,
-0.02789306640625,
0.001983642578125,
-0.007354736328125,
0.0109710693359375,
-0.00958251953125,
-0.00873565673828125,
0.0384521484375,
-0.02386474609375,
-0.00812530517578125,
0.01007080078125,
-0.00028777122497558594,
-0.04803466796875,
0.044891357421875,
-0.001007080078125,
0.01093292236328125,
0.021636962890625
]
|
d1b4a66049491f0dff033ee73de241fb7e5610e5 | Wordpress Stackexchange
Q: Can you change the main heading of a page in the WordPress admin (without output buffering or JavaScript)? I'd like to change the heading text on an edit page—this bit:
I'm currently targeting it with jQuery (.wrap h2:first-of-type) and rewriting it that way, but it's not totally elegant - there's a bit of a flash when the page first loads that I'd like to avoid.
I know I could register a custom post type and set those titles manually (the labels attribute), but I'd only like it to change when certain conditions are met, and I'd like to change it to use information saved elsewhere in the site.
I'd like to avoid output buffering as well.
From what I can tell, core is just echoing $post_type_object->labels->name - is there any way to filter that output? I can't find anything, but I may be looking in the wrong places.
Thanks!
A: Found it! The post_type_labels_{$post_type} filter does the job beautifully.
(Documented here.)
| Q: Can you change the main heading of a page in the WordPress admin (without output buffering or JavaScript)? I'd like to change the heading text on an edit page—this bit:
I'm currently targeting it with jQuery (.wrap h2:first-of-type) and rewriting it that way, but it's not totally elegant - there's a bit of a flash when the page first loads that I'd like to avoid.
I know I could register a custom post type and set those titles manually (the labels attribute), but I'd only like it to change when certain conditions are met, and I'd like to change it to use information saved elsewhere in the site.
I'd like to avoid output buffering as well.
From what I can tell, core is just echoing $post_type_object->labels->name - is there any way to filter that output? I can't find anything, but I may be looking in the wrong places.
Thanks!
A: Found it! The post_type_labels_{$post_type} filter does the job beautifully.
(Documented here.)
| wordpress | {
"language": "en",
"length": 162,
"provenance": "stackexchange_00019.jsonl.gz:449701",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165584"
} | [
-0.006191253662109375,
-0.037445068359375,
-0.0308685302734375,
0.0036792755126953125,
-0.0200653076171875,
-0.036224365234375,
0.0377197265625,
0.00911712646484375,
-0.0369873046875,
0.048797607421875,
0.0214691162109375,
-0.003925323486328125,
-0.0005908012390136719,
-0.025726318359375,
-0.0275726318359375,
-0.016815185546875,
0.0245361328125,
-0.0035858154296875,
0.01029205322265625,
-0.010009765625,
0.012359619140625,
-0.0086212158203125,
-0.006153106689453125,
0.0640869140625,
0.04583740234375,
-0.062408447265625,
0.0732421875,
-0.009979248046875,
0.046722412109375,
0.0010595321655273438,
0.041778564453125,
-0.0310211181640625,
0.0242767333984375,
0.01374053955078125,
-0.001979827880859375,
0.0151519775390625,
0.025115966796875,
0.0008783340454101562,
0.0269317626953125,
0.00913238525390625,
0.00768280029296875,
0.0190582275390625,
0.010955810546875,
0.037384033203125,
-0.027587890625,
-0.041839599609375,
0.0065460205078125,
-0.0239105224609375,
0.0244903564453125,
-0.046661376953125,
0.0035533905029296875,
0.0257720947265625,
0.0212860107421875,
-0.046356201171875,
-0.0237579345703125,
0.018707275390625,
-0.01116180419921875,
-0.03192138671875,
0.014190673828125,
-0.0144805908203125,
0.00414276123046875,
-0.016510009765625,
0.0311431884765625,
0.018157958984375,
-0.01357269287109375,
-0.01052093505859375,
0.0338134765625,
0.00551605224609375,
-0.05389404296875,
-0.0049896240234375,
0.05535888671875,
-0.0045013427734375,
0.0029735565185546875,
-0.0247344970703125,
0.016021728515625,
0.0014791488647460938,
-0.0206298828125,
-0.0165557861328125,
0.0162200927734375,
0.009307861328125,
0.05194091796875,
0.02294921875,
0.0130767822265625,
-0.0298004150390625,
0.04718017578125,
0.017608642578125,
-0.004024505615234375,
-0.033843994140625,
-0.0290985107421875,
0.019989013671875,
-0.029510498046875,
-0.004688262939453125,
0.005970001220703125,
0.02410888671875,
-0.0160064697265625,
0.01282501220703125,
-0.0028095245361328125,
0.01058197021484375,
-0.00539398193359375,
0.0266265869140625,
-0.0207366943359375,
-0.018951416015625,
0.0253753662109375,
-0.02960205078125,
0.0208587646484375,
0.0149078369140625,
-0.0201873779296875,
0.00547027587890625,
0.0594482421875,
0.0283660888671875,
-0.002017974853515625,
0.03143310546875,
-0.01389312744140625,
0.0088653564453125,
-0.0206451416015625,
0.0203399658203125,
-0.034332275390625,
-0.01904296875,
-0.0155029296875,
0.020599365234375,
0.0218658447265625,
0.0305938720703125,
-0.007415771484375,
-0.0181121826171875,
0.00992584228515625,
0.017669677734375,
-0.015777587890625,
-0.0435791015625,
0.032135009765625,
-0.039703369140625,
-0.0150604248046875,
0.003391265869140625,
0.0772705078125,
0.06689453125,
0.055694580078125,
-0.004253387451171875,
0.01318359375,
0.005466461181640625,
-0.0208282470703125,
0.0004012584686279297,
0.019927978515625,
-0.01180267333984375,
-0.01476287841796875,
-0.0224609375,
0.0279541015625,
0.036468505859375,
0.01436614990234375,
0.00807952880859375,
0.0009546279907226562,
-0.05706787109375,
0.06512451171875,
-0.04541015625,
0.037811279296875,
0.017059326171875,
-0.0176544189453125,
-0.045867919921875,
0.058807373046875,
-0.042694091796875,
0.007030487060546875,
-0.06536865234375,
0.0235595703125,
-0.00653076171875,
0.040069580078125,
0.0284576416015625,
0.0005145072937011719,
0.036651611328125,
-0.049346923828125,
-0.018890380859375,
0.0190582275390625,
-0.0088043212890625,
0.03875732421875,
0.04803466796875,
0.0443115234375,
-0.01221466064453125,
-0.0013475418090820312,
-0.0296783447265625,
0.0001430511474609375,
-0.0201568603515625,
0.01041412353515625,
0.04425048828125,
-0.003307342529296875,
-0.0297393798828125,
-0.00014889240264892578,
0.0016317367553710938,
-0.029144287109375,
0.0014820098876953125,
0.01300048828125,
0.057098388671875,
0.013031005859375,
0.0250091552734375,
-0.0095367431640625,
-0.0038089752197265625,
-0.053436279296875,
0.019012451171875,
-0.00555419921875,
-0.026611328125,
-0.011749267578125,
-0.009429931640625,
-0.01470184326171875,
0.015625,
0.0013761520385742188,
0.0166168212890625,
-0.017242431640625,
0.0038394927978515625,
-0.037384033203125,
-0.02044677734375,
0.002285003662109375,
0.0307464599609375,
0.019744873046875,
0.02459716796875,
0.004119873046875,
0.0218505859375,
-0.0153350830078125,
-0.06304931640625,
-0.047821044921875,
-0.01422882080078125,
0.005863189697265625,
0.05859375,
0.017974853515625,
0.0301055908203125,
0.042266845703125,
-0.0244903564453125,
0.0301055908203125,
0.02032470703125,
0.039764404296875,
0.0178680419921875,
-0.0203704833984375,
-0.005802154541015625,
0.055938720703125,
0.0089263916015625,
-0.01476287841796875,
0.01934814453125,
-0.00032448768615722656,
0.0166168212890625,
-0.03143310546875,
-0.01910400390625,
-0.02587890625,
-0.0772705078125,
0.018096923828125,
0.055938720703125,
0.01904296875,
0.0135955810546875,
0.02099609375,
0.064453125,
0.0311431884765625,
0.03302001953125,
0.052276611328125,
-0.01446533203125,
0.0229949951171875,
0.0246124267578125,
-0.048187255859375,
-0.0330810546875,
0.04217529296875,
-0.059112548828125,
0.0203399658203125,
0.057403564453125,
0.0256500244140625,
0.01441192626953125,
-0.006011962890625,
-0.0074310302734375,
0.0078582763671875,
-0.014739990234375,
-0.05047607421875,
0.00829315185546875,
0.076171875,
0.0162506103515625,
0.0548095703125,
0.0391845703125,
-0.040496826171875,
0.022613525390625,
0.01093292236328125,
-0.00439453125,
0.0054779052734375,
0.043426513671875,
0.0199737548828125,
-0.026885986328125,
-0.01340484619140625,
-0.0174713134765625,
-0.011016845703125,
-0.00295257568359375,
-0.007801055908203125,
-0.01342010498046875,
-0.040618896484375,
-0.007724761962890625,
0.040130615234375,
-0.0182037353515625,
0.00392913818359375,
0.0127105712890625,
0.0533447265625,
0.001216888427734375,
0.012969970703125,
0.006214141845703125,
-0.0243072509765625,
0.06787109375,
-0.003509521484375,
-0.027435302734375,
0.03192138671875,
-0.06939697265625,
0.0565185546875,
-0.038543701171875,
0.087890625,
0.07794189453125,
-0.01110076904296875,
0.035064697265625,
0.0037174224853515625,
-0.001300811767578125,
0.00524139404296875,
0.01084136962890625,
0.0010328292846679688,
0.00598907470703125,
-0.050811767578125,
0.0250396728515625,
0.008331298828125,
0.0885009765625,
-0.04815673828125,
-0.08074951171875,
-0.004390716552734375,
0.019195556640625,
-0.041290283203125,
-0.0328369140625,
-0.044921875,
-0.01548004150390625,
-0.013458251953125,
0.021484375,
-0.01291656494140625,
0.016265869140625,
0.033538818359375,
-0.0012292861938476562,
0.01898193359375,
-0.006534576416015625,
-0.0439453125,
-0.0189666748046875,
-0.06524658203125,
-0.03668212890625,
-0.01241302490234375,
-0.00539398193359375,
0.01099395751953125,
0.0239105224609375,
0.01020050048828125,
-0.054962158203125,
0.024871826171875,
0.0626220703125,
-0.00676727294921875,
0.038330078125,
0.032073974609375,
-0.05450439453125,
0.004528045654296875,
0.00762176513671875,
-0.044952392578125,
-0.0086822509765625,
0.03411865234375,
-0.03411865234375,
-0.033294677734375,
-0.02130126953125,
-0.026702880859375,
0.0072784423828125,
0.038787841796875,
0.0293426513671875,
0.004184722900390625,
-0.027740478515625,
-0.05755615234375,
0.0124664306640625,
-0.0546875,
0.013885498046875,
0.049652099609375,
-0.010498046875,
-0.01325225830078125,
0.007503509521484375,
0.0217742919921875,
-0.024139404296875,
0.00522613525390625,
-0.01384735107421875,
0.00799560546875,
-0.005733489990234375,
0.0260009765625,
-0.0185699462890625,
0.009185791015625,
0.0021305084228515625,
0.055511474609375,
0.0218505859375,
0.028533935546875,
-0.00608062744140625,
0.058319091796875,
-0.0087890625,
-0.08404541015625,
0.037750244140625,
-0.050994873046875,
-0.0377197265625,
0.02423095703125,
-0.023406982421875,
0.07305908203125,
0.10302734375,
-0.06353759765625,
-0.0226593017578125,
0.006591796875,
0.0423583984375,
-0.0310821533203125,
-0.06597900390625,
-0.00983428955078125,
-0.03009033203125,
-0.12158203125,
0.010101318359375,
-0.006649017333984375,
-0.034515380859375,
-0.044769287109375,
0.07635498046875,
-0.07928466796875,
-0.03533935546875,
0.03448486328125,
-0.032318115234375,
-0.01084136962890625,
0.02130126953125,
-0.036468505859375,
-0.003444671630859375,
-0.019927978515625,
-0.02423095703125,
-0.0926513671875,
-0.016387939453125,
-0.0008211135864257812,
0.07086181640625,
-0.007167816162109375,
-0.0126495361328125,
-0.0282440185546875,
0.040985107421875,
0.007293701171875,
0.01453399658203125,
-0.0084381103515625,
0.0025386810302734375,
0.026336669921875,
-0.029296875,
-0.030670166015625,
-0.02642822265625,
-0.0233154296875,
-0.007251739501953125,
-0.01546478271484375,
0.04827880859375,
0.01035308837890625,
0.019134521484375,
0.02642822265625,
-0.016998291015625,
-0.06640625,
-0.051910400390625,
-0.046783447265625,
0.018035888671875,
-0.0025157928466796875,
-0.0197601318359375,
-0.07171630859375,
-0.10064697265625,
0.049041748046875,
0.005992889404296875,
-0.028472900390625,
-0.00386810302734375,
0.05902099609375,
0.01009368896484375,
-0.0294647216796875,
-0.020721435546875,
-0.02178955078125,
0.0325927734375,
-0.00527191162109375,
0.03985595703125,
-0.00754547119140625,
-0.029083251953125,
0.09820556640625,
-0.0140380859375,
0.00958251953125,
-0.03326416015625,
0.03472900390625,
0.007671356201171875,
-0.005970001220703125,
0.0034198760986328125,
-0.0155029296875,
0.028839111328125,
0.0058441162109375,
-0.0031871795654296875,
0.0117340087890625,
-0.017486572265625,
-0.00374603271484375,
0.00949859619140625,
-0.0022678375244140625,
-0.0057525634765625,
-0.00433349609375,
0.0101165771484375,
0.009765625,
0.00821685791015625,
0.00431060791015625,
0.0132598876953125,
-0.028656005859375,
-0.0226287841796875,
0.0186767578125,
-0.0221099853515625,
-0.0338134765625,
-0.022308349609375,
0.021392822265625,
-0.01374053955078125,
0.0102386474609375,
0.0282135009765625,
-0.021514892578125,
0.0379638671875,
0.003978729248046875,
-0.055267333984375,
0.03033447265625,
-0.01171875,
0.0418701171875,
0.0283203125,
0.014495849609375,
0.00843048095703125,
0.01200103759765625,
0.0215606689453125,
0.0037326812744140625,
0.03033447265625,
0.0010461807250976562,
-0.0185089111328125,
0.034027099609375,
0.0222625732421875,
-0.01702880859375,
0.03692626953125,
0.0198822021484375,
0.01485443115234375,
0.025360107421875,
-0.0179290771484375,
0.04058837890625,
0.03387451171875,
-0.0067901611328125,
-0.0172576904296875,
0.06524658203125,
0.01519775390625,
-0.029815673828125,
0.01384735107421875,
-0.01078033447265625,
0.0034084320068359375,
0.017486572265625,
0.0196075439453125,
0.00553131103515625,
-0.004638671875,
-0.00035071372985839844,
-0.0178070068359375,
-0.005252838134765625,
0.041595458984375,
0.00003808736801147461,
-0.05096435546875,
-0.016021728515625,
0.021087646484375,
0.045135498046875,
-0.0199737548828125,
-0.0223541259765625,
-0.0130767822265625,
-0.0278778076171875,
0.01544952392578125,
-0.0274810791015625,
-0.0109405517578125,
0.0024013519287109375,
-0.0018854141235351562,
-0.043121337890625,
-0.0299224853515625,
0.004894256591796875,
-0.051361083984375,
-0.0269317626953125,
0.00771331787109375,
0.00010877847671508789,
0.009429931640625,
-0.0167083740234375,
0.02777099609375,
-0.0312347412109375,
-0.01438140869140625,
-0.0517578125,
0.005138397216796875,
0.08099365234375,
0.055572509765625,
-0.049407958984375,
0.018890380859375,
-0.079833984375,
-0.0159912109375,
-0.088623046875,
-0.06121826171875,
-0.03607177734375,
0.0175323486328125,
-0.01361846923828125,
0.019439697265625,
-0.03167724609375,
-0.0244293212890625,
-0.0180511474609375,
0.0517578125,
0.03857421875,
0.093505859375,
-0.0196533203125,
0.07086181640625,
-0.0111541748046875,
0.044097900390625,
-0.0079803466796875,
0.022552490234375,
-0.00814056396484375,
-0.00920867919921875,
0.011199951171875,
-0.00589752197265625,
0.01110076904296875,
-0.02337646484375,
0.03192138671875,
-0.02569580078125,
0.0259857177734375,
-0.0091552734375,
0.021026611328125,
0.00589752197265625,
0.02655029296875,
-0.031036376953125,
-0.0267486572265625,
-0.042205810546875,
-0.0472412109375,
0.035308837890625,
-0.00601959228515625,
0.00844573974609375,
-0.0052490234375,
-0.0274810791015625,
0.00200653076171875,
0.012237548828125,
0.00444793701171875,
0.006313323974609375,
-0.00844573974609375,
0.036224365234375,
0.0438232421875,
-0.0285491943359375,
0.02392578125,
0.025390625,
0.00852203369140625,
0.02471923828125,
-0.00662994384765625,
-0.02301025390625,
-0.025299072265625,
0.038543701171875,
0.006252288818359375,
-0.01092529296875,
0.05914306640625,
-0.0220184326171875,
0.01280975341796875,
0.037750244140625,
0.060699462890625,
-0.0538330078125,
0.015625,
0.017303466796875,
-0.00640869140625,
0.029632568359375,
0.0239410400390625,
-0.03582763671875,
-0.026092529296875,
0.007293701171875,
-0.01959228515625,
-0.004756927490234375,
0.0309906005859375,
0.036712646484375,
-0.0244598388671875,
-0.05438232421875,
0.0618896484375,
0.010284423828125,
-0.033111572265625,
0.017120361328125,
0.006011962890625,
-0.01904296875,
-0.03936767578125,
0.0240936279296875,
0.018218994140625,
-0.004863739013671875,
-0.095703125,
0.01666259765625,
0.016021728515625,
-0.0242919921875,
-0.015838623046875,
0.03289794921875,
0.0248565673828125,
0.0467529296875,
0.00848388671875,
-0.01374053955078125,
0.03656005859375,
-0.0248870849609375,
0.01143646240234375,
-0.05694580078125,
-0.00984954833984375,
0.029815673828125,
-0.05645751953125,
0.013946533203125,
-0.002727508544921875,
-0.02520751953125,
-0.035888671875,
-0.06475830078125,
0.07379150390625,
0.019378662109375,
-0.030517578125,
0.00757598876953125,
0.00684356689453125,
-0.0178070068359375,
0.00429534912109375,
0.00836944580078125,
-0.0167083740234375,
0.001804351806640625,
-0.0031890869140625,
-0.059478759765625,
-0.01041412353515625,
-0.034271240234375,
-0.059722900390625,
0.10516357421875,
0.024200439453125,
0.0258941650390625,
0.01303863525390625,
0.03729248046875,
-0.050506591796875,
0.0007114410400390625,
-0.03424072265625,
0.0259857177734375,
-0.0111236572265625,
0.03167724609375,
-0.05712890625,
-0.0036029815673828125,
-0.005039215087890625,
0.0229034423828125,
-0.052032470703125,
-0.01103973388671875,
0.0172119140625,
0.017913818359375,
0.03277587890625,
0.0404052734375,
0.03271484375,
0.002666473388671875,
-0.02392578125,
0.027374267578125,
0.00431060791015625,
-0.0272216796875,
0.0309600830078125,
-0.0206451416015625,
-0.05963134765625,
0.00891876220703125,
0.01922607421875,
0.034515380859375,
0.03656005859375,
-0.0226593017578125,
-0.04364013671875,
0.024017333984375,
0.0377197265625,
-0.02392578125,
-0.019500732421875,
0.066162109375,
0.055755615234375,
-0.0477294921875,
0.01114654541015625,
-0.033660888671875,
0.061798095703125,
0.01953125,
0.00014102458953857422,
0.007007598876953125,
-0.0007238388061523438,
0.013885498046875,
-0.0071258544921875,
-0.0181121826171875,
0.01947021484375,
0.005847930908203125,
0.0023746490478515625,
0.0054931640625,
0.03228759765625,
-0.03912353515625,
0.00421905517578125,
0.054229736328125,
0.02142333984375,
-0.0191192626953125,
-0.0235137939453125,
-0.0059661865234375,
0.003948211669921875,
0.0139617919921875,
-0.028533935546875,
0.0107879638671875,
-0.0203857421875,
0.0204925537109375,
-0.01824951171875,
0.0001323223114013672,
0.042205810546875,
0.0030670166015625,
0.0103912353515625,
0.0123748779296875,
-0.015655517578125,
0.029754638671875,
-0.06439208984375,
0.0254669189453125,
0.00901031494140625,
0.06475830078125,
0.0273284912109375,
0.034942626953125,
-0.0164947509765625,
-0.0147705078125,
-0.0160369873046875,
0.00418853759765625,
-0.03564453125,
0.02813720703125,
-0.0264739990234375,
-0.015869140625,
-0.027374267578125,
0.02313232421875,
0.0254669189453125,
0.0057220458984375,
0.039520263671875,
0.01580810546875,
-0.031951904296875,
-0.00335693359375,
0.01560211181640625,
-0.018310546875,
-0.0113983154296875,
-0.0285186767578125,
0.01511383056640625,
0.00605010986328125,
0.0113372802734375,
0.0010271072387695312,
0.060211181640625,
-0.0136260986328125,
-0.0159759521484375,
0.00830078125,
0.006244659423828125,
-0.056060791015625,
0.02117919921875,
0.00016832351684570312,
0.063720703125,
0.01055145263671875,
-0.0797119140625,
-0.0300140380859375,
-0.001712799072265625,
-0.061248779296875,
0.03350830078125,
0.03961181640625,
-0.060882568359375,
0.029876708984375,
-0.0212554931640625,
0.0214691162109375,
-0.0116119384765625,
-0.033843994140625,
0.0131988525390625,
0.0272369384765625,
0.0019321441650390625,
0.017486572265625,
-0.032470703125,
-0.0013990402221679688,
0.005687713623046875,
0.00457763671875,
-0.01071929931640625,
0.0244140625,
0.0286102294921875,
0.0130615234375,
0.0037517547607421875,
0.028472900390625,
-0.039306640625,
-0.0152587890625,
-0.0031375885009765625,
-0.03839111328125,
0.0189208984375,
-0.0004925727844238281,
-0.058563232421875,
0.0250396728515625,
0.029144287109375,
-0.059783935546875,
0.04791259765625,
-0.006542205810546875,
-0.007720947265625,
-0.07586669921875,
0.0237884521484375,
-0.00916290283203125,
-0.040618896484375,
0.009521484375,
0.0296173095703125,
-0.01195526123046875,
0.037384033203125,
0.0286865234375,
0.03717041015625,
0.024322509765625,
0.027862548828125,
0.01522064208984375,
-0.0015411376953125,
0.0159149169921875,
0.01535797119140625,
-0.025665283203125,
-0.010101318359375,
0.020233154296875,
-0.01727294921875,
0.038818359375,
-0.00814056396484375,
0.05078125,
-0.0047149658203125,
-0.0005917549133300781,
-0.03643798828125,
-0.0374755859375,
0.00786590576171875,
-0.043182373046875,
0.01236724853515625,
-0.02392578125,
0.0217437744140625,
-0.0250244140625,
-0.03424072265625,
-0.029632568359375,
-0.053955078125,
-0.0011415481567382812,
0.024017333984375,
-0.0181884765625,
-0.038818359375,
-0.059112548828125,
-0.041656494140625,
-0.01297760009765625,
-0.026214599609375,
0.013916015625,
-0.02557373046875,
-0.0105743408203125,
-0.0123138427734375,
-0.032989501953125,
-0.0246429443359375,
-0.0035495758056640625,
0.00452423095703125,
-0.039215087890625,
-0.0335693359375,
-0.05828857421875,
0.0134124755859375,
-0.06646728515625,
0.0217742919921875,
0.060302734375,
-0.0210723876953125,
0.02020263671875,
-0.045989990234375,
-0.01326751708984375,
0.03240966796875,
-0.0230865478515625,
-0.022857666015625,
-0.001194000244140625,
-0.0005092620849609375,
-0.0095672607421875,
-0.0560302734375,
-0.00689697265625,
-0.03466796875,
0.002178192138671875,
-0.012786865234375,
0.0079498291015625,
0.00441741943359375,
-0.02935791015625,
-0.01824951171875,
0.0223846435546875,
0.00484466552734375,
-0.01702880859375,
-0.0125579833984375,
0.0172576904296875,
-0.01108551025390625,
-0.0198822021484375,
0.00640869140625,
-0.054840087890625,
-0.009918212890625,
0.01277923583984375,
0.0276947021484375,
0.0090789794921875,
0.0275726318359375,
0.00627899169921875,
-0.026763916015625,
0.011138916015625,
0.01513671875,
0.02197265625,
-0.01532745361328125,
0.00089263916015625,
0.006717681884765625,
0.022186279296875,
-0.052001953125,
-0.028350830078125,
-0.007190704345703125,
0.016937255859375,
0.00690460205078125,
-0.037078857421875,
-0.053985595703125,
-0.029327392578125,
0.0733642578125,
0.030242919921875,
0.021453857421875,
-0.019134521484375,
-0.006927490234375,
-0.0146331787109375,
-0.045135498046875,
0.025482177734375,
0.0210723876953125,
-0.0101165771484375,
0.0296783447265625,
0.002506256103515625,
-0.025238037109375,
-0.0033626556396484375,
0.0213775634765625,
-0.034027099609375,
0.007076263427734375,
0.030914306640625,
-0.014129638671875,
-0.0253753662109375,
-0.0229644775390625,
0.035919189453125,
-0.035064697265625,
-0.0028228759765625,
-0.009063720703125,
0.02911376953125,
0.01430511474609375,
-0.018890380859375,
-0.01140594482421875,
-0.005161285400390625,
-0.0164794921875,
0.025054931640625,
-0.01611328125,
0.06683349609375,
-0.040008544921875,
-0.00571441650390625,
0.0024929046630859375,
0.0391845703125,
0.0003178119659423828,
0.04180908203125,
-0.046112060546875,
0.057647705078125,
-0.004993438720703125,
0.0184326171875,
-0.028656005859375,
-0.00372314453125,
-0.013275146484375,
0.01233673095703125,
-0.023712158203125,
0.0124969482421875,
0.0079498291015625,
-0.0179443359375,
-0.0031147003173828125,
0.01467132568359375,
0.0069732666015625,
-0.039886474609375,
0.0148162841796875,
-0.0128173828125,
0.004741668701171875,
0.022064208984375
]
|
15faec7801fb86e7521b3afa6c04ba119e7d7886 | Wordpress Stackexchange
Q: Get Posts Under Custom Taxonomy I am not getting the posts under custom taxonomy(fabric_building_types). I am getting cat_id and cat->name also but not able to get the posts.
$args = array(
'type' => 'post',
'child_of' => 0,
'parent' => '',
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 1,
'hierarchical' => 1,
'exclude' => '',
'include' => '',
'number' => '',
'taxonomy' => 'fabric_building_types',
'pad_counts' => false
);
$categories = get_categories( $args );
foreach ( $categories as $cat ) {
// here's my code for getting the posts for custom post type
$posts_array = get_posts(
array(
'showposts' => -1,
'post_type' => 'fabric_building',
'tax_query' => array(
array(
'taxonomy' => 'fabric_building_types',
'field' => $cat->cat_ID,
'terms' => $cat->name,
)
)
)
);
print_r( $posts_array );
}
Can anyone please help me out...Thanks in advance
A: Your tax query is incorrect, field should be the field you want to query on: term_id, name, or slug -
$posts_array = get_posts(
array(
'posts_per_page' => -1,
'post_type' => 'fabric_building',
'tax_query' => array(
array(
'taxonomy' => 'fabric_building_types',
'field' => 'term_id',
'terms' => $cat->term_id,
)
)
)
);
| Q: Get Posts Under Custom Taxonomy I am not getting the posts under custom taxonomy(fabric_building_types). I am getting cat_id and cat->name also but not able to get the posts.
$args = array(
'type' => 'post',
'child_of' => 0,
'parent' => '',
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => 1,
'hierarchical' => 1,
'exclude' => '',
'include' => '',
'number' => '',
'taxonomy' => 'fabric_building_types',
'pad_counts' => false
);
$categories = get_categories( $args );
foreach ( $categories as $cat ) {
// here's my code for getting the posts for custom post type
$posts_array = get_posts(
array(
'showposts' => -1,
'post_type' => 'fabric_building',
'tax_query' => array(
array(
'taxonomy' => 'fabric_building_types',
'field' => $cat->cat_ID,
'terms' => $cat->name,
)
)
)
);
print_r( $posts_array );
}
Can anyone please help me out...Thanks in advance
A: Your tax query is incorrect, field should be the field you want to query on: term_id, name, or slug -
$posts_array = get_posts(
array(
'posts_per_page' => -1,
'post_type' => 'fabric_building',
'tax_query' => array(
array(
'taxonomy' => 'fabric_building_types',
'field' => 'term_id',
'terms' => $cat->term_id,
)
)
)
);
A: You should use get_terms() for taxonomies when you can.
<?php
/* Add your taxonomy. */
$taxonomies = array(
'fabric_building_types',
);
$args = array(
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => true,
'exclude' => array(),
'exclude_tree' => array(),
'include' => array(),
'number' => '',
'fields' => 'all',
'slug' => '',
'parent' => '',
'hierarchical' => true,
'child_of' => 0,
'get' => '',
'name__like' => '',
'description__like' => '',
'pad_counts' => false,
'offset' => '',
'search' => '',
'cache_domain' => 'core'
);
$terms = get_terms( $taxonomies, $args );
foreach ( $terms as $term ) {
// here's my code for getting the posts for custom post type
$posts_array = get_posts(
array( 'showposts' => -1,
'post_type' => 'fabric_building',
'tax_query' => array(
array(
'taxonomy' => 'fabric_building_types',
'field' => 'term_id',
'terms' => $term->term_id,
)
)
)
);
print_r( $posts_array );
}
?>
Link to Codex: http://codex.wordpress.org/Function_Reference/get_terms
A: global $post; $id = $post->ID;
$cat = get_the_category($id);
$loc = get_the_terms($id, 'taxonomy');
$posts = get_posts(
array('post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => -1,
'category' => $cat[0]->term_id,
'tax_query' => array(
array(
'taxonomy' => 'location',
'field' => 'id',
'terms' => $loc[0]->term_id,
)
)
)
);
print_r($posts);
this should be works.
A: Getting posts assigned to current taxonomy
You can add below code in taxonomy-your_tax.php
<div class="a-article-wrapper">
<?php
$terms = wp_get_post_terms( $post->ID, 'your-taxonomy');
$terms_ids = [];
foreach ( $terms as $term ) {
$terms_ids[] = $term->term_id;
}
$args = array(
'post_type' => 'your-post-type',
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'your-taxonomy',
'field' => 'term_id',
'terms' => $terms_ids
)
),
);
$query = new WP_Query($args);
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
?>
<div class="row">
<div class="col-md-8 a-article-row">
<div class="row">
<?php $query->the_post();?>
<div class="a-post-time">
<span class="a-current-date"><?php the_time('j F, D') ?></span>
<span class="a-current-time"><?php the_time('g:i a') ?></span>
</div>
<div class="a-article-title">
<?php the_title(); ?>
</div>
<div class="a-article-content">
<div id="excerpt"><?php the_excerpt(); ?></div>
<?php the_content(); ?>
</div>
<div class="a-article-tags">
<?php echo get_the_term_list( get_the_ID(), 'your-taxonomy', '', ',' ); ?>
</div>
</div>
</div>
</div>
<?php } } ?>
</div>
| wordpress | {
"language": "en",
"length": 508,
"provenance": "stackexchange_00019.jsonl.gz:449708",
"question_score": "41",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165610"
} | [
-0.00264739990234375,
-0.01318359375,
-0.018280029296875,
-0.01104736328125,
0.0020160675048828125,
-0.0193023681640625,
0.019866943359375,
-0.0009126663208007812,
-0.05657958984375,
0.0024890899658203125,
-0.0299835205078125,
0.0084686279296875,
-0.04705810546875,
-0.040313720703125,
0.03271484375,
-0.060089111328125,
0.0261688232421875,
-0.0258331298828125,
0.0062255859375,
-0.02532958984375,
0.024169921875,
-0.0135040283203125,
0.0235595703125,
0.041748046875,
0.040496826171875,
0.0186309814453125,
0.0166473388671875,
-0.035003662109375,
0.017486572265625,
-0.015533447265625,
0.0198211669921875,
-0.0076446533203125,
0.0167694091796875,
0.0166473388671875,
0.01102447509765625,
-0.0042572021484375,
0.018524169921875,
-0.005588531494140625,
0.0175323486328125,
0.017059326171875,
0.0179290771484375,
-0.01020050048828125,
0.0080108642578125,
0.050201416015625,
-0.02423095703125,
-0.0157318115234375,
-0.01117706298828125,
-0.043853759765625,
0.0010766983032226562,
-0.005214691162109375,
0.01222991943359375,
-0.00946807861328125,
0.032470703125,
-0.00690460205078125,
-0.0181732177734375,
-0.022369384765625,
0.0234222412109375,
-0.0274810791015625,
0.036834716796875,
-0.036590576171875,
-0.043304443359375,
-0.0243682861328125,
0.052032470703125,
-0.00843048095703125,
-0.0418701171875,
0.02960205078125,
0.0640869140625,
-0.0011129379272460938,
-0.017913818359375,
-0.0574951171875,
0.0023288726806640625,
0.01392364501953125,
-0.005481719970703125,
0.02001953125,
-0.013397216796875,
-0.08587646484375,
0.0281982421875,
-0.059295654296875,
-0.004871368408203125,
0.050140380859375,
-0.0169525146484375,
0.01531219482421875,
-0.0675048828125,
0.02410888671875,
-0.0215911865234375,
0.048828125,
-0.0291290283203125,
-0.0234375,
0.015380859375,
-0.00458526611328125,
0.0074615478515625,
-0.0272216796875,
-0.0219268798828125,
0.06060791015625,
0.02142333984375,
-0.040679931640625,
0.00800323486328125,
0.0225830078125,
-0.01453399658203125,
0.0177459716796875,
-0.0260009765625,
-0.027587890625,
0.0111236572265625,
-0.0246734619140625,
0.0445556640625,
0.027679443359375,
-0.038360595703125,
-0.016510009765625,
0.08441162109375,
0.0275726318359375,
0.0239715576171875,
0.05419921875,
-0.00885009765625,
-0.0160675048828125,
-0.0253143310546875,
0.0176544189453125,
-0.0241546630859375,
-0.0229949951171875,
-0.0102081298828125,
-0.0207977294921875,
0.008148193359375,
0.032958984375,
-0.0189666748046875,
-0.0090484619140625,
-0.002597808837890625,
0.006824493408203125,
0.017333984375,
-0.05316162109375,
0.02655029296875,
0.0236663818359375,
-0.03662109375,
-0.00714874267578125,
0.021392822265625,
0.02606201171875,
0.007213592529296875,
-0.01395416259765625,
0.0080108642578125,
-0.0394287109375,
-0.00595855712890625,
0.01230621337890625,
0.0194549560546875,
-0.01488494873046875,
0.009918212890625,
0.0112762451171875,
-0.0305328369140625,
0.019561767578125,
0.0250701904296875,
-0.0031566619873046875,
-0.0220947265625,
-0.03997802734375,
-0.022308349609375,
-0.0030364990234375,
0.0550537109375,
0.0028324127197265625,
-0.05743408203125,
-0.002803802490234375,
0.0119781494140625,
0.000377655029296875,
-0.059478759765625,
-0.04425048828125,
0.04632568359375,
0.01092529296875,
0.01204681396484375,
-0.02294921875,
-0.01441192626953125,
-0.0179595947265625,
-0.05633544921875,
-0.001468658447265625,
0.034149169921875,
0.0024394989013671875,
0.0294342041015625,
-0.045318603515625,
0.018829345703125,
0.009796142578125,
-0.0018167495727539062,
0.03729248046875,
-0.001922607421875,
-0.0085601806640625,
0.0245208740234375,
0.0180206298828125,
-0.0243377685546875,
-0.03570556640625,
0.004913330078125,
-0.006992340087890625,
-0.0283050537109375,
-0.0094146728515625,
0.032073974609375,
0.01053619384765625,
-0.006839752197265625,
0.0221710205078125,
0.0511474609375,
0.030426025390625,
-0.03912353515625,
0.033599853515625,
-0.01200103759765625,
-0.0199737548828125,
-0.01812744140625,
0.00783538818359375,
-0.00482177734375,
-0.002593994140625,
-0.023834228515625,
-0.0164031982421875,
-0.00479888916015625,
0.005718231201171875,
0.0279083251953125,
-0.0250244140625,
0.01418304443359375,
0.0023479461669921875,
-0.023681640625,
0.016815185546875,
0.0300445556640625,
0.00983428955078125,
-0.046661376953125,
0.00925445556640625,
-0.0131072998046875,
0.006336212158203125,
0.01299285888671875,
0.00868988037109375,
-0.00838470458984375,
-0.0084991455078125,
-0.01190185546875,
-0.042755126953125,
-0.0120849609375,
0.034759521484375,
0.052154541015625,
-0.004772186279296875,
0.00021767616271972656,
-0.0102386474609375,
0.03961181640625,
0.02764892578125,
-0.03753662109375,
0.00505828857421875,
0.006198883056640625,
0.0015649795532226562,
-0.02923583984375,
0.005771636962890625,
0.037689208984375,
-0.037872314453125,
0.0028018951416015625,
0.043121337890625,
0.018951416015625,
0.036834716796875,
-0.0090789794921875,
0.0167236328125,
0.080078125,
-0.038604736328125,
-0.01007080078125,
0.0041961669921875,
0.03582763671875,
0.088623046875,
0.007488250732421875,
0.019134521484375,
-0.001953125,
0.0007781982421875,
0.0164337158203125,
0.025054931640625,
-0.00952911376953125,
-0.0183868408203125,
0.010986328125,
-0.0004715919494628906,
0.01192474365234375,
-0.03387451171875,
-0.036163330078125,
-0.004779815673828125,
0.047943115234375,
0.0267333984375,
0.060791015625,
0.031646728515625,
-0.048187255859375,
0.004734039306640625,
0.0134124755859375,
0.02850341796875,
0.012847900390625,
-0.0003590583801269531,
-0.0042877197265625,
0.01464080810546875,
-0.005939483642578125,
-0.004718780517578125,
0.028228759765625,
-0.0116729736328125,
0.021240234375,
0.0736083984375,
-0.0162506103515625,
-0.00676727294921875,
-0.0256195068359375,
-0.034515380859375,
-0.016387939453125,
0.04656982421875,
-0.00811004638671875,
-0.0193634033203125,
0.00142669677734375,
0.0594482421875,
-0.0139312744140625,
0.039520263671875,
-0.004573822021484375,
-0.00693511962890625,
-0.0164337158203125,
-0.042724609375,
0.04248046875,
-0.028076171875,
0.00272369384765625,
0.0673828125,
0.0220489501953125,
-0.005268096923828125,
-0.00384521484375,
-0.0297698974609375,
-0.0015325546264648438,
0.011962890625,
-0.0183258056640625,
-0.047821044921875,
-0.0130767822265625,
0.0118255615234375,
0.0379638671875,
0.024261474609375,
0.028961181640625,
-0.0159149169921875,
-0.0113983154296875,
0.042724609375,
-0.05908203125,
-0.0714111328125,
-0.0026836395263671875,
-0.0138092041015625,
-0.0188140869140625,
-0.0222930908203125,
-0.0011014938354492188,
0.0033817291259765625,
-0.04339599609375,
0.0004227161407470703,
0.0472412109375,
-0.041107177734375,
-0.0743408203125,
-0.048675537109375,
-0.0965576171875,
-0.00634002685546875,
0.009796142578125,
0.01541900634765625,
0.024993896484375,
0.059417724609375,
0.03729248046875,
-0.05194091796875,
0.045318603515625,
0.03497314453125,
-0.036956787109375,
0.036773681640625,
0.0052947998046875,
-0.0009655952453613281,
0.01526641845703125,
0.0006999969482421875,
0.0167694091796875,
0.03814697265625,
-0.027587890625,
-0.0012693405151367188,
0.0112152099609375,
-0.0145416259765625,
0.01280975341796875,
0.016143798828125,
-0.0191650390625,
0.0032558441162109375,
0.0197601318359375,
-0.04443359375,
-0.042694091796875,
-0.019775390625,
-0.0294189453125,
0.05633544921875,
0.02008056640625,
0.01033782958984375,
-0.0219268798828125,
0.050872802734375,
-0.024688720703125,
0.0167694091796875,
-0.008697509765625,
-0.024658203125,
0.0277862548828125,
0.003948211669921875,
-0.00646209716796875,
0.007564544677734375,
0.01430511474609375,
-0.0169830322265625,
0.0090789794921875,
0.001613616943359375,
-0.00855255126953125,
-0.02716064453125,
0.0018281936645507812,
-0.029449462890625,
-0.06475830078125,
0.0264739990234375,
-0.059814453125,
0.01067352294921875,
-0.053466796875,
-0.0052337646484375,
-0.0230712890625,
0.08197021484375,
-0.01027679443359375,
-0.0098419189453125,
-0.014862060546875,
-0.00798797607421875,
-0.0137786865234375,
-0.03179931640625,
-0.04766845703125,
0.0029754638671875,
-0.1033935546875,
0.00826263427734375,
0.00852203369140625,
-0.03955078125,
-0.00290679931640625,
0.0006575584411621094,
-0.06646728515625,
-0.049560546875,
0.036590576171875,
-0.0131378173828125,
0.0167083740234375,
-0.0012798309326171875,
0.016387939453125,
-0.02960205078125,
-0.0262603759765625,
0.004596710205078125,
-0.024749755859375,
-0.01532745361328125,
0.031707763671875,
0.0195465087890625,
-0.0019168853759765625,
-0.00833892822265625,
0.01201629638671875,
0.06768798828125,
0.04278564453125,
0.0110931396484375,
0.0025081634521484375,
-0.0252532958984375,
-0.026397705078125,
-0.0087127685546875,
-0.0006251335144042969,
-0.0148468017578125,
-0.013824462890625,
0.027923583984375,
-0.0193634033203125,
0.062286376953125,
-0.00670623779296875,
-0.019622802734375,
0.0268707275390625,
-0.02801513671875,
-0.033355712890625,
0.007732391357421875,
-0.032379150390625,
-0.00885009765625,
-0.0460205078125,
-0.0018825531005859375,
0.009063720703125,
-0.04840087890625,
0.047576904296875,
0.028411865234375,
-0.00331878662109375,
-0.004367828369140625,
0.0555419921875,
0.010101318359375,
-0.034332275390625,
-0.05975341796875,
0.00937652587890625,
0.03619384765625,
-0.006134033203125,
0.055206298828125,
0.043731689453125,
-0.0107269287109375,
0.035491943359375,
0.00737762451171875,
-0.008056640625,
0.01025390625,
0.0250244140625,
0.0086212158203125,
-0.01062774658203125,
-0.0038585662841796875,
-0.033111572265625,
0.033782958984375,
0.0262603759765625,
-0.01448822021484375,
-0.025970458984375,
-0.00630950927734375,
0.05328369140625,
-0.035858154296875,
0.044158935546875,
-0.031036376953125,
-0.0340576171875,
0.01568603515625,
0.0267791748046875,
0.037567138671875,
0.0269317626953125,
-0.01241302490234375,
0.036285400390625,
-0.007476806640625,
0.0201416015625,
-0.01540374755859375,
0.061981201171875,
-0.04632568359375,
0.055267333984375,
-0.0229339599609375,
-0.010772705078125,
-0.0175018310546875,
0.005054473876953125,
-0.0221099853515625,
-0.030181884765625,
-0.0716552734375,
-0.0047760009765625,
0.0102081298828125,
0.034759521484375,
0.037200927734375,
0.01012420654296875,
0.0318603515625,
0.034881591796875,
-0.003055572509765625,
-0.010589599609375,
-0.01287841796875,
0.044769287109375,
-0.024444580078125,
-0.0079498291015625,
-0.0018930435180664062,
-0.01174163818359375,
-0.01317596435546875,
0.08587646484375,
0.004673004150390625,
0.033538818359375,
-0.024566650390625,
-0.004207611083984375,
-0.017181396484375,
0.036285400390625,
0.0165557861328125,
-0.0182952880859375,
-0.00350189208984375,
0.009124755859375,
0.019744873046875,
-0.05084228515625,
-0.0014085769653320312,
0.0069580078125,
0.049041748046875,
-0.004306793212890625,
-0.03143310546875,
0.0291748046875,
-0.0231781005859375,
-0.007617950439453125,
0.04107666015625,
0.0003688335418701172,
-0.02471923828125,
-0.0269012451171875,
-0.006992340087890625,
0.037628173828125,
0.00312042236328125,
-0.0252532958984375,
0.0501708984375,
-0.00022351741790771484,
0.0555419921875,
-0.0338134765625,
0.00516510009765625,
0.007049560546875,
0.028564453125,
-0.02301025390625,
-0.037200927734375,
0.0014362335205078125,
-0.0275115966796875,
0.0166473388671875,
-0.0201568603515625,
-0.03472900390625,
0.0184326171875,
-0.01253509521484375,
0.061279296875,
-0.059906005859375,
-0.015716552734375,
-0.0151214599609375,
-0.011016845703125,
0.0718994140625,
0.04681396484375,
-0.0160980224609375,
-0.01971435546875,
-0.0584716796875,
-0.0206451416015625,
-0.04278564453125,
-0.037506103515625,
-0.006717681884765625,
0.0259552001953125,
-0.005039215087890625,
0.0228271484375,
0.003864288330078125,
-0.0120849609375,
-0.0286712646484375,
-0.0088958740234375,
0.00807952880859375,
0.0012998580932617188,
0.006969451904296875,
0.03839111328125,
-0.001491546630859375,
0.05364990234375,
0.033294677734375,
-0.007450103759765625,
-0.04644775390625,
-0.01473236083984375,
-0.005641937255859375,
-0.13232421875,
0.00447845458984375,
0.01122283935546875,
-0.04058837890625,
0.045135498046875,
-0.0164794921875,
0.016632080078125,
0.01137542724609375,
-0.0120849609375,
-0.00806427001953125,
-0.007068634033203125,
-0.02093505859375,
0.0196075439453125,
0.01044464111328125,
0.025360107421875,
0.01453399658203125,
0.033782958984375,
-0.0078582763671875,
-0.06011962890625,
0.0186614990234375,
0.00916290283203125,
0.033416748046875,
-0.0126495361328125,
-0.0130615234375,
0.0167083740234375,
0.057830810546875,
0.01517486572265625,
0.041900634765625,
0.01532745361328125,
0.024688720703125,
0.01161956787109375,
-0.0014657974243164062,
-0.0011892318725585938,
-0.01873779296875,
0.07989501953125,
0.0153656005859375,
-0.00878143310546875,
0.0828857421875,
-0.02935791015625,
-0.0167999267578125,
0.01122283935546875,
0.028533935546875,
-0.039825439453125,
-0.00905609130859375,
0.01045989990234375,
-0.020172119140625,
-0.0216217041015625,
0.0305938720703125,
-0.0084228515625,
-0.004802703857421875,
-0.0338134765625,
-0.039093017578125,
-0.031585693359375,
-0.0170135498046875,
0.0062713623046875,
-0.0018138885498046875,
0.00806427001953125,
0.08331298828125,
0.01270294189453125,
-0.038330078125,
-0.022918701171875,
0.00977325439453125,
-0.0291595458984375,
-0.046112060546875,
0.024810791015625,
-0.0211639404296875,
0.0135040283203125,
-0.0738525390625,
0.01497650146484375,
-0.026519775390625,
-0.0020542144775390625,
-0.00899505615234375,
-0.032318115234375,
0.036285400390625,
0.03314208984375,
-0.03057861328125,
-0.0019664764404296875,
0.015106201171875,
-0.04852294921875,
0.01180267333984375,
-0.036376953125,
-0.00206756591796875,
0.0305938720703125,
-0.05267333984375,
0.02301025390625,
-0.0086517333984375,
-0.003971099853515625,
-0.01081085205078125,
0.008087158203125,
0.032379150390625,
-0.01885986328125,
-0.006839752197265625,
0.03704833984375,
0.07452392578125,
-0.007503509521484375,
-0.004459381103515625,
0.022064208984375,
-0.06475830078125,
-0.0411376953125,
0.0269012451171875,
-0.0181121826171875,
-0.04718017578125,
-0.0103912353515625,
-0.05145263671875,
0.080078125,
0.032318115234375,
0.00689697265625,
-0.01169586181640625,
0.044464111328125,
-0.026153564453125,
0.02484130859375,
-0.055877685546875,
0.024444580078125,
-0.0003521442413330078,
0.0235137939453125,
-0.056640625,
-0.005645751953125,
-0.0237579345703125,
0.0107879638671875,
0.04638671875,
0.0108795166015625,
-0.036102294921875,
-0.0177154541015625,
0.0061187744140625,
0.03021240234375,
-0.00997161865234375,
0.040771484375,
0.01120758056640625,
0.07366943359375,
0.08074951171875,
-0.0081329345703125,
0.056396484375,
0.028289794921875,
-0.0400390625,
0.0323486328125,
0.014739990234375,
0.02557373046875,
-0.01390838623046875,
-0.041595458984375,
-0.01776123046875,
0.00018918514251708984,
0.0091705322265625,
-0.0297088623046875,
-0.00417327880859375,
0.06097412109375,
0.0693359375,
-0.07110595703125,
-0.01067352294921875,
-0.03759765625,
0.060516357421875,
0.018463134765625,
0.03546142578125,
0.0289154052734375,
0.017181396484375,
0.039306640625,
-0.0204315185546875,
0.0307769775390625,
0.0195465087890625,
-0.038116455078125,
0.034271240234375,
-0.0129852294921875,
0.0148162841796875,
-0.05645751953125,
0.01043701171875,
0.038238525390625,
0.046142578125,
-0.033355712890625,
-0.0482177734375,
0.0202178955078125,
0.03350830078125,
0.00860595703125,
0.033660888671875,
0.0284881591796875,
0.0182037353515625,
0.06512451171875,
-0.06439208984375,
-0.006526947021484375,
0.003025054931640625,
0.041015625,
-0.026824951171875,
-0.0218658447265625,
-0.0196075439453125,
-0.046112060546875,
-0.0635986328125,
0.00536346435546875,
0.0222930908203125,
0.072998046875,
0.056732177734375,
0.01953125,
-0.02001953125,
-0.051910400390625,
0.01352691650390625,
-0.0023365020751953125,
-0.0014429092407226562,
-0.01096343994140625,
0.029449462890625,
0.018524169921875,
-0.02923583984375,
0.0061492919921875,
0.001659393310546875,
0.0283660888671875,
0.005832672119140625,
0.0299072265625,
0.046875,
-0.005290985107421875,
0.076904296875,
0.0007171630859375,
-0.034027099609375,
-0.0474853515625,
-0.0247955322265625,
0.01457977294921875,
-0.01403045654296875,
0.04547119140625,
-0.020416259765625,
0.02593994140625,
-0.0063323974609375,
0.053680419921875,
-0.0004935264587402344,
-0.01088714599609375,
0.01499176025390625,
-0.014007568359375,
0.049468994140625,
0.018280029296875,
-0.00644683837890625,
-0.004093170166015625,
-0.0411376953125,
-0.00960540771484375,
0.0153961181640625,
0.034454345703125,
0.045654296875,
-0.02142333984375,
0.0116119384765625,
-0.05816650390625,
0.0290985107421875,
0.0447998046875,
0.00460052490234375,
0.04156494140625,
-0.0040283203125,
0.0013065338134765625,
0.0180511474609375,
0.0136566162109375,
0.03717041015625,
0.023193359375,
-0.0006685256958007812,
0.051177978515625,
-0.03350830078125,
-0.0024051666259765625,
-0.030731201171875,
0.031585693359375,
-0.0672607421875,
-0.04144287109375,
0.0379638671875,
-0.019775390625,
-0.015289306640625,
0.00884246826171875,
0.0219573974609375,
-0.02215576171875,
0.08721923828125,
-0.057037353515625,
-0.03204345703125,
0.0022678375244140625,
0.027191162109375,
-0.0528564453125,
0.011749267578125,
-0.027618408203125,
-0.02618408203125,
-0.040802001953125,
-0.034698486328125,
0.02593994140625,
0.0209503173828125,
0.0164642333984375,
0.036346435546875,
0.004840850830078125,
0.0189666748046875,
0.019744873046875,
-0.01708984375,
0.03900146484375,
0.0377197265625,
-0.052459716796875,
-0.0188446044921875,
0.033843994140625,
0.0036106109619140625,
0.0104522705078125,
0.025421142578125,
0.00919342041015625,
0.039825439453125,
-0.01409912109375,
0.002170562744140625,
0.0235748291015625,
0.016937255859375,
-0.0211944580078125,
0.0022525787353515625,
0.023895263671875,
-0.027374267578125,
0.0104827880859375,
-0.06378173828125,
-0.026824951171875,
-0.03546142578125,
-0.01293182373046875,
0.0059661865234375,
-0.01068878173828125,
-0.0283203125,
0.008941650390625,
0.0148773193359375,
0.01690673828125,
-0.00533294677734375,
-0.021453857421875,
0.0182952880859375,
-0.043212890625,
0.01332855224609375,
-0.0192718505859375,
-0.0284271240234375,
0.014923095703125,
-0.0018367767333984375,
-0.031951904296875,
0.0406494140625,
-0.00731658935546875,
-0.0377197265625,
0.0220489501953125,
0.0257568359375,
0.0278778076171875,
-0.028289794921875,
0.0015287399291992188,
0.059112548828125,
0.049163818359375,
0.09979248046875,
0.029327392578125,
-0.0087127685546875,
0.0311737060546875,
-0.0016851425170898438,
-0.054779052734375,
-0.0528564453125,
0.033233642578125,
-0.040618896484375,
-0.032501220703125,
0.006839752197265625,
0.005657196044921875,
0.017547607421875,
-0.043212890625,
-0.05474853515625,
0.044036865234375,
-0.005512237548828125,
-0.03753662109375,
-0.07501220703125,
-0.00879669189453125,
0.0214691162109375,
-0.0195770263671875,
-0.029541015625,
-0.008331298828125,
-0.063232421875,
0.0171966552734375,
0.0108795166015625,
0.025543212890625,
0.005611419677734375,
0.0031490325927734375,
-0.08953857421875,
0.00560760498046875,
-0.0247650146484375,
0.01580810546875,
0.0177764892578125,
-0.02001953125,
0.0148162841796875,
0.018524169921875,
-0.076171875,
-0.0286102294921875,
-0.0173492431640625,
0.048675537109375,
0.02923583984375,
-0.04949951171875,
-0.038848876953125,
-0.03216552734375,
0.01303863525390625,
0.01477813720703125,
0.006561279296875,
-0.0102691650390625,
-0.046783447265625,
-0.00988006591796875,
-0.03741455078125,
-0.0012521743774414062,
0.0355224609375,
-0.062255859375,
0.0124664306640625,
0.007274627685546875,
-0.0094451904296875,
0.008209228515625,
-0.0099029541015625,
-0.050048828125,
-0.0152130126953125,
-0.032806396484375,
-0.01511383056640625,
-0.03485107421875,
0.0716552734375,
-0.055389404296875,
0.00414276123046875,
-0.0204010009765625,
-0.041259765625,
-0.0160980224609375,
-0.0565185546875,
-0.03192138671875,
-0.020416259765625,
0.0121612548828125,
-0.00885772705078125,
0.00835418701171875,
0.0042877197265625,
0.003055572509765625,
-0.01090240478515625,
0.0168914794921875,
0.006427764892578125,
0.0174102783203125,
-0.00971221923828125,
-0.007843017578125,
-0.0279083251953125,
0.056671142578125,
-0.0215606689453125,
0.09869384765625,
0.0052337646484375,
0.03216552734375,
-0.0084228515625,
0.055206298828125,
-0.0013036727905273438,
-0.01947021484375,
0.011444091796875,
-0.0247802734375,
0.0035305023193359375,
-0.00527191162109375,
-0.01308441162109375,
-0.00021898746490478516,
0.00341033935546875,
0.0173492431640625,
-0.0182952880859375,
0.005535125732421875
]
|
6836f574e6feaf7745579028044d808c7ac48630 | Wordpress Stackexchange
Q: When and Where is `global $post` Set and Available? Usually when people think of the global $post object it's assumed that it's actually set whenever you enter The Loop. I started to play around with how early I could actually call global $post which looks like:
before wp_head() in most header.php files
before template_redirect action
after plugins_loaded
So my question is, what's the earliest I have access to global $post?
A: Global $post var is set by WP::register_globals() method.
It is called by WP::main() method, on its turn called by wp() function that is called when wp-blog-header.php is loaded.
If you look at the graph @Rarst built, on the left, you can see where wp() function is called.
In terms of hooks, global post variable is set just before "wp" hook runs, so that is first hook to be safely used to check it.
| Q: When and Where is `global $post` Set and Available? Usually when people think of the global $post object it's assumed that it's actually set whenever you enter The Loop. I started to play around with how early I could actually call global $post which looks like:
before wp_head() in most header.php files
before template_redirect action
after plugins_loaded
So my question is, what's the earliest I have access to global $post?
A: Global $post var is set by WP::register_globals() method.
It is called by WP::main() method, on its turn called by wp() function that is called when wp-blog-header.php is loaded.
If you look at the graph @Rarst built, on the left, you can see where wp() function is called.
In terms of hooks, global post variable is set just before "wp" hook runs, so that is first hook to be safely used to check it.
A: the $wp global object is initialized in wp-class.php,
I just read an article that explains the wp init process,
I think the global $post variale gets defined and can be called after wp-setting.php...
let me know, regards
| wordpress | {
"language": "en",
"length": 183,
"provenance": "stackexchange_00019.jsonl.gz:449716",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165641"
} | [
0.0225677490234375,
-0.0216827392578125,
-0.001575469970703125,
0.007389068603515625,
-0.00975799560546875,
-0.00043487548828125,
0.0245208740234375,
-0.0273895263671875,
-0.0012598037719726562,
-0.01351165771484375,
-0.05908203125,
0.00022399425506591797,
-0.039886474609375,
-0.01557159423828125,
0.01406097412109375,
-0.050140380859375,
0.055084228515625,
-0.060333251953125,
0.017181396484375,
-0.002826690673828125,
0.01806640625,
0.031768798828125,
0.043365478515625,
0.04241943359375,
0.032379150390625,
-0.0228271484375,
0.00971221923828125,
-0.00431060791015625,
0.0064697265625,
-0.023406982421875,
0.01380157470703125,
0.0029087066650390625,
0.0267486572265625,
0.0200347900390625,
-0.0209808349609375,
0.01824951171875,
-0.0005064010620117188,
0.0085906982421875,
0.0179595947265625,
0.01074981689453125,
0.0092315673828125,
-0.017364501953125,
0.02337646484375,
0.017578125,
-0.0012578964233398438,
-0.032867431640625,
0.00897216796875,
-0.0460205078125,
0.032440185546875,
-0.00408172607421875,
-0.0032196044921875,
0.014495849609375,
0.0015869140625,
-0.00714111328125,
-0.0119781494140625,
-0.0105743408203125,
0.0291595458984375,
-0.002346038818359375,
0.057891845703125,
-0.0107269287109375,
-0.0633544921875,
-0.046722412109375,
0.0272674560546875,
-0.061767578125,
0.0252838134765625,
0.0128326416015625,
0.0165557861328125,
0.0390625,
-0.07318115234375,
-0.0020771026611328125,
0.02093505859375,
-0.04876708984375,
-0.0273895263671875,
-0.0255126953125,
0.01036834716796875,
-0.01727294921875,
0.0269927978515625,
-0.04034423828125,
-0.0165557861328125,
0.031463623046875,
-0.0040130615234375,
0.0065765380859375,
-0.0170135498046875,
-0.005889892578125,
-0.005889892578125,
0.007335662841796875,
-0.01396942138671875,
-0.0148468017578125,
-0.025360107421875,
-0.0684814453125,
-0.02728271484375,
0.052764892578125,
-0.04632568359375,
-0.046875,
-0.055450439453125,
-0.01087188720703125,
0.025115966796875,
0.05535888671875,
-0.045867919921875,
-0.0261383056640625,
-0.0207977294921875,
-0.00853729248046875,
-0.0012722015380859375,
-0.0206298828125,
-0.0053253173828125,
-0.01535797119140625,
0.007091522216796875,
-0.0228271484375,
0.005970001220703125,
0.02227783203125,
-0.041717529296875,
-0.002628326416015625,
0.01953125,
0.016937255859375,
-0.06219482421875,
-0.0430908203125,
-0.048828125,
0.00424957275390625,
0.00913238525390625,
0.0274658203125,
0.0174407958984375,
0.033233642578125,
-0.0095672607421875,
-0.00664520263671875,
0.0017690658569335938,
-0.00420379638671875,
-0.0259857177734375,
-0.0193328857421875,
-0.029296875,
0.0482177734375,
-0.0016574859619140625,
-0.0009169578552246094,
0.01654052734375,
0.005748748779296875,
-0.038360595703125,
-0.0161895751953125,
-0.01552581787109375,
-0.01174163818359375,
-0.019989013671875,
0.01812744140625,
-0.0160064697265625,
-0.0526123046875,
-0.004062652587890625,
0.006572723388671875,
0.03594970703125,
0.041534423828125,
0.0201568603515625,
-0.00490570068359375,
-0.004055023193359375,
-0.037872314453125,
-0.001644134521484375,
0.0013103485107421875,
-0.0037384033203125,
0.03680419921875,
0.0285186767578125,
-0.00579833984375,
0.061309814453125,
-0.040618896484375,
-0.0184783935546875,
-0.0244598388671875,
-0.0007939338684082031,
-0.006580352783203125,
-0.0033130645751953125,
-0.03472900390625,
-0.05535888671875,
0.006717681884765625,
0.0008325576782226562,
0.004665374755859375,
0.01666259765625,
0.006195068359375,
0.0290069580078125,
0.032196044921875,
-0.0012941360473632812,
0.0059661865234375,
0.01329803466796875,
-0.0197601318359375,
-0.03436279296875,
-0.038848876953125,
0.040618896484375,
0.007083892822265625,
-0.017486572265625,
-0.0173797607421875,
-0.005748748779296875,
0.010162353515625,
-0.028656005859375,
-0.0007023811340332031,
0.01506805419921875,
0.0142364501953125,
0.0195159912109375,
0.018280029296875,
0.016571044921875,
0.01390838623046875,
-0.031982421875,
0.035491943359375,
0.00563812255859375,
0.00232696533203125,
-0.054718017578125,
0.007526397705078125,
-0.00959014892578125,
-0.036376953125,
0.01268768310546875,
0.0059814453125,
-0.01482391357421875,
-0.0184783935546875,
-0.07037353515625,
-0.0283050537109375,
-0.0192718505859375,
0.0278472900390625,
0.00870513916015625,
-0.028167724609375,
0.00896453857421875,
-0.039276123046875,
0.0285797119140625,
-0.087158203125,
-0.067138671875,
0.036712646484375,
-0.04736328125,
0.06866455078125,
-0.004421234130859375,
0.06890869140625,
0.0087432861328125,
-0.07391357421875,
-0.002185821533203125,
-0.032867431640625,
0.040496826171875,
0.030853271484375,
-0.0255584716796875,
-0.006443023681640625,
0.02740478515625,
0.034820556640625,
-0.041656494140625,
0.00862884521484375,
-0.0309906005859375,
-0.018646240234375,
-0.031585693359375,
-0.003955841064453125,
-0.0158843994140625,
-0.0234832763671875,
0.007659912109375,
0.040740966796875,
0.0287628173828125,
0.044342041015625,
0.007213592529296875,
0.0272369384765625,
0.0102691650390625,
-0.043792724609375,
0.017547607421875,
-0.0185699462890625,
0.035858154296875,
0.0809326171875,
0.006649017333984375,
0.00231170654296875,
-0.00537872314453125,
-0.029052734375,
0.021759033203125,
0.00748443603515625,
-0.01361083984375,
-0.0270843505859375,
-0.005130767822265625,
0.0193023681640625,
-0.006481170654296875,
-0.05902099609375,
-0.041839599609375,
-0.02813720703125,
0.05621337890625,
-0.03863525390625,
0.0235748291015625,
-0.0007905960083007812,
-0.03338623046875,
-0.0153045654296875,
0.032012939453125,
0.0204315185546875,
-0.0020961761474609375,
-0.008544921875,
0.00424957275390625,
-0.0083770751953125,
-0.01910400390625,
0.01131439208984375,
0.003803253173828125,
-0.0244903564453125,
-0.037200927734375,
-0.027008056640625,
-0.03350830078125,
-0.0081634521484375,
0.0029315948486328125,
-0.031768798828125,
0.033050537109375,
0.01806640625,
0.0491943359375,
-0.002971649169921875,
0.0302734375,
-0.007137298583984375,
-0.054534912109375,
0.079345703125,
-0.0246429443359375,
-0.051483154296875,
-0.032958984375,
-0.0298309326171875,
0.02520751953125,
-0.019561767578125,
0.0323486328125,
0.0714111328125,
0.0303497314453125,
-0.0016393661499023438,
0.002063751220703125,
0.022369384765625,
0.0214080810546875,
-0.01372528076171875,
-0.01168060302734375,
-0.011749267578125,
-0.020721435546875,
0.0179443359375,
0.01065826416015625,
0.03436279296875,
-0.0467529296875,
-0.062347412109375,
-0.0299530029296875,
-0.017120361328125,
-0.11572265625,
-0.0657958984375,
-0.028961181640625,
-0.059295654296875,
0.0221710205078125,
-0.01375579833984375,
-0.0189208984375,
-0.01522064208984375,
0.0026092529296875,
0.01483917236328125,
-0.0152130126953125,
-0.01177215576171875,
-0.05535888671875,
-0.064697265625,
-0.0804443359375,
-0.041778564453125,
-0.0123748779296875,
0.0085906982421875,
-0.01509857177734375,
0.0909423828125,
-0.01221466064453125,
-0.044036865234375,
-0.034881591796875,
-0.0173797607421875,
-0.011474609375,
-0.019744873046875,
0.005767822265625,
-0.0340576171875,
0.005908966064453125,
-0.00409698486328125,
-0.0300140380859375,
0.01381683349609375,
0.00213623046875,
-0.0181884765625,
0.0187225341796875,
-0.0089874267578125,
0.006977081298828125,
0.040496826171875,
-0.0027675628662109375,
-0.053741455078125,
-0.008087158203125,
-0.07232666015625,
-0.0048065185546875,
-0.002971649169921875,
-0.03192138671875,
-0.0289306640625,
0.01311492919921875,
-0.006282806396484375,
-0.0206146240234375,
0.00389862060546875,
-0.0257568359375,
-0.027740478515625,
0.0308990478515625,
-0.05035400390625,
0.07073974609375,
-0.006816864013671875,
-0.0100250244140625,
-0.02117919921875,
0.0034942626953125,
-0.00832366943359375,
-0.01001739501953125,
-0.007770538330078125,
0.007617950439453125,
-0.0243377685546875,
0.0240478515625,
-0.042205810546875,
-0.0167236328125,
0.04815673828125,
0.04248046875,
0.025299072265625,
-0.00675201416015625,
-0.045196533203125,
-0.0161590576171875,
0.057708740234375,
-0.0325927734375,
-0.001201629638671875,
-0.0011682510375976562,
0.000453948974609375,
-0.051361083984375,
-0.0555419921875,
-0.049896240234375,
0.003574371337890625,
-0.09814453125,
0.0300140380859375,
0.003040313720703125,
0.0036373138427734375,
-0.035491943359375,
0.0633544921875,
-0.064208984375,
-0.053863525390625,
0.00927734375,
-0.04718017578125,
-0.0014390945434570312,
0.029815673828125,
-0.0323486328125,
0.0099639892578125,
-0.00384521484375,
-0.045166015625,
-0.07080078125,
-0.004852294921875,
-0.0010051727294921875,
0.03173828125,
0.029815673828125,
-0.0645751953125,
-0.01428985595703125,
0.003139495849609375,
0.043487548828125,
0.033447265625,
-0.0034580230712890625,
-0.0308990478515625,
0.0264129638671875,
-0.0197296142578125,
0.007488250732421875,
-0.01091766357421875,
-0.0018701553344726562,
0.02728271484375,
-0.042388916015625,
0.051849365234375,
-0.00841522216796875,
-0.00899505615234375,
0.04498291015625,
-0.0460205078125,
-0.0302734375,
0.001373291015625,
-0.0201568603515625,
0.03778076171875,
-0.019866943359375,
0.00982666015625,
-0.0230865478515625,
-0.062744140625,
0.050384521484375,
0.0247039794921875,
-0.024810791015625,
-0.0010747909545898438,
0.058013916015625,
0.029510498046875,
-0.023468017578125,
-0.015716552734375,
0.0012464523315429688,
0.0265960693359375,
-0.00487518310546875,
0.0184326171875,
0.00571441650390625,
-0.0086212158203125,
0.002521514892578125,
0.00608062744140625,
-0.0024356842041015625,
-0.026397705078125,
0.03656005859375,
0.01152801513671875,
-0.01259613037109375,
0.00931549072265625,
-0.0053863525390625,
0.0305633544921875,
0.0178680419921875,
-0.011322021484375,
-0.0193023681640625,
0.0157012939453125,
0.03472900390625,
-0.0477294921875,
0.05572509765625,
-0.025604248046875,
-0.0102386474609375,
0.0006279945373535156,
0.007381439208984375,
0.044097900390625,
0.0232696533203125,
0.0176239013671875,
-0.00283050537109375,
0.0158233642578125,
0.0163421630859375,
0.03265380859375,
-0.0172576904296875,
0.012969970703125,
0.0158843994140625,
0.035125732421875,
0.01105499267578125,
0.0328369140625,
-0.00946807861328125,
0.042388916015625,
0.0016937255859375,
-0.038665771484375,
0.014739990234375,
-0.005764007568359375,
0.0635986328125,
0.019287109375,
-0.05535888671875,
0.0300140380859375,
0.05487060546875,
-0.0271759033203125,
0.00803375244140625,
-0.033782958984375,
0.01485443115234375,
-0.043731689453125,
0.039398193359375,
0.0181732177734375,
0.00560760498046875,
-0.0037174224853515625,
0.08251953125,
0.013946533203125,
0.032318115234375,
-0.0217437744140625,
0.04608154296875,
0.0301513671875,
0.01461029052734375,
0.029693603515625,
0.0033626556396484375,
0.005519866943359375,
-0.01421356201171875,
-0.0224456787109375,
-0.04290771484375,
-0.041412353515625,
0.0006098747253417969,
0.039581298828125,
-0.021240234375,
0.01000213623046875,
0.021514892578125,
0.02105712890625,
-0.01372528076171875,
0.03973388671875,
0.03485107421875,
-0.03656005859375,
0.0013666152954101562,
0.0236053466796875,
0.02740478515625,
-0.0157012939453125,
-0.0010042190551757812,
0.01336669921875,
-0.023345947265625,
0.0269622802734375,
-0.017242431640625,
-0.0051116943359375,
0.0032901763916015625,
-0.0009050369262695312,
-0.0302276611328125,
-0.0187530517578125,
-0.0018205642700195312,
-0.0014743804931640625,
0.007381439208984375,
-0.028228759765625,
-0.02362060546875,
0.047637939453125,
-0.0246429443359375,
0.0430908203125,
-0.00860595703125,
-0.033599853515625,
-0.00656890869140625,
0.01334381103515625,
0.058319091796875,
0.04461669921875,
-0.06982421875,
0.0023345947265625,
-0.0215606689453125,
-0.005641937255859375,
0.0067138671875,
-0.0201416015625,
-0.057220458984375,
0.0004220008850097656,
0.017852783203125,
-0.00653076171875,
-0.0036029815673828125,
-0.044921875,
-0.003932952880859375,
0.0211181640625,
0.035308837890625,
0.016754150390625,
-0.00048613548278808594,
0.04864501953125,
-0.0164031982421875,
0.016815185546875,
0.0106658935546875,
0.0197906494140625,
0.0018644332885742188,
-0.0269622802734375,
0.007843017578125,
-0.041229248046875,
-0.00260162353515625,
-0.024322509765625,
0.0016021728515625,
0.009429931640625,
0.040374755859375,
0.0007476806640625,
-0.0086517333984375,
0.01134490966796875,
0.017852783203125,
-0.0017518997192382812,
-0.02093505859375,
0.015899658203125,
-0.057891845703125,
0.06756591796875,
-0.014739990234375,
-0.016876220703125,
0.0042572021484375,
-0.02728271484375,
0.044830322265625,
-0.006290435791015625,
0.025970458984375,
0.002887725830078125,
-0.06951904296875,
0.08477783203125,
0.11090087890625,
0.025482177734375,
0.056060791015625,
0.0220947265625,
0.00662994384765625,
0.007755279541015625,
0.0372314453125,
-0.038787841796875,
-0.05548095703125,
0.017333984375,
0.01047515869140625,
-0.0201416015625,
0.01480865478515625,
-0.021636962890625,
0.007129669189453125,
0.0219268798828125,
0.06524658203125,
-0.023193359375,
0.0111541748046875,
0.04962158203125,
-0.003345489501953125,
0.017791748046875,
0.01235198974609375,
-0.0236358642578125,
-0.00792694091796875,
0.03680419921875,
-0.03802490234375,
-0.01026153564453125,
0.03411865234375,
0.00608062744140625,
-0.00028204917907714844,
-0.01739501953125,
0.051422119140625,
0.0265655517578125,
-0.046417236328125,
0.05340576171875,
0.0260772705078125,
0.0248870849609375,
-0.03363037109375,
0.01412200927734375,
-0.00791168212890625,
-0.018280029296875,
-0.055694580078125,
0.0138397216796875,
-0.007160186767578125,
-0.003620147705078125,
0.009674072265625,
-0.0207672119140625,
0.0014705657958984375,
0.030364990234375,
-0.0186004638671875,
0.0194091796875,
-0.0078582763671875,
-0.038787841796875,
-0.06158447265625,
-0.0095977783203125,
0.0268402099609375,
0.06304931640625,
-0.0226898193359375,
0.044708251953125,
-0.0124053955078125,
-0.01593017578125,
-0.005779266357421875,
-0.0085296630859375,
0.0282440185546875,
0.0002779960632324219,
-0.022796630859375,
0.0255584716796875,
0.01256561279296875,
-0.00377655029296875,
-0.00835418701171875,
-0.024658203125,
-0.006061553955078125,
0.038330078125,
-0.023651123046875,
0.0161590576171875,
-0.00917816162109375,
-0.021026611328125,
-0.0615234375,
0.06842041015625,
-0.024261474609375,
0.0235595703125,
0.01055145263671875,
0.01444244384765625,
-0.0094757080078125,
-0.0014638900756835938,
-0.065185546875,
0.0411376953125,
-0.008575439453125,
0.094970703125,
-0.08758544921875,
-0.0013942718505859375,
0.0267486572265625,
0.043914794921875,
0.030792236328125,
-0.0016040802001953125,
0.0163726806640625,
-0.02142333984375,
0.0206298828125,
0.0556640625,
0.003414154052734375,
-0.0108489990234375,
0.03472900390625,
0.03759765625,
0.0034275054931640625,
-0.027435302734375,
0.0304107666015625,
-0.058135986328125,
-0.004489898681640625,
0.04644775390625,
-0.002475738525390625,
-0.032073974609375,
0.047027587890625,
0.005031585693359375,
-0.0200958251953125,
0.0231781005859375,
0.01229095458984375,
0.0156402587890625,
-0.0073699951171875,
0.031585693359375,
0.01800537109375,
-0.00896453857421875,
-0.0517578125,
-0.00616455078125,
0.037109375,
0.01041412353515625,
0.006561279296875,
0.027618408203125,
0.0163116455078125,
0.0130462646484375,
-0.01507568359375,
-0.00013077259063720703,
0.0227813720703125,
-0.0328369140625,
0.081787109375,
0.0296173095703125,
0.0264434814453125,
-0.0517578125,
0.0170440673828125,
0.033477783203125,
0.08245849609375,
-0.05755615234375,
-0.01488494873046875,
0.01324462890625,
0.01096343994140625,
-0.038330078125,
-0.028045654296875,
-0.03680419921875,
-0.017364501953125,
0.0159912109375,
-0.0198822021484375,
-0.01476287841796875,
0.0237884521484375,
0.0367431640625,
0.01495361328125,
0.030181884765625,
-0.056854248046875,
-0.039215087890625,
-0.0256805419921875,
-0.0213165283203125,
0.0127105712890625,
0.0758056640625,
0.025604248046875,
0.046661376953125,
-0.035247802734375,
-0.0281982421875,
0.0020198822021484375,
0.01282501220703125,
-0.008880615234375,
0.01371002197265625,
-0.0295867919921875,
-0.031982421875,
0.006072998046875,
0.043609619140625,
0.0328369140625,
-0.0240631103515625,
0.032318115234375,
0.002361297607421875,
-0.070068359375,
-0.005123138427734375,
-0.00039649009704589844,
-0.029876708984375,
0.003589630126953125,
0.0120391845703125,
-0.045623779296875,
-0.034820556640625,
-0.041900634765625,
-0.0173797607421875,
0.05291748046875,
-0.038970947265625,
-0.040618896484375,
0.036865234375,
0.0068206787109375,
-0.032623291015625,
0.054779052734375,
-0.01248931884765625,
0.09661865234375,
0.0022640228271484375,
0.0122833251953125,
0.0189208984375,
-0.045928955078125,
-0.0860595703125,
0.0338134765625,
0.04376220703125,
-0.004581451416015625,
-0.0084991455078125,
0.01898193359375,
-0.026519775390625,
0.04266357421875,
-0.0067596435546875,
-0.00945281982421875,
0.0162506103515625,
0.03643798828125,
-0.0031185150146484375,
-0.05377197265625,
-0.035064697265625,
-0.02020263671875,
0.035125732421875,
0.00814056396484375,
0.0230712890625,
0.01232147216796875,
0.03704833984375,
-0.022003173828125,
0.0262908935546875,
-0.0250396728515625,
-0.00589752197265625,
-0.0028514862060546875,
0.0184783935546875,
0.0247344970703125,
-0.010345458984375,
-0.060394287109375,
0.0189361572265625,
0.0288543701171875,
-0.00782012939453125,
0.051177978515625,
-0.04718017578125,
0.016510009765625,
-0.029449462890625,
0.022186279296875,
-0.0240631103515625,
-0.033660888671875,
-0.048675537109375,
-0.01171875,
0.03179931640625,
0.021636962890625,
-0.0098876953125,
0.01605224609375,
-0.042816162109375,
-0.043304443359375,
0.0193023681640625,
-0.0304107666015625,
-0.0132293701171875,
0.022430419921875,
0.00891876220703125,
-0.0062103271484375,
-0.0163726806640625,
-0.037139892578125,
0.00243377685546875,
0.01386260986328125,
0.0006241798400878906,
-0.0168914794921875,
0.0076446533203125,
-0.00859832763671875,
0.0008368492126464844,
0.04248046875,
-0.013671875,
0.006938934326171875,
0.0121002197265625,
-0.0006704330444335938,
-0.03173828125,
-0.0133819580078125,
-0.02178955078125,
-0.0307159423828125,
-0.0181121826171875,
0.007236480712890625,
-0.023468017578125,
-0.055938720703125,
-0.032745361328125,
-0.007450103759765625,
0.0204010009765625,
-0.01119232177734375,
-0.0249176025390625,
-0.01241302490234375,
-0.0220794677734375,
0.058868408203125,
-0.017242431640625,
0.00971221923828125,
0.008575439453125,
0.005054473876953125,
-0.044189453125,
0.0233306884765625,
-0.0278167724609375,
-0.01473236083984375,
0.0113677978515625,
0.0232696533203125,
0.049407958984375,
-0.031341552734375,
-0.00975799560546875,
0.025146484375,
0.0203399658203125,
0.06964111328125,
-0.006916046142578125,
-0.023468017578125,
0.034637451171875,
0.00649261474609375,
0.0060882568359375,
-0.07073974609375,
-0.017822265625,
-0.059814453125,
0.03399658203125,
-0.03851318359375,
0.01461029052734375,
0.004627227783203125,
-0.039215087890625,
-0.05877685546875,
0.0418701171875,
-0.0195159912109375,
-0.027374267578125,
-0.049652099609375,
0.006458282470703125,
0.0194549560546875,
0.007030487060546875,
-0.0037841796875,
-0.04266357421875,
-0.047454833984375,
0.00274658203125,
-0.00359344482421875,
0.011444091796875,
0.050506591796875,
-0.0284881591796875,
-0.03363037109375,
-0.030731201171875,
-0.030609130859375,
-0.00140380859375,
0.0232696533203125,
-0.02239990234375,
0.05126953125,
0.0372314453125,
-0.03424072265625,
0.04095458984375,
0.0199737548828125,
0.00801849365234375,
-0.01206207275390625,
-0.0411376953125,
-0.0159912109375,
-0.0014019012451171875,
0.07647705078125,
0.0224609375,
0.01490020751953125,
-0.042236328125,
0.0022258758544921875,
0.00345611572265625,
-0.11297607421875,
0.007007598876953125,
0.05859375,
-0.0504150390625,
0.022247314453125,
-0.0017337799072265625,
-0.0015134811401367188,
0.00807952880859375,
-0.043609619140625,
-0.0192413330078125,
-0.01433563232421875,
-0.0311431884765625,
-0.008087158203125,
0.032745361328125,
-0.06396484375,
0.0297088623046875,
-0.0157470703125,
-0.01079559326171875,
0.01424407958984375,
0.032196044921875,
-0.004932403564453125,
0.05596923828125,
0.0221405029296875,
0.05987548828125,
-0.07940673828125,
0.0020771026611328125,
0.0037517547607421875,
-0.011077880859375,
-0.055023193359375,
-0.004558563232421875,
-0.02362060546875,
0.0185699462890625,
0.0018939971923828125,
0.00794219970703125,
0.0121307373046875,
0.03857421875,
0.0040130615234375,
0.053192138671875,
0.0038928985595703125,
0.005443572998046875,
0.0123443603515625,
0.026611328125,
-0.0251007080078125,
-0.002140045166015625,
-0.00525665283203125,
-0.02471923828125,
-0.00502777099609375,
-0.0033512115478515625,
-0.00359344482421875,
-0.0273284912109375,
0.00713348388671875,
-0.01013946533203125,
0.00795745849609375,
0.0143585205078125
]
|
ed55f8f5b5ed4223fa277b0f19fc5863f2e12262 | Wordpress Stackexchange
Q: Post slugs and images cannot have same name? If I go to Media Library and upload an image called apple-pie.jpg
And then I create a post called www.domain.com/apple-pie/
The link does NOT take me to the post. Instead the link will take me to a page displaying the media (In other words, it uses a page template instead of single.php)
So does Wordpress NOT allow images and post slugs to be the same? How do I fix this problem? Do I have to rename all of my images?
A: WordPress uses the attachment filename to create the attachment post slug.
If your file was named something else, there would not be any conflicts.
If you have your post permalinks set to /%postname%/ , and you upload an image FIRST, and then create a post SECOND, then WordPress has to make a choice between the two when someone tries to access the Permalink.
To solve the issue, you would either have to change your permalink structure OR change the name of either the post or the attachment.
| Q: Post slugs and images cannot have same name? If I go to Media Library and upload an image called apple-pie.jpg
And then I create a post called www.domain.com/apple-pie/
The link does NOT take me to the post. Instead the link will take me to a page displaying the media (In other words, it uses a page template instead of single.php)
So does Wordpress NOT allow images and post slugs to be the same? How do I fix this problem? Do I have to rename all of my images?
A: WordPress uses the attachment filename to create the attachment post slug.
If your file was named something else, there would not be any conflicts.
If you have your post permalinks set to /%postname%/ , and you upload an image FIRST, and then create a post SECOND, then WordPress has to make a choice between the two when someone tries to access the Permalink.
To solve the issue, you would either have to change your permalink structure OR change the name of either the post or the attachment.
| wordpress | {
"language": "en",
"length": 177,
"provenance": "stackexchange_00019.jsonl.gz:449722",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165651"
} | [
0.048126220703125,
0.0316162109375,
-0.00199127197265625,
0.0154571533203125,
0.0166778564453125,
-0.0225830078125,
0.055450439453125,
-0.06732177734375,
-0.0279693603515625,
0.0309600830078125,
0.0219268798828125,
0.0310211181640625,
0.0087127685546875,
-0.040313720703125,
0.026885986328125,
0.019927978515625,
0.0220794677734375,
-0.00368499755859375,
0.0065155029296875,
-0.02740478515625,
0.0006608963012695312,
0.0065460205078125,
-0.00585174560546875,
0.0235748291015625,
0.00931549072265625,
-0.00467681884765625,
0.0350341796875,
-0.016632080078125,
-0.002605438232421875,
-0.025909423828125,
0.00754547119140625,
0.020843505859375,
0.0271148681640625,
0.004367828369140625,
-0.014404296875,
0.01239013671875,
0.0184783935546875,
-0.0030803680419921875,
-0.0082550048828125,
0.0239715576171875,
0.0027141571044921875,
0.01203155517578125,
0.0309600830078125,
0.01383209228515625,
0.004009246826171875,
-0.0252685546875,
-0.00807952880859375,
-0.06536865234375,
0.0296630859375,
0.01261138916015625,
0.0175628662109375,
-0.0188140869140625,
0.01324462890625,
0.0232086181640625,
-0.01215362548828125,
-0.0027294158935546875,
-0.0199737548828125,
0.041229248046875,
0.019439697265625,
-0.031890869140625,
-0.036224365234375,
0.004978179931640625,
0.023590087890625,
0.013458251953125,
0.0205841064453125,
0.0017042160034179688,
0.03887939453125,
0.0231781005859375,
-0.020599365234375,
0.01898193359375,
0.0170745849609375,
-0.0225830078125,
-0.0017795562744140625,
-0.0362548828125,
0.010406494140625,
-0.0011348724365234375,
-0.017364501953125,
-0.031768798828125,
0.0056915283203125,
0.010162353515625,
0.0101318359375,
-0.03729248046875,
-0.005825042724609375,
-0.018096923828125,
0.01428985595703125,
0.01535797119140625,
-0.004978179931640625,
-0.006748199462890625,
-0.01197052001953125,
-0.0163116455078125,
-0.0174713134765625,
-0.0298004150390625,
-0.0191802978515625,
0.035003662109375,
-0.0016431808471679688,
-0.00921630859375,
0.0145721435546875,
0.0217132568359375,
0.0131378173828125,
0.03363037109375,
-0.0161895751953125,
-0.03765869140625,
0.032501220703125,
-0.0302276611328125,
0.002124786376953125,
0.03143310546875,
0.01335906982421875,
0.042633056640625,
0.059051513671875,
0.00408935546875,
-0.005748748779296875,
0.05657958984375,
0.00623321533203125,
-0.027435302734375,
0.0078582763671875,
0.0360107421875,
-0.01727294921875,
0.04315185546875,
0.00026679039001464844,
0.03631591796875,
-0.03350830078125,
-0.00864410400390625,
0.031494140625,
0.00978851318359375,
0.039031982421875,
0.0552978515625,
-0.0016231536865234375,
-0.045501708984375,
-0.01299285888671875,
0.034423828125,
-0.0194091796875,
-0.004566192626953125,
0.0280914306640625,
0.02789306640625,
0.00046825408935546875,
-0.0210418701171875,
-0.0172119140625,
-0.0285797119140625,
-0.04803466796875,
0.03509521484375,
-0.00965118408203125,
-0.025482177734375,
0.0184326171875,
-0.031585693359375,
0.01029205322265625,
0.034149169921875,
0.01045989990234375,
0.00412750244140625,
0.0115814208984375,
-0.03314208984375,
-0.01904296875,
-0.039581298828125,
0.0148773193359375,
0.017059326171875,
-0.003063201904296875,
-0.02105712890625,
0.008544921875,
-0.0138397216796875,
0.0186309814453125,
-0.02130126953125,
0.017547607421875,
0.0130615234375,
0.04541015625,
-0.02508544921875,
-0.034820556640625,
-0.01125335693359375,
-0.08367919921875,
-0.0161285400390625,
0.0090789794921875,
-0.006103515625,
-0.0333251953125,
0.0247955322265625,
-0.005603790283203125,
-0.00890350341796875,
-0.0029888153076171875,
0.001377105712890625,
0.005870819091796875,
0.002201080322265625,
0.0182647705078125,
0.07513427734375,
0.02520751953125,
-0.00946044921875,
0.043914794921875,
-0.01010894775390625,
-0.0848388671875,
0.032989501953125,
-0.01197052001953125,
0.0261993408203125,
0.035736083984375,
-0.01079559326171875,
0.0758056640625,
0.017913818359375,
-0.0301361083984375,
0.0458984375,
-0.0242156982421875,
-0.044830322265625,
0.023895263671875,
0.0135498046875,
-0.00788116455078125,
-0.01153564453125,
-0.01727294921875,
0.044403076171875,
-0.04736328125,
0.043548583984375,
0.0004265308380126953,
0.00024068355560302734,
0.010162353515625,
0.0208587646484375,
-0.03790283203125,
0.038726806640625,
0.03753662109375,
0.0330810546875,
-0.045257568359375,
-0.0066680908203125,
0.0169219970703125,
0.0003533363342285156,
-0.013519287109375,
-0.03228759765625,
-0.044158935546875,
0.032958984375,
-0.06390380859375,
-0.026580810546875,
-0.075439453125,
0.01593017578125,
0.0234527587890625,
0.03192138671875,
-0.0201416015625,
0.0027618408203125,
-0.00753021240234375,
0.0243988037109375,
-0.0511474609375,
0.0185546875,
-0.007137298583984375,
-0.0179290771484375,
-0.0230712890625,
0.01220703125,
0.0145111083984375,
-0.0302276611328125,
-0.00116729736328125,
0.0311431884765625,
0.0228118896484375,
0.0552978515625,
-0.0029659271240234375,
-0.003055572509765625,
0.041473388671875,
-0.01250457763671875,
0.02020263671875,
-0.0143890380859375,
-0.002902984619140625,
0.032470703125,
0.02557373046875,
0.0169677734375,
0.005096435546875,
-0.036468505859375,
0.00382232666015625,
0.03204345703125,
-0.009765625,
-0.049591064453125,
0.00308990478515625,
0.0367431640625,
0.01898193359375,
0.021820068359375,
-0.0271148681640625,
0.0114288330078125,
-0.054229736328125,
0.043060302734375,
0.003643035888671875,
0.007091522216796875,
-0.03466796875,
0.022186279296875,
0.02532958984375,
0.00872039794921875,
-0.005870819091796875,
0.0207977294921875,
0.06829833984375,
-0.0202178955078125,
-0.0244598388671875,
-0.013641357421875,
0.0246124267578125,
0.007076263427734375,
-0.032440185546875,
-0.0159912109375,
-0.01410675048828125,
-0.0081787109375,
-0.016632080078125,
-0.0860595703125,
0.033447265625,
0.01445770263671875,
-0.01129913330078125,
-0.003726959228515625,
0.009429931640625,
0.049591064453125,
0.008636474609375,
0.025543212890625,
0.02337646484375,
-0.00345611572265625,
0.01593017578125,
-0.0193023681640625,
0.01436614990234375,
-0.007106781005859375,
0.0653076171875,
0.06976318359375,
-0.004077911376953125,
0.02642822265625,
-0.0244293212890625,
-0.0215301513671875,
-0.0333251953125,
0.005344390869140625,
-0.0254058837890625,
-0.06964111328125,
-0.008148193359375,
0.02655029296875,
0.0182342529296875,
0.036346435546875,
-0.00597381591796875,
-0.0278472900390625,
-0.00888824462890625,
0.0174560546875,
-0.07977294921875,
-0.0887451171875,
-0.00876617431640625,
-0.0287933349609375,
0.0465087890625,
0.0187835693359375,
0.0012178421020507812,
-0.040130615234375,
0.043853759765625,
0.01641845703125,
-0.00977325439453125,
-0.00406646728515625,
-0.0289459228515625,
-0.036590576171875,
-0.02392578125,
-0.0161285400390625,
-0.0017681121826171875,
-0.004955291748046875,
0.001506805419921875,
0.009552001953125,
0.0026683807373046875,
-0.0088958740234375,
0.0282745361328125,
0.049530029296875,
0.012939453125,
-0.009002685546875,
0.01009368896484375,
-0.005870819091796875,
0.0019025802612304688,
0.006443023681640625,
0.034942626953125,
0.046051025390625,
-0.039306640625,
-0.0156707763671875,
0.00888824462890625,
0.0007381439208984375,
0.0151824951171875,
0.013153076171875,
0.0017833709716796875,
0.0127410888671875,
0.03277587890625,
-0.0364990234375,
-0.053192138671875,
-0.047821044921875,
-0.06500244140625,
0.038238525390625,
0.03924560546875,
0.0304412841796875,
-0.03436279296875,
0.043487548828125,
-0.012176513671875,
0.01174163818359375,
0.0283355712890625,
-0.046722412109375,
0.05908203125,
-0.00983428955078125,
-0.00445556640625,
-0.0271759033203125,
0.02349853515625,
-0.0089874267578125,
-0.010284423828125,
-0.0078582763671875,
0.0158233642578125,
-0.0149688720703125,
0.0058135986328125,
-0.05682373046875,
-0.038299560546875,
0.0232696533203125,
-0.09136962890625,
0.01189422607421875,
-0.0650634765625,
0.00421142578125,
-0.04241943359375,
0.052764892578125,
-0.035919189453125,
-0.0086822509765625,
-0.00885009765625,
0.00774383544921875,
-0.0175933837890625,
-0.02490234375,
-0.0338134765625,
-0.00768280029296875,
-0.01959228515625,
-0.0212554931640625,
-0.00977325439453125,
-0.010498046875,
0.00839996337890625,
0.00682830810546875,
0.021392822265625,
-0.0321044921875,
0.03338623046875,
-0.0031108856201171875,
0.0311279296875,
0.006175994873046875,
0.0016946792602539062,
0.0162200927734375,
-0.0438232421875,
-0.0004189014434814453,
-0.08807373046875,
-0.01470947265625,
0.0238800048828125,
0.05572509765625,
-0.038330078125,
0.037322998046875,
-0.0330810546875,
0.041351318359375,
-0.015869140625,
0.049835205078125,
-0.024505615234375,
0.01068115234375,
0.0113372802734375,
-0.0190277099609375,
-0.0190887451171875,
-0.01171875,
0.009246826171875,
-0.048492431640625,
-0.05804443359375,
-0.045684814453125,
-0.0240478515625,
0.0302581787109375,
-0.00021457672119140625,
-0.022796630859375,
-0.0380859375,
-0.01137542724609375,
0.03814697265625,
0.04437255859375,
0.0223236083984375,
0.007213592529296875,
-0.0290985107421875,
-0.02496337890625,
0.0299835205078125,
-0.040618896484375,
0.00806427001953125,
0.017669677734375,
0.0799560546875,
-0.01462554931640625,
0.005672454833984375,
-0.07452392578125,
0.002613067626953125,
0.0223846435546875,
0.018890380859375,
0.039093017578125,
0.01702880859375,
-0.005458831787109375,
0.0139007568359375,
0.007236480712890625,
-0.030609130859375,
-0.0048675537109375,
0.0093994140625,
-0.0007810592651367188,
-0.03033447265625,
0.005123138427734375,
-0.0213623046875,
0.05853271484375,
0.04168701171875,
-0.006908416748046875,
-0.0049591064453125,
-0.048065185546875,
0.0206146240234375,
0.0181427001953125,
-0.00965118408203125,
-0.0367431640625,
-0.0533447265625,
0.01360321044921875,
-0.036041259765625,
0.0271453857421875,
0.005413055419921875,
-0.012176513671875,
0.0253753662109375,
0.0264892578125,
-0.0034275054931640625,
-0.00955963134765625,
0.007236480712890625,
-0.028289794921875,
0.0303192138671875,
-0.02142333984375,
-0.022247314453125,
-0.0185394287109375,
-0.0096588134765625,
0.04296875,
0.04217529296875,
-0.007129669189453125,
-0.00904083251953125,
-0.005817413330078125,
0.0064697265625,
-0.01236724853515625,
0.005023956298828125,
0.01168060302734375,
0.0155792236328125,
-0.0194091796875,
0.0094451904296875,
0.021636962890625,
-0.01873779296875,
-0.0229034423828125,
0.01934814453125,
0.01447296142578125,
-0.015869140625,
0.02581787109375,
-0.0156402587890625,
0.040771484375,
-0.0243988037109375,
-0.019561767578125,
0.0068206787109375,
0.0303802490234375,
0.0308074951171875,
0.0272216796875,
-0.03424072265625,
-0.029815673828125,
0.032073974609375,
0.00893402099609375,
-0.053924560546875,
0.0301666259765625,
0.0275115966796875,
0.06317138671875,
-0.0036907196044921875,
-0.05670166015625,
0.0138397216796875,
-0.048828125,
-0.00205230712890625,
-0.0113067626953125,
-0.0308837890625,
-0.0194091796875,
-0.006122589111328125,
0.01467132568359375,
0.0224609375,
-0.023681640625,
-0.02630615234375,
-0.0246429443359375,
0.00524139404296875,
0.039794921875,
0.03179931640625,
-0.0164794921875,
0.0521240234375,
0.036651611328125,
0.0300445556640625,
-0.0272369384765625,
-0.0443115234375,
0.0419921875,
0.042816162109375,
-0.03631591796875,
-0.0276947021484375,
0.07965087890625,
0.008453369140625,
0.03564453125,
-0.00982666015625,
-0.0443115234375,
0.012725830078125,
0.0044097900390625,
0.041656494140625,
0.00957489013671875,
-0.03216552734375,
0.018402099609375,
-0.034912109375,
0.006427764892578125,
0.0640869140625,
-0.02166748046875,
-0.00948333740234375,
-0.05316162109375,
0.00826263427734375,
0.044158935546875,
-0.0063323974609375,
0.005954742431640625,
0.01244354248046875,
0.0044097900390625,
-0.013885498046875,
0.069091796875,
-0.030853271484375,
-0.0080108642578125,
0.0472412109375,
-0.01352691650390625,
-0.00991058349609375,
-0.0301055908203125,
0.0027008056640625,
-0.00988006591796875,
-0.0213470458984375,
-0.0919189453125,
-0.0248260498046875,
0.055145263671875,
-0.051361083984375,
0.050048828125,
0.022613525390625,
0.01532745361328125,
0.0005974769592285156,
-0.0255126953125,
0.0082550048828125,
-0.016357421875,
0.0290374755859375,
-0.0455322265625,
-0.01528167724609375,
0.031768798828125,
-0.0306549072265625,
0.0291900634765625,
-0.01052093505859375,
0.005588531494140625,
0.015533447265625,
-0.043914794921875,
0.0216064453125,
0.0428466796875,
0.006267547607421875,
-0.00939178466796875,
0.027130126953125,
-0.01177215576171875,
0.01541900634765625,
0.0213165283203125,
0.004558563232421875,
0.0287628173828125,
0.0244598388671875,
0.03741455078125,
-0.04119873046875,
0.0616455078125,
0.01430511474609375,
-0.0017518997192382812,
0.04254150390625,
-0.0382080078125,
0.007320404052734375,
0.057281494140625,
0.057769775390625,
-0.036712646484375,
-0.0160980224609375,
0.0018482208251953125,
-0.030487060546875,
0.0070343017578125,
0.0018129348754882812,
0.0291290283203125,
0.052154541015625,
0.027099609375,
-0.03375244140625,
-0.00455474853515625,
0.020721435546875,
-0.020294189453125,
0.0165557861328125,
0.0183258056640625,
0.057220458984375,
0.0017795562744140625,
-0.06939697265625,
-0.0440673828125,
0.055419921875,
-0.0186767578125,
-0.0210113525390625,
-0.025390625,
-0.005107879638671875,
-0.03369140625,
-0.04132080078125,
-0.004146575927734375,
-0.040740966796875,
0.036376953125,
0.02960205078125,
0.019622802734375,
0.0289459228515625,
0.033905029296875,
0.005168914794921875,
0.0009322166442871094,
0.007419586181640625,
-0.003559112548828125,
0.03912353515625,
-0.0003159046173095703,
0.005279541015625,
0.01824951171875,
-0.0288238525390625,
-0.007709503173828125,
-0.035675048828125,
0.02972412109375,
-0.025115966796875,
-0.06689453125,
0.055450439453125,
-0.026580810546875,
-0.005840301513671875,
0.0228271484375,
0.01308441162109375,
-0.0240631103515625,
0.0258636474609375,
-0.011932373046875,
-0.04022216796875,
-0.0362548828125,
0.004863739013671875,
-0.078857421875,
0.024932861328125,
0.00736236572265625,
-0.09039306640625,
0.1158447265625,
0.007965087890625,
0.0999755859375,
0.005756378173828125,
0.0296783447265625,
0.013885498046875,
0.01349639892578125,
-0.0360107421875,
0.055633544921875,
-0.00026535987854003906,
0.0513916015625,
-0.054718017578125,
0.0017452239990234375,
0.0069122314453125,
0.0200653076171875,
0.08856201171875,
0.0201416015625,
-0.03509521484375,
-0.02301025390625,
0.040557861328125,
-0.01055145263671875,
-0.03497314453125,
0.0726318359375,
0.007427215576171875,
-0.0012788772583007812,
0.038055419921875,
-0.01049041748046875,
0.0252838134765625,
-0.00336456298828125,
0.00461578369140625,
0.03594970703125,
0.02777099609375,
0.045135498046875,
0.01413726806640625,
0.0194244384765625,
-0.001247406005859375,
-0.01174163818359375,
0.037017822265625,
-0.036834716796875,
0.004791259765625,
0.032684326171875,
0.038970947265625,
-0.053619384765625,
-0.0462646484375,
-0.0195159912109375,
0.050384521484375,
0.00930023193359375,
-0.0090484619140625,
0.021820068359375,
0.0111236572265625,
0.0157470703125,
0.01375579833984375,
-0.0015344619750976562,
0.027801513671875,
0.00868988037109375,
0.01201629638671875,
-0.007175445556640625,
0.0399169921875,
-0.047576904296875,
-0.0180511474609375,
0.0631103515625,
0.04632568359375,
-0.0189208984375,
0.02410888671875,
0.0299072265625,
0.0022945404052734375,
-0.03009033203125,
-0.038116455078125,
-0.01177215576171875,
-0.04095458984375,
-0.040863037109375,
-0.048370361328125,
0.01511383056640625,
0.056396484375,
0.037322998046875,
-0.00493621826171875,
0.00485992431640625,
-0.06341552734375,
-0.01236724853515625,
-0.0589599609375,
0.05322265625,
0.035125732421875,
0.0677490234375,
-0.016754150390625,
0.06048583984375,
-0.01470947265625,
-0.0313720703125,
-0.0271453857421875,
0.0396728515625,
-0.001094818115234375,
0.04779052734375,
-0.055938720703125,
-0.038787841796875,
0.06475830078125,
0.046875,
0.053466796875,
0.0161590576171875,
0.045989990234375,
-0.0014438629150390625,
-0.0217742919921875,
0.009521484375,
-0.01297760009765625,
-0.02813720703125,
0.07452392578125,
-0.00920867919921875,
0.0023193359375,
-0.0248565673828125,
-0.048004150390625,
-0.036712646484375,
-0.019378662109375,
0.035247802734375,
-0.002201080322265625,
0.0169677734375,
0.0018720626831054688,
-0.014312744140625,
0.0272369384765625,
-0.00414276123046875,
0.025787353515625,
0.0236358642578125,
-0.0614013671875,
-0.0263519287109375,
0.015869140625,
-0.0660400390625,
0.01131439208984375,
0.04150390625,
-0.00797271728515625,
-0.01514434814453125,
0.01149749755859375,
-0.035400390625,
-0.0161895751953125,
0.0162506103515625,
0.033905029296875,
-0.0006198883056640625,
-0.018707275390625,
0.0137786865234375,
-0.0243072509765625,
-0.0105743408203125,
0.006778717041015625,
0.01702880859375,
-0.007038116455078125,
0.10693359375,
-0.025482177734375,
-0.006977081298828125,
-0.05389404296875,
0.046630859375,
-0.071533203125,
-0.047149658203125,
0.043701171875,
0.004978179931640625,
-0.01499176025390625,
0.0023956298828125,
0.035888671875,
-0.0006017684936523438,
0.019866943359375,
-0.0511474609375,
-0.055419921875,
-0.01959228515625,
0.01904296875,
0.04034423828125,
0.01319122314453125,
-0.0232391357421875,
-0.0093841552734375,
-0.0283966064453125,
-0.00214385986328125,
0.0305328369140625,
0.02618408203125,
-0.0281829833984375,
0.04779052734375,
-0.009735107421875,
-0.017242431640625,
0.0139617919921875,
-0.05615234375,
0.0157623291015625,
0.03497314453125,
-0.0032596588134765625,
-0.042572021484375,
-0.019287109375,
-0.01209259033203125,
-0.0300140380859375,
0.0015106201171875,
0.0200958251953125,
-0.0080718994140625,
-0.048004150390625,
-0.0146484375,
-0.0167236328125,
-0.013641357421875,
-0.0238189697265625,
-0.0160064697265625,
-0.0013866424560546875,
-0.004730224609375,
-0.00980377197265625,
-0.022186279296875,
-0.0038776397705078125,
-0.03167724609375,
-0.024566650390625,
0.034149169921875,
-0.034271240234375,
0.022369384765625,
-0.0238800048828125,
-0.01081085205078125,
0.0298004150390625,
0.010711669921875,
-0.047210693359375,
0.0277252197265625,
-0.00885009765625,
0.01171112060546875,
-0.00457763671875,
-0.028045654296875,
0.01129150390625,
0.01186370849609375,
-0.047027587890625,
-0.023284912109375,
-0.0179443359375,
-0.007282257080078125,
-0.02117919921875,
0.040496826171875,
0.070068359375,
-0.053985595703125,
-0.05816650390625,
0.0118255615234375,
0.046875,
0.050323486328125,
0.0192413330078125,
-0.004901885986328125,
0.018463134765625,
0.0010986328125,
-0.036956787109375,
-0.0278778076171875,
0.0216064453125,
-0.028564453125,
-0.01479339599609375,
-0.02197265625,
-0.0092926025390625,
-0.0059051513671875,
-0.0270843505859375,
-0.030303955078125,
0.00402069091796875,
0.0232391357421875,
-0.027557373046875,
-0.046417236328125,
-0.0040435791015625,
-0.0154266357421875,
0.06695556640625,
0.00044155120849609375,
-0.03240966796875,
-0.0117034912109375,
0.04559326171875,
-0.00951385498046875,
0.042877197265625,
-0.021575927734375,
0.017730712890625,
0.03485107421875,
0.06732177734375,
0.06787109375,
-0.016082763671875,
0.05438232421875,
-0.0121917724609375,
0.018798828125,
0.0535888671875,
-0.033355712890625,
-0.01236724853515625,
-0.042510986328125,
-0.061004638671875,
-0.043212890625,
-0.01274871826171875,
-0.0264892578125,
0.0162353515625,
0.08856201171875,
0.115478515625,
0.0242156982421875,
-0.06878662109375,
-0.0290374755859375,
-0.058837890625,
-0.0238494873046875,
-0.0024356842041015625,
0.036956787109375,
-0.070068359375,
0.01837158203125,
0.032135009765625,
0.00551605224609375,
0.01178741455078125,
-0.007171630859375,
-0.0013751983642578125,
-0.0127716064453125,
0.02227783203125,
-0.0121612548828125,
0.00044655799865722656,
0.003322601318359375,
0.048248291015625,
-0.0343017578125,
0.01233673095703125,
-0.02325439453125,
0.0194854736328125,
0.0263824462890625,
-0.031280517578125,
0.016357421875,
-0.0033817291259765625,
0.01383209228515625,
0.0066680908203125,
0.03192138671875,
-0.0152740478515625,
0.0213623046875,
-0.02191162109375,
-0.027435302734375,
0.0185089111328125,
0.0240020751953125,
0.0163726806640625,
-0.03564453125,
0.03662109375,
0.0222320556640625,
0.051055908203125,
-0.001682281494140625,
-0.0372314453125,
0.003711700439453125,
0.01537322998046875,
-0.00907135009765625,
-0.007289886474609375,
0.02386474609375,
-0.0491943359375,
0.0076446533203125,
-0.004901885986328125,
0.005809783935546875,
-0.0158843994140625,
0.01157379150390625,
-0.037017822265625,
-0.004375457763671875,
0.01259613037109375
]
|
08b8d427c28070a987230d58883d08c38453cd09 | Wordpress Stackexchange
Q: Where does wordpress store the FTP credentials? When wordpress asks for FTP information to upgrade, you type it in and then it seems to store it for future use (for future upgrades, and maybe also for media uploads?)
Where does it store these details? Is it in a file? In the database?
I'm trying to figure out what information is being used to access the server.
Tried grep-ing for ftp in the php files and didnt see anything. This also doesn't seem to be a setting that is exposed in the admin interface.
Thanks!
A: It doesn't. WP Filesystem API will ask for FTP credentials, but it will do so for each operation. They aren't stored persistently.
They can be stored persistently by hardcoding into wp-config.php, but WP won't do that itself, it's a user action.
Note that WP only asks for FTP credentials if it cannot modify files without them. If specific setup used to ask for them and stopped then likely the server configuration or file permissions had changed and now allow WP to manipulate files without going through FTP.
| Q: Where does wordpress store the FTP credentials? When wordpress asks for FTP information to upgrade, you type it in and then it seems to store it for future use (for future upgrades, and maybe also for media uploads?)
Where does it store these details? Is it in a file? In the database?
I'm trying to figure out what information is being used to access the server.
Tried grep-ing for ftp in the php files and didnt see anything. This also doesn't seem to be a setting that is exposed in the admin interface.
Thanks!
A: It doesn't. WP Filesystem API will ask for FTP credentials, but it will do so for each operation. They aren't stored persistently.
They can be stored persistently by hardcoding into wp-config.php, but WP won't do that itself, it's a user action.
Note that WP only asks for FTP credentials if it cannot modify files without them. If specific setup used to ask for them and stopped then likely the server configuration or file permissions had changed and now allow WP to manipulate files without going through FTP.
A: I came across something just now that might be an answer. Rarst says WP doesn't store FTP credentials in the DB but I just discovered in a MySQL dump file I was working on, that in the wp_options table, there is the following:
15122,'ftp_credentials','a:3:{s:8:\"hostname\";s:27:\"mysiteurl\";s:8:\"username\";s:7:\"myusernmae\";s:15:\"connection_type\";s:4:\"ftps\";}','yes'
As a value to be entered. I think that when permissions are messed up, and it asks for your credentials, those values might actually be stored in wp_options. This was in an old version of WP, 4.4.2, I think, but it was indeed in the database.
| wordpress | {
"language": "en",
"length": 274,
"provenance": "stackexchange_00019.jsonl.gz:449723",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165656"
} | [
0.033660888671875,
0.00243377685546875,
-0.0004911422729492188,
0.009735107421875,
0.0050506591796875,
-0.03759765625,
0.0670166015625,
-0.017669677734375,
0.0254974365234375,
0.03558349609375,
-0.053375244140625,
-0.01708984375,
0.00457000732421875,
0.002124786376953125,
-0.045654296875,
-0.039947509765625,
0.024078369140625,
0.0019063949584960938,
0.045196533203125,
-0.0028781890869140625,
0.0230560302734375,
0.0291748046875,
0.0283660888671875,
-0.017852783203125,
0.01270294189453125,
0.025970458984375,
0.072509765625,
-0.038330078125,
0.0455322265625,
-0.004974365234375,
0.019683837890625,
-0.04803466796875,
0.037139892578125,
0.00366973876953125,
-0.0214996337890625,
-0.0079803466796875,
-0.022918701171875,
-0.00853729248046875,
-0.03240966796875,
0.041412353515625,
0.0123291015625,
-0.0152435302734375,
0.019927978515625,
-0.0004677772521972656,
0.0010023117065429688,
-0.030914306640625,
0.0008120536804199219,
-0.05523681640625,
0.0137939453125,
0.01617431640625,
0.0255584716796875,
0.0013933181762695312,
0.031463623046875,
-0.000644683837890625,
-0.029632568359375,
-0.04315185546875,
-0.018157958984375,
-0.00492095947265625,
0.0212860107421875,
-0.0284881591796875,
-0.0178680419921875,
-0.028472900390625,
0.045166015625,
0.0172119140625,
-0.003826141357421875,
0.0016536712646484375,
0.048797607421875,
0.025726318359375,
-0.0312042236328125,
-0.0252685546875,
0.004222869873046875,
0.00682830810546875,
-0.020050048828125,
-0.0272216796875,
0.00283050537109375,
0.0171356201171875,
0.00478363037109375,
-0.0151824951171875,
-0.01812744140625,
0.037841796875,
0.0286712646484375,
0.005466461181640625,
-0.01203155517578125,
-0.0017461776733398438,
-0.01617431640625,
-0.006439208984375,
-0.0176239013671875,
-0.02703857421875,
0.01580810546875,
0.0232391357421875,
-0.0127410888671875,
0.0278167724609375,
0.06585693359375,
0.01371002197265625,
-0.060211181640625,
0.0136260986328125,
-0.0015687942504882812,
0.0098114013671875,
-0.0184478759765625,
0.0173797607421875,
-0.012451171875,
-0.013397216796875,
0.0130615234375,
-0.021575927734375,
-0.00927734375,
0.0278167724609375,
0.01377105712890625,
-0.00690460205078125,
-0.00011074542999267578,
0.00479888916015625,
-0.028656005859375,
-0.0183563232421875,
0.0218048095703125,
-0.056488037109375,
0.01169586181640625,
0.068115234375,
0.042633056640625,
0.0247955322265625,
0.01776123046875,
0.031158447265625,
0.0212554931640625,
0.0291748046875,
-0.057830810546875,
-0.0086517333984375,
-0.0258941650390625,
-0.055938720703125,
-0.027435302734375,
0.038726806640625,
-0.0567626953125,
0.08831787109375,
-0.01377105712890625,
-0.030364990234375,
-0.01885986328125,
0.03375244140625,
-0.004131317138671875,
-0.0406494140625,
0.0259552001953125,
0.0162811279296875,
0.0004954338073730469,
0.036102294921875,
-0.018096923828125,
-0.0577392578125,
-0.016510009765625,
-0.00669097900390625,
0.002666473388671875,
0.0010280609130859375,
0.0147857666015625,
0.035797119140625,
0.00344085693359375,
-0.03704833984375,
0.0254974365234375,
0.016937255859375,
0.002330780029296875,
0.015869140625,
0.05633544921875,
0.019683837890625,
0.04864501953125,
-0.0169677734375,
-0.00717926025390625,
0.0021820068359375,
-0.006122589111328125,
-0.018310546875,
-0.00841522216796875,
-0.00916290283203125,
-0.0208892822265625,
0.01904296875,
0.0224456787109375,
0.0063934326171875,
-0.0065155029296875,
0.00945281982421875,
-0.0181121826171875,
-0.0173492431640625,
-0.018524169921875,
-0.03094482421875,
-0.019775390625,
-0.0058441162109375,
0.0219573974609375,
0.0072784423828125,
0.04608154296875,
0.0362548828125,
-0.00806427001953125,
-0.017578125,
0.07177734375,
-0.032562255859375,
-0.007762908935546875,
-0.007476806640625,
0.01373291015625,
0.025177001953125,
0.01180267333984375,
0.0274810791015625,
-0.0162200927734375,
0.005298614501953125,
-0.061431884765625,
0.0208282470703125,
-0.0212860107421875,
0.0287933349609375,
0.0245361328125,
0.050628662109375,
0.0005311965942382812,
-0.038330078125,
0.01708984375,
-0.004360198974609375,
-0.006134033203125,
-0.02008056640625,
-0.042083740234375,
-0.00968170166015625,
-0.019775390625,
0.0198822021484375,
0.005405426025390625,
0.00505828857421875,
-0.0153656005859375,
-0.052734375,
0.0307769775390625,
-0.027618408203125,
-0.0396728515625,
-0.0171661376953125,
-0.02972412109375,
0.0311737060546875,
0.01373291015625,
0.034210205078125,
-0.0208740234375,
0.0035305023193359375,
-0.0228729248046875,
-0.041534423828125,
-0.0016336441040039062,
0.00525665283203125,
-0.0236358642578125,
-0.0036258697509765625,
0.0011587142944335938,
0.00589752197265625,
0.0189361572265625,
0.00814056396484375,
0.0236663818359375,
0.032379150390625,
-0.03662109375,
-0.022247314453125,
-0.034576416015625,
-0.0821533203125,
0.01078033447265625,
0.0577392578125,
0.043670654296875,
-0.00004547834396362305,
0.0290985107421875,
0.04931640625,
0.01464080810546875,
-0.01206207275390625,
0.030731201171875,
-0.0124359130859375,
0.0243682861328125,
0.048187255859375,
-0.0086517333984375,
-0.0260009765625,
0.0027313232421875,
0.0017786026000976562,
-0.02764892578125,
0.0350341796875,
-0.0228424072265625,
-0.0264434814453125,
0.02435302734375,
-0.01558685302734375,
0.011322021484375,
-0.058624267578125,
-0.03582763671875,
-0.015045166015625,
0.035919189453125,
0.0308685302734375,
0.02044677734375,
0.030426025390625,
-0.0382080078125,
0.032257080078125,
0.0045166015625,
-0.018890380859375,
0.0003840923309326172,
0.0104522705078125,
0.024932861328125,
-0.0143585205078125,
-0.018951416015625,
-0.0011959075927734375,
0.01432037353515625,
0.007709503173828125,
-0.0159759521484375,
0.01241302490234375,
-0.01548004150390625,
0.0013494491577148438,
-0.02996826171875,
-0.0452880859375,
0.035247802734375,
0.061370849609375,
0.0197296142578125,
-0.007068634033203125,
0.0155029296875,
0.0219879150390625,
-0.0244140625,
0.052459716796875,
-0.006481170654296875,
-0.0224151611328125,
-0.0176849365234375,
-0.00348663330078125,
0.01520538330078125,
-0.028900146484375,
0.0311279296875,
0.05938720703125,
-0.00769805908203125,
0.0157318115234375,
-0.003162384033203125,
0.01207733154296875,
0.00341033935546875,
-0.0008521080017089844,
-0.0098114013671875,
0.0171966552734375,
-0.06915283203125,
0.007049560546875,
-0.004238128662109375,
-0.0095672607421875,
-0.028533935546875,
-0.04400634765625,
-0.03448486328125,
-0.0204925537109375,
-0.0963134765625,
-0.0567626953125,
-0.037261962890625,
-0.08575439453125,
0.040252685546875,
-0.045928955078125,
-0.0277862548828125,
0.003322601318359375,
-0.0052642822265625,
0.0305633544921875,
-0.0166015625,
-0.0249481201171875,
-0.04656982421875,
-0.07080078125,
-0.05926513671875,
-0.040618896484375,
-0.0027675628662109375,
0.0044403076171875,
-0.005523681640625,
0.08062744140625,
-0.004344940185546875,
-0.065673828125,
-0.05126953125,
-0.01428985595703125,
-0.0300140380859375,
-0.01198577880859375,
-0.0027141571044921875,
-0.037261962890625,
0.0276641845703125,
-0.01226043701171875,
0.031646728515625,
0.0169677734375,
0.003498077392578125,
0.005519866943359375,
0.015899658203125,
-0.01708984375,
-0.0132598876953125,
0.0362548828125,
-0.0104217529296875,
-0.04864501953125,
-0.0197906494140625,
-0.0736083984375,
0.00959014892578125,
-0.00533294677734375,
-0.032470703125,
0.0234527587890625,
0.016693115234375,
-0.02423095703125,
0.01088714599609375,
-0.0182342529296875,
0.01085662841796875,
0.0236968994140625,
-0.01390838623046875,
0.0018787384033203125,
-0.004405975341796875,
-0.00614166259765625,
-0.004241943359375,
0.004299163818359375,
0.040802001953125,
-0.01325225830078125,
0.00855255126953125,
0.022247314453125,
-0.0018377304077148438,
0.008636474609375,
-0.0283660888671875,
-0.025360107421875,
-0.11260986328125,
0.052581787109375,
-0.06011962890625,
0.00005924701690673828,
-0.0809326171875,
-0.0269622802734375,
-0.0007266998291015625,
0.1563720703125,
-0.01181793212890625,
-0.006771087646484375,
-0.0008306503295898438,
0.035491943359375,
-0.0699462890625,
-0.07080078125,
-0.0177154541015625,
-0.004245758056640625,
0.006877899169921875,
-0.0304107666015625,
-0.0283203125,
-0.0170135498046875,
0.0150604248046875,
-0.0924072265625,
0.0107879638671875,
-0.03350830078125,
-0.007598876953125,
-0.03704833984375,
0.02337646484375,
-0.0237274169921875,
0.03857421875,
-0.061309814453125,
0.04058837890625,
-0.07110595703125,
-0.040863037109375,
-0.01073455810546875,
-0.006282806396484375,
0.0286712646484375,
0.0081787109375,
-0.0234375,
0.0081329345703125,
0.0384521484375,
0.0086212158203125,
0.0148468017578125,
0.022125244140625,
0.01458740234375,
0.01007843017578125,
-0.04559326171875,
0.0004649162292480469,
-0.044891357421875,
-0.0060882568359375,
-0.024261474609375,
-0.0255584716796875,
-0.0294647216796875,
-0.0311126708984375,
0.004791259765625,
0.005863189697265625,
-0.01245880126953125,
-0.0013751983642578125,
-0.00679779052734375,
-0.0213165283203125,
0.00841522216796875,
-0.03582763671875,
0.0022296905517578125,
-0.0007042884826660156,
-0.004364013671875,
0.08026123046875,
0.01049041748046875,
0.003772735595703125,
0.005397796630859375,
0.10137939453125,
0.0018129348754882812,
-0.03399658203125,
-0.07073974609375,
0.0045166015625,
0.061126708984375,
-0.0021266937255859375,
0.036376953125,
0.054290771484375,
-0.0191650390625,
0.02691650390625,
0.030975341796875,
-0.0009889602661132812,
-0.021759033203125,
0.060638427734375,
0.01904296875,
0.0015163421630859375,
0.0023479461669921875,
0.003917694091796875,
-0.0027370452880859375,
0.00732421875,
0.0020046234130859375,
-0.030548095703125,
0.04437255859375,
0.057769775390625,
-0.020782470703125,
0.00272369384765625,
-0.034637451171875,
-0.065185546875,
0.0206451416015625,
-0.059906005859375,
0.00702667236328125,
-0.013336181640625,
0.00803375244140625,
-0.0056915283203125,
-0.00711822509765625,
-0.01227569580078125,
-0.0032596588134765625,
0.003452301025390625,
0.0060272216796875,
0.025360107421875,
-0.0163726806640625,
-0.0184326171875,
-0.01325225830078125,
-0.00981903076171875,
0.046356201171875,
-0.0189361572265625,
-0.073974609375,
0.041229248046875,
-0.01087188720703125,
0.043548583984375,
0.05322265625,
-0.026641845703125,
0.01654052734375,
-0.0113677978515625,
-0.005908966064453125,
0.00777435302734375,
-0.0220794677734375,
-0.06231689453125,
-0.0234832763671875,
0.0027217864990234375,
-0.01471710205078125,
-0.0164337158203125,
0.002147674560546875,
0.01526641845703125,
-0.061370849609375,
0.0140380859375,
0.0180206298828125,
0.01010894775390625,
0.050689697265625,
-0.019256591796875,
0.0128173828125,
0.05126953125,
-0.0006275177001953125,
-0.031982421875,
0.03607177734375,
-0.0204315185546875,
-0.0019741058349609375,
0.01213836669921875,
0.03582763671875,
-0.02459716796875,
-0.01421356201171875,
0.01788330078125,
-0.0252532958984375,
-0.004558563232421875,
0.023712158203125,
0.02191162109375,
-0.038848876953125,
0.0025787353515625,
0.01263427734375,
0.0176849365234375,
-0.03515625,
-0.0211181640625,
0.00007873773574829102,
-0.0382080078125,
-0.0142364501953125,
0.04010009765625,
-0.0445556640625,
-0.004810333251953125,
-0.0029201507568359375,
-0.007106781005859375,
-0.0021228790283203125,
-0.0279693603515625,
0.0005049705505371094,
-0.0201873779296875,
-0.001300811767578125,
0.000396728515625,
0.0277557373046875,
0.0006155967712402344,
0.01049041748046875,
-0.0164031982421875,
-0.004070281982421875,
-0.007274627685546875,
0.0095062255859375,
0.0374755859375,
-0.003749847412109375,
-0.06866455078125,
0.004001617431640625,
-0.02911376953125,
-0.01953125,
0.051300048828125,
0.0083465576171875,
-0.0513916015625,
-0.0183868408203125,
-0.003856658935546875,
0.01116943359375,
-0.01157379150390625,
0.003704071044921875,
-0.0191497802734375,
0.0323486328125,
0.00859832763671875,
0.037689208984375,
0.00769805908203125,
0.0075531005859375,
0.00234222412109375,
0.00997161865234375,
0.0106658935546875,
0.017730712890625,
0.007038116455078125,
-0.036956787109375,
0.0250244140625,
-0.0234527587890625,
-0.034515380859375,
-0.032257080078125,
0.002590179443359375,
0.01141357421875,
0.031951904296875,
-0.0146942138671875,
-0.01514434814453125,
-0.022918701171875,
0.00849151611328125,
0.001068115234375,
0.056488037109375,
-0.0027942657470703125,
-0.0596923828125,
0.07684326171875,
-0.0247344970703125,
0.0211181640625,
-0.0321044921875,
-0.00273895263671875,
0.0192108154296875,
-0.0228729248046875,
0.00536346435546875,
0.0477294921875,
-0.02471923828125,
0.0302276611328125,
0.06781005859375,
-0.011566162109375,
0.043487548828125,
0.0260467529296875,
0.0065155029296875,
0.0194854736328125,
-0.020050048828125,
-0.0281524658203125,
0.0195159912109375,
0.034423828125,
0.00823211669921875,
0.00510406494140625,
0.054473876953125,
-0.0107574462890625,
0.0070648193359375,
0.01331329345703125,
0.05419921875,
-0.0260162353515625,
0.0190277099609375,
0.0222320556640625,
-0.002803802490234375,
0.0149993896484375,
0.0211639404296875,
-0.040313720703125,
-0.047607421875,
-0.0001270771026611328,
-0.01494598388671875,
-0.0286102294921875,
-0.0043487548828125,
0.018707275390625,
0.0018491744995117188,
0.042755126953125,
0.0282135009765625,
-0.01080322265625,
-0.0139617919921875,
-0.0733642578125,
0.030181884765625,
-0.0352783203125,
-0.0120849609375,
-0.010589599609375,
-0.0005946159362792969,
-0.07568359375,
-0.08544921875,
-0.044677734375,
0.005390167236328125,
-0.04095458984375,
-0.019500732421875,
0.00716400146484375,
0.10528564453125,
0.05328369140625,
0.0251617431640625,
-0.022186279296875,
0.01314544677734375,
0.06671142578125,
-0.0255126953125,
-0.054931640625,
0.028839111328125,
0.04632568359375,
-0.0496826171875,
0.0460205078125,
0.007137298583984375,
-0.03631591796875,
-0.021484375,
0.02276611328125,
0.09063720703125,
-0.054962158203125,
-0.008636474609375,
0.05841064453125,
0.036865234375,
-0.0267486572265625,
0.01026153564453125,
0.03192138671875,
-0.026611328125,
-0.002506256103515625,
0.0156707763671875,
-0.029144287109375,
-0.006320953369140625,
-0.006275177001953125,
-0.028717041015625,
0.10089111328125,
0.00612640380859375,
-0.02142333984375,
0.021087646484375,
0.05615234375,
-0.03643798828125,
0.031524658203125,
-0.042022705078125,
0.0472412109375,
0.03546142578125,
0.040924072265625,
-0.048675537109375,
-0.02685546875,
0.01375579833984375,
0.0338134765625,
0.07000732421875,
0.0259857177734375,
-0.039764404296875,
-0.00954437255859375,
0.03662109375,
0.0382080078125,
-0.0080718994140625,
0.040618896484375,
-0.00469970703125,
0.0111083984375,
0.054351806640625,
-0.036773681640625,
0.0291748046875,
-0.0180816650390625,
0.0120697021484375,
0.00476837158203125,
-0.00489044189453125,
-0.003326416015625,
-0.0004215240478515625,
0.0096435546875,
-0.0311737060546875,
0.002536773681640625,
0.0101165771484375,
0.001861572265625,
0.006137847900390625,
0.0621337890625,
0.0198974609375,
-0.003124237060546875,
-0.0249176025390625,
-0.0230712890625,
0.0477294921875,
-0.0283966064453125,
0.03271484375,
0.033172607421875,
0.00809478759765625,
0.0260162353515625,
0.010284423828125,
0.0238189697265625,
0.0214080810546875,
-0.0111236572265625,
0.0718994140625,
0.01384735107421875,
0.0192413330078125,
-0.05023193359375,
0.00611114501953125,
0.04364013671875,
0.09124755859375,
-0.051910400390625,
-0.053009033203125,
-0.0025959014892578125,
-0.024505615234375,
0.00618743896484375,
-0.003437042236328125,
-0.0112457275390625,
-0.007843017578125,
-0.003124237060546875,
0.004772186279296875,
0.017333984375,
0.0201568603515625,
0.00926971435546875,
0.004566192626953125,
0.041778564453125,
-0.04498291015625,
0.01218414306640625,
0.0224761962890625,
-0.024383544921875,
-0.0295867919921875,
-0.0100555419921875,
0.005077362060546875,
-0.00337982177734375,
-0.0160064697265625,
0.0259246826171875,
0.02020263671875,
0.054107666015625,
-0.015380859375,
-0.019256591796875,
-0.019073486328125,
-0.08697509765625,
-0.0157470703125,
0.03680419921875,
0.0159454345703125,
0.022491455078125,
0.024658203125,
0.0220794677734375,
-0.0177154541015625,
-0.00196075439453125,
0.028778076171875,
-0.02301025390625,
0.021514892578125,
-0.0285186767578125,
0.03143310546875,
0.0357666015625,
-0.0166778564453125,
-0.0194244384765625,
-0.0195465087890625,
0.10174560546875,
0.0014581680297851562,
0.0341796875,
-0.00099945068359375,
-0.00815582275390625,
0.041839599609375,
-0.01154327392578125,
0.0248870849609375,
0.01580810546875,
-0.061004638671875,
-0.02593994140625,
0.005100250244140625,
-0.0109710693359375,
-0.00351715087890625,
0.0321044921875,
0.005504608154296875,
-0.0238189697265625,
0.0298309326171875,
-0.043365478515625,
0.01849365234375,
0.0188140869140625,
0.02423095703125,
0.0245208740234375,
0.0133209228515625,
-0.00623321533203125,
-0.045654296875,
-0.040191650390625,
-0.01474761962890625,
0.050201416015625,
0.01488494873046875,
0.03436279296875,
0.00989532470703125,
0.03643798828125,
0.02142333984375,
-0.00244903564453125,
0.01483917236328125,
0.01123809814453125,
0.01806640625,
0.01641845703125,
-0.0135040283203125,
-0.02655029296875,
-0.05010986328125,
0.04193115234375,
0.01078033447265625,
0.01419830322265625,
0.0509033203125,
-0.021148681640625,
0.0040435791015625,
-0.00797271728515625,
0.0153350830078125,
-0.0295257568359375,
-0.044097900390625,
-0.007381439208984375,
0.0054168701171875,
-0.0135498046875,
-0.017059326171875,
-0.01505279541015625,
0.01837158203125,
-0.0027790069580078125,
-0.0203704833984375,
0.021209716796875,
-0.0263519287109375,
0.0440673828125,
0.037322998046875,
-0.025115966796875,
-0.0047607421875,
-0.0247802734375,
-0.031646728515625,
-0.01348114013671875,
-0.009765625,
0.0005726814270019531,
-0.006267547607421875,
-0.045135498046875,
-0.03839111328125,
0.0012941360473632812,
0.05230712890625,
0.03253173828125,
0.01511383056640625,
-0.05596923828125,
0.0015382766723632812,
-0.0106201171875,
-0.038421630859375,
-0.039825439453125,
-0.054168701171875,
-0.000896453857421875,
0.05584716796875,
-0.04534912109375,
0.01036834716796875,
-0.10150146484375,
0.0092010498046875,
0.042266845703125,
-0.018646240234375,
-0.03369140625,
-0.0228118896484375,
-0.029327392578125,
0.07421875,
-0.019317626953125,
0.031402587890625,
-0.007415771484375,
0.015869140625,
-0.0201568603515625,
-0.006969451904296875,
-0.0247955322265625,
0.027862548828125,
0.006038665771484375,
0.0292510986328125,
0.0078125,
-0.0189361572265625,
0.043701171875,
0.046600341796875,
0.01493072509765625,
0.09344482421875,
-0.01031494140625,
-0.032958984375,
-0.00818634033203125,
-0.01166534423828125,
0.0308685302734375,
0.0071258544921875,
-0.01364898681640625,
-0.014678955078125,
-0.0281524658203125,
-0.040771484375,
0.0278167724609375,
0.014617919921875,
-0.04962158203125,
-0.07220458984375,
0.07794189453125,
-0.027496337890625,
-0.01430511474609375,
-0.040863037109375,
-0.01221466064453125,
-0.022125244140625,
0.0670166015625,
-0.0177154541015625,
0.0216217041015625,
-0.00788116455078125,
0.042816162109375,
0.0196075439453125,
0.0008678436279296875,
0.01082611083984375,
0.0199737548828125,
-0.04193115234375,
0.04876708984375,
0.0175628662109375,
0.001247406005859375,
0.02508544921875,
-0.01543426513671875,
0.034576416015625,
0.051666259765625,
-0.029449462890625,
0.01519775390625,
-0.01042938232421875,
-0.02874755859375,
0.006649017333984375,
0.01282501220703125,
0.0005316734313964844,
0.006317138671875,
-0.0088958740234375,
0.0362548828125,
-0.005771636962890625,
-0.02130126953125,
-0.0161590576171875,
-0.0032291412353515625,
0.01372528076171875,
-0.0029296875,
-0.0127716064453125,
-0.017120361328125,
0.0027256011962890625,
-0.025543212890625,
-0.005352020263671875,
-0.01141357421875,
-0.01953125,
-0.038665771484375,
0.00031304359436035156,
0.0145721435546875,
0.005695343017578125,
-0.0127410888671875,
-0.029327392578125,
0.05401611328125,
-0.024200439453125,
0.0181732177734375,
0.0047607421875,
0.03802490234375,
0.036529541015625,
0.0212554931640625,
0.028564453125,
0.025146484375,
-0.047515869140625,
0.0195770263671875,
0.00585174560546875,
0.0289764404296875,
-0.04669189453125,
-0.01812744140625,
0.01557159423828125,
0.0236053466796875,
-0.0079193115234375,
0.0287933349609375,
0.0034618377685546875,
0.058258056640625,
0.0011205673217773438,
0.0216217041015625,
-0.0248565673828125,
-0.0565185546875,
-0.030487060546875,
0.0295562744140625,
-0.0634765625,
0.0174713134765625,
-0.0277252197265625,
-0.0240020751953125,
0.0100860595703125,
-0.0017824172973632812,
0.0112152099609375,
-0.0294342041015625,
0.0070648193359375,
-0.03167724609375,
-0.0019407272338867188,
0.023223876953125
]
|
16e6eca0f61a5f11ef72eecf52845e8cb67e18e0 | Wordpress Stackexchange
Q: How to check if a user exists by a given id Is there any way to check if a user id exists? I want to create a function similar to username_exists() but which returns if the id exists or not.
A: In this case I will definetely not use the get_userdata( $user_id ) while it is returning a WP_User, so it is more greedy than just a custom query.
About the query, I agree using the prepare method, but the SELECT COUNT(*) means you are returning all columns, which is useless here.
I would recommend using SELECT COUNT(ID) unstead, in this way we are only working on a single column which will be faster.
On other aspect for the returning statement, it would be more readable with a Ternary Logic like : return 1 < $count ? true : false;
To sum up, I wouldd have implemented it like :
function user_id_exists( $user_id ) {
global $wpdb;
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM $wpdb->users WHERE ID = %d", $user_id ) );
return empty( $count ) || 1 > $count ? false : true;
}
| Q: How to check if a user exists by a given id Is there any way to check if a user id exists? I want to create a function similar to username_exists() but which returns if the id exists or not.
A: In this case I will definetely not use the get_userdata( $user_id ) while it is returning a WP_User, so it is more greedy than just a custom query.
About the query, I agree using the prepare method, but the SELECT COUNT(*) means you are returning all columns, which is useless here.
I would recommend using SELECT COUNT(ID) unstead, in this way we are only working on a single column which will be faster.
On other aspect for the returning statement, it would be more readable with a Ternary Logic like : return 1 < $count ? true : false;
To sum up, I wouldd have implemented it like :
function user_id_exists( $user_id ) {
global $wpdb;
$count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(ID) FROM $wpdb->users WHERE ID = %d", $user_id ) );
return empty( $count ) || 1 > $count ? false : true;
}
A: I would highly recommend Daniel's much simpler solution over the one currently selected as correct:
$user = get_userdata( $user_id );
if ( $user === false ) {
//user id does not exist
} else {
//user id exists
}
A: If performance is a concern, use:
function user_id_exists($user_id) {
global $wpdb;
// Check cache:
if (wp_cache_get($user_id, 'users')) return true;
// Check database:
if ($wpdb->get_var($wpdb->prepare("SELECT EXISTS (SELECT 1 FROM $wpdb->users WHERE ID = %d)", $user_id))) return true;
return false;
}
Otherwise, use get_userdata($user_id) !== false. The call to get_userdata will retrieve a whole row from the database instead of a single value, create a new WP_User object and cache it on success.
A: Use this function:
function user_id_exists($user){
global $wpdb;
$count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->users WHERE ID = %d", $user));
if($count == 1){ return true; }else{ return false; }
}
Usage:
if(user_id_exists(1)){
//it does exists
} else {
//it doesn't
}
A: Something that is done by at least a few hackers ( I know because I played victim to this at least once) is to visit your site using this type of URL
domain.com/?author=0
domain.com/?author=1
etc.
On a successful attempt the output of the site will have valid data, in addition the user nicename will be in the content of the website and the nickname may be there as well (depending on the pages output).
On an invalid attempt the site will go to the 404 page (or whatever is set to happen on a page not found error).
It can be rather trivial to build a script using cURL that can test from say author=0 up to author=999 in a relatively short amount of time and output a list of usernames. I had a hacker do this for one of my sites and then try to login to each user by using another list of popular passwords.
As you can imagine the first time this happens it is a bit scary to see that someone can quite easily find out all your usernames. Lucky for me strong passwords saved the day that time, I'm sure not everyone is so lucky.
I have tested this against a couple big name websites (who will remain nameless in this post) and it seems that there may be nothing anyone can do as of yet to stop this from happening. I personally think it is security risk that wordpress should close.
EDIT:
Here in the future (early 2016) I now know that there are methods/plugins which can thwart this user enumeration attack. And I further have changed my stance on the security risk of this and I no longer think WordPress should change this.
A: Try This will not Showing you the warning like Missing argument 2 for wpdb::prepare()
function user_id_exists($user_id){
global $wpdb;
$count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->users WHERE ID = %d",$user_id));
if($count == 1){ return true; }else{ return false; }
}
| wordpress | {
"language": "en",
"length": 668,
"provenance": "stackexchange_00019.jsonl.gz:449731",
"question_score": "15",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165691"
} | [
0.1029052734375,
0.016754150390625,
0.029998779296875,
-0.036712646484375,
0.051361083984375,
-0.0345458984375,
0.07281494140625,
-0.048095703125,
0.0036163330078125,
0.04461669921875,
-0.06427001953125,
-0.02410888671875,
0.031494140625,
0.002185821533203125,
-0.056427001953125,
-0.06475830078125,
0.007236480712890625,
-0.00011473894119262695,
-0.022613525390625,
-0.029937744140625,
0.006031036376953125,
-0.027191162109375,
-0.005336761474609375,
0.0310821533203125,
0.0088348388671875,
-0.0723876953125,
0.049530029296875,
-0.006702423095703125,
0.0014743804931640625,
-0.0258941650390625,
0.01326751708984375,
0.0323486328125,
-0.007354736328125,
0.004673004150390625,
0.0272674560546875,
0.0186920166015625,
0.030517578125,
0.00566864013671875,
0.0305328369140625,
0.01515960693359375,
0.0215911865234375,
0.0071258544921875,
-0.0036602020263671875,
-0.0165863037109375,
-0.00904083251953125,
-0.074462890625,
0.06365966796875,
-0.0120086669921875,
0.01544189453125,
0.037384033203125,
0.01374053955078125,
0.040008544921875,
0.025604248046875,
-0.004199981689453125,
0.00966644287109375,
0.010284423828125,
-0.0008444786071777344,
-0.0276641845703125,
0.048004150390625,
-0.00849151611328125,
-0.0149383544921875,
-0.042083740234375,
0.039154052734375,
-0.01010894775390625,
0.008056640625,
-0.0107574462890625,
0.00588226318359375,
0.032501220703125,
-0.0155792236328125,
-0.0245819091796875,
-0.01236724853515625,
-0.005512237548828125,
-0.0267181396484375,
0.0167236328125,
-0.049163818359375,
-0.01383209228515625,
0.0345458984375,
-0.019744873046875,
0.0012121200561523438,
0.03631591796875,
-0.040069580078125,
-0.033203125,
-0.07025146484375,
0.01910400390625,
-0.014404296875,
0.041595458984375,
-0.018402099609375,
-0.007709503173828125,
-0.030670166015625,
-0.019195556640625,
-0.01202392578125,
-0.051239013671875,
-0.012847900390625,
0.01470184326171875,
-0.0257110595703125,
-0.0004551410675048828,
0.046966552734375,
0.1083984375,
-0.04443359375,
-0.01241302490234375,
-0.0067901611328125,
-0.022552490234375,
-0.01412200927734375,
-0.036376953125,
0.00525665283203125,
0.045684814453125,
0.0209808349609375,
0.0080718994140625,
-0.01407623291015625,
-0.0024089813232421875,
-0.01561737060546875,
-0.02313232421875,
-0.0253448486328125,
-0.036651611328125,
-0.036712646484375,
0.035064697265625,
-0.03466796875,
-0.03021240234375,
-0.006256103515625,
-0.0249786376953125,
0.0009636878967285156,
0.0205230712890625,
-0.0237884521484375,
-0.0023365020751953125,
0.0038051605224609375,
-0.0258941650390625,
-0.0156097412109375,
0.005767822265625,
-0.0175933837890625,
0.0087127685546875,
-0.037384033203125,
0.0261383056640625,
0.0518798828125,
0.01435089111328125,
-0.00688934326171875,
-0.00563812255859375,
0.033721923828125,
-0.03118896484375,
-0.02484130859375,
0.01236724853515625,
0.032470703125,
-0.04705810546875,
-0.056610107421875,
0.01348876953125,
-0.02642822265625,
0.0433349609375,
0.0267333984375,
-0.0038738250732421875,
-0.0186920166015625,
-0.07452392578125,
-0.0133056640625,
-0.036590576171875,
-0.0022449493408203125,
-0.003864288330078125,
0.01277923583984375,
0.0106353759765625,
-0.006404876708984375,
-0.012969970703125,
-0.00909423828125,
0.01006317138671875,
0.047210693359375,
-0.02618408203125,
-0.0428466796875,
0.00241851806640625,
-0.06011962890625,
0.0309906005859375,
-0.0192108154296875,
-0.0052490234375,
0.028228759765625,
0.05181884765625,
0.0005259513854980469,
0.00518035888671875,
0.02734375,
0.022186279296875,
-0.007434844970703125,
0.00760650634765625,
-0.0027790069580078125,
0.0261383056640625,
0.00823211669921875,
-0.01824951171875,
-0.023681640625,
-0.032470703125,
0.0477294921875,
-0.01047515869140625,
-0.05792236328125,
0.0849609375,
0.002101898193359375,
0.07562255859375,
0.0243072509765625,
-0.0011749267578125,
0.01273345947265625,
0.046722412109375,
0.00691986083984375,
0.0178375244140625,
-0.006717681884765625,
-0.051055908203125,
0.0114593505859375,
-0.01300811767578125,
-0.016510009765625,
0.01458740234375,
0.05078125,
-0.01947021484375,
0.0253448486328125,
-0.053955078125,
-0.0792236328125,
-0.016693115234375,
-0.026275634765625,
0.03363037109375,
-0.002712249755859375,
0.036529541015625,
0.0212249755859375,
0.015869140625,
-0.047637939453125,
0.0176239013671875,
0.006191253662109375,
-0.00905609130859375,
-0.037384033203125,
-0.019622802734375,
-0.036041259765625,
0.0305938720703125,
-0.06884765625,
0.0276947021484375,
-0.05364990234375,
-0.0203399658203125,
-0.0156097412109375,
-0.004497528076171875,
-0.0012922286987304688,
0.00022089481353759766,
0.0007777214050292969,
0.032501220703125,
-0.00453948974609375,
-0.0284881591796875,
0.055938720703125,
0.03277587890625,
-0.039031982421875,
-0.0091400146484375,
-0.0234527587890625,
-0.06866455078125,
-0.007129669189453125,
0.06646728515625,
0.0396728515625,
0.006435394287109375,
-0.0206451416015625,
-0.01396942138671875,
0.0159454345703125,
-0.036468505859375,
0.01099395751953125,
-0.014373779296875,
-0.0188751220703125,
0.00677490234375,
0.01337432861328125,
0.0037670135498046875,
0.0150146484375,
-0.02532958984375,
0.0007863044738769531,
0.024505615234375,
-0.019622802734375,
0.034454345703125,
-0.0210113525390625,
0.00432586669921875,
-0.03411865234375,
-0.0187225341796875,
0.03948974609375,
-0.041168212890625,
0.00623321533203125,
-0.0115814208984375,
0.00560760498046875,
0.0009222030639648438,
0.00872039794921875,
-0.01064300537109375,
0.0046844482421875,
-0.0655517578125,
0.0048980712890625,
0.0297698974609375,
-0.0181121826171875,
0.0928955078125,
-0.043365478515625,
-0.01441192626953125,
0.038818359375,
0.0389404296875,
-0.0216217041015625,
0.005748748779296875,
-0.0008120536804199219,
-0.016693115234375,
0.01471710205078125,
-0.01380157470703125,
0.0220947265625,
-0.0308074951171875,
0.0223236083984375,
-0.0341796875,
0.006137847900390625,
0.023162841796875,
-0.0232391357421875,
0.0645751953125,
-0.00984954833984375,
-0.037628173828125,
0.0079193115234375,
-0.0186309814453125,
0.0205535888671875,
-0.03326416015625,
0.0267333984375,
0.04718017578125,
-0.01030731201171875,
0.0103302001953125,
-0.00609588623046875,
0.0168609619140625,
-0.007080078125,
0.01641845703125,
0.0017118453979492188,
-0.0179901123046875,
-0.0256500244140625,
0.032562255859375,
0.0276031494140625,
0.0899658203125,
-0.00562286376953125,
-0.043304443359375,
-0.007232666015625,
0.03375244140625,
-0.031585693359375,
-0.092529296875,
-0.04827880859375,
-0.03814697265625,
0.01410675048828125,
0.000027835369110107422,
-0.0027313232421875,
0.002040863037109375,
0.016204833984375,
0.0247650146484375,
-0.0299224853515625,
-0.01763916015625,
-0.08544921875,
-0.07696533203125,
-0.0928955078125,
0.010009765625,
-0.017822265625,
0.0216064453125,
0.00363922119140625,
0.0155181884765625,
0.002277374267578125,
-0.03460693359375,
0.0211181640625,
0.0335693359375,
-0.0010967254638671875,
0.0201568603515625,
0.0106658935546875,
-0.0149688720703125,
-0.0245513916015625,
0.0137939453125,
0.003894805908203125,
0.0021953582763671875,
-0.005870819091796875,
-0.0191802978515625,
0.01959228515625,
0.005084991455078125,
0.031036376953125,
0.051483154296875,
-0.0292510986328125,
0.0248260498046875,
0.06890869140625,
-0.020294189453125,
-0.0128021240234375,
-0.00033473968505859375,
-0.0284881591796875,
0.036712646484375,
0.007770538330078125,
-0.0230255126953125,
0.0198974609375,
-0.00415802001953125,
0.043182373046875,
0.03253173828125,
-0.0399169921875,
0.01397705078125,
0.008331298828125,
0.016876220703125,
0.043731689453125,
-0.003780364990234375,
0.00954437255859375,
-0.03265380859375,
-0.039276123046875,
-0.031463623046875,
-0.0234375,
-0.035308837890625,
0.00390625,
-0.031097412109375,
-0.0269622802734375,
0.043853759765625,
0.0433349609375,
0.034820556640625,
-0.02752685546875,
-0.04412841796875,
-0.0207366943359375,
0.07391357421875,
0.032745361328125,
-0.0259246826171875,
-0.025634765625,
0.0035762786865234375,
-0.071533203125,
-0.01300048828125,
-0.030242919921875,
0.02972412109375,
0.0087890625,
-0.009368896484375,
0.001949310302734375,
-0.009246826171875,
-0.0260772705078125,
0.00925445556640625,
-0.0109405517578125,
-0.004543304443359375,
0.0185546875,
-0.0240020751953125,
0.0408935546875,
-0.005268096923828125,
0.0250701904296875,
-0.012603759765625,
0.0149078369140625,
-0.04345703125,
-0.0198974609375,
-0.0088653564453125,
-0.039031982421875,
0.0291900634765625,
0.00962066650390625,
0.03375244140625,
-0.00763702392578125,
0.0102081298828125,
0.0142669677734375,
0.017852783203125,
0.00144195556640625,
-0.01053619384765625,
0.0150604248046875,
-0.022552490234375,
-0.0007605552673339844,
-0.0284881591796875,
-0.0213623046875,
-0.051849365234375,
-0.0272216796875,
-0.01049041748046875,
-0.044952392578125,
0.0170745849609375,
-0.039794921875,
-0.0020160675048828125,
0.0149078369140625,
-0.00909423828125,
-0.0162353515625,
0.038726806640625,
-0.01520538330078125,
-0.0016031265258789062,
-0.0157623291015625,
-0.0215301513671875,
0.04949951171875,
-0.0032958984375,
0.0152130126953125,
-0.0011816024780273438,
0.089111328125,
0.010223388671875,
-0.0263214111328125,
-0.028411865234375,
0.0019969940185546875,
0.045166015625,
0.00289154052734375,
0.005451202392578125,
-0.0013675689697265625,
-0.035400390625,
0.03582763671875,
0.0281982421875,
0.020660400390625,
0.01131439208984375,
0.0082244873046875,
-0.0047607421875,
-0.036102294921875,
0.01323699951171875,
0.00904083251953125,
-0.0271453857421875,
0.0421142578125,
0.02703857421875,
-0.033477783203125,
0.040740966796875,
0.0269012451171875,
-0.01441192626953125,
-0.006076812744140625,
-0.0179901123046875,
-0.038116455078125,
0.010009765625,
-0.08905029296875,
0.006679534912109375,
-0.025115966796875,
0.01519012451171875,
-0.006923675537109375,
0.0330810546875,
0.0130615234375,
0.01116943359375,
0.0038051605224609375,
0.0007843971252441406,
0.03839111328125,
-0.0106201171875,
0.01177215576171875,
-0.006317138671875,
-0.024810791015625,
0.107177734375,
0.01531219482421875,
-0.050537109375,
0.046966552734375,
-0.036407470703125,
-0.039764404296875,
0.0173797607421875,
0.0256805419921875,
0.042999267578125,
-0.00481414794921875,
-0.00926971435546875,
0.00004792213439941406,
-0.0300750732421875,
0.0181884765625,
-0.041961669921875,
-0.0048828125,
0.0005860328674316406,
-0.01690673828125,
0.01165008544921875,
0.03961181640625,
-0.0024967193603515625,
0.0169830322265625,
-0.01446533203125,
0.062255859375,
0.04736328125,
0.053955078125,
0.0232696533203125,
-0.043609619140625,
-0.028472900390625,
0.048553466796875,
-0.05413818359375,
-0.01380157470703125,
-0.00902557373046875,
0.0181121826171875,
0.0008597373962402344,
0.013214111328125,
0.013092041015625,
-0.0021572113037109375,
0.01273345947265625,
-0.005123138427734375,
0.021759033203125,
-0.004848480224609375,
-0.025238037109375,
-0.036712646484375,
-0.013031005859375,
0.0180816650390625,
-0.01316070556640625,
-0.00852203369140625,
-0.00603485107421875,
-0.035552978515625,
-0.015716552734375,
0.0229949951171875,
-0.035614013671875,
-0.018157958984375,
-0.0023365020751953125,
0.0037708282470703125,
-0.028228759765625,
-0.03155517578125,
0.0657958984375,
0.035064697265625,
-0.03570556640625,
-0.03570556640625,
0.03094482421875,
-0.01181793212890625,
0.037628173828125,
-0.04644775390625,
-0.00054168701171875,
0.000018835067749023438,
-0.006168365478515625,
0.05303955078125,
0.031707763671875,
-0.02862548828125,
0.00931549072265625,
-0.016448974609375,
0.0010433197021484375,
0.041351318359375,
-0.0162811279296875,
-0.0196685791015625,
-0.017242431640625,
0.01385498046875,
0.005443572998046875,
0.007297515869140625,
-0.02001953125,
-0.0116424560546875,
0.0226898193359375,
0.025146484375,
-0.00859832763671875,
-0.016387939453125,
0.03564453125,
0.006549835205078125,
0.0262908935546875,
0.0028076171875,
0.017120361328125,
-0.003437042236328125,
-0.031280517578125,
0.00429534912109375,
0.05023193359375,
-0.004917144775390625,
-0.038238525390625,
0.07513427734375,
-0.07171630859375,
0.00165557861328125,
-0.0182647705078125,
0.0016918182373046875,
0.0125885009765625,
-0.0009350776672363281,
-0.02178955078125,
-0.02606201171875,
0.0309295654296875,
-0.006984710693359375,
0.01276397705078125,
-0.032440185546875,
-0.0248260498046875,
0.02618408203125,
0.0426025390625,
-0.0294036865234375,
-0.01251983642578125,
-0.0311431884765625,
-0.009613037109375,
-0.031402587890625,
0.0304718017578125,
0.022064208984375,
0.0035991668701171875,
0.0182342529296875,
0.0066680908203125,
0.01065826416015625,
-0.0185089111328125,
0.0037384033203125,
-0.0413818359375,
0.0048980712890625,
0.04888916015625,
0.0162200927734375,
-0.00980377197265625,
0.0465087890625,
-0.02288818359375,
-0.0099945068359375,
0.044219970703125,
0.03253173828125,
-0.04791259765625,
-0.0135498046875,
-0.0179443359375,
-0.0136566162109375,
0.00963592529296875,
-0.037353515625,
-0.00004857778549194336,
-0.040374755859375,
0.09014892578125,
-0.02606201171875,
-0.01407623291015625,
0.0211334228515625,
-0.032989501953125,
-0.0012302398681640625,
-0.035125732421875,
0.01174163818359375,
0.0186614990234375,
0.0289154052734375,
0.0212860107421875,
-0.0027370452880859375,
0.03253173828125,
-0.00836181640625,
0.0141448974609375,
-0.0202178955078125,
0.00897216796875,
-0.036529541015625,
0.0022640228271484375,
-0.037200927734375,
-0.006687164306640625,
0.00885772705078125,
0.0245208740234375,
0.06158447265625,
0.0391845703125,
0.0283966064453125,
-0.03924560546875,
0.01483154296875,
-0.0026569366455078125,
-0.0360107421875,
-0.0163726806640625,
0.01045989990234375,
0.00994873046875,
-0.060302734375,
0.0328369140625,
-0.039276123046875,
0.00047135353088378906,
-0.01064300537109375,
-0.034271240234375,
0.101318359375,
-0.041900634765625,
-0.0132598876953125,
0.0074920654296875,
0.0297393798828125,
-0.0006818771362304688,
-0.0031490325927734375,
0.026397705078125,
-0.035430908203125,
-0.03802490234375,
0.005451202392578125,
-0.0538330078125,
-0.0007596015930175781,
-0.0163116455078125,
-0.045196533203125,
0.0450439453125,
-0.01074981689453125,
0.0185699462890625,
0.0014886856079101562,
0.01052093505859375,
0.0309906005859375,
0.027587890625,
-0.0469970703125,
0.0498046875,
-0.02880859375,
0.0538330078125,
-0.0209197998046875,
0.0163116455078125,
0.025604248046875,
-0.00391387939453125,
0.04925537109375,
0.0172271728515625,
-0.0380859375,
-0.03289794921875,
-0.01499176025390625,
0.019256591796875,
-0.00958251953125,
0.0389404296875,
-0.0133209228515625,
0.0120086669921875,
0.056793212890625,
-0.01230621337890625,
0.037933349609375,
-0.0161285400390625,
-0.02056884765625,
-0.006519317626953125,
0.01467132568359375,
0.011260986328125,
0.0008282661437988281,
0.032989501953125,
-0.0276336669921875,
-0.01320648193359375,
0.0251007080078125,
-0.0146331787109375,
0.0189056396484375,
0.033660888671875,
0.040618896484375,
-0.031463623046875,
-0.0338134765625,
-0.0129852294921875,
0.043060302734375,
0.01788330078125,
-0.002109527587890625,
0.0007071495056152344,
0.00624847412109375,
0.032806396484375,
-0.01235198974609375,
-0.0134735107421875,
0.03131103515625,
-0.026885986328125,
0.0592041015625,
0.05810546875,
0.0197296142578125,
-0.040618896484375,
-0.061065673828125,
0.0732421875,
0.0982666015625,
-0.03582763671875,
-0.041534423828125,
0.0205535888671875,
0.0134124755859375,
0.007106781005859375,
0.03155517578125,
0.040008544921875,
0.0240478515625,
0.052825927734375,
-0.0723876953125,
0.02947998046875,
0.051727294921875,
-0.01279449462890625,
-0.0096282958984375,
-0.00418853759765625,
-0.03021240234375,
0.0384521484375,
-0.046142578125,
0.000028252601623535156,
0.0257720947265625,
0.048309326171875,
0.01849365234375,
0.01812744140625,
0.005523681640625,
-0.0208740234375,
0.009429931640625,
0.002044677734375,
-0.0162200927734375,
-0.0047454833984375,
-0.0214080810546875,
-0.0556640625,
-0.0159149169921875,
0.0396728515625,
-0.020660400390625,
0.0055694580078125,
-0.0031280517578125,
0.0091552734375,
0.0025196075439453125,
-0.0188140869140625,
-0.0027561187744140625,
-0.0255889892578125,
-0.005767822265625,
0.00013339519500732422,
0.0049591064453125,
0.016510009765625,
0.007678985595703125,
-0.01169586181640625,
0.033660888671875,
0.03131103515625,
0.006305694580078125,
0.042327880859375,
0.0011396408081054688,
-0.018524169921875,
0.006954193115234375,
-0.0038852691650390625,
0.055572509765625,
0.0269927978515625,
-0.050506591796875,
-0.0185699462890625,
0.01279449462890625,
-0.0257110595703125,
-0.01140594482421875,
0.0223541259765625,
-0.006542205810546875,
0.016448974609375,
0.036163330078125,
-0.01806640625,
0.03729248046875,
-0.003505706787109375,
0.00782012939453125,
-0.00565338134765625,
0.023956298828125,
-0.0031604766845703125,
-0.00653839111328125,
0.0025634765625,
0.036407470703125,
-0.0198516845703125,
-0.004913330078125,
0.0193634033203125,
0.003265380859375,
-0.01190948486328125,
-0.021087646484375,
0.049652099609375,
-0.057159423828125,
-0.04718017578125,
0.0869140625,
-0.02459716796875,
-0.00464630126953125,
0.00661468505859375,
-0.063720703125,
0.0272369384765625,
0.0010519027709960938,
0.021270751953125,
0.037017822265625,
-0.0416259765625,
0.0264129638671875,
0.0094757080078125,
-0.004596710205078125,
-0.020782470703125,
-0.05255126953125,
-0.0132293701171875,
0.029815673828125,
0.0189208984375,
0.0499267578125,
-0.015716552734375,
0.033477783203125,
-0.039459228515625,
-0.056243896484375,
-0.004436492919921875,
-0.0526123046875,
-0.01316070556640625,
0.0209503173828125,
0.00968170166015625,
0.0099029541015625,
-0.054168701171875,
-0.0272216796875,
0.01216888427734375,
-0.0116729736328125,
-0.01007080078125,
-0.006816864013671875,
0.0128326416015625,
0.0176544189453125,
0.03924560546875,
0.0325927734375,
-0.0247344970703125,
0.0033702850341796875,
0.045196533203125,
-0.0244598388671875,
0.0290679931640625,
-0.0234527587890625,
-0.020477294921875,
0.006855010986328125,
0.007465362548828125,
0.0229949951171875,
0.041046142578125,
0.0166473388671875,
-0.038116455078125,
0.00617218017578125,
-0.01560211181640625,
-0.009124755859375,
-0.045501708984375,
0.03912353515625,
-0.0017147064208984375,
0.03216552734375,
-0.07110595703125,
0.00548553466796875,
0.0291748046875,
0.0330810546875,
-0.0438232421875,
0.03173828125,
0.0107269287109375,
-0.0289764404296875,
0.038238525390625,
0.013214111328125,
0.0244293212890625,
-0.017852783203125,
-0.0684814453125,
-0.006397247314453125,
0.00153350830078125,
0.031585693359375,
0.03204345703125,
-0.0384521484375,
-0.00634002685546875,
-0.007965087890625,
0.0166473388671875,
-0.032379150390625,
0.0034618377685546875,
-0.0501708984375,
-0.01580810546875,
-0.03778076171875,
0.03765869140625,
0.05712890625,
-0.0254058837890625,
-0.09613037109375,
0.1038818359375,
-0.056243896484375,
-0.021209716796875,
-0.01342010498046875,
-0.00324249267578125,
-0.01410675048828125,
0.0085601806640625,
-0.0013742446899414062,
-0.00801849365234375,
0.007007598876953125,
0.041717529296875,
-0.0175628662109375,
-0.0142669677734375,
0.037017822265625,
-0.0035381317138671875,
-0.0980224609375,
-0.034881591796875,
-0.052154541015625,
-0.03607177734375,
0.0183258056640625,
0.0133514404296875,
0.0260162353515625,
0.06890869140625,
0.0011272430419921875,
-0.040740966796875,
-0.0355224609375,
-0.0865478515625,
-0.04248046875,
-0.0411376953125,
0.006031036376953125,
0.01285552978515625,
0.0557861328125,
0.0765380859375,
0.004131317138671875,
-0.0562744140625,
-0.051483154296875,
-0.048004150390625,
-0.04168701171875,
0.004367828369140625,
0.01546478271484375,
-0.054534912109375,
0.041534423828125,
-0.005016326904296875,
-0.0286102294921875,
0.0033283233642578125,
0.01334381103515625,
-0.050445556640625,
0.01226043701171875,
0.02655029296875,
0.0011701583862304688,
-0.037200927734375,
-0.01505279541015625,
-0.0006690025329589844,
-0.0233612060546875,
-0.0347900390625,
-0.00323486328125,
0.015594482421875,
-0.0350341796875,
0.004852294921875,
0.0222625732421875,
-0.0103607177734375,
-0.0081329345703125,
0.0384521484375,
0.01483154296875,
-0.01151275634765625,
-0.0264129638671875,
-0.0238189697265625,
-0.0044403076171875,
0.0094757080078125,
0.00556182861328125,
0.016082763671875,
-0.002887725830078125,
0.009857177734375,
-0.013397216796875,
0.03466796875,
0.0089111328125,
0.055633544921875,
-0.0066680908203125,
0.03521728515625,
0.023651123046875,
-0.0252227783203125,
0.0384521484375,
-0.025238037109375,
-0.02764892578125,
0.0247802734375,
-0.0251617431640625,
-0.0748291015625,
0.0423583984375,
0.043975830078125,
0.016510009765625,
0.0291290283203125
]
|
6a6c0861b01de0ce4cd50c1ed542ed96a950ea98 | Wordpress Stackexchange
Q: Symlink a directory to wp-content/themes Is it possible to symlink a directory from my project folder to my wp-content/themes folder which is in a Vagrant setup called chassis: https://github.com/Chassis/Chassis ?
I tried to symlink already using ln -s, but my wordpress installation did not recognize it as I did not see it in the Appearance > Themes admin panel. I'm wondering if it's possible to do what I want to do. I'm assuming this is done all the time, but why isn't it working for me?
A: You can add this to your VagrantFile for "shared folders:"
config.vm.synced_folder "/path/to/your/host/projectfolder/theme",
"/path/to/your/vagrant/wp-content/theme",
owner: 'www-data',
group: 'www-data',
mount_options: ["dmode=775", "fmode=664"]
http://docs.vagrantup.com/v2/synced-folders/basic_usage.html
| Q: Symlink a directory to wp-content/themes Is it possible to symlink a directory from my project folder to my wp-content/themes folder which is in a Vagrant setup called chassis: https://github.com/Chassis/Chassis ?
I tried to symlink already using ln -s, but my wordpress installation did not recognize it as I did not see it in the Appearance > Themes admin panel. I'm wondering if it's possible to do what I want to do. I'm assuming this is done all the time, but why isn't it working for me?
A: You can add this to your VagrantFile for "shared folders:"
config.vm.synced_folder "/path/to/your/host/projectfolder/theme",
"/path/to/your/vagrant/wp-content/theme",
owner: 'www-data',
group: 'www-data',
mount_options: ["dmode=775", "fmode=664"]
http://docs.vagrantup.com/v2/synced-folders/basic_usage.html
A: Yes, symlinks are also possible. But maybe you have a problem with the rights of the WP install. Often have the user of the installation, like www, not enough rights for the path from your symlink. The user of the WP install must read inside the custom theme folder, important at first is the style.css, created with your user.
Try this:
chmod 777 /Users/Sam/Projects/SomeTheme
find /Users/Sam/Projects/SomeTheme/ -type f | xargs -I {} chmod 644 {}
find /Users/Sam/Projects/SomeTheme/ -type d | xargs -I {} chmod 755 {}
A: Please make sure that your "style.css" should be in the root folder. If it's not then, the same theme will not visible in the setting along with you can not see any custom attributes in the backend.
So, make sure "style.css" should be in the root theme folder.
| wordpress | {
"language": "en",
"length": 245,
"provenance": "stackexchange_00019.jsonl.gz:449766",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165785"
} | [
0.029022216796875,
-0.01421356201171875,
0.021575927734375,
-0.035675048828125,
-0.0158538818359375,
-0.016632080078125,
0.03558349609375,
-0.01395416259765625,
-0.01325225830078125,
0.0311431884765625,
0.023773193359375,
-0.020660400390625,
0.026580810546875,
-0.044219970703125,
0.0133209228515625,
-0.00603485107421875,
0.0180816650390625,
-0.0072479248046875,
0.031951904296875,
-0.00998687744140625,
0.0085601806640625,
-0.0013332366943359375,
0.016448974609375,
0.0154571533203125,
0.027984619140625,
-0.007965087890625,
0.0294036865234375,
-0.01506805419921875,
0.015594482421875,
-0.0140380859375,
0.0258026123046875,
-0.00988006591796875,
0.01180267333984375,
0.00954437255859375,
0.0208740234375,
0.03326416015625,
0.031707763671875,
-0.003543853759765625,
0.0306243896484375,
0.01018524169921875,
-0.006053924560546875,
-0.00107574462890625,
0.039886474609375,
0.01020050048828125,
0.0020046234130859375,
-0.00795745849609375,
-0.018463134765625,
-0.06756591796875,
0.0188140869140625,
-0.026336669921875,
0.0070343017578125,
0.0304412841796875,
0.0220794677734375,
-0.028778076171875,
-0.00759124755859375,
0.004611968994140625,
-0.049346923828125,
0.021331787109375,
0.024261474609375,
-0.0153961181640625,
-0.0160980224609375,
-0.01849365234375,
0.0222930908203125,
0.00768280029296875,
-0.006229400634765625,
-0.0003192424774169922,
0.0006837844848632812,
0.0284271240234375,
-0.0198822021484375,
-0.0120849609375,
0.001667022705078125,
-0.0113983154296875,
-0.0177764892578125,
-0.0228729248046875,
-0.028839111328125,
0.0272216796875,
0.004093170166015625,
-0.01837158203125,
0.0076141357421875,
0.0262298583984375,
-0.0203094482421875,
-0.01531219482421875,
-0.011749267578125,
-0.058868408203125,
0.043121337890625,
-0.0014925003051757812,
-0.01947021484375,
-0.002780914306640625,
-0.0090179443359375,
0.0137786865234375,
-0.01605224609375,
0.0125579833984375,
0.00679779052734375,
0.031494140625,
-0.022613525390625,
0.004192352294921875,
0.0151824951171875,
0.0162506103515625,
0.03289794921875,
0.047271728515625,
-0.0012655258178710938,
-0.04388427734375,
0.060791015625,
-0.03662109375,
0.0253753662109375,
0.037139892578125,
-0.032440185546875,
-0.01259613037109375,
0.061614990234375,
0.00902557373046875,
0.0016803741455078125,
0.026702880859375,
0.0093994140625,
-0.03717041015625,
-0.0211029052734375,
0.004840850830078125,
-0.03662109375,
0.01009368896484375,
0.01690673828125,
-0.0258331298828125,
-0.0400390625,
-0.00666046142578125,
-0.0154876708984375,
-0.01226043701171875,
0.021087646484375,
0.0012216567993164062,
0.00566864013671875,
0.01523590087890625,
0.035919189453125,
0.039794921875,
-0.0223236083984375,
-0.015716552734375,
0.0020847320556640625,
0.029998779296875,
0.007625579833984375,
-0.0168304443359375,
0.00417327880859375,
0.01448822021484375,
0.00817108154296875,
0.018951416015625,
0.004451751708984375,
-0.0345458984375,
0.01045989990234375,
-0.0101165771484375,
0.0033245086669921875,
0.030059814453125,
0.0184478759765625,
0.0175933837890625,
-0.0130767822265625,
-0.05596923828125,
0.01209259033203125,
-0.01171112060546875,
0.0196685791015625,
0.004486083984375,
0.00955963134765625,
-0.005962371826171875,
-0.0037708282470703125,
-0.000530242919921875,
-0.015777587890625,
0.0024852752685546875,
0.0242919921875,
-0.0055999755859375,
0.03436279296875,
0.0261077880859375,
-0.016998291015625,
0.0228271484375,
-0.053619384765625,
-0.01384735107421875,
0.0151519775390625,
-0.006778717041015625,
0.007297515869140625,
-0.0030574798583984375,
0.0210113525390625,
-0.01898193359375,
-0.0014123916625976562,
0.00146484375,
0.0416259765625,
0.0212249755859375,
0.020965576171875,
0.03411865234375,
0.007503509521484375,
-0.0166015625,
0.0855712890625,
-0.03961181640625,
-0.0131378173828125,
-0.0007162094116210938,
0.0242156982421875,
0.058929443359375,
0.015350341796875,
0.032989501953125,
-0.030242919921875,
-0.004734039306640625,
-0.024017333984375,
0.00415802001953125,
-0.044647216796875,
-0.0265960693359375,
-0.0037975311279296875,
0.0158233642578125,
-0.02655029296875,
0.0196380615234375,
-0.0109405517578125,
-0.0108489990234375,
0.026458740234375,
-0.01200103759765625,
-0.0089874267578125,
-0.00614166259765625,
-0.007843017578125,
0.01099395751953125,
-0.0025501251220703125,
-0.01251220703125,
0.0023670196533203125,
0.005199432373046875,
0.005847930908203125,
-0.101318359375,
-0.04296875,
0.05987548828125,
-0.0155487060546875,
0.0171051025390625,
-0.030120849609375,
0.06781005859375,
-0.0268096923828125,
-0.04730224609375,
-0.03057861328125,
0.0178375244140625,
-0.01038360595703125,
-0.007717132568359375,
-0.016510009765625,
-0.002193450927734375,
-0.032012939453125,
0.036834716796875,
-0.006458282470703125,
-0.01450347900390625,
-0.0162506103515625,
-0.00981903076171875,
-0.033233642578125,
0.01276397705078125,
0.0030040740966796875,
0.007251739501953125,
0.007434844970703125,
0.034942626953125,
0.03619384765625,
0.055389404296875,
-0.0177764892578125,
-0.034942626953125,
0.07147216796875,
-0.0223388671875,
0.0240936279296875,
-0.036834716796875,
0.0267333984375,
0.00894927978515625,
0.0242462158203125,
-0.010894775390625,
0.033355712890625,
-0.0113372802734375,
0.0015802383422851562,
0.036102294921875,
0.000736236572265625,
-0.0015764236450195312,
-0.0316162109375,
0.01340484619140625,
0.0157928466796875,
-0.029052734375,
-0.057220458984375,
-0.004550933837890625,
-0.00992584228515625,
-0.0072174072265625,
-0.0025234222412109375,
-0.0031528472900390625,
-0.0103912353515625,
-0.00966644287109375,
0.027069091796875,
-0.0152740478515625,
0.01358795166015625,
0.0231170654296875,
0.0293426513671875,
0.0139312744140625,
0.004665374755859375,
-0.0302581787109375,
0.0080718994140625,
0.004283905029296875,
-0.0723876953125,
-0.0321044921875,
-0.050872802734375,
-0.0302734375,
-0.00968170166015625,
-0.05401611328125,
0.004787445068359375,
-0.06494140625,
-0.0032329559326171875,
0.0108795166015625,
0.0305328369140625,
0.020782470703125,
-0.012054443359375,
0.0265960693359375,
-0.0219573974609375,
-0.017333984375,
0.068603515625,
-0.0024852752685546875,
0.0183258056640625,
-0.0212860107421875,
-0.0018529891967773438,
0.0198822021484375,
0.0026111602783203125,
-0.053497314453125,
0.01154327392578125,
0.0106964111328125,
0.020538330078125,
-0.005313873291015625,
-0.0139007568359375,
0.0139007568359375,
-0.0736083984375,
-0.034942626953125,
0.0389404296875,
-0.01416778564453125,
0.00325775146484375,
-0.0267486572265625,
-0.044525146484375,
0.0229949951171875,
-0.125732421875,
-0.07733154296875,
0.04364013671875,
-0.03961181640625,
0.0009512901306152344,
0.010223388671875,
-0.02716064453125,
-0.0318603515625,
0.0494384765625,
-0.004119873046875,
0.03179931640625,
-0.04449462890625,
-0.06427001953125,
-0.04827880859375,
-0.075927734375,
-0.01523590087890625,
-0.0042572021484375,
-0.0125274658203125,
0.01264190673828125,
0.0039043426513671875,
0.00006002187728881836,
-0.018585205078125,
0.03240966796875,
0.08673095703125,
0.00983428955078125,
0.0014400482177734375,
0.01158905029296875,
-0.0130462646484375,
0.0142364501953125,
-0.004825592041015625,
0.0650634765625,
0.03912353515625,
-0.041351318359375,
-0.009124755859375,
-0.01180267333984375,
-0.0016374588012695312,
0.0177154541015625,
-0.004634857177734375,
0.02471923828125,
0.0193939208984375,
0.022216796875,
-0.0183258056640625,
-0.032135009765625,
-0.016143798828125,
-0.061767578125,
0.0085296630859375,
0.051971435546875,
-0.01532745361328125,
-0.0169219970703125,
-0.01837158203125,
-0.00017571449279785156,
0.0126953125,
0.0176544189453125,
-0.0015649795532226562,
0.0477294921875,
-0.0268402099609375,
-0.0265045166015625,
-0.0364990234375,
0.07147216796875,
-0.0023097991943359375,
0.0271453857421875,
0.0269012451171875,
0.00542449951171875,
-0.0257720947265625,
-0.00438690185546875,
-0.07757568359375,
-0.044677734375,
0.0330810546875,
-0.0164337158203125,
0.0404052734375,
-0.023223876953125,
-0.025604248046875,
-0.0010251998901367188,
0.0867919921875,
-0.0914306640625,
-0.02557373046875,
0.0278778076171875,
0.03936767578125,
-0.01256561279296875,
-0.0083770751953125,
-0.025390625,
-0.032318115234375,
-0.039337158203125,
-0.029510498046875,
-0.020294189453125,
-0.0285186767578125,
0.020965576171875,
-0.09478759765625,
-0.0026874542236328125,
-0.056488037109375,
0.038299560546875,
0.019256591796875,
0.0238494873046875,
0.0213623046875,
0.01001739501953125,
0.001598358154296875,
-0.0328369140625,
-0.00418853759765625,
-0.109375,
-0.01287841796875,
0.0105743408203125,
0.054443359375,
-0.01073455810546875,
-0.026885986328125,
-0.043182373046875,
0.039398193359375,
-0.0231475830078125,
0.0141448974609375,
0.0023555755615234375,
0.018707275390625,
-0.0104522705078125,
0.01361083984375,
0.007122039794921875,
-0.01142120361328125,
0.00970458984375,
-0.036285400390625,
-0.056427001953125,
0.0109405517578125,
-0.02154541015625,
0.050140380859375,
0.006214141845703125,
-0.0198974609375,
-0.0294647216796875,
-0.00009196996688842773,
-0.0399169921875,
0.00464630126953125,
-0.0289306640625,
-0.0231475830078125,
-0.0166778564453125,
-0.04608154296875,
0.0692138671875,
-0.0009188652038574219,
0.0301361083984375,
-0.016387939453125,
0.09033203125,
0.0009937286376953125,
-0.038726806640625,
0.025970458984375,
0.060516357421875,
0.0263671875,
0.007404327392578125,
0.0384521484375,
0.0040740966796875,
0.0029544830322265625,
0.0107269287109375,
-0.008148193359375,
-0.0462646484375,
0.0249786376953125,
0.0078582763671875,
0.0268096923828125,
-0.00766754150390625,
-0.032012939453125,
-0.019287109375,
0.03167724609375,
0.02313232421875,
-0.01308441162109375,
0.0148468017578125,
-0.0227203369140625,
0.00864410400390625,
0.003314971923828125,
0.003696441650390625,
-0.03228759765625,
-0.0537109375,
0.01328277587890625,
-0.06109619140625,
0.08343505859375,
0.0023670196533203125,
-0.00901031494140625,
0.08160400390625,
0.056060791015625,
-0.00983428955078125,
0.0192108154296875,
0.0188140869140625,
0.0005164146423339844,
0.0133056640625,
0.03900146484375,
-0.0108642578125,
-0.0195159912109375,
-0.0030841827392578125,
0.0223846435546875,
0.043792724609375,
0.0081634521484375,
-0.0196990966796875,
0.002964019775390625,
0.03717041015625,
-0.0247802734375,
-0.0178985595703125,
0.036468505859375,
0.0029926300048828125,
-0.0292816162109375,
0.00859832763671875,
-0.0011186599731445312,
-0.046112060546875,
-0.0418701171875,
-0.00289154052734375,
-0.041351318359375,
-0.00592803955078125,
0.0290374755859375,
-0.0172882080078125,
-0.03887939453125,
0.01367950439453125,
0.0011444091796875,
-0.01013946533203125,
0.0168304443359375,
0.015655517578125,
0.03607177734375,
-0.0105438232421875,
-0.0007843971252441406,
-0.0377197265625,
0.013824462890625,
-0.0298309326171875,
0.007549285888671875,
0.04345703125,
0.066162109375,
-0.0067596435546875,
-0.02374267578125,
-0.0115966796875,
-0.0452880859375,
0.0000769495964050293,
-0.021636962890625,
-0.04656982421875,
-0.0108184814453125,
-0.0156402587890625,
-0.000015020370483398438,
0.027618408203125,
0.0057525634765625,
-0.012847900390625,
-0.00479888916015625,
-0.0347900390625,
-0.04461669921875,
0.09124755859375,
-0.0677490234375,
-0.01459503173828125,
0.0024261474609375,
-0.01446533203125,
0.0124053955078125,
0.037017822265625,
-0.11346435546875,
-0.047332763671875,
-0.0171051025390625,
0.00018966197967529297,
0.0689697265625,
-0.005809783935546875,
0.042449951171875,
-0.021331787109375,
-0.042510986328125,
0.024383544921875,
-0.0004363059997558594,
0.05426025390625,
0.00815582275390625,
-0.07452392578125,
0.0077667236328125,
-0.01462554931640625,
0.00843048095703125,
0.01497650146484375,
-0.01342010498046875,
-0.040679931640625,
-0.00672149658203125,
0.02056884765625,
-0.0159149169921875,
0.0141143798828125,
-0.016143798828125,
-0.03460693359375,
0.04473876953125,
0.050445556640625,
-0.01366424560546875,
0.00684356689453125,
0.05010986328125,
-0.00833892822265625,
0.0271759033203125,
-0.0025501251220703125,
0.00231170654296875,
-0.050872802734375,
0.004566192626953125,
-0.01470184326171875,
-0.045928955078125,
-0.006839752197265625,
0.01837158203125,
0.020416259765625,
0.045196533203125,
0.025634765625,
0.00881195068359375,
0.0010309219360351562,
-0.03265380859375,
-0.01107025146484375,
-0.0242767333984375,
0.058258056640625,
-0.032745361328125,
-0.018096923828125,
0.0312042236328125,
-0.019195556640625,
0.01551055908203125,
0.00554656982421875,
-0.0014276504516601562,
0.033111572265625,
-0.0191497802734375,
0.0186004638671875,
0.031463623046875,
-0.06146240234375,
0.080322265625,
0.08526611328125,
0.01409149169921875,
0.041900634765625,
0.0037860870361328125,
-0.004917144775390625,
0.0016698837280273438,
0.06036376953125,
-0.0032100677490234375,
-0.0306243896484375,
0.06683349609375,
0.04083251953125,
-0.006122589111328125,
0.04571533203125,
-0.0205230712890625,
-0.004039764404296875,
-0.018585205078125,
0.0147552490234375,
-0.00469207763671875,
0.00035762786865234375,
-0.006122589111328125,
-0.006229400634765625,
0.0299224853515625,
-0.01000213623046875,
0.00566864013671875,
-0.0032215118408203125,
0.041748046875,
0.0020847320556640625,
-0.0033893585205078125,
0.0283203125,
-0.01399993896484375,
-0.004528045654296875,
0.0228424072265625,
-0.0207672119140625,
-0.013214111328125,
0.004100799560546875,
-0.054473876953125,
0.0207366943359375,
-0.0197601318359375,
-0.006366729736328125,
-0.010162353515625,
-0.035552978515625,
-0.03216552734375,
-0.0239105224609375,
-0.02325439453125,
-0.033782958984375,
0.012969970703125,
0.0008015632629394531,
0.004932403564453125,
0.05078125,
0.031707763671875,
0.0005087852478027344,
-0.0008292198181152344,
-0.0026836395263671875,
0.0304107666015625,
0.027801513671875,
0.003021240234375,
0.0022678375244140625,
0.0250091552734375,
-0.01305389404296875,
0.006420135498046875,
0.0002627372741699219,
0.0089569091796875,
-0.01497650146484375,
0.0024585723876953125,
0.0584716796875,
-0.052764892578125,
-0.0028476715087890625,
0.035888671875,
0.005237579345703125,
-0.01873779296875,
0.03668212890625,
0.051422119140625,
-0.0557861328125,
-0.0428466796875,
0.04229736328125,
-0.03436279296875,
-0.0149993896484375,
0.044189453125,
-0.046539306640625,
0.0772705078125,
-0.0160064697265625,
0.0193328857421875,
0.002880096435546875,
0.041229248046875,
0.006198883056640625,
0.018890380859375,
-0.01898193359375,
0.061798095703125,
0.0305023193359375,
0.0052032470703125,
-0.037811279296875,
-0.00728607177734375,
0.004322052001953125,
0.0181427001953125,
0.01520538330078125,
0.0156097412109375,
-0.041351318359375,
-0.02459716796875,
0.0007171630859375,
0.05450439453125,
0.0219573974609375,
0.01898193359375,
-0.018402099609375,
0.00418853759765625,
-0.023040771484375,
-0.033935546875,
0.01041412353515625,
-0.031585693359375,
-0.052734375,
-0.0018482208251953125,
0.0250091552734375,
0.04022216796875,
0.046173095703125,
0.01200103759765625,
-0.052215576171875,
0.035308837890625,
0.05889892578125,
-0.0321044921875,
0.0413818359375,
-0.06439208984375,
-0.0190277099609375,
-0.00785064697265625,
-0.0201873779296875,
0.003604888916015625,
0.01355743408203125,
-0.00830841064453125,
-0.00649261474609375,
-0.0105743408203125,
0.0081634521484375,
-0.03741455078125,
-0.013580322265625,
-0.0218658447265625,
0.0272674560546875,
-0.038543701171875,
0.0382080078125,
0.025543212890625,
0.023895263671875,
-0.022186279296875,
0.01287841796875,
-0.0025234222412109375,
0.0338134765625,
-0.04052734375,
-0.0452880859375,
0.0281524658203125,
0.018341064453125,
-0.016632080078125,
0.004283905029296875,
-0.0379638671875,
-0.0201263427734375,
0.035552978515625,
-0.00839996337890625,
-0.0194091796875,
0.014984130859375,
0.019561767578125,
0.0087890625,
0.0146484375,
0.01486968994140625,
-0.0211334228515625,
-0.00009721517562866211,
0.061279296875,
0.01314544677734375,
-0.02484130859375,
-0.0714111328125,
0.057220458984375,
-0.004970550537109375,
0.045562744140625,
0.01358795166015625,
0.04034423828125,
0.012603759765625,
-0.0207061767578125,
-0.035430908203125,
-0.06561279296875,
0.034576416015625,
0.036346435546875,
0.032989501953125,
-0.005756378173828125,
0.040496826171875,
0.05615234375,
0.0160064697265625,
-0.004856109619140625,
0.00865936279296875,
-0.004863739013671875,
-0.005718231201171875,
-0.0061492919921875,
-0.00162506103515625,
0.020782470703125,
-0.01025390625,
-0.0263214111328125,
0.036712646484375,
0.0261077880859375,
-0.02783203125,
0.0484619140625,
-0.0184783935546875,
0.0034084320068359375,
0.018768310546875,
-0.044219970703125,
-0.00312042236328125,
-0.01335906982421875,
0.021148681640625,
-0.01177978515625,
0.01561737060546875,
0.02215576171875,
-0.0311126708984375,
0.0241851806640625,
0.039337158203125,
-0.0194854736328125,
0.00432586669921875,
-0.004673004150390625,
0.0027523040771484375,
0.00601959228515625,
0.00455474853515625,
0.023651123046875,
0.0266571044921875,
0.0149688720703125,
-0.01165771484375,
-0.039703369140625,
0.0025844573974609375,
0.08056640625,
-0.040130615234375,
0.119140625,
-0.0703125,
0.0022754669189453125,
-0.02490234375,
0.006134033203125,
-0.026519775390625,
-0.025665283203125,
0.01253509521484375,
0.007534027099609375,
0.0081939697265625,
-0.00901031494140625,
-0.05047607421875,
-0.025726318359375,
0.050933837890625,
-0.058197021484375,
-0.01129150390625,
0.0017309188842773438,
0.0290069580078125,
-0.0187835693359375,
0.00708770751953125,
-0.033477783203125,
-0.060516357421875,
-0.0517578125,
0.0222015380859375,
0.0016431808471679688,
0.01355743408203125,
-0.02874755859375,
0.034515380859375,
-0.0012388229370117188,
-0.0288543701171875,
0.0171966552734375,
-0.03826904296875,
0.01248931884765625,
0.0294952392578125,
0.00965118408203125,
-0.06817626953125,
0.01039886474609375,
0.0022220611572265625,
-0.02398681640625,
0.01346588134765625,
0.0606689453125,
0.004703521728515625,
-0.006885528564453125,
-0.0011224746704101562,
0.03704833984375,
0.0286865234375,
-0.0194244384765625,
0.0249481201171875,
0.02001953125,
-0.0070648193359375,
0.0232696533203125,
-0.046905517578125,
-0.0245819091796875,
-0.0169219970703125,
-0.0168304443359375,
0.035430908203125,
-0.0242767333984375,
-0.05267333984375,
-0.0814208984375,
-0.0126953125,
0.03875732421875,
0.0000426173210144043,
-0.039947509765625,
0.00885772705078125,
-0.02178955078125,
0.0173187255859375,
0.00010448694229125977,
0.02471923828125,
-0.021514892578125,
-0.00531005859375,
-0.038299560546875,
-0.04974365234375,
-0.040985107421875,
0.04620361328125,
-0.044769287109375,
-0.005107879638671875,
0.00746917724609375,
0.0005517005920410156,
0.041351318359375,
-0.0151519775390625,
-0.018310546875,
0.043487548828125,
-0.005695343017578125,
-0.01123046875,
-0.01303863525390625,
0.01247406005859375,
-0.0010938644409179688,
-0.062164306640625,
-0.00708770751953125,
-0.0210113525390625,
0.01471710205078125,
0.04791259765625,
-0.0267486572265625,
0.002834320068359375,
-0.04461669921875,
-0.07220458984375,
-0.040435791015625,
0.03961181640625,
-0.060516357421875,
-0.0330810546875,
-0.0273895263671875,
-0.0186614990234375,
0.038848876953125,
-0.0178985595703125,
-0.00012093782424926758,
-0.033294677734375,
0.04693603515625,
0.00490570068359375,
0.005443572998046875,
0.0015993118286132812,
0.038818359375,
-0.0187835693359375,
0.0325927734375,
0.00905609130859375,
-0.0277252197265625,
0.007480621337890625,
-0.0016317367553710938,
0.0171661376953125,
0.06768798828125,
-0.004650115966796875,
-0.030181884765625,
-0.009033203125,
-0.07275390625,
-0.01180267333984375,
-0.0391845703125,
-0.01532745361328125,
-0.031280517578125,
0.0684814453125,
0.01496124267578125,
0.014862060546875,
-0.00786590576171875,
-0.0556640625,
-0.08599853515625,
0.00616455078125,
-0.0233154296875,
0.010589599609375,
-0.08514404296875,
0.01873779296875,
0.0300140380859375,
0.016632080078125,
-0.005931854248046875,
-0.04705810546875,
0.0015125274658203125,
-0.026824951171875,
-0.0021762847900390625,
0.0139923095703125,
0.0202178955078125,
0.0125274658203125,
0.060577392578125,
-0.019439697265625,
0.05511474609375,
-0.0176239013671875,
0.00965118408203125,
0.06500244140625,
0.004512786865234375,
0.003814697265625,
-0.005779266357421875,
-0.0212860107421875,
0.0323486328125,
-0.01226043701171875,
0.05023193359375,
-0.044403076171875,
-0.0254974365234375,
0.036285400390625,
0.00909423828125,
-0.032867431640625,
0.0007390975952148438,
-0.0037326812744140625,
0.000514984130859375,
-0.054779052734375,
0.09674072265625,
-0.035369873046875,
0.00823211669921875,
0.00720977783203125,
0.00492095947265625,
-0.113037109375,
0.04107666015625,
-0.060760498046875,
-0.02825927734375,
0.013580322265625,
-0.00661468505859375,
0.0279541015625,
-0.037628173828125,
0.028900146484375,
-0.0110931396484375,
0.00933074951171875,
0.0167999267578125
]
|
e1f456c7ae5c9bfa9b16fd5525ca3cef7fd07f41 | Wordpress Stackexchange
Q: Website Loads Twice Unnecessarily When I use tools.pingdom.com, I can see that my website is loading twice unnecessarily. The first time www.junkluggers.com is loaded, a cookie is set. Then part way through the loading process, www.junkluggers.com is loaded again, this time containing the cookie that was previously set and cached. I'm assuming this double loading is unnecessary. How can I prevent it?
The test: http://tools.pingdom.com/fpt/#!/dQNuas/http://junkluggers.com
The first loading:
The second loading, now with the cookie:
A: As I've found, this happens when your html, css or javascript tries to load a resource and you haven't specified a path or wrongly specified root.
For instance, I've seen examples on people having this problem while doing
<img src="http://example.com" />
background:url();
In my case specifically, was assigning $.ajax() to a global variable so I could work with it later, like this
var map_markers = $.ajax();
clearly I don't know enough javascript, regardless, this $.ajax() was causing the site to load twice.
Hope this helps someone googling. If you suspect this is happening, http://tools.pingdom.com/ will show you what loads in your site.
| Q: Website Loads Twice Unnecessarily When I use tools.pingdom.com, I can see that my website is loading twice unnecessarily. The first time www.junkluggers.com is loaded, a cookie is set. Then part way through the loading process, www.junkluggers.com is loaded again, this time containing the cookie that was previously set and cached. I'm assuming this double loading is unnecessary. How can I prevent it?
The test: http://tools.pingdom.com/fpt/#!/dQNuas/http://junkluggers.com
The first loading:
The second loading, now with the cookie:
A: As I've found, this happens when your html, css or javascript tries to load a resource and you haven't specified a path or wrongly specified root.
For instance, I've seen examples on people having this problem while doing
<img src="http://example.com" />
background:url();
In my case specifically, was assigning $.ajax() to a global variable so I could work with it later, like this
var map_markers = $.ajax();
clearly I don't know enough javascript, regardless, this $.ajax() was causing the site to load twice.
Hope this helps someone googling. If you suspect this is happening, http://tools.pingdom.com/ will show you what loads in your site.
| wordpress | {
"language": "en",
"length": 179,
"provenance": "stackexchange_00019.jsonl.gz:449775",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165803"
} | [
0.07574462890625,
-0.011138916015625,
0.0225982666015625,
-0.0305328369140625,
0.004070281982421875,
-0.0236968994140625,
0.02484130859375,
-0.032989501953125,
-0.04217529296875,
0.0499267578125,
-0.053436279296875,
0.043060302734375,
-0.01385498046875,
0.0217742919921875,
-0.0236968994140625,
-0.0306549072265625,
0.0261383056640625,
-0.018890380859375,
0.02593994140625,
-0.01439666748046875,
0.03143310546875,
-0.004222869873046875,
0.0007128715515136719,
0.035736083984375,
0.0142364501953125,
-0.055206298828125,
0.0736083984375,
-0.0278167724609375,
0.0275421142578125,
-0.026092529296875,
0.0259857177734375,
0.0013818740844726562,
-0.0015544891357421875,
0.03363037109375,
-0.0022716522216796875,
-0.0460205078125,
0.015472412109375,
0.00313568115234375,
-0.0134124755859375,
0.038787841796875,
-0.01493072509765625,
0.0155181884765625,
0.01099395751953125,
0.0196685791015625,
-0.016387939453125,
-0.02783203125,
0.0094757080078125,
-0.035552978515625,
0.0113525390625,
-0.02008056640625,
0.041961669921875,
0.0021038055419921875,
0.043670654296875,
-0.004634857177734375,
-0.0285186767578125,
-0.0159454345703125,
-0.0352783203125,
0.039031982421875,
0.0179901123046875,
0.01042938232421875,
0.009918212890625,
-0.00335693359375,
0.0002446174621582031,
0.00927734375,
-0.026458740234375,
-0.006557464599609375,
0.0118865966796875,
-0.0018606185913085938,
-0.05169677734375,
-0.0295257568359375,
0.0333251953125,
-0.0210113525390625,
-0.0017070770263671875,
-0.0033855438232421875,
-0.0574951171875,
-0.0129852294921875,
0.01837158203125,
-0.0260467529296875,
0.010894775390625,
-0.023406982421875,
-0.00545501708984375,
-0.036163330078125,
-0.026519775390625,
0.01548004150390625,
-0.00762939453125,
0.050689697265625,
-0.0130767822265625,
-0.0106964111328125,
-0.004589080810546875,
-0.0032806396484375,
-0.00337982177734375,
-0.047027587890625,
0.00870513916015625,
0.015899658203125,
-0.01071929931640625,
-0.026580810546875,
0.018707275390625,
0.06640625,
-0.0027942657470703125,
-0.0014333724975585938,
-0.0572509765625,
-0.00762176513671875,
-0.041015625,
-0.0268096923828125,
0.0037899017333984375,
0.0128173828125,
0.0230560302734375,
0.01149749755859375,
0.04449462890625,
0.00637054443359375,
-0.00563812255859375,
0.078125,
0.0224456787109375,
0.0035152435302734375,
-0.0222015380859375,
-0.043701171875,
-0.032318115234375,
0.01372528076171875,
0.003864288330078125,
-0.019439697265625,
-0.01151275634765625,
0.0117645263671875,
-0.02899169921875,
-0.0106964111328125,
-0.0105133056640625,
-0.0389404296875,
-0.006298065185546875,
0.0044097900390625,
-0.0117340087890625,
-0.035491943359375,
0.00827789306640625,
0.027191162109375,
0.03326416015625,
0.031463623046875,
-0.008148193359375,
0.003444671630859375,
0.0443115234375,
-0.005229949951171875,
0.00775146484375,
0.0265960693359375,
-0.030242919921875,
-0.05743408203125,
-0.010284423828125,
-0.033477783203125,
-0.00833892822265625,
-0.0140533447265625,
0.0020351409912109375,
0.0277862548828125,
0.005611419677734375,
0.01070404052734375,
-0.0016069412231445312,
-0.0250244140625,
0.03912353515625,
0.01143646240234375,
-0.0298919677734375,
-0.038848876953125,
0.0089874267578125,
-0.04302978515625,
0.003108978271484375,
-0.0462646484375,
-0.0212860107421875,
-0.0015411376953125,
0.0117340087890625,
-0.06463623046875,
-0.03997802734375,
-0.030059814453125,
-0.004974365234375,
0.00811004638671875,
0.0156097412109375,
-0.0721435546875,
0.031585693359375,
0.035003662109375,
-0.006198883056640625,
-0.01134490966796875,
0.0284271240234375,
-0.0003478527069091797,
0.05194091796875,
0.00025582313537597656,
0.0333251953125,
-0.0258331298828125,
-0.0523681640625,
-0.0404052734375,
0.10577392578125,
-0.060546875,
-0.054779052734375,
0.0234527587890625,
-0.0023956298828125,
0.061798095703125,
0.0224609375,
0.015869140625,
-0.00637054443359375,
-0.00911712646484375,
-0.0033969879150390625,
0.04290771484375,
0.00492095947265625,
-0.0516357421875,
0.0062408447265625,
-0.0061798095703125,
-0.0037689208984375,
-0.0157623291015625,
0.00939178466796875,
0.0177154541015625,
-0.01611328125,
0.021514892578125,
-0.05157470703125,
0.0182037353515625,
-0.0236663818359375,
0.02789306640625,
0.0277252197265625,
0.04522705078125,
0.00423431396484375,
0.0115203857421875,
-0.03765869140625,
0.004913330078125,
-0.031463623046875,
-0.0175323486328125,
-0.0167236328125,
0.05462646484375,
-0.0153961181640625,
0.015594482421875,
-0.01885986328125,
-0.034637451171875,
-0.002651214599609375,
0.0044708251953125,
0.03961181640625,
-0.007549285888671875,
-0.022125244140625,
-0.0158843994140625,
0.02197265625,
-0.0150146484375,
-0.002166748046875,
0.06719970703125,
0.019989013671875,
0.06402587890625,
0.016754150390625,
-0.01119232177734375,
-0.0247650146484375,
-0.09124755859375,
0.0175018310546875,
0.046478271484375,
0.0198211669921875,
-0.0191497802734375,
-0.01435089111328125,
0.051910400390625,
0.004608154296875,
-0.060333251953125,
-0.018310546875,
0.0423583984375,
0.015106201171875,
-0.022216796875,
-0.0036163330078125,
-0.0290985107421875,
0.04974365234375,
-0.0014276504516601562,
0.04620361328125,
0.0212860107421875,
-0.0272369384765625,
-0.029388427734375,
-0.006992340087890625,
0.0028018951416015625,
-0.0009255409240722656,
0.0160064697265625,
0.0108642578125,
-0.0034999847412109375,
0.007076263427734375,
-0.055694580078125,
-0.0009226799011230469,
-0.00615692138671875,
0.019561767578125,
-0.048858642578125,
0.0084686279296875,
-0.038421630859375,
-0.00829315185546875,
-0.003353118896484375,
0.06915283203125,
-0.05523681640625,
-0.010833740234375,
-0.004055023193359375,
-0.01016998291015625,
-0.0174560546875,
-0.025848388671875,
-0.033599853515625,
-0.053955078125,
0.0005564689636230469,
0.00608062744140625,
-0.0305633544921875,
0.0160675048828125,
0.026763916015625,
-0.029693603515625,
-0.0192413330078125,
0.01535797119140625,
0.037109375,
-0.006496429443359375,
0.0189056396484375,
-0.03662109375,
-0.0095977783203125,
0.0458984375,
-0.0256195068359375,
0.0256805419921875,
0.00684356689453125,
0.036834716796875,
0.06756591796875,
0.033599853515625,
-0.0052337646484375,
0.0007920265197753906,
0.0014123916625976562,
0.0177459716796875,
-0.03521728515625,
-0.03704833984375,
-0.003139495849609375,
-0.038330078125,
0.0272064208984375,
0.03778076171875,
0.0474853515625,
-0.0135345458984375,
-0.026397705078125,
-0.031768798828125,
0.024932861328125,
-0.09271240234375,
-0.09954833984375,
-0.06866455078125,
0.0038852691650390625,
0.0814208984375,
-0.004489898681640625,
0.048492431640625,
-0.039306640625,
-0.006134033203125,
0.0299530029296875,
-0.06256103515625,
-0.0239715576171875,
-0.0215911865234375,
-0.0712890625,
-0.047637939453125,
0.0199432373046875,
0.00594329833984375,
0.0226593017578125,
0.00904083251953125,
-0.023468017578125,
-0.01497650146484375,
-0.008270263671875,
0.00998687744140625,
0.005157470703125,
0.0017824172973632812,
-0.039764404296875,
-0.033203125,
-0.0011796951293945312,
0.016693115234375,
0.0016031265258789062,
0.004741668701171875,
-0.01371002197265625,
0.0301361083984375,
-0.0355224609375,
-0.007659912109375,
-0.00374603271484375,
0.01320648193359375,
-0.021453857421875,
0.00279998779296875,
0.012969970703125,
0.01078033447265625,
-0.035675048828125,
0.015960693359375,
0.0016832351684570312,
-0.0458984375,
-0.041351318359375,
0.0654296875,
-0.039764404296875,
0.00415802001953125,
-0.0745849609375,
0.016021728515625,
0.01007080078125,
0.024871826171875,
-0.008697509765625,
0.01369476318359375,
-0.033172607421875,
-0.00829315185546875,
-0.0263519287109375,
0.019775390625,
-0.047332763671875,
-0.01194000244140625,
-0.01171112060546875,
0.005443572998046875,
0.01194000244140625,
-0.03875732421875,
-0.0298614501953125,
0.0428466796875,
0.01122283935546875,
-0.0183868408203125,
0.0162506103515625,
0.0010433197021484375,
-0.004650115966796875,
-0.031982421875,
-0.002429962158203125,
-0.028594970703125,
0.00896453857421875,
0.0355224609375,
0.009033203125,
-0.03729248046875,
-0.012603759765625,
-0.0947265625,
-0.01265716552734375,
-0.05975341796875,
-0.0013561248779296875,
-0.00740814208984375,
-0.0309600830078125,
-0.01285552978515625,
0.0096588134765625,
-0.01593017578125,
-0.0297393798828125,
0.01371002197265625,
-0.056427001953125,
-0.002658843994140625,
-0.01094818115234375,
-0.0014009475708007812,
-0.03515625,
-0.003818511962890625,
-0.04217529296875,
-0.0004963874816894531,
-0.00991058349609375,
-0.00954437255859375,
0.006183624267578125,
0.040374755859375,
-0.04052734375,
0.02197265625,
0.02520751953125,
0.005123138427734375,
-0.0031070709228515625,
0.0024471282958984375,
-0.026702880859375,
0.01776123046875,
0.076171875,
0.01291656494140625,
0.023712158203125,
0.0186767578125,
0.0018243789672851562,
-0.061981201171875,
0.00658416748046875,
-0.0282440185546875,
0.02716064453125,
0.0169830322265625,
-0.04364013671875,
-0.0100860595703125,
-0.01251983642578125,
-0.0024280548095703125,
0.0005717277526855469,
0.0254058837890625,
-0.028564453125,
-0.00011986494064331055,
-0.006008148193359375,
-0.0166473388671875,
-0.0182952880859375,
-0.0187835693359375,
0.0190277099609375,
0.01113128662109375,
0.0254974365234375,
0.003253936767578125,
0.02838134765625,
0.007476806640625,
0.016357421875,
-0.033966064453125,
0.0684814453125,
0.059295654296875,
0.0097808837890625,
0.00799560546875,
-0.022216796875,
0.0250244140625,
0.00807952880859375,
0.031463623046875,
-0.007389068603515625,
-0.01352691650390625,
0.0140380859375,
0.0143280029296875,
-0.049072265625,
0.06890869140625,
-0.013580322265625,
0.033294677734375,
0.002368927001953125,
-0.0007114410400390625,
-0.035186767578125,
-0.027557373046875,
-0.01290130615234375,
0.005950927734375,
-0.01947021484375,
0.0005693435668945312,
0.08148193359375,
0.038116455078125,
-0.0038509368896484375,
0.0200042724609375,
0.03997802734375,
0.011627197265625,
0.043304443359375,
0.0286712646484375,
0.01480865478515625,
0.0557861328125,
0.033203125,
0.02880859375,
0.0052337646484375,
-0.00826263427734375,
0.054473876953125,
0.01377105712890625,
-0.03497314453125,
-0.00342559814453125,
-0.01708984375,
-0.04290771484375,
0.007572174072265625,
-0.00150299072265625,
-0.0222320556640625,
-0.034027099609375,
0.0233306884765625,
0.0576171875,
0.051300048828125,
-0.056243896484375,
0.030029296875,
0.00328826904296875,
0.055572509765625,
-0.036590576171875,
0.056060791015625,
0.0160369873046875,
0.07244873046875,
0.0089569091796875,
-0.045501708984375,
0.01111602783203125,
0.01105499267578125,
0.061553955078125,
0.006591796875,
-0.02728271484375,
-0.0036869049072265625,
0.057769775390625,
0.022613525390625,
-0.02423095703125,
-0.00447845458984375,
0.022491455078125,
0.046051025390625,
-0.0256500244140625,
-0.032958984375,
0.0108795166015625,
-0.044586181640625,
-0.0193634033203125,
0.016632080078125,
0.0010623931884765625,
-0.006694793701171875,
-0.03948974609375,
-0.0036754608154296875,
0.039215087890625,
0.0167083740234375,
-0.0006976127624511719,
0.00806427001953125,
0.01898193359375,
0.01824951171875,
0.01076507568359375,
-0.039276123046875,
0.0111236572265625,
0.0115203857421875,
0.017608642578125,
-0.058624267578125,
-0.038421630859375,
-0.0296478271484375,
0.048858642578125,
-0.0285186767578125,
0.0242919921875,
0.0093536376953125,
-0.03009033203125,
0.0179443359375,
-0.007244110107421875,
0.0120391845703125,
0.0195465087890625,
0.042205810546875,
-0.04620361328125,
-0.05194091796875,
0.0296478271484375,
-0.044586181640625,
-0.0333251953125,
-0.031646728515625,
-0.01151275634765625,
-0.01947021484375,
-0.0008182525634765625,
0.0212860107421875,
0.0012769699096679688,
0.03448486328125,
-0.032135009765625,
-0.0167999267578125,
0.05810546875,
-0.0105743408203125,
-0.04638671875,
0.0305633544921875,
-0.0281524658203125,
0.0216827392578125,
0.0224761962890625,
-0.00658416748046875,
-0.0011806488037109375,
0.0108795166015625,
0.0213165283203125,
-0.0106048583984375,
-0.022674560546875,
-0.0762939453125,
0.0223388671875,
0.028228759765625,
-0.027587890625,
0.0208282470703125,
0.037200927734375,
0.017608642578125,
-0.00254058837890625,
-0.00628662109375,
0.011016845703125,
-0.0145263671875,
0.03558349609375,
0.0013828277587890625,
0.004741668701171875,
0.0161895751953125,
-0.011016845703125,
0.0012836456298828125,
-0.0136260986328125,
-0.017913818359375,
0.0014190673828125,
0.00046443939208984375,
-0.004848480224609375,
0.002376556396484375,
0.034027099609375,
-0.02032470703125,
0.0102996826171875,
-0.00969696044921875,
0.0243072509765625,
0.031524658203125,
0.0304412841796875,
0.0258026123046875,
0.007518768310546875,
-0.0309295654296875,
0.03753662109375,
0.0154266357421875,
-0.01983642578125,
0.0099334716796875,
-0.0101470947265625,
0.001251220703125,
-0.0284576416015625,
-0.01580810546875,
0.0206298828125,
0.024383544921875,
-0.02459716796875,
0.00502777099609375,
-0.0164031982421875,
0.0015392303466796875,
-0.0257720947265625,
-0.0007548332214355469,
-0.0201568603515625,
0.0305938720703125,
0.046051025390625,
-0.0184326171875,
0.01702880859375,
0.0243682861328125,
-0.0009899139404296875,
-0.01519012451171875,
0.03533935546875,
0.023406982421875,
-0.048980712890625,
0.0477294921875,
0.01727294921875,
0.0310821533203125,
-0.010223388671875,
0.021881103515625,
-0.006336212158203125,
-0.035003662109375,
-0.047271728515625,
-0.01383209228515625,
0.017059326171875,
-0.051513671875,
0.03326416015625,
0.0360107421875,
0.039825439453125,
0.01126861572265625,
0.030029296875,
-0.028411865234375,
-0.0232086181640625,
0.005451202392578125,
0.046051025390625,
0.00218963623046875,
-0.0024509429931640625,
-0.01611328125,
-0.003326416015625,
-0.011322021484375,
-0.01123046875,
-0.011322021484375,
-0.0186309814453125,
0.00047588348388671875,
-0.0036144256591796875,
0.03509521484375,
-0.0254058837890625,
0.07281494140625,
0.046630859375,
-0.057281494140625,
-0.0278167724609375,
0.0206298828125,
-0.05859375,
-0.032135009765625,
-0.01458740234375,
-0.053192138671875,
-0.0303955078125,
-0.046051025390625,
-0.077880859375,
0.042755126953125,
0.0275421142578125,
0.0521240234375,
-0.011871337890625,
0.00745391845703125,
0.00531005859375,
-0.020294189453125,
-0.00984954833984375,
0.04541015625,
0.0271759033203125,
0.01593017578125,
-0.0277099609375,
-0.0020580291748046875,
0.006389617919921875,
0.030914306640625,
-0.07403564453125,
-0.004299163818359375,
-0.0279388427734375,
0.0201416015625,
0.00577545166015625,
-0.03155517578125,
-0.00968170166015625,
0.0498046875,
-0.01172637939453125,
0.00830841064453125,
0.07708740234375,
-0.01922607421875,
0.029296875,
0.0203094482421875,
-0.006237030029296875,
-0.0113067626953125,
0.005596160888671875,
-0.0201416015625,
0.0152740478515625,
0.01013946533203125,
-0.0290985107421875,
0.0303497314453125,
0.000732421875,
0.0975341796875,
0.01062774658203125,
0.0386962890625,
0.01506805419921875,
0.052337646484375,
0.029571533203125,
-0.02679443359375,
0.04315185546875,
0.005741119384765625,
-0.03570556640625,
0.0274505615234375,
-0.0111236572265625,
0.040130615234375,
0.0175018310546875,
-0.0156402587890625,
0.019927978515625,
0.033935546875,
0.0303955078125,
0.005687713623046875,
0.032257080078125,
-0.057159423828125,
-0.055419921875,
0.00881195068359375,
0.06121826171875,
-0.013427734375,
-0.036834716796875,
0.01123046875,
-0.00955963134765625,
0.0120697021484375,
0.00904083251953125,
0.0111541748046875,
-0.044921875,
-0.0092010498046875,
0.03424072265625,
-0.0175933837890625,
-0.01351165771484375,
-0.01153564453125,
0.0227203369140625,
0.04052734375,
0.005466461181640625,
0.00301361083984375,
-0.0160675048828125,
0.0113983154296875,
0.0323486328125,
0.055419921875,
-0.0019283294677734375,
0.04388427734375,
-0.05145263671875,
-0.0005841255187988281,
0.02545166015625,
0.01549530029296875,
-0.04681396484375,
-0.015899658203125,
-0.0281829833984375,
-0.09814453125,
-0.01467132568359375,
0.047515869140625,
-0.0191192626953125,
0.06036376953125,
0.049957275390625,
0.072998046875,
0.0034027099609375,
-0.0019054412841796875,
0.059722900390625,
-0.0250396728515625,
0.036224365234375,
-0.040191650390625,
0.022857666015625,
0.000016629695892333984,
-0.0182952880859375,
-0.0147705078125,
-0.01171875,
0.0240631103515625,
-0.0200347900390625,
0.0301361083984375,
0.006267547607421875,
-0.0163116455078125,
0.07568359375,
-0.013214111328125,
0.077392578125,
0.007015228271484375,
-0.0845947265625,
-0.0174713134765625,
-0.0257720947265625,
-0.05242919921875,
0.0236663818359375,
0.045196533203125,
0.0008196830749511719,
0.009552001953125,
0.021087646484375,
-0.036224365234375,
-0.005496978759765625,
-0.0039825439453125,
0.043060302734375,
0.003986358642578125,
-0.026458740234375,
0.00708770751953125,
-0.046661376953125,
-0.028778076171875,
0.01971435546875,
0.0032176971435546875,
-0.05487060546875,
0.00345611572265625,
0.0257415771484375,
-0.017486572265625,
0.0128021240234375,
-0.0212860107421875,
0.029541015625,
0.031280517578125,
-0.046356201171875,
0.010772705078125,
0.006072998046875,
-0.01082611083984375,
-0.03790283203125,
0.0290069580078125,
-0.005702972412109375,
-0.015869140625,
0.0196685791015625,
-0.004535675048828125,
0.00603485107421875,
0.0018796920776367188,
0.038055419921875,
-0.0294342041015625,
-0.06591796875,
-0.04388427734375,
0.0302581787109375,
-0.00850677490234375,
-0.0037822723388671875,
-0.030487060546875,
0.0302734375,
0.0457763671875,
0.032623291015625,
0.0208740234375,
-0.0012331008911132812,
0.013671875,
0.020355224609375,
-0.0034618377685546875,
-0.016998291015625,
-0.0301666259765625,
-0.02520751953125,
-0.00823211669921875,
-0.00891876220703125,
-0.00677490234375,
-0.003032684326171875,
-0.0014257431030273438,
0.00353240966796875,
0.02996826171875,
0.04119873046875,
-0.03118896484375,
0.0255889892578125,
0.0196075439453125,
-0.0005717277526855469,
-0.00536346435546875,
0.039947509765625,
-0.0004703998565673828,
0.00960540771484375,
-0.015625,
-0.01415252685546875,
0.037078857421875,
0.005878448486328125,
0.038848876953125,
-0.005916595458984375,
0.03448486328125,
0.00888824462890625,
-0.04656982421875,
0.0185546875,
-0.0196685791015625,
0.0266265869140625,
0.0184326171875,
0.00815582275390625,
-0.0517578125,
-0.085205078125,
-0.03155517578125,
-0.0650634765625,
-0.0789794921875,
0.08721923828125,
-0.038543701171875,
-0.040496826171875,
-0.0146942138671875,
0.0239105224609375,
0.0323486328125,
-0.05963134765625,
-0.038787841796875,
-0.0017099380493164062,
-0.01016998291015625,
0.0201263427734375,
0.058624267578125,
0.02142333984375,
-0.051177978515625,
-0.0758056640625,
-0.0185089111328125,
0.020965576171875,
0.039794921875,
-0.0231170654296875,
-0.0008678436279296875,
-0.003082275390625,
-0.0391845703125,
-0.030029296875,
0.061798095703125,
0.005420684814453125,
-0.035186767578125,
-0.048492431640625,
-0.00637054443359375,
0.0016937255859375,
-0.0110321044921875,
-0.0189666748046875,
-0.01476287841796875,
-0.0472412109375,
0.031341552734375,
-0.0022487640380859375,
-0.00972747802734375,
0.02130126953125,
-0.0276031494140625,
-0.0182647705078125,
0.0246124267578125,
0.035308837890625,
-0.01392364501953125,
-0.0196380615234375,
-0.00548553466796875,
0.043365478515625,
0.0435791015625,
0.00617218017578125,
0.06597900390625,
0.038665771484375,
-0.02777099609375,
0.015838623046875,
0.00615692138671875,
0.0255584716796875,
0.06011962890625,
0.03546142578125,
0.011383056640625,
0.0028533935546875,
-0.06512451171875,
-0.047882080078125,
-0.059326171875,
-0.0121002197265625,
0.034423828125,
0.01904296875,
-0.052825927734375,
0.04876708984375,
0.036590576171875,
-0.00505828857421875,
0.052764892578125,
-0.033843994140625,
-0.011505126953125,
-0.001392364501953125,
-0.01337432861328125,
-0.002216339111328125,
-0.051483154296875,
-0.0224151611328125,
0.0037326812744140625,
0.007476806640625,
0.024017333984375,
-0.005962371826171875,
0.01082611083984375,
0.007343292236328125,
0.06378173828125,
0.06414794921875,
0.053741455078125,
-0.07403564453125,
-0.00823974609375,
0.0292510986328125,
0.02191162109375,
-0.041961669921875,
-0.055694580078125,
0.0149993896484375,
-0.0145263671875,
-0.00965118408203125,
-0.00788116455078125,
0.057373046875,
-0.06280517578125,
-0.037841796875,
-0.005542755126953125,
-0.04156494140625,
0.031585693359375,
-0.0224609375,
0.0182647705078125,
-0.0343017578125,
0.020355224609375,
0.01971435546875,
-0.002513885498046875,
-0.0021686553955078125,
0.06756591796875,
0.0038127899169921875,
-0.0195465087890625,
0.044281005859375,
0.005168914794921875,
0.033355712890625,
0.006534576416015625
]
|
f9e362676bf2ee2d51ea6945c559f60256c390a3 | Wordpress Stackexchange
Q: How to add a link to Wordpress Plugin install Listing When an user searches for a plugin from the WP Admin's Add Plugin area, I want to add a link/button to every plugin's listing area.
Which hook should I use?
The location where I want the link is marked in the screenshot below.
Thanks in advance.
A: This is the filter: "plugin_install_action_links".
You can find this in /wp-admin/includes/class-wp-plugin-install-list-table.php (currently) at line 434:
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
Use it like:
add_filter( 'plugin_install_action_links', 'my_custom_links', 10, 2 );
function my_custom_links( $action_links, $plugin ){
$action_links[] = '<a href="">......</a>';
return $action_links;
}
| Q: How to add a link to Wordpress Plugin install Listing When an user searches for a plugin from the WP Admin's Add Plugin area, I want to add a link/button to every plugin's listing area.
Which hook should I use?
The location where I want the link is marked in the screenshot below.
Thanks in advance.
A: This is the filter: "plugin_install_action_links".
You can find this in /wp-admin/includes/class-wp-plugin-install-list-table.php (currently) at line 434:
$action_links = apply_filters( 'plugin_install_action_links', $action_links, $plugin );
Use it like:
add_filter( 'plugin_install_action_links', 'my_custom_links', 10, 2 );
function my_custom_links( $action_links, $plugin ){
$action_links[] = '<a href="">......</a>';
return $action_links;
}
| wordpress | {
"language": "en",
"length": 101,
"provenance": "stackexchange_00019.jsonl.gz:449790",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165869"
} | [
0.088134765625,
0.02374267578125,
0.0255889892578125,
-0.00972747802734375,
0.036834716796875,
-0.038238525390625,
0.0751953125,
-0.04644775390625,
-0.0177764892578125,
0.017547607421875,
0.045867919921875,
0.021087646484375,
-0.025360107421875,
-0.049407958984375,
0.009674072265625,
-0.0187835693359375,
0.033050537109375,
-0.00408172607421875,
0.03155517578125,
-0.004085540771484375,
0.01232147216796875,
0.023406982421875,
0.0190887451171875,
0.04010009765625,
0.007740020751953125,
0.005451202392578125,
0.08538818359375,
-0.0226593017578125,
0.032073974609375,
0.0007872581481933594,
0.0155487060546875,
-0.05914306640625,
0.0168304443359375,
-0.0208282470703125,
0.02655029296875,
-0.055084228515625,
0.041900634765625,
-0.032867431640625,
-0.0224151611328125,
0.04010009765625,
0.06597900390625,
-0.054290771484375,
-0.0237579345703125,
0.04107666015625,
-0.0206298828125,
-0.037933349609375,
0.07928466796875,
-0.00799560546875,
0.0006513595581054688,
-0.03741455078125,
0.01486968994140625,
-0.0006151199340820312,
0.0396728515625,
-0.048858642578125,
0.002368927001953125,
0.0386962890625,
-0.0284576416015625,
0.0523681640625,
0.0136566162109375,
0.01003265380859375,
-0.01033782958984375,
0.0159454345703125,
-0.0015230178833007812,
-0.0154266357421875,
0.00771331787109375,
-0.010650634765625,
-0.0134735107421875,
0.0171356201171875,
-0.0184478759765625,
0.0185394287109375,
0.0194854736328125,
-0.0352783203125,
-0.01105499267578125,
0.00978851318359375,
0.005130767822265625,
-0.0237579345703125,
0.020111083984375,
-0.01154327392578125,
0.00705718994140625,
0.0228271484375,
0.0034198760986328125,
-0.0230712890625,
0.04962158203125,
-0.01849365234375,
0.0167236328125,
0.006435394287109375,
-0.004497528076171875,
-0.0087890625,
-0.0178375244140625,
-0.0237884521484375,
-0.027984619140625,
-0.00498199462890625,
0.00400543212890625,
-0.021392822265625,
-0.039581298828125,
-0.0164947509765625,
0.0136566162109375,
0.033416748046875,
0.0295257568359375,
0.036407470703125,
0.01047515869140625,
-0.05047607421875,
0.048858642578125,
-0.04205322265625,
-0.0233306884765625,
0.0291748046875,
0.0227203369140625,
0.0423583984375,
0.01136016845703125,
0.0200347900390625,
-0.00959014892578125,
-0.016754150390625,
-0.0188446044921875,
-0.005279541015625,
-0.016571044921875,
-0.0008053779602050781,
-0.04571533203125,
0.020172119140625,
-0.0006489753723144531,
0.01496124267578125,
-0.0197296142578125,
-0.00279998779296875,
-0.023406982421875,
0.0304107666015625,
-0.0238800048828125,
-0.029388427734375,
0.007579803466796875,
-0.0080718994140625,
-0.03460693359375,
-0.0123291015625,
-0.0117340087890625,
0.032196044921875,
0.05975341796875,
0.0194854736328125,
-0.016571044921875,
-0.01067352294921875,
-0.00820159912109375,
0.005718231201171875,
-0.0214691162109375,
0.0089111328125,
-0.0247955322265625,
-0.0361328125,
-0.0003871917724609375,
-0.0261383056640625,
0.049957275390625,
0.007080078125,
-0.0097198486328125,
0.01398468017578125,
0.040679931640625,
-0.004215240478515625,
0.033599853515625,
-0.046295166015625,
0.037017822265625,
0.0010900497436523438,
-0.00507354736328125,
-0.0225677490234375,
0.03631591796875,
-0.034576416015625,
0.003147125244140625,
-0.0245513916015625,
-0.00975799560546875,
0.004268646240234375,
0.007030487060546875,
-0.033721923828125,
-0.038330078125,
-0.0101318359375,
-0.00118255615234375,
0.006626129150390625,
0.0157012939453125,
0.0203704833984375,
-0.00811767578125,
-0.01922607421875,
-0.0016269683837890625,
0.0023345947265625,
-0.01120758056640625,
0.01873779296875,
0.0360107421875,
0.040863037109375,
0.0214691162109375,
0.036224365234375,
-0.0017032623291015625,
-0.0256500244140625,
0.12158203125,
-0.05828857421875,
-0.06195068359375,
0.0604248046875,
-0.017669677734375,
0.05181884765625,
0.01727294921875,
-0.0013303756713867188,
0.017120361328125,
0.0309600830078125,
-0.018310546875,
-0.00444793701171875,
-0.0109710693359375,
-0.0284423828125,
-0.0025634765625,
-0.0042877197265625,
-0.0173797607421875,
0.02386474609375,
-0.051177978515625,
0.0164642333984375,
0.0027713775634765625,
0.034393310546875,
-0.0007309913635253906,
0.02880859375,
-0.00707244873046875,
0.03570556640625,
0.026641845703125,
0.002803802490234375,
-0.00946807861328125,
0.001285552978515625,
0.0328369140625,
-0.0872802734375,
-0.0181121826171875,
0.044525146484375,
-0.0248565673828125,
0.027679443359375,
0.006259918212890625,
0.0210113525390625,
0.025360107421875,
-0.0229949951171875,
0.0276641845703125,
-0.0011272430419921875,
0.0162200927734375,
-0.00691986083984375,
-0.0277099609375,
-0.0167236328125,
-0.04376220703125,
0.032806396484375,
-0.09002685546875,
0.033660888671875,
0.03424072265625,
0.0247650146484375,
-0.0235748291015625,
-0.00206756591796875,
-0.0013523101806640625,
-0.041595458984375,
-0.0031261444091796875,
0.0433349609375,
0.0369873046875,
0.00872802734375,
-0.0066986083984375,
0.00215911865234375,
-0.005718231201171875,
-0.04547119140625,
0.0231170654296875,
-0.0029582977294921875,
0.01947021484375,
0.06500244140625,
-0.0036067962646484375,
0.0234832763671875,
0.008087158203125,
-0.0001881122589111328,
0.021026611328125,
0.030670166015625,
-0.0157623291015625,
-0.03753662109375,
-0.016082763671875,
-0.00518035888671875,
0.0322265625,
-0.0225067138671875,
-0.0509033203125,
-0.0015554428100585938,
0.023162841796875,
0.0153045654296875,
0.034912109375,
0.0305023193359375,
-0.043853759765625,
0.00539398193359375,
0.032989501953125,
0.046539306640625,
-0.0242462158203125,
-0.006683349609375,
0.03155517578125,
-0.0237274169921875,
-0.03515625,
0.01354217529296875,
-0.0018558502197265625,
-0.008544921875,
-0.0178985595703125,
-0.01264190673828125,
0.0287017822265625,
-0.0060272216796875,
-0.006694793701171875,
-0.051239013671875,
0.051300048828125,
0.007099151611328125,
0.006496429443359375,
-0.0308074951171875,
0.0200958251953125,
-0.01097869873046875,
-0.041961669921875,
0.0309295654296875,
-0.01544189453125,
-0.059844970703125,
-0.00814056396484375,
-0.034759521484375,
0.035736083984375,
-0.0360107421875,
0.05535888671875,
0.06842041015625,
-0.0016317367553710938,
-0.0024509429931640625,
-0.014312744140625,
-0.0035266876220703125,
-0.035247802734375,
0.00507354736328125,
-0.0240020751953125,
-0.0257568359375,
-0.04052734375,
-0.0028095245361328125,
0.010162353515625,
0.0070953369140625,
-0.026611328125,
-0.056854248046875,
-0.043365478515625,
-0.0125732421875,
-0.10791015625,
-0.04302978515625,
0.0001544952392578125,
-0.08526611328125,
0.050048828125,
0.0130462646484375,
-0.036041259765625,
-0.044036865234375,
0.07464599609375,
0.015716552734375,
-0.003597259521484375,
-0.031402587890625,
-0.00897216796875,
-0.033050537109375,
-0.03985595703125,
-0.00024700164794921875,
0.01141357421875,
-0.01268768310546875,
0.004352569580078125,
0.0216522216796875,
0.00725555419921875,
-0.040740966796875,
0.022491455078125,
0.03656005859375,
0.00469970703125,
0.00394439697265625,
0.0185699462890625,
-0.013885498046875,
0.022125244140625,
-0.003398895263671875,
0.08343505859375,
0.053741455078125,
-0.0504150390625,
0.00394439697265625,
-0.004062652587890625,
-0.0225067138671875,
0.0124359130859375,
-0.023529052734375,
-0.01509857177734375,
0.01233673095703125,
0.01715087890625,
-0.048919677734375,
0.03826904296875,
0.003345489501953125,
0.0006618499755859375,
0.0033550262451171875,
-0.0159759521484375,
-0.042999267578125,
0.005245208740234375,
-0.01198577880859375,
0.00516510009765625,
0.0019073486328125,
0.02642822265625,
0.006389617919921875,
-0.0278778076171875,
-0.01419830322265625,
-0.00354766845703125,
-0.019012451171875,
0.04443359375,
0.000640869140625,
-0.00005036592483520508,
0.0207366943359375,
0.024627685546875,
-0.0021114349365234375,
0.01285552978515625,
-0.04449462890625,
-0.02294921875,
0.051666259765625,
0.00238800048828125,
0.040802001953125,
-0.0546875,
-0.039306640625,
-0.0406494140625,
0.08026123046875,
-0.0562744140625,
-0.027923583984375,
-0.01885986328125,
0.015869140625,
0.0173187255859375,
-0.032501220703125,
-0.00033164024353027344,
-0.0188446044921875,
-0.09716796875,
0.002765655517578125,
0.004634857177734375,
-0.036773681640625,
-0.010467529296875,
0.04193115234375,
-0.0498046875,
-0.0269622802734375,
0.0212860107421875,
-0.0192718505859375,
0.0013265609741210938,
0.0413818359375,
-0.038055419921875,
0.038665771484375,
-0.02679443359375,
-0.01145172119140625,
-0.0540771484375,
0.0036220550537109375,
-0.03887939453125,
0.0361328125,
0.039886474609375,
-0.02423095703125,
-0.0117645263671875,
0.0172271728515625,
0.0237884521484375,
0.0460205078125,
0.0287628173828125,
0.01087188720703125,
0.0020771026611328125,
-0.0240020751953125,
0.036163330078125,
-0.037078857421875,
0.00977325439453125,
-0.010955810546875,
-0.0394287109375,
0.0328369140625,
-0.017425537109375,
0.03204345703125,
0.01453399658203125,
-0.029815673828125,
-0.03424072265625,
-0.03857421875,
0.00426483154296875,
0.0204925537109375,
0.01441192626953125,
-0.01412200927734375,
-0.0282440185546875,
-0.03973388671875,
-0.006561279296875,
-0.050872802734375,
-0.00826263427734375,
0.02978515625,
0.056304931640625,
0.025054931640625,
0.0210723876953125,
-0.0099029541015625,
0.0645751953125,
0.041015625,
-0.01401519775390625,
0.051116943359375,
0.0423583984375,
0.005977630615234375,
-0.0256195068359375,
-0.008941650390625,
0.0270233154296875,
-0.01593017578125,
0.04046630859375,
0.008270263671875,
-0.015472412109375,
0.030029296875,
0.0220184326171875,
-0.0241851806640625,
0.01474761962890625,
-0.0185394287109375,
-0.0209808349609375,
-0.00537872314453125,
0.03924560546875,
-0.02154541015625,
0.046875,
-0.0299835205078125,
0.00952911376953125,
-0.003009796142578125,
-0.0034503936767578125,
0.040679931640625,
0.053924560546875,
-0.0082855224609375,
-0.00286865234375,
-0.01177215576171875,
-0.00853729248046875,
0.0254669189453125,
0.0202789306640625,
0.033416748046875,
0.046417236328125,
0.00991058349609375,
-0.0037059783935546875,
-0.0283050537109375,
-0.0003108978271484375,
0.055999755859375,
0.0121612548828125,
-0.04425048828125,
-0.0311126708984375,
-0.0002510547637939453,
0.02044677734375,
0.006561279296875,
0.0255126953125,
0.06036376953125,
0.04241943359375,
-0.01861572265625,
-0.0230865478515625,
-0.0069732666015625,
0.0201416015625,
-0.0667724609375,
-0.01015472412109375,
-0.0258636474609375,
-0.0043487548828125,
-0.0001323223114013672,
0.02569580078125,
-0.013671875,
0.0150909423828125,
-0.01313018798828125,
0.028656005859375,
0.042724609375,
0.00843048095703125,
0.0224456787109375,
-0.0133056640625,
-0.01033782958984375,
-0.0173492431640625,
-0.0025577545166015625,
-0.006195068359375,
0.0268707275390625,
0.005859375,
0.0101318359375,
-0.0158233642578125,
-0.0369873046875,
0.0389404296875,
-0.044219970703125,
-0.0247344970703125,
0.05267333984375,
0.004573822021484375,
-0.055938720703125,
-0.04229736328125,
0.036468505859375,
0.06414794921875,
-0.01261138916015625,
0.0014371871948242188,
0.0174102783203125,
0.00021505355834960938,
0.0005292892456054688,
-0.019439697265625,
-0.0234832763671875,
-0.0072479248046875,
0.0135498046875,
0.00450897216796875,
-0.0184783935546875,
-0.023040771484375,
-0.0241546630859375,
-0.01239013671875,
-0.0146636962890625,
0.006221771240234375,
0.03662109375,
-0.0192108154296875,
0.045166015625,
-0.006267547607421875,
-0.037139892578125,
-0.009307861328125,
0.021942138671875,
0.02374267578125,
0.01200103759765625,
-0.06756591796875,
-0.0018835067749023438,
-0.0137786865234375,
0.004207611083984375,
-0.0137786865234375,
-0.0413818359375,
-0.0304412841796875,
-0.00377655029296875,
0.0307769775390625,
0.017242431640625,
-0.00893402099609375,
-0.02691650390625,
-0.01247406005859375,
0.0008869171142578125,
0.0158538818359375,
-0.01129913330078125,
0.0120391845703125,
0.03131103515625,
0.0158538818359375,
0.050018310546875,
0.024078369140625,
0.006114959716796875,
-0.03668212890625,
-0.0215911865234375,
0.015777587890625,
-0.00824737548828125,
-0.0226593017578125,
-0.00992584228515625,
-0.00963592529296875,
-0.0014772415161132812,
0.033935546875,
-0.0144195556640625,
-0.02703857421875,
-0.0008764266967773438,
-0.00531768798828125,
-0.01270294189453125,
0.058807373046875,
0.055145263671875,
-0.01340484619140625,
0.03460693359375,
-0.0322265625,
-0.0018205642700195312,
0.00629425048828125,
0.045501708984375,
-0.0196380615234375,
-0.0186767578125,
-0.006938934326171875,
-0.02337646484375,
-0.05865478515625,
0.0465087890625,
0.0596923828125,
0.0421142578125,
0.07110595703125,
-0.004314422607421875,
0.047119140625,
0.02801513671875,
0.02099609375,
0.046295166015625,
-0.016204833984375,
0.1036376953125,
0.024200439453125,
-0.02532958984375,
0.0780029296875,
-0.051300048828125,
0.0226593017578125,
0.0303497314453125,
0.013885498046875,
-0.0848388671875,
0.0321044921875,
-0.0271759033203125,
0.00888824462890625,
0.06695556640625,
-0.002063751220703125,
0.00855255126953125,
-0.00333404541015625,
0.021820068359375,
0.00930023193359375,
-0.006908416748046875,
0.01023101806640625,
-0.00916290283203125,
-0.0190277099609375,
0.0026226043701171875,
0.0106964111328125,
0.00621795654296875,
-0.0106201171875,
-0.03485107421875,
-0.003658294677734375,
-0.037506103515625,
-0.01111602783203125,
-0.02362060546875,
0.034088134765625,
-0.0205078125,
-0.04290771484375,
0.037994384765625,
-0.0533447265625,
0.01532745361328125,
0.016143798828125,
-0.00595855712890625,
0.041656494140625,
0.037445068359375,
0.0023784637451171875,
0.008880615234375,
0.0027065277099609375,
0.00012552738189697266,
-0.000553131103515625,
-0.0244140625,
-0.032989501953125,
0.0196075439453125,
-0.00913238525390625,
0.005001068115234375,
-0.01186370849609375,
-0.0016193389892578125,
-0.0118560791015625,
0.0018558502197265625,
0.115966796875,
-0.062286376953125,
-0.01447296142578125,
0.0236663818359375,
-0.01476287841796875,
0.0016679763793945312,
-0.02374267578125,
0.004627227783203125,
-0.05377197265625,
-0.0187835693359375,
-0.0151214599609375,
-0.024658203125,
0.00955963134765625,
-0.03228759765625,
-0.02783203125,
0.08013916015625,
-0.04254150390625,
-0.00650787353515625,
-0.019500732421875,
0.04315185546875,
0.02777099609375,
0.05303955078125,
-0.0217437744140625,
0.050506591796875,
0.016754150390625,
0.017669677734375,
-0.0230712890625,
-0.007656097412109375,
0.001735687255859375,
0.0265350341796875,
0.0489501953125,
0.0264892578125,
-0.058502197265625,
0.00626373291015625,
0.0242156982421875,
0.0217437744140625,
0.0070953369140625,
0.05230712890625,
0.00806427001953125,
-0.000957489013671875,
0.044403076171875,
0.006732940673828125,
0.052001953125,
-0.014373779296875,
0.00196075439453125,
0.0242462158203125,
0.0154266357421875,
0.01082611083984375,
-0.025787353515625,
0.048736572265625,
-0.006481170654296875,
-0.01039886474609375,
0.00475311279296875,
-0.0009531974792480469,
0.00003618001937866211,
0.0352783203125,
-0.0033817291259765625,
0.0360107421875,
0.0052947998046875,
-0.0169219970703125,
0.0265350341796875,
-0.004302978515625,
0.0255584716796875,
-0.0162353515625,
0.005321502685546875,
0.005859375,
-0.016082763671875,
0.001064300537109375,
0.027679443359375,
-0.0195465087890625,
0.02069091796875,
0.0018415451049804688,
0.0107574462890625,
-0.045684814453125,
-0.0117645263671875,
0.046295166015625,
0.037078857421875,
-0.0272216796875,
-0.07696533203125,
0.007534027099609375,
-0.0024242401123046875,
-0.00417327880859375,
0.04498291015625,
-0.0029506683349609375,
-0.03240966796875,
0.037200927734375,
-0.036163330078125,
-0.0018711090087890625,
0.031524658203125,
0.033935546875,
0.0026607513427734375,
-0.018096923828125,
-0.033203125,
-0.0167388916015625,
-0.0225982666015625,
0.01558685302734375,
-0.01033782958984375,
0.022308349609375,
0.0002665519714355469,
0.030059814453125,
-0.0104522705078125,
-0.00809478759765625,
-0.01151275634765625,
0.041168212890625,
-0.00473785400390625,
0.0233917236328125,
-0.031097412109375,
-0.0428466796875,
0.0032367706298828125,
0.0318603515625,
0.033172607421875,
0.030792236328125,
0.025970458984375,
0.0185699462890625,
0.00585174560546875,
0.012298583984375,
0.0450439453125,
-0.018096923828125,
-0.014923095703125,
-0.049560546875,
0.05364990234375,
0.04052734375,
0.0306854248046875,
-0.0046539306640625,
-0.006801605224609375,
0.0687255859375,
-0.0275115966796875,
0.0278778076171875,
-0.0084381103515625,
-0.04351806640625,
0.0171356201171875,
-0.0158538818359375,
0.08148193359375,
0.004375457763671875,
-0.06658935546875,
-0.0183563232421875,
-0.016693115234375,
-0.01548004150390625,
0.021759033203125,
0.0292510986328125,
-0.048736572265625,
0.056884765625,
0.0028743743896484375,
0.00029087066650390625,
0.01015472412109375,
-0.00374603271484375,
-0.006496429443359375,
0.044830322265625,
0.02740478515625,
0.01297760009765625,
-0.00045609474182128906,
0.031951904296875,
0.0047607421875,
0.006343841552734375,
-0.004154205322265625,
0.066650390625,
-0.027984619140625,
0.00424957275390625,
-0.0028076171875,
-0.02459716796875,
0.015655517578125,
-0.0180511474609375,
0.0276031494140625,
0.0066375732421875,
-0.01641845703125,
-0.0165557861328125,
-0.0540771484375,
-0.0018672943115234375,
0.035552978515625,
-0.03521728515625,
-0.0137481689453125,
0.0101776123046875,
0.0275421142578125,
-0.007610321044921875,
0.06658935546875,
-0.0198211669921875,
-0.0517578125,
-0.06109619140625,
-0.015777587890625,
0.023162841796875,
0.05694580078125,
0.0190582275390625,
0.0338134765625,
0.0181121826171875,
0.023834228515625,
0.0033359527587890625,
0.00494384765625,
0.013641357421875,
0.0338134765625,
-0.042877197265625,
-0.0211029052734375,
0.01023101806640625,
-0.017242431640625,
0.02423095703125,
-0.0009579658508300781,
0.0478515625,
0.010101318359375,
-0.005573272705078125,
-0.01529693603515625,
0.02508544921875,
0.045501708984375,
0.0008649826049804688,
0.036773681640625,
-0.0019388198852539062,
0.004718780517578125,
-0.017059326171875,
0.0006093978881835938,
-0.026214599609375,
-0.048431396484375,
0.00623321533203125,
0.00951385498046875,
-0.0248565673828125,
-0.031402587890625,
-0.04461669921875,
0.029510498046875,
0.0372314453125,
-0.0009026527404785156,
-0.06866455078125,
0.037811279296875,
-0.0341796875,
0.07122802734375,
-0.0244140625,
0.0144500732421875,
-0.002109527587890625,
0.044036865234375,
-0.0107574462890625,
-0.0216827392578125,
-0.022918701171875,
0.035491943359375,
-0.014862060546875,
0.0173187255859375,
0.0191192626953125,
-0.034149169921875,
-0.0006766319274902344,
0.037750244140625,
0.05474853515625,
0.0657958984375,
0.055145263671875,
-0.02117919921875,
0.014373779296875,
-0.0233612060546875,
0.0015535354614257812,
-0.052886962890625,
0.007534027099609375,
-0.08221435546875,
-0.0343017578125,
-0.031463623046875,
0.0002071857452392578,
0.003597259521484375,
-0.04730224609375,
-0.09051513671875,
0.0875244140625,
-0.0301513671875,
-0.0257415771484375,
-0.06646728515625,
0.0035228729248046875,
0.01201629638671875,
-0.00286865234375,
-0.01506805419921875,
-0.025054931640625,
-0.050018310546875,
0.01922607421875,
-0.01139068603515625,
0.00986480712890625,
-0.021148681640625,
0.01009368896484375,
-0.032073974609375,
0.029876708984375,
0.03814697265625,
-0.027191162109375,
0.05474853515625,
-0.058074951171875,
0.07965087890625,
0.0367431640625,
-0.040191650390625,
0.017669677734375,
0.0072784423828125,
-0.026702880859375,
-0.00662994384765625,
-0.06878662109375,
0.00899505615234375,
-0.02288818359375,
0.031829833984375,
-0.0155181884765625,
0.001247406005859375,
-0.00411224365234375,
0.004177093505859375,
-0.0225677490234375,
0.007598876953125,
0.005584716796875,
-0.01331329345703125,
-0.031707763671875,
0.0009293556213378906,
0.0160064697265625,
-0.0069580078125,
-0.00154876708984375,
0.0450439453125,
-0.00830078125,
-0.0201568603515625,
0.044708251953125,
-0.005962371826171875,
-0.065185546875,
0.03289794921875,
0.0968017578125,
-0.058319091796875,
0.0166778564453125,
0.007274627685546875,
-0.0113372802734375,
0.05450439453125,
-0.025482177734375,
0.00876617431640625,
0.00528717041015625,
-0.04345703125,
0.022308349609375,
-0.0047760009765625,
0.036163330078125,
-0.04901123046875,
-0.0208587646484375,
-0.021697998046875,
0.040985107421875,
-0.020660400390625,
0.02447509765625,
-0.00229644775390625,
0.05230712890625,
0.0022125244140625,
0.1317138671875,
-0.003398895263671875,
0.045379638671875,
-0.011932373046875,
0.049835205078125,
-0.0190582275390625,
-0.01434326171875,
0.0029659271240234375,
-0.02783203125,
0.0032958984375,
0.024261474609375,
-0.0038089752197265625,
-0.01291656494140625,
-0.00023317337036132812,
-0.023406982421875,
-0.0015382766723632812,
0.00562286376953125
]
|
898cdd1c9b61ca29cce3dad22e1a1d5f585be97e | Wordpress Stackexchange
Q: Getting the IDs of a custom post type I have made a custom post 'case studies' which has a number of posts.
I wish to get the IDs of each of these posts to manipulate the data, but despite looking at similar threads, I cannot piece together a way to achieve this. Something like;
foreach post oftype custom, get the id
I am making a function to display this information in the back end, here is the snippet below.
function display_meta_box( $case_study )
{
if (in_array('case_studies', get_post_types()))
{
...get the IDs of all posts of type 'case_studies'...
}
...do other stuff with IDs...
}
A: Found the basis of the answer buried in the codex
$args = array( 'post_type' => 'case_studies');
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
the_ID();
endwhile;
| Q: Getting the IDs of a custom post type I have made a custom post 'case studies' which has a number of posts.
I wish to get the IDs of each of these posts to manipulate the data, but despite looking at similar threads, I cannot piece together a way to achieve this. Something like;
foreach post oftype custom, get the id
I am making a function to display this information in the back end, here is the snippet below.
function display_meta_box( $case_study )
{
if (in_array('case_studies', get_post_types()))
{
...get the IDs of all posts of type 'case_studies'...
}
...do other stuff with IDs...
}
A: Found the basis of the answer buried in the codex
$args = array( 'post_type' => 'case_studies');
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
the_ID();
endwhile;
A: You can get a simple array of CPT IDs by using get_posts with the fields parameter.
$all_post_ids = get_posts(array(
'fields' => 'ids',
'posts_per_page' => -1,
'post_type' => 'case_studies'
));
| wordpress | {
"language": "en",
"length": 166,
"provenance": "stackexchange_00019.jsonl.gz:449800",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165900"
} | [
0.036346435546875,
-0.0162200927734375,
0.0135955810546875,
0.0014619827270507812,
0.0041046142578125,
-0.0125732421875,
0.06573486328125,
-0.01080322265625,
-0.025299072265625,
0.036834716796875,
-0.0333251953125,
-0.008575439453125,
-0.03692626953125,
-0.018035888671875,
-0.018218994140625,
-0.056121826171875,
0.028045654296875,
-0.002742767333984375,
0.0367431640625,
-0.0153656005859375,
0.0200958251953125,
-0.01184844970703125,
0.0345458984375,
0.0172271728515625,
0.025360107421875,
-0.036956787109375,
0.0183258056640625,
-0.0184173583984375,
0.0165863037109375,
-0.01335906982421875,
0.01192474365234375,
0.0222015380859375,
0.0012140274047851562,
-0.0015621185302734375,
0.048370361328125,
0.031402587890625,
0.04541015625,
-0.000690460205078125,
0.03790283203125,
0.019073486328125,
0.021575927734375,
-0.0198974609375,
0.04376220703125,
-0.0167388916015625,
0.01044464111328125,
-0.0128021240234375,
0.01303863525390625,
-0.05963134765625,
0.0162811279296875,
-0.0250091552734375,
-0.00472259521484375,
0.00946044921875,
0.01433563232421875,
-0.037994384765625,
-0.0229034423828125,
-0.03668212890625,
0.0020122528076171875,
-0.01824951171875,
0.0655517578125,
-0.04962158203125,
-0.05224609375,
-0.06488037109375,
0.055572509765625,
-0.01224517822265625,
-0.0115966796875,
0.004405975341796875,
0.003582000732421875,
0.0162811279296875,
-0.0247802734375,
-0.0258636474609375,
-0.0029621124267578125,
-0.0129241943359375,
0.0100555419921875,
-0.004978179931640625,
0.00473785400390625,
-0.057098388671875,
0.038543701171875,
-0.0307464599609375,
-0.01473236083984375,
0.0252838134765625,
-0.007160186767578125,
-0.03521728515625,
-0.0526123046875,
0.0258941650390625,
-0.0248565673828125,
0.04400634765625,
-0.0187835693359375,
-0.0133819580078125,
-0.003749847412109375,
-0.025970458984375,
-0.004474639892578125,
-0.0206756591796875,
-0.0016384124755859375,
0.02618408203125,
-0.0038013458251953125,
-0.036376953125,
0.002330780029296875,
0.00772857666015625,
-0.01125335693359375,
-0.0205535888671875,
0.026214599609375,
-0.050048828125,
0.0160980224609375,
-0.0247039794921875,
-0.01407623291015625,
0.00543212890625,
0.03680419921875,
0.032562255859375,
0.0361328125,
0.0400390625,
-0.00547027587890625,
0.01064300537109375,
-0.01093292236328125,
-0.0208740234375,
-0.01416015625,
0.023040771484375,
-0.01099395751953125,
0.01226043701171875,
-0.004116058349609375,
0.00008082389831542969,
0.040496826171875,
0.041900634765625,
0.0163116455078125,
-0.016937255859375,
-0.00620269775390625,
-0.0010213851928710938,
-0.02386474609375,
-0.050323486328125,
-0.0011234283447265625,
0.05230712890625,
-0.0740966796875,
-0.0211944580078125,
0.11663818359375,
0.04364013671875,
0.037567138671875,
-0.050384521484375,
0.00048089027404785156,
-0.031341552734375,
-0.0195465087890625,
0.00789642333984375,
-0.0025196075439453125,
-0.0250701904296875,
0.03448486328125,
-0.00867462158203125,
0.0011043548583984375,
0.032379150390625,
0.0128936767578125,
0.0011920928955078125,
-0.00188446044921875,
-0.04595947265625,
0.004055023193359375,
-0.0250244140625,
0.041595458984375,
0.003143310546875,
-0.037017822265625,
-0.021392822265625,
0.017425537109375,
-0.04351806640625,
-0.034088134765625,
-0.061065673828125,
0.01113128662109375,
0.003475189208984375,
-0.00943756103515625,
0.0236663818359375,
0.01099395751953125,
0.00711822509765625,
0.012359619140625,
0.005008697509765625,
0.028533935546875,
0.0675048828125,
0.00354766845703125,
-0.05267333984375,
-0.010467529296875,
0.0260772705078125,
-0.0182647705078125,
0.032501220703125,
-0.01348114013671875,
-0.0070037841796875,
0.0214691162109375,
-0.009368896484375,
-0.04052734375,
-0.04083251953125,
-0.013214111328125,
0.01277923583984375,
-0.04327392578125,
0.0694580078125,
-0.00594329833984375,
0.08099365234375,
0.0204925537109375,
-0.0006847381591796875,
-0.016082763671875,
-0.01351165771484375,
-0.0592041015625,
0.06744384765625,
0.0022945404052734375,
0.0023250579833984375,
-0.024658203125,
0.00434112548828125,
-0.012359619140625,
-0.0364990234375,
0.0145263671875,
-0.01806640625,
0.01439666748046875,
-0.00292205810546875,
-0.048248291015625,
0.0032291412353515625,
-0.027191162109375,
0.043853759765625,
0.0100860595703125,
0.027679443359375,
0.0174560546875,
-0.01422119140625,
0.00025153160095214844,
-0.04473876953125,
-0.020904541015625,
0.0084381103515625,
0.01435089111328125,
-0.0273590087890625,
-0.037384033203125,
-0.039154052734375,
-0.03900146484375,
-0.01910400390625,
-0.057830810546875,
0.06317138671875,
0.044219970703125,
0.036376953125,
-0.02227783203125,
0.0078582763671875,
0.04351806640625,
0.036895751953125,
-0.033721923828125,
0.0019502639770507812,
0.0198516845703125,
0.0238189697265625,
-0.01251983642578125,
-0.00583648681640625,
0.04364013671875,
-0.043365478515625,
0.0133056640625,
0.042755126953125,
0.040283203125,
0.01045989990234375,
0.00920867919921875,
0.00832366943359375,
0.041015625,
-0.0138092041015625,
0.0217437744140625,
-0.01776123046875,
0.0038280487060546875,
0.0278167724609375,
0.0054931640625,
0.04522705078125,
0.0258636474609375,
0.007106781005859375,
0.034942626953125,
0.039031982421875,
-0.013580322265625,
-0.00930023193359375,
0.005558013916015625,
-0.0037097930908203125,
-0.00510406494140625,
-0.038330078125,
-0.0305023193359375,
-0.02044677734375,
0.05303955078125,
0.03240966796875,
0.07098388671875,
0.056243896484375,
-0.032562255859375,
0.0207061767578125,
-0.002483367919921875,
-0.003772735595703125,
-0.01386260986328125,
0.0196685791015625,
0.02178955078125,
0.023590087890625,
-0.03350830078125,
-0.002117156982421875,
0.000873565673828125,
0.01183319091796875,
0.0222625732421875,
0.058074951171875,
-0.02252197265625,
-0.00620269775390625,
-0.0016536712646484375,
-0.044769287109375,
-0.008636474609375,
0.043121337890625,
-0.0121002197265625,
0.01004791259765625,
0.000682830810546875,
0.067626953125,
-0.00029397010803222656,
0.01611328125,
0.0191650390625,
0.0189666748046875,
0.0239715576171875,
-0.059814453125,
0.055023193359375,
-0.0400390625,
0.04412841796875,
0.06842041015625,
-0.02349853515625,
0.0301513671875,
0.0000661611557006836,
-0.01076507568359375,
-0.00968170166015625,
0.03741455078125,
0.0164794921875,
-0.042694091796875,
-0.0179443359375,
0.01282501220703125,
0.031005859375,
0.1497802734375,
-0.03887939453125,
-0.0657958984375,
0.0240936279296875,
0.051971435546875,
-0.0254669189453125,
-0.07867431640625,
0.08892822265625,
-0.0086669921875,
-0.052703857421875,
-0.06878662109375,
-0.0298614501953125,
0.0121002197265625,
-0.08740234375,
-0.04583740234375,
0.0106048583984375,
-0.012451171875,
-0.041290283203125,
-0.047149658203125,
-0.06719970703125,
-0.06500244140625,
-0.004528045654296875,
0.006778717041015625,
0.0187530517578125,
0.037689208984375,
0.036895751953125,
-0.02728271484375,
0.036041259765625,
0.047027587890625,
-0.03643798828125,
-0.0027027130126953125,
-0.0171966552734375,
0.00217437744140625,
-0.014007568359375,
0.013397216796875,
-0.025482177734375,
-0.0017900466918945312,
0.0071258544921875,
-0.0301971435546875,
-0.01300811767578125,
0.0018243789672851562,
0.0286407470703125,
-0.0030975341796875,
0.002452850341796875,
0.03265380859375,
0.04998779296875,
-0.02117919921875,
0.0117034912109375,
-0.0040435791015625,
-0.00203704833984375,
-0.022857666015625,
-0.0172119140625,
-0.01416015625,
-0.041168212890625,
0.0276031494140625,
0.021942138671875,
0.01226806640625,
-0.01552581787109375,
0.00390625,
0.035736083984375,
0.0123443603515625,
0.035064697265625,
-0.00518035888671875,
0.035430908203125,
-0.003025054931640625,
0.02020263671875,
0.01073455810546875,
0.0018463134765625,
-0.0229339599609375,
0.00278472900390625,
-0.053802490234375,
-0.05108642578125,
0.058135986328125,
-0.014404296875,
-0.01297760009765625,
0.00975799560546875,
-0.042694091796875,
0.034759521484375,
0.0972900390625,
-0.06451416015625,
0.0003056526184082031,
-0.0165252685546875,
-0.005077362060546875,
0.035736083984375,
-0.019287109375,
-0.047393798828125,
-0.0212249755859375,
-0.039031982421875,
-0.0023365020751953125,
-0.026458740234375,
-0.0216827392578125,
0.007396697998046875,
0.015045166015625,
-0.01117706298828125,
-0.028045654296875,
0.038482666015625,
-0.02294921875,
0.0231781005859375,
-0.0012760162353515625,
0.0212860107421875,
0.003986358642578125,
-0.036712646484375,
-0.00545501708984375,
-0.06573486328125,
-0.02557373046875,
0.018646240234375,
0.0386962890625,
-0.0087432861328125,
-0.0307769775390625,
0.01540374755859375,
0.06201171875,
0.0092315673828125,
0.00811004638671875,
0.004955291748046875,
0.022125244140625,
-0.0252227783203125,
-0.026519775390625,
-0.00605010986328125,
-0.03839111328125,
-0.0266265869140625,
-0.046173095703125,
-0.01947021484375,
0.0004088878631591797,
0.004322052001953125,
0.018218994140625,
0.0189971923828125,
-0.0147552490234375,
-0.026275634765625,
-0.034393310546875,
0.006679534912109375,
0.030792236328125,
-0.0018739700317382812,
0.00586700439453125,
-0.050018310546875,
-0.048675537109375,
0.023712158203125,
0.033538818359375,
-0.0214691162109375,
0.004581451416015625,
0.04156494140625,
0.0299835205078125,
-0.035308837890625,
-0.047760009765625,
0.0120697021484375,
0.04541015625,
-0.0176544189453125,
0.034423828125,
0.0276641845703125,
-0.01338958740234375,
0.047515869140625,
0.0089263916015625,
-0.0138702392578125,
-0.0025691986083984375,
0.078369140625,
-0.00923919677734375,
-0.01186370849609375,
-0.004222869873046875,
-0.041534423828125,
0.0028667449951171875,
0.0245208740234375,
-0.01517486572265625,
-0.0184478759765625,
0.037384033203125,
0.06298828125,
-0.056488037109375,
0.044097900390625,
-0.033172607421875,
-0.00713348388671875,
0.021575927734375,
-0.01296234130859375,
0.0205230712890625,
0.0176239013671875,
-0.0003414154052734375,
0.0037021636962890625,
-0.0287017822265625,
0.00769805908203125,
-0.01453399658203125,
0.01332855224609375,
-0.0020294189453125,
0.007415771484375,
0.0300445556640625,
0.002780914306640625,
-0.0244293212890625,
-0.007190704345703125,
0.044189453125,
-0.01123809814453125,
-0.055389404296875,
0.034942626953125,
-0.01229095458984375,
-0.012176513671875,
0.0309600830078125,
-0.0137939453125,
0.034210205078125,
0.0595703125,
-0.0106658935546875,
0.0005774497985839844,
-0.00016367435455322266,
0.020050048828125,
-0.043243408203125,
-0.0195770263671875,
0.005260467529296875,
-0.004787445068359375,
-0.0020294189453125,
0.040435791015625,
0.005214691162109375,
0.018829345703125,
-0.02032470703125,
0.08343505859375,
0.0278778076171875,
0.061279296875,
0.0008940696716308594,
-0.01751708984375,
-0.004364013671875,
0.0068511962890625,
-0.0504150390625,
-0.035919189453125,
-0.0121307373046875,
0.01763916015625,
0.049102783203125,
0.00885009765625,
-0.01033782958984375,
-0.007099151611328125,
-0.033782958984375,
-0.0133514404296875,
-0.008056640625,
0.018463134765625,
0.0080108642578125,
-0.007442474365234375,
-0.003574371337890625,
-0.0008668899536132812,
0.0306549072265625,
0.00884246826171875,
0.0014238357543945312,
-0.0146942138671875,
0.0010061264038085938,
-0.040679931640625,
-0.002605438232421875,
-0.021575927734375,
0.0017414093017578125,
-0.033660888671875,
-0.036590576171875,
-0.00279998779296875,
-0.04400634765625,
-0.016876220703125,
0.001983642578125,
-0.01242828369140625,
-0.0029315948486328125,
-0.0202789306640625,
0.052734375,
-0.01277923583984375,
-0.041961669921875,
0.0305328369140625,
0.0068511962890625,
0.0709228515625,
0.027923583984375,
-0.020263671875,
0.00984954833984375,
-0.04681396484375,
0.00432586669921875,
0.0153045654296875,
-0.06494140625,
0.004611968994140625,
-0.020782470703125,
0.0028553009033203125,
0.0294342041015625,
0.00472259521484375,
0.007350921630859375,
-0.0011234283447265625,
0.008758544921875,
-0.016021728515625,
0.01812744140625,
0.003688812255859375,
0.046783447265625,
-0.010101318359375,
0.06451416015625,
0.0140228271484375,
-0.00115966796875,
-0.055572509765625,
-0.00406646728515625,
-0.01812744140625,
-0.052032470703125,
0.01114654541015625,
-0.006107330322265625,
0.0235595703125,
0.0173492431640625,
0.033294677734375,
0.0118255615234375,
0.000518798828125,
-0.014739990234375,
0.0011730194091796875,
-0.02447509765625,
0.0186004638671875,
-0.01436614990234375,
0.006561279296875,
-0.005046844482421875,
-0.02374267578125,
-0.03240966796875,
0.01453399658203125,
0.0177001953125,
-0.0156707763671875,
-0.00533294677734375,
-0.00824737548828125,
0.0113677978515625,
-0.04168701171875,
0.02081298828125,
0.050537109375,
0.040802001953125,
0.044189453125,
-0.01519012451171875,
0.02197265625,
0.0084686279296875,
0.010101318359375,
-0.0009264945983886719,
-0.0125885009765625,
0.08135986328125,
0.02069091796875,
-0.032958984375,
0.06195068359375,
-0.04193115234375,
-0.008148193359375,
-0.032257080078125,
0.00273895263671875,
-0.0014200210571289062,
0.01390838623046875,
0.0030536651611328125,
0.0012865066528320312,
0.0134429931640625,
-0.0171966552734375,
-0.0174102783203125,
-0.0146026611328125,
0.0184326171875,
0.01126861572265625,
-0.0440673828125,
0.006870269775390625,
0.01546478271484375,
0.01313018798828125,
-0.0207366943359375,
0.0186767578125,
-0.0242462158203125,
-0.00629425048828125,
-0.020355224609375,
-0.00731658935546875,
-0.01110076904296875,
-0.028472900390625,
-0.004634857177734375,
0.00803375244140625,
-0.0019855499267578125,
-0.0697021484375,
0.0157470703125,
-0.051910400390625,
0.0092315673828125,
0.0184326171875,
0.0304107666015625,
0.03375244140625,
0.03460693359375,
0.010650634765625,
-0.0027675628662109375,
-0.0097198486328125,
0.0098114013671875,
-0.06829833984375,
-0.033203125,
-0.0122833251953125,
0.049346923828125,
-0.020233154296875,
0.039825439453125,
-0.0084075927734375,
-0.01140594482421875,
-0.017822265625,
-0.0177459716796875,
0.09820556640625,
-0.047271728515625,
-0.00760650634765625,
0.036895751953125,
0.041351318359375,
-0.0201873779296875,
-0.00492095947265625,
0.0224609375,
-0.037078857421875,
0.006015777587890625,
-0.00582122802734375,
0.0081329345703125,
-0.01049041748046875,
-0.008575439453125,
-0.067626953125,
0.059417724609375,
-0.0088348388671875,
0.033721923828125,
0.0177459716796875,
0.004428863525390625,
-0.0187225341796875,
-0.015380859375,
-0.046173095703125,
0.04486083984375,
-0.0297698974609375,
0.038787841796875,
-0.068359375,
-0.0180511474609375,
-0.01036834716796875,
0.03240966796875,
0.07318115234375,
0.00887298583984375,
-0.0166778564453125,
-0.01503753662109375,
0.04034423828125,
0.0721435546875,
-0.001834869384765625,
0.00008738040924072266,
0.0045318603515625,
0.047637939453125,
0.06427001953125,
-0.019256591796875,
0.05072021484375,
-0.021514892578125,
-0.003917694091796875,
0.016693115234375,
0.03338623046875,
0.0283355712890625,
-0.005428314208984375,
-0.0240631103515625,
-0.017791748046875,
-0.014312744140625,
0.00948333740234375,
0.004913330078125,
0.019378662109375,
0.04022216796875,
0.08013916015625,
-0.07855224609375,
-0.0028629302978515625,
-0.027130126953125,
0.07733154296875,
0.004398345947265625,
0.0114593505859375,
0.01401519775390625,
0.01154327392578125,
0.034912109375,
-0.0079345703125,
-0.007633209228515625,
0.0013380050659179688,
0.0243988037109375,
0.0458984375,
0.04852294921875,
0.0262908935546875,
-0.0445556640625,
-0.031494140625,
0.0380859375,
0.055755615234375,
-0.0298309326171875,
-0.03680419921875,
0.01812744140625,
0.0021648406982421875,
0.004825592041015625,
0.00371551513671875,
0.039703369140625,
0.025238037109375,
0.036376953125,
-0.057464599609375,
-0.023040771484375,
0.00482940673828125,
0.016998291015625,
-0.021026611328125,
-0.041229248046875,
0.007843017578125,
-0.023773193359375,
-0.03240966796875,
0.0034465789794921875,
0.0213165283203125,
0.036346435546875,
0.011138916015625,
0.043304443359375,
-0.0038509368896484375,
0.0022296905517578125,
0.01922607421875,
0.01983642578125,
0.00995635986328125,
-0.00595855712890625,
-0.00730133056640625,
-0.041351318359375,
-0.007648468017578125,
0.026123046875,
0.0272064208984375,
0.03436279296875,
0.035552978515625,
0.019256591796875,
-0.006435394287109375,
-0.00213623046875,
0.033660888671875,
-0.01280975341796875,
-0.03656005859375,
-0.02679443359375,
-0.01531219482421875,
0.00559234619140625,
-0.003871917724609375,
0.02587890625,
0.0166168212890625,
0.005626678466796875,
0.00449371337890625,
0.069091796875,
0.0098114013671875,
-0.0008897781372070312,
0.0216217041015625,
-0.0021915435791015625,
0.0628662109375,
0.02362060546875,
-0.072509765625,
0.005084991455078125,
-0.04681396484375,
-0.02667236328125,
0.022705078125,
0.0191802978515625,
-0.01184844970703125,
0.036346435546875,
-0.002582550048828125,
-0.0023097991943359375,
0.0047760009765625,
0.006618499755859375,
0.00762176513671875,
0.01373291015625,
0.0191192626953125,
0.00969696044921875,
-0.0631103515625,
-0.03485107421875,
-0.0030536651611328125,
0.00827789306640625,
0.022491455078125,
0.006847381591796875,
0.03314208984375,
0.028717041015625,
-0.018218994140625,
0.045806884765625,
-0.06396484375,
-0.028228759765625,
0.043121337890625,
-0.0007801055908203125,
0.0125274658203125,
0.0020999908447265625,
0.016998291015625,
0.04119873046875,
0.042083740234375,
-0.01389312744140625,
0.00687408447265625,
0.0007190704345703125,
0.020416259765625,
-0.018646240234375,
-0.0052032470703125,
-0.01361083984375,
0.00562286376953125,
-0.0019664764404296875,
-0.03448486328125,
0.046356201171875,
0.051361083984375,
0.01392364501953125,
-0.00868988037109375,
0.0150604248046875,
-0.045135498046875,
0.034210205078125,
-0.0075225830078125,
0.045318603515625,
0.0177459716796875,
0.01953125,
-0.044158935546875,
-0.00223541259765625,
-0.0186004638671875,
-0.00191497802734375,
0.008636474609375,
0.051422119140625,
-0.00524139404296875,
-0.045654296875,
0.0223388671875,
0.0261688232421875,
0.068115234375,
0.0171356201171875,
0.01470947265625,
0.0164337158203125,
0.0065765380859375,
-0.0321044921875,
-0.018280029296875,
-0.023651123046875,
-0.039276123046875,
0.03778076171875,
0.03143310546875,
0.03826904296875,
0.044464111328125,
-0.005168914794921875,
-0.0318603515625,
-0.0187225341796875,
-0.0215301513671875,
0.0134124755859375,
-0.006160736083984375,
-0.024932861328125,
-0.0250396728515625,
-0.04937744140625,
0.01303863525390625,
0.0219573974609375,
0.0433349609375,
-0.01483154296875,
0.003711700439453125,
0.001598358154296875,
0.01340484619140625,
0.019256591796875,
0.024810791015625,
0.0079803466796875,
-0.039764404296875,
0.0001741647720336914,
0.042144775390625,
0.04071044921875,
0.072021484375,
0.05206298828125,
-0.03350830078125,
-0.02093505859375,
0.0240325927734375,
-0.0245361328125,
-0.049224853515625,
0.042816162109375,
-0.073974609375,
-0.045440673828125,
-0.0261688232421875,
0.0391845703125,
0.049896240234375,
-0.0121917724609375,
-0.034210205078125,
0.0556640625,
-0.033782958984375,
-0.0234222412109375,
-0.0386962890625,
0.0223846435546875,
0.037811279296875,
-0.06512451171875,
-0.02667236328125,
-0.019287109375,
-0.04888916015625,
-0.01922607421875,
0.0299224853515625,
-0.011749267578125,
0.06048583984375,
0.0198211669921875,
-0.068603515625,
-0.01242828369140625,
-0.038543701171875,
0.0009350776672363281,
0.00914764404296875,
-0.02410888671875,
0.0179901123046875,
0.021026611328125,
-0.0692138671875,
-0.060516357421875,
-0.004695892333984375,
0.0426025390625,
-0.01490020751953125,
-0.029510498046875,
-0.034027099609375,
-0.0166473388671875,
0.03546142578125,
0.0758056640625,
0.0166015625,
-0.03692626953125,
0.0484619140625,
-0.0009107589721679688,
-0.044677734375,
0.00004464387893676758,
0.00865936279296875,
-0.0216064453125,
-0.0097198486328125,
0.0038089752197265625,
-0.0293426513671875,
-0.004238128662109375,
0.0139617919921875,
-0.042724609375,
0.00030517578125,
-0.01270294189453125,
-0.0310211181640625,
-0.044708251953125,
0.08648681640625,
0.0213165283203125,
-0.0364990234375,
-0.0038623809814453125,
-0.03155517578125,
-0.028045654296875,
0.00923919677734375,
-0.0755615234375,
0.005756378173828125,
-0.00649261474609375,
0.00013589859008789062,
0.033538818359375,
0.0196685791015625,
0.033172607421875,
-0.0171661376953125,
-0.014190673828125,
-0.008544921875,
0.007556915283203125,
-0.005634307861328125,
-0.007598876953125,
0.0096282958984375,
0.01255035400390625,
-0.0012874603271484375,
0.055450439453125,
0.0022602081298828125,
0.07855224609375,
0.01117706298828125,
0.04266357421875,
-0.03717041015625,
-0.0090484619140625,
-0.01511383056640625,
-0.038970947265625,
-0.00433349609375,
-0.00391387939453125,
-0.0059967041015625,
-0.039459228515625,
0.025390625,
0.0792236328125,
-0.0010356903076171875,
0.017822265625
]
|
91b0b785ddfa91c7aca5ba445d91ce562b922487 | Wordpress Stackexchange
Q: How to create a test that calls is_front_page in phpunit? I'm using WP_UnitTestCase but in my code I have this condition. is_front_page which I'm not sure how to simulate that in PHPUnit
This is the piece of code that I have
elseif ( is_front_page() ) {
// logic
}
And this is how I go to a page
$this->go_to( $this->post_obj->get_permalink() );
How do I tell phpunit that this is the homepage?
A: The is_front_page() function calls wp_query::is_front_page(). If you scroll down to look at the source, you will see the code you're looking to trigger:
elseif ( 'page' == get_option( 'show_on_front') && get_option( 'page_on_front' ) && $this->is_page( get_option( 'page_on_front' ) ) )
return true;
To meet that condition, you'll just need to do this in the code to set up for the test:
update_option( 'show_on_front', 'page' );
update_option( 'page_on_front', $post_id );
| Q: How to create a test that calls is_front_page in phpunit? I'm using WP_UnitTestCase but in my code I have this condition. is_front_page which I'm not sure how to simulate that in PHPUnit
This is the piece of code that I have
elseif ( is_front_page() ) {
// logic
}
And this is how I go to a page
$this->go_to( $this->post_obj->get_permalink() );
How do I tell phpunit that this is the homepage?
A: The is_front_page() function calls wp_query::is_front_page(). If you scroll down to look at the source, you will see the code you're looking to trigger:
elseif ( 'page' == get_option( 'show_on_front') && get_option( 'page_on_front' ) && $this->is_page( get_option( 'page_on_front' ) ) )
return true;
To meet that condition, you'll just need to do this in the code to set up for the test:
update_option( 'show_on_front', 'page' );
update_option( 'page_on_front', $post_id );
| wordpress | {
"language": "en",
"length": 142,
"provenance": "stackexchange_00019.jsonl.gz:449814",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165958"
} | [
0.05926513671875,
-0.00408935546875,
-0.0009207725524902344,
-0.051361083984375,
0.0125732421875,
-0.019927978515625,
0.0148468017578125,
-0.01336669921875,
0.009765625,
-0.021484375,
-0.05096435546875,
0.01812744140625,
-0.07073974609375,
-0.0185394287109375,
0.00708770751953125,
-0.051483154296875,
0.029754638671875,
-0.0017690658569335938,
0.029083251953125,
0.003589630126953125,
0.006317138671875,
0.02667236328125,
-0.0005083084106445312,
0.01427459716796875,
0.035186767578125,
-0.046142578125,
0.019378662109375,
-0.0105133056640625,
0.0303497314453125,
-0.01953125,
0.02410888671875,
0.008544921875,
0.00695037841796875,
0.00861358642578125,
0.01174163818359375,
-0.00605010986328125,
0.0298614501953125,
-0.0080413818359375,
0.01497650146484375,
0.01158905029296875,
0.031707763671875,
-0.00601959228515625,
-0.05084228515625,
0.031524658203125,
-0.024078369140625,
-0.06622314453125,
0.03753662109375,
-0.0312042236328125,
-0.01141357421875,
0.030914306640625,
-0.0160675048828125,
-0.0174407958984375,
-0.0303497314453125,
0.060791015625,
0.002231597900390625,
-0.004703521728515625,
0.004360198974609375,
0.0018329620361328125,
0.02301025390625,
0.017425537109375,
-0.0258026123046875,
-0.0033740997314453125,
0.0140380859375,
-0.0458984375,
0.0015478134155273438,
-0.040740966796875,
-0.0343017578125,
0.0257720947265625,
0.0430908203125,
0.0019969940185546875,
-0.007686614990234375,
0.0311279296875,
0.005863189697265625,
-0.0168304443359375,
-0.0535888671875,
-0.047943115234375,
0.036651611328125,
-0.03350830078125,
0.00374603271484375,
-0.01373291015625,
-0.0222930908203125,
-0.00489044189453125,
-0.0970458984375,
-0.0059661865234375,
0.004238128662109375,
0.03314208984375,
-0.0176544189453125,
-0.0186614990234375,
-0.03643798828125,
-0.01403045654296875,
-0.02239990234375,
-0.0186920166015625,
-0.034515380859375,
-0.0097808837890625,
-0.004306793212890625,
-0.00905609130859375,
0.02349853515625,
0.00830841064453125,
-0.006504058837890625,
-0.0137939453125,
0.0250396728515625,
-0.052825927734375,
0.0274505615234375,
-0.013916015625,
0.0005469322204589844,
0.0426025390625,
0.0343017578125,
0.0124053955078125,
0.0015382766723632812,
-0.0158233642578125,
-0.0132904052734375,
-0.009033203125,
-0.042510986328125,
-0.06158447265625,
0.0105133056640625,
0.03826904296875,
-0.0555419921875,
0.01117706298828125,
0.0109100341796875,
0.00978851318359375,
0.00957489013671875,
0.00989532470703125,
0.049041748046875,
-0.06201171875,
0.04449462890625,
0.03857421875,
-0.042327880859375,
-0.056915283203125,
0.0160064697265625,
0.038604736328125,
-0.016021728515625,
0.003154754638671875,
0.0269622802734375,
-0.006237030029296875,
-0.0170440673828125,
-0.0178375244140625,
0.0097198486328125,
0.0174102783203125,
-0.01482391357421875,
0.03277587890625,
-0.007354736328125,
-0.06787109375,
-0.008697509765625,
-0.0033397674560546875,
0.0165557861328125,
0.021697998046875,
0.04083251953125,
0.005420684814453125,
-0.030670166015625,
-0.04168701171875,
0.0343017578125,
-0.022552490234375,
-0.0174102783203125,
-0.00603485107421875,
0.030181884765625,
0.007171630859375,
-0.03179931640625,
0.0237274169921875,
0.037750244140625,
0.041534423828125,
-0.002323150634765625,
-0.0161285400390625,
0.0091400146484375,
-0.05352783203125,
-0.05340576171875,
-0.0017986297607421875,
-0.036468505859375,
-0.004848480224609375,
0.0208892822265625,
0.055023193359375,
-0.028045654296875,
-0.012481689453125,
0.01171112060546875,
0.0022640228271484375,
-0.0260162353515625,
0.00994110107421875,
0.006649017333984375,
-0.00037741661071777344,
0.04620361328125,
-0.0069580078125,
-0.039398193359375,
-0.0272979736328125,
0.0819091796875,
-0.0364990234375,
0.005214691162109375,
0.0021266937255859375,
0.003635406494140625,
0.0183868408203125,
-0.00241851806640625,
0.022674560546875,
-0.020477294921875,
0.0020599365234375,
-0.03802490234375,
0.046051025390625,
-0.0032939910888671875,
-0.01326751708984375,
-0.05609130859375,
-0.0033779144287109375,
-0.030609130859375,
-0.01044464111328125,
0.019378662109375,
0.002887725830078125,
0.00528717041015625,
-0.0097808837890625,
-0.05548095703125,
0.001621246337890625,
-0.0225830078125,
0.029632568359375,
0.026702880859375,
0.026885986328125,
-0.003406524658203125,
0.00661468505859375,
0.0053863525390625,
-0.044097900390625,
-0.0394287109375,
0.017333984375,
-0.0198211669921875,
-0.007537841796875,
-0.030029296875,
-0.0009260177612304688,
-0.026153564453125,
0.00009751319885253906,
-0.02093505859375,
0.045166015625,
0.03936767578125,
-0.01110076904296875,
-0.0031566619873046875,
-0.017669677734375,
0.035369873046875,
0.005035400390625,
0.0036106109619140625,
-0.0012416839599609375,
0.0677490234375,
0.007266998291015625,
-0.02593994140625,
0.0211029052734375,
0.027069091796875,
-0.07220458984375,
-0.0090789794921875,
0.056121826171875,
0.031829833984375,
0.018798828125,
0.0157470703125,
-0.00039649009704589844,
0.0623779296875,
-0.020172119140625,
0.004383087158203125,
-0.007354736328125,
0.016265869140625,
0.03143310546875,
-0.05029296875,
0.0019741058349609375,
0.034149169921875,
-0.03533935546875,
-0.017181396484375,
0.053741455078125,
0.0159149169921875,
0.02288818359375,
-0.00238800048828125,
-0.0230712890625,
0.006877899169921875,
-0.0243377685546875,
-0.0266265869140625,
-0.0102386474609375,
0.046142578125,
-0.020599365234375,
0.0209808349609375,
0.0207672119140625,
-0.002956390380859375,
0.003185272216796875,
0.00689697265625,
-0.0215911865234375,
0.002666473388671875,
0.04791259765625,
0.06671142578125,
-0.0616455078125,
0.0023593902587890625,
-0.055084228515625,
0.00615692138671875,
0.00695037841796875,
-0.0248870849609375,
0.02044677734375,
0.03466796875,
-0.019378662109375,
-0.013946533203125,
-0.0163116455078125,
0.027130126953125,
-0.021697998046875,
0.03448486328125,
0.03485107421875,
0.0496826171875,
-0.0033111572265625,
-0.05474853515625,
0.06732177734375,
-0.00640106201171875,
-0.028839111328125,
0.01367950439453125,
-0.034698486328125,
0.039154052734375,
-0.02642822265625,
0.035247802734375,
0.064208984375,
-0.0017604827880859375,
-0.0017213821411132812,
0.00942230224609375,
-0.0191802978515625,
-0.000025510787963867188,
0.0021762847900390625,
-0.0139923095703125,
0.005474090576171875,
-0.055267333984375,
0.031890869140625,
0.025421142578125,
0.0643310546875,
0.0175018310546875,
-0.0232696533203125,
0.020477294921875,
0.0433349609375,
-0.00220489501953125,
-0.0496826171875,
0.016448974609375,
-0.036346435546875,
0.0291748046875,
-0.0026950836181640625,
-0.014984130859375,
-0.0233001708984375,
0.029083251953125,
-0.006374359130859375,
-0.04156494140625,
-0.019744873046875,
-0.06353759765625,
-0.08306884765625,
-0.08209228515625,
0.01024627685546875,
-0.000888824462890625,
0.03759765625,
-0.0015306472778320312,
0.0299530029296875,
-0.0014057159423828125,
-0.0037174224853515625,
0.02618408203125,
0.046417236328125,
0.000823974609375,
-0.0275421142578125,
0.018798828125,
-0.0192718505859375,
-0.0294189453125,
0.016326904296875,
0.0067596435546875,
0.008880615234375,
-0.01091766357421875,
-0.0115203857421875,
-0.037261962890625,
-0.06689453125,
-0.0369873046875,
0.0599365234375,
0.033782958984375,
-0.06744384765625,
-0.006061553955078125,
-0.068603515625,
-0.018951416015625,
0.03302001953125,
-0.02789306640625,
-0.0164031982421875,
0.024169921875,
-0.02679443359375,
0.0258941650390625,
-0.0223541259765625,
0.01363372802734375,
0.0061187744140625,
0.09075927734375,
-0.0119476318359375,
-0.037353515625,
-0.0283966064453125,
-0.03265380859375,
-0.053680419921875,
0.053955078125,
-0.00217437744140625,
-0.0274505615234375,
0.01374053955078125,
-0.0016069412231445312,
0.0086212158203125,
-0.01605224609375,
-0.0264129638671875,
-0.0301361083984375,
0.01371002197265625,
-0.0396728515625,
0.004150390625,
-0.007293701171875,
0.003932952880859375,
0.033294677734375,
0.044464111328125,
-0.059478759765625,
-0.0238189697265625,
-0.0163726806640625,
0.01358795166015625,
-0.0312347412109375,
-0.043365478515625,
-0.00896453857421875,
-0.006610870361328125,
-0.06787109375,
0.0003650188446044922,
-0.0237884521484375,
-0.02978515625,
-0.01617431640625,
-0.0017747879028320312,
-0.035491943359375,
-0.049285888671875,
0.036895751953125,
-0.0243377685546875,
-0.0087127685546875,
0.03839111328125,
-0.03826904296875,
0.0261383056640625,
-0.0292510986328125,
-0.0203399658203125,
-0.12384033203125,
-0.021240234375,
-0.011322021484375,
0.06683349609375,
0.005466461181640625,
-0.02093505859375,
-0.0257720947265625,
0.0614013671875,
0.01629638671875,
-0.0089111328125,
0.048126220703125,
0.0077362060546875,
0.041961669921875,
0.01068878173828125,
0.00843048095703125,
-0.025634765625,
-0.001903533935546875,
0.008575439453125,
-0.0384521484375,
0.0089569091796875,
-0.00728607177734375,
-0.0216064453125,
0.046875,
-0.037078857421875,
-0.012420654296875,
-0.0092926025390625,
-0.043853759765625,
0.02685546875,
-0.01800537109375,
-0.005214691162109375,
-0.0338134765625,
-0.040802001953125,
-0.0013294219970703125,
-0.0197296142578125,
-0.047210693359375,
0.01340484619140625,
0.007537841796875,
0.042266845703125,
-0.0167999267578125,
0.024261474609375,
-0.006565093994140625,
0.029541015625,
0.0333251953125,
-0.0134124755859375,
-0.0291290283203125,
-0.049835205078125,
0.04730224609375,
0.0092315673828125,
-0.0013380050659179688,
0.0221710205078125,
0.062255859375,
0.0171356201171875,
-0.035186767578125,
0.030517578125,
0.0281829833984375,
-0.078125,
0.01299285888671875,
-0.0150604248046875,
0.001964569091796875,
-0.0478515625,
0.0038852691650390625,
-0.0177001953125,
0.062286376953125,
0.005817413330078125,
-0.03802490234375,
0.0131072998046875,
-0.0092315673828125,
0.02166748046875,
0.0011186599731445312,
0.0006151199340820312,
0.0064697265625,
0.0009703636169433594,
0.0153656005859375,
0.08087158203125,
0.057647705078125,
-0.006183624267578125,
0.05450439453125,
0.0369873046875,
-0.012176513671875,
0.0305633544921875,
0.0093841552734375,
0.058135986328125,
-0.040496826171875,
-0.07879638671875,
-0.038543701171875,
-0.01099395751953125,
0.02496337890625,
0.0379638671875,
0.01318359375,
0.0489501953125,
-0.0020599365234375,
-0.03948974609375,
-0.02374267578125,
-0.007122039794921875,
-0.039642333984375,
-0.06256103515625,
-0.00920867919921875,
-0.0009088516235351562,
0.00357818603515625,
0.06280517578125,
0.0259857177734375,
0.0195159912109375,
0.049346923828125,
-0.04071044921875,
0.006740570068359375,
0.00457763671875,
0.03704833984375,
0.01136016845703125,
-0.0265350341796875,
0.0258941650390625,
0.006572723388671875,
0.0203094482421875,
0.000774383544921875,
-0.0286407470703125,
0.0277252197265625,
0.0034122467041015625,
-0.0153350830078125,
0.01380157470703125,
-0.00708770751953125,
0.0159759521484375,
-0.052276611328125,
0.04571533203125,
0.040435791015625,
-0.0290374755859375,
-0.044708251953125,
-0.0194244384765625,
0.016998291015625,
0.016845703125,
-0.0054473876953125,
-0.0144805908203125,
-0.041046142578125,
0.02191162109375,
-0.0139923095703125,
-0.00589752197265625,
0.0109405517578125,
-0.006687164306640625,
-0.01372528076171875,
-0.0338134765625,
0.0182952880859375,
-0.0243682861328125,
0.020416259765625,
-0.031890869140625,
-0.0321044921875,
0.0167999267578125,
-0.026611328125,
0.01097869873046875,
-0.016845703125,
-0.01395416259765625,
-0.0243682861328125,
0.02093505859375,
0.0149688720703125,
0.03125,
-0.0380859375,
-0.0011043548583984375,
-0.028045654296875,
-0.016754150390625,
-0.0170745849609375,
-0.034698486328125,
-0.04095458984375,
0.005802154541015625,
0.030059814453125,
0.0340576171875,
-0.0218353271484375,
-0.043121337890625,
-0.046875,
0.005695343017578125,
0.03759765625,
0.072509765625,
-0.01065826416015625,
0.0928955078125,
-0.0220947265625,
0.052947998046875,
0.025482177734375,
0.0377197265625,
-0.02825927734375,
-0.01763916015625,
-0.00830841064453125,
0.004756927490234375,
0.021820068359375,
0.0096588134765625,
-0.0219879150390625,
-0.0228271484375,
0.0673828125,
-0.00965118408203125,
-0.0565185546875,
0.0177001953125,
-0.001880645751953125,
-0.027801513671875,
0.0396728515625,
0.0511474609375,
-0.031890869140625,
-0.02825927734375,
-0.007659912109375,
-0.0260772705078125,
-0.00812530517578125,
0.012939453125,
-0.033111572265625,
0.0005602836608886719,
-0.0279541015625,
-0.005702972412109375,
-0.0814208984375,
0.09576416015625,
0.11370849609375,
0.005828857421875,
0.056549072265625,
0.0164794921875,
-0.01375579833984375,
0.02490234375,
0.061370849609375,
-0.06817626953125,
-0.034942626953125,
0.06231689453125,
0.02716064453125,
-0.0235137939453125,
0.025177001953125,
-0.012237548828125,
0.0015392303466796875,
0.00786590576171875,
0.051605224609375,
-0.023345947265625,
0.006038665771484375,
0.019927978515625,
-0.005748748779296875,
0.0280303955078125,
0.0262451171875,
0.0202178955078125,
0.04559326171875,
0.01279449462890625,
-0.034393310546875,
-0.00958251953125,
0.036224365234375,
-0.01323699951171875,
-0.0125274658203125,
-0.04058837890625,
0.0352783203125,
0.0164794921875,
-0.059417724609375,
0.0271759033203125,
0.040771484375,
-0.02264404296875,
0.0004038810729980469,
0.00481414794921875,
-0.037109375,
-0.0229949951171875,
-0.0017852783203125,
0.005950927734375,
-0.01158905029296875,
0.00917816162109375,
0.03009033203125,
0.01507568359375,
-0.0162200927734375,
0.022064208984375,
-0.015899658203125,
0.0254364013671875,
-0.0264129638671875,
-0.00727081298828125,
-0.0521240234375,
-0.0102691650390625,
0.049896240234375,
-0.0213623046875,
-0.0687255859375,
0.019073486328125,
-0.07171630859375,
-0.0215911865234375,
-0.021636962890625,
-0.02276611328125,
0.1002197265625,
-0.00571441650390625,
-0.036041259765625,
0.0005993843078613281,
0.014190673828125,
-0.00804901123046875,
-0.039398193359375,
-0.007598876953125,
-0.05169677734375,
0.0064239501953125,
-0.0209197998046875,
-0.0013513565063476562,
0.002933502197265625,
-0.0305023193359375,
-0.070556640625,
0.08203125,
-0.03369140625,
0.043487548828125,
0.0052947998046875,
0.0227508544921875,
-0.02838134765625,
-0.015106201171875,
-0.0184326171875,
0.042144775390625,
0.007404327392578125,
0.00888824462890625,
-0.0283203125,
0.0001461505889892578,
0.003353118896484375,
0.022918701171875,
-0.017486572265625,
-0.00457000732421875,
-0.006626129150390625,
-0.00955963134765625,
0.0193023681640625,
0.0234832763671875,
0.02130126953125,
0.0170745849609375,
-0.036590576171875,
0.0096893310546875,
0.026336669921875,
-0.04144287109375,
0.03515625,
-0.0273284912109375,
-0.01104736328125,
-0.024017333984375,
0.021209716796875,
0.0215911865234375,
0.0029506683349609375,
0.0153045654296875,
-0.0139007568359375,
0.002155303955078125,
0.0250091552734375,
-0.0193634033203125,
-0.0177154541015625,
0.044677734375,
0.018402099609375,
-0.004608154296875,
0.00533294677734375,
-0.0239105224609375,
0.039520263671875,
-0.0010595321655273438,
0.005039215087890625,
0.0555419921875,
0.022613525390625,
0.01364898681640625,
0.041351318359375,
0.01849365234375,
0.01654052734375,
0.0126495361328125,
0.07147216796875,
0.0865478515625,
0.041961669921875,
0.043121337890625,
0.0152740478515625,
-0.0018758773803710938,
0.0701904296875,
-0.041839599609375,
-0.02496337890625,
0.0009946823120117188,
-0.01824951171875,
0.001247406005859375,
0.0020160675048828125,
-0.004207611083984375,
-0.01323699951171875,
0.016571044921875,
-0.041351318359375,
0.00788116455078125,
0.01116943359375,
-0.005237579345703125,
-0.017791748046875,
-0.049713134765625,
0.0288543701171875,
0.0291290283203125,
-0.02325439453125,
0.0133514404296875,
-0.0130615234375,
0.0055084228515625,
0.0004181861877441406,
0.0246124267578125,
0.031341552734375,
0.020294189453125,
-0.0158538818359375,
-0.032562255859375,
-0.06646728515625,
0.0341796875,
-0.024383544921875,
0.0004456043243408203,
-0.045440673828125,
0.04571533203125,
0.043060302734375,
0.045257568359375,
-0.013275146484375,
-0.00669097900390625,
0.065673828125,
0.027435302734375,
0.0533447265625,
-0.0107269287109375,
0.010528564453125,
-0.0187530517578125,
0.0059967041015625,
-0.0295867919921875,
-0.0189971923828125,
-0.0296783447265625,
0.0587158203125,
-0.031890869140625,
-0.00870513916015625,
0.0472412109375,
-0.0007333755493164062,
0.0095367431640625,
0.04803466796875,
0.004390716552734375,
0.039520263671875,
0.00868988037109375,
-0.035430908203125,
-0.0220794677734375,
-0.02069091796875,
-0.01416778564453125,
0.0171966552734375,
0.0369873046875,
0.0216827392578125,
-0.0172882080078125,
-0.0036449432373046875,
0.0220184326171875,
0.01134490966796875,
-0.0341796875,
0.0005664825439453125,
0.02154541015625,
0.037109375,
0.017547607421875,
-0.0295562744140625,
-0.007251739501953125,
0.00194549560546875,
0.0122833251953125,
-0.01152801513671875,
0.099853515625,
-0.020538330078125,
0.001544952392578125,
0.0185699462890625,
-0.002971649169921875,
-0.0034847259521484375,
-0.0172271728515625,
0.041748046875,
-0.0297393798828125,
0.0161590576171875,
-0.00693511962890625,
-0.04327392578125,
-0.0014486312866210938,
0.036529541015625,
-0.00588226318359375,
0.018768310546875,
-0.03717041015625,
0.021026611328125,
-0.0195770263671875,
0.04034423828125,
-0.00817108154296875,
-0.0273590087890625,
-0.0252227783203125,
0.008026123046875,
0.0333251953125,
0.043426513671875,
-0.026947021484375,
0.0278778076171875,
0.00075531005859375,
-0.04876708984375,
0.02642822265625,
-0.05438232421875,
0.038604736328125,
0.0182037353515625,
0.01702880859375,
-0.043121337890625,
-0.02935791015625,
0.0031528472900390625,
-0.00853729248046875,
0.02972412109375,
-0.01270294189453125,
0.02777099609375,
0.0186920166015625,
0.01030731201171875,
-0.00963592529296875,
-0.005214691162109375,
-0.056732177734375,
-0.0266571044921875,
0.04779052734375,
0.00670623779296875,
-0.0198822021484375,
-0.059967041015625,
-0.0216522216796875,
-0.0615234375,
0.006641387939453125,
0.030731201171875,
-0.03338623046875,
-0.016357421875,
0.006542205810546875,
-0.0058441162109375,
0.019805908203125,
-0.01263427734375,
-0.0188751220703125,
-0.01100921630859375,
-0.0304718017578125,
0.02655029296875,
-0.01824951171875,
0.0166473388671875,
-0.01036834716796875,
-0.00140380859375,
-0.0374755859375,
0.00531768798828125,
-0.034698486328125,
-0.004123687744140625,
0.0037899017333984375,
0.03717041015625,
0.072509765625,
-0.02325439453125,
-0.036773681640625,
-0.018829345703125,
0.01010894775390625,
0.028533935546875,
-0.01641845703125,
-0.0233612060546875,
0.04327392578125,
0.004581451416015625,
0.0029239654541015625,
-0.06622314453125,
-0.00982666015625,
-0.034149169921875,
0.017730712890625,
-0.0236053466796875,
0.01287078857421875,
0.01528167724609375,
-0.037384033203125,
-0.060089111328125,
0.0015325546264648438,
-0.011871337890625,
-0.03240966796875,
-0.0277099609375,
0.0247344970703125,
0.00846099853515625,
0.013641357421875,
-0.000530242919921875,
-0.02166748046875,
-0.01523590087890625,
0.017974853515625,
0.006793975830078125,
0.066650390625,
-0.0005960464477539062,
0.021240234375,
0.00982666015625,
0.021148681640625,
-0.00435638427734375,
0.01328277587890625,
-0.016510009765625,
0.00875091552734375,
-0.01103973388671875,
0.0237884521484375,
-0.0357666015625,
-0.035919189453125,
-0.01416015625,
-0.006740570068359375,
0.015655517578125,
-0.0248870849609375,
-0.0465087890625,
-0.006927490234375,
0.0849609375,
0.04058837890625,
0.032562255859375,
-0.047515869140625,
-0.043731689453125,
-0.036895751953125,
-0.003215789794921875,
0.01023101806640625,
0.0145416259765625,
-0.063232421875,
0.022674560546875,
0.017730712890625,
-0.041534423828125,
-0.0247039794921875,
0.0277862548828125,
-0.068359375,
0.016754150390625,
0.007049560546875,
-0.01129150390625,
-0.049285888671875,
0.04107666015625,
0.04345703125,
-0.047576904296875,
-0.0202178955078125,
-0.0080718994140625,
-0.0208740234375,
-0.0020542144775390625,
-0.037017822265625,
-0.00034236907958984375,
0.03509521484375,
-0.0462646484375,
-0.00691986083984375,
0.0095062255859375,
0.0276031494140625,
-0.0011577606201171875,
-0.0108795166015625,
-0.00125885009765625,
-0.0037841796875,
-0.00878143310546875,
-0.0273284912109375,
0.0021038055419921875,
0.0003814697265625,
-0.033294677734375,
0.048431396484375,
-0.00534820556640625,
0.058624267578125,
0.02935791015625,
0.012176513671875,
0.01256561279296875,
-0.0192108154296875,
0.0369873046875,
-0.053985595703125,
-0.0006270408630371094,
-0.009124755859375,
0.005222320556640625,
-0.042755126953125,
0.03173828125,
-0.02130126953125,
-0.0138397216796875,
0.0233917236328125
]
|
bf27707e2b0f7a1e4ea2556c9ce9f048266f73d9 | Wordpress Stackexchange
Q: Add a new tab to Wordpress Plugin install Listing When an user searches for a plugin from the WP Admin's Add Plugin area, I want to add a new tab(with a link to a page) next to the current tabs.
The location where I want the link is marked in the screenshot below.
Looked for it @ http://codex.wordpress.org/Adding_Administration_Menus but in vain.
Is it allowed by WP ?
Thanks in advance.
A: There is the filter: "views_plugin-install" (see here).
You can find it in /wp-admin/includes/class-wp-plugin-install-list-table.php (currently) at line 226:
$views = apply_filters( "views_{$this->screen->id}", $views );
Use it like:
add_filter( 'views_plugin-install', 'my_filter', 10, 1 );
function my_filter( $views ){
//Do your stuff
return $views;
}
| Q: Add a new tab to Wordpress Plugin install Listing When an user searches for a plugin from the WP Admin's Add Plugin area, I want to add a new tab(with a link to a page) next to the current tabs.
The location where I want the link is marked in the screenshot below.
Looked for it @ http://codex.wordpress.org/Adding_Administration_Menus but in vain.
Is it allowed by WP ?
Thanks in advance.
A: There is the filter: "views_plugin-install" (see here).
You can find it in /wp-admin/includes/class-wp-plugin-install-list-table.php (currently) at line 226:
$views = apply_filters( "views_{$this->screen->id}", $views );
Use it like:
add_filter( 'views_plugin-install', 'my_filter', 10, 1 );
function my_filter( $views ){
//Do your stuff
return $views;
}
| wordpress | {
"language": "en",
"length": 114,
"provenance": "stackexchange_00019.jsonl.gz:449819",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/165988"
} | [
0.09100341796875,
-0.003803253173828125,
0.046539306640625,
-0.0283050537109375,
0.018798828125,
-0.02789306640625,
0.05108642578125,
-0.0474853515625,
-0.001697540283203125,
0.01016998291015625,
-0.0059051513671875,
0.0032367706298828125,
-0.037017822265625,
-0.03436279296875,
-0.003513336181640625,
-0.046356201171875,
0.030548095703125,
-0.033233642578125,
0.01212310791015625,
-0.005218505859375,
-0.005340576171875,
0.01113128662109375,
0.030120849609375,
0.054656982421875,
0.00946044921875,
0.044342041015625,
0.0325927734375,
-0.0285797119140625,
0.010223388671875,
-0.00920867919921875,
0.0008339881896972656,
-0.03155517578125,
0.0186920166015625,
-0.00039958953857421875,
0.002826690673828125,
-0.044830322265625,
0.03643798828125,
-0.025146484375,
-0.0034008026123046875,
0.017333984375,
0.04302978515625,
-0.0273284912109375,
-0.005950927734375,
0.044891357421875,
-0.016387939453125,
-0.03912353515625,
0.05853271484375,
-0.01505279541015625,
0.00325775146484375,
-0.00687408447265625,
0.01165771484375,
-0.0117645263671875,
0.020294189453125,
-0.046417236328125,
0.01403045654296875,
0.044281005859375,
0.00762939453125,
0.0207366943359375,
-0.0006132125854492188,
0.0311431884765625,
-0.009429931640625,
0.047393798828125,
-0.003063201904296875,
-0.016998291015625,
0.0118255615234375,
-0.0090179443359375,
0.01508331298828125,
0.0219879150390625,
-0.03399658203125,
0.00785064697265625,
0.032379150390625,
-0.0272369384765625,
-0.01279449462890625,
0.0179901123046875,
0.0008878707885742188,
-0.043975830078125,
0.053619384765625,
-0.010162353515625,
-0.0191497802734375,
0.048065185546875,
0.0017976760864257812,
0.0011196136474609375,
0.02069091796875,
-0.0204010009765625,
0.0014438629150390625,
0.005157470703125,
-0.0127716064453125,
-0.01055908203125,
-0.032806396484375,
-0.006740570068359375,
-0.0312042236328125,
-0.0183563232421875,
-0.00989532470703125,
0.005645751953125,
-0.03369140625,
0.00589752197265625,
0.0321044921875,
0.05145263671875,
0.018096923828125,
0.037628173828125,
0.006313323974609375,
-0.060150146484375,
0.0504150390625,
-0.046844482421875,
-0.0016078948974609375,
0.0372314453125,
0.022216796875,
0.00661468505859375,
0.01090240478515625,
0.00476837158203125,
-0.01153564453125,
-0.0019140243530273438,
0.009368896484375,
-0.00888824462890625,
-0.019195556640625,
-0.016387939453125,
-0.0278167724609375,
-0.0024242401123046875,
0.00847625732421875,
-0.0196990966796875,
-0.0296173095703125,
0.01494598388671875,
-0.07794189453125,
0.038665771484375,
-0.003658294677734375,
-0.0162353515625,
0.0209808349609375,
0.01326751708984375,
-0.060546875,
-0.01532745361328125,
-0.0000317692756652832,
0.031494140625,
0.02972412109375,
0.049560546875,
-0.01171875,
0.0036411285400390625,
0.0057525634765625,
-0.01291656494140625,
-0.00780487060546875,
0.00322723388671875,
-0.0277099609375,
0.00385284423828125,
0.0244293212890625,
-0.062744140625,
0.043609619140625,
0.009796142578125,
-0.0053253173828125,
0.025482177734375,
0.042999267578125,
0.004261016845703125,
0.03851318359375,
-0.056915283203125,
0.024200439453125,
-0.00536346435546875,
0.0013132095336914062,
-0.0182647705078125,
-0.01438140869140625,
-0.013702392578125,
0.0059967041015625,
0.0024089813232421875,
0.01235198974609375,
0.020416259765625,
0.017669677734375,
-0.0526123046875,
-0.04254150390625,
-0.03338623046875,
-0.047515869140625,
-0.007671356201171875,
0.01959228515625,
0.0248260498046875,
-0.012237548828125,
-0.04840087890625,
0.03472900390625,
-0.00463104248046875,
-0.0229949951171875,
0.0322265625,
0.036865234375,
0.028839111328125,
0.023956298828125,
0.0369873046875,
0.0007066726684570312,
-0.0175933837890625,
0.1080322265625,
-0.053955078125,
-0.05865478515625,
0.03546142578125,
-0.028350830078125,
0.023681640625,
0.0261077880859375,
-0.007297515869140625,
0.0301055908203125,
0.01511383056640625,
-0.0095977783203125,
-0.023651123046875,
-0.0103302001953125,
-0.025115966796875,
0.030426025390625,
0.0139312744140625,
-0.0070953369140625,
0.01207733154296875,
-0.021514892578125,
0.0166015625,
-0.002719879150390625,
-0.0035762786865234375,
-0.016693115234375,
-0.0014944076538085938,
-0.006687164306640625,
0.03851318359375,
0.0077667236328125,
-0.00214385986328125,
-0.00853729248046875,
-0.0193939208984375,
0.034149169921875,
-0.07373046875,
-0.0279083251953125,
0.03167724609375,
-0.0175933837890625,
0.0390625,
0.01149749755859375,
0.0288543701171875,
0.0245208740234375,
-0.01007080078125,
0.038604736328125,
-0.021484375,
0.004547119140625,
-0.01507568359375,
-0.01427459716796875,
-0.0272064208984375,
-0.032745361328125,
0.00722503662109375,
-0.05792236328125,
0.04718017578125,
0.03216552734375,
0.02496337890625,
-0.01641845703125,
0.0007152557373046875,
-0.00021088123321533203,
-0.0738525390625,
0.007541656494140625,
0.048553466796875,
0.03179931640625,
0.03558349609375,
0.0023784637451171875,
0.0083770751953125,
0.0207366943359375,
-0.054351806640625,
0.00946807861328125,
0.0019159317016601562,
-0.0020427703857421875,
0.046905517578125,
0.0390625,
0.022003173828125,
0.007678985595703125,
0.0011157989501953125,
0.023895263671875,
0.0106964111328125,
-0.0189666748046875,
0.0024013519287109375,
-0.0162506103515625,
-0.0191650390625,
0.0129241943359375,
-0.004634857177734375,
-0.0157928466796875,
-0.01389312744140625,
0.025543212890625,
0.016357421875,
0.0312347412109375,
0.03240966796875,
-0.0389404296875,
-0.01031494140625,
0.026397705078125,
0.048492431640625,
-0.010833740234375,
-0.0178070068359375,
0.01763916015625,
-0.029998779296875,
-0.04412841796875,
0.0285491943359375,
0.0192108154296875,
-0.032684326171875,
-0.01971435546875,
-0.025238037109375,
0.01544952392578125,
-0.005580902099609375,
0.006107330322265625,
-0.04071044921875,
0.03314208984375,
-0.011383056640625,
-0.0131988525390625,
-0.049468994140625,
-0.0059356689453125,
-0.0171051025390625,
-0.0650634765625,
0.03924560546875,
0.005390167236328125,
-0.056549072265625,
0.0261993408203125,
-0.022979736328125,
0.014862060546875,
-0.0232086181640625,
0.074462890625,
0.052520751953125,
-0.01282501220703125,
-0.01090240478515625,
0.012451171875,
-0.02923583984375,
-0.01103973388671875,
-0.0014400482177734375,
-0.0137481689453125,
0.01303863525390625,
-0.05364990234375,
0.03485107421875,
0.0096588134765625,
0.0156707763671875,
-0.0200653076171875,
-0.05029296875,
-0.0360107421875,
-0.00884246826171875,
-0.06817626953125,
-0.02142333984375,
-0.0306243896484375,
-0.059051513671875,
-0.01690673828125,
0.027587890625,
-0.03839111328125,
0.006084442138671875,
0.0675048828125,
0.0006628036499023438,
0.008575439453125,
-0.02337646484375,
-0.0210113525390625,
-0.0266265869140625,
-0.052886962890625,
0.01129913330078125,
0.00543212890625,
-0.001399993896484375,
0.01482391357421875,
0.034393310546875,
0.0162506103515625,
-0.016326904296875,
0.0384521484375,
-0.01666259765625,
-0.00554656982421875,
0.010009765625,
0.024566650390625,
-0.0306854248046875,
-0.005550384521484375,
-0.00679779052734375,
0.03582763671875,
0.042724609375,
-0.03582763671875,
0.0175018310546875,
-0.01255035400390625,
0.0018100738525390625,
-0.005336761474609375,
-0.031341552734375,
0.00724029541015625,
0.0162506103515625,
-0.0245361328125,
-0.044830322265625,
0.0328369140625,
0.0238800048828125,
0.01366424560546875,
-0.0250701904296875,
-0.047760009765625,
-0.02996826171875,
0.016845703125,
-0.01136016845703125,
0.0245208740234375,
0.005344390869140625,
0.048797607421875,
0.01139068603515625,
-0.039703369140625,
-0.024200439453125,
-0.0216827392578125,
-0.05218505859375,
0.0269927978515625,
-0.012603759765625,
0.0003864765167236328,
0.002246856689453125,
0.01514434814453125,
0.0083160400390625,
-0.01593017578125,
-0.0210723876953125,
-0.0484619140625,
0.055389404296875,
0.01136016845703125,
0.040985107421875,
-0.05303955078125,
-0.043304443359375,
-0.026214599609375,
0.09637451171875,
-0.0792236328125,
-0.0190887451171875,
-0.0186309814453125,
0.017913818359375,
0.0208282470703125,
-0.048553466796875,
-0.01129913330078125,
-0.03265380859375,
-0.08563232421875,
-0.00824737548828125,
-0.00933837890625,
-0.0419921875,
-0.0217742919921875,
0.05029296875,
-0.05572509765625,
-0.0233917236328125,
0.05828857421875,
-0.037689208984375,
-0.02337646484375,
0.07269287109375,
-0.046478271484375,
0.0247344970703125,
-0.06512451171875,
0.0174407958984375,
-0.058013916015625,
0.0092926025390625,
-0.04315185546875,
0.033050537109375,
0.0256195068359375,
-0.006687164306640625,
-0.03271484375,
0.007366180419921875,
0.015869140625,
0.032684326171875,
0.020538330078125,
0.0148162841796875,
0.0038700103759765625,
-0.0287933349609375,
0.021881103515625,
-0.04364013671875,
0.015350341796875,
-0.0235443115234375,
-0.05206298828125,
0.003826141357421875,
-0.0194091796875,
0.04779052734375,
0.00820159912109375,
-0.0270233154296875,
-0.0284576416015625,
-0.031402587890625,
0.0023288726806640625,
0.01454925537109375,
0.007144927978515625,
-0.016845703125,
-0.007701873779296875,
-0.022247314453125,
0.01300048828125,
-0.0151519775390625,
-0.04534912109375,
0.031280517578125,
0.0556640625,
0.034027099609375,
0.002750396728515625,
-0.062469482421875,
0.07000732421875,
0.04998779296875,
0.043304443359375,
0.023223876953125,
0.0156097412109375,
-0.028961181640625,
0.0024204254150390625,
0.0261077880859375,
0.0221099853515625,
-0.0098114013671875,
0.0148773193359375,
0.0206298828125,
-0.024139404296875,
0.03076171875,
0.0347900390625,
-0.009033203125,
-0.001323699951171875,
-0.035858154296875,
0.0023784637451171875,
-0.0219573974609375,
0.029510498046875,
-0.003383636474609375,
0.032012939453125,
-0.025726318359375,
-0.0200653076171875,
0.01262664794921875,
0.038055419921875,
0.0278167724609375,
0.040771484375,
-0.01274871826171875,
0.01177215576171875,
-0.0207977294921875,
-0.01183319091796875,
0.016815185546875,
0.03668212890625,
0.00980377197265625,
0.0401611328125,
0.0104217529296875,
-0.0123291015625,
-0.03192138671875,
0.00806427001953125,
0.024810791015625,
-0.0196990966796875,
-0.052825927734375,
-0.05059814453125,
-0.005207061767578125,
-0.00543975830078125,
0.026397705078125,
0.021514892578125,
0.0174713134765625,
0.007205963134765625,
-0.0207061767578125,
-0.0008511543273925781,
0.027313232421875,
-0.0240631103515625,
-0.036956787109375,
-0.00893402099609375,
-0.0298614501953125,
0.0011730194091796875,
0.00045800209045410156,
0.044586181640625,
-0.051849365234375,
0.0455322265625,
-0.0018281936645507812,
0.00960540771484375,
0.0299224853515625,
-0.0253753662109375,
0.012542724609375,
0.0225830078125,
0.01045989990234375,
-0.047607421875,
0.035675048828125,
-0.0193328857421875,
0.02935791015625,
0.00498199462890625,
0.016204833984375,
-0.01560211181640625,
-0.04254150390625,
0.0494384765625,
-0.050079345703125,
0.000995635986328125,
0.0277252197265625,
-0.0178985595703125,
-0.033782958984375,
-0.036773681640625,
0.0406494140625,
0.0665283203125,
-0.031463623046875,
0.01351165771484375,
0.0057525634765625,
-0.01454925537109375,
-0.001026153564453125,
0.0018482208251953125,
-0.01042938232421875,
-0.021759033203125,
-0.00708770751953125,
0.01314544677734375,
-0.0024166107177734375,
-0.005367279052734375,
-0.0225677490234375,
-0.033477783203125,
-0.02001953125,
0.003223419189453125,
0.054840087890625,
-0.004589080810546875,
0.0849609375,
-0.0227508544921875,
-0.04754638671875,
-0.03509521484375,
0.0081939697265625,
0.04736328125,
0.039825439453125,
-0.0550537109375,
0.00848388671875,
-0.03814697265625,
-0.01085662841796875,
-0.04058837890625,
-0.0306854248046875,
-0.0457763671875,
-0.010589599609375,
0.044097900390625,
0.018798828125,
-0.0064544677734375,
-0.061737060546875,
-0.0244598388671875,
-0.004489898681640625,
0.0270843505859375,
-0.0164031982421875,
0.0281982421875,
0.055389404296875,
-0.0004680156707763672,
0.06707763671875,
0.0400390625,
0.0224151611328125,
-0.0592041015625,
-0.0242767333984375,
0.0109405517578125,
-0.0020008087158203125,
-0.0262451171875,
-0.01241302490234375,
-0.033172607421875,
0.0094451904296875,
0.0673828125,
-0.016387939453125,
0.0171661376953125,
0.00823974609375,
0.0096282958984375,
-0.00531005859375,
-0.0006608963012695312,
0.018890380859375,
0.00536346435546875,
0.046966552734375,
-0.0391845703125,
0.00991058349609375,
0.00039768218994140625,
0.06793212890625,
-0.038330078125,
-0.039337158203125,
-0.00754547119140625,
0.007297515869140625,
-0.0565185546875,
0.055572509765625,
0.0859375,
0.019866943359375,
0.08770751953125,
0.016082763671875,
0.0457763671875,
0.0614013671875,
-0.00727081298828125,
0.03887939453125,
0.0007233619689941406,
0.08599853515625,
0.013092041015625,
-0.00665283203125,
0.07958984375,
-0.0401611328125,
0.006649017333984375,
0.0230865478515625,
0.0127410888671875,
-0.07275390625,
0.024871826171875,
-0.0180511474609375,
0.015838623046875,
0.04193115234375,
0.0058746337890625,
0.0030918121337890625,
-0.0004067420959472656,
0.04229736328125,
-0.0227813720703125,
-0.0030460357666015625,
0.0240631103515625,
-0.01446533203125,
-0.0124969482421875,
-0.01503753662109375,
0.02899169921875,
0.0049591064453125,
0.017669677734375,
-0.049835205078125,
-0.0302276611328125,
-0.0277252197265625,
-0.0101165771484375,
0.0026798248291015625,
0.01580810546875,
-0.0082550048828125,
-0.029510498046875,
0.041717529296875,
-0.037933349609375,
0.005733489990234375,
0.0184783935546875,
-0.02001953125,
0.0261383056640625,
0.047149658203125,
-0.0207366943359375,
0.0289764404296875,
0.0178375244140625,
0.00717926025390625,
0.039764404296875,
-0.0007891654968261719,
-0.013031005859375,
0.00884246826171875,
-0.024627685546875,
-0.00922393798828125,
-0.0205230712890625,
0.008514404296875,
-0.00626373291015625,
-0.0187835693359375,
0.058502197265625,
-0.0231475830078125,
-0.0216827392578125,
0.0159149169921875,
-0.018035888671875,
0.00830078125,
0.031494140625,
-0.0009336471557617188,
-0.0273284912109375,
-0.0287933349609375,
0.0220489501953125,
-0.04339599609375,
0.021270751953125,
0.034027099609375,
-0.038970947265625,
0.082763671875,
0.0129852294921875,
-0.005268096923828125,
-0.0087127685546875,
0.052032470703125,
-0.027984619140625,
0.0207977294921875,
-0.031036376953125,
0.042205810546875,
0.006641387939453125,
0.05206298828125,
-0.0300140380859375,
-0.01473236083984375,
0.0200347900390625,
0.0472412109375,
0.040740966796875,
0.00902557373046875,
-0.050079345703125,
0.004795074462890625,
0.0251007080078125,
0.00598907470703125,
0.0010080337524414062,
0.07025146484375,
0.0233306884765625,
-0.01409912109375,
0.05517578125,
-0.0009002685546875,
0.052032470703125,
-0.0259246826171875,
0.027740478515625,
0.0178375244140625,
-0.002040863037109375,
-0.01323699951171875,
-0.039703369140625,
0.060577392578125,
0.0041656494140625,
-0.036102294921875,
-0.011322021484375,
-0.02935791015625,
0.027801513671875,
0.00797271728515625,
-0.0236358642578125,
0.0138092041015625,
-0.006198883056640625,
-0.006618499755859375,
0.0224761962890625,
-0.01922607421875,
0.0023975372314453125,
0.005764007568359375,
0.0181732177734375,
-0.03302001953125,
-0.0112457275390625,
-0.001529693603515625,
0.04180908203125,
-0.03118896484375,
0.01007843017578125,
-0.006145477294921875,
0.022216796875,
-0.03802490234375,
-0.0092926025390625,
0.044769287109375,
0.0302276611328125,
-0.0198822021484375,
-0.0745849609375,
0.0066986083984375,
0.00251007080078125,
-0.0038089752197265625,
0.048431396484375,
0.0148468017578125,
0.00757598876953125,
0.06890869140625,
-0.030029296875,
0.00020766258239746094,
0.0300445556640625,
0.0148773193359375,
-0.0016603469848632812,
-0.014373779296875,
-0.0163726806640625,
0.00948333740234375,
-0.032012939453125,
0.005954742431640625,
0.00150299072265625,
0.0316162109375,
0.021484375,
0.0226287841796875,
0.0004792213439941406,
-0.017181396484375,
-0.021820068359375,
0.0218505859375,
-0.032501220703125,
0.036163330078125,
-0.039794921875,
-0.0298919677734375,
-0.00821685791015625,
0.0303955078125,
0.0018033981323242188,
0.0164031982421875,
0.0037689208984375,
0.0171051025390625,
0.024658203125,
-0.0010805130004882812,
0.04559326171875,
-0.01261138916015625,
-0.013275146484375,
-0.05010986328125,
0.048248291015625,
0.0472412109375,
0.0238800048828125,
0.01352691650390625,
-0.014739990234375,
0.0758056640625,
-0.0083770751953125,
0.013458251953125,
-0.0035800933837890625,
-0.052642822265625,
-0.0030651092529296875,
-0.0128631591796875,
0.07623291015625,
0.01360321044921875,
-0.072265625,
-0.005764007568359375,
-0.05023193359375,
-0.027679443359375,
0.02984619140625,
0.038299560546875,
-0.0211334228515625,
0.0293731689453125,
0.01421356201171875,
-0.0037174224853515625,
-0.0241241455078125,
-0.01172637939453125,
0.031341552734375,
0.03289794921875,
0.0037593841552734375,
0.0238037109375,
-0.042236328125,
0.0125885009765625,
-0.018280029296875,
0.01007080078125,
-0.00041174888610839844,
0.08367919921875,
-0.01323699951171875,
0.005733489990234375,
-0.0131988525390625,
-0.00522613525390625,
-0.01041412353515625,
-0.028839111328125,
0.052764892578125,
0.006145477294921875,
-0.018524169921875,
-0.01290130615234375,
-0.0472412109375,
-0.0181732177734375,
0.03643798828125,
-0.0201873779296875,
-0.026458740234375,
-0.014404296875,
0.04150390625,
0.00807952880859375,
0.07183837890625,
-0.010101318359375,
-0.046783447265625,
-0.05853271484375,
-0.00669097900390625,
0.024566650390625,
0.0413818359375,
0.0010557174682617188,
0.03863525390625,
0.036865234375,
0.0277557373046875,
-0.016845703125,
0.030609130859375,
-0.006626129150390625,
0.03961181640625,
-0.039306640625,
-0.02911376953125,
0.0033321380615234375,
-0.0191802978515625,
0.01476287841796875,
0.00012373924255371094,
0.054412841796875,
0.006298065185546875,
-0.0194091796875,
0.0052032470703125,
0.0200042724609375,
0.031280517578125,
-0.0323486328125,
0.0121307373046875,
0.010284423828125,
0.0021419525146484375,
-0.01045989990234375,
0.00954437255859375,
-0.02838134765625,
-0.039947509765625,
0.0003838539123535156,
-0.005168914794921875,
-0.01317596435546875,
-0.063232421875,
-0.0565185546875,
0.043548583984375,
0.0237274169921875,
0.00481414794921875,
-0.103271484375,
0.06060791015625,
-0.0290985107421875,
0.08734130859375,
-0.038360595703125,
0.0141448974609375,
-0.00438690185546875,
0.03521728515625,
-0.029571533203125,
-0.032989501953125,
-0.0207061767578125,
0.036407470703125,
-0.0255279541015625,
0.007640838623046875,
0.0264434814453125,
-0.0273895263671875,
-0.01357269287109375,
0.003749847412109375,
0.0222625732421875,
0.041259765625,
0.0333251953125,
-0.008544921875,
0.0298004150390625,
-0.0222320556640625,
-0.0142059326171875,
-0.046234130859375,
0.0036163330078125,
-0.042083740234375,
-0.01265716552734375,
-0.0023326873779296875,
-0.01142120361328125,
-0.004436492919921875,
-0.05133056640625,
-0.0885009765625,
0.0445556640625,
-0.0036144256591796875,
-0.03717041015625,
-0.054779052734375,
-0.0026493072509765625,
-0.005405426025390625,
0.01224517822265625,
-0.00864410400390625,
-0.0562744140625,
-0.032470703125,
0.03521728515625,
-0.0012693405151367188,
0.01078033447265625,
0.0128326416015625,
-0.01142120361328125,
-0.0202178955078125,
0.00592803955078125,
0.0120391845703125,
-0.01898193359375,
0.0251007080078125,
-0.0262603759765625,
0.035003662109375,
0.042510986328125,
-0.02813720703125,
-0.02569580078125,
0.00021409988403320312,
-0.0389404296875,
-0.01507568359375,
-0.07257080078125,
0.0042877197265625,
0.0049285888671875,
0.08990478515625,
0.015960693359375,
0.0212249755859375,
-0.0482177734375,
0.0046844482421875,
-0.036407470703125,
0.0088043212890625,
-0.004070281982421875,
0.0002015829086303711,
-0.05194091796875,
-0.00586700439453125,
0.0259552001953125,
0.007717132568359375,
-0.0008921623229980469,
0.025909423828125,
-0.003940582275390625,
-0.0426025390625,
0.038848876953125,
0.0218658447265625,
-0.06707763671875,
0.021820068359375,
0.07958984375,
-0.055267333984375,
-0.02130126953125,
0.02642822265625,
-0.02001953125,
0.0236358642578125,
0.01313018798828125,
0.00948333740234375,
-0.0213623046875,
-0.045989990234375,
0.0357666015625,
-0.0149383544921875,
0.06304931640625,
-0.05511474609375,
-0.034271240234375,
-0.0036830902099609375,
0.02166748046875,
-0.0228729248046875,
0.005283355712890625,
-0.004932403564453125,
0.04486083984375,
-0.0226898193359375,
0.11761474609375,
0.0022602081298828125,
-0.011505126953125,
-0.034637451171875,
0.03765869140625,
0.01216888427734375,
-0.03082275390625,
0.0450439453125,
-0.0145111083984375,
-0.0042724609375,
0.022491455078125,
-0.01910400390625,
-0.0198822021484375,
-0.00726318359375,
-0.0166015625,
-0.0010557174682617188,
0.004550933837890625
]
|
36950a1712c40ad5ccd75aedf040ddab96c49087 | Wordpress Stackexchange
Q: Get post ids from WP_Query? Is there a way I can retrieve an array of post ids queried from the following:
$latest = new WP_Query( array (
'orderby' => 'rand',
'posts_per_page' => 3
));
if ( $latest -> have_posts() ) : while ( $latest -> have_posts() ) : $latest -> the_post();
get_template_part( 'templates/content', 'post' );
endwhile; endif; wp_reset_postdata();
Follow Up:
I used wp_list_pluck to retrieve an array of post ids:
$post_ids = wp_list_pluck( $latest->posts, 'ID' );
Then converted the array into a string using the implode function:
$post_ids_string = implode( ',', $post_ids );
Sorry for the ambiguous question.
A: Try
$post_ids = wp_list_pluck( $latest->posts, 'ID' );
Read wp_list_pluck
| Q: Get post ids from WP_Query? Is there a way I can retrieve an array of post ids queried from the following:
$latest = new WP_Query( array (
'orderby' => 'rand',
'posts_per_page' => 3
));
if ( $latest -> have_posts() ) : while ( $latest -> have_posts() ) : $latest -> the_post();
get_template_part( 'templates/content', 'post' );
endwhile; endif; wp_reset_postdata();
Follow Up:
I used wp_list_pluck to retrieve an array of post ids:
$post_ids = wp_list_pluck( $latest->posts, 'ID' );
Then converted the array into a string using the implode function:
$post_ids_string = implode( ',', $post_ids );
Sorry for the ambiguous question.
A: Try
$post_ids = wp_list_pluck( $latest->posts, 'ID' );
Read wp_list_pluck
A: I suggest this solution
get_posts([
'posts_per_page' => -1,
'post_status' => 'publish',
'post_type' => 'some-custom-post-type',
'fields' => 'ids',
]);
and as return you have array with ids inside ;)
array (size=5)
0 => int 81002
1 => int 77885
2 => int 77180
3 => int 74722
4 => int 73312
A: Using the solution from @s-ha-dum is economical if you only need to get the id's, and you don't have previous query object set.
Here is why:
switch ( $q['fields'] ) {
case 'ids':
$fields = "$wpdb->posts.ID";
break;
case 'id=>parent':
$fields = "$wpdb->posts.ID, $wpdb->posts.post_parent";
break;
default:
$fields = "$wpdb->posts.*";
Because in the case you only specify 'fields' => 'ids' nothing more you will get in return than the ID's.
If you would go with 'fields' => 'id=>parent' (Looks really funny) you will get also the parent ID's.
Any other way using 'fields' argument will not have any impact as of WordPress v4.7.
But in case you have the query as in the example wp_list_pluck will do the job.
A: Use the fields argument in your query.
fields (string) - Which fields to return. All fields are returned by
default. There are two other options:
- 'ids' - Return an array of post IDs.
- 'id=>parent' - Return an associative array [ parent => ID, … ].
https://developer.wordpress.org/reference/classes/wp_query/#return-fields-parameter
$latest = new WP_Query( array (
'orderby' => 'rand',
'posts_per_page' => 3,
'fields' => 'ids'
));
var_dump($latest->posts);
A: Why not use the get_the_ID() function? Just sharing the loop code and it shows all post ids in the query.
// The Loop
if ( $the_query->have_posts() ) {
while ( $the_query->have_posts() ) {
$the_query->the_post();
echo '<li>' . get_the_ID() . '</li>';
}
} else {
// no posts found
$string = "no posts found";
}
| wordpress | {
"language": "en",
"length": 399,
"provenance": "stackexchange_00019.jsonl.gz:449831",
"question_score": "46",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166029"
} | [
0.043060302734375,
-0.008697509765625,
0.021636962890625,
0.033355712890625,
0.016876220703125,
-0.0228729248046875,
0.07928466796875,
-0.032135009765625,
0.00980377197265625,
0.0321044921875,
-0.0670166015625,
-0.00803375244140625,
-0.0237884521484375,
0.00461578369140625,
-0.03350830078125,
-0.058319091796875,
0.048797607421875,
-0.06597900390625,
-0.005146026611328125,
-0.0009107589721679688,
-0.007965087890625,
0.0161895751953125,
0.041107177734375,
0.062042236328125,
0.02374267578125,
-0.00464630126953125,
0.03997802734375,
-0.023651123046875,
0.0206756591796875,
-0.0194091796875,
0.01023101806640625,
0.00423431396484375,
-0.0029201507568359375,
-0.023193359375,
0.045684814453125,
-0.007068634033203125,
0.046783447265625,
-0.024658203125,
0.03314208984375,
0.0162811279296875,
0.0156402587890625,
-0.003681182861328125,
-0.00310516357421875,
0.003387451171875,
-0.0296173095703125,
-0.0201263427734375,
0.009368896484375,
-0.0092315673828125,
0.02801513671875,
-0.0018167495727539062,
0.0177459716796875,
0.032806396484375,
0.0307464599609375,
0.0014553070068359375,
-0.01110076904296875,
-0.010589599609375,
0.0163421630859375,
-0.00362396240234375,
0.053802490234375,
-0.048309326171875,
-0.06243896484375,
-0.0243682861328125,
0.04534912109375,
-0.023406982421875,
-0.0003612041473388672,
0.004665374755859375,
0.09112548828125,
0.01561737060546875,
-0.000396728515625,
-0.0181121826171875,
0.0107269287109375,
0.022186279296875,
-0.006683349609375,
-0.031646728515625,
-0.01401519775390625,
-0.0030384063720703125,
0.008270263671875,
-0.032135009765625,
-0.01137542724609375,
0.017913818359375,
-0.02264404296875,
-0.0308380126953125,
-0.07330322265625,
0.00682830810546875,
-0.00817108154296875,
0.023223876953125,
-0.01055908203125,
-0.006694793701171875,
-0.0194549560546875,
-0.0185546875,
-0.016326904296875,
-0.01666259765625,
-0.029937744140625,
0.0243377685546875,
0.0006561279296875,
-0.0374755859375,
0.00942230224609375,
0.049530029296875,
-0.026519775390625,
-0.005802154541015625,
-0.0253448486328125,
-0.0183258056640625,
-0.01207733154296875,
-0.0170135498046875,
-0.0125579833984375,
0.0039520263671875,
0.049407958984375,
0.0253753662109375,
0.0009527206420898438,
0.037994384765625,
-0.01708984375,
0.0031757354736328125,
0.005558013916015625,
0.0005817413330078125,
-0.054656982421875,
0.0026702880859375,
-0.01490020751953125,
-0.031097412109375,
-0.0060882568359375,
-0.0300445556640625,
0.005157470703125,
0.018890380859375,
0.01084136962890625,
0.0188446044921875,
0.0045318603515625,
0.016998291015625,
-0.0122833251953125,
-0.0277557373046875,
-0.01163482666015625,
0.0250396728515625,
-0.043670654296875,
0.012359619140625,
0.08087158203125,
0.02130126953125,
0.00579071044921875,
-0.03497314453125,
0.0125732421875,
-0.01554107666015625,
0.0214080810546875,
-0.01422882080078125,
-0.0082855224609375,
-0.0182342529296875,
0.0225677490234375,
0.00015914440155029297,
0.0255279541015625,
0.0232086181640625,
0.0176849365234375,
0.0031566619873046875,
0.00516510009765625,
-0.0171661376953125,
-0.01074981689453125,
-0.004364013671875,
0.0103302001953125,
0.0262298583984375,
0.0167083740234375,
-0.0167999267578125,
0.055328369140625,
-0.054901123046875,
0.004634857177734375,
-0.057098388671875,
0.0205841064453125,
0.0144195556640625,
0.0011806488037109375,
0.00293731689453125,
-0.037200927734375,
-0.0136871337890625,
-0.0068206787109375,
-0.0232086181640625,
0.03057861328125,
0.0689697265625,
0.0283660888671875,
-0.048614501953125,
0.0295867919921875,
0.0229644775390625,
-0.0266571044921875,
0.0194244384765625,
0.016815185546875,
-0.0265045166015625,
0.0170745849609375,
0.03515625,
-0.03350830078125,
-0.0452880859375,
-0.033538818359375,
0.00164031982421875,
-0.028472900390625,
0.048065185546875,
0.03173828125,
0.08642578125,
-0.0196685791015625,
0.0301361083984375,
0.00093841552734375,
0.01416015625,
-0.063232421875,
0.0287017822265625,
0.0120086669921875,
0.0042724609375,
-0.0250244140625,
0.006008148193359375,
-0.00359344482421875,
-0.0312347412109375,
0.0005393028259277344,
0.0035114288330078125,
-0.0112457275390625,
0.0439453125,
-0.0849609375,
0.015716552734375,
-0.0224761962890625,
0.0300445556640625,
-0.006175994873046875,
-0.003826141357421875,
0.0271759033203125,
-0.0120086669921875,
-0.0287322998046875,
0.0034580230712890625,
-0.039031982421875,
0.01219940185546875,
-0.0457763671875,
-0.0161895751953125,
-0.0279541015625,
0.006420135498046875,
-0.047607421875,
-0.012359619140625,
-0.050262451171875,
0.0255889892578125,
0.057647705078125,
-0.018768310546875,
0.00026297569274902344,
-0.022735595703125,
0.0638427734375,
0.0252685546875,
-0.05596923828125,
-0.0186920166015625,
0.019439697265625,
0.046234130859375,
-0.0115966796875,
-0.01515960693359375,
0.00884246826171875,
-0.041534423828125,
0.0177764892578125,
0.041595458984375,
0.042724609375,
0.0200042724609375,
0.01474761962890625,
-0.031280517578125,
0.02838134765625,
-0.01143646240234375,
0.032257080078125,
-0.05224609375,
0.0145416259765625,
0.050506591796875,
0.0242156982421875,
0.0204315185546875,
0.00959014892578125,
0.01739501953125,
0.013427734375,
0.039215087890625,
-0.012939453125,
0.019744873046875,
-0.0038089752197265625,
0.0108184814453125,
-0.033233642578125,
-0.0498046875,
0.013946533203125,
-0.0443115234375,
-0.014862060546875,
0.040985107421875,
0.0188751220703125,
0.037078857421875,
-0.0057525634765625,
0.01428985595703125,
-0.01544952392578125,
-0.0190887451171875,
0.003574371337890625,
0.0208892822265625,
-0.0208282470703125,
0.0309295654296875,
-0.0308685302734375,
0.005802154541015625,
0.0263519287109375,
0.0012454986572265625,
0.00901031494140625,
0.066162109375,
0.01247406005859375,
-0.01097869873046875,
-0.029296875,
-0.0310516357421875,
-0.0027980804443359375,
0.002834320068359375,
-0.007808685302734375,
0.025238037109375,
0.02801513671875,
0.06915283203125,
-0.0208587646484375,
0.048309326171875,
-0.0204315185546875,
0.0341796875,
0.02996826171875,
-0.053070068359375,
0.049468994140625,
-0.036651611328125,
0.03668212890625,
0.06817626953125,
-0.0262603759765625,
0.02752685546875,
0.0053863525390625,
0.0157928466796875,
0.04541015625,
-0.01114654541015625,
-0.006664276123046875,
-0.01067352294921875,
-0.0301666259765625,
0.00510406494140625,
0.0111541748046875,
0.1053466796875,
-0.035400390625,
-0.061767578125,
0.0234832763671875,
0.023284912109375,
-0.078857421875,
-0.11199951171875,
0.050994873046875,
-0.0321044921875,
-0.0589599609375,
-0.0271148681640625,
-0.030242919921875,
0.0183563232421875,
-0.03857421875,
-0.02728271484375,
0.0010471343994140625,
-0.00844573974609375,
-0.10479736328125,
-0.036865234375,
-0.0743408203125,
0.0252838134765625,
-0.0263824462890625,
0.01953125,
-0.0005984306335449219,
0.039276123046875,
0.01114654541015625,
-0.0247650146484375,
0.007549285888671875,
0.05133056640625,
-0.027557373046875,
-0.033721923828125,
0.005985260009765625,
0.007602691650390625,
-0.033416748046875,
0.020263671875,
-0.02423095703125,
0.007625579833984375,
-0.00811004638671875,
-0.01227569580078125,
-0.035980224609375,
0.0224456787109375,
0.025146484375,
-0.00013649463653564453,
0.00882720947265625,
0.04266357421875,
0.0423583984375,
-0.00844573974609375,
-0.0280303955078125,
-0.037261962890625,
-0.04443359375,
0.021270751953125,
0.0238800048828125,
0.0180206298828125,
-0.02911376953125,
0.0157012939453125,
0.0009937286376953125,
-0.03607177734375,
-0.01198577880859375,
-0.04632568359375,
0.06329345703125,
0.02587890625,
0.0501708984375,
0.0036487579345703125,
0.0023403167724609375,
-0.0217132568359375,
-0.00507354736328125,
-0.01433563232421875,
-0.014739990234375,
-0.031494140625,
-0.01143646240234375,
-0.038482666015625,
-0.0262603759765625,
0.05206298828125,
-0.00628662109375,
0.015716552734375,
-0.01230621337890625,
-0.035980224609375,
0.00968170166015625,
0.09423828125,
-0.0151519775390625,
-0.0391845703125,
-0.0300140380859375,
0.017669677734375,
-0.0257720947265625,
-0.06866455078125,
0.0024509429931640625,
-0.006275177001953125,
-0.016998291015625,
-0.00470733642578125,
-0.0219573974609375,
-0.004974365234375,
-0.0235137939453125,
0.02203369140625,
-0.00913238525390625,
-0.0157928466796875,
0.02996826171875,
-0.01336669921875,
0.0055084228515625,
0.0140533447265625,
-0.01543426513671875,
0.00765228271484375,
-0.036895751953125,
-0.0027313232421875,
-0.07183837890625,
-0.02288818359375,
0.03192138671875,
0.028778076171875,
-0.0147857666015625,
-0.03814697265625,
-0.0026226043701171875,
0.045440673828125,
-0.01910400390625,
0.01010894775390625,
0.005931854248046875,
0.05731201171875,
-0.035858154296875,
-0.0391845703125,
0.0026416778564453125,
-0.0625,
-0.0187835693359375,
-0.0178985595703125,
0.0130767822265625,
-0.0015764236450195312,
-0.047637939453125,
-0.0214691162109375,
-0.031219482421875,
-0.01265716552734375,
-0.0291595458984375,
-0.0144500732421875,
0.0023212432861328125,
0.041168212890625,
-0.0011959075927734375,
0.0036869049072265625,
-0.03289794921875,
-0.056365966796875,
0.0845947265625,
0.045135498046875,
-0.01538848876953125,
-0.01555633544921875,
0.09332275390625,
0.01033782958984375,
-0.06939697265625,
-0.038970947265625,
-0.0094146728515625,
0.04345703125,
-0.018463134765625,
0.020843505859375,
0.01340484619140625,
-0.05047607421875,
0.07635498046875,
0.0179595947265625,
-0.03515625,
0.012359619140625,
0.039642333984375,
-0.0011320114135742188,
-0.01367950439453125,
-0.00628662109375,
-0.0267486572265625,
0.023956298828125,
0.04486083984375,
-0.016143798828125,
-0.04248046875,
-0.0089263916015625,
0.0714111328125,
-0.031219482421875,
0.033477783203125,
-0.0452880859375,
-0.03802490234375,
0.01861572265625,
-0.025115966796875,
0.00372314453125,
0.00838470458984375,
0.00208282470703125,
0.00980377197265625,
0.0079498291015625,
0.00849151611328125,
0.01202392578125,
0.0267333984375,
0.017364501953125,
0.020721435546875,
0.035430908203125,
0.0006890296936035156,
-0.016448974609375,
0.0003113746643066406,
0.058258056640625,
-0.0316162109375,
-0.052947998046875,
-0.00273895263671875,
-0.0267333984375,
0.009368896484375,
0.057342529296875,
-0.016998291015625,
0.056640625,
0.042083740234375,
-0.014251708984375,
-0.019500732421875,
-0.057037353515625,
-0.01509857177734375,
-0.060760498046875,
0.0111541748046875,
0.00872039794921875,
-0.00731658935546875,
0.029449462890625,
0.06512451171875,
-0.007366180419921875,
0.057769775390625,
-0.0199127197265625,
0.006504058837890625,
-0.022369384765625,
0.043243408203125,
0.0158233642578125,
-0.01197052001953125,
0.01454925537109375,
0.0281219482421875,
0.007305145263671875,
-0.046539306640625,
0.024169921875,
0.017669677734375,
0.026123046875,
0.019775390625,
-0.031585693359375,
0.0227203369140625,
-0.0214080810546875,
-0.00972747802734375,
0.0340576171875,
0.037872314453125,
-0.017303466796875,
-0.0236358642578125,
-0.004207611083984375,
0.00792694091796875,
0.012847900390625,
0.0103912353515625,
-0.0018529891967773438,
-0.02581787109375,
0.0013341903686523438,
-0.005496978759765625,
0.0041656494140625,
-0.023895263671875,
-0.0179595947265625,
-0.0201416015625,
-0.04840087890625,
-0.034393310546875,
0.01346588134765625,
-0.0133819580078125,
-0.01068878173828125,
-0.01171875,
0.028656005859375,
-0.000537872314453125,
0.060516357421875,
-0.0261077880859375,
-0.03778076171875,
0.0303802490234375,
0.007282257080078125,
0.028656005859375,
0.0016908645629882812,
-0.017425537109375,
-0.00803375244140625,
-0.03485107421875,
0.0029468536376953125,
0.06463623046875,
-0.0234375,
-0.01043701171875,
-0.037628173828125,
-0.00093841552734375,
0.0340576171875,
-0.00004565715789794922,
0.0021419525146484375,
-0.00261688232421875,
-0.01541900634765625,
-0.017852783203125,
0.030487060546875,
0.0002980232238769531,
0.047393798828125,
-0.004673004150390625,
0.046600341796875,
0.01309967041015625,
0.01372528076171875,
-0.044769287109375,
-0.01557159423828125,
-0.00841522216796875,
-0.031280517578125,
0.017333984375,
0.0041351318359375,
-0.0032138824462890625,
-0.048065185546875,
0.00801849365234375,
0.00385284423828125,
0.0250091552734375,
-0.034942626953125,
0.005084991455078125,
-0.007305145263671875,
-0.0005345344543457031,
-0.042816162109375,
-0.0426025390625,
0.05615234375,
-0.0240325927734375,
-0.040740966796875,
0.0196685791015625,
0.0469970703125,
-0.060028076171875,
-0.007114410400390625,
-0.06158447265625,
0.0010404586791992188,
-0.03753662109375,
0.034088134765625,
0.06536865234375,
0.028839111328125,
0.04278564453125,
-0.020233154296875,
0.01983642578125,
0.011627197265625,
0.0170440673828125,
0.004344940185546875,
-0.0205841064453125,
0.06732177734375,
0.014923095703125,
-0.018096923828125,
0.051544189453125,
-0.041961669921875,
-0.0026912689208984375,
-0.02618408203125,
0.0012302398681640625,
0.00926971435546875,
0.0142974853515625,
-0.0118255615234375,
-0.02386474609375,
0.007686614990234375,
-0.0006256103515625,
-0.01100921630859375,
-0.0382080078125,
0.042694091796875,
0.00922393798828125,
-0.017608642578125,
0.01291656494140625,
0.007625579833984375,
-0.00751495361328125,
-0.0261383056640625,
0.00982666015625,
0.004642486572265625,
-0.03594970703125,
0.0240020751953125,
0.0229034423828125,
0.009796142578125,
-0.0246734619140625,
0.00592803955078125,
-0.00974273681640625,
-0.0017948150634765625,
-0.061248779296875,
0.0117950439453125,
-0.03350830078125,
0.01763916015625,
-0.01294708251953125,
-0.0238037109375,
0.0296173095703125,
0.0270538330078125,
-0.001110076904296875,
-0.0419921875,
0.00799560546875,
-0.045440673828125,
-0.024383544921875,
-0.0240478515625,
0.00757598876953125,
0.054351806640625,
-0.0322265625,
0.0335693359375,
0.004425048828125,
-0.0196533203125,
-0.00885772705078125,
-0.004608154296875,
0.06488037109375,
-0.0513916015625,
0.002349853515625,
0.03167724609375,
0.041107177734375,
-0.015472412109375,
-0.003444671630859375,
0.01348114013671875,
-0.0177764892578125,
0.0120391845703125,
0.005474090576171875,
0.021087646484375,
0.01390838623046875,
-0.00658416748046875,
-0.042449951171875,
0.0489501953125,
-0.0027332305908203125,
-0.0024967193603515625,
0.040924072265625,
0.020599365234375,
-0.05023193359375,
-0.018646240234375,
-0.032806396484375,
0.04656982421875,
-0.0155029296875,
0.051910400390625,
-0.0474853515625,
-0.0035915374755859375,
0.0154266357421875,
0.04541015625,
0.0941162109375,
0.00936126708984375,
-0.0226287841796875,
-0.0304718017578125,
0.04534912109375,
0.07965087890625,
0.005825042724609375,
0.01306915283203125,
0.00585174560546875,
0.04632568359375,
0.06292724609375,
-0.060394287109375,
0.040374755859375,
-0.0262451171875,
0.0009784698486328125,
0.0162506103515625,
0.0207061767578125,
0.01508331298828125,
0.02716064453125,
-0.03668212890625,
-0.035491943359375,
0.022186279296875,
0.0292816162109375,
-0.03350830078125,
0.01983642578125,
0.0333251953125,
0.0753173828125,
-0.06597900390625,
-0.047027587890625,
-0.0207977294921875,
0.0537109375,
0.0279541015625,
0.01465606689453125,
0.041473388671875,
0.0214996337890625,
0.05517578125,
-0.00450897216796875,
0.01313018798828125,
0.007343292236328125,
-0.01468658447265625,
0.0755615234375,
0.0277862548828125,
0.033721923828125,
-0.07177734375,
-0.053070068359375,
0.038543701171875,
0.090576171875,
-0.040283203125,
-0.021881103515625,
0.01459503173828125,
0.00788116455078125,
0.0174102783203125,
-0.002971649169921875,
0.04180908203125,
0.029693603515625,
0.033599853515625,
-0.02166748046875,
-0.034454345703125,
0.0082550048828125,
0.0017042160034179688,
-0.0034580230712890625,
-0.006938934326171875,
0.021240234375,
-0.0310516357421875,
-0.01552581787109375,
-0.0292205810546875,
0.0116424560546875,
0.03729248046875,
0.01158905029296875,
0.041290283203125,
-0.041534423828125,
-0.009368896484375,
0.0229644775390625,
0.032958984375,
-0.0014944076538085938,
-0.0162353515625,
0.006786346435546875,
-0.037933349609375,
-0.0167999267578125,
0.01450347900390625,
0.002849578857421875,
0.0102386474609375,
0.051666259765625,
0.03436279296875,
-0.03851318359375,
-0.036407470703125,
-0.0017414093017578125,
-0.0203704833984375,
-0.023895263671875,
-0.017852783203125,
-0.01119232177734375,
0.0236358642578125,
-0.00794219970703125,
0.0020580291748046875,
0.0225372314453125,
0.0213623046875,
-0.005641937255859375,
0.039581298828125,
0.0037326812744140625,
0.032989501953125,
0.0277557373046875,
0.0137786865234375,
-0.0433349609375,
0.01020050048828125,
-0.08587646484375,
0.005527496337890625,
-0.048919677734375,
-0.01221466064453125,
0.012908935546875,
0.01454925537109375,
-0.030120849609375,
0.04638671875,
0.006931304931640625,
-0.03466796875,
0.00916290283203125,
0.002811431884765625,
0.028594970703125,
-0.005908966064453125,
-0.00408172607421875,
-0.0111083984375,
-0.04736328125,
-0.029388427734375,
-0.00879669189453125,
-0.00012636184692382812,
0.035675048828125,
-0.0220184326171875,
0.04510498046875,
0.0170440673828125,
-0.0281982421875,
0.02978515625,
-0.0621337890625,
-0.0248565673828125,
0.06207275390625,
-0.037841796875,
-0.03094482421875,
0.0117340087890625,
-0.01285552978515625,
0.0253143310546875,
0.026611328125,
0.00334930419921875,
0.01464080810546875,
-0.041595458984375,
0.021575927734375,
0.01541900634765625,
0.0250701904296875,
-0.017974853515625,
-0.009124755859375,
-0.03057861328125,
-0.0273284912109375,
0.050323486328125,
0.033538818359375,
-0.0012187957763671875,
0.006839752197265625,
-0.01039886474609375,
-0.0537109375,
0.0338134765625,
-0.038604736328125,
0.058807373046875,
0.03753662109375,
-0.006443023681640625,
0.006198883056640625,
-0.0165863037109375,
-0.0272369384765625,
-0.00013697147369384766,
0.001018524169921875,
0.024169921875,
-0.0206451416015625,
-0.02227783203125,
-0.01287078857421875,
0.01275634765625,
0.058135986328125,
-0.0005083084106445312,
0.026458740234375,
-0.0104217529296875,
0.0002536773681640625,
-0.0118408203125,
-0.041748046875,
-0.0270843505859375,
-0.03936767578125,
0.01554107666015625,
0.031219482421875,
-0.0007100105285644531,
0.00414276123046875,
-0.0306854248046875,
-0.02496337890625,
-0.0181732177734375,
-0.0021762847900390625,
-0.01824951171875,
0.0262908935546875,
-0.005893707275390625,
-0.009033203125,
-0.04522705078125,
-0.005645751953125,
0.009857177734375,
0.0178680419921875,
-0.01200103759765625,
0.0030879974365234375,
-0.0145263671875,
0.008636474609375,
0.0244293212890625,
0.0098419189453125,
-0.0013895034790039062,
-0.028656005859375,
-0.0084228515625,
0.0194854736328125,
-0.0034465789794921875,
0.048431396484375,
0.0215606689453125,
-0.01229095458984375,
0.0256805419921875,
0.017120361328125,
-0.036346435546875,
-0.07696533203125,
0.0200653076171875,
-0.08551025390625,
0.0052032470703125,
-0.0224609375,
0.038482666015625,
0.058349609375,
-0.00634765625,
-0.0472412109375,
0.08697509765625,
-0.04083251953125,
-0.01519012451171875,
-0.0251007080078125,
0.00797271728515625,
0.0283203125,
-0.05767822265625,
-0.020782470703125,
-0.01548004150390625,
-0.044586181640625,
-0.00022268295288085938,
0.0145111083984375,
0.01458740234375,
0.045562744140625,
-0.0177459716796875,
-0.0474853515625,
-0.0074615478515625,
-0.019012451171875,
0.0276947021484375,
-0.0064544677734375,
-0.009185791015625,
0.0261993408203125,
0.02587890625,
-0.0465087890625,
0.017120361328125,
0.004047393798828125,
0.043060302734375,
-0.00896453857421875,
-0.039337158203125,
-0.02410888671875,
0.0024509429931640625,
0.0496826171875,
0.06756591796875,
0.02459716796875,
-0.055511474609375,
0.00341033935546875,
0.00901031494140625,
-0.0196380615234375,
-0.00408172607421875,
0.02239990234375,
-0.048553466796875,
-0.0218505859375,
0.0234832763671875,
-0.027587890625,
0.0039005279541015625,
-0.053070068359375,
-0.045196533203125,
-0.0023326873779296875,
-0.061767578125,
-0.0153656005859375,
0.004238128662109375,
0.0499267578125,
0.00013899803161621094,
-0.0206756591796875,
-0.0110321044921875,
-0.04046630859375,
-0.0004150867462158203,
-0.01445770263671875,
-0.08050537109375,
0.0162506103515625,
0.00550079345703125,
0.0175933837890625,
0.021942138671875,
0.0308380126953125,
0.002872467041015625,
0.019256591796875,
-0.022003173828125,
-0.00888824462890625,
0.016357421875,
-0.0001766681671142578,
0.005413055419921875,
-0.0043487548828125,
0.027740478515625,
-0.00026535987854003906,
0.06915283203125,
-0.0089874267578125,
0.0701904296875,
0.00421142578125,
0.042877197265625,
-0.0262451171875,
-0.0023822784423828125,
0.0133514404296875,
-0.038909912109375,
-0.00146484375,
0.005290985107421875,
-0.00157928466796875,
-0.0232391357421875,
0.0167388916015625,
0.03662109375,
-0.00653839111328125,
0.00925445556640625
]
|
eb96837959f35696ea3776f5a84c659792020d49 | Wordpress Stackexchange
Q: How to get post ID of the current page/post inside a widget? I'm trying hard to get the post ID of the current post/page inside a widget class but doesn't work, I know there's get_the_ID() and some other options but not a single works inside a widget. Here's my code:
public function widget( $args, $instance ) {
global $wp_query;
$thePostID = $wp_query->post->ID;
echo 'Post ID is:' . $thePostID;
}
A: You can make use of get_queried_object() here, which is a wrapper for $wp_query and returns the whole post metadata.
Here's a sample code:
$queried_object = get_queried_object();
if ( $queried_object ) {
$post_id = $queried_object->ID;
echo $post_id;
}
| Q: How to get post ID of the current page/post inside a widget? I'm trying hard to get the post ID of the current post/page inside a widget class but doesn't work, I know there's get_the_ID() and some other options but not a single works inside a widget. Here's my code:
public function widget( $args, $instance ) {
global $wp_query;
$thePostID = $wp_query->post->ID;
echo 'Post ID is:' . $thePostID;
}
A: You can make use of get_queried_object() here, which is a wrapper for $wp_query and returns the whole post metadata.
Here's a sample code:
$queried_object = get_queried_object();
if ( $queried_object ) {
$post_id = $queried_object->ID;
echo $post_id;
}
A: To just get the ID get_queried_object_id()
Of course, too late but may help others who is looking for the same.
A: Try this:
<?php
global $post;
setup_postdata( $post );
echo "Post's ID: " . get_the_ID();
?>
A: function widget($args, $instance) {
global $post;
echo $post->ID;
}
| wordpress | {
"language": "en",
"length": 155,
"provenance": "stackexchange_00019.jsonl.gz:449847",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166106"
} | [
0.04998779296875,
-0.03594970703125,
0.0174713134765625,
0.00004649162292480469,
-0.01531982421875,
-0.0293426513671875,
0.0521240234375,
-0.003772735595703125,
0.0225830078125,
0.0281829833984375,
-0.043914794921875,
-0.0264129638671875,
-0.012176513671875,
-0.00884246826171875,
-0.0244598388671875,
-0.0225677490234375,
0.044525146484375,
-0.031219482421875,
0.0207061767578125,
-0.0014801025390625,
-0.017181396484375,
-0.0011682510375976562,
0.056243896484375,
0.02325439453125,
0.0302734375,
-0.02825927734375,
0.0421142578125,
0.00730133056640625,
0.00435638427734375,
-0.01123046875,
0.03497314453125,
-0.0004315376281738281,
0.0101318359375,
-0.00803375244140625,
0.0097198486328125,
-0.0224151611328125,
-0.01110076904296875,
-0.0026226043701171875,
0.0294952392578125,
-0.006256103515625,
0.01091766357421875,
-0.0070648193359375,
-0.0272979736328125,
0.0014390945434570312,
-0.056060791015625,
-0.022216796875,
-0.005840301513671875,
-0.0017213821411132812,
0.024658203125,
0.040130615234375,
0.007198333740234375,
0.0201263427734375,
0.00009679794311523438,
-0.00868988037109375,
-0.01213836669921875,
-0.027923583984375,
0.0153045654296875,
-0.05072021484375,
0.05682373046875,
-0.036163330078125,
-0.0516357421875,
-0.06597900390625,
0.056793212890625,
-0.02545166015625,
-0.004955291748046875,
-0.0019054412841796875,
0.03460693359375,
0.004039764404296875,
-0.0082550048828125,
-0.0186004638671875,
0.0203094482421875,
0.0022258758544921875,
0.01239013671875,
0.01123809814453125,
-0.0195159912109375,
-0.07012939453125,
0.03509521484375,
-0.03912353515625,
-0.018951416015625,
0.0238494873046875,
-0.0019178390502929688,
0.0036869049072265625,
-0.07855224609375,
0.039215087890625,
-0.0179290771484375,
0.044158935546875,
-0.01163482666015625,
-0.025421142578125,
-0.0006165504455566406,
-0.0054779052734375,
-0.0238800048828125,
-0.0242919921875,
0.038330078125,
-0.0208282470703125,
-0.029876708984375,
-0.03387451171875,
0.01023101806640625,
0.0728759765625,
-0.055572509765625,
0.027923583984375,
-0.048919677734375,
-0.026702880859375,
0.04632568359375,
-0.0555419921875,
0.00373077392578125,
0.0213165283203125,
0.0174560546875,
0.0180511474609375,
0.0357666015625,
0.0168304443359375,
0.0023517608642578125,
0.006755828857421875,
-0.000797271728515625,
-0.021392822265625,
-0.021270751953125,
0.035736083984375,
-0.0018720626831054688,
-0.040283203125,
0.0157012939453125,
-0.0333251953125,
0.0067596435546875,
0.01198577880859375,
0.036590576171875,
0.0103607177734375,
0.0228729248046875,
0.0496826171875,
-0.0258636474609375,
-0.052764892578125,
0.0254058837890625,
-0.025177001953125,
-0.058258056640625,
0.0108489990234375,
0.09429931640625,
0.02978515625,
0.0364990234375,
-0.0302734375,
0.0191650390625,
-0.029327392578125,
0.013885498046875,
-0.0027675628662109375,
-0.01265716552734375,
-0.025848388671875,
0.006198883056640625,
-0.0293426513671875,
-0.020965576171875,
0.041015625,
0.0128631591796875,
-0.007114410400390625,
-0.01338958740234375,
-0.032501220703125,
-0.01861572265625,
-0.034088134765625,
-0.0009012222290039062,
0.029815673828125,
0.032958984375,
-0.0145416259765625,
0.059295654296875,
-0.044036865234375,
0.0186614990234375,
-0.0283355712890625,
0.051788330078125,
0.00440216064453125,
0.00778961181640625,
0.011627197265625,
-0.0137481689453125,
-0.01366424560546875,
-0.046417236328125,
-0.0052032470703125,
0.0204620361328125,
0.0830078125,
-0.002613067626953125,
-0.02960205078125,
-0.00972747802734375,
0.00473785400390625,
-0.03985595703125,
-0.004154205322265625,
-0.0240325927734375,
-0.01398468017578125,
0.0287322998046875,
0.0102691650390625,
-0.040191650390625,
-0.049285888671875,
-0.00255584716796875,
0.0025348663330078125,
-0.0029315948486328125,
0.0262603759765625,
0.037353515625,
0.064697265625,
-0.0382080078125,
0.044281005859375,
-0.00443267822265625,
0.01422119140625,
-0.07464599609375,
0.0130157470703125,
0.003986358642578125,
0.0206146240234375,
-0.016082763671875,
0.019134521484375,
-0.005680084228515625,
-0.01244354248046875,
0.0001327991485595703,
-0.00437164306640625,
-0.017120361328125,
0.0241546630859375,
-0.050537109375,
0.0034084320068359375,
-0.01641845703125,
0.030029296875,
0.01397705078125,
-0.00634002685546875,
0.0236968994140625,
-0.0243988037109375,
-0.019287109375,
-0.01482391357421875,
-0.053741455078125,
0.0116424560546875,
-0.00652313232421875,
-0.00623321533203125,
-0.006427764892578125,
0.0193023681640625,
-0.057159423828125,
0.0137939453125,
-0.0645751953125,
-0.0027923583984375,
0.0797119140625,
0.00016236305236816406,
-0.0088348388671875,
-0.048004150390625,
0.06500244140625,
0.008270263671875,
-0.05120849609375,
0.01230621337890625,
-0.029327392578125,
0.0171661376953125,
-0.0225677490234375,
-0.01953125,
-0.0213470458984375,
-0.0316162109375,
0.0235748291015625,
0.035858154296875,
0.0281219482421875,
0.031829833984375,
0.025848388671875,
0.0309600830078125,
0.0084991455078125,
-0.08953857421875,
-0.010711669921875,
0.0077056884765625,
0.03271484375,
0.07513427734375,
0.0015611648559570312,
0.033477783203125,
0.0154876708984375,
0.00670623779296875,
0.016204833984375,
0.0545654296875,
-0.006946563720703125,
0.039215087890625,
-0.02227783203125,
-0.0188751220703125,
-0.013580322265625,
-0.05078125,
-0.0023441314697265625,
-0.037322998046875,
0.0010051727294921875,
0.03448486328125,
0.056304931640625,
0.056915283203125,
-0.0079193115234375,
-0.026275634765625,
0.00525665283203125,
0.040435791015625,
0.001953125,
0.031341552734375,
0.023529052734375,
-0.004253387451171875,
-0.0284271240234375,
-0.0243988037109375,
0.01910400390625,
0.0157318115234375,
0.01204681396484375,
0.028778076171875,
-0.0068206787109375,
-0.0012540817260742188,
-0.005096435546875,
-0.0217437744140625,
0.01306915283203125,
0.0206146240234375,
0.0170135498046875,
-0.00446319580078125,
0.0022983551025390625,
0.04913330078125,
-0.033660888671875,
0.0809326171875,
0.0017099380493164062,
-0.00397491455078125,
0.048828125,
-0.0224761962890625,
0.038238525390625,
-0.02093505859375,
0.06805419921875,
0.049102783203125,
-0.03485107421875,
0.02215576171875,
0.0018529891967773438,
-0.01453399658203125,
0.004161834716796875,
0.008056640625,
0.00577545166015625,
0.013671875,
-0.041748046875,
0.05743408203125,
0.007350921630859375,
0.0830078125,
-0.0284881591796875,
-0.038116455078125,
0.002620697021484375,
0.0100250244140625,
-0.09051513671875,
-0.1207275390625,
0.0181121826171875,
-0.046478271484375,
-0.0227813720703125,
-0.01482391357421875,
-0.021759033203125,
0.0086822509765625,
0.01129913330078125,
-0.00922393798828125,
-0.02630615234375,
-0.02374267578125,
-0.07269287109375,
-0.0577392578125,
-0.066650390625,
0.026275634765625,
-0.0223846435546875,
0.0173492431640625,
0.005672454833984375,
0.0088653564453125,
0.01055908203125,
-0.02191162109375,
0.006824493408203125,
0.042083740234375,
-0.0211639404296875,
-0.0289459228515625,
-0.03717041015625,
0.020782470703125,
-0.01409912109375,
0.0134124755859375,
-0.02239990234375,
-0.011810302734375,
0.01837158203125,
-0.005645751953125,
-0.006103515625,
-0.00009447336196899414,
0.0323486328125,
0.010650634765625,
-0.0150299072265625,
0.0184783935546875,
0.033111572265625,
-0.0157012939453125,
-0.01549530029296875,
-0.039306640625,
-0.0638427734375,
0.0097198486328125,
0.01141357421875,
0.01861572265625,
0.00566864013671875,
-0.001895904541015625,
-0.0110015869140625,
-0.033843994140625,
0.0291595458984375,
-0.02783203125,
0.0635986328125,
0.0028858184814453125,
0.00363922119140625,
-0.00424957275390625,
0.00997161865234375,
-0.0153961181640625,
0.055328369140625,
-0.00591278076171875,
0.007572174072265625,
-0.018280029296875,
0.0160369873046875,
-0.040283203125,
-0.0303192138671875,
0.0290679931640625,
-0.018585205078125,
-0.0017938613891601562,
-0.00299072265625,
-0.019561767578125,
0.0360107421875,
0.08203125,
-0.0511474609375,
-0.0200042724609375,
-0.034454345703125,
0.0177001953125,
-0.03289794921875,
-0.07635498046875,
-0.026397705078125,
-0.01873779296875,
-0.0517578125,
-0.02154541015625,
-0.01189422607421875,
-0.017578125,
-0.01422119140625,
0.049224853515625,
-0.033233642578125,
-0.018585205078125,
0.03948974609375,
-0.04571533203125,
0.0110321044921875,
0.0447998046875,
-0.01430511474609375,
0.03662109375,
-0.035675048828125,
-0.02166748046875,
-0.0897216796875,
0.000059664249420166016,
-0.0199432373046875,
0.036712646484375,
-0.004688262939453125,
-0.017364501953125,
-0.01035308837890625,
0.0208282470703125,
0.0013399124145507812,
0.0007605552673339844,
0.0178985595703125,
0.0249481201171875,
0.0015468597412109375,
0.0023021697998046875,
0.0037288665771484375,
-0.0214080810546875,
0.005489349365234375,
0.004558563232421875,
-0.032196044921875,
-0.01042938232421875,
-0.052520751953125,
-0.03839111328125,
0.00048089027404785156,
-0.043426513671875,
-0.04888916015625,
-0.0307159423828125,
0.0064849853515625,
0.04290771484375,
-0.0303802490234375,
0.0357666015625,
-0.0452880859375,
-0.05670166015625,
0.0543212890625,
0.0186614990234375,
-0.0180206298828125,
-0.007236480712890625,
0.0955810546875,
0.019012451171875,
-0.033966064453125,
-0.042388916015625,
-0.0276641845703125,
0.034515380859375,
-0.0128326416015625,
0.0237884521484375,
0.038330078125,
-0.033843994140625,
0.02471923828125,
0.0188446044921875,
-0.03173828125,
0.00684356689453125,
0.07733154296875,
0.0001996755599975586,
-0.004131317138671875,
-0.00885009765625,
-0.041900634765625,
0.0020809173583984375,
0.0268402099609375,
-0.041839599609375,
-0.0238494873046875,
0.01027679443359375,
0.05303955078125,
-0.057525634765625,
0.06951904296875,
-0.0199127197265625,
-0.028167724609375,
0.017242431640625,
-0.002597808837890625,
0.00400543212890625,
0.0039043426513671875,
0.00766754150390625,
-0.0027523040771484375,
0.01288604736328125,
0.01349639892578125,
0.049346923828125,
0.040863037109375,
0.0124359130859375,
0.015045166015625,
0.05712890625,
-0.0091705322265625,
-0.0023899078369140625,
-0.005970001220703125,
0.062408447265625,
-0.01157379150390625,
-0.0311279296875,
0.0257415771484375,
-0.0309295654296875,
-0.03619384765625,
0.04345703125,
0.0079193115234375,
0.0235137939453125,
0.032745361328125,
-0.0316162109375,
-0.033050537109375,
0.0015163421630859375,
-0.0012054443359375,
-0.04901123046875,
-0.048309326171875,
-0.0027065277099609375,
-0.00527191162109375,
0.0023326873779296875,
0.06884765625,
-0.0035247802734375,
0.042083740234375,
-0.036407470703125,
0.03179931640625,
-0.01085662841796875,
0.053985595703125,
0.006633758544921875,
-0.031646728515625,
0.0216217041015625,
0.0167999267578125,
-0.0045013427734375,
-0.033660888671875,
0.0084686279296875,
-0.005615234375,
0.0213623046875,
-0.0118865966796875,
-0.009979248046875,
0.03216552734375,
-0.01480865478515625,
-0.007511138916015625,
0.04229736328125,
0.03759765625,
-0.041412353515625,
-0.01788330078125,
0.01129150390625,
0.0176849365234375,
0.00986480712890625,
-0.0125885009765625,
-0.005950927734375,
-0.0440673828125,
0.015380859375,
-0.02142333984375,
0.027557373046875,
-0.0140380859375,
-0.0273284912109375,
-0.0265045166015625,
-0.0302581787109375,
-0.0077972412109375,
-0.0229339599609375,
-0.012725830078125,
-0.00745391845703125,
-0.0194244384765625,
0.018768310546875,
0.0260162353515625,
0.0755615234375,
-0.048736572265625,
-0.04669189453125,
-0.009521484375,
0.000030338764190673828,
0.02978515625,
0.002979278564453125,
-0.01947021484375,
-0.01467132568359375,
-0.056121826171875,
-0.0066986083984375,
0.01386260986328125,
-0.046295166015625,
-0.022186279296875,
-0.032318115234375,
0.0176239013671875,
0.045166015625,
0.0009055137634277344,
0.0036067962646484375,
-0.01500701904296875,
-0.01038360595703125,
0.0007996559143066406,
0.05133056640625,
-0.0148773193359375,
0.08795166015625,
-0.003551483154296875,
0.0743408203125,
0.005535125732421875,
0.0208892822265625,
-0.0438232421875,
-0.0114898681640625,
0.0182037353515625,
-0.005962371826171875,
-0.0203704833984375,
-0.004871368408203125,
-0.016082763671875,
-0.042449951171875,
0.0022563934326171875,
-0.017486572265625,
0.0165557861328125,
-0.0034465789794921875,
0.0020694732666015625,
-0.007091522216796875,
-0.025177001953125,
0.0147247314453125,
-0.00945281982421875,
0.05401611328125,
-0.023040771484375,
-0.05255126953125,
0.0150299072265625,
0.0439453125,
-0.03887939453125,
-0.00334930419921875,
-0.0416259765625,
0.0007004737854003906,
-0.04052734375,
0.060546875,
0.06903076171875,
0.01349639892578125,
0.05609130859375,
-0.001964569091796875,
0.0298919677734375,
0.026397705078125,
0.036865234375,
-0.048309326171875,
-0.025421142578125,
0.06597900390625,
0.02490234375,
-0.0177459716796875,
0.03985595703125,
-0.0272979736328125,
-0.0019683837890625,
-0.017486572265625,
0.0258941650390625,
-0.00920867919921875,
0.017822265625,
0.0148773193359375,
-0.03680419921875,
-0.01488494873046875,
0.0185699462890625,
0.007755279541015625,
-0.00047206878662109375,
0.04119873046875,
0.0106964111328125,
0.0044403076171875,
0.049407958984375,
-0.0131072998046875,
-0.006679534912109375,
-0.0455322265625,
0.045135498046875,
0.004146575927734375,
-0.0211639404296875,
-0.01367950439453125,
0.01102447509765625,
-0.01134490966796875,
-0.02093505859375,
-0.00881195068359375,
-0.0005621910095214844,
-0.00806427001953125,
-0.0753173828125,
0.007770538330078125,
-0.032684326171875,
0.0081939697265625,
0.025970458984375,
-0.01538848876953125,
0.037445068359375,
0.056243896484375,
-0.0005502700805664062,
0.01861572265625,
0.0186614990234375,
0.00001537799835205078,
-0.0201416015625,
-0.01158905029296875,
-0.0011425018310546875,
0.036590576171875,
-0.03656005859375,
0.018463134765625,
-0.029510498046875,
0.0106658935546875,
-0.0013093948364257812,
-0.0074920654296875,
0.09619140625,
-0.07623291015625,
-0.0029277801513671875,
0.006511688232421875,
0.044708251953125,
0.006618499755859375,
0.0010852813720703125,
0.0111846923828125,
0.005779266357421875,
0.034210205078125,
-0.01316070556640625,
0.0168914794921875,
-0.0032596588134765625,
-0.0285491943359375,
-0.058746337890625,
0.08099365234375,
0.0182647705078125,
0.024444580078125,
0.01369476318359375,
0.022308349609375,
-0.03558349609375,
0.00005602836608886719,
-0.038116455078125,
0.018218994140625,
-0.0214691162109375,
0.032012939453125,
-0.0219879150390625,
0.006664276123046875,
-0.001056671142578125,
-0.00417327880859375,
0.07110595703125,
0.0124053955078125,
-0.0026340484619140625,
-0.033782958984375,
0.0103607177734375,
0.047027587890625,
-0.0120849609375,
0.0213165283203125,
0.03662109375,
0.0218353271484375,
0.0208587646484375,
-0.0217437744140625,
0.044677734375,
-0.046783447265625,
0.00026869773864746094,
0.04876708984375,
0.01983642578125,
0.0018672943115234375,
-0.006465911865234375,
0.0217742919921875,
-0.021240234375,
-0.006755828857421875,
0.0249786376953125,
-0.029266357421875,
0.0036640167236328125,
0.0858154296875,
0.076171875,
-0.043182373046875,
-0.011474609375,
-0.04302978515625,
0.057647705078125,
0.0030975341796875,
0.007289886474609375,
0.0007958412170410156,
0.022247314453125,
0.01361083984375,
0.010101318359375,
0.00916290283203125,
0.04058837890625,
-0.0187225341796875,
0.08990478515625,
0.061614990234375,
0.0325927734375,
-0.02947998046875,
0.01519012451171875,
0.0171356201171875,
0.0838623046875,
-0.0640869140625,
-0.0219573974609375,
0.028961181640625,
-0.0009107589721679688,
-0.01114654541015625,
0.00817108154296875,
0.0159149169921875,
0.033599853515625,
0.0255889892578125,
0.0023937225341796875,
-0.0233612060546875,
0.006053924560546875,
0.053741455078125,
0.002231597900390625,
-0.03094482421875,
-0.04248046875,
-0.0404052734375,
-0.0372314453125,
-0.024627685546875,
0.0197906494140625,
0.0513916015625,
0.01509857177734375,
0.04705810546875,
-0.023162841796875,
-0.0034961700439453125,
0.00852203369140625,
0.0301361083984375,
0.0017442703247070312,
-0.01128387451171875,
-0.0229339599609375,
-0.056182861328125,
0.0189361572265625,
0.0231781005859375,
0.021392822265625,
0.0295257568359375,
0.020477294921875,
-0.01396942138671875,
-0.0245208740234375,
-0.00583648681640625,
0.020172119140625,
-0.0163116455078125,
0.0205078125,
-0.0438232421875,
-0.009490966796875,
-0.032745361328125,
-0.0253143310546875,
-0.0212860107421875,
0.01126861572265625,
0.00734710693359375,
-0.0059814453125,
0.04376220703125,
0.0032215118408203125,
0.005710601806640625,
0.0438232421875,
-0.016204833984375,
0.0168609619140625,
-0.0146942138671875,
-0.10565185546875,
-0.007808685302734375,
-0.034149169921875,
-0.044891357421875,
0.01470947265625,
0.0240936279296875,
-0.00881195068359375,
-0.012451171875,
-0.01374053955078125,
0.042083740234375,
-0.0323486328125,
-0.0236968994140625,
0.03192138671875,
0.031402587890625,
0.019134521484375,
0.05267333984375,
-0.0056610107421875,
-0.0027256011962890625,
0.0251617431640625,
0.0003573894500732422,
0.02520751953125,
-0.0007715225219726562,
0.0321044921875,
0.01259613037109375,
-0.0129547119140625,
0.03204345703125,
-0.06927490234375,
-0.038818359375,
0.06768798828125,
-0.0222320556640625,
-0.007221221923828125,
0.01029205322265625,
-0.0352783203125,
0.0250701904296875,
0.02838134765625,
-0.0013456344604492188,
0.00701141357421875,
-0.0181121826171875,
0.0243377685546875,
0.0186614990234375,
0.01253509521484375,
-0.0230255126953125,
0.031524658203125,
0.021820068359375,
-0.033538818359375,
0.053741455078125,
-0.005596160888671875,
-0.0016565322875976562,
0.01922607421875,
0.0030879974365234375,
-0.040435791015625,
0.017578125,
-0.0181121826171875,
0.01190948486328125,
0.028839111328125,
-0.0215606689453125,
-0.026763916015625,
0.0194854736328125,
-0.004337310791015625,
-0.01190948486328125,
0.0176849365234375,
0.0290374755859375,
0.008941650390625,
0.01300048828125,
0.01580810546875,
-0.00952911376953125,
0.024139404296875,
-0.0467529296875,
0.0149993896484375,
0.039825439453125,
0.0003261566162109375,
0.003177642822265625,
-0.07476806640625,
-0.023529052734375,
-0.06195068359375,
0.002716064453125,
0.0204315185546875,
-0.0244598388671875,
-0.0254058837890625,
-0.0169525146484375,
-0.011322021484375,
-0.0020294189453125,
0.01511383056640625,
-0.023834228515625,
0.0265350341796875,
0.00827789306640625,
-0.01490020751953125,
-0.0175018310546875,
0.01174163818359375,
-0.0023021697998046875,
0.0013742446899414062,
-0.0445556640625,
0.0287017822265625,
-0.0271453857421875,
-0.032623291015625,
0.018524169921875,
0.0128936767578125,
0.0161285400390625,
-0.023651123046875,
-0.031707763671875,
0.032257080078125,
0.007549285888671875,
0.05267333984375,
0.01444244384765625,
-0.020721435546875,
0.018524169921875,
0.0001919269561767578,
-0.01312255859375,
-0.0290069580078125,
0.028106689453125,
-0.049224853515625,
-0.0007801055908203125,
-0.0113525390625,
0.003650665283203125,
0.0101165771484375,
-0.0224609375,
-0.02996826171875,
0.042877197265625,
-0.0020122528076171875,
-0.028076171875,
-0.0018548965454101562,
0.0311737060546875,
0.0020542144775390625,
-0.024658203125,
0.006317138671875,
-0.04547119140625,
-0.00844573974609375,
0.0017833709716796875,
0.03704833984375,
0.0310821533203125,
0.04388427734375,
0.022216796875,
-0.07415771484375,
0.003269195556640625,
-0.0438232421875,
0.07269287109375,
-0.005828857421875,
0.0026760101318359375,
-0.023162841796875,
0.002887725830078125,
-0.070556640625,
-0.04339599609375,
-0.0188446044921875,
0.08697509765625,
-0.0223846435546875,
-0.0124664306640625,
-0.0143890380859375,
0.006084442138671875,
0.0253753662109375,
0.07440185546875,
0.01174163818359375,
-0.02874755859375,
-0.00060272216796875,
0.005451202392578125,
-0.058685302734375,
-0.0012636184692382812,
0.041534423828125,
-0.080810546875,
-0.00788116455078125,
0.0251007080078125,
-0.0033416748046875,
-0.00917816162109375,
-0.01433563232421875,
-0.0255584716796875,
-0.01445770263671875,
-0.012359619140625,
0.0083465576171875,
-0.0165863037109375,
0.036712646484375,
0.047088623046875,
-0.044708251953125,
0.01410675048828125,
-0.002368927001953125,
-0.0168914794921875,
0.042755126953125,
-0.0190887451171875,
-0.00827789306640625,
0.015838623046875,
-0.02532958984375,
0.0102081298828125,
0.01129150390625,
0.0233154296875,
-0.009490966796875,
0.0138092041015625,
-0.0091705322265625,
0.0272979736328125,
-0.005451202392578125,
0.01873779296875,
0.0164031982421875,
0.01580810546875,
-0.0048828125,
0.042633056640625,
0.01067352294921875,
0.052459716796875,
-0.001720428466796875,
0.059967041015625,
0.006427764892578125,
-0.0382080078125,
0.0259857177734375,
-0.04583740234375,
-0.005947113037109375,
0.033538818359375,
0.0126495361328125,
-0.020721435546875,
0.0328369140625,
0.01763916015625,
0.022003173828125,
0.0023136138916015625
]
|
27a163750c0624987f896a0ea8188e96f43e5441 | Wordpress Stackexchange
Q: Author Role - Allow editing of Gallery images Is it possible to give the 'Author' role the capability of editing image titles and captions on post's they have created ?
I have a number of users set to 'Author' , but when i've tested it's not possible to edit any of the image fields , such as title , caption , description etc.
They can delete images , create WP-Galleries , but cannot edit the details ??
I can do the above with 'Editor' role , but would rather stay with 'Author' for these users.
I've tried a plugin 'user role editor' but cannot get a setting that will allow 'Author' to edit image details , without choosing 'edit others post' , which i dont want.
any help advice appreciated :)
A: If I remember correctly, to edit those, users have to have capability of 'upload_images'.
User role editor is really a super plugin, just play with some values for Author role and you will definitely find the one that is needed.
| Q: Author Role - Allow editing of Gallery images Is it possible to give the 'Author' role the capability of editing image titles and captions on post's they have created ?
I have a number of users set to 'Author' , but when i've tested it's not possible to edit any of the image fields , such as title , caption , description etc.
They can delete images , create WP-Galleries , but cannot edit the details ??
I can do the above with 'Editor' role , but would rather stay with 'Author' for these users.
I've tried a plugin 'user role editor' but cannot get a setting that will allow 'Author' to edit image details , without choosing 'edit others post' , which i dont want.
any help advice appreciated :)
A: If I remember correctly, to edit those, users have to have capability of 'upload_images'.
User role editor is really a super plugin, just play with some values for Author role and you will definitely find the one that is needed.
| wordpress | {
"language": "en",
"length": 173,
"provenance": "stackexchange_00019.jsonl.gz:449859",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166157"
} | [
0.028656005859375,
0.0065155029296875,
0.0028285980224609375,
0.0264739990234375,
-0.00011044740676879883,
-0.03839111328125,
0.043914794921875,
-0.051849365234375,
0.0235137939453125,
0.025848388671875,
0.02740478515625,
-0.0086669921875,
-0.01126861572265625,
-0.0401611328125,
-0.0526123046875,
0.00577545166015625,
-0.00661468505859375,
-0.01068115234375,
-0.004119873046875,
-0.02288818359375,
0.005950927734375,
-0.01525115966796875,
-0.0019702911376953125,
-0.0251312255859375,
0.011474609375,
0.03265380859375,
0.03961181640625,
-0.01152801513671875,
0.01552581787109375,
-0.00026917457580566406,
0.025665283203125,
-0.0531005859375,
0.0172271728515625,
-0.005756378173828125,
-0.0033130645751953125,
0.04571533203125,
0.0030879974365234375,
0.0003428459167480469,
0.00882720947265625,
0.002361297607421875,
0.014434814453125,
0.0013780593872070312,
-0.007320404052734375,
0.0189056396484375,
-0.02960205078125,
-0.043182373046875,
0.0445556640625,
0.00036716461181640625,
0.04888916015625,
-0.0198516845703125,
-0.012786865234375,
0.01395416259765625,
0.00804901123046875,
-0.025054931640625,
-0.0229949951171875,
-0.028106689453125,
0.018341064453125,
0.0343017578125,
0.0523681640625,
-0.055908203125,
-0.058746337890625,
-0.01357269287109375,
0.034027099609375,
-0.011627197265625,
0.01271820068359375,
0.0118408203125,
0.029876708984375,
0.0304107666015625,
-0.02435302734375,
-0.0085906982421875,
-0.00646209716796875,
-0.03546142578125,
0.0204010009765625,
-0.04876708984375,
-0.01016998291015625,
0.01558685302734375,
-0.039398193359375,
-0.042572021484375,
0.04193115234375,
-0.0322265625,
0.04022216796875,
-0.03106689453125,
0.0506591796875,
0.005764007568359375,
0.003391265869140625,
0.00917816162109375,
0.01068878173828125,
0.0038890838623046875,
-0.03082275390625,
0.0256805419921875,
-0.019805908203125,
-0.042633056640625,
-0.0278167724609375,
0.0572509765625,
0.024932861328125,
0.0118408203125,
0.025787353515625,
0.0225067138671875,
0.013275146484375,
0.01143646240234375,
0.0122528076171875,
-0.05322265625,
0.0447998046875,
-0.042236328125,
0.01383209228515625,
0.0164794921875,
-0.0034313201904296875,
-0.03021240234375,
0.01160430908203125,
0.029296875,
-0.01459503173828125,
-0.00299835205078125,
-0.0052947998046875,
-0.0164947509765625,
-0.0011157989501953125,
0.0030364990234375,
-0.0250701904296875,
0.039642333984375,
0.0109405517578125,
0.031463623046875,
-0.0038204193115234375,
-0.00586700439453125,
0.0256500244140625,
0.004058837890625,
0.0273284912109375,
0.00275421142578125,
-0.04132080078125,
-0.0178375244140625,
0.033050537109375,
-0.01357269287109375,
-0.044708251953125,
0.04150390625,
0.099853515625,
0.0049285888671875,
0.01425933837890625,
-0.0194244384765625,
-0.00751495361328125,
-0.022674560546875,
-0.01009368896484375,
-0.0138092041015625,
0.015716552734375,
0.0138702392578125,
0.042144775390625,
-0.0198516845703125,
0.01702880859375,
0.00676727294921875,
0.006626129150390625,
0.032012939453125,
0.00763702392578125,
-0.035491943359375,
0.0210723876953125,
-0.0128326416015625,
0.019073486328125,
-0.0090789794921875,
0.0660400390625,
-0.06951904296875,
0.058319091796875,
-0.060089111328125,
0.049072265625,
-0.033538818359375,
0.032745361328125,
0.01267242431640625,
0.037750244140625,
0.0003495216369628906,
-0.0233612060546875,
-0.015411376953125,
-0.0572509765625,
-0.0169830322265625,
0.022552490234375,
-0.03466796875,
0.031280517578125,
-0.039093017578125,
-0.0031833648681640625,
0.0286712646484375,
0.01389312744140625,
0.058258056640625,
0.0097503662109375,
0.01454925537109375,
-0.0281524658203125,
0.059600830078125,
0.01983642578125,
-0.0321044921875,
0.0139312744140625,
-0.0095672607421875,
-0.01312255859375,
-0.035491943359375,
-0.0126190185546875,
-0.01251983642578125,
0.049041748046875,
0.01271820068359375,
-0.016021728515625,
-0.00292205810546875,
-0.021575927734375,
-0.00203704833984375,
0.004695892333984375,
-0.0262298583984375,
0.01149749755859375,
-0.0164337158203125,
-0.00423431396484375,
0.0096588134765625,
0.04620361328125,
-0.0301361083984375,
0.0033969879150390625,
-0.0367431640625,
-0.05926513671875,
-0.036468505859375,
-0.01125335693359375,
0.00801849365234375,
-0.019073486328125,
0.039276123046875,
0.028839111328125,
0.022430419921875,
-0.038665771484375,
-0.01473236083984375,
0.00853729248046875,
0.00211334228515625,
-0.006237030029296875,
0.047454833984375,
0.0073089599609375,
0.0323486328125,
0.0254364013671875,
-0.045166015625,
0.01456451416015625,
0.004276275634765625,
0.0304412841796875,
0.00720977783203125,
-0.005535125732421875,
-0.00310516357421875,
0.039306640625,
0.03851318359375,
-0.020660400390625,
-0.0142364501953125,
0.020599365234375,
-0.0141143798828125,
-0.034820556640625,
-0.01861572265625,
-0.0172576904296875,
-0.09918212890625,
0.00763702392578125,
0.07403564453125,
0.040557861328125,
-0.0098876953125,
0.00969696044921875,
-0.0025844573974609375,
0.0240936279296875,
0.011566162109375,
0.054901123046875,
-0.04736328125,
-0.0016756057739257812,
0.04205322265625,
0.01514434814453125,
0.0089569091796875,
-0.004058837890625,
-0.039306640625,
0.0012578964233398438,
0.031463623046875,
-0.034637451171875,
-0.020416259765625,
0.0013523101806640625,
-0.0064239501953125,
-0.002899169921875,
-0.031982421875,
0.0013513565063476562,
-0.0302276611328125,
0.01390838623046875,
0.0150604248046875,
0.029388427734375,
0.031707763671875,
-0.0511474609375,
0.0261383056640625,
0.0164337158203125,
-0.006267547607421875,
0.017120361328125,
0.031280517578125,
-0.01103973388671875,
0.04803466796875,
-0.0224456787109375,
-0.0014944076538085938,
0.0138397216796875,
0.028472900390625,
-0.0005702972412109375,
-0.01971435546875,
-0.003528594970703125,
-0.00628662109375,
0.0264434814453125,
-0.0479736328125,
0.029205322265625,
0.0241546630859375,
-0.024322509765625,
-0.0221710205078125,
0.036224365234375,
-0.0399169921875,
-0.02288818359375,
0.0009741783142089844,
-0.0209808349609375,
-0.03582763671875,
-0.0004856586456298828,
-0.08050537109375,
0.05560302734375,
-0.0270843505859375,
0.07757568359375,
0.08624267578125,
0.0043487548828125,
0.026580810546875,
0.006923675537109375,
-0.03350830078125,
0.0010852813720703125,
0.0225677490234375,
0.0170745849609375,
-0.004974365234375,
-0.0325927734375,
0.0277099609375,
0.016326904296875,
0.0204010009765625,
0.005130767822265625,
-0.0115966796875,
-0.005584716796875,
0.0250244140625,
-0.0266265869140625,
-0.0313720703125,
0.03863525390625,
-0.08160400390625,
-0.0311431884765625,
0.00792694091796875,
-0.0511474609375,
-0.0164794921875,
0.06243896484375,
-0.014007568359375,
-0.01483154296875,
0.0004508495330810547,
0.01499176025390625,
0.0235748291015625,
-0.0168304443359375,
-0.0084686279296875,
0.0003008842468261719,
-0.00817108154296875,
-0.0164337158203125,
0.064208984375,
-0.0297698974609375,
-0.05279541015625,
-0.0374755859375,
-0.01239013671875,
0.01861572265625,
-0.0198516845703125,
-0.000774383544921875,
0.00034308433532714844,
0.0178985595703125,
-0.0019741058349609375,
0.00795745849609375,
0.0214996337890625,
-0.03070068359375,
-0.02093505859375,
-0.01012420654296875,
0.0220489501953125,
0.03680419921875,
0.0260162353515625,
-0.004241943359375,
0.0400390625,
0.054595947265625,
-0.014862060546875,
0.002178192138671875,
-0.04632568359375,
-0.0457763671875,
0.01399993896484375,
0.034210205078125,
0.018707275390625,
-0.05401611328125,
0.0243682861328125,
0.035797119140625,
0.03448486328125,
-0.018768310546875,
0.0103759765625,
0.0186767578125,
-0.0031108856201171875,
0.0260772705078125,
-0.01207733154296875,
0.01065826416015625,
-0.0200042724609375,
0.00943756103515625,
-0.00665283203125,
0.01018524169921875,
-0.044586181640625,
0.062225341796875,
-0.05767822265625,
-0.029937744140625,
0.0125274658203125,
-0.046478271484375,
0.020599365234375,
-0.0239410400390625,
-0.0022602081298828125,
-0.008209228515625,
0.048065185546875,
0.00943756103515625,
-0.0201416015625,
0.01611328125,
0.0172119140625,
-0.046722412109375,
0.001522064208984375,
-0.02691650390625,
-0.00775909423828125,
-0.060638427734375,
0.0094757080078125,
-0.00814056396484375,
-0.01485443115234375,
-0.01004791259765625,
0.027984619140625,
-0.01131439208984375,
-0.0362548828125,
0.0318603515625,
0.011383056640625,
0.0031375885009765625,
0.0283660888671875,
-0.0250091552734375,
0.0153045654296875,
-0.0251007080078125,
-0.013031005859375,
-0.176513671875,
-0.04132080078125,
0.00975799560546875,
0.11993408203125,
-0.04547119140625,
0.044769287109375,
-0.03619384765625,
0.09295654296875,
0.003131866455078125,
0.01788330078125,
-0.0171356201171875,
0.004680633544921875,
0.00925445556640625,
-0.035919189453125,
-0.0252227783203125,
-0.03265380859375,
0.007175445556640625,
-0.013885498046875,
-0.0192413330078125,
-0.020172119140625,
-0.0616455078125,
-0.07086181640625,
-0.04547119140625,
-0.03228759765625,
-0.056732177734375,
-0.0254974365234375,
-0.0264129638671875,
0.03173828125,
-0.00542449951171875,
-0.00992584228515625,
-0.0697021484375,
-0.08648681640625,
0.035430908203125,
-0.0738525390625,
0.0225677490234375,
0.0179595947265625,
0.11669921875,
0.00939178466796875,
0.0110015869140625,
-0.00011533498764038086,
-0.01055145263671875,
0.03265380859375,
0.0089263916015625,
0.0233001708984375,
0.0157928466796875,
-0.00926971435546875,
0.0030879974365234375,
0.00730133056640625,
-0.0223541259765625,
-0.05267333984375,
0.0367431640625,
-0.0008687973022460938,
-0.02587890625,
0.00875091552734375,
-0.0172119140625,
0.0682373046875,
-0.0079498291015625,
-0.031402587890625,
0.038848876953125,
0.0073089599609375,
0.01152801513671875,
-0.0290985107421875,
0.023712158203125,
-0.006099700927734375,
-0.01416015625,
0.0014972686767578125,
0.00519561767578125,
0.01352691650390625,
0.0107269287109375,
0.0045166015625,
-0.015960693359375,
0.00017654895782470703,
0.01096343994140625,
-0.027252197265625,
-0.040191650390625,
-0.0153961181640625,
0.04815673828125,
-0.047393798828125,
0.02191162109375,
0.0024166107177734375,
-0.0189208984375,
0.040008544921875,
0.003215789794921875,
-0.035888671875,
0.00330352783203125,
0.0017423629760742188,
0.05328369140625,
0.0035457611083984375,
0.01274871826171875,
0.0088348388671875,
0.0267333984375,
0.01087188720703125,
0.0010328292846679688,
0.004711151123046875,
0.04168701171875,
-0.020660400390625,
0.0012750625610351562,
0.0071563720703125,
-0.024444580078125,
0.02081298828125,
0.0156402587890625,
-0.0157928466796875,
0.005092620849609375,
-0.00812530517578125,
0.06396484375,
0.043304443359375,
0.00980377197265625,
0.0000832676887512207,
0.0313720703125,
0.00525665283203125,
-0.0191650390625,
-0.00849151611328125,
-0.022491455078125,
0.0165557861328125,
0.02557373046875,
0.038330078125,
0.016326904296875,
-0.034149169921875,
-0.003231048583984375,
-0.0401611328125,
-0.0055999755859375,
0.015380859375,
-0.04339599609375,
-0.06939697265625,
-0.0127716064453125,
0.031890869140625,
0.022491455078125,
-0.03936767578125,
-0.01934814453125,
-0.0361328125,
-0.024322509765625,
0.0083465576171875,
-0.0188140869140625,
-0.0234375,
0.00714111328125,
0.006622314453125,
-0.04400634765625,
-0.028411865234375,
0.0014801025390625,
0.0098114013671875,
0.00543212890625,
-0.01525115966796875,
-0.0323486328125,
0.052215576171875,
-0.0269927978515625,
-0.02471923828125,
-0.051910400390625,
0.05364990234375,
-0.043487548828125,
0.00782012939453125,
0.03472900390625,
0.0079345703125,
-0.023406982421875,
-0.01303863525390625,
-0.032135009765625,
-0.006916046142578125,
-0.026824951171875,
-0.0223236083984375,
-0.03460693359375,
-0.003070831298828125,
0.0186920166015625,
0.035491943359375,
-0.020904541015625,
-0.03558349609375,
-0.03192138671875,
0.0146636962890625,
0.040863037109375,
0.07269287109375,
0.002376556396484375,
-0.0015869140625,
0.020782470703125,
0.0277862548828125,
-0.00432586669921875,
-0.032623291015625,
-0.03692626953125,
-0.01317596435546875,
-0.0178375244140625,
-0.036651611328125,
0.01568603515625,
0.00902557373046875,
0.0015411376953125,
0.02783203125,
0.049591064453125,
0.0189056396484375,
0.0127105712890625,
-0.0166168212890625,
0.0234222412109375,
-0.0268707275390625,
-0.004482269287109375,
-0.0302734375,
-0.028961181640625,
0.00823974609375,
-0.010528564453125,
0.0828857421875,
-0.016815185546875,
-0.0367431640625,
0.0203094482421875,
-0.0193939208984375,
0.016021728515625,
0.044891357421875,
-0.01560211181640625,
-0.001811981201171875,
0.01502227783203125,
-0.0229339599609375,
0.024383544921875,
0.025726318359375,
0.0180206298828125,
0.03192138671875,
-0.019012451171875,
-0.01087188720703125,
0.002391815185546875,
0.00508880615234375,
-0.0170745849609375,
0.0175628662109375,
0.01385498046875,
-0.007076263427734375,
0.031585693359375,
0.038543701171875,
0.06549072265625,
-0.055267333984375,
0.01525115966796875,
0.014495849609375,
-0.0032749176025390625,
0.04522705078125,
-0.0193939208984375,
0.026885986328125,
0.0007767677307128906,
0.06622314453125,
-0.0546875,
-0.00959014892578125,
0.0244140625,
-0.051849365234375,
-0.00035691261291503906,
0.01544189453125,
0.029571533203125,
0.035247802734375,
-0.0124053955078125,
-0.007259368896484375,
0.034912109375,
-0.0028362274169921875,
-0.0165863037109375,
0.01352691650390625,
0.0123748779296875,
0.0022602081298828125,
-0.0291748046875,
0.0452880859375,
-0.01331329345703125,
0.004756927490234375,
0.0101165771484375,
0.0036258697509765625,
0.0219573974609375,
0.051513671875,
-0.025115966796875,
0.00827789306640625,
0.049072265625,
-0.058837890625,
-0.0128173828125,
-0.055206298828125,
-0.00907135009765625,
0.04974365234375,
-0.0574951171875,
0.0280914306640625,
0.0023326873779296875,
-0.010986328125,
-0.0251312255859375,
-0.027191162109375,
0.0357666015625,
0.0111846923828125,
-0.02813720703125,
0.0106201171875,
0.043304443359375,
0.001216888427734375,
0.032012939453125,
-0.03887939453125,
-0.07098388671875,
-0.0618896484375,
0.00960540771484375,
-0.0780029296875,
0.0167694091796875,
0.0673828125,
-0.058624267578125,
0.060302734375,
-0.0073089599609375,
0.016204833984375,
0.012115478515625,
0.015594482421875,
-0.01335906982421875,
-0.005710601806640625,
-0.0098724365234375,
0.031829833984375,
-0.038177490234375,
0.0167999267578125,
-0.02783203125,
0.01110076904296875,
-0.0127105712890625,
0.040679931640625,
0.06268310546875,
0.023162841796875,
-0.0260162353515625,
-0.023406982421875,
0.004634857177734375,
0.0020618438720703125,
-0.0355224609375,
0.0625,
0.01204681396484375,
-0.037628173828125,
0.005687713623046875,
0.0239410400390625,
0.0341796875,
-0.038238525390625,
-0.006153106689453125,
0.0270843505859375,
0.0220794677734375,
0.045501708984375,
-0.004642486572265625,
0.0340576171875,
-0.0374755859375,
-0.00965118408203125,
0.056427001953125,
-0.07196044921875,
-0.0139617919921875,
0.021759033203125,
0.06072998046875,
-0.040252685546875,
-0.0072021484375,
-0.0201873779296875,
0.061065673828125,
0.050933837890625,
-0.0009493827819824219,
0.01511383056640625,
0.009490966796875,
-0.01061248779296875,
0.01108551025390625,
0.007663726806640625,
0.040863037109375,
-0.0079498291015625,
-0.007778167724609375,
-0.0241546630859375,
0.01354217529296875,
-0.04803466796875,
0.0296173095703125,
0.03912353515625,
0.0032176971435546875,
-0.0240936279296875,
-0.002956390380859375,
0.004375457763671875,
0.017913818359375,
0.003398895263671875,
-0.036163330078125,
0.005584716796875,
-0.03961181640625,
-0.001190185546875,
-0.04510498046875,
0.015777587890625,
0.041839599609375,
0.007465362548828125,
-0.0002739429473876953,
0.02630615234375,
-0.028350830078125,
0.0136871337890625,
-0.0002770423889160156,
-0.03076171875,
-0.0158538818359375,
-0.0117034912109375,
0.01296234130859375,
0.002490997314453125,
0.03863525390625,
0.016693115234375,
-0.0211639404296875,
0.048431396484375,
-0.02044677734375,
0.0228118896484375,
-0.047393798828125,
-0.06280517578125,
0.0024547576904296875,
0.0335693359375,
-0.01079559326171875,
-0.020721435546875,
0.0259857177734375,
0.048126220703125,
-0.024993896484375,
-0.031341552734375,
0.0208740234375,
-0.00995635986328125,
0.01076507568359375,
-0.0118255615234375,
0.040130615234375,
0.053741455078125,
-0.00379180908203125,
0.000972747802734375,
0.01081085205078125,
0.0684814453125,
-0.0288238525390625,
0.009185791015625,
-0.00849151611328125,
-0.036407470703125,
-0.004528045654296875,
-0.034149169921875,
0.0137481689453125,
-0.0275115966796875,
-0.036468505859375,
0.016448974609375,
-0.0738525390625,
-0.07135009765625,
0.023193359375,
0.033599853515625,
-0.024200439453125,
0.0244293212890625,
-0.059173583984375,
-0.02154541015625,
0.005523681640625,
0.003955841064453125,
-0.0159454345703125,
0.01351165771484375,
-0.0006194114685058594,
-0.028289794921875,
0.0080718994140625,
0.005615234375,
0.006622314453125,
0.027130126953125,
0.016387939453125,
0.039581298828125,
-0.0264892578125,
0.0248870849609375,
-0.00576019287109375,
0.0333251953125,
-0.0596923828125,
-0.028350830078125,
0.037353515625,
-0.032562255859375,
0.00107574462890625,
-0.0035648345947265625,
-0.04901123046875,
0.04595947265625,
0.0261383056640625,
0.01139068603515625,
0.044097900390625,
-0.01007080078125,
0.00421905517578125,
-0.00830078125,
0.0350341796875,
-0.020965576171875,
-0.012359619140625,
-0.046112060546875,
-0.0217742919921875,
0.034637451171875,
0.006618499755859375,
-0.0049591064453125,
0.0274505615234375,
-0.0130462646484375,
-0.0321044921875,
0.01548004150390625,
-0.032562255859375,
-0.00830078125,
0.015869140625,
0.0055999755859375,
-0.0236663818359375,
0.041961669921875,
0.0126953125,
-0.01727294921875,
0.044647216796875,
0.0176239013671875,
0.0338134765625,
-0.034759521484375,
0.0035381317138671875,
-0.0233612060546875,
0.0264434814453125,
0.003509521484375,
-0.0132293701171875,
-0.0271759033203125,
-0.0009469985961914062,
-0.03497314453125,
0.004726409912109375,
-0.031585693359375,
-0.039276123046875,
-0.001079559326171875,
0.0123291015625,
0.0004878044128417969,
-0.05609130859375,
-0.052093505859375,
0.003414154052734375,
0.0211181640625,
0.023345947265625,
-0.0809326171875,
0.07012939453125,
-0.005809783935546875,
0.0012540817260742188,
0.005428314208984375,
-0.08648681640625,
0.041259765625,
0.045806884765625,
-0.041900634765625,
-0.00334930419921875,
-0.0291290283203125,
-0.05072021484375,
-0.040130615234375,
0.05255126953125,
0.049285888671875,
-0.03900146484375,
-0.0238800048828125,
0.079345703125,
0.049072265625,
0.128173828125,
-0.028900146484375,
-0.024078369140625,
-0.031036376953125,
0.019805908203125,
0.0025482177734375,
-0.0294189453125,
0.0030155181884765625,
-0.0150909423828125,
-0.03118896484375,
-0.008148193359375,
-0.0028018951416015625,
0.007476806640625,
-0.02557373046875,
-0.06011962890625,
0.04937744140625,
-0.0080413818359375,
-0.03778076171875,
-0.014007568359375,
0.02423095703125,
-0.01158905029296875,
0.0306854248046875,
0.018768310546875,
-0.04010009765625,
0.01837158203125,
0.02203369140625,
0.014984130859375,
-0.004673004150390625,
0.007228851318359375,
-0.02020263671875,
-0.005847930908203125,
0.03558349609375,
0.055511474609375,
0.0035839080810546875,
0.04864501953125,
-0.023529052734375,
0.01959228515625,
0.0361328125,
-0.049530029296875,
-0.0667724609375,
-0.04583740234375,
-0.0223236083984375,
-0.032470703125,
-0.01297760009765625,
-0.01473236083984375,
-0.0134429931640625,
0.06414794921875,
0.059295654296875,
0.014312744140625,
-0.02789306640625,
0.041717529296875,
-0.0017852783203125,
-0.035400390625,
-0.002727508544921875,
-0.004375457763671875,
-0.0179901123046875,
-0.01004791259765625,
-0.0008172988891601562,
-0.02642822265625,
0.007022857666015625,
0.041290283203125,
-0.033416748046875,
-0.002361297607421875,
-0.0159759521484375,
-0.048919677734375,
-0.0224151611328125,
0.0149993896484375,
0.0316162109375,
-0.0293426513671875,
0.0094451904296875,
-0.01904296875,
0.002384185791015625,
0.00970458984375,
-0.01497650146484375,
-0.0214996337890625,
-0.0100555419921875,
-0.028594970703125,
0.03985595703125,
-0.02471923828125,
0.0113677978515625,
-0.044586181640625,
0.0031566619873046875,
-0.007213592529296875,
0.028533935546875,
0.0019063949584960938,
0.0304412841796875,
-0.024566650390625,
0.04595947265625,
0.006587982177734375,
0.0535888671875,
-0.0271148681640625,
-0.0200347900390625,
-0.0222320556640625,
0.01522064208984375,
-0.0113525390625,
-0.0025997161865234375,
0.036895751953125,
-0.033203125,
0.0070037841796875,
0.02294921875,
0.01082611083984375,
-0.004627227783203125,
-0.005062103271484375,
-0.02142333984375,
0.004001617431640625,
-0.00015842914581298828
]
|
2f5efb381a77619b4f736d4541832a6ac1814e57 | Wordpress Stackexchange
Q: Differences between wpdb->get_results() and wpdb->query() Who can explain me the differences between wpdb->get_results() and wpdb->query() in making generic queries to wordpress db?
A: The difference, if you want to call it that, is that the query() is the most generalized method to do queries with $wpdb, the get_results() method on the other hand is a specific method, which does make use of the query() method to retrieve the specific results of this method and then does some work on the output.
| Q: Differences between wpdb->get_results() and wpdb->query() Who can explain me the differences between wpdb->get_results() and wpdb->query() in making generic queries to wordpress db?
A: The difference, if you want to call it that, is that the query() is the most generalized method to do queries with $wpdb, the get_results() method on the other hand is a specific method, which does make use of the query() method to retrieve the specific results of this method and then does some work on the output.
A: It is the output juggling that get_results() does. If you look at the source for get_results(), the work of the query is done by query(). Eveything after that is just "casting" the results to the data type specified by the $output argument.
1946 public function get_results( $query = null, $output = OBJECT ) {
1947 $this->func_call = "\$db->get_results(\"$query\", $output)";
1948
1949 if ( $query )
1950 $this->query( $query );
1951 else
1952 return null;
| wordpress | {
"language": "en",
"length": 157,
"provenance": "stackexchange_00019.jsonl.gz:449892",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166260"
} | [
0.07391357421875,
0.00624847412109375,
0.0169677734375,
-0.035919189453125,
0.0311279296875,
-0.032318115234375,
0.051788330078125,
-0.007030487060546875,
0.0139617919921875,
0.0523681640625,
-0.06890869140625,
0.011260986328125,
0.00661468505859375,
0.006473541259765625,
-0.03369140625,
-0.030548095703125,
0.066162109375,
-0.065673828125,
-0.0009617805480957031,
-0.01416015625,
0.019439697265625,
0.02777099609375,
-0.000499725341796875,
0.11083984375,
0.012908935546875,
-0.059295654296875,
0.06439208984375,
0.01200103759765625,
-0.0060577392578125,
-0.02362060546875,
0.0146942138671875,
0.01270294189453125,
0.0030879974365234375,
0.043304443359375,
-0.019073486328125,
0.03668212890625,
0.0233612060546875,
0.01617431640625,
0.01531982421875,
0.02276611328125,
0.020263671875,
-0.01270294189453125,
-0.01207733154296875,
-0.004058837890625,
-0.022674560546875,
-0.0338134765625,
0.044952392578125,
-0.028076171875,
0.0152740478515625,
-0.013763427734375,
0.00600433349609375,
0.0120849609375,
0.0248565673828125,
-0.0275421142578125,
-0.0107269287109375,
-0.0012044906616210938,
0.005340576171875,
-0.0196533203125,
0.03436279296875,
-0.037933349609375,
-0.039306640625,
-0.026397705078125,
0.046875,
0.00830841064453125,
0.008026123046875,
0.0112152099609375,
0.07855224609375,
0.01629638671875,
-0.00555419921875,
-0.01512908935546875,
-0.011199951171875,
0.01169586181640625,
-0.0159759521484375,
0.015777587890625,
-0.032989501953125,
-0.02239990234375,
0.0245361328125,
-0.029327392578125,
0.014312744140625,
0.036346435546875,
0.0008511543273925781,
0.0023441314697265625,
-0.09661865234375,
0.00595855712890625,
0.00921630859375,
0.016204833984375,
-0.01210784912109375,
-0.0189208984375,
-0.007526397705078125,
-0.025970458984375,
0.006855010986328125,
-0.0596923828125,
-0.056060791015625,
0.044647216796875,
0.039581298828125,
-0.06182861328125,
-0.0098724365234375,
-0.00489044189453125,
-0.0260009765625,
-0.01247406005859375,
-0.00827789306640625,
-0.00933074951171875,
-0.0240631103515625,
-0.0008745193481445312,
0.0214080810546875,
-0.0017681121826171875,
-0.01561737060546875,
0.01273345947265625,
0.0657958984375,
0.047607421875,
0.018463134765625,
0.08251953125,
-0.0206756591796875,
-0.0399169921875,
-0.003902435302734375,
0.020843505859375,
-0.039581298828125,
0.0219268798828125,
0.00937652587890625,
-0.002101898193359375,
0.01507568359375,
0.02764892578125,
-0.0017614364624023438,
0.007808685302734375,
-0.0312347412109375,
-0.02105712890625,
-0.007801055908203125,
-0.023590087890625,
-0.0341796875,
0.054901123046875,
-0.0214996337890625,
-0.007495880126953125,
0.019134521484375,
0.01213836669921875,
-0.0224151611328125,
-0.0308837890625,
-0.01195526123046875,
0.0035400390625,
-0.0027217864990234375,
0.0131072998046875,
0.030670166015625,
-0.03631591796875,
-0.027069091796875,
0.01410675048828125,
-0.0303192138671875,
-0.0251617431640625,
0.0193328857421875,
0.039215087890625,
-0.024658203125,
-0.00308990478515625,
-0.0235137939453125,
0.061309814453125,
-0.028289794921875,
0.005672454833984375,
0.0260162353515625,
0.007335662841796875,
-0.0205535888671875,
-0.005374908447265625,
0.01953125,
0.0255584716796875,
0.019287109375,
0.0084381103515625,
-0.00009316205978393555,
-0.01253509521484375,
-0.015625,
-0.03070068359375,
-0.00666046142578125,
0.0027484893798828125,
0.0197601318359375,
0.004375457763671875,
0.035125732421875,
-0.01229095458984375,
0.033721923828125,
-0.002716064453125,
-0.0089569091796875,
0.004032135009765625,
-0.0277099609375,
-0.0024623870849609375,
0.0262603759765625,
-0.0201416015625,
-0.0255126953125,
-0.0220184326171875,
0.017242431640625,
0.005794525146484375,
-0.044921875,
0.03436279296875,
0.00717926025390625,
0.05133056640625,
0.017486572265625,
0.017364501953125,
0.00650787353515625,
0.0222625732421875,
-0.01264190673828125,
0.04364013671875,
0.0022602081298828125,
-0.0533447265625,
-0.0231475830078125,
-0.014129638671875,
-0.01104736328125,
-0.01837158203125,
-0.0193939208984375,
0.02972412109375,
-0.01363372802734375,
0.0308074951171875,
-0.0445556640625,
0.026031494140625,
-0.0221405029296875,
0.032989501953125,
-0.01190948486328125,
0.0121612548828125,
0.0122222900390625,
0.00461578369140625,
-0.0287322998046875,
0.017669677734375,
-0.0310211181640625,
-0.0123748779296875,
-0.01340484619140625,
0.0150299072265625,
-0.002040863037109375,
0.0071258544921875,
-0.0196075439453125,
-0.0027599334716796875,
-0.0278167724609375,
-0.0011720657348632812,
0.049041748046875,
-0.032440185546875,
0.0191802978515625,
-0.023406982421875,
0.08721923828125,
-0.010101318359375,
0.020477294921875,
-0.0029048919677734375,
0.04541015625,
0.0968017578125,
0.0153656005859375,
-0.0089263916015625,
0.01512908935546875,
-0.07171630859375,
0.015411376953125,
0.0374755859375,
0.035430908203125,
0.0147705078125,
-0.0255126953125,
-0.0421142578125,
0.0290069580078125,
-0.0244293212890625,
0.0101318359375,
-0.0267791748046875,
0.004444122314453125,
0.01218414306640625,
0.0328369140625,
-0.0322265625,
0.021759033203125,
-0.0023975372314453125,
-0.0145263671875,
0.01136016845703125,
-0.01120758056640625,
0.04840087890625,
-0.012298583984375,
-0.00029754638671875,
-0.027099609375,
-0.01232147216796875,
0.024627685546875,
-0.01995849609375,
-0.015869140625,
-0.009613037109375,
0.00397491455078125,
0.00986480712890625,
0.0082550048828125,
-0.0230865478515625,
0.01444244384765625,
-0.01506805419921875,
0.0074462890625,
0.053314208984375,
-0.019866943359375,
0.032135009765625,
-0.0223846435546875,
-0.01453399658203125,
-0.0088653564453125,
0.023040771484375,
0.008758544921875,
0.06512451171875,
-0.041839599609375,
-0.02081298828125,
-0.0018901824951171875,
-0.0242919921875,
-0.0290679931640625,
0.00818634033203125,
-0.0104827880859375,
0.006969451904296875,
0.035552978515625,
0.036590576171875,
-0.0210723876953125,
0.04937744140625,
-0.04803466796875,
-0.008544921875,
0.0382080078125,
-0.0123443603515625,
-0.002498626708984375,
-0.01898193359375,
0.05609130859375,
0.049163818359375,
-0.0117340087890625,
-0.0006809234619140625,
0.001689910888671875,
-0.0028171539306640625,
0.030975341796875,
-0.0230712890625,
-0.035858154296875,
0.037994384765625,
-0.11199951171875,
-0.0093231201171875,
0.042999267578125,
0.01511383056640625,
0.0289764404296875,
-0.0151214599609375,
-0.0093231201171875,
0.0377197265625,
-0.0672607421875,
-0.0899658203125,
-0.04412841796875,
-0.060272216796875,
0.033111572265625,
-0.0249786376953125,
0.001956939697265625,
0.004642486572265625,
-0.029296875,
0.0355224609375,
0.0245361328125,
0.004459381103515625,
-0.0482177734375,
-0.021820068359375,
-0.0550537109375,
0.00563812255859375,
-0.006534576416015625,
0.0212860107421875,
0.00756072998046875,
0.058349609375,
-0.0009279251098632812,
-0.029144287109375,
-0.0062103271484375,
0.0212249755859375,
-0.010833740234375,
-0.01837158203125,
0.010986328125,
-0.01360321044921875,
-0.0020999908447265625,
0.00054931640625,
0.0189208984375,
0.0177001953125,
-0.013580322265625,
-0.004413604736328125,
0.050750732421875,
0.03631591796875,
0.076171875,
0.00562286376953125,
-0.07659912109375,
0.04266357421875,
0.03704833984375,
-0.033111572265625,
-0.0224761962890625,
-0.0171356201171875,
-0.039215087890625,
0.07440185546875,
0.0214385986328125,
-0.0117340087890625,
0.0175933837890625,
0.02899169921875,
0.054168701171875,
0.030670166015625,
-0.0202178955078125,
-0.029693603515625,
0.0870361328125,
0.0250091552734375,
0.060882568359375,
-0.0238800048828125,
0.0103759765625,
-0.034942626953125,
-0.0009102821350097656,
0.0035457611083984375,
0.002155303955078125,
0.0113677978515625,
-0.0146942138671875,
-0.0020599365234375,
-0.041015625,
0.05865478515625,
-0.02032470703125,
-0.037994384765625,
-0.010772705078125,
-0.01763916015625,
0.00441741943359375,
0.0625,
0.0277252197265625,
-0.0277099609375,
0.00830841064453125,
0.0230255126953125,
-0.06732177734375,
-0.0302886962890625,
-0.022796630859375,
0.0007710456848144531,
-0.036376953125,
0.01739501953125,
-0.0028476715087890625,
-0.00936126708984375,
-0.04388427734375,
0.034912109375,
-0.04864501953125,
-0.0200653076171875,
0.0270843505859375,
0.0083465576171875,
-0.00891876220703125,
0.009063720703125,
-0.01413726806640625,
0.00470733642578125,
0.009979248046875,
-0.0240631103515625,
-0.041717529296875,
-0.01415252685546875,
0.01515960693359375,
0.0242919921875,
0.0015325546264648438,
0.0019702911376953125,
-0.004100799560546875,
0.0352783203125,
0.007587432861328125,
0.01490020751953125,
0.031494140625,
0.007472991943359375,
0.01824951171875,
-0.004608154296875,
0.0269622802734375,
-0.0237884521484375,
-0.005611419677734375,
-0.053985595703125,
-0.01776123046875,
0.005092620849609375,
-0.031829833984375,
0.038421630859375,
-0.0572509765625,
0.0118255615234375,
0.020477294921875,
0.01180267333984375,
-0.039703369140625,
0.010009765625,
-0.035858154296875,
0.0028095245361328125,
0.010345458984375,
-0.01715087890625,
0.04833984375,
0.05377197265625,
-0.005863189697265625,
-0.0193634033203125,
0.051239013671875,
0.01531219482421875,
-0.05267333984375,
-0.03302001953125,
-0.0078277587890625,
0.0252838134765625,
-0.006931304931640625,
0.0130462646484375,
0.005817413330078125,
-0.024932861328125,
0.02471923828125,
0.0009822845458984375,
0.022735595703125,
0.00804901123046875,
0.0462646484375,
0.010467529296875,
-0.0096588134765625,
0.03155517578125,
0.00963592529296875,
-0.05157470703125,
0.05303955078125,
-0.0034198760986328125,
-0.00858306884765625,
0.0115814208984375,
0.039703369140625,
-0.0097198486328125,
-0.02392578125,
-0.048675537109375,
-0.00666046142578125,
0.0078125,
0.028167724609375,
0.0189056396484375,
-0.0216827392578125,
0.0285797119140625,
-0.034423828125,
-0.0159454345703125,
0.0016813278198242188,
0.00904083251953125,
0.028076171875,
0.01175689697265625,
0.04669189453125,
0.0204010009765625,
-0.0016651153564453125,
-0.0325927734375,
-0.01041412353515625,
0.05474853515625,
-0.008941650390625,
-0.04345703125,
0.005565643310546875,
-0.0233306884765625,
0.0196990966796875,
0.040557861328125,
-0.0144805908203125,
0.03729248046875,
0.0198974609375,
-0.02362060546875,
0.01129150390625,
-0.0024814605712890625,
-0.0292510986328125,
-0.044525146484375,
0.03839111328125,
-0.0098419189453125,
0.01267242431640625,
0.0234222412109375,
0.05731201171875,
-0.06024169921875,
0.072998046875,
0.0025539398193359375,
0.00862884521484375,
-0.00046944618225097656,
0.02349853515625,
0.01336669921875,
0.00901031494140625,
0.00742340087890625,
-0.0026721954345703125,
0.01045989990234375,
-0.01430511474609375,
0.00568389892578125,
0.0045623779296875,
-0.005504608154296875,
0.004268646240234375,
-0.0000030994415283203125,
0.041534423828125,
0.0154571533203125,
-0.030426025390625,
0.0284576416015625,
0.0628662109375,
0.0095672607421875,
-0.039154052734375,
-0.05267333984375,
0.00981903076171875,
0.045440673828125,
-0.01113128662109375,
0.047943115234375,
0.01474761962890625,
0.054779052734375,
-0.007488250732421875,
0.0006494522094726562,
0.0125732421875,
0.0207672119140625,
-0.005855560302734375,
-0.0369873046875,
-0.0224151611328125,
-0.0012187957763671875,
0.027435302734375,
-0.01172637939453125,
-0.022308349609375,
-0.0023097991943359375,
-0.026611328125,
0.038330078125,
-0.06817626953125,
0.035186767578125,
-0.06591796875,
-0.013031005859375,
0.0965576171875,
0.08099365234375,
0.0230712890625,
-0.0260162353515625,
-0.044097900390625,
-0.03289794921875,
-0.03533935546875,
-0.03564453125,
-0.01155853271484375,
0.0092926025390625,
-0.014617919921875,
0.00432586669921875,
0.01715087890625,
0.028472900390625,
-0.0180206298828125,
0.02032470703125,
-0.015777587890625,
-0.0313720703125,
0.004852294921875,
0.033843994140625,
-0.007053375244140625,
0.029998779296875,
0.0136260986328125,
0.0105438232421875,
-0.0158538818359375,
-0.02178955078125,
0.0199737548828125,
-0.048492431640625,
-0.018951416015625,
-0.0350341796875,
-0.01629638671875,
-0.0116119384765625,
-0.0085906982421875,
-0.00940704345703125,
0.010894775390625,
-0.00397491455078125,
-0.01152801513671875,
-0.0009822845458984375,
0.01435089111328125,
-0.01129150390625,
0.01282501220703125,
0.035400390625,
-0.002368927001953125,
0.007099151611328125,
-0.0261993408203125,
-0.037811279296875,
0.0115509033203125,
0.0007872581481933594,
-0.007709503173828125,
0.0233154296875,
-0.0003790855407714844,
0.0071563720703125,
0.037689208984375,
0.0106048583984375,
0.0357666015625,
0.0085601806640625,
0.01898193359375,
0.0187530517578125,
0.00853729248046875,
-0.0277557373046875,
-0.0038356781005859375,
0.0869140625,
0.027252197265625,
-0.038482666015625,
0.06561279296875,
-0.0406494140625,
0.047760009765625,
0.057281494140625,
0.10205078125,
-0.07281494140625,
0.0024738311767578125,
0.051849365234375,
-0.04669189453125,
-0.0240936279296875,
0.0111541748046875,
-0.04754638671875,
-0.068115234375,
0.011077880859375,
-0.0007562637329101562,
-0.014068603515625,
-0.00617218017578125,
0.007389068603515625,
-0.01457977294921875,
-0.018280029296875,
0.0289764404296875,
0.01128387451171875,
-0.015380859375,
0.03131103515625,
-0.0005998611450195312,
0.00969696044921875,
0.018951416015625,
0.0241241455078125,
0.0063323974609375,
-0.005733489990234375,
-0.05517578125,
-0.007476806640625,
-0.020660400390625,
-0.035858154296875,
0.0063018798828125,
0.01218414306640625,
0.0321044921875,
0.033966064453125,
-0.00868988037109375,
0.007434844970703125,
-0.004802703857421875,
0.0237274169921875,
-0.057403564453125,
0.0004248619079589844,
0.0173797607421875,
0.05255126953125,
-0.043853759765625,
0.0289306640625,
-0.048583984375,
0.01523590087890625,
0.0016727447509765625,
-0.04949951171875,
0.021820068359375,
-0.035247802734375,
0.01520538330078125,
0.043182373046875,
0.02239990234375,
0.00235748291015625,
-0.003261566162109375,
0.009521484375,
-0.0338134765625,
0.021881103515625,
0.00737762451171875,
0.0169525146484375,
0.0040130615234375,
0.006992340087890625,
-0.022918701171875,
0.014312744140625,
0.021209716796875,
-0.002696990966796875,
0.037078857421875,
-0.01100921630859375,
-0.026947021484375,
-0.0201416015625,
-0.0474853515625,
0.021514892578125,
0.01227569580078125,
0.024871826171875,
-0.025238037109375,
0.0091094970703125,
-0.0012674331665039062,
-0.003917694091796875,
0.04327392578125,
0.0005497932434082031,
-0.0114898681640625,
-0.01282501220703125,
0.048797607421875,
0.0350341796875,
-0.0005903244018554688,
0.0207672119140625,
0.032928466796875,
0.07745361328125,
0.09576416015625,
-0.04632568359375,
0.047119140625,
-0.0188446044921875,
0.0241241455078125,
0.058319091796875,
0.00426483154296875,
-0.00455474853515625,
-0.0014352798461914062,
0.001953125,
0.018707275390625,
-0.0118408203125,
-0.01499176025390625,
0.01312255859375,
-0.010040283203125,
0.0665283203125,
0.045501708984375,
-0.0555419921875,
-0.060791015625,
-0.0364990234375,
0.0335693359375,
0.018524169921875,
0.0443115234375,
0.040252685546875,
0.004772186279296875,
0.12469482421875,
-0.002346038818359375,
0.0167236328125,
0.016632080078125,
0.0048065185546875,
0.053253173828125,
-0.004375457763671875,
0.025787353515625,
-0.0557861328125,
0.008026123046875,
0.03167724609375,
0.07135009765625,
-0.050537109375,
-0.034149169921875,
0.01007843017578125,
0.002147674560546875,
0.00746917724609375,
-0.03204345703125,
-0.01012420654296875,
-0.005573272705078125,
0.030364990234375,
-0.020050048828125,
-0.004425048828125,
0.0243682861328125,
-0.03839111328125,
-0.01514434814453125,
0.0008573532104492188,
0.06292724609375,
0.018218994140625,
0.00849151611328125,
-0.00943756103515625,
0.0084381103515625,
0.019744873046875,
-0.0145111083984375,
0.023590087890625,
-0.0279693603515625,
0.0014028549194335938,
-0.03387451171875,
0.0550537109375,
-0.019378662109375,
0.06121826171875,
-0.09271240234375,
-0.07830810546875,
0.044158935546875,
0.056304931640625,
0.01751708984375,
-0.0197906494140625,
-0.0017995834350585938,
0.0228271484375,
0.00753021240234375,
0.00986480712890625,
0.053924560546875,
0.00838470458984375,
-0.042755126953125,
-0.01534271240234375,
-0.005077362060546875,
0.036651611328125,
0.01410675048828125,
0.0171356201171875,
0.034820556640625,
0.0223388671875,
-0.01861572265625,
0.029541015625,
-0.01409912109375,
-0.0231475830078125,
0.046295166015625,
-0.04583740234375,
0.0758056640625,
-0.013824462890625,
-0.04620361328125,
-0.018951416015625,
0.004024505615234375,
-0.007602691650390625,
0.017242431640625,
0.041748046875,
0.0028896331787109375,
0.0208587646484375,
0.00862884521484375,
-0.0086669921875,
-0.00844573974609375,
-0.0065155029296875,
0.01543426513671875,
-0.0556640625,
-0.0097808837890625,
-0.0188751220703125,
-0.09173583984375,
-0.045166015625,
-0.007274627685546875,
-0.004398345947265625,
-0.03497314453125,
0.035430908203125,
0.0278778076171875,
-0.004505157470703125,
-0.005245208740234375,
0.04937744140625,
-0.04205322265625,
-0.031341552734375,
0.059478759765625,
-0.045135498046875,
-0.0218505859375,
0.006435394287109375,
-0.0316162109375,
0.0018854141235351562,
0.044891357421875,
-0.03973388671875,
0.007442474365234375,
-0.0034313201904296875,
0.020782470703125,
-0.04266357421875,
-0.006305694580078125,
-0.0259552001953125,
0.0298614501953125,
0.0653076171875,
-0.0096893310546875,
0.0182647705078125,
-0.036590576171875,
-0.0013141632080078125,
0.0225830078125,
0.021240234375,
-0.025787353515625,
0.02685546875,
-0.0333251953125,
0.049072265625,
0.038726806640625,
-0.01236724853515625,
0.000020563602447509766,
-0.013458251953125,
-0.02618408203125,
-0.0009851455688476562,
0.0017442703247070312,
-0.0043182373046875,
0.0095062255859375,
-0.04949951171875,
-0.046112060546875,
-0.0511474609375,
-0.004169464111328125,
-0.00868988037109375,
-0.01068878173828125,
-0.04638671875,
0.003986358642578125,
-0.030914306640625,
-0.01332855224609375,
-0.0106658935546875,
0.007434844970703125,
-0.0205535888671875,
0.006557464599609375,
-0.0013980865478515625,
-0.035064697265625,
-0.00901031494140625,
0.01027679443359375,
0.00691986083984375,
0.00850677490234375,
-0.058746337890625,
0.03399658203125,
-0.011993408203125,
0.0175018310546875,
-0.0205230712890625,
-0.0537109375,
0.016387939453125,
0.040557861328125,
-0.0182037353515625,
-0.002094268798828125,
-0.0511474609375,
-0.0302886962890625,
-0.037811279296875,
0.02398681640625,
0.03765869140625,
-0.043548583984375,
-0.0189208984375,
0.0455322265625,
0.0202789306640625,
0.08734130859375,
0.01558685302734375,
-0.029998779296875,
0.024261474609375,
-0.01204681396484375,
-0.018035888671875,
-0.033355712890625,
0.01605224609375,
-0.04046630859375,
-0.006805419921875,
0.0170745849609375,
-0.0020618438720703125,
0.0217132568359375,
-0.0240020751953125,
-0.0771484375,
0.08795166015625,
-0.00466156005859375,
-0.029022216796875,
-0.014068603515625,
-0.0283203125,
0.0249481201171875,
-0.0260009765625,
-0.01303863525390625,
-0.00498199462890625,
-0.07293701171875,
-0.0225830078125,
0.0301666259765625,
0.002307891845703125,
0.0286102294921875,
0.015899658203125,
-0.060546875,
0.0222015380859375,
0.0053863525390625,
0.031463623046875,
-0.0037841796875,
-0.0009565353393554688,
-0.00447845458984375,
0.02178955078125,
-0.03497314453125,
0.0012083053588867188,
-0.01189422607421875,
0.00939178466796875,
-0.021697998046875,
-0.00820159912109375,
0.0182037353515625,
0.0299530029296875,
0.01232147216796875,
0.062744140625,
-0.001873016357421875,
-0.05682373046875,
-0.0022258758544921875,
0.0316162109375,
-0.024017333984375,
-0.0301055908203125,
0.0277862548828125,
-0.05511474609375,
-0.038848876953125,
-0.0194854736328125,
-0.0177764892578125,
0.02557373046875,
-0.015838623046875,
-0.03656005859375,
0.0001418590545654297,
-0.01392364501953125,
-0.0181121826171875,
-0.04779052734375,
-0.060272216796875,
0.0230712890625,
-0.033111572265625,
-0.02764892578125,
0.0156707763671875,
0.036773681640625,
-0.030242919921875,
0.0294647216796875,
0.01479339599609375,
0.034698486328125,
0.0078582763671875,
-0.005298614501953125,
0.03521728515625,
-0.044586181640625,
0.0228271484375,
-0.0007076263427734375,
0.01087188720703125,
0.024322509765625,
0.00536346435546875,
0.029296875,
-0.033721923828125,
0.0657958984375,
0.006855010986328125,
0.028472900390625,
0.03289794921875,
0.0626220703125,
-0.005115509033203125,
0.0546875,
0.0024089813232421875,
-0.04339599609375,
0.005641937255859375,
-0.01152801513671875,
0.00846099853515625,
0.013336181640625,
-0.0144805908203125,
-0.033050537109375,
0.025390625,
0.029327392578125,
-0.01218414306640625,
0.0218353271484375
]
|
2bba9af22eac0466bd40b2db25b59198f14723d0 | Wordpress Stackexchange
Q: How to check if a string is a valid URL WordPress provides a helpful function called is_email() which checks if a given email address is valid. Is there a similar function available to check if a URL is valid?
I tried is_url() but that was just wishful thinking on my part.
Ref: http://codex.wordpress.org/Function_Reference/is_email
A: I found wp_http_validate_url quite convenient to check if a string in valid URL or not while working on my project.
Take a reference from here:
https://developer.wordpress.org/reference/functions/wp_http_validate_url/
For example:
$val = 'http://somevalidurl.com';
if ( wp_http_validate_url( $val ) ) {
// It's valid URL;
} else {
// It's NOT valid URL;
}
It returns the URL itself if it's valid,else false.
| Q: How to check if a string is a valid URL WordPress provides a helpful function called is_email() which checks if a given email address is valid. Is there a similar function available to check if a URL is valid?
I tried is_url() but that was just wishful thinking on my part.
Ref: http://codex.wordpress.org/Function_Reference/is_email
A: I found wp_http_validate_url quite convenient to check if a string in valid URL or not while working on my project.
Take a reference from here:
https://developer.wordpress.org/reference/functions/wp_http_validate_url/
For example:
$val = 'http://somevalidurl.com';
if ( wp_http_validate_url( $val ) ) {
// It's valid URL;
} else {
// It's NOT valid URL;
}
It returns the URL itself if it's valid,else false.
A: I know this is an old post, but for anyone visiting it's also worth considering the WP functions esc_url() and esc_url_raw(), the latter being safe for databases entries etc, as it does not encode entities. esc_url() does encode entities and so is good for display to users.
In the source you can see that esc_url() checks for a whitelist of allowed protocols and structure and so avoids some of the vulnerabilities of FILTER_VALIDATE_URL noted by the link posed by @tobltobs.
A: In my opinion is better to use wp_http_validate_url.
Example 1:
filter_var( '//website.com', FILTER_VALIDATE_URL )
Return false.
Example 2:
wp_http_validate_url( '//website.com' )
Return url.
*
*If you don't know is website use https or http protocol, it's better to use '//'.
*wp_http_validate_url is improved by WP developers (is more specific).
*You can improve or change wp_http_validate_url using hooks (filters & actions). You can't use hooks for filter_var.
Ref: https://developer.wordpress.org/reference/functions/wp_http_validate_url/
Ref: https://www.php.net/manual/en/function.filter-var.php
A: Use the native php function Filter Validator
if (filter_var($url, FILTER_VALIDATE_URL) === FALSE) {
die('Not a valid URL');
}
A: Let's discuss our options for validating URLs in WordPress starting with the obvious ones.
*
*filter_var() with the FILTER_VALIDATE_URL filter in PHP doesn't work for internationalized domain names containing non-ASCII characters such as http://스타벅스코리아.com. It also has some other issues, as discussed by David Müller, like accepting http://example.com/"><script>alert("xss")</script> as valid URL even though it is clearly malicious.
*wp_http_validate_url() in WordPress may do a better job even though it was intended specifically for using in HTTP API and not for the general validation of URLs. But it still doesn't solve the two specific issues discussed earlier.
*preg_match() in PHP may work for you or it may not. Writing regular expressions forecasting every possible scenario is not always the most ideal solution and getting it universally right may not be possible from time to time.
*esc_url_raw() in WordPress is not intended for validating URLs but it seems to be doing a better job than the others. It will work for non-ASCII characters as well as solve the other issues discussed earlier. This function will basically sanitize any string for saving in the WordPress database as a URL by removing or altering any characters that are either invalid or malicious. And therefore, if the sanitized version isn't the same as the unsanitized version, it can be pretty confidently said that the URL isn't valid and maybe most importantly not safe.
Here is how the URL verification can be done with the esc_url_raw() function by also taking advantage of the strtolower() function to make the verification case insensitive.
function validateUrl($url) {
if ( strtolower(esc_url_raw($url)) === strtolower($url) ) {
return $url;
} else {
return false;
}
}
A: To ensure user-submitted URL is valid and safe to store and later display, I suggest
esc_url_raw($url) === $url
esc_url_raw(), like @orionrush mentioned above, sanitizes the URL by removing anything invalid or malicious from it. So, if there string has nothing invalid or malicious, then it's ok.
Eg
if( esc_url_raw($url) === $url ) {
// URL is valid. Use it...
} else {
// URL is invalid or malicious. Don't use it...
}
I wrote a longer blog post on that here: https://cmljnelson.wordpress.com/2018/08/31/url-validation-in-wordpress/
A: is_email(), actually do not check if an email address is valid, only if it is conforming to spec. The email I gladly supply for many sites that show pointless interest in my email address is [email protected] which is conforming address but it is unlikely to have anyone using it.
Checking out urls is best done by pinging them. You can try to check conformance, but in theory there are very little limitation to what an encoded url can be.
| wordpress | {
"language": "en",
"length": 723,
"provenance": "stackexchange_00019.jsonl.gz:449933",
"question_score": "13",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166392"
} | [
0.06329345703125,
0.01406097412109375,
-0.031982421875,
-0.06719970703125,
0.0240631103515625,
-0.03753662109375,
-0.004650115966796875,
-0.01007843017578125,
-0.02227783203125,
0.0192108154296875,
0.0015888214111328125,
0.01119232177734375,
0.0023593902587890625,
-0.0289764404296875,
0.0023593902587890625,
-0.03326416015625,
-0.00743865966796875,
0.0275726318359375,
-0.007701873779296875,
-0.04107666015625,
0.0260772705078125,
-0.0455322265625,
-0.039154052734375,
0.0255889892578125,
0.0045013427734375,
0.005764007568359375,
0.11785888671875,
-0.0269622802734375,
0.0175628662109375,
-0.0109100341796875,
0.024871826171875,
-0.04852294921875,
0.0063323974609375,
0.04449462890625,
-0.027862548828125,
-0.0259246826171875,
0.0189971923828125,
0.0008702278137207031,
-0.0086517333984375,
0.045654296875,
0.032501220703125,
-0.023895263671875,
0.005603790283203125,
0.01326751708984375,
0.01371002197265625,
-0.048797607421875,
0.045196533203125,
-0.05145263671875,
0.0081634521484375,
0.061126708984375,
0.004085540771484375,
0.0009503364562988281,
-0.002849578857421875,
0.01102447509765625,
-0.003749847412109375,
-0.0034999847412109375,
0.0041046142578125,
-0.0298309326171875,
0.0206756591796875,
-0.00894927978515625,
-0.0142059326171875,
0.0053863525390625,
0.0174560546875,
0.0013561248779296875,
-0.01219940185546875,
-0.0018520355224609375,
-0.02197265625,
0.0450439453125,
-0.01471710205078125,
-0.0543212890625,
-0.02215576171875,
-0.00030517578125,
-0.0200042724609375,
0.0153045654296875,
-0.029205322265625,
0.01258087158203125,
-0.00316619873046875,
-0.0024776458740234375,
0.0204925537109375,
0.02691650390625,
0.0075531005859375,
-0.03436279296875,
-0.00908660888671875,
0.01654052734375,
-0.00469970703125,
0.036773681640625,
-0.010101318359375,
-0.0130615234375,
-0.04168701171875,
-0.0380859375,
-0.0265350341796875,
0.01812744140625,
-0.06158447265625,
-0.04522705078125,
-0.032440185546875,
-0.0258941650390625,
0.049102783203125,
0.045562744140625,
-0.02587890625,
-0.04022216796875,
0.0213623046875,
-0.0462646484375,
0.01267242431640625,
-0.01617431640625,
-0.01513671875,
0.06805419921875,
0.05328369140625,
-0.0098419189453125,
-0.01113128662109375,
-0.01971435546875,
0.005153656005859375,
-0.00984954833984375,
-0.028778076171875,
-0.0123138427734375,
-0.053680419921875,
0.025238037109375,
-0.03167724609375,
-0.049285888671875,
-0.005046844482421875,
-0.0124359130859375,
0.02569580078125,
0.0457763671875,
0.0335693359375,
-0.0809326171875,
-0.00799560546875,
-0.0236358642578125,
-0.045745849609375,
-0.046356201171875,
-0.01183319091796875,
0.03851318359375,
-0.013153076171875,
0.014068603515625,
0.0002853870391845703,
-0.020294189453125,
-0.0406494140625,
-0.022491455078125,
-0.01654052734375,
0.0222625732421875,
0.0031032562255859375,
0.00446319580078125,
0.004093170166015625,
-0.0262603759765625,
0.02117919921875,
0.0171051025390625,
0.0220184326171875,
0.044952392578125,
0.021087646484375,
-0.003887176513671875,
-0.007686614990234375,
-0.063720703125,
0.02978515625,
-0.042816162109375,
0.04833984375,
-0.01068115234375,
-0.02099609375,
-0.0229949951171875,
0.0150299072265625,
-0.0245819091796875,
-0.0233001708984375,
-0.042999267578125,
-0.00563812255859375,
-0.0167694091796875,
0.0085296630859375,
-0.056732177734375,
-0.06622314453125,
0.015838623046875,
-0.06427001953125,
-0.0054473876953125,
0.0137939453125,
0.0243988037109375,
-0.0159912109375,
0.04400634765625,
0.01318359375,
0.006008148193359375,
-0.01184844970703125,
-0.01128387451171875,
0.018829345703125,
0.009033203125,
0.004604339599609375,
0.09637451171875,
0.015777587890625,
-0.0321044921875,
0.038848876953125,
-0.03326416015625,
-0.031402587890625,
0.041961669921875,
-0.0037555694580078125,
0.027252197265625,
0.01335906982421875,
0.001434326171875,
0.021209716796875,
0.02301025390625,
0.032470703125,
-0.0247802734375,
-0.022125244140625,
-0.023956298828125,
-0.004924774169921875,
-0.004764556884765625,
-0.0313720703125,
0.039337158203125,
0.01023101806640625,
-0.024078369140625,
0.0080413818359375,
0.01373291015625,
-0.028900146484375,
-0.01318359375,
-0.0208892822265625,
0.00856781005859375,
-0.043212890625,
0.059967041015625,
0.034698486328125,
0.01377105712890625,
-0.05145263671875,
0.039642333984375,
0.032958984375,
-0.034088134765625,
0.0263519287109375,
-0.00021016597747802734,
-0.0576171875,
-0.002277374267578125,
-0.0660400390625,
-0.006732940673828125,
-0.060272216796875,
0.045135498046875,
-0.0200653076171875,
-0.007808685302734375,
-0.012725830078125,
0.005466461181640625,
-0.02838134765625,
0.021392822265625,
-0.005176544189453125,
0.014678955078125,
0.0662841796875,
0.039886474609375,
-0.0306549072265625,
-0.0220184326171875,
-0.0173797607421875,
-0.0614013671875,
-0.0030002593994140625,
0.077880859375,
0.0523681640625,
0.0162353515625,
-0.0248870849609375,
-0.055816650390625,
0.040008544921875,
-0.065185546875,
-0.005680084228515625,
-0.033538818359375,
-0.01751708984375,
0.0341796875,
-0.0279388427734375,
0.020416259765625,
0.0205535888671875,
-0.0247955322265625,
-0.027130126953125,
0.043182373046875,
-0.0037479400634765625,
-0.0032405853271484375,
-0.05816650390625,
0.056732177734375,
-0.006076812744140625,
0.062103271484375,
0.0021572113037109375,
0.01458740234375,
0.006946563720703125,
0.0032672882080078125,
0.0302276611328125,
0.0196685791015625,
0.0192108154296875,
-0.0230255126953125,
-0.003360748291015625,
-0.01442718505859375,
-0.004779815673828125,
0.04571533203125,
0.06719970703125,
0.0044403076171875,
-0.01184844970703125,
-0.022918701171875,
-0.003406524658203125,
0.027618408203125,
-0.037261962890625,
-0.01262664794921875,
-0.0185546875,
-0.007541656494140625,
-0.01238250732421875,
-0.0161285400390625,
0.033843994140625,
0.00482940673828125,
0.048370361328125,
0.006511688232421875,
0.0531005859375,
-0.0033168792724609375,
-0.0237579345703125,
0.05560302734375,
0.01525115966796875,
-0.04266357421875,
-0.025421142578125,
-0.0120391845703125,
0.032958984375,
-0.049957275390625,
-0.016998291015625,
0.045806884765625,
0.01262664794921875,
-0.0188140869140625,
0.006420135498046875,
0.00795745849609375,
0.0021190643310546875,
0.0141143798828125,
-0.0076141357421875,
-0.01529693603515625,
-0.047515869140625,
-0.0203704833984375,
0.01331329345703125,
0.0081634521484375,
0.01678466796875,
-0.04022216796875,
0.012542724609375,
-0.0137176513671875,
-0.09808349609375,
-0.1142578125,
-0.03753662109375,
-0.0350341796875,
-0.020355224609375,
0.0218963623046875,
-0.0092315673828125,
0.0276641845703125,
0.00986480712890625,
0.00027632713317871094,
-0.0107574462890625,
-0.03753662109375,
-0.08758544921875,
-0.081787109375,
-0.0833740234375,
0.0251617431640625,
-0.00693511962890625,
0.010650634765625,
0.001617431640625,
-0.0209503173828125,
-0.0038013458251953125,
-0.031402587890625,
0.0005192756652832031,
0.03485107421875,
0.00785064697265625,
-0.0287628173828125,
-0.05816650390625,
0.020782470703125,
-0.02679443359375,
-0.01284027099609375,
0.10223388671875,
0.00696563720703125,
-0.0212249755859375,
0.038177490234375,
0.019866943359375,
-0.0183868408203125,
0.04534912109375,
-0.0215911865234375,
-0.0230712890625,
0.003154754638671875,
0.033447265625,
-0.04278564453125,
-0.034271240234375,
0.0188751220703125,
-0.038330078125,
0.0501708984375,
0.0116729736328125,
-0.027130126953125,
0.0257720947265625,
0.0229339599609375,
-0.012298583984375,
-0.029571533203125,
0.04339599609375,
-0.0322265625,
0.019317626953125,
-0.00913238525390625,
-0.0148773193359375,
-0.0293121337890625,
0.03033447265625,
-0.0262603759765625,
-0.05621337890625,
-0.0173492431640625,
0.0009169578552246094,
-0.0019235610961914062,
0.0003695487976074219,
0.006237030029296875,
-0.03192138671875,
0.0307159423828125,
-0.003246307373046875,
0.037261962890625,
-0.0260467529296875,
-0.0240631103515625,
-0.01184844970703125,
0.0758056640625,
0.02679443359375,
-0.020050048828125,
0.0094757080078125,
0.016326904296875,
-0.03729248046875,
-0.0291900634765625,
-0.0249481201171875,
0.00685882568359375,
-0.031463623046875,
0.01523590087890625,
-0.01230621337890625,
-0.0036525726318359375,
-0.037445068359375,
-0.0251922607421875,
-0.020660400390625,
-0.020782470703125,
-0.000797271728515625,
-0.06317138671875,
0.01374053955078125,
0.028411865234375,
0.006725311279296875,
-0.00377655029296875,
0.0210723876953125,
-0.08380126953125,
-0.022308349609375,
-0.0015459060668945312,
0.01238250732421875,
-0.0024204254150390625,
-0.004058837890625,
-0.010406494140625,
0.00347900390625,
0.0189361572265625,
0.0094146728515625,
-0.027984619140625,
0.0242156982421875,
-0.0129241943359375,
0.021331787109375,
0.0386962890625,
0.01512908935546875,
-0.0049896240234375,
-0.006618499755859375,
-0.026885986328125,
-0.05364990234375,
-0.0252532958984375,
-0.015777587890625,
-0.004802703857421875,
0.044342041015625,
-0.021759033203125,
0.007556915283203125,
0.0101165771484375,
-0.0210113525390625,
0.01381683349609375,
0.0016660690307617188,
-0.035888671875,
0.016754150390625,
-0.0272216796875,
0.061187744140625,
-0.005496978759765625,
-0.0027408599853515625,
0.0080413818359375,
0.07220458984375,
0.00714874267578125,
-0.0187225341796875,
-0.043060302734375,
0.0007967948913574219,
0.039306640625,
0.0185699462890625,
0.0187225341796875,
0.0150146484375,
-0.032958984375,
0.0178375244140625,
0.0144805908203125,
-0.0282135009765625,
0.0533447265625,
-0.0245208740234375,
0.032196044921875,
0.006771087646484375,
-0.057342529296875,
0.01531982421875,
0.022430419921875,
0.0545654296875,
0.016204833984375,
-0.01181793212890625,
0.0364990234375,
-0.0126953125,
-0.0518798828125,
0.00533294677734375,
0.0234375,
-0.068359375,
0.0272674560546875,
-0.034698486328125,
0.004108428955078125,
-0.010650634765625,
-0.0078277587890625,
0.023712158203125,
0.0192108154296875,
0.010528564453125,
-0.0182647705078125,
0.052978515625,
-0.0369873046875,
0.042724609375,
-0.021728515625,
-0.0160064697265625,
-0.026580810546875,
-0.005306243896484375,
0.07354736328125,
0.01519775390625,
-0.03173828125,
0.005191802978515625,
-0.029571533203125,
-0.0096282958984375,
0.00414276123046875,
0.00974273681640625,
0.02069091796875,
-0.004055023193359375,
-0.034637451171875,
-0.006900787353515625,
0.00716400146484375,
-0.0208282470703125,
-0.042388916015625,
-0.011932373046875,
-0.01418304443359375,
-0.00821685791015625,
-0.007122039794921875,
0.0491943359375,
0.0009593963623046875,
0.0266876220703125,
-0.0177001953125,
0.01488494873046875,
0.076171875,
0.017791748046875,
0.040740966796875,
-0.01910400390625,
-0.054443359375,
0.01800537109375,
0.0006666183471679688,
-0.035980224609375,
-0.0272979736328125,
0.0169525146484375,
0.03277587890625,
-0.032867431640625,
-0.01910400390625,
0.022003173828125,
0.0109405517578125,
-0.050140380859375,
0.0223541259765625,
0.01403045654296875,
-0.028350830078125,
-0.0262298583984375,
-0.035552978515625,
-0.00339508056640625,
0.0309906005859375,
-0.01126861572265625,
-0.0103302001953125,
-0.0224761962890625,
0.006366729736328125,
0.01560211181640625,
-0.0187530517578125,
0.0092010498046875,
0.001438140869140625,
-0.0252685546875,
-0.01398468017578125,
-0.0251007080078125,
0.042724609375,
0.015655517578125,
-0.0289306640625,
-0.05426025390625,
0.04815673828125,
-0.0118865966796875,
0.020782470703125,
-0.04327392578125,
-0.0006308555603027344,
-0.031585693359375,
0.00315093994140625,
0.03631591796875,
0.0091400146484375,
-0.07196044921875,
-0.0010957717895507812,
-0.0587158203125,
0.00040793418884277344,
-0.006038665771484375,
-0.0282745361328125,
-0.0188140869140625,
0.0167388916015625,
0.0230560302734375,
0.03509521484375,
-0.00380706787109375,
-0.01192474365234375,
-0.0111236572265625,
0.025360107421875,
0.0111236572265625,
0.057708740234375,
-0.024505615234375,
0.04083251953125,
0.05133056640625,
0.025177001953125,
0.01270294189453125,
0.0195770263671875,
-0.008148193359375,
-0.015777587890625,
-0.018310546875,
-0.00730133056640625,
0.0157623291015625,
-0.018646240234375,
0.032867431640625,
0.0103607177734375,
0.039031982421875,
0.0160064697265625,
-0.0139923095703125,
-0.03790283203125,
-0.025848388671875,
-0.026336669921875,
0.07513427734375,
-0.0068817138671875,
0.027740478515625,
-0.02423095703125,
-0.01312255859375,
0.00391387939453125,
-0.0011835098266601562,
0.0118560791015625,
0.03033447265625,
0.0033512115478515625,
0.01739501953125,
-0.0162353515625,
-0.05096435546875,
0.07147216796875,
0.07366943359375,
-0.0189666748046875,
0.04547119140625,
0.00970458984375,
-0.00222015380859375,
0.0335693359375,
-0.0056915283203125,
-0.0265655517578125,
-0.01496124267578125,
0.04156494140625,
0.01416778564453125,
-0.015838623046875,
0.039306640625,
-0.01885986328125,
0.012359619140625,
0.06866455078125,
0.06817626953125,
-0.08917236328125,
0.0020465850830078125,
0.037353515625,
0.004543304443359375,
0.004150390625,
-0.023040771484375,
0.01078033447265625,
-0.0018062591552734375,
0.0577392578125,
0.0006442070007324219,
-0.0167694091796875,
0.02960205078125,
-0.01369476318359375,
0.0168609619140625,
-0.0228271484375,
0.111328125,
0.0157623291015625,
-0.0787353515625,
-0.002895355224609375,
0.0555419921875,
-0.042755126953125,
-0.01027679443359375,
0.0343017578125,
0.012176513671875,
-0.003055572509765625,
-0.009918212890625,
0.046112060546875,
-0.00815582275390625,
-0.004459381103515625,
-0.044891357421875,
0.0283966064453125,
0.058380126953125,
0.03021240234375,
0.01369476318359375,
-0.054290771484375,
0.02618408203125,
0.00873565673828125,
0.06060791015625,
0.00940704345703125,
0.00307464599609375,
0.0297393798828125,
-0.006908416748046875,
-0.005199432373046875,
-0.00799560546875,
0.004329681396484375,
0.0015325546264648438,
-0.007518768310546875,
0.0599365234375,
-0.02276611328125,
-0.01332855224609375,
0.0251312255859375,
-0.0238037109375,
-0.006195068359375,
-0.0243377685546875,
0.02288818359375,
-0.058135986328125,
-0.01470947265625,
-0.003688812255859375,
-0.025848388671875,
-0.01020050048828125,
-0.042999267578125,
-0.0667724609375,
0.07598876953125,
0.0262908935546875,
0.07110595703125,
-0.0022716522216796875,
0.01110076904296875,
0.0017576217651367188,
0.0127716064453125,
-0.0161590576171875,
0.0030879974365234375,
0.0308685302734375,
0.01197052001953125,
-0.025543212890625,
-0.00634002685546875,
-0.003978729248046875,
0.036468505859375,
0.0318603515625,
0.00466156005859375,
0.002864837646484375,
0.006404876708984375,
0.028045654296875,
0.02880859375,
-0.0149078369140625,
0.010833740234375,
-0.0011157989501953125,
0.035980224609375,
0.09796142578125,
-0.04815673828125,
0.054595947265625,
-0.0307769775390625,
0.03424072265625,
0.00455474853515625,
0.02130126953125,
0.0258636474609375,
-0.003688812255859375,
-0.038604736328125,
-0.0086212158203125,
0.00643157958984375,
0.017120361328125,
-0.02142333984375,
0.024444580078125,
0.0243682861328125,
0.018096923828125,
0.004940032958984375,
0.0285186767578125,
-0.030303955078125,
0.0482177734375,
-0.026458740234375,
0.03228759765625,
0.050079345703125,
0.030181884765625,
0.042572021484375,
0.0282440185546875,
0.034027099609375,
0.013580322265625,
0.00830841064453125,
0.047698974609375,
0.024627685546875,
0.0081024169921875,
-0.05657958984375,
-0.0159759521484375,
0.029571533203125,
0.053619384765625,
-0.037078857421875,
-0.0455322265625,
-0.0080108642578125,
-0.0038242340087890625,
0.018707275390625,
-0.0023097991943359375,
0.018035888671875,
-0.0106658935546875,
0.0229034423828125,
-0.056671142578125,
0.0012617111206054688,
0.04339599609375,
0.0440673828125,
-0.0024013519287109375,
0.006351470947265625,
-0.05645751953125,
-0.031585693359375,
-0.0123748779296875,
-0.027435302734375,
0.01183319091796875,
0.0439453125,
0.0176239013671875,
0.0169525146484375,
-0.0179595947265625,
-0.00685882568359375,
-0.01312255859375,
0.0235595703125,
-0.007648468017578125,
0.0107879638671875,
-0.011627197265625,
-0.0302734375,
0.01947021484375,
0.0247039794921875,
0.0216217041015625,
0.007965087890625,
0.034912109375,
0.02142333984375,
-0.02716064453125,
-0.005504608154296875,
0.0498046875,
-0.023529052734375,
0.02239990234375,
-0.051727294921875,
-0.0027523040771484375,
-0.005329132080078125,
-0.024078369140625,
0.007659912109375,
-0.0207061767578125,
0.023468017578125,
-0.005359649658203125,
0.037322998046875,
0.01458740234375,
0.0128326416015625,
-0.006694793701171875,
0.01334381103515625,
-0.01568603515625,
0.0311126708984375,
-0.06915283203125,
-0.0305938720703125,
0.006927490234375,
-0.003936767578125,
0.002567291259765625,
0.0198211669921875,
-0.01071929931640625,
0.0263824462890625,
0.03765869140625,
-0.04913330078125,
0.038299560546875,
0.038818359375,
-0.0090179443359375,
-0.0079803466796875,
0.0289154052734375,
-0.0201568603515625,
-0.00885009765625,
-0.00555419921875,
0.018310546875,
0.017059326171875,
-0.020294189453125,
0.09490966796875,
-0.03680419921875,
-0.0169525146484375,
-0.017059326171875,
0.03070068359375,
-0.0535888671875,
-0.0289306640625,
0.005779266357421875,
-0.024871826171875,
0.00804901123046875,
0.00545501708984375,
-0.038909912109375,
0.034210205078125,
0.0001513957977294922,
-0.00580596923828125,
0.05828857421875,
-0.081787109375,
0.0004944801330566406,
-0.006008148193359375,
0.016387939453125,
-0.03887939453125,
-0.07891845703125,
-0.0275726318359375,
0.034027099609375,
-0.01617431640625,
0.03570556640625,
-0.004108428955078125,
0.04742431640625,
-0.035675048828125,
-0.0152587890625,
-0.0069732666015625,
-0.0584716796875,
-0.0127105712890625,
0.0232391357421875,
-0.0216064453125,
-0.015472412109375,
-0.026824951171875,
-0.017059326171875,
0.01549530029296875,
-0.01154327392578125,
0.019012451171875,
0.0134429931640625,
0.0172576904296875,
-0.0198974609375,
-0.00333404541015625,
0.018280029296875,
-0.0084381103515625,
-0.0148162841796875,
0.016357421875,
-0.00629425048828125,
-0.017181396484375,
-0.0095977783203125,
-0.0175323486328125,
-0.041351318359375,
-0.005664825439453125,
0.005611419677734375,
-0.005344390869140625,
0.0089263916015625,
0.046142578125,
0.003726959228515625,
-0.01788330078125,
-0.043548583984375,
0.0170135498046875,
-0.0172271728515625,
-0.033447265625,
0.040924072265625,
-0.0440673828125,
0.04669189453125,
0.01611328125,
0.03594970703125,
-0.04180908203125,
-0.007110595703125,
0.0108184814453125,
0.0239715576171875,
0.0209503173828125,
0.03985595703125,
0.06817626953125,
-0.036041259765625,
-0.08721923828125,
0.008331298828125,
0.012603759765625,
0.050262451171875,
0.0011758804321289062,
-0.0302734375,
0.02593994140625,
-0.0038909912109375,
-0.0217437744140625,
-0.050140380859375,
-0.005550384521484375,
-0.037506103515625,
0.01617431640625,
-0.022216796875,
0.02886962890625,
0.037567138671875,
-0.0278167724609375,
-0.0958251953125,
0.0655517578125,
-0.03369140625,
-0.0343017578125,
-0.0146942138671875,
-0.031036376953125,
-0.007080078125,
0.0243377685546875,
-0.0193023681640625,
0.01226806640625,
-0.0361328125,
0.032470703125,
0.02886962890625,
0.060791015625,
-0.00688934326171875,
0.03924560546875,
-0.0207672119140625,
0.050628662109375,
0.0228424072265625,
0.04608154296875,
-0.006244659423828125,
0.0013818740844726562,
0.01091766357421875,
0.0248870849609375,
-0.0240631103515625,
-0.002033233642578125,
0.007434844970703125,
0.01141357421875,
-0.005283355712890625,
-0.0213470458984375,
-0.0171661376953125,
0.0004372596740722656,
0.0439453125,
0.050048828125,
0.000530242919921875,
-0.035919189453125,
-0.0589599609375,
-0.00383758544921875,
-0.00848388671875,
-0.013153076171875,
0.0170745849609375,
-0.055450439453125,
0.0017614364624023438,
-0.0189361572265625,
0.036163330078125,
-0.00963592529296875,
-0.030426025390625,
-0.0027751922607421875,
-0.03680419921875,
0.0025920867919921875,
0.01502227783203125,
-0.0139923095703125,
-0.007167816162109375,
0.0736083984375,
-0.0438232421875,
0.00008779764175415039,
-0.002933502197265625,
0.036529541015625,
0.0285186767578125,
-0.032684326171875,
0.048248291015625,
0.030670166015625,
-0.03350830078125,
-0.006748199462890625,
0.0197906494140625,
0.0290985107421875,
-0.0106201171875,
-0.04705810546875,
0.00441741943359375,
0.0278472900390625,
-0.00495147705078125,
0.0128173828125,
-0.0144500732421875,
0.048126220703125,
-0.0024700164794921875,
0.02606201171875,
-0.00142669677734375,
0.021697998046875,
0.0031337738037109375,
0.0175933837890625,
-0.0121002197265625,
-0.00612640380859375,
0.007671356201171875,
-0.030029296875,
0.0006470680236816406,
0.0173187255859375,
0.0009093284606933594,
-0.02508544921875,
0.0006856918334960938,
-0.049407958984375,
0.0199432373046875,
0.0050201416015625
]
|
59b84c2eff8f9d20b312f798aec935cdc8ca874e | Wordpress Stackexchange
Q: How can I speed up my WP admin section? We have many WP sites with a proxy in between the servers that they sit on and the internet.
Some things in WP simply don't work:
*
*RSS feeds on dashboard
*looking up themes
*looking up plugins
*core updates
We do everything manually and there are really no issues except for SLOWNESS on page loads. It seems that almost everything in admin take 4-5 seconds to process except for adding media - which is surprisingly fast.
What are some initial things I can check or do to speed up the back-end? (the front-end flies)
A: I recommend installing this https://github.com/johnbillion/query-monitor and looking at the following: Memory usage, HTTP requests, AJAX and slow queries.
It could be your revisions, a plugin's AJAX, a bad query, etc.
You will be able to see if you need to add more RAM to your server which usually solves a lot of slow loading admin issues, especially if you have multiple editors in the admin.
But besides some tricks here and there there is no all in one solution, you need to check out how themes are plugins are interacting with the admin.
| Q: How can I speed up my WP admin section? We have many WP sites with a proxy in between the servers that they sit on and the internet.
Some things in WP simply don't work:
*
*RSS feeds on dashboard
*looking up themes
*looking up plugins
*core updates
We do everything manually and there are really no issues except for SLOWNESS on page loads. It seems that almost everything in admin take 4-5 seconds to process except for adding media - which is surprisingly fast.
What are some initial things I can check or do to speed up the back-end? (the front-end flies)
A: I recommend installing this https://github.com/johnbillion/query-monitor and looking at the following: Memory usage, HTTP requests, AJAX and slow queries.
It could be your revisions, a plugin's AJAX, a bad query, etc.
You will be able to see if you need to add more RAM to your server which usually solves a lot of slow loading admin issues, especially if you have multiple editors in the admin.
But besides some tricks here and there there is no all in one solution, you need to check out how themes are plugins are interacting with the admin.
A: Along with some of the well suggested answers above you could limit or disable wordpress "heartbeat" which can dramatically slow down your admin if you have a lot of screens open or many users using at once. Several hosts like WP-Engine actually have a variation of this setup automatically.
function optimize_heartbeat_settings( $settings ) {
$settings['autostart'] = false;
$settings['interval'] = 60;
return $settings;
}
add_filter( 'heartbeat_settings', 'optimize_heartbeat_settings' );
function disable_heartbeat_unless_post_edit_screen() {
global $pagenow;
if ( $pagenow != 'post.php' && $pagenow != 'post-new.php' )
wp_deregister_script('heartbeat');
}
add_action( 'init', 'disable_heartbeat_unless_post_edit_screen', 1 );
One other thing you might try is tinkering with some of the wp-config.php constants. Turning off post revisions would without question help, but if you don't want to do do that you could at least limit the revisions.
define('WP_POST_REVISIONS', 5);
Two others constants I usually change to keep things optimized is the empty trash and autosave ones.
define('AUTOSAVE_INTERVAL', 600);
define( 'EMPTY_TRASH_DAYS', 3 );
A: jQuery / JavaScript in the footer
One thing you can do is to move jQuery to the footer blog post. It's per default not needed in the header. You will have check if everything still works tough, as I normally just do that for themes:
<?php
/* Plugin Name: Move jQuery to the footer */
function( 'admin_enqueue_scripts', function( $hook )
{
$GLOBALS['wp_scripts']->add_data( 'jquery', 'group', 1 );
} );
Queries
Another thing that speeds up the post list table screens is to reduce the number of queried fields. I noticed that problem a while ago when those screens were getting loaded too slow due to my 999 posts settings. Full blog post here - Plugin as GitHub Gist.
<?php
/**
* Plugin Name: (WCM) Faster Admin Post Lists
* AuthorURL: http://unserkaiser.com
* License: MIT
*/
add_filter( 'posts_fields', 'wcm_limit_post_fields_cb', 0, 2 );
function wcm_limit_post_fields_cb( $fields, $query )
{
if (
! is_admin()
OR ! $query->is_main_query()
OR ( defined( 'DOING_AJAX' ) AND DOING_AJAX )
OR ( defined( 'DOING_CRON' ) AND DOING_CRON )
)
return $fields;
$p = $GLOBALS['wpdb']->posts;
return implode( ",", array(
"{$p}.ID",
"{$p}.post_date",
"{$p}.post_name",
"{$p}.post_title",
"{$p}.ping_status",
"{$p}.post_author",
"{$p}.post_password",
"{$p}.comment_status",
) );
}
If you don't need all columns, you could extend above plugin with removing the contents of some columns as well.
add_filter( 'manage_edit-post_columns', function( $columns )
{
# @TODO Remove columns which you don't need
return $defaults;
} );
Dashboard
Every user enters at the dashboard - which is probably the slowest part in the admin UI. You could deactivate some widgets that you don't need, instead of just hiding them:
<?php
/** Plugin Name: Remove Dashboard Widgets */
add_action( 'wp_dashboard_setup', function()
{
remove_meta_box( 'dashboard_plugins', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_primary', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_primary', 'dashboard', 'side' );
remove_meta_box( 'dashboard_activity', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_right_now', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_secondary', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_quick_press', 'dashboard', 'side' );
remove_meta_box( 'dashboard_browser_nag', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_recent_drafts', 'dashboard', 'side' );
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_incoming_links', 'dashboard', 'normal' );
remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
} );
Outgoing data
I can just recommend using Snitch by Sergej Müller to monitor what data tries to leave your installation. The plugin allows to suppress all or just specific connections as well as pin point specific internal connections that target tasks like unwanted cron jobs and similar things. You can look at its source for examples if you don't want the full package. Sergej normally writes very readable code with a generous white space usage.
| wordpress | {
"language": "en",
"length": 761,
"provenance": "stackexchange_00019.jsonl.gz:450026",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166727"
} | [
0.0266571044921875,
0.0088348388671875,
0.00032806396484375,
-0.0024127960205078125,
-0.0021915435791015625,
-0.0243988037109375,
0.0121612548828125,
-0.062286376953125,
-0.0020809173583984375,
0.0264434814453125,
0.0235443115234375,
-0.000865936279296875,
-0.0114898681640625,
-0.0262298583984375,
-0.017974853515625,
-0.0241546630859375,
0.043548583984375,
-0.00130462646484375,
0.0239410400390625,
-7.748603820800781e-7,
-0.0036144256591796875,
0.033843994140625,
0.00980377197265625,
0.052642822265625,
0.0090484619140625,
-0.027618408203125,
0.058197021484375,
0.005657196044921875,
0.0080413818359375,
0.001293182373046875,
0.0199432373046875,
-0.01715087890625,
-0.01003265380859375,
0.0031280517578125,
0.047607421875,
-0.0212554931640625,
-0.0004515647888183594,
0.01116943359375,
0.0306243896484375,
-0.01904296875,
0.030670166015625,
-0.0244598388671875,
0.043548583984375,
0.049835205078125,
0.0038089752197265625,
-0.035430908203125,
0.03314208984375,
-0.068603515625,
0.035186767578125,
-0.05712890625,
0.00849151611328125,
0.0090789794921875,
0.027374267578125,
-0.045257568359375,
-0.0145416259765625,
0.0177001953125,
0.0130767822265625,
0.0276641845703125,
0.052032470703125,
-0.0584716796875,
-0.07733154296875,
-0.02142333984375,
0.0259552001953125,
-0.020416259765625,
-0.0200042724609375,
-0.0191192626953125,
0.043304443359375,
0.0127105712890625,
-0.00917816162109375,
-0.0197601318359375,
0.024078369140625,
0.01148223876953125,
0.0018262863159179688,
0.01519775390625,
0.0318603515625,
-0.0413818359375,
-0.007328033447265625,
-0.006984710693359375,
0.0259246826171875,
0.043701171875,
-0.030792236328125,
-0.0227203369140625,
-0.00830078125,
-0.0236053466796875,
0.0176544189453125,
0.0023136138916015625,
-0.0157012939453125,
0.0031375885009765625,
-0.01715087890625,
-0.032470703125,
-0.0246429443359375,
-0.07476806640625,
-0.025299072265625,
0.009979248046875,
0.002605438232421875,
-0.04296875,
0.0214080810546875,
0.00716400146484375,
0.039154052734375,
0.02081298828125,
-0.00597381591796875,
-0.04833984375,
0.0183258056640625,
-0.0152435302734375,
0.0175933837890625,
-0.01355743408203125,
-0.020111083984375,
0.0007357597351074219,
0.06689453125,
0.039703369140625,
-0.0091705322265625,
0.0731201171875,
-0.00940704345703125,
-0.01288604736328125,
-0.039764404296875,
0.0178375244140625,
-0.005397796630859375,
-0.014984130859375,
-0.0028972625732421875,
-0.00634765625,
-0.0200958251953125,
0.00498199462890625,
-0.0295867919921875,
0.029998779296875,
-0.0094146728515625,
-0.00033926963806152344,
0.004505157470703125,
-0.0008330345153808594,
-0.001285552978515625,
0.013824462890625,
-0.0218353271484375,
0.00274658203125,
0.035980224609375,
0.0347900390625,
0.015228271484375,
-0.02044677734375,
0.03424072265625,
-0.007843017578125,
-0.005084991455078125,
0.01552581787109375,
0.035400390625,
-0.026611328125,
-0.02227783203125,
0.0078887939453125,
0.03948974609375,
0.01027679443359375,
0.002063751220703125,
0.0083160400390625,
0.0220184326171875,
-0.00911712646484375,
0.0305938720703125,
-0.0321044921875,
0.03216552734375,
0.009033203125,
0.019317626953125,
-0.0034160614013671875,
0.07049560546875,
-0.0187835693359375,
-0.0305938720703125,
-0.0282745361328125,
-0.0002770423889160156,
0.006763458251953125,
0.058197021484375,
-0.004608154296875,
-0.0009613037109375,
-0.00461578369140625,
-0.058441162109375,
-0.006786346435546875,
0.02166748046875,
-0.048309326171875,
0.045745849609375,
-0.015960693359375,
0.02337646484375,
0.0005621910095214844,
0.004150390625,
0.01323699951171875,
0.006633758544921875,
0.0006427764892578125,
0.0203857421875,
-0.0012054443359375,
-0.0232391357421875,
-0.027679443359375,
0.038421630859375,
-0.01435089111328125,
-0.028594970703125,
0.0235137939453125,
0.00408935546875,
0.056121826171875,
0.01308441162109375,
0.040283203125,
-0.005435943603515625,
0.0026721954345703125,
-0.0016546249389648438,
0.038482666015625,
-0.00490570068359375,
-0.037200927734375,
-0.034393310546875,
0.0129852294921875,
-0.029693603515625,
-0.0246429443359375,
0.00872802734375,
0.0069427490234375,
-0.027008056640625,
-0.021331787109375,
-0.049896240234375,
-0.036865234375,
-0.0028896331787109375,
0.031341552734375,
0.050811767578125,
0.03851318359375,
-0.0104217529296875,
0.015411376953125,
-0.0107269287109375,
-0.04937744140625,
-0.032806396484375,
-0.005321502685546875,
-0.01337432861328125,
0.03240966796875,
0.0126953125,
0.00664520263671875,
0.034393310546875,
-0.01192474365234375,
0.037353515625,
0.0287628173828125,
0.01161956787109375,
0.0450439453125,
-0.023681640625,
0.0274658203125,
0.02001953125,
0.022064208984375,
0.0144500732421875,
0.00991058349609375,
0.07476806640625,
0.0836181640625,
-0.0018606185913085938,
-0.0167236328125,
-0.01461029052734375,
-0.08184814453125,
-0.0033359527587890625,
0.052764892578125,
0.0526123046875,
0.01995849609375,
0.01482391357421875,
-0.00970458984375,
0.012847900390625,
-0.076904296875,
0.0149993896484375,
-0.0180816650390625,
0.0187530517578125,
0.0189971923828125,
-0.05377197265625,
-0.031494140625,
0.054595947265625,
-0.04315185546875,
0.0105133056640625,
0.0494384765625,
0.0288543701171875,
0.011932373046875,
-0.021453857421875,
0.0015363693237304688,
0.020111083984375,
0.020050048828125,
-0.051361083984375,
0.0196990966796875,
0.01270294189453125,
0.0218963623046875,
0.0245819091796875,
0.01294708251953125,
-0.033050537109375,
0.020263671875,
0.033111572265625,
-0.015594482421875,
0.001834869384765625,
-0.03369140625,
0.00620269775390625,
-0.0092315673828125,
-0.046417236328125,
0.030426025390625,
0.047943115234375,
-0.0285491943359375,
0.002593994140625,
0.052001953125,
0.00981903076171875,
-0.0072021484375,
-0.01523590087890625,
-0.0174560546875,
0.01561737060546875,
0.0259246826171875,
0.0214996337890625,
-0.005123138427734375,
0.02294921875,
-0.02142333984375,
-0.05926513671875,
0.0533447265625,
0.0026721954345703125,
-0.045623779296875,
0.053009033203125,
-0.0357666015625,
0.024078369140625,
0.004344940185546875,
0.115478515625,
0.06439208984375,
-0.00557708740234375,
0.0063323974609375,
0.0064697265625,
-0.019012451171875,
0.0168609619140625,
0.01155853271484375,
-0.003108978271484375,
0.014434814453125,
-0.0714111328125,
0.01381683349609375,
0.02398681640625,
0.05401611328125,
-0.006649017333984375,
-0.03826904296875,
-0.018951416015625,
0.027587890625,
-0.0897216796875,
-0.09490966796875,
-0.09222412109375,
-0.0712890625,
-0.038116455078125,
0.014373779296875,
-0.027374267578125,
0.04718017578125,
0.02691650390625,
0.02191162109375,
0.01251983642578125,
-0.0426025390625,
-0.0462646484375,
-0.04974365234375,
-0.060699462890625,
-0.039154052734375,
-0.001628875732421875,
-0.005123138427734375,
0.0157318115234375,
0.0679931640625,
0.009033203125,
-0.06640625,
-0.0088043212890625,
-0.0188140869140625,
-0.0235137939453125,
0.010986328125,
0.035888671875,
-0.0491943359375,
0.01071929931640625,
-0.0027980804443359375,
-0.00873565673828125,
0.0211334228515625,
-0.01279449462890625,
-0.0157470703125,
-0.00579833984375,
-0.01343536376953125,
0.008880615234375,
0.01076507568359375,
-0.004726409912109375,
-0.01117706298828125,
-0.001800537109375,
-0.05377197265625,
0.00478363037109375,
0.0027904510498046875,
-0.02142333984375,
-0.0240936279296875,
-0.00554656982421875,
-0.03070068359375,
0.0201568603515625,
-0.03594970703125,
0.032440185546875,
0.0152587890625,
-0.01438140869140625,
-0.007354736328125,
0.004070281982421875,
0.0179290771484375,
0.04498291015625,
0.00617218017578125,
-0.01068878173828125,
-0.05072021484375,
0.02105712890625,
-0.0124053955078125,
-0.03704833984375,
-0.02069091796875,
0.014251708984375,
0.0166015625,
-0.043731689453125,
0.043731689453125,
-0.01348876953125,
0.054718017578125,
-0.060089111328125,
-0.03875732421875,
-0.03759765625,
0.10247802734375,
-0.038848876953125,
-0.0037899017333984375,
-0.00563812255859375,
0.040618896484375,
-0.053009033203125,
-0.0731201171875,
-0.0241241455078125,
-0.00856781005859375,
-0.055633544921875,
0.0013895034790039062,
-0.01397705078125,
-0.035888671875,
-0.03497314453125,
0.0090789794921875,
-0.042388916015625,
-0.0318603515625,
0.018402099609375,
-0.061370849609375,
-0.006801605224609375,
-0.00438690185546875,
-0.0030460357666015625,
-0.041168212890625,
0.0122222900390625,
-0.044525146484375,
-0.081298828125,
-0.0221099853515625,
-0.018524169921875,
0.0777587890625,
0.02349853515625,
-0.03863525390625,
-0.01861572265625,
0.0260772705078125,
-0.01348876953125,
0.005657196044921875,
-0.0197906494140625,
0.0098724365234375,
-0.0186004638671875,
-0.00923919677734375,
-0.018768310546875,
-0.00930023193359375,
-0.0133819580078125,
-0.01055908203125,
0.002452850341796875,
0.0015687942504882812,
-0.0269775390625,
-0.0274200439453125,
-0.00885772705078125,
-0.013153076171875,
-0.0269622802734375,
-0.040740966796875,
-0.07470703125,
-0.006214141845703125,
-0.052947998046875,
0.01513671875,
-0.0438232421875,
-0.044342041015625,
0.04364013671875,
-0.01154327392578125,
0.00969696044921875,
-0.005252838134765625,
0.07647705078125,
0.01366424560546875,
-0.020904541015625,
-0.00681304931640625,
-0.0190887451171875,
0.01033782958984375,
-0.01447296142578125,
0.055511474609375,
-0.006366729736328125,
-0.0037860870361328125,
0.052001953125,
-0.023223876953125,
-0.008148193359375,
0.0145721435546875,
0.0269775390625,
0.01409149169921875,
-0.01436614990234375,
0.006717681884765625,
0.0178680419921875,
-0.0195770263671875,
0.024810791015625,
-0.006999969482421875,
-0.03924560546875,
-0.0216827392578125,
0.0672607421875,
0.0089111328125,
-0.0017194747924804688,
-0.07373046875,
-0.037750244140625,
0.0113067626953125,
-0.05108642578125,
0.01544189453125,
0.00567626953125,
-0.00475311279296875,
0.0279541015625,
0.0452880859375,
-0.0153045654296875,
0.00197601318359375,
-0.01025390625,
-0.01459503173828125,
-0.0007634162902832031,
0.031829833984375,
-0.021697998046875,
0.005405426025390625,
-0.0160675048828125,
0.05499267578125,
0.00098419189453125,
-0.054229736328125,
-0.0035572052001953125,
0.00530242919921875,
0.017730712890625,
0.03546142578125,
-0.0262451171875,
0.0210113525390625,
0.0196533203125,
-0.0107574462890625,
0.004688262939453125,
-0.0189666748046875,
-0.0294036865234375,
-0.0399169921875,
0.007537841796875,
-0.0064849853515625,
-0.0032444000244140625,
0.039886474609375,
0.0250396728515625,
-0.03662109375,
0.0236053466796875,
-0.00894927978515625,
0.060516357421875,
0.02935791015625,
0.0134735107421875,
0.0024318695068359375,
0.0261077880859375,
0.034637451171875,
-0.04620361328125,
0.0135955810546875,
-0.0161895751953125,
-0.0019521713256835938,
-0.006725311279296875,
0.0172882080078125,
0.026641845703125,
0.011474609375,
0.0096282958984375,
-0.0147247314453125,
-0.02630615234375,
0.058013916015625,
-0.00006157159805297852,
-0.034088134765625,
-0.0621337890625,
-0.0248260498046875,
0.06756591796875,
0.0029697418212890625,
-0.025299072265625,
0.046966552734375,
-0.0390625,
0.041259765625,
0.00981903076171875,
0.00933074951171875,
-0.0162506103515625,
-0.03021240234375,
0.012664794921875,
-0.0290069580078125,
-0.032745361328125,
-0.0083770751953125,
-0.0038299560546875,
0.007259368896484375,
0.00768280029296875,
0.0237274169921875,
-0.0005350112915039062,
-0.03155517578125,
-0.0212554931640625,
0.038482666015625,
-0.045440673828125,
0.01617431640625,
-0.02252197265625,
-0.04931640625,
-0.034210205078125,
-0.02545166015625,
-0.0657958984375,
-0.035552978515625,
-0.1134033203125,
-0.026641845703125,
-0.056640625,
0.039093017578125,
-0.009552001953125,
-0.0214691162109375,
-0.00518035888671875,
0.0008025169372558594,
-0.0019397735595703125,
0.0377197265625,
0.019744873046875,
-0.03631591796875,
-0.0024776458740234375,
0.028045654296875,
-0.0240478515625,
0.01849365234375,
-0.007747650146484375,
0.007633209228515625,
0.0063934326171875,
-0.0169219970703125,
0.0251922607421875,
0.007717132568359375,
-0.04949951171875,
-0.040435791015625,
-0.03533935546875,
-0.0080108642578125,
0.057952880859375,
-0.0265960693359375,
0.0265960693359375,
-0.0259857177734375,
0.0112457275390625,
-0.0178070068359375,
0.03936767578125,
-0.04302978515625,
0.033050537109375,
-0.00609588623046875,
-0.0173187255859375,
0.0009121894836425781,
0.0010089874267578125,
-0.0777587890625,
0.049041748046875,
0.028533935546875,
0.0255584716796875,
0.0113525390625,
-0.0151519775390625,
0.01605224609375,
0.06439208984375,
0.020660400390625,
0.048614501953125,
0.01251983642578125,
0.02984619140625,
0.024017333984375,
-0.0048065185546875,
0.01447296142578125,
-0.0141143798828125,
0.05438232421875,
-0.005157470703125,
-0.0228729248046875,
0.024688720703125,
-0.042388916015625,
0.00750732421875,
0.049560546875,
0.047607421875,
-0.06451416015625,
0.005352020263671875,
-0.007694244384765625,
-0.024688720703125,
0.01287078857421875,
-0.040191650390625,
-0.005390167236328125,
-0.058441162109375,
0.0645751953125,
0.01303863525390625,
-0.0203704833984375,
0.003963470458984375,
-0.034820556640625,
-0.0015621185302734375,
-0.01197052001953125,
0.041900634765625,
0.014068603515625,
-0.01248931884765625,
-0.00437164306640625,
0.009490966796875,
0.0012998580932617188,
-0.0177001953125,
0.035369873046875,
-0.00437164306640625,
-0.0187835693359375,
-0.05816650390625,
-0.00455474853515625,
0.0178985595703125,
-0.0137786865234375,
0.043487548828125,
0.0206756591796875,
0.018646240234375,
0.0679931640625,
-0.00481414794921875,
0.0215911865234375,
0.0107269287109375,
0.0276641845703125,
-0.006603240966796875,
-0.01403045654296875,
-0.00681304931640625,
-0.0041046142578125,
-0.0240631103515625,
0.00745391845703125,
-0.032012939453125,
-0.01556396484375,
-0.0139617919921875,
-0.0316162109375,
0.0797119140625,
-0.030548095703125,
-0.001354217529296875,
0.041229248046875,
-0.01312255859375,
-0.03350830078125,
-0.0287933349609375,
0.0213775634765625,
-0.003948211669921875,
0.0273284912109375,
-0.0160064697265625,
0.0157470703125,
-0.018707275390625,
-0.028961181640625,
-0.048248291015625,
0.0738525390625,
0.0113067626953125,
0.00592041015625,
0.025665283203125,
0.040283203125,
-0.046295166015625,
0.00994110107421875,
-0.018463134765625,
0.05316162109375,
-0.00769805908203125,
-0.0034637451171875,
-0.0246734619140625,
0.0223846435546875,
-0.01507568359375,
-0.020660400390625,
0.00469970703125,
0.004100799560546875,
-0.0712890625,
-0.01113128662109375,
0.0504150390625,
0.0372314453125,
0.045684814453125,
0.06414794921875,
-0.019195556640625,
0.046539306640625,
0.01517486572265625,
-0.048370361328125,
0.01537322998046875,
0.002223968505859375,
-0.050750732421875,
0.020538330078125,
0.01296234130859375,
0.01020050048828125,
0.033233642578125,
0.03106689453125,
-0.03692626953125,
0.01168060302734375,
0.05877685546875,
-0.04864501953125,
0.0034656524658203125,
0.0026988983154296875,
-0.0033283233642578125,
-0.017669677734375,
0.02276611328125,
-0.02899169921875,
0.0333251953125,
0.00342559814453125,
0.0063323974609375,
-0.0220184326171875,
0.0056610107421875,
0.01169586181640625,
-0.0247650146484375,
-0.006671905517578125,
0.038177490234375,
-0.03564453125,
0.003131866455078125,
-0.01447296142578125,
0.035308837890625,
-0.07061767578125,
-0.08380126953125,
0.0258331298828125,
0.03216552734375,
0.0236053466796875,
-0.05694580078125,
0.0171356201171875,
-0.00736236572265625,
-0.003635406494140625,
0.0200347900390625,
-0.0017938613891601562,
0.0016126632690429688,
0.0152130126953125,
0.00970458984375,
-0.018463134765625,
-0.0008096694946289062,
-0.019561767578125,
0.005290985107421875,
0.041412353515625,
0.04534912109375,
0.01059722900390625,
-0.004428863525390625,
0.0011348724365234375,
0.001201629638671875,
0.002056121826171875,
0.005908966064453125,
0.003200531005859375,
0.0017747879028320312,
0.00835418701171875,
-0.01507568359375,
0.073486328125,
-0.0146484375,
0.00519561767578125,
-0.0282135009765625,
-0.07177734375,
-0.010772705078125,
0.0240020751953125,
-0.02508544921875,
0.006317138671875,
0.0345458984375,
0.0494384765625,
-0.027923583984375,
-0.033172607421875,
0.032135009765625,
-0.0127410888671875,
-0.040252685546875,
-0.05206298828125,
0.0134429931640625,
0.024932861328125,
0.0205841064453125,
0.01227569580078125,
0.0352783203125,
0.016357421875,
-0.0189208984375,
-0.03216552734375,
0.01318359375,
-0.07220458984375,
0.012725830078125,
-0.0122833251953125,
0.0089569091796875,
-0.0048980712890625,
-0.09686279296875,
-0.024688720703125,
0.02142333984375,
-0.044891357421875,
0.0197601318359375,
0.03076171875,
-0.0667724609375,
0.064697265625,
-0.01081085205078125,
-0.017120361328125,
-0.019927978515625,
0.0017995834350585938,
0.0248260498046875,
0.00392913818359375,
-0.00862884521484375,
0.0012073516845703125,
-0.01540374755859375,
-0.010955810546875,
-0.01486968994140625,
0.033905029296875,
0.035552978515625,
0.07183837890625,
-0.02642822265625,
0.01947021484375,
0.00730133056640625,
-0.04937744140625,
0.0443115234375,
0.0294647216796875,
-0.04266357421875,
0.00443267822265625,
-0.00771331787109375,
-0.022186279296875,
-0.055999755859375,
0.01218414306640625,
0.036895751953125,
-0.023345947265625,
0.00562286376953125,
0.01122283935546875,
0.019256591796875,
-0.0189666748046875,
-0.034393310546875,
-0.03924560546875,
-0.05035400390625,
-0.0106201171875,
0.002727508544921875,
-0.0091094970703125,
0.0023670196533203125,
0.012786865234375,
0.0207672119140625,
0.007274627685546875,
-0.0049896240234375,
0.0010547637939453125,
-0.00799560546875,
0.00734710693359375,
0.049774169921875,
-0.0210418701171875,
0.0003235340118408203,
0.0257415771484375,
-0.01861572265625,
0.01971435546875,
0.0165252685546875,
0.037689208984375,
0.02142333984375,
0.0198974609375,
0.0225830078125,
0.03436279296875,
0.0198822021484375,
-0.051910400390625,
0.01059722900390625,
0.03082275390625,
-0.003971099853515625,
0.01544189453125,
-0.004482269287109375,
-0.02752685546875,
-0.04095458984375,
-0.00936126708984375,
0.022369384765625,
-0.0294342041015625,
-0.044891357421875,
-0.0762939453125,
0.01544952392578125,
0.0247802734375,
-0.0080413818359375,
-0.021209716796875,
0.0377197265625,
-0.038330078125,
0.0118255615234375,
-0.00467681884765625,
-0.00968170166015625,
-0.01531982421875,
0.048553466796875,
0.0157012939453125,
-0.039794921875,
-0.050689697265625,
0.032867431640625,
-0.05194091796875,
-0.0007295608520507812,
0.0258636474609375,
-0.01464080810546875,
-0.0157012939453125,
-0.00853729248046875,
-0.004177093505859375,
0.037750244140625,
0.01239013671875,
-0.00438690185546875,
0.0194549560546875,
0.0233306884765625,
-0.022216796875,
-0.07476806640625,
-0.0297698974609375,
0.0216217041015625,
0.034637451171875,
-0.05621337890625,
0.036590576171875,
0.0272674560546875,
-0.0266876220703125,
-0.03839111328125,
0.01226806640625,
-0.01580810546875,
-0.0216827392578125,
-0.07598876953125,
0.0051422119140625,
-0.002105712890625,
-0.037841796875,
-0.039337158203125,
-0.0076751708984375,
-0.03753662109375,
0.05340576171875,
0.035125732421875,
0.013885498046875,
0.04229736328125,
0.03216552734375,
-0.03961181640625,
0.01776123046875,
-0.01013946533203125,
0.01340484619140625,
-0.0085601806640625,
0.03436279296875,
0.0161590576171875,
0.05841064453125,
0.00402069091796875,
0.018646240234375,
-0.011383056640625,
-0.051910400390625,
-0.00006401538848876953,
-0.0207061767578125,
-0.031768798828125,
-0.004528045654296875,
0.048095703125,
0.07373046875,
0.023345947265625,
-0.033355712890625,
0.033233642578125,
0.0146026611328125,
-0.0080108642578125,
-0.00720977783203125,
0.00913238525390625,
-0.057861328125,
-0.034393310546875,
0.029876708984375,
0.0051422119140625,
0.0121612548828125,
-0.0017957687377929688,
-0.0030040740966796875,
-0.00566864013671875,
0.04449462890625,
0.0009369850158691406,
-0.035614013671875,
0.0117950439453125,
0.0406494140625,
-0.0384521484375,
-0.022674560546875,
-0.0014095306396484375,
0.0156097412109375,
-0.006900787353515625,
-0.033782958984375,
0.01088714599609375,
-0.00469207763671875,
-0.0229949951171875,
0.0254364013671875,
0.0070648193359375,
0.0214385986328125,
-0.02532958984375,
-0.0279388427734375,
0.0008130073547363281,
0.0104827880859375,
-0.007099151611328125,
0.01007080078125,
-0.0253143310546875,
0.005245208740234375,
-0.0188751220703125,
0.08477783203125,
-0.00829315185546875,
0.07733154296875,
-0.021270751953125,
0.046905517578125,
-0.00801849365234375,
-0.0194549560546875,
0.036285400390625,
-0.0220184326171875,
0.00039458274841308594,
0.01507568359375,
-0.0160369873046875,
-0.0281219482421875,
-0.00942230224609375,
-0.07379150390625,
0.0013704299926757812,
0.01172637939453125
]
|
661223883d62c3608d2b91b3da77ce8fae86fc8e | Wordpress Stackexchange
Q: Post doesn't show date if there's another post with the same date I have custom post type "press." and made a page template the queries posts of that type. The posts are supposed to show their published date, but if there are more than one posts with the same date, only the first post shows the date and the others don't. Is there a way to show the date of every post?
<?php get_header(); ?>
<?php
$wp_query = new WP_Query();
$wp_query -> query('post_type=press&showposts=100');
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div id="press">
<div class="press-item cf">
<div class="press-img"><a href="<?php the_field('link'); ?>"><?php the_post_thumbnail('medium');?></a> </div>
<div class="press-content">
<div class="press-title"><a href="<?php the_field('link'); ?>"><?php echo get_the_title(); ?></a> </div>
<div class="press-excerpt"><?php the_excerpt(); ?> </div>
<div class="press-date"><?php the_date(); ?></div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>
A: I faced similar issue in past because I modified my date function.
And then posts were displaying date if only each post has different date otherwise it returned blank.
Try adding <?php echo get_the_date(); ?> instead.
| Q: Post doesn't show date if there's another post with the same date I have custom post type "press." and made a page template the queries posts of that type. The posts are supposed to show their published date, but if there are more than one posts with the same date, only the first post shows the date and the others don't. Is there a way to show the date of every post?
<?php get_header(); ?>
<?php
$wp_query = new WP_Query();
$wp_query -> query('post_type=press&showposts=100');
while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div id="press">
<div class="press-item cf">
<div class="press-img"><a href="<?php the_field('link'); ?>"><?php the_post_thumbnail('medium');?></a> </div>
<div class="press-content">
<div class="press-title"><a href="<?php the_field('link'); ?>"><?php echo get_the_title(); ?></a> </div>
<div class="press-excerpt"><?php the_excerpt(); ?> </div>
<div class="press-date"><?php the_date(); ?></div>
</div>
</div>
</div>
<?php endwhile; ?>
<?php get_footer(); ?>
A: I faced similar issue in past because I modified my date function.
And then posts were displaying date if only each post has different date otherwise it returned blank.
Try adding <?php echo get_the_date(); ?> instead.
A: Why does it not show?
When you look at the source of the the_date() function, then you will notice two globals:
global $currentday, $previousday;
And then there's a rule if there's a date to display ... or not. The check is similar to the one done with is_new_day():
if ( $currentday != $previousday ) {
// show date
// Set global
$previousday = $currentday;
}
// else
return null;
As you can see, the $previousday instantly gets set to $currentday;. So it gets echo-ed once. Right after that, both days are the same and the check will fail. That's the reason why your first post displays it, but the others don't show it.
Why does it show?
If you ask yourself why it then shows more than one date, after the global gets euqalized, then you will have to take a look at setup_postdata(). This function gets called by the_post(); and is responsible for setting up everything for a single post in the loop.
if ( have_posts() )
{
while ( have_posts() )
{
the_post(); # <-- Calls setup_postdata( $post );
// your loop stuff here
}
}
The internals of setup_postdata() are quite easy to understand (at least to what the globals get set):
$currentday = mysql2date('d.m.y', $post->post_date, false);
$currentmonth = mysql2date('m', $post->post_date, false);
So the moving part is $previousday against which the $currentday global gets set and checked. And unless there is new day, the_date() won't display anything.
Just set your posts to totally different days and suddenly you will see the date appear on each post.
What's the idea behind that?
Actually the idea is pretty simple and present since v0.7.1 - at least this is what the phpDocBlock states: Why would you like to display the date for each post in an archive? An archive looks like this:
+--------------+
| 28.10.2014 |
+--------------+
| Post Title A |
| Post Title B |
+--------------+
| 29.10.2014 |
+--------------+
| Post Title C |
| Post Title D |
+--------------+
You don't agree with that? Well, then you are simply using a function that was intended to be something totally different.
Why does get_the_date() work and how to use it the right way
It is not affected by the if/else in the the_date() function (the globals check). It also does not have the filter. How to fix that? Simple:
echo apply_filters( 'the_date', get_the_date(), get_option( 'date_format' ), '', '' );
This adds any callbacks attached to the the_date filter to your custom output. It also uses the default date_format option setting as default - which is used by the_date() as well. And it avoids any before and after values - again, exactly as the the_date() function.
A: Don't use the_date(), instead use the_time().
the_date returns the date only, the_time returns the date + the time. I don't know the reason why wordpress won't return more than one date when the_date is used in a loop. But it has to do with the fact that the value is the same. If you use the_time the value is never the same, therefore it always returns the value. So you can print something like <?php the_time('F j, Y'); ?>
This link from the codex, explains how the_date works much better than I do.
A: Brute force it.
<?php the_time('F j, Y'); ?> - <?php the_time(); ?>
Worked for me, displays full date, time for each posts regardless if it is the same date or not.
A: It only shows up once because that's how a diary would work. It would show the date at the top and you would write your entries below it. I use this code the display it the dates for each post using the_time.
<?php the_time(get_option('date_format')); ?>
For more info I wrote a tutorial about it here: Why the_date() Function in WordPress Only Shows Up Once on the First Post
| wordpress | {
"language": "en",
"length": 811,
"provenance": "stackexchange_00019.jsonl.gz:450036",
"question_score": "25",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166751"
} | [
0.0273895263671875,
0.005260467529296875,
-0.035797119140625,
-0.036376953125,
0.021209716796875,
-0.057891845703125,
0.029388427734375,
-0.010833740234375,
0.0004305839538574219,
0.013763427734375,
-0.0202178955078125,
0.006038665771484375,
-0.05499267578125,
-0.034210205078125,
-0.00940704345703125,
-0.060272216796875,
0.04486083984375,
-0.044403076171875,
0.018310546875,
-0.0017023086547851562,
0.00360870361328125,
0.0406494140625,
0.0306396484375,
0.047882080078125,
0.0223388671875,
-0.023223876953125,
0.0894775390625,
-0.0167388916015625,
0.037750244140625,
-0.001880645751953125,
0.0257720947265625,
-0.04974365234375,
0.034149169921875,
0.0149688720703125,
-0.027252197265625,
-0.0005698204040527344,
0.01287841796875,
-0.01128387451171875,
-0.004520416259765625,
0.03375244140625,
0.0025348663330078125,
0.0006151199340820312,
0.01004791259765625,
-0.01142120361328125,
-0.0151519775390625,
-0.01409149169921875,
0.0189208984375,
-0.0168304443359375,
-0.0014209747314453125,
0.01611328125,
-0.00698089599609375,
-0.016448974609375,
-0.0006551742553710938,
0.0309295654296875,
-0.02398681640625,
-0.039703369140625,
0.0010728836059570312,
-0.004085540771484375,
0.025054931640625,
-0.038055419921875,
-0.039886474609375,
-0.0029926300048828125,
0.032867431640625,
0.001010894775390625,
-0.0367431640625,
0.00018489360809326172,
0.021728515625,
-0.0095672607421875,
-0.03363037109375,
-0.057891845703125,
0.026519775390625,
-0.00011873245239257812,
-0.00838470458984375,
-0.02923583984375,
-0.0223236083984375,
0.02191162109375,
-0.0298614501953125,
-0.0367431640625,
0.01416015625,
-0.00632476806640625,
0.00858306884765625,
0.0144195556640625,
-0.076904296875,
0.008331298828125,
0.01296234130859375,
0.02679443359375,
-0.017791748046875,
-0.0234832763671875,
-0.035064697265625,
-0.04425048828125,
-0.0278472900390625,
-0.020599365234375,
-0.040374755859375,
-0.028076171875,
0.004207611083984375,
-0.039703369140625,
0.00955963134765625,
0.07501220703125,
-0.055389404296875,
-0.019744873046875,
-0.055877685546875,
0.030059814453125,
-0.0701904296875,
-0.022186279296875,
0.010772705078125,
0.02978515625,
0.0213775634765625,
0.03143310546875,
0.057769775390625,
0.0099945068359375,
0.0002739429473876953,
0.07373046875,
-0.032745361328125,
-0.04351806640625,
0.005245208740234375,
0.044677734375,
-0.040679931640625,
-0.005428314208984375,
0.01116180419921875,
-0.016143798828125,
0.03955078125,
0.036102294921875,
-0.01358795166015625,
-0.024078369140625,
-0.021148681640625,
-0.019012451171875,
-0.0011615753173828125,
-0.038482666015625,
0.019317626953125,
0.002716064453125,
-0.022552490234375,
-0.01702880859375,
0.002246856689453125,
0.046539306640625,
0.01611328125,
-0.004108428955078125,
0.0306243896484375,
-0.031646728515625,
-0.0166168212890625,
0.01165771484375,
-0.0181884765625,
0.0008001327514648438,
0.01168060302734375,
-0.034576416015625,
-0.052337646484375,
0.003734588623046875,
0.012451171875,
0.01078033447265625,
-0.0109100341796875,
-0.024200439453125,
-0.043701171875,
0.0253143310546875,
0.0286865234375,
0.0023479461669921875,
-0.0180816650390625,
-0.019317626953125,
0.01486968994140625,
-0.0249481201171875,
0.0021495819091796875,
-0.03173828125,
0.07525634765625,
0.00286865234375,
-0.0306549072265625,
0.0130767822265625,
-0.03466796875,
-0.028717041015625,
-0.03765869140625,
-0.01163482666015625,
0.00443267822265625,
-0.0018987655639648438,
-0.018402099609375,
-0.01239013671875,
0.0016660690307617188,
-0.00855255126953125,
-0.022125244140625,
0.0164947509765625,
0.0013742446899414062,
-0.030670166015625,
0.0197296142578125,
-0.0012960433959960938,
-0.06280517578125,
-0.0284881591796875,
-0.00811004638671875,
-0.0330810546875,
-0.04998779296875,
0.041961669921875,
0.00014328956604003906,
0.0191802978515625,
0.0297088623046875,
0.0013418197631835938,
0.0263519287109375,
0.05230712890625,
-0.033905029296875,
0.042327880859375,
0.00531005859375,
-0.00543212890625,
-0.048675537109375,
0.0005106925964355469,
-0.0066375732421875,
-0.02069091796875,
-0.02398681640625,
0.0217742919921875,
-0.034942626953125,
0.0523681640625,
-0.02032470703125,
0.01436614990234375,
-0.001956939697265625,
0.0160980224609375,
-0.0042877197265625,
0.0259857177734375,
0.0264129638671875,
0.0333251953125,
-0.056640625,
-0.0197601318359375,
-0.025390625,
0.0299224853515625,
-0.01471710205078125,
0.015350341796875,
-0.0136871337890625,
0.00830841064453125,
-0.005550384521484375,
-0.027587890625,
-0.0084228515625,
0.03662109375,
0.08282470703125,
-0.01226806640625,
0.0010194778442382812,
-0.024688720703125,
0.069580078125,
0.004150390625,
-0.031280517578125,
0.006381988525390625,
0.0296783447265625,
0.033538818359375,
-0.055633544921875,
-0.0059661865234375,
-0.004695892333984375,
0.0010271072387695312,
0.002582550048828125,
0.043182373046875,
0.022552490234375,
0.0303802490234375,
-0.0208892822265625,
-0.0182952880859375,
0.0226287841796875,
-0.036376953125,
0.02374267578125,
-0.040069580078125,
0.00485992431640625,
0.04522705078125,
0.023895263671875,
0.032135009765625,
0.0082550048828125,
0.0020351409912109375,
0.00846099853515625,
0.038970947265625,
0.0290679931640625,
0.016693115234375,
-0.026031494140625,
0.01314544677734375,
0.0018367767333984375,
-0.03680419921875,
-0.03857421875,
-0.0087890625,
0.0012598037719726562,
0.015655517578125,
0.03076171875,
0.01195526123046875,
-0.004573822021484375,
-0.011993408203125,
0.00794219970703125,
-0.0085296630859375,
0.0246124267578125,
0.0017566680908203125,
-0.06292724609375,
0.03302001953125,
-0.0126800537109375,
0.001110076904296875,
0.01485443115234375,
-0.00959014892578125,
-0.01092529296875,
0.00907135009765625,
-0.0229949951171875,
-0.0194091796875,
-0.005390167236328125,
-0.045745849609375,
-0.00377655029296875,
0.01392364501953125,
0.01064300537109375,
0.01495361328125,
0.03857421875,
0.0193634033203125,
-0.036102294921875,
0.038665771484375,
0.006885528564453125,
-0.0152740478515625,
-0.03094482421875,
-0.05694580078125,
0.0654296875,
-0.066650390625,
0.0176239013671875,
0.0675048828125,
-0.0213165283203125,
0.0268096923828125,
-0.0033416748046875,
-0.03466796875,
0.01320648193359375,
-0.002162933349609375,
-0.0203094482421875,
0.00860595703125,
-0.1009521484375,
-0.0174407958984375,
0.03851318359375,
0.09075927734375,
-0.01247406005859375,
-0.035369873046875,
-0.0090179443359375,
0.04376220703125,
-0.08245849609375,
-0.1007080078125,
-0.0158538818359375,
-0.10101318359375,
-0.00806427001953125,
-0.0081634521484375,
-0.057098388671875,
0.01116180419921875,
0.0306854248046875,
0.01187896728515625,
-0.0252532958984375,
0.003887176513671875,
-0.044097900390625,
-0.04888916015625,
-0.0634765625,
-0.0176239013671875,
0.0011806488037109375,
0.04290771484375,
-0.0018749237060546875,
0.08917236328125,
0.0131072998046875,
-0.06622314453125,
-0.0225372314453125,
0.0274810791015625,
-0.019256591796875,
0.01532745361328125,
0.0097503662109375,
0.0166168212890625,
-0.00443267822265625,
0.0077667236328125,
0.0144195556640625,
0.024444580078125,
-0.032196044921875,
-0.02630615234375,
0.025421142578125,
0.00939178466796875,
0.0262603759765625,
0.066162109375,
-0.00998687744140625,
0.0330810546875,
0.059783935546875,
-0.0284423828125,
-0.00504302978515625,
-0.031341552734375,
-0.050689697265625,
0.033294677734375,
0.064697265625,
0.0010766983032226562,
-0.018402099609375,
0.0002168416976928711,
-0.01259613037109375,
0.003997802734375,
0.0263519287109375,
-0.02752685546875,
0.05572509765625,
-0.006725311279296875,
0.0057525634765625,
-0.016632080078125,
-0.032684326171875,
-0.0119171142578125,
0.0214996337890625,
-0.0173492431640625,
0.029998779296875,
-0.0034008026123046875,
0.0027332305908203125,
-0.0411376953125,
-0.04248046875,
0.04205322265625,
-0.03228759765625,
-0.002742767333984375,
-0.029693603515625,
-0.0300445556640625,
0.011383056640625,
0.08453369140625,
-0.07244873046875,
-0.01558685302734375,
-0.0007929801940917969,
0.022979736328125,
-0.032257080078125,
-0.06298828125,
-0.016265869140625,
-0.0104217529296875,
-0.070068359375,
-0.0012350082397460938,
-0.022735595703125,
-0.01323699951171875,
-0.008026123046875,
0.0311126708984375,
-0.0284423828125,
-0.0299530029296875,
0.0232391357421875,
0.0241546630859375,
-0.028076171875,
0.04437255859375,
-0.05059814453125,
0.03814697265625,
-0.039093017578125,
0.009368896484375,
-0.05340576171875,
-0.0258636474609375,
0.0280303955078125,
0.050628662109375,
-0.0019664764404296875,
-0.0244598388671875,
-0.01496124267578125,
0.040679931640625,
0.040252685546875,
0.0301971435546875,
0.0211181640625,
-0.042388916015625,
0.04937744140625,
0.0148162841796875,
0.01508331298828125,
-0.01059722900390625,
-0.0192718505859375,
-0.00279998779296875,
-0.00928497314453125,
0.0309906005859375,
-0.033477783203125,
-0.00011479854583740234,
-0.01522064208984375,
-0.00927734375,
0.00009554624557495117,
0.021331787109375,
0.04736328125,
0.037841796875,
0.0147705078125,
-0.001865386962890625,
0.0029277801513671875,
-0.01751708984375,
0.0275421142578125,
0.0071563720703125,
-0.026397705078125,
0.01009368896484375,
0.05926513671875,
0.0207672119140625,
-0.03289794921875,
-0.05535888671875,
0.024444580078125,
0.042236328125,
0.0203094482421875,
0.0147247314453125,
-0.005401611328125,
-0.046844482421875,
0.059783935546875,
0.00540924072265625,
-0.0165557861328125,
0.003269195556640625,
0.03436279296875,
0.0003497600555419922,
-0.0085296630859375,
0.007350921630859375,
-0.0283355712890625,
0.0198211669921875,
0.01800537109375,
-0.01004791259765625,
-0.018585205078125,
0.0273284912109375,
0.04742431640625,
-0.027252197265625,
0.033477783203125,
-0.0297698974609375,
-0.005359649658203125,
-0.010772705078125,
0.0017185211181640625,
0.02923583984375,
0.040283203125,
-0.005741119384765625,
-0.005237579345703125,
0.0280303955078125,
0.00946807861328125,
0.0090484619140625,
0.0301513671875,
0.00843048095703125,
0.02777099609375,
0.01457977294921875,
-0.00606536865234375,
-0.0267181396484375,
-0.0072784423828125,
0.0312347412109375,
0.0136871337890625,
-0.0316162109375,
0.0212554931640625,
-0.022613525390625,
0.0252532958984375,
0.0022373199462890625,
-0.02593994140625,
0.003635406494140625,
0.0259246826171875,
-0.007293701171875,
0.027618408203125,
0.0206756591796875,
-0.0120086669921875,
-0.01467132568359375,
0.0135650634765625,
0.031097412109375,
-0.00823974609375,
0.044708251953125,
0.0288543701171875,
0.008392333984375,
0.0278472900390625,
-0.039276123046875,
0.0457763671875,
0.015289306640625,
0.06634521484375,
0.0191497802734375,
-0.022552490234375,
-0.024505615234375,
0.058441162109375,
-0.026763916015625,
-0.019561767578125,
-0.01062774658203125,
0.038360595703125,
0.0012540817260742188,
0.03802490234375,
0.0074005126953125,
0.0011472702026367188,
0.0240478515625,
-0.040924072265625,
0.0117950439453125,
0.023895263671875,
0.0012464523315429688,
-0.01277923583984375,
0.00447845458984375,
0.017425537109375,
0.044403076171875,
-0.00213623046875,
-0.0211639404296875,
-0.01114654541015625,
0.0099945068359375,
-0.0312042236328125,
-0.02459716796875,
0.015045166015625,
0.007038116455078125,
0.03717041015625,
-0.0167694091796875,
-0.01324462890625,
0.02972412109375,
0.0171966552734375,
-0.0292510986328125,
-0.01013946533203125,
0.060882568359375,
-0.0408935546875,
0.043121337890625,
-0.036712646484375,
-0.003997802734375,
-0.08868408203125,
0.0236053466796875,
0.047943115234375,
0.06439208984375,
-0.017181396484375,
-0.00616455078125,
-0.03253173828125,
-0.0085601806640625,
-0.02032470703125,
-0.042510986328125,
-0.0226898193359375,
-0.008697509765625,
0.045166015625,
0.049560546875,
-0.0111083984375,
-0.06610107421875,
-0.0167388916015625,
-0.01428985595703125,
0.0206146240234375,
0.11187744140625,
-0.01047515869140625,
0.08331298828125,
0.01276397705078125,
0.072998046875,
0.00815582275390625,
0.0215606689453125,
-0.0246429443359375,
-0.005733489990234375,
0.0307159423828125,
-0.07391357421875,
-0.023529052734375,
-0.00328826904296875,
-0.036285400390625,
-0.01552581787109375,
-0.04156494140625,
0.0013599395751953125,
-0.002593994140625,
-0.0012483596801757812,
-0.004535675048828125,
-0.01221466064453125,
0.0268096923828125,
0.0141143798828125,
-0.017120361328125,
0.0258941650390625,
-0.022003173828125,
0.0333251953125,
-0.0075225830078125,
0.006744384765625,
0.01427459716796875,
-0.03448486328125,
0.01064300537109375,
0.015380859375,
0.006011962890625,
0.0004968643188476562,
0.035430908203125,
-0.003841400146484375,
0.0352783203125,
0.004344940185546875,
0.02996826171875,
0.053741455078125,
-0.001834869384765625,
0.003978729248046875,
-0.005794525146484375,
0.036102294921875,
-0.016845703125,
-0.0008029937744140625,
0.0194091796875,
-0.01107025146484375,
0.012542724609375,
0.0273895263671875,
0.035247802734375,
-0.043212890625,
-0.00008541345596313477,
0.01558685302734375,
-0.011199951171875,
0.01442718505859375,
0.015716552734375,
0.0180206298828125,
0.0119476318359375,
0.016387939453125,
0.0104217529296875,
-0.0127410888671875,
0.015655517578125,
-0.0132904052734375,
0.0063018798828125,
-0.00809478759765625,
0.0266571044921875,
-0.0023097991943359375,
-0.06512451171875,
-0.01033782958984375,
0.03594970703125,
0.0006389617919921875,
-0.049224853515625,
-0.035919189453125,
0.004802703857421875,
-0.03399658203125,
-0.0906982421875,
-0.021087646484375,
-0.0228424072265625,
0.0098724365234375,
0.015655517578125,
0.03778076171875,
0.0313720703125,
0.045745849609375,
0.01157379150390625,
0.0100555419921875,
0.00846099853515625,
-0.0298309326171875,
-0.05133056640625,
-0.047088623046875,
0.0096893310546875,
0.058135986328125,
-0.006561279296875,
0.048126220703125,
0.0198516845703125,
-0.06646728515625,
-0.007595062255859375,
-0.00328826904296875,
0.06402587890625,
-0.02679443359375,
-0.04132080078125,
0.00838470458984375,
-0.0122222900390625,
-0.00020074844360351562,
0.0030498504638671875,
0.034759521484375,
-0.033905029296875,
0.0157470703125,
0.01451873779296875,
0.015625,
-0.00632476806640625,
0.0151214599609375,
-0.06182861328125,
0.08221435546875,
-0.016754150390625,
0.02752685546875,
0.0187225341796875,
0.0242767333984375,
-0.017669677734375,
-0.01233673095703125,
-0.04254150390625,
0.06982421875,
-0.012786865234375,
0.056488037109375,
-0.06182861328125,
-0.025482177734375,
0.027801513671875,
0.06231689453125,
0.04022216796875,
-0.0022373199462890625,
0.000003516674041748047,
0.015838623046875,
0.09814453125,
0.059173583984375,
0.015472412109375,
-0.0139312744140625,
0.0147247314453125,
0.032501220703125,
0.033538818359375,
-0.03411865234375,
0.0142822265625,
-0.0003273487091064453,
-0.0014505386352539062,
0.06097412109375,
0.00335693359375,
0.0200042724609375,
0.01129913330078125,
-0.06201171875,
-0.017242431640625,
0.0024089813232421875,
0.002796173095703125,
-0.01422882080078125,
0.0224456787109375,
0.047210693359375,
0.0689697265625,
-0.08355712890625,
-0.030364990234375,
-0.037200927734375,
0.059478759765625,
0.0024280548095703125,
-0.0122833251953125,
-0.00585174560546875,
-0.00537872314453125,
0.0202789306640625,
0.005031585693359375,
-0.0168609619140625,
0.0101776123046875,
0.0258026123046875,
0.0086669921875,
0.016448974609375,
0.006893157958984375,
-0.0560302734375,
-0.02716064453125,
0.057525634765625,
0.0458984375,
-0.03741455078125,
0.0026302337646484375,
0.0214080810546875,
-0.005702972412109375,
-0.03619384765625,
-0.053802490234375,
-0.0543212890625,
-0.019073486328125,
0.0182952880859375,
-0.015380859375,
-0.01250457763671875,
0.005794525146484375,
0.022857666015625,
0.006114959716796875,
0.0092620849609375,
-0.0211639404296875,
-0.0242462158203125,
-0.0390625,
0.041534423828125,
0.00829315185546875,
0.038055419921875,
-0.00951385498046875,
0.06976318359375,
-0.029296875,
-0.017120361328125,
0.0135040283203125,
0.018341064453125,
0.0266876220703125,
-0.012176513671875,
-0.0065460205078125,
0.00563812255859375,
0.01235198974609375,
0.00553131103515625,
0.035736083984375,
-0.0001958608627319336,
0.0443115234375,
0.0306243896484375,
-0.024658203125,
0.002410888671875,
0.0218048095703125,
-0.024505615234375,
-0.0135498046875,
-0.023468017578125,
-0.0362548828125,
-0.01953125,
-0.031005859375,
0.0219879150390625,
-0.00016927719116210938,
-0.0084075927734375,
-0.0210723876953125,
0.02764892578125,
-0.01273345947265625,
-0.0178985595703125,
0.00940704345703125,
-0.0083160400390625,
0.049102783203125,
-0.018096923828125,
-0.05511474609375,
-0.00983428955078125,
-0.0137786865234375,
-0.05291748046875,
0.02093505859375,
0.0311431884765625,
-0.0260467529296875,
0.0220184326171875,
0.0011892318725585938,
0.0305328369140625,
-0.00579833984375,
-0.0321044921875,
0.020477294921875,
0.0005860328674316406,
0.01114654541015625,
0.02435302734375,
-0.0496826171875,
-0.018524169921875,
0.005340576171875,
0.0064697265625,
-0.0199432373046875,
0.0287933349609375,
0.01715087890625,
-0.0038394927978515625,
-0.0106201171875,
0.054290771484375,
-0.078857421875,
-0.02032470703125,
0.043731689453125,
-0.0256805419921875,
-0.0017518997192382812,
0.0009222030639648438,
-0.041595458984375,
0.0162811279296875,
0.03863525390625,
0.0044097900390625,
0.035491943359375,
-0.032257080078125,
0.0079803466796875,
-0.02313232421875,
-0.00260162353515625,
-0.0251617431640625,
0.039337158203125,
0.04302978515625,
-0.0159759521484375,
0.0406494140625,
0.0220794677734375,
0.0341796875,
0.0271148681640625,
0.067626953125,
-0.02471923828125,
0.03369140625,
-0.03302001953125,
0.05828857421875,
0.0604248046875,
0.04669189453125,
0.005229949951171875,
-0.0482177734375,
-0.016265869140625,
0.0007157325744628906,
0.022979736328125,
-0.03863525390625,
-0.00830841064453125,
0.043792724609375,
-0.01503753662109375,
-0.006572723388671875,
0.0157928466796875,
-0.0143585205078125,
-0.006534576416015625,
0.037445068359375,
-0.032073974609375,
-0.054718017578125,
-0.01045989990234375,
-0.001651763916015625,
-0.03753662109375,
-0.0013761520385742188,
0.006927490234375,
-0.006687164306640625,
0.0230712890625,
-0.0005431175231933594,
-0.03302001953125,
-0.02569580078125,
0.00547027587890625,
-0.023529052734375,
0.0152740478515625,
0.002094268798828125,
-0.0271148681640625,
-0.04937744140625,
-0.01448822021484375,
0.0207061767578125,
0.0296478271484375,
0.00225067138671875,
0.00959014892578125,
-0.035369873046875,
0.0028285980224609375,
-0.008544921875,
-0.0037479400634765625,
0.01251220703125,
-0.005401611328125,
-0.034912109375,
0.007633209228515625,
-0.0010652542114257812,
0.048309326171875,
-0.0003154277801513672,
-0.01406097412109375,
-0.010833740234375,
0.00873565673828125,
-0.02508544921875,
-0.0276336669921875,
0.051239013671875,
-0.0474853515625,
-0.072021484375,
0.0276031494140625,
-0.007526397705078125,
0.00485992431640625,
-0.029571533203125,
-0.08953857421875,
0.0848388671875,
-0.014190673828125,
-0.02520751953125,
-0.030975341796875,
-0.00872802734375,
-0.0114288330078125,
0.025848388671875,
0.00965118408203125,
-0.0181884765625,
-0.046478271484375,
-0.0136260986328125,
-0.012451171875,
0.058868408203125,
0.004611968994140625,
-0.0159149169921875,
-0.0267181396484375,
-0.033050537109375,
-0.048095703125,
-0.0260772705078125,
0.0079803466796875,
-0.0153350830078125,
0.0153961181640625,
0.028717041015625,
-0.031707763671875,
-0.0174407958984375,
-0.0036487579345703125,
0.0171051025390625,
-0.019744873046875,
0.0194244384765625,
-0.069580078125,
-0.0221710205078125,
0.06866455078125,
0.08770751953125,
0.02764892578125,
-0.0232086181640625,
0.050628662109375,
0.012298583984375,
-0.09027099609375,
-0.00548553466796875,
0.0296783447265625,
-0.045196533203125,
-0.0355224609375,
-0.004062652587890625,
-0.0214996337890625,
0.0063018798828125,
-0.0074462890625,
-0.028167724609375,
-0.0261993408203125,
-0.031219482421875,
0.016845703125,
-0.055328369140625,
0.0103912353515625,
0.04449462890625,
-0.0472412109375,
-0.0216217041015625,
-0.01184844970703125,
0.00505828857421875,
0.001163482666015625,
-0.01763916015625,
0.01922607421875,
0.017364501953125,
-0.034942626953125,
-0.01031494140625,
0.01358795166015625,
-0.021453857421875,
-0.022369384765625,
-0.01262664794921875,
-0.0073699951171875,
0.0028209686279296875,
0.00005537271499633789,
-0.032318115234375,
0.0051116943359375,
-0.002887725830078125,
-0.0222625732421875,
0.05755615234375,
0.005542755126953125,
0.0657958984375,
0.0166015625,
0.023193359375,
-0.0162506103515625,
-0.0246429443359375,
-0.0005483627319335938,
-0.02923583984375,
-0.0103302001953125,
0.00377655029296875,
-0.0240936279296875,
-0.037078857421875,
0.016387939453125,
-0.04595947265625,
-0.00446319580078125,
0.0210418701171875
]
|
3eea52ee0d4c302cb97aefb1a08737289b084c5d | Wordpress Stackexchange
Q: BuddyPress | Check if user is in current group I'm developing a plugin for a website, which uses the Group Extension API to create a new "subpage" in the group's page, just like Home, Members...
Here's the code:
class BP_Suggest extends BP_Group_Extension {
...
function display() {
global $bp;
$group_id = $bp->groups->current_group->id;
?>
<h2>
Suggest Ideas to the group.
</h2>
<?php $this->print_all_suggestions($group_id); ?>
<?php
}
...
I want to print, before the $this->print_all_suggestions($group_id); function, a form for posting a suggestion - but to print this form only is the user is logged in and is a member of the current group (which I have the ID of, like you've seen in line 2 of the function display())
:
if(is_user_a_member_of_this_group()):
?>
<div>
....
</div>
<?php
else:
echo "You don't have permissions to post here";
endif;
What should the function is_user_a_member_of_this_group() contain? (I'll probably change the name, don't worry ;) )
Thanks!
A: function is_user_a_member_of_this_group($user_id, $group_id)
//return: bool
return groups_is_user_member( $user_id, $group_id );
}
| Q: BuddyPress | Check if user is in current group I'm developing a plugin for a website, which uses the Group Extension API to create a new "subpage" in the group's page, just like Home, Members...
Here's the code:
class BP_Suggest extends BP_Group_Extension {
...
function display() {
global $bp;
$group_id = $bp->groups->current_group->id;
?>
<h2>
Suggest Ideas to the group.
</h2>
<?php $this->print_all_suggestions($group_id); ?>
<?php
}
...
I want to print, before the $this->print_all_suggestions($group_id); function, a form for posting a suggestion - but to print this form only is the user is logged in and is a member of the current group (which I have the ID of, like you've seen in line 2 of the function display())
:
if(is_user_a_member_of_this_group()):
?>
<div>
....
</div>
<?php
else:
echo "You don't have permissions to post here";
endif;
What should the function is_user_a_member_of_this_group() contain? (I'll probably change the name, don't worry ;) )
Thanks!
A: function is_user_a_member_of_this_group($user_id, $group_id)
//return: bool
return groups_is_user_member( $user_id, $group_id );
}
| wordpress | {
"language": "en",
"length": 163,
"provenance": "stackexchange_00019.jsonl.gz:450040",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166765"
} | [
0.04541015625,
0.0163421630859375,
-0.028045654296875,
-0.055633544921875,
0.035064697265625,
-0.02349853515625,
0.0164337158203125,
-0.003376007080078125,
0.00838470458984375,
0.038543701171875,
-0.029205322265625,
0.02154541015625,
-0.017364501953125,
-0.007656097412109375,
-0.0357666015625,
-0.01421356201171875,
0.018035888671875,
-0.013763427734375,
-0.0002522468566894531,
-0.019866943359375,
-0.0074615478515625,
0.0081024169921875,
-0.01360321044921875,
0.01152801513671875,
0.0243682861328125,
-0.037139892578125,
0.09259033203125,
0.028350830078125,
0.039031982421875,
0.002407073974609375,
0.02972412109375,
-0.06378173828125,
-0.008026123046875,
0.038909912109375,
0.005634307861328125,
0.013580322265625,
0.045654296875,
0.004547119140625,
0.031036376953125,
0.0408935546875,
0.0233917236328125,
-0.0088653564453125,
-0.0482177734375,
0.0196533203125,
-0.033416748046875,
-0.0718994140625,
0.042755126953125,
-0.02197265625,
0.0213470458984375,
0.01367950439453125,
0.0360107421875,
0.00525665283203125,
0.0267181396484375,
0.032257080078125,
-0.0106658935546875,
0.04290771484375,
-0.0282440185546875,
-0.02178955078125,
0.058837890625,
0.0131072998046875,
-0.019561767578125,
-0.05999755859375,
0.0287322998046875,
-0.032257080078125,
-0.015167236328125,
-0.0031986236572265625,
0.0019893646240234375,
0.0227508544921875,
-0.0104522705078125,
-0.055816650390625,
-0.01004791259765625,
0.019683837890625,
0.044769287109375,
0.03558349609375,
-0.0254974365234375,
-0.08197021484375,
0.03643798828125,
0.0047607421875,
0.0227813720703125,
-0.00567626953125,
-0.07196044921875,
-0.039764404296875,
-0.06494140625,
0.0280914306640625,
-0.038055419921875,
0.0625,
-0.02996826171875,
-0.0037822723388671875,
0.02593994140625,
-0.005603790283203125,
-0.0030059814453125,
-0.0233154296875,
0.061248779296875,
0.01055145263671875,
-0.028045654296875,
-0.040191650390625,
0.0380859375,
0.08294677734375,
-0.04254150390625,
-0.0109710693359375,
0.00681304931640625,
-0.03662109375,
-0.00701904296875,
-0.05029296875,
-0.0056304931640625,
0.054107666015625,
-0.0032939910888671875,
-0.040863037109375,
-0.00531005859375,
0.0223236083984375,
0.0218048095703125,
-0.062469482421875,
-0.033721923828125,
-0.0191192626953125,
-0.0245819091796875,
0.0322265625,
-0.062347412109375,
-0.01149749755859375,
-0.01000213623046875,
-0.001468658447265625,
0.0195159912109375,
0.0122528076171875,
-0.001068115234375,
-0.0020961761474609375,
-0.01152801513671875,
-0.0038776397705078125,
-0.044891357421875,
-0.01268768310546875,
0.00882720947265625,
0.00539398193359375,
-0.0291290283203125,
0.015625,
0.060089111328125,
0.03155517578125,
0.00824737548828125,
-0.00846099853515625,
0.0203399658203125,
0.00022733211517333984,
0.017120361328125,
0.01418304443359375,
-0.0221405029296875,
-0.045867919921875,
0.016571044921875,
-0.01031494140625,
-0.005809783935546875,
0.00814056396484375,
0.0212860107421875,
0.033294677734375,
-0.0236358642578125,
-0.071044921875,
0.07037353515625,
-0.032379150390625,
0.0110015869140625,
-0.0175018310546875,
0.0237274169921875,
-0.0303497314453125,
-0.01540374755859375,
-0.0233612060546875,
0.04132080078125,
0.0121002197265625,
0.005741119384765625,
-0.0053558349609375,
0.0019931793212890625,
-0.04669189453125,
-0.043670654296875,
-0.0196380615234375,
-0.01012420654296875,
0.01357269287109375,
0.018096923828125,
0.029571533203125,
0.0115509033203125,
0.01454925537109375,
0.049102783203125,
0.01824951171875,
-0.0004229545593261719,
-0.00942230224609375,
0.014862060546875,
0.01242828369140625,
0.0244140625,
0.033782958984375,
-0.033599853515625,
-0.04254150390625,
0.051177978515625,
-0.0380859375,
-0.07415771484375,
0.063720703125,
0.0017185211181640625,
0.02435302734375,
0.0267791748046875,
-0.032501220703125,
0.10479736328125,
0.04022216796875,
-0.021881103515625,
0.032867431640625,
-0.005123138427734375,
-0.03955078125,
0.040740966796875,
0.004913330078125,
-0.006954193115234375,
-0.01561737060546875,
0.0290985107421875,
0.01031494140625,
-0.0242767333984375,
-0.02471923828125,
-0.0853271484375,
-0.0158538818359375,
-0.0181732177734375,
0.028594970703125,
0.020538330078125,
0.004302978515625,
-0.0164337158203125,
-0.009368896484375,
-0.0012483596801757812,
-0.007457733154296875,
-0.024078369140625,
0.01690673828125,
-0.02294921875,
0.019012451171875,
0.01152801513671875,
0.0382080078125,
-0.04461669921875,
0.0592041015625,
-0.036041259765625,
-0.03253173828125,
0.04510498046875,
0.00487518310546875,
-0.031097412109375,
-0.01140594482421875,
0.0020046234130859375,
0.00975799560546875,
-0.0307159423828125,
0.032684326171875,
0.02337646484375,
0.04473876953125,
-0.0238037109375,
-0.025238037109375,
-0.0215606689453125,
-0.07391357421875,
0.01568603515625,
0.06414794921875,
0.036285400390625,
0.0478515625,
0.02215576171875,
0.0201568603515625,
0.0924072265625,
0.01605224609375,
0.0362548828125,
-0.01885986328125,
0.0237884521484375,
0.0765380859375,
-0.020294189453125,
0.03985595703125,
-0.0012302398681640625,
0.06451416015625,
0.0229339599609375,
0.027557373046875,
-0.0254974365234375,
-0.0015192031860351562,
0.0071868896484375,
-0.026458740234375,
0.006015777587890625,
-0.049774169921875,
-0.00821685791015625,
-0.01904296875,
0.01134490966796875,
-0.002986907958984375,
0.0279693603515625,
0.025543212890625,
0.01995849609375,
-0.031463623046875,
0.0014925003051757812,
-0.036865234375,
-0.000049054622650146484,
0.0171661376953125,
0.0285186767578125,
0.0175323486328125,
-0.049774169921875,
-0.01508331298828125,
0.0126190185546875,
0.0211944580078125,
-0.016693115234375,
0.03045654296875,
-0.0002989768981933594,
-0.00998687744140625,
-0.00865936279296875,
-0.0104827880859375,
-0.0009627342224121094,
-0.01800537109375,
-0.0184783935546875,
-0.02313232421875,
0.00862884521484375,
0.030548095703125,
-0.03302001953125,
0.051025390625,
-0.0251312255859375,
-0.01146697998046875,
0.0039825439453125,
-0.04913330078125,
0.04827880859375,
-0.040191650390625,
0.01123809814453125,
0.06396484375,
0.003734588623046875,
0.00013267993927001953,
-0.02557373046875,
-0.008575439453125,
-0.0413818359375,
0.0179595947265625,
-0.00313568115234375,
-0.037750244140625,
-0.01180267333984375,
0.06585693359375,
0.005767822265625,
0.0297393798828125,
-0.02703857421875,
-0.0533447265625,
-0.005615234375,
-0.0189361572265625,
-0.0477294921875,
-0.0390625,
-0.0206298828125,
-0.052398681640625,
-0.0167694091796875,
-0.01007080078125,
-0.0271453857421875,
0.022552490234375,
-0.0106048583984375,
0.0146942138671875,
-0.03546142578125,
-0.018035888671875,
-0.03466796875,
-0.0511474609375,
-0.041259765625,
-0.00009965896606445312,
-0.0034084320068359375,
-0.0115814208984375,
0.01493072509765625,
0.00528717041015625,
0.0115509033203125,
-0.01378631591796875,
0.0164642333984375,
0.04608154296875,
-0.01439666748046875,
-0.03131103515625,
-0.00519561767578125,
-0.004291534423828125,
-0.007572174072265625,
0.01184844970703125,
0.0025043487548828125,
0.00392913818359375,
-0.004543304443359375,
-0.0186920166015625,
0.0162353515625,
0.002910614013671875,
0.04119873046875,
-0.02093505859375,
-0.019256591796875,
0.0648193359375,
0.05377197265625,
-0.0015630722045898438,
-0.00775909423828125,
0.01557159423828125,
-0.03759765625,
0.0005230903625488281,
-0.002468109130859375,
-0.0233306884765625,
0.022247314453125,
-0.0192108154296875,
0.02435302734375,
0.03277587890625,
-0.0281524658203125,
0.0233612060546875,
-0.023101806640625,
0.0128021240234375,
0.02001953125,
0.0181121826171875,
0.03424072265625,
-0.01922607421875,
-0.0296173095703125,
-0.00954437255859375,
-0.0020599365234375,
0.0005364418029785156,
-0.031402587890625,
-0.0130157470703125,
-0.00353240966796875,
0.02276611328125,
0.022186279296875,
0.045379638671875,
-0.006908416748046875,
-0.027984619140625,
-0.0074920654296875,
0.06915283203125,
-0.0242767333984375,
-0.020843505859375,
0.00494384765625,
-0.00007289648056030273,
-0.03155517578125,
-0.01715087890625,
-0.054595947265625,
-0.00307464599609375,
-0.01153564453125,
-0.039947509765625,
-0.033111572265625,
0.003314971923828125,
-0.01102447509765625,
0.048736572265625,
-0.006343841552734375,
-0.0170745849609375,
0.00934600830078125,
0.016845703125,
0.00370025634765625,
0.010986328125,
-0.0081787109375,
0.0020313262939453125,
-0.0036563873291015625,
-0.029510498046875,
-0.08685302734375,
0.00983428955078125,
-0.0650634765625,
0.043670654296875,
0.024658203125,
-0.0085296630859375,
0.01029205322265625,
0.043060302734375,
0.0010929107666015625,
0.0205230712890625,
0.0203094482421875,
-0.01258087158203125,
0.082763671875,
0.034088134765625,
0.0115966796875,
0.009368896484375,
-0.0113525390625,
-0.015106201171875,
-0.0295257568359375,
-0.028564453125,
-0.045989990234375,
-0.06512451171875,
-0.005680084228515625,
-0.0252838134765625,
-0.026214599609375,
-0.03125,
-0.0035800933837890625,
0.0521240234375,
-0.051727294921875,
0.03216552734375,
-0.031463623046875,
-0.03887939453125,
0.029205322265625,
-0.01468658447265625,
-0.01812744140625,
0.01494598388671875,
0.04559326171875,
0.01142120361328125,
-0.00458526611328125,
-0.08087158203125,
0.0060577392578125,
0.03607177734375,
-0.006885528564453125,
0.0188140869140625,
-0.017059326171875,
-0.038482666015625,
0.04296875,
-0.015411376953125,
0.0294189453125,
-0.017547607421875,
0.033111572265625,
-0.018341064453125,
-0.0240478515625,
0.037994384765625,
-0.004119873046875,
-0.0262298583984375,
0.0211639404296875,
-0.01325225830078125,
-0.02325439453125,
-0.0107574462890625,
0.03369140625,
-0.00943756103515625,
0.0169830322265625,
-0.0088958740234375,
-0.0770263671875,
0.0499267578125,
0.006595611572265625,
-0.041107177734375,
-0.028106689453125,
0.001995086669921875,
0.006618499755859375,
-0.043426513671875,
-0.008819580078125,
0.00799560546875,
0.02581787109375,
0.027618408203125,
0.04876708984375,
-0.002689361572265625,
0.017364501953125,
-0.0131072998046875,
0.000022470951080322266,
0.060577392578125,
0.0012884140014648438,
-0.046600341796875,
0.0178680419921875,
-0.0280303955078125,
-0.0201263427734375,
-0.0035877227783203125,
0.02276611328125,
0.0047760009765625,
-0.0054168701171875,
-0.0168609619140625,
0.0215911865234375,
-0.0037746429443359375,
0.0232086181640625,
-0.0185546875,
-0.01103973388671875,
-0.0029144287109375,
-0.0297698974609375,
-0.006900787353515625,
0.025543212890625,
0.0189971923828125,
-0.00021326541900634766,
-0.00868988037109375,
0.022857666015625,
0.0165557861328125,
-0.0024280548095703125,
0.039947509765625,
0.01215362548828125,
-0.01904296875,
-0.0150299072265625,
0.00429534912109375,
0.011444091796875,
-0.003559112548828125,
0.00327301025390625,
-0.01325225830078125,
0.0235748291015625,
0.0184326171875,
0.00658416748046875,
0.0262603759765625,
-0.032806396484375,
0.06402587890625,
0.061248779296875,
-0.06390380859375,
-0.007694244384765625,
0.01107025146484375,
-0.0004830360412597656,
-0.01215362548828125,
-0.004688262939453125,
-0.035400390625,
-0.038055419921875,
-0.03253173828125,
-0.038299560546875,
-0.04632568359375,
-0.00859832763671875,
-0.00115966796875,
-0.09564208984375,
-0.00524139404296875,
0.0307159423828125,
-0.02020263671875,
-0.01134490966796875,
-0.021087646484375,
-0.07586669921875,
0.0257415771484375,
0.0172119140625,
0.0177001953125,
-0.031097412109375,
-0.0130157470703125,
-0.0279998779296875,
-0.035888671875,
0.09063720703125,
0.027984619140625,
-0.10888671875,
0.006557464599609375,
-0.03582763671875,
0.0141143798828125,
-0.057159423828125,
-0.061279296875,
-0.03662109375,
-0.01239013671875,
-0.0178680419921875,
-0.0003707408905029297,
-0.0355224609375,
-0.03594970703125,
-0.00482177734375,
0.033721923828125,
0.035614013671875,
0.0254669189453125,
-0.022430419921875,
0.01428985595703125,
0.0236968994140625,
0.0249176025390625,
-0.0106048583984375,
0.002887725830078125,
0.0142059326171875,
-0.0208282470703125,
0.00742340087890625,
0.023345947265625,
-0.01528167724609375,
-0.02655029296875,
0.0024261474609375,
-0.0283660888671875,
0.054718017578125,
-0.00855255126953125,
-0.0001875162124633789,
0.042327880859375,
0.01320648193359375,
-0.01085662841796875,
-0.048797607421875,
0.05499267578125,
-0.006755828857421875,
0.01325225830078125,
-0.04638671875,
-0.03729248046875,
0.019775390625,
0.032440185546875,
-0.00411224365234375,
-0.006870269775390625,
-0.0180206298828125,
0.0038013458251953125,
-0.045135498046875,
0.0325927734375,
0.082763671875,
0.0292205810546875,
0.06146240234375,
0.01561737060546875,
0.037811279296875,
0.029022216796875,
0.01129913330078125,
-0.00914764404296875,
-0.01277923583984375,
0.0301361083984375,
-0.0023040771484375,
-0.0012693405151367188,
0.033355712890625,
-0.02294921875,
0.01351165771484375,
0.01885986328125,
0.028778076171875,
-0.043365478515625,
0.0224609375,
-0.01502227783203125,
0.0004673004150390625,
0.08154296875,
0.00447845458984375,
-0.00556182861328125,
-0.00693511962890625,
0.066162109375,
-0.0187225341796875,
-0.0002397298812866211,
0.0528564453125,
-0.0208740234375,
-0.01078033447265625,
-0.01549530029296875,
0.044952392578125,
0.0165252685546875,
0.0047149658203125,
-0.02178955078125,
-0.01041412353515625,
-0.012664794921875,
-0.0273284912109375,
0.040191650390625,
-0.0185546875,
0.007537841796875,
-0.054168701171875,
0.0157318115234375,
0.038726806640625,
-0.0362548828125,
0.0062103271484375,
-0.026947021484375,
0.0125885009765625,
0.033111572265625,
-0.02838134765625,
-0.01043701171875,
0.0186309814453125,
-0.06768798828125,
-0.006763458251953125,
-0.0060272216796875,
-0.04779052734375,
0.0616455078125,
0.0165252685546875,
0.01812744140625,
-0.001171112060546875,
0.029144287109375,
0.0027065277099609375,
-0.033416748046875,
0.04833984375,
-0.03265380859375,
-0.01763916015625,
-0.01763916015625,
0.00481414794921875,
0.0301971435546875,
0.0033855438232421875,
0.032012939453125,
-0.061981201171875,
-0.0498046875,
0.0137481689453125,
-0.041473388671875,
-0.022064208984375,
-0.0198211669921875,
-0.043243408203125,
0.0467529296875,
-0.0301666259765625,
0.0272369384765625,
0.01375579833984375,
0.0164947509765625,
0.002429962158203125,
-0.00616455078125,
-0.0251312255859375,
0.006824493408203125,
-0.01247406005859375,
0.08258056640625,
-0.0224456787109375,
-0.011627197265625,
0.0252532958984375,
0.045166015625,
0.01371002197265625,
0.01971435546875,
-0.0257110595703125,
-0.0034656524658203125,
-0.0274505615234375,
-0.005344390869140625,
-0.01207733154296875,
0.03363037109375,
0.005222320556640625,
0.010833740234375,
0.051666259765625,
-0.0144500732421875,
0.033203125,
-0.00507354736328125,
-0.0011453628540039062,
0.0100555419921875,
0.0007677078247070312,
0.0214691162109375,
-0.05316162109375,
0.01305389404296875,
0.024658203125,
-0.04046630859375,
-0.005733489990234375,
-0.03607177734375,
0.029144287109375,
-0.015533447265625,
-0.00966644287109375,
-0.0190582275390625,
0.03759765625,
-0.01425933837890625,
0.03741455078125,
-0.013153076171875,
0.05169677734375,
0.0281219482421875,
0.01464080810546875,
0.033721923828125,
0.0236968994140625,
0.034027099609375,
0.031951904296875,
-0.0204620361328125,
0.03399658203125,
0.055084228515625,
0.005992889404296875,
-0.0276641845703125,
-0.01055145263671875,
0.0804443359375,
0.0716552734375,
-0.041534423828125,
-0.02984619140625,
-0.0019130706787109375,
0.01390838623046875,
0.03179931640625,
-0.01959228515625,
0.01543426513671875,
-0.037506103515625,
0.00939178466796875,
-0.029571533203125,
-0.004161834716796875,
0.062042236328125,
0.013427734375,
0.0166015625,
-0.025146484375,
-0.022125244140625,
0.015838623046875,
-0.004512786865234375,
0.0060882568359375,
0.00862884521484375,
-0.0224456787109375,
-0.01442718505859375,
0.032562255859375,
0.053009033203125,
0.036773681640625,
0.0166015625,
0.00742340087890625,
0.0108184814453125,
-0.0234375,
-0.001636505126953125,
-0.0214080810546875,
0.0190887451171875,
0.024566650390625,
0.0190582275390625,
-0.048553466796875,
-0.01270294189453125,
-0.01503753662109375,
-0.049713134765625,
-0.004917144775390625,
0.04339599609375,
-0.01174163818359375,
0.0019235610961914062,
-0.00893402099609375,
-0.006481170654296875,
0.00197601318359375,
-0.02349853515625,
0.001483917236328125,
0.0121612548828125,
0.02880859375,
0.0251007080078125,
0.03778076171875,
0.00652313232421875,
0.00154876708984375,
0.028350830078125,
0.032012939453125,
0.07421875,
0.06439208984375,
-0.08294677734375,
0.01476287841796875,
-0.0694580078125,
-0.04156494140625,
0.01195526123046875,
0.0196380615234375,
-0.0007352828979492188,
0.002994537353515625,
0.04437255859375,
0.027435302734375,
0.034088134765625,
-0.042633056640625,
0.0008196830749511719,
0.01751708984375,
0.052581787109375,
0.022491455078125,
-0.0237274169921875,
0.0007734298706054688,
-0.0220947265625,
0.0174407958984375,
0.00435638427734375,
0.03778076171875,
-0.0218048095703125,
0.01007843017578125,
-0.04864501953125,
0.0022296905517578125,
-0.047943115234375,
-0.08203125,
0.1268310546875,
0.0007662773132324219,
-0.038299560546875,
0.003490447998046875,
-0.0265045166015625,
0.002559661865234375,
0.04156494140625,
-0.0007991790771484375,
0.018585205078125,
-0.021514892578125,
0.0211639404296875,
-0.01169586181640625,
-0.00970458984375,
-0.0221099853515625,
-0.007354736328125,
0.0230712890625,
0.0118865966796875,
0.03302001953125,
0.0184478759765625,
-0.02178955078125,
0.0220184326171875,
0.00623321533203125,
-0.02020263671875,
-0.025970458984375,
-0.0015926361083984375,
-0.052642822265625,
0.0141143798828125,
-0.006565093994140625,
-0.0258331298828125,
-0.031280517578125,
-0.0162506103515625,
-0.005710601806640625,
-0.011627197265625,
0.0029315948486328125,
0.0025386810302734375,
-0.01482391357421875,
0.030426025390625,
0.017181396484375,
0.02093505859375,
-0.042022705078125,
-0.014739990234375,
0.056854248046875,
-0.0244598388671875,
-0.01284027099609375,
-0.0036830902099609375,
-0.039581298828125,
-0.0499267578125,
0.034210205078125,
0.0182952880859375,
-0.001598358154296875,
-0.0008840560913085938,
-0.051177978515625,
-0.0294952392578125,
0.0006594657897949219,
-0.005512237548828125,
-0.0386962890625,
0.002292633056640625,
0.01885986328125,
0.0173797607421875,
-0.052886962890625,
-0.004497528076171875,
-0.00669097900390625,
-0.0177001953125,
-0.030975341796875,
0.03753662109375,
-0.034332275390625,
-0.02459716796875,
0.0290374755859375,
0.016815185546875,
0.0298614501953125,
-0.011383056640625,
-0.00885009765625,
0.0408935546875,
0.007488250732421875,
0.072265625,
-0.00885772705078125,
-0.02923583984375,
-0.0001232624053955078,
-0.0185089111328125,
0.0008044242858886719,
-0.01076507568359375,
0.021881103515625,
-0.05029296875,
-0.036376953125,
-0.012908935546875,
0.0269927978515625,
0.036041259765625,
-0.0286407470703125,
-0.054443359375,
0.09326171875,
-0.0202178955078125,
-0.03094482421875,
-0.017120361328125,
0.02001953125,
0.003490447998046875,
-0.0260772705078125,
0.004611968994140625,
-0.04669189453125,
-0.0087738037109375,
0.0139923095703125,
0.00928497314453125,
0.0279388427734375,
0.0189208984375,
0.0017824172973632812,
-0.07794189453125,
-0.0044403076171875,
-0.040069580078125,
0.024688720703125,
0.0204010009765625,
0.007320404052734375,
-0.0100555419921875,
0.0140838623046875,
-0.037384033203125,
-0.0157012939453125,
-0.023529052734375,
0.018157958984375,
0.01190185546875,
-0.07342529296875,
-0.011444091796875,
-0.0197906494140625,
0.0204925537109375,
-0.015869140625,
-0.000012159347534179688,
-0.03179931640625,
-0.03887939453125,
-0.06121826171875,
-0.0254058837890625,
0.0030269622802734375,
0.004329681396484375,
-0.049041748046875,
0.03289794921875,
-0.002101898193359375,
-0.02801513671875,
0.0274810791015625,
0.0217437744140625,
-0.0255279541015625,
0.01474761962890625,
0.0126495361328125,
-0.046722412109375,
-0.0305633544921875,
-0.03472900390625,
0.005725860595703125,
-0.03680419921875,
-0.065185546875,
0.02044677734375,
0.00823211669921875,
-0.050567626953125,
-0.000652313232421875,
0.0193939208984375,
-0.0081024169921875,
-0.03216552734375,
0.01372528076171875,
0.01195526123046875,
-0.01544189453125,
-0.00963592529296875,
-0.0443115234375,
0.00894927978515625,
0.01016998291015625,
-0.01141357421875,
-0.00765228271484375,
-0.01507568359375,
0.052032470703125,
-0.0253448486328125,
0.06640625,
-0.002593994140625,
-0.022705078125,
-0.0095672607421875,
0.029754638671875,
0.016815185546875,
-0.034637451171875,
0.07373046875,
-0.05694580078125,
-0.003795623779296875,
0.0171051025390625,
0.0087890625,
-0.06329345703125,
0.050140380859375,
0.008209228515625,
0.031097412109375,
0.019927978515625
]
|
919c76417769fa0df9e9d76d5fbb633d3488f8c6 | Wordpress Stackexchange
Q: Prevent Google from indexing custom post types? I am using custom post types to add certain sections to my website. These post types are not meant to be treated like a blog, it's basically just an easy way for me to give the client access to managing certain sections, such as "reviews." Today I noticed that Google is indexing these custom post types and I was wondering how I can prevent that.
For instance, "reviews" is one of my custom post types and Google is indexing mywebsite.com/reviews as well as mywebsite.com/reviews/review, which looks terrible because there is no layout for it.
Is there any way to prevent Wordpress from even creating these sections? Thanks!
A: If you write code for registering custom post-type try adding these attributes
public => false, has_archive => false, publicly_queryable => false, query_var => false
Otherwise, set these options to false in plugin that you might be using.
| Q: Prevent Google from indexing custom post types? I am using custom post types to add certain sections to my website. These post types are not meant to be treated like a blog, it's basically just an easy way for me to give the client access to managing certain sections, such as "reviews." Today I noticed that Google is indexing these custom post types and I was wondering how I can prevent that.
For instance, "reviews" is one of my custom post types and Google is indexing mywebsite.com/reviews as well as mywebsite.com/reviews/review, which looks terrible because there is no layout for it.
Is there any way to prevent Wordpress from even creating these sections? Thanks!
A: If you write code for registering custom post-type try adding these attributes
public => false, has_archive => false, publicly_queryable => false, query_var => false
Otherwise, set these options to false in plugin that you might be using.
A: Some functionality won't be working after using
publickly_queryable => false, query_var => false
It's enough to stop indexing by the search engines by using only
public => false, has_archive => false
| wordpress | {
"language": "en",
"length": 185,
"provenance": "stackexchange_00019.jsonl.gz:450068",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166862"
} | [
0.048370361328125,
0.0009260177612304688,
0.049346923828125,
0.020355224609375,
-0.0024967193603515625,
-0.012176513671875,
0.0650634765625,
-0.06561279296875,
-0.019134521484375,
-0.006679534912109375,
-0.016876220703125,
-0.00040793418884277344,
-0.0234375,
-0.0452880859375,
0.031768798828125,
-0.035003662109375,
0.026031494140625,
-0.00980377197265625,
0.0232696533203125,
-0.011566162109375,
0.0303802490234375,
-0.017059326171875,
0.030487060546875,
-0.00960540771484375,
0.01062774658203125,
-0.00015878677368164062,
0.0640869140625,
-0.014892578125,
0.022857666015625,
0.0026340484619140625,
0.036651611328125,
-0.04901123046875,
-0.01235198974609375,
0.0372314453125,
0.004241943359375,
-0.0005731582641601562,
-0.005100250244140625,
0.036163330078125,
0.05499267578125,
-0.018035888671875,
-0.0061187744140625,
-0.0008778572082519531,
0.065185546875,
-0.0086669921875,
0.0085906982421875,
-0.036407470703125,
0.0084381103515625,
-0.0615234375,
0.035858154296875,
-0.025390625,
-0.016021728515625,
0.042633056640625,
0.0142364501953125,
-0.041046142578125,
-0.025604248046875,
-0.0228424072265625,
0.02166748046875,
-0.01482391357421875,
0.03564453125,
-0.049224853515625,
-0.0310821533203125,
-0.01125335693359375,
0.035369873046875,
0.0180816650390625,
0.01389312744140625,
-0.007022857666015625,
0.00975799560546875,
0.0227203369140625,
-0.046356201171875,
0.0005173683166503906,
0.0430908203125,
-0.038177490234375,
0.0189056396484375,
-0.0015459060668945312,
0.022613525390625,
-0.045806884765625,
0.00434112548828125,
-0.0303497314453125,
0.00994873046875,
0.0340576171875,
-0.0160064697265625,
-0.0058135986328125,
-0.038543701171875,
-0.0472412109375,
-0.006885528564453125,
-0.05218505859375,
-0.01177978515625,
0.02685546875,
0.0027523040771484375,
-0.0273590087890625,
-0.01422119140625,
-0.04730224609375,
-0.00688934326171875,
0.0245361328125,
-0.00604248046875,
-0.0291900634765625,
0.05487060546875,
0.05548095703125,
-0.0011615753173828125,
-0.003543853759765625,
0.0294189453125,
-0.0609130859375,
0.04705810546875,
-0.034210205078125,
0.0181427001953125,
0.0110626220703125,
0.00506591796875,
0.00591278076171875,
0.05206298828125,
0.02044677734375,
-0.00147247314453125,
0.0367431640625,
-0.00623321533203125,
-0.01169586181640625,
-0.05389404296875,
-0.00213623046875,
-0.0257415771484375,
-0.0462646484375,
0.005146026611328125,
-0.021087646484375,
0.03863525390625,
0.0307769775390625,
0.02496337890625,
0.0020847320556640625,
0.00646209716796875,
0.0152740478515625,
-0.036224365234375,
-0.033203125,
0.005512237548828125,
0.066650390625,
-0.033660888671875,
-0.020538330078125,
0.037078857421875,
0.0194549560546875,
-0.004985809326171875,
-0.04437255859375,
0.01364898681640625,
-0.046234130859375,
-0.0438232421875,
0.021697998046875,
-0.016387939453125,
-0.022430419921875,
0.007633209228515625,
-0.05938720703125,
0.0024814605712890625,
0.0203857421875,
0.0215606689453125,
0.016448974609375,
-0.0212249755859375,
-0.0283966064453125,
-0.01020050048828125,
-0.0061798095703125,
0.06378173828125,
0.0016775131225585938,
-0.0447998046875,
-0.045623779296875,
0.035552978515625,
-0.034149169921875,
-0.026123046875,
-0.06365966796875,
0.018035888671875,
-0.00641632080078125,
0.00197601318359375,
0.0175323486328125,
-0.00020825862884521484,
0.003688812255859375,
-0.00688934326171875,
-0.003231048583984375,
0.0160675048828125,
0.004116058349609375,
0.0007596015930175781,
0.0146331787109375,
-0.0031414031982421875,
0.0012264251708984375,
0.0036830902099609375,
-0.015960693359375,
0.034088134765625,
-0.0180511474609375,
0.01244354248046875,
0.07049560546875,
0.0159149169921875,
-0.006561279296875,
0.049224853515625,
-0.0186004638671875,
-0.0404052734375,
0.04974365234375,
0.03265380859375,
0.06500244140625,
-0.016326904296875,
0.0271453857421875,
0.046295166015625,
0.034027099609375,
-0.03619384765625,
0.01611328125,
0.027008056640625,
-0.016143798828125,
0.0273590087890625,
-0.009857177734375,
0.02081298828125,
-0.0180511474609375,
-0.0188140869140625,
0.01183319091796875,
-0.01442718505859375,
-0.0161590576171875,
-0.04742431640625,
-0.0169677734375,
-0.009918212890625,
0.047393798828125,
-0.0152435302734375,
0.05804443359375,
0.0399169921875,
0.029266357421875,
-0.07928466796875,
0.0682373046875,
0.0219573974609375,
-0.0147857666015625,
-0.0178680419921875,
0.043426513671875,
-0.0098724365234375,
0.018707275390625,
-0.0043182373046875,
-0.034515380859375,
0.00873565673828125,
0.01476287841796875,
0.045684814453125,
0.01136016845703125,
-0.0092926025390625,
-0.002471923828125,
0.0169677734375,
0.03814697265625,
-0.0572509765625,
0.00106048583984375,
0.0784912109375,
0.035888671875,
-0.005931854248046875,
-0.0024662017822265625,
0.01088714599609375,
-0.11566162109375,
0.0005450248718261719,
0.07293701171875,
0.02587890625,
0.009124755859375,
0.0006914138793945312,
0.0301666259765625,
0.0248870849609375,
-0.005832672119140625,
0.01544189453125,
0.005764007568359375,
0.0243072509765625,
0.050445556640625,
-0.01934814453125,
0.004627227783203125,
0.0261993408203125,
-0.006683349609375,
0.030426025390625,
0.025054931640625,
0.03814697265625,
-0.0186614990234375,
0.009185791015625,
0.0102996826171875,
0.00559234619140625,
0.033111572265625,
-0.0361328125,
0.038818359375,
0.0255584716796875,
0.01306915283203125,
0.07220458984375,
0.0709228515625,
-0.007541656494140625,
-0.0255126953125,
0.0038700103759765625,
0.042236328125,
-0.0002428293228149414,
0.0034637451171875,
0.08758544921875,
0.0231170654296875,
-0.045135498046875,
-0.01312255859375,
0.047271728515625,
0.029510498046875,
-0.00734710693359375,
0.01329803466796875,
-0.03509521484375,
-0.01399993896484375,
0.0007634162902832031,
-0.032958984375,
-0.0026988983154296875,
-0.0008382797241210938,
-0.025604248046875,
-0.06146240234375,
-0.032073974609375,
0.0116119384765625,
-0.032470703125,
0.04473876953125,
0.037750244140625,
-0.042327880859375,
-0.037750244140625,
-0.08056640625,
0.053680419921875,
-0.043609619140625,
0.05767822265625,
0.09332275390625,
0.0075836181640625,
0.033935546875,
0.005245208740234375,
-0.0029659271240234375,
0.0135955810546875,
0.004436492919921875,
-0.013580322265625,
-0.0055694580078125,
-0.0751953125,
-0.024169921875,
0.024444580078125,
0.0084075927734375,
0.054534912109375,
-0.005008697509765625,
0.048095703125,
0.0275115966796875,
-0.01849365234375,
-0.058319091796875,
0.0750732421875,
-0.029266357421875,
-0.003936767578125,
-0.0292816162109375,
-0.0200958251953125,
-0.0309295654296875,
-0.0257415771484375,
-0.022186279296875,
-0.040985107421875,
-0.027130126953125,
-0.061004638671875,
-0.06304931640625,
-0.041015625,
0.0345458984375,
-0.0077362060546875,
0.0162353515625,
0.0233612060546875,
0.004146575927734375,
0.025543212890625,
-0.0215606689453125,
0.071533203125,
0.04278564453125,
-0.01561737060546875,
0.0209503173828125,
-0.0035076141357421875,
-0.01070404052734375,
0.050506591796875,
0.01248931884765625,
-0.0258941650390625,
0.018341064453125,
-0.00023233890533447266,
-0.046478271484375,
0.028167724609375,
0.01904296875,
0.033966064453125,
0.005527496337890625,
-0.03607177734375,
0.0193634033203125,
0.01497650146484375,
-0.029632568359375,
-0.042022705078125,
0.0156402587890625,
-0.037628173828125,
-0.057464599609375,
-0.001689910888671875,
-0.002864837646484375,
-0.059722900390625,
0.038970947265625,
0.075439453125,
0.033905029296875,
0.0266876220703125,
-0.0005431175231933594,
0.0311126708984375,
0.0163116455078125,
0.06170654296875,
-0.06781005859375,
-0.0000349879264831543,
-0.048583984375,
0.057403564453125,
0.0010700225830078125,
-0.02276611328125,
-0.0218505859375,
-0.006317138671875,
-0.0189056396484375,
-0.011688232421875,
0.01422119140625,
-0.046630859375,
0.038055419921875,
-0.0219268798828125,
-0.0037136077880859375,
0.00016582012176513672,
0.0572509765625,
-0.06597900390625,
0.01157379150390625,
0.01141357421875,
0.003437042236328125,
-0.001750946044921875,
-0.046173095703125,
-0.076416015625,
-0.02667236328125,
-0.0078887939453125,
0.0037822723388671875,
-0.0011339187622070312,
-0.026702880859375,
-0.0194854736328125,
-0.040496826171875,
-0.01568603515625,
-0.027435302734375,
0.040313720703125,
0.0281219482421875,
0.0295867919921875,
-0.00911712646484375,
0.0291595458984375,
-0.0218353271484375,
-0.0116119384765625,
0.005847930908203125,
-0.094970703125,
-0.005359649658203125,
-0.01425933837890625,
0.02215576171875,
-0.011138916015625,
0.0159759521484375,
-0.0199127197265625,
0.029815673828125,
0.0274505615234375,
0.00919342041015625,
0.028961181640625,
-0.0126800537109375,
0.0178985595703125,
0.0174407958984375,
0.01102447509765625,
-0.0233306884765625,
-0.0022830963134765625,
0.0224456787109375,
-0.00223541259765625,
0.034393310546875,
-0.0255279541015625,
-0.0382080078125,
0.01183319091796875,
-0.0394287109375,
-0.03680419921875,
-0.0302276611328125,
-0.0167999267578125,
0.0307769775390625,
0.013916015625,
-0.02313232421875,
-0.04864501953125,
-0.060272216796875,
0.0025157928466796875,
-0.020477294921875,
0.0070343017578125,
0.0167694091796875,
0.052947998046875,
0.01910400390625,
0.00504302978515625,
0.00897979736328125,
0.0303192138671875,
0.034210205078125,
0.01529693603515625,
0.042144775390625,
-0.0025959014892578125,
-0.011260986328125,
0.051727294921875,
0.00499725341796875,
-0.036468505859375,
0.013336181640625,
0.059051513671875,
-0.01043701171875,
-0.01024627685546875,
-0.007762908935546875,
-0.0518798828125,
0.020050048828125,
0.01702880859375,
-0.00611114501953125,
-0.025238037109375,
0.036895751953125,
0.035736083984375,
-0.047882080078125,
0.0506591796875,
-0.006557464599609375,
-0.01227569580078125,
0.0135040283203125,
0.0278472900390625,
-0.01496124267578125,
0.01140594482421875,
-0.0008063316345214844,
-0.01160430908203125,
-0.049652099609375,
-0.0055389404296875,
-0.00750732421875,
-0.00920867919921875,
-0.012542724609375,
0.0041961669921875,
0.010772705078125,
-0.01267242431640625,
-0.01165008544921875,
0.00011467933654785156,
0.022857666015625,
-0.026458740234375,
-0.05615234375,
-0.0304718017578125,
-0.0118865966796875,
-0.03326416015625,
0.027130126953125,
0.00016450881958007812,
0.01247406005859375,
0.03729248046875,
0.01099395751953125,
0.01812744140625,
-0.01015472412109375,
0.0264739990234375,
-0.01242828369140625,
-0.00262451171875,
0.0132598876953125,
-0.0111236572265625,
0.0011577606201171875,
0.0318603515625,
-0.011932373046875,
0.00829315185546875,
-0.0106353759765625,
0.03790283203125,
0.032806396484375,
0.0299835205078125,
0.0152130126953125,
0.0146026611328125,
-0.015869140625,
0.0175323486328125,
-0.0175018310546875,
-0.0015611648559570312,
-0.038604736328125,
0.0076904296875,
0.01055908203125,
0.00024962425231933594,
0.03192138671875,
0.0168304443359375,
0.01071929931640625,
-0.0007166862487792969,
-0.015960693359375,
-0.00438690185546875,
-0.006572723388671875,
-0.01593017578125,
-0.02691650390625,
0.00653076171875,
0.0081634521484375,
-0.0260772705078125,
-0.008941650390625,
-0.04278564453125,
-0.01338958740234375,
0.0252838134765625,
-0.04962158203125,
0.00592803955078125,
0.006999969482421875,
-0.02886962890625,
-0.0156097412109375,
-0.00701141357421875,
-0.0640869140625,
-0.021148681640625,
0.01050567626953125,
-0.0014562606811523438,
-0.0272369384765625,
-0.00960540771484375,
-0.006256103515625,
-0.01580810546875,
0.0026302337646484375,
-0.00690460205078125,
0.0211029052734375,
0.033355712890625,
-0.007476806640625,
-0.00716400146484375,
-0.0191802978515625,
-0.046905517578125,
-0.0218353271484375,
-0.08770751953125,
-0.058135986328125,
-0.01486968994140625,
0.018218994140625,
0.0205230712890625,
0.0028171539306640625,
-0.006999969482421875,
-0.05206298828125,
-0.0159149169921875,
0.0272674560546875,
0.042083740234375,
-0.006252288818359375,
-0.060211181640625,
0.034759521484375,
0.0704345703125,
0.023284912109375,
-0.01047515869140625,
0.01512908935546875,
0.058319091796875,
-0.01187896728515625,
-0.01202392578125,
-0.09228515625,
-0.0267486572265625,
0.022613525390625,
-0.04510498046875,
0.10186767578125,
0.04815673828125,
0.010223388671875,
-0.0011463165283203125,
-0.01317596435546875,
0.00806427001953125,
-0.0278167724609375,
0.01904296875,
-0.055419921875,
-0.01503753662109375,
-0.00008243322372436523,
0.016754150390625,
0.050537109375,
0.00978851318359375,
-0.0207977294921875,
0.015289306640625,
0.0019054412841796875,
0.03790283203125,
-0.0465087890625,
-0.019256591796875,
0.00565338134765625,
0.0509033203125,
0.0418701171875,
0.059906005859375,
-0.012481689453125,
0.045654296875,
0.0274505615234375,
0.01885986328125,
-0.0157928466796875,
-0.01102447509765625,
0.0301513671875,
-0.004199981689453125,
-0.0200958251953125,
0.018402099609375,
-0.019256591796875,
0.014068603515625,
0.0654296875,
0.045074462890625,
-0.10150146484375,
-0.005542755126953125,
-0.008758544921875,
0.01346588134765625,
0.042022705078125,
-0.01070404052734375,
0.01261138916015625,
-0.0007266998291015625,
0.0095977783203125,
0.0277557373046875,
-0.03076171875,
0.0022678375244140625,
-0.00470733642578125,
-0.00396728515625,
-0.024383544921875,
0.028961181640625,
-0.0009317398071289062,
0.004039764404296875,
-0.02862548828125,
-0.006145477294921875,
-0.01285552978515625,
0.0036106109619140625,
-0.006084442138671875,
-0.006717681884765625,
-0.043121337890625,
-0.0701904296875,
-0.014190673828125,
-0.0272369384765625,
-0.0155487060546875,
0.02740478515625,
-0.0104522705078125,
0.0408935546875,
0.018218994140625,
-0.0037364959716796875,
-0.012298583984375,
-0.024627685546875,
0.010284423828125,
-0.005947113037109375,
-0.024932861328125,
0.0213775634765625,
0.0027065277099609375,
0.00704193115234375,
0.01290130615234375,
0.0010461807250976562,
-0.05731201171875,
0.00264739990234375,
0.001560211181640625,
0.04302978515625,
-0.01291656494140625,
-0.0234375,
0.0239715576171875,
-0.013702392578125,
-0.007740020751953125,
-0.0190277099609375,
0.0102386474609375,
-0.01136016845703125,
0.03082275390625,
-0.0161285400390625,
0.00035762786865234375,
-0.00774383544921875,
-0.017486572265625,
-0.056549072265625,
0.03204345703125,
-0.0173492431640625,
0.0167388916015625,
-0.0011205673217773438,
0.014190673828125,
0.01983642578125,
0.007221221923828125,
-0.0211944580078125,
0.01097869873046875,
-0.036468505859375,
0.035400390625,
-0.042083740234375,
-0.0116119384765625,
-0.0043487548828125,
0.0215911865234375,
0.06781005859375,
0.0257720947265625,
-0.0570068359375,
-0.024139404296875,
0.02740478515625,
0.05255126953125,
0.00946807861328125,
0.0377197265625,
-0.015167236328125,
0.037261962890625,
0.041900634765625,
-0.02850341796875,
0.02667236328125,
0.0288848876953125,
-0.033447265625,
0.01004791259765625,
0.01007080078125,
0.0144805908203125,
-0.010650634765625,
-0.042694091796875,
-0.011688232421875,
-0.002613067626953125,
-0.000010311603546142578,
0.0267486572265625,
-0.021148681640625,
0.034515380859375,
0.03131103515625,
-0.07427978515625,
-0.012115478515625,
-0.041473388671875,
0.050750732421875,
0.015411376953125,
0.042205810546875,
0.046478271484375,
0.01299285888671875,
0.0240325927734375,
0.02777099609375,
0.044219970703125,
0.0220184326171875,
-0.0206146240234375,
-0.002048492431640625,
0.021270751953125,
0.0305938720703125,
-0.025299072265625,
0.01006317138671875,
0.0540771484375,
0.0254364013671875,
-0.0226898193359375,
-0.041900634765625,
0.01163482666015625,
-0.005603790283203125,
-0.019805908203125,
-0.0010118484497070312,
-0.0157928466796875,
0.013458251953125,
0.039886474609375,
-0.0262451171875,
-0.0099945068359375,
0.00775146484375,
0.049407958984375,
-0.0018911361694335938,
0.005401611328125,
-0.04791259765625,
-0.043670654296875,
-0.0322265625,
-0.0256805419921875,
0.006755828857421875,
0.05584716796875,
0.047393798828125,
0.00921630859375,
-0.0060272216796875,
-0.027557373046875,
-0.018524169921875,
0.006816864013671875,
-0.0117340087890625,
0.0399169921875,
-0.06097412109375,
-0.04400634765625,
0.0259552001953125,
0.048797607421875,
0.0265960693359375,
0.0193328857421875,
0.0321044921875,
0.032470703125,
0.017364501953125,
0.00951385498046875,
0.06781005859375,
0.0034923553466796875,
-0.0836181640625,
-0.033935546875,
-0.03143310546875,
0.0209808349609375,
0.01453399658203125,
0.04278564453125,
-0.005664825439453125,
0.0229644775390625,
0.04248046875,
-0.005237579345703125,
0.0184326171875,
-0.028961181640625,
0.04583740234375,
-0.00864410400390625,
0.06298828125,
0.0450439453125,
0.0277557373046875,
0.01251983642578125,
0.0002989768981933594,
-0.08660888671875,
-0.0094757080078125,
0.0176849365234375,
-0.052581787109375,
0.037506103515625,
0.061553955078125,
-0.01271820068359375,
-0.005802154541015625,
-0.0277557373046875,
0.055755615234375,
0.0035572052001953125,
-0.012939453125,
0.039215087890625,
-0.051177978515625,
-0.02191162109375,
-0.0008115768432617188,
0.006072998046875,
-0.0125579833984375,
0.05517578125,
0.01346588134765625,
0.00400543212890625,
-0.0021991729736328125,
-0.006107330322265625,
-0.006561279296875,
0.00794219970703125,
-0.0009188652038574219,
0.003421783447265625,
0.00803375244140625,
-0.01209259033203125,
-0.030426025390625,
-0.03314208984375,
0.068115234375,
-0.05181884765625,
-0.0301361083984375,
0.00011479854583740234,
0.033935546875,
-0.0304107666015625,
-0.021453857421875,
-0.055999755859375,
-0.027191162109375,
-0.00963592529296875,
-0.004817962646484375,
-0.0216522216796875,
-0.04736328125,
-0.01018524169921875,
0.051025390625,
0.0162506103515625,
-0.01131439208984375,
0.0391845703125,
-0.06884765625,
0.0645751953125,
0.0377197265625,
-0.0119171142578125,
0.0172576904296875,
-0.01035308837890625,
-0.0296173095703125,
-0.005100250244140625,
0.01049041748046875,
-0.01611328125,
-0.02301025390625,
-0.029815673828125,
-0.036529541015625,
0.00830841064453125,
0.020050048828125,
0.0002168416976928711,
0.01506805419921875,
-0.0237884521484375,
-0.0193023681640625,
-0.0101165771484375,
0.02264404296875,
-0.016265869140625,
-0.0098876953125,
-0.0014629364013671875,
0.016693115234375,
0.0005669593811035156,
-0.023345947265625,
-0.058441162109375,
0.00673675537109375,
0.0305023193359375,
-0.0020580291748046875,
-0.078125,
0.033111572265625,
-0.0294189453125,
0.06317138671875,
-0.0154266357421875,
0.0430908203125,
-0.004718780517578125,
0.0289306640625,
-0.03912353515625,
-0.010162353515625,
0.0116119384765625,
0.035736083984375,
0.01329803466796875,
0.03173828125,
0.03802490234375,
-0.0300750732421875,
0.0212249755859375,
0.002834320068359375,
0.0252227783203125,
0.05218505859375,
-0.00936126708984375,
-0.0007333755493164062,
0.0194091796875,
0.011962890625,
-0.038238525390625,
-0.060516357421875,
0.00921630859375,
-0.055694580078125,
-0.00658416748046875,
-0.023101806640625,
0.005649566650390625,
0.0053558349609375,
-0.0241851806640625,
-0.04437255859375,
0.039031982421875,
-0.010284423828125,
-0.0282745361328125,
-0.0693359375,
0.005496978759765625,
-0.001186370849609375,
-0.0016794204711914062,
-0.0104522705078125,
-0.0367431640625,
-0.03277587890625,
0.052398681640625,
-0.016845703125,
0.042327880859375,
-0.00852203369140625,
0.0032196044921875,
0.006771087646484375,
0.029632568359375,
0.033416748046875,
-0.02276611328125,
-0.0141448974609375,
0.0250244140625,
0.023712158203125,
0.03759765625,
-0.0081329345703125,
0.08770751953125,
0.01070404052734375,
-0.01531219482421875,
-0.006938934326171875,
-0.0136260986328125,
-0.055450439453125,
-0.019378662109375,
0.048553466796875,
0.08795166015625,
0.0210113525390625,
-0.0311126708984375,
-0.00534820556640625,
-0.049468994140625,
-0.0195465087890625,
0.004810333251953125,
0.0228424072265625,
-0.050018310546875,
0.012237548828125,
0.04498291015625,
0.018341064453125,
0.00067138671875,
-0.036651611328125,
-0.01517486572265625,
-0.0372314453125,
-0.0172576904296875,
0.0105133056640625,
-0.0192108154296875,
0.055694580078125,
-0.00821685791015625,
-0.0218353271484375,
0.00807952880859375,
-0.03271484375,
-0.00616455078125,
-0.004398345947265625,
-0.046722412109375,
-0.0160369873046875,
0.021453857421875,
0.00025844573974609375,
0.00616455078125,
0.00994873046875,
0.018218994140625,
0.001010894775390625,
0.0213470458984375,
-0.0231781005859375,
0.0192108154296875,
0.002979278564453125,
0.0126800537109375,
-0.045196533203125,
0.060577392578125,
0.0198822021484375,
0.044525146484375,
0.0214691162109375,
0.0206451416015625,
0.004764556884765625,
0.032318115234375,
-0.00440216064453125,
-0.0235748291015625,
0.005619049072265625,
-0.0264739990234375,
0.004398345947265625,
0.0006647109985351562,
-0.0072174072265625,
-0.0007753372192382812,
-0.021942138671875,
-0.037567138671875,
-0.01442718505859375,
-0.01861572265625
]
|
8f22b8980e7278e973be4ec2b45400d5d446ea26 | Wordpress Stackexchange
Q: Adding Image in readme.txt file of wordpress plugin It is possible to add a gif file in the readme.txt file of wordpress plugin in the wordpress.org plugin repository?
My plugin url is https://wordpress.org/plugins/wp-toggle-comments-form-fields/
I don't want the image in the screeshot section - I need the image in the description section.
I know that i can insert a video but in my plugin a little gif will be ok...
A: While I cannot remember on top of my head live example of plugin with a gif, there are quite a few with videos and at least ones using animated PNG as header (AJAX Comment Loading).
So I would say — yes you can, but no guarantee it will end up well. It's not explicitly forbidden or allowed either. :) Might be better to load gif from plugin too (like screenshots) and not as external resource.
| Q: Adding Image in readme.txt file of wordpress plugin It is possible to add a gif file in the readme.txt file of wordpress plugin in the wordpress.org plugin repository?
My plugin url is https://wordpress.org/plugins/wp-toggle-comments-form-fields/
I don't want the image in the screeshot section - I need the image in the description section.
I know that i can insert a video but in my plugin a little gif will be ok...
A: While I cannot remember on top of my head live example of plugin with a gif, there are quite a few with videos and at least ones using animated PNG as header (AJAX Comment Loading).
So I would say — yes you can, but no guarantee it will end up well. It's not explicitly forbidden or allowed either. :) Might be better to load gif from plugin too (like screenshots) and not as external resource.
A: Rarst - Thanks for your answer.
I found that you can't add image at all to the description tab, you can add only video from youtube, vimeo or wordpress in this tab.
You can add a jpg , png or gif (animated gif too) to the screenshoot section or to the banner that appear in head of plugin page.
In other words you can add any type of images to files that go to assets folder that its means screenshoots, banners and etc.
In my case:
https://wordpress.org/plugins/wp-toggle-comments-form-fields/
I added a youtube to the description tab and a animated gif to the screenshots tab
| wordpress | {
"language": "en",
"length": 250,
"provenance": "stackexchange_00019.jsonl.gz:450096",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166938"
} | [
0.071044921875,
-0.0130157470703125,
0.049224853515625,
-0.0197906494140625,
-0.010955810546875,
-0.0221099853515625,
0.05731201171875,
-0.0226593017578125,
-0.0177001953125,
0.029449462890625,
-0.05230712890625,
0.032562255859375,
-0.0169525146484375,
0.02105712890625,
-0.0170135498046875,
-0.043212890625,
0.0144500732421875,
0.0328369140625,
0.05755615234375,
0.0028476715087890625,
0.00579071044921875,
0.00778961181640625,
0.0260009765625,
0.0037517547607421875,
-0.0200653076171875,
0.01441192626953125,
0.15478515625,
-0.0236663818359375,
0.0064544677734375,
-0.0169525146484375,
0.01461029052734375,
-0.038543701171875,
0.029510498046875,
0.02203369140625,
-0.03411865234375,
-0.01039886474609375,
0.00957489013671875,
-0.01500701904296875,
-0.01593017578125,
0.05438232421875,
0.0181884765625,
-0.0015859603881835938,
0.01352691650390625,
-0.0005183219909667969,
-0.008819580078125,
-0.0008411407470703125,
-0.00457000732421875,
-0.037139892578125,
0.03228759765625,
-0.0035076141357421875,
0.01027679443359375,
0.03814697265625,
0.0223846435546875,
-0.006565093994140625,
-0.00800323486328125,
0.020904541015625,
-0.05743408203125,
0.07147216796875,
0.01192474365234375,
-0.0163421630859375,
-0.01386260986328125,
0.0094757080078125,
0.00942230224609375,
0.0186920166015625,
0.00046443939208984375,
-0.008453369140625,
-0.03753662109375,
0.0250091552734375,
-0.0287628173828125,
0.01450347900390625,
0.0254364013671875,
-0.0384521484375,
-0.01104736328125,
-0.057586669921875,
-0.0138702392578125,
0.037445068359375,
0.00521087646484375,
-0.01953125,
0.0068206787109375,
-0.0180816650390625,
0.01239013671875,
-0.0056304931640625,
0.0015115737915039062,
-0.0169830322265625,
0.022186279296875,
-0.00982666015625,
0.004932403564453125,
-0.01025390625,
-0.0291748046875,
-0.00040030479431152344,
-0.0271759033203125,
0.016387939453125,
-0.055572509765625,
0.03369140625,
-0.0137176513671875,
0.019775390625,
-0.034423828125,
-0.0020809173583984375,
-0.00827789306640625,
0.07244873046875,
-0.0225067138671875,
-0.0266876220703125,
0.08319091796875,
-0.0447998046875,
-0.0023097991943359375,
0.0295562744140625,
-0.0015916824340820312,
-0.0162811279296875,
0.0145263671875,
0.0316162109375,
0.0006632804870605469,
-0.00762939453125,
0.01000213623046875,
-0.07586669921875,
0.016357421875,
0.048431396484375,
0.0136871337890625,
0.049102783203125,
0.0233001708984375,
0.0215911865234375,
-0.03173828125,
-0.001308441162109375,
0.024658203125,
0.0155792236328125,
-0.021484375,
-0.01544189453125,
0.0154571533203125,
-0.033355712890625,
-0.0230712890625,
-0.024444580078125,
-0.000827789306640625,
0.04046630859375,
0.031402587890625,
0.038970947265625,
-0.004741668701171875,
0.0112762451171875,
0.0005965232849121094,
-0.014801025390625,
-0.01763916015625,
0.011199951171875,
-0.041412353515625,
-0.0188140869140625,
0.03521728515625,
-0.054107666015625,
0.00794219970703125,
0.01314544677734375,
0.00061798095703125,
0.015533447265625,
0.010040283203125,
-0.014312744140625,
0.0148773193359375,
-0.0504150390625,
0.01450347900390625,
0.013916015625,
0.03607177734375,
-0.03436279296875,
0.029388427734375,
-0.03759765625,
0.04364013671875,
-0.0257110595703125,
0.0203704833984375,
0.0009870529174804688,
0.0201263427734375,
-0.016571044921875,
-0.0193939208984375,
-0.01364898681640625,
-0.041351318359375,
-0.0023326873779296875,
0.0258636474609375,
0.032135009765625,
-0.035980224609375,
-0.0159759521484375,
0.0009112358093261719,
0.02044677734375,
-0.005481719970703125,
0.035125732421875,
0.0123443603515625,
0.030609130859375,
-0.00478363037109375,
0.06304931640625,
0.00806427001953125,
-0.0297393798828125,
0.0618896484375,
-0.0181884765625,
-0.019317626953125,
-0.0311431884765625,
-0.01520538330078125,
0.0064239501953125,
0.03546142578125,
0.0237274169921875,
-0.01221466064453125,
-0.010986328125,
-0.05694580078125,
-0.02569580078125,
-0.0162506103515625,
0.01220703125,
0.017669677734375,
0.01134490966796875,
-0.00086212158203125,
0.0229339599609375,
-0.0058746337890625,
-0.0177154541015625,
0.0156097412109375,
-0.0074920654296875,
-0.03204345703125,
-0.0247802734375,
-0.0198516845703125,
0.0260009765625,
-0.01314544677734375,
0.018096923828125,
-0.018310546875,
-0.03594970703125,
0.01007080078125,
-0.0273895263671875,
-0.001972198486328125,
0.01386260986328125,
-0.009368896484375,
0.021697998046875,
0.0157012939453125,
0.0321044921875,
-0.0006809234619140625,
0.015838623046875,
-0.0123443603515625,
-0.0208892822265625,
-0.0026531219482421875,
0.019989013671875,
-0.0355224609375,
0.00125885009765625,
-0.01953125,
0.0205230712890625,
-0.00824737548828125,
0.0159912109375,
-0.0228729248046875,
-0.0162353515625,
-0.01439666748046875,
-0.0005784034729003906,
0.0038471221923828125,
-0.07281494140625,
0.0211334228515625,
0.036407470703125,
0.042572021484375,
0.00225067138671875,
-0.0091705322265625,
-0.0037384033203125,
0.056640625,
0.037933349609375,
0.04815673828125,
-0.036651611328125,
-0.007167816162109375,
-0.004726409912109375,
-0.01071929931640625,
0.0018625259399414062,
0.0211334228515625,
-0.04388427734375,
0.012298583984375,
0.0303497314453125,
-0.0034923553466796875,
-0.0201263427734375,
-0.03924560546875,
0.0234527587890625,
0.0293731689453125,
-0.0169677734375,
-0.053375244140625,
-0.004932403564453125,
0.0218353271484375,
-0.0032196044921875,
0.026519775390625,
0.04022216796875,
-0.016815185546875,
-0.007663726806640625,
0.023834228515625,
0.01445770263671875,
-0.0018787384033203125,
0.054351806640625,
0.0262451171875,
0.0275115966796875,
-0.0264434814453125,
-0.0233917236328125,
0.0030422210693359375,
0.0305633544921875,
-0.04693603515625,
-0.06842041015625,
-0.031494140625,
-0.0100250244140625,
0.0230255126953125,
-0.049560546875,
0.03350830078125,
-0.016082763671875,
-0.002498626708984375,
0.0305023193359375,
0.06329345703125,
-0.00441741943359375,
0.0035953521728515625,
-0.0176239013671875,
-0.003925323486328125,
-0.0095062255859375,
0.042205810546875,
-0.0797119140625,
0.06103515625,
-0.03155517578125,
0.0689697265625,
0.07904052734375,
-0.00850677490234375,
0.00470733642578125,
-0.0037517547607421875,
-0.03619384765625,
-0.043609619140625,
0.0089111328125,
-0.0135650634765625,
-0.0131378173828125,
-0.05523681640625,
0.03021240234375,
0.01715087890625,
-0.0191650390625,
0.01451873779296875,
-0.024383544921875,
-0.01263427734375,
0.01015472412109375,
-0.0775146484375,
-0.042938232421875,
-0.0117034912109375,
-0.06787109375,
-0.015869140625,
0.0134735107421875,
-0.050750732421875,
-0.0004401206970214844,
0.050048828125,
-0.006900787353515625,
-0.07537841796875,
-0.0106048583984375,
-0.020263671875,
-0.054229736328125,
-0.045379638671875,
0.0009860992431640625,
-0.0029773712158203125,
0.021453857421875,
0.00121307373046875,
0.069091796875,
0.0125732421875,
-0.029541015625,
-0.0008673667907714844,
0.034393310546875,
0.0202178955078125,
0.0037097930908203125,
0.00218963623046875,
0.0200653076171875,
0.019134521484375,
0.00859832763671875,
0.01165771484375,
0.038116455078125,
-0.047332763671875,
-0.014892578125,
-0.0202484130859375,
0.00548553466796875,
-0.022491455078125,
0.03741455078125,
0.033782958984375,
-0.04913330078125,
-0.040618896484375,
-0.0804443359375,
0.003265380859375,
-0.0016326904296875,
-0.017364501953125,
-0.0239410400390625,
0.0191802978515625,
-0.01812744140625,
-0.0411376953125,
0.0058441162109375,
-0.00896453857421875,
0.051025390625,
0.048187255859375,
-0.00766754150390625,
0.01416778564453125,
-0.0465087890625,
-0.08154296875,
-0.04461669921875,
0.05230712890625,
-0.0027313232421875,
0.017974853515625,
0.0034351348876953125,
0.01464080810546875,
-0.028167724609375,
0.032470703125,
-0.0860595703125,
-0.004833221435546875,
0.022613525390625,
-0.01611328125,
0.0127716064453125,
-0.013885498046875,
-0.00982666015625,
0.00043702125549316406,
0.042144775390625,
0.032623291015625,
-0.0296173095703125,
-0.026824951171875,
0.0006389617919921875,
-0.042816162109375,
-0.014984130859375,
-0.01194000244140625,
0.0078582763671875,
-0.0301513671875,
0.00843048095703125,
0.01190948486328125,
-0.031463623046875,
0.0242156982421875,
0.0089569091796875,
-0.00196075439453125,
-0.0298309326171875,
-0.01007843017578125,
-0.004119873046875,
0.022186279296875,
0.017303466796875,
-0.01152801513671875,
0.022705078125,
0.028411865234375,
-0.0640869140625,
-0.0880126953125,
-0.0062103271484375,
-0.05462646484375,
0.0712890625,
0.02392578125,
-0.02630615234375,
-0.017974853515625,
0.039398193359375,
-0.0163421630859375,
0.048095703125,
0.005523681640625,
0.01375579833984375,
-0.0003674030303955078,
0.0186920166015625,
0.042510986328125,
-0.023712158203125,
-0.0124664306640625,
-0.005889892578125,
0.0005102157592773438,
0.01373291015625,
-0.016693115234375,
-0.04705810546875,
0.0092620849609375,
-0.0172882080078125,
-0.0248565673828125,
-0.0206756591796875,
-0.00344085693359375,
0.0011119842529296875,
0.017181396484375,
-0.0294952392578125,
-0.04705810546875,
0.00020897388458251953,
0.0024166107177734375,
-0.0249176025390625,
0.01287841796875,
0.033233642578125,
0.054229736328125,
0.01023101806640625,
0.0013170242309570312,
-0.0906982421875,
0.0199127197265625,
0.0343017578125,
0.022613525390625,
0.020416259765625,
-0.000016629695892333984,
-0.028411865234375,
0.047943115234375,
0.01496124267578125,
0.041900634765625,
-0.054412841796875,
0.0199432373046875,
0.0093231201171875,
-0.028411865234375,
0.052947998046875,
0.0498046875,
-0.02020263671875,
-0.00821685791015625,
-0.0218658447265625,
-0.0096282958984375,
-0.0275115966796875,
0.01488494873046875,
-0.01751708984375,
0.06402587890625,
0.002689361572265625,
-0.0533447265625,
0.01055908203125,
-0.02490234375,
0.0775146484375,
0.027740478515625,
-0.01061248779296875,
0.06329345703125,
0.0260162353515625,
-0.0100555419921875,
0.040985107421875,
0.0136260986328125,
0.0009284019470214844,
0.0192108154296875,
0.036346435546875,
-0.033966064453125,
0.00577545166015625,
-0.0098876953125,
0.07080078125,
-0.00290679931640625,
-0.0210113525390625,
-0.05108642578125,
-0.0028553009033203125,
0.025299072265625,
-0.0027599334716796875,
0.03717041015625,
0.027130126953125,
0.024139404296875,
-0.0104827880859375,
-0.0062255859375,
0.018035888671875,
0.018310546875,
-0.03662109375,
0.042449951171875,
0.00627899169921875,
-0.01116943359375,
0.0231475830078125,
0.010101318359375,
-0.003551483154296875,
0.0009226799011230469,
-0.01007843017578125,
0.041900634765625,
0.035614013671875,
0.0287017822265625,
0.0294036865234375,
-0.01488494873046875,
-0.007266998291015625,
0.0012178421020507812,
-0.0396728515625,
-0.053497314453125,
-0.01461029052734375,
-0.04034423828125,
0.025177001953125,
-0.03192138671875,
-0.03192138671875,
0.0911865234375,
-0.00617218017578125,
-0.022369384765625,
0.01206207275390625,
0.0007967948913574219,
-0.00518798828125,
-0.039520263671875,
-0.00926971435546875,
0.046630859375,
0.0251617431640625,
0.01233673095703125,
-0.024139404296875,
0.0211029052734375,
-0.0024127960205078125,
0.03326416015625,
-0.0438232421875,
-0.0085906982421875,
-0.00485992431640625,
-0.004425048828125,
-0.0132598876953125,
-0.041778564453125,
-0.005870819091796875,
-0.01450347900390625,
-0.0072021484375,
-0.0007185935974121094,
0.039642333984375,
0.004550933837890625,
0.0247955322265625,
-0.04046630859375,
0.005886077880859375,
-0.02398681640625,
-0.01100921630859375,
0.045867919921875,
0.0137939453125,
-0.04473876953125,
-0.004749298095703125,
-0.03692626953125,
-0.0190582275390625,
0.00403594970703125,
-0.010711669921875,
-0.052703857421875,
-0.012451171875,
0.003757476806640625,
0.024932861328125,
-0.01971435546875,
-0.0032367706298828125,
0.002338409423828125,
0.0301666259765625,
-0.00551605224609375,
0.06304931640625,
0.032958984375,
-0.01540374755859375,
-0.0134735107421875,
-0.009521484375,
0.011749267578125,
-0.01439666748046875,
-0.01654052734375,
-0.0301513671875,
-0.0257568359375,
-0.0267486572265625,
0.00766754150390625,
0.006000518798828125,
0.0235595703125,
0.029205322265625,
0.03778076171875,
0.013275146484375,
-0.006389617919921875,
0.008575439453125,
0.006389617919921875,
-0.0237579345703125,
0.01190185546875,
0.03192138671875,
-0.01247406005859375,
0.03924560546875,
-0.024810791015625,
0.034210205078125,
-0.00872039794921875,
0.00997161865234375,
-0.01371002197265625,
-0.0179290771484375,
-0.0102996826171875,
0.02276611328125,
-0.04522705078125,
0.04669189453125,
0.0745849609375,
0.022491455078125,
0.0526123046875,
0.029388427734375,
0.02056884765625,
0.0262603759765625,
0.052215576171875,
0.022796630859375,
-0.053985595703125,
0.03948974609375,
0.009429931640625,
-0.0135498046875,
0.016632080078125,
-0.0260009765625,
0.039642333984375,
-0.010406494140625,
0.0301361083984375,
-0.0455322265625,
0.035003662109375,
-0.021453857421875,
-0.01544952392578125,
0.1026611328125,
-0.00621795654296875,
-0.0235137939453125,
-0.023651123046875,
0.0299224853515625,
-0.02276611328125,
-0.0203704833984375,
0.015655517578125,
0.019317626953125,
0.0015039443969726562,
0.020904541015625,
-0.00042724609375,
0.0019016265869140625,
-0.0850830078125,
-0.00478363037109375,
0.06304931640625,
-0.022125244140625,
-0.003459930419921875,
0.01143646240234375,
-0.00751495361328125,
-0.00250244140625,
-0.0252838134765625,
0.01904296875,
-0.03466796875,
-0.0026340484619140625,
0.034088134765625,
0.0235443115234375,
0.0301971435546875,
0.043548583984375,
0.006481170654296875,
-0.00453948974609375,
0.004428863525390625,
0.01316070556640625,
0.0343017578125,
-0.0364990234375,
-0.0110626220703125,
0.0648193359375,
-0.05999755859375,
0.00960540771484375,
0.003673553466796875,
0.039215087890625,
0.00861358642578125,
0.0194549560546875,
0.05029296875,
-0.0225982666015625,
-0.0216522216796875,
0.04339599609375,
-0.01139068603515625,
-0.0286712646484375,
-0.0204315185546875,
0.01287078857421875,
-0.0657958984375,
-0.0078887939453125,
0.00028514862060546875,
0.01541900634765625,
0.00745391845703125,
0.0003001689910888672,
-0.10943603515625,
0.06964111328125,
0.019989013671875,
0.03839111328125,
-0.0367431640625,
0.0274810791015625,
-0.017120361328125,
-0.016357421875,
-0.0191192626953125,
0.030181884765625,
-0.04486083984375,
0.04571533203125,
-0.01058197021484375,
0.01117706298828125,
0.035614013671875,
0.0204010009765625,
0.06781005859375,
0.0088958740234375,
-0.03594970703125,
-0.002628326416015625,
0.090087890625,
0.044158935546875,
0.015655517578125,
0.03192138671875,
0.037628173828125,
-0.0184326171875,
0.009979248046875,
0.026947021484375,
0.035797119140625,
-0.04583740234375,
-0.0010824203491210938,
0.058868408203125,
-0.01291656494140625,
-0.01422119140625,
0.0135498046875,
-0.0095367431640625,
-0.0059967041015625,
0.0034198760986328125,
0.002895355224609375,
-0.0264129638671875,
0.00168609619140625,
0.032745361328125,
0.01497650146484375,
0.0226593017578125,
-0.0025768280029296875,
-0.0010013580322265625,
0.027801513671875,
-0.003932952880859375,
0.02117919921875,
0.0222930908203125,
0.0234527587890625,
0.043609619140625,
-0.0294647216796875,
0.00911712646484375,
0.0216217041015625,
-0.043670654296875,
0.0478515625,
0.0006999969482421875,
-0.000926971435546875,
-0.052276611328125,
0.0113677978515625,
0.036956787109375,
0.050537109375,
-0.045867919921875,
-0.01148223876953125,
0.00806427001953125,
-0.00994110107421875,
0.007068634033203125,
-0.0343017578125,
-0.0011568069458007812,
-0.0198822021484375,
-0.0165557861328125,
-0.0038909912109375,
-0.0101165771484375,
0.0003559589385986328,
0.00864410400390625,
0.0048828125,
0.0239715576171875,
-0.0024871826171875,
-0.00559234619140625,
-0.04510498046875,
0.042205810546875,
0.004180908203125,
0.0189208984375,
-0.0014095306396484375,
0.059478759765625,
0.03607177734375,
-0.00901031494140625,
-0.00897979736328125,
0.02484130859375,
-0.00910186767578125,
0.0197906494140625,
-0.0225372314453125,
-0.04217529296875,
0.010162353515625,
0.037017822265625,
0.032012939453125,
0.0153961181640625,
0.020599365234375,
0.034423828125,
0.0031452178955078125,
0.004421234130859375,
0.04248046875,
0.0007710456848144531,
0.0264129638671875,
-0.0261077880859375,
0.03314208984375,
0.03387451171875,
-0.0213470458984375,
-0.00920867919921875,
-0.00921630859375,
0.05859375,
-0.048004150390625,
0.0288848876953125,
-0.0141754150390625,
-0.033599853515625,
0.049713134765625,
-0.01251220703125,
0.05279541015625,
-0.028228759765625,
-0.07305908203125,
-0.02490234375,
0.00522613525390625,
-0.0267333984375,
0.01171112060546875,
0.03619384765625,
-0.03216552734375,
0.03436279296875,
0.0135040283203125,
0.01346588134765625,
0.01084136962890625,
-0.045562744140625,
0.032470703125,
-0.01198577880859375,
0.015411376953125,
0.01395416259765625,
-0.013671875,
-0.025390625,
0.004833221435546875,
0.0516357421875,
0.0068359375,
0.039215087890625,
-0.01294708251953125,
0.0189666748046875,
0.0127410888671875,
-0.038726806640625,
0.0027332305908203125,
0.0034198760986328125,
0.0013322830200195312,
-0.013275146484375,
-0.0380859375,
-0.0152435302734375,
-0.019317626953125,
0.061126708984375,
-0.003147125244140625,
0.004848480224609375,
0.03668212890625,
-0.01708984375,
-0.00397491455078125,
0.0181427001953125,
0.0084075927734375,
-0.020721435546875,
-0.031829833984375,
-0.039215087890625,
0.0145721435546875,
0.0168609619140625,
0.01091766357421875,
-0.027679443359375,
0.022003173828125,
0.020263671875,
0.02215576171875,
0.02301025390625,
-0.005451202392578125,
0.022674560546875,
0.0239410400390625,
-0.02734375,
-0.031402587890625,
-0.01488494873046875,
-0.0193328857421875,
0.02398681640625,
-0.0222015380859375,
0.049652099609375,
-0.01023101806640625,
-0.042388916015625,
0.02337646484375,
-0.005779266357421875,
0.02557373046875,
-0.041351318359375,
-0.0035552978515625,
0.01849365234375,
0.01250457763671875,
-0.0089874267578125,
0.01514434814453125,
-0.028411865234375,
-0.088623046875,
-0.000881195068359375,
-0.0017833709716796875,
-0.05633544921875,
-0.030029296875,
-0.0272369384765625,
-0.0007991790771484375,
0.005706787109375,
0.015350341796875,
-0.0853271484375,
0.03851318359375,
0.01233673095703125,
0.029937744140625,
-0.022369384765625,
-0.025146484375,
-0.0144500732421875,
-0.02471923828125,
-0.0264129638671875,
-0.0672607421875,
-0.051727294921875,
0.04864501953125,
-0.040863037109375,
0.0433349609375,
0.043609619140625,
-0.046844482421875,
0.0237579345703125,
0.0716552734375,
0.06390380859375,
0.11676025390625,
-0.0252838134765625,
-0.006175994873046875,
-0.0080413818359375,
0.0217132568359375,
-0.037567138671875,
-0.037353515625,
0.041473388671875,
-0.0260772705078125,
-0.037872314453125,
-0.035064697265625,
0.004608154296875,
0.003070831298828125,
-0.05950927734375,
-0.1173095703125,
0.0364990234375,
-0.0276031494140625,
-0.04180908203125,
0.0013608932495117188,
-0.01125335693359375,
-0.0294952392578125,
0.06463623046875,
0.02099609375,
-0.012176513671875,
0.006290435791015625,
0.0236358642578125,
-0.0098114013671875,
0.007167816162109375,
0.007843017578125,
-0.020660400390625,
-0.00792694091796875,
0.0202484130859375,
0.04571533203125,
-0.026092529296875,
0.015869140625,
-0.02099609375,
0.0273590087890625,
0.0301513671875,
-0.03973388671875,
-0.034698486328125,
-0.01213836669921875,
0.0007476806640625,
-0.027862548828125,
-0.0165252685546875,
0.0164794921875,
0.03546142578125,
0.03814697265625,
0.0455322265625,
-0.0068817138671875,
-0.051116943359375,
-0.00586700439453125,
-0.0268096923828125,
-0.0194854736328125,
-0.023712158203125,
0.0266265869140625,
-0.0716552734375,
-0.018402099609375,
0.0053253173828125,
-0.006565093994140625,
-0.0200347900390625,
-0.01186370849609375,
-0.04180908203125,
-0.011566162109375,
-0.0020961761474609375,
0.0192718505859375,
-0.0211181640625,
0.0178680419921875,
0.11016845703125,
-0.0665283203125,
0.005466461181640625,
0.015625,
-0.00634765625,
0.06695556640625,
-0.0157623291015625,
0.0179290771484375,
0.01166534423828125,
-0.0290679931640625,
0.0264129638671875,
0.0130462646484375,
0.07720947265625,
-0.0408935546875,
-0.025146484375,
-0.036041259765625,
-0.0011491775512695312,
0.01097869873046875,
-0.01023101806640625,
-0.0198211669921875,
0.02850341796875,
0.019989013671875,
0.051055908203125,
-0.023712158203125,
-0.07196044921875,
-0.0289154052734375,
0.0154571533203125,
-0.0300140380859375,
0.00684356689453125,
0.0019369125366210938,
-0.0479736328125,
0.00800323486328125,
0.01226043701171875,
-0.0111541748046875,
-0.0204315185546875,
0.009307861328125,
-0.05438232421875,
-0.01317596435546875,
0.0081939697265625
]
|
288c3ace9ffe36945aef2d209865eeea76bd2559 | Wordpress Stackexchange
Q: How to add extra language packs to WordPress I've got a multisite which I installed in Dutch.
Therefore English and Dutch are available in the general settings tab.
But I need to add German and French.
I can't select any other language from the drop down.
And if I add a language in the wp-config.php it just gives a notice without any direction.
Of course I googled but I can't seem to find anything useful.
How can I active an other language and download the .PO/.MO files?
*
*http://codex.wordpress.org/WordPress_Localization
*http://codex.wordpress.org/Installing_WordPress_in_Your_Language
A: So what should do is head over to https://translate.wordpress.org/projects/wp/dev
And download the language .mo files, and copy them to your wp-content/languages/ folder.
This should allow you to select other languages.
| Q: How to add extra language packs to WordPress I've got a multisite which I installed in Dutch.
Therefore English and Dutch are available in the general settings tab.
But I need to add German and French.
I can't select any other language from the drop down.
And if I add a language in the wp-config.php it just gives a notice without any direction.
Of course I googled but I can't seem to find anything useful.
How can I active an other language and download the .PO/.MO files?
*
*http://codex.wordpress.org/WordPress_Localization
*http://codex.wordpress.org/Installing_WordPress_in_Your_Language
A: So what should do is head over to https://translate.wordpress.org/projects/wp/dev
And download the language .mo files, and copy them to your wp-content/languages/ folder.
This should allow you to select other languages.
A: *
*The easiest way for me is to change language settings for main blog
multiple times (as mach as many languages I need) and WordPress will
load these languages automatically.
*And after that I go to Update page and update language packages (loads languages for
themes, plugins, etc.)
A: To make it clearer:
*
*go to https://translate.wordpress.org/projects/wp/dev (as explained by @Bordoni)
*choose your language
*scroll to the bottom of the page
*select export (both .po and .mo)
*put those files (rename them to the isocode, like fr_FR.po and fr_FR.mo) in wp-content/languages/
It felt complex to me to find that information somewhere in the standard WordPress documentation site.
| wordpress | {
"language": "en",
"length": 230,
"provenance": "stackexchange_00019.jsonl.gz:450104",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166960"
} | [
0.016876220703125,
-0.0169525146484375,
0.025482177734375,
0.004734039306640625,
-0.032470703125,
-0.01311492919921875,
0.0190582275390625,
-0.042999267578125,
-0.0282440185546875,
0.007511138916015625,
-0.0198974609375,
0.01515960693359375,
-0.0159454345703125,
-0.01824951171875,
0.019073486328125,
-0.017364501953125,
0.0377197265625,
-0.00055694580078125,
0.0268402099609375,
0.0135650634765625,
-0.0207366943359375,
0.036956787109375,
0.0338134765625,
-0.007228851318359375,
0.01702880859375,
-0.0118865966796875,
0.0214996337890625,
-0.0384521484375,
-0.00681304931640625,
-0.025604248046875,
0.02093505859375,
0.023651123046875,
0.03253173828125,
-0.0191192626953125,
-0.0023822784423828125,
-0.0157012939453125,
0.00555419921875,
-0.031982421875,
-0.0215911865234375,
0.046417236328125,
0.0148468017578125,
-0.0180511474609375,
0.0458984375,
0.07525634765625,
0.010711669921875,
-0.04901123046875,
0.022796630859375,
-0.05126953125,
-0.00860595703125,
-0.048797607421875,
0.01480865478515625,
-0.0306549072265625,
0.044464111328125,
-0.0667724609375,
-0.007595062255859375,
-0.00433349609375,
-0.017333984375,
0.051483154296875,
0.01314544677734375,
0.01136016845703125,
-0.0224761962890625,
0.03436279296875,
0.0014734268188476562,
-0.0095977783203125,
-0.0126800537109375,
0.008087158203125,
-0.021087646484375,
0.00260162353515625,
-0.038330078125,
-0.00588226318359375,
0.0292816162109375,
-0.046234130859375,
0.01522064208984375,
-0.052764892578125,
-0.0026531219482421875,
0.04559326171875,
-0.05877685546875,
-0.02655029296875,
0.049835205078125,
-0.029022216796875,
0.0242919921875,
-0.00434112548828125,
-0.0007405281066894531,
-0.015380859375,
0.0051116943359375,
-0.0028934478759765625,
-0.004119873046875,
-0.0120391845703125,
-0.06207275390625,
-0.018463134765625,
-0.0318603515625,
-0.04736328125,
-0.0836181640625,
0.03497314453125,
0.01605224609375,
-0.01184844970703125,
-0.01178741455078125,
0.0036678314208984375,
-0.0005712509155273438,
0.03717041015625,
-0.01259613037109375,
-0.045379638671875,
0.06463623046875,
-0.042999267578125,
0.00963592529296875,
-0.01457977294921875,
-0.00731658935546875,
0.0210418701171875,
0.0367431640625,
0.042694091796875,
-0.0169830322265625,
0.050506591796875,
0.03741455078125,
-0.01035308837890625,
-0.0274200439453125,
-0.01812744140625,
0.003070831298828125,
0.0105133056640625,
0.0134735107421875,
-0.0272979736328125,
0.004398345947265625,
0.052001953125,
-0.06915283203125,
-0.03411865234375,
-0.0145263671875,
-0.051605224609375,
-0.0004963874816894531,
0.0238189697265625,
-0.0175323486328125,
0.021392822265625,
-0.01153564453125,
0.023162841796875,
0.0017328262329101562,
0.00223541259765625,
-0.043975830078125,
-0.011627197265625,
0.0012760162353515625,
0.0216064453125,
0.006511688232421875,
0.00006890296936035156,
0.0225067138671875,
-0.0303497314453125,
-0.004589080810546875,
0.0241851806640625,
0.00701904296875,
-0.01800537109375,
0.0074005126953125,
0.035308837890625,
0.0256195068359375,
0.002346038818359375,
0.02825927734375,
-0.03106689453125,
0.02020263671875,
0.015960693359375,
-0.0201568603515625,
-0.025360107421875,
-0.01084136962890625,
-0.0190582275390625,
0.0311737060546875,
-0.0207366943359375,
-0.052276611328125,
-0.041412353515625,
-0.005767822265625,
-0.01544952392578125,
-0.016571044921875,
0.0423583984375,
0.012115478515625,
0.0259246826171875,
0.02435302734375,
-0.00823974609375,
0.01128387451171875,
-0.01070404052734375,
0.006198883056640625,
-0.0093841552734375,
-0.005680084228515625,
0.00791168212890625,
-0.009796142578125,
0.019744873046875,
0.020721435546875,
0.03814697265625,
0.0262603759765625,
-0.01181793212890625,
0.08221435546875,
-0.00030994415283203125,
-0.0276641845703125,
-0.00839996337890625,
0.0095977783203125,
0.061981201171875,
0.019561767578125,
0.019683837890625,
0.01435089111328125,
-0.0205535888671875,
-0.040496826171875,
0.006317138671875,
-0.027618408203125,
-0.0199432373046875,
-0.01116943359375,
0.008636474609375,
-0.024658203125,
0.01126861572265625,
0.0287322998046875,
-0.01580810546875,
-0.0004911422729492188,
-0.01398468017578125,
-0.056884765625,
-0.017059326171875,
-0.017669677734375,
0.0128631591796875,
0.0156707763671875,
-0.02850341796875,
-0.0004706382751464844,
-0.03826904296875,
0.01119232177734375,
-0.03582763671875,
-0.07183837890625,
0.043853759765625,
-0.0302276611328125,
0.07452392578125,
0.019012451171875,
0.0400390625,
0.052886962890625,
-0.07025146484375,
0.056640625,
-0.029266357421875,
0.0162506103515625,
0.0012483596801757812,
-0.0301361083984375,
-0.0092926025390625,
0.01812744140625,
0.00453948974609375,
0.011932373046875,
0.0428466796875,
-0.036773681640625,
-0.005680084228515625,
0.0087890625,
0.000400543212890625,
0.00923919677734375,
-0.057708740234375,
0.022003173828125,
0.030029296875,
0.0311737060546875,
0.05657958984375,
0.032196044921875,
0.030487060546875,
0.042236328125,
-0.00931549072265625,
0.037109375,
-0.01824951171875,
0.01861572265625,
0.068115234375,
0.01276397705078125,
-0.0001137852668762207,
-0.01377105712890625,
-0.050994873046875,
0.0064697265625,
0.0235443115234375,
-0.0640869140625,
-0.0867919921875,
0.0163726806640625,
-0.0043487548828125,
0.028411865234375,
-0.047454833984375,
-0.041748046875,
-0.004177093505859375,
0.02508544921875,
-0.0184783935546875,
0.005893707275390625,
0.003406524658203125,
-0.0159912109375,
0.0014410018920898438,
0.01139068603515625,
-0.0305328369140625,
0.0146026611328125,
0.032867431640625,
-0.04351806640625,
0.015533447265625,
0.010467529296875,
-0.01189422607421875,
-0.009674072265625,
0.007091522216796875,
-0.0176849365234375,
0.0280914306640625,
-0.00782012939453125,
-0.01444244384765625,
0.015594482421875,
-0.0457763671875,
-0.00763702392578125,
-0.0279998779296875,
-0.04345703125,
-0.03277587890625,
0.0220947265625,
-0.003551483154296875,
-0.042266845703125,
0.01113128662109375,
-0.00518798828125,
-0.022186279296875,
0.06707763671875,
-0.025848388671875,
0.01934814453125,
-0.0172882080078125,
0.047515869140625,
0.049072265625,
-0.00881195068359375,
-0.01465606689453125,
-0.00397491455078125,
-0.01727294921875,
-0.0183868408203125,
-0.000032782554626464844,
-0.025543212890625,
-0.0254364013671875,
-0.060546875,
0.00011938810348510742,
-0.0033969879150390625,
-0.0390625,
-0.00867462158203125,
-0.01483154296875,
-0.022125244140625,
-0.03155517578125,
-0.061431884765625,
-0.0184173583984375,
-0.020843505859375,
-0.03424072265625,
0.032867431640625,
0.0179595947265625,
0.0013723373413085938,
-0.041839599609375,
0.033111572265625,
0.00850677490234375,
0.014556884765625,
-0.042236328125,
0.0018262863159179688,
-0.041412353515625,
-0.058380126953125,
-0.041290283203125,
0.0227813720703125,
0.003021240234375,
0.00801849365234375,
0.0191192626953125,
0.00658416748046875,
-0.0233154296875,
0.005512237548828125,
0.038543701171875,
-0.012908935546875,
-0.01727294921875,
-0.017120361328125,
-0.03912353515625,
0.052642822265625,
-0.0379638671875,
0.026397705078125,
0.04876708984375,
-0.00701904296875,
0.027740478515625,
-0.00238037109375,
0.01947021484375,
0.005184173583984375,
-0.053131103515625,
0.0146026611328125,
0.01104736328125,
-0.053924560546875,
-0.040435791015625,
-0.007671356201171875,
0.02911376953125,
-0.00933074951171875,
-0.01160430908203125,
-0.01351165771484375,
-0.0391845703125,
-0.0036830902099609375,
0.01142120361328125,
-0.01422119140625,
-0.0006146430969238281,
0.01383209228515625,
-0.014404296875,
0.016204833984375,
-0.014923095703125,
-0.0293121337890625,
-0.012054443359375,
0.057464599609375,
-0.00658416748046875,
-0.0004334449768066406,
0.01432037353515625,
0.004772186279296875,
-0.006336212158203125,
-0.004970550537109375,
-0.0501708984375,
-0.051239013671875,
0.03857421875,
-0.032012939453125,
0.024383544921875,
-0.03167724609375,
-0.041900634765625,
0.011566162109375,
0.10443115234375,
-0.0474853515625,
-0.021575927734375,
0.0050506591796875,
0.031890869140625,
-0.0175628662109375,
-0.047332763671875,
-0.007358551025390625,
-0.0310516357421875,
0.01177978515625,
0.011444091796875,
-0.01111602783203125,
0.036224365234375,
-0.03875732421875,
0.07293701171875,
0.0129547119140625,
-0.00803375244140625,
0.00971221923828125,
0.00479888916015625,
0.012451171875,
0.00299835205078125,
-0.020172119140625,
0.006378173828125,
-0.0059967041015625,
-0.0237884521484375,
-0.11083984375,
-0.0106658935546875,
-0.01282501220703125,
0.0576171875,
-0.0243072509765625,
0.0125274658203125,
-0.035980224609375,
0.03515625,
-0.0121612548828125,
0.025970458984375,
0.000659942626953125,
0.004138946533203125,
0.05828857421875,
0.00624847412109375,
0.006076812744140625,
-0.0021800994873046875,
-0.0093536376953125,
0.0171966552734375,
-0.0122528076171875,
0.056365966796875,
-0.0142669677734375,
0.0004036426544189453,
0.01690673828125,
-0.042388916015625,
-0.02001953125,
-0.0131988525390625,
-0.055572509765625,
-0.0009965896606445312,
-0.04071044921875,
-0.0094757080078125,
-0.0148773193359375,
-0.03607177734375,
0.05853271484375,
0.0192413330078125,
-0.01506805419921875,
-0.007343292236328125,
0.07904052734375,
0.006397247314453125,
-0.0362548828125,
-0.0848388671875,
0.00879669189453125,
0.03411865234375,
-0.0034351348876953125,
0.057525634765625,
0.028106689453125,
-0.025970458984375,
0.04583740234375,
0.017974853515625,
-0.0291595458984375,
0.01003265380859375,
0.017608642578125,
0.0142974853515625,
-0.0269775390625,
0.0211334228515625,
-0.01300811767578125,
-0.0013265609741210938,
0.006313323974609375,
0.016143798828125,
-0.034027099609375,
0.03314208984375,
0.023681640625,
-0.0023193359375,
0.0208740234375,
-0.004573822021484375,
-0.050048828125,
0.0157623291015625,
-0.019622802734375,
0.0103302001953125,
0.0021381378173828125,
0.0028896331787109375,
0.0080108642578125,
0.00754547119140625,
-0.0184478759765625,
0.069580078125,
0.003265380859375,
0.04364013671875,
0.0214996337890625,
0.037445068359375,
-0.01052093505859375,
0.02606201171875,
-0.0196380615234375,
0.0699462890625,
-0.0179595947265625,
-0.05413818359375,
-0.016448974609375,
-0.023284912109375,
0.03662109375,
0.053863525390625,
0.0167694091796875,
0.0225067138671875,
0.021942138671875,
-0.02081298828125,
0.00821685791015625,
0.0300140380859375,
-0.015472412109375,
-0.028289794921875,
-0.0188446044921875,
-0.023101806640625,
-0.006103515625,
0.004608154296875,
0.059661865234375,
-0.051177978515625,
0.048980712890625,
0.0008516311645507812,
-0.0100250244140625,
0.0182037353515625,
0.034332275390625,
0.0141143798828125,
-0.0272064208984375,
0.0056304931640625,
0.02130126953125,
0.0288238525390625,
0.00290679931640625,
0.0271148681640625,
0.0016222000122070312,
0.041259765625,
-0.01332855224609375,
-0.029693603515625,
0.005588531494140625,
-0.07373046875,
-0.01398468017578125,
0.01488494873046875,
0.033172607421875,
-0.04217529296875,
0.021240234375,
0.0309600830078125,
-0.0232696533203125,
-0.0239410400390625,
-0.007122039794921875,
0.01256561279296875,
-0.0102386474609375,
-0.01099395751953125,
0.07611083984375,
-0.05877685546875,
-0.00408935546875,
0.0037021636962890625,
-0.02703857421875,
-0.00836944580078125,
0.006927490234375,
-0.083251953125,
-0.03753662109375,
0.0091552734375,
0.0008606910705566406,
0.0017757415771484375,
0.00714874267578125,
0.01715087890625,
-0.0191650390625,
-0.0157928466796875,
0.0236053466796875,
0.0159149169921875,
-0.0211181640625,
-0.0679931640625,
0.02154541015625,
-0.0096588134765625,
-0.0202484130859375,
-0.032623291015625,
-0.00969696044921875,
-0.0258636474609375,
-0.030487060546875,
-0.0027523040771484375,
-0.009521484375,
0.03485107421875,
-0.020355224609375,
0.005786895751953125,
-0.023590087890625,
0.0255126953125,
-0.0009584426879882812,
0.045562744140625,
-0.0022678375244140625,
0.04815673828125,
-0.00566864013671875,
0.042266845703125,
0.01314544677734375,
0.037078857421875,
-0.00914764404296875,
-0.030548095703125,
0.02215576171875,
-0.0372314453125,
-0.0311126708984375,
-0.00392913818359375,
-0.040191650390625,
-0.0145721435546875,
0.013427734375,
-0.01154327392578125,
0.0239410400390625,
0.008331298828125,
0.01262664794921875,
-0.0172882080078125,
-0.022125244140625,
-0.00003439188003540039,
-0.0016994476318359375,
0.031341552734375,
-0.043243408203125,
0.06878662109375,
-0.0035305023193359375,
0.005092620849609375,
0.032501220703125,
-0.0606689453125,
0.046600341796875,
0.0555419921875,
-0.025299072265625,
0.0214996337890625,
0.0261077880859375,
-0.0005087852478027344,
0.04351806640625,
0.0244293212890625,
0.032958984375,
-0.01171112060546875,
-0.01000213623046875,
-0.0171051025390625,
0.00905609130859375,
0.0009298324584960938,
-0.021484375,
0.003025054931640625,
-0.00926971435546875,
-0.0013456344604492188,
0.010711669921875,
0.0689697265625,
0.062744140625,
-0.0968017578125,
-0.00958251953125,
0.00408172607421875,
-0.0235748291015625,
0.006946563720703125,
-0.0009350776672363281,
-0.0305023193359375,
-0.0518798828125,
0.04180908203125,
-0.01512908935546875,
-0.02349853515625,
0.007442474365234375,
0.0009169578552246094,
-0.01244354248046875,
-0.00980377197265625,
0.03082275390625,
0.0299530029296875,
-0.0386962890625,
0.0276947021484375,
0.0340576171875,
0.0255279541015625,
-0.00640869140625,
-0.0175323486328125,
0.007099151611328125,
-0.037506103515625,
-0.06365966796875,
-0.0095672607421875,
-0.030609130859375,
0.0012149810791015625,
-0.010345458984375,
-0.025482177734375,
0.01213836669921875,
0.05950927734375,
-0.0309600830078125,
-0.01027679443359375,
0.0204010009765625,
0.0197296142578125,
0.0292205810546875,
0.026702880859375,
0.0210418701171875,
-0.006221771240234375,
-0.002117156982421875,
-0.00030803680419921875,
-0.047027587890625,
-0.003566741943359375,
0.01041412353515625,
0.0235443115234375,
0.00841522216796875,
-0.01482391357421875,
-0.005184173583984375,
0.050872802734375,
0.0285797119140625,
-0.005889892578125,
0.0036106109619140625,
0.00501251220703125,
-0.0908203125,
-0.06903076171875,
0.0166473388671875,
-0.06427001953125,
-0.00583648681640625,
0.0277557373046875,
-0.06573486328125,
0.08502197265625,
-0.0035648345947265625,
0.0238494873046875,
0.0175628662109375,
0.039825439453125,
-0.04046630859375,
-0.000736236572265625,
-0.01947021484375,
0.03363037109375,
0.021392822265625,
0.0136871337890625,
-0.0751953125,
-0.0172576904296875,
-0.0079345703125,
0.0673828125,
0.015167236328125,
0.00144195556640625,
0.00841522216796875,
-0.00824737548828125,
0.02215576171875,
0.033203125,
0.0029392242431640625,
-0.0091705322265625,
-0.03131103515625,
0.0160369873046875,
-0.0193634033203125,
-0.029693603515625,
0.0159454345703125,
-0.009796142578125,
-0.07208251953125,
0.00177001953125,
-0.0208892822265625,
-0.051971435546875,
-0.0002853870391845703,
0.0301055908203125,
-0.0287017822265625,
-0.00402069091796875,
0.0034618377685546875,
0.0017232894897460938,
0.01145172119140625,
-0.0017910003662109375,
-0.01474761962890625,
-0.002750396728515625,
0.0252838134765625,
-0.026611328125,
0.0285797119140625,
-0.004245758056640625,
0.017059326171875,
0.01192474365234375,
0.0092315673828125,
-0.004119873046875,
0.0029449462890625,
-0.00004565715789794922,
0.020263671875,
-0.007015228271484375,
0.037017822265625,
0.0254974365234375,
0.024139404296875,
0.0125732421875,
0.05511474609375,
0.006282806396484375,
0.023590087890625,
-0.0523681640625,
-0.01837158203125,
0.014862060546875,
0.0186767578125,
-0.01751708984375,
-0.0026454925537109375,
-0.0076904296875,
0.0010128021240234375,
0.05059814453125,
-0.0131072998046875,
-0.0022830963134765625,
0.013763427734375,
0.0269012451171875,
-0.005764007568359375,
-0.006237030029296875,
-0.01415252685546875,
0.00522613525390625,
-0.044097900390625,
0.0191497802734375,
0.022186279296875,
0.0767822265625,
0.00872039794921875,
0.08355712890625,
-0.0159912109375,
-0.038970947265625,
0.0024013519287109375,
0.006290435791015625,
0.003833770751953125,
-0.031524658203125,
-0.0109710693359375,
-0.034393310546875,
-0.00423431396484375,
0.0233917236328125,
0.01372528076171875,
0.005222320556640625,
0.04058837890625,
0.07440185546875,
-0.036834716796875,
-0.0171356201171875,
0.085693359375,
-0.0030727386474609375,
-0.00020182132720947266,
-0.035552978515625,
0.043487548828125,
0.02593994140625,
0.0005154609680175781,
-0.01485443115234375,
0.047454833984375,
0.0328369140625,
0.00037550926208496094,
0.005985260009765625,
0.0096588134765625,
-0.03466796875,
0.0228118896484375,
0.00684356689453125,
0.06768798828125,
0.0240631103515625,
-0.10675048828125,
-0.01654052734375,
-0.033538818359375,
-0.058135986328125,
0.034637451171875,
0.038665771484375,
-0.03912353515625,
0.0223541259765625,
0.0115966796875,
-0.03375244140625,
0.0031681060791015625,
0.0328369140625,
0.004756927490234375,
0.006526947021484375,
0.019134521484375,
-0.0047760009765625,
-0.0662841796875,
-0.038604736328125,
-0.0416259765625,
0.04888916015625,
0.0269622802734375,
0.03839111328125,
0.00405120849609375,
0.037445068359375,
-0.00893402099609375,
0.00395965576171875,
0.00032210350036621094,
-0.0181121826171875,
0.01035308837890625,
0.029937744140625,
0.019500732421875,
-0.029815673828125,
-0.0307464599609375,
0.0021305084228515625,
0.02410888671875,
-0.04437255859375,
0.023712158203125,
-0.039886474609375,
0.0118408203125,
-0.0271148681640625,
0.03741455078125,
-0.040374755859375,
-0.07464599609375,
-0.09259033203125,
0.0006885528564453125,
0.0179290771484375,
0.019256591796875,
-0.0249176025390625,
0.01503753662109375,
-0.01568603515625,
-0.0021228790283203125,
0.0175628662109375,
-0.005889892578125,
-0.01739501953125,
0.019744873046875,
-0.0323486328125,
-0.0171051025390625,
-0.0050048828125,
-0.0209808349609375,
0.0025653839111328125,
-0.0015077590942382812,
0.00815582275390625,
0.0077667236328125,
-0.0298004150390625,
-0.0120697021484375,
0.040374755859375,
0.0289154052734375,
-0.0156707763671875,
0.00954437255859375,
0.0251922607421875,
-0.02520751953125,
0.001628875732421875,
0.0228271484375,
-0.0188446044921875,
-0.016204833984375,
-0.01654052734375,
0.01549530029296875,
-0.01515960693359375,
-0.0105743408203125,
-0.048980712890625,
0.001911163330078125,
0.0263519287109375,
-0.0097198486328125,
-0.05340576171875,
0.016357421875,
-0.0242156982421875,
0.052215576171875,
-0.0377197265625,
-0.0670166015625,
0.03509521484375,
0.0745849609375,
-0.01467132568359375,
-0.022064208984375,
-0.016510009765625,
-0.02618408203125,
-0.03570556640625,
-0.0020046234130859375,
0.0080108642578125,
-0.00104522705078125,
0.0212860107421875,
0.0226593017578125,
0.0160980224609375,
0.06585693359375,
0.0010290145874023438,
-0.007259368896484375,
0.03594970703125,
-0.019927978515625,
-0.044464111328125,
-0.0897216796875,
0.0321044921875,
-0.11260986328125,
-0.0224456787109375,
-0.0279998779296875,
0.007415771484375,
0.016143798828125,
-0.068359375,
-0.1619873046875,
0.0760498046875,
-0.048492431640625,
-0.04510498046875,
-0.06646728515625,
0.030029296875,
0.0106048583984375,
-0.035980224609375,
-0.028350830078125,
-0.00975799560546875,
-0.0170135498046875,
0.0171356201171875,
0.015716552734375,
0.019256591796875,
0.0107269287109375,
0.0010967254638671875,
0.00020039081573486328,
0.030853271484375,
0.04058837890625,
-0.005016326904296875,
0.01189422607421875,
-0.034912109375,
0.0223846435546875,
0.03009033203125,
-0.0380859375,
-0.054718017578125,
0.0066375732421875,
-0.00027561187744140625,
-0.0012388229370117188,
-0.0970458984375,
-0.020660400390625,
-0.06610107421875,
0.038818359375,
-0.01136016845703125,
0.007171630859375,
0.0103912353515625,
0.015899658203125,
0.0172882080078125,
-0.0171661376953125,
-0.01490020751953125,
0.0084075927734375,
-0.0212249755859375,
-0.01029205322265625,
-0.032989501953125,
0.01268768310546875,
-0.01438140869140625,
0.019195556640625,
-0.0234222412109375,
-0.0184173583984375,
0.01641845703125,
0.007190704345703125,
-0.0574951171875,
-0.011810302734375,
0.0904541015625,
-0.041534423828125,
0.0167388916015625,
0.00707244873046875,
0.01090240478515625,
0.062286376953125,
0.045318603515625,
-0.032501220703125,
-0.0185699462890625,
0.00812530517578125,
0.049163818359375,
-0.017547607421875,
0.01531219482421875,
-0.02020263671875,
0.0171966552734375,
-0.0228271484375,
0.0173187255859375,
0.0264434814453125,
0.037017822265625,
-0.0147857666015625,
0.0177764892578125,
0.023681640625,
-0.017578125,
-0.003963470458984375,
-0.0120086669921875,
-0.0226898193359375,
0.0215301513671875,
-0.0254364013671875,
-0.001522064208984375,
-0.0237579345703125,
-0.01216888427734375,
0.0171661376953125,
-0.0008068084716796875,
-0.013214111328125,
-0.031463623046875,
0.0081329345703125,
0.00830078125,
-0.0180511474609375,
0.01184844970703125
]
|
b1f3a079b31c530e8206f5d56a3316fb8a177541 | Wordpress Stackexchange
Q: How to query posts with current or future date only I want to only get posts with current or future dates, to show upcoming events.
Current arguments:
$args = array(
'post_type' => 'event',
'meta_key' => 'event_start_date',
'orderby' => 'meta_value',
'order' => 'ASC'
);
This returns all the posts, including past events.
I read about post_status but it did not seem to work. I tried 'post_status' => 'future' without success.
A: adding the following arguments did the trick
'meta_value' => date('Y-m-d h:i'),
'meta_compare' => '>',
| Q: How to query posts with current or future date only I want to only get posts with current or future dates, to show upcoming events.
Current arguments:
$args = array(
'post_type' => 'event',
'meta_key' => 'event_start_date',
'orderby' => 'meta_value',
'order' => 'ASC'
);
This returns all the posts, including past events.
I read about post_status but it did not seem to work. I tried 'post_status' => 'future' without success.
A: adding the following arguments did the trick
'meta_value' => date('Y-m-d h:i'),
'meta_compare' => '>',
A: Adding 'post_status' => array('publish', 'future') to your $args will show only future published posts.
$args = array(
'post_type' => 'event',
'meta_key' => 'event_start_date',
'orderby' => 'meta_value',
'order' => 'ASC',
'post_status' => array('publish', 'future')
);
get_posts( $args );
| wordpress | {
"language": "en",
"length": 123,
"provenance": "stackexchange_00019.jsonl.gz:450107",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/166972"
} | [
0.09320068359375,
-0.02276611328125,
0.0268096923828125,
-0.0479736328125,
0.00664520263671875,
-0.033294677734375,
0.046661376953125,
-0.0033664703369140625,
0.02801513671875,
0.0340576171875,
-0.0072479248046875,
-0.004016876220703125,
-0.01898193359375,
-0.029205322265625,
-0.0400390625,
-0.005634307861328125,
0.045806884765625,
-0.02191162109375,
0.0303192138671875,
-0.01277923583984375,
0.0139617919921875,
0.0235137939453125,
0.038970947265625,
0.04888916015625,
0.051544189453125,
-0.01068878173828125,
0.06915283203125,
-0.00922393798828125,
0.06903076171875,
0.0079803466796875,
0.04986572265625,
-0.07318115234375,
-0.007556915283203125,
0.018096923828125,
0.0311126708984375,
-0.001781463623046875,
0.0201416015625,
0.005199432373046875,
0.045257568359375,
-0.0004334449768066406,
0.0007205009460449219,
-0.01018524169921875,
-0.048492431640625,
0.01053619384765625,
-0.041595458984375,
-0.0058746337890625,
-0.01093292236328125,
-0.0085296630859375,
0.019256591796875,
0.018798828125,
0.002971649169921875,
0.0237579345703125,
0.0113525390625,
-0.0016851425170898438,
-0.035675048828125,
-0.043365478515625,
-0.01470947265625,
0.01012420654296875,
0.039764404296875,
-0.005229949951171875,
-0.0293121337890625,
-0.0221405029296875,
0.02813720703125,
-0.0005483627319335938,
-0.0159912109375,
-0.01224517822265625,
0.0313720703125,
0.01543426513671875,
-0.03179931640625,
-0.03265380859375,
0.043487548828125,
-0.004833221435546875,
0.0011472702026367188,
-0.01312255859375,
-0.0269317626953125,
-0.009490966796875,
-0.01058197021484375,
-0.041595458984375,
0.00982666015625,
0.00806427001953125,
-0.025177001953125,
0.0305328369140625,
-0.052764892578125,
-0.03131103515625,
-0.0004642009735107422,
-0.01058197021484375,
-0.0161285400390625,
-0.00274658203125,
-0.0219268798828125,
-0.0259552001953125,
-0.0257568359375,
-0.03533935546875,
-0.05133056640625,
0.0008821487426757812,
-0.0010776519775390625,
-0.04595947265625,
0.033599853515625,
0.073974609375,
-0.052947998046875,
-0.015350341796875,
-0.0533447265625,
0.00959014892578125,
-0.046630859375,
-0.0128021240234375,
0.0164642333984375,
0.0372314453125,
0.0035762786865234375,
0.013092041015625,
0.051055908203125,
0.02935791015625,
0.018035888671875,
0.0230712890625,
-0.00943756103515625,
-0.0088958740234375,
-0.03814697265625,
0.03515625,
-0.009063720703125,
-0.01245880126953125,
0.00884246826171875,
0.0110931396484375,
0.035186767578125,
0.045745849609375,
-0.0011491775512695312,
-0.0382080078125,
0.0272979736328125,
0.01430511474609375,
-0.04132080078125,
-0.0223388671875,
-0.01605224609375,
0.0950927734375,
-0.0280303955078125,
-0.034423828125,
0.00974273681640625,
0.00862884521484375,
-0.0230712890625,
-0.04608154296875,
0.0374755859375,
-0.078857421875,
-0.016326904296875,
0.018768310546875,
-0.0026111602783203125,
-0.048431396484375,
-0.0147552490234375,
-0.01428985595703125,
0.0031948089599609375,
0.01483917236328125,
0.00717926025390625,
0.013916015625,
-0.00696563720703125,
-0.011383056640625,
-0.007171630859375,
-0.01047515869140625,
0.0148468017578125,
0.01910400390625,
-0.017181396484375,
0.0034503936767578125,
0.044677734375,
-0.0310821533203125,
-0.009521484375,
-0.037506103515625,
0.012481689453125,
0.01201629638671875,
0.002315521240234375,
-0.0184173583984375,
-0.05145263671875,
-0.015838623046875,
-0.026336669921875,
-0.01041412353515625,
0.00852203369140625,
-0.01024627685546875,
-0.021331787109375,
0.01873779296875,
0.04510498046875,
-0.0044708251953125,
-0.0186309814453125,
0.00003421306610107422,
-0.002384185791015625,
-0.01386260986328125,
0.005046844482421875,
0.04827880859375,
0.00457000732421875,
-0.0257720947265625,
0.01047515869140625,
-0.003498077392578125,
-0.02862548828125,
0.0252685546875,
0.0031185150146484375,
-0.020965576171875,
-0.0004124641418457031,
-0.0101165771484375,
0.045166015625,
0.044097900390625,
-0.0214691162109375,
0.0014591217041015625,
-0.0162353515625,
-0.01361083984375,
0.01548004150390625,
0.0042266845703125,
-0.01189422607421875,
-0.0013866424560546875,
0.0187225341796875,
0.03271484375,
-0.040985107421875,
-0.0193023681640625,
-0.10467529296875,
0.0033855438232421875,
-0.0135498046875,
0.04632568359375,
-0.0296630859375,
0.0150146484375,
0.02032470703125,
-0.00991058349609375,
-0.0258941650390625,
0.0205535888671875,
0.01399993896484375,
0.0162506103515625,
0.0150604248046875,
-0.0003275871276855469,
-0.014678955078125,
0.01407623291015625,
-0.0068206787109375,
-0.037994384765625,
-0.0266265869140625,
0.027923583984375,
0.058807373046875,
-0.048187255859375,
0.024627685546875,
-0.03546142578125,
0.0767822265625,
-0.00785064697265625,
-0.003864288330078125,
-0.0179290771484375,
0.00022649765014648438,
-0.030426025390625,
-0.04925537109375,
0.020294189453125,
0.032470703125,
0.019775390625,
-0.0028514862060546875,
0.033294677734375,
0.0252685546875,
0.041748046875,
0.029083251953125,
0.030242919921875,
0.047698974609375,
-0.0272674560546875,
0.0198974609375,
-0.0190277099609375,
0.007572174072265625,
0.01149749755859375,
0.0223236083984375,
-0.021148681640625,
0.039825439453125,
0.038909912109375,
0.031463623046875,
0.0110015869140625,
0.002124786376953125,
-0.00833892822265625,
-0.042999267578125,
0.01629638671875,
0.0086517333984375,
-0.02264404296875,
-0.054290771484375,
0.0051422119140625,
0.011322021484375,
0.01251220703125,
0.030548095703125,
0.021697998046875,
-0.006061553955078125,
-0.0084075927734375,
0.004611968994140625,
-0.0095062255859375,
0.0114898681640625,
0.016510009765625,
-0.0279998779296875,
0.02734375,
-0.02069091796875,
0.00463104248046875,
0.03875732421875,
0.005725860595703125,
-0.00603485107421875,
0.0209197998046875,
0.0017795562744140625,
-0.0033321380615234375,
-0.004596710205078125,
-0.007114410400390625,
0.0188446044921875,
0.0265655517578125,
0.0225677490234375,
0.004791259765625,
0.034698486328125,
0.01013946533203125,
-0.0192718505859375,
0.04644775390625,
-0.00988006591796875,
-0.02691650390625,
-0.08538818359375,
-0.0509033203125,
0.0462646484375,
-0.05621337890625,
-0.00046634674072265625,
0.049896240234375,
0.002613067626953125,
0.0126953125,
-0.0168609619140625,
-0.00719451904296875,
-0.004917144775390625,
-0.01413726806640625,
-0.04229736328125,
0.01291656494140625,
-0.10400390625,
-0.0233612060546875,
0.0288543701171875,
0.0634765625,
-0.00357818603515625,
-0.036102294921875,
0.00426483154296875,
0.0274810791015625,
-0.045440673828125,
-0.04180908203125,
-0.01068115234375,
-0.0253143310546875,
-0.027557373046875,
-0.0268707275390625,
-0.005828857421875,
0.0243682861328125,
-0.0394287109375,
-0.007450103759765625,
-0.03985595703125,
0.0213775634765625,
-0.03375244140625,
-0.006420135498046875,
-0.04193115234375,
0.042022705078125,
-0.01331329345703125,
0.029876708984375,
-0.0146636962890625,
0.1468505859375,
0.023895263671875,
-0.08056640625,
-0.03399658203125,
0.046234130859375,
-0.034088134765625,
-0.0007686614990234375,
0.006595611572265625,
0.01313018798828125,
0.0095672607421875,
0.006755828857421875,
0.047515869140625,
0.041290283203125,
-0.06329345703125,
-0.006649017333984375,
0.0009050369262695312,
0.034942626953125,
0.00807952880859375,
0.038238525390625,
0.00818634033203125,
0.048431396484375,
0.0157928466796875,
-0.017822265625,
-0.016387939453125,
-0.0170440673828125,
-0.058990478515625,
0.01229095458984375,
0.044281005859375,
-0.01094818115234375,
-0.0015192031860351562,
-0.03399658203125,
0.015350341796875,
0.018463134765625,
0.02532958984375,
-0.0210113525390625,
0.0216217041015625,
0.018890380859375,
0.00959014892578125,
-0.017913818359375,
-0.0016956329345703125,
-0.0269775390625,
0.053985595703125,
0.0046844482421875,
0.01007080078125,
-0.023223876953125,
0.0261688232421875,
-0.052703857421875,
-0.07745361328125,
0.055145263671875,
-0.00885772705078125,
-0.0156707763671875,
-0.038665771484375,
-0.031646728515625,
-0.0031566619873046875,
0.07928466796875,
-0.037322998046875,
-0.0345458984375,
-0.0094757080078125,
-0.0013332366943359375,
-0.002101898193359375,
-0.0113983154296875,
-0.01374053955078125,
-0.01451873779296875,
-0.0501708984375,
0.0105743408203125,
-0.0167999267578125,
-0.007091522216796875,
-0.0219879150390625,
-0.0304412841796875,
-0.034210205078125,
-0.03045654296875,
0.04302978515625,
0.00359344482421875,
-0.0027294158935546875,
0.022430419921875,
-0.0185089111328125,
0.0211029052734375,
-0.0199432373046875,
-0.00882720947265625,
-0.049163818359375,
-0.0215911865234375,
0.042755126953125,
0.0138092041015625,
-0.0322265625,
-0.01031494140625,
-0.01806640625,
0.024444580078125,
0.0343017578125,
-0.00675201416015625,
0.0241241455078125,
-0.03668212890625,
0.0260772705078125,
0.030853271484375,
0.0208892822265625,
-0.0163726806640625,
-0.0189971923828125,
0.0047149658203125,
0.02154541015625,
0.0007815361022949219,
-0.0275726318359375,
-0.048736572265625,
0.016510009765625,
-0.0249786376953125,
-0.020233154296875,
0.018218994140625,
0.030426025390625,
0.042266845703125,
-0.0118865966796875,
0.0016260147094726562,
0.0080108642578125,
-0.0186614990234375,
0.06341552734375,
0.0200653076171875,
-0.040130615234375,
-0.004238128662109375,
0.085205078125,
0.01375579833984375,
-0.0338134765625,
-0.0302581787109375,
-0.004810333251953125,
0.0258636474609375,
-0.0226287841796875,
0.01904296875,
-0.029052734375,
-0.052215576171875,
0.0865478515625,
-0.0192108154296875,
0.00896453857421875,
0.002483367919921875,
0.042510986328125,
0.01354217529296875,
-0.0008497238159179688,
0.0088958740234375,
-0.0130615234375,
0.001041412353515625,
0.01513671875,
-0.005420684814453125,
-0.044769287109375,
0.019805908203125,
0.06890869140625,
-0.0165863037109375,
0.0203094482421875,
-0.0546875,
0.002193450927734375,
-0.01285552978515625,
0.038330078125,
-0.0038738250732421875,
0.038848876953125,
-0.016357421875,
-0.0091400146484375,
0.0274200439453125,
-0.0190277099609375,
-0.021514892578125,
-0.006175994873046875,
-0.01285552978515625,
-0.009307861328125,
0.0178985595703125,
-0.014312744140625,
-0.0244293212890625,
0.00797271728515625,
0.053314208984375,
-0.00714874267578125,
-0.047515869140625,
-0.0040740966796875,
-0.006427764892578125,
-0.0172576904296875,
0.033233642578125,
-0.0275726318359375,
0.039306640625,
0.06964111328125,
-0.007198333740234375,
-0.00934600830078125,
-0.031280517578125,
0.043121337890625,
-0.042022705078125,
-0.00018680095672607422,
0.0030536651611328125,
-0.0051116943359375,
0.0183868408203125,
0.054473876953125,
0.018402099609375,
0.053619384765625,
-0.03924560546875,
0.037994384765625,
0.031829833984375,
0.0274200439453125,
0.034423828125,
-0.047515869140625,
-0.0134429931640625,
0.0191497802734375,
-0.01058197021484375,
-0.01885986328125,
-0.00905609130859375,
0.004459381103515625,
-0.006038665771484375,
0.003650665283203125,
0.01306915283203125,
0.034576416015625,
0.0352783203125,
-0.032135009765625,
0.0154571533203125,
0.06689453125,
0.032958984375,
-0.0233154296875,
-0.01189422607421875,
0.0236968994140625,
0.06201171875,
-0.0148468017578125,
0.0416259765625,
-0.025146484375,
0.041259765625,
0.003021240234375,
0.036346435546875,
-0.0210113525390625,
-0.029693603515625,
-0.004032135009765625,
-0.04949951171875,
-0.005313873291015625,
-0.0162506103515625,
0.031036376953125,
-0.02752685546875,
-0.0189056396484375,
0.0267791748046875,
-0.023956298828125,
0.04742431640625,
-0.0288238525390625,
-0.01519012451171875,
-0.0265045166015625,
0.0142364501953125,
0.026092529296875,
0.029296875,
-0.06597900390625,
-0.004428863525390625,
-0.0574951171875,
-0.020538330078125,
-0.039031982421875,
-0.0521240234375,
-0.034027099609375,
0.005420684814453125,
0.04461669921875,
0.06591796875,
-0.002841949462890625,
-0.046142578125,
0.00824737548828125,
-0.023681640625,
-0.01470947265625,
0.08184814453125,
-0.0100555419921875,
0.0869140625,
0.0003139972686767578,
0.0950927734375,
0.004467010498046875,
0.031982421875,
-0.05230712890625,
-0.0151519775390625,
0.0193328857421875,
-0.06939697265625,
-0.041473388671875,
-0.006153106689453125,
-0.05731201171875,
-0.00992584228515625,
-0.021453857421875,
-0.012115478515625,
0.020294189453125,
-0.028656005859375,
-0.00757598876953125,
-0.01114654541015625,
0.0017147064208984375,
-0.017669677734375,
0.02496337890625,
0.0226593017578125,
-0.016082763671875,
0.003803253173828125,
-0.01007843017578125,
0.0162506103515625,
-0.0164337158203125,
-0.00421142578125,
-0.0143585205078125,
0.0196990966796875,
0.0209503173828125,
0.02203369140625,
0.068603515625,
0.016082763671875,
0.05914306640625,
0.0447998046875,
0.046112060546875,
0.0252227783203125,
0.0303497314453125,
-0.0192108154296875,
0.001659393310546875,
0.07281494140625,
0.020843505859375,
-0.033599853515625,
0.029052734375,
-0.0374755859375,
-0.0049591064453125,
0.01293182373046875,
0.040740966796875,
-0.039642333984375,
0.0231475830078125,
0.0178985595703125,
0.0219879150390625,
0.051971435546875,
0.0006933212280273438,
0.0183868408203125,
0.017608642578125,
-0.029998779296875,
0.00988006591796875,
-0.047760009765625,
-0.0169677734375,
0.0184173583984375,
-0.0017919540405273438,
-0.0283203125,
0.023162841796875,
-0.0034580230712890625,
-0.0576171875,
0.0023632049560546875,
0.038909912109375,
-0.0347900390625,
-0.0279388427734375,
-0.00116729736328125,
-0.005474090576171875,
-0.019866943359375,
-0.1160888671875,
-0.0294189453125,
-0.0004642009735107422,
-0.0234527587890625,
0.0008864402770996094,
-0.004772186279296875,
0.031982421875,
0.06109619140625,
-0.029052734375,
0.027252197265625,
0.0218963623046875,
0.002071380615234375,
-0.078857421875,
-0.0258941650390625,
0.024444580078125,
0.060089111328125,
-0.0063629150390625,
0.050537109375,
0.00213623046875,
-0.04119873046875,
0.0008792877197265625,
-0.0227508544921875,
0.05194091796875,
-0.0623779296875,
-0.01146697998046875,
0.01416015625,
0.028656005859375,
0.007015228271484375,
0.008056640625,
-0.007358551025390625,
-0.01873779296875,
0.0201568603515625,
-0.01183319091796875,
-0.00505828857421875,
-0.0168914794921875,
-0.013916015625,
-0.041534423828125,
0.0721435546875,
-0.01123809814453125,
0.01047515869140625,
0.021697998046875,
0.032501220703125,
-0.027435302734375,
0.0005321502685546875,
-0.066650390625,
0.0780029296875,
0.001422882080078125,
0.044677734375,
-0.07012939453125,
0.006305694580078125,
-0.004085540771484375,
-0.005329132080078125,
0.04364013671875,
-0.0013341903686523438,
0.014434814453125,
0.01090240478515625,
0.05010986328125,
0.046539306640625,
-0.0150604248046875,
0.0080108642578125,
-0.00458526611328125,
0.04296875,
0.053558349609375,
-0.0162353515625,
0.057586669921875,
-0.007354736328125,
-0.035491943359375,
0.0084228515625,
0.00746917724609375,
0.0079498291015625,
0.00038814544677734375,
-0.0121002197265625,
0.044830322265625,
-0.0214385986328125,
-0.032562255859375,
-0.0606689453125,
0.0287628173828125,
0.0174713134765625,
0.0699462890625,
-0.08056640625,
-0.0321044921875,
-0.0245513916015625,
0.056121826171875,
0.0298004150390625,
-0.01157379150390625,
0.045074462890625,
0.01152801513671875,
-0.01641845703125,
0.0108489990234375,
0.0021800994873046875,
0.0031890869140625,
-0.002361297607421875,
0.046722412109375,
0.0174407958984375,
0.017059326171875,
-0.046875,
-0.014404296875,
0.04669189453125,
0.0599365234375,
-0.0345458984375,
-0.0222320556640625,
0.0219268798828125,
-0.019134521484375,
-0.01287841796875,
-0.0124053955078125,
-0.020599365234375,
0.007198333740234375,
0.0140380859375,
-0.01605224609375,
0.0123748779296875,
0.0169830322265625,
0.024505615234375,
0.0214385986328125,
0.036102294921875,
-0.059539794921875,
0.007476806640625,
-0.0255279541015625,
-0.01065826416015625,
0.032257080078125,
0.0263671875,
0.017181396484375,
-0.0071563720703125,
-0.0161285400390625,
-0.005084991455078125,
0.0191192626953125,
0.029205322265625,
-0.0108642578125,
-0.03125,
0.0163421630859375,
-0.0205230712890625,
-0.033905029296875,
0.0162200927734375,
0.034637451171875,
0.0158538818359375,
0.050445556640625,
0.022003173828125,
-0.033782958984375,
0.00635528564453125,
0.0263824462890625,
-0.024505615234375,
-0.044097900390625,
-0.036376953125,
-0.02520751953125,
0.0011310577392578125,
-0.0129547119140625,
0.0325927734375,
0.0129852294921875,
0.0161285400390625,
-0.0208892822265625,
0.01800537109375,
-0.001007080078125,
-0.004657745361328125,
0.0284881591796875,
-0.01873779296875,
0.01288604736328125,
-0.01255035400390625,
-0.036712646484375,
-0.0034122467041015625,
-0.046478271484375,
0.01303863525390625,
0.0188140869140625,
0.0174102783203125,
0.00426483154296875,
0.0227813720703125,
0.0036163330078125,
0.01360321044921875,
-0.004528045654296875,
-0.0286865234375,
0.0183868408203125,
-0.0101318359375,
0.006496429443359375,
0.01702880859375,
-0.036590576171875,
-0.0100555419921875,
0.0124359130859375,
0.01290130615234375,
0.018218994140625,
0.0185394287109375,
0.007160186767578125,
-0.0004191398620605469,
0.0213470458984375,
0.0117034912109375,
-0.01300811767578125,
-0.0016431808471679688,
0.0263214111328125,
-0.0347900390625,
0.01148223876953125,
-0.0016813278198242188,
0.029541015625,
0.0254669189453125,
0.059173583984375,
-0.0254669189453125,
0.03155517578125,
-0.0135498046875,
0.0087127685546875,
-0.037078857421875,
-0.027069091796875,
-0.042144775390625,
-0.007175445556640625,
0.00902557373046875,
-0.012481689453125,
0.015228271484375,
-0.025787353515625,
0.0012025833129882812,
-0.0004127025604248047,
0.02301025390625,
-0.051300048828125,
0.0498046875,
-0.0264892578125,
0.0611572265625,
0.03387451171875,
0.004215240478515625,
0.0506591796875,
-0.01499176025390625,
-0.01560211181640625,
0.03436279296875,
0.0008940696716308594,
-0.018798828125,
-0.0130615234375,
0.04412841796875,
-0.0330810546875,
-0.01154327392578125,
0.0208282470703125,
-0.0135345458984375,
-0.00165557861328125,
-0.009735107421875,
-0.02020263671875,
-0.01468658447265625,
-0.034515380859375,
-0.01959228515625,
-0.04296875,
0.0062255859375,
0.00939178466796875,
-0.0172271728515625,
-0.04437255859375,
-0.007434844970703125,
-0.02239990234375,
-0.01244354248046875,
-0.0004181861877441406,
-0.005466461181640625,
0.034698486328125,
-0.00820159912109375,
-0.05291748046875,
-0.0169525146484375,
-0.04132080078125,
-0.00286865234375,
-0.0019664764404296875,
-0.0091094970703125,
-0.022918701171875,
-0.050872802734375,
0.024932861328125,
-0.013427734375,
-0.01070404052734375,
0.01531982421875,
0.01554107666015625,
-0.05279541015625,
0.002880096435546875,
-0.01303863525390625,
0.0482177734375,
0.0012121200561523438,
0.0022983551025390625,
0.034637451171875,
0.0311737060546875,
-0.07421875,
-0.040374755859375,
0.045623779296875,
-0.01398468017578125,
-0.0120086669921875,
0.00861358642578125,
-0.01129913330078125,
0.020355224609375,
-0.03204345703125,
-0.10504150390625,
0.08941650390625,
-0.01837158203125,
-0.03839111328125,
-0.01342010498046875,
0.037628173828125,
0.0208892822265625,
-0.01535797119140625,
0.007236480712890625,
-0.03558349609375,
-0.0189056396484375,
-0.03839111328125,
0.02081298828125,
0.022003173828125,
0.01496124267578125,
0.0301361083984375,
-0.067138671875,
-0.0013217926025390625,
-0.036346435546875,
0.012847900390625,
0.006317138671875,
0.001918792724609375,
0.0093994140625,
0.033660888671875,
-0.049713134765625,
0.00942230224609375,
-0.00618743896484375,
0.032958984375,
-0.00641632080078125,
-0.019073486328125,
-0.0789794921875,
-0.0239105224609375,
0.08941650390625,
0.111083984375,
0.0423583984375,
-0.05401611328125,
-0.0172576904296875,
-0.0134735107421875,
-0.025238037109375,
0.000995635986328125,
0.01061248779296875,
-0.04730224609375,
0.0022296905517578125,
-0.01099395751953125,
-0.0168609619140625,
0.0204925537109375,
0.01395416259765625,
-0.0249481201171875,
-0.0033092498779296875,
-0.01180267333984375,
-0.021636962890625,
-0.08251953125,
0.07647705078125,
0.0110321044921875,
-0.03887939453125,
0.0243072509765625,
-0.018524169921875,
-0.0328369140625,
0.020263671875,
-0.00140380859375,
0.0193939208984375,
-0.0076446533203125,
0.0257720947265625,
-0.00469970703125,
0.0443115234375,
-0.0129241943359375,
0.04486083984375,
-0.02520751953125,
-0.01093292236328125,
0.0181884765625,
0.0009794235229492188,
0.01092529296875,
0.015625,
-0.005523681640625,
0.00366973876953125,
0.0172119140625,
0.031982421875,
0.0157470703125,
-0.010406494140625,
0.034393310546875,
-0.01922607421875,
-0.0301666259765625,
-0.005283355712890625,
-0.024444580078125,
-0.007293701171875,
0.00249481201171875,
-0.06048583984375,
-0.025421142578125,
-0.005550384521484375,
-0.0288543701171875,
-0.017486572265625,
-0.004276275634765625
]
|
e8198a5576ebccecc2d53ef2b9c7cbde592ba4fe | Wordpress Stackexchange
Q: Bind event on Media gallery elements WordPress Good day !
Please help to get binding on WordPress Media Upload elements. When i click on any of gallery item need a custom function to fire up.
There is a BackBone collection called "Attachment" and event "selection:single", but i can't understand how to access them.
Thanks !
God bless the solver ! :)
//Vladimir
A: (function ($) {
"use strict";
$(function () {
var button = $('.upload-image');
button.click(function (e) {
e.preventDefault();
// If the media frame already exists, reopen it.
if (file_frame) {
file_frame.open();
return;
}
var btn = $(this),
media = wp.media;
// Create the media frame.
var file_frame = media.frames.file_frame = media({
title: jQuery(this).data('uploader_title'),
button: {
text: jQuery(this).data('uploader_button_text')
},
library: {
type: 'image'
},
multiple: false
});
// Finally, open the modal
file_frame.open();
var selection = media.frame.state().get('selection');
// The sidebar boxes get deleted and recreated on each select - hack into this to do the same.
selection.on( 'selection:single', function ( event ) {
console.log('selection:single');
} );
selection.on( 'selection:unsingle', function ( event ) {
console.log('selection:unsingle');
} );
});
});
}(jQuery));
NOTICE: "selection:unsingle" event will fire up twice
| Q: Bind event on Media gallery elements WordPress Good day !
Please help to get binding on WordPress Media Upload elements. When i click on any of gallery item need a custom function to fire up.
There is a BackBone collection called "Attachment" and event "selection:single", but i can't understand how to access them.
Thanks !
God bless the solver ! :)
//Vladimir
A: (function ($) {
"use strict";
$(function () {
var button = $('.upload-image');
button.click(function (e) {
e.preventDefault();
// If the media frame already exists, reopen it.
if (file_frame) {
file_frame.open();
return;
}
var btn = $(this),
media = wp.media;
// Create the media frame.
var file_frame = media.frames.file_frame = media({
title: jQuery(this).data('uploader_title'),
button: {
text: jQuery(this).data('uploader_button_text')
},
library: {
type: 'image'
},
multiple: false
});
// Finally, open the modal
file_frame.open();
var selection = media.frame.state().get('selection');
// The sidebar boxes get deleted and recreated on each select - hack into this to do the same.
selection.on( 'selection:single', function ( event ) {
console.log('selection:single');
} );
selection.on( 'selection:unsingle', function ( event ) {
console.log('selection:unsingle');
} );
});
});
}(jQuery));
NOTICE: "selection:unsingle" event will fire up twice
| wordpress | {
"language": "en",
"length": 187,
"provenance": "stackexchange_00019.jsonl.gz:450155",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167133"
} | [
0.021820068359375,
0.0224761962890625,
-0.0160675048828125,
-0.02203369140625,
0.045623779296875,
-0.027587890625,
0.04437255859375,
-0.0271759033203125,
-0.01617431640625,
0.047515869140625,
0.0201263427734375,
0.01265716552734375,
0.01337432861328125,
-0.0404052734375,
-0.005462646484375,
0.00927734375,
0.0438232421875,
-0.03814697265625,
0.036712646484375,
-0.0040740966796875,
0.0110931396484375,
0.030517578125,
0.019989013671875,
0.02020263671875,
0.0281982421875,
0.017608642578125,
0.04583740234375,
0.0018138885498046875,
0.01031494140625,
-0.01509857177734375,
0.036956787109375,
-0.0258026123046875,
0.0517578125,
-0.009429931640625,
-0.022064208984375,
0.038970947265625,
-0.0091400146484375,
0.002231597900390625,
-0.006458282470703125,
0.00960540771484375,
0.03765869140625,
-0.0408935546875,
-0.0343017578125,
0.005130767822265625,
-0.0205535888671875,
-0.016815185546875,
0.04046630859375,
-0.0288238525390625,
0.019073486328125,
-0.0015106201171875,
0.0288543701171875,
-0.0333251953125,
0.04534912109375,
-0.003787994384765625,
-0.043609619140625,
-0.0294189453125,
-0.03314208984375,
0.02423095703125,
-0.004512786865234375,
0.0894775390625,
0.0151214599609375,
0.03314208984375,
-0.039459228515625,
-0.05548095703125,
-0.019989013671875,
-0.00806427001953125,
-0.031280517578125,
0.021636962890625,
-0.0136871337890625,
-0.041595458984375,
-0.013427734375,
-0.017181396484375,
-0.013427734375,
-0.055572509765625,
0.005458831787109375,
0.06658935546875,
-0.0182647705078125,
0.02056884765625,
0.0018281936645507812,
-0.00911712646484375,
0.026092529296875,
0.027923583984375,
-0.00980377197265625,
-0.0084686279296875,
0.0300140380859375,
0.032470703125,
-0.005290985107421875,
-0.04681396484375,
-0.01561737060546875,
0.04388427734375,
-0.01311492919921875,
0.01580810546875,
0.06427001953125,
-0.00815582275390625,
-0.047760009765625,
-0.002147674560546875,
-0.022125244140625,
-0.01319122314453125,
0.0236358642578125,
0.0147857666015625,
0.005886077880859375,
-0.0303955078125,
-0.00508880615234375,
-0.0270233154296875,
0.0036029815673828125,
0.021697998046875,
0.021148681640625,
-0.016510009765625,
0.004238128662109375,
-0.00604248046875,
-0.036590576171875,
0.0020771026611328125,
0.0187225341796875,
0.033233642578125,
-0.036102294921875,
-0.033905029296875,
-0.0218963623046875,
0.0183563232421875,
-0.03387451171875,
0.0089874267578125,
-0.016357421875,
-0.0225677490234375,
0.0012903213500976562,
0.039886474609375,
0.045166015625,
0.0245819091796875,
-0.023468017578125,
0.0281829833984375,
-0.042144775390625,
-0.003265380859375,
-0.011505126953125,
0.0396728515625,
0.034210205078125,
0.03668212890625,
-0.0023632049560546875,
0.00676727294921875,
0.040557861328125,
0.01357269287109375,
0.01198577880859375,
-0.00594329833984375,
0.0496826171875,
-0.033050537109375,
-0.0223846435546875,
0.03240966796875,
0.007183074951171875,
0.02685546875,
0.01410675048828125,
-0.016326904296875,
0.0247955322265625,
-0.0084991455078125,
-0.0714111328125,
0.01165771484375,
0.048675537109375,
0.033111572265625,
-0.01555633544921875,
-0.0111236572265625,
0.09820556640625,
-0.05548095703125,
-0.045745849609375,
-0.09600830078125,
0.07012939453125,
0.00450897216796875,
-0.0162506103515625,
0.00902557373046875,
-0.0013484954833984375,
-0.00930023193359375,
-0.06646728515625,
-0.0182037353515625,
0.010772705078125,
0.04095458984375,
-0.0104217529296875,
-0.04071044921875,
-0.01473236083984375,
0.0078582763671875,
-0.01291656494140625,
0.032318115234375,
-0.02703857421875,
0.01641845703125,
0.004970550537109375,
0.04931640625,
0.0197601318359375,
-0.0204010009765625,
0.04986572265625,
0.0040130615234375,
-0.034820556640625,
0.027313232421875,
0.01335906982421875,
0.03460693359375,
0.00848388671875,
0.0192718505859375,
0.0213470458984375,
0.037689208984375,
-0.03204345703125,
-0.0213623046875,
-0.0262908935546875,
0.0144195556640625,
-0.00101470947265625,
0.0167236328125,
-0.0255889892578125,
0.0258331298828125,
0.05255126953125,
0.0011816024780273438,
0.024200439453125,
-0.01812744140625,
-0.0445556640625,
0.016815185546875,
-0.0247039794921875,
0.0311126708984375,
-0.0263519287109375,
-0.017364501953125,
0.02227783203125,
-0.0008339881896972656,
-0.0201416015625,
-0.01398468017578125,
-0.0114898681640625,
0.03265380859375,
-0.0091400146484375,
0.0172119140625,
-0.025604248046875,
0.02801513671875,
-0.05712890625,
-0.0283050537109375,
-0.04132080078125,
0.0180511474609375,
0.0236053466796875,
0.022613525390625,
-0.02386474609375,
0.0134735107421875,
0.019622802734375,
0.032318115234375,
-0.006561279296875,
0.003406524658203125,
-0.0013914108276367188,
-0.00009208917617797852,
-0.048858642578125,
-0.033111572265625,
-0.025115966796875,
-0.035552978515625,
0.01206207275390625,
0.0523681640625,
0.01509857177734375,
0.0188446044921875,
0.013458251953125,
0.060028076171875,
0.053863525390625,
0.04241943359375,
0.03973388671875,
-0.0094146728515625,
-0.008697509765625,
0.03387451171875,
-0.01088714599609375,
-0.0020542144775390625,
0.0201416015625,
-0.0027904510498046875,
-0.01378631591796875,
0.0197601318359375,
-0.030731201171875,
0.00787353515625,
-0.0003426074981689453,
0.0015954971313476562,
-0.01380157470703125,
-0.01177978515625,
0.026153564453125,
-0.0265350341796875,
0.014617919921875,
0.016387939453125,
0.02935791015625,
0.033111572265625,
-0.0026912689208984375,
0.0306854248046875,
-0.0009675025939941406,
-0.050933837890625,
0.0059967041015625,
0.038360595703125,
0.057830810546875,
0.0092315673828125,
-0.03057861328125,
-0.03582763671875,
0.0226287841796875,
0.01483154296875,
-0.004268646240234375,
0.04742431640625,
-0.053802490234375,
-0.01407623291015625,
-0.0165252685546875,
-0.08099365234375,
-0.0203399658203125,
0.009124755859375,
-0.0259246826171875,
-0.036224365234375,
0.012969970703125,
0.00896453857421875,
-0.018798828125,
0.0253753662109375,
-0.0027370452880859375,
-0.028472900390625,
-0.0011882781982421875,
-0.01155853271484375,
0.0239715576171875,
-0.02130126953125,
0.08770751953125,
0.06787109375,
-0.049591064453125,
0.0648193359375,
-0.01027679443359375,
0.0100555419921875,
0.002628326416015625,
-0.0011301040649414062,
-0.0192108154296875,
-0.0108795166015625,
-0.051116943359375,
-0.0263214111328125,
0.00807952880859375,
-0.0211639404296875,
-0.019683837890625,
-0.02044677734375,
-0.0494384765625,
-0.010772705078125,
-0.05230712890625,
-0.012542724609375,
0.0406494140625,
-0.1156005859375,
0.037811279296875,
-0.033843994140625,
-0.07073974609375,
-0.0251617431640625,
0.01898193359375,
0.0233917236328125,
-0.06109619140625,
0.04547119140625,
-0.0019779205322265625,
-0.006328582763671875,
-0.0173187255859375,
0.00029659271240234375,
-0.0200347900390625,
0.007793426513671875,
0.01385498046875,
-0.00024890899658203125,
-0.0026187896728515625,
-0.0163116455078125,
0.0294647216796875,
-0.04229736328125,
-0.008148193359375,
-0.005702972412109375,
0.032196044921875,
-0.04193115234375,
0.0184173583984375,
0.007671356201171875,
0.023895263671875,
0.0284423828125,
-0.035919189453125,
-0.01482391357421875,
0.004673004150390625,
-0.0263824462890625,
0.01371002197265625,
0.035736083984375,
-0.0095672607421875,
-0.0152740478515625,
0.0361328125,
-0.042236328125,
0.00453948974609375,
-0.05511474609375,
-0.0570068359375,
-0.037322998046875,
0.06243896484375,
0.00341796875,
-0.049163818359375,
-0.012969970703125,
0.00408172607421875,
0.016326904296875,
0.0100250244140625,
-0.0025844573974609375,
0.0182342529296875,
-0.0133056640625,
-0.00634002685546875,
-0.017364501953125,
0.02996826171875,
-0.01522064208984375,
-0.03662109375,
-0.01360321044921875,
0.004154205322265625,
0.023651123046875,
-0.02362060546875,
-0.019989013671875,
-0.0367431640625,
0.053741455078125,
0.037872314453125,
0.011474609375,
-0.001773834228515625,
-0.039825439453125,
0.012664794921875,
0.061309814453125,
-0.021820068359375,
-0.0088348388671875,
-0.0007643699645996094,
0.0152587890625,
-0.01261138916015625,
-0.04864501953125,
-0.0240631103515625,
-0.0186004638671875,
-0.0300140380859375,
0.0286102294921875,
0.007755279541015625,
-0.0094451904296875,
-0.024810791015625,
0.00740814208984375,
-0.0203704833984375,
-0.021484375,
0.043548583984375,
-0.0526123046875,
0.06341552734375,
-0.038848876953125,
0.039337158203125,
-0.054718017578125,
0.00058746337890625,
-0.06085205078125,
-0.0859375,
-0.016693115234375,
0.04534912109375,
0.03533935546875,
-0.0272674560546875,
0.0175628662109375,
-0.02276611328125,
0.0660400390625,
0.033447265625,
-0.016204833984375,
0.020416259765625,
-0.0311737060546875,
-0.003910064697265625,
-0.00391387939453125,
0.007137298583984375,
-0.0199432373046875,
0.0208587646484375,
-0.02032470703125,
-0.060028076171875,
-0.0208892822265625,
-0.0233306884765625,
0.0005784034729003906,
0.00081634521484375,
-0.034454345703125,
-0.06292724609375,
-0.01027679443359375,
-0.018035888671875,
0.0130767822265625,
-0.032012939453125,
0.020355224609375,
-0.0068817138671875,
-0.048309326171875,
-0.0233917236328125,
-0.0430908203125,
-0.02935791015625,
0.0244293212890625,
0.04168701171875,
0.035736083984375,
0.0153350830078125,
0.00939178466796875,
-0.003856658935546875,
0.00959014892578125,
0.0223541259765625,
0.05914306640625,
0.032623291015625,
0.00798797607421875,
0.0174713134765625,
0.01076507568359375,
0.0299224853515625,
-0.0382080078125,
0.0833740234375,
0.0157012939453125,
-0.02423095703125,
0.0504150390625,
0.0214080810546875,
-0.056793212890625,
0.0037708282470703125,
-0.0258331298828125,
0.048675537109375,
0.019927978515625,
-0.02191162109375,
-0.041015625,
-0.002712249755859375,
0.0208282470703125,
-0.01248931884765625,
-0.0114898681640625,
-0.016448974609375,
0.07611083984375,
0.033416748046875,
0.00003618001937866211,
0.043975830078125,
0.07281494140625,
-0.01416778564453125,
0.01372528076171875,
0.00966644287109375,
-0.0012521743774414062,
0.0273895263671875,
0.02606201171875,
0.004207611083984375,
-0.01136016845703125,
0.010223388671875,
-0.06976318359375,
0.032501220703125,
-0.00598907470703125,
-0.032867431640625,
0.033782958984375,
0.0027923583984375,
-0.027374267578125,
-0.0007214546203613281,
0.0246734619140625,
0.037506103515625,
-0.0200958251953125,
-0.0007081031799316406,
-0.03375244140625,
0.0435791015625,
-0.055816650390625,
0.0205535888671875,
-0.01165008544921875,
0.01163482666015625,
0.01343536376953125,
0.032867431640625,
-0.00943756103515625,
0.009002685546875,
-0.0002048015594482422,
0.039642333984375,
0.024383544921875,
0.04998779296875,
0.0085296630859375,
-0.056182861328125,
0.022308349609375,
0.0005831718444824219,
0.00672149658203125,
-0.03680419921875,
0.004589080810546875,
0.034698486328125,
0.02880859375,
0.042144775390625,
0.01399993896484375,
-0.01702880859375,
-0.0128173828125,
-0.0214996337890625,
0.034912109375,
-0.0261993408203125,
-0.051055908203125,
-0.0296783447265625,
0.03436279296875,
0.06268310546875,
-0.01544952392578125,
-0.02801513671875,
0.044647216796875,
-0.018890380859375,
0.0181427001953125,
0.030181884765625,
-0.03448486328125,
0.0205841064453125,
0.0188140869140625,
-0.006317138671875,
-0.005413055419921875,
0.01227569580078125,
-0.07305908203125,
-0.0211639404296875,
-0.0172119140625,
-0.005096435546875,
0.0645751953125,
-0.031646728515625,
0.007587432861328125,
-0.051055908203125,
0.0338134765625,
-0.0941162109375,
0.027618408203125,
-0.015228271484375,
0.00202178955078125,
0.052398681640625,
-0.04412841796875,
-0.006961822509765625,
-0.043731689453125,
0.009521484375,
-0.00974273681640625,
-0.01385498046875,
-0.01690673828125,
-0.0249786376953125,
0.01666259765625,
-0.0081634521484375,
0.01363372802734375,
0.04736328125,
0.00540924072265625,
-0.0309906005859375,
0.0261383056640625,
0.023651123046875,
0.00424957275390625,
0.0308837890625,
0.0169525146484375,
0.03045654296875,
-0.01068115234375,
-0.06927490234375,
-0.0256500244140625,
-0.0263519287109375,
-0.053680419921875,
0.012420654296875,
0.00786590576171875,
-0.000133514404296875,
0.019561767578125,
0.0092620849609375,
0.0208740234375,
0.0400390625,
-0.026702880859375,
-0.0103607177734375,
-0.024658203125,
0.01580810546875,
-0.058135986328125,
0.00981903076171875,
-0.002471923828125,
-0.03399658203125,
0.0244903564453125,
-0.00457763671875,
0.01519775390625,
0.0301055908203125,
-0.05572509765625,
0.0292205810546875,
0.0489501953125,
0.029541015625,
0.0093994140625,
0.028350830078125,
-0.0184326171875,
0.040985107421875,
0.0142364501953125,
0.0143585205078125,
0.03924560546875,
0.04412841796875,
0.018646240234375,
-0.047882080078125,
0.06231689453125,
0.0073394775390625,
-0.03875732421875,
0.0204925537109375,
-0.0291900634765625,
0.0107269287109375,
-0.0183563232421875,
0.0509033203125,
0.0163116455078125,
-0.010162353515625,
0.0068817138671875,
-0.04022216796875,
0.00902557373046875,
-0.00328826904296875,
0.00804901123046875,
-0.00756072998046875,
0.00641632080078125,
-0.0016546249389648438,
-0.0301361083984375,
0.00711822509765625,
-0.009033203125,
0.0009288787841796875,
0.0091552734375,
0.0258636474609375,
-0.0267486572265625,
-0.0293426513671875,
-0.060821533203125,
0.032928466796875,
-0.0472412109375,
-0.00016367435455322266,
0.0159759521484375,
-0.0030612945556640625,
-0.0300445556640625,
-0.059661865234375,
-0.01291656494140625,
-0.0009579658508300781,
-0.040191650390625,
-0.007366180419921875,
0.0237579345703125,
0.04034423828125,
0.03515625,
-0.004505157470703125,
-0.00930023193359375,
0.00635528564453125,
0.00229644775390625,
-0.0289306640625,
-0.0107421875,
0.032440185546875,
0.00142669677734375,
-0.044769287109375,
0.031890869140625,
-0.030517578125,
-0.0240325927734375,
0.006549835205078125,
-0.002471923828125,
0.030059814453125,
-0.05072021484375,
-0.0011510848999023438,
0.04833984375,
0.01474761962890625,
-0.01439666748046875,
-0.01326751708984375,
0.01387786865234375,
-0.07989501953125,
-0.0784912109375,
-0.0023632049560546875,
-0.10400390625,
-0.0311737060546875,
-0.054901123046875,
-0.06298828125,
0.07025146484375,
0.004657745361328125,
0.03411865234375,
0.0189208984375,
0.0016317367553710938,
-0.049163818359375,
-0.015380859375,
-0.026885986328125,
0.031829833984375,
-0.01279449462890625,
-0.0035991668701171875,
-0.0440673828125,
0.01142120361328125,
-0.035308837890625,
0.0184326171875,
0.0215911865234375,
-0.0037631988525390625,
0.049346923828125,
-0.03778076171875,
0.0218505859375,
0.0279083251953125,
-0.016021728515625,
-0.01010894775390625,
0.0035572052001953125,
-0.006420135498046875,
0.031585693359375,
-0.0052032470703125,
0.03533935546875,
-0.0249176025390625,
-0.01007843017578125,
0.0197296142578125,
0.00494384765625,
0.0191497802734375,
0.0004324913024902344,
0.03338623046875,
-0.005336761474609375,
-0.015350341796875,
0.01947021484375,
-0.038330078125,
-0.01434326171875,
0.06768798828125,
0.0290069580078125,
-0.009246826171875,
0.0148468017578125,
-0.049163818359375,
0.056915283203125,
-0.0245208740234375,
-0.01042938232421875,
-0.0114898681640625,
-0.0029697418212890625,
-0.003131866455078125,
-0.01253509521484375,
-0.0306243896484375,
0.011322021484375,
0.0081787109375,
-0.01593017578125,
-0.0126190185546875,
0.01461029052734375,
-0.06298828125,
0.0007581710815429688,
0.06988525390625,
0.0164794921875,
-0.01306915283203125,
-0.04034423828125,
0.0002512931823730469,
0.01873779296875,
0.026824951171875,
0.0103302001953125,
0.026702880859375,
-0.03619384765625,
0.01953125,
0.00021159648895263672,
-0.01153564453125,
0.0011682510375976562,
0.020233154296875,
0.002132415771484375,
0.024871826171875,
0.003002166748046875,
-0.031768798828125,
0.00922393798828125,
-0.0014257431030273438,
-0.027435302734375,
-0.00112152099609375,
0.002010345458984375,
0.01422119140625,
-0.024505615234375,
0.014678955078125,
-0.012176513671875,
0.023834228515625,
0.0013523101806640625,
0.0083465576171875,
-0.03619384765625,
-0.046783447265625,
0.0096893310546875,
0.032257080078125,
0.052490234375,
0.07666015625,
0.06298828125,
-0.0009593963623046875,
-0.024566650390625,
0.0467529296875,
0.052734375,
-0.032196044921875,
0.00003975629806518555,
-0.01343536376953125,
0.037567138671875,
0.0304107666015625,
-0.00450897216796875,
-0.01241302490234375,
0.029083251953125,
0.039947509765625,
-0.0241851806640625,
0.04132080078125,
-0.013336181640625,
0.01043701171875,
0.058074951171875,
-0.0322265625,
0.058013916015625,
-0.0052642822265625,
-0.055816650390625,
-0.0107879638671875,
0.00927734375,
-0.05853271484375,
0.01479339599609375,
0.051055908203125,
-0.050140380859375,
0.04864501953125,
-0.03680419921875,
-0.03631591796875,
0.00511932373046875,
0.01873779296875,
0.002414703369140625,
0.06353759765625,
0.003925323486328125,
0.01236724853515625,
-0.06683349609375,
-0.02081298828125,
0.0198822021484375,
0.0079345703125,
-0.01322174072265625,
0.016387939453125,
0.0289306640625,
0.01922607421875,
0.0290985107421875,
0.042022705078125,
0.002044677734375,
0.0262451171875,
0.006473541259765625,
0.020843505859375,
0.02825927734375,
-0.033782958984375,
0.06976318359375,
0.055450439453125,
0.0031604766845703125,
-0.0270233154296875,
0.0038890838623046875,
-0.03369140625,
0.006473541259765625,
0.036712646484375,
0.05126953125,
-0.01116180419921875,
-0.0245819091796875,
0.01241302490234375,
0.006099700927734375,
0.01218414306640625,
0.040985107421875,
0.020599365234375,
-0.004901885986328125,
-0.047576904296875,
-0.0543212890625,
0.0204010009765625,
-0.01953125,
-0.0240478515625,
0.012298583984375,
0.0273590087890625,
0.0231781005859375,
0.00945281982421875,
-0.0274810791015625,
-0.01233673095703125,
0.0265350341796875,
-0.0377197265625,
0.0137176513671875,
-0.05029296875,
0.034912109375,
0.0036296844482421875,
0.0197906494140625,
-0.01236724853515625,
-0.0214080810546875,
0.0318603515625,
-0.0030689239501953125,
-0.00475311279296875,
-0.0207061767578125,
-0.006378173828125,
-0.0073089599609375,
-0.031982421875,
0.0262908935546875,
-0.01415252685546875,
0.006465911865234375,
-0.023773193359375,
-0.0166473388671875,
0.050537109375,
0.0316162109375,
-0.059051513671875,
0.0313720703125,
0.000400543212890625,
0.0027599334716796875,
0.0216827392578125,
0.02447509765625,
-0.0038433074951171875,
0.023162841796875,
-0.04351806640625,
-0.08203125,
-0.027069091796875,
0.061187744140625,
-0.0478515625,
0.0058746337890625,
-0.0010852813720703125,
-0.026824951171875,
0.0178985595703125,
0.01314544677734375,
0.032623291015625,
0.058197021484375,
0.043670654296875,
-0.0164947509765625,
-0.006103515625,
0.0166473388671875,
0.010101318359375,
-0.0018672943115234375,
-0.01143646240234375,
0.011260986328125,
-0.0010423660278320312,
-0.0104522705078125,
-0.0176239013671875,
0.007534027099609375,
-0.04779052734375,
-0.10235595703125,
0.012176513671875,
0.0104522705078125,
-0.047882080078125,
-0.043548583984375,
0.039947509765625,
0.0231170654296875,
-0.01145172119140625,
-0.0217437744140625,
-0.0178985595703125,
-0.0196075439453125,
-0.0011835098266601562,
-0.003917694091796875,
0.0008678436279296875,
0.036376953125,
-0.01435089111328125,
-0.0178375244140625,
-0.01702880859375,
-0.0142669677734375,
-0.01149749755859375,
0.0036029815673828125,
-0.018707275390625,
0.03912353515625,
0.017974853515625,
-0.04107666015625,
-0.007785797119140625,
0.0072174072265625,
0.00860595703125,
0.0059814453125,
-0.0005559921264648438,
-0.0556640625,
-0.0037097930908203125,
0.056488037109375,
0.0616455078125,
0.029693603515625,
-0.032867431640625,
-0.01114654541015625,
0.01267242431640625,
-0.03314208984375,
-0.02984619140625,
0.0165863037109375,
-0.043670654296875,
-0.0104217529296875,
-0.0369873046875,
-0.003326416015625,
0.0006556510925292969,
-0.01226806640625,
-0.040191650390625,
-0.01099395751953125,
-0.0360107421875,
0.01480865478515625,
-0.074462890625,
0.0076141357421875,
0.0791015625,
-0.0445556640625,
0.00010097026824951172,
0.025726318359375,
0.004302978515625,
0.054718017578125,
0.039764404296875,
0.03717041015625,
0.02972412109375,
-0.0540771484375,
-0.00495147705078125,
0.02630615234375,
0.0214080810546875,
-0.033050537109375,
-0.034576416015625,
-0.004695892333984375,
0.006458282470703125,
-0.0119476318359375,
0.02398681640625,
0.034759521484375,
-0.043426513671875,
-0.0249786376953125,
0.0287933349609375,
-0.063232421875,
0.052978515625,
-0.0159454345703125,
-0.0007920265197753906,
-0.00004869699478149414,
0.0335693359375,
0.07476806640625,
-0.0204315185546875,
-0.00208282470703125,
-0.00597381591796875,
-0.0479736328125,
-0.06109619140625,
0.038421630859375,
0.0005102157592773438,
-0.0240936279296875,
0.025543212890625
]
|
64743e88434d115a7fe51e03f93711bdc06afffa | Wordpress Stackexchange
Q: Get page id by template I want to know if it's possible to get the ID of a page with a specific template. Is this possible to get the ID of a page that assigned to "page-special.php"?
A: If your page template resides inside sub-folder, theme-folder/page-templates/page-template.php then you below query will works:
$page_details = get_pages( array(
'post_type' => 'page',
'meta_key' => '_wp_page_template',
'hierarchical' => 0,
'meta_value' => 'page-templates/page-template.php'
));
This above codes also display sub-pages as well.
Thanks
| Q: Get page id by template I want to know if it's possible to get the ID of a page with a specific template. Is this possible to get the ID of a page that assigned to "page-special.php"?
A: If your page template resides inside sub-folder, theme-folder/page-templates/page-template.php then you below query will works:
$page_details = get_pages( array(
'post_type' => 'page',
'meta_key' => '_wp_page_template',
'hierarchical' => 0,
'meta_value' => 'page-templates/page-template.php'
));
This above codes also display sub-pages as well.
Thanks
A: When a page is created, the assigned template to that page is saved as custom post meta in the same way as custom fields. The meta_key is _wp_page_template and the meta_value will be the page template
You can simply make use of get_pages to retrieve all pages which have a meta_value of the specified template
$pages = get_pages(array(
'meta_key' => '_wp_page_template',
'meta_value' => 'page-special.php'
));
foreach($pages as $page){
echo $page->ID.'<br />';
}
EDIT 23-07-2015
If one just needs the page ids, then you make use of get_posts and then just pass page as post_type and 'idsasfields` value. This will ensure a much faster, much more optimized query as we will only return the post id column in the db and not all of them for the given pages
(Requires PHP 5.4+)
$args = [
'post_type' => 'page',
'fields' => 'ids',
'nopaging' => true,
'meta_key' => '_wp_page_template',
'meta_value' => 'page-special.php'
];
$pages = get_posts( $args );
foreach ( $pages as $page )
echo $page . '</br>';
A: The following is a slightly more articulated script that take into account a language, if needed. NOTE that it assumes the usage of Polylang, not WPML.
function get_post_id_by_template($template,$lang_slug = null){
global $wpdb;
$wh = ($lang_slug) ? " AND t.slug = %s" : "";
$query = $wpdb->prepare(
"SELECT DISTINCT p.ID
FROM $wpdb->posts p
INNER JOIN $wpdb->postmeta meta ON meta.post_id = p.ID
INNER JOIN $wpdb->term_relationships tr ON meta.post_id = tr.object_id
INNER JOIN $wpdb->term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
INNER JOIN $wpdb->terms t ON tt.term_id = t.term_id
WHERE p.post_status = 'publish' AND meta.meta_key = %s AND meta.meta_value = %s" . $wh,
'_wp_page_template',
$template,
$lang_slug
);
$ids = $wpdb->get_results($query);
if($ids && isset($ids[0])){
$p = $ids[0];
return $p->ID;
} else {
return false;
}
}// get_post_id_by_template
A: Here is a complete function that works with WPML and Polylang. Credit to https://github.com/cyrale/
/**
* Search for a page with a particular template.
*
* @param string $template Template filename.
* @param array $args (Optional) See also get_posts() for example parameter usage.
* @param bool $single (Optional) Whether to return a single value.
*
* @return Will be an array of WP_Post if $single is false. Will be a WP_Post object if the page is find, FALSE otherwise
*/
if (!function_exists('get_page_by_template')) {
function get_page_by_template($template, $args = array(), $single = true) {
$pages_by_template = wp_cache_get('pages_by_template', 'cyrale');
if (empty($pages_by_template) || !is_array($pages_by_template)) {
$pages_by_template = array();
}
if (!isset($pages_by_template[$template])) {
$args = wp_parse_args(array(
'posts_per_page' => -1,
'post_type' => 'page',
'suppress_filters' => 0,
'meta_query' => array(
array(
'key' => '_wp_page_template',
'value' => $template,
),
),
), $args);
$pages = get_posts($args);
$pages_by_template[$template]= array(
'single' => !empty($pages) && is_array($pages) ? reset($pages) : false,
'pages' => $pages,
);
}
wp_cache_set('pages_by_template', $pages_by_template, 'cyrale');
return $pages_by_template[$template][$single ? 'single' : 'pages'];
}
}
A: function kavkaz_get_page($page_template_filename){
$pages = get_pages( array(
'meta_key' => '_wp_page_template',
'meta_value' => $page_template_filename
) );
$url = null;
if(isset($pages[0])) {
$url = $pages[0]->guid;
}
return esc_url( $url );
}
A: You can query the postmeta table directly:
global $wpdb;
$template = 'page-special';
$sql = "select post_id from {$wpdb->postmeta} where meta_key = '{$template}.php'";
$pages = $wpdb->get_col($sql);
var_dump($pages);
| wordpress | {
"language": "en",
"length": 588,
"provenance": "stackexchange_00019.jsonl.gz:450171",
"question_score": "24",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167186"
} | [
-0.0003266334533691406,
-0.0175018310546875,
0.0266876220703125,
0.0008168220520019531,
-0.01276397705078125,
-0.00934600830078125,
0.0298004150390625,
-0.01490020751953125,
-0.024139404296875,
0.01555633544921875,
-0.02392578125,
0.019775390625,
-0.03619384765625,
-0.020263671875,
0.012603759765625,
-0.0423583984375,
0.0118560791015625,
-0.00919342041015625,
0.01088714599609375,
-0.0268707275390625,
0.0166015625,
-0.02685546875,
0.0159454345703125,
0.023101806640625,
0.034423828125,
-0.042083740234375,
0.0162353515625,
0.020050048828125,
0.00946044921875,
-0.020965576171875,
0.0192413330078125,
0.00811004638671875,
0.0204925537109375,
-0.0347900390625,
0.042938232421875,
-0.01273345947265625,
-0.015655517578125,
-0.0019407272338867188,
0.022369384765625,
-0.00937652587890625,
-0.0026645660400390625,
0.01898193359375,
0.0034770965576171875,
-0.0015468597412109375,
-0.0279083251953125,
-0.030609130859375,
-0.0262908935546875,
-0.036468505859375,
0.0079193115234375,
0.0211639404296875,
0.01329803466796875,
-0.0045928955078125,
0.0206146240234375,
0.03900146484375,
-0.0147857666015625,
-0.0283355712890625,
0.020782470703125,
-0.0136566162109375,
0.024169921875,
-0.027496337890625,
-0.032379150390625,
0.00991058349609375,
0.0282135009765625,
-0.0070037841796875,
-0.007080078125,
-0.006961822509765625,
0.004001617431640625,
0.0236053466796875,
0.0078887939453125,
-0.01520538330078125,
-0.00787353515625,
0.0018358230590820312,
-0.003376007080078125,
-0.03277587890625,
-0.013946533203125,
-0.007617950439453125,
0.0390625,
-0.01216888427734375,
-0.0269622802734375,
0.0008311271667480469,
0.00849151611328125,
-0.00844573974609375,
-0.059539794921875,
0.0175628662109375,
0.007476806640625,
0.045684814453125,
-0.020111083984375,
-0.0321044921875,
-0.037109375,
-0.0020542144775390625,
-0.04638671875,
-0.0127105712890625,
0.037994384765625,
-0.016326904296875,
-0.0794677734375,
0.0237274169921875,
0.0306396484375,
0.09173583984375,
-0.038726806640625,
0.0239410400390625,
-0.022979736328125,
-0.0294189453125,
0.048858642578125,
-0.07244873046875,
-0.004039764404296875,
0.023284912109375,
0.03515625,
0.021759033203125,
0.0158233642578125,
0.0190582275390625,
-0.00011229515075683594,
0.01020050048828125,
0.004093170166015625,
-0.007297515869140625,
-0.04974365234375,
0.0235595703125,
0.003963470458984375,
-0.045684814453125,
0.01258087158203125,
-0.0219573974609375,
0.017669677734375,
0.041656494140625,
0.0298614501953125,
-0.028228759765625,
-0.006290435791015625,
0.0038585662841796875,
-0.02178955078125,
-0.0672607421875,
0.017425537109375,
-0.0015592575073242188,
-0.049957275390625,
-0.0007276535034179688,
0.053070068359375,
0.0110015869140625,
0.00479888916015625,
-0.016571044921875,
-0.014129638671875,
0.0050811767578125,
0.0100555419921875,
-0.0129852294921875,
-0.019317626953125,
-0.000011444091796875,
0.0462646484375,
-0.0281829833984375,
-0.047454833984375,
0.00982666015625,
0.01708984375,
0.038909912109375,
-0.02813720703125,
-0.045623779296875,
0.007122039794921875,
-0.007472991943359375,
-0.00028228759765625,
0.01424407958984375,
0.0289306640625,
-0.03997802734375,
0.005069732666015625,
-0.0321044921875,
0.04296875,
-0.0150604248046875,
0.026519775390625,
0.010986328125,
-0.0057830810546875,
0.020050048828125,
-0.00749969482421875,
-0.0129852294921875,
-0.01422119140625,
-0.011322021484375,
0.0222930908203125,
0.048095703125,
0.0406494140625,
-0.03985595703125,
-0.035980224609375,
-0.0016689300537109375,
-0.01348114013671875,
0.003307342529296875,
0.0020999908447265625,
0.01273345947265625,
0.0033435821533203125,
0.03143310546875,
0.0006289482116699219,
-0.033172607421875,
0.01081085205078125,
0.012969970703125,
-0.04620361328125,
0.051116943359375,
0.01055145263671875,
0.05621337890625,
-0.0013437271118164062,
0.016815185546875,
0.01251983642578125,
0.01436614990234375,
-0.062225341796875,
0.05078125,
0.018310546875,
-0.014068603515625,
-0.006679534912109375,
0.0235748291015625,
-0.0021305084228515625,
-0.07208251953125,
-0.0114593505859375,
-0.011962890625,
0.0078125,
0.0304718017578125,
-0.02154541015625,
-0.0055999755859375,
-0.0090179443359375,
0.018035888671875,
0.0122528076171875,
0.0167083740234375,
-0.0007615089416503906,
-0.01751708984375,
-0.0014219284057617188,
-0.0294647216796875,
-0.04278564453125,
0.0017805099487304688,
-0.02044677734375,
-0.01399993896484375,
-0.0229034423828125,
0.00724029541015625,
-0.0306549072265625,
0.0091400146484375,
-0.047882080078125,
0.00611114501953125,
0.0426025390625,
0.00836944580078125,
-0.0223541259765625,
-0.012298583984375,
0.0216217041015625,
0.049591064453125,
-0.08428955078125,
-0.000014007091522216797,
-0.0015745162963867188,
0.018890380859375,
-0.02947998046875,
0.0019273757934570312,
0.00848388671875,
-0.0306549072265625,
0.014495849609375,
0.021575927734375,
0.0305633544921875,
0.016265869140625,
-0.01261138916015625,
-0.01117706298828125,
0.0283203125,
-0.056243896484375,
-0.007396697998046875,
-0.006259918212890625,
-0.002246856689453125,
0.038604736328125,
0.019805908203125,
0.03253173828125,
-0.0034046173095703125,
-0.00995635986328125,
-0.01233673095703125,
0.03265380859375,
-0.018798828125,
0.0309906005859375,
-0.01331329345703125,
0.038604736328125,
-0.032562255859375,
0.0265045166015625,
0.058441162109375,
-0.0283966064453125,
0.028228759765625,
0.0205230712890625,
0.044952392578125,
0.03240966796875,
-0.01209259033203125,
0.0053863525390625,
0.001667022705078125,
-0.00780487060546875,
0.00675201416015625,
0.0294952392578125,
-0.0009551048278808594,
0.035369873046875,
-0.010711669921875,
-0.018341064453125,
-0.007503509521484375,
0.0261383056640625,
0.00848388671875,
0.07415771484375,
-0.0032901763916015625,
-0.015960693359375,
-0.033416748046875,
-0.07232666015625,
-0.00806427001953125,
0.032440185546875,
-0.00018990039825439453,
0.0262908935546875,
0.01201629638671875,
0.07586669921875,
-0.019866943359375,
0.0457763671875,
-0.002410888671875,
0.0192718505859375,
0.05975341796875,
-0.036102294921875,
0.049163818359375,
-0.03302001953125,
0.0259246826171875,
0.056915283203125,
-0.03875732421875,
0.0374755859375,
0.0033817291259765625,
-0.0304718017578125,
0.03387451171875,
-0.0010538101196289062,
0.0106658935546875,
-0.0022449493408203125,
-0.01027679443359375,
0.06060791015625,
0.0131378173828125,
0.07861328125,
-0.029327392578125,
-0.048736572265625,
-0.01033782958984375,
0.01380157470703125,
-0.0819091796875,
-0.0936279296875,
0.0238189697265625,
-0.0037078857421875,
-0.026885986328125,
-0.0303497314453125,
-0.00954437255859375,
0.0036830902099609375,
-0.0267181396484375,
-0.01314544677734375,
-0.01030731201171875,
-0.034454345703125,
-0.06829833984375,
-0.0672607421875,
-0.049285888671875,
-0.00611114501953125,
-0.0139312744140625,
-0.013916015625,
0.007587432861328125,
0.0255889892578125,
0.00010091066360473633,
-0.04461669921875,
0.01324462890625,
0.048858642578125,
-0.0034847259521484375,
-0.0118560791015625,
-0.0031566619873046875,
-0.040435791015625,
-0.0010080337524414062,
0.0001844167709350586,
-0.039337158203125,
-0.01311492919921875,
0.0494384765625,
-0.0189971923828125,
-0.0222625732421875,
-0.007236480712890625,
-0.007717132568359375,
-0.007415771484375,
0.038909912109375,
-0.00530242919921875,
-0.006572723388671875,
-0.044677734375,
-0.0721435546875,
-0.05218505859375,
-0.090576171875,
0.06280517578125,
0.0762939453125,
0.0264434814453125,
-0.02691650390625,
0.0240631103515625,
0.0247802734375,
0.004375457763671875,
-0.0143890380859375,
-0.000031948089599609375,
0.04693603515625,
-0.00634002685546875,
0.017120361328125,
-0.01229095458984375,
0.027496337890625,
-0.01012420654296875,
0.004695892333984375,
0.004863739013671875,
0.0003349781036376953,
-0.01165771484375,
-0.0008912086486816406,
-0.03277587890625,
-0.060638427734375,
0.0413818359375,
-0.0282135009765625,
0.01184844970703125,
-0.0347900390625,
-0.0203704833984375,
0.005222320556640625,
0.10174560546875,
-0.035797119140625,
-0.029266357421875,
-0.0165557861328125,
0.01029205322265625,
0.0031280517578125,
-0.02630615234375,
-0.00942230224609375,
-0.0149688720703125,
-0.0257568359375,
0.01043701171875,
-0.01161956787109375,
-0.008575439453125,
-0.0281829833984375,
0.05548095703125,
-0.01442718505859375,
-0.005985260009765625,
0.0310211181640625,
0.00909423828125,
0.009613037109375,
0.049774169921875,
-0.0009036064147949219,
0.044952392578125,
-0.023834228515625,
-0.004390716552734375,
-0.035064697265625,
-0.016326904296875,
0.03240966796875,
0.00968170166015625,
0.01434326171875,
-0.050994873046875,
0.0011806488037109375,
0.01947021484375,
-0.00897979736328125,
0.043914794921875,
-0.02777099609375,
0.0124359130859375,
-0.034088134765625,
-0.019134521484375,
-0.0015687942504882812,
-0.0298004150390625,
0.0190887451171875,
-0.0020999908447265625,
-0.0313720703125,
-0.00794219970703125,
-0.0462646484375,
0.007320404052734375,
0.0011072158813476562,
-0.0285186767578125,
-0.0311737060546875,
-0.0186004638671875,
0.0230560302734375,
0.0161895751953125,
0.0185394287109375,
-0.000048220157623291016,
-0.035797119140625,
-0.03515625,
0.058990478515625,
0.06903076171875,
-0.029876708984375,
-0.00949859619140625,
0.0648193359375,
0.0260009765625,
-0.06768798828125,
-0.0499267578125,
0.0185394287109375,
0.034271240234375,
0.00591278076171875,
0.06634521484375,
0.0362548828125,
-0.006641387939453125,
0.054168701171875,
0.0263824462890625,
-0.0204620361328125,
-0.013214111328125,
0.054931640625,
-0.016510009765625,
-0.04779052734375,
0.0357666015625,
-0.06341552734375,
0.03936767578125,
0.04620361328125,
-0.04754638671875,
-0.021392822265625,
-0.054931640625,
0.0738525390625,
-0.0455322265625,
0.08367919921875,
-0.058807373046875,
-0.040283203125,
0.0086669921875,
0.01132965087890625,
0.0158843994140625,
0.0137481689453125,
-0.0036945343017578125,
0.0223541259765625,
0.02740478515625,
0.01259613037109375,
0.0499267578125,
0.0511474609375,
-0.00005364418029785156,
0.0270843505859375,
0.041839599609375,
-0.00617218017578125,
0.0011281967163085938,
-0.0025634765625,
0.0058746337890625,
0.0026340484619140625,
-0.033660888671875,
0.007266998291015625,
0.004852294921875,
-0.012969970703125,
0.005939483642578125,
-0.00830841064453125,
0.034515380859375,
0.0242462158203125,
-0.02392578125,
-0.0121002197265625,
0.00030159950256347656,
-0.0211181640625,
-0.044921875,
-0.0243072509765625,
0.002391815185546875,
-0.0277862548828125,
0.0024700164794921875,
0.045013427734375,
-0.0192108154296875,
0.010101318359375,
-0.00656890869140625,
0.022552490234375,
0.016082763671875,
0.0273590087890625,
0.00872039794921875,
0.00853729248046875,
-0.003387451171875,
0.00603485107421875,
-0.00405120849609375,
-0.0279693603515625,
0.021331787109375,
0.031982421875,
0.044586181640625,
0.020416259765625,
-0.0251922607421875,
-0.01454925537109375,
-0.03387451171875,
-0.004756927490234375,
0.00545501708984375,
-0.0283050537109375,
-0.032989501953125,
-0.006900787353515625,
0.02532958984375,
0.01395416259765625,
0.004116058349609375,
0.00287628173828125,
0.00482177734375,
-0.0298614501953125,
0.009979248046875,
-0.01486968994140625,
-0.00234222412109375,
-0.0168914794921875,
-0.01331329345703125,
-0.0264739990234375,
0.0018873214721679688,
-0.0007166862487792969,
-0.047698974609375,
-0.041168212890625,
-0.00637054443359375,
0.00146484375,
0.037200927734375,
-0.0034084320068359375,
0.074462890625,
-0.0155029296875,
-0.0635986328125,
-0.01009368896484375,
0.006816864013671875,
0.01328277587890625,
0.01145172119140625,
-0.008880615234375,
0.0230560302734375,
-0.047821044921875,
-0.00632476806640625,
0.0206756591796875,
-0.064208984375,
-0.034759521484375,
-0.03643798828125,
-0.0111083984375,
0.01275634765625,
-0.0038700103759765625,
0.0216064453125,
0.0013370513916015625,
0.0306243896484375,
-0.01419830322265625,
0.050750732421875,
0.00830078125,
0.06195068359375,
-0.032806396484375,
0.0246429443359375,
0.0198211669921875,
0.0296173095703125,
-0.0103302001953125,
-0.02593994140625,
0.00991058349609375,
-0.0115509033203125,
0.0035724639892578125,
-0.04229736328125,
0.0219268798828125,
0.005413055419921875,
0.0469970703125,
0.01195526123046875,
0.025604248046875,
-0.035400390625,
-0.00672149658203125,
-0.0225982666015625,
0.00997161865234375,
-0.037933349609375,
-0.02667236328125,
0.025360107421875,
-0.025848388671875,
-0.038360595703125,
0.01898193359375,
0.03289794921875,
-0.0192718505859375,
-0.010894775390625,
-0.0272979736328125,
0.00675201416015625,
-0.034332275390625,
0.061767578125,
0.06439208984375,
0.0259857177734375,
0.041656494140625,
-0.01197052001953125,
0.0240631103515625,
0.00209808349609375,
0.03851318359375,
-0.00955963134765625,
-0.038818359375,
0.0662841796875,
0.030303955078125,
-0.007236480712890625,
0.05419921875,
-0.0269622802734375,
0.006069183349609375,
0.02398681640625,
0.0285491943359375,
-0.049774169921875,
0.010986328125,
0.0102386474609375,
-0.0093231201171875,
-0.01100921630859375,
-0.02117919921875,
-0.0115509033203125,
-0.03936767578125,
0.0562744140625,
0.014068603515625,
-0.0121917724609375,
0.0103759765625,
-0.00603485107421875,
-0.01354217529296875,
-0.042510986328125,
0.053680419921875,
0.005153656005859375,
0.038482666015625,
-0.00441741943359375,
-0.021575927734375,
0.028350830078125,
-0.039306640625,
-0.00165557861328125,
-0.00960540771484375,
0.007904052734375,
-0.036407470703125,
0.028472900390625,
-0.027099609375,
0.0290374755859375,
0.0121307373046875,
0.044403076171875,
0.0172119140625,
0.062408447265625,
-0.0006322860717773438,
-0.01036834716796875,
0.0426025390625,
-0.01480865478515625,
-0.00458526611328125,
-0.0276336669921875,
0.007488250732421875,
0.0026760101318359375,
-0.03607177734375,
0.005615234375,
-0.0233001708984375,
-0.011322021484375,
-0.004238128662109375,
0.037109375,
0.1240234375,
-0.06011962890625,
-0.0204010009765625,
0.019775390625,
0.0301055908203125,
-0.0128173828125,
0.006954193115234375,
0.006336212158203125,
-0.006549835205078125,
0.020050048828125,
0.0186309814453125,
0.0239410400390625,
0.0025615692138671875,
0.026885986328125,
-0.06768798828125,
0.05267333984375,
0.020751953125,
0.0101470947265625,
0.0003650188446044922,
0.0206298828125,
-0.040496826171875,
-0.0073699951171875,
-0.0323486328125,
0.041717529296875,
0.0290679931640625,
0.04461669921875,
0.005130767822265625,
-0.0017871856689453125,
0.031646728515625,
0.0248565673828125,
0.091796875,
0.01367950439453125,
0.004894256591796875,
-0.00817108154296875,
0.06256103515625,
0.032196044921875,
-0.01543426513671875,
0.0188446044921875,
0.00411224365234375,
0.0267791748046875,
0.01422119140625,
-0.062286376953125,
0.004108428955078125,
-0.01763916015625,
-0.006069183349609375,
0.0208892822265625,
0.0299835205078125,
0.02178955078125,
0.00203704833984375,
-0.01006317138671875,
-0.07427978515625,
0.01293182373046875,
0.054656982421875,
-0.0210723876953125,
0.003326416015625,
0.0252685546875,
0.04644775390625,
-0.05072021484375,
-0.0445556640625,
-0.0247650146484375,
0.043426513671875,
0.02581787109375,
0.01181793212890625,
-0.025726318359375,
0.006450653076171875,
0.034271240234375,
-0.0221099853515625,
-0.0198974609375,
0.033355712890625,
-0.02252197265625,
0.06561279296875,
-0.0108795166015625,
0.00949859619140625,
-0.09222412109375,
-0.01172637939453125,
0.018707275390625,
0.058563232421875,
-0.051849365234375,
-0.034027099609375,
0.0162811279296875,
-0.00025463104248046875,
0.0006546974182128906,
-0.0047760009765625,
0.022003173828125,
0.0264739990234375,
0.03204345703125,
-0.01274871826171875,
-0.040130615234375,
0.026702880859375,
0.0234832763671875,
-0.00534820556640625,
-0.0325927734375,
-0.0006361007690429688,
-0.033111572265625,
-0.0599365234375,
0.028228759765625,
0.037445068359375,
0.030670166015625,
-0.0008101463317871094,
0.031005859375,
0.0203399658203125,
-0.01364898681640625,
0.0258941650390625,
0.02069091796875,
-0.0040130615234375,
-0.0157623291015625,
-0.005092620849609375,
-0.027252197265625,
-0.00615692138671875,
0.01776123046875,
-0.01200103759765625,
0.01537322998046875,
0.017669677734375,
-0.01140594482421875,
-0.022369384765625,
-0.01169586181640625,
-0.0193634033203125,
-0.0433349609375,
0.03741455078125,
-0.03662109375,
-0.00920867919921875,
-0.0181732177734375,
-0.0401611328125,
-0.0220794677734375,
-0.01812744140625,
0.03369140625,
0.007083892822265625,
0.03912353515625,
0.0073089599609375,
0.01526641845703125,
0.042144775390625,
0.0018329620361328125,
0.006954193115234375,
0.021697998046875,
-0.07177734375,
0.001850128173828125,
-0.039154052734375,
-0.026824951171875,
0.0257415771484375,
0.03619384765625,
-0.0197906494140625,
0.0169525146484375,
0.027191162109375,
0.049224853515625,
-0.0015211105346679688,
-0.0548095703125,
0.027496337890625,
0.0239105224609375,
0.0290069580078125,
0.058197021484375,
-0.027252197265625,
-0.02825927734375,
-0.018768310546875,
0.02691650390625,
0.01238250732421875,
0.049896240234375,
-0.007476806640625,
0.01316070556640625,
-0.00539398193359375,
0.052093505859375,
-0.05523681640625,
-0.024017333984375,
0.09881591796875,
0.0028896331787109375,
-0.01070404052734375,
-0.0201873779296875,
-0.067138671875,
0.07427978515625,
-0.0019702911376953125,
0.024749755859375,
0.041961669921875,
-0.013153076171875,
-0.000885009765625,
0.0318603515625,
0.0119781494140625,
-0.0162506103515625,
-0.0117950439453125,
-0.037750244140625,
-0.01337432861328125,
0.036590576171875,
0.06231689453125,
0.0108489990234375,
0.03594970703125,
-0.058258056640625,
-0.046234130859375,
0.0211029052734375,
-0.0672607421875,
0.0115509033203125,
0.0179443359375,
-0.0182952880859375,
-0.04205322265625,
0.00974273681640625,
-0.0138092041015625,
0.0229949951171875,
-0.0160980224609375,
0.060211181640625,
0.0196075439453125,
-0.0035533905029296875,
-0.01090240478515625,
-0.026947021484375,
0.00705718994140625,
-0.0303955078125,
-0.0193634033203125,
0.0092620849609375,
0.0087432861328125,
0.005214691162109375,
-0.06646728515625,
-0.0220184326171875,
-0.03692626953125,
0.0170440673828125,
0.037567138671875,
0.00873565673828125,
0.01424407958984375,
-0.0262298583984375,
-0.019775390625,
-0.0004010200500488281,
0.016082763671875,
-0.02850341796875,
0.01177215576171875,
-0.002269744873046875,
0.01319122314453125,
-0.0176544189453125,
0.0281982421875,
0.01470184326171875,
0.024749755859375,
-0.057769775390625,
0.029144287109375,
-0.0022125244140625,
-0.0224456787109375,
0.0284576416015625,
0.00952911376953125,
0.036041259765625,
-0.0207061767578125,
-0.004596710205078125,
0.0300140380859375,
0.007537841796875,
0.084228515625,
-0.033294677734375,
-0.019927978515625,
0.02557373046875,
-0.01541900634765625,
0.01337432861328125,
-0.0364990234375,
0.00870513916015625,
-0.06683349609375,
0.01611328125,
0.0020503997802734375,
0.0192413330078125,
0.04840087890625,
-0.0231170654296875,
-0.035888671875,
0.03692626953125,
-0.00004798173904418945,
-0.028656005859375,
-0.0218658447265625,
0.038055419921875,
-0.0020542144775390625,
-0.0645751953125,
-0.022552490234375,
-0.00955963134765625,
0.0205841064453125,
0.03729248046875,
0.043975830078125,
-0.01953125,
0.0670166015625,
0.035369873046875,
-0.059722900390625,
0.02374267578125,
-0.0135498046875,
0.01248931884765625,
-0.00009959936141967773,
-0.007110595703125,
0.005218505859375,
0.01087188720703125,
-0.078125,
-0.0455322265625,
-0.00917816162109375,
0.06805419921875,
0.00722503662109375,
0.01178741455078125,
-0.0357666015625,
0.0009446144104003906,
0.04437255859375,
0.06280517578125,
0.02227783203125,
-0.0338134765625,
0.0085296630859375,
-0.02227783203125,
-0.0239105224609375,
-0.005718231201171875,
0.0345458984375,
-0.072021484375,
-0.00653839111328125,
0.0200347900390625,
-0.052490234375,
-0.016754150390625,
0.003398895263671875,
-0.07373046875,
0.02154541015625,
-0.029815673828125,
-0.0121002197265625,
-0.004039764404296875,
0.011993408203125,
0.0386962890625,
-0.047607421875,
-0.0102081298828125,
-0.032012939453125,
0.0281829833984375,
0.0004527568817138672,
-0.0858154296875,
0.00797271728515625,
0.055938720703125,
-0.058624267578125,
0.0103759765625,
0.007213592529296875,
0.01192474365234375,
-0.0413818359375,
-0.01041412353515625,
-0.0018634796142578125,
0.036590576171875,
-0.0150299072265625,
0.0229339599609375,
-0.0212860107421875,
0.0386962890625,
-0.0184478759765625,
0.0970458984375,
0.005718231201171875,
0.09515380859375,
0.01149749755859375,
0.06610107421875,
-0.0258331298828125,
-0.031280517578125,
-0.0120697021484375,
-0.04833984375,
-0.0033550262451171875,
0.038238525390625,
-0.003875732421875,
-0.03582763671875,
0.031707763671875,
-0.01039886474609375,
0.00951385498046875,
0.0040435791015625
]
|
849c6d0a021b4faa853e56ee78aaa2925d6f632c | Wordpress Stackexchange
Q: Running WP Cron on multisite the right way I have WordPress Multisite with several sites. I set up DISABLE_WP_CRON to true in my wp-config.php.
If we set up cron task with wget or curl we have 30 sec rule to execute PHP script. It's so small to send tons of email notifications and do other stuff (maybe remote SMTP server connection is slow, maybe it's really huge bunch of email notifications from bbPress or anything).
Maybe we can use something like this?
php -q wp-cron.php
But it's only run cron to one site in Multisite (each site have their own cron tasks in different MySQL tables).
P. S. On wpmudev.org forum I found strange "solution" which also use Curl.
Another P. S. WP CLI have awesome wp cron commands but it's only allow run cron tasks manually (yep, we can use --url attr). For example:
wp cron event list --url=multisite.com
wp cron event list --url=subdomain.multisite.com
A: Easier one-liner with less bash:
wp site list --field=url | xargs -i -n1 wp cron event run --due-now --url="{}"
You can either run it manually or put it in a script and call it from cron as in the other answers.
| Q: Running WP Cron on multisite the right way I have WordPress Multisite with several sites. I set up DISABLE_WP_CRON to true in my wp-config.php.
If we set up cron task with wget or curl we have 30 sec rule to execute PHP script. It's so small to send tons of email notifications and do other stuff (maybe remote SMTP server connection is slow, maybe it's really huge bunch of email notifications from bbPress or anything).
Maybe we can use something like this?
php -q wp-cron.php
But it's only run cron to one site in Multisite (each site have their own cron tasks in different MySQL tables).
P. S. On wpmudev.org forum I found strange "solution" which also use Curl.
Another P. S. WP CLI have awesome wp cron commands but it's only allow run cron tasks manually (yep, we can use --url attr). For example:
wp cron event list --url=multisite.com
wp cron event list --url=subdomain.multisite.com
A: Easier one-liner with less bash:
wp site list --field=url | xargs -i -n1 wp cron event run --due-now --url="{}"
You can either run it manually or put it in a script and call it from cron as in the other answers.
A: I think the best way is to use WP-CLI but you'd need to write a bash script to do this. Here is one that should do it for you:
WP_PATH="/path/to/wp"
for SITE_URL in = $(wp site list --fields=domain,path,archived,deleted --format=csv --path="$WP_PATH" | grep ",0,0$" | awk -F ',' '{print $1 $2}')
do
for EVENT_HOOK in $(wp cron event list --format=csv --fields=hook,next_run_relative --url="$SITE_URL" --path="$WP_PATH" | grep \"now\"$ | awk -F ',' '{print $1}')
do
wp cron event run "$EVENT_HOOK" --url="$SITE_URL" --path="$WP_PATH"
done
done
You'd then need to add this script to crontab and run it maybe every minute if you like
A: After you've added the constant in wp-config.php
defined('DISABLE_WP_CRON') or define('DISABLE_WP_CRON', true);
WP-CLI
And assuming you have your config.yml setup correctly, you can ommit the --path flag when calling cron run.
wp cron event run --due-now
[<hook>…]
One or more hooks to run.
[--due-now]
Run all hooks due right now.
[--all]
Run all hooks.
To run all due cron tasks in order:
function run_crons_due_now_in_order { for SITE_URL in $(wp site list --fields=url --format=csv | tail -n +2 | sort); do wp cron event run --due-now --url="$SITE_URL" && echo -e "\t+ Finished crons for $SITE_URL"; done; echo "Done"; }; run_crons_due_now_in_order;
If you want them to run concurrently (running the non-site-specific cron first):
function run_all_crons_due_now { for SITE_URL in $(wp site list --fields=url --format=csv | tail -n +2 | sort); do wp cron event run --due-now --url="$SITE_URL" && echo -e "\t+ Finished crons for $SITE_URL" & done; wait $(jobs -p); echo "Done"; }; run_all_crons_due_now;
You would want to put either option in an executable file
chmod +x run_all_wp_cron_events_due_now.sh
add a crontab task
crontab -e
and probably execute each minute
* * * * * run_all_wp_cron_events_due_now.sh > /dev/null
If you want to run a custom command from cron, you might need to specify the full paths for wp-cli to work.
* * * * * cd /home/username/public_html; /usr/local/bin/php /home/username/wp-cli.phar your-custom-cron-commands run >/dev/null 2>&1
PHP
The only reason you would need to load up WordPress here is to gather the URLs from the database rather than using a pre-defined list. We're only going to ping those URLs and we don't really care what the response is.
custom-cron.php
<?php
// Load WP
require_once( dirname( __FILE__ ) . '/wp-load.php' );
// Check Version
global $wp_version;
$gt_4_6 = version_compare( $wp_version, '4.6.0', '>=' );
// Get Blogs
$args = array( 'archived' => 0, 'deleted' => 0, 'public' => 1 );
$blogs = $gt_4_6 ? get_sites( $args ) : @wp_get_sites( $args ); // >= 4.6
// Run Cron on each blog
echo "Running Crons: " . PHP_EOL;
$agent = 'WordPress/' . $wp_version . '; ' . home_url();
$time = time();
foreach ( $blogs as $blog ) {
$domain = $gt_4_6 ? $blog->domain : $blog['domain'];
$path = $gt_4_6 ? $blog->path : $blog['path'];
$command = "http://" . $domain . ( $path ? $path : '/' ) . 'wp-cron.php?doing_wp_cron=' . $time . '&ver=' . $wp_version;
$ch = curl_init( $command );
$rc = curl_setopt( $ch, CURLOPT_RETURNTRANSFER, false );
$rc = curl_exec( $ch );
curl_close( $ch );
print_r( $rc );
print_r( "\t✔ " . $command . PHP_EOL );
}
And add a single call to your custom-cron.php in a crontab
* * * * * wget -q -O - http://your-site.com/custom-cron.php?doing_wp_cron
A: This is my solution:
global $multisite_hosts;
$multisite_hosts = Array('xxxx.dev.xxx.oondeo.es','x2.dev.xxx.oondeo.es','x3.dev.xxx.oondeo.es');
function run_cron(){
global $multisite_hosts;
$host=array_pop($multisite_hosts);
if (!$host)
return;
register_shutdown_function('shutdown');
if (!isset($_SERVER['HTTP_HOST'])) {
$_SERVER['HTTP_HOST'] = $host; // replace with primary host
}
require './wp-cron.php';
}
function shutdown()
{
run_cron();
}
run_cron();
We call this from crontab, hope it helps
A: Well you can find a full guide here on how to setup the cron job correctly for a WordPress Multisite system to it fires on all sub-sites to and runs the cron jobs.
https://support.shorturl.gg/business-marketing-and-seo-forums/topic/you-are-using-wp-cron-incorrectly-in-wordpress-multisite/
Using the standard cron job for WordPress standalone websites doesn't work well as the standard WP cron job only will fire the cron job for the main site and as such no cron jobs will run on sub-sites.
A: I think you need to tell us what you mean by "run wp-cron.php the right way" first and foremost. According to Wordpress, it doesn't make sense that you disable wp-cron and yet want it to run... From the Linux perspective, wget-ing or /bin/php-ing wp-cron.php would be correct, but it seems your particular host is limiting your number of php invocations for security reasons? -- that part isn't completely clear from your description.
Another question: how many emails are "a ton"? There are great reasons why you shouldn't try to send too many emails that quickly.
You may have to re-think your objectives.
(I would comment instead of replying but I don't have enough reputation on wpstack.)
| wordpress | {
"language": "en",
"length": 972,
"provenance": "stackexchange_00019.jsonl.gz:450186",
"question_score": "25",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167238"
} | [
0.05938720703125,
-0.015594482421875,
0.006275177001953125,
-0.053192138671875,
-0.0015211105346679688,
-0.05047607421875,
0.013519287109375,
-0.0212860107421875,
-0.0228729248046875,
0.003322601318359375,
0.0141448974609375,
0.0282440185546875,
-0.0051422119140625,
-0.0406494140625,
0.044464111328125,
-0.00321197509765625,
0.019256591796875,
0.006252288818359375,
-0.005046844482421875,
-0.02587890625,
-0.01206207275390625,
0.022308349609375,
-0.039703369140625,
0.0645751953125,
0.01174163818359375,
-0.0193939208984375,
0.092041015625,
0.01280975341796875,
0.01708984375,
-0.01326751708984375,
0.03314208984375,
-0.0184173583984375,
0.0308685302734375,
0.01261138916015625,
-0.0295562744140625,
0.0039520263671875,
-0.02716064453125,
0.010009765625,
0.00983428955078125,
0.01873779296875,
-0.005077362060546875,
0.00634002685546875,
0.0667724609375,
0.024261474609375,
0.006984710693359375,
-0.03753662109375,
0.0082244873046875,
-0.047882080078125,
0.0133209228515625,
0.0003459453582763672,
0.003704071044921875,
-0.0014276504516601562,
0.0159454345703125,
-0.0192413330078125,
-0.0161590576171875,
-0.0233001708984375,
-0.0081024169921875,
0.029296875,
0.014739990234375,
-0.046722412109375,
-0.01354217529296875,
0.0343017578125,
0.0219879150390625,
0.04449462890625,
-0.0016107559204101562,
0.006103515625,
-0.01483154296875,
0.01299285888671875,
-0.024810791015625,
-0.003253936767578125,
0.02911376953125,
-0.0290985107421875,
0.0214385986328125,
-0.01479339599609375,
0.00926971435546875,
-0.0167999267578125,
-0.0161895751953125,
-0.01425933837890625,
0.0404052734375,
-0.01580810546875,
0.03289794921875,
0.0135040283203125,
-0.01220703125,
-0.0201263427734375,
0.02142333984375,
0.0006480216979980469,
-0.005939483642578125,
-0.0205841064453125,
-0.056060791015625,
-0.024322509765625,
-0.04290771484375,
0.043609619140625,
-0.08636474609375,
-0.01451873779296875,
-0.01184844970703125,
-0.0012521743774414062,
0.0289764404296875,
0.0294647216796875,
-0.01346588134765625,
-0.021942138671875,
-0.0204010009765625,
-0.0091400146484375,
-0.047760009765625,
0.00925445556640625,
0.0008678436279296875,
0.06915283203125,
0.031280517578125,
0.0517578125,
0.02294921875,
-0.01219940185546875,
0.004352569580078125,
-0.015869140625,
0.05889892578125,
0.0159912109375,
-0.0171356201171875,
-0.055694580078125,
-0.01140594482421875,
0.048858642578125,
0.0009775161743164062,
-0.007717132568359375,
-0.0156707763671875,
0.020172119140625,
0.0097503662109375,
-0.01800537109375,
-0.007404327392578125,
-0.005779266357421875,
0.0016088485717773438,
-0.050384521484375,
-0.034698486328125,
0.022979736328125,
-0.03765869140625,
0.006069183349609375,
0.048309326171875,
0.038604736328125,
0.0028705596923828125,
-0.0230712890625,
0.01207733154296875,
0.01256561279296875,
0.01837158203125,
0.007472991943359375,
0.03887939453125,
-0.01280975341796875,
-0.008392333984375,
0.0267333984375,
0.013885498046875,
0.01380157470703125,
0.031585693359375,
0.0138092041015625,
-0.0142822265625,
0.00567626953125,
-0.0426025390625,
0.03948974609375,
0.01544952392578125,
0.0203704833984375,
0.028900146484375,
-0.041259765625,
0.062042236328125,
-0.04205322265625,
0.01276397705078125,
-0.04443359375,
-0.055572509765625,
-0.010284423828125,
0.061370849609375,
-0.03912353515625,
-0.01953125,
0.0229949951171875,
-0.03375244140625,
-0.0081329345703125,
0.022735595703125,
-0.0250244140625,
-0.023834228515625,
-0.0243377685546875,
0.05499267578125,
0.0226593017578125,
0.00004971027374267578,
0.049041748046875,
0.0089111328125,
0.00568389892578125,
0.033905029296875,
0.034210205078125,
-0.01371002197265625,
-0.032989501953125,
0.060516357421875,
-0.031890869140625,
-0.041717529296875,
0.0189971923828125,
-0.01453399658203125,
0.0482177734375,
0.048583984375,
0.0200042724609375,
0.004871368408203125,
-0.01499176025390625,
0.01099395751953125,
0.001575469970703125,
-0.00033783912658691406,
-0.0092926025390625,
-0.047454833984375,
0.00679779052734375,
-0.0236663818359375,
-0.0256805419921875,
0.027191162109375,
0.0034542083740234375,
0.0237579345703125,
-0.00809478759765625,
-0.07537841796875,
0.033172607421875,
-0.032012939453125,
0.03424072265625,
0.018341064453125,
-0.0160675048828125,
-0.00380706787109375,
-0.004638671875,
0.0157928466796875,
-0.0928955078125,
-0.062225341796875,
0.018280029296875,
-0.0097808837890625,
0.046356201171875,
-0.00832366943359375,
0.049041748046875,
-0.0333251953125,
-0.03521728515625,
-0.0206756591796875,
-0.004573822021484375,
0.024932861328125,
-0.0220947265625,
-0.032745361328125,
-0.03302001953125,
0.0138092041015625,
-0.0081634521484375,
-0.00860595703125,
0.0621337890625,
0.0242462158203125,
0.04644775390625,
-0.01021575927734375,
0.0041656494140625,
0.0265045166015625,
0.00824737548828125,
0.0069732666015625,
0.015655517578125,
0.036956787109375,
0.0355224609375,
0.0008091926574707031,
-0.008514404296875,
0.048736572265625,
-0.0282440185546875,
0.020172119140625,
-0.0288238525390625,
-0.01367950439453125,
-0.033660888671875,
-0.0169219970703125,
-0.036590576171875,
0.055908203125,
-0.047210693359375,
-0.0255126953125,
0.052734375,
0.0194549560546875,
-0.0165252685546875,
0.01221466064453125,
0.003505706787109375,
0.0137176513671875,
-0.01454925537109375,
-0.05181884765625,
0.0225372314453125,
-0.027313232421875,
0.001018524169921875,
-0.005138397216796875,
-0.00485992431640625,
-0.0088348388671875,
-0.003917694091796875,
0.020294189453125,
-0.047210693359375,
-0.000499725341796875,
0.0288848876953125,
0.0179901123046875,
0.005481719970703125,
-0.03118896484375,
-0.008636474609375,
-0.0235748291015625,
0.00983428955078125,
-0.02679443359375,
0.026885986328125,
-0.039459228515625,
-0.012603759765625,
-0.035736083984375,
-0.01386260986328125,
0.00743865966796875,
0.0103759765625,
-0.055908203125,
-0.031646728515625,
0.00962066650390625,
0.0184783935546875,
-0.0504150390625,
0.0201873779296875,
0.0094757080078125,
-0.02154541015625,
0.0306396484375,
-0.0285797119140625,
0.04852294921875,
-0.04254150390625,
0.00579071044921875,
0.03875732421875,
-0.0360107421875,
0.0198974609375,
-0.0007624626159667969,
-0.0216522216796875,
0.0165252685546875,
-0.0033435821533203125,
-0.0161895751953125,
0.02642822265625,
-0.1287841796875,
-0.008697509765625,
0.01151275634765625,
0.06597900390625,
-0.02374267578125,
-0.04583740234375,
-0.0031528472900390625,
0.012847900390625,
-0.07293701171875,
-0.089599609375,
-0.0423583984375,
-0.04833984375,
0.0004725456237792969,
-0.01357269287109375,
-0.0190277099609375,
0.006710052490234375,
-0.00368499755859375,
0.0182952880859375,
-0.008819580078125,
-0.01537322998046875,
-0.03497314453125,
-0.024200439453125,
-0.052734375,
0.0249176025390625,
0.0006589889526367188,
0.028717041015625,
-0.00395965576171875,
0.07513427734375,
0.0036163330078125,
-0.04241943359375,
-0.0274658203125,
0.02764892578125,
-0.033050537109375,
-0.035064697265625,
-0.0118408203125,
-0.019561767578125,
0.0211029052734375,
-0.00803375244140625,
0.04248046875,
0.042877197265625,
-0.017852783203125,
-0.00034880638122558594,
0.0005688667297363281,
-0.01302337646484375,
0.020355224609375,
-0.0201568603515625,
-0.0035305023193359375,
-0.0187835693359375,
0.00215911865234375,
-0.05279541015625,
-0.0015916824340820312,
-0.046539306640625,
-0.03955078125,
0.03631591796875,
0.038360595703125,
-0.0041961669921875,
-0.002422332763671875,
-0.007411956787109375,
0.020111083984375,
-0.01116180419921875,
0.032318115234375,
-0.0152740478515625,
0.0059661865234375,
-0.01381683349609375,
-0.0104522705078125,
-0.04888916015625,
0.039520263671875,
-0.0294189453125,
0.0012235641479492188,
-0.01611328125,
-0.04351806640625,
-0.073974609375,
0.0186614990234375,
-0.10711669921875,
-0.03228759765625,
0.05792236328125,
0.0164337158203125,
0.0013904571533203125,
-0.0165863037109375,
-0.03900146484375,
0.00426483154296875,
0.07366943359375,
0.00797271728515625,
-0.048187255859375,
-0.0181121826171875,
0.0345458984375,
-0.0467529296875,
-0.051605224609375,
0.0333251953125,
0.0027103424072265625,
-0.0982666015625,
0.03857421875,
-0.0225677490234375,
-0.0131072998046875,
-0.017578125,
-0.017547607421875,
-0.049072265625,
-0.0635986328125,
0.024261474609375,
0.021881103515625,
-0.0040435791015625,
-0.0112457275390625,
-0.0022525787353515625,
-0.037506103515625,
0.002269744873046875,
-0.0185394287109375,
-0.048736572265625,
-0.013153076171875,
-0.01297760009765625,
0.038360595703125,
0.0101165771484375,
-0.00466156005859375,
-0.0008816719055175781,
0.040557861328125,
0.00839996337890625,
0.0228424072265625,
-0.02008056640625,
-0.036041259765625,
0.004924774169921875,
0.0322265625,
-0.000865936279296875,
0.009796142578125,
-0.019683837890625,
-0.037139892578125,
-0.0247650146484375,
-0.0006594657897949219,
-0.019287109375,
0.00290679931640625,
-0.0162506103515625,
0.0089874267578125,
-0.0264129638671875,
-0.03387451171875,
-0.0186309814453125,
-0.00492095947265625,
-0.0200958251953125,
-0.00652313232421875,
-0.030975341796875,
-0.034149169921875,
0.01995849609375,
-0.0284576416015625,
-0.0260162353515625,
0.0084991455078125,
0.052154541015625,
0.0169219970703125,
-0.0144805908203125,
-0.0245208740234375,
0.0150909423828125,
0.0021800994873046875,
0.0015954971313476562,
0.033782958984375,
0.00762939453125,
0.018341064453125,
-0.0224761962890625,
-0.001689910888671875,
-0.0009303092956542969,
0.0221099853515625,
0.00533294677734375,
0.0202484130859375,
-0.021148681640625,
0.01445770263671875,
0.0007100105285644531,
-0.00777435302734375,
0.031494140625,
-0.007221221923828125,
-0.026092529296875,
0.020965576171875,
0.035430908203125,
-0.0257110595703125,
-0.00934600830078125,
-0.04541015625,
-0.021820068359375,
0.0017690658569335938,
-0.0230865478515625,
0.044189453125,
0.043304443359375,
-0.01529693603515625,
0.03765869140625,
0.039215087890625,
0.0024852752685546875,
0.0011835098266601562,
0.0072479248046875,
-0.01123046875,
0.022308349609375,
-0.003627777099609375,
-0.01360321044921875,
-0.01168060302734375,
-0.013946533203125,
0.05181884765625,
0.04327392578125,
-0.0020999908447265625,
-0.01568603515625,
-0.00390625,
0.0104827880859375,
-0.0274505615234375,
-0.059356689453125,
0.035369873046875,
0.044647216796875,
-0.051849365234375,
-0.0031642913818359375,
-0.041046142578125,
-0.0220947265625,
-0.06048583984375,
-0.0426025390625,
-0.02410888671875,
-0.00760650634765625,
0.0209197998046875,
0.0345458984375,
-0.008636474609375,
0.028167724609375,
-0.013519287109375,
0.07366943359375,
0.08624267578125,
-0.0034465789794921875,
0.01092529296875,
-0.0001405477523803711,
-0.0242462158203125,
-0.0175933837890625,
-0.0211029052734375,
-0.026580810546875,
-0.0210418701171875,
0.030853271484375,
0.058349609375,
0.031890869140625,
0.0254974365234375,
-0.0231475830078125,
-0.017425537109375,
-0.04150390625,
0.0168914794921875,
0.02972412109375,
-0.00928497314453125,
-0.0205078125,
-0.00467681884765625,
0.0254364013671875,
0.0312042236328125,
-0.016021728515625,
0.03265380859375,
-0.033233642578125,
0.037353515625,
-0.0308990478515625,
0.03143310546875,
-0.03826904296875,
-0.032867431640625,
-0.0007586479187011719,
-0.0102691650390625,
-0.0095062255859375,
-0.02789306640625,
-0.03082275390625,
-0.01227569580078125,
-0.0185699462890625,
0.0460205078125,
-0.0242156982421875,
0.016204833984375,
-0.053924560546875,
0.0267791748046875,
-0.062347412109375,
0.003131866455078125,
0.0625,
0.046142578125,
-0.05364990234375,
0.02508544921875,
-0.052215576171875,
0.0034942626953125,
-0.01470947265625,
-0.0291748046875,
-0.04022216796875,
-0.01024627685546875,
0.0131683349609375,
0.01152801513671875,
-0.0231781005859375,
-0.037353515625,
0.00045871734619140625,
0.00601959228515625,
0.005725860595703125,
0.00726318359375,
-0.035919189453125,
0.061614990234375,
0.01302337646484375,
0.0413818359375,
0.01242828369140625,
0.037261962890625,
0.03350830078125,
-0.0302734375,
-0.01531982421875,
-0.0528564453125,
-0.0034809112548828125,
-0.005126953125,
0.0019931793212890625,
0.0299530029296875,
0.0233306884765625,
0.0031452178955078125,
0.0172882080078125,
-0.0276031494140625,
-0.004268646240234375,
-0.0296173095703125,
0.0272216796875,
-0.0413818359375,
0.0088043212890625,
0.00005131959915161133,
-0.02447509765625,
0.0272064208984375,
-0.006435394287109375,
0.00926971435546875,
0.0006246566772460938,
-0.03515625,
-0.003849029541015625,
0.036163330078125,
-0.05108642578125,
0.09161376953125,
0.1163330078125,
0.0018787384033203125,
0.0615234375,
0.0032711029052734375,
-0.001483917236328125,
0.03875732421875,
0.0306854248046875,
-0.00765228271484375,
-0.05523681640625,
0.028228759765625,
-0.0093994140625,
-0.040374755859375,
-0.019012451171875,
-0.02471923828125,
-0.006298065185546875,
0.042816162109375,
0.0628662109375,
-0.036773681640625,
-0.00476837158203125,
0.0097503662109375,
-0.003772735595703125,
-0.0041961669921875,
-0.01263427734375,
-0.021820068359375,
-0.04290771484375,
0.06805419921875,
-0.011871337890625,
-0.0182952880859375,
0.0144805908203125,
-0.0008254051208496094,
0.003376007080078125,
0.0139312744140625,
0.046661376953125,
0.0294036865234375,
-0.07000732421875,
0.052032470703125,
0.044097900390625,
0.04736328125,
-0.06756591796875,
0.0003685951232910156,
0.01197052001953125,
0.005558013916015625,
-0.050872802734375,
0.048248291015625,
0.004634857177734375,
0.06268310546875,
-0.0304718017578125,
0.004123687744140625,
0.01253509521484375,
0.047637939453125,
-0.01522064208984375,
-0.0174713134765625,
0.045684814453125,
-0.03680419921875,
-0.049163818359375,
-0.0104827880859375,
0.04107666015625,
0.0176849365234375,
-0.0576171875,
0.0364990234375,
-0.0413818359375,
-0.025146484375,
0.0044708251953125,
0.010894775390625,
0.05499267578125,
-0.04315185546875,
-0.0004954338073730469,
0.036224365234375,
0.0294952392578125,
0.0118560791015625,
0.00008624792098999023,
0.0084075927734375,
-0.0662841796875,
-0.054473876953125,
0.0115814208984375,
-0.06634521484375,
-0.0029754638671875,
-0.00727081298828125,
-0.027008056640625,
0.1304931640625,
-0.00760650634765625,
-0.0232086181640625,
0.016632080078125,
0.07427978515625,
-0.0273895263671875,
0.06640625,
-0.0248565673828125,
0.005329132080078125,
-0.0074462890625,
0.05389404296875,
-0.01480865478515625,
0.002727508544921875,
0.02923583984375,
0.0269622802734375,
0.03424072265625,
0.01375579833984375,
-0.037384033203125,
-0.006862640380859375,
0.0194549560546875,
0.049163818359375,
0.015411376953125,
0.0273590087890625,
-0.00598907470703125,
0.057708740234375,
0.036590576171875,
-0.07208251953125,
0.024017333984375,
-0.01160430908203125,
-0.0147552490234375,
0.018768310546875,
-0.005580902099609375,
-0.0102386474609375,
-0.0102081298828125,
0.0015630722045898438,
0.00811004638671875,
-0.01033782958984375,
-0.013153076171875,
0.01421356201171875,
0.00632476806640625,
0.029632568359375,
0.0330810546875,
-0.015838623046875,
0.047027587890625,
-0.0401611328125,
0.055511474609375,
-0.003955841064453125,
0.004001617431640625,
0.05718994140625,
0.012176513671875,
0.0200042724609375,
-0.007274627685546875,
-0.00327301025390625,
-0.02288818359375,
0.01171875,
0.0012073516845703125,
0.0014123916625976562,
0.0283660888671875,
-0.0321044921875,
-0.00004416704177856445,
0.039947509765625,
0.0067901611328125,
-0.013336181640625,
-0.012298583984375,
0.0178070068359375,
0.021759033203125,
0.01160430908203125,
-0.01090240478515625,
0.0260162353515625,
-0.01178741455078125,
-0.0141754150390625,
-0.00811004638671875,
-0.003963470458984375,
0.03192138671875,
-0.010833740234375,
0.01441192626953125,
0.040557861328125,
0.00788116455078125,
-0.013031005859375,
-0.02935791015625,
0.0228271484375,
-0.0018777847290039062,
0.044921875,
0.00704193115234375,
0.054290771484375,
-0.0294342041015625,
-0.01143646240234375,
0.01904296875,
0.056365966796875,
0.0009708404541015625,
-0.052032470703125,
0.00897216796875,
-0.058380126953125,
-0.00402069091796875,
0.01197052001953125,
0.033660888671875,
0.00945281982421875,
0.06121826171875,
0.060028076171875,
-0.01480865478515625,
-0.005840301513671875,
0.048370361328125,
0.00217437744140625,
-0.029205322265625,
-0.0260162353515625,
-0.006572723388671875,
-0.01145172119140625,
-0.00978851318359375,
0.0084381103515625,
0.070556640625,
-0.016143798828125,
-0.0175933837890625,
0.01107025146484375,
-0.004535675048828125,
-0.0024204254150390625,
0.037811279296875,
-0.006732940673828125,
0.0023670196533203125,
-0.0015382766723632812,
-0.045074462890625,
-0.013397216796875,
0.005031585693359375,
-0.028656005859375,
0.00984954833984375,
0.03631591796875,
-0.0153656005859375,
0.0082855224609375,
0.0186614990234375,
0.0009365081787109375,
0.007259368896484375,
0.01210784912109375,
-0.015899658203125,
-0.01885986328125,
0.043365478515625,
-0.006832122802734375,
-0.061614990234375,
-0.0443115234375,
0.003528594970703125,
0.032684326171875,
-0.00940704345703125,
0.05328369140625,
-0.0124664306640625,
0.00814056396484375,
0.0419921875,
-0.004474639892578125,
0.028839111328125,
0.040130615234375,
-0.0274200439453125,
0.01105499267578125,
0.024383544921875,
-0.033203125,
-0.0247802734375,
0.0296173095703125,
0.026031494140625,
0.007171630859375,
0.0179290771484375,
-0.0143280029296875,
0.01300048828125,
0.0167388916015625,
0.0271453857421875,
-0.0294036865234375,
-0.0267486572265625,
-0.04888916015625,
-0.01294708251953125,
0.03863525390625,
0.0182037353515625,
-0.0237274169921875,
0.0132598876953125,
-0.00811767578125,
-0.0200653076171875,
-0.002620697021484375,
-0.006015777587890625,
-0.0024356842041015625,
0.03759765625,
-0.0166473388671875,
-0.0092926025390625,
-0.0079345703125,
-0.00286865234375,
-0.0056304931640625,
0.00946807861328125,
0.01178741455078125,
0.0084228515625,
0.038818359375,
-0.0211944580078125,
0.01386260986328125,
-0.00615692138671875,
-0.0218048095703125,
0.007450103759765625,
0.0218048095703125,
-0.027801513671875,
0.008148193359375,
-0.04547119140625,
-0.02996826171875,
-0.05322265625,
0.014678955078125,
0.03143310546875,
-0.04315185546875,
-0.00962066650390625,
-0.07354736328125,
-0.01812744140625,
0.048980712890625,
-0.006496429443359375,
-0.01250457763671875,
0.0098876953125,
-0.027587890625,
0.00576019287109375,
0.006053924560546875,
-0.0161285400390625,
-0.01323699951171875,
0.0006046295166015625,
0.0026340484619140625,
-0.0426025390625,
-0.050750732421875,
0.0423583984375,
-0.041748046875,
-0.031463623046875,
0.024444580078125,
0.00925445556640625,
-0.039520263671875,
-0.05157470703125,
-0.048980712890625,
0.0008511543273925781,
-0.003742218017578125,
-0.02105712890625,
0.0028934478759765625,
-0.00077056884765625,
-0.0266265869140625,
-0.04266357421875,
0.018280029296875,
-0.0423583984375,
-0.0172271728515625,
-0.046142578125,
0.0237884521484375,
0.0253753662109375,
-0.032318115234375,
-0.0665283203125,
0.06854248046875,
-0.026824951171875,
-0.0139007568359375,
-0.07086181640625,
0.014617919921875,
-0.0015153884887695312,
0.00708770751953125,
-0.0253143310546875,
0.0007009506225585938,
-0.0099029541015625,
0.06439208984375,
0.01555633544921875,
0.020050048828125,
-0.00823211669921875,
0.0389404296875,
-0.0166015625,
0.032745361328125,
0.0170135498046875,
-0.01678466796875,
0.02154541015625,
-0.019195556640625,
0.0443115234375,
0.040191650390625,
-0.0226287841796875,
0.0230560302734375,
0.017333984375,
-0.0279998779296875,
-0.04913330078125,
-0.0184478759765625,
-0.054168701171875,
-0.00891876220703125,
0.126953125,
0.1151123046875,
0.035614013671875,
-0.06463623046875,
-0.029296875,
-0.031646728515625,
0.021209716796875,
-0.051605224609375,
0.0081939697265625,
-0.06268310546875,
-0.0295562744140625,
-0.032318115234375,
-0.01378631591796875,
0.03814697265625,
0.0211181640625,
0.00408172607421875,
0.002513885498046875,
0.015533447265625,
-0.0467529296875,
-0.038238525390625,
-0.0090179443359375,
0.04681396484375,
-0.032379150390625,
0.0175628662109375,
-0.0060577392578125,
0.0150909423828125,
0.014892578125,
0.016357421875,
-0.01134490966796875,
0.021240234375,
-0.026947021484375,
0.011383056640625,
-0.0006542205810546875,
0.002033233642578125,
-0.034088134765625,
0.0017614364624023438,
0.0165863037109375,
0.019683837890625,
-0.01230621337890625,
0.039276123046875,
0.031646728515625,
-0.01351165771484375,
-0.01508331298828125,
-0.018341064453125,
-0.01546478271484375,
0.00632476806640625,
-0.0382080078125,
0.054046630859375,
-0.0391845703125,
0.0012683868408203125,
-0.00820159912109375,
0.0014638900756835938,
0.0251617431640625,
0.00835418701171875,
0.0018930435180664062,
-0.0227813720703125,
0.006397247314453125,
-0.019317626953125,
-0.00830841064453125,
0.004833221435546875
]
|
ff7495ea468e5fcbddfdf56fc1780ba4040605bc | Wordpress Stackexchange
Q: Add custom field to category of custom post type I want to add a custom field (for a icon) to categories of a custom post type.
I use the default category type and not a own create category taxonomy.
How can I add the custom field only to the category of these custom post types and not to the general categories (for blog posts).
| Q: Add custom field to category of custom post type I want to add a custom field (for a icon) to categories of a custom post type.
I use the default category type and not a own create category taxonomy.
How can I add the custom field only to the category of these custom post types and not to the general categories (for blog posts).
| wordpress | {
"language": "en",
"length": 65,
"provenance": "stackexchange_00019.jsonl.gz:450231",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167415"
} | [
0.050567626953125,
-0.00812530517578125,
-0.0033245086669921875,
-0.0518798828125,
0.0218505859375,
-0.01255035400390625,
0.0215606689453125,
0.002170562744140625,
-0.054656982421875,
-0.0272674560546875,
-0.019622802734375,
0.0090179443359375,
-0.047821044921875,
-0.036102294921875,
0.031005859375,
-0.05535888671875,
0.0215606689453125,
-0.0026187896728515625,
0.03253173828125,
-0.0181427001953125,
0.0164794921875,
-0.013702392578125,
0.056427001953125,
-0.016265869140625,
0.00405120849609375,
0.0240020751953125,
-0.0016012191772460938,
-0.0189208984375,
0.0009794235229492188,
-0.004505157470703125,
0.0261688232421875,
-0.00701904296875,
0.002323150634765625,
0.0202789306640625,
0.011810302734375,
0.03790283203125,
0.032684326171875,
0.0188446044921875,
0.03656005859375,
0.0110931396484375,
0.036712646484375,
-0.034942626953125,
0.042816162109375,
0.027069091796875,
0.0200042724609375,
-0.0262451171875,
0.045806884765625,
-0.054718017578125,
0.01497650146484375,
-0.07330322265625,
-0.00115203857421875,
0.01320648193359375,
0.0300445556640625,
-0.074462890625,
-0.0230712890625,
0.004985809326171875,
-0.01177978515625,
-0.008575439453125,
0.05438232421875,
-0.01519012451171875,
-0.03021240234375,
-0.033782958984375,
0.018524169921875,
-0.0263824462890625,
0.0251617431640625,
-0.0021820068359375,
0.0246124267578125,
0.0237579345703125,
-0.04815673828125,
0.017822265625,
0.054107666015625,
-0.04168701171875,
0.0244598388671875,
0.00019800662994384766,
-0.01165771484375,
-0.064453125,
0.03350830078125,
-0.0305023193359375,
0.00438690185546875,
0.0163726806640625,
-0.00904083251953125,
0.0021648406982421875,
0.00714111328125,
-0.059906005859375,
-0.0037899017333984375,
-0.045318603515625,
-0.0216217041015625,
0.0157470703125,
-0.00023186206817626953,
-0.047943115234375,
-0.005054473876953125,
-0.051513671875,
-0.076904296875,
0.041290283203125,
0.03973388671875,
-0.0418701171875,
0.001857757568359375,
0.0262603759765625,
-0.00702667236328125,
0.02685546875,
-0.0025653839111328125,
-0.031890869140625,
0.035675048828125,
-0.04534912109375,
0.0316162109375,
0.0194854736328125,
-0.047637939453125,
-0.033660888671875,
0.0560302734375,
0.042083740234375,
-0.0009794235229492188,
0.018280029296875,
0.031890869140625,
0.00008982419967651367,
-0.0186767578125,
-0.01441192626953125,
-0.00228118896484375,
0.0253753662109375,
0.0023345947265625,
-0.0024871826171875,
0.0077972412109375,
0.021240234375,
0.03472900390625,
-0.0257415771484375,
-0.0003304481506347656,
-0.0034027099609375,
-0.03631591796875,
-0.040435791015625,
0.01279449462890625,
-0.0074615478515625,
-0.044769287109375,
0.0222320556640625,
0.08148193359375,
0.03326416015625,
0.0257568359375,
-0.0073089599609375,
0.00826263427734375,
-0.03826904296875,
-0.006069183349609375,
0.01000213623046875,
0.021026611328125,
-0.0144195556640625,
0.0074005126953125,
0.00565338134765625,
0.027984619140625,
-0.003841400146484375,
-0.00495147705078125,
0.02294921875,
0.0106201171875,
-0.00908660888671875,
0.03387451171875,
-0.02691650390625,
0.0321044921875,
0.0282135009765625,
-0.003940582275390625,
0.0055084228515625,
0.0406494140625,
-0.026275634765625,
-0.0273895263671875,
-0.023590087890625,
0.0032291412353515625,
0.0032444000244140625,
0.0248260498046875,
-0.038360595703125,
-0.034759521484375,
0.01049041748046875,
-0.046539306640625,
0.0020294189453125,
0.0249176025390625,
-0.02911376953125,
0.0239715576171875,
0.01800537109375,
0.0169677734375,
0.00646209716796875,
0.01511383056640625,
-0.0006170272827148438,
0.00928497314453125,
-0.01331329345703125,
0.01103973388671875,
0.044586181640625,
-0.01036834716796875,
-0.033355712890625,
-0.006801605224609375,
-0.01184844970703125,
-0.046630859375,
0.0157928466796875,
0.00899505615234375,
0.056610107421875,
0.04583740234375,
0.01497650146484375,
-0.0071563720703125,
-0.01074981689453125,
-0.06243896484375,
-0.03289794921875,
0.016937255859375,
0.006839752197265625,
-0.0193634033203125,
-0.0156707763671875,
0.011749267578125,
0.0123138427734375,
-0.050994873046875,
0.006542205810546875,
-0.0010538101196289062,
0.028411865234375,
0.0242462158203125,
-0.0018434524536132812,
0.0118560791015625,
0.025299072265625,
-0.0024280548095703125,
-0.01413726806640625,
0.011932373046875,
-0.0232086181640625,
0.0160675048828125,
-0.0576171875,
-0.06097412109375,
-0.01312255859375,
-0.01378631591796875,
-0.0206451416015625,
-0.018463134765625,
-0.033355712890625,
-0.007396697998046875,
-0.02362060546875,
-0.015625,
0.03594970703125,
0.022491455078125,
0.0260162353515625,
-0.027618408203125,
0.00601959228515625,
0.006298065185546875,
0.046722412109375,
-0.061279296875,
0.0035381317138671875,
0.0262603759765625,
-0.01776123046875,
-0.038726806640625,
-0.00385284423828125,
0.00963592529296875,
-0.059814453125,
-0.00574493408203125,
0.06768798828125,
0.002819061279296875,
-0.011627197265625,
-0.0207061767578125,
0.03802490234375,
0.0238800048828125,
0.04296875,
0.0193023681640625,
0.01552581787109375,
0.01229095458984375,
0.0251617431640625,
0.027435302734375,
0.00531005859375,
0.0256805419921875,
-0.0234375,
0.050201416015625,
0.0143890380859375,
0.01136016845703125,
-0.0293426513671875,
0.0224151611328125,
-0.030303955078125,
0.027374267578125,
-0.018310546875,
-0.07666015625,
0.0162353515625,
0.047454833984375,
0.026519775390625,
0.04620361328125,
0.0404052734375,
-0.04302978515625,
0.01462554931640625,
0.0153350830078125,
0.0121002197265625,
-0.003078460693359375,
0.01023101806640625,
0.01523590087890625,
0.033599853515625,
-0.032135009765625,
-0.01593017578125,
0.032989501953125,
0.00457763671875,
-0.002349853515625,
0.0263519287109375,
-0.0133056640625,
-0.0175933837890625,
0.005573272705078125,
-0.07232666015625,
-0.00942230224609375,
0.0160369873046875,
-0.05712890625,
-0.045501708984375,
-0.0086822509765625,
0.016143798828125,
-0.0183868408203125,
-0.0061798095703125,
0.01158905029296875,
-0.0198822021484375,
-0.06341552734375,
-0.041961669921875,
0.043060302734375,
-0.056396484375,
-0.018310546875,
0.06005859375,
-0.0204620361328125,
0.026885986328125,
0.00446319580078125,
-0.00228118896484375,
-0.0164794921875,
0.02398681640625,
0.00574493408203125,
-0.0286102294921875,
-0.0341796875,
0.0124359130859375,
0.03277587890625,
0.02435302734375,
0.0288543701171875,
-0.01337432861328125,
0.025238037109375,
0.037628173828125,
-0.01271820068359375,
-0.050811767578125,
0.038909912109375,
-0.023162841796875,
-0.01294708251953125,
-0.029266357421875,
-0.00946044921875,
-0.00933837890625,
-0.0345458984375,
-0.004718780517578125,
-0.0015163421630859375,
-0.00814056396484375,
-0.02630615234375,
-0.041778564453125,
-0.062408447265625,
-0.072998046875,
-0.01507568359375,
-0.00579833984375,
0.01161956787109375,
0.0982666015625,
0.00829315185546875,
-0.0212554931640625,
0.02154541015625,
-0.0188751220703125,
-0.0172119140625,
0.01739501953125,
0.0169677734375,
-0.027862548828125,
0.024871826171875,
0.014373779296875,
0.037139892578125,
0.037109375,
-0.0323486328125,
-0.0255279541015625,
-0.03350830078125,
-0.004505157470703125,
-0.0064544677734375,
0.036651611328125,
0.035186767578125,
0.01161956787109375,
0.030487060546875,
-0.032379150390625,
0.004344940185546875,
0.0241546630859375,
0.028564453125,
0.0010080337524414062,
-0.050811767578125,
-0.044189453125,
-0.0279998779296875,
0.06488037109375,
-0.0126800537109375,
0.015167236328125,
-0.0159149169921875,
-0.032073974609375,
0.05816650390625,
0.003265380859375,
0.00913238525390625,
0.0082244873046875,
-0.04620361328125,
-0.056121826171875,
0.06689453125,
-0.017303466796875,
-0.000560760498046875,
-0.0032711029052734375,
0.029144287109375,
0.0086822509765625,
-0.07958984375,
0.0186004638671875,
-0.07611083984375,
-0.0006937980651855469,
-0.032989501953125,
0.00872802734375,
0.0014963150024414062,
0.098388671875,
-0.033843994140625,
-0.01009368896484375,
-0.01169586181640625,
0.00806427001953125,
-0.00591278076171875,
-0.036834716796875,
-0.0364990234375,
-0.025909423828125,
-0.072021484375,
0.03155517578125,
0.0076904296875,
-0.023284912109375,
-0.0215301513671875,
0.054473876953125,
-0.053802490234375,
-0.02752685546875,
0.041839599609375,
-0.06787109375,
0.0179443359375,
0.0006513595581054688,
0.0079193115234375,
-0.0200958251953125,
-0.022674560546875,
-0.042877197265625,
-0.07440185546875,
-0.0131378173828125,
-0.01001739501953125,
0.034027099609375,
-0.013946533203125,
0.01412200927734375,
-0.00775909423828125,
0.03948974609375,
0.01442718505859375,
-0.0204925537109375,
0.0113372802734375,
0.0074462890625,
-0.034332275390625,
-0.0093841552734375,
-0.0085906982421875,
-0.0276031494140625,
-0.02008056640625,
-0.01861572265625,
-0.036346435546875,
0.0190887451171875,
-0.0077972412109375,
0.0222015380859375,
0.02130126953125,
-0.0230712890625,
-0.0052947998046875,
-0.01151275634765625,
-0.01568603515625,
0.007747650146484375,
-0.0215911865234375,
-0.0020427703857421875,
-0.0166778564453125,
0.0012426376342773438,
0.042388916015625,
0.01104736328125,
0.0029697418212890625,
0.00615692138671875,
0.08697509765625,
-0.0012140274047851562,
-0.0268402099609375,
-0.082275390625,
-0.00920867919921875,
0.0260467529296875,
-0.01245880126953125,
0.03570556640625,
0.01519775390625,
-0.00493621826171875,
0.025543212890625,
-0.0031795501708984375,
0.0196380615234375,
-0.055694580078125,
0.05853271484375,
-0.024993896484375,
-0.00803375244140625,
0.0141754150390625,
-0.04058837890625,
0.04779052734375,
0.0167083740234375,
-0.00598907470703125,
-0.0205230712890625,
-0.003955841064453125,
0.046722412109375,
-0.01422119140625,
0.0321044921875,
-0.0229949951171875,
-0.007598876953125,
0.01415252685546875,
0.0087432861328125,
0.0113372802734375,
0.0193939208984375,
-0.00740814208984375,
-0.0153350830078125,
-0.0396728515625,
-0.013427734375,
-0.016998291015625,
-0.0262908935546875,
-0.007709503173828125,
-0.0048065185546875,
0.0180511474609375,
-0.007110595703125,
-0.0028705596923828125,
0.0075836181640625,
0.0227203369140625,
-0.0037975311279296875,
-0.038970947265625,
-0.01373291015625,
0.0102081298828125,
0.015716552734375,
0.0178985595703125,
-0.002895355224609375,
0.0084381103515625,
0.0080413818359375,
0.00716400146484375,
0.0222625732421875,
-0.028167724609375,
0.00847625732421875,
-0.0159149169921875,
0.0002636909484863281,
0.0157318115234375,
-0.0162353515625,
-0.005054473876953125,
0.0247650146484375,
0.01409912109375,
-0.01186370849609375,
-0.0143890380859375,
0.05511474609375,
0.036285400390625,
0.01087188720703125,
0.01216888427734375,
0.0168609619140625,
-0.017578125,
-0.0246124267578125,
-0.030242919921875,
-0.024139404296875,
0.01220703125,
-0.0271148681640625,
0.045318603515625,
-0.0204010009765625,
-0.032562255859375,
0.059356689453125,
-0.039642333984375,
0.014373779296875,
-0.024169921875,
-0.048919677734375,
-0.0208892822265625,
0.0022792816162109375,
0.004180908203125,
0.0172119140625,
-0.0159912109375,
-0.0312347412109375,
0.036407470703125,
-0.056365966796875,
0.049713134765625,
-0.0189666748046875,
0.028717041015625,
-0.00814056396484375,
-0.0206298828125,
-0.05224609375,
-0.0335693359375,
-0.008941650390625,
-0.0258026123046875,
-0.004978179931640625,
-0.00018656253814697266,
-0.028167724609375,
-0.01087188720703125,
-0.0174102783203125,
0.025421142578125,
-0.01837158203125,
-0.012847900390625,
0.01177215576171875,
0.004917144775390625,
0.046173095703125,
0.01349639892578125,
-0.00244140625,
-0.0112152099609375,
-0.0307769775390625,
-0.027557373046875,
-0.01331329345703125,
-0.035430908203125,
-0.0235443115234375,
-0.01396942138671875,
0.032867431640625,
0.020355224609375,
0.0082244873046875,
-0.0384521484375,
-0.041778564453125,
0.01064300537109375,
0.05206298828125,
0.01226806640625,
0.004344940185546875,
0.0129547119140625,
-0.00029277801513671875,
0.0281829833984375,
0.008056640625,
-0.00010597705841064453,
-0.0007596015930175781,
-0.0283050537109375,
-0.02398681640625,
-0.08319091796875,
0.0026569366455078125,
0.0172576904296875,
-0.035858154296875,
0.0545654296875,
0.049224853515625,
0.013946533203125,
0.00727081298828125,
-0.00553131103515625,
-0.004009246826171875,
-0.01995849609375,
0.0072784423828125,
0.00038814544677734375,
0.005340576171875,
0.0108642578125,
0.017181396484375,
0.09002685546875,
-0.005527496337890625,
-0.00742340087890625,
0.0063934326171875,
-0.0245819091796875,
0.049468994140625,
0.00379180908203125,
-0.0299224853515625,
0.034454345703125,
0.0045623779296875,
0.000682830810546875,
0.0023517608642578125,
-0.002719879150390625,
0.01345062255859375,
-0.0364990234375,
0.0157928466796875,
-0.044708251953125,
-0.02044677734375,
0.0172119140625,
0.006145477294921875,
-0.02862548828125,
0.01934814453125,
-0.0199127197265625,
0.00797271728515625,
0.048828125,
0.0867919921875,
-0.080078125,
0.0135498046875,
0.020477294921875,
-0.02032470703125,
0.01261138916015625,
-0.0021648406982421875,
0.01328277587890625,
0.04107666015625,
0.003856658935546875,
-0.0455322265625,
-0.04400634765625,
-0.01442718505859375,
-0.0062713623046875,
-0.006488800048828125,
0.0146026611328125,
0.026641845703125,
0.0288848876953125,
0.008941650390625,
-0.02874755859375,
-0.00606536865234375,
0.00733184814453125,
-0.001644134521484375,
0.026153564453125,
0.0064239501953125,
0.007007598876953125,
-0.022216796875,
0.05389404296875,
-0.033294677734375,
0.005817413330078125,
0.0421142578125,
-0.005573272705078125,
0.02593994140625,
0.023834228515625,
-0.0053558349609375,
0.0212249755859375,
-0.014862060546875,
-0.0173187255859375,
0.0261383056640625,
-0.0157928466796875,
0.005657196044921875,
0.039947509765625,
-0.025177001953125,
0.00323486328125,
0.001251220703125,
-0.0018968582153320312,
-0.033355712890625,
-0.0109710693359375,
0.07037353515625,
-0.033935546875,
0.0018024444580078125,
0.0214080810546875,
0.06610107421875,
-0.0019626617431640625,
-0.0065765380859375,
-0.01885986328125,
-0.011688232421875,
0.0249786376953125,
-0.020233154296875,
-0.0128631591796875,
0.0186920166015625,
-0.00809478759765625,
-0.0672607421875,
0.08758544921875,
0.0012378692626953125,
0.01102447509765625,
-0.0063018798828125,
0.035369873046875,
-0.00531005859375,
0.0205841064453125,
-0.0247344970703125,
0.039154052734375,
0.01482391357421875,
0.01763916015625,
-0.053436279296875,
-0.027679443359375,
-0.007724761962890625,
0.05657958984375,
0.06903076171875,
0.012725830078125,
-0.00714111328125,
-0.01020050048828125,
0.04241943359375,
0.03924560546875,
-0.0218048095703125,
0.02716064453125,
-0.0035114288330078125,
-0.0309600830078125,
0.02606201171875,
0.035430908203125,
0.040191650390625,
0.02203369140625,
-0.03265380859375,
0.01508331298828125,
0.0208282470703125,
0.031982421875,
0.005588531494140625,
-0.00832366943359375,
0.00278472900390625,
0.0032558441162109375,
0.0078582763671875,
0.00736236572265625,
0.0013723373413085938,
0.047760009765625,
0.0289459228515625,
0.0215606689453125,
0.0304718017578125,
-0.0286865234375,
0.05364990234375,
-0.001529693603515625,
0.0567626953125,
0.0312347412109375,
0.017425537109375,
0.0372314453125,
0.00860595703125,
0.045440673828125,
0.0296173095703125,
-0.03790283203125,
0.03338623046875,
0.004180908203125,
0.012451171875,
-0.031646728515625,
0.0333251953125,
-0.00502777099609375,
0.0288238525390625,
-0.047607421875,
-0.01311492919921875,
0.006404876708984375,
0.0230712890625,
0.0239410400390625,
-0.015594482421875,
0.03729248046875,
-0.001865386962890625,
0.0182952880859375,
-0.07977294921875,
0.0256805419921875,
0.0357666015625,
0.0362548828125,
-0.0106964111328125,
-0.0006628036499023438,
-0.084228515625,
-0.0031795501708984375,
-0.04754638671875,
-0.008636474609375,
0.0152740478515625,
0.061065673828125,
0.035888671875,
0.06280517578125,
0.01279449462890625,
-0.0379638671875,
-0.004058837890625,
0.023895263671875,
0.0166473388671875,
-0.002223968505859375,
-0.0018472671508789062,
-0.033966064453125,
0.01499176025390625,
0.0208892822265625,
-0.00972747802734375,
0.0223236083984375,
0.028594970703125,
0.0491943359375,
0.0217742919921875,
-0.0168609619140625,
0.0526123046875,
-0.005374908447265625,
0.01067352294921875,
-0.0640869140625,
0.045501708984375,
0.037078857421875,
0.01255035400390625,
0.0195465087890625,
-0.06890869140625,
0.1116943359375,
-0.01456451416015625,
0.0151214599609375,
0.0081024169921875,
-0.0284423828125,
0.09808349609375,
0.0157318115234375,
0.08306884765625,
0.026397705078125,
-0.08856201171875,
-0.0201263427734375,
-0.02569580078125,
-0.08477783203125,
0.04522705078125,
0.05853271484375,
-0.028839111328125,
-0.0120391845703125,
0.01220703125,
-0.046356201171875,
-0.0012121200561523438,
0.03680419921875,
0.0014963150024414062,
0.0020351409912109375,
0.004863739013671875,
-0.005153656005859375,
-0.044189453125,
-0.026702880859375,
0.0006308555603027344,
0.01332855224609375,
0.01340484619140625,
0.004413604736328125,
0.0330810546875,
0.0222930908203125,
-0.0380859375,
0.043609619140625,
-0.03985595703125,
-0.03076171875,
0.037200927734375,
0.041656494140625,
0.015411376953125,
-0.0268096923828125,
-0.0177001953125,
-0.01352691650390625,
0.046600341796875,
-0.042236328125,
-0.01535797119140625,
-0.0008883476257324219,
0.0234527587890625,
-0.03656005859375,
0.0160675048828125,
-0.03289794921875,
-0.01412200927734375,
-0.057525634765625,
-0.03717041015625,
0.034454345703125,
-0.007480621337890625,
-0.00789642333984375,
0.027923583984375,
-0.003574371337890625,
0.0050201416015625,
0.0087432861328125,
-0.014862060546875,
0.005229949951171875,
0.028778076171875,
-0.0298614501953125,
-0.03472900390625,
0.0210418701171875,
-0.01145172119140625,
0.024505615234375,
0.005748748779296875,
0.038665771484375,
0.0225067138671875,
-0.05230712890625,
0.02508544921875,
0.0057525634765625,
0.022186279296875,
-0.02850341796875,
-0.004398345947265625,
0.00908660888671875,
-0.0005407333374023438,
0.00684356689453125,
0.0205841064453125,
-0.0212860107421875,
-0.041900634765625,
0.0084686279296875,
0.01546478271484375,
-0.0165252685546875,
-0.0223846435546875,
-0.0711669921875,
0.01531219482421875,
0.039642333984375,
-0.007427215576171875,
-0.0303497314453125,
0.024139404296875,
-0.03594970703125,
0.031707763671875,
0.004329681396484375,
-0.049652099609375,
0.023590087890625,
0.0310821533203125,
-0.03289794921875,
0.006458282470703125,
-0.0384521484375,
-0.042755126953125,
-0.0235748291015625,
0.0570068359375,
0.053436279296875,
-0.062103271484375,
-0.0012969970703125,
0.06195068359375,
0.06842041015625,
0.101806640625,
0.03167724609375,
-0.020355224609375,
-0.0060882568359375,
-0.0185546875,
-0.0340576171875,
0.0015840530395507812,
0.0537109375,
-0.07049560546875,
-0.07037353515625,
-0.03277587890625,
0.0200653076171875,
0.0310211181640625,
-0.0301666259765625,
-0.08599853515625,
0.03704833984375,
-0.0347900390625,
-0.036468505859375,
-0.057708740234375,
0.007381439208984375,
-0.0167694091796875,
0.033782958984375,
-0.0087432861328125,
-0.0304412841796875,
-0.004486083984375,
0.046783447265625,
0.015655517578125,
0.0013742446899414062,
0.045562744140625,
-0.0084075927734375,
-0.041961669921875,
0.00814056396484375,
-0.00405120849609375,
0.0208587646484375,
0.031585693359375,
-0.0280914306640625,
0.00580596923828125,
0.022491455078125,
-0.08465576171875,
-0.06597900390625,
-0.047760009765625,
0.052154541015625,
-0.002918243408203125,
-0.056243896484375,
-0.0204925537109375,
-0.03955078125,
0.044586181640625,
0.0005097389221191406,
0.0104827880859375,
-0.00836181640625,
-0.043701171875,
-0.050537109375,
-0.016143798828125,
-0.01910400390625,
0.00823974609375,
-0.04913330078125,
0.015625,
-0.0018072128295898438,
0.01053619384765625,
-0.0287933349609375,
0.016998291015625,
0.0036067962646484375,
0.0022563934326171875,
0.08026123046875,
0.01605224609375,
-0.0199737548828125,
0.07452392578125,
-0.0165252685546875,
-0.0103912353515625,
0.0093231201171875,
-0.0088043212890625,
-0.034210205078125,
0.0019063949584960938,
0.0170440673828125,
-0.0280914306640625,
-0.015594482421875,
0.0002460479736328125,
0.00936126708984375,
-0.00783538818359375,
0.03631591796875,
-0.00861358642578125,
0.01910400390625,
-0.0240020751953125,
0.044219970703125,
0.008544921875,
0.06268310546875,
-0.034515380859375,
0.05548095703125,
0.03375244140625,
0.032806396484375,
0.012908935546875,
-0.03973388671875,
-0.022369384765625,
0.035614013671875,
-0.0178680419921875,
-0.01552581787109375,
-0.00785064697265625,
-0.01450347900390625,
-0.007366180419921875,
-0.00731658935546875,
-0.0296173095703125,
-0.047393798828125,
0.030975341796875,
-0.0123291015625,
-0.0220184326171875,
0.02874755859375
]
|
523a5e28a11890b1b168ff96aaf2d38acc9fc146 | Wordpress Stackexchange
Q: Get list of registered custom post types How can i get a list of all custom post types registered and show them on any template page.
I have code like this.
<?php
/**
* Template Name: Custom Post Types List
*/
get_header();
$args=array(
'public' => true,
'exclude_from_search' => false,
'_builtin' => false
);
$output = 'names'; // names or objects, note names is the default
$operator = 'and'; // 'and' or 'or'
$post_types = get_post_types($args,$output,$operator);
$posttypes_array = array();
foreach ($post_types as $post_type ) {
$posttypes_array[] = $post_type;
}
echo "<pre>";
print_r($posttypes_array);
echo "</pre>";
get_footer();
?>
A: If you want to get all post types as a list you need to use the get_post_types function and loop over the results with a foreach.
<?php
// Get All Post Types as List
foreach ( get_post_types( '', 'names' ) as $post_type ) {
echo '<p>'.$post_type.'</p>';
}
?>
These 2 lines of code can list all of your registered post types.
If you want to know more about this get_post_types function visit the official wp codex page :
https://codex.wordpress.org/Function_Reference/get_post_types
| Q: Get list of registered custom post types How can i get a list of all custom post types registered and show them on any template page.
I have code like this.
<?php
/**
* Template Name: Custom Post Types List
*/
get_header();
$args=array(
'public' => true,
'exclude_from_search' => false,
'_builtin' => false
);
$output = 'names'; // names or objects, note names is the default
$operator = 'and'; // 'and' or 'or'
$post_types = get_post_types($args,$output,$operator);
$posttypes_array = array();
foreach ($post_types as $post_type ) {
$posttypes_array[] = $post_type;
}
echo "<pre>";
print_r($posttypes_array);
echo "</pre>";
get_footer();
?>
A: If you want to get all post types as a list you need to use the get_post_types function and loop over the results with a foreach.
<?php
// Get All Post Types as List
foreach ( get_post_types( '', 'names' ) as $post_type ) {
echo '<p>'.$post_type.'</p>';
}
?>
These 2 lines of code can list all of your registered post types.
If you want to know more about this get_post_types function visit the official wp codex page :
https://codex.wordpress.org/Function_Reference/get_post_types
A: Your code looks good. However, you can try the followoing codes to get all custom posts
$args = array(
'public' => true,
'_builtin' => false,
);
$output = 'names'; // names or objects, note names is the default
$operator = 'and'; // 'and' or 'or'
$post_types = get_post_types( $args, $output, $operator );
foreach ( $post_types as $post_type ) {
echo '<p>' . $post_type . '</p>';
}
?>
you can also use a bunch of args to filter your result much. For details lists of args you can check the official WordPress Codex page: https://codex.wordpress.org/Function_Reference/get_post_types
A: global $wp_post_types;
$posttypes = array_keys( $wp_post_types );
// Remove _builtins or others
$pt_remove = array("attachment","nav_menu_item","customize_changeset","revision");
foreach ( $posttypes as $posttype ):
if ( in_array($posttype, $pt_remove) ) continue;
$posttype_names[ $posttype ] = $posttype;
endforeach;
echo "<pre>";
print_r($posttype_names);
echo "</pre>";
A: <?php
$args = array(
'post_type' => 'clients',
'post_status' => 'publish',
'tax_query' => array(
array(
'taxonomy' => 'clients_service',
'field' => 'slug',
'terms' => 'therapy'
)
)
);
$testimonials = new WP_Query( $args );
if( $testimonials->have_posts() ) :
?>
<ul>
<?php
while( $testimonials->have_posts() ) :
$testimonials->the_post();
?>
<li><?php printf( '%1$s - %2$s', get_the_title(), get_the_content() ); ?></li>
<?php
endwhile;
wp_reset_postdata();
?>
</ul>
<?php
else :
esc_html_e( 'No clients in the therapy taxonomy!', 'text-domain' );
endif;
?>
When the new WP_Query is called, the relevant clients are retrieved and we can loop through them. In the loop we simply output the title and the content of the client in a simple list.
A: Your code is correct.
Your problem in the timing of executing both:
*
*Registering the CPT
*Calling the post type function you wrote.
You have one of 2 solution:
Solution 1:
Make sure your CPT is registered with higher priority before calling the get_post_types function.
Solution 2:
Reduce the get_post_types priority to start after CPT is registered.
add_action('init', 'your_function_name', 10);
I hope this help.
Thank you
| wordpress | {
"language": "en",
"length": 486,
"provenance": "stackexchange_00019.jsonl.gz:450244",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167461"
} | [
0.033416748046875,
-0.006679534912109375,
0.005031585693359375,
-0.003986358642578125,
0.0167083740234375,
-0.023468017578125,
0.06005859375,
-0.01519775390625,
-0.032073974609375,
0.0160369873046875,
-0.0008935928344726562,
0.0090484619140625,
-0.056640625,
-0.023590087890625,
0.007450103759765625,
-0.0565185546875,
0.04412841796875,
-0.0263824462890625,
0.0305023193359375,
-0.015899658203125,
0.0286712646484375,
0.00429534912109375,
0.039825439453125,
0.07293701171875,
0.0274658203125,
-0.0372314453125,
0.058624267578125,
-0.00766754150390625,
0.0162353515625,
-0.0069122314453125,
0.0203857421875,
0.0030078887939453125,
-0.01282501220703125,
0.03668212890625,
-0.0013561248779296875,
0.00907135009765625,
0.0189208984375,
0.022735595703125,
0.047119140625,
0.005268096923828125,
0.004817962646484375,
-0.0006537437438964844,
0.029205322265625,
-0.00435638427734375,
-0.015869140625,
-0.0155792236328125,
-0.01267242431640625,
-0.0255126953125,
0.0067901611328125,
-0.016693115234375,
0.0272979736328125,
-0.04339599609375,
0.055816650390625,
-0.01424407958984375,
-0.03680419921875,
-0.011688232421875,
0.01003265380859375,
-0.00438690185546875,
0.03961181640625,
-0.0289459228515625,
-0.03717041015625,
-0.017425537109375,
0.042816162109375,
-0.016326904296875,
-0.03546142578125,
0.0139007568359375,
0.023651123046875,
0.002689361572265625,
-0.0215301513671875,
-0.052734375,
0.01015472412109375,
-0.0169677734375,
0.0166168212890625,
0.0012683868408203125,
0.00897979736328125,
-0.0278472900390625,
-0.0101776123046875,
-0.01009368896484375,
0.027008056640625,
0.014556884765625,
0.028167724609375,
-0.00676727294921875,
-0.04669189453125,
0.0263214111328125,
-0.01470947265625,
0.030609130859375,
-0.00814056396484375,
-0.02569580078125,
-0.0125274658203125,
-0.0112762451171875,
-0.0160064697265625,
-0.018341064453125,
-0.018035888671875,
0.031707763671875,
0.01177978515625,
-0.029327392578125,
0.0343017578125,
0.026824951171875,
-0.0224609375,
-0.00550079345703125,
-0.0009322166442871094,
-0.043212890625,
0.04669189453125,
-0.035186767578125,
0.0374755859375,
0.038909912109375,
-0.0272064208984375,
0.002330780029296875,
0.061248779296875,
0.027557373046875,
0.024444580078125,
0.00858306884765625,
-0.01953125,
-0.0043487548828125,
-0.04052734375,
0.00963592529296875,
-0.033935546875,
-0.0117034912109375,
-0.005657196044921875,
0.002716064453125,
0.04327392578125,
0.058563232421875,
0.0408935546875,
-0.06939697265625,
-0.0164947509765625,
-0.0184478759765625,
-0.032318115234375,
-0.0738525390625,
0.020660400390625,
0.0215301513671875,
-0.0269317626953125,
-0.00928497314453125,
0.004650115966796875,
0.0055999755859375,
-0.01439666748046875,
-0.02593994140625,
0.004398345947265625,
-0.0168914794921875,
0.0023975372314453125,
0.0379638671875,
0.0074615478515625,
-0.04559326171875,
0.0016918182373046875,
0.031402587890625,
0.033935546875,
0.0179901123046875,
0.017364501953125,
0.0020160675048828125,
0.008026123046875,
0.0261993408203125,
-0.0278778076171875,
0.01004791259765625,
0.0279083251953125,
0.0147247314453125,
-0.007228851318359375,
-0.01227569580078125,
0.034423828125,
-0.0258026123046875,
-0.038665771484375,
-0.046600341796875,
0.0037994384765625,
-0.007213592529296875,
0.001468658447265625,
-0.016998291015625,
-0.031768798828125,
0.0306549072265625,
-0.017730712890625,
-0.0031719207763671875,
0.02313232421875,
0.00403594970703125,
0.00443267822265625,
-0.0272216796875,
0.020965576171875,
0.0010995864868164062,
-0.01511383056640625,
0.006816864013671875,
-0.0169677734375,
-0.0205230712890625,
0.0396728515625,
-0.0042877197265625,
-0.032958984375,
-0.02685546875,
0.01340484619140625,
0.005046844482421875,
-0.06884765625,
0.045501708984375,
0.01556396484375,
0.05950927734375,
0.0111541748046875,
0.00015985965728759766,
0.048126220703125,
0.0206756591796875,
-0.0411376953125,
0.0168304443359375,
-0.0086669921875,
0.00824737548828125,
-0.039825439453125,
0.007625579833984375,
-0.0258331298828125,
0.0042572021484375,
-0.009002685546875,
-0.026336669921875,
0.0008482933044433594,
-0.01358795166015625,
-0.0654296875,
-0.009033203125,
-0.01213836669921875,
0.032440185546875,
0.011322021484375,
0.019317626953125,
0.03363037109375,
0.01058197021484375,
-0.0506591796875,
0.00583648681640625,
-0.02337646484375,
0.036163330078125,
-0.007472991943359375,
0.0225677490234375,
-0.0034027099609375,
0.0009469985961914062,
-0.01303863525390625,
-0.034271240234375,
-0.01250457763671875,
0.0227508544921875,
0.0307769775390625,
0.0303802490234375,
-0.0312042236328125,
0.00608062744140625,
0.00914764404296875,
0.0548095703125,
-0.062225341796875,
0.00287628173828125,
-0.0095672607421875,
0.01263427734375,
-0.0274505615234375,
-0.0212860107421875,
-0.004512786865234375,
-0.046630859375,
0.026458740234375,
0.048919677734375,
0.027557373046875,
0.0304107666015625,
-0.0032939910888671875,
-0.0009765625,
0.0911865234375,
0.002651214599609375,
0.01241302490234375,
-0.01032257080078125,
0.0164947509765625,
0.05645751953125,
0.0092620849609375,
0.031768798828125,
0.00634765625,
0.032623291015625,
0.04144287109375,
0.01297760009765625,
-0.013275146484375,
0.006153106689453125,
-0.00955963134765625,
0.01444244384765625,
-0.01041412353515625,
-0.055389404296875,
-0.0164642333984375,
-0.034027099609375,
0.057464599609375,
0.0241241455078125,
0.0523681640625,
0.034759521484375,
-0.06195068359375,
0.0268096923828125,
0.0178680419921875,
0.01904296875,
-0.0035648345947265625,
0.017364501953125,
0.0297088623046875,
0.0170745849609375,
-0.0377197265625,
-0.000148773193359375,
-0.00510406494140625,
0.00255584716796875,
-0.011871337890625,
0.01096343994140625,
-0.0202178955078125,
0.0018634796142578125,
-0.004711151123046875,
-0.05596923828125,
0.01068115234375,
0.031341552734375,
-0.025604248046875,
-0.0000023245811462402344,
0.0035877227783203125,
0.050567626953125,
0.0012693405151367188,
-0.0051116943359375,
0.0081329345703125,
0.006587982177734375,
0.01479339599609375,
-0.07672119140625,
0.057861328125,
-0.045440673828125,
0.050933837890625,
0.0787353515625,
-0.01085662841796875,
0.02197265625,
-0.0033721923828125,
-0.0226287841796875,
-0.00955963134765625,
0.00833892822265625,
-0.01436614990234375,
-0.056427001953125,
-0.01403045654296875,
0.0281524658203125,
0.007244110107421875,
0.04803466796875,
-0.024139404296875,
-0.05145263671875,
-0.01049041748046875,
0.021392822265625,
-0.04302978515625,
-0.0062713623046875,
0.01316070556640625,
-0.0220184326171875,
-0.04522705078125,
-0.051971435546875,
-0.0266876220703125,
0.0305938720703125,
-0.0699462890625,
-0.01275634765625,
0.0269927978515625,
-0.01165771484375,
-0.045013427734375,
-0.0273590087890625,
-0.06195068359375,
-0.043487548828125,
0.0006551742553710938,
-0.0030498504638671875,
0.0164947509765625,
0.08026123046875,
0.0362548828125,
-0.02484130859375,
0.0330810546875,
0.03271484375,
-0.0277557373046875,
0.0227203369140625,
0.0024166107177734375,
-0.005741119384765625,
0.03302001953125,
0.0101470947265625,
-0.02593994140625,
0.029388427734375,
-0.01806640625,
-0.032928466796875,
0.01294708251953125,
-0.0174560546875,
0.042999267578125,
0.037078857421875,
-0.037750244140625,
-0.0172271728515625,
0.047698974609375,
-0.060394287109375,
-0.022369384765625,
0.0029144287109375,
-0.022735595703125,
0.0206756591796875,
-0.00970458984375,
-0.01457977294921875,
-0.01806640625,
0.0447998046875,
0.0166015625,
0.027252197265625,
-0.007495880126953125,
-0.008544921875,
0.039337158203125,
0.0164031982421875,
0.036102294921875,
-0.0047607421875,
-0.0024051666259765625,
-0.0147552490234375,
0.043670654296875,
0.00859832763671875,
0.03277587890625,
0.006374359130859375,
0.006519317626953125,
-0.03472900390625,
-0.123046875,
0.08502197265625,
-0.0297088623046875,
-0.043243408203125,
-0.0501708984375,
-0.04266357421875,
0.0238037109375,
0.123779296875,
-0.020751953125,
-0.0120849609375,
-0.024078369140625,
-0.0079498291015625,
0.00402069091796875,
-0.0304718017578125,
-0.021514892578125,
-0.0166778564453125,
-0.083984375,
0.0213165283203125,
-0.00778961181640625,
-0.0374755859375,
-0.0164947509765625,
-0.040771484375,
-0.069091796875,
-0.036590576171875,
0.0263824462890625,
-0.02459716796875,
0.02215576171875,
-0.00380706787109375,
0.011962890625,
-0.02099609375,
-0.0228729248046875,
-0.00904083251953125,
-0.0721435546875,
-0.0141448974609375,
-0.002323150634765625,
0.05621337890625,
0.0285797119140625,
-0.037261962890625,
-0.00263214111328125,
0.04364013671875,
0.0309906005859375,
0.008514404296875,
0.01026153564453125,
0.0017681121826171875,
-0.0007877349853515625,
-0.0247344970703125,
-0.0013637542724609375,
-0.0303497314453125,
-0.01397705078125,
-0.008819580078125,
-0.038909912109375,
0.015899658203125,
-0.005458831787109375,
-0.001506805419921875,
0.03668212890625,
-0.04095458984375,
0.004070281982421875,
0.0016717910766601562,
-0.0097503662109375,
0.01473236083984375,
-0.003047943115234375,
-0.0129547119140625,
-0.01371002197265625,
-0.0151519775390625,
0.03485107421875,
0.004383087158203125,
-0.012420654296875,
0.007297515869140625,
0.07965087890625,
0.021148681640625,
-0.0162811279296875,
-0.046295166015625,
0.005222320556640625,
0.033660888671875,
-0.016448974609375,
0.0223846435546875,
0.025909423828125,
-0.00988006591796875,
0.00823974609375,
-0.004840850830078125,
-0.0291900634765625,
0.0088653564453125,
0.03558349609375,
0.02850341796875,
0.0036296844482421875,
-0.02313232421875,
-0.0163726806640625,
0.037628173828125,
0.020233154296875,
-0.0060882568359375,
-0.04351806640625,
0.01465606689453125,
0.06036376953125,
-0.036376953125,
0.048248291015625,
-0.028289794921875,
-0.01666259765625,
0.0094146728515625,
0.002674102783203125,
0.01380157470703125,
0.018280029296875,
-0.011749267578125,
0.0009446144104003906,
-0.0242767333984375,
0.003406524658203125,
0.034423828125,
0.0237274169921875,
0.03533935546875,
0.0195465087890625,
0.048492431640625,
0.005725860595703125,
-0.00846099853515625,
-0.00022721290588378906,
-0.0009427070617675781,
-0.00859832763671875,
-0.0670166015625,
0.0281219482421875,
-0.0158233642578125,
0.0139617919921875,
0.0273284912109375,
0.01318359375,
0.073486328125,
0.0743408203125,
0.0271453857421875,
-0.01558685302734375,
-0.04046630859375,
0.05963134765625,
-0.0543212890625,
-0.021026611328125,
0.0095977783203125,
-0.01474761962890625,
-0.0085296630859375,
0.051513671875,
-0.0173187255859375,
0.0170135498046875,
-0.0023860931396484375,
0.04742431640625,
0.03802490234375,
0.039459228515625,
0.025115966796875,
-0.0196990966796875,
-0.026519775390625,
0.00974273681640625,
-0.048980712890625,
-0.04168701171875,
-0.008056640625,
-0.002819061279296875,
0.04388427734375,
0.0249786376953125,
-0.0034236907958984375,
0.0198974609375,
-0.0223388671875,
-0.003429412841796875,
0.03302001953125,
0.0283966064453125,
-0.02862548828125,
-0.0195159912109375,
0.004863739013671875,
0.0194091796875,
-0.01531982421875,
-0.02716064453125,
0.02362060546875,
-0.01148223876953125,
0.00008475780487060547,
-0.0289459228515625,
-0.06353759765625,
0.0262451171875,
0.068115234375,
-0.068603515625,
-0.035308837890625,
0.0088348388671875,
-0.06085205078125,
-0.027862548828125,
0.0080718994140625,
-0.0225982666015625,
0.0016279220581054688,
-0.0260467529296875,
0.029144287109375,
-0.016815185546875,
-0.00983428955078125,
-0.016571044921875,
0.01300048828125,
0.061920166015625,
0.0282440185546875,
-0.0029392242431640625,
-0.00365447998046875,
-0.0287628173828125,
-0.01163482666015625,
0.01546478271484375,
-0.03369140625,
-0.005306243896484375,
-0.01282501220703125,
0.00858306884765625,
0.01027679443359375,
0.00231170654296875,
0.007049560546875,
0.0110015869140625,
0.031585693359375,
-0.0068206787109375,
0.026214599609375,
0.005252838134765625,
0.05657958984375,
-0.00406646728515625,
0.04150390625,
0.01044464111328125,
0.017578125,
-0.0269775390625,
-0.01227569580078125,
0.015625,
-0.06488037109375,
-0.0297698974609375,
-0.022003173828125,
-0.03155517578125,
0.033447265625,
0.0310516357421875,
0.0057830810546875,
-0.0248260498046875,
0.003032684326171875,
-0.00196075439453125,
-0.026275634765625,
0.0309906005859375,
0.0218658447265625,
0.009124755859375,
-0.0176849365234375,
0.007781982421875,
-0.0038089752197265625,
-0.01401519775390625,
-0.0096435546875,
0.005336761474609375,
0.00804901123046875,
0.0023288726806640625,
-0.0196533203125,
-0.03387451171875,
0.0355224609375,
0.0345458984375,
0.0193634033203125,
0.050933837890625,
-0.0011882781982421875,
0.024505615234375,
0.0175628662109375,
-0.0075225830078125,
0.01428985595703125,
-0.00774383544921875,
0.0694580078125,
0.0067291259765625,
-0.0271453857421875,
0.04754638671875,
-0.0400390625,
-0.01126861572265625,
0.038330078125,
0.05010986328125,
-0.0771484375,
0.018646240234375,
0.046905517578125,
0.0289459228515625,
0.00909423828125,
0.00013196468353271484,
-0.02569580078125,
-0.0220947265625,
0.0027923583984375,
-0.006439208984375,
-0.047607421875,
-0.020294189453125,
0.0108184814453125,
0.00389862060546875,
-0.02496337890625,
0.07537841796875,
0.002056121826171875,
0.014404296875,
-0.0204315185546875,
-0.021240234375,
0.007671356201171875,
-0.03155517578125,
0.048187255859375,
-0.049407958984375,
0.0293121337890625,
-0.0322265625,
0.01486968994140625,
-0.01421356201171875,
0.0064239501953125,
0.021087646484375,
0.003170013427734375,
-0.005069732666015625,
0.05224609375,
-0.0247955322265625,
0.03277587890625,
0.0203094482421875,
-0.03619384765625,
-0.06927490234375,
-0.03497314453125,
-0.0284271240234375,
0.038238525390625,
-0.0178375244140625,
0.0406494140625,
-0.0369873046875,
-0.0067138671875,
-0.01218414306640625,
0.0172576904296875,
0.09161376953125,
-0.034423828125,
-0.01336669921875,
0.03753662109375,
0.0310516357421875,
-0.006977081298828125,
0.001132965087890625,
-0.0083465576171875,
-0.032196044921875,
-0.012939453125,
-0.00321197509765625,
-0.0288848876953125,
-0.007476806640625,
0.006114959716796875,
-0.045135498046875,
0.055328369140625,
0.005672454833984375,
0.01318359375,
0.034332275390625,
0.01174163818359375,
-0.03826904296875,
-0.005046844482421875,
-0.04156494140625,
0.047576904296875,
0.013641357421875,
0.033599853515625,
-0.055908203125,
-0.0214691162109375,
-0.0022144317626953125,
0.03472900390625,
0.059600830078125,
-0.0032024383544921875,
-0.00009548664093017578,
0.0034961700439453125,
0.069091796875,
0.039337158203125,
-0.01364898681640625,
0.00007474422454833984,
0.0072784423828125,
0.05218505859375,
0.06640625,
-0.036895751953125,
0.041351318359375,
-0.01111602783203125,
-0.00724029541015625,
0.01812744140625,
0.00829315185546875,
0.01467132568359375,
-0.0109405517578125,
-0.08355712890625,
-0.0205535888671875,
-0.00620269775390625,
-0.01021575927734375,
0.022613525390625,
-0.0012311935424804688,
0.060516357421875,
0.036041259765625,
-0.027618408203125,
0.041961669921875,
-0.050750732421875,
0.06939697265625,
-0.0268096923828125,
0.003940582275390625,
0.01050567626953125,
0.0074920654296875,
0.064453125,
-0.031646728515625,
-0.01219940185546875,
0.01739501953125,
0.0098419189453125,
0.021270751953125,
0.01837158203125,
0.01861572265625,
-0.06341552734375,
-0.020355224609375,
0.07318115234375,
0.046234130859375,
-0.0360107421875,
-0.09710693359375,
0.0224456787109375,
0.0279541015625,
-0.00024008750915527344,
0.05438232421875,
0.0213623046875,
-0.0263671875,
0.0770263671875,
-0.07080078125,
-0.025238037109375,
0.006580352783203125,
0.03570556640625,
-0.03094482421875,
-0.072021484375,
0.0084381103515625,
-0.04449462890625,
-0.054473876953125,
-0.00505828857421875,
0.02667236328125,
0.063232421875,
0.03375244140625,
0.0496826171875,
0.01322174072265625,
-0.035797119140625,
0.018096923828125,
-0.008392333984375,
-0.01203155517578125,
-0.007160186767578125,
0.011322021484375,
-0.01491546630859375,
-0.01221466064453125,
0.018707275390625,
0.051544189453125,
-0.01363372802734375,
0.03955078125,
0.021514892578125,
-0.028411865234375,
0.00925445556640625,
0.046051025390625,
0.0003733634948730469,
-0.0261077880859375,
-0.037078857421875,
-0.022186279296875,
-0.00469970703125,
-0.0212860107421875,
0.041046142578125,
-0.006267547607421875,
0.007106781005859375,
-0.0047454833984375,
0.0574951171875,
-0.0035858154296875,
-0.0096588134765625,
0.00963592529296875,
-0.0164642333984375,
0.03985595703125,
0.005786895751953125,
-0.08319091796875,
-0.025482177734375,
-0.035400390625,
-0.0223388671875,
0.059112548828125,
0.044677734375,
-0.00794219970703125,
0.01049041748046875,
0.0027065277099609375,
-0.01171875,
-0.014251708984375,
0.033966064453125,
0.0095672607421875,
0.01387786865234375,
0.018280029296875,
0.0067596435546875,
-0.04278564453125,
-0.01519775390625,
-0.01186370849609375,
0.003887176513671875,
0.015716552734375,
0.03424072265625,
0.01262664794921875,
0.020233154296875,
-0.0187225341796875,
0.035980224609375,
-0.05902099609375,
-0.03753662109375,
0.027191162109375,
-0.00803375244140625,
0.017547607421875,
0.006328582763671875,
-0.021209716796875,
0.0258331298828125,
0.059326171875,
-0.046783447265625,
0.019195556640625,
0.0078125,
0.00862884521484375,
-0.047515869140625,
0.0176239013671875,
-0.029327392578125,
-0.026885986328125,
-0.0244903564453125,
-0.01503753662109375,
0.01520538330078125,
0.0167388916015625,
0.0193939208984375,
0.037994384765625,
0.01125335693359375,
-0.050537109375,
0.03643798828125,
-0.06402587890625,
0.046844482421875,
0.03668212890625,
0.035064697265625,
-0.042755126953125,
0.0233001708984375,
-0.0169219970703125,
-0.0013217926025390625,
0.013519287109375,
0.05255126953125,
-0.0083160400390625,
-0.0129241943359375,
-0.01000213623046875,
-0.01214599609375,
0.019287109375,
-0.00804901123046875,
0.0005431175231933594,
-0.006134033203125,
-0.01023101806640625,
-0.0095062255859375,
-0.020751953125,
-0.038299560546875,
-0.044677734375,
0.0156707763671875,
0.0243377685546875,
0.01009368896484375,
-0.01377105712890625,
-0.0118255615234375,
-0.0161590576171875,
0.018585205078125,
-0.019500732421875,
0.0085601806640625,
-0.01338958740234375,
-0.0364990234375,
0.00472259521484375,
-0.0218658447265625,
-0.0271759033203125,
0.0103912353515625,
0.0250396728515625,
0.008758544921875,
0.0181121826171875,
-0.00865936279296875,
0.0023822784423828125,
0.0234832763671875,
0.01235198974609375,
0.0186614990234375,
-0.024627685546875,
-0.00975799560546875,
0.03570556640625,
0.01451873779296875,
0.07391357421875,
0.0298614501953125,
-0.0186767578125,
0.01171112060546875,
0.0003314018249511719,
-0.046539306640625,
-0.07757568359375,
0.0318603515625,
-0.0899658203125,
-0.01776123046875,
-0.02362060546875,
0.056732177734375,
0.07452392578125,
0.006465911865234375,
-0.031768798828125,
0.0736083984375,
-0.038299560546875,
-0.0106048583984375,
-0.1221923828125,
0.03765869140625,
0.035003662109375,
-0.039886474609375,
-0.04937744140625,
-0.007465362548828125,
-0.03961181640625,
0.044525146484375,
0.0106964111328125,
0.016998291015625,
0.0163116455078125,
0.014190673828125,
-0.035980224609375,
0.0018100738525390625,
-0.007007598876953125,
-0.01020050048828125,
0.0027179718017578125,
-0.01308441162109375,
0.031402587890625,
0.031494140625,
-0.0281829833984375,
-0.0082244873046875,
0.005279541015625,
0.007183074951171875,
0.01445770263671875,
-0.03302001953125,
-0.0277252197265625,
-0.035003662109375,
0.0214080810546875,
0.0081939697265625,
0.0211944580078125,
-0.010009765625,
0.0008940696716308594,
0.0017194747924804688,
-0.058868408203125,
-0.021331787109375,
0.030975341796875,
-0.061065673828125,
-0.00678253173828125,
-0.01313018798828125,
0.005779266357421875,
-0.0290374755859375,
-0.0125579833984375,
-0.02789306640625,
-0.0258941650390625,
-0.0305633544921875,
-0.01343536376953125,
-0.0167388916015625,
0.05474853515625,
-0.05230712890625,
0.019287109375,
0.0024566650390625,
-0.05645751953125,
-0.003520965576171875,
-0.0201568603515625,
-0.043609619140625,
-0.0223388671875,
-0.007740020751953125,
0.013427734375,
0.0165863037109375,
0.0021839141845703125,
0.030029296875,
-0.0003094673156738281,
0.01403045654296875,
-0.0244903564453125,
0.018157958984375,
0.00286865234375,
0.01087188720703125,
-0.035675048828125,
0.07080078125,
0.04132080078125,
0.03167724609375,
0.02081298828125,
0.04248046875,
0.0032558441162109375,
0.063232421875,
0.007232666015625,
-0.04638671875,
0.0092315673828125,
-0.045745849609375,
0.005733489990234375,
-0.023956298828125,
-0.0411376953125,
-0.0113983154296875,
0.01019287109375,
0.042755126953125,
-0.0355224609375,
0.02337646484375
]
|
7b343cfac881de6a2c6ebed1b00b384a8bffbf82 | Wordpress Stackexchange
Q: How to use conditional add_action for Wordpress I am having a small issue where i need to call add_action method which is conditional.
Basically here, first checking whether the plugin active or not by admin_init action. If true then i need another add_action call from that action.
Please find the scenario what i am looking for:
function check_some_other_plugin() {
if ( is_plugin_active('some-plugin.php') ) {
//if true then vc_before_init action will run
add_action( 'vc_before_init', 'vc_master_home_slider' );
}
}
add_action( 'admin_init', 'check_some_other_plugin' );
function vc_master_home_slider() {
//my stuff
}
I will really appreciate if somebody answer me to find actual way to get rid of this issue.
A: just check inside the action ^^
add_action( 'vc_before_init', 'vc_master_home_slider' );
function vc_master_home_slider(){
if(is_plugin_active('some-plugin.php'){
//Do stuff.
}
}
| Q: How to use conditional add_action for Wordpress I am having a small issue where i need to call add_action method which is conditional.
Basically here, first checking whether the plugin active or not by admin_init action. If true then i need another add_action call from that action.
Please find the scenario what i am looking for:
function check_some_other_plugin() {
if ( is_plugin_active('some-plugin.php') ) {
//if true then vc_before_init action will run
add_action( 'vc_before_init', 'vc_master_home_slider' );
}
}
add_action( 'admin_init', 'check_some_other_plugin' );
function vc_master_home_slider() {
//my stuff
}
I will really appreciate if somebody answer me to find actual way to get rid of this issue.
A: just check inside the action ^^
add_action( 'vc_before_init', 'vc_master_home_slider' );
function vc_master_home_slider(){
if(is_plugin_active('some-plugin.php'){
//Do stuff.
}
}
| wordpress | {
"language": "en",
"length": 124,
"provenance": "stackexchange_00019.jsonl.gz:450256",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167506"
} | [
0.06982421875,
0.0521240234375,
-0.00792694091796875,
-0.07318115234375,
0.070556640625,
-0.01131439208984375,
0.0181884765625,
-0.033203125,
0.0022125244140625,
-0.000331878662109375,
-0.06390380859375,
0.01873779296875,
-0.026458740234375,
-0.0085601806640625,
0.00803375244140625,
-0.04888916015625,
0.0268707275390625,
0.0164337158203125,
0.04779052734375,
-0.006168365478515625,
-0.0021305084228515625,
0.031646728515625,
-0.00801849365234375,
0.0190277099609375,
0.009033203125,
-0.05255126953125,
0.0797119140625,
0.004138946533203125,
0.0160675048828125,
-0.0146942138671875,
0.01324462890625,
-0.022003173828125,
-0.004215240478515625,
0.016510009765625,
0.0276641845703125,
0.0212249755859375,
0.0302734375,
0.00533294677734375,
0.033172607421875,
0.030670166015625,
0.057891845703125,
-0.027618408203125,
-0.06219482421875,
0.003734588623046875,
-0.028961181640625,
-0.06689453125,
0.08416748046875,
0.01285552978515625,
0.0253143310546875,
-0.009979248046875,
-0.002063751220703125,
-0.0180511474609375,
0.00925445556640625,
-0.035125732421875,
-0.0076904296875,
-0.00878143310546875,
-0.049163818359375,
0.014495849609375,
0.03607177734375,
0.0604248046875,
-0.0023193359375,
-0.018402099609375,
-0.0020351409912109375,
-0.062164306640625,
0.027313232421875,
0.011260986328125,
0.0013713836669921875,
0.005115509033203125,
-0.045562744140625,
0.024505615234375,
0.0360107421875,
-0.054656982421875,
-0.00595855712890625,
0.01496124267578125,
-0.045684814453125,
-0.0362548828125,
0.0188446044921875,
-0.0204620361328125,
0.0172882080078125,
-0.00232696533203125,
0.01532745361328125,
0.006587982177734375,
0.021728515625,
-0.038238525390625,
0.0213470458984375,
0.00920867919921875,
-0.0162811279296875,
-0.02374267578125,
-0.040771484375,
-0.0150604248046875,
-0.0255584716796875,
-0.046875,
-0.003143310546875,
-0.035186767578125,
-0.01363372802734375,
-0.041961669921875,
0.023895263671875,
0.04986572265625,
0.0098724365234375,
0.031341552734375,
-0.00847625732421875,
-0.04669189453125,
0.031646728515625,
-0.052154541015625,
0.01030731201171875,
0.07403564453125,
0.025604248046875,
0.03033447265625,
0.0311737060546875,
-0.001903533935546875,
0.0277862548828125,
0.016876220703125,
-0.0008869171142578125,
-0.00933837890625,
-0.0037860870361328125,
-0.01995849609375,
-0.057891845703125,
0.037628173828125,
0.00042057037353515625,
0.006381988525390625,
-0.01708984375,
0.0022716522216796875,
0.0321044921875,
-0.047760009765625,
0.0028285980224609375,
-0.01849365234375,
-0.0367431640625,
-0.0289764404296875,
-0.004177093505859375,
0.0197906494140625,
-0.0297393798828125,
0.0306243896484375,
0.037628173828125,
-0.020355224609375,
-0.033660888671875,
-0.016510009765625,
0.0162353515625,
0.037933349609375,
0.0179595947265625,
-0.0234375,
0.02679443359375,
-0.0222320556640625,
-0.0253753662109375,
0.020904541015625,
0.01702880859375,
0.032196044921875,
0.011077880859375,
0.0019311904907226562,
-0.0133056640625,
-0.054473876953125,
0.055816650390625,
-0.0479736328125,
-0.0033779144287109375,
0.024871826171875,
0.0367431640625,
0.032073974609375,
0.0186004638671875,
0.0030994415283203125,
0.0074310302734375,
0.01122283935546875,
-0.005229949951171875,
0.0018329620361328125,
-0.002033233642578125,
-0.04852294921875,
-0.052642822265625,
-0.0236358642578125,
-0.0008587837219238281,
0.005847930908203125,
0.030364990234375,
0.0140380859375,
0.0149078369140625,
0.01435089111328125,
0.074462890625,
0.0184478759765625,
-0.014739990234375,
0.018310546875,
0.0279541015625,
0.0535888671875,
-0.0029296875,
0.0184478759765625,
-0.014556884765625,
-0.029632568359375,
0.08221435546875,
-0.036529541015625,
-0.033843994140625,
0.037353515625,
-0.0118865966796875,
-0.0020351409912109375,
0.033935546875,
-0.0137176513671875,
0.0122833251953125,
0.026458740234375,
0.0113372802734375,
-0.025634765625,
-0.01654052734375,
-0.036407470703125,
0.025634765625,
-0.006500244140625,
-0.01467132568359375,
0.01499176025390625,
0.078125,
-0.017303466796875,
0.0286712646484375,
-0.0289459228515625,
-0.067138671875,
0.007190704345703125,
-0.0299224853515625,
0.0188446044921875,
-0.0026569366455078125,
0.03814697265625,
-0.0021991729736328125,
0.01488494873046875,
-0.005298614501953125,
-0.042327880859375,
0.005596160888671875,
0.036529541015625,
-0.028717041015625,
0.030029296875,
-0.0125885009765625,
0.01551055908203125,
-0.01104736328125,
-0.01233673095703125,
-0.006866455078125,
-0.0004181861877441406,
0.0164337158203125,
-0.0070953369140625,
-0.0197906494140625,
-0.01171875,
-0.0313720703125,
0.029266357421875,
-0.07501220703125,
0.038299560546875,
0.038665771484375,
0.01416015625,
-0.0498046875,
-0.040374755859375,
-0.048095703125,
-0.10302734375,
0.01837158203125,
0.09002685546875,
0.017578125,
-0.005756378173828125,
-0.0257415771484375,
0.006992340087890625,
0.03814697265625,
-0.051605224609375,
-0.0083770751953125,
0.02032470703125,
-0.04193115234375,
-0.0072174072265625,
-0.037689208984375,
0.0168609619140625,
0.040985107421875,
-0.004886627197265625,
-0.017364501953125,
0.058380126953125,
-0.02471923828125,
-0.05377197265625,
-0.018768310546875,
-0.011138916015625,
0.036376953125,
-0.055419921875,
-0.05657958984375,
-0.005893707275390625,
-0.000995635986328125,
-0.0382080078125,
-0.00031495094299316406,
-0.003406524658203125,
0.0299072265625,
-0.0285797119140625,
0.00249481201171875,
-0.0528564453125,
0.0010242462158203125,
0.050750732421875,
0.02471923828125,
0.00930023193359375,
-0.0253753662109375,
-0.0166778564453125,
-0.00516510009765625,
0.01800537109375,
-0.0272216796875,
0.006206512451171875,
-0.00797271728515625,
-0.0233306884765625,
0.02081298828125,
-0.01373291015625,
0.007099151611328125,
-0.034149169921875,
-0.0105133056640625,
-0.03643798828125,
0.0282745361328125,
-0.0254364013671875,
-0.058837890625,
0.0302581787109375,
-0.01629638671875,
-0.06280517578125,
-0.0128326416015625,
0.00955963134765625,
0.0159912109375,
-0.014617919921875,
0.0311279296875,
0.05438232421875,
-0.0167388916015625,
0.0175018310546875,
0.0018930435180664062,
-0.024078369140625,
-0.0022487640380859375,
0.0134429931640625,
-0.0101470947265625,
-0.006542205810546875,
-0.0379638671875,
0.04119873046875,
0.03094482421875,
0.045623779296875,
0.017822265625,
-0.037628173828125,
0.00905609130859375,
0.0297393798828125,
-0.0369873046875,
-0.0289764404296875,
-0.0301513671875,
-0.08917236328125,
0.041259765625,
0.013641357421875,
-0.0230560302734375,
-0.027862548828125,
0.0615234375,
0.031707763671875,
-0.043365478515625,
0.0204925537109375,
0.0274200439453125,
-0.006694793701171875,
0.000652313232421875,
-0.0240020751953125,
-0.0023441314697265625,
0.001850128173828125,
-0.0024204254150390625,
0.056365966796875,
-0.005649566650390625,
-0.04730224609375,
0.0232391357421875,
-0.038421630859375,
-0.004138946533203125,
0.0498046875,
-0.00626373291015625,
-0.016082763671875,
-0.0216522216796875,
0.009979248046875,
0.0125579833984375,
-0.01541900634765625,
0.0076446533203125,
-0.0187835693359375,
0.0272674560546875,
-0.0008502006530761719,
0.03375244140625,
0.0120697021484375,
-0.031982421875,
0.0174102783203125,
0.023193359375,
-0.0299224853515625,
0.007099151611328125,
0.0214996337890625,
-0.031463623046875,
0.025726318359375,
0.0283355712890625,
-0.05010986328125,
0.04803466796875,
-0.049285888671875,
-0.0103912353515625,
0.032012939453125,
0.0243072509765625,
-0.00424957275390625,
0.02020263671875,
-0.0221405029296875,
-0.04931640625,
-0.0263519287109375,
0.016143798828125,
-0.01168060302734375,
-0.014923095703125,
-0.016998291015625,
0.00661468505859375,
-0.0185546875,
0.015960693359375,
-0.05615234375,
0.022613525390625,
-0.0061187744140625,
-0.037017822265625,
0.03887939453125,
-0.036712646484375,
0.0171661376953125,
-0.05108642578125,
-0.000377655029296875,
-0.0465087890625,
-0.021392822265625,
-0.0162506103515625,
0.00399017333984375,
-0.0110626220703125,
-0.01352691650390625,
-0.037841796875,
-0.0037708282470703125,
-0.0419921875,
0.0076446533203125,
-0.019927978515625,
-0.01082611083984375,
-0.036956787109375,
-0.000133514404296875,
-0.053558349609375,
-0.02880859375,
0.0256195068359375,
-0.04888916015625,
0.01080322265625,
0.03369140625,
-0.01529693603515625,
0.00991058349609375,
-0.0026836395263671875,
-0.053497314453125,
-0.0655517578125,
-0.005115509033203125,
-0.043212890625,
0.0487060546875,
0.027923583984375,
0.0003314018249511719,
-0.00891876220703125,
0.029541015625,
0.0030918121337890625,
-0.000053942203521728516,
0.007389068603515625,
0.00041484832763671875,
0.0162506103515625,
-0.01514434814453125,
-0.010284423828125,
-0.0220489501953125,
-0.0100860595703125,
-0.01247406005859375,
-0.0280609130859375,
-0.029998779296875,
-0.040313720703125,
-0.0523681640625,
0.01352691650390625,
-0.0301513671875,
-0.04620361328125,
-0.0301055908203125,
-0.0340576171875,
0.0025959014892578125,
-0.022216796875,
-0.01061248779296875,
-0.03997802734375,
-0.061981201171875,
0.00449371337890625,
-0.08331298828125,
0.0011262893676757812,
0.015655517578125,
0.09765625,
0.01983642578125,
0.0244903564453125,
0.021148681640625,
0.0027446746826171875,
0.017242431640625,
0.0157012939453125,
0.04437255859375,
0.00838470458984375,
-0.01123046875,
0.03375244140625,
0.0162506103515625,
-0.00885009765625,
-0.024505615234375,
0.053497314453125,
0.0189056396484375,
-0.00970458984375,
-0.004337310791015625,
0.0030879974365234375,
0.026214599609375,
0.019317626953125,
-0.0258026123046875,
-0.0229339599609375,
-0.0225677490234375,
0.03533935546875,
-0.0231475830078125,
0.045074462890625,
-0.0357666015625,
-0.01094818115234375,
0.004817962646484375,
-0.01126861572265625,
0.05230712890625,
0.0401611328125,
-0.01557159423828125,
0.0162811279296875,
0.0110931396484375,
-0.017333984375,
0.028411865234375,
0.04150390625,
-0.01274871826171875,
0.02020263671875,
0.0152435302734375,
-0.044097900390625,
-0.004734039306640625,
0.0020008087158203125,
-0.0017604827880859375,
-0.01922607421875,
-0.06317138671875,
-0.0361328125,
-0.007022857666015625,
0.0489501953125,
0.01497650146484375,
0.0033626556396484375,
0.056488037109375,
0.0081787109375,
-0.01529693603515625,
-0.01134490966796875,
0.0022296905517578125,
-0.01152801513671875,
-0.03564453125,
-0.005695343017578125,
-0.01085662841796875,
-0.01009368896484375,
0.00894927978515625,
0.03350830078125,
0.04559326171875,
0.00667572021484375,
-0.034210205078125,
0.03472900390625,
0.01181793212890625,
0.00901031494140625,
0.02301025390625,
-0.0124969482421875,
0.017364501953125,
-0.032196044921875,
0.001956939697265625,
-0.00194549560546875,
-0.006565093994140625,
0.02099609375,
0.0157318115234375,
0.0016651153564453125,
-0.006206512451171875,
0.017181396484375,
0.0019083023071289062,
-0.0237274169921875,
0.0399169921875,
0.043426513671875,
-0.01025390625,
-0.02691650390625,
0.017425537109375,
0.04010009765625,
0.00986480712890625,
-0.0038394927978515625,
0.04962158203125,
0.0169219970703125,
0.04827880859375,
0.0161285400390625,
-0.0191802978515625,
0.0173492431640625,
0.03045654296875,
-0.0340576171875,
-0.0254974365234375,
0.01134490966796875,
0.0085601806640625,
-0.006885528564453125,
-0.019775390625,
-0.0206146240234375,
0.0263671875,
-0.003047943115234375,
0.04302978515625,
-0.02020263671875,
-0.053314208984375,
-0.0025615692138671875,
0.0019989013671875,
0.055877685546875,
0.026702880859375,
-0.049835205078125,
-0.0014858245849609375,
-0.0305633544921875,
-0.0237579345703125,
-0.058563232421875,
-0.03125,
-0.04803466796875,
0.004840850830078125,
-0.025146484375,
-0.00762176513671875,
-0.0043487548828125,
0.032623291015625,
0.015716552734375,
0.04974365234375,
0.0021877288818359375,
0.02008056640625,
0.004009246826171875,
0.07220458984375,
0.0095367431640625,
0.078857421875,
0.0311126708984375,
0.036376953125,
-0.04595947265625,
-0.0306854248046875,
0.004852294921875,
0.01210784912109375,
0.01751708984375,
-0.0183258056640625,
0.034271240234375,
-0.03173828125,
0.02984619140625,
-0.004390716552734375,
0.005664825439453125,
0.0283050537109375,
-0.0028400421142578125,
-0.01177215576171875,
-0.03790283203125,
0.047149658203125,
0.031005859375,
-0.01377105712890625,
-0.06414794921875,
-0.0217437744140625,
0.006988525390625,
-0.0037860870361328125,
0.05059814453125,
-0.033203125,
0.01557159423828125,
0.031524658203125,
-0.05120849609375,
0.06500244140625,
0.062469482421875,
0.012054443359375,
0.06640625,
0.005466461181640625,
0.027923583984375,
0.047515869140625,
-0.0102691650390625,
0.005832672119140625,
-0.0305328369140625,
0.06622314453125,
0.01125335693359375,
-0.0052490234375,
0.07275390625,
-0.0241851806640625,
0.048248291015625,
0.03460693359375,
0.061614990234375,
-0.08355712890625,
0.031219482421875,
0.00833892822265625,
0.0008387565612792969,
0.0599365234375,
-0.013275146484375,
0.02362060546875,
-0.01007843017578125,
0.06610107421875,
0.05487060546875,
0.0095672607421875,
0.03863525390625,
0.0018167495727539062,
-0.0286712646484375,
-0.0203399658203125,
-0.013885498046875,
0.01409912109375,
-0.0021076202392578125,
0.02740478515625,
0.00969696044921875,
0.0030384063720703125,
-0.011322021484375,
0.00494384765625,
0.00232696533203125,
-0.0185546875,
-0.08929443359375,
-0.016998291015625,
-0.0096282958984375,
-0.0189361572265625,
0.0038051605224609375,
-0.0092010498046875,
0.046356201171875,
0.04913330078125,
-0.00807952880859375,
-0.005352020263671875,
0.013519287109375,
0.00788116455078125,
-0.03240966796875,
-0.0231170654296875,
0.021942138671875,
0.0292816162109375,
-0.0821533203125,
0.019134521484375,
-0.041290283203125,
-0.0147247314453125,
0.0168609619140625,
-0.0009136199951171875,
0.0184173583984375,
-0.038177490234375,
-0.01898193359375,
-0.0019779205322265625,
-0.02001953125,
0.028045654296875,
-0.01120758056640625,
0.00909423828125,
-0.03717041015625,
-0.011932373046875,
-0.006710052490234375,
-0.0477294921875,
-0.004978179931640625,
-0.0299530029296875,
-0.056396484375,
0.0931396484375,
-0.018951416015625,
0.004627227783203125,
-0.0149078369140625,
0.056884765625,
-0.01178741455078125,
0.0286865234375,
-0.0224761962890625,
0.06317138671875,
-0.0289154052734375,
0.024871826171875,
-0.036865234375,
0.0188751220703125,
-0.0004334449768066406,
0.0020275115966796875,
0.04620361328125,
0.00867462158203125,
-0.039215087890625,
0.00923919677734375,
0.05767822265625,
0.026580810546875,
-0.0010776519775390625,
0.0364990234375,
-0.01381683349609375,
-0.0211181640625,
0.0177459716796875,
0.006134033203125,
0.037872314453125,
-0.0030345916748046875,
-0.0264129638671875,
0.0094146728515625,
-0.004852294921875,
-0.0035495758056640625,
-0.0038433074951171875,
0.0640869140625,
0.026519775390625,
-0.016937255859375,
-0.0155792236328125,
-0.0027179718017578125,
-0.0058441162109375,
0.0287933349609375,
-0.01473236083984375,
0.0692138671875,
0.031829833984375,
-0.007289886474609375,
0.0294342041015625,
-0.01184844970703125,
-0.005462646484375,
0.009857177734375,
0.0024566650390625,
-0.045562744140625,
0.024383544921875,
0.003955841064453125,
0.041259765625,
-0.032989501953125,
0.00966644287109375,
0.0213623046875,
0.01558685302734375,
0.013214111328125,
0.034393310546875,
-0.007404327392578125,
0.0002491474151611328,
-0.0248260498046875,
-0.039031982421875,
-0.0133819580078125,
-0.01995849609375,
0.006816864013671875,
0.0012426376342773438,
-0.00550079345703125,
0.011077880859375,
0.0401611328125,
-0.03448486328125,
0.0018157958984375,
0.014678955078125,
0.0152740478515625,
-0.0036678314208984375,
0.004207611083984375,
-0.037353515625,
-0.0078277587890625,
-0.0457763671875,
0.031494140625,
0.00823974609375,
0.06390380859375,
0.00916290283203125,
0.045379638671875,
-0.0438232421875,
-0.0281219482421875,
-0.0165252685546875,
0.037628173828125,
-0.029296875,
0.01861572265625,
-0.053619384765625,
-0.05828857421875,
-0.00858306884765625,
0.051788330078125,
0.03857421875,
0.034332275390625,
0.0200958251953125,
0.01055908203125,
0.0185546875,
0.023193359375,
0.0858154296875,
-0.00896453857421875,
-0.010894775390625,
-0.015777587890625,
-0.0166778564453125,
0.011016845703125,
-0.007617950439453125,
0.00803375244140625,
-0.0027065277099609375,
0.0360107421875,
-0.018280029296875,
-0.0103759765625,
0.000621795654296875,
-0.0296173095703125,
0.059173583984375,
0.003513336181640625,
0.039031982421875,
0.0083465576171875,
0.0010385513305664062,
0.00017631053924560547,
-0.0364990234375,
-0.028411865234375,
0.029022216796875,
0.031890869140625,
-0.01323699951171875,
0.038818359375,
0.051605224609375,
-0.0232391357421875,
0.01171112060546875,
0.013214111328125,
0.010162353515625,
-0.0223541259765625,
0.021728515625,
-0.00452423095703125,
0.0011053085327148438,
0.004474639892578125,
-0.0278778076171875,
0.04595947265625,
0.054351806640625,
0.04443359375,
-0.01537322998046875,
0.05303955078125,
0.03741455078125,
-0.01326751708984375,
0.02606201171875,
0.022552490234375,
0.0005888938903808594,
-0.0249786376953125,
0.006168365478515625,
-0.0101776123046875,
-0.03173828125,
-0.004817962646484375,
0.0164794921875,
-0.0300140380859375,
-0.01215362548828125,
-0.0159149169921875,
0.028411865234375,
0.00862884521484375,
0.060516357421875,
-0.0017061233520507812,
-0.0595703125,
-0.0312347412109375,
0.0295867919921875,
0.0214691162109375,
0.07928466796875,
-0.00405120849609375,
0.0036830902099609375,
-0.0384521484375,
-0.02398681640625,
-0.010467529296875,
0.005229949951171875,
-0.060089111328125,
0.0095062255859375,
-0.006504058837890625,
-0.0031890869140625,
0.03887939453125,
0.00022208690643310547,
0.043731689453125,
0.012481689453125,
0.0285491943359375,
0.042022705078125,
-0.018768310546875,
-0.036163330078125,
0.0018815994262695312,
0.01216888427734375,
-0.049530029296875,
0.006378173828125,
0.02105712890625,
0.0005774497985839844,
0.02459716796875,
-0.036590576171875,
-0.0170440673828125,
-0.06817626953125,
0.004852294921875,
0.0007696151733398438,
-0.0166168212890625,
-0.0175018310546875,
0.0325927734375,
0.0114593505859375,
0.0247650146484375,
-0.01885986328125,
-0.027862548828125,
0.01218414306640625,
-0.055755615234375,
0.0288543701171875,
-0.0292816162109375,
-0.00414276123046875,
0.0194549560546875,
0.03753662109375,
-0.018798828125,
0.005584716796875,
-0.0301513671875,
-0.00672149658203125,
-0.01837158203125,
0.0304412841796875,
0.06256103515625,
-0.03955078125,
-0.0631103515625,
0.005580902099609375,
0.0225677490234375,
0.057373046875,
0.02227783203125,
-0.004024505615234375,
0.06494140625,
-0.049224853515625,
-0.0211944580078125,
-0.0280609130859375,
0.0236053466796875,
-0.0843505859375,
-0.043731689453125,
-0.03045654296875,
0.001861572265625,
0.02264404296875,
-0.03717041015625,
-0.07867431640625,
0.058929443359375,
-0.0243377685546875,
-0.0287628173828125,
-0.0736083984375,
0.044281005859375,
0.0061798095703125,
-0.0004754066467285156,
-0.0240478515625,
-0.00580596923828125,
0.0027675628662109375,
0.01505279541015625,
-0.01348876953125,
0.0290069580078125,
0.03692626953125,
-0.03167724609375,
0.004840850830078125,
-0.0274658203125,
-0.0172882080078125,
-0.00811767578125,
0.0234527587890625,
-0.03369140625,
0.038818359375,
0.04052734375,
-0.023773193359375,
-0.035003662109375,
0.00066375732421875,
-0.047454833984375,
0.01271820068359375,
-0.060272216796875,
-0.01131439208984375,
-0.00949859619140625,
0.036041259765625,
0.009735107421875,
0.00606536865234375,
-0.03570556640625,
-0.002994537353515625,
-0.0146942138671875,
-0.0157318115234375,
-0.01082611083984375,
0.0015993118286132812,
-0.03094482421875,
0.003631591796875,
-0.02166748046875,
-0.0143280029296875,
-0.036102294921875,
0.048309326171875,
-0.041900634765625,
-0.0129547119140625,
0.0191192626953125,
-0.00255584716796875,
-0.048553466796875,
0.00106048583984375,
0.02789306640625,
-0.0206451416015625,
0.00152587890625,
0.018096923828125,
-0.005733489990234375,
-0.0023555755615234375,
0.059722900390625,
0.05133056640625,
0.06329345703125,
-0.0552978515625,
-0.00493621826171875,
0.033111572265625,
-0.0004372596740722656,
-0.012603759765625,
-0.039520263671875,
0.012542724609375,
0.0177764892578125,
-0.016571044921875,
0.0076446533203125,
-0.0018796920776367188,
0.0218658447265625,
-0.032318115234375,
0.0740966796875,
0.0123138427734375,
0.07257080078125,
-0.0015735626220703125,
0.042694091796875,
0.0111541748046875,
-0.026092529296875,
0.03631591796875,
-0.0443115234375,
-0.007312774658203125,
0.05426025390625,
-0.01751708984375,
-0.05230712890625,
0.0523681640625,
-0.01094818115234375,
0.035552978515625,
0.016693115234375
]
|
030014bcb312f1808b99c530e9e162f1f46bba6b | Wordpress Stackexchange
Q: How to hook into the CPT's title placeholder? I want to change the default placeholder text in my Custom Post Type title field. This isn't possible while registering a new post type.
The following screenshot describes it.
A: I use a code which differs from yours a little bit. There is no need to get the current screen using the enter_title_here-filter because you have already a post-object:
/**
* Filter: Modifies the standard placeholder text
* @param string $title
* @param WP_Post $post
* @return string
*/
function my_enter_title_here( $title, $post ) {
if ( 'POST_TYPE' == $post->post_type ) {
$title = 'Custom placeholder text here';
}
return $title;
}
add_filter( 'enter_title_here', 'my_enter_title_here', 10, 2 );
| Q: How to hook into the CPT's title placeholder? I want to change the default placeholder text in my Custom Post Type title field. This isn't possible while registering a new post type.
The following screenshot describes it.
A: I use a code which differs from yours a little bit. There is no need to get the current screen using the enter_title_here-filter because you have already a post-object:
/**
* Filter: Modifies the standard placeholder text
* @param string $title
* @param WP_Post $post
* @return string
*/
function my_enter_title_here( $title, $post ) {
if ( 'POST_TYPE' == $post->post_type ) {
$title = 'Custom placeholder text here';
}
return $title;
}
add_filter( 'enter_title_here', 'my_enter_title_here', 10, 2 );
A: function change_default_title( $title ) {
$screen = get_current_screen();
// you can copy/paste the following if statement for other post types
if( 'POST_TYPE' == $screen->post_type ) {
$title = 'Custom placeholder text here';
}
return $title;
}
add_filter( 'enter_title_here', 'change_default_title' );
| wordpress | {
"language": "en",
"length": 158,
"provenance": "stackexchange_00019.jsonl.gz:450257",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167513"
} | [
0.039337158203125,
-0.01103973388671875,
0.04229736328125,
-0.0016126632690429688,
-0.0133209228515625,
0.00464630126953125,
0.058624267578125,
-0.029022216796875,
-0.01202392578125,
0.0098114013671875,
-0.048187255859375,
0.03680419921875,
-0.07269287109375,
0.0016660690307617188,
-0.0237274169921875,
-0.05291748046875,
0.007419586181640625,
-0.009124755859375,
-0.006656646728515625,
-0.0136260986328125,
-0.01018524169921875,
0.0043487548828125,
0.01068878173828125,
-0.001495361328125,
0.011627197265625,
-0.045806884765625,
0.0780029296875,
-0.0207672119140625,
0.0273590087890625,
-0.00775909423828125,
0.034423828125,
-0.043914794921875,
0.0218505859375,
0.023040771484375,
-0.0322265625,
0.07470703125,
0.029571533203125,
0.01224517822265625,
0.0163116455078125,
0.034332275390625,
0.0310821533203125,
0.01047515869140625,
-0.02508544921875,
0.0316162109375,
-0.04925537109375,
-0.0347900390625,
0.0297088623046875,
0.017059326171875,
0.033447265625,
-0.042022705078125,
0.0095672607421875,
0.0202484130859375,
0.0217742919921875,
-0.03338623046875,
-0.01274871826171875,
0.012176513671875,
-0.0291900634765625,
-0.0472412109375,
0.038909912109375,
0.040740966796875,
0.0086669921875,
-0.052276611328125,
0.01255035400390625,
-0.050323486328125,
0.0222320556640625,
0.020111083984375,
0.047393798828125,
0.01126861572265625,
-0.01480865478515625,
0.01160430908203125,
0.014495849609375,
-0.0220184326171875,
-0.010467529296875,
-0.03143310546875,
-0.0221099853515625,
0.0306396484375,
-0.01300048828125,
-0.035064697265625,
0.0179901123046875,
-0.0006289482116699219,
0.036102294921875,
-0.05609130859375,
0.03985595703125,
0.00571441650390625,
0.01161956787109375,
0.01490020751953125,
-0.0093841552734375,
-0.00098419189453125,
-0.01349639892578125,
-0.00970458984375,
-0.0192413330078125,
0.01776123046875,
-0.02459716796875,
-0.01934814453125,
0.00661468505859375,
-0.039031982421875,
0.017822265625,
0.05352783203125,
-0.0206756591796875,
0.0016222000122070312,
-0.00604248046875,
-0.0294342041015625,
0.030181884765625,
-0.0386962890625,
0.02728271484375,
0.0031108856201171875,
-0.036376953125,
-0.0389404296875,
0.0081787109375,
0.025909423828125,
-0.02349853515625,
-0.018402099609375,
-0.0301361083984375,
0.01271820068359375,
-0.05145263671875,
0.050567626953125,
-0.0069732666015625,
-0.035247802734375,
-0.043731689453125,
0.059600830078125,
-0.01380157470703125,
-0.03253173828125,
0.04791259765625,
-0.00922393798828125,
0.0208892822265625,
-0.0028896331787109375,
-0.06494140625,
0.0037631988525390625,
-0.0439453125,
-0.006038665771484375,
-0.001613616943359375,
0.01027679443359375,
0.0941162109375,
0.08428955078125,
0.036895751953125,
-0.0081939697265625,
0.006908416748046875,
0.01222991943359375,
-0.0167083740234375,
-0.0162353515625,
0.01788330078125,
-0.0158843994140625,
-0.018951416015625,
-0.007244110107421875,
0.01006317138671875,
0.01200103759765625,
-0.0009455680847167969,
0.0209197998046875,
0.007297515869140625,
-0.0447998046875,
0.0513916015625,
-0.07183837890625,
0.0286407470703125,
0.0179443359375,
-0.004375457763671875,
-0.027313232421875,
0.020904541015625,
-0.0303497314453125,
0.00821685791015625,
-0.035675048828125,
-0.0029773712158203125,
-0.037872314453125,
-0.0268402099609375,
-0.032135009765625,
-0.0455322265625,
0.057861328125,
0.004638671875,
0.0104827880859375,
0.0114593505859375,
0.00556182861328125,
0.00042891502380371094,
0.0298004150390625,
-0.02056884765625,
-0.006542205810546875,
0.004596710205078125,
-0.01215362548828125,
-0.0010156631469726562,
0.0265350341796875,
0.01303863525390625,
0.0196533203125,
0.0026988983154296875,
-0.01776123046875,
0.051483154296875,
-0.01038360595703125,
-0.022216796875,
-0.00972747802734375,
0.0233001708984375,
0.0338134765625,
-0.007480621337890625,
0.038543701171875,
0.0015115737915039062,
0.015655517578125,
-0.068603515625,
-0.009246826171875,
-0.0238494873046875,
-0.005947113037109375,
-0.01043701171875,
-0.0180816650390625,
-0.0150146484375,
0.0653076171875,
0.00443267822265625,
0.006855010986328125,
-0.00658416748046875,
0.01197052001953125,
-0.033050537109375,
-0.0028705596923828125,
-0.01309967041015625,
0.03717041015625,
-0.01251220703125,
0.004497528076171875,
-0.00021660327911376953,
-0.015716552734375,
0.0198822021484375,
-0.08123779296875,
-0.037017822265625,
-0.015838623046875,
-0.0198516845703125,
0.00864410400390625,
-0.00760650634765625,
-0.01031494140625,
0.007843017578125,
-0.006496429443359375,
0.0166015625,
0.035858154296875,
0.05657958984375,
0.000995635986328125,
-0.00518798828125,
-0.005611419677734375,
0.04681396484375,
0.0269927978515625,
-0.0423583984375,
-0.01885986328125,
0.01268768310546875,
0.00525665283203125,
-0.05096435546875,
-0.0272216796875,
-0.0291748046875,
-0.046600341796875,
0.00927734375,
0.0765380859375,
0.02142333984375,
0.0506591796875,
-0.020355224609375,
-0.0012950897216796875,
0.06756591796875,
0.0162200927734375,
0.0284881591796875,
-0.01171112060546875,
0.036956787109375,
0.060516357421875,
-0.042755126953125,
-0.0105133056640625,
0.043853759765625,
-0.047027587890625,
0.01276397705078125,
0.05352783203125,
-0.00015592575073242188,
-0.0122222900390625,
0.0223388671875,
-0.048583984375,
0.01666259765625,
-0.050750732421875,
-0.0313720703125,
-0.016632080078125,
0.04998779296875,
0.002918243408203125,
0.0296478271484375,
0.0198974609375,
-0.05047607421875,
0.0259857177734375,
0.0211181640625,
-0.00881195068359375,
-0.007747650146484375,
0.0123443603515625,
0.004962921142578125,
0.017120361328125,
-0.019256591796875,
-0.00527191162109375,
0.01349639892578125,
-0.00951385498046875,
-0.0211029052734375,
-0.03497314453125,
-0.0557861328125,
-0.0002701282501220703,
0.033294677734375,
-0.044647216796875,
0.01245880126953125,
0.006580352783203125,
0.01367950439453125,
-0.0252227783203125,
-0.007694244384765625,
0.028045654296875,
-0.035552978515625,
0.061859130859375,
-0.006885528564453125,
-0.030517578125,
0.0140533447265625,
-0.06427001953125,
0.053741455078125,
-0.065185546875,
0.0226593017578125,
0.055450439453125,
-0.0406494140625,
0.0185394287109375,
0.01073455810546875,
-0.0179290771484375,
0.00284576416015625,
0.0026073455810546875,
-0.006450653076171875,
0.0070648193359375,
-0.067626953125,
0.018951416015625,
0.01374053955078125,
0.06634521484375,
-0.031524658203125,
-0.04730224609375,
-0.0001857280731201172,
0.023101806640625,
-0.033294677734375,
-0.02618408203125,
-0.0208892822265625,
-0.038360595703125,
-0.0190887451171875,
0.005680084228515625,
-0.021270751953125,
0.01715087890625,
0.022735595703125,
0.00026917457580566406,
0.00909423828125,
-0.0321044921875,
-0.00823211669921875,
-0.032684326171875,
-0.033111572265625,
-0.047821044921875,
0.0015287399291992188,
-0.010009765625,
0.00598907470703125,
0.0350341796875,
0.01497650146484375,
-0.005702972412109375,
0.0272979736328125,
0.01439666748046875,
-0.008697509765625,
-0.0058746337890625,
0.023590087890625,
-0.03948974609375,
0.0325927734375,
-0.0015401840209960938,
-0.011444091796875,
0.0269927978515625,
0.001445770263671875,
-0.0200042724609375,
-0.01959228515625,
-0.028717041015625,
-0.006008148193359375,
0.07476806640625,
0.0260772705078125,
0.007213592529296875,
0.052459716796875,
-0.037506103515625,
0.01024627685546875,
-0.0017747879028320312,
-0.007457733154296875,
0.035675048828125,
-0.020782470703125,
-0.0221099853515625,
0.00492095947265625,
0.04052734375,
-0.03375244140625,
0.0005536079406738281,
0.0126190185546875,
-0.0164642333984375,
-0.00824737548828125,
-0.006649017333984375,
-0.0145263671875,
0.00876617431640625,
-0.006305694580078125,
-0.0236053466796875,
0.0740966796875,
0.019775390625,
0.050079345703125,
0.03033447265625,
0.01763916015625,
0.00186920166015625,
-0.09954833984375,
0.047576904296875,
-0.08355712890625,
-0.0225372314453125,
-0.0458984375,
-0.0232696533203125,
0.038116455078125,
0.12457275390625,
-0.049713134765625,
-0.025634765625,
0.004425048828125,
0.0161285400390625,
0.0145263671875,
-0.016082763671875,
-0.00018668174743652344,
-0.03125,
-0.0953369140625,
0.0222625732421875,
0.0064697265625,
-0.0237274169921875,
-0.006076812744140625,
0.0222625732421875,
-0.04443359375,
-0.031982421875,
0.027862548828125,
-0.0162811279296875,
0.01202392578125,
0.0229034423828125,
-0.01264190673828125,
0.01451873779296875,
-0.019134521484375,
-0.032501220703125,
-0.08660888671875,
-0.016143798828125,
-0.0141448974609375,
0.047821044921875,
0.0110626220703125,
-0.034942626953125,
-0.032745361328125,
0.01023101806640625,
0.042327880859375,
0.0193634033203125,
0.0078277587890625,
-0.037841796875,
0.00009840726852416992,
-0.00319671630859375,
0.00848388671875,
-0.0238189697265625,
-0.00614166259765625,
0.008941650390625,
-0.067626953125,
0.04974365234375,
0.0138397216796875,
0.017120361328125,
0.0543212890625,
-0.05169677734375,
-0.06524658203125,
-0.0264129638671875,
0.00821685791015625,
0.0095672607421875,
0.00878143310546875,
0.00848388671875,
-0.0259246826171875,
-0.062744140625,
0.05419921875,
0.024627685546875,
0.0062408447265625,
-0.006771087646484375,
0.062103271484375,
0.010894775390625,
-0.04071044921875,
0.01143646240234375,
-0.00994110107421875,
0.031890869140625,
0.0198516845703125,
-0.002407073974609375,
-0.028717041015625,
-0.0155487060546875,
0.054962158203125,
-0.00914764404296875,
0.01235198974609375,
-0.019805908203125,
0.055877685546875,
-0.0067901611328125,
-0.00890350341796875,
0.026763916015625,
-0.013427734375,
-0.00505828857421875,
-0.011077880859375,
-0.01326751708984375,
-0.0135955810546875,
0.021209716796875,
0.0379638671875,
-0.019775390625,
0.049896240234375,
-0.0260162353515625,
-0.0165557861328125,
0.01568603515625,
0.036407470703125,
0.0031299591064453125,
-0.00421142578125,
0.0226287841796875,
-0.023529052734375,
-0.036865234375,
0.00696563720703125,
-0.0435791015625,
-0.06280517578125,
0.0204315185546875,
0.01081085205078125,
0.02130126953125,
0.027130126953125,
-0.0219268798828125,
-0.005535125732421875,
0.0128021240234375,
-0.03887939453125,
-0.056243896484375,
-0.0199127197265625,
-0.028076171875,
0.042572021484375,
0.059967041015625,
0.019805908203125,
-0.01534271240234375,
0.042572021484375,
0.012939453125,
0.03326416015625,
0.02777099609375,
0.0684814453125,
0.0081024169921875,
-0.0010738372802734375,
0.0223388671875,
-0.0218963623046875,
-0.01556396484375,
0.0297088623046875,
0.021148681640625,
-0.01030731201171875,
-0.01441192626953125,
0.0308990478515625,
0.04095458984375,
0.00670623779296875,
0.003803253173828125,
0.028106689453125,
-0.03228759765625,
0.02972412109375,
0.01922607421875,
-0.0185699462890625,
-0.0289306640625,
0.0082550048828125,
0.0265960693359375,
-0.043243408203125,
-0.00982666015625,
0.034576416015625,
-0.02362060546875,
-0.005023956298828125,
0.01081085205078125,
-0.032196044921875,
-0.070556640625,
0.00420379638671875,
-0.0019989013671875,
-0.019744873046875,
-0.042266845703125,
0.0070953369140625,
-0.01026153564453125,
-0.0209197998046875,
0.01514434814453125,
-0.034637451171875,
-0.0037994384765625,
-0.005008697509765625,
0.00531005859375,
0.0021228790283203125,
-0.01409149169921875,
-0.04437255859375,
-0.0011644363403320312,
-0.020843505859375,
-0.001956939697265625,
0.0011997222900390625,
0.0255279541015625,
-0.00778961181640625,
0.0328369140625,
-0.031707763671875,
-0.004848480224609375,
-0.0232086181640625,
-0.002788543701171875,
0.04486083984375,
0.0102996826171875,
-0.022064208984375,
-0.00316619873046875,
-0.046356201171875,
-0.013397216796875,
-0.052215576171875,
-0.04974365234375,
-0.033477783203125,
-0.006084442138671875,
0.01512908935546875,
0.020263671875,
0.0003082752227783203,
-0.031829833984375,
0.0048675537109375,
0.0145263671875,
0.033416748046875,
0.07464599609375,
-0.028900146484375,
0.054901123046875,
0.01496124267578125,
0.021697998046875,
-0.0087432861328125,
0.01255035400390625,
0.00904083251953125,
-0.01445770263671875,
-0.0025482177734375,
-0.030426025390625,
-0.0109710693359375,
-0.00035881996154785156,
0.0118408203125,
0.028045654296875,
0.044647216796875,
0.006900787353515625,
-0.0007939338684082031,
0.00507354736328125,
0.00487518310546875,
-0.01384735107421875,
0.01332855224609375,
0.00791168212890625,
-0.029876708984375,
0.0335693359375,
-0.0205230712890625,
0.00479888916015625,
-0.004154205322265625,
-0.0103912353515625,
0.0015668869018554688,
-0.0250091552734375,
-0.005664825439453125,
0.0418701171875,
-0.0810546875,
0.055938720703125,
0.056182861328125,
0.0015516281127929688,
0.034454345703125,
-0.0043792724609375,
0.00652313232421875,
0.034576416015625,
-0.0439453125,
-0.004642486572265625,
0.0114898681640625,
0.0391845703125,
-0.013427734375,
-0.006328582763671875,
0.0516357421875,
-0.0157623291015625,
-0.003269195556640625,
0.044464111328125,
0.0280303955078125,
-0.05792236328125,
-0.0079803466796875,
-0.001560211181640625,
-0.0200347900390625,
-0.0099029541015625,
0.01153564453125,
-0.00360107421875,
-0.0013113021850585938,
-0.0143280029296875,
-0.047271728515625,
-0.0313720703125,
-0.0140380859375,
0.005054473876953125,
0.018798828125,
-0.00717926025390625,
0.0693359375,
0.0002218484878540039,
-0.044464111328125,
-0.0243988037109375,
0.00510406494140625,
0.003849029541015625,
-0.022857666015625,
-0.00254058837890625,
0.028472900390625,
-0.01678466796875,
-0.0926513671875,
-0.00954437255859375,
-0.037628173828125,
-0.02264404296875,
0.026092529296875,
0.036163330078125,
0.01751708984375,
0.046966552734375,
0.0095367431640625,
-0.01181793212890625,
0.035888671875,
-0.04730224609375,
-0.0121307373046875,
-0.0290679931640625,
-0.0213165283203125,
0.0885009765625,
-0.037750244140625,
0.03582763671875,
-0.00559234619140625,
0.0307464599609375,
-0.008880615234375,
-0.03839111328125,
0.049468994140625,
-0.0076141357421875,
-0.0298614501953125,
0.0029964447021484375,
-0.0096282958984375,
0.0163421630859375,
-0.0081787109375,
0.02386474609375,
-0.0364990234375,
-0.01537322998046875,
-0.0126953125,
-0.042938232421875,
-0.018463134765625,
-0.020050048828125,
-0.05438232421875,
0.144287109375,
0.04913330078125,
0.00934600830078125,
0.013153076171875,
0.060302734375,
-0.06378173828125,
0.03656005859375,
-0.03057861328125,
0.051361083984375,
-0.0267486572265625,
0.04449462890625,
-0.0369873046875,
0.002346038818359375,
0.0162811279296875,
-0.00013506412506103516,
0.004550933837890625,
-0.0013418197631835938,
0.0069122314453125,
-0.008087158203125,
0.02154541015625,
0.055999755859375,
0.01190948486328125,
-0.00998687744140625,
-0.0027256011962890625,
0.033355712890625,
-0.0010051727294921875,
-0.0184173583984375,
0.03204345703125,
-0.03314208984375,
-0.03863525390625,
0.035980224609375,
0.0270538330078125,
0.03277587890625,
0.0254364013671875,
-0.058929443359375,
-0.019378662109375,
0.009002685546875,
0.01496124267578125,
0.0086517333984375,
0.025543212890625,
0.056915283203125,
0.08538818359375,
-0.0139312744140625,
0.037322998046875,
-0.04412841796875,
0.09185791015625,
0.0225372314453125,
0.0196075439453125,
0.0202178955078125,
-0.0078582763671875,
0.020965576171875,
-0.0166473388671875,
-0.001514434814453125,
0.01171875,
0.0102081298828125,
0.033172607421875,
-0.006134033203125,
-0.004398345947265625,
-0.03717041015625,
0.057647705078125,
0.037139892578125,
0.040069580078125,
-0.055938720703125,
-0.003467559814453125,
0.024688720703125,
0.042572021484375,
-0.0002722740173339844,
-0.03790283203125,
0.0095672607421875,
-0.0626220703125,
0.0031261444091796875,
-0.0236358642578125,
-0.0020618438720703125,
0.031707763671875,
0.007213592529296875,
0.002559661865234375,
0.00749969482421875,
-0.01485443115234375,
0.0036945343017578125,
-0.04595947265625,
0.0016937255859375,
0.0263824462890625,
0.07891845703125,
0.0069732666015625,
0.0845947265625,
-0.0266571044921875,
-0.0260009765625,
0.005672454833984375,
0.00774383544921875,
0.032440185546875,
-0.0013952255249023438,
-0.01678466796875,
-0.005710601806640625,
0.0264434814453125,
0.006244659423828125,
0.03778076171875,
0.04644775390625,
0.054107666015625,
0.025665283203125,
0.00583648681640625,
0.004634857177734375,
-0.0170440673828125,
-0.0244903564453125,
-0.02203369140625,
-0.02789306640625,
-0.00911712646484375,
0.006378173828125,
-0.0152130126953125,
0.02410888671875,
-0.00133514404296875,
0.015289306640625,
-0.006717681884765625,
0.0237579345703125,
-0.004184722900390625,
-0.039337158203125,
-0.0008859634399414062,
0.017425537109375,
0.07281494140625,
0.035552978515625,
-0.08514404296875,
-0.011444091796875,
-0.031768798828125,
-0.0804443359375,
0.025543212890625,
0.04132080078125,
-0.032073974609375,
0.01177978515625,
-0.0128936767578125,
0.0274658203125,
-0.0310821533203125,
-0.0095367431640625,
0.028289794921875,
-0.0026950836181640625,
0.00717926025390625,
0.0241241455078125,
-0.0521240234375,
-0.01470947265625,
-0.017425537109375,
0.004978179931640625,
0.00337982177734375,
0.011871337890625,
0.0160675048828125,
0.029022216796875,
-0.007404327392578125,
0.01094818115234375,
-0.018035888671875,
-0.0098419189453125,
0.00628662109375,
-0.0164642333984375,
0.0042266845703125,
-0.004146575927734375,
-0.035308837890625,
0.02557373046875,
0.027008056640625,
0.00982666015625,
0.03582763671875,
-0.034454345703125,
0.0279083251953125,
-0.0208282470703125,
-0.004131317138671875,
-0.0229339599609375,
-0.00695037841796875,
-0.0271148681640625,
-0.0106658935546875,
0.041229248046875,
0.024139404296875,
0.00528717041015625,
-0.0040435791015625,
-0.036346435546875,
-0.03961181640625,
0.03173828125,
-0.024444580078125,
0.043243408203125,
0.0243377685546875,
-0.0660400390625,
-0.0275421142578125,
0.01678466796875,
-0.0005235671997070312,
-0.008392333984375,
0.041351318359375,
0.01265716552734375,
0.02227783203125,
-0.04595947265625,
-0.0279693603515625,
-0.0343017578125,
0.02655029296875,
-0.0160980224609375,
0.01277923583984375,
-0.037353515625,
0.00913238525390625,
-0.010498046875,
-0.009002685546875,
-0.012969970703125,
-0.041046142578125,
-0.0039825439453125,
0.020477294921875,
-0.0240478515625,
-0.0203094482421875,
-0.0474853515625,
-0.00849151611328125,
0.0039520263671875,
-0.0217437744140625,
0.0174102783203125,
0.0058441162109375,
-0.04052734375,
-0.02984619140625,
0.00860595703125,
-0.074462890625,
0.0411376953125,
0.0408935546875,
-0.027099609375,
0.00839996337890625,
-0.03741455078125,
-0.0643310546875,
-0.0196990966796875,
0.0014009475708007812,
0.058197021484375,
-0.0189208984375,
-0.048309326171875,
-0.0100860595703125,
-0.0078582763671875,
0.045745849609375,
-0.046295166015625,
-0.0293426513671875,
-0.004154205322265625,
0.0257720947265625,
-0.03668212890625,
-0.041168212890625,
0.03289794921875,
-0.06927490234375,
-0.01406097412109375,
-0.01267242431640625,
-0.003032684326171875,
0.0117950439453125,
-0.041046142578125,
-0.059051513671875,
0.03997802734375,
-0.01395416259765625,
-0.0290069580078125,
-0.042083740234375,
0.0057830810546875,
-0.02838134765625,
0.061279296875,
0.0211029052734375,
-0.055572509765625,
-0.00948333740234375,
0.025299072265625,
-0.01428985595703125,
0.0169830322265625,
0.02294921875,
-0.0126495361328125,
-0.047119140625,
-0.01403045654296875,
-0.00980377197265625,
-0.028656005859375,
0.0545654296875,
-0.037750244140625,
0.015655517578125,
0.00731658935546875,
-0.078125,
-0.056304931640625,
-0.051177978515625,
0.00782012939453125,
0.0014829635620117188,
-0.0731201171875,
0.00553131103515625,
-0.00522613525390625,
0.04998779296875,
0.01111602783203125,
-0.007137298583984375,
-0.04852294921875,
0.042388916015625,
-0.015625,
-0.032623291015625,
-0.00893402099609375,
0.012176513671875,
-0.050872802734375,
-0.032562255859375,
0.032440185546875,
0.001079559326171875,
0.01308441162109375,
-0.0048980712890625,
-0.00391387939453125,
-0.0251922607421875,
0.027557373046875,
-0.00699615478515625,
-0.0245361328125,
-0.0235595703125,
0.07122802734375,
-0.036041259765625,
-0.0156097412109375,
-0.00043964385986328125,
0.0292510986328125,
0.0116119384765625,
-0.0294342041015625,
-0.021209716796875,
-0.0045013427734375,
-0.0198516845703125,
0.01593017578125,
-0.0186309814453125,
0.07891845703125,
-0.01361083984375,
-0.0202484130859375,
-0.0193023681640625,
0.0130157470703125,
0.0023250579833984375,
0.0294189453125,
-0.015716552734375,
0.0295257568359375,
0.007419586181640625,
0.038116455078125,
-0.007434844970703125,
-0.0038051605224609375,
-0.0181732177734375,
0.01296234130859375,
-0.0156402587890625,
0.006252288818359375,
0.00391387939453125,
-0.0028667449951171875,
0.021453857421875,
0.01061248779296875,
0.015960693359375,
0.006343841552734375,
0.0075836181640625,
-0.033905029296875,
-0.01507568359375,
-0.003742218017578125
]
|
01f678620c5e665cd3275f8337979b38abce545e | Wordpress Stackexchange
Q: WP Admin default view mode for Custom Post Type To change it globally to excerpt for every post type I can use:
function my_default_posts_list_mode( $default ) {
return 'excerpt';
}
add_filter( 'default-posts-list-mode', 'my_default_posts_list_mode' );
But how can I achieve the same only for a Custom Post Type?
Explanation:
I've created a Custom Post Type. In WP Admin the default view mode is set to list (edit.php?post_type=my_post_type&mode=list). I want it to be excerpt, but only for my Custom Post Type not affecting other post types.
I can do this manually by adding &mode=excerpt to the URL like so: edit.php?post_type=my_post_type&mode=excerpt, however I want this to be done automatically.
A: To change the mode URL variable but in the load try this:
add_action( 'load-edit.php', 'my_default_posts_list_mode' );
function my_default_posts_list_mode() {
$post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : '';
if ( $post_type && $post_type == 'my_post_type' && !isset( $_REQUEST['mode'] ) )
$_REQUEST['mode'] = 'excerpt';
}
Got the "insipration" from here: Set Default Listing "View" in Admin
| Q: WP Admin default view mode for Custom Post Type To change it globally to excerpt for every post type I can use:
function my_default_posts_list_mode( $default ) {
return 'excerpt';
}
add_filter( 'default-posts-list-mode', 'my_default_posts_list_mode' );
But how can I achieve the same only for a Custom Post Type?
Explanation:
I've created a Custom Post Type. In WP Admin the default view mode is set to list (edit.php?post_type=my_post_type&mode=list). I want it to be excerpt, but only for my Custom Post Type not affecting other post types.
I can do this manually by adding &mode=excerpt to the URL like so: edit.php?post_type=my_post_type&mode=excerpt, however I want this to be done automatically.
A: To change the mode URL variable but in the load try this:
add_action( 'load-edit.php', 'my_default_posts_list_mode' );
function my_default_posts_list_mode() {
$post_type = isset( $_GET['post_type'] ) ? $_GET['post_type'] : '';
if ( $post_type && $post_type == 'my_post_type' && !isset( $_REQUEST['mode'] ) )
$_REQUEST['mode'] = 'excerpt';
}
Got the "insipration" from here: Set Default Listing "View" in Admin
| wordpress | {
"language": "en",
"length": 163,
"provenance": "stackexchange_00019.jsonl.gz:450268",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167551"
} | [
0.034423828125,
-0.0137176513671875,
-0.00635528564453125,
-0.0267333984375,
0.00637054443359375,
-0.0260467529296875,
0.055084228515625,
-0.0001430511474609375,
-0.0022029876708984375,
-0.01142120361328125,
0.01007843017578125,
-0.00830078125,
-0.03338623046875,
-0.051422119140625,
0.021453857421875,
-0.0096893310546875,
0.01702880859375,
0.006420135498046875,
0.0218505859375,
-0.016876220703125,
0.0298309326171875,
-0.0120391845703125,
-0.0063629150390625,
0.0291290283203125,
0.0019140243530273438,
0.0155029296875,
0.04962158203125,
-0.0027866363525390625,
-0.0081024169921875,
-0.00951385498046875,
0.01251220703125,
-0.011077880859375,
0.03253173828125,
0.004909515380859375,
-0.0233001708984375,
0.0166778564453125,
-0.00954437255859375,
0.00957489013671875,
0.005863189697265625,
0.020599365234375,
0.02215576171875,
-0.00922393798828125,
-0.03143310546875,
-0.01314544677734375,
-0.047698974609375,
-0.0149078369140625,
0.0147705078125,
0.0008544921875,
0.037567138671875,
-0.01064300537109375,
0.0142059326171875,
0.0265655517578125,
0.02886962890625,
-0.04388427734375,
-0.01560211181640625,
0.005886077880859375,
-0.019744873046875,
-0.0203094482421875,
0.04248046875,
-0.0283050537109375,
-0.0215301513671875,
-0.045745849609375,
0.03253173828125,
0.005939483642578125,
0.006580352783203125,
-0.00374603271484375,
0.0369873046875,
0.037139892578125,
-0.056610107421875,
-0.016387939453125,
0.03314208984375,
-0.0276947021484375,
0.00943756103515625,
-0.0308837890625,
0.0223236083984375,
0.00872039794921875,
-0.003299713134765625,
0.00830841064453125,
0.004077911376953125,
0.008880615234375,
0.00785064697265625,
-0.04345703125,
0.010345458984375,
-0.036590576171875,
0.031341552734375,
0.00879669189453125,
-0.01433563232421875,
-0.00676727294921875,
-0.0269317626953125,
-0.0345458984375,
-0.01505279541015625,
-0.0386962890625,
-0.0115966796875,
-0.00702667236328125,
-0.0211029052734375,
-0.0257568359375,
-0.01102447509765625,
-0.00045299530029296875,
0.0012636184692382812,
0.0214385986328125,
0.0220947265625,
-0.04498291015625,
0.060516357421875,
-0.041961669921875,
0.017242431640625,
0.0168914794921875,
-0.03314208984375,
-0.0018281936645507812,
0.04364013671875,
0.04327392578125,
0.003894805908203125,
0.005115509033203125,
-0.0301666259765625,
0.0054168701171875,
-0.03887939453125,
-0.01708984375,
-0.07794189453125,
-0.01837158203125,
-0.021240234375,
-0.00771331787109375,
0.0186920166015625,
0.0302886962890625,
0.032745361328125,
-0.04010009765625,
-0.009002685546875,
-0.012603759765625,
-0.0367431640625,
-0.0516357421875,
0.0345458984375,
0.0099029541015625,
-0.0308074951171875,
-0.005832672119140625,
0.075927734375,
0.027313232421875,
0.011444091796875,
-0.0161895751953125,
-0.0005135536193847656,
-0.03338623046875,
-0.0278778076171875,
0.0275115966796875,
0.015106201171875,
-0.033294677734375,
0.0037059783935546875,
0.007785797119140625,
0.0019626617431640625,
0.07568359375,
0.0302734375,
-0.045013427734375,
-0.01837158203125,
-0.047454833984375,
-0.04132080078125,
-0.033935546875,
0.052032470703125,
0.01012420654296875,
-0.032623291015625,
-0.0231475830078125,
0.06317138671875,
-0.0499267578125,
-0.0355224609375,
-0.0609130859375,
0.01800537109375,
-0.040069580078125,
-0.0192718505859375,
-0.03460693359375,
-0.06494140625,
0.07342529296875,
-0.041107177734375,
-0.0172119140625,
0.0184173583984375,
0.01111602783203125,
0.02325439453125,
-0.01025390625,
0.0089111328125,
0.0135498046875,
-0.003589630126953125,
0.005374908447265625,
-0.01047515869140625,
-0.031219482421875,
0.039886474609375,
0.0139923095703125,
-0.01029205322265625,
-0.006500244140625,
-0.005046844482421875,
0.01210784912109375,
-0.07110595703125,
0.047821044921875,
0.0059814453125,
0.059661865234375,
0.038299560546875,
0.01146697998046875,
0.0034008026123046875,
-0.0048370361328125,
-0.0255279541015625,
-0.025848388671875,
-0.01305389404296875,
-0.01404571533203125,
0.031280517578125,
-0.0020294189453125,
-0.00812530517578125,
0.03997802734375,
0.0333251953125,
-0.0196685791015625,
0.0164337158203125,
-0.00585174560546875,
-0.04425048828125,
-0.0116424560546875,
-0.00847625732421875,
0.022552490234375,
0.01129150390625,
0.0168609619140625,
0.00589752197265625,
0.005832672119140625,
-0.008209228515625,
-0.045166015625,
-0.042144775390625,
0.04443359375,
-0.003662109375,
0.0240478515625,
-0.02252197265625,
0.034149169921875,
-0.00894927978515625,
-0.0282440185546875,
-0.0065765380859375,
0.035308837890625,
0.061737060546875,
-0.00551605224609375,
-0.01007843017578125,
-0.0253448486328125,
0.059326171875,
0.004016876220703125,
-0.0170440673828125,
0.0149078369140625,
0.042877197265625,
-0.005573272705078125,
-0.0491943359375,
-0.0011911392211914062,
-0.0184478759765625,
-0.060791015625,
-0.017181396484375,
0.0711669921875,
0.016387939453125,
0.036712646484375,
-0.0006680488586425781,
0.0244293212890625,
0.051361083984375,
0.0221099853515625,
0.03515625,
-0.00843048095703125,
0.0003941059112548828,
0.00205230712890625,
-0.01052093505859375,
-0.00855255126953125,
0.0309906005859375,
-0.040985107421875,
0.033111572265625,
0.0302276611328125,
0.0082855224609375,
-0.003276824951171875,
0.025421142578125,
-0.005573272705078125,
-0.0026073455810546875,
-0.003742218017578125,
-0.0262908935546875,
0.0069427490234375,
0.052459716796875,
0.020782470703125,
0.0693359375,
0.058990478515625,
-0.043182373046875,
-0.00836181640625,
0.0115509033203125,
0.0556640625,
-0.00655364990234375,
0.0208740234375,
0.0484619140625,
-0.0196685791015625,
-0.04241943359375,
0.005828857421875,
0.01206207275390625,
-0.006473541259765625,
-0.01061248779296875,
0.017608642578125,
-0.0531005859375,
-0.01277923583984375,
-0.0017843246459960938,
-0.09210205078125,
-0.01776123046875,
0.02618408203125,
-0.01393890380859375,
-0.04656982421875,
0.0186920166015625,
-0.013153076171875,
-0.050689697265625,
0.02044677734375,
-0.017333984375,
-0.044769287109375,
0.0179443359375,
-0.08642578125,
0.07135009765625,
-0.07568359375,
0.0811767578125,
0.07391357421875,
-0.04132080078125,
0.038330078125,
-0.004489898681640625,
0.0418701171875,
-0.0122528076171875,
0.02313232421875,
-0.0128936767578125,
-0.00997161865234375,
-0.049102783203125,
-0.0243988037109375,
0.024078369140625,
0.04339599609375,
-0.01580810546875,
-0.02374267578125,
-0.0060577392578125,
0.0236968994140625,
-0.01250457763671875,
0.0159759521484375,
0.03765869140625,
-0.059326171875,
0.001979827880859375,
-0.01369476318359375,
-0.03240966796875,
-0.023773193359375,
0.0014629364013671875,
-0.00028014183044433594,
0.03729248046875,
-0.031158447265625,
-0.031341552734375,
-0.021453857421875,
-0.07049560546875,
-0.04827880859375,
0.01026153564453125,
0.02117919921875,
0.00982666015625,
0.0738525390625,
0.03436279296875,
-0.04400634765625,
0.036773681640625,
0.0126495361328125,
-0.0229949951171875,
0.0302886962890625,
0.0234375,
-0.0408935546875,
0.059814453125,
-0.009002685546875,
0.032318115234375,
0.06890869140625,
-0.037750244140625,
-0.01073455810546875,
-0.0282440185546875,
0.01275634765625,
0.022613525390625,
-0.0002655982971191406,
0.0192413330078125,
0.03240966796875,
0.029510498046875,
-0.021820068359375,
-0.040618896484375,
0.007526397705078125,
-0.048309326171875,
0.00579071044921875,
0.0297698974609375,
-0.0129241943359375,
-0.0186004638671875,
0.0289459228515625,
-0.020843505859375,
0.004329681396484375,
0.06414794921875,
-0.040802001953125,
-0.0164794921875,
-0.019622802734375,
-0.0316162109375,
-0.01427459716796875,
0.0295867919921875,
0.0100555419921875,
0.004222869873046875,
0.022064208984375,
0.062042236328125,
0.0304107666015625,
-0.0203857421875,
-0.0299530029296875,
-0.06878662109375,
0.0307159423828125,
-0.03448486328125,
-0.000011086463928222656,
-0.01806640625,
-0.019012451171875,
0.01039886474609375,
0.06353759765625,
-0.058990478515625,
-0.0096588134765625,
0.0084228515625,
0.0170135498046875,
0.034088134765625,
-0.07769775390625,
-0.0246429443359375,
-0.041595458984375,
-0.0631103515625,
0.0218658447265625,
-0.0086822509765625,
-0.014801025390625,
-0.03936767578125,
0.02783203125,
-0.049346923828125,
-0.0261077880859375,
0.05902099609375,
-0.0640869140625,
-0.0184173583984375,
0.051971435546875,
-0.0292205810546875,
-0.01284027099609375,
-0.050811767578125,
-0.01372528076171875,
-0.093994140625,
-0.00589752197265625,
-0.01146697998046875,
0.05780029296875,
0.02154541015625,
-0.050048828125,
-0.0090179443359375,
0.036041259765625,
0.036468505859375,
-0.0242462158203125,
0.0007009506225585938,
-0.021697998046875,
-0.00876617431640625,
-0.01447296142578125,
-0.0170440673828125,
-0.019287109375,
-0.033966064453125,
-0.02288818359375,
-0.031402587890625,
0.0146026611328125,
0.007354736328125,
0.0037384033203125,
0.03729248046875,
-0.0135345458984375,
-0.09210205078125,
-0.0360107421875,
-0.022216796875,
0.005329132080078125,
-0.00258636474609375,
-0.0276031494140625,
-0.052032470703125,
-0.1015625,
0.0411376953125,
-0.0213775634765625,
-0.02008056640625,
0.0016117095947265625,
0.0550537109375,
0.0178680419921875,
-0.00817108154296875,
-0.01502227783203125,
0.006565093994140625,
0.047454833984375,
-0.0015382766723632812,
0.045867919921875,
0.03704833984375,
-0.0180206298828125,
0.048980712890625,
0.0253143310546875,
-0.0167236328125,
-0.032196044921875,
0.048736572265625,
0.0186614990234375,
0.00952911376953125,
-0.0102691650390625,
-0.0233154296875,
0.07049560546875,
-0.004093170166015625,
0.00873565673828125,
-0.030364990234375,
0.00820159912109375,
0.04888916015625,
-0.006591796875,
0.03704833984375,
-0.021942138671875,
0.021636962890625,
0.0038204193115234375,
-0.006008148193359375,
0.005466461181640625,
0.02740478515625,
0.005985260009765625,
-0.0247802734375,
-0.019805908203125,
0.00959014892578125,
0.0167999267578125,
0.034088134765625,
0.023773193359375,
0.008087158203125,
0.07489013671875,
0.0164947509765625,
-0.023406982421875,
0.0063629150390625,
-0.0276641845703125,
-0.053985595703125,
-0.055633544921875,
-0.0232086181640625,
-0.01509857177734375,
0.02362060546875,
0.060333251953125,
0.0084686279296875,
0.0200347900390625,
0.04339599609375,
0.0151824951171875,
-0.00740814208984375,
0.004695892333984375,
0.03668212890625,
-0.031585693359375,
0.0283050537109375,
0.001499176025390625,
0.006626129150390625,
-0.004566192626953125,
0.074951171875,
-0.0023250579833984375,
0.035736083984375,
-0.01065826416015625,
0.026885986328125,
0.01788330078125,
0.0489501953125,
0.0178070068359375,
0.0036220550537109375,
-0.036163330078125,
0.055419921875,
-0.025634765625,
-0.0137786865234375,
-0.01216888427734375,
0.004779815673828125,
0.03179931640625,
-0.01248931884765625,
0.0072021484375,
0.0054779052734375,
-0.032958984375,
-0.015045166015625,
0.0194549560546875,
-0.022613525390625,
-0.04632568359375,
-0.01560211181640625,
0.0236663818359375,
0.0394287109375,
-0.0222930908203125,
-0.049896240234375,
0.02313232421875,
-0.034149169921875,
0.00885009765625,
-0.01374053955078125,
-0.059814453125,
0.048858642578125,
0.05206298828125,
-0.0035266876220703125,
-0.01308441162109375,
-0.0189056396484375,
-0.0279541015625,
-0.009674072265625,
-0.001308441162109375,
-0.002803802490234375,
0.0273284912109375,
-0.0260162353515625,
0.0026874542236328125,
0.0162200927734375,
-0.01824951171875,
-0.0299072265625,
0.029541015625,
0.0287628173828125,
0.0174407958984375,
-0.027130126953125,
0.006481170654296875,
-0.04180908203125,
-0.01055145263671875,
-0.031402587890625,
-0.0396728515625,
-0.0389404296875,
-0.00274658203125,
-0.002170562744140625,
-0.0146636962890625,
-0.0175018310546875,
-0.059295654296875,
-0.036376953125,
0.0209503173828125,
0.050750732421875,
-0.0003020763397216797,
-0.005214691162109375,
0.050384521484375,
-0.018310546875,
0.04290771484375,
-0.01214599609375,
-0.008575439453125,
-0.019256591796875,
-0.003658294677734375,
-0.0015621185302734375,
-0.044586181640625,
0.0113067626953125,
0.0023212432861328125,
-0.0360107421875,
0.0128021240234375,
0.0443115234375,
0.005939483642578125,
-0.00800323486328125,
0.0007219314575195312,
-0.0009393692016601562,
-0.0419921875,
-0.005096435546875,
-0.02606201171875,
0.0024967193603515625,
-0.05255126953125,
0.0303802490234375,
0.045654296875,
-0.03302001953125,
-0.00804901123046875,
0.0116119384765625,
-0.0141448974609375,
0.0274200439453125,
-0.02044677734375,
-0.052886962890625,
0.05328369140625,
0.07110595703125,
-0.0011358261108398438,
0.060791015625,
-0.01233673095703125,
0.01061248779296875,
0.048980712890625,
-0.0003933906555175781,
0.00650787353515625,
-0.018768310546875,
0.016815185546875,
-0.0224151611328125,
0.0006880760192871094,
0.00878143310546875,
-0.0180816650390625,
0.01061248779296875,
0.0872802734375,
0.1015625,
-0.12103271484375,
0.01214599609375,
0.04876708984375,
0.0009946823120117188,
0.0028247833251953125,
-0.0177154541015625,
-0.01531219482421875,
-0.019683837890625,
0.0142974853515625,
-0.04052734375,
-0.046661376953125,
-0.012359619140625,
0.0021991729736328125,
0.0023059844970703125,
0.00691986083984375,
0.062744140625,
0.00897979736328125,
-0.0003495216369628906,
-0.029815673828125,
-0.00936126708984375,
0.00341796875,
-0.01201629638671875,
0.039825439453125,
-0.017486572265625,
-0.00972747802734375,
-0.07763671875,
-0.01132965087890625,
-0.00293731689453125,
-0.034942626953125,
0.0265960693359375,
0.01064300537109375,
0.005863189697265625,
0.048583984375,
-0.01274871826171875,
0.023468017578125,
0.0143585205078125,
-0.017059326171875,
-0.07513427734375,
-0.044158935546875,
-0.01526641845703125,
0.07489013671875,
0.007617950439453125,
0.040191650390625,
0.008514404296875,
-0.049835205078125,
-0.00075531005859375,
-0.0179443359375,
0.0740966796875,
-0.0465087890625,
-0.01078033447265625,
0.002933502197265625,
-0.0247650146484375,
0.01910400390625,
-0.007411956787109375,
-0.00673675537109375,
-0.040771484375,
-0.0224151611328125,
-0.0175933837890625,
-0.05377197265625,
-0.033599853515625,
-0.05877685546875,
-0.0400390625,
0.0791015625,
-0.0159454345703125,
0.0114898681640625,
0.01141357421875,
0.0295257568359375,
-0.007587432861328125,
0.027557373046875,
-0.0198516845703125,
0.01119232177734375,
0.0161285400390625,
0.0031585693359375,
-0.0202789306640625,
-0.006763458251953125,
-0.0128173828125,
0.045257568359375,
0.060546875,
0.0081024169921875,
-0.024169921875,
0.00600433349609375,
0.0673828125,
0.0312347412109375,
-0.0007481575012207031,
0.0261383056640625,
0.0084686279296875,
0.026153564453125,
0.042236328125,
-0.0245208740234375,
0.026092529296875,
-0.00968170166015625,
-0.0247802734375,
0.0255584716796875,
0.0231170654296875,
0.022216796875,
0.00867462158203125,
-0.0146636962890625,
-0.049713134765625,
0.003093719482421875,
0.03277587890625,
-0.01216888427734375,
-0.0204925537109375,
0.061492919921875,
0.0677490234375,
-0.06658935546875,
-0.00135040283203125,
-0.0482177734375,
0.0662841796875,
0.01117706298828125,
-0.001956939697265625,
0.043121337890625,
0.0092926025390625,
0.00811767578125,
-0.0196990966796875,
-0.009521484375,
-0.0181732177734375,
0.0188140869140625,
0.015960693359375,
0.0047607421875,
0.01328277587890625,
-0.0241851806640625,
0.01241302490234375,
0.03369140625,
0.0164794921875,
-0.029510498046875,
-0.07177734375,
0.0099334716796875,
-0.01052093505859375,
-0.0298309326171875,
0.039642333984375,
-0.0189208984375,
0.025970458984375,
0.059417724609375,
-0.036163330078125,
0.00887298583984375,
0.00894927978515625,
0.014862060546875,
-0.0181427001953125,
-0.01062774658203125,
-0.0174102783203125,
-0.0045928955078125,
-0.0552978515625,
-0.0049896240234375,
0.04595947265625,
0.037017822265625,
0.0118408203125,
0.0242156982421875,
0.0455322265625,
-0.00537872314453125,
-0.0034008026123046875,
0.03387451171875,
-0.002239227294921875,
0.0105133056640625,
-0.026763916015625,
-0.038238525390625,
-0.0107574462890625,
0.03497314453125,
0.003208160400390625,
0.0128173828125,
0.023284912109375,
0.00789642333984375,
-0.0296478271484375,
-0.0039520263671875,
0.0306854248046875,
-0.0230255126953125,
-0.0233917236328125,
-0.053436279296875,
-0.0157470703125,
-0.0091552734375,
-0.011993408203125,
0.016632080078125,
-0.002536773681640625,
0.0009832382202148438,
0.0006933212280273438,
0.027618408203125,
0.007232666015625,
-0.019439697265625,
0.01172637939453125,
-0.0002837181091308594,
0.055084228515625,
0.0266876220703125,
-0.07830810546875,
-0.0233917236328125,
-0.019805908203125,
-0.0802001953125,
0.054412841796875,
0.06634521484375,
-0.0137481689453125,
-0.0233001708984375,
-0.01503753662109375,
0.0284881591796875,
0.0232086181640625,
-0.0467529296875,
-0.01348876953125,
-0.009735107421875,
0.0213623046875,
0.0027294158935546875,
-0.05999755859375,
-0.039398193359375,
-0.04156494140625,
0.0219268798828125,
0.025665283203125,
0.05059814453125,
0.016845703125,
0.03900146484375,
-0.005931854248046875,
0.073486328125,
-0.055572509765625,
-0.0225677490234375,
0.02093505859375,
-0.004608154296875,
0.036468505859375,
-0.0020580291748046875,
-0.046112060546875,
0.0162353515625,
0.0582275390625,
-0.0219879150390625,
0.00788116455078125,
0.01439666748046875,
0.0214080810546875,
-0.05169677734375,
0.0369873046875,
-0.0165252685546875,
-0.041534423828125,
-0.02398681640625,
0.0028743743896484375,
0.006748199462890625,
0.02484130859375,
0.01357269287109375,
0.061737060546875,
-0.003154754638671875,
0.0033054351806640625,
0.0275726318359375,
-0.039459228515625,
0.0299224853515625,
0.035552978515625,
-0.036224365234375,
-0.0299224853515625,
0.019744873046875,
-0.0111846923828125,
0.00423431396484375,
0.020721435546875,
0.04705810546875,
0.0053863525390625,
-0.020843505859375,
0.01314544677734375,
-0.0102081298828125,
0.026214599609375,
-0.033538818359375,
-0.0004627704620361328,
0.02764892578125,
0.0024700164794921875,
-0.0059051513671875,
-0.016693115234375,
-0.0159149169921875,
-0.00965118408203125,
-0.0096588134765625,
0.005084991455078125,
0.00634765625,
-0.0423583984375,
-0.038970947265625,
0.00971221923828125,
-0.0019140243530273438,
-0.0205841064453125,
-0.02337646484375,
0.00881195068359375,
-0.0302886962890625,
0.05023193359375,
-0.047607421875,
-0.018829345703125,
0.0087432861328125,
0.01453399658203125,
-0.020294189453125,
0.005908966064453125,
-0.050018310546875,
-0.001979827880859375,
-0.0223541259765625,
0.013214111328125,
0.052001953125,
-0.0163726806640625,
-0.053955078125,
0.0077972412109375,
-0.0131683349609375,
0.05487060546875,
-0.0303192138671875,
-0.01557159423828125,
0.00971221923828125,
0.0234375,
-0.0269622802734375,
-0.06488037109375,
0.0013551712036132812,
-0.03558349609375,
0.0171661376953125,
0.032562255859375,
-0.014404296875,
0.0218353271484375,
-0.0251617431640625,
-0.054962158203125,
0.0190582275390625,
0.00763702392578125,
-0.032379150390625,
-0.041229248046875,
-0.004833221435546875,
0.006305694580078125,
0.0231475830078125,
0.0028228759765625,
-0.04608154296875,
-0.038482666015625,
0.01485443115234375,
-0.0036640167236328125,
0.033203125,
0.000457763671875,
0.00984954833984375,
-0.00849151611328125,
0.0106201171875,
0.00846099853515625,
-0.01708984375,
0.00969696044921875,
-0.0146636962890625,
0.0151214599609375,
0.018310546875,
-0.03289794921875,
-0.0357666015625,
-0.0222930908203125,
-0.0285797119140625,
-0.006458282470703125,
-0.0117340087890625,
-0.033050537109375,
-0.0153350830078125,
0.06646728515625,
0.043243408203125,
0.01174163818359375,
-0.019989013671875,
0.0242462158203125,
-0.033538818359375,
-0.06103515625,
-0.0003266334533691406,
0.0233001708984375,
-0.04034423828125,
0.01052093505859375,
0.02069091796875,
-0.005535125732421875,
-0.02911376953125,
-0.01165771484375,
-0.041717529296875,
-0.0172882080078125,
-0.0330810546875,
0.01349639892578125,
-0.054412841796875,
0.0172882080078125,
0.004150390625,
-0.018463134765625,
-0.00962066650390625,
-0.01568603515625,
-0.0028133392333984375,
-0.012481689453125,
-0.0242156982421875,
-0.037017822265625,
-0.0102386474609375,
-0.0148468017578125,
0.00006830692291259766,
-0.0081329345703125,
-0.0014600753784179688,
-0.01165008544921875,
0.02276611328125,
-0.0243682861328125,
0.0091552734375,
-0.004589080810546875,
0.001354217529296875,
0.00865936279296875,
0.00595855712890625,
0.00838470458984375,
-0.00905609130859375,
-0.0202789306640625,
0.05303955078125,
0.0008101463317871094,
0.0300750732421875,
-0.008697509765625,
0.011871337890625,
0.031646728515625,
-0.0330810546875,
0.0160980224609375,
0.0018587112426757812,
-0.01593017578125,
0.0007348060607910156,
-0.0189971923828125,
-0.017242431640625,
-0.02154541015625,
-0.0113372802734375
]
|
dd1f8f664159b9f9b72a4b3f924360238bb1e885 | Wordpress Stackexchange
Q: Retrieve featured image as object I want to retrieve the featured image of a post as an object (array) in order to have all image sizes available.
The get_the_post_thumbnail() function doesn't do this, any ideas?
A: First get the registered image sizes and the featured image attachment id:
$sizes = get_intermediate_image_sizes();
$post_thumbnail_id = get_post_thumbnail_id();
Loop through the registered sizes and create an array:
$images = array();
foreach ( $sizes as $size ) {
$images[] = wp_get_attachment_image_src( $post_thumbnail_id, $size );
}
Combined as a function to place inside functions.php:
function get_all_image_sizes($attachment_id = 0) {
$sizes = get_intermediate_image_sizes();
if(!$attachment_id) $attachment_id = get_post_thumbnail_id();
$images = array();
foreach ( $sizes as $size ) {
$images[] = wp_get_attachment_image_src( $attachment_id, $size );
}
return $images;
}
Usage:
$featured_image_sizes = get_all_image_sizes();
| Q: Retrieve featured image as object I want to retrieve the featured image of a post as an object (array) in order to have all image sizes available.
The get_the_post_thumbnail() function doesn't do this, any ideas?
A: First get the registered image sizes and the featured image attachment id:
$sizes = get_intermediate_image_sizes();
$post_thumbnail_id = get_post_thumbnail_id();
Loop through the registered sizes and create an array:
$images = array();
foreach ( $sizes as $size ) {
$images[] = wp_get_attachment_image_src( $post_thumbnail_id, $size );
}
Combined as a function to place inside functions.php:
function get_all_image_sizes($attachment_id = 0) {
$sizes = get_intermediate_image_sizes();
if(!$attachment_id) $attachment_id = get_post_thumbnail_id();
$images = array();
foreach ( $sizes as $size ) {
$images[] = wp_get_attachment_image_src( $attachment_id, $size );
}
return $images;
}
Usage:
$featured_image_sizes = get_all_image_sizes();
A: This is old, but the above answer isn't quite complete. To properly get all image sizes with all of the image attributes, you'd need to grab the attachment object as well.
Something like this:
if ( has_post_thumbnail() ) {
$thumb = array();
$thumb_id = get_post_thumbnail_id();
// first grab all of the info on the image... title/description/alt/etc.
$args = array(
'post_type' => 'attachment',
'include' => $thumb_id
);
$thumbs = get_posts( $args );
if ( $thumbs ) {
// now create the new array
$thumb['title'] = $thumbs[0]->post_title;
$thumb['description'] = $thumbs[0]->post_content;
$thumb['caption'] = $thumbs[0]->post_excerpt;
$thumb['alt'] = get_post_meta( $thumb_id, '_wp_attachment_image_alt', true );
$thumb['sizes'] = array(
'full' => wp_get_attachment_image_src( $thumb_id, 'full', false )
);
// add the additional image sizes
foreach ( get_intermediate_image_sizes() as $size ) {
$thumb['sizes'][$size] = wp_get_attachment_image_src( $thumb_id, $size, false );
}
} // end if
// display the 'custom-size' image
echo '<img src="' . $thumb['sizes']['custom-size'][0] . '" alt="' . $thumb['alt'] . '" title="' . $thumb['title'] . '" width="' . $thumb['sizes']['custom-size'][1] . '" height="' . $thumb['sizes']['custom-size'][2] . '" />';
} // end if
A: Ok another update to this after some years. I presume that you managed by now ;). But for those who would like to do this and return something that is consistent with - let's say - ACF image objects and allows you to easily populate sourcesets. You could do something like this in functions.php:
function get_all_image_sizes($attachment_id = 0) {
$sizes = get_intermediate_image_sizes();
if(!$attachment_id) $attachment_id = get_post_thumbnail_id();
$images = array();
foreach ( $sizes as $size ) {
$images[$size] = wp_get_attachment_image_src( $attachment_id, $size )[0];
}
$imageObject = array(
'sizes' => $images
);
return $imageObject;
}
And then you can use it like this
$thumbID = get_post_thumbnail_id();
$image = get_all_image_sizes($thumbID);
$html = '<img src="'. $image['sizes']['large'] .'" alt="">';
| wordpress | {
"language": "en",
"length": 412,
"provenance": "stackexchange_00019.jsonl.gz:450284",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167599"
} | [
0.031768798828125,
-0.043487548828125,
0.026641845703125,
-0.0167694091796875,
-0.010589599609375,
-0.018524169921875,
0.06964111328125,
-0.007083892822265625,
0.03753662109375,
0.0264129638671875,
-0.0192718505859375,
0.004779815673828125,
-0.033233642578125,
0.0001036524772644043,
-0.0416259765625,
-0.01432037353515625,
0.067138671875,
-0.029632568359375,
0.06561279296875,
0.023956298828125,
0.0047149658203125,
0.07958984375,
0.035736083984375,
0.07269287109375,
0.0234222412109375,
-0.0151519775390625,
0.043975830078125,
-0.01113128662109375,
0.0022125244140625,
-0.01409149169921875,
0.014495849609375,
0.0165863037109375,
0.007701873779296875,
0.021636962890625,
0.00620269775390625,
-0.0019130706787109375,
0.0247039794921875,
-0.01047515869140625,
0.0096282958984375,
0.0195465087890625,
0.00262451171875,
0.0189056396484375,
0.0027713775634765625,
0.02593994140625,
-0.033935546875,
-0.0167388916015625,
-0.0167999267578125,
-0.032470703125,
0.0212860107421875,
0.0128173828125,
0.007022857666015625,
0.01064300537109375,
0.0258331298828125,
-0.03387451171875,
-0.006069183349609375,
-0.0006361007690429688,
-0.0238494873046875,
0.07611083984375,
0.043121337890625,
-0.0293426513671875,
-0.07177734375,
-0.01012420654296875,
0.0286712646484375,
-0.0255126953125,
0.004486083984375,
-0.005825042724609375,
0.0026340484619140625,
0.0130615234375,
-0.043060302734375,
-0.0252838134765625,
0.0164337158203125,
-0.030426025390625,
-0.01244354248046875,
-0.0184326171875,
0.00891876220703125,
0.0006260871887207031,
-0.02117919921875,
-0.036102294921875,
0.001674652099609375,
0.01308441162109375,
0.021484375,
-0.030853271484375,
-0.041290283203125,
0.0357666015625,
0.003719329833984375,
0.07342529296875,
0.003993988037109375,
-0.0301666259765625,
-0.0290069580078125,
-0.024810791015625,
-0.0139007568359375,
-0.03582763671875,
-0.048187255859375,
0.042205810546875,
0.006191253662109375,
-0.029510498046875,
0.0384521484375,
0.025238037109375,
-0.00922393798828125,
0.00714874267578125,
0.0037822723388671875,
-0.054840087890625,
0.0267486572265625,
-0.032257080078125,
0.0140380859375,
-0.00418853759765625,
-0.02862548828125,
-0.03790283203125,
0.033935546875,
0.04339599609375,
0.0035724639892578125,
0.0157012939453125,
0.005626678466796875,
0.0000407099723815918,
0.00766754150390625,
0.0008325576782226562,
-0.035400390625,
0.02545166015625,
-0.00925445556640625,
-0.006885528564453125,
0.02862548828125,
0.01346588134765625,
0.062103271484375,
-0.040557861328125,
0.00724029541015625,
0.0094146728515625,
-0.0552978515625,
-0.050384521484375,
0.0220184326171875,
0.0374755859375,
-0.0256195068359375,
0.007785797119140625,
0.0207672119140625,
-0.0218505859375,
-0.0207672119140625,
-0.0189666748046875,
0.002056121826171875,
-0.0160064697265625,
0.0081787109375,
-0.006534576416015625,
0.0200653076171875,
-0.0201873779296875,
0.0296783447265625,
0.005649566650390625,
-0.0033893585205078125,
-0.005279541015625,
0.01580810546875,
0.040283203125,
-0.0007529258728027344,
-0.04815673828125,
0.038909912109375,
-0.017822265625,
0.0152587890625,
0.03277587890625,
0.020599365234375,
0.00951385498046875,
0.09588623046875,
-0.037445068359375,
-0.023529052734375,
-0.058258056640625,
0.0167999267578125,
-0.0105438232421875,
-0.021942138671875,
-0.005462646484375,
-0.0194244384765625,
0.0070343017578125,
-0.0013437271118164062,
0.01192474365234375,
0.0241241455078125,
0.0599365234375,
0.01042938232421875,
-0.034149169921875,
0.0030345916748046875,
0.01094818115234375,
-0.021209716796875,
0.01171875,
0.005985260009765625,
-0.0223236083984375,
0.025787353515625,
0.0433349609375,
-0.0164794921875,
-0.03228759765625,
0.0277252197265625,
-0.033477783203125,
-0.00836944580078125,
-0.0026454925537109375,
-0.00028634071350097656,
-0.0093994140625,
0.0167388916015625,
0.004150390625,
0.004669189453125,
0.009674072265625,
-0.07208251953125,
0.036285400390625,
-0.0032901763916015625,
0.01137542724609375,
-0.01354217529296875,
0.00626373291015625,
-0.00469970703125,
-0.021697998046875,
0.049652099609375,
-0.021820068359375,
0.0212249755859375,
-0.018829345703125,
-0.0289306640625,
-0.01273345947265625,
0.0005207061767578125,
0.00974273681640625,
-0.05645751953125,
0.0496826171875,
0.034210205078125,
0.0343017578125,
-0.064208984375,
0.03271484375,
0.04571533203125,
0.022216796875,
-0.005588531494140625,
-0.006740570068359375,
-0.017181396484375,
0.041473388671875,
-0.0513916015625,
0.0012693405151367188,
-0.05914306640625,
0.006748199462890625,
0.06512451171875,
0.030670166015625,
-0.0236053466796875,
-0.007537841796875,
0.044403076171875,
0.03485107421875,
-0.0732421875,
0.00832366943359375,
-0.025360107421875,
0.0029163360595703125,
-0.002105712890625,
0.0022792816162109375,
0.0222930908203125,
-0.06756591796875,
0.025115966796875,
0.038055419921875,
0.03607177734375,
0.04925537109375,
-0.00081634521484375,
0.00040459632873535156,
0.09698486328125,
0.0240478515625,
0.024688720703125,
-0.0258636474609375,
-0.0264129638671875,
-0.0140228271484375,
0.01528167724609375,
0.0080413818359375,
0.0264892578125,
-0.0204010009765625,
0.01314544677734375,
0.044281005859375,
-0.00017821788787841797,
0.0234375,
-0.052886962890625,
0.060028076171875,
-0.0169219970703125,
0.037353515625,
0.027618408203125,
-0.01515960693359375,
0.000016391277313232422,
0.04229736328125,
0.0150146484375,
0.004695892333984375,
-0.028289794921875,
0.035369873046875,
0.0028018951416015625,
-0.02935791015625,
-0.0045623779296875,
0.031402587890625,
-0.00848388671875,
-0.02581787109375,
-0.0127410888671875,
0.01276397705078125,
-0.0275726318359375,
-0.01262664794921875,
0.002635955810546875,
0.0189056396484375,
-0.0097503662109375,
0.0014896392822265625,
-0.0012865066528320312,
-0.04583740234375,
0.01461029052734375,
0.034515380859375,
0.0097198486328125,
0.0250244140625,
0.0141754150390625,
0.062347412109375,
0.004405975341796875,
0.054443359375,
-0.0138702392578125,
0.0287628173828125,
-0.0048370361328125,
-0.049072265625,
0.04632568359375,
-0.034759521484375,
0.06842041015625,
0.07720947265625,
-0.03192138671875,
0.042633056640625,
0.0042266845703125,
-0.032379150390625,
0.00009578466415405273,
0.0119476318359375,
-0.007053375244140625,
-0.0071258544921875,
-0.066162109375,
0.0377197265625,
0.0253753662109375,
0.06475830078125,
-0.0206451416015625,
-0.047027587890625,
0.0017299652099609375,
0.03521728515625,
-0.09228515625,
-0.08941650390625,
0.00272369384765625,
-0.074462890625,
-0.035614013671875,
-0.01255035400390625,
-0.06024169921875,
0.0249786376953125,
0.011932373046875,
-0.004730224609375,
0.0127105712890625,
0.00930023193359375,
-0.0308837890625,
-0.0029144287109375,
-0.0540771484375,
-0.016082763671875,
-0.01064300537109375,
0.01306915283203125,
0.006298065185546875,
-0.00812530517578125,
-0.0018777847290039062,
-0.006488800048828125,
0.014739990234375,
0.06353759765625,
-0.0032558441162109375,
-0.0271453857421875,
-0.0128021240234375,
0.02032470703125,
-0.060302734375,
0.00806427001953125,
0.00545501708984375,
0.019775390625,
-0.03118896484375,
0.0135955810546875,
-0.0089263916015625,
-0.0247344970703125,
0.01079559326171875,
0.068115234375,
-0.002605438232421875,
0.0218505859375,
0.08294677734375,
-0.035003662109375,
-0.0198974609375,
-0.032318115234375,
-0.0531005859375,
0.01175689697265625,
0.034759521484375,
0.01367950439453125,
-0.0120849609375,
0.00553131103515625,
0.0143890380859375,
-0.00237274169921875,
-0.005092620849609375,
-0.023223876953125,
0.052947998046875,
0.025665283203125,
0.035247802734375,
-0.0207061767578125,
0.006381988525390625,
-0.0012693405151367188,
0.03125,
0.00811767578125,
0.03497314453125,
-0.00910186767578125,
0.013702392578125,
-0.054656982421875,
-0.0281524658203125,
0.03875732421875,
0.00612640380859375,
0.036468505859375,
-0.022216796875,
-0.04351806640625,
0.0004017353057861328,
0.0850830078125,
-0.0087738037109375,
-0.024688720703125,
-0.0467529296875,
-0.0121002197265625,
-0.0121002197265625,
-0.0187835693359375,
-0.01104736328125,
0.00989532470703125,
-0.056854248046875,
-0.00939178466796875,
-0.003299713134765625,
-0.033233642578125,
-0.012908935546875,
0.0281524658203125,
-0.05328369140625,
-0.021026611328125,
0.025726318359375,
-0.0010576248168945312,
0.0107574462890625,
0.034332275390625,
-0.00901031494140625,
0.0294342041015625,
-0.035186767578125,
-0.0104522705078125,
-0.0750732421875,
-0.01404571533203125,
0.0208282470703125,
0.060546875,
-0.037353515625,
0.0206146240234375,
-0.032470703125,
0.04913330078125,
-0.0114288330078125,
0.01904296875,
0.0045928955078125,
0.032073974609375,
-0.0209197998046875,
-0.01861572265625,
0.01104736328125,
-0.04412841796875,
-0.006855010986328125,
-0.062347412109375,
-0.050323486328125,
-0.06500244140625,
-0.0438232421875,
0.021728515625,
-0.0173187255859375,
0.0003921985626220703,
0.0073394775390625,
0.005001068115234375,
0.0496826171875,
0.056884765625,
0.01149749755859375,
-0.00006467103958129883,
-0.0225677490234375,
0.01010894775390625,
0.0256805419921875,
0.053466796875,
-0.024261474609375,
0.0144500732421875,
0.0518798828125,
0.015899658203125,
-0.042022705078125,
-0.116455078125,
-0.0007691383361816406,
0.05450439453125,
0.0301361083984375,
0.01274871826171875,
0.03515625,
-0.041839599609375,
-0.005710601806640625,
0.0631103515625,
-0.00989532470703125,
0.0031032562255859375,
0.03564453125,
0.01611328125,
0.00794219970703125,
-0.02545166015625,
0.006725311279296875,
0.0149078369140625,
0.007904052734375,
0.00206756591796875,
-0.027679443359375,
0.00553131103515625,
0.0159759521484375,
-0.0135040283203125,
0.03448486328125,
0.0078582763671875,
-0.01959228515625,
0.004795074462890625,
0.0009636878967285156,
0.045013427734375,
0.040374755859375,
-0.0149688720703125,
0.0225982666015625,
0.03594970703125,
0.0113983154296875,
0.01953125,
0.001903533935546875,
0.020965576171875,
0.037841796875,
0.0029582977294921875,
0.025115966796875,
0.0037288665771484375,
0.0137176513671875,
-0.04107666015625,
-0.028472900390625,
-0.050537109375,
-0.035614013671875,
-0.002735137939453125,
0.0238800048828125,
0.0186920166015625,
-0.02947998046875,
0.059112548828125,
0.038238525390625,
-0.0032672882080078125,
-0.039581298828125,
-0.06427001953125,
0.00626373291015625,
-0.06170654296875,
0.004673004150390625,
-0.00527191162109375,
-0.0130615234375,
0.0161895751953125,
0.0335693359375,
-0.04925537109375,
0.042633056640625,
0.005489349365234375,
0.027984619140625,
-0.00614166259765625,
0.03546142578125,
-0.00008237361907958984,
0.03289794921875,
-0.01165771484375,
0.0250244140625,
0.01055908203125,
-0.0193939208984375,
0.0167694091796875,
0.0167388916015625,
0.0277557373046875,
-0.03826904296875,
-0.03961181640625,
0.042083740234375,
-0.019805908203125,
-0.0118560791015625,
0.022705078125,
-0.0260009765625,
-0.072265625,
0.0026569366455078125,
0.0244598388671875,
0.033660888671875,
-0.0276641845703125,
-0.02130126953125,
-0.01337432861328125,
0.002429962158203125,
-0.01374053955078125,
-0.034515380859375,
-0.06829833984375,
0.037750244140625,
0.05096435546875,
-0.046783447265625,
-0.0234832763671875,
-0.012939453125,
0.009033203125,
-0.0033893585205078125,
-0.020477294921875,
-0.0350341796875,
0.043182373046875,
-0.037017822265625,
0.0301361083984375,
-0.0198211669921875,
-0.00940704345703125,
-0.057861328125,
0.0163116455078125,
0.0408935546875,
0.0462646484375,
-0.0236358642578125,
-0.0036067962646484375,
-0.013702392578125,
0.01039886474609375,
0.1142578125,
0.0017795562744140625,
-0.01532745361328125,
-0.0555419921875,
-0.0014019012451171875,
0.0169830322265625,
0.00884246826171875,
0.01332855224609375,
0.00795745849609375,
0.00565338134765625,
-0.0196990966796875,
0.0233612060546875,
0.00534820556640625,
0.0031871795654296875,
0.02532958984375,
0.025238037109375,
0.004947662353515625,
-0.01947021484375,
-0.0305328369140625,
-0.00823974609375,
-0.046234130859375,
-0.059112548828125,
0.04248046875,
0.0516357421875,
-0.0017614364624023438,
-0.00612640380859375,
-0.0096588134765625,
0.03912353515625,
-0.0179290771484375,
-0.02435302734375,
-0.0107879638671875,
-0.0498046875,
0.056121826171875,
-0.019439697265625,
0.0122528076171875,
-0.0550537109375,
-0.0504150390625,
-0.028564453125,
-0.0014286041259765625,
-0.005947113037109375,
0.0228729248046875,
-0.03607177734375,
-0.00930023193359375,
0.055023193359375,
0.0146026611328125,
-0.0020847320556640625,
0.060516357421875,
0.00885772705078125,
0.039093017578125,
0.0124053955078125,
0.00968170166015625,
0.00408172607421875,
0.0222015380859375,
-0.017547607421875,
-0.0287933349609375,
0.049102783203125,
0.023712158203125,
0.00711822509765625,
0.03778076171875,
-0.01447296142578125,
0.0205078125,
-0.0693359375,
0.014739990234375,
0.045745849609375,
0.02618408203125,
0.0058135986328125,
-0.036407470703125,
0.041046142578125,
-0.0012264251708984375,
0.026336669921875,
0.028106689453125,
0.0047607421875,
0.0009632110595703125,
-0.0273284912109375,
-0.021026611328125,
-0.01446533203125,
-0.01346588134765625,
-0.0032825469970703125,
-0.00652313232421875,
0.00931549072265625,
-0.06658935546875,
0.00634002685546875,
0.051605224609375,
-0.03485107421875,
-0.016021728515625,
0.033660888671875,
-0.0462646484375,
0.006256103515625,
-0.02960205078125,
-0.007755279541015625,
-0.005496978759765625,
-0.0048065185546875,
0.0111846923828125,
0.0143890380859375,
0.01812744140625,
0.040771484375,
-0.0052032470703125,
0.01256561279296875,
0.01861572265625,
-0.03289794921875,
0.0196685791015625,
-0.001590728759765625,
0.00513458251953125,
0.0231170654296875,
-0.039215087890625,
0.0096893310546875,
-0.0382080078125,
0.03033447265625,
-0.00865936279296875,
-0.0245361328125,
0.0458984375,
-0.0272369384765625,
-0.01142120361328125,
0.0300445556640625,
0.04150390625,
-0.0183868408203125,
-0.0187835693359375,
0.047607421875,
-0.0362548828125,
-0.0009622573852539062,
0.010955810546875,
0.0189056396484375,
-0.012176513671875,
-0.0269317626953125,
-0.0265350341796875,
0.04876708984375,
-0.037689208984375,
0.024444580078125,
0.0308837890625,
0.00746917724609375,
0.011505126953125,
0.00525665283203125,
-0.0167694091796875,
-0.00035071372985839844,
-0.066162109375,
0.02740478515625,
-0.0153656005859375,
0.02532958984375,
-0.0008096694946289062,
0.006805419921875,
0.039093017578125,
0.0007910728454589844,
-0.055206298828125,
-0.034698486328125,
0.0380859375,
0.05157470703125,
0.033447265625,
0.027313232421875,
-0.0198974609375,
-0.006954193115234375,
0.040557861328125,
-0.0208282470703125,
0.00937652587890625,
0.034149169921875,
-0.0271148681640625,
0.016326904296875,
0.01491546630859375,
0.0262451171875,
0.0227203369140625,
0.030303955078125,
-0.0631103515625,
0.0242462158203125,
0.0633544921875,
-0.055419921875,
0.046295166015625,
0.01898193359375,
0.045806884765625,
0.0016355514526367188,
-0.00934600830078125,
0.0008025169372558594,
0.049041748046875,
0.002490997314453125,
0.01201629638671875,
0.008819580078125,
0.007549285888671875,
0.050323486328125,
-0.0167694091796875,
-0.00522613525390625,
0.0256500244140625,
-0.0010318756103515625,
0.00785064697265625,
0.0099029541015625,
0.0166473388671875,
-0.06903076171875,
-0.05035400390625,
0.06109619140625,
0.0443115234375,
-0.0233154296875,
-0.036468505859375,
0.01004791259765625,
0.025634765625,
0.0281982421875,
0.0012483596801757812,
0.0263519287109375,
-0.04150390625,
0.0272064208984375,
-0.037811279296875,
0.003204345703125,
0.04498291015625,
0.03192138671875,
0.003559112548828125,
-0.023223876953125,
-0.044891357421875,
-0.005664825439453125,
-0.019622802734375,
-0.00820159912109375,
0.00435638427734375,
0.0208587646484375,
0.0077972412109375,
0.049957275390625,
-0.0019330978393554688,
0.00476837158203125,
-0.0155181884765625,
0.03759765625,
0.004390716552734375,
0.027587890625,
-0.00556182861328125,
-0.0097503662109375,
0.004993438720703125,
0.00981903076171875,
0.016632080078125,
-0.028106689453125,
0.038726806640625,
0.0223846435546875,
-0.09100341796875,
-0.017181396484375,
0.038421630859375,
-0.027557373046875,
0.00406646728515625,
-0.02935791015625,
0.00199127197265625,
0.02911376953125,
-0.01885986328125,
0.01517486572265625,
-0.03363037109375,
0.059906005859375,
-0.029296875,
0.051544189453125,
-0.01192474365234375,
-0.01102447509765625,
0.017669677734375,
-0.030364990234375,
0.052337646484375,
-0.01519775390625,
-0.0953369140625,
-0.00849151611328125,
-0.056304931640625,
-0.044525146484375,
0.0357666015625,
0.02996826171875,
-0.01483154296875,
0.0241241455078125,
0.01519775390625,
-0.0264739990234375,
0.0278472900390625,
-0.00909423828125,
0.0171356201171875,
0.0010738372802734375,
0.01153564453125,
0.0003571510314941406,
-0.043212890625,
-0.032562255859375,
-0.0036334991455078125,
0.02545166015625,
0.01125335693359375,
0.009979248046875,
0.0093841552734375,
0.0216522216796875,
-0.036224365234375,
0.016204833984375,
-0.049591064453125,
-0.0380859375,
0.0298004150390625,
-0.0238037109375,
-0.01490020751953125,
0.00508880615234375,
-0.0169219970703125,
-0.004302978515625,
0.039886474609375,
-0.019073486328125,
-0.03564453125,
0.00543212890625,
0.02783203125,
0.01800537109375,
0.03271484375,
-0.0306396484375,
-0.03961181640625,
-0.043426513671875,
-0.032958984375,
0.0029296875,
0.00330352783203125,
0.05401611328125,
0.0097198486328125,
0.01444244384765625,
-0.029144287109375,
0.05224609375,
-0.031829833984375,
0.06292724609375,
0.043060302734375,
-0.034637451171875,
-0.0186309814453125,
-0.004489898681640625,
-0.00428009033203125,
-0.0237579345703125,
0.016571044921875,
0.0322265625,
-0.0175933837890625,
0.0163116455078125,
0.0164337158203125,
0.0264892578125,
0.0277252197265625,
-0.0206756591796875,
-0.002685546875,
0.026611328125,
-0.0119476318359375,
-0.034027099609375,
0.0011386871337890625,
0.00238800048828125,
-0.04052734375,
-0.026641845703125,
0.00788116455078125,
-0.016845703125,
0.004497528076171875,
0.0186614990234375,
-0.022796630859375,
0.01503753662109375,
0.005306243896484375,
-0.028472900390625,
0.003849029541015625,
0.00875091552734375,
0.00861358642578125,
-0.00927734375,
-0.0394287109375,
0.01776123046875,
0.04425048828125,
-0.00748443603515625,
-0.0250244140625,
-0.0297088623046875,
-0.01137542724609375,
-0.018890380859375,
0.0477294921875,
0.037109375,
-0.04296875,
-0.00039267539978027344,
0.06768798828125,
0.04217529296875,
0.11151123046875,
-0.0340576171875,
-0.03570556640625,
-0.0081939697265625,
0.01319122314453125,
0.01285552978515625,
-0.056304931640625,
0.006473541259765625,
-0.064208984375,
-0.0005125999450683594,
-0.0394287109375,
0.0119171142578125,
0.007720947265625,
-0.031494140625,
-0.05810546875,
0.072509765625,
-0.02825927734375,
-0.0170135498046875,
-0.06463623046875,
0.00939178466796875,
0.01666259765625,
0.025360107421875,
-0.0145416259765625,
0.0029449462890625,
-0.04071044921875,
0.027099609375,
0.0192718505859375,
-0.06134033203125,
0.0811767578125,
-0.024017333984375,
-0.05712890625,
-0.009552001953125,
0.0002741813659667969,
-0.02105712890625,
-0.0081024169921875,
0.00919342041015625,
0.03045654296875,
0.03826904296875,
-0.01251220703125,
0.007701873779296875,
-0.00013327598571777344,
-0.029510498046875,
-0.0325927734375,
0.0014801025390625,
-0.0038089752197265625,
0.01540374755859375,
0.06353759765625,
0.0479736328125,
0.00920867919921875,
-0.042510986328125,
0.0152435302734375,
0.0036449432373046875,
-0.0450439453125,
-0.026580810546875,
0.0272369384765625,
-0.08575439453125,
-0.0301666259765625,
0.0127410888671875,
-0.004909515380859375,
-0.004802703857421875,
-0.032470703125,
-0.051055908203125,
-0.01141357421875,
-0.048187255859375,
0.0205078125,
-0.0399169921875,
0.051239013671875,
-0.014068603515625,
-0.020660400390625,
-0.0163116455078125,
-0.029815673828125,
-0.01190185546875,
-0.006488800048828125,
-0.03826904296875,
-0.0258331298828125,
0.040771484375,
-0.006519317626953125,
-0.006145477294921875,
0.01641845703125,
-0.042694091796875,
0.0143585205078125,
0.043487548828125,
-0.0036067962646484375,
0.0239715576171875,
0.00533294677734375,
0.0325927734375,
0.0159759521484375,
0.020294189453125,
0.00855255126953125,
-0.005130767822265625,
-0.015869140625,
0.0164794921875,
-0.01398468017578125,
0.0205535888671875,
-0.0035266876220703125,
-0.00981903076171875,
0.034210205078125,
-0.016845703125,
0.006565093994140625,
0.0253753662109375,
-0.02789306640625,
0.01236724853515625,
-0.016143798828125,
0.01934814453125,
-0.01520538330078125,
-0.00665283203125
]
|
ed201871c67b28cb9a5cfe5cc57798c480c79c6c | Wordpress Stackexchange
Q: Adding Field to Profile "Name" I am trying to add an extra field or two underneath the "Name" or "About" section in the Wordpress user profile. So far I have only been able to accomplish this by:
//Begin
add_action('profile_personal_options',function(){
ob_start();
});
//Grab Contents and Inject
add_action('show_user_profile',function($user){
$contents = ob_get_contents();
ob_end_clean();
echo str_replace('<label for="description','!!!!!<label for="description',$contents);
});
But this seems like a dirty hack - what is the right way to accomplish this?
A: check out my older article
HOW TO ADD WORDPRESS AUTHOR BIO & PROFILE PAGE
https://phirebase.com/blog/how-to-add-author-bio-profile-page/
just short example to add Twitter and Facebook fields:
function my_new_contactmethods( $contactmethods ) {
// Add Twitter
$contactmethods['twitter'] = 'Twitter';
//Add Facebook
$contactmethods['facebook'] = 'Facebook';
return $contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
Single loop
<?php the_author_meta('facebook'); ?>
– show facebook name
<?php the_author_meta('twitter'); ?>
– show twitter name
Author page
<?php echo $curauth->facebook; ?>
– show facebook name
<?php echo $curauth->twitter; ?>
– show twitter name
| Q: Adding Field to Profile "Name" I am trying to add an extra field or two underneath the "Name" or "About" section in the Wordpress user profile. So far I have only been able to accomplish this by:
//Begin
add_action('profile_personal_options',function(){
ob_start();
});
//Grab Contents and Inject
add_action('show_user_profile',function($user){
$contents = ob_get_contents();
ob_end_clean();
echo str_replace('<label for="description','!!!!!<label for="description',$contents);
});
But this seems like a dirty hack - what is the right way to accomplish this?
A: check out my older article
HOW TO ADD WORDPRESS AUTHOR BIO & PROFILE PAGE
https://phirebase.com/blog/how-to-add-author-bio-profile-page/
just short example to add Twitter and Facebook fields:
function my_new_contactmethods( $contactmethods ) {
// Add Twitter
$contactmethods['twitter'] = 'Twitter';
//Add Facebook
$contactmethods['facebook'] = 'Facebook';
return $contactmethods;
}
add_filter('user_contactmethods','my_new_contactmethods',10,1);
Single loop
<?php the_author_meta('facebook'); ?>
– show facebook name
<?php the_author_meta('twitter'); ?>
– show twitter name
Author page
<?php echo $curauth->facebook; ?>
– show facebook name
<?php echo $curauth->twitter; ?>
– show twitter name
| wordpress | {
"language": "en",
"length": 151,
"provenance": "stackexchange_00019.jsonl.gz:450301",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167668"
} | [
0.04071044921875,
-0.0046234130859375,
-0.002849578857421875,
-0.062042236328125,
-0.0072479248046875,
-0.004947662353515625,
-0.0179290771484375,
-0.01531982421875,
-0.048614501953125,
0.017425537109375,
-0.0236358642578125,
0.041778564453125,
-0.036102294921875,
-0.01556396484375,
0.01654052734375,
-0.041778564453125,
0.00909423828125,
0.018951416015625,
0.0275726318359375,
0.01026153564453125,
-0.0025844573974609375,
0.015289306640625,
0.013885498046875,
-0.09197998046875,
0.014434814453125,
-0.0535888671875,
0.07769775390625,
-0.035919189453125,
0.0268402099609375,
-0.013824462890625,
0.0131683349609375,
-0.004425048828125,
0.0086822509765625,
0.04541015625,
-0.045562744140625,
0.01654052734375,
0.033111572265625,
0.00560760498046875,
-0.0006289482116699219,
0.049530029296875,
0.026336669921875,
-0.0160369873046875,
-0.044647216796875,
-0.009368896484375,
-0.0089111328125,
-0.06744384765625,
0.045013427734375,
-0.0299530029296875,
0.0138397216796875,
0.0038204193115234375,
-0.00672149658203125,
0.00015270709991455078,
0.0012102127075195312,
-0.00548553466796875,
-0.0001475811004638672,
-0.01308441162109375,
-0.01837158203125,
-0.0202789306640625,
0.0195159912109375,
0.00606536865234375,
0.0013761520385742188,
-0.003261566162109375,
0.0059814453125,
-0.0076751708984375,
0.006103515625,
-0.0197601318359375,
-0.01497650146484375,
0.01947021484375,
-0.02972412109375,
-0.00007534027099609375,
0.018524169921875,
-0.020599365234375,
-0.01788330078125,
-0.01113128662109375,
-0.01378631591796875,
-0.0029430389404296875,
-0.0285491943359375,
-0.050537109375,
0.02740478515625,
0.0213165283203125,
-0.044921875,
-0.0298614501953125,
-0.0157318115234375,
-0.004947662353515625,
-0.0081024169921875,
0.01983642578125,
-0.0233306884765625,
0.007251739501953125,
-0.0173492431640625,
0.0138397216796875,
-0.01525115966796875,
-0.08197021484375,
-0.00373077392578125,
0.049774169921875,
0.0211944580078125,
-0.005474090576171875,
0.0166778564453125,
0.025726318359375,
0.001308441162109375,
-0.01202392578125,
0.032501220703125,
-0.049713134765625,
0.0258636474609375,
-0.0277252197265625,
0.0084686279296875,
0.07904052734375,
-0.017974853515625,
0.0154571533203125,
0.031005859375,
0.032867431640625,
0.037841796875,
-0.036590576171875,
0.00814056396484375,
0.0089111328125,
-0.032501220703125,
-0.0167694091796875,
-0.022003173828125,
0.01261138916015625,
-0.0090789794921875,
0.0144195556640625,
-0.0106201171875,
0.002349853515625,
-0.04132080078125,
-0.001148223876953125,
0.031463623046875,
-0.00008380413055419922,
-0.006732940673828125,
0.024749755859375,
-0.036102294921875,
0.0086517333984375,
-0.0197601318359375,
0.036529541015625,
0.05194091796875,
0.018768310546875,
-0.01148223876953125,
-0.0104827880859375,
0.00783538818359375,
-0.032196044921875,
-0.0223541259765625,
0.061798095703125,
-0.033416748046875,
-0.060333251953125,
0.017181396484375,
-0.0233154296875,
-0.01305389404296875,
0.0123443603515625,
0.0161590576171875,
0.00904083251953125,
-0.0010528564453125,
-0.0111236572265625,
-0.044036865234375,
0.005741119384765625,
0.0035552978515625,
0.01129150390625,
0.01617431640625,
0.006183624267578125,
0.026947021484375,
-0.022796630859375,
0.0042724609375,
-0.0102081298828125,
0.0228729248046875,
-0.0223541259765625,
-0.0203704833984375,
-0.061279296875,
-0.06781005859375,
0.009307861328125,
-0.037353515625,
-0.0160064697265625,
0.003993988037109375,
-0.01165771484375,
-0.005542755126953125,
0.034515380859375,
0.0243682861328125,
-0.0071258544921875,
-0.0128936767578125,
-0.01534271240234375,
0.01230621337890625,
0.06640625,
0.01305389404296875,
-0.0073089599609375,
-0.0252838134765625,
-0.031646728515625,
0.09814453125,
-0.045013427734375,
-0.069091796875,
0.06591796875,
-0.001003265380859375,
0.055450439453125,
0.01534271240234375,
-0.00803375244140625,
0.044769287109375,
0.0494384765625,
-0.03143310546875,
-0.0123443603515625,
-0.013763427734375,
-0.0206298828125,
0.023834228515625,
0.0005421638488769531,
-0.0047760009765625,
0.02764892578125,
-0.01580810546875,
0.0096893310546875,
0.006755828857421875,
-0.008880615234375,
-0.07708740234375,
0.01751708984375,
-0.0413818359375,
0.049041748046875,
-0.00348663330078125,
-0.00788116455078125,
0.00852203369140625,
-0.037689208984375,
0.00861358642578125,
0.002773284912109375,
-0.017974853515625,
-0.00012421607971191406,
-0.011810302734375,
-0.005443572998046875,
0.005542755126953125,
-0.00946807861328125,
0.0252838134765625,
-0.0003635883331298828,
0.0263824462890625,
0.03082275390625,
0.056793212890625,
-0.0266571044921875,
-0.02496337890625,
-0.05084228515625,
0.02117919921875,
-0.0177001953125,
-0.038818359375,
0.0859375,
0.00688934326171875,
-0.0211944580078125,
-0.046356201171875,
0.026641845703125,
0.0037841796875,
-0.016387939453125,
-0.0086822509765625,
0.0296478271484375,
0.03802490234375,
-0.004180908203125,
0.0154571533203125,
0.0276031494140625,
0.047607421875,
0.04803466796875,
0.054290771484375,
-0.03485107421875,
0.02410888671875,
0.060028076171875,
-0.032257080078125,
0.0038700103759765625,
0.0022907257080078125,
-0.1243896484375,
0.0289306640625,
0.047210693359375,
-0.033935546875,
0.00041747093200683594,
-0.00823211669921875,
-0.023681640625,
0.00606536865234375,
-0.05218505859375,
-0.0201568603515625,
-0.0162353515625,
0.036651611328125,
0.0011119842529296875,
0.037200927734375,
0.0198211669921875,
-0.0164794921875,
-0.01451873779296875,
0.0180206298828125,
0.0243988037109375,
-0.00909423828125,
-0.011871337890625,
-0.043182373046875,
0.02093505859375,
-0.0191802978515625,
0.03692626953125,
-0.043304443359375,
-0.01348876953125,
0.0187530517578125,
0.026580810546875,
0.020843505859375,
-0.00010639429092407227,
0.010528564453125,
0.0026569366455078125,
0.0025157928466796875,
0.004375457763671875,
0.0183563232421875,
-0.0123138427734375,
0.0123138427734375,
0.003635406494140625,
-0.0232086181640625,
0.032318115234375,
-0.01262664794921875,
-0.032440185546875,
-0.006500244140625,
-0.04241943359375,
0.051666259765625,
-0.04901123046875,
-0.00203704833984375,
0.0565185546875,
-0.0235595703125,
0.0252227783203125,
-0.001251220703125,
-0.06390380859375,
-0.0809326171875,
0.0819091796875,
0.0261383056640625,
-0.07952880859375,
0.04473876953125,
0.08392333984375,
0.0251617431640625,
0.01293182373046875,
0.01678466796875,
-0.00295257568359375,
-0.00665283203125,
0.0269317626953125,
-0.028472900390625,
-0.0511474609375,
-0.01190948486328125,
-0.080078125,
-0.0120086669921875,
-0.012451171875,
-0.0582275390625,
0.002544403076171875,
0.024017333984375,
-0.0023593902587890625,
-0.0091705322265625,
-0.0361328125,
-0.05633544921875,
-0.047607421875,
-0.06610107421875,
-0.0009756088256835938,
-0.00463104248046875,
0.010040283203125,
0.0013704299926757812,
0.02642822265625,
-0.00925445556640625,
-0.01226043701171875,
0.00930023193359375,
-0.00200653076171875,
0.01617431640625,
-0.01141357421875,
-0.004955291748046875,
-0.0208740234375,
0.0092315673828125,
-0.00852203369140625,
-0.01300811767578125,
0.024505615234375,
-0.01372528076171875,
0.003604888916015625,
-0.0016641616821289062,
-0.03955078125,
0.027130126953125,
0.0145721435546875,
-0.01873779296875,
0.005702972412109375,
0.06927490234375,
-0.037750244140625,
-0.0043487548828125,
0.0208740234375,
-0.0015735626220703125,
0.01055145263671875,
-0.029937744140625,
-0.0017709732055664062,
0.00849151611328125,
0.0285797119140625,
0.03515625,
0.04278564453125,
0.02874755859375,
0.01000213623046875,
-0.01837158203125,
-0.01476287841796875,
-0.01537322998046875,
-0.028839111328125,
-0.0165863037109375,
-0.041748046875,
-0.00603485107421875,
-0.0215606689453125,
-0.013153076171875,
-0.0180206298828125,
0.0304412841796875,
-0.01128387451171875,
-0.05902099609375,
0.004741668701171875,
-0.0816650390625,
-0.0042572021484375,
-0.0638427734375,
0.0158538818359375,
-0.04644775390625,
0.043914794921875,
-0.01251220703125,
-0.0155792236328125,
0.00432586669921875,
0.0098876953125,
-0.090576171875,
-0.0160064697265625,
-0.04876708984375,
0.0122833251953125,
-0.0728759765625,
0.003177642822265625,
-0.0203094482421875,
-0.014404296875,
-0.0225830078125,
0.0178985595703125,
-0.033843994140625,
-0.0382080078125,
0.0029201507568359375,
0.0085601806640625,
-0.0254364013671875,
0.019317626953125,
-0.0640869140625,
0.030426025390625,
-0.00115203857421875,
-0.02410888671875,
-0.0777587890625,
-0.018829345703125,
0.025482177734375,
0.031036376953125,
-0.046539306640625,
0.057373046875,
-0.02777099609375,
0.0506591796875,
0.0179901123046875,
0.0223388671875,
0.01318359375,
-0.0165863037109375,
0.0160064697265625,
-0.01442718505859375,
0.018096923828125,
-0.0203094482421875,
-0.020416259765625,
-0.0102996826171875,
-0.008880615234375,
0.043182373046875,
-0.015655517578125,
0.018585205078125,
0.004726409912109375,
-0.0138092041015625,
-0.01361083984375,
-0.052978515625,
-0.01190948486328125,
0.0124969482421875,
-0.011260986328125,
0.015106201171875,
-0.056915283203125,
-0.0193023681640625,
0.004276275634765625,
-0.0428466796875,
-0.0057220458984375,
0.0113525390625,
0.06475830078125,
0.027740478515625,
0.0018835067749023438,
0.00862884521484375,
0.0094451904296875,
0.035186767578125,
-0.01593017578125,
0.04315185546875,
0.02288818359375,
-0.0151214599609375,
0.047149658203125,
-0.01222991943359375,
0.044097900390625,
-0.03765869140625,
0.041015625,
-0.01349639892578125,
-0.0148468017578125,
0.040771484375,
0.002140045166015625,
-0.013671875,
0.01416015625,
-0.00873565673828125,
-0.008026123046875,
0.006061553955078125,
0.01541900634765625,
0.0013151168823242188,
0.006649017333984375,
-0.00122833251953125,
-0.04241943359375,
0.0175628662109375,
-0.0753173828125,
0.0247650146484375,
-0.00778961181640625,
0.000942230224609375,
-0.0038623809814453125,
-0.00617218017578125,
0.004505157470703125,
-0.0260467529296875,
-0.054595947265625,
-0.0010309219360351562,
0.01380157470703125,
0.006317138671875,
0.0104217529296875,
0.0008091926574707031,
-0.0219573974609375,
0.09295654296875,
0.042572021484375,
-0.032470703125,
0.051116943359375,
-0.027099609375,
-0.0032176971435546875,
-0.01001739501953125,
0.030914306640625,
0.007373809814453125,
-0.00772857666015625,
0.02789306640625,
0.0207366943359375,
0.0127410888671875,
0.024505615234375,
-0.003269195556640625,
0.029571533203125,
-0.005359649658203125,
0.01342010498046875,
-0.01702880859375,
0.1044921875,
-0.005825042724609375,
0.044158935546875,
-0.0217437744140625,
0.055206298828125,
0.0638427734375,
-0.01474761962890625,
0.03485107421875,
0.01507568359375,
-0.034698486328125,
-0.0194549560546875,
-0.031951904296875,
-0.03326416015625,
0.01418304443359375,
0.0170135498046875,
0.0160675048828125,
0.0162200927734375,
-0.01148223876953125,
0.0086669921875,
-0.00896453857421875,
-0.0159454345703125,
-0.019989013671875,
0.01294708251953125,
0.00902557373046875,
0.00968170166015625,
-0.002040863037109375,
-0.0313720703125,
0.01116180419921875,
0.004108428955078125,
-0.01332855224609375,
-0.0171966552734375,
0.01081085205078125,
0.010955810546875,
0.0173492431640625,
-0.0300445556640625,
-0.049072265625,
0.00334930419921875,
-0.01175689697265625,
-0.00835418701171875,
-0.0540771484375,
-0.0312347412109375,
-0.014404296875,
0.0003209114074707031,
0.042205810546875,
-0.003299713134765625,
0.042388916015625,
-0.019622802734375,
-0.00914764404296875,
-0.01361846923828125,
-0.01446533203125,
0.053924560546875,
0.02142333984375,
-0.0242156982421875,
-0.0021762847900390625,
-0.010101318359375,
-0.00408172607421875,
0.0024585723876953125,
-0.025787353515625,
-0.0197906494140625,
-0.0168304443359375,
0.0157928466796875,
-0.018768310546875,
0.01229095458984375,
-0.0016498565673828125,
-0.00901031494140625,
0.045196533203125,
0.01470184326171875,
0.01229095458984375,
-0.025665283203125,
0.040008544921875,
0.0285491943359375,
0.060211181640625,
0.0198974609375,
0.0096588134765625,
-0.0175628662109375,
-0.032684326171875,
-0.010406494140625,
-0.05126953125,
-0.0003314018249511719,
0.006832122802734375,
-0.0161895751953125,
0.031646728515625,
0.035125732421875,
0.0038166046142578125,
-0.0277557373046875,
0.0006618499755859375,
0.01375579833984375,
-0.01727294921875,
0.01568603515625,
0.0277557373046875,
-0.053985595703125,
0.052154541015625,
0.0167999267578125,
0.03875732421875,
-0.057891845703125,
-0.00908660888671875,
-0.0107574462890625,
-0.003021240234375,
0.01348114013671875,
-0.006221771240234375,
-0.05804443359375,
0.08599853515625,
0.0865478515625,
-0.007305145263671875,
0.037750244140625,
0.0262908935546875,
-0.0017232894897460938,
0.010833740234375,
0.023284912109375,
-0.06573486328125,
0.003513336181640625,
0.028564453125,
0.01953125,
-0.0191497802734375,
0.029815673828125,
-0.017303466796875,
-0.009735107421875,
0.018341064453125,
0.03741455078125,
-0.0391845703125,
0.01253509521484375,
-0.0033473968505859375,
0.0020923614501953125,
0.0443115234375,
-0.0003428459167480469,
-0.029266357421875,
-0.01824951171875,
0.067138671875,
-0.01435089111328125,
-0.00566864013671875,
0.0450439453125,
0.0254058837890625,
0.002239227294921875,
-0.01239013671875,
0.03729248046875,
-0.004638671875,
0.010101318359375,
-0.032470703125,
-0.0160675048828125,
0.0079345703125,
-0.01788330078125,
-0.031982421875,
0.0203704833984375,
-0.0244293212890625,
-0.0099945068359375,
0.0275726318359375,
-0.0648193359375,
0.039520263671875,
0.017303466796875,
0.018463134765625,
0.039581298828125,
0.042999267578125,
-0.00095367431640625,
-0.01128387451171875,
0.032623291015625,
-0.0176849365234375,
0.01297760009765625,
-0.02703857421875,
-0.01323699951171875,
-0.01009368896484375,
-0.023101806640625,
-0.0017261505126953125,
-0.0035686492919921875,
-0.0189208984375,
-0.0209503173828125,
-0.01555633544921875,
0.033477783203125,
0.0201416015625,
-0.0595703125,
0.01108551025390625,
-0.0197601318359375,
0.00402069091796875,
0.037567138671875,
0.0054931640625,
-0.052581787109375,
-0.0555419921875,
0.04345703125,
-0.0687255859375,
0.017913818359375,
0.06378173828125,
-0.06817626953125,
0.07391357421875,
0.041595458984375,
0.0026454925537109375,
-0.0007653236389160156,
0.0321044921875,
-0.058837890625,
-0.02325439453125,
-0.02044677734375,
0.035125732421875,
0.021820068359375,
0.0262451171875,
-0.05926513671875,
-0.038848876953125,
-0.00244140625,
0.08160400390625,
0.0986328125,
0.0294189453125,
-0.02789306640625,
-0.0311279296875,
0.0009260177612304688,
0.0018129348754882812,
-0.05694580078125,
0.046173095703125,
-0.00482177734375,
-0.00464630126953125,
0.011505126953125,
-0.0137176513671875,
0.02423095703125,
-0.0311126708984375,
-0.0303497314453125,
0.00618743896484375,
0.0071868896484375,
0.0248565673828125,
-0.03314208984375,
-0.01412200927734375,
0.0308074951171875,
-0.03973388671875,
-0.0099334716796875,
-0.0233917236328125,
0.0006384849548339844,
0.03466796875,
0.00699615478515625,
0.015716552734375,
0.03521728515625,
-0.030029296875,
0.04766845703125,
0.010833740234375,
-0.0017795562744140625,
0.041778564453125,
0.00984954833984375,
0.0257110595703125,
0.0233612060546875,
-0.0033016204833984375,
0.004436492919921875,
0.05096435546875,
0.07421875,
0.0037975311279296875,
0.0017223358154296875,
-0.049224853515625,
0.046417236328125,
0.02410888671875,
0.06976318359375,
-0.070556640625,
-0.0556640625,
0.0174560546875,
0.01483154296875,
0.00872802734375,
0.03485107421875,
0.0222015380859375,
-0.0197906494140625,
0.031005859375,
-0.0740966796875,
0.0271148681640625,
0.044830322265625,
0.023956298828125,
-0.01297760009765625,
-0.007678985595703125,
-0.06396484375,
0.035552978515625,
-0.018707275390625,
0.0037593841552734375,
-0.00836944580078125,
-0.0039043426513671875,
0.0291290283203125,
0.004486083984375,
0.05731201171875,
0.00341796875,
-0.036865234375,
-0.002460479736328125,
0.0310821533203125,
0.0318603515625,
-0.01525115966796875,
0.035430908203125,
0.015960693359375,
0.0219268798828125,
0.007465362548828125,
0.0355224609375,
0.033966064453125,
0.0278778076171875,
-0.0111236572265625,
0.007755279541015625,
0.09466552734375,
-0.0185089111328125,
-0.000583648681640625,
-0.0260467529296875,
-0.00801849365234375,
0.01148223876953125,
0.00019097328186035156,
-0.0030422210693359375,
-0.01092529296875,
0.042236328125,
-0.0204620361328125,
0.003986358642578125,
-0.00435638427734375,
-0.037109375,
0.0189361572265625,
0.005367279052734375,
0.042724609375,
0.0135498046875,
-0.10601806640625,
-0.00847625732421875,
-0.059478759765625,
-0.05767822265625,
0.058135986328125,
0.04864501953125,
-0.044921875,
0.03778076171875,
-0.0036163330078125,
0.00689697265625,
0.017547607421875,
-0.018951416015625,
-0.01033782958984375,
0.050689697265625,
0.0333251953125,
0.007656097412109375,
-0.01702880859375,
-0.003673553466796875,
-0.0015077590942382812,
0.0126800537109375,
0.0079498291015625,
0.0254058837890625,
0.0004355907440185547,
0.0234527587890625,
-0.04010009765625,
-0.027862548828125,
0.002086639404296875,
-0.04119873046875,
0.05279541015625,
0.0191192626953125,
-0.04095458984375,
-0.00611114501953125,
-0.007465362548828125,
0.044891357421875,
0.024810791015625,
-0.0286712646484375,
0.0205078125,
0.025360107421875,
-0.007541656494140625,
-0.02264404296875,
-0.0061798095703125,
-0.043365478515625,
-0.05218505859375,
-0.052337646484375,
-0.004680633544921875,
-0.008209228515625,
-0.02642822265625,
-0.003498077392578125,
-0.00589752197265625,
0.03900146484375,
-0.05364990234375,
0.0268402099609375,
0.0078125,
0.0472412109375,
0.0242462158203125,
0.03509521484375,
-0.0657958984375,
0.024932861328125,
-0.0025005340576171875,
-0.0028667449951171875,
0.0170745849609375,
0.06280517578125,
0.0155792236328125,
0.001537322998046875,
0.0169219970703125,
0.007320404052734375,
0.040435791015625,
-0.01174163818359375,
0.013946533203125,
0.0014781951904296875,
-0.0033416748046875,
-0.0020599365234375,
0.0032787322998046875,
-0.0343017578125,
-0.02447509765625,
-0.0017604827880859375,
0.0009713172912597656,
-0.0008382797241210938,
-0.052703857421875,
-0.03204345703125,
0.00911712646484375,
0.034088134765625,
0.0009441375732421875,
-0.043243408203125,
0.027130126953125,
-0.038360595703125,
0.028167724609375,
-0.0081939697265625,
-0.0239715576171875,
0.01184844970703125,
0.043182373046875,
-0.006160736083984375,
0.0162200927734375,
-0.023712158203125,
-0.021209716796875,
0.005100250244140625,
-0.0016107559204101562,
0.031951904296875,
0.004703521728515625,
-0.036895751953125,
-0.01052093505859375,
-0.004108428955078125,
0.026336669921875,
-0.039154052734375,
-0.025360107421875,
0.004779815673828125,
-0.009490966796875,
-0.0108642578125,
-0.034088134765625,
0.01824951171875,
-0.0712890625,
-0.0236968994140625,
-0.0166168212890625,
-0.01123046875,
-0.0015344619750976562,
-0.027801513671875,
-0.04144287109375,
0.07183837890625,
-0.0024929046630859375,
-0.021942138671875,
-0.0458984375,
-0.01934814453125,
-0.020263671875,
0.0243072509765625,
-0.01275634765625,
-0.043365478515625,
-0.01242828369140625,
0.056976318359375,
0.00498199462890625,
0.00920867919921875,
0.037322998046875,
-0.031585693359375,
-0.005542755126953125,
-0.0069732666015625,
0.01593017578125,
-0.0262603759765625,
0.022247314453125,
-0.018402099609375,
0.02984619140625,
0.0389404296875,
-0.040191650390625,
-0.03204345703125,
-0.00482177734375,
-0.00559234619140625,
-0.0245208740234375,
-0.06939697265625,
-0.022857666015625,
-0.00811767578125,
0.08477783203125,
0.022796630859375,
0.007755279541015625,
-0.033233642578125,
-0.029144287109375,
0.01038360595703125,
0.011932373046875,
0.008270263671875,
0.00823211669921875,
-0.0531005859375,
-0.01995849609375,
0.003215789794921875,
-0.019989013671875,
0.03143310546875,
0.0096435546875,
-0.020111083984375,
0.013671875,
0.0291290283203125,
-0.033477783203125,
-0.01041412353515625,
0.01763916015625,
0.05792236328125,
-0.0506591796875,
-0.04046630859375,
0.00994873046875,
-0.004940032958984375,
-0.00930023193359375,
-0.0272979736328125,
-0.01322174072265625,
-0.061004638671875,
0.01091766357421875,
0.0225830078125,
-0.006755828857421875,
0.050018310546875,
-0.01108551025390625,
-0.02264404296875,
-0.015472412109375,
0.0206146240234375,
-0.0013179779052734375,
0.00928497314453125,
-0.0123138427734375,
0.03155517578125,
-0.0106353759765625,
0.0826416015625,
-0.043548583984375,
0.00655364990234375,
-0.03619384765625,
0.02880859375,
0.0225372314453125,
0.00807952880859375,
0.05926513671875,
0.016326904296875,
-0.00726318359375,
-0.0145263671875,
-0.01276397705078125,
-0.0723876953125,
0.01641845703125,
0.036712646484375,
0.00852203369140625,
0.035552978515625
]
|
48e1f3d231076c064ce8b510db596497e648bda8 | Wordpress Stackexchange
Q: Switch_to_blog() outside wordpress how can I load switch_to_blog() function outside wordpress?
$blog_id = '7';
require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' );
switch_to_blog($blog_id);
echo get_option('blogname');
restore_current_blog();
echo 'You switched back.';
I get error:
Fatal error: Call to a member function set_prefix() on a non-object in /home/public_html/wp-includes/ms-settings.php on line 126
Any ideas ?
UPDATE
It can be loaded but without any function just this code ? What global variables is missing ?
A: This may not be possible.
From the Codex page Integrating WordPress with your Website, which explains how to use WordPress "outside" of WordPress:
These directions will not work on a MultiSite Network.
| Q: Switch_to_blog() outside wordpress how can I load switch_to_blog() function outside wordpress?
$blog_id = '7';
require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' );
switch_to_blog($blog_id);
echo get_option('blogname');
restore_current_blog();
echo 'You switched back.';
I get error:
Fatal error: Call to a member function set_prefix() on a non-object in /home/public_html/wp-includes/ms-settings.php on line 126
Any ideas ?
UPDATE
It can be loaded but without any function just this code ? What global variables is missing ?
A: This may not be possible.
From the Codex page Integrating WordPress with your Website, which explains how to use WordPress "outside" of WordPress:
These directions will not work on a MultiSite Network.
| wordpress | {
"language": "en",
"length": 102,
"provenance": "stackexchange_00019.jsonl.gz:450303",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167676"
} | [
0.054290771484375,
-0.01464080810546875,
0.049041748046875,
0.031768798828125,
0.0009598731994628906,
-0.03814697265625,
0.064697265625,
-0.057373046875,
-0.0027980804443359375,
-0.021942138671875,
-0.07098388671875,
0.0027618408203125,
-0.0623779296875,
-0.005279541015625,
0.015380859375,
-0.07635498046875,
0.0369873046875,
-0.00794219970703125,
0.02569580078125,
-0.00238037109375,
0.01397705078125,
0.0194244384765625,
0.008087158203125,
0.01543426513671875,
0.031341552734375,
-0.0296173095703125,
0.0474853515625,
-0.0304718017578125,
0.020904541015625,
-0.0193328857421875,
0.0259552001953125,
0.00246429443359375,
0.0223846435546875,
0.04010009765625,
-0.07366943359375,
-0.060821533203125,
-0.017852783203125,
0.0095977783203125,
-0.0225982666015625,
0.0682373046875,
0.027557373046875,
-0.018035888671875,
0.0100250244140625,
0.0279083251953125,
-0.0045623779296875,
-0.060943603515625,
0.040313720703125,
-0.0526123046875,
-0.017333984375,
-0.0124969482421875,
0.025970458984375,
0.008209228515625,
0.052154541015625,
0.014404296875,
-0.03216552734375,
-0.021209716796875,
0.006877899169921875,
0.0212860107421875,
0.02044677734375,
0.0197296142578125,
-0.0242156982421875,
0.023101806640625,
0.0031566619873046875,
-0.033782958984375,
0.0278167724609375,
0.003200531005859375,
-0.00920867919921875,
0.0313720703125,
-0.055023193359375,
0.01392364501953125,
0.03662109375,
-0.06890869140625,
-0.00710296630859375,
-0.016876220703125,
-0.02783203125,
0.01326751708984375,
0.003772735595703125,
-0.02734375,
0.006862640380859375,
0.00179290771484375,
-0.005069732666015625,
0.0042724609375,
-0.0156707763671875,
-0.04022216796875,
0.01629638671875,
-0.0010976791381835938,
-0.0015668869018554688,
-0.00547027587890625,
-0.040863037109375,
-0.00033211708068847656,
-0.026611328125,
0.007358551025390625,
-0.043212890625,
-0.0129241943359375,
-0.009918212890625,
-0.01529693603515625,
-0.00693511962890625,
0.00604248046875,
-0.0199432373046875,
-0.00982666015625,
-0.00991058349609375,
-0.0099945068359375,
0.000202178955078125,
-0.022064208984375,
-0.0266876220703125,
0.056488037109375,
0.021759033203125,
0.00507354736328125,
-0.005077362060546875,
0.005596160888671875,
-0.0088043212890625,
-0.02667236328125,
-0.00608062744140625,
-0.0097198486328125,
-0.05255126953125,
-0.00560760498046875,
-0.0445556640625,
-0.022430419921875,
-0.007904052734375,
-0.0423583984375,
0.011505126953125,
0.035430908203125,
-0.05279541015625,
0.01373291015625,
-0.0236053466796875,
-0.03155517578125,
-0.0003361701965332031,
0.012451171875,
-0.0272674560546875,
0.0286712646484375,
-0.02325439453125,
0.00907135009765625,
0.057861328125,
0.012481689453125,
-0.016265869140625,
-0.0222625732421875,
0.031524658203125,
0.0165863037109375,
0.00750732421875,
0.0038814544677734375,
0.065185546875,
-0.0672607421875,
-0.0791015625,
0.058258056640625,
0.02752685546875,
0.044189453125,
0.050323486328125,
0.00205230712890625,
-0.02587890625,
-0.029510498046875,
0.0070037841796875,
0.01087188720703125,
0.025360107421875,
0.004180908203125,
0.058441162109375,
-0.045867919921875,
0.07586669921875,
-0.066162109375,
0.0028247833251953125,
-0.043792724609375,
-0.010955810546875,
-0.007076263427734375,
0.03668212890625,
-0.01284027099609375,
-0.034027099609375,
0.00597381591796875,
-0.02667236328125,
-0.0156097412109375,
0.014007568359375,
0.01641845703125,
-0.037261962890625,
0.0095062255859375,
0.00826263427734375,
0.00681304931640625,
0.007350921630859375,
0.0060272216796875,
-0.0146636962890625,
0.0195465087890625,
0.0182037353515625,
0.02252197265625,
0.001125335693359375,
-0.0390625,
0.03338623046875,
0.0031986236572265625,
-0.043365478515625,
0.0221710205078125,
0.0236358642578125,
0.0662841796875,
-0.01080322265625,
0.02490234375,
0.0219268798828125,
0.01206207275390625,
-0.017913818359375,
0.03448486328125,
-0.01015472412109375,
-0.01383209228515625,
-0.0206146240234375,
0.0180511474609375,
-0.031890869140625,
-0.021697998046875,
0.00821685791015625,
0.0193634033203125,
-0.026702880859375,
-0.032073974609375,
-0.031524658203125,
-0.0252532958984375,
0.004489898681640625,
0.0232696533203125,
0.032135009765625,
-0.00827789306640625,
-0.00199127197265625,
-0.0192108154296875,
0.01145172119140625,
-0.04461669921875,
-0.043487548828125,
0.046539306640625,
-0.0155487060546875,
0.05279541015625,
0.021728515625,
0.045440673828125,
-0.003528594970703125,
-0.0222015380859375,
-0.01313018798828125,
-0.036590576171875,
0.042633056640625,
-0.064208984375,
-0.01544952392578125,
-0.05615234375,
-0.028961181640625,
-0.0232391357421875,
-0.07061767578125,
0.076904296875,
-0.00022590160369873047,
0.00518035888671875,
-0.005847930908203125,
0.0152740478515625,
0.019287109375,
-0.01300811767578125,
0.007801055908203125,
0.020751953125,
0.01372528076171875,
-0.005863189697265625,
-0.003856658935546875,
0.020721435546875,
-0.0100555419921875,
-0.03704833984375,
0.0129852294921875,
-0.0005593299865722656,
-0.019989013671875,
0.007442474365234375,
-0.01934814453125,
0.00902557373046875,
0.0130157470703125,
-0.0235595703125,
-0.0161285400390625,
0.047698974609375,
-0.007389068603515625,
-0.034149169921875,
0.026611328125,
0.0073699951171875,
0.007251739501953125,
-0.0098419189453125,
-0.0307159423828125,
-0.00727081298828125,
0.006191253662109375,
0.0006537437438964844,
0.00836944580078125,
0.0011196136474609375,
-0.00958251953125,
-0.01047515869140625,
-0.001598358154296875,
-0.038909912109375,
-0.00333404541015625,
0.011871337890625,
0.03472900390625,
0.0100555419921875,
-0.038238525390625,
0.0008497238159179688,
0.017822265625,
0.00408172607421875,
-0.016326904296875,
0.032562255859375,
-0.02301025390625,
-0.017333984375,
-0.0021457672119140625,
-0.0184326171875,
-0.005725860595703125,
-0.0019588470458984375,
0.003814697265625,
-0.004795074462890625,
0.0099639892578125,
0.0416259765625,
-0.01739501953125,
0.046356201171875,
-0.00754547119140625,
-0.00952911376953125,
0.045501708984375,
-0.040191650390625,
0.01739501953125,
-0.016571044921875,
0.10430908203125,
0.0601806640625,
-0.00726318359375,
0.01385498046875,
0.01059722900390625,
0.0130767822265625,
0.039306640625,
-0.020263671875,
0.0018596649169921875,
0.0355224609375,
-0.0660400390625,
0.0036525726318359375,
-0.004726409912109375,
-0.0196380615234375,
-0.0143280029296875,
-0.027099609375,
-0.0325927734375,
-0.01239013671875,
-0.07733154296875,
-0.006824493408203125,
-0.0120849609375,
-0.059661865234375,
0.0201416015625,
-0.0254364013671875,
-0.024017333984375,
-0.015350341796875,
-0.00023627281188964844,
0.0115509033203125,
0.007411956787109375,
-0.047149658203125,
-0.0648193359375,
-0.0775146484375,
-0.10040283203125,
-0.02911376953125,
-0.00017583370208740234,
0.01119232177734375,
0.0149993896484375,
0.00234222412109375,
0.01229095458984375,
-0.047119140625,
0.02496337890625,
0.060394287109375,
-0.0247802734375,
-0.0149993896484375,
-0.0006589889526367188,
-0.027099609375,
0.003345489501953125,
-0.01238250732421875,
0.03125,
0.0212249755859375,
-0.01556396484375,
0.00707244873046875,
0.0038127899169921875,
0.0167083740234375,
0.0272979736328125,
-0.0467529296875,
-0.0145416259765625,
0.00039839744567871094,
-0.0211181640625,
-0.052520751953125,
-0.01195526123046875,
0.0179290771484375,
-0.0174560546875,
0.01451873779296875,
0.01258087158203125,
-0.0382080078125,
0.004268646240234375,
-0.004787445068359375,
-0.010040283203125,
0.0138092041015625,
-0.001247406005859375,
0.0003402233123779297,
0.00882720947265625,
0.00045800209045410156,
0.0027294158935546875,
0.0038928985595703125,
0.026092529296875,
-0.0119476318359375,
-0.0206451416015625,
-0.00039649009704589844,
0.0203857421875,
-0.0268707275390625,
0.018829345703125,
-0.045562744140625,
-0.056549072265625,
0.0496826171875,
-0.041717529296875,
-0.0216064453125,
-0.0012121200561523438,
-0.01371002197265625,
0.036865234375,
0.0931396484375,
-0.0295257568359375,
0.00865936279296875,
0.0219879150390625,
0.003688812255859375,
-0.035919189453125,
-0.01395416259765625,
-0.07757568359375,
-0.00048732757568359375,
-0.0240478515625,
-0.024871826171875,
-0.0245513916015625,
-0.0215911865234375,
0.00890350341796875,
0.0014743804931640625,
0.006565093994140625,
-0.0291595458984375,
0.0113525390625,
-0.0000972747802734375,
0.0087127685546875,
-0.0036449432373046875,
-0.00574493408203125,
-0.0280303955078125,
0.010498046875,
-0.01009368896484375,
-0.068603515625,
-0.00969696044921875,
-0.01218414306640625,
0.049346923828125,
0.0225372314453125,
-0.024017333984375,
0.0013132095336914062,
0.043701171875,
-0.014739990234375,
-0.016143798828125,
0.008056640625,
0.02099609375,
0.015838623046875,
0.006603240966796875,
-0.01690673828125,
-0.0298614501953125,
0.0064697265625,
-0.004489898681640625,
-0.06085205078125,
0.00003325939178466797,
-0.01259613037109375,
-0.0021266937255859375,
0.03466796875,
-0.046875,
-0.042083740234375,
-0.012969970703125,
0.01154327392578125,
0.0325927734375,
-0.01080322265625,
0.01120758056640625,
-0.01433563232421875,
-0.0242919921875,
0.0379638671875,
-0.002796173095703125,
-0.03466796875,
-0.0007839202880859375,
0.045928955078125,
0.0278472900390625,
-0.0292816162109375,
0.0003712177276611328,
-0.0275726318359375,
0.023345947265625,
-0.004833221435546875,
0.062469482421875,
0.02056884765625,
-0.00890350341796875,
0.062103271484375,
-0.002407073974609375,
-0.0255279541015625,
-0.01346588134765625,
0.03887939453125,
0.0188751220703125,
-0.0004897117614746094,
-0.01107025146484375,
-0.00530242919921875,
0.028961181640625,
-0.006084442138671875,
-0.0196990966796875,
-0.02227783203125,
0.0300445556640625,
0.061492919921875,
-0.037506103515625,
0.0294342041015625,
-0.045684814453125,
-0.0255279541015625,
0.00926971435546875,
-0.053466796875,
0.054901123046875,
0.006839752197265625,
0.01507568359375,
0.01036834716796875,
0.02294921875,
-0.006069183349609375,
0.04754638671875,
0.01519775390625,
0.031097412109375,
0.0251617431640625,
0.0217437744140625,
-0.0168304443359375,
0.0006847381591796875,
-0.01507568359375,
0.033355712890625,
-0.016510009765625,
-0.06951904296875,
-0.007213592529296875,
0.01392364501953125,
0.032623291015625,
0.0294647216796875,
-0.01062774658203125,
0.0285186767578125,
0.0011196136474609375,
-0.034332275390625,
-0.01407623291015625,
-0.037811279296875,
-0.005161285400390625,
-0.057342529296875,
0.0288848876953125,
-0.01154327392578125,
0.00664520263671875,
0.0157012939453125,
0.08660888671875,
-0.032440185546875,
0.0638427734375,
-0.018463134765625,
0.03094482421875,
0.0264129638671875,
0.0281982421875,
0.01058197021484375,
-0.0130462646484375,
0.03289794921875,
-0.0176239013671875,
0.005100250244140625,
-0.037811279296875,
-0.0022754669189453125,
0.0076141357421875,
0.04736328125,
0.017120361328125,
-0.01328277587890625,
0.0149688720703125,
-0.0174713134765625,
-0.035430908203125,
0.059539794921875,
0.0227203369140625,
-0.042510986328125,
-0.05389404296875,
0.01546478271484375,
0.0548095703125,
0.0122528076171875,
0.0200653076171875,
-0.0109710693359375,
0.003753662109375,
-0.0226287841796875,
0.0032062530517578125,
-0.028594970703125,
-0.0093536376953125,
0.006565093994140625,
-0.036651611328125,
-0.031341552734375,
-0.00844573974609375,
0.0027828216552734375,
0.0009379386901855469,
-0.0157623291015625,
-0.03192138671875,
0.03900146484375,
-0.0276031494140625,
-0.0179595947265625,
-0.045501708984375,
0.050811767578125,
-0.022857666015625,
-0.00356292724609375,
0.0655517578125,
0.0236968994140625,
-0.0640869140625,
0.02947998046875,
-0.038299560546875,
-0.004322052001953125,
-0.0028018951416015625,
-0.05596923828125,
-0.0675048828125,
-0.042572021484375,
-0.004802703857421875,
-0.005138397216796875,
-0.0146331787109375,
-0.024627685546875,
-0.007450103759765625,
0.03594970703125,
0.023162841796875,
0.00959014892578125,
-0.00531005859375,
0.035614013671875,
0.00829315185546875,
0.0207061767578125,
0.042724609375,
0.033538818359375,
-0.0166015625,
-0.03564453125,
-0.006175994873046875,
-0.056427001953125,
-0.0037403106689453125,
0.022552490234375,
-0.03863525390625,
0.0201263427734375,
0.042266845703125,
-0.00021910667419433594,
0.034149169921875,
-0.00936126708984375,
0.00600433349609375,
-0.0263214111328125,
-0.06597900390625,
-0.0302886962890625,
0.0292205810546875,
-0.038055419921875,
-0.02728271484375,
-0.0098114013671875,
-0.0159149169921875,
0.015960693359375,
0.003223419189453125,
-0.01800537109375,
-0.0142974853515625,
0.0220184326171875,
-0.0908203125,
0.07757568359375,
0.08648681640625,
0.0236358642578125,
0.05145263671875,
-0.006809234619140625,
0.011962890625,
0.0144805908203125,
0.0438232421875,
-0.020751953125,
-0.04632568359375,
-0.0177459716796875,
-0.01593017578125,
-0.0197296142578125,
-0.045257568359375,
-0.0264739990234375,
0.030548095703125,
0.0606689453125,
0.08026123046875,
-0.08447265625,
0.01158905029296875,
0.0311126708984375,
-0.036102294921875,
-0.004116058349609375,
0.01097869873046875,
-0.01561737060546875,
-0.03094482421875,
0.03240966796875,
-0.0116119384765625,
-0.01384735107421875,
0.0164337158203125,
0.005886077880859375,
-0.0148162841796875,
-0.003917694091796875,
0.049163818359375,
0.039794921875,
-0.033172607421875,
0.0218963623046875,
0.017303466796875,
0.036895751953125,
-0.005710601806640625,
0.04852294921875,
0.0035190582275390625,
-0.0012760162353515625,
-0.02490234375,
0.04364013671875,
-0.003871917724609375,
-0.02374267578125,
-0.038787841796875,
-0.0171966552734375,
0.015960693359375,
0.03497314453125,
-0.0242767333984375,
-0.018035888671875,
0.01165008544921875,
0.02044677734375,
0.0244598388671875,
-0.01291656494140625,
-0.004718780517578125,
0.02264404296875,
-0.0160064697265625,
0.00931549072265625,
-0.01202392578125,
-0.01532745361328125,
-0.01275634765625,
-0.01131439208984375,
0.05474853515625,
0.00020134449005126953,
-0.0240936279296875,
0.048858642578125,
0.002033233642578125,
-0.04803466796875,
0.00891876220703125,
0.0013990402221679688,
-0.0374755859375,
-0.059051513671875,
0.008026123046875,
-0.09185791015625,
-0.0303497314453125,
-0.0245361328125,
-0.05999755859375,
0.1038818359375,
-0.055938720703125,
0.0308074951171875,
0.0357666015625,
0.0268707275390625,
-0.005245208740234375,
0.014312744140625,
-0.0404052734375,
0.0263824462890625,
0.01352691650390625,
0.02703857421875,
-0.0626220703125,
-0.016632080078125,
-0.007472991943359375,
0.035491943359375,
-0.0039520263671875,
0.0017290115356445312,
-0.020904541015625,
-0.015106201171875,
-0.00131988525390625,
0.03802490234375,
0.005645751953125,
0.019317626953125,
0.00797271728515625,
0.022735595703125,
0.0041656494140625,
-0.044677734375,
0.00913238525390625,
-0.0195465087890625,
-0.020172119140625,
0.0170440673828125,
0.009429931640625,
-0.00039267539978027344,
0.0217437744140625,
-0.001865386962890625,
-0.0239105224609375,
0.0124053955078125,
0.01006317138671875,
0.0012454986572265625,
0.017059326171875,
0.0131683349609375,
-0.003997802734375,
0.016998291015625,
0.0389404296875,
-0.0263214111328125,
0.04058837890625,
-0.0171661376953125,
0.0002346038818359375,
-0.001132965087890625,
0.01107025146484375,
0.044647216796875,
-0.051544189453125,
-0.0191650390625,
-0.00791168212890625,
-0.0178680419921875,
0.07159423828125,
0.039764404296875,
0.031890869140625,
-0.0007481575012207031,
0.030914306640625,
-0.018218994140625,
0.056549072265625,
-0.041290283203125,
-0.0191192626953125,
0.006153106689453125,
0.0017976760864257812,
0.0004589557647705078,
-0.02618408203125,
0.00685882568359375,
-0.0015201568603515625,
0.01678466796875,
-0.011627197265625,
0.0016956329345703125,
0.0301055908203125,
0.007083892822265625,
0.021026611328125,
0.052581787109375,
-0.0594482421875,
-0.007747650146484375,
-0.035888671875,
0.0029010772705078125,
0.03399658203125,
0.05999755859375,
-0.00659942626953125,
0.0743408203125,
-0.032318115234375,
-0.022369384765625,
-0.0096588134765625,
0.04913330078125,
-0.006931304931640625,
0.01502227783203125,
-0.048919677734375,
-0.055877685546875,
0.0083465576171875,
0.05517578125,
-0.004230499267578125,
0.01049041748046875,
0.04681396484375,
0.02874755859375,
-0.059173583984375,
-0.018951416015625,
0.05767822265625,
-0.0234527587890625,
0.03656005859375,
-0.04022216796875,
-0.0237274169921875,
-0.03472900390625,
-0.029937744140625,
-0.01352691650390625,
0.000209808349609375,
0.0084991455078125,
-0.024444580078125,
0.0577392578125,
0.0014677047729492188,
0.0036449432373046875,
0.002216339111328125,
0.0161895751953125,
0.022857666015625,
0.0182342529296875,
-0.095947265625,
-0.0307159423828125,
-0.021636962890625,
-0.00641632080078125,
0.0168304443359375,
0.0379638671875,
0.00653076171875,
-0.0004260540008544922,
0.005916595458984375,
0.00933074951171875,
0.021453857421875,
-0.00785064697265625,
-0.004207611083984375,
0.0296478271484375,
0.04901123046875,
0.0162811279296875,
-0.0848388671875,
-0.06292724609375,
-0.049041748046875,
0.07073974609375,
0.02581787109375,
0.041473388671875,
-0.010162353515625,
0.041778564453125,
0.00800323486328125,
0.0027484893798828125,
0.0006465911865234375,
0.0209808349609375,
-0.05889892578125,
0.0086517333984375,
0.015869140625,
-0.0084381103515625,
0.016876220703125,
0.0540771484375,
0.0206756591796875,
0.0009551048278808594,
0.055694580078125,
-0.044891357421875,
0.00940704345703125,
-0.020965576171875,
-0.0161895751953125,
-0.0361328125,
-0.04815673828125,
-0.0240478515625,
0.0178680419921875,
0.0170440673828125,
0.0161895751953125,
-0.03424072265625,
0.0014781951904296875,
0.0208587646484375,
-0.0213165283203125,
0.02020263671875,
0.01454925537109375,
-0.005748748779296875,
0.0125732421875,
0.0369873046875,
-0.06158447265625,
0.0089263916015625,
-0.0188446044921875,
-0.02520751953125,
0.0040435791015625,
0.056640625,
-0.00902557373046875,
-0.07342529296875,
0.02105712890625,
0.033172607421875,
0.029754638671875,
-0.0265960693359375,
0.0167236328125,
0.05816650390625,
-0.0246429443359375,
0.007793426513671875,
-0.0037937164306640625,
-0.01390838623046875,
-0.0268707275390625,
-0.0263214111328125,
0.00934600830078125,
-0.0218963623046875,
-0.0260467529296875,
-0.01995849609375,
-0.01123809814453125,
0.040771484375,
-0.005313873291015625,
-0.018035888671875,
-0.0094451904296875,
-0.0279998779296875,
0.0255889892578125,
-0.0015010833740234375,
-0.043609619140625,
0.00832366943359375,
0.02593994140625,
-0.031524658203125,
-0.01158905029296875,
-0.036895751953125,
-0.01580810546875,
-0.017578125,
0.04620361328125,
0.09283447265625,
-0.021270751953125,
-0.058380126953125,
0.06927490234375,
0.011199951171875,
0.10418701171875,
-0.0693359375,
-0.005771636962890625,
0.0024852752685546875,
0.00623321533203125,
-0.0379638671875,
-0.08209228515625,
0.03857421875,
-0.1002197265625,
-0.0223388671875,
-0.011932373046875,
-0.032135009765625,
-0.01470184326171875,
-0.0439453125,
-0.038055419921875,
0.0265045166015625,
0.0091400146484375,
-0.033172607421875,
-0.072998046875,
-0.0287628173828125,
-0.00600433349609375,
0.054840087890625,
-0.022430419921875,
-0.0231475830078125,
-0.058441162109375,
0.042388916015625,
0.0168914794921875,
0.01483154296875,
0.0279541015625,
0.00261688232421875,
-0.0189361572265625,
0.0245513916015625,
0.00969696044921875,
0.01441192626953125,
-0.00012135505676269531,
-0.003997802734375,
0.0268096923828125,
0.03973388671875,
-0.01751708984375,
0.0024356842041015625,
0.0131072998046875,
-0.004032135009765625,
-0.011444091796875,
-0.03277587890625,
0.0085296630859375,
-0.00360870361328125,
0.052825927734375,
-0.0189056396484375,
0.01177978515625,
-0.02197265625,
-0.020294189453125,
-0.021942138671875,
-0.021026611328125,
-0.02392578125,
0.0223236083984375,
-0.0789794921875,
-0.01244354248046875,
0.0138092041015625,
-0.012542724609375,
0.0213623046875,
-0.009765625,
-0.037994384765625,
0.0124664306640625,
0.0216827392578125,
0.0016880035400390625,
-0.0384521484375,
0.01398468017578125,
0.0545654296875,
-0.035919189453125,
0.0027980804443359375,
0.01172637939453125,
-0.01157379150390625,
0.0228118896484375,
0.0241546630859375,
-0.006938934326171875,
0.0006299018859863281,
0.000020503997802734375,
0.019012451171875,
0.00919342041015625,
0.0206756591796875,
0.00911712646484375,
-0.006626129150390625,
0.01262664794921875,
0.0268402099609375,
-0.0222930908203125,
-0.0055999755859375,
0.021697998046875,
0.04620361328125,
-0.0204925537109375,
0.04156494140625,
-0.00420379638671875,
0.0380859375,
-0.0002455711364746094,
0.021148681640625,
-0.0736083984375,
0.02581787109375,
-0.0406494140625,
-0.0150299072265625,
-0.0104217529296875,
-0.0216217041015625,
-0.00537872314453125,
-0.0312347412109375,
0.034942626953125,
0.00998687744140625,
-0.0027866363525390625,
0.033905029296875
]
|
c08236bbca4cb0b3266e8d8d4ba41fba4206ba13 | Wordpress Stackexchange
Q: How can I invoke an action after a CiviCRM triggering event? If I want to have a certain action taken after a CiviCRM 'trigger', what is the best approach? I'm a Drupal developer used to using Drupal workflows on CiviCRM actions, and I am unfamiliar with WordPress workflow frameworks.
| Q: How can I invoke an action after a CiviCRM triggering event? If I want to have a certain action taken after a CiviCRM 'trigger', what is the best approach? I'm a Drupal developer used to using Drupal workflows on CiviCRM actions, and I am unfamiliar with WordPress workflow frameworks.
| wordpress | {
"language": "en",
"length": 50,
"provenance": "stackexchange_00019.jsonl.gz:450337",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167800"
} | [
0.038818359375,
-0.0026454925537109375,
-0.030548095703125,
-0.06024169921875,
0.015045166015625,
-0.018280029296875,
-0.007366180419921875,
0.0058135986328125,
0.037322998046875,
0.0265045166015625,
-0.030548095703125,
0.0183563232421875,
0.029327392578125,
-0.004024505615234375,
0.00402069091796875,
0.00464630126953125,
0.044403076171875,
-0.0219573974609375,
0.0191650390625,
-0.00433349609375,
-0.0078582763671875,
0.01502227783203125,
0.026641845703125,
0.045166015625,
0.0089569091796875,
0.051361083984375,
-0.0017414093017578125,
-0.01045989990234375,
0.006984710693359375,
0.00379180908203125,
0.0131072998046875,
-0.03741455078125,
-0.01067352294921875,
0.03863525390625,
-0.0059814453125,
0.0016736984252929688,
-0.0221710205078125,
0.033599853515625,
0.040435791015625,
-0.0125274658203125,
0.0347900390625,
-0.021209716796875,
0.00975799560546875,
0.006389617919921875,
-0.0094146728515625,
-0.0245513916015625,
0.037139892578125,
-0.04205322265625,
0.01229095458984375,
-0.01436614990234375,
-0.0127410888671875,
0.032440185546875,
-0.0158843994140625,
0.0195159912109375,
0.0052490234375,
0.00363922119140625,
-0.050872802734375,
0.0188751220703125,
0.01323699951171875,
0.047088623046875,
0.0185546875,
-0.0013341903686523438,
0.0104217529296875,
-0.031829833984375,
0.007144927978515625,
0.02734375,
0.0200347900390625,
0.0109100341796875,
0.00383758544921875,
0.0056304931640625,
-0.0146026611328125,
-0.024078369140625,
-0.0408935546875,
-0.0150604248046875,
0.035308837890625,
0.006500244140625,
0.0067291259765625,
0.0013685226440429688,
-0.01261138916015625,
0.06884765625,
-0.0254669189453125,
0.0127105712890625,
-0.045318603515625,
-0.054412841796875,
0.0286407470703125,
-0.0199432373046875,
-0.0202789306640625,
-0.00756072998046875,
-0.046966552734375,
-0.02777099609375,
-0.035675048828125,
-0.01122283935546875,
-0.0631103515625,
0.0017042160034179688,
-0.0134735107421875,
0.004322052001953125,
0.033538818359375,
0.0252227783203125,
-0.015899658203125,
-0.032135009765625,
0.01137542724609375,
-0.0345458984375,
-0.022735595703125,
0.004795074462890625,
-0.012054443359375,
0.04150390625,
0.008575439453125,
0.0179901123046875,
-0.0040435791015625,
0.0015716552734375,
-0.0161590576171875,
-0.0261077880859375,
0.01885986328125,
0.0148773193359375,
-0.02783203125,
-0.054962158203125,
-0.037750244140625,
0.033843994140625,
-0.0003209114074707031,
-0.0225830078125,
0.0082550048828125,
-0.0079498291015625,
0.040252685546875,
0.005863189697265625,
0.0122833251953125,
0.016693115234375,
-0.04583740234375,
-0.0305328369140625,
0.001987457275390625,
0.0037689208984375,
-0.033355712890625,
0.0285797119140625,
0.033660888671875,
-0.0017194747924804688,
-0.03338623046875,
-0.0165863037109375,
0.04620361328125,
0.033050537109375,
0.0298004150390625,
-0.029083251953125,
0.0560302734375,
-0.01971435546875,
-0.0345458984375,
0.0550537109375,
0.033538818359375,
-0.00048351287841796875,
0.007404327392578125,
0.0176239013671875,
0.022216796875,
-0.0093536376953125,
0.0294189453125,
-0.03399658203125,
-0.0006952285766601562,
0.01407623291015625,
0.0283966064453125,
-0.0250396728515625,
0.031707763671875,
-0.036407470703125,
0.040557861328125,
-0.032867431640625,
0.01451873779296875,
0.02532958984375,
0.05035400390625,
-0.005344390869140625,
-0.00864410400390625,
-0.0306396484375,
-0.054168701171875,
-0.00942230224609375,
0.0262603759765625,
0.0274505615234375,
0.0230712890625,
0.0245513916015625,
0.01953125,
0.02655029296875,
0.0169830322265625,
-0.00189971923828125,
0.0262298583984375,
-0.0245361328125,
0.0096282958984375,
0.0291595458984375,
-0.01285552978515625,
-0.0208892822265625,
0.026947021484375,
-0.02227783203125,
-0.0267333984375,
0.00433349609375,
0.0205535888671875,
0.0301513671875,
-0.006771087646484375,
0.02801513671875,
0.0130767822265625,
0.024169921875,
-0.042449951171875,
0.0231781005859375,
-0.016510009765625,
-0.034820556640625,
0.035675048828125,
-0.005176544189453125,
-0.004547119140625,
-0.006622314453125,
0.0755615234375,
0.007686614990234375,
0.01241302490234375,
-0.0157470703125,
-0.044281005859375,
0.0380859375,
-0.0172576904296875,
0.022796630859375,
0.0242462158203125,
0.003406524658203125,
-0.0167999267578125,
0.0013093948364257812,
0.0223846435546875,
-0.07574462890625,
-0.0194244384765625,
0.056640625,
0.0088043212890625,
-0.01055145263671875,
-0.01654052734375,
-0.0179290771484375,
-0.032135009765625,
0.007007598876953125,
-0.04278564453125,
0.02850341796875,
0.0226898193359375,
-0.034942626953125,
-0.0252532958984375,
-0.048370361328125,
-0.0074920654296875,
-0.008880615234375,
-0.050994873046875,
0.06658935546875,
-0.01439666748046875,
0.01053619384765625,
0.004695892333984375,
0.0027484893798828125,
0.020721435546875,
-0.087890625,
0.027923583984375,
0.047210693359375,
0.0077667236328125,
-0.00336456298828125,
-0.0073699951171875,
0.01116180419921875,
0.038330078125,
0.0391845703125,
0.037689208984375,
-0.0235748291015625,
0.01294708251953125,
0.0196075439453125,
-0.0221405029296875,
-0.027191162109375,
0.04376220703125,
-0.04290771484375,
-0.006885528564453125,
0.037567138671875,
-0.01322174072265625,
-0.047027587890625,
-0.036041259765625,
-0.0038166046142578125,
0.04296875,
-0.0892333984375,
-0.0892333984375,
-0.00756072998046875,
-0.0036983489990234375,
-0.012115478515625,
0.006877899169921875,
0.0006999969482421875,
0.02069091796875,
-0.0156402587890625,
0.00911712646484375,
-0.03387451171875,
0.0206756591796875,
0.04107666015625,
-0.0162200927734375,
-0.01241302490234375,
0.019317626953125,
-0.0213470458984375,
-0.01239013671875,
-0.0060577392578125,
-0.032318115234375,
-0.00408172607421875,
-0.06512451171875,
-0.028778076171875,
0.00983428955078125,
-0.036956787109375,
-0.0192718505859375,
-0.033050537109375,
-0.0018987655639648438,
-0.02777099609375,
-0.0018815994262695312,
0.025421142578125,
-0.0258331298828125,
0.04168701171875,
-0.00344085693359375,
-0.040985107421875,
-0.03302001953125,
-0.0047454833984375,
0.0154876708984375,
-0.02862548828125,
-0.00600433349609375,
0.048919677734375,
-0.014892578125,
0.004901885986328125,
-0.006500244140625,
-0.01995849609375,
0.0318603515625,
-0.0263214111328125,
-0.0335693359375,
-0.019500732421875,
-0.04254150390625,
0.01285552978515625,
0.040252685546875,
0.08099365234375,
0.0234832763671875,
-0.0223236083984375,
0.0206451416015625,
0.07916259765625,
0.00472259521484375,
-0.05255126953125,
-0.0650634765625,
-0.056549072265625,
0.043304443359375,
-0.031341552734375,
0.0029277801513671875,
-0.00897979736328125,
-0.0430908203125,
0.0267791748046875,
0.006923675537109375,
-0.0209808349609375,
0.02288818359375,
-0.0258941650390625,
-0.030426025390625,
-0.012451171875,
0.02325439453125,
0.0021724700927734375,
-0.00559234619140625,
0.053619384765625,
-0.0111541748046875,
-0.054412841796875,
-0.0302581787109375,
-0.061248779296875,
-0.013671875,
-0.004268646240234375,
-0.002941131591796875,
0.00018966197967529297,
-0.0300140380859375,
0.0051727294921875,
0.06683349609375,
0.0034847259521484375,
-0.0293121337890625,
0.0012760162353515625,
-0.007671356201171875,
0.006847381591796875,
0.00045180320739746094,
0.021697998046875,
0.01149749755859375,
-0.016815185546875,
-0.017333984375,
-0.059417724609375,
0.0011034011840820312,
0.0134124755859375,
-0.024322509765625,
-0.051116943359375,
0.00830078125,
-0.0219573974609375,
-0.0325927734375,
-0.009552001953125,
0.018096923828125,
0.0181884765625,
-0.022247314453125,
0.005260467529296875,
-0.002094268798828125,
-0.00479888916015625,
0.00815582275390625,
-0.00298309326171875,
0.0108184814453125,
-0.03662109375,
-0.00862884521484375,
-0.012359619140625,
0.0014886856079101562,
-0.029327392578125,
0.01285552978515625,
-0.07281494140625,
0.01132965087890625,
0.0014772415161132812,
-0.047882080078125,
0.00859832763671875,
0.0036983489990234375,
0.006011962890625,
0.022003173828125,
0.04595947265625,
-0.025909423828125,
-0.0223541259765625,
0.0029315948486328125,
0.00867462158203125,
-0.03363037109375,
-0.0007758140563964844,
-0.0245819091796875,
-0.004913330078125,
-0.07025146484375,
0.03887939453125,
0.0244903564453125,
-0.0123748779296875,
-0.046630859375,
0.0268707275390625,
-0.06549072265625,
-0.029083251953125,
0.02001953125,
-0.0390625,
-0.02880859375,
-0.0197601318359375,
-0.03936767578125,
-0.0445556640625,
0.0014066696166992188,
-0.0217437744140625,
-0.0859375,
-0.004852294921875,
-0.01421356201171875,
0.039794921875,
0.0223541259765625,
-0.039398193359375,
0.0118865966796875,
0.054840087890625,
0.015777587890625,
0.0009851455688476562,
0.0139617919921875,
-0.009765625,
-0.002101898193359375,
0.011444091796875,
0.00431060791015625,
-0.0218505859375,
-0.0291290283203125,
0.0027637481689453125,
-0.0169677734375,
-0.01488494873046875,
-0.01226043701171875,
-0.060943603515625,
0.017364501953125,
-0.027313232421875,
-0.04620361328125,
-0.029571533203125,
-0.0328369140625,
0.01446533203125,
-0.0213165283203125,
0.004253387451171875,
-0.037200927734375,
-0.06182861328125,
-0.0015764236450195312,
-0.0214080810546875,
-0.037139892578125,
0.007114410400390625,
0.031280517578125,
0.0235595703125,
-0.0009365081787109375,
0.03326416015625,
0.004611968994140625,
0.0305633544921875,
0.0186614990234375,
-0.005367279052734375,
-0.0035400390625,
-0.01184844970703125,
0.0111541748046875,
-0.004802703857421875,
-0.01065826416015625,
-0.02337646484375,
0.0775146484375,
-0.00604248046875,
-0.0007414817810058594,
0.0018815994262695312,
-0.0226898193359375,
0.0128021240234375,
0.00370025634765625,
-0.0340576171875,
-0.03399658203125,
-0.0260467529296875,
0.08306884765625,
-0.03887939453125,
0.07598876953125,
-0.0616455078125,
-0.034881591796875,
0.029144287109375,
-0.051727294921875,
0.05535888671875,
0.003986358642578125,
-0.00380706787109375,
0.0221099853515625,
0.0006766319274902344,
0.015899658203125,
-0.03472900390625,
0.006011962890625,
-0.0499267578125,
0.032684326171875,
-0.022552490234375,
-0.007617950439453125,
-0.03778076171875,
-0.00304412841796875,
0.0216064453125,
0.01407623291015625,
-0.005649566650390625,
-0.049530029296875,
0.002353668212890625,
-0.0238037109375,
-0.0259246826171875,
-0.004848480224609375,
-0.00464630126953125,
0.038482666015625,
0.0009074211120605469,
0.0235137939453125,
-0.0020999908447265625,
0.04705810546875,
-0.0017213821411132812,
-0.00228118896484375,
-0.0203094482421875,
-0.0021820068359375,
0.03271484375,
0.037841796875,
-0.015777587890625,
0.04266357421875,
-0.0176239013671875,
0.055084228515625,
0.056396484375,
-0.0306854248046875,
0.0218963623046875,
0.007587432861328125,
0.00847625732421875,
-0.076416015625,
0.003131866455078125,
-0.0166168212890625,
0.0095672607421875,
0.01161956787109375,
0.0299224853515625,
0.039825439453125,
0.00730133056640625,
0.00553131103515625,
-0.0115814208984375,
-0.02142333984375,
-0.007282257080078125,
0.01849365234375,
0.020233154296875,
-0.00785064697265625,
-0.007404327392578125,
0.006443023681640625,
0.028900146484375,
-0.000039517879486083984,
0.057708740234375,
0.01220703125,
0.0753173828125,
-0.044921875,
0.03265380859375,
-0.0132293701171875,
-0.004215240478515625,
0.020172119140625,
-0.0276031494140625,
-0.04705810546875,
0.00580596923828125,
-0.01294708251953125,
-0.005489349365234375,
-0.0041961669921875,
0.0440673828125,
-0.0305023193359375,
0.0224151611328125,
-0.027679443359375,
0.01287841796875,
-0.0594482421875,
0.01062774658203125,
0.051239013671875,
0.0382080078125,
-0.03533935546875,
-0.00679779052734375,
-0.04888916015625,
-0.0261383056640625,
-0.093505859375,
-0.0362548828125,
-0.039337158203125,
0.0303802490234375,
0.005283355712890625,
0.036834716796875,
-0.0221710205078125,
-0.002803802490234375,
0.0163726806640625,
0.0078887939453125,
-0.033050537109375,
0.0513916015625,
0.0284576416015625,
0.05596923828125,
-0.0479736328125,
0.066650390625,
0.0208282470703125,
0.017303466796875,
-0.054840087890625,
-0.0257720947265625,
-0.042816162109375,
-0.0286865234375,
0.044586181640625,
0.02020263671875,
0.0260467529296875,
-0.00012105703353881836,
0.022308349609375,
0.0202789306640625,
0.0158233642578125,
-0.0401611328125,
-0.01165008544921875,
-0.0213623046875,
0.060638427734375,
-0.06683349609375,
-0.02117919921875,
0.03961181640625,
-0.033203125,
-0.0149078369140625,
0.00848388671875,
0.0248565673828125,
-0.0011110305786132812,
-0.020294189453125,
-0.0190582275390625,
0.0230255126953125,
-0.0007390975952148438,
0.002819061279296875,
0.030487060546875,
-0.0170135498046875,
0.030120849609375,
0.014251708984375,
0.0128021240234375,
0.02001953125,
0.0537109375,
-0.05352783203125,
-0.06402587890625,
0.0301666259765625,
0.0254364013671875,
-0.043853759765625,
0.018310546875,
-0.02496337890625,
0.0249481201171875,
0.09619140625,
0.09130859375,
-0.1314697265625,
0.005565643310546875,
0.00826263427734375,
-0.01534271240234375,
0.0300445556640625,
-0.0014438629150390625,
-0.0274810791015625,
-0.046600341796875,
0.035797119140625,
0.007171630859375,
-0.01904296875,
-0.007381439208984375,
0.01255035400390625,
-0.007537841796875,
-0.0133514404296875,
-0.01186370849609375,
0.00939178466796875,
0.0186920166015625,
-0.00475311279296875,
-0.006534576416015625,
0.0255126953125,
-0.046905517578125,
0.0023860931396484375,
0.02215576171875,
0.004467010498046875,
0.00553131103515625,
0.08892822265625,
-0.017303466796875,
0.04058837890625,
-0.004169464111328125,
-0.02679443359375,
-0.013824462890625,
0.022705078125,
-0.038055419921875,
0.0059814453125,
-0.0037517547607421875,
-0.047119140625,
-0.060089111328125,
-0.0289459228515625,
0.0322265625,
0.05242919921875,
-0.02874755859375,
0.035736083984375,
-0.018341064453125,
-0.0372314453125,
-0.00934600830078125,
0.01059722900390625,
0.072998046875,
-0.06402587890625,
-0.00003653764724731445,
0.031768798828125,
0.017822265625,
-0.0095062255859375,
0.00028228759765625,
-0.0111846923828125,
-0.050201416015625,
0.010009765625,
-0.002193450927734375,
0.004688262939453125,
0.0175323486328125,
-0.00862884521484375,
-0.008270263671875,
0.08349609375,
0.0173797607421875,
-0.05029296875,
0.01065826416015625,
0.05621337890625,
-0.0400390625,
0.043548583984375,
-0.051910400390625,
0.04559326171875,
-0.043121337890625,
0.057586669921875,
-0.05328369140625,
0.0081634521484375,
0.0061187744140625,
-0.00829315185546875,
0.0200958251953125,
0.010406494140625,
-0.044769287109375,
0.01308441162109375,
0.0391845703125,
0.00624847412109375,
-0.01555633544921875,
0.052978515625,
-0.00783538818359375,
-0.007625579833984375,
0.007434844970703125,
-0.0208740234375,
0.017303466796875,
-0.0285186767578125,
-0.004573822021484375,
0.01363372802734375,
-0.0092010498046875,
-0.024993896484375,
-0.023101806640625,
0.034149169921875,
0.0031585693359375,
-0.015838623046875,
-0.028228759765625,
0.0178070068359375,
0.006927490234375,
0.0224151611328125,
0.0013475418090820312,
0.0168914794921875,
-0.00530242919921875,
-0.01399993896484375,
0.03082275390625,
-0.001300811767578125,
0.01507568359375,
0.058563232421875,
0.0163116455078125,
0.0078887939453125,
-0.006591796875,
0.0166015625,
-0.002719879150390625,
-0.022003173828125,
0.046966552734375,
-0.0008244514465332031,
0.01067352294921875,
-0.049652099609375,
-0.013336181640625,
0.0020656585693359375,
0.047027587890625,
-0.0301055908203125,
-0.0007114410400390625,
0.01509857177734375,
0.019073486328125,
0.0160369873046875,
-0.042144775390625,
0.0258941650390625,
-0.00493621826171875,
0.0263671875,
0.02490234375,
-0.00940704345703125,
-0.01214599609375,
0.0017728805541992188,
0.0206756591796875,
0.07000732421875,
-0.0180816650390625,
-0.0176849365234375,
-0.01340484619140625,
0.0198211669921875,
-0.006923675537109375,
0.00934600830078125,
-0.016845703125,
0.03521728515625,
0.005084991455078125,
0.00873565673828125,
-0.002685546875,
0.0147705078125,
-0.01343536376953125,
0.0027103424072265625,
0.011627197265625,
-0.01358795166015625,
-0.0258636474609375,
0.03057861328125,
0.04400634765625,
0.0241546630859375,
0.038604736328125,
0.0261383056640625,
0.012237548828125,
0.019378662109375,
0.055755615234375,
-0.00421905517578125,
0.01137542724609375,
-0.0277252197265625,
0.0022125244140625,
0.01010894775390625,
-0.01544189453125,
-0.002849578857421875,
-0.0288848876953125,
0.06658935546875,
-0.028656005859375,
-0.004154205322265625,
-0.0107879638671875,
-0.04833984375,
0.08001708984375,
-0.016326904296875,
0.07550048828125,
-0.005329132080078125,
-0.0194854736328125,
-0.00530242919921875,
-0.02764892578125,
-0.01424407958984375,
0.01541900634765625,
0.0357666015625,
0.0035762786865234375,
0.00913238525390625,
-0.006664276123046875,
0.0116119384765625,
0.0014972686767578125,
0.0215301513671875,
-0.0250091552734375,
-0.00258636474609375,
0.04046630859375,
-0.00550079345703125,
-0.04046630859375,
-0.01910400390625,
-0.01409149169921875,
0.04083251953125,
0.050018310546875,
0.048187255859375,
-0.015655517578125,
0.041168212890625,
0.0300750732421875,
-0.007495880126953125,
0.042205810546875,
0.0191802978515625,
0.004245758056640625,
0.0262603759765625,
0.0201416015625,
-0.03485107421875,
-0.03924560546875,
0.0258331298828125,
0.01215362548828125,
-0.01166534423828125,
-0.0030002593994140625,
-0.000827789306640625,
0.02142333984375,
0.0188751220703125,
0.040191650390625,
-0.017791748046875,
-0.028228759765625,
-0.04144287109375,
-0.0106353759765625,
0.03369140625,
0.028167724609375,
-0.0205078125,
-0.00864410400390625,
-0.042327880859375,
0.023834228515625,
-0.01235198974609375,
0.03326416015625,
-0.0565185546875,
0.0003056526184082031,
-0.04901123046875,
0.033782958984375,
0.0101165771484375,
-0.0292510986328125,
0.051361083984375,
-0.0081329345703125,
-0.0193023681640625,
0.00376129150390625,
-0.037811279296875,
-0.033477783203125,
-0.0762939453125,
0.0178985595703125,
-0.0007648468017578125,
-0.0102081298828125,
-0.0953369140625,
0.0323486328125,
0.0255584716796875,
-0.04437255859375,
-0.01430511474609375,
-0.06707763671875,
-0.0262603759765625,
-0.0014963150024414062,
-0.036834716796875,
-0.036468505859375,
0.0210113525390625,
-0.0135040283203125,
0.035552978515625,
0.0024013519287109375,
-0.043121337890625,
0.041290283203125,
-0.027618408203125,
-0.018310546875,
-0.00445556640625,
-0.040740966796875,
0.01611328125,
0.033538818359375,
-0.026214599609375,
-0.02020263671875,
-0.033599853515625,
-0.017242431640625,
-0.042388916015625,
0.01776123046875,
0.042205810546875,
-0.043121337890625,
-0.055267333984375,
0.004962921142578125,
0.0479736328125,
0.05621337890625,
0.06182861328125,
-0.047027587890625,
-0.016571044921875,
0.0010442733764648438,
0.00978851318359375,
-0.0152130126953125,
0.032806396484375,
-0.0740966796875,
-0.0355224609375,
-0.0033740997314453125,
0.008575439453125,
0.044219970703125,
-0.0310821533203125,
-0.08782958984375,
0.09130859375,
-0.024322509765625,
-0.0220947265625,
-0.0477294921875,
0.0323486328125,
0.049713134765625,
-0.07647705078125,
-0.038848876953125,
0.029937744140625,
-0.057708740234375,
-0.021820068359375,
0.006755828857421875,
0.0231781005859375,
0.035797119140625,
-0.0171356201171875,
-0.032562255859375,
-0.01505279541015625,
-0.0281524658203125,
0.01430511474609375,
0.0305328369140625,
-0.017547607421875,
-0.002712249755859375,
0.020416259765625,
-0.051971435546875,
-0.08111572265625,
-0.048065185546875,
-0.0227508544921875,
-0.019989013671875,
-0.0198822021484375,
0.00019693374633789062,
0.011749267578125,
0.049346923828125,
0.034759521484375,
0.007389068603515625,
-0.05474853515625,
0.036956787109375,
0.0158843994140625,
-0.04412841796875,
-0.0272369384765625,
0.0220794677734375,
-0.04608154296875,
-0.0277557373046875,
-0.024810791015625,
-0.004047393798828125,
0.0004782676696777344,
0.00972747802734375,
-0.0325927734375,
-0.0186309814453125,
-0.034423828125,
-0.0196075439453125,
-0.06976318359375,
0.00484466552734375,
0.0250701904296875,
-0.036224365234375,
-0.0126495361328125,
0.00899505615234375,
0.003421783447265625,
-0.01385498046875,
0.010711669921875,
0.06201171875,
0.00035381317138671875,
-0.00826263427734375,
-0.0088043212890625,
0.045501708984375,
0.0193023681640625,
0.022918701171875,
-0.06329345703125,
-0.00001817941665649414,
0.021240234375,
-0.00485992431640625,
0.0287628173828125,
-0.0191650390625,
0.01092529296875,
-0.0015935897827148438,
0.060302734375,
-0.00945281982421875,
0.052398681640625,
-0.0297393798828125,
0.05230712890625,
0.02362060546875,
-0.0231781005859375,
0.05487060546875,
-0.0035495758056640625,
0.0126953125,
0.0019702911376953125,
0.037261962890625,
-0.0369873046875,
0.032379150390625,
0.032806396484375,
0.0194244384765625,
0.0215911865234375
]
|
28c5a04200d7fabf29b8bb6d5b25d3c23589abcd | Wordpress Stackexchange
Q: How to check if the user registration is allowed/active? I need to run a code snippet if the user registration is allowed, but I can't find a solution. How to do this?
A: You can check it very easily with the help of get_option.
Here is a simple code for checking if user registration is allowed.
if ( get_option( 'users_can_register' ) ) {
// Your custom code or message to display if user registration is allowed.
}
get_option( 'users_can_register' ) returns boolean true (1) or false (0).
| Q: How to check if the user registration is allowed/active? I need to run a code snippet if the user registration is allowed, but I can't find a solution. How to do this?
A: You can check it very easily with the help of get_option.
Here is a simple code for checking if user registration is allowed.
if ( get_option( 'users_can_register' ) ) {
// Your custom code or message to display if user registration is allowed.
}
get_option( 'users_can_register' ) returns boolean true (1) or false (0).
| wordpress | {
"language": "en",
"length": 88,
"provenance": "stackexchange_00019.jsonl.gz:450346",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167830"
} | [
0.06829833984375,
0.021270751953125,
0.0167388916015625,
-0.02789306640625,
0.0196533203125,
-0.02667236328125,
0.0164794921875,
-0.05706787109375,
0.02215576171875,
0.0197906494140625,
-0.059173583984375,
-0.00640869140625,
-0.00021886825561523438,
-0.005374908447265625,
-0.0302581787109375,
-0.04022216796875,
0.00885009765625,
-0.004222869873046875,
-0.005413055419921875,
-0.04034423828125,
0.01019287109375,
-0.0224456787109375,
-0.01425933837890625,
0.0557861328125,
0.020660400390625,
-0.044158935546875,
0.0806884765625,
-0.0128326416015625,
0.0132293701171875,
-0.01154327392578125,
0.0182952880859375,
-0.00775909423828125,
-0.037200927734375,
0.040496826171875,
0.023712158203125,
0.01042938232421875,
0.0355224609375,
0.03216552734375,
0.024200439453125,
0.0274810791015625,
0.034393310546875,
-0.01448822021484375,
-0.023101806640625,
0.006130218505859375,
-0.00836181640625,
-0.0767822265625,
0.0902099609375,
-0.01108551025390625,
0.02252197265625,
0.00669097900390625,
0.01265716552734375,
-0.006832122802734375,
0.0273895263671875,
-0.043670654296875,
-0.0129547119140625,
0.00019800662994384766,
-0.020416259765625,
-0.01468658447265625,
0.042572021484375,
0.01263427734375,
-0.018218994140625,
-0.029510498046875,
0.028839111328125,
-0.03619384765625,
0.012054443359375,
-0.037872314453125,
-0.07708740234375,
0.04803466796875,
-0.007801055908203125,
0.00695037841796875,
0.0213775634765625,
-0.01424407958984375,
0.0012722015380859375,
0.0282440185546875,
-0.031341552734375,
-0.0557861328125,
-0.00914764404296875,
-0.039886474609375,
0.041290283203125,
0.0247955322265625,
0.0011682510375976562,
-0.0027828216552734375,
-0.0218505859375,
0.0242156982421875,
-0.0467529296875,
0.0198822021484375,
-0.01171112060546875,
-0.01331329345703125,
0.0006313323974609375,
-0.019256591796875,
0.0011882781982421875,
0.01355743408203125,
-0.005428314208984375,
0.0038623809814453125,
-0.0255584716796875,
-0.032379150390625,
0.06402587890625,
0.08770751953125,
-0.0223541259765625,
-0.034820556640625,
0.0024776458740234375,
-0.029052734375,
-0.0296173095703125,
-0.023834228515625,
0.0150909423828125,
0.10711669921875,
0.0169219970703125,
-0.002323150634765625,
-0.01157379150390625,
-0.01080322265625,
0.021514892578125,
-0.034820556640625,
-0.0232086181640625,
-0.02581787109375,
-0.04156494140625,
0.02783203125,
-0.030029296875,
-0.0140228271484375,
0.0029754638671875,
0.0031986236572265625,
0.033660888671875,
0.054718017578125,
0.05328369140625,
-0.0762939453125,
-0.01120758056640625,
-0.0003285408020019531,
-0.0292816162109375,
-0.0897216796875,
-0.002460479736328125,
0.046661376953125,
-0.0189208984375,
0.0160675048828125,
-0.04998779296875,
-0.02197265625,
-0.0386962890625,
-0.017578125,
0.004070281982421875,
0.0189208984375,
-0.00954437255859375,
0.01451873779296875,
0.0043487548828125,
-0.05328369140625,
-0.0284423828125,
0.0084991455078125,
-0.00208282470703125,
0.0188446044921875,
0.019622802734375,
0.01535797119140625,
-0.004848480224609375,
-0.040557861328125,
0.0024013519287109375,
-0.033203125,
-0.018402099609375,
0.026580810546875,
0.039337158203125,
0.02886962890625,
-0.0043487548828125,
0.01103973388671875,
0.0199127197265625,
0.0193023681640625,
0.044403076171875,
0.01044464111328125,
0.0242767333984375,
-0.0282135009765625,
-0.029388427734375,
-0.029083251953125,
-0.072021484375,
-0.00539398193359375,
0.029998779296875,
-0.00661468505859375,
0.0276031494140625,
0.029571533203125,
0.027191162109375,
0.030426025390625,
0.01593017578125,
0.0090179443359375,
0.041717529296875,
0.035125732421875,
-0.0111236572265625,
0.032257080078125,
-0.0012493133544921875,
-0.0264892578125,
0.06463623046875,
-0.046722412109375,
-0.03076171875,
0.031829833984375,
-0.0007214546203613281,
-0.0032958984375,
0.02423095703125,
-0.01428985595703125,
0.02105712890625,
0.036102294921875,
0.0190887451171875,
-0.03228759765625,
0.00737762451171875,
-0.036895751953125,
0.00798797607421875,
-0.031463623046875,
0.0017604827880859375,
0.03094482421875,
0.0604248046875,
-0.045013427734375,
0.034820556640625,
-0.0462646484375,
-0.06390380859375,
-0.0236663818359375,
-0.01413726806640625,
0.01064300537109375,
0.01049041748046875,
0.0248260498046875,
0.0157623291015625,
0.01555633544921875,
-0.04193115234375,
0.030975341796875,
-0.00458526611328125,
0.0361328125,
-0.0333251953125,
0.034820556640625,
-0.0041961669921875,
0.03399658203125,
-0.00667572021484375,
-0.027313232421875,
0.013671875,
0.0006895065307617188,
0.0015125274658203125,
-0.0251312255859375,
-0.007472991943359375,
-0.00849151611328125,
-0.01387786865234375,
0.0025348663330078125,
0.0182037353515625,
0.020538330078125,
-0.008056640625,
-0.03656005859375,
-0.0426025390625,
-0.0045318603515625,
-0.0033817291259765625,
-0.039031982421875,
0.01222991943359375,
0.0537109375,
0.040924072265625,
0.045623779296875,
0.00032329559326171875,
-0.01473236083984375,
0.08563232421875,
-0.036285400390625,
0.00330352783203125,
0.0013217926025390625,
-0.0029659271240234375,
0.04168701171875,
0.0008411407470703125,
0.025909423828125,
0.027496337890625,
0.04534912109375,
-0.016326904296875,
0.03656005859375,
-0.0313720703125,
-0.016448974609375,
-0.034088134765625,
0.0287322998046875,
-0.01404571533203125,
-0.06512451171875,
0.005767822265625,
-0.041229248046875,
-0.005069732666015625,
-0.0072174072265625,
-0.00907135009765625,
-0.006450653076171875,
-0.003528594970703125,
0.00799560546875,
0.010040283203125,
-0.05810546875,
0.007488250732421875,
0.0169525146484375,
0.034515380859375,
0.046478271484375,
-0.04974365234375,
-0.0076446533203125,
0.0185394287109375,
0.0189208984375,
-0.033294677734375,
-0.026641845703125,
-0.023040771484375,
-0.0011310577392578125,
0.01023101806640625,
-0.043487548828125,
0.0256195068359375,
0.0027332305908203125,
-0.0116119384765625,
-0.031158447265625,
0.0199432373046875,
-0.001720428466796875,
-0.0265350341796875,
0.02764892578125,
-0.02337646484375,
-0.0263824462890625,
-0.0256805419921875,
-0.032318115234375,
0.0231475830078125,
-0.0408935546875,
-0.0051727294921875,
0.056610107421875,
0.002994537353515625,
-0.0198211669921875,
0.007289886474609375,
-0.05230712890625,
-0.0024700164794921875,
0.01169586181640625,
0.003021240234375,
-0.03448486328125,
-0.01151275634765625,
0.057342529296875,
0.002140045166015625,
-0.01009368896484375,
0.006626129150390625,
-0.0203704833984375,
-0.0174102783203125,
-0.022064208984375,
-0.05255126953125,
-0.051116943359375,
-0.07745361328125,
-0.04766845703125,
0.0227508544921875,
0.0098876953125,
0.004642486572265625,
0.005889892578125,
0.0267791748046875,
0.0268707275390625,
-0.041473388671875,
-0.0175323486328125,
-0.03302001953125,
-0.06011962890625,
-0.0265960693359375,
0.0296630859375,
-0.007266998291015625,
0.00014221668243408203,
-0.0087127685546875,
0.052581787109375,
-0.0095977783203125,
-0.0325927734375,
-0.030517578125,
-0.0169830322265625,
-0.00484466552734375,
-0.0120697021484375,
-0.0235595703125,
-0.009063720703125,
0.02484130859375,
0.0094757080078125,
-0.01678466796875,
-0.0183868408203125,
0.0223388671875,
-0.032379150390625,
0.027679443359375,
-0.03424072265625,
0.025543212890625,
0.03778076171875,
-0.043365478515625,
-0.00788116455078125,
0.039031982421875,
-0.043060302734375,
0.00630950927734375,
0.01654052734375,
-0.0211334228515625,
-0.028167724609375,
0.006927490234375,
-0.0301055908203125,
0.00853729248046875,
-0.0352783203125,
-0.0058135986328125,
0.02362060546875,
-0.037200927734375,
-0.03961181640625,
0.0732421875,
0.004589080810546875,
0.0261688232421875,
0.01739501953125,
0.008880615234375,
-0.01189422607421875,
-0.0214385986328125,
-0.0276031494140625,
0.0250396728515625,
-0.060089111328125,
0.08038330078125,
-0.10345458984375,
-0.08599853515625,
0.057464599609375,
0.0089874267578125,
-0.034210205078125,
-0.004116058349609375,
-0.03643798828125,
0.02862548828125,
0.09600830078125,
0.0202789306640625,
-0.031768798828125,
-0.01678466796875,
-0.0166778564453125,
-0.01947021484375,
0.05096435546875,
-0.0273895263671875,
0.006927490234375,
-0.0197601318359375,
-0.00856781005859375,
-0.00846099853515625,
-0.0253143310546875,
-0.0206756591796875,
-0.0811767578125,
-0.03216552734375,
-0.017791748046875,
0.03131103515625,
-0.0264129638671875,
0.0226593017578125,
-0.006969451904296875,
-0.0018663406372070312,
-0.0308685302734375,
-0.00667572021484375,
-0.024932861328125,
-0.08251953125,
-0.0103302001953125,
-0.042755126953125,
0.05999755859375,
0.041900634765625,
-0.0338134765625,
-0.0022640228271484375,
0.036285400390625,
0.02349853515625,
-0.0175628662109375,
0.016387939453125,
-0.0159454345703125,
0.037017822265625,
-0.01245880126953125,
-0.0233001708984375,
-0.020721435546875,
0.004955291748046875,
0.00048065185546875,
-0.0345458984375,
0.023406982421875,
-0.0404052734375,
0.0228729248046875,
0.00218963623046875,
-0.03125,
-0.0235137939453125,
-0.000026524066925048828,
-0.031646728515625,
-0.02294921875,
-0.0165252685546875,
-0.0244903564453125,
0.020416259765625,
-0.052886962890625,
0.04754638671875,
-0.0308380126953125,
0.00743865966796875,
-0.0117645263671875,
0.1005859375,
0.0134124755859375,
-0.005161285400390625,
-0.00902557373046875,
0.0160064697265625,
0.033355712890625,
0.0045928955078125,
0.0135650634765625,
0.025054931640625,
-0.02044677734375,
0.005336761474609375,
0.01445770263671875,
-0.0011682510375976562,
0.00395965576171875,
-0.01013946533203125,
0.022796630859375,
0.004505157470703125,
-0.027801513671875,
0.0184783935546875,
0.0121307373046875,
0.03375244140625,
0.0012722015380859375,
-0.039306640625,
0.0126190185546875,
0.041748046875,
-0.0214080810546875,
0.02655029296875,
-0.01161956787109375,
-0.0419921875,
0.012359619140625,
-0.04693603515625,
0.006748199462890625,
-0.00604248046875,
0.0094451904296875,
0.0003943443298339844,
0.0139617919921875,
0.0065765380859375,
-0.0005736351013183594,
-0.0195465087890625,
0.018096923828125,
0.0465087890625,
-0.02813720703125,
0.0305938720703125,
-0.007396697998046875,
-0.013427734375,
0.07098388671875,
-0.01071929931640625,
-0.061981201171875,
0.00870513916015625,
-0.01739501953125,
0.037109375,
0.033111572265625,
0.036895751953125,
0.048187255859375,
0.031341552734375,
0.00461578369140625,
-0.01474761962890625,
0.013916015625,
0.03619384765625,
-0.045989990234375,
0.0022487640380859375,
-0.02496337890625,
-0.00873565673828125,
-0.00485992431640625,
0.0186004638671875,
0.01160430908203125,
-0.0084228515625,
-0.0084686279296875,
0.06011962890625,
0.07177734375,
-0.00795745849609375,
0.01001739501953125,
0.0297088623046875,
-0.03070068359375,
-0.01450347900390625,
0.0016651153564453125,
-0.0187225341796875,
-0.0006203651428222656,
-0.0033130645751953125,
0.025054931640625,
0.006282806396484375,
-0.005130767822265625,
0.0038299560546875,
-0.023284912109375,
-0.03240966796875,
0.016204833984375,
-0.019073486328125,
-0.046905517578125,
-0.038482666015625,
-0.0166473388671875,
0.019378662109375,
-0.00948333740234375,
0.00909423828125,
-0.018951416015625,
-0.0006818771362304688,
-0.0122833251953125,
0.04278564453125,
-0.03375244140625,
-0.0304412841796875,
-0.0222930908203125,
-0.05035400390625,
-0.026123046875,
0.01081085205078125,
0.02984619140625,
0.03131103515625,
-0.0305633544921875,
-0.046234130859375,
0.0528564453125,
0.00284576416015625,
-0.0024509429931640625,
-0.051116943359375,
0.0125579833984375,
-0.02362060546875,
-0.023101806640625,
0.075439453125,
0.018798828125,
-0.07684326171875,
0.0133056640625,
-0.05377197265625,
-0.0017423629760742188,
-0.0513916015625,
-0.0362548828125,
-0.02606201171875,
0.000036656856536865234,
0.028106689453125,
0.0191192626953125,
-0.0003654956817626953,
-0.014404296875,
-0.01045989990234375,
0.0380859375,
0.0401611328125,
0.07525634765625,
0.0006461143493652344,
0.0300445556640625,
0.0164031982421875,
0.035552978515625,
0.0280914306640625,
0.01393890380859375,
-0.033355712890625,
-0.031494140625,
-0.003101348876953125,
0.02606201171875,
0.0016508102416992188,
-0.0196533203125,
0.03997802734375,
-0.0281219482421875,
0.052093505859375,
-0.00154876708984375,
-0.02142333984375,
-0.00009137392044067383,
0.0015773773193359375,
-0.0192718505859375,
0.0305023193359375,
0.01399993896484375,
-0.00598907470703125,
0.0111846923828125,
-0.0286102294921875,
-0.028472900390625,
0.0129852294921875,
-0.0152740478515625,
0.029693603515625,
-0.0086822509765625,
-0.003753662109375,
0.0013523101806640625,
-0.037933349609375,
0.036895751953125,
0.0214385986328125,
-0.0141754150390625,
0.035736083984375,
0.0017938613891601562,
0.02734375,
0.0289459228515625,
0.003299713134765625,
-0.0753173828125,
-0.005046844482421875,
-0.004184722900390625,
0.003997802734375,
-0.011962890625,
-0.006153106689453125,
0.0017070770263671875,
0.018218994140625,
0.06634521484375,
0.07598876953125,
-0.09716796875,
0.017730712890625,
0.02703857421875,
-0.0015745162963867188,
0.01389312744140625,
0.0125885009765625,
-0.0022258758544921875,
-0.02447509765625,
0.052520751953125,
-0.02813720703125,
-0.0013666152954101562,
0.031585693359375,
-0.027679443359375,
-0.0169677734375,
-0.01413726806640625,
0.0767822265625,
0.03106689453125,
-0.001033782958984375,
-0.0007967948913574219,
-0.0018835067749023438,
0.011871337890625,
-0.02532958984375,
0.033050537109375,
-0.03857421875,
0.03131103515625,
-0.022674560546875,
0.013427734375,
-0.028289794921875,
0.01213836669921875,
0.0165557861328125,
-0.01132965087890625,
0.03631591796875,
0.041748046875,
-0.005886077880859375,
-0.0018825531005859375,
0.015380859375,
-0.0262451171875,
-0.054229736328125,
-0.0088348388671875,
0.00629425048828125,
0.009674072265625,
-0.0147705078125,
0.0309295654296875,
-0.0343017578125,
-0.02459716796875,
-0.0271759033203125,
-0.0797119140625,
0.0521240234375,
-0.018096923828125,
-0.0005383491516113281,
0.01342010498046875,
0.020172119140625,
-0.0094757080078125,
0.0009551048278808594,
0.000789642333984375,
-0.006488800048828125,
-0.0007181167602539062,
-0.00376129150390625,
-0.047607421875,
-0.0031986236572265625,
-0.0034885406494140625,
-0.0280303955078125,
0.0550537109375,
-0.022216796875,
-0.0003178119659423828,
0.0031490325927734375,
0.0310821533203125,
-0.00017547607421875,
0.0273895263671875,
-0.06927490234375,
0.051513671875,
0.0006961822509765625,
0.05255126953125,
-0.0626220703125,
0.00724029541015625,
0.007801055908203125,
-0.0101318359375,
0.0230712890625,
0.0225372314453125,
-0.0003914833068847656,
-0.021453857421875,
-0.0248565673828125,
-0.0092010498046875,
-0.048797607421875,
0.0228118896484375,
-0.0204620361328125,
0.0360107421875,
0.03704833984375,
-0.049041748046875,
0.01568603515625,
-0.0070037841796875,
-0.0309600830078125,
-0.0027618408203125,
-0.016448974609375,
-0.01580810546875,
-0.01264190673828125,
-0.006122589111328125,
-0.0194854736328125,
-0.01192474365234375,
-0.00909423828125,
-0.00116729736328125,
-0.041595458984375,
0.0355224609375,
-0.044189453125,
0.024505615234375,
0.058135986328125,
-0.03277587890625,
0.0281219482421875,
-0.0294647216796875,
0.034942626953125,
0.0110321044921875,
0.0225372314453125,
0.00983428955078125,
0.0122222900390625,
0.029937744140625,
0.044891357421875,
-0.037750244140625,
0.0221099853515625,
0.037750244140625,
0.01261138916015625,
-0.0266265869140625,
-0.00922393798828125,
0.0506591796875,
0.037139892578125,
-0.029571533203125,
-0.023895263671875,
0.01385498046875,
0.0201416015625,
0.0018968582153320312,
0.010284423828125,
0.0234832763671875,
-0.007190704345703125,
0.037750244140625,
-0.077392578125,
-0.0098724365234375,
0.029754638671875,
0.023223876953125,
-0.010223388671875,
-0.01103973388671875,
-0.004024505615234375,
-0.035186767578125,
-0.030059814453125,
-0.0016355514526367188,
0.01568603515625,
0.00432586669921875,
0.00885772705078125,
0.01300811767578125,
0.050933837890625,
0.011199951171875,
-0.0225677490234375,
0.041961669921875,
0.0006337165832519531,
0.0250091552734375,
-0.0540771484375,
-0.048187255859375,
0.0145263671875,
0.04803466796875,
-0.0034656524658203125,
-0.04327392578125,
-0.0264892578125,
0.02398681640625,
0.0214385986328125,
-0.01751708984375,
0.08892822265625,
0.018035888671875,
-0.01052093505859375,
-0.0268096923828125,
0.004138946533203125,
0.004547119140625,
-0.004314422607421875,
0.0111846923828125,
-0.01180267333984375,
0.04840087890625,
-0.0148162841796875,
0.03009033203125,
-0.001888275146484375,
-0.002490997314453125,
0.01393890380859375,
0.009368896484375,
0.01317596435546875,
0.01131439208984375,
-0.09881591796875,
-0.018280029296875,
-0.0494384765625,
-0.022064208984375,
0.030517578125,
0.0185699462890625,
-0.01120758056640625,
0.030548095703125,
0.016143798828125,
-0.03948974609375,
0.04522705078125,
0.0239410400390625,
-0.00351715087890625,
0.014892578125,
0.01183319091796875,
-0.02587890625,
-0.035888671875,
-0.0098876953125,
0.0157623291015625,
0.01213836669921875,
-0.00872802734375,
0.03668212890625,
-0.007549285888671875,
-0.00247955322265625,
-0.025390625,
-0.02667236328125,
0.004253387451171875,
-0.025238037109375,
0.021728515625,
-0.006107330322265625,
-0.019073486328125,
-0.005706787109375,
-0.035064697265625,
0.07806396484375,
0.01042938232421875,
0.0401611328125,
0.07049560546875,
-0.02569580078125,
-0.01253509521484375,
-0.00830841064453125,
-0.00616455078125,
-0.046417236328125,
-0.07879638671875,
-0.0288543701171875,
0.0302734375,
-0.024688720703125,
-0.0138702392578125,
-0.017242431640625,
0.012969970703125,
-0.05511474609375,
-0.07598876953125,
-0.0086212158203125,
-0.0469970703125,
-0.033599853515625,
0.0249176025390625,
-0.0027599334716796875,
0.01483154296875,
0.0213470458984375,
-0.01070404052734375,
0.025054931640625,
0.01247406005859375,
-0.0085601806640625,
0.028533935546875,
-0.0207672119140625,
-0.011810302734375,
0.03515625,
0.0135650634765625,
-0.0362548828125,
-0.002117156982421875,
0.041168212890625,
-0.047210693359375,
0.038726806640625,
-0.026641845703125,
-0.028045654296875,
-0.03521728515625,
0.0112762451171875,
0.02532958984375,
0.00476837158203125,
-0.006500244140625,
-0.017242431640625,
-0.01006317138671875,
0.01380157470703125,
-0.033294677734375,
-0.01123809814453125,
-0.033721923828125,
-0.0036468505859375,
0.06317138671875,
-0.05126953125,
-0.01132965087890625,
0.019805908203125,
0.01507568359375,
-0.03277587890625,
0.00762939453125,
0.0023059844970703125,
0.00913238525390625,
0.0261383056640625,
0.01111602783203125,
0.061553955078125,
-0.01107025146484375,
-0.06866455078125,
0.02276611328125,
-0.0240631103515625,
0.05767822265625,
0.0013895034790039062,
-0.00977325439453125,
0.023529052734375,
0.0172882080078125,
-0.0372314453125,
-0.059234619140625,
-0.0014934539794921875,
-0.01287078857421875,
-0.0108795166015625,
-0.064453125,
0.04046630859375,
0.05712890625,
-0.02960205078125,
-0.1031494140625,
0.031524658203125,
-0.04791259765625,
-0.041656494140625,
-0.07281494140625,
0.01947021484375,
0.0199737548828125,
-0.0296478271484375,
-0.03302001953125,
-0.0014829635620117188,
-0.02545166015625,
0.0306243896484375,
0.027496337890625,
0.039794921875,
0.032562255859375,
0.0285491943359375,
-0.045074462890625,
0.0018110275268554688,
-0.0307769775390625,
0.0312347412109375,
0.01279449462890625,
-0.0142059326171875,
0.02716064453125,
0.046173095703125,
-0.0229644775390625,
-0.029022216796875,
-0.0159149169921875,
-0.0199737548828125,
-0.0214691162109375,
-0.0814208984375,
0.024932861328125,
-0.020355224609375,
0.00774383544921875,
0.0036640167236328125,
-0.0181884765625,
-0.01641845703125,
-0.0699462890625,
-0.0182342529296875,
-0.0215606689453125,
-0.014251708984375,
0.036651611328125,
-0.088623046875,
0.0155487060546875,
-0.002742767333984375,
-0.029876708984375,
-0.01355743408203125,
0.0278778076171875,
-0.041748046875,
0.00769805908203125,
0.00823211669921875,
-0.00804901123046875,
-0.05535888671875,
-0.0019283294677734375,
-0.002185821533203125,
-0.01486968994140625,
-0.04559326171875,
-0.0020923614501953125,
0.006587982177734375,
-0.052734375,
-0.00753021240234375,
0.046722412109375,
0.0274200439453125,
-0.05438232421875,
0.005336761474609375,
0.01525115966796875,
0.0219879150390625,
-0.038543701171875,
-0.0311279296875,
0.0034770965576171875,
0.0253143310546875,
0.01300811767578125,
0.03558349609375,
-0.0115966796875,
0.06610107421875,
0.01346588134765625,
0.00835418701171875,
0.019134521484375,
0.0091705322265625,
-0.01776123046875,
0.054718017578125,
-0.00630950927734375,
-0.0291748046875,
-0.0003554821014404297,
-0.022735595703125,
-0.005157470703125,
0.01395416259765625,
-0.022918701171875,
-0.032440185546875,
0.0396728515625,
-0.0295562744140625,
-0.012420654296875,
0.0201416015625
]
|
b68deb9a63cbe5005785a60944968b4ee3fe3fb4 | Wordpress Stackexchange
Q: Forbid contributors viewing drafts Is there any way I can forbid a contributor to view draft posts? Right now any contributor can view my draft posts and even edit them (however their edits must be approved by administrator first).
A: Yes, but you might need a plugin like 'User Role Editor'. You can then edit the capabilities of roles, including contributors.
So they can edit their own posts/drafts, but not the posts/drafts of others you should ensure that core capabilities:
*
*edit_posts is checked.
*edit_others_posts is unchecked
| Q: Forbid contributors viewing drafts Is there any way I can forbid a contributor to view draft posts? Right now any contributor can view my draft posts and even edit them (however their edits must be approved by administrator first).
A: Yes, but you might need a plugin like 'User Role Editor'. You can then edit the capabilities of roles, including contributors.
So they can edit their own posts/drafts, but not the posts/drafts of others you should ensure that core capabilities:
*
*edit_posts is checked.
*edit_others_posts is unchecked
| wordpress | {
"language": "en",
"length": 88,
"provenance": "stackexchange_00019.jsonl.gz:450372",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167909"
} | [
0.04913330078125,
-0.02825927734375,
0.03680419921875,
-0.01412200927734375,
-0.026763916015625,
-0.0090789794921875,
-0.000017702579498291016,
-0.044708251953125,
0.0027523040771484375,
0.0308990478515625,
-0.0200958251953125,
-0.03277587890625,
-0.003620147705078125,
-0.01137542724609375,
-0.039459228515625,
-0.04229736328125,
0.0228729248046875,
-0.0044403076171875,
0.0243988037109375,
-0.0161285400390625,
0.00616455078125,
-0.0041351318359375,
0.034332275390625,
0.0170440673828125,
0.0108642578125,
0.09161376953125,
-0.010101318359375,
0.0170440673828125,
-0.02471923828125,
0.006473541259765625,
0.0234375,
-0.047515869140625,
0.001605987548828125,
0.0193328857421875,
-0.00208282470703125,
0.016326904296875,
-0.0032444000244140625,
0.020751953125,
0.029296875,
-0.01163482666015625,
0.0279388427734375,
-0.009796142578125,
-0.10198974609375,
0.0276641845703125,
-0.0706787109375,
-0.036285400390625,
0.0296783447265625,
0.0212860107421875,
0.0230255126953125,
0.0274810791015625,
0.0265350341796875,
0.0248870849609375,
0.0189666748046875,
0.034149169921875,
-0.0169219970703125,
-0.02001953125,
-0.0018625259399414062,
0.0394287109375,
0.0487060546875,
-0.05816650390625,
-0.0305328369140625,
-0.007778167724609375,
0.034332275390625,
0.035614013671875,
-0.007671356201171875,
0.005046844482421875,
0.0173797607421875,
0.0228729248046875,
-0.034881591796875,
-0.017822265625,
0.01406097412109375,
-0.0227203369140625,
0.02783203125,
-0.004268646240234375,
-0.0252685546875,
-0.0290069580078125,
0.01100921630859375,
-0.00891876220703125,
0.0235748291015625,
-0.01308441162109375,
0.0026683807373046875,
-0.006969451904296875,
-0.033416748046875,
-0.004215240478515625,
-0.0131378173828125,
-0.00213623046875,
-0.007106781005859375,
-0.01383209228515625,
0.01464080810546875,
0.006900787353515625,
0.0061187744140625,
-0.01207733154296875,
-0.0222625732421875,
0.0758056640625,
0.000698089599609375,
-0.00652313232421875,
0.044525146484375,
0.050323486328125,
-0.007640838623046875,
-0.01904296875,
-0.00801849365234375,
-0.0199432373046875,
-0.05755615234375,
-0.004894256591796875,
-0.01198577880859375,
0.0086212158203125,
-0.0232086181640625,
-0.01004791259765625,
0.0088653564453125,
0.050750732421875,
-0.0029735565185546875,
-0.04718017578125,
-0.01494598388671875,
-0.024139404296875,
-0.0009741783142089844,
0.0254974365234375,
-0.0257720947265625,
0.0220947265625,
0.0030498504638671875,
0.04425048828125,
-0.0261993408203125,
-0.007022857666015625,
-0.004253387451171875,
0.0300445556640625,
0.042724609375,
0.0347900390625,
-0.0195770263671875,
0.0144500732421875,
0.0052642822265625,
0.004608154296875,
-0.0191802978515625,
0.005229949951171875,
0.06842041015625,
0.05084228515625,
0.027801513671875,
-0.0111846923828125,
0.0178680419921875,
0.00948333740234375,
-0.04229736328125,
0.027313232421875,
-0.03411865234375,
0.019927978515625,
0.043365478515625,
-0.07672119140625,
-0.031402587890625,
0.032989501953125,
0.0277557373046875,
0.00829315185546875,
-0.01049041748046875,
-0.01959228515625,
-0.089599609375,
0.04150390625,
0.012908935546875,
-0.01551055908203125,
0.0538330078125,
-0.0292816162109375,
0.0565185546875,
-0.032562255859375,
0.01183319091796875,
-0.00885009765625,
0.046844482421875,
0.01390838623046875,
0.0200958251953125,
0.00478363037109375,
-0.03643798828125,
-0.015350341796875,
-0.03515625,
-0.0166473388671875,
0.0248565673828125,
0.0041961669921875,
0.005718231201171875,
-0.037353515625,
0.032928466796875,
-0.006443023681640625,
-0.021942138671875,
0.032257080078125,
0.0266571044921875,
0.005268096923828125,
-0.0114593505859375,
0.0396728515625,
-0.01055145263671875,
-0.03851318359375,
0.0244140625,
-0.0127716064453125,
-0.038482666015625,
0.01461029052734375,
-0.01036834716796875,
-0.00957489013671875,
0.04632568359375,
-0.0054168701171875,
0.015716552734375,
0.01806640625,
0.0166168212890625,
-0.0167083740234375,
-0.00672149658203125,
-0.069091796875,
0.004901885986328125,
-0.026611328125,
-0.012481689453125,
0.054443359375,
0.05914306640625,
-0.019287109375,
0.01010894775390625,
-0.04754638671875,
-0.03570556640625,
-0.01959228515625,
-0.00293731689453125,
0.01184844970703125,
-0.00821685791015625,
0.03271484375,
0.0172576904296875,
0.0009522438049316406,
-0.023834228515625,
0.00673675537109375,
0.0007367134094238281,
0.01226043701171875,
-0.044525146484375,
0.03338623046875,
-0.0010089874267578125,
0.00844573974609375,
0.01412200927734375,
-0.0204925537109375,
0.0179443359375,
-0.021453857421875,
0.0361328125,
-0.04095458984375,
0.0133819580078125,
-0.0246429443359375,
0.035614013671875,
-0.0004987716674804688,
-0.019073486328125,
0.0031909942626953125,
0.01336669921875,
0.0261077880859375,
0.0202789306640625,
0.007045745849609375,
0.03521728515625,
-0.10955810546875,
0.0231475830078125,
0.040313720703125,
0.01508331298828125,
0.04473876953125,
-0.0136566162109375,
0.0009984970092773438,
0.0704345703125,
-0.00495147705078125,
0.0165557861328125,
-0.0027790069580078125,
0.045654296875,
0.072509765625,
0.004245758056640625,
0.00963592529296875,
0.01288604736328125,
0.018585205078125,
0.0224761962890625,
0.01357269287109375,
-0.006988525390625,
-0.0103759765625,
0.037628173828125,
-0.0136566162109375,
0.01995849609375,
0.0030994415283203125,
-0.018341064453125,
-0.0009622573852539062,
-0.00787353515625,
-0.0188751220703125,
0.002109527587890625,
0.016387939453125,
-0.009124755859375,
-0.026153564453125,
0.0299224853515625,
0.006267547607421875,
0.0060577392578125,
0.031585693359375,
0.059661865234375,
0.0229034423828125,
-0.025848388671875,
-0.031982421875,
0.034637451171875,
0.0350341796875,
-0.0032024383544921875,
0.01445770263671875,
0.007587432861328125,
-0.019744873046875,
0.015350341796875,
-0.01629638671875,
0.0161895751953125,
-0.01511383056640625,
0.011077880859375,
0.0301971435546875,
0.045379638671875,
0.0259857177734375,
0.025726318359375,
-0.00930023193359375,
0.01297760009765625,
0.003269195556640625,
-0.01165771484375,
-0.07354736328125,
0.05523681640625,
-0.0389404296875,
0.0496826171875,
0.07904052734375,
0.0208587646484375,
0.003963470458984375,
0.00710296630859375,
0.018829345703125,
0.01166534423828125,
0.013275146484375,
-0.008941650390625,
-0.00435638427734375,
-0.0740966796875,
-0.046844482421875,
-0.0006232261657714844,
-0.0382080078125,
0.035736083984375,
0.0210113525390625,
0.002788543701171875,
0.0310211181640625,
0.0648193359375,
0.12030029296875,
-0.00034618377685546875,
-0.0325927734375,
-0.0224609375,
-0.001361846923828125,
-0.02679443359375,
-0.00757598876953125,
0.01454925537109375,
0.011505126953125,
-0.06732177734375,
-0.0024776458740234375,
-0.02593994140625,
-0.044769287109375,
-0.030853271484375,
0.024383544921875,
-0.00836181640625,
0.012786865234375,
0.0012035369873046875,
0.0435791015625,
0.00901031494140625,
-0.050506591796875,
-0.0010175704956054688,
0.04937744140625,
-0.0240936279296875,
-0.0030498504638671875,
0.0030651092529296875,
0.00015342235565185547,
-0.0011873245239257812,
0.01348114013671875,
0.031646728515625,
0.01064300537109375,
-0.021331787109375,
-0.020751953125,
-0.00797271728515625,
0.003551483154296875,
0.0226287841796875,
0.040924072265625,
-0.00119781494140625,
0.0131988525390625,
0.04351806640625,
-0.02630615234375,
0.0149688720703125,
-0.00962066650390625,
-0.035247802734375,
-0.0478515625,
0.01364898681640625,
-0.01006317138671875,
-0.030426025390625,
-0.0196075439453125,
0.07147216796875,
0.05108642578125,
0.034942626953125,
0.033782958984375,
-0.033599853515625,
-0.00351715087890625,
0.017242431640625,
-0.0552978515625,
0.0131683349609375,
-0.016082763671875,
0.036773681640625,
-0.0013666152954101562,
0.01123046875,
-0.040740966796875,
0.039642333984375,
-0.061126708984375,
-0.024993896484375,
0.006771087646484375,
-0.0706787109375,
0.0250701904296875,
-0.03326416015625,
0.0279693603515625,
-0.0291900634765625,
0.043853759765625,
-0.018463134765625,
-0.0130462646484375,
-0.0286102294921875,
0.0244598388671875,
-0.035614013671875,
-0.06256103515625,
-0.0092010498046875,
0.0026798248291015625,
0.036956787109375,
-0.0007319450378417969,
-0.0014362335205078125,
-0.018218994140625,
-0.0382080078125,
-0.05377197265625,
0.0014142990112304688,
0.00908660888671875,
0.0219268798828125,
0.017181396484375,
0.01434326171875,
-0.01404571533203125,
0.0308074951171875,
-0.03326416015625,
-0.0132598876953125,
-0.00318145751953125,
-0.12213134765625,
-0.026214599609375,
-0.03582763671875,
0.091552734375,
0.006458282470703125,
0.004077911376953125,
-0.0208892822265625,
0.061614990234375,
0.010162353515625,
0.0008831024169921875,
-0.0098876953125,
-0.0108184814453125,
-0.01227569580078125,
0.007061004638671875,
-0.0074462890625,
-0.021636962890625,
-0.0015773773193359375,
-0.04083251953125,
-0.004695892333984375,
-0.0211334228515625,
-0.056304931640625,
-0.017059326171875,
-0.046142578125,
-0.0084686279296875,
-0.0523681640625,
-0.051422119140625,
-0.055511474609375,
0.031829833984375,
-0.03582763671875,
0.01422119140625,
-0.0723876953125,
-0.070068359375,
0.019012451171875,
0.0120697021484375,
-0.006587982177734375,
0.001178741455078125,
0.022186279296875,
0.015106201171875,
-0.0227203369140625,
0.019134521484375,
-0.0187530517578125,
0.020599365234375,
0.00308990478515625,
0.09820556640625,
0.072509765625,
0.0096893310546875,
0.0406494140625,
0.007045745849609375,
-0.033355712890625,
0.0303955078125,
-0.01067352294921875,
-0.00002086162567138672,
-0.0458984375,
0.00287628173828125,
-0.01520538330078125,
0.037841796875,
-0.024322509765625,
-0.01410675048828125,
0.0162353515625,
0.01654052734375,
0.0255126953125,
-0.0360107421875,
0.041046142578125,
-0.0017595291137695312,
-0.017791748046875,
0.0028400421142578125,
-0.019866943359375,
0.0294036865234375,
0.0289154052734375,
-0.0035953521728515625,
0.01148223876953125,
0.007595062255859375,
-0.0117340087890625,
-0.014251708984375,
-0.041259765625,
0.000014662742614746094,
0.0016002655029296875,
-0.007564544677734375,
-0.02459716796875,
0.0034656524658203125,
-0.031524658203125,
0.08587646484375,
0.01291656494140625,
-0.0567626953125,
0.03460693359375,
-0.01953125,
0.032989501953125,
0.007709503173828125,
-0.0157470703125,
0.01287841796875,
0.02752685546875,
-0.010284423828125,
0.0149078369140625,
0.005748748779296875,
0.01007080078125,
-0.0294647216796875,
0.0166778564453125,
0.004608154296875,
-0.0192413330078125,
0.017974853515625,
0.00969696044921875,
-0.032562255859375,
0.014495849609375,
-0.0009984970092773438,
0.056182861328125,
0.035369873046875,
-0.02392578125,
0.0032749176025390625,
0.0626220703125,
-0.005382537841796875,
-0.035888671875,
0.00839996337890625,
0.00011610984802246094,
-0.0109405517578125,
-0.0021839141845703125,
-0.01435089111328125,
0.0309295654296875,
0.0284271240234375,
0.0225372314453125,
0.015777587890625,
-0.0259552001953125,
0.0166168212890625,
-0.0121002197265625,
-0.045745849609375,
-0.007251739501953125,
0.0015268325805664062,
-0.0059967041015625,
0.01910400390625,
-0.0023136138916015625,
-0.04132080078125,
-0.01444244384765625,
-0.02490234375,
0.01221466064453125,
-0.056884765625,
0.00860595703125,
0.023406982421875,
-0.03277587890625,
-0.039520263671875,
0.02001953125,
-0.037567138671875,
0.020751953125,
-0.0260772705078125,
-0.0272216796875,
0.036224365234375,
0.0113677978515625,
0.0227508544921875,
-0.01441192626953125,
-0.00974273681640625,
0.0218048095703125,
-0.0026378631591796875,
0.047698974609375,
-0.005077362060546875,
-0.03814697265625,
-0.0225677490234375,
-0.0531005859375,
-0.0277557373046875,
-0.036376953125,
-0.0345458984375,
-0.03240966796875,
0.0034885406494140625,
0.0187530517578125,
0.029815673828125,
-0.01064300537109375,
-0.059051513671875,
0.01026153564453125,
-0.0016927719116210938,
0.0040130615234375,
0.029388427734375,
-0.0017223358154296875,
0.043182373046875,
0.00860595703125,
0.052093505859375,
0.0204925537109375,
0.03863525390625,
-0.0104217529296875,
-0.036376953125,
0.01122283935546875,
-0.0477294921875,
-0.019683837890625,
0.02716064453125,
-0.031280517578125,
-0.004749298095703125,
-0.00836181640625,
-0.00273895263671875,
0.0027370452880859375,
-0.023834228515625,
0.024810791015625,
-0.01236724853515625,
0.024169921875,
-0.041351318359375,
-0.059600830078125,
0.03216552734375,
-0.0018434524536132812,
0.0272064208984375,
-0.01081085205078125,
-0.0189361572265625,
0.0294952392578125,
0.003231048583984375,
0.033935546875,
-0.0266265869140625,
-0.00620269775390625,
0.0178375244140625,
0.049774169921875,
-0.00574493408203125,
0.0501708984375,
0.0249481201171875,
0.03607177734375,
0.056915283203125,
0.0008635520935058594,
-0.035736083984375,
-0.0160064697265625,
-0.0070037841796875,
-0.007419586181640625,
0.025543212890625,
0.010894775390625,
0.004314422607421875,
0.00783538818359375,
0.0809326171875,
0.058135986328125,
-0.09490966796875,
-0.004047393798828125,
0.0030231475830078125,
-0.017242431640625,
0.0105438232421875,
0.00983428955078125,
-0.003963470458984375,
-0.01702880859375,
0.051544189453125,
-0.0309600830078125,
0.0006895065307617188,
0.0301971435546875,
-0.01471710205078125,
-0.00514984130859375,
-0.016204833984375,
0.03704833984375,
0.017059326171875,
-0.0321044921875,
-0.000469207763671875,
0.01558685302734375,
-0.0034542083740234375,
-0.04974365234375,
0.01175689697265625,
0.01026153564453125,
-0.0004010200500488281,
-0.033599853515625,
0.049407958984375,
0.009002685546875,
0.0261077880859375,
0.04925537109375,
0.036041259765625,
-0.0022144317626953125,
0.0640869140625,
-0.0264434814453125,
0.060516357421875,
0.037933349609375,
-0.018096923828125,
0.006534576416015625,
-0.0433349609375,
-0.010711669921875,
0.055023193359375,
0.012451171875,
0.01849365234375,
0.04864501953125,
-0.03607177734375,
0.01497650146484375,
0.0149078369140625,
0.045196533203125,
-0.00832366943359375,
-0.02935791015625,
0.051239013671875,
-0.0457763671875,
-0.033050537109375,
-0.0009441375732421875,
-0.041412353515625,
-0.022674560546875,
0.006145477294921875,
-0.0154266357421875,
-0.04229736328125,
0.01421356201171875,
-0.017791748046875,
-0.09375,
0.055023193359375,
-0.0074462890625,
0.06964111328125,
0.0013885498046875,
-0.0034465789794921875,
0.0013523101806640625,
-0.0260009765625,
-0.03692626953125,
0.056060791015625,
-0.011474609375,
0.08270263671875,
-0.05316162109375,
-0.0182952880859375,
0.037628173828125,
0.059844970703125,
0.040618896484375,
0.0158538818359375,
-0.007587432861328125,
-0.041259765625,
0.00045609474182128906,
0.034912109375,
-0.0076141357421875,
0.019775390625,
0.0165863037109375,
0.00614166259765625,
0.03485107421875,
-0.00971221923828125,
0.0526123046875,
-0.06622314453125,
-0.0041961669921875,
0.0005593299865722656,
0.02001953125,
-0.005950927734375,
0.0208740234375,
0.034149169921875,
-0.08502197265625,
0.034210205078125,
0.05035400390625,
0.031707763671875,
-0.00818634033203125,
0.0254669189453125,
0.051849365234375,
-0.038330078125,
-0.005462646484375,
-0.024749755859375,
0.05621337890625,
0.040435791015625,
0.02581787109375,
0.0345458984375,
0.02960205078125,
-0.0117645263671875,
0.025665283203125,
0.031219482421875,
0.03375244140625,
-0.038330078125,
-0.03936767578125,
0.01265716552734375,
0.0237579345703125,
-0.038055419921875,
-0.04638671875,
0.07568359375,
0.00384521484375,
0.006511688232421875,
0.030487060546875,
0.0171356201171875,
0.009124755859375,
-0.0262908935546875,
-0.034332275390625,
-0.00794219970703125,
0.0090179443359375,
0.0173187255859375,
-0.037689208984375,
-0.0087432861328125,
0.01336669921875,
0.0073699951171875,
-0.0173797607421875,
-0.047119140625,
0.04412841796875,
0.01055145263671875,
-0.005611419677734375,
-0.027130126953125,
-0.006122589111328125,
-0.0065765380859375,
0.026824951171875,
-0.013519287109375,
0.027679443359375,
0.00894927978515625,
-0.01493072509765625,
0.0450439453125,
0.0101165771484375,
-0.013671875,
-0.036407470703125,
-0.05462646484375,
0.0159759521484375,
0.03826904296875,
0.027496337890625,
0.02398681640625,
0.0477294921875,
0.016998291015625,
-0.03955078125,
-0.00177001953125,
0.0196380615234375,
-0.02496337890625,
-0.004486083984375,
-0.048980712890625,
0.0114288330078125,
0.0167083740234375,
-0.01708984375,
0.0073394775390625,
-0.058074951171875,
0.0643310546875,
-0.02197265625,
0.032958984375,
-0.0018224716186523438,
-0.005786895751953125,
0.030731201171875,
-0.0074615478515625,
0.008026123046875,
-0.0176544189453125,
-0.04296875,
0.0369873046875,
-0.05255126953125,
-0.067138671875,
0.005336761474609375,
0.0190582275390625,
-0.061920166015625,
0.06884765625,
0.0230255126953125,
0.01284027099609375,
-0.024871826171875,
-0.005092620849609375,
0.025299072265625,
0.0184173583984375,
0.01934814453125,
0.0260467529296875,
-0.0287628173828125,
-0.0330810546875,
-0.0071868896484375,
0.05657958984375,
0.01468658447265625,
0.07037353515625,
-0.02850341796875,
0.032684326171875,
-0.0306854248046875,
0.01551055908203125,
-0.03607177734375,
-0.04638671875,
0.0438232421875,
-0.0030803680419921875,
-0.009033203125,
0.0125885009765625,
-0.020904541015625,
0.0635986328125,
-0.018310546875,
-0.00659942626953125,
0.0216827392578125,
-0.018768310546875,
0.00235748291015625,
0.017364501953125,
-0.00830078125,
-0.013427734375,
0.0229034423828125,
0.00399017333984375,
-0.01505279541015625,
0.0185089111328125,
-0.0070648193359375,
-0.007404327392578125,
0.0189056396484375,
-0.04693603515625,
-0.0218353271484375,
-0.01450347900390625,
-0.01163482666015625,
-0.0810546875,
-0.00142669677734375,
-0.00408935546875,
0.0294647216796875,
0.024169921875,
-0.004940032958984375,
-0.002750396728515625,
0.041656494140625,
-0.052642822265625,
0.041748046875,
-0.030059814453125,
0.0264129638671875,
-0.01435089111328125,
0.051513671875,
0.0088043212890625,
0.0110931396484375,
-0.038726806640625,
0.029052734375,
-0.018646240234375,
-0.01910400390625,
-0.01580810546875,
-0.0017795562744140625,
-0.01381683349609375,
0.0137786865234375,
-0.01125335693359375,
-0.064697265625,
-0.0718994140625,
0.0203094482421875,
0.02569580078125,
-0.004085540771484375,
-0.064208984375,
0.039031982421875,
-0.0169677734375,
0.061798095703125,
-0.0222930908203125,
0.016265869140625,
-0.0029754638671875,
-0.00081634521484375,
-0.06561279296875,
-0.0175323486328125,
-0.0245361328125,
0.019012451171875,
-0.013641357421875,
0.037017822265625,
0.07122802734375,
-0.034881591796875,
-0.0189056396484375,
0.0287322998046875,
0.01544189453125,
0.07025146484375,
-0.033172607421875,
-0.04486083984375,
-0.01123809814453125,
0.0177764892578125,
0.0243072509765625,
-0.01763916015625,
-0.019622802734375,
0.006103515625,
-0.0061492919921875,
-0.022369384765625,
0.0220489501953125,
0.035247802734375,
-0.030303955078125,
-0.08123779296875,
0.030914306640625,
-0.02569580078125,
-0.051666259765625,
-0.0343017578125,
-0.00934600830078125,
-0.00429534912109375,
0.002658843994140625,
-0.0030364990234375,
0.002197265625,
-0.0215911865234375,
0.0262451171875,
-0.00860595703125,
-0.012664794921875,
0.01155853271484375,
-0.01702880859375,
-0.030303955078125,
0.035919189453125,
0.0560302734375,
-0.027679443359375,
-0.0295562744140625,
0.0167999267578125,
-0.01235198974609375,
0.031585693359375,
-0.004238128662109375,
-0.039703369140625,
0.00588226318359375,
-0.0264739990234375,
0.0130767822265625,
-0.029388427734375,
-0.037689208984375,
-0.052734375,
0.0247802734375,
0.0291290283203125,
0.00807952880859375,
-0.0014657974243164062,
0.079345703125,
-0.0083465576171875,
-0.08026123046875,
0.0177001953125,
0.0233154296875,
-0.035888671875,
-0.00594329833984375,
0.019287109375,
-0.001232147216796875,
0.025299072265625,
-0.0226287841796875,
-0.041168212890625,
-0.0281982421875,
-0.0745849609375,
-0.0095977783203125,
-0.0609130859375,
0.047210693359375,
-0.01268768310546875,
-0.0240631103515625,
-0.018463134765625,
-0.0009093284606933594,
-0.0229034423828125,
-0.0308990478515625,
-0.01543426513671875,
-0.019439697265625,
-0.042999267578125,
-0.00971221923828125,
0.01438140869140625,
-0.0016307830810546875,
0.0355224609375,
-0.01467132568359375,
-0.022674560546875,
-0.0174102783203125,
-0.003208160400390625,
-0.00087738037109375,
-0.004180908203125,
0.0035686492919921875,
0.0006079673767089844,
-0.00348663330078125,
0.043121337890625,
-0.0212554931640625,
-0.0634765625,
-0.0210723876953125,
-0.0045623779296875,
-0.04571533203125,
0.0272369384765625,
0.0098114013671875,
-0.0284881591796875,
0.02166748046875,
-0.0015430450439453125,
0.01468658447265625,
0.0024242401123046875,
0.01016998291015625,
0.0022563934326171875,
-0.016326904296875,
0.002910614013671875
]
|
aebfafd16e7892eb2579aa29a236d7c0340bc1a4 | Wordpress Stackexchange
Q: What's the purpose of index.php in wp-content directory? <?php
// Silence is golden.
The folder is ../wp-content/index.php
Why have this file. What's the purpose?
I suppose it's in order to avoid invalid visit.
But why?
A: This file is just there if the server (Apache, Nginx, Lighttp, etc.) is not properly set up and allowing this kind of file system access for guests. To properly set up your Apache for e.g., just add the following to your .htaccess
Options –Indexes
which will lead to a Forbidden|403 for everyone trying to access your directory structure (prevents directory listings). There is a more detailed explanation as well.
The Options directive is the place where you can enable or disable the index generation. This is set by default to ALL (meaning that it will turn ON also Indexes), but normally you will see this overwritten by each distribution either globally or inside the default vhost definition.
| Q: What's the purpose of index.php in wp-content directory? <?php
// Silence is golden.
The folder is ../wp-content/index.php
Why have this file. What's the purpose?
I suppose it's in order to avoid invalid visit.
But why?
A: This file is just there if the server (Apache, Nginx, Lighttp, etc.) is not properly set up and allowing this kind of file system access for guests. To properly set up your Apache for e.g., just add the following to your .htaccess
Options –Indexes
which will lead to a Forbidden|403 for everyone trying to access your directory structure (prevents directory listings). There is a more detailed explanation as well.
The Options directive is the place where you can enable or disable the index generation. This is set by default to ALL (meaning that it will turn ON also Indexes), but normally you will see this overwritten by each distribution either globally or inside the default vhost definition.
A: Try to visit through the folder structure of your site from the browser:
http://example.com/wp-content/
You will see a blank page. That's actually is the index.php, and its content is very simple - a commented out PHP comment:
<?php
// Silence is golden.
Remove the file and visit the URL again. You will see the file structure completely. So your file structure is completely become naked.
That's why the file is there. To hide the inner file structure whatever that be.
O, don't forget to create the file again there. :)
| wordpress | {
"language": "en",
"length": 245,
"provenance": "stackexchange_00019.jsonl.gz:450391",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/167988"
} | [
0.0355224609375,
-0.01861572265625,
-0.0185089111328125,
-0.03717041015625,
0.002140045166015625,
-0.03826904296875,
0.054046630859375,
0.0294189453125,
0.0265655517578125,
-0.00418853759765625,
-0.0281829833984375,
-0.00958251953125,
-0.006687164306640625,
-0.041717529296875,
0.01462554931640625,
-0.0304107666015625,
0.00902557373046875,
-0.030059814453125,
0.00835418701171875,
0.0008840560913085938,
0.005290985107421875,
0.00350189208984375,
0.0262451171875,
-0.0726318359375,
-0.007564544677734375,
-0.0307159423828125,
0.02008056640625,
-0.0253448486328125,
0.0013418197631835938,
-0.0215911865234375,
0.0003314018249511719,
0.0232696533203125,
0.01313018798828125,
0.026123046875,
-0.017303466796875,
0.010955810546875,
0.0146636962890625,
0.0062255859375,
0.002002716064453125,
0.0328369140625,
0.01003265380859375,
-0.0160064697265625,
0.083251953125,
-0.004856109619140625,
0.0181884765625,
0.01236724853515625,
0.020111083984375,
-0.032379150390625,
0.0300140380859375,
-0.0293121337890625,
0.01071929931640625,
0.04840087890625,
0.0307464599609375,
-0.053680419921875,
-0.01239013671875,
-0.0029468536376953125,
0.005229949951171875,
0.028656005859375,
0.0285491943359375,
-0.051239013671875,
-0.046234130859375,
-0.00423431396484375,
0.0216064453125,
0.021575927734375,
-0.017547607421875,
-0.037078857421875,
-0.045684814453125,
0.0206451416015625,
-0.08441162109375,
-0.017913818359375,
0.07568359375,
-0.05224609375,
0.0206146240234375,
-0.052581787109375,
0.0064697265625,
0.017242431640625,
-0.002971649169921875,
-0.01026153564453125,
0.0074310302734375,
0.0010786056518554688,
-0.035003662109375,
-0.04144287109375,
-0.00927734375,
-0.042083740234375,
0.0122833251953125,
-0.0121917724609375,
-0.0172271728515625,
0.015411376953125,
0.0248565673828125,
0.006683349609375,
-0.00786590576171875,
0.02276611328125,
0.05108642578125,
-0.0199127197265625,
-0.05035400390625,
-0.032470703125,
-0.0006117820739746094,
0.0167388916015625,
-0.0137481689453125,
-0.0030918121337890625,
0.04986572265625,
-0.04583740234375,
0.05194091796875,
-0.01800537109375,
0.01482391357421875,
0.06524658203125,
0.01029205322265625,
0.0192413330078125,
0.037078857421875,
0.002117156982421875,
0.0252227783203125,
0.0220794677734375,
-0.01275634765625,
-0.07257080078125,
-0.007160186767578125,
0.02099609375,
-0.0316162109375,
0.0222930908203125,
0.043975830078125,
-0.0168914794921875,
-0.0020465850830078125,
0.035980224609375,
-0.01165008544921875,
-0.0206451416015625,
0.0173797607421875,
-0.0021266937255859375,
-0.0124053955078125,
0.002857208251953125,
0.0183563232421875,
0.03375244140625,
-0.0095672607421875,
-0.0149993896484375,
0.0008940696716308594,
0.0237274169921875,
-0.003570556640625,
-0.02490234375,
0.01253509521484375,
0.0085906982421875,
-0.008453369140625,
0.0167694091796875,
-0.00278472900390625,
-0.0372314453125,
0.0131378173828125,
-0.0169525146484375,
-0.0005125999450683594,
0.0007109642028808594,
0.036651611328125,
0.044708251953125,
-0.0155029296875,
-0.020751953125,
-0.0242156982421875,
0.050048828125,
0.0293731689453125,
0.0070343017578125,
-0.0034656524658203125,
0.0055999755859375,
0.031646728515625,
-0.01493072509765625,
-0.0345458984375,
-0.02093505859375,
0.004241943359375,
-0.0203857421875,
0.0198822021484375,
-0.040863037109375,
-0.03546142578125,
0.001667022705078125,
-0.06121826171875,
-0.005435943603515625,
0.0176544189453125,
0.01309967041015625,
0.01131439208984375,
-0.037353515625,
-0.03814697265625,
-0.004795074462890625,
-0.003459930419921875,
0.005565643310546875,
0.0173492431640625,
-0.01319122314453125,
0.01326751708984375,
0.08087158203125,
0.0325927734375,
-0.01204681396484375,
0.041717529296875,
0.007328033447265625,
-0.042022705078125,
0.04833984375,
0.0162811279296875,
0.0631103515625,
-0.0110321044921875,
0.0218963623046875,
0.0557861328125,
0.03240966796875,
-0.0604248046875,
0.0308837890625,
0.012237548828125,
0.01222991943359375,
-0.031951904296875,
0.006275177001953125,
-0.00287628173828125,
-0.048614501953125,
0.01340484619140625,
-0.008636474609375,
0.018524169921875,
-0.004962921142578125,
-0.061737060546875,
-0.001377105712890625,
-0.027252197265625,
0.0241241455078125,
0.0152435302734375,
-0.02191162109375,
0.006500244140625,
0.0096435546875,
-0.03448486328125,
-0.006183624267578125,
-0.07440185546875,
-0.004314422607421875,
-0.0160369873046875,
-0.001354217529296875,
0.0086517333984375,
0.0305023193359375,
0.00395965576171875,
0.01580810546875,
-0.006412506103515625,
-0.032135009765625,
0.05572509765625,
-0.0098724365234375,
-0.02093505859375,
-0.01497650146484375,
0.048187255859375,
0.0142974853515625,
-0.0073699951171875,
0.01654052734375,
0.0697021484375,
0.044464111328125,
-0.0139007568359375,
-0.0130767822265625,
-0.00925445556640625,
-0.0721435546875,
-0.006206512451171875,
0.045745849609375,
0.042938232421875,
0.045989990234375,
-0.0194091796875,
-0.0209197998046875,
0.07220458984375,
-0.041259765625,
-0.00464630126953125,
-0.01175689697265625,
-0.0018911361694335938,
-0.0024776458740234375,
-0.006999969482421875,
-0.0189208984375,
0.040496826171875,
-0.0270843505859375,
-0.01325225830078125,
0.027496337890625,
-0.0063629150390625,
0.006351470947265625,
-0.0284881591796875,
0.03936767578125,
0.001522064208984375,
0.017822265625,
-0.0113372802734375,
-0.00366973876953125,
0.0233917236328125,
0.0121002197265625,
0.04034423828125,
0.0259857177734375,
-0.01085662841796875,
0.004810333251953125,
0.0007109642028808594,
-0.0300445556640625,
0.0025730133056640625,
0.045745849609375,
0.0557861328125,
-0.0274200439453125,
0.00487518310546875,
-0.027618408203125,
-0.0019283294677734375,
0.0142059326171875,
-0.0231170654296875,
-0.030731201171875,
-0.04876708984375,
-0.0089263916015625,
0.019317626953125,
-0.05267333984375,
0.006496429443359375,
0.01174163818359375,
-0.0258026123046875,
-0.044097900390625,
-0.01470947265625,
0.0384521484375,
-0.02825927734375,
0.040283203125,
0.0160980224609375,
-0.0207672119140625,
-0.03887939453125,
-0.01131439208984375,
0.01114654541015625,
-0.026947021484375,
0.0173187255859375,
0.057403564453125,
0.005077362060546875,
-0.022369384765625,
0.0413818359375,
-0.01476287841796875,
0.045166015625,
0.03497314453125,
0.020233154296875,
0.028350830078125,
-0.06768798828125,
-0.019500732421875,
0.014312744140625,
-0.0260772705078125,
-0.0027523040771484375,
-0.032989501953125,
-0.0208282470703125,
0.002880096435546875,
-0.113037109375,
-0.08270263671875,
0.02886962890625,
-0.042144775390625,
-0.0020503997802734375,
-0.03887939453125,
-0.0280914306640625,
-0.025634765625,
-0.0232696533203125,
-0.00965118408203125,
-0.005035400390625,
-0.0145111083984375,
-0.06768798828125,
-0.04791259765625,
-0.06536865234375,
0.04144287109375,
-0.007598876953125,
0.0195465087890625,
0.00608062744140625,
0.00495147705078125,
-0.0029277801513671875,
-0.043609619140625,
-0.000934600830078125,
-0.000705718994140625,
-0.0199737548828125,
-0.0303497314453125,
0.00617218017578125,
-0.00911712646484375,
-0.01739501953125,
-0.002780914306640625,
0.0006594657897949219,
0.01250457763671875,
-0.0194244384765625,
-0.0257720947265625,
-0.032684326171875,
-0.0301666259765625,
-0.006649017333984375,
0.002498626708984375,
0.017547607421875,
-0.050384521484375,
0.01158905029296875,
-0.066162109375,
-0.0150909423828125,
-0.0102386474609375,
-0.0482177734375,
-0.036041259765625,
0.0277557373046875,
0.000031948089599609375,
-0.0184783935546875,
-0.0313720703125,
0.029388427734375,
0.01507568359375,
-0.0131378173828125,
-0.0183563232421875,
0.08184814453125,
0.0081939697265625,
0.0105438232421875,
-0.031768798828125,
0.0516357421875,
-0.001804351806640625,
0.023345947265625,
0.02911376953125,
0.018341064453125,
-0.00824737548828125,
0.01116943359375,
-0.0482177734375,
-0.0114593505859375,
0.01275634765625,
-0.032501220703125,
0.035369873046875,
-0.033843994140625,
0.0000870823860168457,
-0.0236053466796875,
0.0430908203125,
-0.037109375,
-0.0168914794921875,
0.00754547119140625,
0.005031585693359375,
-0.0013437271118164062,
-0.01140594482421875,
-0.03253173828125,
-0.0264434814453125,
-0.0195770263671875,
0.0274200439453125,
-0.00861358642578125,
-0.0014181137084960938,
-0.021881103515625,
-0.054412841796875,
-0.0155029296875,
-0.03155517578125,
0.0234375,
-0.0237884521484375,
0.0168609619140625,
-0.01374053955078125,
0.0034027099609375,
-0.049713134765625,
-0.0016536712646484375,
-0.0264129638671875,
-0.033233642578125,
-0.026336669921875,
0.016937255859375,
0.042144775390625,
0.00958251953125,
-0.0272216796875,
-0.004024505615234375,
0.04058837890625,
0.0160675048828125,
0.038909912109375,
0.028045654296875,
-0.0289459228515625,
0.062744140625,
0.0010747909545898438,
0.0419921875,
-0.016876220703125,
0.0140380859375,
-0.01184844970703125,
-0.021942138671875,
0.02288818359375,
-0.039154052734375,
0.01288604736328125,
-0.0132293701171875,
-0.0195770263671875,
-0.04693603515625,
-0.054931640625,
-0.050323486328125,
0.02740478515625,
-0.014495849609375,
-0.0074005126953125,
-0.07183837890625,
-0.0645751953125,
0.0611572265625,
-0.034027099609375,
0.0007371902465820312,
-0.0085601806640625,
0.0511474609375,
0.020263671875,
-0.0281829833984375,
-0.0221405029296875,
0.003047943115234375,
0.0399169921875,
0.01078033447265625,
0.045196533203125,
0.016387939453125,
-0.02777099609375,
0.072265625,
0.00746917724609375,
-0.01251983642578125,
-0.00568389892578125,
0.0231170654296875,
0.005229949951171875,
-0.01812744140625,
0.0015621185302734375,
-0.0244140625,
0.0303192138671875,
0.034149169921875,
0.014862060546875,
-0.007495880126953125,
0.0194091796875,
-0.0009183883666992188,
-0.0206451416015625,
-0.0013761520385742188,
0.0167083740234375,
-0.050537109375,
0.006069183349609375,
0.00730133056640625,
0.0238189697265625,
0.01031494140625,
0.00435638427734375,
0.044464111328125,
0.042755126953125,
0.0068359375,
0.06842041015625,
0.0650634765625,
0.0009236335754394531,
0.034942626953125,
0.0526123046875,
-0.0169677734375,
0.01258087158203125,
-0.0009870529174804688,
0.03277587890625,
-0.0017251968383789062,
-0.046661376953125,
-0.004337310791015625,
0.004425048828125,
-0.01348114013671875,
0.0307464599609375,
-0.01885986328125,
0.01406097412109375,
0.0014314651489257812,
-0.0149383544921875,
-0.0009493827819824219,
0.008941650390625,
-0.0196533203125,
-0.020294189453125,
0.029388427734375,
0.017608642578125,
-0.0259246826171875,
-0.005329132080078125,
0.0224761962890625,
-0.0175018310546875,
-0.0006084442138671875,
0.006366729736328125,
0.0345458984375,
0.040069580078125,
0.0418701171875,
0.01120758056640625,
-0.013397216796875,
-0.0119476318359375,
0.0255889892578125,
0.005512237548828125,
-0.04327392578125,
-0.0090789794921875,
0.0107879638671875,
0.04290771484375,
-0.03985595703125,
-0.033416748046875,
0.035552978515625,
-0.006084442138671875,
-0.0012006759643554688,
0.01425933837890625,
-0.026031494140625,
-0.012115478515625,
-0.0306243896484375,
-0.0186920166015625,
0.041778564453125,
0.00814056396484375,
-0.00872039794921875,
0.00862884521484375,
-0.0230255126953125,
-0.024261474609375,
0.072265625,
-0.061920166015625,
-0.021270751953125,
-0.007007598876953125,
0.031768798828125,
-0.01288604736328125,
-0.0113525390625,
-0.06951904296875,
0.0004565715789794922,
-0.03338623046875,
0.005313873291015625,
0.04931640625,
-0.01059722900390625,
0.0233154296875,
-0.008819580078125,
-0.0232086181640625,
0.0228729248046875,
0.0360107421875,
-0.03204345703125,
-0.0278167724609375,
-0.09326171875,
0.0211639404296875,
-0.04315185546875,
0.0192718505859375,
-0.00801849365234375,
-0.059539794921875,
-0.049346923828125,
-0.0297393798828125,
-0.0160980224609375,
-0.014801025390625,
0.009124755859375,
-0.00214385986328125,
-0.0689697265625,
0.0311279296875,
0.039215087890625,
-0.0192718505859375,
-0.0521240234375,
0.06903076171875,
0.01800537109375,
0.0025577545166015625,
-0.0103759765625,
0.061370849609375,
0.06060791015625,
-0.0216064453125,
0.038726806640625,
-0.0162353515625,
-0.0200347900390625,
-0.060577392578125,
0.0261383056640625,
-0.002269744873046875,
0.035003662109375,
-0.0145721435546875,
0.005588531494140625,
-0.0078125,
0.0006990432739257812,
-0.016937255859375,
0.009765625,
-0.0165252685546875,
0.0243072509765625,
-0.041015625,
0.00130462646484375,
0.0604248046875,
-0.0267181396484375,
-0.0208740234375,
0.01473236083984375,
-0.02825927734375,
0.0197906494140625,
0.04071044921875,
-0.035614013671875,
0.054107666015625,
0.1165771484375,
0.019256591796875,
0.08740234375,
0.0135040283203125,
0.022979736328125,
0.047576904296875,
0.0006060600280761719,
-0.02301025390625,
-0.00789642333984375,
0.0576171875,
0.013153076171875,
-0.01212310791015625,
0.041473388671875,
-0.0301971435546875,
0.01175689697265625,
0.05218505859375,
0.05718994140625,
-0.0562744140625,
-0.009735107421875,
-0.01419830322265625,
-0.0165252685546875,
0.0261077880859375,
-0.006900787353515625,
-0.0404052734375,
-0.06512451171875,
0.05072021484375,
-0.016387939453125,
-0.0233001708984375,
0.0007390975952148438,
-0.004024505615234375,
0.0037708282470703125,
0.03839111328125,
0.046600341796875,
0.0168609619140625,
-0.0230560302734375,
-0.033782958984375,
0.01555633544921875,
0.020904541015625,
0.0170745849609375,
0.0166473388671875,
-0.034515380859375,
-0.034912109375,
-0.0201873779296875,
-0.036712646484375,
-0.00426483154296875,
-0.0290374755859375,
-0.0138092041015625,
-0.007457733154296875,
-0.0018463134765625,
0.04949951171875,
-0.04876708984375,
0.04327392578125,
0.01776123046875,
-0.00461578369140625,
-0.034271240234375,
-0.005405426025390625,
0.01605224609375,
-0.0087432861328125,
-0.0004677772521972656,
0.0189971923828125,
-0.01500701904296875,
-0.0396728515625,
-0.0006270408630371094,
-0.053009033203125,
0.03564453125,
-0.045684814453125,
0.017547607421875,
0.0276031494140625,
-0.01995849609375,
-0.01343536376953125,
-0.0160369873046875,
0.0176239013671875,
-0.0340576171875,
0.01050567626953125,
0.0029087066650390625,
0.006866455078125,
0.006011962890625,
-0.01529693603515625,
0.0009298324584960938,
0.062347412109375,
-0.055908203125,
-0.0070648193359375,
0.050628662109375,
0.0411376953125,
-0.035980224609375,
0.0207977294921875,
-0.005695343017578125,
0.01497650146484375,
-0.0283203125,
0.035858154296875,
-0.052276611328125,
-0.0228729248046875,
0.0090789794921875,
0.06292724609375,
0.09246826171875,
0.024658203125,
-0.046478271484375,
-0.040924072265625,
0.0153045654296875,
0.01904296875,
-0.0187835693359375,
0.06036376953125,
-0.00901031494140625,
0.0015439987182617188,
0.0243072509765625,
-0.0285186767578125,
0.02264404296875,
-0.00994873046875,
-0.0189361572265625,
-0.005290985107421875,
0.0184326171875,
-0.019927978515625,
0.0266571044921875,
-0.004779815673828125,
-0.07403564453125,
0.036773681640625,
0.04248046875,
0.0307159423828125,
-0.029144287109375,
0.052154541015625,
0.01340484619140625,
-0.0291748046875,
-0.0213470458984375,
-0.039031982421875,
0.043975830078125,
-0.0031490325927734375,
0.039794921875,
0.01161956787109375,
0.017486572265625,
0.03546142578125,
0.0130767822265625,
0.0162353515625,
0.052886962890625,
-0.0306243896484375,
0.01395416259765625,
0.0141754150390625,
0.017608642578125,
-0.046234130859375,
-0.024810791015625,
0.0275421142578125,
0.0352783203125,
-0.01416015625,
-0.03729248046875,
0.0163726806640625,
0.0136871337890625,
-0.006359100341796875,
0.024658203125,
0.01812744140625,
-0.00949859619140625,
0.019287109375,
0.003551483154296875,
0.0005145072937011719,
0.019561767578125,
-0.019989013671875,
0.01904296875,
0.034881591796875,
-0.00937652587890625,
0.0193634033203125,
0.00543975830078125,
0.027496337890625,
0.007419586181640625,
-0.02435302734375,
-0.037078857421875,
0.031158447265625,
0.0161285400390625,
0.023529052734375,
-0.0214385986328125,
0.05194091796875,
-0.023162841796875,
0.035614013671875,
-0.049774169921875,
-0.04705810546875,
0.01129913330078125,
0.036956787109375,
0.057098388671875,
0.047576904296875,
0.027099609375,
0.00902557373046875,
0.03143310546875,
0.022308349609375,
0.006275177001953125,
-0.01461029052734375,
0.01215362548828125,
-0.0273590087890625,
0.04718017578125,
0.05029296875,
0.0160064697265625,
-0.035858154296875,
0.01535797119140625,
0.074951171875,
-0.01513671875,
0.0213775634765625,
-0.005859375,
-0.055023193359375,
0.048004150390625,
-0.029815673828125,
0.07293701171875,
0.004856109619140625,
0.00684356689453125,
0.00931549072265625,
0.0188446044921875,
-0.01552581787109375,
-0.041534423828125,
0.016387939453125,
0.0223388671875,
0.00044083595275878906,
0.033050537109375,
0.002964019775390625,
-0.011016845703125,
-0.0257415771484375,
0.04815673828125,
0.0270233154296875,
0.00905609130859375,
0.043487548828125,
-0.01045989990234375,
-0.0285491943359375,
0.0022029876708984375,
0.055877685546875,
-0.002353668212890625,
0.1182861328125,
-0.06268310546875,
0.005161285400390625,
0.016571044921875,
-0.040008544921875,
0.02764892578125,
0.019195556640625,
0.0064849853515625,
-0.00936126708984375,
-0.007518768310546875,
-0.0166778564453125,
-0.0877685546875,
-0.003841400146484375,
0.0283050537109375,
-0.03076171875,
0.01302337646484375,
-0.01433563232421875,
0.026336669921875,
-0.017242431640625,
0.0276031494140625,
-0.00852203369140625,
-0.0362548828125,
-0.0093536376953125,
0.015869140625,
0.01126861572265625,
0.03668212890625,
-0.01430511474609375,
-0.0215606689453125,
-0.028594970703125,
-0.06402587890625,
0.0232391357421875,
-0.02642822265625,
0.011566162109375,
0.0159912109375,
0.00335693359375,
-0.019683837890625,
-0.0294342041015625,
-0.0218353271484375,
0.006870269775390625,
-0.01113128662109375,
0.04327392578125,
-0.024749755859375,
0.034027099609375,
-0.02587890625,
0.0026226043701171875,
0.03369140625,
0.0357666015625,
0.00960540771484375,
-0.04827880859375,
-0.015869140625,
0.006641387939453125,
-0.0082244873046875,
-0.0199432373046875,
0.001560211181640625,
-0.0012712478637695312,
0.028472900390625,
-0.012603759765625,
-0.038604736328125,
-0.07684326171875,
0.0264892578125,
0.032135009765625,
-0.0091094970703125,
-0.049713134765625,
0.02984619140625,
-0.035491943359375,
0.062255859375,
-0.007659912109375,
0.07611083984375,
-0.030059814453125,
-0.007022857666015625,
-0.057464599609375,
0.01448822021484375,
-0.0195770263671875,
0.00940704345703125,
0.0160369873046875,
0.0191650390625,
0.027130126953125,
-0.0175933837890625,
0.03509521484375,
0.036102294921875,
0.006114959716796875,
0.08648681640625,
-0.0243682861328125,
-0.026092529296875,
-0.0092010498046875,
0.02374267578125,
0.004878997802734375,
-0.0225372314453125,
-0.00902557373046875,
0.01056671142578125,
-0.008270263671875,
-0.015106201171875,
0.0032825469970703125,
0.01555633544921875,
-0.038848876953125,
-0.10205078125,
0.00937652587890625,
-0.0176849365234375,
-0.05487060546875,
-0.0264434814453125,
-0.03369140625,
-0.0288543701171875,
0.01212310791015625,
-0.022125244140625,
0.0010967254638671875,
0.01129150390625,
0.0867919921875,
0.0038967132568359375,
0.0235595703125,
0.00470733642578125,
0.010162353515625,
-0.0540771484375,
0.00807952880859375,
-0.0042266845703125,
-0.0029735565185546875,
-0.004795074462890625,
0.010528564453125,
0.039703369140625,
0.0787353515625,
0.0108489990234375,
0.062408447265625,
0.01317596435546875,
-0.0576171875,
-0.0028781890869140625,
-0.00873565673828125,
-0.02740478515625,
-0.00942230224609375,
0.03045654296875,
0.04913330078125,
0.01140594482421875,
-0.033172607421875,
-0.0206146240234375,
-0.06048583984375,
-0.006008148193359375,
-0.0241241455078125,
0.01271820068359375,
-0.0736083984375,
-0.0037021636962890625,
0.03497314453125,
0.00457000732421875,
0.01049041748046875,
-0.0245513916015625,
-0.040802001953125,
-0.0139923095703125,
-0.0271759033203125,
-0.007904052734375,
-0.0216827392578125,
-0.0297393798828125,
0.042144775390625,
-0.024688720703125,
0.02752685546875,
-0.018524169921875,
0.0298919677734375,
0.025177001953125,
0.0103607177734375,
0.0006594657897949219,
-0.000640869140625,
-0.0157012939453125,
0.007610321044921875,
-0.002368927001953125,
0.008392333984375,
-0.014373779296875,
-0.0203704833984375,
0.0172119140625,
0.020111083984375,
-0.01345062255859375,
0.0213775634765625,
-0.0018138885498046875,
0.0389404296875,
-0.024658203125,
0.06842041015625,
0.0233001708984375,
0.00911712646484375,
-0.0177764892578125,
0.0687255859375,
-0.0202484130859375,
-0.0455322265625,
-0.023468017578125,
-0.01346588134765625,
0.02490234375,
-0.0264434814453125,
0.038330078125,
0.0157470703125,
-0.0276336669921875,
-0.057220458984375,
-0.0294342041015625,
-0.01358795166015625
]
|
9911e457581b498146150faac3d02b0c8d9c2483 | Wordpress Stackexchange
Q: Get info (url) from already enqueued styles I am building a theme and using Easy google fonts WordPress Plugin. I created several typography controls within Theme Customizer for Post content,Post header, Author page content, Single Post content, 404 page content...
The plugin is loading all the fonts in any page I visit. I would like to hook the style enqueue of the fonts, and return only the necessary ones, so not every selected font is called in every page, just the necessary ones.
I know how to make use of wp_dequeue_script('tt-easy-google-fonts'); I am missing a way of returning the url of the already enqueued style. When I have it then I can dequeue the script, modify the url and enqueue my new version.
So my question is how can I get the url of the already enqueued styles/scripts?
A: Registered styles are in the $wp_styles global, and registered scripts are in $wp_scripts. You can var_dump them to see their structure.
global $wp_scripts;
echo $wp_scripts->registered['tt-easy-google-fonts']->src;
| Q: Get info (url) from already enqueued styles I am building a theme and using Easy google fonts WordPress Plugin. I created several typography controls within Theme Customizer for Post content,Post header, Author page content, Single Post content, 404 page content...
The plugin is loading all the fonts in any page I visit. I would like to hook the style enqueue of the fonts, and return only the necessary ones, so not every selected font is called in every page, just the necessary ones.
I know how to make use of wp_dequeue_script('tt-easy-google-fonts'); I am missing a way of returning the url of the already enqueued style. When I have it then I can dequeue the script, modify the url and enqueue my new version.
So my question is how can I get the url of the already enqueued styles/scripts?
A: Registered styles are in the $wp_styles global, and registered scripts are in $wp_scripts. You can var_dump them to see their structure.
global $wp_scripts;
echo $wp_scripts->registered['tt-easy-google-fonts']->src;
| wordpress | {
"language": "en",
"length": 165,
"provenance": "stackexchange_00019.jsonl.gz:450397",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168021"
} | [
-0.0068206787109375,
-0.008331298828125,
-0.0296173095703125,
-0.0384521484375,
-0.018890380859375,
-0.018463134765625,
-0.01024627685546875,
0.019622802734375,
-0.004161834716796875,
0.025634765625,
-0.006134033203125,
0.03277587890625,
-0.004322052001953125,
-0.0251617431640625,
0.0268096923828125,
-0.0006227493286132812,
0.059234619140625,
-0.04632568359375,
0.01611328125,
0.0173492431640625,
0.0012826919555664062,
0.0482177734375,
0.025665283203125,
0.0723876953125,
0.02655029296875,
-0.0179290771484375,
0.09429931640625,
0.009765625,
0.0230712890625,
0.01202392578125,
0.031707763671875,
-0.059295654296875,
0.01049041748046875,
0.01097869873046875,
-0.0172576904296875,
-0.0243988037109375,
0.0209197998046875,
0.00379180908203125,
0.00966644287109375,
0.0266571044921875,
0.01885986328125,
-0.01253509521484375,
0.015472412109375,
0.046630859375,
-0.0147552490234375,
-0.061859130859375,
0.04949951171875,
-0.0058746337890625,
-0.042999267578125,
0.0733642578125,
0.028594970703125,
-0.027923583984375,
0.02313232421875,
0.067626953125,
-0.0071258544921875,
-0.047149658203125,
0.0179595947265625,
-0.0291900634765625,
0.0183258056640625,
-0.024444580078125,
-0.0219879150390625,
0.0010652542114257812,
0.03082275390625,
0.0032138824462890625,
-0.013427734375,
0.01873779296875,
0.03485107421875,
0.033447265625,
-0.004154205322265625,
-0.039276123046875,
-0.0202484130859375,
-0.0015659332275390625,
0.0021419525146484375,
-0.042724609375,
-0.00848388671875,
0.056549072265625,
-0.046539306640625,
-0.0128021240234375,
0.03778076171875,
-0.0270843505859375,
0.025970458984375,
-0.0279541015625,
-0.036895751953125,
-0.0047454833984375,
0.02557373046875,
0.0162811279296875,
-0.005382537841796875,
-0.023223876953125,
-0.0285186767578125,
-0.0169677734375,
-0.031463623046875,
-0.036590576171875,
-0.024383544921875,
0.0059661865234375,
-0.01110076904296875,
-0.0244293212890625,
0.0294189453125,
0.05572509765625,
0.0158538818359375,
0.0309295654296875,
-0.01715087890625,
-0.053314208984375,
0.038238525390625,
-0.056884765625,
0.0089111328125,
0.0237579345703125,
-0.004413604736328125,
0.01535797119140625,
0.0487060546875,
0.00984954833984375,
0.00818634033203125,
-0.01328277587890625,
0.0058441162109375,
0.01363372802734375,
-0.011444091796875,
-0.012542724609375,
-0.0276641845703125,
0.0031414031982421875,
-0.0297698974609375,
0.0093231201171875,
0.032135009765625,
0.075439453125,
-0.013519287109375,
-0.0606689453125,
-0.03045654296875,
-0.024749755859375,
-0.0085906982421875,
-0.05072021484375,
0.043670654296875,
0.0193328857421875,
-0.01531982421875,
-0.0025577545166015625,
0.01959228515625,
0.0113067626953125,
-0.0099029541015625,
-0.027618408203125,
0.0005273818969726562,
0.005062103271484375,
-0.0292510986328125,
0.0090484619140625,
-0.00628662109375,
-0.038299560546875,
-0.0034961700439453125,
-0.0182647705078125,
-0.05511474609375,
0.0171356201171875,
0.017791748046875,
0.007534027099609375,
-0.0290679931640625,
-0.0347900390625,
-0.0282135009765625,
-0.01139068603515625,
0.056854248046875,
0.01409149169921875,
-0.023162841796875,
-0.0504150390625,
0.0726318359375,
-0.04656982421875,
-0.0022830963134765625,
-0.090576171875,
-0.025390625,
-0.0007228851318359375,
0.017852783203125,
0.0247039794921875,
0.0214996337890625,
-0.003265380859375,
0.0208892822265625,
0.00852203369140625,
0.0131683349609375,
0.0482177734375,
-0.018646240234375,
-0.002613067626953125,
0.01204681396484375,
0.01287078857421875,
-0.0173492431640625,
-0.01042938232421875,
0.01158905029296875,
0.0014629364013671875,
0.03192138671875,
0.0179595947265625,
-0.0166168212890625,
-0.023406982421875,
0.0775146484375,
-0.03656005859375,
-0.0304412841796875,
0.0136566162109375,
-0.00508880615234375,
0.045379638671875,
0.032470703125,
0.0197296142578125,
0.0086212158203125,
-0.00113677978515625,
-0.04583740234375,
-0.0199432373046875,
-0.00785064697265625,
0.042144775390625,
0.02984619140625,
0.059722900390625,
0.003162384033203125,
-0.04583740234375,
0.04248046875,
-0.00704193115234375,
0.0308074951171875,
-0.045196533203125,
-0.086669921875,
0.0200653076171875,
-0.0321044921875,
0.060302734375,
-0.040618896484375,
0.0261688232421875,
0.0268096923828125,
0.0201416015625,
-0.0361328125,
-0.01236724853515625,
-0.00347137451171875,
0.0016040802001953125,
-0.0178985595703125,
0.044342041015625,
-0.005523681640625,
0.004833221435546875,
0.0273895263671875,
-0.03472900390625,
0.0283660888671875,
0.0330810546875,
-0.0215301513671875,
-0.01047515869140625,
-0.0213623046875,
-0.0198211669921875,
-0.0276336669921875,
0.0020847320556640625,
0.0147705078125,
0.03997802734375,
0.022430419921875,
0.049041748046875,
-0.01352691650390625,
-0.003948211669921875,
0.01068878173828125,
-0.0115203857421875,
0.01104736328125,
0.0207061767578125,
0.041229248046875,
0.039031982421875,
-0.0012302398681640625,
-0.018463134765625,
0.056793212890625,
-0.024200439453125,
0.0185699462890625,
-0.0310516357421875,
0.02093505859375,
0.022430419921875,
0.01419830322265625,
-0.006427764892578125,
0.0170135498046875,
0.0201416015625,
0.0276031494140625,
0.0175628662109375,
0.01360321044921875,
0.034454345703125,
-0.040740966796875,
0.034454345703125,
0.00782012939453125,
0.037506103515625,
-0.00632476806640625,
0.0003368854522705078,
0.0526123046875,
0.0036945343017578125,
0.03179931640625,
0.03216552734375,
-0.033111572265625,
0.005962371826171875,
0.029083251953125,
0.0294952392578125,
-0.004390716552734375,
0.006412506103515625,
0.0238037109375,
-0.039093017578125,
-0.0028076171875,
-0.00634002685546875,
-0.0179443359375,
-0.006778717041015625,
-0.0136566162109375,
-0.0208892822265625,
-0.041534423828125,
-0.007389068603515625,
0.007152557373046875,
-0.07354736328125,
0.005458831787109375,
0.0102386474609375,
0.06072998046875,
0.0367431640625,
0.034515380859375,
0.0288543701171875,
-0.00643157958984375,
0.058563232421875,
0.02166748046875,
-0.02545166015625,
0.066162109375,
-0.0221710205078125,
0.03656005859375,
-0.0073089599609375,
0.04443359375,
0.056640625,
-0.01282501220703125,
0.0091552734375,
-0.0086822509765625,
-0.0228729248046875,
-0.01480865478515625,
-0.007183074951171875,
-0.0054473876953125,
-0.0125579833984375,
-0.0517578125,
0.0204620361328125,
0.02886962890625,
0.04327392578125,
0.015411376953125,
-0.0291748046875,
0.003643035888671875,
0.03302001953125,
-0.0987548828125,
-0.09844970703125,
-0.01922607421875,
-0.04718017578125,
0.027496337890625,
-0.020233154296875,
-0.0194854736328125,
-0.0191650390625,
0.00501251220703125,
0.008819580078125,
-0.00003445148468017578,
-0.004528045654296875,
-0.068359375,
-0.052520751953125,
-0.085205078125,
-0.0021152496337890625,
-0.0011224746704101562,
0.04864501953125,
0.0167999267578125,
0.002681732177734375,
0.017120361328125,
-0.0081329345703125,
0.041229248046875,
0.032684326171875,
-0.0210418701171875,
-0.018707275390625,
0.003314971923828125,
-0.0257110595703125,
-0.0169219970703125,
-0.01100921630859375,
-0.039947509765625,
0.0198516845703125,
-0.007175445556640625,
0.01535797119140625,
0.023406982421875,
-0.0152130126953125,
0.03472900390625,
-0.0154266357421875,
-0.0257568359375,
0.0154876708984375,
0.027008056640625,
-0.04541015625,
-0.0418701171875,
0.0204315185546875,
-0.0246429443359375,
0.04205322265625,
-0.006683349609375,
-0.0221099853515625,
0.01036834716796875,
0.041656494140625,
0.005580902099609375,
-0.0192108154296875,
0.020477294921875,
-0.01446533203125,
0.0772705078125,
-0.0025730133056640625,
-0.005645751953125,
-0.040008544921875,
0.019744873046875,
-0.0238494873046875,
0.0474853515625,
0.010894775390625,
0.0009160041809082031,
0.0067138671875,
-0.0160980224609375,
0.0025348663330078125,
-0.007686614990234375,
0.0025348663330078125,
-0.0362548828125,
0.037353515625,
-0.0148162841796875,
-0.0028228759765625,
0.00923919677734375,
0.06939697265625,
-0.015411376953125,
-0.01027679443359375,
0.0278778076171875,
0.02960205078125,
-0.047149658203125,
-0.060150146484375,
-0.04364013671875,
-0.00897216796875,
-0.130615234375,
0.01316070556640625,
-0.02978515625,
-0.0295257568359375,
-0.006504058837890625,
-0.018035888671875,
-0.0816650390625,
-0.0660400390625,
0.040679931640625,
-0.01043701171875,
0.0006771087646484375,
0.019012451171875,
0.0008120536804199219,
-0.006420135498046875,
-0.040679931640625,
0.012115478515625,
-0.07135009765625,
-0.01739501953125,
-0.0290069580078125,
0.062347412109375,
0.032562255859375,
-0.032196044921875,
0.003864288330078125,
0.050811767578125,
0.0128326416015625,
0.0279998779296875,
0.02294921875,
0.00797271728515625,
0.04010009765625,
-0.01288604736328125,
0.0160064697265625,
-0.0296630859375,
-0.007320404052734375,
0.0201263427734375,
-0.07843017578125,
0.00858306884765625,
0.01763916015625,
-0.00003314018249511719,
0.0799560546875,
-0.045989990234375,
-0.02392578125,
0.0255126953125,
0.021484375,
-0.00745391845703125,
0.01021575927734375,
-0.005481719970703125,
0.0491943359375,
-0.01131439208984375,
0.0025196075439453125,
-0.00399017333984375,
-0.004940032958984375,
-0.0034847259521484375,
0.04669189453125,
0.042999267578125,
-0.006198883056640625,
0.0235443115234375,
0.02972412109375,
0.058441162109375,
0.05780029296875,
0.0018701553344726562,
0.0260162353515625,
-0.035980224609375,
-0.024871826171875,
0.07135009765625,
-0.0164337158203125,
0.0278472900390625,
0.045684814453125,
0.0330810546875,
-0.0028591156005859375,
-0.0046844482421875,
0.031951904296875,
-0.05059814453125,
0.02838134765625,
-0.005779266357421875,
-0.0195770263671875,
0.0002536773681640625,
0.0011997222900390625,
-0.015655517578125,
0.021942138671875,
0.005825042724609375,
-0.00452423095703125,
-0.0168609619140625,
0.072265625,
0.0418701171875,
0.01551055908203125,
0.0030345916748046875,
0.0061492919921875,
0.063232421875,
0.0035610198974609375,
0.023895263671875,
0.06280517578125,
-0.030548095703125,
0.042724609375,
-0.0137176513671875,
-0.03192138671875,
-0.01641845703125,
-0.00830841064453125,
0.01096343994140625,
-0.01511383056640625,
-0.059478759765625,
-0.01503753662109375,
0.0088958740234375,
0.02459716796875,
0.035919189453125,
-0.01210784912109375,
0.04071044921875,
0.035430908203125,
-0.0007214546203613281,
-0.00371551513671875,
-0.0025157928466796875,
-0.00992584228515625,
-0.03631591796875,
0.04681396484375,
-0.0214385986328125,
0.00574493408203125,
-0.0011758804321289062,
0.036041259765625,
0.01477813720703125,
0.006374359130859375,
-0.008697509765625,
-0.03106689453125,
-0.0278778076171875,
0.03863525390625,
0.01873779296875,
-0.0020694732666015625,
0.006137847900390625,
0.01540374755859375,
0.075439453125,
-0.0265045166015625,
0.0013532638549804688,
0.0152740478515625,
0.0472412109375,
-0.01120758056640625,
-0.03173828125,
0.01189422607421875,
-0.038299560546875,
-0.03338623046875,
0.0105743408203125,
0.00957489013671875,
-0.010284423828125,
-0.023651123046875,
0.0097503662109375,
0.038665771484375,
0.0308685302734375,
-0.01861572265625,
-0.0223846435546875,
-0.0013179779052734375,
0.021942138671875,
0.0008792877197265625,
-0.041412353515625,
0.043792724609375,
0.02911376953125,
-0.034332275390625,
0.006526947021484375,
0.021514892578125,
-0.06671142578125,
-0.052215576171875,
0.010406494140625,
-0.00701141357421875,
0.01409149169921875,
-0.0201416015625,
0.01800537109375,
-0.0165557861328125,
-0.018951416015625,
-0.05523681640625,
0.0186767578125,
0.040985107421875,
0.025970458984375,
0.001209259033203125,
-0.0108795166015625,
-0.040374755859375,
-0.01174163818359375,
0.0008788108825683594,
-0.032867431640625,
0.01245880126953125,
-0.0233917236328125,
-0.007022857666015625,
0.0286102294921875,
-0.03179931640625,
-0.0042877197265625,
-0.00907135009765625,
0.0076446533203125,
-0.0007028579711914062,
0.047821044921875,
-0.0158233642578125,
0.046844482421875,
0.0433349609375,
-0.0084075927734375,
0.0259246826171875,
0.04718017578125,
-0.004364013671875,
-0.0182342529296875,
-0.0084228515625,
-0.066162109375,
-0.0007605552673339844,
-0.022613525390625,
0.006923675537109375,
0.055572509765625,
0.044036865234375,
0.0202178955078125,
0.00989532470703125,
-0.002117156982421875,
0.01058197021484375,
-0.00824737548828125,
-0.00771331787109375,
0.00228118896484375,
-0.0318603515625,
0.06451416015625,
0.015655517578125,
0.030670166015625,
-0.037261962890625,
0.005466461181640625,
0.00896453857421875,
-0.0024566650390625,
0.0187835693359375,
-0.0202789306640625,
-0.05535888671875,
0.0611572265625,
0.056365966796875,
0.026092529296875,
0.038665771484375,
-0.0150909423828125,
0.012481689453125,
-0.0119171142578125,
-0.02777099609375,
-0.02593994140625,
0.0401611328125,
0.01861572265625,
-0.0211334228515625,
0.0217437744140625,
0.01001739501953125,
-0.00394439697265625,
-0.01068115234375,
0.01059722900390625,
0.034210205078125,
-0.024932861328125,
0.0073394775390625,
0.01293182373046875,
-0.01898193359375,
-0.0279693603515625,
0.00098419189453125,
0.0078887939453125,
-0.0017518997192382812,
0.0772705078125,
-0.036956787109375,
0.00007170438766479492,
0.0491943359375,
-0.0572509765625,
-0.0083465576171875,
-0.034149169921875,
-0.0054779052734375,
-0.0126190185546875,
-0.037994384765625,
0.01540374755859375,
0.011077880859375,
-0.0106201171875,
-0.040802001953125,
-0.025604248046875,
0.00481414794921875,
-0.0233154296875,
-0.057342529296875,
0.006435394287109375,
-0.030914306640625,
0.01454925537109375,
-0.02783203125,
-0.0253143310546875,
0.053253173828125,
0.0218963623046875,
-0.0140380859375,
-0.01293182373046875,
-0.01326751708984375,
-0.004146575927734375,
0.033782958984375,
-0.04290771484375,
-0.004085540771484375,
-0.007358551025390625,
-0.03076171875,
0.00777435302734375,
0.01554107666015625,
-0.0292205810546875,
-0.018341064453125,
0.04693603515625,
0.10382080078125,
-0.056793212890625,
-0.0143280029296875,
0.033294677734375,
0.04193115234375,
-0.007686614990234375,
-0.01488494873046875,
0.03240966796875,
-0.0633544921875,
-0.014862060546875,
0.014251708984375,
-0.0120391845703125,
-0.033172607421875,
-0.020355224609375,
-0.05633544921875,
0.1075439453125,
-0.04351806640625,
0.03924560546875,
0.0240936279296875,
0.04681396484375,
-0.017730712890625,
0.006748199462890625,
-0.01800537109375,
0.025054931640625,
0.01146697998046875,
-0.01256561279296875,
-0.033538818359375,
-0.0127716064453125,
-0.01056671142578125,
0.03167724609375,
0.0826416015625,
0.006114959716796875,
-0.00836181640625,
-0.0025081634521484375,
0.06256103515625,
0.040771484375,
-0.01104736328125,
0.0013666152954101562,
0.01300048828125,
0.023193359375,
0.0223236083984375,
-0.0311431884765625,
0.0275726318359375,
-0.0357666015625,
-0.01145172119140625,
0.0345458984375,
-0.003871917724609375,
0.0113983154296875,
-0.025054931640625,
-0.052154541015625,
-0.021270751953125,
-0.011199951171875,
-0.0028839111328125,
0.005062103271484375,
0.013671875,
0.037689208984375,
0.0204925537109375,
-0.0127410888671875,
-0.0089263916015625,
-0.0157012939453125,
0.0362548828125,
-0.0185089111328125,
-0.016693115234375,
-0.0275726318359375,
0.0012187957763671875,
0.016357421875,
-0.01380157470703125,
-0.01491546630859375,
0.03582763671875,
0.002902984619140625,
0.048919677734375,
0.004947662353515625,
0.0123138427734375,
-0.0195465087890625,
0.00868988037109375,
-0.012908935546875,
0.03399658203125,
-0.039642333984375,
-0.0131072998046875,
0.016571044921875,
0.022705078125,
0.017852783203125,
-0.004024505615234375,
0.060821533203125,
-0.06939697265625,
-0.04864501953125,
-0.04010009765625,
-0.00019466876983642578,
0.0364990234375,
0.0217437744140625,
-0.007904052734375,
-0.01055145263671875,
-0.02520751953125,
0.0130615234375,
-0.040374755859375,
0.006923675537109375,
0.0181427001953125,
0.03582763671875,
0.00827789306640625,
0.052886962890625,
0.002559661865234375,
-0.02008056640625,
-0.03741455078125,
0.030303955078125,
0.0096588134765625,
0.043243408203125,
-0.0114593505859375,
0.0345458984375,
-0.00862884521484375,
0.0284576416015625,
0.043548583984375,
-0.01165771484375,
0.050323486328125,
0.0213623046875,
-0.055267333984375,
0.005199432373046875,
0.040771484375,
-0.0120391845703125,
0.03778076171875,
-0.03424072265625,
0.0139007568359375,
-0.006633758544921875,
-0.0233917236328125,
-0.00026035308837890625,
-0.011444091796875,
0.04156494140625,
-0.0499267578125,
0.047149658203125,
-0.005069732666015625,
-0.01186370849609375,
-0.0032501220703125,
-0.045806884765625,
0.0090789794921875,
-0.02777099609375,
-0.060150146484375,
-0.00536346435546875,
-0.02252197265625,
0.00408172607421875,
-0.0200042724609375,
0.0027980804443359375,
-0.02728271484375,
0.052032470703125,
0.02398681640625,
0.0069122314453125,
-0.0214385986328125,
0.00920867919921875,
0.01788330078125,
0.035125732421875,
0.0282745361328125,
0.04864501953125,
-0.029632568359375,
-0.01485443115234375,
0.00798797607421875,
0.0250091552734375,
-0.00027871131896972656,
-0.007770538330078125,
0.0098724365234375,
0.019256591796875,
0.070556640625,
-0.03839111328125,
0.0579833984375,
0.016693115234375,
0.025115966796875,
-0.0266265869140625,
0.005886077880859375,
-0.017974853515625,
-0.056060791015625,
0.00922393798828125,
0.022796630859375,
-0.021209716796875,
0.01120758056640625,
-0.0148162841796875,
0.011566162109375,
-0.0182647705078125,
0.0008287429809570312,
-0.058746337890625,
-0.07379150390625,
-0.048858642578125,
0.00823211669921875,
-0.0394287109375,
-0.04437255859375,
-0.0059356689453125,
0.01428985595703125,
0.027496337890625,
-0.0267333984375,
0.03375244140625,
-0.01239013671875,
0.05279541015625,
0.04010009765625,
-0.0086517333984375,
-0.0008230209350585938,
0.032196044921875,
-0.01467132568359375,
0.030853271484375,
0.01039886474609375,
0.035369873046875,
-0.00008612871170043945,
-0.007549285888671875,
0.0227508544921875,
0.01068878173828125,
0.03961181640625,
0.01201629638671875,
-0.0026607513427734375,
0.0242919921875,
-0.01049041748046875,
-0.048858642578125,
-0.013641357421875,
-0.0022563934326171875,
-0.03826904296875,
-0.0102996826171875,
-0.0022716522216796875,
-0.009857177734375,
-0.0262451171875,
0.0223388671875,
0.0034580230712890625,
0.0279541015625,
0.005825042724609375,
-0.074462890625,
0.047698974609375,
-0.044036865234375,
0.057037353515625,
-0.03509521484375,
0.035308837890625,
0.007785797119140625,
0.01096343994140625,
-0.06878662109375,
-0.034149169921875,
0.005016326904296875,
0.050384521484375,
-0.021881103515625,
0.0060577392578125,
0.0174713134765625,
-0.005184173583984375,
0.0289764404296875,
-0.01508331298828125,
0.0146484375,
0.049957275390625,
-0.07415771484375,
-0.0024166107177734375,
0.0150909423828125,
0.00252532958984375,
-0.03466796875,
-0.09649658203125,
0.01151275634765625,
-0.07269287109375,
0.0107879638671875,
-0.0066986083984375,
-0.0245513916015625,
-0.020477294921875,
-0.04913330078125,
-0.06890869140625,
0.056671142578125,
-0.008453369140625,
-0.0291748046875,
-0.07550048828125,
0.00604248046875,
0.015960693359375,
-0.00545501708984375,
-0.0286865234375,
-0.0262908935546875,
-0.0474853515625,
0.027099609375,
0.017822265625,
0.042266845703125,
0.0103759765625,
-0.005619049072265625,
-0.05108642578125,
-0.0006704330444335938,
-0.01218414306640625,
0.03289794921875,
-0.00637054443359375,
-0.01213836669921875,
0.0233001708984375,
0.016571044921875,
-0.0229644775390625,
0.00260162353515625,
0.0261077880859375,
0.014739990234375,
-0.0228118896484375,
-0.038330078125,
-0.0208282470703125,
-0.017852783203125,
0.06939697265625,
0.02899169921875,
0.00685882568359375,
-0.019989013671875,
-0.00806427001953125,
0.00943756103515625,
0.0041046142578125,
-0.002368927001953125,
0.01512908935546875,
-0.0443115234375,
-0.0013895034790039062,
-0.015716552734375,
0.02264404296875,
-0.041534423828125,
-0.032012939453125,
-0.03546142578125,
-0.05828857421875,
-0.05633544921875,
0.039276123046875,
-0.0287628173828125,
-0.044647216796875,
0.046630859375,
-0.01302337646484375,
0.042327880859375,
-0.0123291015625,
0.05145263671875,
0.038909912109375,
0.0171966552734375,
-0.0279541015625,
0.0268402099609375,
-0.047882080078125,
0.01343536376953125,
-0.01812744140625,
-0.017852783203125,
-0.04107666015625,
0.024658203125,
-0.025543212890625,
0.01045989990234375,
0.0113067626953125,
-0.0087127685546875,
-0.0167388916015625,
0.0035610198974609375,
0.0135955810546875,
0.026458740234375,
-0.01009368896484375,
0.00614166259765625,
-0.02447509765625,
0.0234222412109375,
-0.0098114013671875,
0.005786895751953125,
0.0287628173828125,
-0.037445068359375,
0.0105743408203125,
0.0298614501953125,
0.00984954833984375,
-0.026153564453125,
0.01617431640625,
-0.0101318359375,
0.0169525146484375,
-0.0002435445785522461
]
|
dab5319a86133e5a186b81f1c8f14977800c929f | Wordpress Stackexchange
Q: What's the database relationship between a post and its attachments I'm creating a custom import script to migrate CSV data into wordpress. Each post has a series of attachments that must come with it.
Following chapter 14 (importing via a custom mysql script) in the book Wordpress Professional Development (1st edition), Everything is importing fine, except the book does not explain how to get attachments into posts.
I can see my custom posts in wp_posts, and I can see the attachment post_type. But I can't see how the two are related.
I'm assuming that I'm going to have to save the post first, get the id, and then use that somehow in a relationship with the attachment.
What would be the workflow here (if that's incorrect)? Can you provide an example insert statement(s) that demonstrate how to use sql to get a post into Wordpress?
A: The post that an attachment is related to is determined by the post_parent column on the wp_posts table (depending on your database prefix). Set it to the post_ID of the parent post.
| Q: What's the database relationship between a post and its attachments I'm creating a custom import script to migrate CSV data into wordpress. Each post has a series of attachments that must come with it.
Following chapter 14 (importing via a custom mysql script) in the book Wordpress Professional Development (1st edition), Everything is importing fine, except the book does not explain how to get attachments into posts.
I can see my custom posts in wp_posts, and I can see the attachment post_type. But I can't see how the two are related.
I'm assuming that I'm going to have to save the post first, get the id, and then use that somehow in a relationship with the attachment.
What would be the workflow here (if that's incorrect)? Can you provide an example insert statement(s) that demonstrate how to use sql to get a post into Wordpress?
A: The post that an attachment is related to is determined by the post_parent column on the wp_posts table (depending on your database prefix). Set it to the post_ID of the parent post.
| wordpress | {
"language": "en",
"length": 179,
"provenance": "stackexchange_00019.jsonl.gz:450415",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168075"
} | [
0.060394287109375,
-0.0022487640380859375,
-0.01172637939453125,
-0.021392822265625,
0.0111846923828125,
-0.04168701171875,
0.045928955078125,
-0.0226898193359375,
0.002040863037109375,
0.00624847412109375,
-0.03900146484375,
-0.00447845458984375,
-0.040313720703125,
-0.025238037109375,
-0.0211639404296875,
-0.0516357421875,
0.049407958984375,
-0.00606536865234375,
0.06866455078125,
0.01751708984375,
0.0033130645751953125,
0.0390625,
0.059478759765625,
-0.031982421875,
0.020599365234375,
0.047119140625,
0.06591796875,
-0.0157318115234375,
0.041473388671875,
0.01239013671875,
0.033203125,
-0.06439208984375,
0.027099609375,
-0.012176513671875,
-0.007671356201171875,
-0.01151275634765625,
0.0017004013061523438,
-0.003887176513671875,
-0.02813720703125,
0.0428466796875,
0.01258087158203125,
-0.0143890380859375,
0.00925445556640625,
0.0026702880859375,
-0.0268707275390625,
-0.0115966796875,
0.0233306884765625,
-0.01348876953125,
0.03399658203125,
-0.006866455078125,
0.009246826171875,
0.018585205078125,
0.01482391357421875,
0.00525665283203125,
-0.0194549560546875,
-0.0186004638671875,
-0.03277587890625,
0.0131378173828125,
0.0123443603515625,
0.01496124267578125,
-0.01039886474609375,
0.0128631591796875,
0.0113067626953125,
0.0118255615234375,
0.01280975341796875,
0.0003509521484375,
0.02777099609375,
0.02008056640625,
-0.04107666015625,
-0.01052093505859375,
0.0255584716796875,
-0.01568603515625,
-0.018585205078125,
-0.0272064208984375,
0.01042938232421875,
0.00974273681640625,
0.019805908203125,
-0.02044677734375,
-0.0186309814453125,
0.035125732421875,
0.00970458984375,
0.017425537109375,
-0.0178680419921875,
-0.01015472412109375,
0.003917694091796875,
0.01364898681640625,
-0.01386260986328125,
-0.0210113525390625,
0.0036067962646484375,
-0.027618408203125,
-0.00701904296875,
-0.0221405029296875,
-0.0140838623046875,
0.012969970703125,
-0.017120361328125,
-0.0200653076171875,
0.01739501953125,
0.0384521484375,
-0.01494598388671875,
0.029754638671875,
-0.0072479248046875,
-0.0289154052734375,
0.05517578125,
-0.032257080078125,
0.016021728515625,
-0.0092926025390625,
-0.0205841064453125,
-0.0650634765625,
0.033111572265625,
0.0170440673828125,
-0.03240966796875,
0.05438232421875,
0.037384033203125,
0.0279083251953125,
-0.026092529296875,
-0.0178375244140625,
-0.000028014183044433594,
0.0316162109375,
-0.0113983154296875,
0.032928466796875,
-0.02593994140625,
-0.0101470947265625,
-0.061859130859375,
-0.0163116455078125,
0.0125885009765625,
-0.0279083251953125,
-0.003337860107421875,
0.0570068359375,
-0.036102294921875,
0.04949951171875,
-0.0165863037109375,
-0.007965087890625,
0.0684814453125,
0.042572021484375,
0.00887298583984375,
-0.0296630859375,
-0.0032501220703125,
-0.0223388671875,
-0.00095367431640625,
0.0006361007690429688,
0.03460693359375,
-0.04083251953125,
-0.0280914306640625,
0.020782470703125,
-0.00830078125,
0.022247314453125,
0.01904296875,
0.012359619140625,
-0.01995849609375,
-0.04852294921875,
-0.003650665283203125,
-0.01371002197265625,
0.02386474609375,
0.002758026123046875,
-0.0196990966796875,
-0.038726806640625,
-0.012054443359375,
-0.0345458984375,
0.03900146484375,
-0.045654296875,
0.041259765625,
0.0095062255859375,
0.01434326171875,
-0.0147857666015625,
-0.037933349609375,
-0.01035308837890625,
-0.056854248046875,
-0.0187530517578125,
0.02203369140625,
-0.0015230178833007812,
0.000484466552734375,
-0.00720977783203125,
0.000347137451171875,
-0.0022373199462890625,
-0.0025043487548828125,
0.00673675537109375,
-0.0286712646484375,
-0.0241241455078125,
0.0091705322265625,
0.05474853515625,
0.019744873046875,
-0.018951416015625,
-0.00994873046875,
0.0241546630859375,
-0.018585205078125,
0.03228759765625,
0.01358795166015625,
0.034210205078125,
-0.00206756591796875,
0.034912109375,
0.002025604248046875,
0.04339599609375,
-0.01325225830078125,
0.0167694091796875,
-0.01506805419921875,
-0.0269775390625,
0.006473541259765625,
0.002941131591796875,
-0.00994873046875,
0.0092620849609375,
-0.0418701171875,
0.0301666259765625,
0.020904541015625,
0.021392822265625,
0.0255889892578125,
0.0224609375,
-0.0017824172973632812,
0.04022216796875,
-0.038848876953125,
0.0093994140625,
0.036956787109375,
0.0304107666015625,
-0.04608154296875,
-0.0172271728515625,
0.00634765625,
0.005279541015625,
-0.0037746429443359375,
0.00890350341796875,
-0.037567138671875,
0.03326416015625,
-0.07000732421875,
-0.0167999267578125,
-0.08209228515625,
0.0269622802734375,
0.01067352294921875,
0.0018796920776367188,
-0.025482177734375,
0.00839996337890625,
0.0087890625,
0.0322265625,
-0.0018329620361328125,
-0.009307861328125,
0.005401611328125,
-0.020965576171875,
-0.0204315185546875,
0.0190887451171875,
0.015655517578125,
-0.0435791015625,
-0.0087738037109375,
0.050811767578125,
0.03826904296875,
0.0302276611328125,
0.0023956298828125,
0.0006504058837890625,
0.04595947265625,
-0.04681396484375,
0.0015010833740234375,
0.00634765625,
0.004695892333984375,
0.05517578125,
-0.0157623291015625,
0.0219268798828125,
-0.0037841796875,
-0.0577392578125,
0.01129913330078125,
0.04132080078125,
-0.005615234375,
-0.0066680908203125,
-0.0277099609375,
0.0232086181640625,
0.0025997161865234375,
-0.0214691162109375,
-0.0189666748046875,
-0.00296783447265625,
0.01049041748046875,
0.02471923828125,
0.060089111328125,
0.036895751953125,
-0.0095367431640625,
0.0033054351806640625,
0.0021419525146484375,
0.01088714599609375,
0.006805419921875,
-0.001953125,
0.0213470458984375,
0.0193634033203125,
-0.0004489421844482422,
-0.01641845703125,
0.015777587890625,
0.004444122314453125,
-0.01464080810546875,
0.0186004638671875,
0.0021839141845703125,
-0.00934600830078125,
-0.0252227783203125,
-0.052490234375,
0.040557861328125,
0.033782958984375,
-0.047882080078125,
-0.0149993896484375,
-0.00815582275390625,
0.07147216796875,
0.0022068023681640625,
0.022857666015625,
0.0245513916015625,
0.01605224609375,
0.014556884765625,
-0.060821533203125,
0.06402587890625,
-0.04345703125,
0.004329681396484375,
0.06353759765625,
-0.008544921875,
0.0169219970703125,
-0.00626373291015625,
0.03125,
0.0157318115234375,
0.026702880859375,
0.0164947509765625,
-0.047271728515625,
0.007442474365234375,
-0.01157379150390625,
0.0247344970703125,
0.09234619140625,
-0.042816162109375,
-0.060760498046875,
-0.012969970703125,
0.0282745361328125,
-0.071533203125,
-0.06060791015625,
0.0181427001953125,
-0.056549072265625,
-0.006702423095703125,
-0.01873779296875,
-0.0162200927734375,
-0.020416259765625,
-0.002658843994140625,
-0.0019741058349609375,
-0.019989013671875,
-0.0194091796875,
-0.0350341796875,
-0.06109619140625,
-0.07806396484375,
-0.0301361083984375,
0.0087738037109375,
0.034759521484375,
0.0137176513671875,
0.03643798828125,
0.001430511474609375,
-0.04150390625,
0.0157470703125,
0.0041961669921875,
-0.020965576171875,
0.00667572021484375,
-0.003818511962890625,
0.005039215087890625,
-0.0020923614501953125,
0.0022068023681640625,
0.040771484375,
0.019500732421875,
-0.041534423828125,
-0.004673004150390625,
0.0030040740966796875,
0.0254669189453125,
0.01508331298828125,
0.01552581787109375,
-0.0147857666015625,
0.0306854248046875,
0.0120391845703125,
-0.030303955078125,
-0.008331298828125,
-0.00925445556640625,
-0.0178680419921875,
-0.02886962890625,
-0.01421356201171875,
0.0107269287109375,
-0.04058837890625,
0.03192138671875,
0.01479339599609375,
-0.003124237060546875,
0.0003688335418701172,
-0.01125335693359375,
0.01522064208984375,
0.006557464599609375,
0.0252227783203125,
-0.0038242340087890625,
0.04425048828125,
-0.0019102096557617188,
-0.0033283233642578125,
0.021636962890625,
0.00870513916015625,
-0.022430419921875,
0.022735595703125,
-0.05694580078125,
-0.087646484375,
0.055938720703125,
0.00980377197265625,
0.0217437744140625,
-0.030517578125,
-0.044403076171875,
0.0271148681640625,
0.1322021484375,
-0.01114654541015625,
-0.007617950439453125,
-0.01016998291015625,
0.004306793212890625,
-0.0194549560546875,
-0.05303955078125,
-0.01824951171875,
-0.0169219970703125,
0.0244903564453125,
-0.00997161865234375,
-0.0101318359375,
-0.0058441162109375,
-0.01090240478515625,
0.019561767578125,
0.01253509521484375,
-0.0026988983154296875,
0.0248260498046875,
-0.019775390625,
0.01358795166015625,
0.0367431640625,
-0.033843994140625,
0.044921875,
-0.034637451171875,
-0.014373779296875,
-0.06866455078125,
-0.0218658447265625,
0.002593994140625,
0.040252685546875,
-0.006305694580078125,
0.0006685256958007812,
-0.005695343017578125,
0.045684814453125,
0.0166473388671875,
0.01500701904296875,
0.00453948974609375,
0.0117950439453125,
-0.0187835693359375,
-0.050445556640625,
-0.00911712646484375,
-0.045074462890625,
-0.0278472900390625,
-0.101806640625,
-0.0311279296875,
-0.071044921875,
-0.032806396484375,
0.042816162109375,
-0.0430908203125,
0.0261688232421875,
-0.01198577880859375,
-0.0212554931640625,
-0.01397705078125,
0.0592041015625,
0.00124359130859375,
-0.00409698486328125,
-0.054229736328125,
-0.0511474609375,
0.03497314453125,
-0.016937255859375,
0.005268096923828125,
0.00795745849609375,
0.071533203125,
0.0052642822265625,
-0.00983428955078125,
-0.044708251953125,
-0.004947662353515625,
0.036163330078125,
-0.036376953125,
0.070556640625,
0.0697021484375,
0.00400543212890625,
0.00872039794921875,
0.01065826416015625,
-0.0007491111755371094,
-0.035858154296875,
0.05126953125,
-0.0013885498046875,
-0.0017910003662109375,
0.007602691650390625,
-0.0197601318359375,
0.03271484375,
0.017913818359375,
-0.00981903076171875,
-0.04473876953125,
0.005855560302734375,
0.052215576171875,
-0.036956787109375,
0.06854248046875,
-0.01837158203125,
-0.01123809814453125,
0.01560211181640625,
-0.0650634765625,
0.0174713134765625,
-0.0102386474609375,
-0.0005183219909667969,
-0.0237274169921875,
-0.0205230712890625,
-0.0202178955078125,
-0.005687713623046875,
-0.01032257080078125,
0.0199737548828125,
0.0105438232421875,
0.01190948486328125,
-0.01013946533203125,
-0.00989532470703125,
0.0023193359375,
0.028533935546875,
-0.01309967041015625,
-0.04022216796875,
-0.032196044921875,
0.0014772415161132812,
0.030487060546875,
0.043701171875,
0.00595855712890625,
0.00986480712890625,
-0.008087158203125,
-0.0372314453125,
-0.0103912353515625,
-0.019073486328125,
-0.0005612373352050781,
-0.04705810546875,
-0.0225677490234375,
-0.0097808837890625,
-0.0024509429931640625,
0.0031833648681640625,
0.04095458984375,
-0.03045654296875,
0.02435302734375,
-0.0108642578125,
0.04449462890625,
0.015106201171875,
0.036376953125,
-0.0084991455078125,
0.01303863525390625,
0.00583648681640625,
0.0078582763671875,
0.00836181640625,
-0.0518798828125,
0.044525146484375,
0.0031585693359375,
0.0955810546875,
-0.035858154296875,
-0.08563232421875,
0.045989990234375,
-0.1053466796875,
-0.0178985595703125,
0.03619384765625,
0.05364990234375,
-0.00971221923828125,
-0.02020263671875,
-0.01259613037109375,
0.00823211669921875,
0.0242919921875,
-0.01003265380859375,
0.03375244140625,
-0.0147552490234375,
0.036773681640625,
0.00506591796875,
0.0015459060668945312,
-0.00926971435546875,
-0.004032135009765625,
-0.0181121826171875,
-0.03497314453125,
-0.0224151611328125,
0.0171966552734375,
0.01009368896484375,
-0.01110076904296875,
-0.027313232421875,
0.02294921875,
0.0172576904296875,
0.0119171142578125,
-0.04058837890625,
-0.022125244140625,
-0.06134033203125,
-0.0210723876953125,
0.08966064453125,
0.031829833984375,
0.0083770751953125,
-0.0266571044921875,
-0.032012939453125,
-0.034423828125,
0.0203094482421875,
-0.0035400390625,
-0.050079345703125,
-0.0011720657348632812,
-0.03875732421875,
0.01690673828125,
-0.0158843994140625,
0.0223846435546875,
-0.001346588134765625,
0.0208740234375,
-0.020263671875,
0.018341064453125,
0.019134521484375,
0.08660888671875,
-0.0303497314453125,
0.06787109375,
0.0263671875,
0.035064697265625,
-0.05169677734375,
-0.0208282470703125,
0.0004165172576904297,
-0.06781005859375,
0.006744384765625,
-0.01071929931640625,
0.007740020751953125,
-0.0005335807800292969,
-0.016845703125,
0.0012483596801757812,
0.0186309814453125,
-0.031036376953125,
-0.0102081298828125,
-0.0141448974609375,
0.053192138671875,
-0.033966064453125,
-0.0020275115966796875,
0.0290985107421875,
-0.038330078125,
0.01488494873046875,
0.032135009765625,
0.0306549072265625,
0.0108795166015625,
-0.046661376953125,
0.00811004638671875,
0.0162506103515625,
-0.00946044921875,
0.012603759765625,
0.0513916015625,
0.007648468017578125,
0.0182647705078125,
0.0258331298828125,
-0.00383758544921875,
0.0020046234130859375,
0.03802490234375,
-0.00949859619140625,
-0.020751953125,
0.03021240234375,
-0.004238128662109375,
-0.0418701171875,
-0.0212249755859375,
-0.045806884765625,
0.0200653076171875,
-0.0290985107421875,
0.04302978515625,
0.0132598876953125,
0.021087646484375,
-0.0011692047119140625,
-0.03106689453125,
0.025238037109375,
0.008270263671875,
-0.0015697479248046875,
-0.024444580078125,
0.004974365234375,
0.0204315185546875,
-0.01123046875,
-0.00464630126953125,
-0.013916015625,
0.00162506103515625,
-0.007305145263671875,
-0.01346588134765625,
-0.0158843994140625,
-0.0116424560546875,
-0.042083740234375,
0.0289306640625,
-0.026702880859375,
0.0014657974243164062,
0.005359649658203125,
-0.0014886856079101562,
-0.006946563720703125,
-0.042236328125,
0.007556915283203125,
-0.05535888671875,
0.006000518798828125,
-0.02728271484375,
0.0158538818359375,
0.060150146484375,
0.02691650390625,
0.0174560546875,
-0.048492431640625,
0.024017333984375,
-0.004283905029296875,
-0.02886962890625,
-0.023681640625,
-0.003353118896484375,
0.061065673828125,
-0.058380126953125,
0.02740478515625,
-0.0283355712890625,
0.01160430908203125,
-0.0133056640625,
-0.0253143310546875,
0.0465087890625,
-0.0273895263671875,
-0.0077056884765625,
0.0294189453125,
0.04302978515625,
-0.007740020751953125,
0.01067352294921875,
0.031829833984375,
-0.050567626953125,
-0.03729248046875,
0.01200103759765625,
-0.061920166015625,
-0.0447998046875,
-0.00559234619140625,
-0.06353759765625,
0.045379638671875,
0.00848388671875,
0.024993896484375,
0.01177978515625,
0.0002027750015258789,
-0.0302276611328125,
-0.0236358642578125,
-0.059112548828125,
0.05169677734375,
0.02154541015625,
0.035064697265625,
-0.06658935546875,
-0.00862884521484375,
-0.00714111328125,
0.032928466796875,
0.07159423828125,
0.022186279296875,
-0.029693603515625,
-0.0080718994140625,
0.0660400390625,
0.05316162109375,
0.00948333740234375,
0.0224456787109375,
0.009552001953125,
0.0200958251953125,
0.0654296875,
-0.00368499755859375,
0.039642333984375,
0.0154266357421875,
-0.01561737060546875,
0.0225677490234375,
0.03131103515625,
0.051422119140625,
-0.020965576171875,
0.0101318359375,
0.00677490234375,
-0.02496337890625,
0.027618408203125,
-0.05853271484375,
-0.0074615478515625,
0.029754638671875,
0.031768798828125,
-0.07647705078125,
-0.0228271484375,
-0.0362548828125,
0.03900146484375,
-0.002716064453125,
0.0182342529296875,
0.012054443359375,
0.0133209228515625,
0.01812744140625,
-0.001972198486328125,
0.008819580078125,
0.018280029296875,
-0.03228759765625,
0.034271240234375,
-0.01450347900390625,
0.0060577392578125,
-0.059661865234375,
0.00037479400634765625,
0.03106689453125,
0.048736572265625,
-0.0377197265625,
-0.01499176025390625,
0.0335693359375,
0.019378662109375,
-0.029083251953125,
-0.0222015380859375,
-0.032928466796875,
-0.031707763671875,
0.0272216796875,
-0.005435943603515625,
0.01039886474609375,
0.01100921630859375,
0.00038695335388183594,
0.0033016204833984375,
0.034271240234375,
-0.0199127197265625,
0.0196075439453125,
-0.03204345703125,
0.015655517578125,
0.029541015625,
0.0096435546875,
-0.0148773193359375,
0.0296783447265625,
0.01507568359375,
0.013092041015625,
0.0106201171875,
-0.00988006591796875,
0.0010995864868164062,
-0.00673675537109375,
0.004680633544921875,
-0.020538330078125,
0.013092041015625,
0.022216796875,
0.0159454345703125,
0.0347900390625,
0.0374755859375,
-0.01146697998046875,
-0.0477294921875,
-0.01031494140625,
0.0015888214111328125,
-0.0384521484375,
-0.00908660888671875,
-0.03814697265625,
0.02587890625,
0.026153564453125,
0.0243682861328125,
-0.0180816650390625,
0.017364501953125,
0.046539306640625,
-0.0029201507568359375,
0.062744140625,
-0.0029125213623046875,
-0.0020542144775390625,
0.08343505859375,
-0.00128936767578125,
0.0909423828125,
0.01873779296875,
-0.059844970703125,
-0.02056884765625,
-0.0273590087890625,
-0.0277557373046875,
0.00577545166015625,
0.031463623046875,
-0.006622314453125,
0.0159149169921875,
-0.00012254714965820312,
-0.0224151611328125,
0.0033283233642578125,
0.0210113525390625,
0.008056640625,
-0.0147247314453125,
0.01325225830078125,
-0.013336181640625,
-0.038330078125,
-0.0183868408203125,
-0.0088043212890625,
0.0231475830078125,
0.042205810546875,
-0.007488250732421875,
0.0286865234375,
0.03631591796875,
-0.0100250244140625,
0.0623779296875,
-0.05548095703125,
-0.02325439453125,
0.0265960693359375,
-0.0151214599609375,
0.0013990402221679688,
0.002178192138671875,
0.0021533966064453125,
-0.0008292198181152344,
0.03900146484375,
-0.0335693359375,
-0.0289154052734375,
-0.00428009033203125,
0.0269317626953125,
0.01280975341796875,
0.0154571533203125,
-0.0212249755859375,
0.0210723876953125,
-0.00804901123046875,
-0.056854248046875,
0.0509033203125,
0.006298065185546875,
0.027862548828125,
0.032501220703125,
0.0194091796875,
-0.00809478759765625,
0.038818359375,
-0.027130126953125,
0.082275390625,
0.028839111328125,
-0.027557373046875,
-0.058135986328125,
0.0306396484375,
-0.004184722900390625,
-0.0035762786865234375,
0.021026611328125,
0.069580078125,
0.036712646484375,
-0.0484619140625,
-0.0162353515625,
0.0556640625,
0.065185546875,
0.017974853515625,
0.04827880859375,
-0.0166778564453125,
-0.032135009765625,
0.0313720703125,
-0.03143310546875,
-0.03118896484375,
-0.06304931640625,
0.004638671875,
0.0259246826171875,
-0.0374755859375,
-0.010955810546875,
-0.0445556640625,
-0.042572021484375,
0.02978515625,
0.01031494140625,
-0.0380859375,
0.01312255859375,
-0.005191802978515625,
-0.01554107666015625,
-0.01430511474609375,
0.00998687744140625,
0.0036163330078125,
0.042999267578125,
-0.004222869873046875,
-0.0640869140625,
-0.0210723876953125,
0.050323486328125,
-0.044219970703125,
0.051300048828125,
0.029876708984375,
-0.044647216796875,
0.03509521484375,
0.0653076171875,
0.05413818359375,
0.10430908203125,
0.00009465217590332031,
-0.05224609375,
-0.0278472900390625,
0.0219879150390625,
0.00994110107421875,
-0.0164337158203125,
0.0121917724609375,
-0.03900146484375,
-0.0002808570861816406,
-0.052154541015625,
0.023223876953125,
0.0264739990234375,
-0.031829833984375,
-0.085205078125,
0.0538330078125,
-0.045654296875,
-0.02777099609375,
-0.07110595703125,
-0.0034961700439453125,
0.007396697998046875,
-0.008331298828125,
-0.01629638671875,
-0.064697265625,
-0.044830322265625,
0.04345703125,
-0.0229339599609375,
-0.0253448486328125,
0.017913818359375,
-0.03009033203125,
-0.0430908203125,
0.007354736328125,
0.0163116455078125,
-0.030670166015625,
0.0221099853515625,
0.004787445068359375,
0.051116943359375,
0.07574462890625,
-0.01200103759765625,
0.037750244140625,
-0.01812744140625,
-0.055908203125,
-0.0229949951171875,
-0.013427734375,
-0.0280914306640625,
0.0076751708984375,
0.0621337890625,
0.0982666015625,
0.0102386474609375,
-0.05169677734375,
0.01233673095703125,
-0.01526641845703125,
-0.0751953125,
0.0013599395751953125,
0.026641845703125,
-0.03936767578125,
0.0026988983154296875,
-0.002971649169921875,
0.0128021240234375,
-0.00820159912109375,
-0.020660400390625,
-0.0009074211120605469,
-0.0251312255859375,
-0.00469207763671875,
-0.0151824951171875,
0.00308990478515625,
0.01267242431640625,
0.0697021484375,
-0.0430908203125,
-0.0218048095703125,
0.04693603515625,
-0.021514892578125,
0.006683349609375,
0.050567626953125,
0.01078033447265625,
-0.0357666015625,
0.0063934326171875,
0.01528167724609375,
0.0095672607421875,
0.01397705078125,
0.001956939697265625,
-0.030975341796875,
0.0045318603515625,
0.004161834716796875,
-0.0124664306640625,
-0.00460052490234375,
0.0012598037719726562,
0.0217132568359375,
-0.0179290771484375,
0.057586669921875,
0.0064849853515625,
-0.01084136962890625,
-0.01035308837890625,
0.032318115234375,
-0.02142333984375,
-0.01165008544921875,
-0.0239715576171875,
-0.0130767822265625,
0.00732421875,
-0.018951416015625,
0.01422119140625,
-0.03497314453125,
0.022918701171875,
0.05181884765625,
-0.01434326171875,
0.0195159912109375
]
|
2e91d92ebf658ce1891f2191ed7657d7ab7211d0 | Wordpress Stackexchange
Q: How make a multi language routes, with rewrite rules or rewrite endpoints? I want to know a concept of making a multi language routing system for WP. That is the best practice, to make this routing system with add_rewrite_rules for pages post archive etc in part, or to use add_rewrite_endpoint with bitmask?
| Q: How make a multi language routes, with rewrite rules or rewrite endpoints? I want to know a concept of making a multi language routing system for WP. That is the best practice, to make this routing system with add_rewrite_rules for pages post archive etc in part, or to use add_rewrite_endpoint with bitmask?
| wordpress | {
"language": "en",
"length": 53,
"provenance": "stackexchange_00019.jsonl.gz:450429",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168116"
} | [
-0.0143280029296875,
-0.045562744140625,
0.006267547607421875,
-0.01947021484375,
-0.048583984375,
0.0036792755126953125,
-0.0034732818603515625,
0.0210418701171875,
-0.017303466796875,
0.01056671142578125,
0.0309600830078125,
0.007152557373046875,
-0.01849365234375,
-0.0394287109375,
0.0303955078125,
-0.00811767578125,
0.0204010009765625,
-0.0099029541015625,
0.010162353515625,
-0.006534576416015625,
0.0032978057861328125,
-0.00563812255859375,
0.0267486572265625,
0.041656494140625,
0.01812744140625,
-0.038116455078125,
0.02984619140625,
-0.0004124641418457031,
-0.01355743408203125,
-0.025543212890625,
0.02813720703125,
0.0310516357421875,
0.0498046875,
-0.016387939453125,
-0.011383056640625,
-0.005157470703125,
-0.0164337158203125,
-0.0202789306640625,
-0.020111083984375,
0.023956298828125,
0.029296875,
-0.021209716796875,
0.0462646484375,
0.016754150390625,
0.02923583984375,
-0.034149169921875,
0.0316162109375,
-0.0797119140625,
0.00684356689453125,
0.04254150390625,
-0.000013947486877441406,
-0.0018329620361328125,
-0.0209808349609375,
0.049560546875,
-0.00455474853515625,
-0.00556182861328125,
0.0263214111328125,
-0.007465362548828125,
0.0267791748046875,
-0.0128021240234375,
-0.043487548828125,
0.0077667236328125,
0.03082275390625,
-0.0008859634399414062,
-0.0037689208984375,
-0.00894927978515625,
0.027313232421875,
0.0226593017578125,
-0.058441162109375,
-0.02545166015625,
0.03125,
-0.0217437744140625,
0.0197601318359375,
-0.034149169921875,
-0.0068817138671875,
0.0014791488647460938,
-0.0018863677978515625,
-0.0021076202392578125,
0.02587890625,
-0.0245513916015625,
-0.0307769775390625,
-0.0252532958984375,
-0.01812744140625,
-0.06793212890625,
0.00664520263671875,
-0.063720703125,
-0.0234527587890625,
0.026458740234375,
-0.06512451171875,
-0.0307464599609375,
-0.030670166015625,
-0.024993896484375,
-0.09375,
-0.0158843994140625,
0.01218414306640625,
-0.03363037109375,
-0.001247406005859375,
-0.0294189453125,
0.0026645660400390625,
0.01580810546875,
0.037506103515625,
-0.056671142578125,
0.0855712890625,
-0.028167724609375,
0.0163421630859375,
-0.0008597373962402344,
-0.0162200927734375,
0.04736328125,
0.0811767578125,
0.042205810546875,
0.003704071044921875,
0.100341796875,
0.01531982421875,
-0.0078125,
-0.03955078125,
-0.0056915283203125,
-0.026275634765625,
0.00635528564453125,
0.00926971435546875,
-0.0030689239501953125,
-0.0270538330078125,
-0.022247314453125,
0.049102783203125,
-0.005825042724609375,
0.011962890625,
-0.0121917724609375,
-0.020477294921875,
-0.0117034912109375,
0.034759521484375,
0.04925537109375,
-0.0017251968383789062,
0.006412506103515625,
-0.002895355224609375,
-0.0230560302734375,
-0.0567626953125,
-0.0213165283203125,
0.043609619140625,
0.04571533203125,
0.0304107666015625,
-0.006793975830078125,
0.015777587890625,
-0.02593994140625,
0.0004930496215820312,
0.05084228515625,
0.0074615478515625,
0.0092926025390625,
0.027984619140625,
0.0252532958984375,
-0.0147552490234375,
-0.019744873046875,
0.01030731201171875,
-0.02288818359375,
0.0025482177734375,
-0.0012693405151367188,
0.0307769775390625,
-0.0228424072265625,
0.004169464111328125,
-0.0027637481689453125,
0.01146697998046875,
0.020904541015625,
-0.00817108154296875,
-0.0166778564453125,
0.03155517578125,
-0.01378631591796875,
-0.01178741455078125,
-0.00246429443359375,
-0.0584716796875,
0.0003204345703125,
0.0234375,
-0.04119873046875,
0.0303497314453125,
0.00366973876953125,
-0.0018558502197265625,
-0.028228759765625,
0.007053375244140625,
0.00888824462890625,
0.01117706298828125,
-0.0143585205078125,
-0.0244293212890625,
0.10101318359375,
0.051513671875,
-0.01824951171875,
-0.00997161865234375,
0.0225067138671875,
-0.08551025390625,
0.06597900390625,
-0.0015954971313476562,
0.122802734375,
0.021575927734375,
0.00505828857421875,
0.01177978515625,
-0.01318359375,
-0.0023441314697265625,
0.005237579345703125,
-0.02154541015625,
-0.00942230224609375,
-0.0097198486328125,
0.0149383544921875,
-0.0189208984375,
-0.005893707275390625,
-0.00927734375,
0.0302581787109375,
-0.0106048583984375,
0.044677734375,
-0.0025882720947265625,
0.0246734619140625,
-0.00737762451171875,
0.0134735107421875,
0.0009927749633789062,
-0.01496124267578125,
0.021575927734375,
0.0190582275390625,
-0.024444580078125,
-0.0269317626953125,
-0.034423828125,
0.058807373046875,
-0.02471923828125,
-0.00977325439453125,
0.0023517608642578125,
0.00267791748046875,
0.0200042724609375,
-0.007404327392578125,
0.0000025033950805664062,
0.002964019775390625,
-0.032562255859375,
0.00942230224609375,
-0.03216552734375,
0.0073394775390625,
-0.0308685302734375,
0.00047278404235839844,
0.004680633544921875,
0.03375244140625,
-0.0233917236328125,
0.01434326171875,
-0.01485443115234375,
-0.0142822265625,
0.0013666152954101562,
-0.0257568359375,
0.0275726318359375,
0.0257720947265625,
0.032073974609375,
0.00939178466796875,
-0.0223236083984375,
0.015777587890625,
-0.026153564453125,
-0.0849609375,
-0.0038204193115234375,
0.0130767822265625,
-0.0289306640625,
0.0498046875,
0.01340484619140625,
0.01183319091796875,
-0.01507568359375,
-0.054107666015625,
-0.019287109375,
0.020782470703125,
-0.020172119140625,
-0.03369140625,
-0.02001953125,
0.0193328857421875,
0.00872802734375,
0.0009579658508300781,
-0.0228118896484375,
-0.0036163330078125,
-0.01168060302734375,
-0.0193634033203125,
-0.01227569580078125,
-0.006122589111328125,
0.02789306640625,
-0.0227508544921875,
0.0162506103515625,
-0.05010986328125,
0.00734710693359375,
0.0178680419921875,
0.01010894775390625,
-0.01520538330078125,
0.0014057159423828125,
-0.01763916015625,
0.0310821533203125,
0.003612518310546875,
-0.022979736328125,
0.049774169921875,
-0.01751708984375,
-0.030426025390625,
-0.0117645263671875,
-0.049957275390625,
-0.0217132568359375,
-0.059356689453125,
0.0675048828125,
-0.004886627197265625,
0.01363372802734375,
-0.00521087646484375,
-0.012939453125,
0.0565185546875,
0.040985107421875,
-0.0665283203125,
0.00605010986328125,
-0.0275115966796875,
0.02166748046875,
-0.0248260498046875,
-0.0189056396484375,
0.06939697265625,
0.033447265625,
-0.0584716796875,
-0.0031108856201171875,
0.019989013671875,
0.02581787109375,
-0.0201416015625,
-0.020751953125,
-0.018890380859375,
-0.05743408203125,
-0.038177490234375,
0.0278778076171875,
-0.000804901123046875,
0.01479339599609375,
-0.0128173828125,
-0.01172637939453125,
0.022705078125,
-0.0247039794921875,
-0.0255279541015625,
0.0196380615234375,
-0.04315185546875,
0.0447998046875,
0.025726318359375,
-0.005405426025390625,
-0.050689697265625,
0.06719970703125,
0.004894256591796875,
-0.029632568359375,
-0.037841796875,
-0.048675537109375,
-0.0936279296875,
-0.05426025390625,
-0.02618408203125,
-0.003757476806640625,
0.001323699951171875,
0.004566192626953125,
0.041015625,
-0.00021326541900634766,
-0.031280517578125,
0.004703521728515625,
0.01157379150390625,
-0.009796142578125,
-0.00943756103515625,
-0.03436279296875,
-0.00244140625,
0.0035400390625,
-0.00019538402557373047,
0.02508544921875,
0.00418853759765625,
-0.0038204193115234375,
0.002838134765625,
-0.01447296142578125,
0.0285491943359375,
-0.001010894775390625,
-0.05035400390625,
0.0192413330078125,
0.0031261444091796875,
-0.04931640625,
-0.041259765625,
-0.0423583984375,
0.048828125,
-0.0033435821533203125,
-0.0006184577941894531,
-0.01593017578125,
-0.0382080078125,
0.027923583984375,
0.01421356201171875,
0.02032470703125,
0.00592041015625,
-0.01312255859375,
-0.04278564453125,
0.0802001953125,
0.0130767822265625,
0.043243408203125,
-0.021484375,
0.04266357421875,
0.00482940673828125,
0.003971099853515625,
0.012725830078125,
0.0204010009765625,
-0.0109710693359375,
0.024627685546875,
-0.052490234375,
-0.00045800209045410156,
0.0133514404296875,
-0.004489898681640625,
0.0215606689453125,
0.01153564453125,
-0.0138397216796875,
-0.00836181640625,
0.03326416015625,
-0.00859832763671875,
-0.01007843017578125,
-0.00601959228515625,
0.00556182861328125,
-0.0256195068359375,
-0.03887939453125,
-0.00829315185546875,
-0.0083770751953125,
-0.01605224609375,
0.005218505859375,
-0.019439697265625,
-0.004871368408203125,
-0.03216552734375,
-0.03851318359375,
0.00543212890625,
-0.0302886962890625,
0.0499267578125,
-0.038238525390625,
0.0186614990234375,
0.01004791259765625,
0.02349853515625,
-0.0211029052734375,
-0.05926513671875,
-0.00048422813415527344,
-0.052947998046875,
-0.00592803955078125,
-0.0248260498046875,
0.05047607421875,
0.0110321044921875,
-0.054046630859375,
-0.017303466796875,
0.032318115234375,
-0.01113128662109375,
-0.005435943603515625,
-0.01177215576171875,
0.004619598388671875,
0.039581298828125,
0.038818359375,
-0.0091705322265625,
0.0080718994140625,
-0.0118408203125,
0.0125274658203125,
-0.0321044921875,
0.044189453125,
-0.02423095703125,
-0.0311431884765625,
0.00298309326171875,
-0.04681396484375,
-0.08172607421875,
-0.057586669921875,
-0.028350830078125,
0.03460693359375,
-0.01214599609375,
0.000576019287109375,
-0.061798095703125,
-0.09405517578125,
0.0265045166015625,
0.03265380859375,
-0.01390838623046875,
-0.004276275634765625,
0.042938232421875,
0.0025501251220703125,
-0.03631591796875,
-0.05914306640625,
0.01096343994140625,
0.0288848876953125,
-0.015411376953125,
0.03515625,
0.04150390625,
0.0018129348754882812,
0.00992584228515625,
-0.006076812744140625,
-0.019866943359375,
0.0350341796875,
0.022003173828125,
0.017974853515625,
-0.01629638671875,
0.01422882080078125,
0.0007739067077636719,
-0.024688720703125,
0.0521240234375,
-0.00635528564453125,
-0.048492431640625,
-0.034271240234375,
0.055145263671875,
-0.007602691650390625,
0.013885498046875,
-0.05084228515625,
-0.029693603515625,
0.02716064453125,
0.0162353515625,
0.01519012451171875,
0.00992584228515625,
0.008331298828125,
-0.00447845458984375,
-0.010955810546875,
-0.0085601806640625,
0.0399169921875,
0.0158538818359375,
-0.00405120849609375,
0.0246124267578125,
-0.0038318634033203125,
-0.02606201171875,
0.006687164306640625,
-0.01763916015625,
0.09814453125,
0.006107330322265625,
-0.0301666259765625,
0.01427459716796875,
-0.0266265869140625,
-0.01396942138671875,
0.02752685546875,
0.0045166015625,
0.041412353515625,
-0.00962066650390625,
-0.0160369873046875,
-0.00785064697265625,
-0.007904052734375,
-0.041748046875,
-0.050201416015625,
-0.01093292236328125,
-0.01273345947265625,
-0.01261138916015625,
-0.0411376953125,
0.079345703125,
-0.0726318359375,
0.032745361328125,
0.022857666015625,
-0.004505157470703125,
0.022735595703125,
-0.00506591796875,
0.0228118896484375,
0.0127410888671875,
0.007232666015625,
-0.0110015869140625,
0.0229034423828125,
-0.0098419189453125,
-0.006504058837890625,
0.057220458984375,
0.046142578125,
0.0016574859619140625,
0.0159454345703125,
-0.048126220703125,
-0.03955078125,
-0.0201873779296875,
0.0187530517578125,
0.029083251953125,
-0.0235595703125,
-0.009918212890625,
0.000732421875,
0.00571441650390625,
-0.00450897216796875,
0.0132598876953125,
-0.00943756103515625,
-0.017669677734375,
0.01055908203125,
0.018402099609375,
-0.0012216567993164062,
-0.01788330078125,
-0.0205078125,
0.026031494140625,
-0.0269012451171875,
0.018218994140625,
-0.043548583984375,
0.0280609130859375,
-0.038909912109375,
-0.01476287841796875,
0.03314208984375,
0.01512908935546875,
-0.004779815673828125,
0.014434814453125,
-0.033294677734375,
0.06451416015625,
0.004779815673828125,
0.0181121826171875,
-0.0545654296875,
-0.048553466796875,
-0.025604248046875,
-0.034576416015625,
-0.01531219482421875,
-0.0190277099609375,
-0.01515960693359375,
-0.038055419921875,
0.0219879150390625,
0.0006842613220214844,
0.018768310546875,
-0.0238189697265625,
-0.01165771484375,
-0.0175933837890625,
0.0255126953125,
0.023529052734375,
0.039337158203125,
0.005794525146484375,
0.09613037109375,
-0.06988525390625,
0.04095458984375,
-0.0031871795654296875,
0.03680419921875,
-0.0223388671875,
0.0035190582275390625,
0.0034160614013671875,
-0.032623291015625,
-0.044097900390625,
-0.010284423828125,
-0.029144287109375,
0.0261993408203125,
0.05108642578125,
-0.003025054931640625,
0.0302886962890625,
-0.0270843505859375,
0.00762939453125,
-0.0330810546875,
0.01666259765625,
-0.08099365234375,
0.02923583984375,
-0.008392333984375,
0.0133819580078125,
0.0811767578125,
-0.0272216796875,
-0.0002472400665283203,
-0.0069580078125,
-0.021484375,
0.022705078125,
0.01132965087890625,
0.0010080337524414062,
-0.002899169921875,
0.034759521484375,
0.011077880859375,
0.0428466796875,
0.022613525390625,
0.02105712890625,
0.04449462890625,
-0.00913238525390625,
0.005279541015625,
0.005161285400390625,
-0.006397247314453125,
-0.01200103759765625,
0.008087158203125,
0.0020961761474609375,
0.005458831787109375,
0.031280517578125,
0.05450439453125,
0.067626953125,
-0.09619140625,
0.00948333740234375,
0.007568359375,
-0.026031494140625,
-0.0100250244140625,
0.01548004150390625,
-0.006839752197265625,
0.010040283203125,
0.0279693603515625,
-0.027069091796875,
-0.0157623291015625,
0.027679443359375,
0.0006251335144042969,
-0.024261474609375,
0.0111541748046875,
0.04437255859375,
0.03021240234375,
0.0226287841796875,
-0.0289154052734375,
-0.0010957717895507812,
0.0149993896484375,
-0.03857421875,
-0.0217132568359375,
0.02325439453125,
-0.00887298583984375,
-0.0279388427734375,
0.051055908203125,
-0.040008544921875,
0.039642333984375,
-0.005626678466796875,
-0.0191192626953125,
0.010009765625,
0.044464111328125,
-0.030975341796875,
-0.0059814453125,
0.020782470703125,
-0.0223846435546875,
-0.0078582763671875,
-0.0003426074981689453,
0.01207733154296875,
-0.019561767578125,
-0.0157470703125,
0.0087890625,
-0.04461669921875,
-0.0276641845703125,
0.0006060600280761719,
-0.0267486572265625,
0.0299072265625,
-0.035736083984375,
0.00974273681640625,
0.016876220703125,
0.00811004638671875,
0.0265655517578125,
0.0002027750015258789,
-0.035186767578125,
-0.048919677734375,
-0.0364990234375,
-0.024200439453125,
-0.06787109375,
0.04595947265625,
-0.0053558349609375,
-0.067626953125,
0.094970703125,
-0.0019216537475585938,
0.0399169921875,
-0.00634002685546875,
0.0335693359375,
-0.00878143310546875,
0.0272674560546875,
-0.0241851806640625,
0.046417236328125,
0.00395965576171875,
0.002040863037109375,
-0.06646728515625,
-0.0136260986328125,
-0.009429931640625,
0.06341552734375,
0.04595947265625,
0.01239776611328125,
-0.0310211181640625,
-0.01093292236328125,
0.0143585205078125,
0.003765106201171875,
-0.0255889892578125,
0.041900634765625,
-0.009796142578125,
-0.004062652587890625,
0.0175323486328125,
-0.033050537109375,
0.0216064453125,
-0.01251220703125,
-0.0014905929565429688,
0.0244140625,
-0.002094268798828125,
-0.03192138671875,
-0.0029296875,
0.0191650390625,
-0.043731689453125,
0.0140838623046875,
0.0123291015625,
0.0022487640380859375,
0.0029506683349609375,
-0.002826690673828125,
-0.0110931396484375,
-0.021484375,
0.0004756450653076172,
-0.0178070068359375,
0.03955078125,
-0.006488800048828125,
0.042999267578125,
0.057098388671875,
0.0259552001953125,
0.026123046875,
0.037811279296875,
0.030609130859375,
0.004497528076171875,
-0.00922393798828125,
0.05755615234375,
0.027069091796875,
0.0284423828125,
-0.0252685546875,
0.0090789794921875,
-0.0261993408203125,
0.05841064453125,
-0.05389404296875,
-0.007389068603515625,
0.011627197265625,
0.0251922607421875,
-0.000247955322265625,
-0.0147247314453125,
0.03155517578125,
-0.01406097412109375,
0.01279449462890625,
0.002376556396484375,
0.0111083984375,
-0.0012292861938476562,
0.039520263671875,
-0.00972747802734375,
-0.042633056640625,
-0.043060302734375,
0.017242431640625,
-0.03924560546875,
-0.023223876953125,
0.0100250244140625,
0.06884765625,
0.0418701171875,
0.05487060546875,
-0.0200347900390625,
-0.035736083984375,
0.013824462890625,
0.026092529296875,
0.00260162353515625,
-0.019775390625,
0.008544921875,
-0.048736572265625,
-0.005367279052734375,
0.0170135498046875,
0.05926513671875,
0.02716064453125,
0.07659912109375,
0.052490234375,
-0.0260162353515625,
0.00788116455078125,
0.036285400390625,
-0.013092041015625,
0.048675537109375,
-0.05877685546875,
0.05853271484375,
-0.023040771484375,
-0.007465362548828125,
-0.01885986328125,
0.018463134765625,
0.00376129150390625,
0.0217742919921875,
0.0172271728515625,
0.003833770751953125,
-0.03485107421875,
0.020294189453125,
-0.00962066650390625,
0.0577392578125,
0.021026611328125,
-0.05389404296875,
0.0006613731384277344,
-0.0190582275390625,
-0.05450439453125,
0.0369873046875,
0.04876708984375,
-0.03350830078125,
0.01390838623046875,
-0.021453857421875,
0.0274505615234375,
-0.0005693435668945312,
-0.034637451171875,
-0.007122039794921875,
-0.0253753662109375,
0.027313232421875,
-0.0028667449951171875,
-0.047210693359375,
-0.040130615234375,
-0.05023193359375,
0.057769775390625,
0.0222625732421875,
0.065185546875,
-0.0242919921875,
0.049560546875,
0.005962371826171875,
-0.0089874267578125,
0.03973388671875,
0.02490234375,
0.0055694580078125,
0.032318115234375,
0.009490966796875,
-0.0249786376953125,
-0.01568603515625,
-0.0021533966064453125,
0.0106353759765625,
-0.060760498046875,
-0.004070281982421875,
-0.0294189453125,
0.024383544921875,
-0.00799560546875,
0.032073974609375,
-0.046478271484375,
-0.052978515625,
-0.059844970703125,
0.0005793571472167969,
0.0089263916015625,
0.00003224611282348633,
-0.01296234130859375,
0.046051025390625,
-0.0170745849609375,
-0.0125579833984375,
0.02105712890625,
-0.048492431640625,
-0.006519317626953125,
0.00960540771484375,
0.01444244384765625,
-0.0191497802734375,
-0.0011005401611328125,
-0.02215576171875,
0.011566162109375,
-0.005939483642578125,
0.03204345703125,
0.021270751953125,
-0.033843994140625,
-0.031524658203125,
0.004154205322265625,
0.0601806640625,
0.035400390625,
0.0291595458984375,
-0.04827880859375,
-0.00844573974609375,
-0.0384521484375,
0.04254150390625,
0.00594329833984375,
-0.0047454833984375,
-0.018218994140625,
-0.007808685302734375,
-0.0021915435791015625,
-0.00827789306640625,
-0.005626678466796875,
0.00945281982421875,
0.005939483642578125,
-0.045074462890625,
-0.0208740234375,
0.008880615234375,
-0.043426513671875,
0.0443115234375,
-0.047027587890625,
-0.0548095703125,
0.0247344970703125,
0.01438140869140625,
-0.05926513671875,
-0.034698486328125,
-0.02740478515625,
-0.020263671875,
-0.051666259765625,
0.01519775390625,
0.0312347412109375,
-0.0079498291015625,
0.0156402587890625,
0.02532958984375,
0.006832122802734375,
0.0802001953125,
-0.02789306640625,
-0.013519287109375,
0.04345703125,
0.0088958740234375,
-0.019683837890625,
-0.06768798828125,
-0.01479339599609375,
-0.041229248046875,
0.0253753662109375,
0.00800323486328125,
-0.0074005126953125,
0.00943756103515625,
-0.041839599609375,
-0.09136962890625,
0.11749267578125,
-0.023284912109375,
-0.0223846435546875,
-0.09979248046875,
-0.0029392242431640625,
0.01493072509765625,
0.0017070770263671875,
-0.04486083984375,
0.023284912109375,
-0.041595458984375,
0.04241943359375,
0.00989532470703125,
0.0341796875,
0.01357269287109375,
0.00843048095703125,
0.00878143310546875,
0.0155792236328125,
0.01045989990234375,
-0.00007414817810058594,
0.0228271484375,
-0.029541015625,
0.063720703125,
0.05401611328125,
-0.0279388427734375,
0.01258087158203125,
0.01209259033203125,
-0.01532745361328125,
0.0007123947143554688,
-0.06976318359375,
0.0199432373046875,
-0.0265960693359375,
-0.0162811279296875,
-0.00899505615234375,
-0.01036834716796875,
-0.015838623046875,
0.036376953125,
0.0121307373046875,
-0.01708984375,
-0.003173828125,
0.0031890869140625,
-0.005279541015625,
-0.01029205322265625,
-0.033966064453125,
0.01004791259765625,
-0.01436614990234375,
0.00605010986328125,
0.0018758773803710938,
-0.01473236083984375,
0.024810791015625,
-0.0172882080078125,
-0.00446319580078125,
0.01238250732421875,
0.08807373046875,
-0.04998779296875,
0.0161590576171875,
0.006122589111328125,
0.0024356842041015625,
0.0609130859375,
0.014495849609375,
-0.007152557373046875,
-0.0218048095703125,
0.006519317626953125,
0.053924560546875,
0.002185821533203125,
-0.0498046875,
-0.04132080078125,
-0.0099639892578125,
0.0012798309326171875,
0.053314208984375,
0.0135650634765625,
0.0689697265625,
-0.046417236328125,
0.0782470703125,
0.0195770263671875,
0.005077362060546875,
-0.032623291015625,
-0.008392333984375,
-0.0011148452758789062,
-0.005535125732421875,
-0.05572509765625,
0.052154541015625,
-0.00803375244140625,
-0.025390625,
0.0033435821533203125,
-0.0033092498779296875,
-0.01354217529296875,
-0.05035400390625,
0.0294036865234375,
-0.0210723876953125,
0.006969451904296875,
0.0265045166015625
]
|
5471615e22b2ccafa29e7c0a9534b8a28fe45aeb | Wordpress Stackexchange
Q: Sanitizing integer input for update_post_meta When updating a post meta where the input will be always an integer, should I use (int) or is there a WordPress function for that (eg. sanitize_text_field)?
For example:
if(isset($_POST['category_id'])){
update_post_meta($post->ID, 'category_id', (int)($_POST['category_id']));
}
A: For integers KSES has no special function.
Use (int) or intval() or absint()
See more: Data Validation - Integers
| Q: Sanitizing integer input for update_post_meta When updating a post meta where the input will be always an integer, should I use (int) or is there a WordPress function for that (eg. sanitize_text_field)?
For example:
if(isset($_POST['category_id'])){
update_post_meta($post->ID, 'category_id', (int)($_POST['category_id']));
}
A: For integers KSES has no special function.
Use (int) or intval() or absint()
See more: Data Validation - Integers
A: &safe_id = intval( $_POST['category_id'] );
if ( ! $safe_id ) {
$safe_id = '';
}
update_post_meta( $post->ID, 'category_id', $safe_id );
The intval() function casts user input as an integer, and defaults to zero if the input was a non-numeric value. We then check to see if the value ended up as zero. If it did, we'll save an empty value to the database. Otherwise, we'll save the properly validated category_id.
A: Use a conditional statement to check if $_POST['category_id']) is an integer first. The PHP function is is_int()1
if(isset($_POST['category_id']) && is_int($_POST['category_id'])){
update_post_meta($post->ID, 'category_id', $_POST['category_id']);
}
You should also trim whitespace on your $_POST data because is_int() will return false if the string has whitespace2.
| wordpress | {
"language": "en",
"length": 175,
"provenance": "stackexchange_00019.jsonl.gz:450481",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168315"
} | [
0.02679443359375,
0.01520538330078125,
-0.05126953125,
-0.050933837890625,
0.026519775390625,
-0.03070068359375,
-0.0133819580078125,
0.0007281303405761719,
0.00974273681640625,
0.0296630859375,
-0.0158233642578125,
-0.025054931640625,
0.00945281982421875,
-0.0330810546875,
-0.032562255859375,
-0.0321044921875,
0.0042724609375,
0.00727081298828125,
0.009674072265625,
-0.0224609375,
0.010528564453125,
-0.01210784912109375,
0.006587982177734375,
-0.0293426513671875,
0.0219879150390625,
-0.05499267578125,
0.0212554931640625,
-0.01593017578125,
-0.01213836669921875,
-0.04266357421875,
0.01337432861328125,
0.038970947265625,
-0.0011072158813476562,
0.015869140625,
0.0015134811401367188,
0.01094818115234375,
0.0086517333984375,
0.00916290283203125,
0.0248870849609375,
0.0139312744140625,
0.0487060546875,
-0.031646728515625,
0.01534271240234375,
-0.00547027587890625,
0.00664520263671875,
-0.0084686279296875,
0.0161285400390625,
-0.045501708984375,
0.027923583984375,
-0.0289764404296875,
-0.020599365234375,
0.00949859619140625,
0.0022640228271484375,
-0.03094482421875,
-0.02166748046875,
-0.004535675048828125,
-0.04888916015625,
0.0094451904296875,
0.0103607177734375,
0.08447265625,
0.023895263671875,
0.019683837890625,
-0.0304412841796875,
-0.06622314453125,
0.0186614990234375,
-0.0280303955078125,
-0.0023937225341796875,
0.0306549072265625,
-0.06683349609375,
0.0203399658203125,
0.06304931640625,
-0.0478515625,
-0.016754150390625,
-0.02593994140625,
0.0245819091796875,
-0.0041351318359375,
0.004146575927734375,
-0.0236663818359375,
-0.0038700103759765625,
0.041046142578125,
-0.01409149169921875,
-0.0235748291015625,
-0.0168609619140625,
-0.01180267333984375,
-0.0027179718017578125,
0.003917694091796875,
-0.0171356201171875,
-0.00684356689453125,
-0.024749755859375,
-0.037872314453125,
-0.01316070556640625,
-0.0232086181640625,
-0.043609619140625,
-0.0028324127197265625,
-0.00897216796875,
-0.03900146484375,
0.0038623809814453125,
0.014495849609375,
-0.0180511474609375,
-0.00594329833984375,
0.0287017822265625,
-0.0491943359375,
0.0210418701171875,
-0.01617431640625,
-0.007282257080078125,
0.05072021484375,
0.049713134765625,
0.0204925537109375,
0.01461029052734375,
-0.00009417533874511719,
-0.006748199462890625,
0.045135498046875,
-0.006938934326171875,
-0.01470947265625,
-0.0206756591796875,
0.0166473388671875,
-0.0311126708984375,
0.01348876953125,
-0.00449371337890625,
-0.002559661865234375,
0.0186004638671875,
0.0283203125,
0.032257080078125,
-0.055572509765625,
0.00811004638671875,
-0.0215606689453125,
-0.05279541015625,
-0.02447509765625,
0.02252197265625,
0.01468658447265625,
-0.053253173828125,
0.01384735107421875,
0.0567626953125,
-0.00316619873046875,
0.0029239654541015625,
-0.02044677734375,
-0.0212860107421875,
-0.03375244140625,
-0.00661468505859375,
0.037811279296875,
-0.041717529296875,
-0.046783447265625,
0.057861328125,
-0.0175018310546875,
0.018218994140625,
0.04571533203125,
0.01203155517578125,
-0.015899658203125,
-0.005474090576171875,
-0.058685302734375,
0.01934814453125,
-0.07232666015625,
0.0413818359375,
0.0169219970703125,
-0.0217437744140625,
0.046783447265625,
0.032440185546875,
-0.0003924369812011719,
-0.068359375,
-0.01397705078125,
0.0268096923828125,
-0.004180908203125,
0.0391845703125,
-0.0172576904296875,
-0.01207733154296875,
-0.0006732940673828125,
-0.0753173828125,
-0.01238250732421875,
0.01312255859375,
0.033966064453125,
0.0078277587890625,
0.034149169921875,
-0.018829345703125,
-0.033935546875,
-0.007663726806640625,
-0.04156494140625,
-0.00714874267578125,
-0.00582122802734375,
0.0198974609375,
0.04705810546875,
0.007381439208984375,
-0.029510498046875,
0.0006532669067382812,
0.00807952880859375,
-0.0193328857421875,
0.034423828125,
-0.0133514404296875,
0.01500701904296875,
0.02435302734375,
-0.00562286376953125,
0.0416259765625,
0.0038909912109375,
-0.0239410400390625,
0.01190948486328125,
0.026519775390625,
-0.03173828125,
0.0133819580078125,
-0.023101806640625,
0.0161285400390625,
-0.01555633544921875,
0.00164794921875,
-0.019195556640625,
-0.0023059844970703125,
0.004810333251953125,
-0.033416748046875,
-0.00341796875,
-0.02642822265625,
0.0205841064453125,
-0.030303955078125,
0.054351806640625,
0.01192474365234375,
-0.025665283203125,
-0.0264739990234375,
0.055389404296875,
0.031768798828125,
-0.0308837890625,
-0.03289794921875,
0.0134735107421875,
-0.037506103515625,
0.048004150390625,
-0.047882080078125,
-0.0163116455078125,
-0.0364990234375,
-0.01312255859375,
0.0025157928466796875,
-0.008636474609375,
-0.003192901611328125,
-0.018768310546875,
0.021759033203125,
-0.0206756591796875,
0.0594482421875,
0.0281219482421875,
0.0298004150390625,
-0.014312744140625,
-0.0142364501953125,
0.0198516845703125,
-0.0204620361328125,
-0.1256103515625,
-0.016326904296875,
0.07635498046875,
0.0235137939453125,
-0.01220703125,
-0.004383087158203125,
0.01403045654296875,
0.02142333984375,
-0.0228118896484375,
0.0132598876953125,
-0.0112457275390625,
0.00919342041015625,
0.037139892578125,
-0.0297698974609375,
-0.01451873779296875,
0.0026950836181640625,
-0.0721435546875,
-0.005252838134765625,
0.044036865234375,
-0.0182342529296875,
-0.033599853515625,
0.017608642578125,
0.011322021484375,
-0.0147857666015625,
-0.04486083984375,
0.0126800537109375,
-0.0206451416015625,
0.06964111328125,
-0.01995849609375,
0.048431396484375,
0.0273895263671875,
-0.006374359130859375,
-0.01558685302734375,
0.0015411376953125,
-0.0259552001953125,
0.0063018798828125,
0.0080413818359375,
-0.06982421875,
-0.015655517578125,
-0.00678253173828125,
0.025909423828125,
0.0208587646484375,
-0.00833892822265625,
-0.02081298828125,
0.0297393798828125,
0.0244140625,
-0.00962066650390625,
-0.032501220703125,
-0.0260162353515625,
0.0308990478515625,
-0.0021686553955078125,
-0.007518768310546875,
-0.01560211181640625,
0.0316162109375,
-0.007167816162109375,
0.0012111663818359375,
-0.0043487548828125,
0.019744873046875,
-0.03485107421875,
0.00994873046875,
-0.0268402099609375,
0.019012451171875,
-0.0112762451171875,
0.04193115234375,
0.052276611328125,
-0.0103912353515625,
0.0262603759765625,
0.0112762451171875,
-0.0106353759765625,
0.00215911865234375,
0.06878662109375,
0.024200439453125,
-0.054443359375,
-0.0229034423828125,
-0.0017757415771484375,
0.01461029052734375,
0.043914794921875,
-0.006328582763671875,
-0.02740478515625,
0.007328033447265625,
0.01861572265625,
-0.0618896484375,
-0.05181884765625,
-0.0054779052734375,
0.004241943359375,
-0.03143310546875,
-0.0178375244140625,
-0.011016845703125,
0.0209808349609375,
-0.042205810546875,
-0.00531768798828125,
0.0017461776733398438,
0.0223541259765625,
-0.034698486328125,
0.0116424560546875,
-0.033294677734375,
-0.0031757354736328125,
-0.011138916015625,
0.0020961761474609375,
-0.0036525726318359375,
0.0565185546875,
-0.0106353759765625,
-0.07489013671875,
-0.02142333984375,
0.043487548828125,
-0.003856658935546875,
0.01413726806640625,
0.0255889892578125,
-0.058013916015625,
0.0013456344604492188,
-0.004638671875,
0.01678466796875,
0.00997161865234375,
0.00656890869140625,
-0.0123748779296875,
-0.03240966796875,
-0.0193328857421875,
-0.0019702911376953125,
0.0277252197265625,
0.029876708984375,
0.0248565673828125,
0.036346435546875,
-0.0192108154296875,
-0.016937255859375,
0.004833221435546875,
-0.010894775390625,
-0.006793975830078125,
-0.007633209228515625,
0.00035071372985839844,
-0.034576416015625,
0.056396484375,
-0.0157012939453125,
-0.005138397216796875,
0.0211639404296875,
-0.01538848876953125,
0.003849029541015625,
-0.0203399658203125,
-0.004825592041015625,
-0.021209716796875,
-0.04827880859375,
-0.0384521484375,
0.01096343994140625,
-0.035064697265625,
-0.0019741058349609375,
-0.01482391357421875,
0.0452880859375,
0.00302886962890625,
0.0189208984375,
0.036895751953125,
0.0113067626953125,
0.03570556640625,
-0.0305328369140625,
-0.0242767333984375,
-0.040924072265625,
0.0491943359375,
-0.0168609619140625,
-0.04486083984375,
-0.0211181640625,
0.0236968994140625,
-0.032073974609375,
-0.0308074951171875,
0.02197265625,
-0.01117706298828125,
-0.031280517578125,
0.004878997802734375,
0.00043702125549316406,
-0.0207366943359375,
-0.02099609375,
0.049407958984375,
-0.0280303955078125,
-0.00982666015625,
0.049468994140625,
-0.042144775390625,
0.005008697509765625,
0.02618408203125,
0.015106201171875,
-0.012847900390625,
-0.0479736328125,
-0.0074005126953125,
-0.059539794921875,
-0.03350830078125,
-0.0008759498596191406,
0.0794677734375,
0.0251617431640625,
-0.060455322265625,
-0.0194854736328125,
0.0474853515625,
-0.058349609375,
-0.0293426513671875,
-0.01078033447265625,
0.0675048828125,
-0.055755615234375,
0.02801513671875,
-0.01947021484375,
-0.01422882080078125,
-0.0164337158203125,
-0.016326904296875,
-0.0224456787109375,
-0.01557159423828125,
-0.024993896484375,
-0.03466796875,
0.0029010772705078125,
-0.01396942138671875,
-0.0152740478515625,
-0.0300750732421875,
-0.053253173828125,
0.00862884521484375,
-0.0289459228515625,
-0.0057525634765625,
-0.039581298828125,
-0.03509521484375,
0.0841064453125,
0.01013946533203125,
0.0225372314453125,
-0.032501220703125,
0.08770751953125,
0.0017175674438476562,
-0.04425048828125,
0.0084381103515625,
-0.042938232421875,
0.0225067138671875,
0.01169586181640625,
0.039886474609375,
0.00838470458984375,
-0.0204620361328125,
0.043975830078125,
0.01568603515625,
-0.0190582275390625,
-0.025970458984375,
0.059051513671875,
-0.02349853515625,
-0.026214599609375,
0.007282257080078125,
-0.043487548828125,
0.055999755859375,
0.034393310546875,
-0.0010128021240234375,
0.0091705322265625,
-0.0206451416015625,
-0.01514434814453125,
-0.00847625732421875,
0.00479888916015625,
0.00864410400390625,
-0.051910400390625,
0.0261993408203125,
-0.0003724098205566406,
0.0002034902572631836,
0.0016126632690429688,
-0.0011472702026367188,
0.01123809814453125,
-0.004085540771484375,
0.003055572509765625,
-0.0107879638671875,
0.0199127197265625,
-0.01415252685546875,
0.024200439453125,
0.01245880126953125,
0.00585174560546875,
-0.0419921875,
-0.0001226663589477539,
0.03509521484375,
-0.023529052734375,
-0.03057861328125,
-0.052734375,
-0.00212860107421875,
0.061920166015625,
0.0204620361328125,
-0.00800323486328125,
-0.0024662017822265625,
-0.00080108642578125,
-0.0298309326171875,
0.00841522216796875,
0.0032100677490234375,
-0.003326416015625,
-0.019317626953125,
-0.05419921875,
0.035797119140625,
-0.049835205078125,
0.005809783935546875,
0.0119476318359375,
0.042572021484375,
-0.032623291015625,
-0.033660888671875,
0.033050537109375,
0.04052734375,
0.0100250244140625,
0.02801513671875,
-0.0281982421875,
-0.0272674560546875,
-0.0063629150390625,
-0.0273284912109375,
-0.031219482421875,
-0.027313232421875,
0.039459228515625,
-0.01141357421875,
0.030303955078125,
0.031585693359375,
-0.0084686279296875,
0.0626220703125,
-0.01068878173828125,
-0.0032787322998046875,
-0.0318603515625,
-0.03826904296875,
-0.0166778564453125,
-0.0133056640625,
-0.004512786865234375,
-0.0117645263671875,
0.004058837890625,
-0.032989501953125,
-0.043548583984375,
0.00901031494140625,
-0.016387939453125,
0.029296875,
-0.026947021484375,
-0.0293121337890625,
0.05926513671875,
-0.006328582763671875,
-0.030670166015625,
0.0102386474609375,
0.0258026123046875,
-0.026702880859375,
-0.0211029052734375,
0.053863525390625,
0.00428009033203125,
0.0266571044921875,
-0.0244903564453125,
-0.005603790283203125,
0.06890869140625,
0.01123046875,
0.0181121826171875,
-0.0209808349609375,
0.032989501953125,
-0.01421356201171875,
-0.0195770263671875,
-0.03094482421875,
0.0208282470703125,
-0.01342010498046875,
-0.0169525146484375,
-0.0233306884765625,
-0.007724761962890625,
0.063720703125,
-0.0224151611328125,
-0.00261688232421875,
0.0184478759765625,
-0.018402099609375,
-0.0343017578125,
0.0950927734375,
-0.0377197265625,
0.02288818359375,
0.01050567626953125,
0.00823211669921875,
-0.02276611328125,
-0.00959014892578125,
0.029205322265625,
-0.0013437271118164062,
-0.01558685302734375,
-0.002735137939453125,
0.0224761962890625,
0.026763916015625,
0.05010986328125,
-0.0635986328125,
-0.04132080078125,
-0.00885772705078125,
0.023529052734375,
-0.026580810546875,
0.00959014892578125,
-0.031890869140625,
0.0298919677734375,
-0.042510986328125,
0.0156707763671875,
-0.0223388671875,
-0.025146484375,
-0.041259765625,
0.006748199462890625,
0.0237884521484375,
-0.00653076171875,
-0.01096343994140625,
-0.0176239013671875,
-0.01192474365234375,
-0.021392822265625,
0.047271728515625,
0.055908203125,
0.00730133056640625,
0.033050537109375,
0.00618743896484375,
0.017852783203125,
0.011810302734375,
-0.033447265625,
0.0206451416015625,
0.057861328125,
0.052520751953125,
-0.0195159912109375,
0.000461578369140625,
0.01453399658203125,
-0.019500732421875,
0.0078582763671875,
0.08477783203125,
0.08935546875,
-0.08660888671875,
-0.0117340087890625,
0.039459228515625,
-0.059661865234375,
-0.0421142578125,
-0.032684326171875,
0.023468017578125,
-0.003986358642578125,
0.0268402099609375,
0.0228424072265625,
-0.030670166015625,
0.00823211669921875,
-0.01097869873046875,
-0.01519775390625,
-0.032989501953125,
0.0293121337890625,
0.0151519775390625,
0.0095062255859375,
-0.0073089599609375,
0.006732940673828125,
-0.0037822723388671875,
-0.004970550537109375,
-0.0032787322998046875,
0.0276947021484375,
-0.040313720703125,
-0.0899658203125,
0.0008568763732910156,
0.0036754608154296875,
-0.051361083984375,
0.000690460205078125,
0.00537109375,
0.06396484375,
0.0172271728515625,
0.0251617431640625,
-0.061676025390625,
-0.0102081298828125,
0.02734375,
0.006374359130859375,
-0.04327392578125,
-0.0024261474609375,
0.03240966796875,
-0.0230255126953125,
0.0120391845703125,
0.0172576904296875,
-0.034149169921875,
-0.0274505615234375,
-0.06854248046875,
0.06317138671875,
0.01154327392578125,
-0.02923583984375,
0.00876617431640625,
0.003879547119140625,
-0.013519287109375,
-0.007389068603515625,
0.036895751953125,
-0.0281982421875,
-0.00157928466796875,
0.01132965087890625,
-0.0029659271240234375,
-0.0228729248046875,
-0.00873565673828125,
-0.0750732421875,
0.05755615234375,
0.031768798828125,
0.0196533203125,
-0.0166015625,
0.01488494873046875,
-0.0186614990234375,
-0.01218414306640625,
-0.0191192626953125,
0.0341796875,
-0.031829833984375,
0.005672454833984375,
-0.03839111328125,
-0.00986480712890625,
-0.0095062255859375,
0.0154571533203125,
0.0322265625,
0.0155029296875,
-0.029327392578125,
-0.0177459716796875,
-0.0175933837890625,
-0.00687408447265625,
-0.0238800048828125,
0.053741455078125,
0.008056640625,
0.02569580078125,
0.049346923828125,
-0.026580810546875,
0.022369384765625,
-0.01255035400390625,
-0.00832366943359375,
0.0253753662109375,
0.017608642578125,
0.0217437744140625,
-0.017425537109375,
0.040618896484375,
-0.0222320556640625,
-0.005039215087890625,
0.0277557373046875,
-0.0172576904296875,
0.000606536865234375,
0.07366943359375,
0.0264129638671875,
-0.00955963134765625,
0.0271453857421875,
-0.03826904296875,
0.0577392578125,
-0.031494140625,
0.06396484375,
0.050048828125,
0.0182037353515625,
0.07720947265625,
0.04998779296875,
0.0467529296875,
0.027618408203125,
-0.003658294677734375,
0.043121337890625,
0.003936767578125,
-0.0083465576171875,
-0.03521728515625,
0.0477294921875,
0.048187255859375,
0.05078125,
-0.0557861328125,
-0.008209228515625,
0.0087432861328125,
0.00682830810546875,
0.010498046875,
-0.0226898193359375,
0.0247955322265625,
0.001079559326171875,
0.0101776123046875,
-0.0236663818359375,
-0.005527496337890625,
0.036956787109375,
0.0168914794921875,
0.01076507568359375,
0.01090240478515625,
-0.033721923828125,
-0.0141754150390625,
-0.0753173828125,
0.0250396728515625,
0.019500732421875,
0.08416748046875,
0.023590087890625,
0.06298828125,
0.0288848876953125,
-0.041259765625,
-0.037017822265625,
0.05902099609375,
0.035125732421875,
0.03094482421875,
-0.0157470703125,
-0.0005507469177246094,
0.0214385986328125,
0.0254974365234375,
0.017120361328125,
0.08221435546875,
0.08807373046875,
0.051727294921875,
-0.028289794921875,
0.004547119140625,
0.042572021484375,
-0.034454345703125,
-0.037078857421875,
-0.0210113525390625,
0.014923095703125,
0.02587890625,
0.00270843505859375,
-0.0116119384765625,
0.042022705078125,
0.00506591796875,
0.04254150390625,
0.0201263427734375,
0.030914306640625,
-0.0028057098388671875,
0.008026123046875,
0.0303955078125,
0.03509521484375,
0.07537841796875,
0.02813720703125,
-0.01174163818359375,
0.02679443359375,
-0.0216217041015625,
-0.0016298294067382812,
0.0275115966796875,
-0.019989013671875,
0.03875732421875,
0.0160675048828125,
-0.046905517578125,
0.04534912109375,
0.016571044921875,
-0.0034809112548828125,
0.0051727294921875,
0.0120697021484375,
-0.0180206298828125,
-0.0261993408203125,
-0.0026378631591796875,
0.0147552490234375,
0.0193328857421875,
-0.0355224609375,
0.031890869140625,
0.0018186569213867188,
-0.00467681884765625,
-0.004947662353515625,
0.05548095703125,
-0.0731201171875,
0.01103973388671875,
0.0257720947265625,
0.00650787353515625,
0.00859832763671875,
-0.0090789794921875,
0.02215576171875,
0.032379150390625,
0.0276031494140625,
-0.00376129150390625,
0.00005334615707397461,
0.003108978271484375,
0.021759033203125,
0.007045745849609375,
0.019989013671875,
-0.0021991729736328125,
-0.03411865234375,
-0.031463623046875,
0.01178741455078125,
0.05267333984375,
0.103759765625,
-0.0032138824462890625,
0.02691650390625,
-0.03277587890625,
0.035919189453125,
-0.004108428955078125,
0.004119873046875,
-0.02508544921875,
0.0206451416015625,
-0.07574462890625,
0.038970947265625,
-0.017852783203125,
-0.01751708984375,
0.0183563232421875,
0.0157928466796875,
-0.044586181640625,
0.016571044921875,
0.0275421142578125,
-0.01084136962890625,
0.0693359375,
0.037445068359375,
0.01708984375,
0.01654052734375,
0.00653839111328125,
-0.038299560546875,
0.00421142578125,
-0.023834228515625,
-0.0269927978515625,
-0.032012939453125,
-0.01247406005859375,
0.0128173828125,
-0.0121612548828125,
-0.01922607421875,
-0.00676727294921875,
0.022003173828125,
0.00603485107421875,
-0.01617431640625,
-0.025177001953125,
0.0189208984375,
-0.019012451171875,
0.07110595703125,
-0.040435791015625,
0.0086669921875,
-0.019134521484375,
0.0233001708984375,
-0.046661376953125,
-0.006053924560546875,
-0.0367431640625,
-0.004360198974609375,
-0.03057861328125,
0.0294952392578125,
0.0130157470703125,
-0.01611328125,
-0.04010009765625,
0.04296875,
0.0287017822265625,
0.07879638671875,
0.0364990234375,
-0.01453399658203125,
0.040496826171875,
0.01285552978515625,
0.004695892333984375,
-0.11895751953125,
-0.0312042236328125,
-0.04345703125,
0.06256103515625,
0.0006046295166015625,
-0.03125,
-0.0174713134765625,
-0.043853759765625,
-0.070556640625,
0.05303955078125,
-0.0005974769592285156,
-0.034637451171875,
-0.0019245147705078125,
-0.0117034912109375,
0.0036258697509765625,
0.0256500244140625,
0.0023708343505859375,
-0.0226593017578125,
-0.0309295654296875,
0.00579833984375,
0.0123748779296875,
-0.0333251953125,
0.047515869140625,
0.012054443359375,
-0.06890869140625,
0.007904052734375,
-0.01055908203125,
-0.013671875,
-0.003726959228515625,
-0.0111846923828125,
0.021087646484375,
-0.005100250244140625,
-0.060394287109375,
0.0182647705078125,
0.015899658203125,
0.06805419921875,
-0.0045928955078125,
-0.0156402587890625,
-0.07171630859375,
-0.0238189697265625,
0.11785888671875,
0.0166778564453125,
0.03656005859375,
-0.01593017578125,
0.007289886474609375,
-0.031097412109375,
-0.0206298828125,
-0.029083251953125,
0.0040130615234375,
-0.048919677734375,
-0.01235198974609375,
0.0023651123046875,
0.019012451171875,
0.0173492431640625,
0.020538330078125,
0.0233917236328125,
-0.006771087646484375,
0.054412841796875,
-0.0260772705078125,
0.0022869110107421875,
-0.004413604736328125,
0.0105133056640625,
-0.0308837890625,
-0.028564453125,
0.010833740234375,
0.00926971435546875,
-0.0180511474609375,
0.01097869873046875,
-0.00481414794921875,
-0.012481689453125,
-0.015594482421875,
0.0159149169921875,
-0.0080108642578125,
0.0633544921875,
-0.0168914794921875,
-0.0279388427734375,
-0.0224456787109375,
0.01824951171875,
0.017913818359375,
0.03570556640625,
-0.004367828369140625,
0.0160675048828125,
0.01953125,
-0.00044465065002441406,
-0.0188140869140625,
-0.003330230712890625,
-0.0209197998046875,
0.05029296875,
0.0157928466796875,
-0.0335693359375,
0.07623291015625,
-0.05810546875,
0.0029163360595703125,
-0.00293731689453125,
0.0038471221923828125,
-0.048248291015625,
0.0233306884765625,
-0.00806427001953125,
0.00009769201278686523,
0.0204620361328125
]
|
6ccf113400d31552e5ff2c29bfcabf18d55a6c8e | Wordpress Stackexchange
Q: compare meta_query in get_posts arguments I like to exclude certain posts with a custom field. So if my_custom_field_ignore isset AND 1 ignore this post. If it's not set include it.
This is what I have
$args = array(
'post_type' => $post_type,
'offset' => $offset,
'meta_query' => array(
array(
'key' => 'my_custom_field_ignore',
'value' => '1',
'compare' => '!=',
)
)
);
This works only for posts where the my_custom_field_ignore is set to something else than 1
How can I include all posts (of course not the ones with my_custom_field_ignore = 1)?
Edit:
This is how it work on WP 3.5+
'meta_query' => array(
array(
'key' => 'my_custom_field_ignore',
'compare' => 'NOT EXISTS',
)
)
This simple search for the appearance of my_custom_field_ignore so the value will be ignored. While this could work in the first place users may get confused when they changed 1 to 0 and expect to be included.
Seems 3.3 and 3.4 needs some conditional check though.
Edit 2
Seems the checked answered does the trick (at least for 3.5+). For some odd reason it ignores the very first post "Hello World". After adding my_custom_field_ignore and removing it afterwards it's working
A: If we define the conditions: | Q: compare meta_query in get_posts arguments I like to exclude certain posts with a custom field. So if my_custom_field_ignore isset AND 1 ignore this post. If it's not set include it.
This is what I have
$args = array(
'post_type' => $post_type,
'offset' => $offset,
'meta_query' => array(
array(
'key' => 'my_custom_field_ignore',
'value' => '1',
'compare' => '!=',
)
)
);
This works only for posts where the my_custom_field_ignore is set to something else than 1
How can I include all posts (of course not the ones with my_custom_field_ignore = 1)?
Edit:
This is how it work on WP 3.5+
'meta_query' => array(
array(
'key' => 'my_custom_field_ignore',
'compare' => 'NOT EXISTS',
)
)
This simple search for the appearance of my_custom_field_ignore so the value will be ignored. While this could work in the first place users may get confused when they changed 1 to 0 and expect to be included.
Seems 3.3 and 3.4 needs some conditional check though.
Edit 2
Seems the checked answered does the trick (at least for 3.5+). For some odd reason it ignores the very first post "Hello World". After adding my_custom_field_ignore and removing it afterwards it's working
A: If we define the conditions:
A: my_custom_field_ignore EXISTS
B: my_custom_field_ignore = 1
then NOT ( A && B ) is equivalent to:
NOT ( A ) || NOT ( B )
meaning in our case:
( my_custom_field_ignore NOT EXISTS ) || ( my_custom_field_ignore != 1 )
We could therefore try the following for WP 3.5+ (untested):
$args = array(
'post_type' => $post_type,
'offset' => $offset,
'meta_query' => array(
'relation' => 'OR',
array(
'key' => 'my_custom_field_ignore',
'value' => '1',
'compare' => '!=',
),
array(
'key' => 'my_custom_field_ignore',
'compare' => 'NOT EXISTS',
'value' => '1', #<-- just some value as a pre 3.9 bugfix (Codex)
),
)
);
A: you have to use the serialize function in case you are using integers:
$args = array(
'meta_query' => array(
array(
'key' => 'my_meta_key',
'value' => serialize(strval($my_vale)),
'compare' => 'LIKE'
)
)
);
$posts = get_posts( $args );
and you are ready,
print_r($posts);
and see the results
| wordpress | {
"language": "en",
"length": 347,
"provenance": "stackexchange_00019.jsonl.gz:450483",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168336"
} | [
0.06378173828125,
-0.00643157958984375,
-0.0002574920654296875,
-0.0179901123046875,
-0.00228118896484375,
-0.034942626953125,
0.0207672119140625,
-0.0267333984375,
-0.0198974609375,
0.01462554931640625,
-0.047149658203125,
-0.00467681884765625,
-0.014801025390625,
-0.0150146484375,
0.01390838623046875,
-0.048492431640625,
0.0196380615234375,
0.00811767578125,
0.00344085693359375,
-0.029510498046875,
0.032470703125,
-0.0309295654296875,
-0.00814056396484375,
0.002231597900390625,
0.043609619140625,
-0.057586669921875,
0.041412353515625,
-0.005664825439453125,
0.02203369140625,
-0.0030231475830078125,
0.0241241455078125,
-0.0111846923828125,
-0.00664520263671875,
0.04705810546875,
-0.020965576171875,
-0.01320648193359375,
0.034332275390625,
0.013580322265625,
0.0157928466796875,
0.0187225341796875,
0.005191802978515625,
-0.01165771484375,
-0.01120758056640625,
0.00609588623046875,
-0.01995849609375,
-0.0166015625,
0.007518768310546875,
-0.04095458984375,
0.058197021484375,
0.004550933837890625,
-0.0142974853515625,
0.014892578125,
-0.01080322265625,
-0.0095062255859375,
-0.0172119140625,
-0.0006537437438964844,
-0.00997161865234375,
0.006320953369140625,
0.016815185546875,
0.00452423095703125,
-0.00750732421875,
0.0107269287109375,
0.003490447998046875,
-0.00838470458984375,
-0.01029205322265625,
0.004207611083984375,
0.0251617431640625,
-0.00199127197265625,
-0.051300048828125,
-0.0238037109375,
0.040313720703125,
-0.016448974609375,
0.006595611572265625,
-0.01708984375,
-0.0501708984375,
-0.00311279296875,
0.03521728515625,
-0.03985595703125,
0.003643035888671875,
-0.006252288818359375,
-0.005130767822265625,
-0.01317596435546875,
-0.040802001953125,
-0.03253173828125,
0.042694091796875,
0.01332855224609375,
-0.01451873779296875,
-0.012115478515625,
-0.00848388671875,
-0.0274810791015625,
-0.0053253173828125,
-0.038330078125,
-0.046234130859375,
0.02581787109375,
0.019500732421875,
-0.039520263671875,
0.03924560546875,
0.058441162109375,
-0.01206207275390625,
-0.006744384765625,
-0.036590576171875,
-0.025238037109375,
-0.023681640625,
-0.01080322265625,
0.0226898193359375,
0.0101318359375,
-0.016815185546875,
-0.0233306884765625,
0.035675048828125,
0.039764404296875,
-0.0018739700317382812,
0.0214691162109375,
-0.0005311965942382812,
0.0411376953125,
-0.052490234375,
-0.026397705078125,
-0.0396728515625,
-0.0192108154296875,
-0.044891357421875,
0.00884246826171875,
0.037811279296875,
0.04559326171875,
0.01739501953125,
-0.0694580078125,
0.015716552734375,
-0.0080718994140625,
-0.053192138671875,
-0.0226898193359375,
-0.00946044921875,
0.046661376953125,
-0.0292510986328125,
-0.0016021728515625,
0.040191650390625,
0.02947998046875,
-0.0032787322998046875,
-0.024444580078125,
0.05645751953125,
-0.07080078125,
-0.00815582275390625,
0.0184478759765625,
0.0086517333984375,
-0.0270843505859375,
-0.01024627685546875,
-0.005596160888671875,
-0.0218048095703125,
0.02801513671875,
0.032562255859375,
0.003383636474609375,
-0.03057861328125,
-0.053009033203125,
-0.00766754150390625,
-0.016815185546875,
0.036956787109375,
-0.005130767822265625,
-0.041107177734375,
0.025390625,
0.0236358642578125,
-0.0091705322265625,
-0.060516357421875,
-0.028045654296875,
0.0004029273986816406,
0.0035305023193359375,
0.006687164306640625,
-0.06353759765625,
-0.07257080078125,
-0.004669189453125,
-0.020782470703125,
-0.0110931396484375,
0.0008306503295898438,
0.02001953125,
-0.00403594970703125,
0.0279388427734375,
0.036285400390625,
-0.006710052490234375,
-0.0156707763671875,
-0.01800537109375,
-0.002979278564453125,
0.0208740234375,
0.0069732666015625,
0.0201263427734375,
-0.0162506103515625,
-0.04302978515625,
0.0418701171875,
-0.011810302734375,
-0.07537841796875,
0.056396484375,
0.0079345703125,
0.040435791015625,
0.00023746490478515625,
-0.0095367431640625,
0.09027099609375,
0.040924072265625,
-0.03460693359375,
0.053436279296875,
-0.0222625732421875,
-0.0210113525390625,
0.00698089599609375,
0.0110015869140625,
-0.01255035400390625,
-0.0016021728515625,
0.023895263671875,
-0.012542724609375,
0.005222320556640625,
-0.01134490966796875,
-0.06396484375,
0.005096435546875,
-0.0224609375,
0.0299224853515625,
-0.0033473968505859375,
0.035888671875,
0.022674560546875,
0.0170440673828125,
-0.058380126953125,
0.057037353515625,
-0.0004215240478515625,
-0.0233612060546875,
-0.0025768280029296875,
0.02667236328125,
-0.015899658203125,
0.0162200927734375,
0.002773284912109375,
-0.064453125,
-0.01275634765625,
0.03619384765625,
0.049774169921875,
-0.03277587890625,
0.0100860595703125,
-0.029449462890625,
0.06097412109375,
0.005298614501953125,
-0.0209197998046875,
0.019439697265625,
0.0308685302734375,
0.01006317138671875,
-0.060211181640625,
0.0099029541015625,
-0.0110015869140625,
-0.0196380615234375,
-0.0181427001953125,
0.05615234375,
0.033294677734375,
-0.0027294158935546875,
0.004665374755859375,
0.0181732177734375,
0.0214691162109375,
-0.04534912109375,
0.0046234130859375,
-0.015838623046875,
0.027313232421875,
0.04931640625,
-0.024932861328125,
-0.01081085205078125,
0.02496337890625,
-0.0338134765625,
0.027587890625,
0.0235748291015625,
-0.03033447265625,
-0.0188751220703125,
-0.02166748046875,
0.005298614501953125,
0.0014209747314453125,
-0.054534912109375,
-0.0107421875,
-0.023590087890625,
0.0579833984375,
0.009674072265625,
0.0389404296875,
0.018829345703125,
-0.043121337890625,
0.0258941650390625,
0.0160064697265625,
-0.0335693359375,
-0.0029201507568359375,
-0.0019702911376953125,
-0.0169219970703125,
0.0241546630859375,
-0.028717041015625,
0.0192718505859375,
0.0164642333984375,
-0.009735107421875,
-0.0087432861328125,
0.01114654541015625,
-0.018157958984375,
0.00516510009765625,
0.0036525726318359375,
-0.023101806640625,
0.0250396728515625,
0.025146484375,
0.01102447509765625,
-0.043731689453125,
0.0220947265625,
-0.026275634765625,
-0.00782012939453125,
0.001346588134765625,
0.01324462890625,
-0.06317138671875,
-0.0648193359375,
-0.0765380859375,
0.062469482421875,
-0.07421875,
-0.0225372314453125,
0.059600830078125,
0.00881195068359375,
-0.0181427001953125,
0.0023174285888671875,
-0.0070648193359375,
-0.038482666015625,
0.050140380859375,
0.0103302001953125,
-0.0258331298828125,
-0.0548095703125,
-0.0007243156433105469,
0.0469970703125,
0.0269927978515625,
0.050079345703125,
0.0076446533203125,
0.01476287841796875,
0.056640625,
-0.045867919921875,
-0.0648193359375,
0.040069580078125,
-0.0235137939453125,
-0.0237884521484375,
-0.01654052734375,
-0.018096923828125,
-0.0006251335144042969,
-0.036865234375,
-0.0005269050598144531,
-0.0177001953125,
-0.024871826171875,
-0.06884765625,
-0.06622314453125,
-0.06695556640625,
-0.007808685302734375,
0.0003190040588378906,
0.01422119140625,
0.012359619140625,
0.1170654296875,
0.0183563232421875,
-0.073974609375,
0.00940704345703125,
0.0181732177734375,
-0.032196044921875,
0.047210693359375,
0.0280914306640625,
-0.01006317138671875,
0.0148162841796875,
-0.0007004737854003906,
0.0478515625,
0.02972412109375,
-0.0345458984375,
-0.03155517578125,
-0.0084075927734375,
-0.0289764404296875,
0.01242828369140625,
0.0130462646484375,
-0.0027446746826171875,
-0.019195556640625,
0.043182373046875,
-0.029876708984375,
-0.01348876953125,
-0.00308990478515625,
-0.0203704833984375,
-0.00646209716796875,
-0.01202392578125,
-0.0038471221923828125,
-0.00844573974609375,
0.037200927734375,
-0.0008268356323242188,
0.0225372314453125,
0.022125244140625,
-0.0128326416015625,
0.031494140625,
-0.0130615234375,
-0.0145416259765625,
-0.03253173828125,
0.00548553466796875,
-0.03790283203125,
0.03216552734375,
-0.0024280548095703125,
-0.006443023681640625,
-0.0101318359375,
-0.007610321044921875,
-0.03485107421875,
0.00406646728515625,
0.0308074951171875,
0.0092315673828125,
0.046478271484375,
-0.0151824951171875,
-0.03619384765625,
-0.041015625,
0.047027587890625,
-0.0272369384765625,
-0.0306243896484375,
-0.027313232421875,
0.0091400146484375,
0.018096923828125,
-0.01837158203125,
0.0266876220703125,
-0.0182647705078125,
-0.05841064453125,
0.006374359130859375,
0.0142974853515625,
-0.027191162109375,
-0.0361328125,
-0.005931854248046875,
-0.072509765625,
-0.022857666015625,
0.038787841796875,
-0.05035400390625,
0.0188751220703125,
0.0073394775390625,
0.0068817138671875,
-0.0245208740234375,
-0.0107574462890625,
-0.0302276611328125,
-0.061553955078125,
-0.006412506103515625,
-0.01039886474609375,
0.025482177734375,
-0.03265380859375,
0.06427001953125,
-0.046844482421875,
0.021148681640625,
0.012725830078125,
-0.0031871795654296875,
-0.0340576171875,
-0.01076507568359375,
-0.042816162109375,
0.04400634765625,
-0.023529052734375,
0.01971435546875,
-0.032562255859375,
-0.01493072509765625,
-0.029388427734375,
0.00650787353515625,
-0.003635406494140625,
0.003932952880859375,
0.017242431640625,
-0.0298614501953125,
-0.01983642578125,
-0.032257080078125,
-0.039398193359375,
0.02081298828125,
-0.0082855224609375,
-0.0293426513671875,
-0.057159423828125,
-0.037567138671875,
0.0301666259765625,
0.0031719207763671875,
-0.03350830078125,
0.006092071533203125,
0.07470703125,
0.0205078125,
-0.01331329345703125,
-0.04486083984375,
-0.0276336669921875,
0.01108551025390625,
-0.023529052734375,
0.054229736328125,
0.01313018798828125,
0.00659942626953125,
0.058135986328125,
-0.0298004150390625,
0.0038776397705078125,
-0.030059814453125,
0.053466796875,
-0.03424072265625,
-0.0321044921875,
0.0235443115234375,
-0.0592041015625,
0.0307769775390625,
0.048370361328125,
0.0280914306640625,
-0.05633544921875,
0.05389404296875,
0.0411376953125,
-0.04302978515625,
0.004642486572265625,
-0.0165557861328125,
-0.040985107421875,
0.007427215576171875,
0.037841796875,
-0.004974365234375,
0.0141754150390625,
-0.003940582275390625,
0.0302734375,
-0.00897216796875,
-0.00739288330078125,
0.021759033203125,
0.08447265625,
-0.01117706298828125,
0.040985107421875,
0.044281005859375,
-0.005767822265625,
-0.0625,
-0.0017309188842773438,
0.03173828125,
-0.0094451904296875,
-0.048858642578125,
-0.01690673828125,
-0.00882720947265625,
0.00736236572265625,
0.0003445148468017578,
-0.0016632080078125,
0.00937652587890625,
0.04302978515625,
-0.00919342041015625,
0.0205841064453125,
0.02398681640625,
0.0308685302734375,
-0.018829345703125,
-0.01381683349609375,
0.00270843505859375,
-0.0037136077880859375,
-0.0161285400390625,
0.04803466796875,
0.0058135986328125,
0.0212860107421875,
-0.0205535888671875,
0.014190673828125,
0.010711669921875,
0.052581787109375,
0.022552490234375,
-0.020965576171875,
-0.0029125213623046875,
0.03521728515625,
-0.00496673583984375,
-0.0132904052734375,
-0.030548095703125,
0.01523590087890625,
0.015533447265625,
-0.006900787353515625,
0.0160064697265625,
0.01357269287109375,
0.01338958740234375,
-0.0005655288696289062,
0.0121612548828125,
0.005096435546875,
-0.0302886962890625,
-0.002178192138671875,
-0.01013946533203125,
-0.005092620849609375,
-0.0270233154296875,
-0.02557373046875,
0.06463623046875,
-0.031951904296875,
0.051544189453125,
-0.0113067626953125,
0.011993408203125,
-0.0051422119140625,
-0.01322174072265625,
0.031890869140625,
-0.01123809814453125,
-0.0305938720703125,
-0.00891876220703125,
-0.0283660888671875,
0.004276275634765625,
-0.0110931396484375,
0.0175933837890625,
-0.0014925003051757812,
0.043548583984375,
-0.058380126953125,
-0.0124969482421875,
-0.01328277587890625,
0.0029010772705078125,
0.056304931640625,
0.021881103515625,
-0.0138092041015625,
-0.011688232421875,
-0.032012939453125,
-0.03253173828125,
-0.052093505859375,
-0.035308837890625,
-0.0458984375,
0.00905609130859375,
0.008636474609375,
0.023162841796875,
0.009124755859375,
-0.0192718505859375,
-0.0281829833984375,
-0.0004076957702636719,
0.005397796630859375,
0.021392822265625,
-0.0298004150390625,
0.06744384765625,
-0.0159454345703125,
0.031585693359375,
0.0038280487060546875,
0.033966064453125,
0.01502227783203125,
-0.00989532470703125,
-0.035064697265625,
-0.0865478515625,
0.01036834716796875,
0.03765869140625,
0.0020751953125,
0.06182861328125,
-0.0017404556274414062,
0.02392578125,
0.000022292137145996094,
-0.0125885009765625,
-0.00516510009765625,
-0.019927978515625,
0.038330078125,
0.01496124267578125,
-0.003246307373046875,
0.031280517578125,
0.0020313262939453125,
-0.01065826416015625,
0.004627227783203125,
-0.04290771484375,
0.03741455078125,
0.0294036865234375,
0.01459503173828125,
-0.02801513671875,
-0.03662109375,
0.040924072265625,
0.01544189453125,
-0.0152587890625,
0.0004677772521972656,
-0.0188751220703125,
-0.0102081298828125,
-0.0099029541015625,
-0.00818634033203125,
0.02801513671875,
0.0026454925537109375,
0.0472412109375,
-0.01409149169921875,
-0.00476837158203125,
0.038055419921875,
-0.022552490234375,
0.0142364501953125,
0.03033447265625,
0.0272674560546875,
-0.048828125,
0.00489044189453125,
0.004058837890625,
-0.022613525390625,
0.004009246826171875,
-0.0007500648498535156,
-0.0013523101806640625,
-0.00835418701171875,
-0.011810302734375,
0.00981903076171875,
-0.0258026123046875,
-0.007289886474609375,
-0.0084381103515625,
-0.01447296142578125,
-0.0207672119140625,
-0.037017822265625,
-0.01316070556640625,
0.019195556640625,
0.0169219970703125,
-0.0189208984375,
-0.00867462158203125,
-0.0018949508666992188,
0.01242828369140625,
-0.0269317626953125,
-0.0318603515625,
-0.078857421875,
-0.0506591796875,
-0.023834228515625,
-0.0345458984375,
0.0523681640625,
0.0592041015625,
0.0236358642578125,
0.09033203125,
0.0016679763793945312,
0.035064697265625,
0.040313720703125,
0.007381439208984375,
-0.01983642578125,
-0.06451416015625,
0.00327301025390625,
0.052093505859375,
-0.0273590087890625,
0.032440185546875,
0.032928466796875,
-0.042205810546875,
-0.006786346435546875,
-0.02764892578125,
0.03436279296875,
-0.01198577880859375,
-0.012847900390625,
0.020111083984375,
0.024078369140625,
-0.00469207763671875,
0.00787353515625,
0.005290985107421875,
-0.033172607421875,
-0.00827789306640625,
0.0015497207641601562,
-0.0288543701171875,
-0.035003662109375,
-0.0149383544921875,
-0.07672119140625,
0.10626220703125,
-0.0184173583984375,
0.051971435546875,
0.010955810546875,
0.0289306640625,
-0.0347900390625,
0.00395965576171875,
-0.051727294921875,
0.05877685546875,
-0.01557159423828125,
0.07427978515625,
-0.09954833984375,
-0.025909423828125,
0.0100250244140625,
0.060760498046875,
0.0421142578125,
0.005359649658203125,
-0.0250244140625,
-0.0225982666015625,
0.034332275390625,
0.03887939453125,
-0.004428863525390625,
0.031280517578125,
0.006809234619140625,
0.042327880859375,
0.035064697265625,
-0.00962066650390625,
0.052764892578125,
-0.0298614501953125,
-0.046966552734375,
0.015869140625,
0.0011510848999023438,
-0.004669189453125,
-0.01204681396484375,
0.037994384765625,
-0.01242828369140625,
-0.0113372802734375,
0.01175689697265625,
0.0089263916015625,
0.00598907470703125,
0.016815185546875,
0.02960205078125,
-0.034912109375,
-0.01511383056640625,
-0.02056884765625,
0.029022216796875,
0.0245513916015625,
0.043304443359375,
0.03253173828125,
0.029266357421875,
0.0706787109375,
-0.0645751953125,
0.0253448486328125,
-0.0090179443359375,
-0.03704833984375,
0.060028076171875,
0.0262298583984375,
0.025177001953125,
-0.019256591796875,
0.03326416015625,
0.0177001953125,
0.05181884765625,
-0.047760009765625,
-0.050750732421875,
0.01514434814453125,
-0.0162200927734375,
-0.016754150390625,
-0.0153045654296875,
-0.054412841796875,
0.022064208984375,
0.051788330078125,
-0.09613037109375,
0.02874755859375,
0.034881591796875,
0.007266998291015625,
-0.033111572265625,
-0.024444580078125,
-0.02325439453125,
0.0083770751953125,
-0.0285491943359375,
-0.024322509765625,
0.004985809326171875,
0.06793212890625,
0.04620361328125,
0.00942230224609375,
-0.03369140625,
-0.0293731689453125,
-0.023345947265625,
0.00843048095703125,
-0.034820556640625,
0.046722412109375,
-0.049713134765625,
-0.0089569091796875,
-0.041229248046875,
0.047821044921875,
-0.007572174072265625,
0.005931854248046875,
0.0443115234375,
0.041473388671875,
-0.034149169921875,
-0.00974273681640625,
0.04388427734375,
-0.0178375244140625,
-0.0628662109375,
-0.0487060546875,
-0.004703521728515625,
0.033782958984375,
0.03466796875,
0.0281524658203125,
0.0151824951171875,
0.018463134765625,
0.0340576171875,
0.01409912109375,
0.02203369140625,
-0.0143890380859375,
0.01485443115234375,
0.021331787109375,
0.046539306640625,
0.0672607421875,
-0.0196685791015625,
-0.01483917236328125,
0.0014162063598632812,
-0.01230621337890625,
-0.01480865478515625,
0.011932373046875,
-0.02398681640625,
0.044647216796875,
0.031097412109375,
0.00122833251953125,
-0.0229034423828125,
0.01251220703125,
0.018890380859375,
-0.006988525390625,
0.02008056640625,
0.0248565673828125,
-0.02587890625,
0.0012388229370117188,
0.007480621337890625,
-0.00806427001953125,
0.0235443115234375,
0.037506103515625,
0.021331787109375,
0.0009794235229492188,
0.01129913330078125,
0.0231475830078125,
-0.002529144287109375,
0.00634765625,
0.0168304443359375,
-0.01094818115234375,
0.007465362548828125,
-0.0162200927734375,
0.0181427001953125,
-0.010986328125,
0.07171630859375,
-0.0460205078125,
-0.007354736328125,
0.0104827880859375,
0.0340576171875,
-0.060516357421875,
-0.003765106201171875,
-0.042144775390625,
-0.00960540771484375,
-0.04705810546875,
-0.0423583984375,
0.0333251953125,
0.00719451904296875,
0.0148773193359375,
0.013397216796875,
0.06329345703125,
-0.051727294921875,
0.038665771484375,
-0.032867431640625,
0.09130859375,
0.04644775390625,
0.0579833984375,
0.0235595703125,
-0.0095367431640625,
-0.0241241455078125,
0.009521484375,
0.02557373046875,
-0.020965576171875,
0.0177764892578125,
0.005214691162109375,
0.004131317138671875,
0.0005435943603515625,
0.0029773712158203125,
-0.0701904296875,
-0.003742218017578125,
0.0413818359375,
0.0024852752685546875,
0.01107025146484375,
-0.05462646484375,
-0.033111572265625,
-0.005970001220703125,
-0.0144805908203125,
0.0088958740234375,
-0.0017976760864257812,
-0.0758056640625,
-0.043914794921875,
0.008026123046875,
0.01087188720703125,
0.0031490325927734375,
-0.0438232421875,
0.052886962890625,
-0.024139404296875,
-0.005947113037109375,
-0.01493072509765625,
0.03167724609375,
-0.0081939697265625,
0.036376953125,
-0.00742340087890625,
0.00682830810546875,
-0.0017080307006835938,
0.01300048828125,
0.0307464599609375,
0.0021457672119140625,
0.0311279296875,
-0.0138702392578125,
-0.049072265625,
0.00011545419692993164,
-0.00665283203125,
0.0116729736328125,
-0.0123748779296875,
-0.0254669189453125,
0.0014638900756835938,
-0.0167083740234375,
-0.019561767578125,
-0.04351806640625,
0.035369873046875,
-0.088623046875,
-0.0283355712890625,
-0.039093017578125,
0.03125,
0.042755126953125,
-0.019287109375,
-0.07550048828125,
0.0193634033203125,
-0.0157012939453125,
-0.040191650390625,
-0.04541015625,
0.00551605224609375,
-0.007328033447265625,
0.034149169921875,
-0.0048980712890625,
-0.021240234375,
-0.0136871337890625,
0.0267791748046875,
-0.0169830322265625,
0.01462554931640625,
0.0019989013671875,
0.0214385986328125,
-0.075927734375,
-0.00411224365234375,
-0.0294036865234375,
-0.048492431640625,
0.0169830322265625,
-0.008026123046875,
0.0106658935546875,
0.01486968994140625,
-0.043365478515625,
-0.0126495361328125,
-0.01012420654296875,
-0.0156707763671875,
0.005035400390625,
0.00341796875,
-0.059661865234375,
-0.0276641845703125,
0.1107177734375,
0.06243896484375,
0.038818359375,
-0.04156494140625,
-0.004184722900390625,
-0.00530242919921875,
-0.032562255859375,
-0.0518798828125,
0.0246429443359375,
-0.08892822265625,
-0.040618896484375,
-0.014495849609375,
-0.0149078369140625,
0.0120391845703125,
0.0107879638671875,
-0.019317626953125,
0.00550079345703125,
0.03369140625,
-0.01071929931640625,
-0.0482177734375,
0.0114593505859375,
0.018463134765625,
-0.0146636962890625,
0.003429412841796875,
-0.0115966796875,
0.00827789306640625,
0.0026454925537109375,
-0.0016088485717773438,
-0.01165008544921875,
-0.0233001708984375,
0.049163818359375,
0.024139404296875,
0.021759033203125,
-0.027191162109375,
0.039886474609375,
-0.002788543701171875,
-0.00711822509765625,
-0.01495361328125,
0.0072784423828125,
-0.0218505859375,
-0.0128631591796875,
-0.0157012939453125,
0.005176544189453125,
0.00708770751953125,
0.0002875328063964844,
0.048431396484375,
-0.0113525390625,
0.0158843994140625,
0.018768310546875,
-0.013702392578125,
0.050445556640625,
-0.024444580078125,
0.008056640625,
-0.024658203125,
-0.0288848876953125,
-0.037628173828125,
0.0005960464477539062,
0.0275421142578125,
-0.0272216796875,
-0.0019359588623046875
]
|
7c5ee9a6b9aeb784c018990de5d9d57d3084da01 | Wordpress Stackexchange
Q: Specify image dimensions I ran a performance report for my website (using GTmetrix) and I realized the image dimensions are not set, and I missed specifying the height and width attributes. The theme already had some images, but they are not specified by default. How can I specify them and more importantly, where do I specify the attributes height and width?
<div class="thumb">
<a class="clip-link" data-id="1" title="Hello world!" href="http://example.com/hello-world/">
<span class="clip">
<img src="http://example.com/wp-content/themes/beetube/images/nothumb.png" alt="Hello world!" />
<span class="vertical-align"></span>
</span>
A: In your theme's functions.php file you can add
add_image_size( 'thumb', 600, 350, true );
add_image_size( 'thumbnil', 600, 350, true );
add_image_size( 'medium', 600, 350, true );
add_image_size( 'large', 600, 350, true );
add_image_size( 'post-thumbnail', 600, 350, true );
add_image_size( '{custom-image-type}', 600, 350, true );
For more information have a look at http://codex.wordpress.org/Function_Reference/add_image_size
| Q: Specify image dimensions I ran a performance report for my website (using GTmetrix) and I realized the image dimensions are not set, and I missed specifying the height and width attributes. The theme already had some images, but they are not specified by default. How can I specify them and more importantly, where do I specify the attributes height and width?
<div class="thumb">
<a class="clip-link" data-id="1" title="Hello world!" href="http://example.com/hello-world/">
<span class="clip">
<img src="http://example.com/wp-content/themes/beetube/images/nothumb.png" alt="Hello world!" />
<span class="vertical-align"></span>
</span>
A: In your theme's functions.php file you can add
add_image_size( 'thumb', 600, 350, true );
add_image_size( 'thumbnil', 600, 350, true );
add_image_size( 'medium', 600, 350, true );
add_image_size( 'large', 600, 350, true );
add_image_size( 'post-thumbnail', 600, 350, true );
add_image_size( '{custom-image-type}', 600, 350, true );
For more information have a look at http://codex.wordpress.org/Function_Reference/add_image_size
A: Jacob's answers address half the question. For the other half:
the GT Metrix alert doesn't really means you need to specify width and height in the html. What it means is that is you gotta reserve te proper space and when the image is loaded, the browser doens't have to reflow and repaint the page.
Besides, if you hardcode the dimensions, it kinds of defeats responsive behaviour. If your layout is not responsive, it's ok, but if you want to keep some responsiveness, you could use only CSS to achieve the results.
Most of time, using both width and max-width:100 will do the work, but this post from Smashing Magazine has an interesting technique: instead of using max-width:100%, you can use The Padding-Bottom Hack :
With the technique, we define the height as a measure relative to the width. Padding and margin have such intrinsic properties, and we can use them to create aspect ratios for elements that do not have any content in them.
Because padding has this capability, we can set padding-bottom to be relative to the width of an element. If we also set height to be 0, we’ll get what we want. [...]
The next step is to place an image inside the container and make sure it fills up the container. To do this, we need to position the image absolutely inside the container, like so:
.img-container {
padding-bottom: 56.25%; /* 16:9 ratio */
height: 0;
background-color: black;
}
.img-container img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
Hope it helps.
A: For anyone else looking for an automated solution to ensure all images throughout your WordPress site have the appropriate width and height attributes set, the following plugin will take care of it for you: Specify Image Dimensions.
You can take a look at the source code and add it in your own functions.php as an alternative, like so:
add_action( 'plugins_loaded', 'factmaven_spcimg_buffer', 10, 1 );
function factmaven_spcimg_buffer() { // Enable output buffering for our function
ob_start( 'factmaven_spcimg_specify_image_dimensions' );
}
function factmaven_spcimg_specify_image_dimensions( $content ) { // Automatically insert width and height attributes
if ( is_admin() && ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) ) { // Don't run the function in the admin panel
return $content;
}
preg_match_all( '/<img[^>]+>/i', $content, $images );
if ( count( $images ) < 1 ) { // Don't change content if there are no images
return $content;
}
foreach ( $images[0] as $image ) {
preg_match_all( '/(src|alt|title|class|id|width|height)=("[^"]*")/i', $image, $img );
if ( !in_array( 'src', $img[1] ) ) {
continue;
}
if ( !in_array( 'width', $img[1] ) || !in_array( 'height', $img[1] ) ) {
$src = $img[2][array_search( 'src', $img[1] )];
$alt = in_array( 'alt', $img[1] ) ? ' alt=' . $img[2][array_search( 'alt', $img[1] )] : '';
$title = in_array( 'title', $img[1] ) ? ' title=' . $img[2][array_search( 'title', $img[1] )] : '';
$class = in_array( 'class', $img[1] ) ? ' class=' . $img[2][array_search( 'class', $img[1] )] : '';
$id = in_array( 'id', $img[1] ) ? ' id=' . $img[2][array_search( 'id', $img[1] )] : '';
list( $width, $height, $type, $attr ) = getimagesize( str_replace( "\"", "" , $src ) );
$image_tag = sprintf( '<img src=%s%s%s%s%s width="%d" height="%d" />', $src, $alt, $title, $class, $id, $width, $height );
$content = str_replace( $image, $image_tag, $content );
}
}
return $content;
}
| wordpress | {
"language": "en",
"length": 687,
"provenance": "stackexchange_00019.jsonl.gz:450534",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168503"
} | [
0.00823211669921875,
-0.0255584716796875,
-0.0025005340576171875,
-0.0067138671875,
-0.0159912109375,
-0.0170745849609375,
0.037261962890625,
-0.0067901611328125,
-0.02056884765625,
0.01056671142578125,
-0.04730224609375,
0.004093170166015625,
-0.01084136962890625,
-0.0199127197265625,
0.00968170166015625,
-0.04534912109375,
0.0662841796875,
-0.0152435302734375,
0.075439453125,
0.011474609375,
0.033905029296875,
0.05816650390625,
0.0263214111328125,
0.1044921875,
0.01183319091796875,
-0.008697509765625,
0.0888671875,
-0.041015625,
0.00868988037109375,
-0.0167999267578125,
0.0178070068359375,
-0.0027027130126953125,
0.026153564453125,
-0.00635528564453125,
0.01416015625,
0.05316162109375,
0.03472900390625,
-0.0188140869140625,
0.004322052001953125,
0.0341796875,
0.0197906494140625,
-0.008209228515625,
0.07501220703125,
-0.01367950439453125,
0.027374267578125,
-0.0031566619873046875,
0.0152130126953125,
-0.06500244140625,
0.0222625732421875,
-0.050384521484375,
0.01015472412109375,
0.0301971435546875,
0.035186767578125,
-0.0638427734375,
-0.028900146484375,
-0.0030307769775390625,
-0.034149169921875,
0.037872314453125,
0.03070068359375,
-0.01146697998046875,
-0.036773681640625,
-0.0120849609375,
0.01390838623046875,
-0.017578125,
0.004772186279296875,
-0.01468658447265625,
0.0223846435546875,
0.0140380859375,
-0.03076171875,
-0.0256195068359375,
0.0290069580078125,
-0.009429931640625,
-0.030120849609375,
-0.030609130859375,
-0.01824951171875,
0.052459716796875,
-0.0233612060546875,
-0.0274505615234375,
0.02081298828125,
-0.0092315673828125,
0.0301666259765625,
-0.044403076171875,
-0.0009312629699707031,
-0.0007619857788085938,
0.047607421875,
0.04296875,
0.0047607421875,
-0.01702880859375,
-0.01285552978515625,
-0.0227508544921875,
-0.015411376953125,
-0.042144775390625,
-0.02984619140625,
0.0133209228515625,
-0.005748748779296875,
-0.026031494140625,
0.0146942138671875,
0.0125885009765625,
-0.002681732177734375,
0.0294647216796875,
-0.00057220458984375,
-0.046875,
0.0616455078125,
-0.050323486328125,
0.0218658447265625,
0.0251312255859375,
-0.02496337890625,
-0.0035762786865234375,
0.040435791015625,
0.03277587890625,
0.0094146728515625,
-0.005245208740234375,
0.0061798095703125,
0.0164337158203125,
-0.035980224609375,
0.0006284713745117188,
-0.020233154296875,
0.00902557373046875,
-0.013946533203125,
0.029327392578125,
-0.004001617431640625,
0.012237548828125,
0.045440673828125,
-0.030029296875,
0.0157623291015625,
0.01424407958984375,
-0.01499176025390625,
-0.061492919921875,
0.0196990966796875,
0.038848876953125,
-0.03765869140625,
0.0144805908203125,
0.02618408203125,
-0.023284912109375,
-0.01088714599609375,
-0.01180267333984375,
0.003925323486328125,
-0.072998046875,
-0.04583740234375,
0.044158935546875,
-0.03643798828125,
-0.008209228515625,
0.04022216796875,
-0.059417724609375,
0.012115478515625,
0.01148223876953125,
-0.01268768310546875,
0.035064697265625,
0.0099029541015625,
-0.0821533203125,
0.08575439453125,
-0.07232666015625,
0.0208892822265625,
0.022705078125,
-0.0003662109375,
0.00739288330078125,
0.04937744140625,
-0.012237548828125,
-0.04388427734375,
-0.02557373046875,
-0.03167724609375,
0.007167816162109375,
0.03857421875,
-0.035614013671875,
-0.0189666748046875,
-0.00458526611328125,
-0.038299560546875,
0.00240325927734375,
0.021331787109375,
0.01256561279296875,
-0.0109100341796875,
-0.014556884765625,
0.001926422119140625,
0.018890380859375,
0.0030803680419921875,
0.0275421142578125,
0.0162811279296875,
-0.0103607177734375,
0.0205078125,
0.01447296142578125,
-0.012115478515625,
-0.0127105712890625,
0.055572509765625,
-0.02374267578125,
-0.003528594970703125,
-0.027374267578125,
-0.00713348388671875,
0.0095062255859375,
0.03570556640625,
0.018890380859375,
-0.034210205078125,
-0.017242431640625,
-0.0435791015625,
0.011932373046875,
0.001995086669921875,
-0.005695343017578125,
-0.034454345703125,
-0.027984619140625,
-0.0060882568359375,
0.011383056640625,
0.051483154296875,
0.0016222000122070312,
0.0219268798828125,
0.0036602020263671875,
-0.03033447265625,
0.0247344970703125,
-0.01409149169921875,
0.0204620361328125,
-0.04339599609375,
-0.01654052734375,
0.0159912109375,
-0.036590576171875,
0.01007843017578125,
-0.04571533203125,
-0.0205078125,
-0.0237579345703125,
0.0122528076171875,
0.03216552734375,
0.00566864013671875,
0.01303863525390625,
-0.007720947265625,
-0.026702880859375,
0.0012645721435546875,
0.0199127197265625,
0.01303863525390625,
0.033294677734375,
-0.033782958984375,
0.007724761962890625,
-0.004978179931640625,
0.0305633544921875,
-0.0285186767578125,
0.031494140625,
-0.0297088623046875,
0.022613525390625,
-0.01751708984375,
-0.035888671875,
0.0113067626953125,
-0.053497314453125,
0.0538330078125,
0.046661376953125,
0.01534271240234375,
0.04150390625,
-0.00884246826171875,
0.029876708984375,
0.024993896484375,
0.04559326171875,
0.0460205078125,
-0.016754150390625,
-0.004863739013671875,
-0.020965576171875,
0.02227783203125,
-0.03497314453125,
0.032196044921875,
-0.06884765625,
0.01192474365234375,
0.038787841796875,
-0.043853759765625,
-0.0169219970703125,
0.022216796875,
0.034515380859375,
-0.0285797119140625,
0.057708740234375,
0.08270263671875,
-0.01214599609375,
0.0254364013671875,
0.0249481201171875,
0.0251922607421875,
0.025054931640625,
-0.03619384765625,
0.037200927734375,
0.0167388916015625,
-0.041015625,
0.0027923583984375,
-0.007659912109375,
0.0125732421875,
-0.0386962890625,
-0.034210205078125,
0.035919189453125,
-0.00714874267578125,
-0.025726318359375,
-0.01079559326171875,
0.01024627685546875,
-0.037353515625,
-0.00469207763671875,
-0.0182037353515625,
-0.08843994140625,
0.01222991943359375,
0.031280517578125,
0.0203704833984375,
-0.001842498779296875,
0.01611328125,
0.0295257568359375,
0.002307891845703125,
0.04266357421875,
-0.03057861328125,
-0.013885498046875,
-0.0094451904296875,
-0.0693359375,
0.06939697265625,
-0.0615234375,
0.06475830078125,
0.0860595703125,
-0.057586669921875,
0.055633544921875,
-0.006504058837890625,
-0.0411376953125,
-0.0161590576171875,
0.0226287841796875,
-0.0092620849609375,
-0.050201416015625,
-0.00899505615234375,
0.0294952392578125,
0.012298583984375,
-0.006317138671875,
-0.0152435302734375,
-0.01442718505859375,
-0.0304107666015625,
-0.00049591064453125,
-0.0201263427734375,
0.0166778564453125,
0.033599853515625,
-0.0784912109375,
-0.03515625,
-0.0266265869140625,
-0.059844970703125,
0.003353118896484375,
-0.00756072998046875,
-0.01190948486328125,
-0.06158447265625,
-0.0200958251953125,
-0.0048065185546875,
-0.0771484375,
-0.036346435546875,
-0.0206756591796875,
0.0009860992431640625,
0.013763427734375,
0.0084381103515625,
0.033355712890625,
-0.00325775146484375,
-0.033416748046875,
-0.010498046875,
0.00051116943359375,
-0.0036163330078125,
-0.0163116455078125,
0.01192474365234375,
-0.00971221923828125,
-0.00957489013671875,
-0.004901885986328125,
0.0443115234375,
0.04278564453125,
-0.0438232421875,
0.00030732154846191406,
-0.04168701171875,
-0.04144287109375,
-0.02496337890625,
0.0704345703125,
0.049835205078125,
-0.052276611328125,
0.035369873046875,
-0.060546875,
-0.01702880859375,
-0.0196533203125,
-0.048675537109375,
0.02972412109375,
0.021240234375,
-0.0142364501953125,
-0.0108795166015625,
0.0208892822265625,
-0.00418853759765625,
0.00783538818359375,
0.0254669189453125,
-0.0316162109375,
0.0258026123046875,
-0.0084381103515625,
-0.0308990478515625,
-0.03717041015625,
-0.015106201171875,
-0.0273284912109375,
0.06658935546875,
0.0019083023071289062,
0.0239715576171875,
-0.0027027130126953125,
-0.00031948089599609375,
-0.0217742919921875,
-0.0284881591796875,
0.0257720947265625,
-0.0015716552734375,
0.043487548828125,
-0.01407623291015625,
-0.035064697265625,
0.0002199411392211914,
0.0765380859375,
-0.035614013671875,
-0.019866943359375,
0.01226806640625,
0.044219970703125,
-0.03985595703125,
-0.041168212890625,
-0.014373779296875,
-0.00485992431640625,
-0.047576904296875,
-0.01319122314453125,
0.0175628662109375,
-0.046112060546875,
-0.0166473388671875,
0.031829833984375,
-0.043121337890625,
-0.006671905517578125,
0.011077880859375,
0.046722412109375,
-0.0277862548828125,
0.03289794921875,
-0.04254150390625,
0.06658935546875,
0.0011606216430664062,
-0.025726318359375,
-0.10791015625,
-0.0260772705078125,
-0.0064849853515625,
0.09429931640625,
-0.0250701904296875,
0.04376220703125,
-0.041015625,
0.06170654296875,
0.0005879402160644531,
-0.015838623046875,
0.033599853515625,
0.033477783203125,
-0.0298614501953125,
0.0000457763671875,
0.0209197998046875,
-0.0498046875,
-0.0095977783203125,
-0.04510498046875,
-0.0112457275390625,
-0.0191650390625,
-0.0325927734375,
0.01001739501953125,
-0.0258331298828125,
-0.009765625,
-0.0198822021484375,
-0.0196990966796875,
0.03924560546875,
0.06585693359375,
0.0227813720703125,
0.00438690185546875,
-0.0611572265625,
-0.02935791015625,
0.05267333984375,
0.0423583984375,
0.0019855499267578125,
-0.014739990234375,
0.047271728515625,
0.003269195556640625,
-0.04217529296875,
-0.056365966796875,
-0.0158233642578125,
0.03173828125,
0.001434326171875,
0.0238800048828125,
0.00946807861328125,
-0.01090240478515625,
0.00714874267578125,
0.023040771484375,
0.0164031982421875,
-0.03521728515625,
0.0762939453125,
0.0015544891357421875,
-0.0165863037109375,
0.040283203125,
-0.000598907470703125,
-0.03399658203125,
0.00008976459503173828,
-0.0196533203125,
-0.0081939697265625,
0.005279541015625,
0.012969970703125,
-0.0155029296875,
0.02197265625,
0.00800323486328125,
0.00023698806762695312,
-0.0010881423950195312,
0.031829833984375,
0.0150909423828125,
0.00627899169921875,
0.0059814453125,
-0.0288848876953125,
-0.0170440673828125,
0.027923583984375,
0.0159912109375,
0.0204620361328125,
-0.00023245811462402344,
0.04107666015625,
0.03631591796875,
0.0303955078125,
-0.01132965087890625,
-0.0014314651489257812,
0.0081329345703125,
0.0131072998046875,
-0.0219268798828125,
-0.007411956787109375,
0.0052642822265625,
0.0097198486328125,
-0.01490020751953125,
0.005283355712890625,
0.051300048828125,
0.01078033447265625,
-0.0220184326171875,
-0.0031299591064453125,
-0.0152130126953125,
0.0006160736083984375,
-0.044647216796875,
0.005054473876953125,
0.00441741943359375,
-0.004405975341796875,
0.06671142578125,
-0.0231475830078125,
0.02947998046875,
0.01224517822265625,
-0.0101318359375,
0.0149688720703125,
0.03326416015625,
0.0280303955078125,
0.0292510986328125,
0.0140838623046875,
-0.048126220703125,
0.039764404296875,
-0.0077056884765625,
-0.012176513671875,
0.018829345703125,
0.034881591796875,
0.033050537109375,
-0.0589599609375,
-0.047821044921875,
0.0213470458984375,
-0.041748046875,
0.018646240234375,
-0.0045013427734375,
-0.0292510986328125,
-0.053192138671875,
0.00881195068359375,
0.0298004150390625,
0.0347900390625,
-0.059661865234375,
-0.05035400390625,
0.01371002197265625,
-0.042266845703125,
0.01727294921875,
0.01152801513671875,
-0.025909423828125,
0.0281829833984375,
0.020721435546875,
-0.01514434814453125,
-0.0029296875,
-0.02667236328125,
-0.00823211669921875,
-0.01031494140625,
0.0011758804321289062,
-0.0294647216796875,
0.026336669921875,
-0.0518798828125,
0.014251708984375,
0.00284576416015625,
-0.0185699462890625,
-0.00788116455078125,
0.028656005859375,
0.032470703125,
0.01259613037109375,
-0.0093994140625,
-0.03125,
-0.0301055908203125,
-0.0177459716796875,
0.033233642578125,
0.01532745361328125,
0.006938934326171875,
-0.0172119140625,
-0.026763916015625,
0.011260986328125,
-0.01154327392578125,
0.017547607421875,
-0.0215301513671875,
0.0224151611328125,
-0.00010377168655395508,
-0.0112152099609375,
-0.0222320556640625,
0.002391815185546875,
0.0213623046875,
0.0196990966796875,
-0.0287933349609375,
-0.0196533203125,
0.00920867919921875,
-0.005825042724609375,
0.00539398193359375,
0.006839752197265625,
0.0026378631591796875,
0.0018930435180664062,
-0.0187835693359375,
-0.042388916015625,
0.047332763671875,
0.0006732940673828125,
-0.0164337158203125,
-0.037017822265625,
-0.0077667236328125,
-0.026519775390625,
0.089111328125,
-0.0263671875,
0.00833892822265625,
0.007843017578125,
-0.0164337158203125,
0.055816650390625,
0.003231048583984375,
0.0017633438110351562,
0.0022125244140625,
-0.034637451171875,
0.018463134765625,
0.042510986328125,
-0.01317596435546875,
0.01480865478515625,
0.09576416015625,
0.0033111572265625,
0.0631103515625,
0.054656982421875,
0.00984954833984375,
0.04461669921875,
0.0205078125,
-0.038482666015625,
-0.0260009765625,
0.032745361328125,
0.01129913330078125,
-0.0106048583984375,
0.016815185546875,
-0.017974853515625,
0.0198211669921875,
0.00244903564453125,
0.055145263671875,
-0.014190673828125,
0.0290069580078125,
0.0060882568359375,
-0.026702880859375,
0.0477294921875,
-0.00635528564453125,
0.0208587646484375,
0.0311737060546875,
0.01031494140625,
0.016021728515625,
-0.01274871826171875,
0.0173797607421875,
0.006092071533203125,
-0.01303863525390625,
0.01282501220703125,
-0.02166748046875,
-0.0020236968994140625,
-0.041778564453125,
-0.0241546630859375,
0.039520263671875,
-0.036041259765625,
-0.004726409912109375,
0.0330810546875,
-0.0491943359375,
-0.00537872314453125,
-0.0298614501953125,
-0.0240020751953125,
-0.03369140625,
-0.0224609375,
0.04412841796875,
0.038177490234375,
0.0279693603515625,
0.02899169921875,
0.01261138916015625,
0.008331298828125,
0.01238250732421875,
-0.032958984375,
0.037994384765625,
-0.006610870361328125,
0.01953125,
-0.0111541748046875,
-0.0472412109375,
-0.0037021636962890625,
-0.041656494140625,
0.02093505859375,
-0.007045745849609375,
0.00403594970703125,
0.071044921875,
-0.0278472900390625,
-0.0166778564453125,
0.04083251953125,
0.033203125,
-0.0205535888671875,
-0.00926971435546875,
0.0318603515625,
-0.06494140625,
-0.0455322265625,
0.006412506103515625,
-0.050018310546875,
-0.0016155242919921875,
-0.024688720703125,
-0.042449951171875,
0.0802001953125,
-0.0308990478515625,
0.01410675048828125,
0.0004405975341796875,
0.0310211181640625,
0.0189056396484375,
0.034637451171875,
0.0169677734375,
0.007320404052734375,
-0.045562744140625,
-0.0179901123046875,
-0.021697998046875,
0.0219573974609375,
-0.018707275390625,
0.03155517578125,
0.06280517578125,
0.0178985595703125,
-0.0411376953125,
-0.0038394927978515625,
0.0792236328125,
0.09588623046875,
0.040618896484375,
-0.00447845458984375,
-0.0218963623046875,
-0.02447509765625,
0.001163482666015625,
-0.0303497314453125,
0.0075531005859375,
0.0045928955078125,
-0.0277862548828125,
0.017242431640625,
-0.00197601318359375,
0.00824737548828125,
-0.019744873046875,
0.00966644287109375,
-0.0268707275390625,
-0.0152740478515625,
0.0384521484375,
-0.037017822265625,
0.044281005859375,
0.02337646484375,
0.02850341796875,
0.016845703125,
-0.022186279296875,
0.002895355224609375,
0.046295166015625,
-0.01256561279296875,
0.037628173828125,
0.01087188720703125,
0.0104522705078125,
0.0325927734375,
0.0095977783203125,
0.00829315185546875,
0.06005859375,
-0.016754150390625,
0.0252685546875,
0.0157318115234375,
0.01097869873046875,
-0.038055419921875,
0.0060577392578125,
0.03631591796875,
0.045074462890625,
-0.046142578125,
-0.017364501953125,
-0.0040740966796875,
0.01088714599609375,
0.0163421630859375,
-0.0233612060546875,
0.0272979736328125,
-0.035552978515625,
-0.01690673828125,
-0.04534912109375,
0.01363372802734375,
0.0282135009765625,
0.030731201171875,
-0.0175323486328125,
-0.018341064453125,
-0.052886962890625,
0.003124237060546875,
-0.035003662109375,
-0.01287078857421875,
0.004619598388671875,
0.04876708984375,
0.024200439453125,
0.04638671875,
0.038330078125,
-0.01105499267578125,
-0.031585693359375,
0.049713134765625,
-0.0202789306640625,
0.031341552734375,
-0.01393890380859375,
-0.02099609375,
-0.0311431884765625,
0.02630615234375,
-0.0236968994140625,
-0.006427764892578125,
0.0482177734375,
0.0224151611328125,
-0.09136962890625,
-0.023284912109375,
0.0170440673828125,
-0.033905029296875,
-0.0074005126953125,
-0.01549530029296875,
0.0183868408203125,
0.04766845703125,
-0.005889892578125,
-0.00010097026824951172,
-0.01160430908203125,
0.060272216796875,
-0.0243072509765625,
0.036163330078125,
-0.00850677490234375,
-0.006969451904296875,
0.00971221923828125,
-0.0026397705078125,
0.045867919921875,
-0.00281524658203125,
-0.051544189453125,
0.0048675537109375,
-0.017181396484375,
-0.040679931640625,
0.0316162109375,
0.0217437744140625,
-0.0307769775390625,
0.0328369140625,
0.01529693603515625,
-0.0192718505859375,
-0.002498626708984375,
0.0218505859375,
0.0004978179931640625,
0.0098724365234375,
0.036956787109375,
0.0039215087890625,
-0.061798095703125,
-0.031768798828125,
-0.01265716552734375,
0.02880859375,
-0.030548095703125,
0.061676025390625,
-0.0158233642578125,
0.0000336766242980957,
0.024200439453125,
-0.00033974647521972656,
0.02813720703125,
-0.01346588134765625,
0.06964111328125,
0.015838623046875,
0.0108795166015625,
-0.03497314453125,
0.013641357421875,
0.0142669677734375,
0.0305328369140625,
-0.0302886962890625,
-0.02239990234375,
0.002719879150390625,
0.018402099609375,
0.0115966796875,
-0.0011892318725585938,
-0.02142333984375,
-0.053375244140625,
-0.04736328125,
0.0208740234375,
0.0167083740234375,
0.00862884521484375,
-0.052734375,
0.033660888671875,
0.036773681640625,
0.0260162353515625,
0.03759765625,
-0.01415252685546875,
0.076171875,
0.04534912109375,
-0.046295166015625,
-0.06378173828125,
0.0177459716796875,
-0.0049285888671875,
-0.02471923828125,
0.01751708984375,
0.058074951171875,
-0.005340576171875,
-0.01502227783203125,
0.065673828125,
-0.008697509765625,
0.0268402099609375,
-0.049102783203125,
-0.022247314453125,
0.038421630859375,
0.019866943359375,
0.0025882720947265625,
0.00795745849609375,
-0.02203369140625,
-0.04058837890625,
0.003398895263671875,
0.0144195556640625,
-0.00652313232421875,
-0.00945281982421875,
-0.0316162109375,
-0.0022735595703125,
0.041748046875,
0.0089569091796875,
-0.048553466796875,
0.0244140625,
-0.0279083251953125,
0.00860595703125,
-0.00858306884765625,
-0.01496124267578125,
0.0064239501953125,
0.0380859375,
-0.0172119140625,
-0.01131439208984375,
-0.043670654296875,
-0.00577545166015625,
-0.0168304443359375,
0.058197021484375,
0.0712890625,
-0.051361083984375,
0.01177978515625,
0.0360107421875,
0.046142578125,
0.0833740234375,
-0.0145263671875,
-0.03338623046875,
0.0019388198852539062,
0.0207977294921875,
-0.0228118896484375,
-0.08013916015625,
0.01329803466796875,
-0.0809326171875,
0.0269012451171875,
-0.0201873779296875,
0.0213470458984375,
0.01934814453125,
-0.03302001953125,
-0.0712890625,
0.040985107421875,
-0.017364501953125,
-0.0265960693359375,
0.0014162063598632812,
0.00272369384765625,
-0.0092010498046875,
0.0142669677734375,
0.0073089599609375,
0.0030498504638671875,
-0.0018186569213867188,
0.00012230873107910156,
-0.007568359375,
-0.017547607421875,
0.035614013671875,
-0.0098419189453125,
-0.0301361083984375,
0.01551055908203125,
0.0194244384765625,
-0.0274505615234375,
0.016571044921875,
-0.0117034912109375,
0.030303955078125,
0.036712646484375,
-0.0266571044921875,
-0.0223236083984375,
-0.01491546630859375,
-0.026947021484375,
-0.0301666259765625,
-0.0090789794921875,
0.0165557861328125,
-0.007480621337890625,
0.07684326171875,
0.00020933151245117188,
0.0005478858947753906,
-0.0216522216796875,
0.0120086669921875,
0.01212310791015625,
0.0009393692016601562,
-0.0213470458984375,
-0.002178192138671875,
-0.0555419921875,
-0.057342529296875,
-0.00958251953125,
-0.002490997314453125,
-0.01074981689453125,
0.00881195068359375,
-0.035369873046875,
-0.008758544921875,
0.005916595458984375,
0.01123809814453125,
-0.0736083984375,
0.06854248046875,
0.020263671875,
-0.037078857421875,
0.00201416015625,
-0.0313720703125,
-0.01532745361328125,
0.003936767578125,
-0.06463623046875,
-0.00800323486328125,
0.03375244140625,
-0.037933349609375,
0.02081298828125,
-0.0133819580078125,
0.03839111328125,
-0.047760009765625,
0.0185394287109375,
0.0028324127197265625,
-0.0079803466796875,
0.00543975830078125,
0.00019347667694091797,
-0.01549530029296875,
-0.0009317398071289062,
-0.01346588134765625,
-0.011077880859375,
-0.00638580322265625,
-0.023223876953125,
-0.025482177734375,
0.0214691162109375,
-0.005401611328125,
-0.0093994140625,
0.025909423828125,
-0.01480865478515625,
0.02593994140625,
-0.01763916015625,
-0.035675048828125,
-0.00496673583984375,
-0.000576019287109375,
0.006259918212890625,
-0.05157470703125,
0.007183074951171875
]
|
628357fe5f58ddc138ccea63f1e4cfda0e946de4 | Wordpress Stackexchange
Q: Contributors missing from author dropdown I have a problem with Quick Edit post functions.
When I add new users as Contributors, they don't appear in author dropdown list.
I am using Role Scoper plugin for some roles. But I tried to deactivate plugin and it doesn't help.
Can someone help me with advice?
A: My advice is to read the Codex regarding user roles and capabilities.
Contributors cannot publish posts.
Edit: I am able to successfully add new users with the 'contributor' role, and select them from the dropdown as the author of a post, which is what I now realize you're having issues with. So something is definitely wrong if this is not working for you. Disregard my earlier advice, because it is not relevant to your problem.
| Q: Contributors missing from author dropdown I have a problem with Quick Edit post functions.
When I add new users as Contributors, they don't appear in author dropdown list.
I am using Role Scoper plugin for some roles. But I tried to deactivate plugin and it doesn't help.
Can someone help me with advice?
A: My advice is to read the Codex regarding user roles and capabilities.
Contributors cannot publish posts.
Edit: I am able to successfully add new users with the 'contributor' role, and select them from the dropdown as the author of a post, which is what I now realize you're having issues with. So something is definitely wrong if this is not working for you. Disregard my earlier advice, because it is not relevant to your problem.
| wordpress | {
"language": "en",
"length": 130,
"provenance": "stackexchange_00019.jsonl.gz:450582",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168665"
} | [
0.039764404296875,
0.00971221923828125,
0.022613525390625,
0.01123046875,
0.001354217529296875,
-0.00411224365234375,
0.0238037109375,
-0.072509765625,
-0.00418853759765625,
0.052276611328125,
-0.0072479248046875,
0.0250091552734375,
-0.0140228271484375,
0.0009760856628417969,
-0.042877197265625,
-0.0183258056640625,
0.0204010009765625,
-0.000446319580078125,
0.0020542144775390625,
-0.0094451904296875,
-0.000621795654296875,
0.01342010498046875,
-0.0266265869140625,
0.0138397216796875,
0.0276947021484375,
0.030914306640625,
-0.00948333740234375,
-0.02655029296875,
0.0150604248046875,
0.0037059783935546875,
0.0127105712890625,
-0.02874755859375,
-0.0072021484375,
0.0052032470703125,
0.01505279541015625,
0.033416748046875,
0.0019397735595703125,
0.0123443603515625,
0.035491943359375,
-0.0182952880859375,
0.0294342041015625,
-0.00434112548828125,
-0.04345703125,
-0.01267242431640625,
-0.018463134765625,
-0.0740966796875,
0.05682373046875,
-0.016265869140625,
0.0078277587890625,
0.01495361328125,
-0.00970458984375,
-0.0067901611328125,
0.0066986083984375,
-0.06536865234375,
0.006237030029296875,
-0.0226287841796875,
-0.0132904052734375,
0.059326171875,
0.030120849609375,
-0.0161285400390625,
-0.0216217041015625,
0.006923675537109375,
0.01195526123046875,
-0.01385498046875,
0.02252197265625,
0.0134124755859375,
0.0400390625,
0.0271148681640625,
-0.054656982421875,
-0.00048422813415527344,
0.01263427734375,
-0.042633056640625,
-0.016510009765625,
0.0166015625,
-0.0078277587890625,
-0.06182861328125,
-0.00722503662109375,
-0.07415771484375,
0.020660400390625,
0.050262451171875,
0.00572967529296875,
0.02935791015625,
0.0108489990234375,
-0.016143798828125,
-0.0023250579833984375,
-0.0036373138427734375,
-0.0169677734375,
-0.0188446044921875,
-0.046142578125,
0.0233306884765625,
-0.0194854736328125,
-0.09796142578125,
-0.033172607421875,
0.07659912109375,
0.03668212890625,
0.01094818115234375,
0.06640625,
0.0748291015625,
-0.0297088623046875,
-0.0102691650390625,
-0.00860595703125,
-0.030242919921875,
-0.0026226043701171875,
-0.036224365234375,
0.0141448974609375,
0.048828125,
-0.03466796875,
0.0007557868957519531,
0.02703857421875,
0.0350341796875,
0.0100555419921875,
-0.0312347412109375,
0.026519775390625,
-0.01392364501953125,
-0.01428985595703125,
-0.027191162109375,
-0.0249481201171875,
0.0283355712890625,
0.01074981689453125,
-0.005222320556640625,
-0.0284423828125,
-0.01515960693359375,
-0.0119781494140625,
-0.03485107421875,
0.0157470703125,
-0.024627685546875,
-0.030975341796875,
0.039825439453125,
0.03485107421875,
0.01041412353515625,
-0.037506103515625,
0.00391387939453125,
0.0859375,
0.0305938720703125,
0.031707763671875,
-0.02301025390625,
-0.0019168853759765625,
0.00894927978515625,
-0.006076812744140625,
0.01378631591796875,
-0.00347137451171875,
-0.0245208740234375,
0.017181396484375,
-0.00754547119140625,
0.0005850791931152344,
0.02496337890625,
0.0059967041015625,
0.016876220703125,
0.0207672119140625,
-0.01230621337890625,
-0.0222320556640625,
-0.04296875,
0.0178985595703125,
-0.006191253662109375,
0.032379150390625,
-0.0293731689453125,
0.0184173583984375,
-0.04559326171875,
0.022613525390625,
-0.013885498046875,
0.048614501953125,
0.0278167724609375,
0.0281524658203125,
-0.019256591796875,
-0.03143310546875,
-0.05419921875,
-0.06439208984375,
-0.02081298828125,
0.02398681640625,
-0.002742767333984375,
0.0245513916015625,
-0.044464111328125,
0.01531982421875,
0.0183563232421875,
-0.0019588470458984375,
0.037261962890625,
-0.01128387451171875,
0.03594970703125,
0.006580352783203125,
0.011566162109375,
0.01242828369140625,
-0.020416259765625,
0.049560546875,
0.005786895751953125,
-0.059356689453125,
0.032012939453125,
-0.0244598388671875,
0.03485107421875,
0.0625,
-0.0089111328125,
0.00461578369140625,
0.0113067626953125,
0.01009368896484375,
-0.0313720703125,
0.0037174224853515625,
-0.0306396484375,
0.00812530517578125,
-0.0199737548828125,
0.0023860931396484375,
0.041473388671875,
0.010833740234375,
0.01461029052734375,
0.0164947509765625,
-0.017730712890625,
-0.0294952392578125,
0.005550384521484375,
-0.0172271728515625,
0.034332275390625,
0.044891357421875,
0.02142333984375,
-0.0159759521484375,
0.0161895751953125,
-0.01494598388671875,
-0.0244598388671875,
-0.029571533203125,
0.0323486328125,
-0.0224456787109375,
0.0362548828125,
-0.000362396240234375,
0.0243377685546875,
-0.0005884170532226562,
-0.030487060546875,
0.00800323486328125,
0.0014905929565429688,
0.047821044921875,
-0.040130615234375,
-0.0022983551025390625,
-0.045166015625,
0.0458984375,
-0.0251617431640625,
0.014404296875,
0.04534912109375,
0.00122833251953125,
0.0193634033203125,
-0.0631103515625,
-0.019195556640625,
-0.0304412841796875,
0.0166168212890625,
0.00936126708984375,
0.041534423828125,
0.0202484130859375,
0.0224151611328125,
-0.00028014183044433594,
0.01910400390625,
0.075439453125,
0.018341064453125,
0.017669677734375,
0.014923095703125,
-0.00955963134765625,
0.05426025390625,
0.075927734375,
0.0325927734375,
-0.0304412841796875,
-0.038482666015625,
0.021942138671875,
0.006626129150390625,
-0.007415771484375,
0.01727294921875,
-0.0237274169921875,
-0.0005655288696289062,
0.0030956268310546875,
-0.0592041015625,
-0.01218414306640625,
-0.0283050537109375,
-0.00897979736328125,
-0.0303802490234375,
-0.00457000732421875,
0.0062408447265625,
-0.00229644775390625,
-0.037841796875,
0.0260772705078125,
0.01812744140625,
0.014251708984375,
0.05645751953125,
0.0518798828125,
-0.007648468017578125,
0.00768280029296875,
-0.0570068359375,
0.0181732177734375,
0.0297393798828125,
0.0001118779182434082,
0.026092529296875,
0.02899169921875,
-0.005558013916015625,
0.0043182373046875,
0.0186614990234375,
0.02618408203125,
-0.00612640380859375,
0.00548553466796875,
0.0005769729614257812,
0.029815673828125,
-0.00799560546875,
0.0084381103515625,
0.01526641845703125,
-0.013092041015625,
-0.0174560546875,
0.0489501953125,
-0.04034423828125,
0.0199432373046875,
0.0006299018859863281,
0.0665283203125,
0.06878662109375,
0.0214385986328125,
0.0016613006591796875,
0.007404327392578125,
-0.00521087646484375,
-0.006359100341796875,
0.06402587890625,
0.0350341796875,
-0.025360107421875,
0.01444244384765625,
0.0273284912109375,
0.006473541259765625,
-0.00026679039001464844,
-0.0122528076171875,
-0.034759521484375,
-0.00787353515625,
-0.00003993511199951172,
-0.035797119140625,
0.0022125244140625,
-0.017608642578125,
-0.048095703125,
-0.02764892578125,
0.01522064208984375,
-0.038055419921875,
0.002330780029296875,
0.0279388427734375,
0.002277374267578125,
0.013916015625,
-0.0106353759765625,
-0.0633544921875,
-0.0308837890625,
-0.06341552734375,
-0.01074981689453125,
-0.01123809814453125,
-0.00011736154556274414,
0.0031681060791015625,
0.0333251953125,
-0.01238250732421875,
-0.060577392578125,
-0.0445556640625,
-0.01351165771484375,
-0.00484466552734375,
0.0027446746826171875,
0.038360595703125,
0.005092620849609375,
-0.0202178955078125,
0.0174102783203125,
0.05877685546875,
0.0338134765625,
-0.0716552734375,
-0.0091705322265625,
-0.021026611328125,
-0.0203857421875,
0.010223388671875,
0.0154876708984375,
0.018280029296875,
0.019683837890625,
0.05621337890625,
-0.0104522705078125,
0.00824737548828125,
-0.01314544677734375,
-0.017974853515625,
0.011138916015625,
-0.0091552734375,
0.0011272430419921875,
-0.0225372314453125,
0.03497314453125,
0.01654052734375,
0.02081298828125,
-0.00450897216796875,
0.0301513671875,
-0.052276611328125,
-0.001155853271484375,
-0.005748748779296875,
0.00323486328125,
0.026031494140625,
-0.0200042724609375,
0.0127410888671875,
-0.00344085693359375,
-0.00008255243301391602,
0.0009016990661621094,
0.022552490234375,
0.0208740234375,
-0.049041748046875,
0.040557861328125,
-0.0280914306640625,
-0.01885986328125,
-0.03485107421875,
-0.0116424560546875,
-0.01343536376953125,
0.0516357421875,
0.0063934326171875,
-0.0171661376953125,
0.01953125,
0.007350921630859375,
-0.040557861328125,
-0.007427215576171875,
-0.036376953125,
-0.0106048583984375,
0.0214691162109375,
0.0029144287109375,
0.011688232421875,
0.01078033447265625,
-0.044769287109375,
0.050994873046875,
-0.0008172988891601562,
0.01491546630859375,
0.040740966796875,
-0.04180908203125,
0.036346435546875,
0.02191162109375,
0.01021575927734375,
-0.004360198974609375,
-0.038330078125,
-0.03143310546875,
-0.09320068359375,
-0.01268768310546875,
-0.0283966064453125,
0.044769287109375,
-0.00962066650390625,
0.0017414093017578125,
-0.047821044921875,
0.0302276611328125,
-0.0011196136474609375,
0.00853729248046875,
-0.004451751708984375,
-0.0128326416015625,
-0.005035400390625,
-0.0019817352294921875,
-0.0022602081298828125,
-0.01386260986328125,
0.0002892017364501953,
-0.03680419921875,
-0.0548095703125,
-0.01123046875,
-0.03448486328125,
0.027252197265625,
-0.0257110595703125,
-0.0163421630859375,
-0.051422119140625,
-0.038543701171875,
-0.004337310791015625,
0.0252838134765625,
-0.0025730133056640625,
0.0017538070678710938,
-0.0518798828125,
-0.0615234375,
0.03973388671875,
-0.058258056640625,
-0.0123443603515625,
0.0034122467041015625,
0.07904052734375,
0.01751708984375,
-0.0006771087646484375,
0.0205535888671875,
-0.00321197509765625,
0.036041259765625,
0.03228759765625,
0.0298919677734375,
0.0286865234375,
-0.02178955078125,
0.0197296142578125,
0.02716064453125,
0.00946807861328125,
-0.0227203369140625,
-0.0010957717895507812,
-0.007720947265625,
-0.034881591796875,
0.0244293212890625,
0.007213592529296875,
0.0362548828125,
-0.03106689453125,
-0.00011652708053588867,
0.01103973388671875,
0.05633544921875,
-0.0040740966796875,
-0.037872314453125,
0.021148681640625,
0.024627685546875,
-0.044921875,
0.0008854866027832031,
-0.040008544921875,
0.05401611328125,
0.0206298828125,
0.00911712646484375,
0.0287322998046875,
0.0154571533203125,
-0.01800537109375,
-0.026824951171875,
-0.0506591796875,
-0.0107421875,
0.0254364013671875,
-0.057891845703125,
-0.019378662109375,
0.0162353515625,
-0.0289154052734375,
0.09490966796875,
0.03790283203125,
-0.047607421875,
0.060089111328125,
-0.0181884765625,
0.006191253662109375,
-0.0024127960205078125,
0.0025653839111328125,
0.033599853515625,
0.045379638671875,
-0.00942230224609375,
-0.00351715087890625,
0.00672149658203125,
0.0226287841796875,
-0.0303192138671875,
0.0018596649169921875,
-0.0079193115234375,
0.002841949462890625,
-0.0411376953125,
0.0780029296875,
0.0235137939453125,
0.0091094970703125,
-0.02630615234375,
0.0014972686767578125,
-0.0027065277099609375,
-0.00008624792098999023,
-0.007244110107421875,
0.05328369140625,
0.01502227783203125,
-0.005840301513671875,
0.04730224609375,
-0.035797119140625,
-0.0028057098388671875,
-0.0017414093017578125,
0.044830322265625,
-0.002323150634765625,
-0.0185089111328125,
0.029449462890625,
-0.0216522216796875,
0.013885498046875,
0.0178375244140625,
-0.022064208984375,
-0.0484619140625,
0.0028285980224609375,
0.021942138671875,
0.006603240966796875,
-0.044158935546875,
-0.0211029052734375,
-0.045135498046875,
-0.03924560546875,
-0.00920867919921875,
0.00960540771484375,
-0.0312347412109375,
0.0182342529296875,
0.0083465576171875,
0.00010818243026733398,
-0.019195556640625,
-0.01383209228515625,
0.0218048095703125,
0.0038318634033203125,
-0.04058837890625,
-0.021270751953125,
0.0736083984375,
-0.0204315185546875,
0.018402099609375,
-0.048126220703125,
0.0198211669921875,
-0.03375244140625,
-0.001922607421875,
0.06427001953125,
0.04681396484375,
0.0007767677307128906,
0.0015363693237304688,
-0.0293731689453125,
-0.034210205078125,
0.002368927001953125,
-0.005107879638671875,
-0.051849365234375,
-0.02410888671875,
0.029296875,
0.030975341796875,
-0.006214141845703125,
-0.06927490234375,
-0.00933837890625,
-0.0304412841796875,
0.016082763671875,
0.00225830078125,
0.006649017333984375,
0.0230712890625,
-0.0253143310546875,
0.0650634765625,
-0.00817108154296875,
-0.005786895751953125,
-0.025909423828125,
-0.0222320556640625,
-0.00725555419921875,
-0.0302276611328125,
-0.01271820068359375,
0.01358795166015625,
-0.0130462646484375,
0.01253509521484375,
0.0355224609375,
0.00006335973739624023,
0.02587890625,
0.0006351470947265625,
0.0075836181640625,
-0.01099395751953125,
-0.030242919921875,
0.02911376953125,
-0.0055999755859375,
0.037200927734375,
-0.026702880859375,
0.019561767578125,
-0.00921630859375,
-0.018341064453125,
0.00847625732421875,
-0.0091705322265625,
0.003742218017578125,
0.0338134765625,
-0.032196044921875,
0.031585693359375,
0.0272216796875,
-0.0190277099609375,
-0.00266265869140625,
0.022216796875,
-0.01171875,
-0.0307159423828125,
-0.01070404052734375,
-0.08709716796875,
0.020721435546875,
0.006908416748046875,
0.005096435546875,
-0.0274505615234375,
0.006832122802734375,
-0.006961822509765625,
-0.00049591064453125,
0.03387451171875,
0.0316162109375,
-0.06744384765625,
0.0049591064453125,
0.01971435546875,
0.0308074951171875,
0.05596923828125,
-0.003345489501953125,
-0.027313232421875,
-0.0246734619140625,
0.064208984375,
-0.0170745849609375,
-0.0045928955078125,
0.03863525390625,
0.009124755859375,
-0.016143798828125,
-0.04254150390625,
-0.00470733642578125,
0.01309967041015625,
0.010650634765625,
0.0487060546875,
-0.0205230712890625,
0.0401611328125,
-0.02392578125,
0.004695892333984375,
-0.018157958984375,
0.0093536376953125,
-0.03851318359375,
0.0162811279296875,
-0.036407470703125,
0.0197296142578125,
0.05181884765625,
-0.0027065277099609375,
0.02081298828125,
0.046905517578125,
-0.020355224609375,
0.0360107421875,
0.022308349609375,
-0.0257110595703125,
0.005970001220703125,
-0.06658935546875,
-0.00933074951171875,
0.01556396484375,
-0.022735595703125,
0.0179595947265625,
0.03668212890625,
-0.05047607421875,
0.01003265380859375,
0.022430419921875,
0.0565185546875,
-0.009735107421875,
-0.03594970703125,
0.01288604736328125,
-0.0271148681640625,
-0.0017309188842773438,
0.018310546875,
-0.00397491455078125,
-0.053009033203125,
-0.01403045654296875,
0.005588531494140625,
-0.012298583984375,
0.00664520263671875,
0.023834228515625,
-0.0540771484375,
0.07904052734375,
-0.0180816650390625,
0.033416748046875,
0.02874755859375,
0.0235137939453125,
-0.0233612060546875,
-0.004573822021484375,
-0.0462646484375,
0.0775146484375,
-0.004852294921875,
0.0767822265625,
-0.07586669921875,
-0.0254058837890625,
0.0243682861328125,
0.0673828125,
0.08404541015625,
0.0225677490234375,
-0.04302978515625,
-0.00826263427734375,
0.0265655517578125,
-0.0038471221923828125,
-0.044189453125,
0.0714111328125,
-0.004650115966796875,
-0.048370361328125,
0.0177764892578125,
0.033721923828125,
0.05615234375,
-0.033294677734375,
-0.026123046875,
-0.0145263671875,
0.00438690185546875,
0.004886627197265625,
0.01520538330078125,
0.00838470458984375,
0.01177978515625,
-0.00975799560546875,
-0.0226898193359375,
0.03125,
-0.0024566650390625,
0.0618896484375,
0.067626953125,
-0.0528564453125,
-0.028900146484375,
-0.022369384765625,
0.058868408203125,
0.0217742919921875,
0.0223236083984375,
0.00101470947265625,
0.01468658447265625,
0.01322174072265625,
-0.00984954833984375,
0.007537841796875,
0.023834228515625,
-0.00983428955078125,
0.04132080078125,
0.007099151611328125,
0.04974365234375,
-0.03155517578125,
-0.039154052734375,
0.030609130859375,
0.057098388671875,
-0.016510009765625,
-0.043304443359375,
0.00482940673828125,
0.00339508056640625,
0.0007424354553222656,
0.0013885498046875,
-0.0159149169921875,
-0.0072174072265625,
0.051055908203125,
-0.0209197998046875,
-0.0224609375,
-0.0193328857421875,
0.005657196044921875,
0.001720428466796875,
0.0031070709228515625,
0.04486083984375,
0.0011844635009765625,
-0.0197296142578125,
-0.01456451416015625,
0.006622314453125,
0.020355224609375,
0.0246429443359375,
0.042388916015625,
0.0213470458984375,
-0.0226593017578125,
-0.00562286376953125,
-0.005313873291015625,
0.031982421875,
-0.02001953125,
-0.04437255859375,
-0.031036376953125,
0.0265960693359375,
0.039794921875,
0.0031032562255859375,
-0.003612518310546875,
0.005954742431640625,
-0.00838470458984375,
-0.0278167724609375,
-0.01535797119140625,
-0.022705078125,
-0.03271484375,
-0.01010894775390625,
-0.0074310302734375,
0.02294921875,
0.045745849609375,
-0.0081024169921875,
0.00481414794921875,
0.03253173828125,
0.061279296875,
-0.029815673828125,
0.0187835693359375,
-0.00843048095703125,
-0.053863525390625,
0.029296875,
-0.03265380859375,
0.0921630859375,
-0.0190277099609375,
-0.01629638671875,
0.04815673828125,
-0.0892333984375,
-0.0950927734375,
0.01654052734375,
0.0294189453125,
-0.035858154296875,
0.02435302734375,
-0.011016845703125,
-0.01763916015625,
0.0157318115234375,
-0.011322021484375,
0.0013780593872070312,
0.01230621337890625,
0.0127410888671875,
-0.0239715576171875,
-0.01666259765625,
-0.005157470703125,
0.0247650146484375,
0.0195465087890625,
-0.01397705078125,
0.057342529296875,
-0.01476287841796875,
0.01154327392578125,
-0.0255126953125,
-0.0283050537109375,
-0.02593994140625,
-0.030487060546875,
0.050811767578125,
-0.02734375,
-0.049774169921875,
0.01033782958984375,
-0.0360107421875,
0.0163116455078125,
0.00983428955078125,
-0.01172637939453125,
0.029693603515625,
-0.0135955810546875,
0.01122283935546875,
-0.00830078125,
0.0157623291015625,
-0.026763916015625,
-0.00252532958984375,
-0.03509521484375,
-0.03179931640625,
0.0222015380859375,
0.00036907196044921875,
-0.0008916854858398438,
0.036773681640625,
-0.00787353515625,
-0.015594482421875,
-0.033447265625,
-0.007137298583984375,
-0.0858154296875,
0.00856781005859375,
0.047515869140625,
-0.01088714599609375,
0.036285400390625,
0.0025501251220703125,
0.00414276123046875,
0.037750244140625,
0.004779815673828125,
0.037933349609375,
-0.016021728515625,
0.0433349609375,
0.0234832763671875,
0.05853271484375,
-0.02056884765625,
0.0005245208740234375,
0.033111572265625,
0.00984954833984375,
-0.0260162353515625,
0.01947021484375,
-0.002227783203125,
0.0295562744140625,
-0.03717041015625,
-0.00963592529296875,
0.023956298828125,
-0.05267333984375,
-0.03863525390625,
-0.0002071857452392578,
0.01702880859375,
0.0211334228515625,
-0.0997314453125,
0.06646728515625,
-0.008819580078125,
0.0288543701171875,
-0.030670166015625,
-0.041748046875,
0.037200927734375,
0.061492919921875,
-0.046112060546875,
0.0266265869140625,
0.01323699951171875,
-0.06756591796875,
0.00913238525390625,
0.0258941650390625,
0.04559326171875,
0.01323699951171875,
-0.027587890625,
0.034881591796875,
-0.032012939453125,
0.093994140625,
-0.08416748046875,
-0.018402099609375,
-0.0111846923828125,
-0.003276824951171875,
0.007305145263671875,
-0.0423583984375,
0.01541900634765625,
-0.042510986328125,
-0.0548095703125,
-0.06597900390625,
0.00998687744140625,
-0.0029811859130859375,
-0.0465087890625,
-0.09326171875,
0.049652099609375,
-0.0289764404296875,
-0.0382080078125,
-0.034820556640625,
0.0219268798828125,
-0.00858306884765625,
0.031494140625,
0.0015878677368164062,
-0.033935546875,
0.0008635520935058594,
0.03033447265625,
-0.0183563232421875,
0.000751495361328125,
0.041046142578125,
-0.0869140625,
-0.03790283203125,
-0.04925537109375,
-0.01059722900390625,
-0.01361846923828125,
0.034271240234375,
-0.042694091796875,
0.043487548828125,
0.04840087890625,
-0.027587890625,
-0.07550048828125,
-0.01053619384765625,
-0.026092529296875,
0.005523681640625,
-0.0552978515625,
-0.055511474609375,
-0.07080078125,
0.03411865234375,
0.022247314453125,
0.0242462158203125,
0.0129547119140625,
0.0322265625,
-0.0230712890625,
-0.029693603515625,
-0.0058441162109375,
-0.00257110595703125,
-0.015411376953125,
0.00141143798828125,
-0.0211639404296875,
-0.040496826171875,
0.0288848876953125,
-0.0423583984375,
-0.0428466796875,
0.01263427734375,
-0.045654296875,
-0.0103759765625,
-0.0305328369140625,
0.016693115234375,
-0.01493072509765625,
-0.02667236328125,
-0.060577392578125,
0.0360107421875,
-0.0245513916015625,
-0.051513671875,
0.0276336669921875,
-0.01216888427734375,
-0.0197906494140625,
-0.00359344482421875,
0.0552978515625,
-0.004711151123046875,
0.031402587890625,
-0.05596923828125,
-0.00952911376953125,
0.0209197998046875,
0.026458740234375,
-0.022216796875,
0.02197265625,
0.0237579345703125,
0.05621337890625,
-0.0191497802734375,
0.06793212890625,
-0.040496826171875,
0.00872802734375,
-0.0238494873046875,
0.01412200927734375,
-0.0194549560546875,
0.02056884765625,
0.02215576171875,
0.005275726318359375,
0.006671905517578125,
0.0299224853515625,
0.0088043212890625,
-0.001071929931640625,
-0.002956390380859375,
0.004459381103515625,
0.005489349365234375,
0.0014438629150390625
]
|
2bb6662554e1f752c7ea69857d7f4937a012186b | Wordpress Stackexchange
Q: WP Query post meta value I'm trying to get posts which have applied the meta value trainees.
$args = array(
'posts_per_page' => -1,
'orderby' => 'post_date',
'order' => 'DESC',
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => 'enterprise_on_page',
'value' => array( 'trainees' ),
'compare' => 'IN',
),
),
);
$enterprise_posts = get_posts( $args );
In my meta-field with the key enterprise_on_page I have stored an array() previously like update_post_meta( $post_id, 'enterprise_on_page', array('trainees', 'staff') );.
If I call var_dump(get_post_meta($post->ID)) I get the following output:
'enterprise_on_page' =>
array (size=1)
0 => string 'a:2:{i:0;s:8:"trainees";i:1;s:7:"staff";}'
How can i modify my query so that only posts with meta-value trainees are shown. By now I don't get any posts.
A: Thanks to @Howdy_McGee. He gave me the hint to look after serialized meta queries. With this code I get the desired result.
$args = array(
'posts_per_page' => -1,
'orderby' => 'post_date',
'order' => 'DESC',
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => 'enterprise_on_page',
'value' => serialize(strval('trainees')),
'compare' => 'LIKE',
),
),
);
$enterprise_posts = get_posts( $args );
| Q: WP Query post meta value I'm trying to get posts which have applied the meta value trainees.
$args = array(
'posts_per_page' => -1,
'orderby' => 'post_date',
'order' => 'DESC',
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => 'enterprise_on_page',
'value' => array( 'trainees' ),
'compare' => 'IN',
),
),
);
$enterprise_posts = get_posts( $args );
In my meta-field with the key enterprise_on_page I have stored an array() previously like update_post_meta( $post_id, 'enterprise_on_page', array('trainees', 'staff') );.
If I call var_dump(get_post_meta($post->ID)) I get the following output:
'enterprise_on_page' =>
array (size=1)
0 => string 'a:2:{i:0;s:8:"trainees";i:1;s:7:"staff";}'
How can i modify my query so that only posts with meta-value trainees are shown. By now I don't get any posts.
A: Thanks to @Howdy_McGee. He gave me the hint to look after serialized meta queries. With this code I get the desired result.
$args = array(
'posts_per_page' => -1,
'orderby' => 'post_date',
'order' => 'DESC',
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => 'enterprise_on_page',
'value' => serialize(strval('trainees')),
'compare' => 'LIKE',
),
),
);
$enterprise_posts = get_posts( $args );
A: I don't believe you can accurately compare values for a Serialized Array, which happens whenever you pass an array to update_post_meta, you need to get the entire value during your loop using
get_post_meta( $post->ID, 'enterprise_on_page', 1 )
If you need to specify queries based on these values it's best to save them out separately.
View this question for more information:
meta_query with meta values as serialize arrays
A: As your data is currently structured, you can't use SQL to do that (well, not in a performant way, at least). You have two options:
*
*Fetch ALL posts and loop through them in memory looking for the correct post meta, or
*Store the meta values separately.
Between the two, I advise the latter. WordPress permits you to store multiple rows of the same post meta for a single post, so you can get an array of data without needing to serialize it and store it in one key. To do this, you need to slightly change how you're interacting with the post meta api here. Something like this is what you'd want:
When getting the post meta, you'd do
get_post_meta($ID, 'enterprise_on_page', false);
Updating would be the most different. If you want to merely append a value, do
add_post_meta($ID, 'enterprise_on_page', $value);
To update a value,
update_post_meta($ID, 'enterprise_on_page', $new_value, $old_value);
And to remove a value:
delete_post_meta($ID, 'enterprise_on_page', $value_to_delete);
| wordpress | {
"language": "en",
"length": 400,
"provenance": "stackexchange_00019.jsonl.gz:450611",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168770"
} | [
0.0229034423828125,
0.008087158203125,
0.0011892318725585938,
0.0439453125,
0.01104736328125,
-0.038970947265625,
0.064697265625,
-0.057403564453125,
0.003154754638671875,
0.034149169921875,
-0.01116943359375,
-0.01222991943359375,
-0.03765869140625,
-0.022003173828125,
-0.0260162353515625,
-0.022796630859375,
0.035369873046875,
-0.01221466064453125,
0.0271148681640625,
-0.005252838134765625,
0.0299530029296875,
0.0213775634765625,
0.0147857666015625,
-0.044891357421875,
0.037261962890625,
-0.031768798828125,
0.01398468017578125,
-0.033477783203125,
0.0312042236328125,
-0.00711822509765625,
0.0291748046875,
-0.01641845703125,
0.01329803466796875,
0.01422882080078125,
-0.004970550537109375,
-0.0340576171875,
0.0276336669921875,
-0.0060272216796875,
-0.018035888671875,
0.03656005859375,
0.024322509765625,
-0.0247650146484375,
0.02410888671875,
0.0200042724609375,
0.01739501953125,
-0.0156402587890625,
0.0232696533203125,
-0.0377197265625,
0.04974365234375,
-0.0270843505859375,
-0.0114898681640625,
0.0295562744140625,
-0.0019216537475585938,
0.010467529296875,
-0.0171966552734375,
-0.0036029815673828125,
-0.053558349609375,
-0.0053863525390625,
0.0120391845703125,
0.04730224609375,
0.017730712890625,
-0.031951904296875,
0.0038280487060546875,
-0.0201263427734375,
-0.02593994140625,
0.0158538818359375,
-0.0093231201171875,
-0.002964019775390625,
-0.00923919677734375,
-0.029937744140625,
-0.01006317138671875,
-0.0202484130859375,
0.004932403564453125,
-0.03271484375,
-0.01526641845703125,
-0.054779052734375,
0.0173492431640625,
-0.0731201171875,
-0.0099639892578125,
0.0328369140625,
-0.00769805908203125,
-0.0026340484619140625,
-0.04998779296875,
0.0226593017578125,
-0.0251007080078125,
0.0253753662109375,
-0.021697998046875,
-0.0213623046875,
-0.00927734375,
-0.036712646484375,
-0.01788330078125,
-0.04791259765625,
-0.0193023681640625,
0.033721923828125,
-0.0024566650390625,
-0.0169830322265625,
0.0247955322265625,
0.058319091796875,
-0.043243408203125,
-0.005084991455078125,
-0.0455322265625,
-0.01097869873046875,
-0.0355224609375,
-0.018524169921875,
0.0193023681640625,
0.0157623291015625,
0.01531982421875,
0.0269012451171875,
0.059539794921875,
0.028594970703125,
0.01508331298828125,
0.060546875,
-0.0167083740234375,
-0.01145172119140625,
-0.01554107666015625,
0.0078277587890625,
-0.04864501953125,
0.0151824951171875,
0.00540924072265625,
-0.00750732421875,
0.0275726318359375,
0.0599365234375,
0.0142059326171875,
-0.07275390625,
0.0107574462890625,
-0.00469970703125,
-0.0102386474609375,
-0.055633544921875,
0.0167999267578125,
0.007061004638671875,
-0.036102294921875,
0.0322265625,
0.0699462890625,
0.0016736984252929688,
-0.0177764892578125,
-0.01280975341796875,
-0.00667572021484375,
-0.048309326171875,
-0.03680419921875,
0.0201568603515625,
-0.029327392578125,
-0.0274200439453125,
0.0377197265625,
-0.032257080078125,
-0.0272064208984375,
0.01201629638671875,
0.03399658203125,
-0.00010001659393310547,
-0.011505126953125,
-0.0276641845703125,
-0.060394287109375,
0.0369873046875,
0.036529541015625,
0.00008875131607055664,
-0.037078857421875,
0.0035762786865234375,
0.007598876953125,
-0.0180511474609375,
-0.033935546875,
-0.0300750732421875,
-0.009979248046875,
0.0258026123046875,
0.0496826171875,
-0.03948974609375,
-0.011962890625,
-0.052337646484375,
-0.036834716796875,
0.0016498565673828125,
0.0137939453125,
0.0513916015625,
0.0145416259765625,
0.0006766319274902344,
0.0149993896484375,
0.00363922119140625,
-0.015228271484375,
-0.01517486572265625,
-0.01386260986328125,
0.02447509765625,
0.0308074951171875,
-0.036529541015625,
-0.03631591796875,
-0.0399169921875,
0.0266265869140625,
-0.0042724609375,
-0.036163330078125,
0.045196533203125,
0.010528564453125,
0.0235137939453125,
-0.0234832763671875,
-0.004528045654296875,
0.07476806640625,
0.03448486328125,
-0.078857421875,
0.06268310546875,
0.01367950439453125,
0.007091522216796875,
-0.060699462890625,
0.0016851425170898438,
0.006351470947265625,
-0.045318603515625,
-0.0268707275390625,
0.02825927734375,
-0.0237884521484375,
0.0079803466796875,
-0.044403076171875,
0.016082763671875,
-0.02392578125,
0.04718017578125,
-0.01904296875,
0.036163330078125,
0.0279998779296875,
-0.002613067626953125,
-0.047821044921875,
0.03668212890625,
0.001953125,
-0.0201568603515625,
-0.00640106201171875,
0.0115203857421875,
-0.0010766983032226562,
-0.0095977783203125,
-0.01088714599609375,
-0.024993896484375,
-0.0184326171875,
0.0151519775390625,
0.02001953125,
0.01023101806640625,
0.0012903213500976562,
0.00881195068359375,
0.056060791015625,
0.0172576904296875,
0.034088134765625,
-0.020111083984375,
-0.005390167236328125,
0.006496429443359375,
-0.04052734375,
0.0091552734375,
-0.00501251220703125,
-0.01146697998046875,
-0.0001819133758544922,
0.037139892578125,
0.0218658447265625,
0.05633544921875,
0.00859832763671875,
0.0245513916015625,
0.030853271484375,
-0.0526123046875,
-0.010772705078125,
-0.00051116943359375,
-0.006443023681640625,
0.054107666015625,
0.0261077880859375,
0.0231781005859375,
0.0093841552734375,
0.0164794921875,
0.0072479248046875,
0.018524169921875,
-0.007568359375,
0.007625579833984375,
-0.005924224853515625,
0.007427215576171875,
-0.00782012939453125,
-0.019073486328125,
-0.002010345458984375,
-0.01366424560546875,
0.049163818359375,
0.028656005859375,
0.0299224853515625,
0.026519775390625,
-0.058837890625,
0.0220794677734375,
0.017303466796875,
0.01534271240234375,
0.0207672119140625,
-0.00799560546875,
-0.07928466796875,
0.06463623046875,
-0.04541015625,
0.024383544921875,
0.04718017578125,
0.00196075439453125,
0.0086669921875,
0.04681396484375,
0.0009908676147460938,
-0.00884246826171875,
-0.02484130859375,
-0.0278167724609375,
0.002216339111328125,
0.025360107421875,
-0.019805908203125,
-0.0269622802734375,
0.0106201171875,
0.0292816162109375,
-0.01267242431640625,
0.010894775390625,
0.023223876953125,
-0.014251708984375,
-0.0180511474609375,
-0.0297698974609375,
0.035797119140625,
-0.0142364501953125,
0.0389404296875,
0.0709228515625,
0.005672454833984375,
0.020965576171875,
-0.015869140625,
-0.037322998046875,
-0.04705810546875,
0.0562744140625,
-0.0019893646240234375,
-0.09454345703125,
0.0293731689453125,
0.0190887451171875,
0.046844482421875,
0.07183837890625,
0.036773681640625,
-0.01439666748046875,
0.0245513916015625,
0.05389404296875,
-0.06475830078125,
-0.127197265625,
0.00313568115234375,
-0.031707763671875,
-0.02740478515625,
-0.0379638671875,
-0.024261474609375,
0.01690673828125,
-0.05255126953125,
-0.0041046142578125,
-0.0298309326171875,
0.013458251953125,
-0.060699462890625,
-0.0284881591796875,
-0.0533447265625,
0.0245819091796875,
-0.00537109375,
0.021484375,
0.01242828369140625,
0.04364013671875,
0.03411865234375,
-0.00885009765625,
0.05133056640625,
0.022369384765625,
-0.027587890625,
0.0220184326171875,
-0.01157379150390625,
-0.017425537109375,
0.00905609130859375,
-0.0076141357421875,
0.018951416015625,
0.0038394927978515625,
0.00887298583984375,
0.0060577392578125,
0.0054779052734375,
0.01102447509765625,
0.04876708984375,
-0.0188446044921875,
-0.030914306640625,
0.052978515625,
0.044342041015625,
-0.0018243789672851562,
-0.009429931640625,
-0.034271240234375,
-0.044586181640625,
0.032012939453125,
0.0335693359375,
0.0171661376953125,
-0.005153656005859375,
0.0010967254638671875,
-0.03765869140625,
-0.0085296630859375,
0.0213775634765625,
-0.035888671875,
0.0233306884765625,
-0.013763427734375,
-0.034637451171875,
0.0006771087646484375,
0.01520538330078125,
-0.01001739501953125,
0.039398193359375,
0.007686614990234375,
0.015625,
-0.0251007080078125,
0.025848388671875,
-0.06500244140625,
-0.0869140625,
0.05499267578125,
-0.045989990234375,
0.01812744140625,
-0.090087890625,
-0.03741455078125,
-0.054046630859375,
0.1065673828125,
0.009765625,
-0.04180908203125,
-0.0270843505859375,
-0.0005145072937011719,
-0.0323486328125,
-0.005016326904296875,
0.022735595703125,
0.00572967529296875,
-0.048370361328125,
0.016876220703125,
-0.01212310791015625,
-0.009246826171875,
-0.0249481201171875,
-0.00849151611328125,
-0.0299224853515625,
-0.035858154296875,
0.0252838134765625,
-0.009765625,
-0.0006227493286132812,
0.0021152496337890625,
-0.004352569580078125,
-0.016082763671875,
0.000637054443359375,
-0.01274871826171875,
-0.0697021484375,
-0.00939178466796875,
-0.004123687744140625,
0.037994384765625,
-0.0175018310546875,
0.0099334716796875,
-0.016387939453125,
0.034881591796875,
0.002071380615234375,
-0.007122039794921875,
-0.0003895759582519531,
0.01849365234375,
-0.025177001953125,
0.01276397705078125,
0.01230621337890625,
-0.013458251953125,
-0.0011129379272460938,
0.011383056640625,
0.005062103271484375,
0.0268402099609375,
-0.03363037109375,
-0.021087646484375,
-0.0021305084228515625,
-0.01727294921875,
-0.0384521484375,
-0.0192413330078125,
0.0033664703369140625,
0.035400390625,
-0.027130126953125,
0.0249176025390625,
-0.03692626953125,
-0.0301513671875,
0.0360107421875,
0.07745361328125,
-0.03656005859375,
-0.0024433135986328125,
0.0279388427734375,
0.0204925537109375,
-0.06268310546875,
-0.04986572265625,
0.032470703125,
-0.00022161006927490234,
0.00789642333984375,
0.048370361328125,
0.013092041015625,
0.014495849609375,
-0.0163421630859375,
-0.0129547119140625,
0.0154266357421875,
-0.0207977294921875,
0.059906005859375,
-0.00656890869140625,
-0.0176239013671875,
0.021148681640625,
-0.0303192138671875,
0.0041351318359375,
0.055999755859375,
0.0263824462890625,
-0.05230712890625,
0.006992340087890625,
0.039398193359375,
0.00010675191879272461,
-0.0128631591796875,
-0.017730712890625,
0.01678466796875,
-0.011444091796875,
0.00531005859375,
0.036285400390625,
0.031768798828125,
-0.006744384765625,
-0.0212249755859375,
-0.00009238719940185547,
-0.023406982421875,
-0.0117340087890625,
0.03582763671875,
-0.03759765625,
-0.018280029296875,
0.021240234375,
-0.05902099609375,
-0.0460205078125,
-0.0019989013671875,
0.07000732421875,
-0.0014982223510742188,
-0.06573486328125,
-0.00501251220703125,
-0.0081939697265625,
0.033050537109375,
0.01152801513671875,
0.0155181884765625,
0.04144287109375,
0.0299530029296875,
0.007720947265625,
-0.041015625,
-0.046051025390625,
0.0309295654296875,
-0.033355712890625,
0.006702423095703125,
0.0017995834350585938,
0.00725555419921875,
-0.00829315185546875,
0.10870361328125,
-0.020843505859375,
0.0643310546875,
-0.0228118896484375,
0.0213165283203125,
-0.018890380859375,
0.0223846435546875,
0.0262603759765625,
-0.004848480224609375,
0.0031147003173828125,
0.0034313201904296875,
-0.0154266357421875,
-0.01096343994140625,
0.00396728515625,
-0.0194244384765625,
-0.01434326171875,
0.016265869140625,
0.00702667236328125,
0.0191802978515625,
-0.00013065338134765625,
-0.0430908203125,
0.01010894775390625,
0.0191497802734375,
-0.01480865478515625,
-0.0338134765625,
-0.01702880859375,
0.0054779052734375,
0.0252227783203125,
0.006023406982421875,
-0.002262115478515625,
-0.006572723388671875,
0.03045654296875,
-0.03289794921875,
0.0161285400390625,
-0.014984130859375,
-0.0191497802734375,
0.00022292137145996094,
-0.021087646484375,
-0.0157318115234375,
0.0093841552734375,
-0.0087738037109375,
-0.010650634765625,
-0.01271820068359375,
0.05487060546875,
-0.0197906494140625,
0.0379638671875,
-0.060546875,
0.018829345703125,
-0.0546875,
0.0087890625,
0.048309326171875,
0.0322265625,
-0.00843048095703125,
-0.0087738037109375,
-0.03460693359375,
-0.0230560302734375,
0.039215087890625,
-0.02178955078125,
-0.0007781982421875,
-0.0243988037109375,
0.00008809566497802734,
0.037811279296875,
-0.0113677978515625,
-0.044281005859375,
0.0112762451171875,
-0.018707275390625,
-0.016082763671875,
0.021209716796875,
0.01000213623046875,
0.0552978515625,
-0.05181884765625,
0.03558349609375,
0.01137542724609375,
0.036834716796875,
-0.004001617431640625,
-0.02813720703125,
-0.02227783203125,
-0.057708740234375,
0.0136871337890625,
0.020111083984375,
-0.03363037109375,
0.007579803466796875,
0.0238494873046875,
0.01059722900390625,
0.038238525390625,
0.001800537109375,
0.007808685302734375,
0.01038360595703125,
-0.03143310546875,
0.0200958251953125,
0.014312744140625,
0.07745361328125,
0.00011992454528808594,
-0.018768310546875,
-0.0245513916015625,
-0.028839111328125,
0.00402069091796875,
0.031982421875,
-0.018585205078125,
0.0016498565673828125,
-0.01134490966796875,
0.01031494140625,
0.046722412109375,
0.02069091796875,
0.0191802978515625,
-0.0007348060607910156,
0.004398345947265625,
-0.035400390625,
-0.009429931640625,
0.006946563720703125,
0.007328033447265625,
0.06610107421875,
-0.0036029815673828125,
0.0034999847412109375,
0.057952880859375,
-0.0189666748046875,
-0.0165252685546875,
0.0117340087890625,
0.0233612060546875,
-0.03717041015625,
0.02386474609375,
0.0003902912139892578,
0.01666259765625,
0.0265655517578125,
0.00855255126953125,
-0.006946563720703125,
-0.0003781318664550781,
-0.04669189453125,
-0.0156402587890625,
-0.05096435546875,
-0.0202178955078125,
0.016357421875,
0.005657196044921875,
-0.0274200439453125,
0.0352783203125,
-0.0143890380859375,
-0.0335693359375,
-0.00638580322265625,
0.03314208984375,
-0.0479736328125,
-0.043670654296875,
-0.0005807876586914062,
0.007106781005859375,
-0.0272674560546875,
-0.1292724609375,
-0.0240478515625,
-0.004730224609375,
-0.01172637939453125,
0.0208892822265625,
-0.0013380050659179688,
0.044586181640625,
0.03924560546875,
0.019744873046875,
-0.035614013671875,
0.005016326904296875,
0.026214599609375,
-0.0643310546875,
-0.05731201171875,
0.017913818359375,
0.0238189697265625,
-0.0018663406372070312,
0.041748046875,
0.0263214111328125,
-0.07281494140625,
0.00380706787109375,
-0.02374267578125,
0.049041748046875,
-0.0213470458984375,
-0.016571044921875,
0.028564453125,
-0.003765106201171875,
-0.0283355712890625,
0.031890869140625,
-0.03485107421875,
-0.004436492919921875,
-0.0168914794921875,
-0.007602691650390625,
-0.07537841796875,
-0.00811767578125,
-0.007701873779296875,
-0.0802001953125,
0.051727294921875,
0.0108489990234375,
0.017120361328125,
-0.005435943603515625,
0.026885986328125,
-0.02374267578125,
-0.0114288330078125,
-0.0443115234375,
0.07550048828125,
-0.00565338134765625,
0.057281494140625,
-0.087890625,
-0.0139312744140625,
0.0036296844482421875,
0.045318603515625,
0.0692138671875,
0.0137786865234375,
-0.031707763671875,
-0.0157470703125,
0.01885986328125,
-0.00397491455078125,
-0.031524658203125,
0.058563232421875,
-0.00433349609375,
0.0859375,
0.07147216796875,
-0.0838623046875,
0.033447265625,
-0.0237274169921875,
-0.0191650390625,
0.0266876220703125,
-0.004734039306640625,
-0.0114898681640625,
-0.0186920166015625,
-0.0009860992431640625,
-0.048095703125,
-0.01116943359375,
0.031646728515625,
-0.063232421875,
0.00226593017578125,
0.021575927734375,
0.051544189453125,
-0.09344482421875,
-0.00806427001953125,
-0.03338623046875,
0.048004150390625,
0.0192413330078125,
0.043212890625,
0.01497650146484375,
0.00469207763671875,
0.080322265625,
-0.008270263671875,
0.005649566650390625,
0.024688720703125,
0.009246826171875,
0.044647216796875,
0.016632080078125,
0.0184783935546875,
-0.031951904296875,
0.0208740234375,
0.054656982421875,
0.046112060546875,
-0.043975830078125,
-0.0169830322265625,
0.0010652542114257812,
-0.0086669921875,
-0.01007843017578125,
-0.02752685546875,
-0.0234832763671875,
0.0271148681640625,
0.049346923828125,
-0.02349853515625,
-0.019378662109375,
-0.0286102294921875,
0.00580596923828125,
-0.0244903564453125,
0.01062774658203125,
0.03912353515625,
-0.0169677734375,
-0.0328369140625,
0.0248260498046875,
0.0222320556640625,
0.04107666015625,
0.007450103759765625,
0.03497314453125,
-0.0006489753723144531,
-0.0007343292236328125,
-0.0295867919921875,
0.016204833984375,
-0.01468658447265625,
0.0556640625,
-0.058868408203125,
0.00594329833984375,
-0.027099609375,
0.05224609375,
0.029571533203125,
0.0245513916015625,
0.047088623046875,
0.04986572265625,
-0.032196044921875,
0.0014743804931640625,
0.068115234375,
-0.0240020751953125,
-0.061279296875,
-0.0163421630859375,
-0.0225372314453125,
0.01131439208984375,
0.024749755859375,
0.01523590087890625,
0.07305908203125,
-0.0214996337890625,
-0.01389312744140625,
0.012725830078125,
0.005584716796875,
-0.002643585205078125,
0.040618896484375,
0.01300048828125,
0.0189666748046875,
0.01934814453125,
-0.0053558349609375,
0.012451171875,
-0.0313720703125,
-0.056640625,
0.0162353515625,
0.0264739990234375,
-0.016876220703125,
0.03472900390625,
0.01641845703125,
-0.01479339599609375,
-0.00951385498046875,
0.0259552001953125,
-0.005367279052734375,
0.009857177734375,
0.0160064697265625,
0.005615234375,
-0.02825927734375,
-0.0199127197265625,
0.0413818359375,
0.00943756103515625,
-0.0265350341796875,
0.034210205078125,
0.0081024169921875,
-0.026153564453125,
-0.03167724609375,
0.00399017333984375,
-0.0269317626953125,
-0.004962921142578125,
-0.0109405517578125,
0.0081939697265625,
0.004711151123046875,
0.0019073486328125,
0.0143585205078125,
-0.003936767578125,
0.046142578125,
-0.0288848876953125,
-0.004932403564453125,
-0.01617431640625,
0.019683837890625,
-0.03131103515625,
-0.0194244384765625,
-0.0290679931640625,
-0.01087188720703125,
-0.0277099609375,
-0.00957489013671875,
0.033416748046875,
0.022247314453125,
-0.00199127197265625,
0.0036106109619140625,
0.0225982666015625,
-0.0216827392578125,
0.047332763671875,
0.00360870361328125,
0.07330322265625,
0.03338623046875,
-0.0224609375,
0.0621337890625,
0.0155181884765625,
-0.016815185546875,
0.031707763671875,
0.022064208984375,
-0.05340576171875,
0.031829833984375,
-0.0235137939453125,
-0.0038013458251953125,
0.01514434814453125,
0.034576416015625,
-0.0147705078125,
-0.0006561279296875,
0.0151519775390625,
-0.01245880126953125,
0.003437042236328125,
0.0184783935546875,
-0.038604736328125,
-0.048919677734375,
0.016937255859375,
-0.0037784576416015625,
-0.0207672119140625,
-0.04345703125,
-0.0311279296875,
-0.00765228271484375,
0.0222320556640625,
0.00008577108383178711,
-0.0215606689453125,
0.040863037109375,
-0.03179931640625,
-0.0369873046875,
-0.0031490325927734375,
-0.0018863677978515625,
-0.00002568960189819336,
0.03826904296875,
0.00508880615234375,
0.049285888671875,
-0.01276397705078125,
-0.01424407958984375,
0.045654296875,
-0.0167999267578125,
0.01434326171875,
-0.0050506591796875,
-0.01439666748046875,
-0.023040771484375,
-0.005825042724609375,
0.0017595291137695312,
0.00437164306640625,
-0.032440185546875,
0.0100860595703125,
0.010711669921875,
0.0033817291259765625,
-0.0302886962890625,
0.007251739501953125,
-0.0139007568359375,
0.0162353515625,
0.0025463104248046875,
0.0263671875,
0.061767578125,
-0.0202484130859375,
-0.09967041015625,
0.06658935546875,
-0.0277557373046875,
-0.039031982421875,
-0.01544952392578125,
0.00629425048828125,
0.020599365234375,
-0.020538330078125,
-0.0113525390625,
-0.01995849609375,
-0.040740966796875,
-0.0161285400390625,
0.0131072998046875,
0.0250396728515625,
0.0181884765625,
0.0089874267578125,
-0.07672119140625,
0.006256103515625,
-0.0307769775390625,
0.01552581787109375,
-0.06219482421875,
0.0297698974609375,
-0.0089263916015625,
0.0169677734375,
-0.022125244140625,
-0.0249176025390625,
0.039154052734375,
0.043365478515625,
0.034515380859375,
-0.0013637542724609375,
-0.052581787109375,
-0.0055694580078125,
0.031707763671875,
0.018096923828125,
0.01873779296875,
-0.0277252197265625,
-0.0116119384765625,
-0.0166168212890625,
0.0027980804443359375,
-0.0162506103515625,
0.0169677734375,
-0.06842041015625,
-0.0213775634765625,
0.0058135986328125,
-0.016510009765625,
-0.01666259765625,
-0.00798797607421875,
-0.04156494140625,
-0.0118255615234375,
-0.04443359375,
-0.02490234375,
-0.050628662109375,
-0.038818359375,
-0.0286102294921875,
0.012969970703125,
0.00734710693359375,
-0.004741668701171875,
0.0258331298828125,
-0.007114410400390625,
0.06121826171875,
-0.020904541015625,
-0.01080322265625,
0.0280914306640625,
-0.0004520416259765625,
0.02191162109375,
-0.032073974609375,
0.03753662109375,
-0.0024890899658203125,
-0.007511138916015625,
0.0243072509765625,
0.00832366943359375,
0.0228118896484375,
-0.023773193359375,
0.038665771484375,
0.002635955810546875,
0.0292510986328125,
-0.043365478515625,
-0.003192901611328125,
-0.0172271728515625,
0.0040283203125,
-0.0011987686157226562,
0.0208892822265625,
0.0657958984375,
-0.0271759033203125,
-0.00202178955078125,
-0.0127716064453125,
-0.0692138671875,
-0.031494140625,
0.0010576248168945312,
0.0419921875,
-0.04705810546875,
0.01554107666015625
]
|
030c736203ee461a1555851300950043000e0c73 | Wordpress Stackexchange
Q: Display all meta for a post? I have a custom meta field for my posts and I'm able to display the value. But it only displays one row. Since I have more than one value I need to display all of them. I know I probably have to do some kind of for or while loop, but I don't know how to do it.
This is my current code:
$meta_value = get_post_meta( get_the_ID(), 'meta-text', true );
if( !empty( $meta_value ) ) :
echo $meta_value;
endif;
How do I change that snippet to display all rows?
A: To get all rows, don't specify the key. Try this:
$meta_values = get_post_meta( get_the_ID() );
var_dump( $meta_values ); // so you can see the structure
| Q: Display all meta for a post? I have a custom meta field for my posts and I'm able to display the value. But it only displays one row. Since I have more than one value I need to display all of them. I know I probably have to do some kind of for or while loop, but I don't know how to do it.
This is my current code:
$meta_value = get_post_meta( get_the_ID(), 'meta-text', true );
if( !empty( $meta_value ) ) :
echo $meta_value;
endif;
How do I change that snippet to display all rows?
A: To get all rows, don't specify the key. Try this:
$meta_values = get_post_meta( get_the_ID() );
var_dump( $meta_values ); // so you can see the structure
| wordpress | {
"language": "en",
"length": 122,
"provenance": "stackexchange_00019.jsonl.gz:450624",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168804"
} | [
0.0229949951171875,
-0.0260009765625,
0.041778564453125,
-0.0021686553955078125,
-0.028594970703125,
-0.0091552734375,
0.0323486328125,
-0.03204345703125,
0.0263824462890625,
0.031890869140625,
-0.035430908203125,
-0.0215606689453125,
-0.00974273681640625,
-0.0124664306640625,
-0.032745361328125,
-0.056182861328125,
0.05609130859375,
-0.00487518310546875,
0.055023193359375,
0.0058135986328125,
0.03302001953125,
0.03424072265625,
0.043975830078125,
0.044036865234375,
0.028289794921875,
-0.052215576171875,
0.037261962890625,
-0.037567138671875,
0.017974853515625,
-0.0307769775390625,
0.020477294921875,
0.0390625,
0.01143646240234375,
-0.01396942138671875,
0.03936767578125,
-0.007320404052734375,
0.02166748046875,
-0.0183868408203125,
0.00543212890625,
0.008758544921875,
0.0261688232421875,
-0.0263824462890625,
-0.044586181640625,
0.04290771484375,
-0.01513671875,
-0.0263519287109375,
-0.0008425712585449219,
-0.04852294921875,
0.00946044921875,
-0.00930023193359375,
0.004055023193359375,
0.02630615234375,
0.01267242431640625,
-0.003246307373046875,
-0.0051422119140625,
0.0094146728515625,
-0.0222625732421875,
-0.0253753662109375,
0.04925537109375,
-0.01519775390625,
-0.02001953125,
-0.042877197265625,
0.033935546875,
-0.003955841064453125,
-0.01236724853515625,
-0.01073455810546875,
-0.04217529296875,
0.005298614501953125,
-0.01934814453125,
-0.019378662109375,
0.017791748046875,
-0.02679443359375,
0.0090179443359375,
-0.05078125,
-0.007266998291015625,
-0.0225982666015625,
0.007080078125,
-0.0489501953125,
-0.006954193115234375,
-0.01029205322265625,
0.0220947265625,
-0.0484619140625,
-0.0108642578125,
-0.0016260147094726562,
-0.0051116943359375,
-0.009063720703125,
-0.0076904296875,
0.005352020263671875,
0.0022754669189453125,
-0.0537109375,
-0.002105712890625,
-0.021240234375,
-0.0386962890625,
-0.00003427267074584961,
-0.0035991668701171875,
-0.057464599609375,
0.01363372802734375,
0.060150146484375,
-0.047607421875,
-0.015960693359375,
-0.00989532470703125,
-0.0204620361328125,
0.0008649826049804688,
-0.034698486328125,
-0.0009088516235351562,
-0.0186614990234375,
-0.0024089813232421875,
-0.0243682861328125,
0.0304718017578125,
0.048736572265625,
-0.00557708740234375,
0.007106781005859375,
-0.055938720703125,
-0.0007395744323730469,
-0.0193939208984375,
0.0235137939453125,
-0.06634521484375,
-0.009368896484375,
-0.029510498046875,
0.005115509033203125,
0.038726806640625,
0.041473388671875,
0.0251007080078125,
-0.059814453125,
-0.0019283294677734375,
-0.0019588470458984375,
-0.034942626953125,
-0.056976318359375,
-0.0292205810546875,
0.028167724609375,
-0.0374755859375,
-0.0100860595703125,
0.043975830078125,
0.047698974609375,
0.0173492431640625,
-0.0249176025390625,
-0.00946044921875,
-0.0291900634765625,
0.004505157470703125,
0.04205322265625,
-0.0556640625,
-0.07464599609375,
0.0169219970703125,
-0.01018524169921875,
-0.03936767578125,
0.0205078125,
0.03271484375,
0.0011205673217773438,
-0.04345703125,
-0.0265350341796875,
-0.0733642578125,
0.061492919921875,
0.01062774658203125,
0.0117950439453125,
0.0041351318359375,
-0.0011606216430664062,
0.046661376953125,
-0.026580810546875,
-0.01245880126953125,
-0.023284912109375,
0.00986480712890625,
0.002536773681640625,
0.02789306640625,
-0.002376556396484375,
-0.003345489501953125,
-0.01404571533203125,
-0.0309600830078125,
-0.007793426513671875,
0.026702880859375,
0.016510009765625,
0.0108184814453125,
0.0330810546875,
0.057281494140625,
-0.007648468017578125,
-0.0186614990234375,
-0.007564544677734375,
-0.03997802734375,
-0.0009813308715820312,
0.0309906005859375,
-0.005218505859375,
-0.0213775634765625,
-0.04071044921875,
0.0006594657897949219,
0.0205535888671875,
-0.06719970703125,
0.0509033203125,
-0.0133209228515625,
0.05548095703125,
0.023895263671875,
-0.0007910728454589844,
0.041351318359375,
0.024383544921875,
-0.0313720703125,
0.024169921875,
0.0270538330078125,
0.0187225341796875,
-0.0633544921875,
-0.0026531219482421875,
0.0005483627319335938,
-0.05572509765625,
0.0166168212890625,
-0.01117706298828125,
0.0010709762573242188,
-0.012115478515625,
-0.051971435546875,
0.010284423828125,
-0.0185546875,
0.0330810546875,
-0.044769287109375,
0.0296173095703125,
0.0270538330078125,
-0.022064208984375,
-0.0243377685546875,
-0.0170135498046875,
0.005001068115234375,
-0.0225677490234375,
-0.01270294189453125,
0.0162811279296875,
-0.0263671875,
0.006900787353515625,
-0.0172119140625,
-0.03826904296875,
-0.021484375,
0.052459716796875,
0.050872802734375,
0.006160736083984375,
-0.0230712890625,
-0.0097198486328125,
0.055877685546875,
0.00551605224609375,
-0.0222320556640625,
0.0222015380859375,
0.0164337158203125,
-0.0206756591796875,
-0.05828857421875,
0.010406494140625,
-0.004619598388671875,
-0.0290985107421875,
-0.0120086669921875,
0.050872802734375,
0.0296630859375,
0.0362548828125,
-0.00579071044921875,
0.0099029541015625,
0.05010986328125,
-0.05517578125,
-0.0007467269897460938,
-0.002010345458984375,
0.029693603515625,
0.036102294921875,
-0.033172607421875,
-0.006175994873046875,
0.033721923828125,
-0.0614013671875,
0.01273345947265625,
0.051666259765625,
-0.00870513916015625,
0.041717529296875,
-0.0225982666015625,
0.01082611083984375,
-0.00992584228515625,
0.032623291015625,
0.030181884765625,
-0.0159454345703125,
0.01013946533203125,
0.055511474609375,
0.03338623046875,
0.0230712890625,
-0.056884765625,
0.047271728515625,
0.02349853515625,
0.035858154296875,
0.006381988525390625,
-0.01326751708984375,
-0.05615234375,
-0.01271820068359375,
-0.0168304443359375,
0.021820068359375,
0.0209808349609375,
-0.0213623046875,
0.0115966796875,
0.01088714599609375,
-0.0256195068359375,
-0.007022857666015625,
0.037139892578125,
-0.052490234375,
-0.0198516845703125,
0.017822265625,
0.00679779052734375,
0.01727294921875,
0.0205078125,
0.048675537109375,
0.01532745361328125,
0.01666259765625,
0.00612640380859375,
0.006000518798828125,
-0.005893707275390625,
-0.06622314453125,
0.07269287109375,
-0.05438232421875,
0.034912109375,
0.07879638671875,
-0.0474853515625,
0.057586669921875,
-0.0221710205078125,
-0.007598876953125,
-0.041778564453125,
0.03680419921875,
-0.002368927001953125,
-0.0633544921875,
-0.0174560546875,
0.003627777099609375,
0.042572021484375,
0.057647705078125,
0.0178680419921875,
-0.0238189697265625,
0.004917144775390625,
0.0577392578125,
-0.0692138671875,
-0.0946044921875,
0.0216217041015625,
-0.0257415771484375,
-0.0293426513671875,
-0.055908203125,
-0.0282745361328125,
0.017303466796875,
-0.078125,
0.0002532005310058594,
0.013702392578125,
-0.0155792236328125,
-0.05560302734375,
-0.01428985595703125,
-0.047698974609375,
0.01502227783203125,
0.0011386871337890625,
-0.00452423095703125,
0.0037364959716796875,
0.07391357421875,
0.004405975341796875,
-0.0640869140625,
-0.0242767333984375,
0.01459503173828125,
-0.0310211181640625,
-0.002628326416015625,
0.0243377685546875,
-0.05548095703125,
-0.0060272216796875,
0.01303863525390625,
-0.0206756591796875,
-0.01105499267578125,
0.014190673828125,
-0.02716064453125,
-0.0021991729736328125,
-0.0306549072265625,
0.0303497314453125,
-0.0041961669921875,
-0.0223236083984375,
0.0189361572265625,
0.0494384765625,
-0.0179290771484375,
-0.0166168212890625,
-0.012664794921875,
-0.03668212890625,
0.00955963134765625,
0.019683837890625,
0.009521484375,
-0.03167724609375,
0.0211334228515625,
-0.01352691650390625,
0.00708770751953125,
0.0267333984375,
-0.01308441162109375,
0.0013275146484375,
-0.009429931640625,
-0.00579833984375,
-0.01399993896484375,
-0.030059814453125,
-0.038665771484375,
0.0258331298828125,
-0.0241851806640625,
0.0112762451171875,
-0.012176513671875,
0.0287322998046875,
-0.0009794235229492188,
-0.038726806640625,
0.061553955078125,
0.02764892578125,
0.029937744140625,
-0.036956787109375,
-0.0626220703125,
-0.0220794677734375,
0.1202392578125,
-0.006885528564453125,
-0.009185791015625,
-0.01288604736328125,
-0.0037822723388671875,
-0.03326416015625,
-0.00629425048828125,
-0.0499267578125,
0.012725830078125,
-0.101806640625,
0.019195556640625,
-0.01056671142578125,
-0.0215301513671875,
-0.011932373046875,
-0.01129150390625,
-0.053863525390625,
-0.042327880859375,
0.00986480712890625,
-0.0301361083984375,
-0.0108184814453125,
0.006381988525390625,
-0.007732391357421875,
-0.022216796875,
-0.00011867284774780273,
-0.01364898681640625,
-0.0321044921875,
-0.01462554931640625,
0.00691986083984375,
0.04107666015625,
0.0180206298828125,
-0.02337646484375,
0.0311126708984375,
0.047698974609375,
0.007808685302734375,
0.0447998046875,
-0.0112457275390625,
0.0223846435546875,
-0.0183868408203125,
-0.04583740234375,
0.0024547576904296875,
-0.0474853515625,
-0.0250701904296875,
-0.0570068359375,
0.028656005859375,
-0.005756378173828125,
-0.055084228515625,
0.004978179931640625,
-0.05487060546875,
0.0151519775390625,
0.01496124267578125,
-0.0205535888671875,
-0.03839111328125,
0.007389068603515625,
-0.016448974609375,
-0.01209259033203125,
-0.0186920166015625,
-0.0096435546875,
-0.0002810955047607422,
0.027618408203125,
-0.0254974365234375,
0.02618408203125,
0.06097412109375,
0.0279388427734375,
-0.0243682861328125,
-0.0931396484375,
0.01305389404296875,
0.035400390625,
0.0047454833984375,
0.03424072265625,
0.006099700927734375,
-0.02392578125,
0.061553955078125,
0.0026569366455078125,
0.0297393798828125,
-0.01464080810546875,
0.0670166015625,
-0.0276031494140625,
-0.034423828125,
0.0321044921875,
-0.0198974609375,
-0.0257568359375,
0.0183258056640625,
-0.0021343231201171875,
-0.0202484130859375,
0.0252838134765625,
0.046630859375,
0.0008220672607421875,
-0.01456451416015625,
-0.04022216796875,
-0.035858154296875,
0.0106658935546875,
-0.024688720703125,
0.0300140380859375,
0.024932861328125,
-0.008636474609375,
0.0310211181640625,
0.0241241455078125,
0.02435302734375,
0.0030975341796875,
-0.00013840198516845703,
-0.00861358642578125,
0.01561737060546875,
0.0252685546875,
0.00885772705078125,
-0.013275146484375,
-0.0030536651611328125,
0.03814697265625,
-0.013214111328125,
-0.062408447265625,
-0.0002548694610595703,
-0.0112762451171875,
0.02716064453125,
0.0207061767578125,
0.0200347900390625,
0.02520751953125,
0.052490234375,
-0.0088958740234375,
-0.00928497314453125,
0.0092010498046875,
0.035980224609375,
-0.035247802734375,
0.0051422119140625,
0.011199951171875,
-0.0102081298828125,
-0.032379150390625,
0.098388671875,
-0.0203704833984375,
0.041412353515625,
-0.019683837890625,
0.033905029296875,
0.021881103515625,
0.058624267578125,
0.0165557861328125,
-0.0360107421875,
-0.0223846435546875,
0.029510498046875,
-0.024322509765625,
-0.0283050537109375,
0.01837158203125,
0.03173828125,
0.035980224609375,
0.041229248046875,
-0.034393310546875,
0.004489898681640625,
-0.03350830078125,
-0.025482177734375,
0.0251312255859375,
-0.0274658203125,
-0.056854248046875,
-0.04095458984375,
0.01319122314453125,
0.0200958251953125,
-0.001598358154296875,
0.03875732421875,
0.019195556640625,
0.0202789306640625,
0.047393798828125,
-0.0849609375,
0.05657958984375,
-0.03369140625,
-0.037872314453125,
-0.038238525390625,
0.0027790069580078125,
-0.0012807846069335938,
-0.0531005859375,
-0.0738525390625,
0.02105712890625,
-0.01971435546875,
0.036834716796875,
-0.00984954833984375,
0.0245208740234375,
-0.0138702392578125,
-0.0217437744140625,
-0.023406982421875,
0.01258087158203125,
0.037078857421875,
0.0178680419921875,
-0.06219482421875,
0.02349853515625,
-0.0289154052734375,
0.02301025390625,
0.038238525390625,
-0.0679931640625,
-0.0119476318359375,
-0.051239013671875,
0.02239990234375,
0.0306243896484375,
0.0278167724609375,
-0.01021575927734375,
0.00576019287109375,
-0.0111236572265625,
-0.01177978515625,
0.047027587890625,
-0.0029392242431640625,
0.045562744140625,
0.01268768310546875,
0.031463623046875,
0.010284423828125,
0.0323486328125,
-0.01117706298828125,
-0.0189056396484375,
0.01531982421875,
-0.024078369140625,
-0.031982421875,
0.00884246826171875,
-0.029937744140625,
-0.03558349609375,
-0.002361297607421875,
-0.00341796875,
-0.0032176971435546875,
-0.024993896484375,
0.004734039306640625,
-0.0110931396484375,
0.047882080078125,
0.00974273681640625,
0.01389312744140625,
0.04876708984375,
0.01381683349609375,
-0.0239410400390625,
-0.0009031295776367188,
-0.02545166015625,
0.0202178955078125,
0.042877197265625,
0.0160369873046875,
-0.062164306640625,
-0.0089111328125,
0.04766845703125,
0.057098388671875,
0.00952911376953125,
0.02667236328125,
0.020660400390625,
0.0163116455078125,
-0.000995635986328125,
-0.021697998046875,
0.0261688232421875,
0.0098876953125,
0.044189453125,
-0.01201629638671875,
-0.00437164306640625,
0.039398193359375,
-0.0267333984375,
-0.008331298828125,
0.02154541015625,
0.033172607421875,
-0.040771484375,
0.0247650146484375,
0.034027099609375,
0.0189208984375,
0.00885009765625,
0.006214141845703125,
-0.015228271484375,
-0.001476287841796875,
-0.0011491775512695312,
-0.0036163330078125,
-0.0274200439453125,
0.00913238525390625,
0.024505615234375,
0.0187835693359375,
-0.034820556640625,
-0.0018949508666992188,
-0.0213165283203125,
-0.00876617431640625,
-0.0287628173828125,
0.013275146484375,
-0.01189422607421875,
-0.0111541748046875,
-0.0133056640625,
-0.00504302978515625,
-0.02081298828125,
-0.066650390625,
-0.0147552490234375,
-0.0506591796875,
0.001262664794921875,
0.03436279296875,
0.04010009765625,
0.00014984607696533203,
0.051239013671875,
-0.0112457275390625,
0.043792724609375,
0.004322052001953125,
-0.01220703125,
-0.060272216796875,
-0.049957275390625,
-0.033721923828125,
0.047943115234375,
0.00872802734375,
0.0287933349609375,
0.0298309326171875,
-0.027557373046875,
-0.0164642333984375,
-0.0230712890625,
0.07794189453125,
-0.0178680419921875,
-0.02484130859375,
0.01441192626953125,
0.00629425048828125,
-0.016326904296875,
0.0005903244018554688,
0.0005712509155273438,
-0.00821685791015625,
0.044708251953125,
0.00043392181396484375,
0.0168304443359375,
-0.02099609375,
0.00276947021484375,
-0.08013916015625,
0.07232666015625,
0.00734710693359375,
0.0241546630859375,
-0.02056884765625,
0.020294189453125,
-0.0017900466918945312,
0.00897979736328125,
-0.03826904296875,
0.07550048828125,
0.032470703125,
0.041046142578125,
-0.059661865234375,
-0.026153564453125,
0.013458251953125,
0.057281494140625,
0.034027099609375,
0.00424957275390625,
-0.014801025390625,
-0.0009393692016601562,
0.01324462890625,
0.038970947265625,
-0.00923919677734375,
0.0052032470703125,
-0.00400543212890625,
0.047515869140625,
0.060211181640625,
-0.04449462890625,
0.00394439697265625,
0.027313232421875,
-0.025482177734375,
0.028106689453125,
0.0243988037109375,
0.032867431640625,
0.0038814544677734375,
0.0034942626953125,
-0.0102996826171875,
-0.0038089752197265625,
0.0112457275390625,
-0.0205078125,
0.028076171875,
-0.00928497314453125,
0.0262298583984375,
-0.047882080078125,
0.034912109375,
-0.016357421875,
0.04425048828125,
0.005237579345703125,
0.025726318359375,
0.026397705078125,
0.002933502197265625,
0.06524658203125,
0.00896453857421875,
0.01806640625,
-0.006061553955078125,
0.0268402099609375,
0.044647216796875,
0.032135009765625,
0.00782012939453125,
-0.0225067138671875,
0.01904296875,
0.0300140380859375,
0.042266845703125,
-0.061553955078125,
-0.04083251953125,
0.0141448974609375,
-0.009979248046875,
-0.0125579833984375,
-0.0038604736328125,
-0.031097412109375,
0.01526641845703125,
0.059173583984375,
-0.0240936279296875,
-0.0150299072265625,
-0.0106048583984375,
0.059051513671875,
-0.006526947021484375,
-0.0137786865234375,
-0.038665771484375,
-0.03704833984375,
-0.0712890625,
0.026123046875,
0.0224609375,
0.0634765625,
0.039031982421875,
0.048858642578125,
0.043060302734375,
-0.0270233154296875,
-0.0215301513671875,
0.0623779296875,
0.0188140869140625,
0.01177978515625,
-0.04400634765625,
-0.0253753662109375,
0.0142822265625,
0.0274505615234375,
0.04144287109375,
0.0131378173828125,
0.052276611328125,
0.050201416015625,
-0.0340576171875,
-0.0026988983154296875,
0.0714111328125,
-0.0091552734375,
-0.036773681640625,
-0.062408447265625,
0.0016078948974609375,
0.00859832763671875,
0.01332855224609375,
0.027923583984375,
0.00841522216796875,
0.00868988037109375,
0.026885986328125,
0.00860595703125,
0.01141357421875,
-0.01552581787109375,
0.034881591796875,
-0.0019235610961914062,
0.056732177734375,
0.03961181640625,
-0.07464599609375,
0.0003268718719482422,
-0.051239013671875,
-0.044830322265625,
0.031585693359375,
0.03912353515625,
-0.0210723876953125,
0.032440185546875,
0.00873565673828125,
-0.00225830078125,
0.01202392578125,
0.0003440380096435547,
0.0203857421875,
0.01535797119140625,
0.0022220611572265625,
0.0024166107177734375,
-0.06500244140625,
-0.043670654296875,
-0.0175018310546875,
0.0228424072265625,
0.005992889404296875,
0.020751953125,
0.0097503662109375,
0.0206146240234375,
0.00403594970703125,
-0.00585174560546875,
0.0003609657287597656,
-0.0094757080078125,
0.03424072265625,
0.01403045654296875,
0.0029888153076171875,
-0.025787353515625,
0.007511138916015625,
0.0130767822265625,
0.0477294921875,
-0.040985107421875,
0.00397491455078125,
0.0014562606811523438,
0.00820159912109375,
-0.0413818359375,
-0.0226898193359375,
-0.0245361328125,
-0.0168609619140625,
-0.050750732421875,
-0.0181884765625,
0.040313720703125,
0.049224853515625,
0.00992584228515625,
-0.00139617919921875,
0.040557861328125,
-0.03765869140625,
0.0169525146484375,
-0.008575439453125,
0.041839599609375,
0.04925537109375,
0.02020263671875,
-0.006175994873046875,
0.0075531005859375,
-0.016632080078125,
0.025848388671875,
0.0012311935424804688,
0.00875091552734375,
0.0260009765625,
-0.015777587890625,
0.00873565673828125,
0.0372314453125,
0.042266845703125,
-0.0182647705078125,
0.0221099853515625,
0.0143585205078125,
-0.01316070556640625,
0.01666259765625,
0.0002162456512451172,
-0.026123046875,
-0.0116729736328125,
-0.01537322998046875,
-0.0034923553466796875,
-0.0106353759765625,
-0.06097412109375,
-0.0265960693359375,
0.0017147064208984375,
0.00533294677734375,
-0.0122528076171875,
-0.0003674030303955078,
0.006145477294921875,
-0.026336669921875,
0.00899505615234375,
-0.026824951171875,
-0.0070953369140625,
0.0110626220703125,
0.0863037109375,
0.01514434814453125,
-0.00222015380859375,
-0.00536346435546875,
0.00795745849609375,
0.007740020751953125,
-0.00844573974609375,
-0.0260162353515625,
-0.018280029296875,
0.0117034912109375,
0.01165771484375,
0.034637451171875,
0.04034423828125,
0.08026123046875,
-0.0153961181640625,
-0.02301025390625,
0.03265380859375,
-0.0179443359375,
-0.07861328125,
0.02459716796875,
-0.060333251953125,
-0.0012912750244140625,
-0.0292816162109375,
0.03619384765625,
0.04583740234375,
-0.017120361328125,
-0.0799560546875,
0.052886962890625,
-0.033050537109375,
-0.0255584716796875,
-0.022796630859375,
-0.025054931640625,
0.004482269287109375,
0.032379150390625,
0.00945281982421875,
-0.0291595458984375,
-0.0557861328125,
0.003055572509765625,
0.02642822265625,
-0.0291748046875,
0.03826904296875,
0.03857421875,
-0.054595947265625,
0.0305633544921875,
0.0030345916748046875,
-0.0102996826171875,
-0.005916595458984375,
-0.030426025390625,
0.01361846923828125,
0.0077972412109375,
-0.0543212890625,
-0.06414794921875,
0.0072174072265625,
0.030731201171875,
-0.01134490966796875,
-0.01457977294921875,
-0.033782958984375,
-0.02142333984375,
0.05780029296875,
0.01462554931640625,
0.0132904052734375,
-0.0307159423828125,
0.007740020751953125,
-0.024658203125,
-0.037811279296875,
-0.026214599609375,
0.0102691650390625,
-0.05499267578125,
-0.02044677734375,
0.00229644775390625,
-0.036224365234375,
0.002758026123046875,
0.00641632080078125,
-0.051422119140625,
0.00411224365234375,
-0.00881195068359375,
0.004058837890625,
-0.05224609375,
0.007354736328125,
0.049957275390625,
-0.0322265625,
-0.007656097412109375,
-0.0008287429809570312,
-0.0049285888671875,
0.02056884765625,
-0.005260467529296875,
-0.020294189453125,
-0.045379638671875,
0.0246429443359375,
0.03643798828125,
-0.004638671875,
0.0282135009765625,
-0.0006413459777832031,
-0.0201873779296875,
-0.021728515625,
0.0201263427734375,
0.0011463165283203125,
0.0208740234375,
0.0213775634765625,
-0.007305145263671875,
0.0225372314453125,
0.0275115966796875,
-0.02734375,
0.0670166015625,
-0.023681640625,
0.0340576171875,
-0.02471923828125,
0.0084228515625,
0.00881195068359375,
-0.0200042724609375,
0.003917694091796875,
0.00836944580078125,
0.0007557868957519531,
-0.0185699462890625,
0.0257720947265625,
0.044097900390625,
-0.004024505615234375,
0.02099609375
]
|
8e3a9e7942f8f8a63cbe215660dab496e7362748 | Wordpress Stackexchange
Q: Using wp_add_inline_style without a stylesheet I need to add custom inline styles to the header of a custom theme I'm creating. I've come across the wp_add_inline_style() function, which works but doesn't really suit me as it depends of a specific stylesheet. I'd need to add inline styles at the end of the head tag without a stylesheet dependency.
I've tried to set either the theme stylesheet or a non-existent one. In both cases, it works but it's a bit of a dirty hack IMO (either load the theme stylesheet twice or refer to a ghost file...). Is there a proper way to add inline styles in head without depending of a stylesheet?
Of course, I could add them directly in the header.php file but I'd like to avoid this.
A: You just need to add the styles directly to the page head. The best way to do this is to use the 'wp_head' action hook, assuming you are using a theme that has the hook. Like so:
add_action('wp_head', 'my_custom_styles', 100);
function my_custom_styles()
{
echo "<style>*{color: red}</style>";
}
Check out the WP codex to learn more about action hooks.
| Q: Using wp_add_inline_style without a stylesheet I need to add custom inline styles to the header of a custom theme I'm creating. I've come across the wp_add_inline_style() function, which works but doesn't really suit me as it depends of a specific stylesheet. I'd need to add inline styles at the end of the head tag without a stylesheet dependency.
I've tried to set either the theme stylesheet or a non-existent one. In both cases, it works but it's a bit of a dirty hack IMO (either load the theme stylesheet twice or refer to a ghost file...). Is there a proper way to add inline styles in head without depending of a stylesheet?
Of course, I could add them directly in the header.php file but I'd like to avoid this.
A: You just need to add the styles directly to the page head. The best way to do this is to use the 'wp_head' action hook, assuming you are using a theme that has the hook. Like so:
add_action('wp_head', 'my_custom_styles', 100);
function my_custom_styles()
{
echo "<style>*{color: red}</style>";
}
Check out the WP codex to learn more about action hooks.
A: You could simply use a "dummy" handle:
wp_register_style( 'dummy-handle', false );
wp_enqueue_style( 'dummy-handle' );
wp_add_inline_style( 'dummy-handle', '* { color: red; }' );
A: Your theme most certainly has a default stylesheet (otherwise it wouldn't it even be loaded as a theme).
Just use this very stylesheet as the handler for your inline CSS. An example can be found in the functions.php of the theme TwentyFifteen (code skipped for brevity):
function twentyfifteen_scripts() {
wp_enqueue_style( 'twentyfifteen-style', get_stylesheet_uri() );
}
function twentyfifteen_post_nav_background() {
wp_add_inline_style( 'twentyfifteen-style', $css );
}
| wordpress | {
"language": "en",
"length": 275,
"provenance": "stackexchange_00019.jsonl.gz:450647",
"question_score": "31",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168867"
} | [
0.02862548828125,
0.0146942138671875,
-0.05157470703125,
-0.0657958984375,
0.019744873046875,
-0.039398193359375,
0.0020275115966796875,
0.0175018310546875,
-0.045928955078125,
-0.0003592967987060547,
-0.04461669921875,
0.04119873046875,
-0.05157470703125,
-0.00914764404296875,
0.037353515625,
-0.040985107421875,
0.059814453125,
-0.026519775390625,
0.0394287109375,
0.0195770263671875,
-0.0037212371826171875,
0.04766845703125,
0.0181121826171875,
0.0606689453125,
0.0355224609375,
-0.058990478515625,
0.046051025390625,
-0.033294677734375,
0.05682373046875,
-0.004489898681640625,
0.032958984375,
-0.0201263427734375,
0.0312347412109375,
0.0218658447265625,
-0.038726806640625,
0.007427215576171875,
0.0000902414321899414,
0.007965087890625,
-0.00177001953125,
0.01617431640625,
0.033294677734375,
-0.0173797607421875,
-0.021728515625,
0.03594970703125,
-0.0350341796875,
-0.048004150390625,
0.05267333984375,
-0.00632476806640625,
0.003879547119140625,
-0.0290374755859375,
0.0171661376953125,
0.005519866943359375,
0.04193115234375,
-0.02850341796875,
-0.0186614990234375,
-0.00531768798828125,
-0.0330810546875,
0.0010242462158203125,
0.024749755859375,
-0.01071929931640625,
-0.004177093505859375,
-0.026153564453125,
0.01715087890625,
-0.011993408203125,
0.01139068603515625,
0.02642822265625,
0.0308074951171875,
-0.00021588802337646484,
-0.04052734375,
0.0042572021484375,
0.0171356201171875,
-0.040863037109375,
-0.0122833251953125,
-0.026123046875,
-0.01474761962890625,
-0.00025653839111328125,
-0.01373291015625,
-0.025390625,
0.029205322265625,
0.004669189453125,
-0.0221099853515625,
-0.010711669921875,
-0.03619384765625,
-0.0361328125,
0.0179290771484375,
0.0030002593994140625,
-0.0166473388671875,
-0.0113677978515625,
-0.02447509765625,
-0.050262451171875,
-0.027130126953125,
-0.058807373046875,
-0.0232696533203125,
-0.02880859375,
-0.01111602783203125,
-0.0408935546875,
-0.022186279296875,
0.02294921875,
-0.014312744140625,
0.0460205078125,
0.02301025390625,
-0.056610107421875,
0.10406494140625,
-0.0660400390625,
0.00559234619140625,
0.0024280548095703125,
-0.0216217041015625,
-0.035003662109375,
0.00909423828125,
0.0262908935546875,
-0.0277557373046875,
-0.013763427734375,
0.0197601318359375,
0.0152740478515625,
-0.033294677734375,
-0.013458251953125,
-0.0146636962890625,
0.004547119140625,
-0.023101806640625,
0.00821685791015625,
0.026519775390625,
0.0418701171875,
0.00449371337890625,
-0.038238525390625,
-0.02471923828125,
-0.028961181640625,
-0.01407623291015625,
-0.042510986328125,
0.062744140625,
-0.012847900390625,
-0.006526947021484375,
0.013946533203125,
0.032928466796875,
-0.005222320556640625,
-0.007904052734375,
-0.00717926025390625,
0.02581787109375,
-0.004730224609375,
-0.025115966796875,
0.00843048095703125,
0.00794219970703125,
-0.0394287109375,
-0.0340576171875,
-0.004680633544921875,
0.048095703125,
0.01117706298828125,
0.0125579833984375,
0.0166168212890625,
0.0161285400390625,
-0.04266357421875,
0.0838623046875,
-0.07501220703125,
0.01409149169921875,
0.01548004150390625,
-0.03466796875,
-0.018768310546875,
-0.02203369140625,
-0.00997161865234375,
0.0106353759765625,
-0.0245819091796875,
-0.0380859375,
-0.010345458984375,
0.0268707275390625,
-0.022125244140625,
-0.0176849365234375,
0.0172119140625,
0.00027298927307128906,
0.0119781494140625,
0.0277252197265625,
0.04412841796875,
-0.0014715194702148438,
-0.03271484375,
0.03509521484375,
0.0026378631591796875,
-0.0263824462890625,
0.00962066650390625,
0.022674560546875,
0.025543212890625,
0.009552001953125,
0.01129913330078125,
-0.029815673828125,
-0.041900634765625,
0.0606689453125,
-0.046875,
-0.06414794921875,
0.033905029296875,
0.0022983551025390625,
0.07769775390625,
0.0228424072265625,
0.01482391357421875,
0.0008463859558105469,
-0.02154541015625,
0.01187896728515625,
-0.0362548828125,
0.01548004150390625,
-0.01499176025390625,
0.003376007080078125,
-0.0079345703125,
0.00434112548828125,
0.02508544921875,
-0.027313232421875,
-0.0184783935546875,
0.04144287109375,
-0.007801055908203125,
-0.045135498046875,
0.01605224609375,
-0.038330078125,
0.0450439453125,
-0.019012451171875,
-0.00672149658203125,
0.00531768798828125,
-0.033355712890625,
0.034027099609375,
-0.0831298828125,
-0.0284271240234375,
-0.00714111328125,
0.01007843017578125,
0.04010009765625,
0.0340576171875,
0.01261138916015625,
0.07232666015625,
0.006122589111328125,
0.04931640625,
0.0191192626953125,
0.020233154296875,
-0.02130126953125,
-0.01361083984375,
-0.02239990234375,
-0.0042572021484375,
0.01678466796875,
-0.032440185546875,
0.0308380126953125,
0.03594970703125,
0.08929443359375,
0.0167694091796875,
-0.01181793212890625,
0.0172576904296875,
-0.07623291015625,
0.01177978515625,
0.03936767578125,
0.04180908203125,
0.0016651153564453125,
0.0257415771484375,
0.036773681640625,
0.0177764892578125,
0.01064300537109375,
0.0416259765625,
-0.0279083251953125,
0.011077880859375,
0.0106964111328125,
0.0230712890625,
-0.032958984375,
0.0258026123046875,
-0.05645751953125,
0.035186767578125,
0.0179290771484375,
-0.02117919921875,
-0.0294342041015625,
-0.0068359375,
-0.010345458984375,
0.03240966796875,
0.0043792724609375,
-0.0460205078125,
0.0194549560546875,
0.02020263671875,
-0.0273284912109375,
0.00244903564453125,
-0.0191650390625,
-0.022308349609375,
0.0007557868957519531,
0.032806396484375,
-0.02008056640625,
0.004962921142578125,
0.021942138671875,
0.01187896728515625,
-0.0146026611328125,
-0.004116058349609375,
0.000015676021575927734,
-0.000804901123046875,
-0.0128021240234375,
-0.02496337890625,
0.0299530029296875,
0.04718017578125,
-0.006992340087890625,
0.00335693359375,
-0.040771484375,
0.0299072265625,
-0.042572021484375,
0.0360107421875,
0.028076171875,
0.041229248046875,
0.0211944580078125,
-0.017486572265625,
0.036651611328125,
0.0184326171875,
-0.0220489501953125,
-0.00514984130859375,
-0.007320404052734375,
0.0231170654296875,
-0.0035037994384765625,
0.0182342529296875,
0.05316162109375,
-0.01885986328125,
0.0184326171875,
-0.004344940185546875,
-0.008331298828125,
-0.0236053466796875,
0.0236968994140625,
0.00848388671875,
-0.037200927734375,
0.0030269622802734375,
0.0455322265625,
0.0362548828125,
0.0306854248046875,
0.01800537109375,
-0.0250244140625,
0.00618743896484375,
0.0182342529296875,
-0.052154541015625,
-0.05865478515625,
0.032012939453125,
-0.06402587890625,
-0.014495849609375,
0.004581451416015625,
-0.0438232421875,
-0.012237548828125,
0.036407470703125,
-0.00759124755859375,
-0.01885986328125,
-0.0283203125,
0.003345489501953125,
-0.0469970703125,
-0.06695556640625,
-0.03460693359375,
0.024566650390625,
0.01308441162109375,
0.0026607513427734375,
0.049713134765625,
0.00611114501953125,
-0.03375244140625,
0.00591278076171875,
0.00325775146484375,
-0.010589599609375,
0.00875091552734375,
-0.01006317138671875,
-0.01837158203125,
0.0138092041015625,
-0.01340484619140625,
-0.0248870849609375,
0.0175628662109375,
-0.0018663406372070312,
-0.00801849365234375,
-0.044403076171875,
-0.0207672119140625,
-0.029083251953125,
0.09344482421875,
0.07318115234375,
-0.0382080078125,
0.05084228515625,
-0.046051025390625,
-0.040191650390625,
0.00799560546875,
-0.0309906005859375,
0.0230865478515625,
0.006793975830078125,
-0.01280975341796875,
-0.026397705078125,
0.05682373046875,
0.0022525787353515625,
-0.01186370849609375,
-0.0032558441162109375,
-0.01727294921875,
0.031494140625,
0.0137481689453125,
0.01201629638671875,
0.0008096694946289062,
0.0034389495849609375,
-0.00714111328125,
0.071533203125,
0.024627685546875,
0.0291748046875,
-0.026947021484375,
0.042388916015625,
-0.080810546875,
-0.00885009765625,
-0.0011882781982421875,
-0.033355712890625,
0.050201416015625,
0.00424957275390625,
0.0065155029296875,
0.01129913330078125,
0.060394287109375,
-0.04974365234375,
0.0008754730224609375,
0.0135955810546875,
0.0252685546875,
-0.05474853515625,
-0.059356689453125,
-0.044677734375,
0.00179290771484375,
-0.0994873046875,
0.036376953125,
0.01351165771484375,
-0.0341796875,
-0.0340576171875,
0.010040283203125,
-0.07916259765625,
-0.0255126953125,
0.016204833984375,
0.04071044921875,
-0.038665771484375,
0.05426025390625,
-0.05291748046875,
0.03955078125,
-0.006134033203125,
0.009735107421875,
-0.11468505859375,
-0.01026153564453125,
-0.07879638671875,
0.08331298828125,
0.016326904296875,
0.0110931396484375,
-0.01161956787109375,
0.046295166015625,
-0.0034542083740234375,
0.02655029296875,
0.01442718505859375,
0.04376220703125,
-0.034027099609375,
-0.055267333984375,
-0.004077911376953125,
-0.055511474609375,
-0.00910186767578125,
0.0272216796875,
-0.022918701171875,
0.0863037109375,
0.0017900466918945312,
0.023529052734375,
0.0477294921875,
-0.041168212890625,
-0.03961181640625,
-0.0230255126953125,
0.013580322265625,
0.035675048828125,
0.00516510009765625,
0.0005369186401367188,
-0.0560302734375,
-0.03265380859375,
0.034881591796875,
-0.01485443115234375,
0.0176544189453125,
-0.002880096435546875,
0.053436279296875,
0.023468017578125,
-0.0142669677734375,
0.0413818359375,
0.0171661376953125,
0.04376220703125,
-0.00862884521484375,
-0.0220794677734375,
-0.03753662109375,
-0.0501708984375,
0.03961181640625,
-0.0024013519287109375,
-0.0018768310546875,
-0.021392822265625,
0.06402587890625,
-0.0093841552734375,
-0.01436614990234375,
0.0161285400390625,
-0.0255889892578125,
0.005977630615234375,
0.03643798828125,
0.0273284912109375,
-0.0293121337890625,
0.06243896484375,
0.02239990234375,
-0.00638580322265625,
-0.0313720703125,
-0.028411865234375,
0.0188140869140625,
-0.01312255859375,
-0.00923919677734375,
0.07452392578125,
0.0709228515625,
-0.01377105712890625,
0.006954193115234375,
-0.016357421875,
0.0269622802734375,
0.0162506103515625,
-0.00772857666015625,
-0.0257720947265625,
0.0086822509765625,
0.05450439453125,
-0.0071563720703125,
0.024383544921875,
-0.01158905029296875,
0.07843017578125,
-0.009368896484375,
-0.0333251953125,
-0.0440673828125,
-0.0063934326171875,
0.05010986328125,
0.0237274169921875,
0.00047135353088378906,
0.031494140625,
-0.01541900634765625,
0.013702392578125,
0.0025272369384765625,
-0.02130126953125,
-0.01140594482421875,
-0.0263824462890625,
0.019012451171875,
0.04095458984375,
-0.035888671875,
0.0367431640625,
-0.0007448196411132812,
0.033203125,
-0.00007969141006469727,
-0.00923919677734375,
-0.0015687942504882812,
0.0008826255798339844,
0.0174407958984375,
0.00983428955078125,
-0.0036220550537109375,
0.010955810546875,
-0.0033817291259765625,
0.03131103515625,
-0.0380859375,
0.01558685302734375,
0.0175018310546875,
0.06048583984375,
-0.01058197021484375,
-0.0296630859375,
0.00284576416015625,
-0.044921875,
-0.0218048095703125,
0.009063720703125,
-0.005523681640625,
-0.031646728515625,
-0.0178375244140625,
0.005809783935546875,
0.00038623809814453125,
0.01451873779296875,
-0.0194091796875,
0.017547607421875,
-0.00577545166015625,
0.004520416259765625,
0.02716064453125,
-0.0379638671875,
0.01421356201171875,
0.018829345703125,
-0.0032253265380859375,
-0.01415252685546875,
-0.0126953125,
-0.0290374755859375,
-0.0262298583984375,
0.0008134841918945312,
-0.0122833251953125,
-0.0161590576171875,
-0.029327392578125,
0.0333251953125,
-0.046478271484375,
-0.0195770263671875,
-0.049468994140625,
0.0008502006530761719,
0.061553955078125,
0.05328369140625,
-0.0325927734375,
0.0135345458984375,
-0.037506103515625,
-0.0016689300537109375,
-0.0263214111328125,
-0.06475830078125,
-0.019500732421875,
-0.017669677734375,
0.0139007568359375,
0.0138702392578125,
0.00899505615234375,
-0.00829315185546875,
-0.05230712890625,
0.041015625,
0.044921875,
0.031585693359375,
-0.0263671875,
0.042877197265625,
-0.0006608963012695312,
0.003269195556640625,
0.006114959716796875,
0.0160369873046875,
0.031707763671875,
-0.0007352828979492188,
0.016510009765625,
-0.034332275390625,
-0.0184783935546875,
-0.045440673828125,
0.027587890625,
0.0295257568359375,
0.034332275390625,
-0.01074981689453125,
-0.0030269622802734375,
-0.01291656494140625,
0.002349853515625,
-0.0174102783203125,
-0.007373809814453125,
0.00696563720703125,
-0.01605224609375,
0.001781463623046875,
0.01318359375,
0.006961822509765625,
-0.016571044921875,
-0.00351715087890625,
0.0120849609375,
0.018218994140625,
0.033905029296875,
-0.04656982421875,
-0.056732177734375,
0.059661865234375,
0.04241943359375,
-0.002162933349609375,
0.031829833984375,
-0.00362396240234375,
0.0097808837890625,
0.01311492919921875,
0.0280914306640625,
0.018951416015625,
-0.0157470703125,
0.07733154296875,
0.01250457763671875,
-0.00684356689453125,
0.052642822265625,
-0.0286865234375,
0.0236968994140625,
0.057464599609375,
0.0675048828125,
-0.07232666015625,
0.003650665283203125,
-0.00750732421875,
-0.03460693359375,
0.07568359375,
-0.0160980224609375,
-0.01428985595703125,
-0.006622314453125,
0.035247802734375,
0.026214599609375,
-0.0175323486328125,
0.0216217041015625,
0.01922607421875,
0.0020999908447265625,
-0.01904296875,
-0.031280517578125,
-0.0246734619140625,
-0.03668212890625,
-0.00970458984375,
0.044769287109375,
-0.0450439453125,
0.00600433349609375,
-0.0030193328857421875,
-0.0004444122314453125,
-0.02691650390625,
-0.040679931640625,
0.00023484230041503906,
-0.034515380859375,
-0.0240020751953125,
0.0537109375,
0.012664794921875,
0.0015172958374023438,
0.01495361328125,
-0.0059814453125,
0.03765869140625,
-0.036895751953125,
0.0170135498046875,
-0.03765869140625,
-0.0194244384765625,
0.0205535888671875,
-0.015411376953125,
0.0029430389404296875,
0.0254974365234375,
-0.006076812744140625,
-0.04638671875,
0.005558013916015625,
0.066650390625,
0.059326171875,
-0.0219573974609375,
-0.0283050537109375,
0.034149169921875,
0.0061798095703125,
0.00843048095703125,
-0.01432037353515625,
0.044647216796875,
-0.048095703125,
-0.0311279296875,
-0.00356292724609375,
-0.038177490234375,
-0.020233154296875,
-0.0323486328125,
-0.006633758544921875,
0.07281494140625,
-0.04071044921875,
-0.0019588470458984375,
0.037628173828125,
0.036468505859375,
-0.0030994415283203125,
0.04376220703125,
-0.009857177734375,
0.042510986328125,
0.0005235671997070312,
-0.0228424072265625,
-0.046539306640625,
-0.0005788803100585938,
-0.034698486328125,
0.0303192138671875,
0.0189056396484375,
-0.0025653839111328125,
-0.028778076171875,
0.007503509521484375,
0.06982421875,
0.033294677734375,
0.01611328125,
0.028411865234375,
-0.03192138671875,
-0.0595703125,
-0.0224609375,
0.04150390625,
0.040252685546875,
-0.0175628662109375,
-0.0926513671875,
-0.0186920166015625,
0.0005846023559570312,
-0.007640838623046875,
0.0006356239318847656,
0.00974273681640625,
-0.058685302734375,
-0.0007543563842773438,
0.0258026123046875,
-0.01549530029296875,
-0.018341064453125,
0.036468505859375,
0.00701141357421875,
0.01849365234375,
-0.05322265625,
-0.006168365478515625,
0.0277099609375,
0.0190582275390625,
-0.0204010009765625,
-0.038116455078125,
-0.00495147705078125,
0.00624847412109375,
-0.0361328125,
-0.044677734375,
0.020355224609375,
-0.00203704833984375,
0.04986572265625,
0.017669677734375,
0.038604736328125,
-0.018829345703125,
-0.01342010498046875,
-0.0216217041015625,
0.033050537109375,
-0.016448974609375,
-0.004299163818359375,
0.0005693435668945312,
-0.0197601318359375,
0.01019287109375,
-0.030517578125,
0.0261383056640625,
-0.0200958251953125,
-0.0345458984375,
-0.041351318359375,
0.005466461181640625,
0.0206146240234375,
0.0032176971435546875,
-0.002109527587890625,
0.032806396484375,
-0.018829345703125,
0.01507568359375,
-0.025054931640625,
-0.0007305145263671875,
0.006061553955078125,
0.032989501953125,
0.0087890625,
0.03936767578125,
-0.01052093505859375,
-0.00896453857421875,
-0.06585693359375,
0.041656494140625,
0.036285400390625,
0.0640869140625,
-0.036041259765625,
0.03399658203125,
-0.0028858184814453125,
0.0341796875,
0.00638580322265625,
0.01129150390625,
0.03515625,
0.00629425048828125,
-0.048126220703125,
-0.006122589111328125,
0.0009484291076660156,
-0.03753662109375,
-0.0135498046875,
-0.052581787109375,
0.0204620361328125,
0.034454345703125,
0.00807952880859375,
0.035491943359375,
-0.033966064453125,
0.06549072265625,
-0.027099609375,
0.0099945068359375,
-0.0019083023071289062,
-0.010894775390625,
0.002689361572265625,
-0.00734710693359375,
-0.00319671630859375,
0.007564544677734375,
-0.0253753662109375,
-0.01430511474609375,
0.00618743896484375,
0.020599365234375,
-0.00010669231414794922,
0.0270843505859375,
-0.011199951171875,
0.0335693359375,
-0.004123687744140625,
-0.01495361328125,
0.029266357421875,
-0.0250396728515625,
0.01316070556640625,
0.0309295654296875,
0.0067596435546875,
0.0242156982421875,
-0.042724609375,
-0.0268402099609375,
-0.01081085205078125,
0.048583984375,
0.01514434814453125,
0.0184326171875,
-0.0034580230712890625,
0.028076171875,
0.0142974853515625,
0.01128387451171875,
0.01149749755859375,
-0.00543975830078125,
0.0200653076171875,
-0.0012416839599609375,
0.017913818359375,
-0.018890380859375,
-0.041748046875,
0.0005068778991699219,
0.0146942138671875,
-0.03167724609375,
-0.00830841064453125,
0.003070831298828125,
0.0181427001953125,
0.01030731201171875,
0.0240631103515625,
-0.0283966064453125,
-0.06536865234375,
-0.0733642578125,
0.006290435791015625,
0.0205535888671875,
0.033294677734375,
-0.014404296875,
0.0145111083984375,
0.0027446746826171875,
-0.034454345703125,
0.042999267578125,
-0.020172119140625,
0.053802490234375,
0.0267333984375,
0.0007886886596679688,
-0.0223846435546875,
0.040283203125,
0.00009012222290039062,
0.01222991943359375,
0.019866943359375,
0.031982421875,
0.0145416259765625,
-0.035247802734375,
0.026153564453125,
0.0357666015625,
0.055755615234375,
0.005199432373046875,
0.0192413330078125,
0.036468505859375,
-0.017730712890625,
-0.0034847259521484375,
-0.0029888153076171875,
-0.0340576171875,
-0.04656982421875,
0.015777587890625,
0.04425048828125,
-0.0238037109375,
0.017059326171875,
-0.0792236328125,
0.00238800048828125,
0.031158447265625,
-0.016204833984375,
-0.0069427490234375,
-0.019073486328125,
-0.036956787109375,
0.057525634765625,
-0.00959014892578125,
0.0162200927734375,
0.0009512901306152344,
0.047088623046875,
-0.04052734375,
-0.056793212890625,
-0.035858154296875,
0.047882080078125,
-0.06170654296875,
0.0026836395263671875,
0.037841796875,
0.004077911376953125,
0.047821044921875,
-0.0111846923828125,
-0.00617218017578125,
0.045013427734375,
-0.06732177734375,
-0.0028896331787109375,
0.05474853515625,
-0.0268096923828125,
-0.03228759765625,
-0.062469482421875,
-0.004161834716796875,
-0.047393798828125,
-0.015960693359375,
-0.04931640625,
-0.0153656005859375,
-0.0301055908203125,
-0.0614013671875,
-0.053375244140625,
0.01493072509765625,
-0.0020046234130859375,
-0.03338623046875,
-0.032867431640625,
0.0218048095703125,
0.01546478271484375,
-0.0672607421875,
-0.0173187255859375,
-0.0257720947265625,
-0.001605987548828125,
0.0249176025390625,
0.0234832763671875,
0.006732940673828125,
0.0404052734375,
0.01442718505859375,
-0.0259246826171875,
0.0111083984375,
0.01094818115234375,
-0.0005178451538085938,
-0.01244354248046875,
-0.01849365234375,
0.03045654296875,
0.01397705078125,
-0.0391845703125,
0.0135498046875,
0.0234222412109375,
0.0220794677734375,
-0.012298583984375,
-0.0189666748046875,
-0.0070037841796875,
-0.002056121826171875,
0.057464599609375,
0.0181884765625,
0.0137176513671875,
-0.0147552490234375,
0.033416748046875,
0.044036865234375,
-0.0523681640625,
0.0169525146484375,
0.0078125,
0.0076446533203125,
-0.0006322860717773438,
-0.02862548828125,
-0.0009627342224121094,
-0.029327392578125,
-0.00453948974609375,
-0.030731201171875,
-0.016754150390625,
0.0193023681640625,
0.025482177734375,
-0.052581787109375,
0.005840301513671875,
0.04547119140625,
-0.0268096923828125,
0.0234375,
0.0030364990234375,
0.004154205322265625,
0.031402587890625,
0.0238800048828125,
0.004489898681640625,
0.0303955078125,
-0.048309326171875,
0.0099945068359375,
-0.0159149169921875,
0.06414794921875,
-0.05804443359375,
-0.0090179443359375,
0.005435943603515625,
0.002414703369140625,
-0.0294036865234375,
-0.014862060546875,
0.0251007080078125,
0.0309906005859375,
-0.02471923828125,
0.0765380859375,
-0.008331298828125,
0.00274658203125,
-0.0096435546875,
0.002529144287109375,
-0.021392822265625,
0.019683837890625,
-0.0119171142578125,
-0.005035400390625,
-0.00582122802734375,
-0.0010833740234375,
0.001514434814453125,
-0.066162109375,
0.04876708984375,
-0.0018167495727539062,
0.0167694091796875,
0.035430908203125
]
|
deb296f7f251ca52642c8b3ab83b7154ce4c7b0f | Wordpress Stackexchange
Q: WP_Query by a category id and a custom post_type I need to query all posts that belong to a given category (default, not custom) and a custom post type. As simple as that. The fact that it doesn't work, to me, is ridiculous. Unless I'm missing something?
Here's what I've tried:
$args=array(
'posts_per_page' => 50,
//'taxonomy' => 'category',
'post_type' => 'my_custom_type'
'category__in' => array($cat_id),
);
$wp_query = new WP_Query( $args );
then
$args=array(
'posts_per_page' => 50,
'post_type' => 'my_custom_type'
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'id',
'terms' => $cat_id,
),
),
);
$wp_query = new WP_Query( $args );
and of course
$args=array(
'posts_per_page' => 50,
'post_type' => 'my_custom_type'
'category' => $cat_id,
);
$wp_query = new WP_Query( $args );
also, some combinations of adding/renaming/removing the $args keys.
Getting all posts by a post type and then looping through them and filtering by a category is not an effective option, I believe.
Please help.
A: this worked for me.
$args=array(
'posts_per_page' => 50,
'post_type' => 'my_custom_type'
'tax_query' => array(
array(
'taxonomy' => 'category', //double check your taxonomy name in you dd
'field' => 'id',
'terms' => $cat_id,
),
),
);
$wp_query = new WP_Query( $args );
| Q: WP_Query by a category id and a custom post_type I need to query all posts that belong to a given category (default, not custom) and a custom post type. As simple as that. The fact that it doesn't work, to me, is ridiculous. Unless I'm missing something?
Here's what I've tried:
$args=array(
'posts_per_page' => 50,
//'taxonomy' => 'category',
'post_type' => 'my_custom_type'
'category__in' => array($cat_id),
);
$wp_query = new WP_Query( $args );
then
$args=array(
'posts_per_page' => 50,
'post_type' => 'my_custom_type'
'tax_query' => array(
array(
'taxonomy' => 'category',
'field' => 'id',
'terms' => $cat_id,
),
),
);
$wp_query = new WP_Query( $args );
and of course
$args=array(
'posts_per_page' => 50,
'post_type' => 'my_custom_type'
'category' => $cat_id,
);
$wp_query = new WP_Query( $args );
also, some combinations of adding/renaming/removing the $args keys.
Getting all posts by a post type and then looping through them and filtering by a category is not an effective option, I believe.
Please help.
A: this worked for me.
$args=array(
'posts_per_page' => 50,
'post_type' => 'my_custom_type'
'tax_query' => array(
array(
'taxonomy' => 'category', //double check your taxonomy name in you dd
'field' => 'id',
'terms' => $cat_id,
),
),
);
$wp_query = new WP_Query( $args );
A: try this, it's work for me.
$args=array(
'posts_per_page' => 50,
'post_type' => 'my_custom_type'
'cat' => $cat_id,
);
$wp_query = new WP_Query( $args );
Category Parameters
cat (int): use category id.
category_name (string): use category slug (NOT name).
category__and (array): use category id.
category__in (array): use category id.
category__not_in (array): use category id.
| wordpress | {
"language": "en",
"length": 251,
"provenance": "stackexchange_00019.jsonl.gz:450667",
"question_score": "11",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168943"
} | [
0.04632568359375,
-0.00568389892578125,
0.0055999755859375,
-0.020294189453125,
0.024688720703125,
-0.03692626953125,
0.053253173828125,
0.004451751708984375,
-0.0499267578125,
0.00605010986328125,
-0.026580810546875,
-0.0250396728515625,
-0.0335693359375,
-0.03582763671875,
0.01116180419921875,
-0.07763671875,
0.007457733154296875,
-0.00408172607421875,
-0.0004968643188476562,
-0.037841796875,
0.038116455078125,
-0.047027587890625,
0.023193359375,
0.049591064453125,
0.01727294921875,
-0.0042266845703125,
0.03656005859375,
-0.028228759765625,
0.0103607177734375,
-0.01035308837890625,
0.01349639892578125,
-0.0165252685546875,
-0.0035400390625,
0.0202484130859375,
0.024505615234375,
0.0301513671875,
0.01410675048828125,
0.01505279541015625,
0.06414794921875,
-0.01007843017578125,
0.01457977294921875,
-0.006198883056640625,
0.00957489013671875,
0.032257080078125,
-0.02593994140625,
-0.048858642578125,
0.0343017578125,
-0.01195526123046875,
0.0223236083984375,
-0.0247802734375,
-0.01216888427734375,
0.01055908203125,
0.013458251953125,
-0.042236328125,
-0.026885986328125,
-0.01195526123046875,
0.032073974609375,
-0.051849365234375,
0.063720703125,
-0.04901123046875,
-0.06787109375,
-0.0655517578125,
0.059844970703125,
-0.0260162353515625,
-0.015594482421875,
0.0177459716796875,
0.039794921875,
-0.006885528564453125,
-0.026611328125,
-0.0396728515625,
0.0173492431640625,
-0.0160369873046875,
-0.00836181640625,
0.01259613037109375,
-0.0185089111328125,
-0.06488037109375,
0.038360595703125,
-0.03692626953125,
-0.005245208740234375,
0.052886962890625,
-0.0179901123046875,
-0.01206207275390625,
-0.049530029296875,
0.044769287109375,
-0.055206298828125,
0.021942138671875,
-0.03131103515625,
-0.00811004638671875,
-0.02130126953125,
-0.017913818359375,
-0.00762939453125,
-0.030181884765625,
-0.04290771484375,
-0.0079498291015625,
0.0233917236328125,
-0.0589599609375,
-0.006519317626953125,
0.02490234375,
-0.005321502685546875,
0.036773681640625,
-0.03594970703125,
-0.0247802734375,
0.035003662109375,
-0.042816162109375,
0.0443115234375,
0.049774169921875,
-0.034759521484375,
0.027008056640625,
0.082763671875,
0.0323486328125,
0.039581298828125,
0.042572021484375,
-0.0287322998046875,
0.0018815994262695312,
-0.04132080078125,
0.030670166015625,
-0.031646728515625,
-0.027923583984375,
-0.030731201171875,
0.00641632080078125,
0.020416259765625,
0.040863037109375,
0.0254058837890625,
-0.041351318359375,
0.0019426345825195312,
-0.007114410400390625,
-0.0102081298828125,
-0.06573486328125,
0.013702392578125,
0.0276947021484375,
-0.043426513671875,
-0.0107879638671875,
0.057403564453125,
0.0286407470703125,
0.019500732421875,
-0.0276641845703125,
0.03759765625,
-0.039093017578125,
0.01116943359375,
0.0021839141845703125,
0.037689208984375,
-0.01287841796875,
0.0016689300537109375,
0.0238800048828125,
0.00283050537109375,
-0.0009264945983886719,
0.0089569091796875,
0.019012451171875,
0.00888824462890625,
-0.00015246868133544922,
0.004955291748046875,
-0.029327392578125,
0.055999755859375,
-0.00580596923828125,
-0.069091796875,
-0.0026035308837890625,
0.0159912109375,
-0.0162353515625,
-0.0633544921875,
-0.06207275390625,
0.015777587890625,
0.0083465576171875,
0.00524139404296875,
-0.036956787109375,
-0.038330078125,
0.00014913082122802734,
-0.043792724609375,
-0.007381439208984375,
0.0133056640625,
-0.0029735565185546875,
0.0027294158935546875,
-0.0166778564453125,
0.046966552734375,
0.003604888916015625,
-0.0096282958984375,
0.0177459716796875,
-0.01125335693359375,
-0.00035858154296875,
0.037567138671875,
0.00827789306640625,
-0.022674560546875,
-0.0308074951171875,
0.02825927734375,
0.0025482177734375,
-0.056121826171875,
0.00955963134765625,
0.037200927734375,
0.05194091796875,
-0.025115966796875,
0.0266571044921875,
0.08135986328125,
0.022003173828125,
-0.05133056640625,
0.025146484375,
0.01398468017578125,
-0.01934814453125,
-0.030364990234375,
-0.0261688232421875,
-0.0031280517578125,
0.01605224609375,
0.01678466796875,
0.0007257461547851562,
0.0049896240234375,
-0.0063934326171875,
-0.05596923828125,
0.00438690185546875,
-0.007106781005859375,
0.039794921875,
-0.0036106109619140625,
0.0261383056640625,
0.0264434814453125,
0.0102996826171875,
-0.03656005859375,
-0.007808685302734375,
-0.00991058349609375,
0.0009822845458984375,
-0.00562286376953125,
0.00981903076171875,
-0.0208740234375,
-0.01241302490234375,
-0.033416748046875,
-0.03704833984375,
-0.0294647216796875,
0.050323486328125,
0.047088623046875,
-0.007293701171875,
-0.00023818016052246094,
-0.0166778564453125,
0.031890869140625,
0.0306396484375,
-0.060211181640625,
-0.003662109375,
0.038665771484375,
0.027923583984375,
-0.033355712890625,
0.01074981689453125,
0.026336669921875,
-0.0279693603515625,
0.0037708282470703125,
0.044891357421875,
0.0298919677734375,
-0.00920867919921875,
-0.007160186767578125,
-0.004669189453125,
0.057403564453125,
-0.029327392578125,
0.0093536376953125,
-0.0075836181640625,
0.0312347412109375,
0.0565185546875,
0.001522064208984375,
-0.0157623291015625,
0.0300140380859375,
0.0137176513671875,
0.0181732177734375,
0.0236053466796875,
-0.0104217529296875,
0.005489349365234375,
-0.028961181640625,
-0.003849029541015625,
0.0010623931884765625,
-0.06976318359375,
-0.044464111328125,
-0.0092315673828125,
0.049407958984375,
0.0208587646484375,
0.05059814453125,
0.025665283203125,
-0.04254150390625,
0.0202484130859375,
0.00656890869140625,
-0.006504058837890625,
-0.0011386871337890625,
-0.016082763671875,
0.006443023681640625,
0.0198516845703125,
-0.03472900390625,
0.02374267578125,
0.0215301513671875,
-0.007781982421875,
0.002567291259765625,
0.0489501953125,
-0.001129150390625,
-0.009368896484375,
-0.0284576416015625,
-0.04150390625,
0.002460479736328125,
0.022491455078125,
-0.00997161865234375,
-0.0195465087890625,
0.00913238525390625,
0.0286102294921875,
-0.01529693603515625,
0.0211944580078125,
-0.00823974609375,
-0.0186614990234375,
0.0182342529296875,
-0.06036376953125,
0.044403076171875,
-0.05517578125,
0.052581787109375,
0.06378173828125,
-0.017913818359375,
0.01274871826171875,
0.006488800048828125,
-0.0184173583984375,
-0.001934051513671875,
0.03558349609375,
-0.00853729248046875,
-0.017181396484375,
-0.042144775390625,
0.027252197265625,
0.01568603515625,
0.058074951171875,
-0.00439453125,
-0.0316162109375,
0.005794525146484375,
0.0173187255859375,
-0.06414794921875,
-0.0838623046875,
0.046630859375,
-0.0252532958984375,
-0.038055419921875,
-0.026275634765625,
-0.018524169921875,
0.0084228515625,
-0.042633056640625,
-0.0227508544921875,
0.018402099609375,
-0.03485107421875,
-0.07421875,
-0.062103271484375,
-0.07208251953125,
-0.006450653076171875,
0.0006022453308105469,
0.014068603515625,
0.0210113525390625,
0.07391357421875,
0.02764892578125,
-0.043975830078125,
0.03619384765625,
0.044891357421875,
-0.0318603515625,
0.00568389892578125,
0.013336181640625,
-0.0128631591796875,
0.037445068359375,
-0.012939453125,
0.039642333984375,
0.058197021484375,
-0.042877197265625,
0.0016241073608398438,
0.00933074951171875,
0.01214599609375,
0.0192413330078125,
0.0146942138671875,
-0.01029205322265625,
0.035888671875,
0.020721435546875,
-0.020751953125,
0.003566741943359375,
-0.00567626953125,
-0.0193939208984375,
0.0306854248046875,
-0.0006537437438964844,
-0.00962066650390625,
0.00003743171691894531,
0.01708984375,
-0.01025390625,
0.004779815673828125,
-0.0198516845703125,
-0.03875732421875,
0.03753662109375,
0.01904296875,
0.0281982421875,
0.0128326416015625,
-0.012237548828125,
-0.041229248046875,
-0.006565093994140625,
-0.0106353759765625,
-0.02392578125,
-0.00772857666015625,
-0.0181884765625,
-0.014068603515625,
-0.0797119140625,
0.0556640625,
-0.0137786865234375,
-0.006977081298828125,
-0.036468505859375,
-0.039520263671875,
-0.0127716064453125,
0.09271240234375,
-0.0008697509765625,
-0.0233917236328125,
-0.020843505859375,
0.003513336181640625,
-0.0021152496337890625,
-0.01392364501953125,
-0.0031490325927734375,
-0.00946807861328125,
-0.057098388671875,
-0.015533447265625,
-0.0167236328125,
-0.0292205810546875,
-0.005329132080078125,
-0.01297760009765625,
-0.046417236328125,
-0.031158447265625,
0.05352783203125,
-0.0535888671875,
0.04150390625,
-0.00449371337890625,
0.0235137939453125,
-0.02484130859375,
-0.040863037109375,
-0.0102691650390625,
-0.06683349609375,
-0.005954742431640625,
-0.007411956787109375,
0.0300750732421875,
-0.0122222900390625,
0.004718780517578125,
-0.02435302734375,
0.033538818359375,
0.0269317626953125,
0.0238037109375,
-0.0106353759765625,
-0.01508331298828125,
-0.03033447265625,
-0.006793975830078125,
-0.0097503662109375,
-0.01995849609375,
-0.018402099609375,
-0.0212249755859375,
-0.0029754638671875,
0.0249481201171875,
-0.02899169921875,
-0.01342010498046875,
-0.0229644775390625,
-0.013214111328125,
-0.052001953125,
0.00016045570373535156,
-0.042755126953125,
-0.0110626220703125,
-0.034759521484375,
-0.017608642578125,
-0.0016641616821289062,
-0.06158447265625,
0.06280517578125,
0.0010595321655273438,
0.00038909912109375,
-0.003482818603515625,
0.1180419921875,
0.00855255126953125,
-0.0213165283203125,
-0.058563232421875,
-0.0016069412231445312,
0.01377105712890625,
-0.0263214111328125,
0.0748291015625,
0.0196075439453125,
0.01111602783203125,
0.051116943359375,
-0.0287322998046875,
-0.0158233642578125,
-0.0179901123046875,
0.0560302734375,
-0.0006895065307617188,
-0.004150390625,
0.0108642578125,
-0.034912109375,
0.031829833984375,
0.030029296875,
-0.01000213623046875,
-0.0241241455078125,
0.0157623291015625,
0.059234619140625,
-0.01367950439453125,
-0.005573272705078125,
-0.046478271484375,
-0.0200653076171875,
0.02978515625,
0.01255035400390625,
0.005680084228515625,
0.0169677734375,
-0.009246826171875,
0.0027141571044921875,
-0.0127716064453125,
0.01285552978515625,
0.0153961181640625,
0.07928466796875,
-0.01161956787109375,
0.0297698974609375,
0.037322998046875,
-0.006244659423828125,
-0.048797607421875,
-0.0032787322998046875,
-0.01160430908203125,
-0.01139068603515625,
-0.04522705078125,
0.01020050048828125,
-0.005237579345703125,
-0.006343841552734375,
0.005420684814453125,
0.0010976791381835938,
0.04925537109375,
0.0394287109375,
0.0032138824462890625,
-0.02032470703125,
-0.03497314453125,
0.013092041015625,
-0.041534423828125,
-0.0107574462890625,
0.0013370513916015625,
-0.01274871826171875,
0.01611328125,
0.033203125,
-0.0165863037109375,
0.032318115234375,
-0.0177764892578125,
-0.0007996559143066406,
0.019012451171875,
0.025970458984375,
0.033203125,
-0.027191162109375,
-0.00609588623046875,
-0.007598876953125,
0.01318359375,
-0.04498291015625,
-0.0126495361328125,
-0.00867462158203125,
0.0528564453125,
-0.0037021636962890625,
-0.011993408203125,
0.02618408203125,
-0.01458740234375,
-0.0293121337890625,
0.00310516357421875,
0.007221221923828125,
-0.00555419921875,
-0.033843994140625,
-0.025177001953125,
0.00989532470703125,
0.0222015380859375,
-0.0318603515625,
0.0203094482421875,
-0.05712890625,
0.032318115234375,
-0.043426513671875,
0.0272216796875,
0.00789642333984375,
0.003826141357421875,
-0.029510498046875,
-0.0418701171875,
-0.01056671142578125,
-0.002765655517578125,
0.0034694671630859375,
-0.0039825439453125,
-0.0219879150390625,
0.002796173095703125,
-0.00547027587890625,
0.0726318359375,
-0.0248565673828125,
-0.0394287109375,
0.031463623046875,
-0.0009927749633789062,
0.058197021484375,
0.03173828125,
-0.0232391357421875,
-0.0030612945556640625,
-0.042816162109375,
-0.01605224609375,
0.0110931396484375,
-0.020904541015625,
-0.019500732421875,
-0.01605224609375,
0.0172576904296875,
0.0206298828125,
-0.0072784423828125,
-0.02197265625,
-0.0462646484375,
-0.0167694091796875,
0.01001739501953125,
-0.00726318359375,
-0.01080322265625,
0.0173187255859375,
0.0032520294189453125,
0.01404571533203125,
-0.018890380859375,
-0.0286865234375,
-0.02020263671875,
0.005756378173828125,
-0.0078277587890625,
-0.097412109375,
-0.019134521484375,
-0.006134033203125,
-0.04833984375,
0.056182861328125,
0.03240966796875,
0.00792694091796875,
0.02734375,
-0.0203704833984375,
-0.0143585205078125,
-0.021575927734375,
-0.006145477294921875,
-0.020904541015625,
0.041412353515625,
0.025634765625,
0.0012350082397460938,
-0.0102386474609375,
-0.0196380615234375,
0.0004658699035644531,
-0.0025119781494140625,
-0.0016145706176757812,
-0.006107330322265625,
-0.0108184814453125,
-0.0231475830078125,
0.022308349609375,
0.051513671875,
0.01049041748046875,
0.0311431884765625,
0.01515960693359375,
0.00672149658203125,
0.00969696044921875,
-0.0017223358154296875,
0.035614013671875,
0.015411376953125,
0.05572509765625,
-0.00858306884765625,
-0.01178741455078125,
0.02716064453125,
-0.033416748046875,
-0.035400390625,
0.03509521484375,
0.0341796875,
-0.064208984375,
-0.003917694091796875,
0.029876708984375,
0.007549285888671875,
-0.0231781005859375,
0.0129241943359375,
-0.01690673828125,
0.00490570068359375,
-0.01296234130859375,
-0.0137481689453125,
-0.045074462890625,
-0.0131378173828125,
0.01904296875,
0.0076904296875,
-0.0168914794921875,
0.058624267578125,
0.01351165771484375,
-0.02764892578125,
0.01390838623046875,
0.0191650390625,
-0.00023043155670166016,
-0.021026611328125,
0.01561737060546875,
-0.0177154541015625,
0.0011949539184570312,
-0.0887451171875,
0.007625579833984375,
-0.016204833984375,
-0.0167236328125,
0.03118896484375,
-0.0200653076171875,
0.0220184326171875,
0.050018310546875,
-0.00623321533203125,
0.0122528076171875,
0.0133514404296875,
-0.021697998046875,
-0.047271728515625,
-0.022003173828125,
-0.0117645263671875,
0.046844482421875,
-0.036163330078125,
0.0306396484375,
-0.03515625,
0.007694244384765625,
-0.010772705078125,
-0.0199127197265625,
0.031280517578125,
-0.054595947265625,
0.01537322998046875,
0.032928466796875,
0.053619384765625,
0.007160186767578125,
0.000995635986328125,
-0.006916046142578125,
-0.035980224609375,
-0.02166748046875,
-0.007678985595703125,
-0.0207672119140625,
-0.023529052734375,
-0.0207061767578125,
-0.041473388671875,
0.08343505859375,
0.01427459716796875,
0.0091705322265625,
0.01103973388671875,
0.032806396484375,
-0.0304107666015625,
0.01116943359375,
-0.035186767578125,
0.046417236328125,
0.0296478271484375,
0.011444091796875,
-0.04278564453125,
-0.0210113525390625,
-0.009979248046875,
0.04022216796875,
0.060577392578125,
0.00440216064453125,
-0.049163818359375,
0.005401611328125,
0.061767578125,
0.048431396484375,
0.0095672607421875,
0.0233306884765625,
0.0157623291015625,
0.05596923828125,
0.07275390625,
-0.0159454345703125,
0.052764892578125,
0.00440216064453125,
-0.01476287841796875,
0.02392578125,
0.0167999267578125,
0.036102294921875,
-0.00948333740234375,
-0.0003407001495361328,
-0.036651611328125,
0.002582550048828125,
0.028076171875,
-0.0031833648681640625,
0.00705718994140625,
0.036651611328125,
0.04925537109375,
-0.086181640625,
-0.04620361328125,
-0.0302276611328125,
0.04827880859375,
-0.00010943412780761719,
0.01122283935546875,
0.0261077880859375,
0.013580322265625,
0.07965087890625,
-0.034698486328125,
-0.0003361701965332031,
0.01488494873046875,
-0.007442474365234375,
0.070068359375,
0.0299530029296875,
0.0233306884765625,
-0.03839111328125,
0.0029468536376953125,
0.038787841796875,
0.0728759765625,
-0.053802490234375,
-0.10015869140625,
0.01273345947265625,
0.025848388671875,
0.01312255859375,
0.05792236328125,
0.03265380859375,
0.024200439453125,
0.094482421875,
-0.063232421875,
0.02001953125,
0.008544921875,
0.027862548828125,
-0.032928466796875,
-0.0474853515625,
-0.0316162109375,
0.005863189697265625,
-0.06561279296875,
0.026031494140625,
0.035614013671875,
0.0740966796875,
0.035125732421875,
0.050506591796875,
-0.0166778564453125,
-0.04180908203125,
-0.005191802978515625,
-0.0038318634033203125,
-0.003978729248046875,
0.01502227783203125,
-0.0113677978515625,
-0.01493072509765625,
-0.014556884765625,
0.032989501953125,
0.036407470703125,
0.02105712890625,
0.0195465087890625,
0.0103759765625,
0.0330810546875,
0.00937652587890625,
0.0204010009765625,
-0.00799560546875,
-0.0201568603515625,
-0.02227783203125,
0.00485992431640625,
0.038909912109375,
0.003757476806640625,
0.0162811279296875,
0.0272216796875,
0.02392578125,
0.0224609375,
0.0276031494140625,
0.00679779052734375,
-0.039306640625,
0.005710601806640625,
0.007232666015625,
0.08184814453125,
0.0394287109375,
-0.0758056640625,
-0.0288238525390625,
-0.042449951171875,
-0.04058837890625,
0.0672607421875,
0.057281494140625,
0.0136260986328125,
-0.0216827392578125,
-0.0018014907836914062,
-0.037445068359375,
0.0051422119140625,
0.0146636962890625,
0.01013946533203125,
-0.026702880859375,
-0.00920867919921875,
-0.0189361572265625,
-0.0291900634765625,
-0.01055908203125,
0.0181884765625,
0.0008292198181152344,
0.008514404296875,
0.01157379150390625,
0.0187225341796875,
0.00673675537109375,
-0.0283355712890625,
0.0227813720703125,
-0.0302581787109375,
-0.028289794921875,
0.05230712890625,
0.01177978515625,
-0.00717926025390625,
-0.01255035400390625,
0.03497314453125,
-0.0112762451171875,
0.05859375,
-0.047027587890625,
-0.035186767578125,
-0.0156097412109375,
0.03717041015625,
-0.0110015869140625,
0.0225982666015625,
-0.0175323486328125,
-0.0011835098266601562,
-0.059356689453125,
-0.048828125,
0.0740966796875,
0.0328369140625,
0.01247406005859375,
0.01001739501953125,
0.01357269287109375,
-0.0194854736328125,
0.036468505859375,
-0.005992889404296875,
0.04864501953125,
0.039703369140625,
-0.003284454345703125,
0.00970458984375,
0.02978515625,
-0.0141448974609375,
-0.01763916015625,
0.0400390625,
-0.00650787353515625,
0.0011758804321289062,
0.009918212890625,
-0.01812744140625,
0.0273895263671875,
0.034454345703125,
-0.0203704833984375,
0.0171966552734375,
-0.0025081634521484375,
-0.02081298828125,
0.0007534027099609375,
-0.00940704345703125,
-0.05096435546875,
-0.018280029296875,
0.00434112548828125,
-0.0010862350463867188,
0.005840301513671875,
-0.044036865234375,
-0.040191650390625,
-0.0202178955078125,
0.041473388671875,
-0.002269744873046875,
-0.0168609619140625,
0.0235443115234375,
-0.056365966796875,
-0.00958251953125,
-0.01105499267578125,
-0.050933837890625,
0.015167236328125,
-0.007030487060546875,
-0.032684326171875,
0.022796630859375,
-0.029266357421875,
-0.030609130859375,
-0.0018758773803710938,
0.01401519775390625,
0.01403045654296875,
-0.047332763671875,
-0.03533935546875,
0.03546142578125,
0.046966552734375,
0.054168701171875,
0.07568359375,
-0.00023543834686279297,
0.03179931640625,
0.0172576904296875,
-0.057525634765625,
-0.055877685546875,
0.0265045166015625,
-0.039093017578125,
-0.0198516845703125,
-0.0086822509765625,
0.0160980224609375,
0.040985107421875,
-0.0161285400390625,
-0.0601806640625,
0.044891357421875,
-0.0259857177734375,
-0.0231781005859375,
-0.08380126953125,
0.030517578125,
0.021575927734375,
-0.030517578125,
-0.0273284912109375,
-0.019561767578125,
-0.03955078125,
0.01617431640625,
0.0263214111328125,
0.0018548965454101562,
0.0285797119140625,
0.028656005859375,
-0.058258056640625,
0.029144287109375,
-0.00909423828125,
0.01520538330078125,
0.0081939697265625,
-0.0304412841796875,
0.019744873046875,
0.01248931884765625,
-0.044219970703125,
-0.043243408203125,
-0.01334381103515625,
0.0204620361328125,
0.0160675048828125,
-0.006435394287109375,
-0.06964111328125,
-0.031585693359375,
0.03289794921875,
0.03912353515625,
0.0194549560546875,
-0.0079803466796875,
-0.035064697265625,
-0.0426025390625,
-0.00463104248046875,
-0.023406982421875,
0.00885772705078125,
-0.04986572265625,
0.007419586181640625,
0.00920867919921875,
-0.00933837890625,
-0.0011911392211914062,
-0.009063720703125,
-0.022369384765625,
-0.01071929931640625,
-0.013031005859375,
-0.022216796875,
-0.012451171875,
0.039825439453125,
-0.0298919677734375,
-0.004825592041015625,
-0.021087646484375,
-0.027801513671875,
0.002613067626953125,
-0.0300750732421875,
-0.03326416015625,
-0.04168701171875,
0.0285491943359375,
0.01488494873046875,
-0.0005946159362792969,
0.0133209228515625,
-0.0101165771484375,
0.0247039794921875,
0.038726806640625,
-0.01546478271484375,
0.027496337890625,
0.00865936279296875,
0.01543426513671875,
-0.0248260498046875,
0.040618896484375,
0.01549530029296875,
0.068115234375,
0.0299530029296875,
0.0052337646484375,
0.00247955322265625,
0.04119873046875,
0.019134521484375,
-0.041259765625,
0.022857666015625,
-0.0367431640625,
-0.0016717910766601562,
-0.010986328125,
-0.0189056396484375,
-0.0032501220703125,
-0.00699615478515625,
-0.0085906982421875,
-0.038818359375,
-0.00168609619140625
]
|
79daa9197e51a1d7aafb919ebc798e2a4a0c565c | Wordpress Stackexchange
Q: How to use wp_rel_nofollow to add nofollow to external links only? I want to add nofollow attribute to only external links in the content of the post. Internal links should stay follow.
So, can I use wp_rel_nofollow() to make only external links nofollow? Or do I need to use another method?
A: wp_rel_nofollow() add nofollow attribute to all links so we can not use it or may be I am not sure how.
You can use this function to add rel="nofollow" to all external links. This function will check all links in content against your blog/website URL (as internal domain) and add nofollow attribute if both does not match.
function add_nofollow_external_links( $content ) {
return preg_replace_callback( '/<a>]+/', 'auto_nofollow_callback', $content );
}
function auto_nofollow_callback( $matches ) {
$link = $matches[0];
$site_link = get_bloginfo('url');
if (strpos($link, 'rel') === false) {
$link = preg_replace("%(href=S(?!$site_link))%i", 'rel="nofollow" $1', $link);
} elseif (preg_match("%href=S(?!$site_link)%i", $link)) {
$link = preg_replace('/rel=S(?!nofollow)S*/i', 'rel="nofollow"', $link);
}
return $link;
}
add_filter( 'the_content', 'add_nofollow_external_links' );
not tested.
| Q: How to use wp_rel_nofollow to add nofollow to external links only? I want to add nofollow attribute to only external links in the content of the post. Internal links should stay follow.
So, can I use wp_rel_nofollow() to make only external links nofollow? Or do I need to use another method?
A: wp_rel_nofollow() add nofollow attribute to all links so we can not use it or may be I am not sure how.
You can use this function to add rel="nofollow" to all external links. This function will check all links in content against your blog/website URL (as internal domain) and add nofollow attribute if both does not match.
function add_nofollow_external_links( $content ) {
return preg_replace_callback( '/<a>]+/', 'auto_nofollow_callback', $content );
}
function auto_nofollow_callback( $matches ) {
$link = $matches[0];
$site_link = get_bloginfo('url');
if (strpos($link, 'rel') === false) {
$link = preg_replace("%(href=S(?!$site_link))%i", 'rel="nofollow" $1', $link);
} elseif (preg_match("%href=S(?!$site_link)%i", $link)) {
$link = preg_replace('/rel=S(?!nofollow)S*/i', 'rel="nofollow"', $link);
}
return $link;
}
add_filter( 'the_content', 'add_nofollow_external_links' );
not tested.
A: Based on @Robert hue's answer and the wordpress functions wp_rel_nofollow() and wp_rel_nofollow_callback I came up with this very similar solution that works for me because for some reason Robert's wasnt adding the nofollow attribute to the link.
function add_rel_nofollow( $text ) {
// This is a pre save filter, so text is already escaped.
$text = stripslashes($text);
$text = preg_replace_callback('|<a (.+?)>|i', 'add_rel_nofollow_callback', $text);
//$text = wp_slash($text); //I had to remove this because it was adding undesired backslashes to the output
return $text;
}
function add_rel_nofollow_callback( $matches ) {
$text = $matches[1];
$site_link = get_bloginfo('url');
if (strpos($text, 'rel') === false) {
$text = preg_replace("%(href=S(?!$site_link))%i", 'rel="nofollow" $1', $text);
} elseif (preg_match("%href=S(?!$site_link)%i", $link)) {
$text = str_replace(array(' rel="nofollow"', " rel='nofollow'"), '', $text);
}
return "<a $text rel=\"nofollow\">";
}
add_filter( 'the_content', 'add_rel_nofollow' );
This adds a rel="nofollow" attribute to all previously published and future posts.
Regarding performance, I asked @Roberthue the same question and this is what he said:
I don't know why it should. It's mostly the same as using
wp_rel_nofollow() except it has a additional check for external
domain. That's it but if you add tons of domains to check and exclude
then it probably will. – Robert hue
A: I use the following function to add nofollow tags to external links:
add_filter( 'the_content', 'nofollow_enternal_links');
function nofollow_enternal_links( $content ) {
$regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>";
if(preg_match_all("/$regexp/siU", $content, $matches, PREG_SET_ORDER)) {
if( !empty($matches) ) {
$srcUrl = get_option('home');
for ($i=0; $i < count($matches); $i++)
{
$tag = $matches[$i][0];
$tag2 = $matches[$i][0];
$url = $matches[$i][0];
$noFollow = '';
$pattern = '/rel\s*=\s*"\s*[n|d]ofollow\s*"/';
preg_match($pattern, $tag2, $match, PREG_OFFSET_CAPTURE);
if( count($match) < 1 )
$noFollow .= ' rel="nofollow" ';
$pos = strpos($url,$srcUrl);
if ($pos === false) {
$tag = rtrim ($tag,'>');
$tag .= $noFollow.'>';
$content = str_replace($tag2,$tag,$content);
}
}
}
}
$content = str_replace(']]>', ']]>', $content);
return $content;
}
This works site wide and targets all posts, even the published ones.
This approach is different to the other working one posted.
I'm posting this to check if anyone can confirm whether if this or the other approach is better for performance.
A: I am using following code to make all external links no follow and this code works.
add_filter('the_content', 'my_nofollow');
add_filter('the_excerpt', 'my_nofollow');
function my_nofollow($content) {
return preg_replace_callback('/<a[^>]+/', 'my_nofollow_callback', $content);
}
function my_nofollow_callback($matches) {
$link = $matches[0];
$site_link = get_bloginfo('url');
if (strpos($link, 'rel') === false) {
$link = preg_replace("%(href=\S(?!$site_link))%i", 'rel="nofollow" $1', $link);
} elseif (preg_match("%href=\S(?!$site_link)%i", $link)) {
$link = preg_replace('/rel=\S(?!nofollow)\S*/i', 'rel="nofollow"', $link);
}
return $link;
}
A: Neither Gixty's nor Robert's code worked for me. Robert's one didn't even match correctly links, and even with the correct pattern didn't check whether the link was internal or external, and added the nofollow to all links, whereas Gixty's one correctly added the nofollow, but again to all links, not just internal ones.
This is my code, which works fine for me and only adds the rel nofollow to internal links. Also, notice that it doesn't touch links which do already have the rel attribute, whatever value it may have.
function add_nofollow_external_links( $content ) {
return preg_replace_callback( '|<a (.+?)>|i', 'add_nofollow_callback', $content );
}
function add_nofollow_callback( $matches ) {
$text = $matches[1];
$site_link = get_bloginfo( 'url' );
//If this is an internal link, don't touch it
if( strpos( $text, $site_link ) ) {
return "<a $text>";
}
//If this doesn't have the rel attribute, append the nofollow
if( strpos( $text, 'rel' ) === false ) {
$text = preg_replace( "%(href=S(?!$site_link))%i", 'rel="nofollow" $1', $text );
}
return "<a $text rel=\"nofollow\">";
}
A: The other answers don't work in all cases and/or change links when they shouldn't and/or don't reliably check for the rel attribute if it exists.
This solution is a bit more comprehensive and allows for more flexibility.
// Takes an string of html attr and adds an attribute value; if attr is present and $replace=false, space and the new value is added to end of the attribute; otherwise attr is added to end.
function inject_html_attr($attr_str, $new_attr_name, $attr_value, $replace=false) {
return preg_replace_callback(
'/(((?:^|\s)'.$new_attr_name.'=[\'"])(.*?))([\'"])|$/i',
function($m)use($new_attr_name,$attr_value, $replace){
if( $m[0] ){
$m[1] = $replace ? $m[2] : $m[1].($m[3]?' ':'');
}else{
$m[1] = ' '.$new_attr_name.'="';
$m[4] = '"';
}
return $m[1].$attr_value.$m[4];
},
$attr_str, 1 );
}
add_filter('the_content', 'apply_external_link_markup');
function apply_external_link_markup($content) {
// Assumes attributes are quoted (single or double)
return preg_replace_callback(
'/<a ([^>]*)(href=(["\'])(?:https?:)?\\/\\/([^\\/\'">]+)(.*?)\3)([^>]*)>/i',
function($m) {
if( $m[4] === $_SERVER['HTTP_HOST'] )
return $m[0];
$attr = ' '.trim(trim($m[1]).' '.trim($m[6]));
//$attr = inject_html_attr( $attr, 'class', 'external-link' );
//$attr = inject_html_attr( $attr, 'target', '_blank', true );
$attr = inject_html_attr( $attr, 'rel', 'nofollow', true );
return '<a '.$m[2].$attr.'>';
},
$content );
}
| wordpress | {
"language": "en",
"length": 915,
"provenance": "stackexchange_00019.jsonl.gz:450670",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/168949"
} | [
0.059234619140625,
-0.0165863037109375,
0.035919189453125,
-0.029876708984375,
0.017913818359375,
-0.028839111328125,
0.0858154296875,
-0.0133209228515625,
-0.0135650634765625,
0.0184326171875,
-0.022796630859375,
0.0232696533203125,
-0.00803375244140625,
-0.0270843505859375,
0.0303955078125,
-0.0262298583984375,
0.01348114013671875,
0.00616455078125,
0.0223236083984375,
-0.0206146240234375,
0.0070953369140625,
-0.0123291015625,
0.0231781005859375,
0.0037746429443359375,
0.0285186767578125,
-0.0833740234375,
0.08172607421875,
-0.0125274658203125,
0.038726806640625,
-0.0172576904296875,
0.040985107421875,
-0.0289459228515625,
0.043060302734375,
0.035186767578125,
-0.0797119140625,
-0.0287628173828125,
0.0037021636962890625,
0.006732940673828125,
-0.0189361572265625,
0.02777099609375,
0.0305633544921875,
-0.024383544921875,
0.0005764961242675781,
-0.005420684814453125,
0.0093231201171875,
-0.02459716796875,
0.045867919921875,
-0.048614501953125,
-0.00426483154296875,
0.0218353271484375,
0.0333251953125,
0.040374755859375,
0.04180908203125,
0.00507354736328125,
-0.0016307830810546875,
0.0244598388671875,
0.0156707763671875,
0.006805419921875,
0.00921630859375,
0.00260162353515625,
-0.017333984375,
0.01329803466796875,
0.0012807846069335938,
-0.01113128662109375,
0.0006933212280273438,
-0.0212249755859375,
-0.045440673828125,
0.04718017578125,
-0.0182342529296875,
-0.00970458984375,
0.006122589111328125,
-0.019866943359375,
-0.0210723876953125,
-0.00672149658203125,
-0.0304718017578125,
-0.00634765625,
0.0199432373046875,
-0.0246734619140625,
-0.019989013671875,
0.025787353515625,
-0.0258941650390625,
-0.0157623291015625,
0.00217437744140625,
-0.01995849609375,
0.0274505615234375,
0.0292205810546875,
-0.023040771484375,
-0.0022869110107421875,
-0.044464111328125,
0.01505279541015625,
-0.0297088623046875,
0.0187530517578125,
-0.026824951171875,
-0.017303466796875,
-0.01446533203125,
-0.0177001953125,
0.05078125,
0.0633544921875,
-0.0281982421875,
-0.0313720703125,
0.0254058837890625,
-0.051361083984375,
0.01229095458984375,
-0.04583740234375,
0.00418853759765625,
0.06817626953125,
0.01021575927734375,
-0.00019478797912597656,
0.009429931640625,
0.0004324913024902344,
0.0028972625732421875,
-0.02301025390625,
0.0092926025390625,
0.0023403167724609375,
-0.0386962890625,
-0.0197296142578125,
-0.048980712890625,
0.006633758544921875,
0.012664794921875,
-0.0140533447265625,
0.001544952392578125,
0.03204345703125,
-0.03216552734375,
-0.00998687744140625,
0.004138946533203125,
-0.004138946533203125,
0.016571044921875,
-0.01184844970703125,
-0.0085906982421875,
0.0369873046875,
-0.049102783203125,
0.021514892578125,
0.07659912109375,
-0.005950927734375,
-0.019317626953125,
-0.03564453125,
-0.00634765625,
-0.01038360595703125,
-0.021270751953125,
0.0224456787109375,
0.033233642578125,
-0.05224609375,
-0.00930023193359375,
0.0179595947265625,
0.0167083740234375,
-0.007213592529296875,
0.013092041015625,
0.02679443359375,
0.01222991943359375,
-0.018463134765625,
0.03814697265625,
-0.03363037109375,
0.039276123046875,
-0.01038360595703125,
-0.0209197998046875,
-0.045989990234375,
0.0192413330078125,
-0.044189453125,
0.020477294921875,
-0.04998779296875,
-0.03216552734375,
-0.0153656005859375,
0.03900146484375,
-0.060211181640625,
-0.058929443359375,
-0.003803253173828125,
-0.0308685302734375,
-0.006755828857421875,
0.0242919921875,
0.006839752197265625,
0.03350830078125,
-0.04248046875,
-0.004703521728515625,
0.01922607421875,
0.00910186767578125,
0.038543701171875,
-0.0107574462890625,
0.033203125,
0.044219970703125,
-0.0145263671875,
0.0017910003662109375,
-0.0251007080078125,
0.09649658203125,
-0.014617919921875,
-0.061920166015625,
0.052154541015625,
0.006481170654296875,
0.09820556640625,
0.0220794677734375,
0.0204620361328125,
0.004856109619140625,
-0.02392578125,
-0.0135498046875,
0.01216888427734375,
-0.01364898681640625,
-0.0306549072265625,
0.030059814453125,
0.0004456043243408203,
-0.0197906494140625,
0.0118255615234375,
0.0311737060546875,
-0.01555633544921875,
0.015167236328125,
-0.00551605224609375,
-0.06689453125,
0.0018825531005859375,
-0.04217529296875,
0.019500732421875,
-0.018890380859375,
-0.00974273681640625,
0.0254058837890625,
-0.0215301513671875,
-0.0236968994140625,
0.0273590087890625,
0.0005831718444824219,
0.04266357421875,
0.02703857421875,
0.0028934478759765625,
-0.0008983612060546875,
0.00994873046875,
0.0102996826171875,
-0.00368499755859375,
-0.0018243789672851562,
0.029510498046875,
0.058990478515625,
-0.062255859375,
-0.017303466796875,
-0.04071044921875,
-0.0148162841796875,
-0.016510009765625,
-0.0751953125,
0.07940673828125,
0.029205322265625,
0.03265380859375,
-0.0308837890625,
0.0141754150390625,
0.0149383544921875,
-0.0057373046875,
-0.0116424560546875,
0.036407470703125,
0.046417236328125,
0.022918701171875,
0.0016508102416992188,
-0.0279083251953125,
0.0163726806640625,
0.012237548828125,
0.056396484375,
-0.060821533203125,
0.00653839111328125,
0.018646240234375,
-0.0128173828125,
-0.014190673828125,
0.037872314453125,
-0.031494140625,
-0.026824951171875,
0.050689697265625,
0.00667572021484375,
0.01380157470703125,
-0.0318603515625,
0.0298004150390625,
-0.00716400146484375,
0.03350830078125,
0.01146697998046875,
0.004436492919921875,
-0.007781982421875,
0.0036563873291015625,
0.00356292724609375,
0.00533294677734375,
0.00469970703125,
-0.01216888427734375,
0.007579803466796875,
-0.0023021697998046875,
0.005161285400390625,
0.0272369384765625,
0.012451171875,
-0.01123809814453125,
-0.003398895263671875,
-0.0011587142944335938,
0.025177001953125,
-0.0036334991455078125,
-0.0238494873046875,
0.0216064453125,
0.04290771484375,
-0.006290435791015625,
-0.001262664794921875,
-0.0212554931640625,
0.0307159423828125,
-0.01666259765625,
-0.0215911865234375,
0.01441192626953125,
0.03985595703125,
0.0015554428100585938,
-0.0276947021484375,
0.003505706787109375,
0.0161895751953125,
-0.018096923828125,
-0.04052734375,
-0.06781005859375,
0.05462646484375,
-0.05517578125,
0.01465606689453125,
0.06829833984375,
0.01220703125,
0.0104827880859375,
-0.00855255126953125,
0.036407470703125,
-0.029266357421875,
0.01123809814453125,
0.0025081634521484375,
0.005859375,
-0.05157470703125,
0.0006847381591796875,
-0.0050048828125,
-0.026092529296875,
-0.01305389404296875,
-0.04046630859375,
-0.010894775390625,
-0.027557373046875,
-0.08062744140625,
-0.033538818359375,
-0.005924224853515625,
-0.01102447509765625,
-0.02301025390625,
0.049774169921875,
-0.0208587646484375,
0.01004791259765625,
0.0789794921875,
-0.00861358642578125,
-0.00047659873962402344,
-0.055450439453125,
-0.05560302734375,
-0.07049560546875,
-0.06988525390625,
0.0058746337890625,
0.0032749176025390625,
-0.004909515380859375,
0.007762908935546875,
0.006313323974609375,
0.004299163818359375,
0.0020847320556640625,
0.041656494140625,
-0.004970550537109375,
-0.011871337890625,
-0.0237579345703125,
-0.042633056640625,
0.0082855224609375,
-0.041778564453125,
-0.00286102294921875,
0.0012664794921875,
-0.0054931640625,
0.00621795654296875,
0.0238800048828125,
0.0125579833984375,
0.044708251953125,
0.041900634765625,
-0.01494598388671875,
-0.0114593505859375,
0.041534423828125,
0.002513885498046875,
-0.01190948486328125,
-0.028472900390625,
-0.0096893310546875,
-0.0382080078125,
0.072509765625,
0.0364990234375,
-0.01345062255859375,
0.03546142578125,
-0.002910614013671875,
0.0235748291015625,
0.0196075439453125,
0.01250457763671875,
0.028411865234375,
0.0284881591796875,
-0.0160980224609375,
-0.01800537109375,
-0.029937744140625,
0.058868408203125,
0.02008056640625,
-0.0001690387725830078,
0.0289459228515625,
0.03546142578125,
0.001880645751953125,
0.013671875,
-0.0640869140625,
-0.0011892318725585938,
0.029571533203125,
-0.0286712646484375,
0.046417236328125,
-0.050750732421875,
-0.0133819580078125,
-0.031585693359375,
0.063720703125,
-0.04736328125,
-0.037109375,
-0.0130767822265625,
0.0243377685546875,
0.0249481201171875,
-0.08697509765625,
0.034942626953125,
-0.032470703125,
-0.048797607421875,
0.0275421142578125,
-0.0169830322265625,
-0.020843505859375,
0.0018472671508789062,
-0.03558349609375,
-0.01006317138671875,
-0.044921875,
0.033111572265625,
-0.0007429122924804688,
-0.01120758056640625,
0.03851318359375,
-0.04144287109375,
0.032073974609375,
-0.039276123046875,
-0.00942230224609375,
-0.03955078125,
0.0125579833984375,
-0.0036258697509765625,
-0.00948333740234375,
-0.011199951171875,
0.01543426513671875,
-0.0176239013671875,
-0.003795623779296875,
0.03582763671875,
-0.038482666015625,
0.00836181640625,
-0.0316162109375,
-0.0089111328125,
0.041778564453125,
0.0010309219360351562,
-0.01139068603515625,
0.009246826171875,
0.0047149658203125,
-0.039825439453125,
0.056121826171875,
-0.019012451171875,
0.043487548828125,
0.03619384765625,
-0.036529541015625,
-0.007297515869140625,
-0.0145263671875,
-0.0030078887939453125,
0.06890869140625,
-0.021240234375,
0.0037670135498046875,
-0.04730224609375,
-0.038604736328125,
0.03594970703125,
-0.0003714561462402344,
-0.01145172119140625,
0.00591278076171875,
0.0260162353515625,
0.0181884765625,
-0.0193939208984375,
0.021392822265625,
0.0003173351287841797,
0.01080322265625,
-0.0256500244140625,
0.06768798828125,
0.02996826171875,
0.0166473388671875,
0.0288848876953125,
-0.021575927734375,
0.031158447265625,
0.0083465576171875,
0.0013580322265625,
0.0128173828125,
-0.031494140625,
0.039337158203125,
0.017547607421875,
-0.034027099609375,
0.0006427764892578125,
0.004711151123046875,
0.0010833740234375,
0.01541900634765625,
-0.01026153564453125,
-0.006099700927734375,
0.01363372802734375,
0.0128173828125,
-0.001739501953125,
-0.0014972686767578125,
0.024139404296875,
0.014984130859375,
0.031280517578125,
-0.01433563232421875,
-0.0014104843139648438,
0.0157623291015625,
-0.026123046875,
0.01296234130859375,
-0.0033473968505859375,
-0.0106964111328125,
0.021514892578125,
-0.03009033203125,
-0.04864501953125,
-0.0020389556884765625,
-0.0004978179931640625,
0.08245849609375,
0.0027923583984375,
-0.032928466796875,
-0.0300445556640625,
-0.01343536376953125,
-0.0197601318359375,
0.0148162841796875,
0.03070068359375,
0.04779052734375,
-0.01641845703125,
-0.00968170166015625,
0.01641845703125,
-0.03472900390625,
-0.00518798828125,
-0.043731689453125,
0.048583984375,
-0.0187530517578125,
0.005924224853515625,
0.03271484375,
0.043426513671875,
0.01483154296875,
0.03729248046875,
-0.00794219970703125,
0.0135345458984375,
0.055633544921875,
0.016082763671875,
0.035736083984375,
-0.044677734375,
0.0010633468627929688,
-0.01181793212890625,
0.016937255859375,
-0.01529693603515625,
-0.00925445556640625,
0.026611328125,
0.05517578125,
0.00376129150390625,
0.00553131103515625,
-0.004993438720703125,
-0.047637939453125,
-0.01275634765625,
0.037384033203125,
0.041778564453125,
-0.021575927734375,
-0.022491455078125,
0.003997802734375,
-0.0005078315734863281,
0.00731658935546875,
-0.00025200843811035156,
-0.00775146484375,
0.001918792724609375,
-0.001140594482421875,
0.0428466796875,
-0.0145416259765625,
-0.0159759521484375,
-0.0161590576171875,
-0.039825439453125,
-0.0272979736328125,
0.024322509765625,
-0.0301513671875,
-0.0022182464599609375,
-0.031829833984375,
-0.03253173828125,
0.0704345703125,
-0.00986480712890625,
0.037811279296875,
-0.033966064453125,
-0.0116729736328125,
-0.0014934539794921875,
-0.00960540771484375,
0.06060791015625,
0.03411865234375,
-0.022674560546875,
0.0016393661499023438,
-0.04547119140625,
-0.0025081634521484375,
0.019927978515625,
-0.0274200439453125,
-0.00531005859375,
-0.0384521484375,
0.02520751953125,
0.0236663818359375,
-0.0070037841796875,
-0.018463134765625,
0.0024356842041015625,
0.0139617919921875,
-0.00391387939453125,
0.042694091796875,
0.00772857666015625,
0.03759765625,
0.00917816162109375,
-0.0011920928955078125,
0.031494140625,
0.0306549072265625,
-0.0273895263671875,
-0.0115814208984375,
0.0030117034912109375,
-0.058746337890625,
-0.03045654296875,
-0.0065765380859375,
-0.02069091796875,
0.06201171875,
0.042327880859375,
-0.0113067626953125,
0.005886077880859375,
-0.0328369140625,
-0.021209716796875,
-0.030548095703125,
0.07305908203125,
-0.031829833984375,
0.0309600830078125,
0.0201568603515625,
0.019439697265625,
0.041473388671875,
-0.0225067138671875,
0.0011720657348632812,
-0.03900146484375,
0.0191192626953125,
-0.008758544921875,
-0.0107879638671875,
-0.041351318359375,
0.056304931640625,
0.061981201171875,
0.0025234222412109375,
0.03326416015625,
0.0222930908203125,
0.005695343017578125,
0.0416259765625,
0.00817108154296875,
0.00437164306640625,
0.00479888916015625,
0.0848388671875,
0.00705718994140625,
-0.0192413330078125,
0.065673828125,
-0.027435302734375,
0.037139892578125,
0.035186767578125,
0.045166015625,
-0.07830810546875,
0.01169586181640625,
0.00868988037109375,
-0.00634002685546875,
0.052734375,
-0.01568603515625,
-0.020263671875,
0.0129852294921875,
0.06060791015625,
-0.0237274169921875,
-0.0211639404296875,
0.0232086181640625,
0.0364990234375,
-0.019439697265625,
0.0171356201171875,
0.031463623046875,
-0.004810333251953125,
-0.035980224609375,
-0.05029296875,
0.0028324127197265625,
-0.04034423828125,
-0.047119140625,
0.0307159423828125,
-0.01340484619140625,
-0.0033435821533203125,
-0.0712890625,
0.02105712890625,
0.0142364501953125,
-0.00542449951171875,
0.036712646484375,
-0.0205078125,
0.0190887451171875,
0.03668212890625,
-0.02252197265625,
0.00817108154296875,
-0.01465606689453125,
0.004299163818359375,
0.0237884521484375,
-0.0263214111328125,
0.018829345703125,
0.00943756103515625,
-0.00827789306640625,
0.003322601318359375,
-0.0091552734375,
-0.03887939453125,
-0.007068634033203125,
-0.01045989990234375,
0.049652099609375,
-0.03741455078125,
0.00511932373046875,
0.05474853515625,
0.02191162109375,
-0.0286712646484375,
-0.0224151611328125,
0.06573486328125,
-0.0665283203125,
-0.042327880859375,
-0.00041961669921875,
-0.04693603515625,
-0.04010009765625,
-0.0853271484375,
-0.081787109375,
0.11663818359375,
-0.00498199462890625,
0.044158935546875,
-0.001617431640625,
0.030548095703125,
-0.018646240234375,
0.00872039794921875,
-0.034576416015625,
0.073974609375,
0.04669189453125,
0.0183563232421875,
-0.0290374755859375,
-0.014739990234375,
0.01666259765625,
0.035125732421875,
0.029815673828125,
0.01107025146484375,
-0.0008707046508789062,
-0.0180511474609375,
0.01806640625,
0.0234832763671875,
-0.01141357421875,
0.005039215087890625,
-0.02606201171875,
-0.0211181640625,
0.0258636474609375,
-0.05401611328125,
-0.003650665283203125,
-0.0193634033203125,
0.0164337158203125,
-0.0018367767333984375,
0.0174560546875,
0.0177001953125,
0.01045989990234375,
0.0255279541015625,
-0.045166015625,
0.01045989990234375,
0.02398681640625,
0.0251007080078125,
0.00391387939453125,
0.01171875,
-0.026947021484375,
-0.007167816162109375,
-0.0200347900390625,
-0.0184783935546875,
0.0184326171875,
-0.01120758056640625,
-0.0031585693359375,
0.035430908203125,
0.004467010498046875,
0.09979248046875,
-0.003681182861328125,
-0.012298583984375,
0.006847381591796875,
0.038421630859375,
-0.0163726806640625,
0.0323486328125,
0.01397705078125,
-0.023712158203125,
0.00426483154296875,
0.044891357421875,
0.01053619384765625,
-0.001556396484375,
-0.0174713134765625,
0.0110626220703125,
-0.007122039794921875,
0.0008192062377929688,
-0.01556396484375,
0.0201873779296875,
-0.045013427734375,
-0.044677734375,
-0.02789306640625,
0.01788330078125,
0.05108642578125,
0.017303466796875,
0.00292205810546875,
0.00021529197692871094,
-0.055389404296875,
0.00841522216796875,
-0.036712646484375,
-0.009033203125,
0.0264434814453125,
0.03875732421875,
0.0072174072265625,
0.03167724609375,
0.0423583984375,
-0.0040283203125,
0.0042572021484375,
-0.0116729736328125,
-0.031494140625,
-0.005283355712890625,
-0.031982421875,
-0.058349609375,
0.007076263427734375,
0.055145263671875,
0.05975341796875,
0.01300811767578125,
0.07586669921875,
0.01479339599609375,
-0.04046630859375,
0.0262908935546875,
0.01287078857421875,
-0.034271240234375,
0.034393310546875,
-0.037353515625,
0.048065185546875,
0.02349853515625,
0.00821685791015625,
-0.00823974609375,
0.0077972412109375,
0.044830322265625,
-0.038299560546875,
0.06182861328125,
-0.003936767578125,
0.0232086181640625,
0.0394287109375,
0.019622802734375,
0.007183074951171875,
0.004611968994140625,
-0.02960205078125,
-0.0032215118408203125,
-0.032470703125,
-0.0550537109375,
0.02349853515625,
0.053558349609375,
-0.00830078125,
0.01322174072265625,
0.004123687744140625,
0.043609619140625,
-0.0066070556640625,
-0.038787841796875,
-0.0025424957275390625,
0.0008521080017089844,
0.0285186767578125,
0.019378662109375,
0.0021839141845703125,
0.001155853271484375,
0.043792724609375,
0.0304718017578125,
0.0023899078369140625,
0.042236328125,
-0.0247650146484375,
0.010986328125,
0.03143310546875,
0.0144805908203125,
-0.0113372802734375,
0.01873779296875,
-0.0186614990234375,
-0.0242919921875,
0.007411956787109375,
0.003170013427734375,
-0.0167999267578125,
0.050323486328125,
0.0032444000244140625,
0.006134033203125,
0.05511474609375,
-0.030242919921875,
0.0020694732666015625,
-0.01483154296875,
-0.00876617431640625,
-0.04656982421875,
-0.036651611328125,
-0.06683349609375,
-0.009552001953125,
0.0066986083984375,
-0.0109405517578125,
-0.04736328125,
0.04229736328125,
-0.0115966796875,
-0.02899169921875,
0.00406646728515625,
-0.050323486328125,
-0.00003254413604736328,
0.0257110595703125,
0.0032215118408203125,
-0.0291290283203125,
-0.00659942626953125,
-0.0269012451171875,
-0.019775390625,
0.0122222900390625,
0.00591278076171875,
-0.0206146240234375,
-0.012237548828125,
-0.01439666748046875,
0.02606201171875,
0.03887939453125,
-0.0228271484375,
0.038330078125,
0.0196685791015625,
-0.0029354095458984375,
0.00013375282287597656,
-0.0157318115234375,
-0.0253143310546875,
-0.04376220703125,
-0.0096893310546875,
0.00653076171875,
-0.0206451416015625,
-0.023834228515625,
-0.01055908203125,
0.00975799560546875,
0.05303955078125,
0.01548004150390625,
-0.0782470703125,
-0.0101470947265625,
-0.0142974853515625,
0.104248046875,
0.002841949462890625,
0.0638427734375,
-0.0183868408203125,
0.019561767578125,
-0.068115234375,
-0.03570556640625,
-0.01617431640625,
0.0572509765625,
-0.03021240234375,
-0.00400543212890625,
0.034576416015625,
0.001392364501953125,
-0.03466796875,
-0.005462646484375,
-0.02264404296875,
0.040283203125,
-0.0582275390625,
-0.004669189453125,
0.0013132095336914062,
-0.017852783203125,
-0.01123809814453125,
-0.06817626953125,
0.0075225830078125,
-0.1070556640625,
-0.0396728515625,
0.01018524169921875,
-0.0155181884765625,
-0.0037097930908203125,
-0.032073974609375,
-0.060760498046875,
0.0882568359375,
-0.007843017578125,
-0.0252838134765625,
-0.04913330078125,
-0.04205322265625,
0.0028209686279296875,
-0.01094818115234375,
-0.033782958984375,
-0.008392333984375,
-0.07452392578125,
0.029541015625,
0.027130126953125,
0.03851318359375,
-0.0177154541015625,
0.038482666015625,
0.010894775390625,
0.0657958984375,
0.042144775390625,
0.0011262893676757812,
0.0173492431640625,
-0.0286407470703125,
0.045135498046875,
0.02392578125,
-0.0587158203125,
0.03924560546875,
0.011260986328125,
0.016082763671875,
0.0088958740234375,
-0.05621337890625,
-0.019012451171875,
-0.0274200439453125,
0.06512451171875,
-0.0285797119140625,
0.01084136962890625,
-0.01434326171875,
-0.004772186279296875,
-0.004154205322265625,
-0.03021240234375,
-0.0229339599609375,
0.0165863037109375,
-0.0474853515625,
-0.0070343017578125,
-0.034088134765625,
0.01160430908203125,
-0.030242919921875,
-0.043670654296875,
-0.0164947509765625,
-0.0013246536254882812,
0.005828857421875,
0.0256195068359375,
0.033233642578125,
0.07489013671875,
0.05535888671875,
-0.056396484375,
0.030548095703125,
-0.01549530029296875,
-0.0256805419921875,
0.044769287109375,
-0.07269287109375,
0.0120697021484375,
-0.00861358642578125,
-0.02496337890625,
-0.021087646484375,
0.0226287841796875,
0.0249481201171875,
0.0248565673828125,
-0.03521728515625,
-0.045989990234375,
0.002445220947265625,
0.0046234130859375,
-0.008453369140625,
-0.021484375,
0.03973388671875,
0.0263671875,
0.051788330078125,
-0.031036376953125,
0.0167999267578125,
-0.016387939453125,
0.0170135498046875,
-0.030487060546875,
0.018951416015625,
0.00982666015625,
-0.00970458984375,
0.018402099609375,
0.012237548828125,
0.005992889404296875,
-0.015838623046875,
0.01739501953125,
0.0270233154296875,
-0.0007658004760742188,
0.0304718017578125
]
|
41d72e30caf6fcd57af103d7b8f3999fd55fdc89 | Wordpress Stackexchange
Q: How can I remove the "Add New" button in my custom post type? I have many custom post types that need the Add [custom post type] feature but I have a custom post type of "About" and I do not need to "Add New" about to the about custom post type. So I want to remove the button on top that says "Add About"
This is what I mean:
Any idea how I can remove that?
A: Please refer below :
function disable_new_posts() {
// Hide sidebar link
global $submenu;
unset($submenu['edit.php?post_type=CUSTOM_POST_TYPE'][10]);
// Hide link on listing page
if (isset($_GET['post_type']) && $_GET['post_type'] == 'CUSTOM_POST_TYPE') {
echo '<style type="text/css">
#favorite-actions, .add-new-h2, .tablenav { display:none; }
</style>';
}
}
add_action('admin_menu', 'disable_new_posts');
| Q: How can I remove the "Add New" button in my custom post type? I have many custom post types that need the Add [custom post type] feature but I have a custom post type of "About" and I do not need to "Add New" about to the about custom post type. So I want to remove the button on top that says "Add About"
This is what I mean:
Any idea how I can remove that?
A: Please refer below :
function disable_new_posts() {
// Hide sidebar link
global $submenu;
unset($submenu['edit.php?post_type=CUSTOM_POST_TYPE'][10]);
// Hide link on listing page
if (isset($_GET['post_type']) && $_GET['post_type'] == 'CUSTOM_POST_TYPE') {
echo '<style type="text/css">
#favorite-actions, .add-new-h2, .tablenav { display:none; }
</style>';
}
}
add_action('admin_menu', 'disable_new_posts');
A: A prettier solution would be to disable the capability of creating a custom_post_type:
Simply pass the the parameter 'create_posts' => 'do_not_allow', in the capabilities array when calling register_post_type.
$args = array(
'label' => __( 'Custom Post Type', 'text_domain' ),
'description' => __( 'Custom Post Type', 'text_domain' ),
'labels' => $labels,
'supports' => array( ),
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
'show_in_nav_menus' => true,
'show_in_admin_bar' => true,
'has_archive' => true,
'exclude_from_search' => false,
'publicly_queryable' => true,
'map_meta_cap' => true,
'capabilities' => array(
'create_posts' => 'do_not_allow'
)
);
register_post_type( 'custom_post_type', $args );
A: Then, if you just want to remove Add New and you are not using custom_post_type, you should't use 'capability_type' => 'custom_post_type'. You'd better to remove this code. Good luck :)
So, the demo is below:
array(
'labels' => $member_labels,
'has_archive' => true,
'public' => true,
'hierarchical' => true, // like page
'rewrite' => array('slug' => 'member_pages'),
'supports' => array(
'title',
'editor',
'excerpt',
'custom-fields',
'thumbnail',
'page-attributes',
),
'taxonomies' => array('post_tag', 'cm_club'),
// 'capability_type' => 'custom_post_type',
'capabilities' => array(
'create_posts' => false,
),
'map_meta_cap' => true,
)
A: Edited @TompaLompa's answer as it was incomplete. Adding create_posts => false won't work if map_meta_cap is not set to true.
Not setting this parameter (or setting it to false) will disable editing of the post type too. This is because you would need to add edit_post capability to each user role in order to add AND edit your post type.
Setting this parameter will use WP internal default meta capability handling and make it work for you if you don't need more finer control over role capabilities then the default WP ones.
A: Best way i felt is install add-admin-javascript plugin and activate it
then go to settings and add javascript
write this code in last box
$('.wrap .wp-heading-inline').remove();
$('.wrap .page-title-action').remove();
$('#wp-admin-bar-new-content').remove();
| wordpress | {
"language": "en",
"length": 425,
"provenance": "stackexchange_00019.jsonl.gz:450729",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169170"
} | [
0.08056640625,
0.0025730133056640625,
0.0174407958984375,
-0.00005608797073364258,
0.035980224609375,
-0.03399658203125,
0.0966796875,
-0.04388427734375,
-0.033782958984375,
0.0080108642578125,
0.0184326171875,
-0.0205078125,
-0.0112457275390625,
-0.058746337890625,
0.038787841796875,
-0.0355224609375,
0.0292816162109375,
-0.0006437301635742188,
0.04888916015625,
-0.01389312744140625,
0.011505126953125,
-0.001720428466796875,
0.057830810546875,
0.032196044921875,
0.007450103759765625,
-0.0163726806640625,
0.08349609375,
-0.0089111328125,
0.010406494140625,
-0.003864288330078125,
0.0206756591796875,
-0.016937255859375,
-0.02117919921875,
0.06689453125,
-0.0293121337890625,
0.0166168212890625,
0.000015616416931152344,
0.042938232421875,
0.040069580078125,
0.001728057861328125,
0.0175018310546875,
-0.01248931884765625,
-0.0015325546264648438,
-0.03155517578125,
-0.0136871337890625,
-0.01482391357421875,
0.01548004150390625,
-0.003276824951171875,
0.0254364013671875,
-0.021240234375,
0.01027679443359375,
-0.000885009765625,
0.03509521484375,
-0.040252685546875,
-0.033966064453125,
-0.00958251953125,
-0.0235595703125,
0.0068817138671875,
0.005859375,
0.0269927978515625,
0.01178741455078125,
0.020477294921875,
-0.005218505859375,
-0.0090179443359375,
-0.0002815723419189453,
-0.00830078125,
0.0167999267578125,
0.0120849609375,
-0.0830078125,
0.008056640625,
0.07183837890625,
-0.051300048828125,
0.0232696533203125,
-0.01398468017578125,
0.01219940185546875,
-0.031982421875,
-0.0012531280517578125,
-0.015716552734375,
0.02911376953125,
-0.006580352783203125,
-0.0105438232421875,
0.01296234130859375,
-0.037872314453125,
-0.0401611328125,
0.0233917236328125,
-0.0276947021484375,
-0.0107879638671875,
-0.00011909008026123047,
-0.00917816162109375,
-0.03240966796875,
-0.016815185546875,
-0.052734375,
-0.00211334228515625,
0.0295562744140625,
-0.01409149169921875,
-0.01357269287109375,
0.0589599609375,
0.038238525390625,
0.0081787109375,
-0.0030765533447265625,
0.0130615234375,
-0.06280517578125,
0.0545654296875,
-0.047882080078125,
0.0257720947265625,
0.0034027099609375,
-0.05120849609375,
-0.034759521484375,
0.08233642578125,
0.0479736328125,
0.01678466796875,
0.03070068359375,
-0.01047515869140625,
-0.0013475418090820312,
-0.032135009765625,
0.0202484130859375,
-0.030364990234375,
0.03973388671875,
-0.012451171875,
0.06964111328125,
0.0021800994873046875,
0.0124053955078125,
-0.016571044921875,
0.0021686553955078125,
0.026885986328125,
0.0126800537109375,
-0.0245819091796875,
0.004993438720703125,
0.024993896484375,
-0.0186614990234375,
-0.06561279296875,
0.0022068023681640625,
0.09039306640625,
0.05474853515625,
0.05157470703125,
-0.0235595703125,
0.01110076904296875,
-0.01287841796875,
-0.0278778076171875,
0.0230255126953125,
0.016571044921875,
-0.06549072265625,
-0.04071044921875,
0.00862884521484375,
0.007732391357421875,
0.0191192626953125,
0.002658843994140625,
0.0149688720703125,
0.01450347900390625,
-0.0303497314453125,
0.0135650634765625,
-0.059234619140625,
0.0498046875,
0.0003120899200439453,
-0.056182861328125,
-0.001537322998046875,
0.0179901123046875,
-0.020111083984375,
-0.044158935546875,
-0.055389404296875,
0.02294921875,
0.01372528076171875,
0.000053048133850097656,
-0.0066680908203125,
-0.04180908203125,
-0.0024967193603515625,
-0.022003173828125,
-0.004131317138671875,
0.01419830322265625,
-0.004489898681640625,
0.01335906982421875,
-0.053375244140625,
-0.00732421875,
-0.004650115966796875,
-0.005718231201171875,
0.0213775634765625,
0.0240936279296875,
0.008453369140625,
0.00769805908203125,
0.06207275390625,
0.001369476318359375,
-0.032867431640625,
0.04791259765625,
-0.0251312255859375,
-0.107421875,
0.073486328125,
-0.0017681121826171875,
0.06866455078125,
0.01268768310546875,
-0.0113525390625,
0.11859130859375,
0.0333251953125,
-0.0140380859375,
-0.0154571533203125,
0.00626373291015625,
0.00511932373046875,
-0.061431884765625,
-0.02099609375,
-0.019775390625,
0.0307769775390625,
-0.044921875,
0.0286102294921875,
-0.01824951171875,
0.00708770751953125,
-0.07281494140625,
0.0255889892578125,
-0.035736083984375,
0.0654296875,
-0.0284576416015625,
0.010406494140625,
0.0306854248046875,
-0.0068817138671875,
-0.021881103515625,
-0.01177978515625,
-0.0021152496337890625,
0.002185821533203125,
-0.0036640167236328125,
0.023651123046875,
-0.016998291015625,
0.040283203125,
-0.027374267578125,
-0.0110931396484375,
-0.0242156982421875,
0.00638580322265625,
0.054473876953125,
-0.026702880859375,
-0.01035308837890625,
-0.04296875,
-0.0031490325927734375,
0.01413726806640625,
-0.09710693359375,
0.042144775390625,
0.02496337890625,
-0.006259918212890625,
-0.035888671875,
0.020233154296875,
0.01203155517578125,
-0.044830322265625,
-0.023834228515625,
0.050048828125,
0.002819061279296875,
0.0178070068359375,
-0.00153350830078125,
0.0628662109375,
0.0265350341796875,
0.002635955810546875,
0.0229949951171875,
0.0211181640625,
0.0192718505859375,
0.015106201171875,
-0.003936767578125,
-0.01226806640625,
0.0474853515625,
0.0231781005859375,
0.049072265625,
0.006801605224609375,
-0.01119232177734375,
-0.006694793701171875,
0.039581298828125,
-0.03289794921875,
0.0159149169921875,
-0.01245880126953125,
-0.0174407958984375,
-0.010284423828125,
0.054595947265625,
0.00603485107421875,
0.048583984375,
0.039306640625,
-0.037200927734375,
-0.007282257080078125,
0.02618408203125,
0.01654052734375,
-0.019805908203125,
0.002620697021484375,
0.033233642578125,
-0.00807952880859375,
-0.05029296875,
0.01568603515625,
-0.0009236335754394531,
0.0089263916015625,
-0.038330078125,
-0.0084991455078125,
-0.006290435791015625,
-0.01154327392578125,
0.0087890625,
-0.08544921875,
0.02032470703125,
-0.01947021484375,
-0.0006074905395507812,
-0.01395416259765625,
0.0082855224609375,
-0.0012912750244140625,
-0.01166534423828125,
0.0089263916015625,
0.0253753662109375,
-0.0272674560546875,
-0.0007786750793457031,
-0.044586181640625,
0.039398193359375,
-0.0098114013671875,
0.065185546875,
0.08563232421875,
0.008575439453125,
0.02191162109375,
0.00812530517578125,
-0.01186370849609375,
-0.008209228515625,
0.029876708984375,
-0.0027103424072265625,
-0.0078125,
-0.050506591796875,
0.0117340087890625,
0.01519775390625,
0.034332275390625,
-0.0096893310546875,
-0.032440185546875,
0.003566741943359375,
0.02435302734375,
-0.016204833984375,
-0.016448974609375,
0.010406494140625,
-0.00649261474609375,
-0.0208740234375,
-0.00024056434631347656,
-0.01183319091796875,
-0.0108795166015625,
0.013519287109375,
-0.00995635986328125,
-0.007411956787109375,
-0.0017032623291015625,
0.0136260986328125,
-0.0002949237823486328,
-0.002964019775390625,
-0.0283203125,
0.01119232177734375,
-0.01192474365234375,
0.0113067626953125,
0.0709228515625,
0.0298004150390625,
-0.0261688232421875,
0.048919677734375,
-0.0274200439453125,
-0.0194091796875,
0.056732177734375,
0.042144775390625,
-0.01361846923828125,
0.009674072265625,
0.017059326171875,
-0.0121307373046875,
0.019195556640625,
-0.0153350830078125,
-0.049560546875,
-0.02349853515625,
-0.0017194747924804688,
0.00940704345703125,
0.029541015625,
0.024749755859375,
-0.0191192626953125,
0.02099609375,
-0.06158447265625,
-0.0223541259765625,
-0.0011415481567382812,
-0.044464111328125,
-0.01513671875,
0.0008168220520019531,
-0.0102691650390625,
-0.0211944580078125,
0.02813720703125,
0.02471923828125,
0.00860595703125,
0.0222015380859375,
0.0009765625,
0.02691650390625,
0.004451751708984375,
0.0167236328125,
-0.054931640625,
0.0309906005859375,
-0.0174407958984375,
0.025787353515625,
0.025787353515625,
-0.002288818359375,
0.0146942138671875,
-0.0362548828125,
0.0100250244140625,
-0.0740966796875,
0.04248046875,
-0.049163818359375,
-0.0009036064147949219,
-0.0072021484375,
-0.0084075927734375,
0.0270538330078125,
0.08929443359375,
-0.0538330078125,
0.0161590576171875,
-0.047454833984375,
-0.01953125,
0.0374755859375,
-0.059661865234375,
-0.046356201171875,
-0.0164642333984375,
-0.07379150390625,
0.010162353515625,
-0.00533294677734375,
-0.005954742431640625,
-0.042510986328125,
0.056396484375,
-0.0703125,
-0.02239990234375,
0.051605224609375,
-0.03668212890625,
-0.0022735595703125,
0.021575927734375,
-0.025634765625,
-0.00714874267578125,
-0.0684814453125,
-0.00696563720703125,
-0.04010009765625,
0.0016040802001953125,
-0.026123046875,
0.005352020263671875,
-0.0149688720703125,
0.0379638671875,
-0.036773681640625,
-0.00609588623046875,
0.0214996337890625,
-0.006427764892578125,
-0.00732421875,
-0.017333984375,
-0.0112457275390625,
0.01519775390625,
-0.01210784912109375,
0.0026073455810546875,
0.0020275115966796875,
0.0273590087890625,
-0.0009474754333496094,
0.0560302734375,
-0.02288818359375,
0.001880645751953125,
0.021270751953125,
-0.0269317626953125,
-0.020477294921875,
-0.04827880859375,
-0.026153564453125,
0.036590576171875,
-0.01092529296875,
0.0126800537109375,
-0.0733642578125,
-0.052490234375,
0.02294921875,
-0.003936767578125,
-0.019744873046875,
0.0082855224609375,
0.03271484375,
0.0174713134765625,
-0.0178070068359375,
-0.02783203125,
0.0277557373046875,
0.0283660888671875,
-0.0233917236328125,
0.040435791015625,
0.01300811767578125,
0.005359649658203125,
0.00823211669921875,
-0.0263824462890625,
0.005401611328125,
-0.039306640625,
0.08721923828125,
-0.01261138916015625,
-0.01904296875,
0.031890869140625,
-0.039459228515625,
0.0182952880859375,
-0.01464080810546875,
-0.0198974609375,
0.003665924072265625,
0.006572723388671875,
0.033538818359375,
-0.0240478515625,
0.01494598388671875,
-0.0221710205078125,
-0.01580810546875,
0.02734375,
0.0002713203430175781,
0.020416259765625,
0.004604339599609375,
0.0081787109375,
-0.01849365234375,
-0.05389404296875,
0.006988525390625,
-0.0291900634765625,
0.023529052734375,
-0.032562255859375,
0.027435302734375,
0.01158905029296875,
-0.002422332763671875,
-0.0296783447265625,
0.002471923828125,
-0.004199981689453125,
-0.001819610595703125,
-0.07684326171875,
0.006275177001953125,
0.0136260986328125,
0.044158935546875,
0.0133514404296875,
0.0299835205078125,
0.0411376953125,
0.00882720947265625,
0.0455322265625,
-0.0030155181884765625,
0.01374053955078125,
0.01444244384765625,
-0.0166168212890625,
-0.033355712890625,
0.025543212890625,
-0.0268707275390625,
0.0308685302734375,
0.00518035888671875,
0.03271484375,
0.00804901123046875,
-0.0272064208984375,
0.043609619140625,
0.02716064453125,
0.02301025390625,
0.006595611572265625,
0.0159912109375,
0.0086669921875,
-0.0017766952514648438,
-0.0193023681640625,
-0.056610107421875,
-0.0186767578125,
0.01495361328125,
0.057098388671875,
0.002872467041015625,
-0.0218353271484375,
0.0211029052734375,
-0.018524169921875,
-0.02020263671875,
0.01080322265625,
0.051361083984375,
-0.0274810791015625,
0.01947021484375,
0.0297393798828125,
-0.0193328857421875,
0.004528045654296875,
-0.00186920166015625,
0.01366424560546875,
-0.0276031494140625,
-0.01149749755859375,
-0.00667572021484375,
-0.03167724609375,
-0.0217742919921875,
-0.00469970703125,
-0.0369873046875,
-0.031951904296875,
0.0029582977294921875,
-0.05126953125,
-0.036468505859375,
0.0007758140563964844,
-0.0011911392211914062,
-0.0095367431640625,
-0.028228759765625,
0.0127410888671875,
-0.01727294921875,
0.01222991943359375,
0.005268096923828125,
0.0254364013671875,
0.02374267578125,
-0.015777587890625,
-0.01175689697265625,
-0.0150909423828125,
-0.038970947265625,
-0.033050537109375,
-0.0765380859375,
-0.05322265625,
-0.048309326171875,
0.025634765625,
0.031890869140625,
0.0152587890625,
-0.010498046875,
-0.039306640625,
-0.0149993896484375,
0.0196990966796875,
0.041107177734375,
0.023681640625,
-0.01393890380859375,
0.037872314453125,
0.0193328857421875,
0.03857421875,
0.0174560546875,
0.0236358642578125,
0.00296783447265625,
-0.02459716796875,
0.040802001953125,
-0.03460693359375,
-0.0577392578125,
-0.04052734375,
-0.036163330078125,
-0.003078460693359375,
0.0173187255859375,
-0.033935546875,
0.035369873046875,
-0.0181732177734375,
0.003917694091796875,
-0.03619384765625,
-0.007358551025390625,
-0.0291595458984375,
0.0288238525390625,
-0.0241241455078125,
-0.025238037109375,
0.0506591796875,
0.026580810546875,
0.0281982421875,
-0.0258636474609375,
-0.0303192138671875,
0.00698089599609375,
0.0229339599609375,
-0.0177154541015625,
0.04254150390625,
0.045379638671875,
0.0156097412109375,
0.05706787109375,
0.00201416015625,
0.024688720703125,
0.01245880126953125,
-0.0198974609375,
-0.0045318603515625,
-0.0096893310546875,
0.042755126953125,
0.011993408203125,
-0.00464630126953125,
0.0465087890625,
-0.0162353515625,
0.027313232421875,
0.038909912109375,
0.0433349609375,
-0.083740234375,
0.0166015625,
0.01097869873046875,
0.0169219970703125,
0.078369140625,
-0.0185394287109375,
0.01543426513671875,
-0.0238494873046875,
0.02801513671875,
0.01079559326171875,
-0.029449462890625,
-0.0081634521484375,
-0.019012451171875,
0.00899505615234375,
0.0028858184814453125,
0.046905517578125,
0.032257080078125,
0.0078887939453125,
-0.01367950439453125,
0.00005811452865600586,
0.010223388671875,
-0.00843048095703125,
-0.0084991455078125,
0.001800537109375,
-0.039093017578125,
-0.0838623046875,
-0.02264404296875,
-0.045684814453125,
-0.009002685546875,
0.064453125,
-0.0045623779296875,
-0.033233642578125,
0.025054931640625,
-0.042144775390625,
0.06597900390625,
-0.02471923828125,
-0.04962158203125,
-0.0406494140625,
-0.041015625,
0.004444122314453125,
0.0030345916748046875,
-0.03314208984375,
0.0262603759765625,
-0.023681640625,
-0.0428466796875,
0.0014896392822265625,
0.020294189453125,
0.08795166015625,
-0.034515380859375,
-0.0283355712890625,
0.02685546875,
-0.003997802734375,
-0.0072784423828125,
0.0029125213623046875,
-0.00629425048828125,
-0.024566650390625,
0.006916046142578125,
-0.020416259765625,
-0.018890380859375,
0.002471923828125,
-0.0042724609375,
-0.08599853515625,
0.10107421875,
0.019927978515625,
0.036346435546875,
-0.01045989990234375,
0.032073974609375,
-0.031707763671875,
-0.0058441162109375,
-0.0169677734375,
0.064208984375,
0.00760650634765625,
0.0122833251953125,
-0.0269927978515625,
-0.003070831298828125,
-0.0083770751953125,
0.0132904052734375,
0.06964111328125,
-0.0020542144775390625,
0.0219268798828125,
0.0032558441162109375,
0.06817626953125,
0.054718017578125,
-0.007129669189453125,
-0.0154266357421875,
-0.00034928321838378906,
-0.0038623809814453125,
0.04638671875,
-0.00009179115295410156,
0.043365478515625,
0.004302978515625,
-0.016387939453125,
0.00525665283203125,
0.0281524658203125,
0.0345458984375,
0.00029158592224121094,
-0.0391845703125,
-0.0021495819091796875,
0.005115509033203125,
-0.0021114349365234375,
0.032623291015625,
-0.007732391357421875,
0.053314208984375,
0.0177001953125,
-0.01525115966796875,
0.0435791015625,
-0.04498291015625,
0.055084228515625,
0.007354736328125,
0.03155517578125,
-0.0113983154296875,
0.0125732421875,
0.0196075439453125,
-0.0166778564453125,
0.0112457275390625,
0.0411376953125,
-0.0300750732421875,
0.03369140625,
0.0372314453125,
0.043426513671875,
-0.0204925537109375,
-0.013214111328125,
0.048583984375,
0.060821533203125,
-0.028717041015625,
-0.05133056640625,
0.00882720947265625,
0.002605438232421875,
0.0019130706787109375,
-0.0084075927734375,
0.0251617431640625,
-0.0225372314453125,
0.011810302734375,
-0.05548095703125,
0.01541900634765625,
0.0462646484375,
0.045623779296875,
-0.00827789306640625,
0.010498046875,
-0.08544921875,
-0.0177764892578125,
-0.0338134765625,
-0.0262908935546875,
0.0010166168212890625,
0.048309326171875,
0.05657958984375,
0.0279998779296875,
0.0196075439453125,
-0.0182647705078125,
0.018524169921875,
-0.02294921875,
-0.0330810546875,
0.0035991668701171875,
-0.034210205078125,
-0.038116455078125,
-0.0196380615234375,
0.03411865234375,
0.02587890625,
0.029815673828125,
0.04248046875,
0.0175628662109375,
0.004848480224609375,
0.01123046875,
0.0400390625,
-0.0164642333984375,
-0.00942230224609375,
-0.0210418701171875,
-0.0003190040588378906,
0.036407470703125,
-0.0078887939453125,
-0.000396728515625,
-0.0011310577392578125,
0.0509033203125,
-0.00551605224609375,
0.00905609130859375,
0.004940032958984375,
-0.044036865234375,
0.035369873046875,
0.01166534423828125,
0.0772705078125,
0.031707763671875,
-0.02294921875,
0.010009765625,
-0.050872802734375,
-0.02374267578125,
0.01139068603515625,
0.025787353515625,
-0.01396942138671875,
0.03955078125,
0.003971099853515625,
0.005313873291015625,
-0.03204345703125,
-0.007068634033203125,
0.0221710205078125,
0.004116058349609375,
0.0125885009765625,
0.0259857177734375,
-0.0287628173828125,
-0.0099029541015625,
0.0125274658203125,
0.010162353515625,
-0.01279449462890625,
0.03436279296875,
0.0031986236572265625,
0.0009965896606445312,
-0.0260162353515625,
0.01248931884765625,
-0.02142333984375,
-0.03265380859375,
0.01114654541015625,
0.02911376953125,
0.0297088623046875,
-0.00299072265625,
-0.054412841796875,
0.0243377685546875,
0.032623291015625,
-0.007137298583984375,
0.05108642578125,
-0.01171875,
0.0035839080810546875,
-0.0552978515625,
-0.023956298828125,
-0.028839111328125,
0.02947998046875,
0.02496337890625,
-0.0177764892578125,
0.0223846435546875,
-0.029754638671875,
-0.0082550048828125,
0.0120849609375,
0.0092926025390625,
-0.0197906494140625,
0.03759765625,
-0.03106689453125,
0.04473876953125,
0.021881103515625,
0.0155487060546875,
-0.043701171875,
0.0190582275390625,
-0.003997802734375,
-0.011199951171875,
0.0291900634765625,
0.01438140869140625,
0.03936767578125,
-0.046630859375,
-0.032318115234375,
-0.0098724365234375,
0.0143585205078125,
-0.0182647705078125,
0.001461029052734375,
-0.01348114013671875,
-0.0157318115234375,
-0.00933837890625,
0.0102386474609375,
-0.01371002197265625,
-0.02362060546875,
-0.00884246826171875,
0.0191650390625,
-0.0171356201171875,
-0.0209197998046875,
-0.032135009765625,
0.0138397216796875,
0.049774169921875,
0.0153656005859375,
-0.09918212890625,
0.035125732421875,
-0.0185546875,
0.08306884765625,
0.003078460693359375,
-0.025360107421875,
0.00467681884765625,
0.046173095703125,
-0.0026569366455078125,
-0.0126800537109375,
-0.02740478515625,
0.0096893310546875,
-0.01456451416015625,
0.005237579345703125,
0.0233306884765625,
-0.0195770263671875,
0.00399017333984375,
-0.02197265625,
0.008514404296875,
0.021881103515625,
-0.0013523101806640625,
-0.0219879150390625,
-0.0036258697509765625,
-0.00443267822265625,
-0.007640838623046875,
-0.027069091796875,
0.02130126953125,
-0.07293701171875,
-0.053131103515625,
-0.02191162109375,
0.0174560546875,
0.021484375,
-0.01180267333984375,
-0.0531005859375,
0.0261383056640625,
-0.009674072265625,
-0.029754638671875,
-0.03765869140625,
0.032989501953125,
0.001617431640625,
0.0181121826171875,
0.00482177734375,
-0.03778076171875,
0.004711151123046875,
0.0183563232421875,
-0.00595855712890625,
0.03570556640625,
0.0207366943359375,
-0.014068603515625,
-0.029327392578125,
-0.0037555694580078125,
0.003948211669921875,
0.002277374267578125,
0.015869140625,
-0.02154541015625,
0.0221405029296875,
-0.001972198486328125,
-0.060150146484375,
0.01454925537109375,
-0.004261016845703125,
0.04742431640625,
-0.0263671875,
-0.04364013671875,
-0.040985107421875,
-0.03448486328125,
0.062103271484375,
0.062347412109375,
0.02142333984375,
-0.02130126953125,
0.0123291015625,
0.0017547607421875,
-0.03802490234375,
-0.01522064208984375,
0.0247955322265625,
-0.048980712890625,
-0.0244140625,
0.0011243820190429688,
-0.0084381103515625,
-0.032196044921875,
-0.01131439208984375,
-0.038482666015625,
-0.0261688232421875,
-0.0179290771484375,
-0.0004169940948486328,
-0.0262908935546875,
0.07177734375,
0.01202392578125,
-0.017608642578125,
0.02392578125,
-0.0350341796875,
-0.01421356201171875,
0.0218963623046875,
-0.035980224609375,
-0.034423828125,
-0.0017223358154296875,
0.003871917724609375,
0.04833984375,
-0.023101806640625,
0.058807373046875,
-0.060638427734375,
0.00984954833984375,
-0.0045013427734375,
0.016815185546875,
0.0054779052734375,
0.0013818740844726562,
-0.039764404296875,
0.0738525390625,
0.0087432861328125,
0.06182861328125,
0.035003662109375,
0.060394287109375,
-0.018707275390625,
0.06890869140625,
0.03363037109375,
-0.054412841796875,
0.03240966796875,
-0.003757476806640625,
-0.0028533935546875,
0.0218963623046875,
-0.0186920166015625,
-0.030670166015625,
0.0052490234375,
0.054595947265625,
0.0052490234375,
0.0130462646484375
]
|
e8f3ffc760c95f54652580d5a32513fb7853cd4b | Wordpress Stackexchange
Q: Check if is on child-page of a particular page I am trying to output a logo depending on which page is being viewed.
<?php if ( is_page('home') || is_page('services') ) { ?>
<div class="col-md-2 col-sm-4">
<?php ci_e_logo('<h1 class="logo ' . get_logo_class() . '">', '</h1>'); ?>
</div>
<?php }
else { ?>
<div class="col-md-2 col-sm-4">
<h1 class="logo imglogo">
<a href="http://websiteaddress.com">
<img src="<?php echo get_bloginfo('template_directory');?>/images/picturehere.png" alt="title here"></a>
</h1>
</div>
<?php } ?>
The code above works fine, but how do apply the logo image swap on the sub-pages of the 'services'?
A: You can get the Post page / post name using this method.
$parent = array_reverse(get_post_ancestors($post->ID));
$page_parent = get_post($parent[0]);
echo $page_parent->post_name;
you can use the condition as per your requirements.
| Q: Check if is on child-page of a particular page I am trying to output a logo depending on which page is being viewed.
<?php if ( is_page('home') || is_page('services') ) { ?>
<div class="col-md-2 col-sm-4">
<?php ci_e_logo('<h1 class="logo ' . get_logo_class() . '">', '</h1>'); ?>
</div>
<?php }
else { ?>
<div class="col-md-2 col-sm-4">
<h1 class="logo imglogo">
<a href="http://websiteaddress.com">
<img src="<?php echo get_bloginfo('template_directory');?>/images/picturehere.png" alt="title here"></a>
</h1>
</div>
<?php } ?>
The code above works fine, but how do apply the logo image swap on the sub-pages of the 'services'?
A: You can get the Post page / post name using this method.
$parent = array_reverse(get_post_ancestors($post->ID));
$page_parent = get_post($parent[0]);
echo $page_parent->post_name;
you can use the condition as per your requirements.
A: <?php
global $post;
if ( is_page('home') || is_page('services') ) { ?>
<div class="col-md-2 col-sm-4">
<?php ci_e_logo('<h1 class="logo ' . get_logo_class() . '">', '</h1>'); ?>
</div>
<?php }
elseif ( preg_match( '#^service(/.+)?$#', $wp->request ) ) { ?>
<div class="col-md-2 col-sm-4">
<?php ci_e_logo('<h1 class="logo ' . get_logo_class() . '">', '</h1>'); ?>
</div>
<?php
}
else { ?>
<div class="col-md-2 col-sm-4">
<h1 class="logo imglogo">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
<img src="<?php echo get_bloginfo('template_directory');?>/images/picturehere.png" alt=""></a>
</h1>
</div>
<?php } ?>
A: Same as Robert Hue's answer, this solution will get you the ID of the parent element:
echo get_post_field( 'post_parent' );
The second parameter is optional and can hold an ID (for when you are outside the loop or want to query the parent of a specific element)
$post_ID = 666;
echo get_post_field( 'post_parent', $post_ID );
This function can get you any field from the post table, like the post slug, status, type... see the docs for all available fields.
In your case the function would look like this:
if ( get_post_field( 'post_parent' ) === 9 ) :
//child of page ID 9
endif;
A: You can do that with $post->post_parent. You will have to check if child page's parent is Services page. So this is how you will check it.
I assumed 123 in following code is page ID of your services page. Replace it with actual ID.
if ( 123 == $post->post_parent ) { ?>
<div class="col-md-2 col-sm-4">
<?php ci_e_logo('<h1 class="logo ' . get_logo_class() . '">', '</h1>'); ?>
</div>
<?php }
A: Use get_post_ancestors($post). It will return an array if the current shown post is child of your parent page.
A: Try this
if ( wp_get_post_parent_id( get_the_ID() ) != 0 ) {
echo 'I am a child page';
// your code
}
A:
$post_current = get_post();
$args = array(
'post_parent' => $parent_id, // the ID of the parent
'posts_per_page' => -1,
'post_type' => 'page',
);
$children = get_posts($args);
$is_child = false;
foreach ($children as $f) {
if ( $f->ID == $post_current->post_parent ) {
// it's a child
$is_child = true;
break;
}
}
if ($is_child) {
// I'ts a child...
} else {
// It is not a child...
}
| wordpress | {
"language": "en",
"length": 483,
"provenance": "stackexchange_00019.jsonl.gz:450771",
"question_score": "14",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169306"
} | [
0.00727081298828125,
0.026031494140625,
-0.013153076171875,
0.01806640625,
0.0168914794921875,
-0.0308990478515625,
0.033843994140625,
-0.049468994140625,
0.0225677490234375,
-0.0061798095703125,
-0.05352783203125,
0.0205078125,
-0.061553955078125,
-0.01250457763671875,
-0.011505126953125,
-0.04119873046875,
0.047576904296875,
-0.0300750732421875,
0.041748046875,
0.027496337890625,
-0.0211944580078125,
0.04901123046875,
0.036590576171875,
-0.01316070556640625,
0.0312347412109375,
-0.0821533203125,
0.09271240234375,
-0.015380859375,
0.035888671875,
-0.016754150390625,
0.02227783203125,
-0.01500701904296875,
0.0184173583984375,
0.01324462890625,
0.01824951171875,
0.02191162109375,
0.00521087646484375,
0.002361297607421875,
0.02960205078125,
0.0109710693359375,
0.0184326171875,
0.00495147705078125,
0.0244293212890625,
0.01514434814453125,
-0.017425537109375,
0.0066070556640625,
-0.0278472900390625,
-0.034881591796875,
0.0162506103515625,
-0.00439453125,
0.021240234375,
-0.011993408203125,
0.011871337890625,
0.0693359375,
-0.0221099853515625,
0.01453399658203125,
-0.017547607421875,
0.035125732421875,
0.033782958984375,
-0.01399993896484375,
-0.034942626953125,
0.00445556640625,
0.0235748291015625,
-0.0093231201171875,
0.0088043212890625,
-0.01031494140625,
-0.00811767578125,
0.03643798828125,
-0.04693603515625,
-0.01495361328125,
0.032562255859375,
-0.0166778564453125,
0.0028362274169921875,
-0.02996826171875,
-0.0189208984375,
0.005584716796875,
-0.00550079345703125,
-0.0267181396484375,
0.01239776611328125,
-0.0096588134765625,
-0.060699462890625,
0.0048065185546875,
-0.09173583984375,
-0.006397247314453125,
-0.00421142578125,
0.038604736328125,
-0.03485107421875,
-0.0148468017578125,
-0.033782958984375,
0.02886962890625,
-0.025054931640625,
-0.0135955810546875,
-0.002719879150390625,
0.01528167724609375,
-0.01120758056640625,
0.0001081228256225586,
0.06671142578125,
0.09332275390625,
-0.048614501953125,
-0.017974853515625,
-0.0321044921875,
-0.02880859375,
0.00232696533203125,
-0.04034423828125,
0.0277099609375,
-0.0021381378173828125,
0.000499725341796875,
0.01271820068359375,
0.06768798828125,
0.02392578125,
0.00020754337310791016,
0.07171630859375,
-0.038818359375,
-0.041748046875,
-0.013519287109375,
0.050811767578125,
-0.0283660888671875,
-0.0253143310546875,
-0.0004520416259765625,
-0.00844573974609375,
0.04754638671875,
0.0611572265625,
0.038909912109375,
-0.034912109375,
0.0134429931640625,
0.0253143310546875,
-0.042022705078125,
-0.08465576171875,
0.035400390625,
-0.0060272216796875,
-0.038787841796875,
0.00439453125,
0.10125732421875,
0.020538330078125,
0.0200958251953125,
-0.0236358642578125,
0.004383087158203125,
-0.0089111328125,
-0.0067596435546875,
0.0168609619140625,
0.00994110107421875,
-0.03277587890625,
0.0066375732421875,
-0.0019330978393554688,
-0.0008912086486816406,
0.0030975341796875,
0.031158447265625,
0.02337646484375,
-0.026611328125,
-0.055694580078125,
0.03900146484375,
-0.00485992431640625,
0.00783538818359375,
-0.01192474365234375,
0.03692626953125,
-0.047760009765625,
-0.00016319751739501953,
-0.0155792236328125,
0.0310516357421875,
-0.006038665771484375,
0.0099639892578125,
0.0069732666015625,
0.05767822265625,
-0.004291534423828125,
-0.01377105712890625,
-0.0209808349609375,
-0.035308837890625,
-0.01751708984375,
0.022125244140625,
0.017730712890625,
0.0479736328125,
-0.0277557373046875,
-0.00418853759765625,
0.006389617919921875,
-0.0081329345703125,
0.00061798095703125,
-0.0192413330078125,
-0.0008563995361328125,
0.02972412109375,
0.00983428955078125,
-0.01216888427734375,
-0.0191497802734375,
-0.006526947021484375,
0.0162200927734375,
-0.01554107666015625,
0.0174407958984375,
0.01611328125,
0.00543975830078125,
-0.020599365234375,
0.0224609375,
0.022857666015625,
0.072265625,
-0.06329345703125,
0.036346435546875,
-0.0105438232421875,
-0.0013837814331054688,
0.00487518310546875,
0.029144287109375,
-0.00545501708984375,
-0.042236328125,
-0.023284912109375,
0.007602691650390625,
-0.014678955078125,
0.01055145263671875,
-0.0158843994140625,
-0.0194091796875,
-0.01186370849609375,
0.032501220703125,
0.0017881393432617188,
0.037689208984375,
0.0008597373962402344,
0.003101348876953125,
0.0079193115234375,
-0.0321044921875,
0.0042877197265625,
0.03631591796875,
-0.0006175041198730469,
0.0032596588134765625,
-0.007366180419921875,
0.005710601806640625,
-0.0282440185546875,
0.02117919921875,
-0.053314208984375,
-0.022064208984375,
0.056549072265625,
-0.0084381103515625,
-0.01953125,
-0.0306854248046875,
0.01433563232421875,
0.01303863525390625,
-0.06365966796875,
0.0546875,
0.03460693359375,
0.027984619140625,
-0.0289154052734375,
-0.0269775390625,
-0.0023212432861328125,
-0.05621337890625,
0.01406097412109375,
0.058319091796875,
0.0223388671875,
0.005767822265625,
-0.038848876953125,
-0.022491455078125,
0.043243408203125,
-0.032318115234375,
-0.0205841064453125,
-0.0028858184814453125,
0.006320953369140625,
0.043060302734375,
-0.01473236083984375,
0.0081329345703125,
0.00982666015625,
-0.035797119140625,
0.0241851806640625,
0.021240234375,
-0.001636505126953125,
-0.0254364013671875,
-0.0224151611328125,
0.0117340087890625,
0.00992584228515625,
0.01505279541015625,
-0.025665283203125,
0.017303466796875,
0.0047607421875,
0.00555419921875,
-0.0035114288330078125,
-0.029937744140625,
-0.053009033203125,
0.0066680908203125,
0.04095458984375,
0.019378662109375,
-0.006801605224609375,
0.03045654296875,
0.0149383544921875,
-0.0242462158203125,
-0.0149383544921875,
-0.0134429931640625,
-0.00994110107421875,
-0.01061248779296875,
-0.00984954833984375,
0.02838134765625,
0.005588531494140625,
-0.004703521728515625,
-0.0235748291015625,
-0.050384521484375,
0.0253143310546875,
0.041656494140625,
0.00507354736328125,
0.02752685546875,
0.05047607421875,
0.03765869140625,
-0.0190582275390625,
0.037994384765625,
-0.02655029296875,
-0.005886077880859375,
0.0222625732421875,
-0.02728271484375,
0.033233642578125,
-0.01513671875,
0.01216888427734375,
0.051971435546875,
-0.00453948974609375,
0.0017290115356445312,
-0.00629425048828125,
-0.028594970703125,
-0.020782470703125,
0.00858306884765625,
-0.004718780517578125,
-0.035125732421875,
-0.0012083053588867188,
0.057373046875,
0.0093841552734375,
0.026123046875,
-0.01204681396484375,
-0.051025390625,
0.0007886886596679688,
0.006229400634765625,
-0.08489990234375,
-0.0906982421875,
-0.069091796875,
-0.05682373046875,
-0.0211944580078125,
0.01389312744140625,
-0.0200653076171875,
0.024566650390625,
0.0115814208984375,
0.0236663818359375,
-0.0308074951171875,
-0.04522705078125,
-0.03778076171875,
-0.09002685546875,
-0.07147216796875,
0.0084686279296875,
0.00948333740234375,
0.0187530517578125,
-0.0031871795654296875,
0.03143310546875,
0.01947021484375,
-0.0275421142578125,
0.0208587646484375,
0.1026611328125,
0.0054473876953125,
0.0005550384521484375,
-0.057373046875,
-0.01146697998046875,
-0.0156402587890625,
0.0235748291015625,
0.01739501953125,
-0.06414794921875,
0.050689697265625,
-0.00727081298828125,
0.00807952880859375,
0.0177459716796875,
0.0252532958984375,
-0.002681732177734375,
-0.0017223358154296875,
0.0157470703125,
0.0084686279296875,
-0.028350830078125,
-0.074462890625,
-0.034393310546875,
-0.0830078125,
0.0738525390625,
0.0662841796875,
0.017120361328125,
0.00360870361328125,
0.01451873779296875,
-0.0018377304077148438,
0.00592041015625,
-0.0012769699096679688,
-0.034454345703125,
0.06494140625,
-0.0008611679077148438,
0.002498626708984375,
-0.0158843994140625,
0.01438140869140625,
-0.00907135009765625,
0.0057525634765625,
-0.01152801513671875,
0.020233154296875,
-0.0015230178833007812,
0.01490020751953125,
-0.0316162109375,
-0.05633544921875,
0.01357269287109375,
-0.0273284912109375,
0.0139617919921875,
-0.026885986328125,
-0.01123809814453125,
0.01078033447265625,
0.0838623046875,
-0.04345703125,
-0.0033245086669921875,
-0.0247955322265625,
-0.017242431640625,
0.00516510009765625,
-0.01053619384765625,
-0.03802490234375,
0.0031604766845703125,
-0.12164306640625,
0.0037899017333984375,
-0.017425537109375,
-0.0440673828125,
-0.0091094970703125,
0.0108642578125,
-0.07952880859375,
-0.04345703125,
0.0132904052734375,
0.00811004638671875,
-0.042755126953125,
0.0236053466796875,
-0.06494140625,
0.035919189453125,
-0.013763427734375,
-0.019683837890625,
-0.09033203125,
-0.0223388671875,
-0.018585205078125,
0.047821044921875,
0.017059326171875,
-0.037445068359375,
-0.0169830322265625,
0.04876708984375,
0.00374603271484375,
0.004150390625,
-0.003208160400390625,
0.01114654541015625,
-0.00792694091796875,
-0.011962890625,
-0.01302337646484375,
-0.026153564453125,
-0.0175323486328125,
-0.0086669921875,
-0.043304443359375,
0.0021915435791015625,
-0.00977325439453125,
-0.005096435546875,
0.032012939453125,
-0.01543426513671875,
-0.039520263671875,
-0.046600341796875,
0.0263214111328125,
0.019744873046875,
0.0141143798828125,
0.011688232421875,
-0.0694580078125,
-0.024871826171875,
0.006366729736328125,
0.040283203125,
-0.0283355712890625,
0.0015020370483398438,
0.0253143310546875,
0.0318603515625,
-0.0362548828125,
-0.0184326171875,
-0.0003857612609863281,
-0.0026874542236328125,
-0.01058197021484375,
0.043426513671875,
-0.0003094673156738281,
0.0002765655517578125,
0.01186370849609375,
-0.019439697265625,
-0.01119232177734375,
0.056304931640625,
0.034515380859375,
0.003963470458984375,
-0.030181884765625,
0.009063720703125,
-0.01189422607421875,
-0.0335693359375,
0.018035888671875,
-0.0208740234375,
-0.034210205078125,
-0.033721923828125,
0.052764892578125,
-0.0145263671875,
0.044097900390625,
-0.0462646484375,
0.001285552978515625,
-0.003360748291015625,
0.03607177734375,
0.03985595703125,
0.047088623046875,
-0.005771636962890625,
0.02252197265625,
0.0267333984375,
0.007762908935546875,
0.007709503173828125,
0.0477294921875,
-0.005855560302734375,
0.05780029296875,
-0.031951904296875,
-0.002414703369140625,
-0.037139892578125,
0.003345489501953125,
0.02667236328125,
0.027923583984375,
-0.02239990234375,
0.01093292236328125,
0.01351165771484375,
0.01515960693359375,
-0.01239013671875,
0.003398895263671875,
0.0155029296875,
-0.0213775634765625,
-0.01027679443359375,
0.0005245208740234375,
-0.0221099853515625,
-0.0021152496337890625,
-0.0272674560546875,
-0.01305389404296875,
-0.01085662841796875,
-0.00988006591796875,
0.01140594482421875,
0.0404052734375,
0.01953125,
0.017791748046875,
-0.0288848876953125,
-0.01959228515625,
0.01068115234375,
0.0270233154296875,
0.026763916015625,
-0.0015535354614257812,
-0.0199432373046875,
0.0128173828125,
0.0517578125,
-0.0306396484375,
0.0288543701171875,
0.008148193359375,
0.04364013671875,
0.0122528076171875,
-0.0308380126953125,
0.0211334228515625,
-0.037445068359375,
-0.035125732421875,
0.05902099609375,
-0.006134033203125,
-0.056793212890625,
-0.04229736328125,
0.005588531494140625,
0.042144775390625,
0.002948760986328125,
-0.042877197265625,
0.020111083984375,
-0.0138092041015625,
0.047943115234375,
-0.0211029052734375,
-0.05133056640625,
0.06829833984375,
0.05902099609375,
-0.053253173828125,
-0.0077362060546875,
-0.014129638671875,
0.0015392303466796875,
-0.0265350341796875,
-0.00608062744140625,
-0.034332275390625,
0.00914764404296875,
-0.0179290771484375,
0.043670654296875,
-0.0054779052734375,
-0.0268707275390625,
0.0135650634765625,
0.01277923583984375,
0.06256103515625,
0.02362060546875,
-0.040557861328125,
0.0205535888671875,
-0.05657958984375,
-0.00045680999755859375,
0.006378173828125,
-0.0276336669921875,
-0.024078369140625,
-0.040985107421875,
-0.00881195068359375,
-0.008880615234375,
0.00807952880859375,
0.010467529296875,
-0.02435302734375,
0.0215606689453125,
0.00934600830078125,
0.01113128662109375,
-0.023040771484375,
0.11492919921875,
-0.045684814453125,
0.04595947265625,
0.01021575927734375,
0.04742431640625,
-0.0215301513671875,
0.01568603515625,
-0.00548553466796875,
-0.051727294921875,
0.0012273788452148438,
0.0010442733764648438,
-0.004627227783203125,
0.02557373046875,
0.0438232421875,
0.006870269775390625,
0.005420684814453125,
0.014495849609375,
0.00963592529296875,
-0.004638671875,
-0.04156494140625,
-0.00675201416015625,
-0.0303497314453125,
0.02276611328125,
-0.00626373291015625,
0.01360321044921875,
0.022796630859375,
-0.03680419921875,
0.030914306640625,
0.0210723876953125,
0.03363037109375,
0.0178985595703125,
-0.0584716796875,
0.0556640625,
0.09954833984375,
0.008758544921875,
0.058013916015625,
-0.00476837158203125,
0.0031185150146484375,
0.046417236328125,
0.029754638671875,
0.0109100341796875,
-0.006969451904296875,
0.04473876953125,
-0.006847381591796875,
-0.01500701904296875,
0.00728607177734375,
-0.034515380859375,
-0.0111236572265625,
-0.0010700225830078125,
0.0250396728515625,
-0.01178741455078125,
0.00872039794921875,
-0.0151519775390625,
-0.0173187255859375,
0.044586181640625,
-0.00809478759765625,
0.01528167724609375,
0.046630859375,
0.01898193359375,
-0.030029296875,
-0.034912109375,
0.01187896728515625,
-0.019439697265625,
-0.0016736984252929688,
-0.029083251953125,
0.07135009765625,
0.0159912109375,
-0.004810333251953125,
-0.01474761962890625,
0.01274871826171875,
-0.019927978515625,
-0.0330810546875,
0.01702880859375,
-0.045379638671875,
0.004566192626953125,
-0.037078857421875,
-0.006336212158203125,
-0.03106689453125,
0.0255584716796875,
-0.00714874267578125,
0.009857177734375,
-0.01345062255859375,
0.033660888671875,
-0.0291900634765625,
0.00588226318359375,
0.0170135498046875,
-0.0760498046875,
-0.0182647705078125,
0.0003743171691894531,
0.028228759765625,
0.0112152099609375,
-0.044677734375,
0.010528564453125,
-0.04241943359375,
0.006805419921875,
-0.024169921875,
-0.07049560546875,
0.0418701171875,
-0.0200653076171875,
-0.01287078857421875,
0.0195159912109375,
0.01436614990234375,
-0.01264190673828125,
-0.0114593505859375,
0.03131103515625,
-0.0557861328125,
-0.06414794921875,
0.008453369140625,
-0.074462890625,
-0.04833984375,
-0.0389404296875,
-0.0679931640625,
0.1007080078125,
-0.0301055908203125,
0.062164306640625,
0.0120086669921875,
0.0313720703125,
-0.00803375244140625,
-0.002391815185546875,
-0.030181884765625,
0.041595458984375,
0.04437255859375,
0.06671142578125,
-0.0116424560546875,
-0.016265869140625,
0.059844970703125,
0.04833984375,
-0.01103973388671875,
-0.0029392242431640625,
-0.041107177734375,
-0.0013074874877929688,
0.0244293212890625,
0.0284271240234375,
0.03741455078125,
0.03753662109375,
-0.0234375,
0.00545501708984375,
0.038360595703125,
-0.043792724609375,
0.0167083740234375,
0.0056610107421875,
-0.0078277587890625,
0.008453369140625,
0.00482940673828125,
0.001392364501953125,
-0.017181396484375,
0.004329681396484375,
-0.059814453125,
0.0011758804321289062,
0.041595458984375,
-0.018280029296875,
0.015411376953125,
0.0305633544921875,
0.039306640625,
-0.050537109375,
-0.0263214111328125,
-0.0173187255859375,
0.0469970703125,
0.01142120361328125,
0.009674072265625,
-0.006420135498046875,
0.01309967041015625,
0.0074005126953125,
0.021392822265625,
0.0066680908203125,
0.052337646484375,
-0.03466796875,
0.02020263671875,
0.035614013671875,
0.0229949951171875,
-0.0014333724975585938,
0.013916015625,
0.0170135498046875,
0.037689208984375,
-0.037017822265625,
-0.0112762451171875,
0.0203704833984375,
-0.0091552734375,
-0.01092529296875,
-0.0010004043579101562,
-0.003173828125,
-0.042510986328125,
-0.024993896484375,
-0.01491546630859375,
0.001190185546875,
0.051849365234375,
0.01153564453125,
0.012969970703125,
0.0002053976058959961,
-0.048675537109375,
0.0008683204650878906,
-0.004711151123046875,
-0.01221466064453125,
0.01267242431640625,
0.039703369140625,
0.0156402587890625,
0.02764892578125,
-0.0240631103515625,
-0.012603759765625,
-0.007167816162109375,
-0.01849365234375,
-0.007205963134765625,
0.0160980224609375,
-0.0174713134765625,
0.00713348388671875,
-0.0023040771484375,
0.033599853515625,
0.0158233642578125,
0.030059814453125,
0.019134521484375,
0.0212554931640625,
-0.0090179443359375,
0.0035839080810546875,
0.071044921875,
-0.0200042724609375,
0.025634765625,
-0.0005893707275390625,
-0.0217437744140625,
0.01416015625,
-0.033050537109375,
-0.0012798309326171875,
0.01318359375,
0.037445068359375,
-0.023193359375,
0.050384521484375,
0.00264739990234375,
0.005840301513671875,
0.035125732421875,
0.0169830322265625,
0.063720703125,
0.0195770263671875,
-0.044036865234375,
-0.0020236968994140625,
-0.00861358642578125,
-0.054168701171875,
0.006275177001953125,
0.040069580078125,
-0.0166168212890625,
0.0014333724975585938,
0.0131683349609375,
-0.018341064453125,
-0.0061492919921875,
0.022491455078125,
-0.0186614990234375,
0.043731689453125,
0.038177490234375,
0.01476287841796875,
-0.002361297607421875,
-0.004913330078125,
-0.00848388671875,
0.02484130859375,
0.0093994140625,
0.079833984375,
-0.03765869140625,
0.0285797119140625,
0.015045166015625,
0.007568359375,
-0.0158843994140625,
-0.0203857421875,
0.08099365234375,
-0.0205078125,
-0.0103912353515625,
-0.028106689453125,
-0.043212890625,
0.022003173828125,
0.0156097412109375,
0.0035305023193359375,
0.02984619140625,
-0.02178955078125,
0.01041412353515625,
-0.0034008026123046875,
-0.007289886474609375,
-0.0124969482421875,
-0.02825927734375,
-0.041107177734375,
-0.0019207000732421875,
0.03607177734375,
0.0277099609375,
-0.032989501953125,
0.03839111328125,
0.0033779144287109375,
-0.052886962890625,
0.033447265625,
-0.050628662109375,
0.06646728515625,
0.042938232421875,
-0.00527191162109375,
-0.046844482421875,
-0.01480865478515625,
-0.00537872314453125,
-0.0007176399230957031,
0.00756072998046875,
0.035064697265625,
-0.01049041748046875,
-0.0213775634765625,
0.031951904296875,
0.0309295654296875,
0.021484375,
-0.026702880859375,
-0.00450897216796875,
0.065673828125,
-0.02783203125,
-0.0171356201171875,
-0.03680419921875,
-0.01302337646484375,
-0.035736083984375,
0.0087738037109375,
0.01068115234375,
0.01483917236328125,
-0.0095367431640625,
0.022186279296875,
-0.0207672119140625,
0.0439453125,
0.007137298583984375,
-0.0168304443359375,
-0.0176849365234375,
-0.0129547119140625,
-0.0007557868957519531,
0.030670166015625,
0.00852203369140625,
-0.0099334716796875,
-0.01129913330078125,
-0.0411376953125,
-0.0047760009765625,
-0.0271148681640625,
0.007633209228515625,
-0.008758544921875,
0.03143310546875,
0.050872802734375,
-0.0377197265625,
-0.005096435546875,
0.017730712890625,
0.024810791015625,
0.069091796875,
-0.0012035369873046875,
-0.03857421875,
-0.022979736328125,
0.00893402099609375,
-0.0035762786865234375,
0.018280029296875,
0.045623779296875,
-0.0194091796875,
-0.038116455078125,
0.0019016265869140625,
-0.005702972412109375,
0.0216217041015625,
-0.0302886962890625,
-0.027435302734375,
0.09576416015625,
0.0008463859558105469,
-0.027618408203125,
-0.02362060546875,
0.01125335693359375,
-0.0258941650390625,
0.0202789306640625,
0.0062255859375,
-0.040863037109375,
-0.00749969482421875,
0.0311737060546875,
0.006839752197265625,
0.03363037109375,
-0.0229339599609375,
0.01071929931640625,
-0.05340576171875,
0.0394287109375,
0.0186767578125,
0.01373291015625,
-0.003131866455078125,
0.0139312744140625,
0.006458282470703125,
0.038726806640625,
-0.0242767333984375,
-0.02423095703125,
0.006145477294921875,
-0.007740020751953125,
0.0167083740234375,
-0.06610107421875,
-0.00708770751953125,
-0.0011281967163085938,
0.0347900390625,
-0.0011386871337890625,
-0.002040863037109375,
-0.023651123046875,
-0.0185394287109375,
-0.053131103515625,
-0.06463623046875,
-0.002429962158203125,
0.035797119140625,
-0.0654296875,
0.01108551025390625,
0.02935791015625,
-0.0110626220703125,
-0.02264404296875,
0.0191650390625,
-0.036102294921875,
-0.021820068359375,
0.0201416015625,
-0.0010356903076171875,
-0.0202178955078125,
0.004062652587890625,
0.036041259765625,
-0.023193359375,
0.01169586181640625,
-0.0061492919921875,
0.01242828369140625,
0.0185546875,
0.00386810302734375,
0.0269775390625,
0.049713134765625,
-0.04437255859375,
-0.0006413459777832031,
0.036590576171875,
0.01557159423828125,
-0.0180206298828125,
-0.0159759521484375,
-0.04339599609375,
-0.01410675048828125,
0.0250091552734375,
-0.032684326171875,
-0.037078857421875,
0.016021728515625,
0.02166748046875,
0.0517578125,
0.00817108154296875,
0.0745849609375,
0.033416748046875,
0.026214599609375,
0.02978515625,
-0.031768798828125,
0.048736572265625,
-0.044891357421875,
-0.0175628662109375,
-0.01378631591796875,
-0.04541015625,
-0.0806884765625,
0.047210693359375,
-0.01538848876953125,
-0.005016326904296875,
0.04718017578125
]
|
5f88b8aa48f8b155c6fb04896ae692e624768a9c | Wordpress Stackexchange
Q: Should I sanitize an email address before passing it to the is_email() function? I'm using is_email() to check if a user-provided email address is valid. For example:
$email = $_POST['email'];
if ( is_email( $email ) )
// Do something.
To the best of my knowledge, nothing in this function writes info to the database. Should I be sanitizing $email before I pass it to the function?
A: Looking at the is_email() functionality on trac, it looks like you don't need to sanatizie as it's just string testing. I would even go so far as to say that if this function returns true, you wouldn't need to sanitize it before sending it into the database.
| Q: Should I sanitize an email address before passing it to the is_email() function? I'm using is_email() to check if a user-provided email address is valid. For example:
$email = $_POST['email'];
if ( is_email( $email ) )
// Do something.
To the best of my knowledge, nothing in this function writes info to the database. Should I be sanitizing $email before I pass it to the function?
A: Looking at the is_email() functionality on trac, it looks like you don't need to sanatizie as it's just string testing. I would even go so far as to say that if this function returns true, you wouldn't need to sanitize it before sending it into the database.
A: Sanitize all the things!
One of the cardinal rules of security is to never trust the input from the user. In general, I don't care about the implementation of is_email() or any other specific function, or if that function does anything dangerous with what I give it. Maybe the implementation will change some day. Who knows. I have to assume it can be compromised. The assumption should always be that user input is actively hostile, doubly so for anything eventually destined for a database, and to sanitize every bit of user input before handing it off to some function. This is just good, general security hygiene.
A: WordPress and PHP core
The is_email() function Source is a typical WordPress implementation and does not work completely with what the RFC 6531 allows. One reason might be, that the default PHP FILTER_VALIDATE_EMAIL constant for filter_var() isn't much better at validating something according to the The Internet Engineering Task Force (IETF®) guidelines.
Standards
Point is that the RFC 6531 allows "Unicode characters beyond the ASCII range". Namely those are (for the local part - before the @):
*
*Uppercase and lowercase English letters (a–z, A–Z) (ASCII: 65–90, 97–122)
*
*Digits 0 to 9 (ASCII: 48–57)
*These special characters: ! # $ % & ' * + - / = ? ^ _ ` { | } ~
*Character . (dot, period, full stop) (ASCII: 46) provided that it is not the first or last character, and provided also that it does not appear consecutively (e.g. [email protected] is not allowed).
*Special characters are allowed with restrictions. They are:
*
*Space and "(),:;<>@[\] (ASCII: 32, 34, 40, 41, 44, 58, 59, 60, 62, 64, 91–93)
*The restrictions for special characters are that they must only be used when contained between quotation marks, and that 2 of them (the backslash \ and quotation mark " (ASCII: 92, 34)) must also be preceded by a backslash \ (e.g. "\\" and "\"").
*Comments are allowed with parentheses at either end of the local part; e.g. john.smith(comment)@example.com and (comment)[email protected] are both equivalent to "[email protected]", but john.(comment)[email protected] would be invalid.
*International characters above U+007F, encoded as UTF-8, are permitted by RFC 6531, though mail systems may restrict which characters to use when assigning local parts.
and for the global/domain part:
The domain name part of an email address has to conform to strict guidelines: it must match the requirements for a hostname, consisting of letters, digits, hyphens and dots. In addition, the domain part may be an IP address literal, surrounded by square braces, such as jsmith@[192.168.2.1] or jsmith@[IPv6:2001:db8::1] […]
Source: Wikipedia
What is valid?
This can lead to strange, but valid e-mail addresses like the following:
*
*[email protected]
*
*(comment)[email protected]
*"this is v@lid!"@example.com
*"much.more unusual"@example.com
*postbox@com
*admin@mailserver1
*"()<>[]:,;\\@\"\\\\!#$%&\'*+-/=?^_`{}| ~.a"@example.org
*" "@example.org
Source: php.net / author [email protected] – example fixed by author of this post
Limits
There are also local & domain length limits:
The format of email addresses is local-part@domain where the local-part may be up to 64 characters long and the domain name may have a maximum of 253 characters – but the maximum of 256-character length of a forward or reverse path restricts the entire email address to be no more than 254 characters long.[2] The formal definitions are in RFC 5322 (sections 3.2.3 and 3.4.1) and RFC 5321 – with a more readable form given in the informational RFC 3696[3] and the associated errata.
Source: Wikipedia
WordPress restrictions
And this is what WordPress checks for:
*
*Test for the minimum length the email can be: strlen( $email ) < 3
*Test for an @ character after the first position: strpos( $email, '@', 1 ) === false
*Test for invalid characters: !preg_match( '/^[a-zA-Z0-9!#$%&\'*+\/=?^_`{|}~\.-]+$/', $local )
*Test for sequences of periods: preg_match( '/\.{2,}/', $domain )
*Test for leading and trailing periods and whitespace: trim( $domain, " \t\n\r\0\x0B." ) !== $domain
*Assume the domain will have at least two subs: $subs = explode( '.', $domain ); and then
*2 > count( $subs )
*trim( $sub, " \t\n\r\0\x0B-" ) !== $sub
*!preg_match('/^[a-z0-9-]+$/i', $sub )
Source: WP Core v4.0
Filters & custom validation
All above mentioned cases will trigger is_email() to return false. The result is filter-able (a callback can be attached) and the filter will have three arguments, where the last argument is the reason. Example:
return apply_filters( 'is_email', false, $email, 'sub_hyphen_limits' );
which means that you can override results returned by specific checks.
This allows you to add special checks, for example to allow Umlaut-domains, TLD-only domain parts, etc.
Conclusion
WordPress is safe for most cases, but more restrictive as mail servers actually have to be to be RFC compliant. Keep in mind that not every mail server will align with the RF 6531 guidelines.
Edit
Funny sidefact: There are two related functions inside ~/wp-includes/formatting: is_email() and sanitize_email(). They are practically the same function. I have no idea why someone decided that it would be a good idea to copy the function contents from one over to another instead of just adding the one as callback to the filters the other provides. As is_email() since v0.71 and sanitize_email() since v1.5 are the same, I personally would use the later as you get a cleaned string. Note that is_email() even states that it isn't RFC compliant.
| wordpress | {
"language": "en",
"length": 992,
"provenance": "stackexchange_00019.jsonl.gz:450781",
"question_score": "13",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169360"
} | [
0.05792236328125,
0.0022430419921875,
-0.0204315185546875,
-0.0787353515625,
0.0291900634765625,
-0.0251922607421875,
-0.016571044921875,
-0.01529693603515625,
-0.01136016845703125,
0.029144287109375,
-0.005096435546875,
0.01444244384765625,
-0.016448974609375,
-0.0257720947265625,
-0.01593017578125,
-0.019500732421875,
-0.00353240966796875,
0.01226806640625,
-0.00044345855712890625,
-0.03375244140625,
0.01436614990234375,
-0.036773681640625,
-0.016265869140625,
-0.02301025390625,
-0.015716552734375,
0.01332855224609375,
0.087646484375,
-0.02410888671875,
0.003910064697265625,
-0.00919342041015625,
0.007671356201171875,
-0.012664794921875,
0.0166168212890625,
0.07708740234375,
-0.058685302734375,
0.035919189453125,
-0.0017070770263671875,
0.031402587890625,
0.0184173583984375,
0.0253753662109375,
0.0438232421875,
-0.037567138671875,
0.036773681640625,
0.01189422607421875,
0.006687164306640625,
-0.026641845703125,
0.0499267578125,
-0.033538818359375,
0.00943756103515625,
0.0030231475830078125,
0.01380157470703125,
0.01490020751953125,
0.0272369384765625,
-0.0197296142578125,
-0.011138916015625,
0.01416778564453125,
-0.00882720947265625,
-0.0297393798828125,
-0.0087432861328125,
0.05548095703125,
0.0162200927734375,
0.02716064453125,
-0.01110076904296875,
-0.0201873779296875,
0.00315093994140625,
-0.02349853515625,
-0.0154571533203125,
0.042999267578125,
-0.057708740234375,
-0.0333251953125,
0.01036834716796875,
-0.0170135498046875,
0.00891876220703125,
-0.00324249267578125,
-0.0280303955078125,
-0.002635955810546875,
0.041351318359375,
0.01316070556640625,
-0.00415802001953125,
0.006809234619140625,
-0.03814697265625,
-0.024444580078125,
-0.09478759765625,
0.0195465087890625,
-0.01541900634765625,
0.05218505859375,
-0.0242767333984375,
-0.01123046875,
0.02203369140625,
-0.06170654296875,
-0.003932952880859375,
-0.006317138671875,
0.039947509765625,
-0.060943603515625,
-0.0635986328125,
-0.05255126953125,
0.0304107666015625,
0.03826904296875,
-0.0279998779296875,
-0.04913330078125,
0.03460693359375,
-0.037841796875,
-0.0136260986328125,
-0.00643157958984375,
-0.003326416015625,
0.034149169921875,
0.0113372802734375,
-0.0287933349609375,
0.00128173828125,
-0.002971649169921875,
-0.0114593505859375,
-0.0217437744140625,
-0.04547119140625,
-0.0278778076171875,
-0.024200439453125,
0.033111572265625,
-0.044921875,
0.0031185150146484375,
-0.0010662078857421875,
0.00569915771484375,
0.0171356201171875,
0.0258331298828125,
0.018951416015625,
-0.04302978515625,
-0.01043701171875,
-0.033172607421875,
-0.032012939453125,
-0.01476287841796875,
0.01561737060546875,
0.051544189453125,
-0.037384033203125,
-0.003910064697265625,
0.03704833984375,
0.0021839141845703125,
-0.005878448486328125,
-0.0297088623046875,
-0.007049560546875,
0.0039825439453125,
0.0186309814453125,
-0.00567626953125,
-0.0012302398681640625,
-0.030548095703125,
0.035552978515625,
0.0311126708984375,
-0.007904052734375,
0.03790283203125,
0.0167999267578125,
-0.0007963180541992188,
-0.0098876953125,
-0.04998779296875,
0.0088043212890625,
-0.058990478515625,
-0.0088348388671875,
0.0232696533203125,
-0.01555633544921875,
0.046112060546875,
-0.0258331298828125,
0.0352783203125,
-0.0173492431640625,
0.03033447265625,
0.049041748046875,
-0.00640106201171875,
-0.0024127960205078125,
-0.01261138916015625,
-0.033905029296875,
-0.0126800537109375,
-0.061431884765625,
-0.002185821533203125,
0.019866943359375,
-0.038238525390625,
0.0106048583984375,
0.03057861328125,
0.02587890625,
0.0035419464111328125,
-0.0021343231201171875,
-0.007251739501953125,
0.0215911865234375,
0.007373809814453125,
0.0258026123046875,
0.03924560546875,
-0.0010671615600585938,
-0.0321044921875,
0.040496826171875,
-0.0273895263671875,
-0.0220184326171875,
0.01033782958984375,
0.004894256591796875,
0.024810791015625,
0.0301361083984375,
0.0103759765625,
0.00716400146484375,
0.03558349609375,
0.007152557373046875,
-0.04461669921875,
0.007030487060546875,
-0.0260467529296875,
0.0213623046875,
-0.033782958984375,
0.001544952392578125,
0.0408935546875,
0.022491455078125,
-0.044677734375,
0.04669189453125,
-0.032806396484375,
-0.0199432373046875,
-0.0269012451171875,
-0.0141754150390625,
0.01381683349609375,
-0.0341796875,
0.047698974609375,
0.02362060546875,
0.000461578369140625,
-0.039703369140625,
0.036956787109375,
0.034912109375,
0.00457000732421875,
-0.02056884765625,
0.01090240478515625,
-0.043365478515625,
0.06591796875,
-0.07763671875,
-0.016082763671875,
-0.070068359375,
0.014862060546875,
-0.0033969879150390625,
0.004146575927734375,
-0.005855560302734375,
0.0078277587890625,
-0.030853271484375,
0.01039886474609375,
0.0166015625,
0.0260467529296875,
0.09295654296875,
0.03753662109375,
-0.051025390625,
-0.0168304443359375,
-0.0182952880859375,
-0.05908203125,
-0.0271148681640625,
0.07464599609375,
0.0184478759765625,
0.03399658203125,
-0.0235595703125,
-0.0024967193603515625,
0.0443115234375,
-0.0134124755859375,
0.0035858154296875,
0.0008254051208496094,
0.00453948974609375,
0.024200439453125,
-0.048004150390625,
0.010101318359375,
0.0312347412109375,
-0.05926513671875,
0.0004591941833496094,
0.0484619140625,
-0.0264129638671875,
-0.06689453125,
-0.00595855712890625,
0.033355712890625,
0.0187835693359375,
0.0130462646484375,
-0.0180511474609375,
0.0263214111328125,
0.031829833984375,
-0.031829833984375,
0.01131439208984375,
-0.01497650146484375,
0.0198516845703125,
-0.0097503662109375,
0.0022869110107421875,
-0.061187744140625,
0.0159454345703125,
0.053497314453125,
-0.000014185905456542969,
0.01441192626953125,
-0.032623291015625,
-0.0223236083984375,
0.041259765625,
0.02862548828125,
-0.030303955078125,
-0.00109100341796875,
0.00946807861328125,
-0.0183563232421875,
-0.0035991668701171875,
-0.005397796630859375,
0.02667236328125,
-0.0162200927734375,
0.038360595703125,
0.001247406005859375,
0.035400390625,
-0.0092315673828125,
-0.040283203125,
0.055877685546875,
0.0031948089599609375,
-0.05352783203125,
-0.08831787109375,
0.035736083984375,
-0.01029205322265625,
-0.0117950439453125,
-0.0374755859375,
0.040008544921875,
0.0196533203125,
-0.0177154541015625,
0.0199737548828125,
-0.07159423828125,
0.009735107421875,
0.039947509765625,
0.0003428459167480469,
-0.04840087890625,
-0.019287109375,
0.01216888427734375,
0.00580596923828125,
0.052703857421875,
-0.0408935546875,
-0.06414794921875,
-0.0153350830078125,
0.0019063949584960938,
-0.0623779296875,
-0.049407958984375,
-0.0245208740234375,
0.01265716552734375,
-0.05279541015625,
0.01206207275390625,
0.0172271728515625,
0.0173797607421875,
-0.038665771484375,
-0.020599365234375,
0.009033203125,
-0.0160675048828125,
-0.0670166015625,
-0.039947509765625,
-0.0594482421875,
0.008209228515625,
-0.00707244873046875,
0.0004119873046875,
-0.00933837890625,
0.056976318359375,
-0.01806640625,
-0.05731201171875,
-0.0209808349609375,
-0.0175323486328125,
0.0088348388671875,
0.00550079345703125,
-0.04241943359375,
-0.0024776458740234375,
-0.027740478515625,
0.0033817291259765625,
0.005512237548828125,
-0.0230255126953125,
0.00806427001953125,
0.0060577392578125,
0.03070068359375,
0.007244110107421875,
0.0577392578125,
-0.040985107421875,
-0.048309326171875,
0.022186279296875,
0.01580810546875,
-0.0472412109375,
0.01035308837890625,
0.03570556640625,
-0.002391815185546875,
-0.03363037109375,
-0.01482391357421875,
-0.0269775390625,
0.01050567626953125,
-0.01078033447265625,
-0.00032448768615722656,
-0.0026836395263671875,
0.01995849609375,
-0.00801849365234375,
-0.0184326171875,
-0.00818634033203125,
-0.0091400146484375,
0.0015783309936523438,
-0.0245361328125,
-0.02154541015625,
-0.06561279296875,
-0.04290771484375,
0.018402099609375,
-0.00586700439453125,
0.027252197265625,
-0.01377105712890625,
-0.0243377685546875,
0.035064697265625,
0.02569580078125,
0.04766845703125,
-0.01456451416015625,
-0.03009033203125,
-0.004413604736328125,
0.082275390625,
0.0452880859375,
-0.0253448486328125,
0.006378173828125,
-0.001312255859375,
-0.048797607421875,
0.0163421630859375,
-0.0166015625,
0.008941650390625,
0.0022220611572265625,
0.006816864013671875,
-0.0303802490234375,
-0.0024776458740234375,
-0.01296234130859375,
-0.05706787109375,
0.025543212890625,
-0.0435791015625,
0.01155853271484375,
-0.0408935546875,
0.0023174285888671875,
0.0277252197265625,
-0.0079498291015625,
0.0007090568542480469,
-0.00615692138671875,
-0.05609130859375,
-0.0364990234375,
-0.0022125244140625,
-0.0298309326171875,
0.0281219482421875,
-0.006381988525390625,
0.0518798828125,
-0.0164337158203125,
0.0281982421875,
0.00787353515625,
-0.043060302734375,
0.0216522216796875,
0.00576019287109375,
-0.031280517578125,
0.018585205078125,
0.00783538818359375,
-0.0116729736328125,
0.0130615234375,
0.01019287109375,
-0.020843505859375,
-0.007320404052734375,
-0.04083251953125,
-0.021453857421875,
0.0137786865234375,
-0.031646728515625,
-0.0009937286376953125,
-0.02508544921875,
-0.033599853515625,
-0.0005779266357421875,
-0.03424072265625,
-0.0020809173583984375,
-0.01203155517578125,
-0.0065155029296875,
0.06524658203125,
-0.0262298583984375,
-0.0186309814453125,
-0.01442718505859375,
0.029296875,
0.0179443359375,
-0.03265380859375,
-0.016937255859375,
-0.0012598037719726562,
0.038970947265625,
-0.0092315673828125,
-0.01029205322265625,
-0.0074005126953125,
-0.052154541015625,
0.0196380615234375,
0.01265716552734375,
-0.00783538818359375,
-0.0197906494140625,
0.06298828125,
0.01212310791015625,
0.0246734619140625,
-0.032623291015625,
-0.00951385498046875,
0.04058837890625,
0.0186614990234375,
0.022857666015625,
-0.0111083984375,
0.0118408203125,
-0.01544189453125,
-0.0219268798828125,
0.0194091796875,
0.031646728515625,
-0.03753662109375,
0.027801513671875,
-0.00727081298828125,
0.0137939453125,
0.0120391845703125,
-0.01195526123046875,
0.002506256103515625,
-0.0215911865234375,
-0.00614166259765625,
-0.0384521484375,
0.002513885498046875,
-0.01148223876953125,
0.0288848876953125,
-0.03204345703125,
-0.0037212371826171875,
-0.0271453857421875,
0.004825592041015625,
0.0283050537109375,
0.0216064453125,
-0.012359619140625,
-0.0206756591796875,
-0.01200103759765625,
0.0008764266967773438,
-0.02349853515625,
0.003353118896484375,
0.0179443359375,
-0.019073486328125,
-0.01947021484375,
0.005306243896484375,
-0.0196075439453125,
0.007328033447265625,
-0.028045654296875,
-0.00954437255859375,
0.00399017333984375,
-0.0274505615234375,
0.0313720703125,
0.020538330078125,
-0.003208160400390625,
0.024139404296875,
-0.0088653564453125,
0.0003275871276855469,
0.07305908203125,
-0.0011844635009765625,
0.033203125,
0.006378173828125,
-0.050018310546875,
0.004207611083984375,
0.01230621337890625,
-0.05194091796875,
-0.0077972412109375,
0.0024814605712890625,
0.043670654296875,
-0.01242828369140625,
-0.01317596435546875,
0.01123046875,
-0.004734039306640625,
-0.0443115234375,
0.024627685546875,
-0.006267547607421875,
-0.044708251953125,
-0.03631591796875,
-0.037689208984375,
-0.0010509490966796875,
0.0183868408203125,
-0.006603240966796875,
0.005542755126953125,
-0.04852294921875,
0.01514434814453125,
-0.0222625732421875,
0.029083251953125,
-0.02850341796875,
-0.0318603515625,
0.035247802734375,
-0.0190582275390625,
-0.034271240234375,
0.051971435546875,
0.044525146484375,
-0.032196044921875,
-0.0399169921875,
0.034637451171875,
0.0038852691650390625,
0.04290771484375,
-0.04449462890625,
-0.00218963623046875,
-0.03564453125,
-0.0034809112548828125,
0.027252197265625,
0.006420135498046875,
-0.0670166015625,
0.0018310546875,
-0.0750732421875,
-0.01471710205078125,
-0.0445556640625,
-0.03277587890625,
-0.0423583984375,
0.01727294921875,
0.005451202392578125,
0.04815673828125,
0.0002510547637939453,
-0.042144775390625,
-0.0059051513671875,
-0.02459716796875,
-0.0098114013671875,
0.0301971435546875,
-0.02398681640625,
0.0352783203125,
-0.0033664703369140625,
0.019195556640625,
-0.00820159912109375,
0.005893707275390625,
0.0070037841796875,
-0.000324249267578125,
-0.036285400390625,
-0.0222015380859375,
0.0288238525390625,
0.00028514862060546875,
0.023956298828125,
0.0099945068359375,
0.04852294921875,
0.0283966064453125,
0.01236724853515625,
-0.0311737060546875,
-0.0157928466796875,
-0.019287109375,
0.05767822265625,
-0.03143310546875,
0.017974853515625,
0.0056304931640625,
-0.0009517669677734375,
-0.04730224609375,
-0.0052032470703125,
-0.03448486328125,
0.0106353759765625,
0.04217529296875,
-0.025421142578125,
-0.02008056640625,
-0.01348876953125,
0.0467529296875,
0.0526123046875,
-0.023895263671875,
0.0257110595703125,
0.028900146484375,
0.00505828857421875,
0.0096282958984375,
0.0134124755859375,
-0.0303802490234375,
-0.0377197265625,
0.0213775634765625,
-0.00933074951171875,
0.01129150390625,
0.0191497802734375,
0.002376556396484375,
0.0399169921875,
0.0750732421875,
0.122802734375,
-0.09552001953125,
0.0086517333984375,
0.0379638671875,
-0.03289794921875,
0.006641387939453125,
-0.0272216796875,
0.01224517822265625,
-0.0197601318359375,
0.0777587890625,
-0.01177978515625,
-0.011871337890625,
0.0254974365234375,
-0.040008544921875,
0.01436614990234375,
-0.01297760009765625,
0.1048583984375,
0.0270538330078125,
-0.046630859375,
0.004680633544921875,
0.04132080078125,
-0.0087738037109375,
-0.0196990966796875,
0.026885986328125,
-0.0046539306640625,
-0.0181732177734375,
-0.030792236328125,
0.014984130859375,
0.00896453857421875,
-0.0164947509765625,
-0.06719970703125,
-0.021148681640625,
0.06231689453125,
0.00811004638671875,
0.003017425537109375,
-0.0726318359375,
0.006252288818359375,
0.006923675537109375,
-0.0253143310546875,
-0.0304718017578125,
-0.01123046875,
0.058837890625,
-0.034881591796875,
0.020355224609375,
0.00011426210403442383,
0.0015344619750976562,
-0.00042438507080078125,
0.008636474609375,
0.063720703125,
0.00959014892578125,
-0.024658203125,
0.031097412109375,
-0.0173492431640625,
-0.003635406494140625,
-0.03204345703125,
0.01378631591796875,
-0.025482177734375,
0.0012388229370117188,
-0.026397705078125,
-0.032196044921875,
-0.0047454833984375,
-0.052581787109375,
-0.059906005859375,
0.05718994140625,
0.0271453857421875,
0.04461669921875,
-0.0293121337890625,
0.02178955078125,
0.0221099853515625,
0.01274871826171875,
0.006145477294921875,
0.0033588409423828125,
0.00974273681640625,
0.03656005859375,
0.004032135009765625,
0.011016845703125,
0.03021240234375,
0.043670654296875,
0.02069091796875,
0.00943756103515625,
0.0309600830078125,
0.002208709716796875,
0.0091705322265625,
0.0203399658203125,
-0.031585693359375,
-0.017059326171875,
-0.01337432861328125,
-0.0166778564453125,
0.0748291015625,
-0.01116180419921875,
0.04815673828125,
-0.0006375312805175781,
0.01119232177734375,
-0.0047149658203125,
-0.0008368492126464844,
-0.00788116455078125,
-0.019256591796875,
0.01377105712890625,
-0.017364501953125,
-0.010223388671875,
0.012451171875,
-0.0233612060546875,
-0.031402587890625,
0.02056884765625,
-0.00460052490234375,
-0.0443115234375,
0.031280517578125,
-0.039642333984375,
0.04449462890625,
-0.0175628662109375,
0.058868408203125,
0.060150146484375,
0.0362548828125,
0.06475830078125,
0.03179931640625,
0.047760009765625,
0.0036640167236328125,
0.00896453857421875,
0.0306549072265625,
0.013671875,
0.0160369873046875,
-0.06390380859375,
-0.061767578125,
0.0394287109375,
0.046600341796875,
-0.011962890625,
-0.0047149658203125,
-0.0189971923828125,
0.01010894775390625,
0.0136566162109375,
-0.024993896484375,
0.0301513671875,
-0.016387939453125,
-0.0283203125,
-0.018463134765625,
0.0005035400390625,
0.046142578125,
0.0290985107421875,
0.0205078125,
0.0205535888671875,
-0.044830322265625,
-0.01097869873046875,
-0.01593017578125,
-0.008544921875,
0.0246124267578125,
0.02166748046875,
-0.00093841552734375,
0.022796630859375,
0.04168701171875,
0.0115203857421875,
-0.057098388671875,
0.0262908935546875,
0.01064300537109375,
0.03564453125,
-0.026275634765625,
0.0118408203125,
0.01470947265625,
0.0195465087890625,
-0.01300048828125,
0.019195556640625,
0.0246124267578125,
0.0333251953125,
-0.0300445556640625,
-0.01264190673828125,
0.0699462890625,
-0.03619384765625,
0.036163330078125,
-0.00800323486328125,
0.0070648193359375,
0.000858306884765625,
-0.0308837890625,
-0.038818359375,
0.037841796875,
0.047637939453125,
-0.01148223876953125,
0.033416748046875,
0.005161285400390625,
-0.015777587890625,
0.0233001708984375,
-0.017974853515625,
0.04156494140625,
0.029937744140625,
0.00475311279296875,
-0.032196044921875,
0.037628173828125,
0.030517578125,
-0.01007843017578125,
0.0185089111328125,
0.018829345703125,
0.011871337890625,
0.058074951171875,
-0.050262451171875,
0.051483154296875,
0.039154052734375,
-0.027923583984375,
-0.00732421875,
0.04351806640625,
-0.0235443115234375,
-0.02020263671875,
-0.0201873779296875,
0.031768798828125,
0.038543701171875,
-0.0259552001953125,
0.056854248046875,
-0.028961181640625,
-0.005275726318359375,
-0.025848388671875,
0.054901123046875,
-0.09869384765625,
-0.04034423828125,
0.052734375,
-0.03167724609375,
-0.0090789794921875,
0.022003173828125,
-0.022247314453125,
0.023773193359375,
0.02252197265625,
-0.0458984375,
0.04241943359375,
-0.054779052734375,
-0.007770538330078125,
-0.040130615234375,
0.04132080078125,
-0.0217132568359375,
-0.052581787109375,
-0.01094818115234375,
0.03143310546875,
-0.003276824951171875,
0.0264739990234375,
-0.03179931640625,
0.022216796875,
-0.018646240234375,
-0.0041351318359375,
0.0079345703125,
-0.023895263671875,
0.0232086181640625,
0.01412200927734375,
-0.042449951171875,
0.0020923614501953125,
-0.0159912109375,
-0.0208282470703125,
0.015167236328125,
0.01157379150390625,
0.0003285408020019531,
0.013641357421875,
0.048431396484375,
-0.0574951171875,
0.0426025390625,
0.051971435546875,
0.041595458984375,
0.0243682861328125,
-0.03033447265625,
-0.039886474609375,
-0.0240020751953125,
-0.0238189697265625,
-0.027557373046875,
-0.022430419921875,
-0.0012788772583007812,
0.0019350051879882812,
-0.01177978515625,
-0.04876708984375,
-0.02484130859375,
0.0088653564453125,
0.0176239013671875,
-0.034515380859375,
0.00994110107421875,
-0.04302978515625,
-0.040985107421875,
0.0863037109375,
-0.0187835693359375,
0.0300445556640625,
-0.01447296142578125,
-0.0014324188232421875,
-0.0684814453125,
-0.034637451171875,
-0.0274200439453125,
0.0340576171875,
-0.0106048583984375,
0.0309295654296875,
0.048095703125,
-0.0170135498046875,
-0.05657958984375,
0.0037746429443359375,
0.01107025146484375,
0.055450439453125,
-0.01031494140625,
-0.023956298828125,
0.052764892578125,
-0.01007080078125,
-0.00836944580078125,
-0.0762939453125,
-0.0215911865234375,
-0.058929443359375,
0.041229248046875,
-0.00765228271484375,
-0.0030364990234375,
0.00899505615234375,
-0.040313720703125,
-0.079833984375,
0.08489990234375,
-0.017425537109375,
-0.035980224609375,
-0.0008149147033691406,
0.00298309326171875,
0.010772705078125,
-0.00824737548828125,
-0.006927490234375,
-0.01367950439453125,
-0.03582763671875,
-0.00634002685546875,
0.01531982421875,
0.01416778564453125,
0.0271148681640625,
0.0182342529296875,
-0.034423828125,
0.02740478515625,
0.0009531974792480469,
-0.0005903244018554688,
-0.0282745361328125,
-0.0167083740234375,
0.052734375,
0.045196533203125,
0.01226043701171875,
0.0219268798828125,
0.056060791015625,
-0.0175018310546875,
-0.020538330078125,
-0.016387939453125,
-0.006511688232421875,
0.0197296142578125,
0.07354736328125,
0.044036865234375,
0.02532958984375,
-0.0653076171875,
-0.04913330078125,
0.0205230712890625,
0.02362060546875,
0.0184173583984375,
0.006595611572265625,
-0.03375244140625,
0.0066680908203125,
0.0028781890869140625,
0.0146942138671875,
-0.0166473388671875,
-0.01201629638671875,
-0.0109100341796875,
-0.0282135009765625,
0.004512786865234375,
-0.0269622802734375,
0.0426025390625,
-0.045928955078125,
0.0430908203125,
-0.029541015625,
-0.02886962890625,
0.0340576171875,
0.019683837890625,
-0.003818511962890625,
0.058502197265625,
0.036590576171875,
0.0006265640258789062,
-0.0240325927734375,
-0.02294921875,
0.0328369140625,
0.04248046875,
0.005611419677734375,
-0.05926513671875,
0.01399993896484375,
0.0267333984375,
-0.0053253173828125,
0.031341552734375,
-0.0002168416976928711,
0.0384521484375,
-0.0254058837890625,
0.055419921875,
-0.037445068359375,
-0.0160980224609375,
-0.0235443115234375,
0.024627685546875,
0.01922607421875,
-0.0013628005981445312,
0.0643310546875,
-0.01483917236328125,
0.01666259765625,
0.00522613525390625,
0.0767822265625,
-0.0101776123046875,
0.019683837890625,
-0.0501708984375,
0.0272064208984375,
0.0184783935546875
]
|
f896a834cf471fc1d7c5096544fd195b73fb01f6 | Wordpress Stackexchange
Q: If is custom post type archive page If I need to check custom post post type is movie, I can use following code.
if ( 'movie' == get_post_type() )
I need to check, if it is custom post post type Archives Page? ( www.domain.com/movie)
A: Check out is_post_type_archive() in the codex
if( is_post_type_archive('movie') )
{
//do my thing
}
| Q: If is custom post type archive page If I need to check custom post post type is movie, I can use following code.
if ( 'movie' == get_post_type() )
I need to check, if it is custom post post type Archives Page? ( www.domain.com/movie)
A: Check out is_post_type_archive() in the codex
if( is_post_type_archive('movie') )
{
//do my thing
}
| wordpress | {
"language": "en",
"length": 60,
"provenance": "stackexchange_00019.jsonl.gz:450784",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169371"
} | [
0.04156494140625,
0.0170135498046875,
0.0010776519775390625,
0.0209503173828125,
0.0224456787109375,
-0.0306396484375,
0.08221435546875,
-0.039031982421875,
-0.03009033203125,
-0.0282135009765625,
0.0203704833984375,
-0.014007568359375,
-0.033294677734375,
-0.055999755859375,
0.04241943359375,
-0.033203125,
0.032257080078125,
-0.0169677734375,
0.018585205078125,
-0.0240020751953125,
0.0298919677734375,
-0.007488250732421875,
0.0241546630859375,
-0.00525665283203125,
0.01340484619140625,
-0.0015668869018554688,
0.09320068359375,
-0.00751495361328125,
0.0210113525390625,
0.0033321380615234375,
0.032989501953125,
-0.043548583984375,
0.01239776611328125,
0.0031108856201171875,
0.028656005859375,
0.050994873046875,
-0.0259857177734375,
0.03173828125,
0.050872802734375,
-0.01708984375,
0.012542724609375,
0.00036144256591796875,
0.01003265380859375,
-0.005916595458984375,
0.0037288665771484375,
-0.006725311279296875,
-0.00887298583984375,
-0.0535888671875,
0.0179443359375,
-0.0325927734375,
-0.0222930908203125,
-0.018035888671875,
-0.01320648193359375,
-0.01100921630859375,
-0.010955810546875,
0.016937255859375,
0.011810302734375,
-0.037628173828125,
0.04656982421875,
-0.047821044921875,
-0.04071044921875,
-0.038665771484375,
0.0543212890625,
0.0144195556640625,
-0.0090179443359375,
-0.002285003662109375,
0.0294189453125,
0.0094451904296875,
-0.042388916015625,
-0.045135498046875,
0.0259857177734375,
-0.004749298095703125,
0.0291290283203125,
-0.01654052734375,
-0.0037631988525390625,
-0.034271240234375,
0.003978729248046875,
-0.034759521484375,
0.0017061233520507812,
0.00463104248046875,
-0.03607177734375,
0.006366729736328125,
-0.046142578125,
-0.037353515625,
0.00345611572265625,
-0.0230712890625,
-0.0238189697265625,
-0.0022068023681640625,
-0.01131439208984375,
-0.0203399658203125,
-0.00281524658203125,
-0.042144775390625,
0.00640106201171875,
0.00786590576171875,
-0.009429931640625,
-0.03668212890625,
0.01485443115234375,
0.06256103515625,
-0.0517578125,
-0.0081329345703125,
0.004180908203125,
-0.024017333984375,
0.0186309814453125,
-0.04290771484375,
0.038909912109375,
0.0125579833984375,
-0.018707275390625,
-0.040313720703125,
0.042236328125,
0.01519012451171875,
-0.0163421630859375,
0.0650634765625,
-0.01451873779296875,
0.0092620849609375,
-0.0277557373046875,
0.0144195556640625,
-0.045684814453125,
0.0110015869140625,
-0.0221099853515625,
0.0672607421875,
0.042144775390625,
0.0546875,
0.08758544921875,
-0.08544921875,
0.0026092529296875,
0.01207733154296875,
-0.04736328125,
-0.10614013671875,
0.029998779296875,
0.06878662109375,
-0.00675201416015625,
-0.01019287109375,
-0.041351318359375,
-0.024322509765625,
-0.036102294921875,
-0.0347900390625,
0.0001481771469116211,
0.0139617919921875,
0.005840301513671875,
0.00969696044921875,
-0.006244659423828125,
-0.03692626953125,
0.0036678314208984375,
0.01214599609375,
0.00873565673828125,
0.03887939453125,
0.0248565673828125,
-0.0020771026611328125,
-0.039520263671875,
-0.084228515625,
0.051605224609375,
-0.036041259765625,
0.0191497802734375,
0.009735107421875,
0.01337432861328125,
-0.012115478515625,
-0.004047393798828125,
0.0018110275268554688,
0.007518768310546875,
-0.0101165771484375,
0.0372314453125,
-0.01287078857421875,
0.00368499755859375,
-0.00286865234375,
-0.034149169921875,
0.0289459228515625,
-0.0462646484375,
-0.0146331787109375,
0.02349853515625,
0.0153961181640625,
0.006805419921875,
-0.01227569580078125,
0.0172576904296875,
0.004817962646484375,
-0.0086212158203125,
-0.0017480850219726562,
0.00843048095703125,
-0.035186767578125,
0.01337432861328125,
0.0740966796875,
0.003940582275390625,
-0.00868988037109375,
0.0005841255187988281,
0.009521484375,
-0.02337646484375,
0.0205078125,
0.034393310546875,
0.01386260986328125,
-0.030609130859375,
0.0092926025390625,
0.0445556640625,
0.0693359375,
-0.056396484375,
-0.00693511962890625,
-0.008392333984375,
0.009796142578125,
0.0014638900756835938,
-0.0115966796875,
-0.01090240478515625,
0.0196685791015625,
-0.01226043701171875,
0.02703857421875,
-0.025360107421875,
0.01377105712890625,
-0.029083251953125,
-0.0034389495849609375,
-0.004619598388671875,
0.0333251953125,
0.0223388671875,
0.049346923828125,
0.0094146728515625,
0.01103973388671875,
-0.037384033203125,
0.01959228515625,
-0.008819580078125,
0.005218505859375,
-0.00738525390625,
-0.01873779296875,
-0.056793212890625,
-0.01226806640625,
-0.08612060546875,
0.005962371826171875,
-0.07025146484375,
0.0276947021484375,
0.021942138671875,
0.030731201171875,
-0.0159759521484375,
0.02215576171875,
0.0159912109375,
0.05963134765625,
-0.0189666748046875,
-0.0250244140625,
0.025177001953125,
-0.030059814453125,
-0.042724609375,
-0.004474639892578125,
0.0004305839538574219,
-0.058502197265625,
0.0016984939575195312,
0.07574462890625,
0.03717041015625,
0.033294677734375,
-0.002201080322265625,
-0.01258087158203125,
0.042755126953125,
-0.019561767578125,
0.0251007080078125,
-0.03094482421875,
0.0200347900390625,
0.074462890625,
-0.03717041015625,
0.0230865478515625,
0.0078125,
-0.0027484893798828125,
0.005733489990234375,
0.035797119140625,
0.0043487548828125,
0.0203704833984375,
0.016845703125,
0.011749267578125,
-0.01861572265625,
0.056793212890625,
0.0382080078125,
-0.0031719207763671875,
0.0684814453125,
0.0141448974609375,
0.051788330078125,
0.042022705078125,
-0.0540771484375,
0.017608642578125,
0.01256561279296875,
0.034149169921875,
0.00782012939453125,
0.05804443359375,
0.05694580078125,
0.0357666015625,
-0.0240631103515625,
-0.038787841796875,
0.0193328857421875,
0.039276123046875,
-0.0234832763671875,
-0.008453369140625,
-0.050994873046875,
-0.00934600830078125,
-0.00855255126953125,
-0.08001708984375,
0.00424957275390625,
0.005954742431640625,
-0.0213470458984375,
-0.0218963623046875,
0.01418304443359375,
0.0085906982421875,
-0.01690673828125,
0.0081024169921875,
0.0238037109375,
-0.036407470703125,
0.0035266876220703125,
-0.0751953125,
0.07208251953125,
-0.04937744140625,
0.00994873046875,
0.0789794921875,
-0.019073486328125,
0.0297393798828125,
-0.00655364990234375,
0.01273345947265625,
-0.02734375,
0.038177490234375,
-0.004894256591796875,
-0.05010986328125,
-0.0304107666015625,
-0.0138092041015625,
0.005706787109375,
0.0149383544921875,
0.0270538330078125,
-0.01190948486328125,
0.037109375,
0.014251708984375,
-0.046417236328125,
-0.0950927734375,
0.07012939453125,
-0.06982421875,
0.018585205078125,
-0.053009033203125,
-0.032012939453125,
-0.031707763671875,
-0.025360107421875,
-0.01329803466796875,
-0.0133056640625,
-0.0160675048828125,
-0.02239990234375,
-0.050445556640625,
-0.052215576171875,
-0.050537109375,
0.006866455078125,
-0.0038204193115234375,
0.01453399658203125,
0.086181640625,
0.0147552490234375,
-0.0743408203125,
0.00632476806640625,
0.017974853515625,
-0.0274810791015625,
0.0465087890625,
0.023895263671875,
-0.0283203125,
0.016571044921875,
0.0181884765625,
-0.0011625289916992188,
0.0171966552734375,
-0.0106964111328125,
-0.033203125,
-0.01290130615234375,
-0.0286865234375,
0.0177001953125,
0.017333984375,
0.00921630859375,
0.0147857666015625,
0.048614501953125,
-0.038970947265625,
-0.03216552734375,
0.01507568359375,
-0.0261077880859375,
0.05389404296875,
0.0185089111328125,
-0.0278778076171875,
-0.00556182861328125,
0.0396728515625,
0.017486572265625,
0.01384735107421875,
0.004913330078125,
-0.0338134765625,
0.06695556640625,
0.015380859375,
0.03729248046875,
-0.006313323974609375,
0.009063720703125,
-0.0274505615234375,
0.0297088623046875,
0.0078887939453125,
0.001987457275390625,
0.00662994384765625,
-0.01512908935546875,
-0.00829315185546875,
-0.04638671875,
0.0216064453125,
-0.07342529296875,
0.0084075927734375,
-0.044281005859375,
-0.0116119384765625,
0.0007648468017578125,
0.06756591796875,
-0.0301666259765625,
-0.01222991943359375,
-0.0260009765625,
-0.0222625732421875,
0.0218963623046875,
-0.019989013671875,
-0.024139404296875,
-0.0233001708984375,
-0.0565185546875,
0.0164794921875,
0.002170562744140625,
-0.0247650146484375,
-0.02362060546875,
0.03094482421875,
-0.03955078125,
-0.0229339599609375,
0.021514892578125,
-0.041656494140625,
0.03765869140625,
0.00019788742065429688,
0.0271453857421875,
-0.0230255126953125,
-0.0115814208984375,
-0.051055908203125,
-0.0986328125,
-0.0033130645751953125,
-0.024871826171875,
0.04852294921875,
0.006771087646484375,
-0.01171112060546875,
-0.00949859619140625,
0.035369873046875,
0.045440673828125,
-0.0092315673828125,
0.01318359375,
-0.04461669921875,
0.006927490234375,
0.0180206298828125,
0.007373809814453125,
-0.01369476318359375,
-0.0117340087890625,
-0.019805908203125,
-0.0078125,
0.02313232421875,
-0.03662109375,
-0.020904541015625,
-0.017333984375,
-0.004497528076171875,
-0.050537109375,
-0.007564544677734375,
0.01788330078125,
-0.00235748291015625,
0.0018091201782226562,
-0.007579803466796875,
-0.003070831298828125,
-0.04559326171875,
0.0223541259765625,
0.02142333984375,
-0.028778076171875,
0.01479339599609375,
0.0465087890625,
0.0181427001953125,
-0.0235748291015625,
-0.06011962890625,
0.044342041015625,
0.024444580078125,
-0.006801605224609375,
0.063232421875,
0.0343017578125,
0.00439453125,
0.03485107421875,
-0.002086639404296875,
0.00208282470703125,
0.00608062744140625,
0.030487060546875,
0.0068511962890625,
0.013702392578125,
-0.007965087890625,
-0.02496337890625,
0.01983642578125,
0.03521728515625,
0.0018138885498046875,
-0.0296783447265625,
0.01140594482421875,
0.06268310546875,
-0.03912353515625,
0.014984130859375,
-0.048309326171875,
-0.02777099609375,
0.0082855224609375,
0.0005540847778320312,
0.0279083251953125,
0.0036296844482421875,
-0.0034694671630859375,
0.01541900634765625,
-0.02996826171875,
0.0167388916015625,
-0.0006260871887207031,
0.05963134765625,
-0.013275146484375,
0.049041748046875,
0.002208709716796875,
0.005870819091796875,
-0.04364013671875,
0.0185089111328125,
-0.03302001953125,
-0.040130615234375,
-0.0684814453125,
-0.03729248046875,
0.0011444091796875,
-0.01064300537109375,
0.03680419921875,
-0.008331298828125,
0.043212890625,
0.0203094482421875,
-0.0189666748046875,
0.0146331787109375,
-0.017822265625,
-0.008514404296875,
-0.0374755859375,
0.0014963150024414062,
0.0083770751953125,
-0.005901336669921875,
-0.01507568359375,
0.053375244140625,
0.0208587646484375,
0.00872039794921875,
-0.0292816162109375,
0.003936767578125,
0.038330078125,
0.056121826171875,
0.0447998046875,
-0.0491943359375,
-0.058013916015625,
0.0614013671875,
-0.02886962890625,
-0.0106353759765625,
-0.01451873779296875,
0.0207061767578125,
0.038482666015625,
-0.00026726722717285156,
0.004184722900390625,
-0.0020656585693359375,
-0.0219879150390625,
-0.0299530029296875,
0.007770538330078125,
0.0233001708984375,
-0.03753662109375,
-0.0104217529296875,
0.003108978271484375,
0.01061248779296875,
0.0084381103515625,
-0.041717529296875,
0.03179931640625,
-0.0236358642578125,
0.0275726318359375,
0.00428009033203125,
-0.048309326171875,
0.0347900390625,
0.046112060546875,
-0.0254058837890625,
-0.059722900390625,
-0.0037384033203125,
0.006046295166015625,
0.04132080078125,
-0.0445556640625,
-0.0267333984375,
-0.0011959075927734375,
-0.0227508544921875,
0.00600433349609375,
-0.01007080078125,
0.0007014274597167969,
0.00986480712890625,
0.0147247314453125,
0.031494140625,
-0.01139068603515625,
-0.042633056640625,
-0.0007867813110351562,
-0.0391845703125,
-0.003574371337890625,
-0.062469482421875,
-0.060546875,
-0.031890869140625,
0.0017042160034179688,
0.0035648345947265625,
-0.0007495880126953125,
0.0243682861328125,
0.0183563232421875,
0.015411376953125,
0.0458984375,
0.0008893013000488281,
0.020050048828125,
-0.00894927978515625,
0.07470703125,
-0.012054443359375,
0.05059814453125,
-0.0047607421875,
0.0287933349609375,
-0.01155853271484375,
-0.000046312808990478516,
-0.023040771484375,
-0.042938232421875,
0.02044677734375,
0.028778076171875,
0.01519775390625,
0.0194091796875,
0.01235198974609375,
0.0187530517578125,
-0.01422119140625,
0.0004763603210449219,
-0.002811431884765625,
-0.0172119140625,
-0.01041412353515625,
0.0155792236328125,
0.00872802734375,
-0.03411865234375,
-0.0219268798828125,
0.035247802734375,
0.016693115234375,
-0.040802001953125,
0.0496826171875,
-0.0030117034912109375,
0.045135498046875,
0.0188751220703125,
-0.059783935546875,
0.03961181640625,
0.042022705078125,
0.001495361328125,
0.0350341796875,
-0.012786865234375,
0.0131378173828125,
0.0270843505859375,
0.0021610260009765625,
-0.0099029541015625,
-0.00536346435546875,
0.0218048095703125,
-0.007671356201171875,
-0.01337432861328125,
0.01078033447265625,
-0.01348114013671875,
0.0271148681640625,
0.03076171875,
0.0859375,
-0.044830322265625,
0.00604248046875,
0.049713134765625,
-0.00997161865234375,
0.034210205078125,
-0.0183563232421875,
0.0222930908203125,
0.031494140625,
0.019012451171875,
-0.0044403076171875,
-0.04052734375,
0.002685546875,
-0.00817108154296875,
0.0176544189453125,
-0.00867462158203125,
0.07720947265625,
0.0168304443359375,
-0.0299835205078125,
-0.005870819091796875,
0.0091552734375,
-0.00024890899658203125,
-0.01155853271484375,
0.048614501953125,
-0.0168914794921875,
0.002292633056640625,
-0.00434112548828125,
0.047271728515625,
0.0066070556640625,
-0.00936126708984375,
0.0009918212890625,
0.025115966796875,
0.019989013671875,
0.029449462890625,
-0.00390625,
-0.006992340087890625,
0.00730133056640625,
-0.0240936279296875,
-0.08001708984375,
-0.037567138671875,
0.00574493408203125,
0.06707763671875,
-0.0256805419921875,
0.05047607421875,
-0.00959014892578125,
-0.040069580078125,
-0.016510009765625,
-0.0258636474609375,
0.054840087890625,
-0.0253448486328125,
-0.00572967529296875,
0.03271484375,
0.032440185546875,
-0.00650787353515625,
-0.00479888916015625,
0.034942626953125,
-0.041107177734375,
-0.01082611083984375,
0.016693115234375,
-0.045166015625,
-0.053192138671875,
0.00189208984375,
-0.0276336669921875,
0.046234130859375,
-0.0013523101806640625,
0.00208282470703125,
-0.000293731689453125,
0.0254058837890625,
0.020721435546875,
0.035919189453125,
-0.017913818359375,
0.007293701171875,
0.0004203319549560547,
0.039031982421875,
-0.04364013671875,
-0.0164794921875,
0.0100555419921875,
0.049896240234375,
0.00405120849609375,
-0.01239776611328125,
-0.002857208251953125,
0.0159149169921875,
0.0701904296875,
0.07373046875,
0.02880859375,
-0.0115814208984375,
-0.0174713134765625,
0.02850341796875,
0.01416015625,
-0.037261962890625,
0.032135009765625,
-0.0299224853515625,
-0.03155517578125,
-0.0126953125,
0.01015472412109375,
0.0188140869140625,
0.003101348876953125,
-0.03857421875,
0.00067901611328125,
-0.00608062744140625,
-0.00777435302734375,
0.008392333984375,
-0.0107421875,
0.033294677734375,
0.0408935546875,
-0.06427001953125,
0.0035610198974609375,
-0.026824951171875,
0.046051025390625,
0.00827789306640625,
0.0219573974609375,
0.038238525390625,
0.01739501953125,
-0.0217132568359375,
-0.00788116455078125,
0.0079803466796875,
0.0006804466247558594,
-0.0033817291259765625,
0.037261962890625,
0.028411865234375,
0.006862640380859375,
-0.0020732879638671875,
0.0179595947265625,
0.025054931640625,
0.0426025390625,
-0.04296875,
-0.0643310546875,
0.00621795654296875,
-0.00180816650390625,
0.0010585784912109375,
0.003093719482421875,
-0.0218963623046875,
-0.001377105712890625,
0.050689697265625,
-0.059906005859375,
0.015167236328125,
0.004505157470703125,
0.040191650390625,
-0.02581787109375,
-0.02496337890625,
-0.046417236328125,
-0.0155181884765625,
-0.057525634765625,
0.0023288726806640625,
0.0236053466796875,
0.09130859375,
0.050323486328125,
0.0474853515625,
-0.01004791259765625,
-0.04742431640625,
-0.0112762451171875,
0.026641845703125,
-0.0185394287109375,
0.0406494140625,
-0.054443359375,
-0.06512451171875,
0.035491943359375,
0.039459228515625,
0.03472900390625,
-0.0007200241088867188,
0.004726409912109375,
-0.01338958740234375,
0.01297760009765625,
0.0191192626953125,
0.07806396484375,
-0.0047149658203125,
0.0059814453125,
-0.041046142578125,
0.0181121826171875,
0.03125,
0.001739501953125,
0.0243988037109375,
-0.00926971435546875,
0.063232421875,
0.015655517578125,
0.01105499267578125,
0.0234222412109375,
-0.0307769775390625,
0.033203125,
0.053131103515625,
0.09320068359375,
0.06231689453125,
-0.050079345703125,
-0.031768798828125,
-0.005462646484375,
-0.01654052734375,
0.0157623291015625,
0.0421142578125,
0.0008797645568847656,
-0.00716400146484375,
0.03521728515625,
-0.013214111328125,
0.0148468017578125,
0.0061492919921875,
0.00933837890625,
0.034088134765625,
0.030548095703125,
0.034423828125,
-0.0014371871948242188,
-0.01068115234375,
0.0260772705078125,
0.01776123046875,
0.00679779052734375,
0.001537322998046875,
0.0029354095458984375,
0.01062774658203125,
-0.01200103759765625,
0.0286712646484375,
-0.054931640625,
-0.0308685302734375,
0.032501220703125,
-0.019989013671875,
0.005130767822265625,
0.00908660888671875,
-0.025970458984375,
0.0263824462890625,
0.0249176025390625,
-0.016357421875,
0.0297698974609375,
-0.038665771484375,
0.01446533203125,
-0.0323486328125,
-0.0031147003173828125,
-0.03900146484375,
-0.033935546875,
0.01300048828125,
0.0169525146484375,
-0.0028591156005859375,
-0.01493072509765625,
-0.007556915283203125,
0.0335693359375,
-0.004337310791015625,
-0.020904541015625,
0.0166778564453125,
-0.03936767578125,
0.021209716796875,
0.032440185546875,
-0.0041351318359375,
-0.01363372802734375,
0.0162811279296875,
-0.004207611083984375,
0.0218505859375,
0.0189208984375,
0.01457977294921875,
0.03173828125,
-0.00473785400390625,
-0.0221099853515625,
-0.02020263671875,
0.01220703125,
-0.0023822784423828125,
-0.0101318359375,
-0.029541015625,
-0.007579803466796875,
-0.0253143310546875,
-0.0171356201171875,
-0.025238037109375,
-0.0273590087890625,
0.0133514404296875,
0.01055908203125,
0.00936126708984375,
0.0015172958374023438,
0.0070648193359375,
-0.0278167724609375,
0.0290374755859375,
-0.00572967529296875,
-0.0094757080078125,
-0.0054931640625,
-0.03851318359375,
-0.022003173828125,
0.0030117034912109375,
-0.030548095703125,
0.006992340087890625,
0.031982421875,
-0.004329681396484375,
-0.002346038818359375,
-0.035888671875,
0.005207061767578125,
-0.0097808837890625,
0.043182373046875,
0.061798095703125,
-0.058807373046875,
-0.06671142578125,
0.03656005859375,
0.05364990234375,
0.0673828125,
0.038238525390625,
-0.01421356201171875,
0.004241943359375,
0.01544952392578125,
-0.02020263671875,
-0.027252197265625,
0.007495880126953125,
-0.027618408203125,
-0.036895751953125,
-0.01763916015625,
0.0262908935546875,
0.03704833984375,
-0.014862060546875,
-0.08319091796875,
0.0804443359375,
-0.0308837890625,
-0.035675048828125,
-0.07843017578125,
0.0177764892578125,
0.002094268798828125,
-0.00165557861328125,
-0.03173828125,
-0.01268768310546875,
-0.00507354736328125,
0.03564453125,
0.00518035888671875,
0.047882080078125,
0.00749969482421875,
0.0278167724609375,
-0.0518798828125,
-0.00989532470703125,
-0.0501708984375,
0.01461029052734375,
0.030120849609375,
-0.00899505615234375,
-0.0065155029296875,
0.006069183349609375,
-0.051849365234375,
-0.0265655517578125,
-0.0286712646484375,
0.02801513671875,
-0.0017147064208984375,
-0.00118255615234375,
-0.02264404296875,
-0.0014095306396484375,
0.00649261474609375,
0.0682373046875,
0.0015592575073242188,
-0.038970947265625,
-0.0303802490234375,
-0.01409912109375,
-0.057464599609375,
-0.01000213623046875,
0.03125,
-0.0386962890625,
0.0174102783203125,
-0.0302886962890625,
-0.01282501220703125,
-0.0189361572265625,
0.003936767578125,
-0.043701171875,
-0.0080718994140625,
-0.0243072509765625,
-0.017181396484375,
-0.00978851318359375,
0.039825439453125,
0.0528564453125,
-0.027008056640625,
0.0251312255859375,
-0.005191802978515625,
-0.00273895263671875,
0.046630859375,
-0.0087890625,
0.0184173583984375,
0.015228271484375,
-0.04150390625,
-0.015350341796875,
0.0036029815673828125,
0.03509521484375,
-0.020721435546875,
-0.0233154296875,
0.03082275390625,
-0.01666259765625,
-0.02569580078125,
-0.03564453125,
-0.0113525390625,
0.027099609375,
-0.04217529296875,
0.029327392578125,
-0.001758575439453125,
0.0156707763671875,
0.0177154541015625,
0.0245513916015625,
-0.0118255615234375,
0.0007677078247070312,
0.01812744140625,
-0.0479736328125,
-0.0102386474609375,
0.0035247802734375,
-0.049774169921875,
-0.056427001953125,
0.0054473876953125,
-0.0233917236328125,
0.0027866363525390625,
0.01165771484375
]
|
5f9865d37bfad60aa0d4ec1ee34164ebe7fb8cea | Wordpress Stackexchange
Q: Portable Post Links I quite often run into a situation where I develop a site on a staging domain, have my client fill it there with content, and then when everything's approved move it to production. Now, my installation is quite portable (permalinks, assets are all fine), and I have environment-specific configuration, the only thing that doesn't adapt to the environment is when a client links to a post from another post through the popup in the editor. These links appear to be just hard-coded in the HTML.
Is there a way to make these links relative to the url without effort on my client's side?
Thanks!
A: WordPress is strongly opinionated about using absolute URLs. Doesn't mean it's better but it's a choice is makes.
The common way to handle it is replace as necessary in database. Please note that if you run replacement on all of database it is extremely important to use serialize–aware tool, or you risk corrupting the data.
| Q: Portable Post Links I quite often run into a situation where I develop a site on a staging domain, have my client fill it there with content, and then when everything's approved move it to production. Now, my installation is quite portable (permalinks, assets are all fine), and I have environment-specific configuration, the only thing that doesn't adapt to the environment is when a client links to a post from another post through the popup in the editor. These links appear to be just hard-coded in the HTML.
Is there a way to make these links relative to the url without effort on my client's side?
Thanks!
A: WordPress is strongly opinionated about using absolute URLs. Doesn't mean it's better but it's a choice is makes.
The common way to handle it is replace as necessary in database. Please note that if you run replacement on all of database it is extremely important to use serialize–aware tool, or you risk corrupting the data.
A: I usually use tool like this: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
This takes care of any serialized data and can be used to change out staging data from the entire database, not just the post content.
Typically a search and replace will look like this: find = staging.site.com and replace with = www.site.com. This is a fast and reliable tool, and I've used it on dozens of client sites.
| wordpress | {
"language": "en",
"length": 230,
"provenance": "stackexchange_00019.jsonl.gz:450811",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169481"
} | [
0.087158203125,
0.0206451416015625,
0.043365478515625,
0.00919342041015625,
0.016357421875,
-0.023712158203125,
0.069580078125,
-0.08966064453125,
-0.0177001953125,
0.006671905517578125,
0.018798828125,
-0.00972747802734375,
-0.0045318603515625,
-0.049224853515625,
0.02301025390625,
-0.01763916015625,
0.0364990234375,
-0.0011920928955078125,
0.011138916015625,
-0.014556884765625,
0.004688262939453125,
0.007404327392578125,
0.0350341796875,
0.0634765625,
0.041412353515625,
-0.0227203369140625,
0.052642822265625,
-0.046417236328125,
0.03936767578125,
-0.00789642333984375,
0.02978515625,
-0.0286407470703125,
0.0223541259765625,
-0.001178741455078125,
-0.010528564453125,
-0.06689453125,
0.01264190673828125,
-0.007640838623046875,
-0.0263671875,
0.0299835205078125,
0.0217132568359375,
-0.038543701171875,
0.032440185546875,
0.016387939453125,
0.0150909423828125,
-0.018951416015625,
0.039306640625,
-0.06634521484375,
0.0379638671875,
0.020660400390625,
0.01947021484375,
0.03173828125,
0.01959228515625,
-0.01593017578125,
-0.0292816162109375,
-0.0270538330078125,
0.00638580322265625,
-0.033843994140625,
0.042938232421875,
-0.0287933349609375,
-0.027740478515625,
-0.048858642578125,
0.034332275390625,
0.00029158592224121094,
-0.0140838623046875,
-0.005535125732421875,
-0.0204315185546875,
0.0161895751953125,
-0.01332855224609375,
-0.003742218017578125,
0.0282745361328125,
-0.0149688720703125,
-0.00617218017578125,
-0.025909423828125,
0.041259765625,
-0.005474090576171875,
-0.0018558502197265625,
0.0038089752197265625,
-0.0222320556640625,
0.04022216796875,
-0.00318145751953125,
0.07196044921875,
-0.0059051513671875,
-0.052520751953125,
0.0020923614501953125,
-0.058929443359375,
-0.0294036865234375,
0.0023250579833984375,
-0.0350341796875,
-0.0279541015625,
-0.0300750732421875,
-0.040374755859375,
-0.0089569091796875,
0.0206451416015625,
-0.030548095703125,
0.0033588409423828125,
0.03851318359375,
0.016815185546875,
0.023651123046875,
0.008056640625,
0.01096343994140625,
-0.05316162109375,
0.02252197265625,
-0.01105499267578125,
-0.0170135498046875,
0.0430908203125,
0.053619384765625,
0.04351806640625,
0.032867431640625,
-0.007633209228515625,
-0.01210784912109375,
0.04095458984375,
-0.0194244384765625,
0.010772705078125,
-0.04638671875,
0.0058135986328125,
-0.059539794921875,
0.01045989990234375,
-0.01751708984375,
0.04632568359375,
-0.01371002197265625,
0.029052734375,
-0.034454345703125,
-0.0172882080078125,
-0.00821685791015625,
-0.019561767578125,
0.01262664794921875,
-0.0050048828125,
-0.0406494140625,
0.035430908203125,
-0.04638671875,
0.0094757080078125,
0.053741455078125,
0.023101806640625,
0.007274627685546875,
-0.041351318359375,
-0.003665924072265625,
-0.036590576171875,
-0.005764007568359375,
0.02203369140625,
-0.0290985107421875,
-0.050445556640625,
0.0222930908203125,
-0.0194091796875,
0.0196380615234375,
0.0275115966796875,
0.0357666015625,
0.0252532958984375,
-0.037811279296875,
-0.039154052734375,
0.01268768310546875,
0.0157470703125,
0.052764892578125,
-0.0148162841796875,
0.007404327392578125,
-0.10382080078125,
0.058624267578125,
-0.091796875,
0.041839599609375,
-0.0738525390625,
-0.0074462890625,
0.0239105224609375,
0.07244873046875,
-0.036041259765625,
-0.043792724609375,
-0.02947998046875,
-0.080322265625,
-0.03289794921875,
0.0223846435546875,
0.0260772705078125,
0.0235443115234375,
-0.038299560546875,
-0.052520751953125,
-0.008270263671875,
0.00028705596923828125,
0.0108795166015625,
-0.015045166015625,
-0.0028362274169921875,
0.031280517578125,
0.01111602783203125,
-0.00787353515625,
-0.019073486328125,
0.05133056640625,
-0.0031108856201171875,
-0.032257080078125,
0.0289306640625,
0.01239776611328125,
0.032135009765625,
-0.0167083740234375,
0.01261138916015625,
0.040008544921875,
0.043731689453125,
-0.040863037109375,
0.0423583984375,
-0.01214599609375,
-0.01502227783203125,
-0.01220703125,
-0.004730224609375,
-0.014801025390625,
-0.018402099609375,
-0.04498291015625,
0.001995086669921875,
0.0192718505859375,
0.02545166015625,
0.0469970703125,
-0.015716552734375,
0.006256103515625,
0.01520538330078125,
0.0281982421875,
0.0170135498046875,
0.01094818115234375,
0.02764892578125,
-0.015777587890625,
-0.0689697265625,
-0.035736083984375,
0.046142578125,
-0.0031871795654296875,
-0.00901031494140625,
-0.00676727294921875,
-0.0043487548828125,
-0.0153045654296875,
-0.006946563720703125,
-0.0283660888671875,
-0.0015306472778320312,
0.00992584228515625,
-0.0005755424499511719,
0.00466156005859375,
0.00037288665771484375,
0.007648468017578125,
0.01226806640625,
-0.0026988983154296875,
0.012725830078125,
0.00373077392578125,
0.0299835205078125,
-0.00693511962890625,
0.003612518310546875,
0.006378173828125,
-0.037506103515625,
0.01812744140625,
0.0419921875,
0.020263671875,
0.00841522216796875,
0.0008406639099121094,
0.0239715576171875,
-0.014007568359375,
-0.013885498046875,
0.036651611328125,
-0.008941650390625,
-0.00640106201171875,
0.03411865234375,
-0.028900146484375,
-0.0157012939453125,
0.01103973388671875,
-0.0865478515625,
-0.01324462890625,
0.0307769775390625,
0.0007753372192382812,
0.0215301513671875,
-0.009033203125,
0.00936126708984375,
-0.00890350341796875,
0.03936767578125,
0.014434814453125,
0.0014028549194335938,
0.01297760009765625,
-0.006465911865234375,
0.03985595703125,
0.0221710205078125,
-0.00101470947265625,
-0.01177215576171875,
0.01056671142578125,
0.005229949951171875,
0.012542724609375,
0.02606201171875,
0.034027099609375,
-0.0032978057861328125,
-0.015167236328125,
-0.0150909423828125,
0.042633056640625,
0.026580810546875,
-0.025634765625,
-0.01824951171875,
0.00630950927734375,
-0.0137481689453125,
0.01203155517578125,
-0.02154541015625,
0.0213470458984375,
-0.01139068603515625,
0.00920867919921875,
-0.01166534423828125,
0.024139404296875,
-0.01806640625,
-0.02410888671875,
0.01392364501953125,
0.0162200927734375,
-0.034271240234375,
0.002780914306640625,
-0.060821533203125,
0.04119873046875,
-0.060333251953125,
0.0450439453125,
0.06781005859375,
0.00951385498046875,
-0.004741668701171875,
-0.020782470703125,
0.054290771484375,
-0.01233673095703125,
-0.005596160888671875,
-0.0200042724609375,
-0.036773681640625,
-0.029266357421875,
-0.058837890625,
0.002590179443359375,
-0.03314208984375,
-0.0125579833984375,
-0.0233154296875,
-0.030914306640625,
-0.0309295654296875,
-0.1136474609375,
-0.046142578125,
0.0051422119140625,
-0.050079345703125,
0.01514434814453125,
0.06414794921875,
-0.017852783203125,
-0.030426025390625,
0.10345458984375,
0.01364898681640625,
0.011932373046875,
-0.046142578125,
-0.06768798828125,
-0.075927734375,
-0.0958251953125,
-0.05206298828125,
-0.0017261505126953125,
-0.0006012916564941406,
0.021575927734375,
0.0175018310546875,
0.037261962890625,
-0.0243377685546875,
0.027984619140625,
0.0357666015625,
-0.03472900390625,
-0.01361846923828125,
0.01013946533203125,
-0.024017333984375,
-0.00408172607421875,
0.0031414031982421875,
0.0165863037109375,
0.020172119140625,
-0.016693115234375,
0.01126861572265625,
0.027374267578125,
0.01136016845703125,
0.04058837890625,
-0.023284912109375,
-0.03607177734375,
0.0546875,
0.019866943359375,
-0.01287078857421875,
-0.024169921875,
-0.00872039794921875,
-0.04071044921875,
0.006938934326171875,
0.032867431640625,
-0.02056884765625,
-0.01006317138671875,
-0.0122833251953125,
0.0158233642578125,
0.00005984306335449219,
0.050323486328125,
0.0186309814453125,
-0.039581298828125,
-0.02020263671875,
-0.003505706787109375,
-0.048370361328125,
-0.0236663818359375,
-0.023834228515625,
0.033660888671875,
-0.0194244384765625,
-0.018310546875,
-0.0232391357421875,
0.03729248046875,
-0.01458740234375,
-0.037200927734375,
0.05010986328125,
-0.038330078125,
0.04278564453125,
-0.055938720703125,
-0.0321044921875,
-0.026092529296875,
0.09381103515625,
-0.040618896484375,
-0.01348876953125,
-0.002681732177734375,
0.0289154052734375,
-0.0281982421875,
-0.05694580078125,
-0.032684326171875,
-0.0142364501953125,
-0.0220794677734375,
-0.01202392578125,
0.0034332275390625,
-0.027008056640625,
-0.027679443359375,
0.07037353515625,
-0.0084075927734375,
-0.006195068359375,
0.01947021484375,
-0.0233917236328125,
-0.0196380615234375,
0.01202392578125,
-0.01348114013671875,
-0.0199127197265625,
-0.03790283203125,
-0.00937652587890625,
-0.043670654296875,
-0.013458251953125,
0.0204010009765625,
0.0309906005859375,
-0.009002685546875,
-0.0276031494140625,
0.0013751983642578125,
0.050537109375,
-0.024078369140625,
0.07000732421875,
-0.0274658203125,
0.0117645263671875,
-0.02392578125,
0.005275726318359375,
0.0017347335815429688,
0.001033782958984375,
0.023651123046875,
0.01110076904296875,
-0.06072998046875,
-0.0108795166015625,
-0.02288818359375,
-0.015533447265625,
0.030731201171875,
-0.043914794921875,
-0.075927734375,
-0.006824493408203125,
0.0298004150390625,
0.040618896484375,
-0.03753662109375,
0.025726318359375,
-0.011688232421875,
-0.06903076171875,
0.04107666015625,
0.020416259765625,
0.0171356201171875,
-0.01031494140625,
0.0233612060546875,
-0.001953125,
-0.036865234375,
0.0181884765625,
0.01263427734375,
0.0198974609375,
0.001209259033203125,
0.029144287109375,
0.0182342529296875,
-0.002353668212890625,
-0.004268646240234375,
-0.0135955810546875,
-0.0009489059448242188,
-0.01013946533203125,
0.031982421875,
0.0006704330444335938,
-0.020233154296875,
0.021697998046875,
0.0044708251953125,
0.006412506103515625,
0.07208251953125,
0.0001442432403564453,
-0.0059814453125,
-0.01334381103515625,
0.0261688232421875,
0.003513336181640625,
-0.0350341796875,
-0.061553955078125,
-0.0305633544921875,
0.0240020751953125,
-0.0212249755859375,
0.026702880859375,
0.0243072509765625,
-0.0204925537109375,
0.0268402099609375,
-0.0088043212890625,
0.01018524169921875,
0.01416015625,
0.0105438232421875,
0.00791168212890625,
0.049835205078125,
-0.0029468536376953125,
-0.0023593902587890625,
-0.0083160400390625,
0.0018262863159179688,
0.049713134765625,
-0.0015821456909179688,
-0.050750732421875,
-0.04669189453125,
0.0019102096557617188,
0.0144500732421875,
0.00688934326171875,
0.0020008087158203125,
0.0222320556640625,
-0.011260986328125,
-0.008056640625,
-0.00142669677734375,
0.005859375,
-0.04669189453125,
-0.023590087890625,
0.0017461776733398438,
-0.00215911865234375,
-0.00616455078125,
0.035369873046875,
0.0140228271484375,
-0.0158233642578125,
0.0289459228515625,
-0.0135955810546875,
0.026397705078125,
0.04296875,
-0.0060577392578125,
0.01113128662109375,
0.00856781005859375,
-0.0016012191772460938,
-0.03765869140625,
0.0012950897216796875,
-0.0206451416015625,
0.0142364501953125,
0.016082763671875,
0.0462646484375,
0.00989532470703125,
-0.019927978515625,
0.0105133056640625,
-0.056640625,
-0.0171356201171875,
0.0419921875,
0.0271148681640625,
-0.037109375,
-0.0268096923828125,
0.0276641845703125,
0.031982421875,
0.0011987686157226562,
-0.013824462890625,
0.0117950439453125,
-0.00786590576171875,
-0.0006594657897949219,
0.00722503662109375,
-0.0216522216796875,
-0.01256561279296875,
0.006603240966796875,
-0.0156097412109375,
-0.053375244140625,
-0.04180908203125,
0.044891357421875,
0.0244598388671875,
-0.01345062255859375,
-0.01690673828125,
0.02923583984375,
-0.01055145263671875,
0.014862060546875,
-0.002788543701171875,
-0.0184478759765625,
0.0036029815673828125,
0.019866943359375,
0.032928466796875,
-0.004833221435546875,
-0.060302734375,
-0.004669189453125,
-0.050506591796875,
-0.005878448486328125,
-0.019073486328125,
-0.0682373046875,
-0.0295562744140625,
-0.0157012939453125,
0.040283203125,
0.0232391357421875,
0.0100555419921875,
-0.03326416015625,
-0.0396728515625,
-0.00812530517578125,
0.049072265625,
-0.0014190673828125,
-0.006786346435546875,
0.044464111328125,
-0.0234222412109375,
0.030120849609375,
-0.0165557861328125,
0.00811004638671875,
-0.01386260986328125,
-0.01702880859375,
-0.0071868896484375,
-0.04998779296875,
-0.049652099609375,
0.0084075927734375,
0.0014495849609375,
0.050140380859375,
0.0027599334716796875,
-0.01270294189453125,
0.032470703125,
-0.021514892578125,
-0.00867462158203125,
-0.0333251953125,
0.05120849609375,
-0.0584716796875,
0.01141357421875,
-0.005870819091796875,
-0.0037841796875,
-0.0012254714965820312,
0.01523590087890625,
-0.0287017822265625,
-0.022552490234375,
0.0374755859375,
-0.0283203125,
-0.0023555755615234375,
0.032989501953125,
-0.028594970703125,
0.08734130859375,
0.0256805419921875,
0.06976318359375,
0.03887939453125,
0.030731201171875,
0.048980712890625,
0.0206756591796875,
-0.01068878173828125,
0.0016508102416992188,
0.022918701171875,
-0.0164794921875,
-0.035369873046875,
-0.0220794677734375,
-0.0255584716796875,
0.0018672943115234375,
0.03094482421875,
0.03912353515625,
-0.06439208984375,
0.01352691650390625,
0.0003705024719238281,
-0.01392364501953125,
0.02508544921875,
0.0016078948974609375,
0.0050506591796875,
-0.003665924072265625,
-0.022125244140625,
0.0309295654296875,
-0.036376953125,
-0.0235137939453125,
0.0017480850219726562,
0.00026869773864746094,
0.01383209228515625,
0.04034423828125,
-0.0028705596923828125,
-0.042236328125,
-0.037506103515625,
0.03192138671875,
-0.01363372802734375,
-0.00545501708984375,
-0.037139892578125,
0.01546478271484375,
-0.0379638671875,
-0.051971435546875,
-0.0088348388671875,
-0.058868408203125,
0.029449462890625,
0.00748443603515625,
-0.0117340087890625,
0.043304443359375,
0.0279693603515625,
-0.00281524658203125,
-0.0189208984375,
-0.013885498046875,
0.03192138671875,
0.0396728515625,
-0.00472259521484375,
0.002063751220703125,
0.004550933837890625,
-0.016448974609375,
-0.00957489013671875,
-0.036041259765625,
0.005565643310546875,
0.0003814697265625,
0.007434844970703125,
0.08251953125,
-0.06982421875,
0.00334930419921875,
0.036163330078125,
0.00262451171875,
-0.0322265625,
-0.0160980224609375,
-0.002498626708984375,
-0.0594482421875,
-0.050994873046875,
-0.0321044921875,
-0.0643310546875,
0.00003218650817871094,
-0.05706787109375,
-0.05084228515625,
0.07073974609375,
-0.036865234375,
0.04754638671875,
0.0258026123046875,
0.019683837890625,
-0.0008397102355957031,
0.0118408203125,
-0.0282440185546875,
0.06695556640625,
0.01346588134765625,
0.029388427734375,
-0.0633544921875,
-0.01013946533203125,
-0.00482177734375,
0.0565185546875,
0.0265655517578125,
0.01160430908203125,
-0.05224609375,
-0.0047149658203125,
0.039093017578125,
0.0211029052734375,
0.00042057037353515625,
0.046722412109375,
-0.0025043487548828125,
0.0089263916015625,
0.0022029876708984375,
-0.047760009765625,
-0.001903533935546875,
-0.0169677734375,
-0.015716552734375,
0.0194549560546875,
0.031829833984375,
0.03924560546875,
0.032928466796875,
-0.0215606689453125,
-0.033966064453125,
0.0161895751953125,
0.032745361328125,
-0.02508544921875,
0.03515625,
-0.0220184326171875,
0.002689361572265625,
-0.036224365234375,
-0.05255126953125,
0.0063018798828125,
0.0272674560546875,
0.0107574462890625,
0.0049591064453125,
0.0016508102416992188,
0.00510406494140625,
0.0423583984375,
-0.02471923828125,
-0.019012451171875,
-0.0147552490234375,
0.014373779296875,
0.0692138671875,
0.033935546875,
0.02081298828125,
-0.036529541015625,
0.0233612060546875,
0.06500244140625,
0.092041015625,
-0.058929443359375,
-0.03118896484375,
0.009765625,
-0.0016460418701171875,
-0.0037136077880859375,
-0.032806396484375,
-0.01605224609375,
-0.05780029296875,
-0.0262298583984375,
0.02313232421875,
-0.01255035400390625,
0.016387939453125,
0.0198822021484375,
0.025970458984375,
0.048248291015625,
-0.05316162109375,
-0.017242431640625,
-0.01800537109375,
-0.016204833984375,
-0.01227569580078125,
0.011749267578125,
0.0227813720703125,
0.018035888671875,
0.02142333984375,
0.00954437255859375,
0.007259368896484375,
0.00423431396484375,
0.0360107421875,
-0.0205078125,
-0.016998291015625,
-0.0271453857421875,
0.04779052734375,
0.0290069580078125,
0.017608642578125,
0.042724609375,
0.062469482421875,
0.03656005859375,
-0.008758544921875,
-0.008514404296875,
0.043548583984375,
-0.0284881591796875,
0.040802001953125,
-0.032470703125,
0.04278564453125,
0.00897216796875,
0.0068206787109375,
-0.022125244140625,
0.0167388916015625,
0.045654296875,
-0.005401611328125,
0.059173583984375,
0.003833770751953125,
0.0098876953125,
0.03509521484375,
0.012969970703125,
0.03533935546875,
0.035247802734375,
-0.0035686492919921875,
0.01155853271484375,
-0.0023136138916015625,
-0.051177978515625,
-0.0200042724609375,
0.028533935546875,
-0.01458740234375,
0.016693115234375,
0.00711822509765625,
0.00565338134765625,
-0.0013875961303710938,
-0.034149169921875,
0.024444580078125,
0.00998687744140625,
-0.004291534423828125,
0.028106689453125,
0.0006308555603027344,
-0.01052093505859375,
0.0007987022399902344,
0.0517578125,
0.0041656494140625,
0.11981201171875,
-0.058746337890625,
0.0140838623046875,
-0.0111083984375,
0.0286102294921875,
-0.02972412109375,
-0.007770538330078125,
-0.035308837890625,
-0.0109710693359375,
0.0231475830078125,
0.01226806640625,
0.00537109375,
-0.01087188720703125,
0.0199737548828125,
-0.0455322265625,
-0.0305938720703125,
-0.042510986328125,
0.033843994140625,
0.0257720947265625,
0.008148193359375,
-0.041748046875,
-0.036163330078125,
-0.0216522216796875,
0.00310516357421875,
-0.00972747802734375,
-0.006439208984375,
-0.0006589889526367188,
0.059539794921875,
0.0621337890625,
-0.011077880859375,
0.0276641845703125,
-0.05426025390625,
0.065673828125,
0.03515625,
0.051300048828125,
-0.01287841796875,
0.016387939453125,
-0.0247955322265625,
0.0205841064453125,
0.01316070556640625,
0.03955078125,
0.007770538330078125,
-0.00714111328125,
-0.0008211135864257812,
0.001819610595703125,
0.05584716796875,
0.019073486328125,
0.00356292724609375,
-0.0333251953125,
0.01324462890625,
0.0095367431640625,
0.01358795166015625,
-0.0218048095703125,
-0.010345458984375,
0.01053619384765625,
0.01450347900390625,
0.0093841552734375,
-0.0162200927734375,
-0.0252838134765625,
-0.043243408203125,
0.0450439453125,
0.0032215118408203125,
-0.0229034423828125,
-0.0004513263702392578,
-0.01174163818359375,
0.0160980224609375,
-0.0218048095703125,
0.040283203125,
-0.026123046875,
0.019439697265625,
-0.021240234375,
-0.0279541015625,
-0.0311279296875,
0.06219482421875,
-0.03094482421875,
0.0330810546875,
0.0478515625,
-0.038055419921875,
-0.0179290771484375,
0.0526123046875,
0.040985107421875,
0.0926513671875,
-0.00826263427734375,
-0.0160675048828125,
0.00980377197265625,
0.0181732177734375,
-0.031768798828125,
-0.0430908203125,
0.008575439453125,
-0.021087646484375,
0.0095062255859375,
0.022857666015625,
-0.02801513671875,
-0.003063201904296875,
-0.031463623046875,
-0.047943115234375,
0.0936279296875,
0.00251007080078125,
-0.022003173828125,
-0.0083465576171875,
-0.06134033203125,
-0.035308837890625,
0.05377197265625,
0.01245880126953125,
-0.0306549072265625,
-0.04541015625,
0.0216522216796875,
-0.01383209228515625,
0.0347900390625,
0.01532745361328125,
-0.020416259765625,
0.03253173828125,
0.00927734375,
0.0178375244140625,
-0.0147247314453125,
0.005931854248046875,
-0.00014078617095947266,
0.040618896484375,
0.03857421875,
-0.0149383544921875,
0.0302734375,
0.0186767578125,
-0.0221710205078125,
-0.0195465087890625,
-0.02386474609375,
-0.024627685546875,
-0.0238189697265625,
0.062347412109375,
0.0577392578125,
0.019622802734375,
-0.02825927734375,
-0.0016269683837890625,
-0.01056671142578125,
-0.040130615234375,
0.014556884765625,
0.013519287109375,
-0.0299835205078125,
0.03302001953125,
0.0027217864990234375,
0.02001953125,
0.0223541259765625,
-0.037872314453125,
0.018646240234375,
-0.02996826171875,
0.007503509521484375,
0.004558563232421875,
-0.0074462890625,
-0.041534423828125,
0.054107666015625,
-0.02178955078125,
-0.00693511962890625,
0.02752685546875,
0.0216217041015625,
0.0185089111328125,
0.058319091796875,
0.045928955078125,
0.00656890869140625,
-0.031982421875,
0.0027618408203125,
0.023040771484375,
0.0031871795654296875,
-0.02484130859375,
-0.03289794921875,
-0.0225067138671875,
0.0205078125,
0.020355224609375,
0.01329803466796875,
-0.0297088623046875,
0.051239013671875,
0.0181732177734375,
0.051788330078125,
-0.038848876953125,
0.041015625,
-0.00495147705078125,
0.0176849365234375,
-0.029571533203125,
0.0224151611328125,
0.03118896484375,
-0.02728271484375,
0.01506805419921875,
-0.0033702850341796875,
-0.041656494140625,
-0.0014896392822265625,
-0.034149169921875,
0.020111083984375,
-0.0280914306640625,
-0.0072021484375
]
|
cb1aad45bad765ba46c0441127433bf0d01b2f9b | Wordpress Stackexchange
Q: How to get current get_post_types name? How can I get the current custom post type name and echo it on a page?
A: To get the name of the current post type, use the following code inside the loop.
$post_type = get_post_type( get_the_ID() );
echo '<p>' . $post_type . '</p>';
or display the post type name using printf function.
printf( __( 'The post type is: %s', 'textdomain' ), get_post_type( get_the_ID() ) );
| Q: How to get current get_post_types name? How can I get the current custom post type name and echo it on a page?
A: To get the name of the current post type, use the following code inside the loop.
$post_type = get_post_type( get_the_ID() );
echo '<p>' . $post_type . '</p>';
or display the post type name using printf function.
printf( __( 'The post type is: %s', 'textdomain' ), get_post_type( get_the_ID() ) );
A: You'll need the post object somehow, or, alternatively the queried object on post type archives. On a singular page you might do:
$post = get_queried_object();
$postType = get_post_type_object(get_post_type($post));
if ($postType) {
echo esc_html($postType->labels->singular_name);
}
Or in the loop:
$postType = get_post_type_object(get_post_type());
if ($postType) {
echo esc_html($postType->labels->singular_name);
}
In post type archives:
$postType = get_queried_object();
echo esc_html($postType->labels->singular_name);
All of these will give you the singular name of the post type that was registered in register_post_type's labels key.
A: The method get_post_type() retrieves the post type of the current post or of a given post. More info here.
| wordpress | {
"language": "en",
"length": 170,
"provenance": "stackexchange_00019.jsonl.gz:450818",
"question_score": "19",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169504"
} | [
0.0196990966796875,
-0.00713348388671875,
-0.01021575927734375,
-0.004486083984375,
-0.0083160400390625,
-0.01739501953125,
0.031280517578125,
0.00943756103515625,
-0.015472412109375,
0.0265350341796875,
0.0121002197265625,
0.0115203857421875,
-0.0284423828125,
-0.030975341796875,
0.00013256072998046875,
-0.01495361328125,
0.045745849609375,
-0.05279541015625,
0.0237579345703125,
-0.01255035400390625,
0.002201080322265625,
0.01433563232421875,
0.053924560546875,
0.050323486328125,
0.0187835693359375,
-0.0321044921875,
0.08392333984375,
-0.0216064453125,
0.0211181640625,
-0.012359619140625,
0.0279998779296875,
-0.0214080810546875,
-0.01116180419921875,
0.0321044921875,
0.0102691650390625,
0.031951904296875,
0.0217132568359375,
0.0198516845703125,
0.056182861328125,
0.00024962425231933594,
0.0159759521484375,
0.0011138916015625,
0.0175323486328125,
-0.007434844970703125,
-0.023284912109375,
-0.019073486328125,
-0.01226043701171875,
-0.01995849609375,
0.002277374267578125,
-0.0027370452880859375,
0.0360107421875,
-0.004146575927734375,
0.053192138671875,
0.01117706298828125,
-0.02606201171875,
-0.0226287841796875,
0.00433349609375,
0.0038394927978515625,
0.051483154296875,
-0.06451416015625,
-0.05426025390625,
-0.033447265625,
0.0631103515625,
0.0073699951171875,
-0.007568359375,
0.0268707275390625,
0.047576904296875,
0.0110626220703125,
-0.01497650146484375,
-0.0086212158203125,
0.00788116455078125,
-0.0158538818359375,
0.050445556640625,
0.006755828857421875,
0.00249481201171875,
-0.06402587890625,
0.0092010498046875,
-0.0197296142578125,
0.0236358642578125,
-0.00632476806640625,
0.006412506103515625,
-0.008758544921875,
-0.0675048828125,
0.0110015869140625,
-0.0125579833984375,
0.0217132568359375,
-0.0080718994140625,
-0.0270843505859375,
-0.00018465518951416016,
-0.0307159423828125,
-0.00600433349609375,
0.0034427642822265625,
-0.02752685546875,
0.0226898193359375,
-0.00901031494140625,
-0.034759521484375,
0.0197601318359375,
0.05133056640625,
-0.02197265625,
-0.009857177734375,
0.0031452178955078125,
-0.0369873046875,
0.02020263671875,
-0.03765869140625,
0.0178070068359375,
0.017425537109375,
-0.00124359130859375,
0.0184173583984375,
0.050506591796875,
0.0186920166015625,
0.006317138671875,
0.01708984375,
-0.018829345703125,
-0.009307861328125,
-0.0284423828125,
0.032806396484375,
-0.040557861328125,
0.01090240478515625,
-0.004169464111328125,
0.03997802734375,
0.035675048828125,
0.0594482421875,
0.02801513671875,
-0.01291656494140625,
-0.00904083251953125,
0.0157928466796875,
-0.01806640625,
-0.0703125,
0.03106689453125,
0.0219268798828125,
-0.0215606689453125,
-0.0161285400390625,
0.0227813720703125,
0.0299530029296875,
0.0138397216796875,
-0.02789306640625,
-0.006717681884765625,
-0.036529541015625,
-0.006206512451171875,
0.01386260986328125,
-0.00537872314453125,
-0.0189208984375,
0.018951416015625,
-0.018280029296875,
-0.0127410888671875,
0.0265655517578125,
0.0086822509765625,
0.00804901123046875,
-0.0232086181640625,
-0.0209808349609375,
-0.019073486328125,
-0.02728271484375,
-0.003002166748046875,
0.0118255615234375,
0.033447265625,
-0.0192108154296875,
0.03033447265625,
-0.0308074951171875,
0.0120391845703125,
-0.0299835205078125,
0.0458984375,
-0.0037860870361328125,
-0.010284423828125,
0.036834716796875,
-0.018096923828125,
0.02294921875,
-0.0173492431640625,
-0.0029754638671875,
0.0187225341796875,
-0.01457977294921875,
0.0245361328125,
-0.004512786865234375,
0.035400390625,
-0.00015437602996826172,
-0.015106201171875,
-0.0192718505859375,
-0.0198211669921875,
-0.007465362548828125,
0.03900146484375,
0.009429931640625,
-0.04180908203125,
-0.047271728515625,
-0.007732391357421875,
-0.00649261474609375,
-0.0248870849609375,
0.0245208740234375,
0.015472412109375,
0.040802001953125,
-0.0162811279296875,
0.0179901123046875,
0.010589599609375,
0.042877197265625,
-0.09027099609375,
0.01401519775390625,
-0.002864837646484375,
0.017852783203125,
-0.028839111328125,
-0.00402069091796875,
-0.0232086181640625,
0.0172119140625,
-0.0311737060546875,
-0.001007080078125,
-0.02099609375,
0.0186614990234375,
-0.0511474609375,
-0.007354736328125,
-0.006916046142578125,
0.03814697265625,
0.039947509765625,
-0.01236724853515625,
0.008026123046875,
-0.0205078125,
0.0057220458984375,
-0.07208251953125,
-0.068603515625,
0.0579833984375,
-0.0293426513671875,
-0.006206512451171875,
-0.01506805419921875,
0.01001739501953125,
-0.037353515625,
0.0012083053588867188,
-0.042236328125,
-0.004695892333984375,
0.037017822265625,
0.0268707275390625,
-0.034454345703125,
-0.00910186767578125,
0.029144287109375,
0.0309906005859375,
-0.04339599609375,
-0.0003399848937988281,
-0.022308349609375,
-0.005519866943359375,
-0.00705718994140625,
-0.02764892578125,
0.0096588134765625,
-0.09136962890625,
0.03826904296875,
0.0599365234375,
0.0177764892578125,
0.0321044921875,
0.004230499267578125,
0.0226593017578125,
0.052276611328125,
-0.00801849365234375,
0.02008056640625,
-0.00487518310546875,
0.047637939453125,
0.07427978515625,
-0.021148681640625,
0.0028324127197265625,
0.01537322998046875,
-0.00350189208984375,
0.0307464599609375,
0.032501220703125,
-0.00786590576171875,
0.0087432861328125,
-0.00441741943359375,
0.01020050048828125,
-0.0117340087890625,
-0.0201263427734375,
-0.0016946792602539062,
-0.0231475830078125,
0.059356689453125,
0.031768798828125,
0.05059814453125,
0.039306640625,
-0.049774169921875,
0.016387939453125,
0.00716400146484375,
0.0229949951171875,
0.0014810562133789062,
0.042877197265625,
0.015960693359375,
-0.00853729248046875,
-0.0174713134765625,
-0.01169586181640625,
-0.01387786865234375,
0.005390167236328125,
-0.0207672119140625,
0.001953125,
-0.0287628173828125,
0.003711700439453125,
-0.004337310791015625,
-0.05853271484375,
0.01345062255859375,
0.022613525390625,
-0.0140380859375,
-0.01427459716796875,
-0.0010385513305664062,
0.051788330078125,
-0.01812744140625,
0.031463623046875,
-0.0096282958984375,
0.0004107952117919922,
0.040069580078125,
-0.058380126953125,
0.035308837890625,
-0.02203369140625,
0.06939697265625,
0.06365966796875,
-0.01558685302734375,
0.0183563232421875,
0.007099151611328125,
-0.024658203125,
0.0102386474609375,
0.00305938720703125,
-0.01352691650390625,
-0.0212554931640625,
-0.04864501953125,
0.019805908203125,
0.0079193115234375,
0.051910400390625,
-0.039642333984375,
-0.038970947265625,
-0.01207733154296875,
0.0218048095703125,
-0.049896240234375,
-0.0318603515625,
0.0258941650390625,
-0.05316162109375,
-0.0216217041015625,
-0.04913330078125,
-0.030426025390625,
0.0088653564453125,
-0.03900146484375,
-0.020477294921875,
0.0325927734375,
-0.042877197265625,
-0.0718994140625,
-0.0418701171875,
-0.07763671875,
-0.0217437744140625,
-0.0089263916015625,
0.00921630859375,
0.011383056640625,
0.032073974609375,
0.0174407958984375,
-0.0272369384765625,
0.0150909423828125,
0.035186767578125,
-0.0166778564453125,
0.00988006591796875,
0.0009284019470214844,
0.016204833984375,
0.0313720703125,
0.0257415771484375,
-0.037353515625,
0.01360321044921875,
-0.0026912689208984375,
-0.042144775390625,
-0.0142364501953125,
-0.006420135498046875,
0.02459716796875,
0.039031982421875,
0.00836181640625,
0.0193634033203125,
0.04595947265625,
-0.0303955078125,
-0.01291656494140625,
-0.0257720947265625,
-0.034149169921875,
0.0277252197265625,
0.0025768280029296875,
-0.007305145263671875,
-0.027099609375,
0.05035400390625,
-0.01202392578125,
0.013336181640625,
-0.01556396484375,
-0.03570556640625,
0.0457763671875,
0.016876220703125,
0.0256805419921875,
0.026153564453125,
-0.01532745361328125,
-0.0253448486328125,
0.058074951171875,
0.006465911865234375,
0.0271453857421875,
-0.00036835670471191406,
0.0014438629150390625,
-0.0222625732421875,
-0.09552001953125,
0.0740966796875,
-0.04638671875,
-0.0384521484375,
-0.03472900390625,
-0.035369873046875,
0.0229034423828125,
0.126953125,
-0.036346435546875,
0.006740570068359375,
-0.0213470458984375,
-0.010101318359375,
-0.0209197998046875,
-0.037322998046875,
-0.06964111328125,
-0.00853729248046875,
-0.09771728515625,
-0.0065155029296875,
-0.0231170654296875,
-0.034912109375,
-0.007129669189453125,
0.00838470458984375,
-0.055877685546875,
-0.0496826171875,
0.039642333984375,
-0.08648681640625,
0.0233612060546875,
0.01215362548828125,
-0.01235198974609375,
-0.0068817138671875,
-0.034332275390625,
-0.048614501953125,
-0.0595703125,
-0.01004791259765625,
-0.0014677047729492188,
0.04986572265625,
-0.0002582073211669922,
-0.019744873046875,
-0.0180816650390625,
0.03912353515625,
0.034759521484375,
0.0198974609375,
0.0223388671875,
-0.0120697021484375,
0.02423095703125,
-0.002140045166015625,
0.010009765625,
-0.0249176025390625,
-0.01312255859375,
-0.0005927085876464844,
-0.0211639404296875,
0.027923583984375,
-0.0111541748046875,
-0.011932373046875,
0.0227813720703125,
-0.0300140380859375,
-0.0299530029296875,
-0.00504302978515625,
0.00792694091796875,
0.00922393798828125,
-0.01446533203125,
0.0238037109375,
-0.01457977294921875,
-0.0341796875,
0.06964111328125,
0.0146331787109375,
-0.017425537109375,
-0.01085662841796875,
0.1058349609375,
0.0114288330078125,
-0.0268707275390625,
-0.0537109375,
0.017730712890625,
0.046295166015625,
-0.01134490966796875,
0.035736083984375,
0.0278472900390625,
-0.021514892578125,
0.04156494140625,
0.01168060302734375,
-0.0267181396484375,
0.00418853759765625,
0.039215087890625,
0.00714111328125,
-0.00580596923828125,
-0.005756378173828125,
-0.03558349609375,
0.0275421142578125,
0.0213470458984375,
-0.04345703125,
-0.0259552001953125,
-0.0138092041015625,
0.061309814453125,
-0.06036376953125,
0.0902099609375,
-0.0257568359375,
-0.055145263671875,
0.0225830078125,
0.006237030029296875,
-0.005157470703125,
0.0169677734375,
-0.0029754638671875,
0.006610870361328125,
-0.02545166015625,
0.0030879974365234375,
0.004741668701171875,
-0.002960205078125,
0.034210205078125,
0.0243377685546875,
0.001781463623046875,
0.01119232177734375,
-0.0007214546203613281,
0.007312774658203125,
0.0196990966796875,
-0.0260467529296875,
-0.046112060546875,
0.003017425537109375,
-0.0227813720703125,
-0.00494384765625,
0.036834716796875,
-0.00047516822814941406,
0.0142822265625,
0.056304931640625,
0.0025997161865234375,
0.007160186767578125,
-0.00730133056640625,
0.04754638671875,
-0.021636962890625,
0.0026111602783203125,
0.0134429931640625,
-0.0016164779663085938,
-0.00698089599609375,
0.083251953125,
0.0018453598022460938,
0.05120849609375,
-0.023468017578125,
0.0197296142578125,
0.026123046875,
0.01494598388671875,
0.0362548828125,
-0.01114654541015625,
-0.0099639892578125,
-0.00865936279296875,
-0.0303497314453125,
-0.045196533203125,
-0.0229949951171875,
0.004180908203125,
0.058837890625,
-0.00873565673828125,
-0.00914764404296875,
0.020050048828125,
-0.03277587890625,
-0.0081787109375,
0.00485992431640625,
0.014862060546875,
-0.037872314453125,
-0.00791168212890625,
0.0408935546875,
0.0310516357421875,
0.002124786376953125,
-0.0235137939453125,
0.035400390625,
-0.0167999267578125,
0.0122833251953125,
-0.0341796875,
-0.041168212890625,
0.0095672607421875,
0.03729248046875,
-0.06610107421875,
-0.021881103515625,
0.00965118408203125,
-0.04412841796875,
-0.022674560546875,
0.006256103515625,
-0.02960205078125,
0.012908935546875,
0.02374267578125,
0.06097412109375,
-0.056488037109375,
-0.030975341796875,
-0.00930023193359375,
-0.018707275390625,
0.08343505859375,
0.01261138916015625,
-0.049560546875,
0.007541656494140625,
-0.060943603515625,
-0.0181732177734375,
0.01448822021484375,
-0.032806396484375,
-0.0268402099609375,
-0.0164794921875,
0.007061004638671875,
0.020233154296875,
0.0063934326171875,
0.02069091796875,
-0.000025451183319091797,
0.02520751953125,
-0.0036907196044921875,
0.042022705078125,
-0.0010480880737304688,
0.05120849609375,
0.0195159912109375,
0.04730224609375,
0.0126800537109375,
0.00492095947265625,
-0.047515869140625,
-0.00839996337890625,
0.0116424560546875,
-0.0065460205078125,
-0.03472900390625,
-0.0094146728515625,
-0.0089874267578125,
-0.01776123046875,
0.01250457763671875,
-0.00681304931640625,
-0.0180511474609375,
0.0113677978515625,
0.00936126708984375,
-0.01739501953125,
-0.03570556640625,
0.032745361328125,
-0.0269012451171875,
0.0021762847900390625,
-0.0182037353515625,
-0.0118408203125,
0.01033782958984375,
0.0007410049438476562,
-0.005268096923828125,
-0.00047850608825683594,
-0.0157470703125,
0.0218048095703125,
-0.05078125,
0.06427001953125,
0.081298828125,
0.019439697265625,
0.0467529296875,
0.00749969482421875,
0.01067352294921875,
0.010223388671875,
0.0144805908203125,
-0.00806427001953125,
-0.0323486328125,
0.08526611328125,
0.039642333984375,
-0.03204345703125,
0.0718994140625,
-0.03704833984375,
0.003704071044921875,
0.0156402587890625,
0.0665283203125,
-0.062225341796875,
0.02227783203125,
0.05438232421875,
0.0058135986328125,
-0.0032596588134765625,
-0.0011301040649414062,
-0.0009160041809082031,
-0.0090484619140625,
0.04730224609375,
-0.0053253173828125,
-0.0168304443359375,
0.01461029052734375,
-0.0173797607421875,
0.0002570152282714844,
-0.0323486328125,
0.0887451171875,
0.0017032623291015625,
0.000002682209014892578,
-0.035736083984375,
-0.00418853759765625,
-0.0213165283203125,
-0.0244598388671875,
0.02789306640625,
-0.0265045166015625,
0.004283905029296875,
-0.042755126953125,
0.031005859375,
-0.0200347900390625,
0.00408172607421875,
0.0280914306640625,
0.01024627685546875,
-0.0027313232421875,
0.06280517578125,
-0.0254974365234375,
0.048065185546875,
0.0193939208984375,
-0.03570556640625,
-0.0032501220703125,
-0.03509521484375,
-0.0125274658203125,
0.05419921875,
-0.0246124267578125,
0.0195465087890625,
-0.01568603515625,
-0.0010547637939453125,
-0.0124969482421875,
-0.0261077880859375,
0.081298828125,
-0.02703857421875,
-0.0241546630859375,
0.021484375,
0.0304718017578125,
-0.004161834716796875,
0.00858306884765625,
-0.0108489990234375,
-0.0014276504516601562,
0.016448974609375,
-0.01549530029296875,
-0.0145111083984375,
0.00885772705078125,
-0.01061248779296875,
-0.06817626953125,
0.058746337890625,
0.01593017578125,
0.037506103515625,
0.027984619140625,
0.00926971435546875,
-0.0296478271484375,
-0.0253143310546875,
-0.0299530029296875,
0.041015625,
-0.00922393798828125,
0.05328369140625,
-0.07305908203125,
-0.02972412109375,
0.005550384521484375,
0.050567626953125,
0.0058135986328125,
-0.005889892578125,
0.018341064453125,
-0.0020294189453125,
0.0423583984375,
0.047576904296875,
-0.006927490234375,
-0.0194549560546875,
0.022003173828125,
0.03424072265625,
0.0614013671875,
-0.0206451416015625,
0.0290374755859375,
0.00908660888671875,
-0.01514434814453125,
0.056488037109375,
0.0158233642578125,
0.002521514892578125,
-0.007328033447265625,
-0.07403564453125,
-0.027862548828125,
0.00010770559310913086,
0.0134124755859375,
-0.001922607421875,
-0.0115509033203125,
0.06939697265625,
0.056884765625,
-0.03619384765625,
0.03326416015625,
-0.051788330078125,
0.0650634765625,
0.009918212890625,
-0.006252288818359375,
0.03179931640625,
0.00730133056640625,
0.02410888671875,
-0.0364990234375,
-0.01715087890625,
-0.01654052734375,
0.026214599609375,
0.05059814453125,
0.0338134765625,
0.0211334228515625,
-0.03448486328125,
0.0036067962646484375,
0.04595947265625,
0.07000732421875,
-0.046722412109375,
-0.037384033203125,
0.021209716796875,
-0.005191802978515625,
-0.0134429931640625,
-0.003253936767578125,
0.0014286041259765625,
0.02996826171875,
0.03582763671875,
-0.04901123046875,
-0.0144805908203125,
0.0311431884765625,
0.0550537109375,
-0.003215789794921875,
-0.0243988037109375,
-0.06689453125,
-0.05926513671875,
-0.047760009765625,
-0.01373291015625,
0.0290679931640625,
0.05877685546875,
0.03277587890625,
0.0537109375,
-0.01197052001953125,
-0.0161285400390625,
0.02349853515625,
-0.0029315948486328125,
-0.00255584716796875,
-0.00511932373046875,
0.003284454345703125,
0.00104522705078125,
-0.0254669189453125,
0.02386474609375,
0.055328369140625,
0.004474639892578125,
0.0291290283203125,
-0.002750396728515625,
-0.00893402099609375,
0.0081634521484375,
0.0228118896484375,
-0.004062652587890625,
0.00962066650390625,
-0.02227783203125,
-0.0102691650390625,
0.0018453598022460938,
-0.026123046875,
0.010894775390625,
-0.02337646484375,
0.03289794921875,
-0.0253753662109375,
0.07373046875,
-0.01049041748046875,
0.00856781005859375,
0.0253143310546875,
-0.0216217041015625,
0.031280517578125,
-0.01629638671875,
-0.08001708984375,
-0.0121307373046875,
-0.067138671875,
0.009368896484375,
0.05291748046875,
0.042083740234375,
0.0069732666015625,
0.0012674331665039062,
-0.01541900634765625,
-0.01163482666015625,
-0.00824737548828125,
0.0208587646484375,
0.016357421875,
0.041595458984375,
0.01313018798828125,
0.0249176025390625,
-0.045654296875,
-0.021636962890625,
-0.0143585205078125,
0.0017328262329101562,
0.0462646484375,
-0.0202484130859375,
0.036865234375,
0.03546142578125,
-0.027801513671875,
0.03900146484375,
-0.06793212890625,
-0.032684326171875,
0.04742431640625,
0.008026123046875,
0.004199981689453125,
-0.01325225830078125,
-0.0235137939453125,
0.032012939453125,
0.042633056640625,
-0.0204315185546875,
0.00959014892578125,
0.004802703857421875,
0.02099609375,
-0.0183868408203125,
0.017547607421875,
-0.0256805419921875,
-0.0130462646484375,
-0.0027980804443359375,
-0.0163421630859375,
0.019134521484375,
-0.0006847381591796875,
-0.001598358154296875,
-0.0124053955078125,
0.0313720703125,
-0.045257568359375,
0.036468505859375,
0.01306915283203125,
0.0582275390625,
0.03582763671875,
-0.00238800048828125,
-0.04962158203125,
0.00018846988677978516,
-0.013885498046875,
0.0020961761474609375,
0.0112762451171875,
0.057891845703125,
-0.018829345703125,
0.007350921630859375,
0.02447509765625,
-0.05535888671875,
0.03350830078125,
-0.0270843505859375,
-0.001453399658203125,
-0.025634765625,
0.02886962890625,
-0.00027871131896972656,
-0.039306640625,
-0.0220947265625,
-0.059417724609375,
0.01070404052734375,
0.01922607421875,
0.0029449462890625,
0.0153350830078125,
0.0281982421875,
-0.035919189453125,
0.00787353515625,
-0.0190582275390625,
0.02044677734375,
-0.02032470703125,
-0.0241546630859375,
-0.01424407958984375,
-0.0077362060546875,
-0.045196533203125,
0.0198822021484375,
0.059814453125,
-0.002567291259765625,
0.002803802490234375,
-0.0225067138671875,
-0.0268096923828125,
-0.00804901123046875,
0.0078582763671875,
0.017059326171875,
-0.02337646484375,
-0.0263214111328125,
0.040069580078125,
0.006565093994140625,
0.073486328125,
0.022979736328125,
-0.031646728515625,
0.01073455810546875,
-0.006381988525390625,
-0.025787353515625,
-0.05682373046875,
0.0306243896484375,
-0.09521484375,
-0.026397705078125,
-0.042327880859375,
0.037872314453125,
0.046539306640625,
0.0006055831909179688,
0.0109100341796875,
0.01534271240234375,
-0.00911712646484375,
-0.0184326171875,
-0.0489501953125,
0.00772857666015625,
0.0227203369140625,
-0.01708984375,
-0.01270294189453125,
-0.037445068359375,
-0.045654296875,
0.0074920654296875,
0.0172882080078125,
0.037567138671875,
0.0028972625732421875,
0.0014867782592773438,
-0.0382080078125,
0.006237030029296875,
-0.00174713134765625,
0.0176849365234375,
-0.0021228790283203125,
-0.011566162109375,
0.00007295608520507812,
0.01055908203125,
-0.049041748046875,
-0.003631591796875,
-0.01422882080078125,
0.06744384765625,
-0.0175933837890625,
-0.056427001953125,
-0.01120758056640625,
-0.01267242431640625,
0.006710052490234375,
0.0538330078125,
0.005615234375,
-0.026336669921875,
-0.018218994140625,
-0.017578125,
-0.09222412109375,
-0.007511138916015625,
0.058074951171875,
-0.08135986328125,
0.0081634521484375,
0.029052734375,
-0.004756927490234375,
-0.046630859375,
0.01441192626953125,
-0.02978515625,
-0.017486572265625,
-0.00920867919921875,
-0.00945281982421875,
-0.0100555419921875,
0.0472412109375,
0.031982421875,
-0.03277587890625,
-0.003627777099609375,
-0.00724029541015625,
-0.01422882080078125,
0.026397705078125,
-0.038665771484375,
0.0038318634033203125,
0.0352783203125,
-0.009979248046875,
-0.0042877197265625,
0.027618408203125,
0.02252197265625,
0.0082550048828125,
0.00574493408203125,
-0.00601959228515625,
0.023773193359375,
-0.0009446144104003906,
0.0054931640625,
-0.038543701171875,
0.08697509765625,
0.01605224609375,
0.037384033203125,
0.00949859619140625,
0.035247802734375,
0.0074920654296875,
0.054595947265625,
-0.00975799560546875,
-0.0296173095703125,
0.0159454345703125,
-0.0582275390625,
0.0087127685546875,
-0.01189422607421875,
-0.00968170166015625,
-0.0210723876953125,
0.018524169921875,
0.0245208740234375,
-0.0210723876953125,
0.029022216796875
]
|
99cc16373a9933fcf5e29ba4e889167858d6385b | Wordpress Stackexchange
Q: get_terms(); show private posts when logged in Hi have a custom post type "FAQ".
I got some "FAQ's" that are private, also only visible for logged in users.
I used "get_terms()" funktion for a widget that is listing links to the categories of those "FAQ's".
The "get_terms" does not list the terms, that have only private "FAQ's".
$taxonomy = 'faq_kategorien';
$tax_terms = get_terms($taxonomy);
foreach ($tax_terms as $tax_term) {
echo '<li><a href="/faq_kategorien/'.$tax_term->slug.'">'.$tax_term->name.'</a></li>';
}
How can i get those terms that include only "private" posts ?
A: We had the same issue in one of our projects and we find the solution here
This other doesn't work in our case, but maybe is a second option for you.
| Q: get_terms(); show private posts when logged in Hi have a custom post type "FAQ".
I got some "FAQ's" that are private, also only visible for logged in users.
I used "get_terms()" funktion for a widget that is listing links to the categories of those "FAQ's".
The "get_terms" does not list the terms, that have only private "FAQ's".
$taxonomy = 'faq_kategorien';
$tax_terms = get_terms($taxonomy);
foreach ($tax_terms as $tax_term) {
echo '<li><a href="/faq_kategorien/'.$tax_term->slug.'">'.$tax_term->name.'</a></li>';
}
How can i get those terms that include only "private" posts ?
A: We had the same issue in one of our projects and we find the solution here
This other doesn't work in our case, but maybe is a second option for you.
| wordpress | {
"language": "en",
"length": 117,
"provenance": "stackexchange_00019.jsonl.gz:450844",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169606"
} | [
0.041748046875,
0.007472991943359375,
0.0025501251220703125,
-0.0001748800277709961,
0.01439666748046875,
-0.036102294921875,
0.029388427734375,
-0.025421142578125,
-0.0146484375,
0.01873779296875,
-0.019500732421875,
-0.0208587646484375,
-0.052398681640625,
-0.032470703125,
-0.018218994140625,
-0.05963134765625,
0.021270751953125,
0.027862548828125,
0.058258056640625,
-0.0120391845703125,
0.033599853515625,
0.014617919921875,
0.0421142578125,
-0.00720977783203125,
0.036468505859375,
-0.01641845703125,
0.06298828125,
-0.0213470458984375,
0.0256500244140625,
-0.02197265625,
0.0310211181640625,
-0.03619384765625,
0.00753021240234375,
0.01438140869140625,
0.008270263671875,
0.0040283203125,
-0.058502197265625,
0.02886962890625,
0.017974853515625,
-0.005558013916015625,
0.012542724609375,
-0.007175445556640625,
-0.0260162353515625,
0.024322509765625,
-0.039520263671875,
-0.027984619140625,
-0.01354217529296875,
-0.01238250732421875,
0.01102447509765625,
0.0169677734375,
0.034423828125,
-0.00817108154296875,
0.0304718017578125,
0.00688934326171875,
-0.0011386871337890625,
0.01080322265625,
0.030731201171875,
-0.05828857421875,
0.055908203125,
-0.033355712890625,
-0.052337646484375,
-0.055328369140625,
0.050567626953125,
-0.0225677490234375,
-0.0227508544921875,
0.0024566650390625,
0.00737762451171875,
0.01497650146484375,
-0.0347900390625,
-0.04986572265625,
0.007476806640625,
-0.0222015380859375,
0.01554107666015625,
-0.0057220458984375,
-0.00897979736328125,
-0.040283203125,
-0.0024967193603515625,
-0.0445556640625,
0.0187835693359375,
0.006351470947265625,
-0.004108428955078125,
-0.0023441314697265625,
-0.055267333984375,
0.035125732421875,
0.0002760887145996094,
0.0592041015625,
-0.01221466064453125,
-0.03729248046875,
0.01264190673828125,
0.006744384765625,
0.004856109619140625,
-0.0017566680908203125,
-0.010345458984375,
0.05975341796875,
0.0087432861328125,
-0.02484130859375,
0.032318115234375,
0.04656982421875,
-0.0293426513671875,
-0.01326751708984375,
-0.01012420654296875,
-0.0237884521484375,
-0.00868988037109375,
-0.016265869140625,
0.0137939453125,
0.0014085769653320312,
-0.02935791015625,
0.033721923828125,
0.06048583984375,
0.046875,
0.015045166015625,
0.0291595458984375,
-0.0086517333984375,
-0.051055908203125,
0.01288604736328125,
0.034881591796875,
-0.01129150390625,
0.01206207275390625,
0.01129150390625,
0.01438140869140625,
0.014892578125,
0.0426025390625,
0.0161285400390625,
-0.0230712890625,
-0.00206756591796875,
0.0015039443969726562,
-0.01190185546875,
-0.05694580078125,
-0.0292510986328125,
0.061431884765625,
-0.036865234375,
-0.00031638145446777344,
0.049652099609375,
-0.0118255615234375,
-0.016387939453125,
-0.04339599609375,
-0.0096588134765625,
-0.0020465850830078125,
-0.0286712646484375,
0.0355224609375,
-0.0022411346435546875,
-0.020355224609375,
0.0303955078125,
-0.02203369140625,
0.00867462158203125,
0.01375579833984375,
0.0265350341796875,
0.003566741943359375,
-0.004238128662109375,
-0.030242919921875,
-0.029632568359375,
0.032928466796875,
0.049560546875,
-0.0078887939453125,
-0.060394287109375,
0.0265655517578125,
-0.00077056884765625,
-0.004364013671875,
-0.06353759765625,
-0.016021728515625,
0.058563232421875,
-0.01065826416015625,
-0.015411376953125,
0.028656005859375,
-0.00390625,
0.01476287841796875,
-0.0404052734375,
-0.005046844482421875,
0.0295562744140625,
0.0271759033203125,
0.04949951171875,
-0.05560302734375,
-0.01538848876953125,
0.001674652099609375,
0.00380706787109375,
0.020904541015625,
-0.0305023193359375,
0.04345703125,
0.0299530029296875,
-0.0026378631591796875,
-0.0123138427734375,
-0.041229248046875,
0.03594970703125,
-0.003459930419921875,
-0.0072479248046875,
0.021759033203125,
-0.01331329345703125,
0.010162353515625,
0.0010623931884765625,
0.01068878173828125,
0.00984954833984375,
0.037200927734375,
-0.0081939697265625,
0.02166748046875,
-0.0022640228271484375,
-0.00484466552734375,
-0.060943603515625,
0.0085906982421875,
-0.0253448486328125,
-0.0038661956787109375,
0.00991058349609375,
-0.00943756103515625,
-0.00397491455078125,
-0.0051116943359375,
-0.04736328125,
-0.007343292236328125,
-0.0205230712890625,
0.0265350341796875,
-0.0213775634765625,
0.029510498046875,
0.0212860107421875,
-0.00505828857421875,
-0.03851318359375,
0.0297698974609375,
-0.0026531219482421875,
-0.026702880859375,
-0.0074615478515625,
0.06707763671875,
0.017913818359375,
0.051727294921875,
0.033905029296875,
-0.043060302734375,
0.0218048095703125,
0.020416259765625,
0.042694091796875,
0.02703857421875,
-0.02276611328125,
0.0110321044921875,
0.04364013671875,
0.02996826171875,
-0.0153961181640625,
-0.0033817291259765625,
0.033843994140625,
0.046630859375,
-0.0021038055419921875,
-0.01116943359375,
0.021697998046875,
-0.08599853515625,
0.0269317626953125,
0.05145263671875,
0.033294677734375,
0.00643157958984375,
-0.02008056640625,
-0.01983642578125,
0.024383544921875,
-0.05340576171875,
0.0022144317626953125,
-0.0168304443359375,
0.005451202392578125,
0.0296478271484375,
-0.01053619384765625,
0.027801513671875,
0.03594970703125,
0.0267791748046875,
0.0182952880859375,
0.04150390625,
-0.0179595947265625,
-0.00079345703125,
0.040374755859375,
-0.0322265625,
0.0204010009765625,
-0.04248046875,
-0.01071929931640625,
-0.0205841064453125,
0.00344085693359375,
0.001079559326171875,
0.006542205810546875,
0.005847930908203125,
-0.03521728515625,
0.0007195472717285156,
0.012847900390625,
-0.02008056640625,
-0.0033130645751953125,
0.0298309326171875,
0.04730224609375,
-0.0228271484375,
-0.0187225341796875,
-0.021697998046875,
0.032440185546875,
0.0193023681640625,
0.0106048583984375,
0.046234130859375,
0.0057525634765625,
0.01038360595703125,
-0.01898193359375,
-0.0221099853515625,
0.0151824951171875,
0.0311737060546875,
-0.048919677734375,
-0.06707763671875,
-0.0462646484375,
0.07000732421875,
-0.02850341796875,
0.052215576171875,
0.002117156982421875,
0.0047454833984375,
0.019744873046875,
-0.05828857421875,
0.0301513671875,
-0.0343017578125,
0.06707763671875,
0.0523681640625,
0.025634765625,
-0.0117950439453125,
0.0117034912109375,
-0.0232696533203125,
0.0211181640625,
0.0085601806640625,
0.0059051513671875,
-0.0108795166015625,
-0.00701904296875,
0.0540771484375,
0.005237579345703125,
0.0302886962890625,
-0.03826904296875,
-0.05487060546875,
-0.035797119140625,
0.003997802734375,
-0.050933837890625,
0.039398193359375,
-0.01390838623046875,
-0.060821533203125,
-0.026885986328125,
-0.042449951171875,
-0.033355712890625,
0.037109375,
-0.045074462890625,
0.0035610198974609375,
-0.007495880126953125,
-0.0286407470703125,
-0.050689697265625,
-0.0372314453125,
-0.0538330078125,
0.043792724609375,
-0.006946563720703125,
0.0192718505859375,
0.00476837158203125,
0.060394287109375,
0.0120391845703125,
-0.0435791015625,
-0.00016224384307861328,
0.02117919921875,
-0.0150146484375,
0.021453857421875,
-0.0184173583984375,
0.0012178421020507812,
0.005374908447265625,
0.002040863037109375,
0.01276397705078125,
-0.00037550926208496094,
-0.006801605224609375,
-0.0157623291015625,
0.034881591796875,
-0.0114898681640625,
0.0513916015625,
-0.0182647705078125,
-0.068603515625,
0.0182342529296875,
0.0275421142578125,
-0.0290374755859375,
0.034027099609375,
-0.0269317626953125,
-0.009368896484375,
-0.0114593505859375,
-0.011810302734375,
-0.013427734375,
-0.0220489501953125,
0.014739990234375,
0.00862884521484375,
0.00975799560546875,
-0.0180206298828125,
0.0094146728515625,
0.0014009475708007812,
0.0013761520385742188,
0.00958251953125,
0.014984130859375,
-0.007781982421875,
-0.03253173828125,
0.033203125,
-0.011444091796875,
0.0240936279296875,
-0.0078582763671875,
-0.0028018951416015625,
-0.042388916015625,
-0.05340576171875,
0.01995849609375,
-0.06854248046875,
0.017913818359375,
-0.04156494140625,
-0.00447845458984375,
-0.01357269287109375,
0.0906982421875,
-0.033966064453125,
-0.017242431640625,
0.010589599609375,
0.005443572998046875,
-0.00461578369140625,
-0.0277557373046875,
-0.03961181640625,
-0.036224365234375,
-0.08251953125,
0.004367828369140625,
0.01195526123046875,
-0.039947509765625,
-0.041351318359375,
0.011566162109375,
-0.09344482421875,
-0.0185699462890625,
0.0135955810546875,
-0.0261993408203125,
0.033355712890625,
0.00641632080078125,
0.0171966552734375,
-0.029541015625,
0.0027523040771484375,
-0.02777099609375,
-0.060089111328125,
-0.0135040283203125,
0.015380859375,
0.035491943359375,
0.005390167236328125,
-0.004627227783203125,
-0.007244110107421875,
0.050140380859375,
0.034912109375,
-0.00045108795166015625,
0.0058746337890625,
-0.02642822265625,
0.01617431640625,
0.02117919921875,
-0.0012416839599609375,
-0.0102691650390625,
-0.0081787109375,
-0.01351165771484375,
-0.03204345703125,
-0.0035610198974609375,
-0.022613525390625,
-0.00537872314453125,
0.0001938343048095703,
-0.0286407470703125,
-0.0469970703125,
-0.00650787353515625,
0.0081939697265625,
-0.002269744873046875,
-0.0036983489990234375,
-0.00875091552734375,
-0.004207611083984375,
-0.0435791015625,
0.0150909423828125,
0.0242156982421875,
-0.03314208984375,
0.01251220703125,
0.01265716552734375,
0.01032257080078125,
-0.02056884765625,
-0.04364013671875,
0.01776123046875,
0.032745361328125,
-0.028106689453125,
0.04107666015625,
0.026214599609375,
-0.0121002197265625,
0.049591064453125,
-0.0156707763671875,
0.03790283203125,
-0.01168060302734375,
0.053924560546875,
-0.034454345703125,
-0.0193634033203125,
0.035308837890625,
-0.033050537109375,
-0.018035888671875,
0.00777435302734375,
-0.01206207275390625,
-0.01047515869140625,
-0.00809478759765625,
0.034576416015625,
-0.02996826171875,
0.0498046875,
-0.02398681640625,
0.0007190704345703125,
-0.0030059814453125,
-0.034698486328125,
0.029541015625,
0.0275421142578125,
-0.00406646728515625,
-0.01226806640625,
0.00955963134765625,
-0.03375244140625,
-0.045166015625,
-0.01461029052734375,
-0.023895263671875,
-0.0222015380859375,
-0.0080718994140625,
-0.052978515625,
-0.02777099609375,
-0.01123809814453125,
0.01593017578125,
-0.022979736328125,
-0.092041015625,
0.02099609375,
-0.0053558349609375,
0.046356201171875,
0.0728759765625,
-0.00022459030151367188,
0.027740478515625,
-0.00893402099609375,
-0.0143890380859375,
0.0193634033203125,
-0.009429931640625,
0.007419586181640625,
-0.028076171875,
0.028839111328125,
-0.0135955810546875,
0.01374053955078125,
0.0175018310546875,
0.06597900390625,
0.0038661956787109375,
0.049163818359375,
-0.036651611328125,
0.00360107421875,
-0.0022716522216796875,
0.0281219482421875,
0.0274505615234375,
-0.00016891956329345703,
0.0052490234375,
0.003131866455078125,
0.01035308837890625,
0.012176513671875,
-0.0124053955078125,
-0.0048065185546875,
-0.006687164306640625,
-0.003875732421875,
0.0196990966796875,
0.022216796875,
-0.0211639404296875,
-0.0103607177734375,
0.0198211669921875,
0.02020263671875,
-0.0119171142578125,
-0.026092529296875,
0.003299713134765625,
0.0295867919921875,
0.004344940185546875,
-0.004253387451171875,
0.007320404052734375,
-0.0258636474609375,
-0.0032253265380859375,
-0.006473541259765625,
-0.032318115234375,
-0.00010657310485839844,
0.006008148193359375,
-0.0389404296875,
-0.0222625732421875,
0.030487060546875,
-0.039031982421875,
-0.021942138671875,
-0.00539398193359375,
-0.03472900390625,
0.02325439453125,
0.007568359375,
0.037506103515625,
-0.044830322265625,
-0.01050567626953125,
-0.0036144256591796875,
-0.0006036758422851562,
0.035980224609375,
0.00501251220703125,
-0.0421142578125,
-0.00479888916015625,
-0.06280517578125,
0.0082855224609375,
0.0100555419921875,
-0.055267333984375,
-0.00568389892578125,
-0.01543426513671875,
0.0455322265625,
0.0279998779296875,
-0.0079193115234375,
-0.08740234375,
-0.0101470947265625,
-0.01136016845703125,
0.040008544921875,
0.0276641845703125,
0.00417327880859375,
0.0229949951171875,
0.004062652587890625,
0.0555419921875,
0.001972198486328125,
-0.0190887451171875,
-0.063232421875,
-0.0086517333984375,
-0.015869140625,
-0.0887451171875,
-0.01019287109375,
0.0216064453125,
-0.0240020751953125,
0.051055908203125,
0.0095367431640625,
0.002887725830078125,
0.0016527175903320312,
0.00606536865234375,
0.0010843276977539062,
-0.0005578994750976562,
0.0184783935546875,
0.050872802734375,
-0.01386260986328125,
0.06646728515625,
-0.007282257080078125,
0.0146484375,
0.00609588623046875,
-0.027679443359375,
0.044708251953125,
-0.0001367330551147461,
0.048248291015625,
-0.025634765625,
-0.05694580078125,
0.0226898193359375,
0.0494384765625,
0.0650634765625,
0.0601806640625,
-0.0204925537109375,
0.05419921875,
0.01605224609375,
-0.006687164306640625,
0.0195159912109375,
-0.0240478515625,
0.014892578125,
-0.0176849365234375,
-0.00019860267639160156,
0.019073486328125,
-0.037506103515625,
0.01358795166015625,
0.04974365234375,
0.06109619140625,
-0.072998046875,
0.013458251953125,
0.034942626953125,
-0.0179901123046875,
0.0157318115234375,
0.061553955078125,
-0.04473876953125,
-0.038116455078125,
-0.054931640625,
-0.0205841064453125,
-0.01300811767578125,
-0.01971435546875,
0.0163116455078125,
0.0160675048828125,
-0.01509857177734375,
0.03515625,
-0.0009908676147460938,
-0.046478271484375,
0.0010099411010742188,
0.044708251953125,
0.0218353271484375,
-0.0302734375,
-0.0102081298828125,
0.0023326873779296875,
-0.005207061767578125,
-0.07257080078125,
0.01120758056640625,
-0.0260467529296875,
-0.007061004638671875,
0.0615234375,
-0.01110076904296875,
0.0021305084228515625,
0.0248260498046875,
-0.0055999755859375,
0.0258636474609375,
-0.0100860595703125,
-0.080322265625,
0.0247039794921875,
-0.01509857177734375,
0.0268707275390625,
0.04022216796875,
-0.03515625,
0.016876220703125,
0.0016078948974609375,
-0.023590087890625,
-0.045501708984375,
-0.07061767578125,
0.08831787109375,
-0.028778076171875,
-0.00702667236328125,
0.0152435302734375,
0.06903076171875,
-0.006587982177734375,
0.00787353515625,
0.00693511962890625,
-0.045196533203125,
-0.005767822265625,
-0.006130218505859375,
-0.008026123046875,
0.005123138427734375,
-0.007007598876953125,
-0.04437255859375,
0.0826416015625,
0.005870819091796875,
0.0030040740966796875,
-0.00489044189453125,
0.0231170654296875,
-0.0291595458984375,
0.02099609375,
-0.032073974609375,
0.056732177734375,
0.007503509521484375,
0.0219268798828125,
-0.043853759765625,
-0.0081329345703125,
-0.0107879638671875,
0.0291290283203125,
0.03387451171875,
0.01364898681640625,
-0.0240936279296875,
-0.0260467529296875,
0.004207611083984375,
0.035888671875,
-0.0098724365234375,
0.0099029541015625,
0.04119873046875,
0.038909912109375,
0.055267333984375,
0.00800323486328125,
0.04449462890625,
0.004878997802734375,
-0.01161956787109375,
0.076904296875,
0.0152740478515625,
0.01043701171875,
-0.0184173583984375,
-0.009002685546875,
-0.03521728515625,
-0.009735107421875,
0.0211639404296875,
-0.0277252197265625,
-0.00030517578125,
0.0303497314453125,
0.033172607421875,
-0.06671142578125,
-0.006603240966796875,
-0.0364990234375,
0.05267333984375,
0.005977630615234375,
0.01568603515625,
0.024658203125,
0.0194854736328125,
0.0267181396484375,
-0.033477783203125,
0.0123138427734375,
-0.003978729248046875,
-0.018463134765625,
0.060211181640625,
0.02716064453125,
0.0272674560546875,
-0.058929443359375,
-0.003459930419921875,
0.053192138671875,
0.08673095703125,
-0.0469970703125,
-0.06268310546875,
-0.00408172607421875,
-0.0045928955078125,
0.01186370849609375,
0.0531005859375,
0.028778076171875,
0.043701171875,
0.0888671875,
-0.032501220703125,
0.0034656524658203125,
0.032470703125,
0.037139892578125,
-0.01171875,
-0.048919677734375,
-0.041900634765625,
-0.007137298583984375,
-0.03826904296875,
-0.047088623046875,
0.016693115234375,
0.037200927734375,
0.068115234375,
-0.0111083984375,
0.037078857421875,
-0.02288818359375,
0.011749267578125,
-0.01111602783203125,
0.005939483642578125,
-0.019805908203125,
-0.0245513916015625,
-0.022125244140625,
0.0192718505859375,
0.03106689453125,
0.0003101825714111328,
0.00656890869140625,
0.00910186767578125,
0.030853271484375,
0.0034465789794921875,
-0.0137786865234375,
0.031524658203125,
-0.005687713623046875,
0.01148223876953125,
-0.01137542724609375,
0.042083740234375,
0.047454833984375,
-0.0044403076171875,
-0.0218353271484375,
0.0005846023559570312,
0.057464599609375,
-0.02032470703125,
0.064208984375,
0.0005388259887695312,
0.0189666748046875,
0.0297088623046875,
-0.051513671875,
0.0280303955078125,
-0.0202178955078125,
-0.076171875,
0.0106048583984375,
-0.03839111328125,
-0.038970947265625,
-0.016143798828125,
0.018646240234375,
0.0186767578125,
0.01111602783203125,
0.0589599609375,
-0.0212554931640625,
-0.017547607421875,
0.007480621337890625,
0.04547119140625,
-0.019439697265625,
-0.0158843994140625,
0.00916290283203125,
-0.037750244140625,
-0.031280517578125,
-0.036163330078125,
0.0487060546875,
0.00991058349609375,
0.03472900390625,
0.009124755859375,
0.037109375,
-0.0736083984375,
0.0276947021484375,
-0.09210205078125,
-0.06170654296875,
0.03814697265625,
-0.01114654541015625,
-0.03558349609375,
0.0229339599609375,
-0.02850341796875,
0.041595458984375,
0.01157379150390625,
-0.0270233154296875,
0.0199737548828125,
0.00460052490234375,
0.0014972686767578125,
-0.0188446044921875,
0.0447998046875,
-0.01255035400390625,
0.01043701171875,
-0.0139617919921875,
-0.0251007080078125,
0.05377197265625,
0.019561767578125,
-0.0225830078125,
0.024017333984375,
-0.0299530029296875,
-0.0305938720703125,
0.02996826171875,
-0.039520263671875,
0.0181121826171875,
0.03192138671875,
-0.03729248046875,
0.0299072265625,
-0.00872802734375,
-0.02728271484375,
0.033538818359375,
0.005847930908203125,
-0.0246124267578125,
-0.004730224609375,
0.0089111328125,
0.0201416015625,
0.01435089111328125,
0.0196380615234375,
-0.05377197265625,
-0.00923919677734375,
0.0279083251953125,
-0.00620269775390625,
0.0178985595703125,
-0.0022258758544921875,
-0.04107666015625,
-0.04193115234375,
-0.01068115234375,
-0.004337310791015625,
-0.009185791015625,
-0.051788330078125,
-0.047882080078125,
0.01116180419921875,
0.03521728515625,
-0.00787353515625,
-0.058624267578125,
0.004009246826171875,
-0.0157623291015625,
0.07940673828125,
-0.029937744140625,
-0.01837158203125,
0.0247650146484375,
-0.0085296630859375,
-0.05511474609375,
0.07281494140625,
0.0003829002380371094,
-0.063232421875,
0.054595947265625,
0.022247314453125,
0.0479736328125,
-0.03399658203125,
-0.033447265625,
0.052398681640625,
0.031829833984375,
0.0794677734375,
0.0234832763671875,
-0.0291748046875,
-0.0120849609375,
0.0158538818359375,
-0.03057861328125,
-0.042327880859375,
0.03668212890625,
-0.044036865234375,
-0.038818359375,
0.052764892578125,
-0.04779052734375,
-0.0135955810546875,
-0.03472900390625,
-0.06658935546875,
0.09375,
0.00876617431640625,
-0.031036376953125,
-0.06182861328125,
-0.0209503173828125,
-0.00010567903518676758,
0.010986328125,
-0.005901336669921875,
-0.029541015625,
-0.061859130859375,
0.04290771484375,
0.0148773193359375,
0.032073974609375,
0.0330810546875,
0.0160980224609375,
-0.054595947265625,
-0.00724029541015625,
-0.0298004150390625,
0.002040863037109375,
-0.007843017578125,
0.000010788440704345703,
-0.01251983642578125,
0.0267333984375,
-0.03851318359375,
-0.03973388671875,
-0.0171356201171875,
0.0307159423828125,
0.00775146484375,
-0.052215576171875,
-0.015869140625,
-0.042266845703125,
-0.006435394287109375,
-0.026580810546875,
0.0023956298828125,
0.0070343017578125,
0.0020923614501953125,
0.01617431640625,
-0.038604736328125,
0.007190704345703125,
0.02728271484375,
-0.04266357421875,
0.01031494140625,
-0.004688262939453125,
-0.0277252197265625,
-0.00859832763671875,
-0.011566162109375,
-0.045257568359375,
-0.0006847381591796875,
-0.00630950927734375,
-0.0057525634765625,
-0.01367950439453125,
0.0240478515625,
-0.0234527587890625,
-0.0189971923828125,
-0.044281005859375,
0.001285552978515625,
-0.015716552734375,
-0.046417236328125,
0.0114898681640625,
-0.014373779296875,
-0.047637939453125,
-0.01044464111328125,
0.0139007568359375,
-0.013214111328125,
0.01139068603515625,
-0.0146026611328125,
-0.0241851806640625,
-0.023681640625,
0.0214691162109375,
0.0023975372314453125,
-0.0005550384521484375,
-0.005199432373046875,
0.055816650390625,
0.03076171875,
0.0633544921875,
-0.00360107421875,
0.06378173828125,
-0.004329681396484375,
0.032989501953125,
0.01413726806640625,
-0.0101470947265625,
0.0231781005859375,
0.00988006591796875,
-0.002613067626953125,
-0.036529541015625,
-0.00553131103515625,
-0.0192413330078125,
-0.0233001708984375,
-0.021759033203125,
-0.037872314453125,
0.0167999267578125
]
|
473065566fe174b433ff9fe4adceed0c28faffe0 | Wordpress Stackexchange
Q: Why do themes rely on "The Loop"? I've been looking at Wordpress themes development recently, and I'm trying to understand why Wordpress is coded with "The Loop", rather than providing an array of posts that you can loop through with a foreach.
It just seems to add complexity for theme development, but surely if they went out of there way to create this concept of "loop" there must be a reason?
A: You are thinking of WordPress templates as PHP application code. Essentially they are not that.
WordPress templates by design are templates using Template Tags API. It is extra level of abstraction, that just happens to allow to use rest of PHP language too.
The ease of template tags serves the popularity of WordPress and extremely low entry bar for people to tweak themes. Believe me, there are plenty of people around who use/tweak loops without much understanding of what they actually are, in extreme cases, what arrays even are.
| Q: Why do themes rely on "The Loop"? I've been looking at Wordpress themes development recently, and I'm trying to understand why Wordpress is coded with "The Loop", rather than providing an array of posts that you can loop through with a foreach.
It just seems to add complexity for theme development, but surely if they went out of there way to create this concept of "loop" there must be a reason?
A: You are thinking of WordPress templates as PHP application code. Essentially they are not that.
WordPress templates by design are templates using Template Tags API. It is extra level of abstraction, that just happens to allow to use rest of PHP language too.
The ease of template tags serves the popularity of WordPress and extremely low entry bar for people to tweak themes. Believe me, there are plenty of people around who use/tweak loops without much understanding of what they actually are, in extreme cases, what arrays even are.
A: The loop is just an abstraction of the process of iterating over the posts returned by a query. As with all abstractions you pay some performance price for not using directly the language constructs like arrays, but it creates a more readable code (hopefully) as $q->hove_posts() is easier to grasp then ($I++ < count($q->$posts)).
The main reason of why themes follow the loop although they are not really required (there are some hooks that can be called while iterating loop style, but I don't think they are used much) is probably that all tutorials and the themes that are included with wordpress use it, ie simple inertia, but I never have seen anyone claiming that the loop is bad in any real way therefor there isn't much point in trying to do it in any other way.
A: Every query object contains an array of the returned posts, so technically you could use foreach to display the posts, but I don't think it would simplify anything. First of all, you'll lose the loop start and end actions, and the ability to know if code is being executed within the loop or not, but the major thing you'll lose is the current post context - all template tags would have to pass the context of which post you're currently working with.
A: WordPress data is all centered around the concept of "The Post" which is really little more that a colloquialism used to describe a complex array of data stored in the database. The pieces of data in that array make sense together in context.
So technically, sure, you could extract all that data from that array with a foreach if you really wanted to. But why bother? "The Loop" (also, kind of a colloquialism) really simplifies theme development, rather than creating complexity. It provides you with the ability to use all the convenience methods to extract whichever type of data (from the current "post" in your iteration) you desire to display in your theme.
What's simpler than this?
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
// get that data, bro. Put it in the middle of some HTML, if you want.
<?php endwhile; else : ?>
// or don't, who cares?
<?php endif; ?>
If this makes more sense to you, go for it:
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
// Oh sweet, I can echo everything and concatenate stuff!
} // end while
} // end if
Reference: The Loop
| wordpress | {
"language": "en",
"length": 585,
"provenance": "stackexchange_00019.jsonl.gz:450887",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169794"
} | [
0.004138946533203125,
-0.01263427734375,
-0.006587982177734375,
-0.00753021240234375,
-0.007091522216796875,
-0.0296478271484375,
0.040374755859375,
-0.0166473388671875,
0.05242919921875,
0.024169921875,
-0.02532958984375,
-0.047119140625,
-0.0038814544677734375,
-0.0291290283203125,
-0.041595458984375,
-0.04534912109375,
0.03765869140625,
-0.03826904296875,
0.01373291015625,
-0.0166015625,
0.009521484375,
0.0079498291015625,
0.0235595703125,
0.06341552734375,
0.00630950927734375,
-0.0092620849609375,
0.0469970703125,
-0.040252685546875,
0.0030384063720703125,
-0.04046630859375,
0.004215240478515625,
0.0248565673828125,
0.022125244140625,
0.0235443115234375,
-0.02911376953125,
-0.00948333740234375,
0.0247955322265625,
-0.0204620361328125,
0.013671875,
0.0172576904296875,
-0.007106781005859375,
0.005023956298828125,
0.055450439453125,
-0.01861572265625,
-0.0027217864990234375,
0.0148773193359375,
-0.003742218017578125,
-0.046173095703125,
0.011566162109375,
-0.0207061767578125,
0.00638580322265625,
-0.01493072509765625,
0.0230865478515625,
0.015838623046875,
-0.015838623046875,
0.0059967041015625,
0.00937652587890625,
-0.027374267578125,
0.029205322265625,
-0.055450439453125,
-0.035247802734375,
-0.01355743408203125,
0.049346923828125,
0.018890380859375,
0.0021209716796875,
-0.0164031982421875,
-0.0299835205078125,
0.0243072509765625,
-0.03955078125,
-0.008453369140625,
0.034759521484375,
-0.040435791015625,
-0.007541656494140625,
-0.04345703125,
0.020477294921875,
-0.0011501312255859375,
-0.003814697265625,
-0.01506805419921875,
-0.0110015869140625,
0.0191802978515625,
-0.014678955078125,
-0.01116943359375,
-0.012237548828125,
-0.0036468505859375,
-0.00743865966796875,
0.026397705078125,
-0.0238189697265625,
-0.0089569091796875,
-0.037628173828125,
-0.05133056640625,
-0.0347900390625,
0.032684326171875,
-0.037933349609375,
-0.049346923828125,
-0.043670654296875,
-0.01727294921875,
-0.0009522438049316406,
-0.01522064208984375,
-0.0038204193115234375,
0.0061798095703125,
0.0027942657470703125,
-0.042999267578125,
0.035003662109375,
-0.0091400146484375,
-0.0108489990234375,
0.028289794921875,
-0.00897216796875,
0.076171875,
0.06402587890625,
0.052398681640625,
0.0189208984375,
0.00887298583984375,
-0.007534027099609375,
-0.040435791015625,
-0.0025482177734375,
0.009735107421875,
-0.053375244140625,
0.0394287109375,
0.0260772705078125,
0.0204315185546875,
0.0006136894226074219,
0.02178955078125,
0.024383544921875,
0.0131683349609375,
-0.014129638671875,
0.0095367431640625,
-0.0008172988891601562,
-0.06451416015625,
0.03375244140625,
0.032562255859375,
-0.037933349609375,
-0.0182342529296875,
0.0180206298828125,
0.01413726806640625,
0.003997802734375,
-0.0252227783203125,
0.0161285400390625,
-0.01561737060546875,
-0.01328277587890625,
0.01806640625,
-0.016876220703125,
-0.0185394287109375,
-0.0095062255859375,
-0.03875732421875,
0.04180908203125,
-0.0007100105285644531,
0.028350830078125,
0.0311126708984375,
0.01678466796875,
-0.0134735107421875,
0.04327392578125,
0.01403045654296875,
-0.0283050537109375,
0.03094482421875,
0.0616455078125,
-0.0013322830200195312,
0.012969970703125,
-0.0100860595703125,
0.03497314453125,
0.0021686553955078125,
-0.009674072265625,
0.002925872802734375,
0.004665374755859375,
-0.039031982421875,
-0.039459228515625,
-0.004184722900390625,
-0.01120758056640625,
0.0042266845703125,
0.0307464599609375,
-0.01076507568359375,
0.024078369140625,
-0.04254150390625,
0.01922607421875,
0.0201568603515625,
0.00878143310546875,
0.033355712890625,
0.0188751220703125,
-0.009246826171875,
0.0187835693359375,
0.01131439208984375,
-0.0214996337890625,
-0.0274200439453125,
0.0203094482421875,
-0.0154876708984375,
-0.059814453125,
0.037841796875,
0.0152130126953125,
0.069091796875,
0.005779266357421875,
0.0203399658203125,
0.036285400390625,
0.021148681640625,
-0.00783538818359375,
0.059051513671875,
0.006195068359375,
-0.049713134765625,
-0.018280029296875,
0.0007538795471191406,
-0.0011310577392578125,
-0.06365966796875,
-0.0004820823669433594,
-0.0058746337890625,
0.0029239654541015625,
-0.0143890380859375,
-0.030303955078125,
-0.01641845703125,
-0.0157623291015625,
0.0347900390625,
0.0236053466796875,
0.0293121337890625,
0.00962066650390625,
0.0179290771484375,
-0.04632568359375,
0.027435302734375,
-0.02691650390625,
0.01352691650390625,
-0.01345062255859375,
-0.016143798828125,
0.0230255126953125,
-0.052459716796875,
0.054840087890625,
0.0190582275390625,
0.027099609375,
0.0200653076171875,
0.0682373046875,
-0.00913238525390625,
-0.004123687744140625,
-0.0280914306640625,
0.004436492919921875,
0.0254364013671875,
-0.08807373046875,
0.036590576171875,
0.0076446533203125,
-0.01128387451171875,
-0.048675537109375,
0.0017328262329101562,
-0.0205841064453125,
-0.0254058837890625,
-0.015716552734375,
0.05865478515625,
0.029144287109375,
0.03289794921875,
-0.023895263671875,
-0.00682830810546875,
0.053985595703125,
-0.0282745361328125,
0.00922393798828125,
-0.0005574226379394531,
0.0242462158203125,
0.0187835693359375,
0.01226806640625,
-0.019744873046875,
0.033721923828125,
-0.050750732421875,
0.0270538330078125,
0.0084075927734375,
0.01294708251953125,
0.01812744140625,
-0.03094482421875,
-0.0034122467041015625,
-0.0037174224853515625,
-0.006443023681640625,
-0.0218963623046875,
-0.007549285888671875,
0.0253143310546875,
0.01044464111328125,
0.015167236328125,
0.0005259513854980469,
-0.0256500244140625,
0.020477294921875,
0.0192413330078125,
-0.035552978515625,
0.007785797119140625,
-0.002071380615234375,
-0.07147216796875,
0.0254058837890625,
-0.0305328369140625,
0.01094818115234375,
0.0169219970703125,
-0.023590087890625,
-0.0211029052734375,
0.0252685546875,
-0.037872314453125,
-0.0223236083984375,
-0.01555633544921875,
-0.0312042236328125,
-0.0032501220703125,
-0.001743316650390625,
0.045928955078125,
0.01047515869140625,
0.01568603515625,
0.047271728515625,
-0.006359100341796875,
0.0543212890625,
-0.01477813720703125,
-0.00591278076171875,
0.041107177734375,
0.0191497802734375,
0.00801849365234375,
0.0019092559814453125,
0.00505828857421875,
0.035919189453125,
-0.0091705322265625,
-0.0030059814453125,
0.008453369140625,
0.007503509521484375,
0.04107666015625,
0.0198211669921875,
0.008575439453125,
-0.01751708984375,
-0.0302886962890625,
-0.0186309814453125,
0.027435302734375,
0.08905029296875,
-0.00875091552734375,
-0.050689697265625,
0.0134124755859375,
0.058685302734375,
-0.027374267578125,
-0.0528564453125,
0.06951904296875,
-0.0711669921875,
-0.00705718994140625,
-0.0706787109375,
-0.037506103515625,
-0.00870513916015625,
-0.056182861328125,
-0.0099639892578125,
-0.030731201171875,
-0.01445770263671875,
-0.056488037109375,
-0.0914306640625,
-0.0748291015625,
-0.049774169921875,
-0.0206298828125,
0.01100921630859375,
0.0098114013671875,
0.0274810791015625,
0.00424957275390625,
-0.06658935546875,
-0.027252197265625,
0.01360321044921875,
-0.003936767578125,
0.00675201416015625,
-0.019287109375,
-0.00798797607421875,
-0.029388427734375,
0.0175323486328125,
-0.0810546875,
-0.032745361328125,
0.03399658203125,
-0.0355224609375,
-0.022003173828125,
-0.0142364501953125,
-0.001338958740234375,
-0.0055694580078125,
0.01241302490234375,
0.00954437255859375,
0.0112152099609375,
-0.03765869140625,
-0.033447265625,
-0.014739990234375,
-0.05291748046875,
-0.01186370849609375,
0.045654296875,
0.001621246337890625,
-0.0352783203125,
-0.0009303092956542969,
0.012908935546875,
0.0018358230590820312,
-0.058502197265625,
-0.03173828125,
0.106689453125,
0.0222930908203125,
0.045318603515625,
0.006656646728515625,
0.0271759033203125,
-0.046142578125,
0.0175933837890625,
-0.003910064697265625,
-0.053863525390625,
-0.021759033203125,
-0.0018129348754882812,
-0.006500244140625,
-0.033538818359375,
0.039154052734375,
0.005275726318359375,
0.0027256011962890625,
-0.00894927978515625,
-0.010894775390625,
0.01210784912109375,
0.06488037109375,
-0.02801513671875,
0.010223388671875,
-0.007110595703125,
-0.0094451904296875,
0.01593017578125,
-0.004795074462890625,
-0.05865478515625,
-0.01419830322265625,
-0.0018911361694335938,
0.0174713134765625,
-0.01148223876953125,
0.0246429443359375,
-0.01471710205078125,
0.07159423828125,
0.0229644775390625,
-0.01389312744140625,
0.01947021484375,
-0.0203704833984375,
0.02362060546875,
-0.0309906005859375,
0.03515625,
-0.07513427734375,
0.025634765625,
-0.05572509765625,
-0.045806884765625,
-0.00836944580078125,
0.02935791015625,
0.049957275390625,
-0.0007200241088867188,
-0.020172119140625,
-0.002140045166015625,
0.02740478515625,
-0.00710296630859375,
0.020660400390625,
-0.0027618408203125,
0.01511383056640625,
-0.00775146484375,
0.0222930908203125,
0.01087188720703125,
-0.00911712646484375,
-0.0089263916015625,
-0.027130126953125,
-0.005931854248046875,
0.027069091796875,
-0.03289794921875,
0.00939178466796875,
-0.0136871337890625,
0.0040740966796875,
-0.0215606689453125,
-0.0018758773803710938,
0.02789306640625,
0.037017822265625,
0.0108184814453125,
0.01371002197265625,
-0.00408172607421875,
-0.0222625732421875,
0.07037353515625,
0.0189361572265625,
-0.01032257080078125,
0.00756072998046875,
0.11016845703125,
-0.003963470458984375,
-0.041229248046875,
-0.114501953125,
-0.006641387939453125,
0.0396728515625,
0.00514984130859375,
0.050262451171875,
0.0294036865234375,
-0.023590087890625,
0.041717529296875,
0.0239410400390625,
-0.0152740478515625,
0.0184173583984375,
0.004344940185546875,
0.0092926025390625,
-0.025115966796875,
0.007335662841796875,
0.0013942718505859375,
0.023193359375,
0.0341796875,
0.0178985595703125,
-0.0310516357421875,
0.01067352294921875,
0.01183319091796875,
0.0304107666015625,
-0.0401611328125,
-0.039276123046875,
-0.0227203369140625,
0.017547607421875,
0.00531768798828125,
0.01488494873046875,
-0.004909515380859375,
0.0120086669921875,
-0.00887298583984375,
0.01320648193359375,
0.0270233154296875,
-0.0085296630859375,
-0.01641845703125,
0.00948333740234375,
0.05145263671875,
0.001384735107421875,
0.042938232421875,
-0.0186004638671875,
-0.00717926025390625,
0.0237274169921875,
-0.0003650188446044922,
-0.058197021484375,
-0.0021152496337890625,
0.017333984375,
0.0282440185546875,
0.033050537109375,
0.0283203125,
0.0643310546875,
-0.0118560791015625,
0.003429412841796875,
0.006961822509765625,
-0.0240631103515625,
-0.0159912109375,
-0.047332763671875,
-0.00013446807861328125,
0.0158843994140625,
-0.01091766357421875,
0.0177001953125,
0.02288818359375,
0.0063629150390625,
0.01207733154296875,
-0.0236663818359375,
0.05413818359375,
0.048675537109375,
0.0093536376953125,
0.007232666015625,
0.012786865234375,
-0.0038814544677734375,
-0.01010894775390625,
-0.01300811767578125,
-0.04486083984375,
0.01424407958984375,
0.0164947509765625,
0.0736083984375,
-0.0159454345703125,
-0.046417236328125,
0.02349853515625,
-0.052825927734375,
0.03875732421875,
0.029571533203125,
-0.034698486328125,
-0.01104736328125,
-0.0228271484375,
-0.0122222900390625,
0.04443359375,
-0.03753662109375,
0.01068878173828125,
0.0027637481689453125,
0.00799560546875,
0.009368896484375,
-0.0003943443298339844,
-0.0290679931640625,
-0.0010585784912109375,
0.008758544921875,
-0.044891357421875,
0.0026454925537109375,
0.019439697265625,
-0.0865478515625,
-0.066650390625,
-0.0029449462890625,
0.0015516281127929688,
0.0288543701171875,
0.0141448974609375,
0.05267333984375,
-0.0295867919921875,
-0.054473876953125,
-0.0015363693237304688,
-0.01374053955078125,
0.07275390625,
0.0305633544921875,
-0.0904541015625,
0.0367431640625,
-0.049957275390625,
0.00940704345703125,
-0.0843505859375,
-0.095703125,
-0.06536865234375,
-0.0123138427734375,
-0.0018033981323242188,
0.009521484375,
0.01995849609375,
0.04034423828125,
-0.03204345703125,
0.0296783447265625,
-0.00760650634765625,
0.0614013671875,
-0.0179443359375,
0.0205078125,
0.0545654296875,
-0.01617431640625,
0.0217742919921875,
0.000033915042877197266,
-0.0115966796875,
-0.0130767822265625,
-0.01300048828125,
-0.031158447265625,
-0.01105499267578125,
0.023468017578125,
-0.0167999267578125,
0.0017175674438476562,
-0.005565643310546875,
0.0005331039428710938,
0.021575927734375,
-0.0248260498046875,
0.003948211669921875,
-0.0151824951171875,
0.0160675048828125,
-0.044281005859375,
-0.045867919921875,
0.036346435546875,
0.00572967529296875,
-0.0159149169921875,
0.00604248046875,
-0.0206451416015625,
-0.0207061767578125,
0.0379638671875,
-0.0261077880859375,
-0.01557159423828125,
-0.039031982421875,
0.032562255859375,
0.047454833984375,
-0.0252838134765625,
-0.0033550262451171875,
0.006252288818359375,
-0.022064208984375,
-0.00984954833984375,
0.03717041015625,
-0.0224761962890625,
-0.020660400390625,
0.053131103515625,
0.01506805419921875,
-0.035797119140625,
0.024261474609375,
-0.0305633544921875,
-0.00634765625,
0.0306396484375,
0.044464111328125,
-0.0614013671875,
0.008148193359375,
0.034881591796875,
0.015228271484375,
-0.01474761962890625,
-0.01253509521484375,
0.0035114288330078125,
-0.0200653076171875,
0.06817626953125,
-0.00923919677734375,
-0.0079498291015625,
0.0204315185546875,
-0.03240966796875,
-0.006107330322265625,
-0.029998779296875,
0.036102294921875,
0.01230621337890625,
-0.040679931640625,
0.001953125,
0.02752685546875,
-0.0013456344604492188,
-0.0229034423828125,
-0.0126190185546875,
-0.022491455078125,
-0.0265655517578125,
-0.04034423828125,
-0.028717041015625,
-0.0323486328125,
0.028778076171875,
0.004489898681640625,
0.041046142578125,
0.03411865234375,
0.056854248046875,
0.005146026611328125,
0.00882720947265625,
0.032684326171875,
0.01256561279296875,
-0.041107177734375,
-0.01380157470703125,
0.0183258056640625,
0.022125244140625,
-0.03326416015625,
0.0264739990234375,
-0.024566650390625,
-0.0178375244140625,
-0.024444580078125,
-0.010955810546875,
0.052764892578125,
0.0080413818359375,
-0.03997802734375,
0.04791259765625,
0.0230712890625,
-0.0443115234375,
-0.0185394287109375,
0.00023806095123291016,
-0.045928955078125,
-0.0088653564453125,
-0.0214691162109375,
-0.03607177734375,
0.00763702392578125,
-0.04388427734375,
0.0034313201904296875,
0.07232666015625,
-0.027862548828125,
-0.021270751953125,
0.0491943359375,
0.03692626953125,
-0.025543212890625,
0.03082275390625,
0.0064849853515625,
0.033782958984375,
0.00606536865234375,
0.0102081298828125,
-0.0146636962890625,
-0.025115966796875,
0.0023021697998046875,
0.061187744140625,
0.030517578125,
-0.006626129150390625,
-0.020782470703125,
-0.000301361083984375,
0.0670166015625,
0.0709228515625,
0.040435791015625,
0.00742340087890625,
-0.0010957717895507812,
0.024169921875,
0.004398345947265625,
-0.03173828125,
0.005802154541015625,
0.006732940673828125,
-0.0233917236328125,
0.034088134765625,
0.00485992431640625,
-0.0142059326171875,
0.031707763671875,
-0.002063751220703125,
-0.06585693359375,
0.0156402587890625,
0.028350830078125,
0.00730133056640625,
-0.025909423828125,
0.056427001953125,
-0.0091400146484375,
-0.0302734375,
-0.0267333984375,
-0.04534912109375,
0.038055419921875,
-0.0165863037109375,
0.039886474609375,
0.0034809112548828125,
0.0128326416015625,
0.051788330078125,
-0.0152740478515625,
0.01922607421875,
0.04241943359375,
-0.052459716796875,
-0.03729248046875,
0.0029163360595703125,
0.01556396484375,
-0.054840087890625,
-0.00907135009765625,
0.052490234375,
-0.006160736083984375,
-0.0037021636962890625,
-0.035125732421875,
0.0027141571044921875,
0.0012788772583007812,
0.0312042236328125,
-0.02386474609375,
0.032958984375,
0.0095977783203125,
0.0238189697265625,
-0.010406494140625,
-0.0159149169921875,
0.00644683837890625,
-0.015777587890625,
0.0006556510925292969,
0.02410888671875,
0.02520751953125,
0.0159149169921875,
-0.01102447509765625,
0.0238494873046875,
-0.00817108154296875,
0.056884765625,
0.002704620361328125,
0.032470703125,
-0.0836181640625,
-0.012725830078125,
-0.0272216796875,
0.036346435546875,
-0.003780364990234375,
0.035186767578125,
-0.0209503173828125,
-0.005176544189453125,
0.003650665283203125,
0.0213775634765625,
0.038055419921875,
0.0210723876953125,
0.052581787109375,
0.013702392578125,
-0.04437255859375,
0.00911712646484375,
0.01873779296875,
-0.03375244140625,
-0.049896240234375,
-0.0031986236572265625,
-0.04376220703125,
0.03778076171875,
-0.01073455810546875,
0.01459503173828125,
-0.0093841552734375,
0.046661376953125,
-0.0007538795471191406,
0.034637451171875,
-0.01255035400390625,
-0.022796630859375,
0.033447265625,
-0.026458740234375,
0.08062744140625,
0.0127410888671875,
-0.03021240234375,
0.0010328292846679688,
-0.001201629638671875,
-0.08563232421875,
0.00970458984375,
0.0430908203125,
-0.04791259765625,
0.0286102294921875,
-0.02630615234375,
-0.01605224609375,
-0.0005068778991699219,
0.0234832763671875,
-0.001171112060546875,
0.006465911865234375,
0.0194549560546875,
-0.0197906494140625,
-0.06884765625,
-0.0239715576171875,
-0.032623291015625,
0.034088134765625,
0.012298583984375,
0.0751953125,
-0.0076751708984375,
0.01222991943359375,
0.013458251953125,
-0.0020923614501953125,
0.0198211669921875,
0.01548004150390625,
0.00431060791015625,
0.033355712890625,
0.028717041015625,
-0.0275421142578125,
-0.01073455810546875,
-0.019256591796875,
0.059539794921875,
-0.047149658203125,
-0.03173828125,
0.00901031494140625,
0.02557373046875,
-0.0233612060546875,
0.033294677734375,
-0.00453948974609375,
-0.04132080078125,
0.0010623931884765625,
0.03814697265625,
0.0250091552734375,
0.063232421875,
0.001972198486328125,
-0.0217437744140625,
-0.038482666015625,
-0.042510986328125,
0.018707275390625,
-0.00244903564453125,
-0.0245208740234375,
0.007415771484375,
0.0191650390625,
-0.030853271484375,
0.00026679039001464844,
-0.0135498046875,
0.022430419921875,
-0.002613067626953125,
0.05712890625,
0.0164031982421875,
0.0161895751953125,
0.031951904296875,
0.03662109375,
0.057647705078125,
0.003910064697265625,
0.008819580078125,
0.019256591796875,
-0.006656646728515625,
0.00969696044921875,
0.031463623046875,
-0.008148193359375,
-0.0302734375,
-0.0113372802734375,
-0.002796173095703125,
-0.029571533203125,
-0.02178955078125,
-0.04754638671875,
-0.021514892578125,
0.01364898681640625,
0.004596710205078125,
-0.006626129150390625,
-0.0253753662109375,
0.01261138916015625,
-0.0055694580078125,
-0.00627899169921875,
0.0155487060546875,
0.01172637939453125,
0.030517578125,
-0.0184478759765625,
-0.007572174072265625,
-0.0098876953125,
0.0157012939453125,
0.002655029296875,
0.01406097412109375,
-0.0090484619140625,
-0.0391845703125,
-0.0003101825714111328,
0.041259765625,
0.0303497314453125,
0.0908203125,
0.104736328125,
-0.022186279296875,
0.0308074951171875,
0.01146697998046875,
0.0032596588134765625,
-0.050201416015625,
-0.0198974609375,
-0.00846099853515625,
0.022216796875,
-0.016448974609375,
-0.001529693603515625,
0.01105499267578125,
-0.046661376953125,
-0.0965576171875,
0.0162811279296875,
-0.023773193359375,
-0.04266357421875,
-0.047210693359375,
-0.00751495361328125,
-0.013031005859375,
-0.00040149688720703125,
-0.02630615234375,
-0.015045166015625,
-0.0215606689453125,
0.0562744140625,
0.024688720703125,
-0.0209197998046875,
0.043609619140625,
-0.0024318695068359375,
-0.034332275390625,
0.006137847900390625,
-0.0028018951416015625,
0.004718780517578125,
-0.0005292892456054688,
-0.0092620849609375,
0.0128936767578125,
0.01482391357421875,
-0.040374755859375,
0.01506805419921875,
-0.0158233642578125,
0.034515380859375,
-0.00638580322265625,
-0.0162353515625,
-0.03619384765625,
-0.00957489013671875,
0.072509765625,
0.07916259765625,
0.02093505859375,
-0.0241241455078125,
-0.00812530517578125,
-0.009490966796875,
-0.03753662109375,
-0.00627899169921875,
0.040863037109375,
-0.08984375,
-0.0247802734375,
0.0216827392578125,
-0.015716552734375,
0.0018720626831054688,
-0.044189453125,
-0.038360595703125,
-0.019500732421875,
-0.070556640625,
-0.002109527587890625,
-0.000843048095703125,
-0.05364990234375,
0.02923583984375,
-0.0014848709106445312,
0.03118896484375,
-0.0195159912109375,
0.045989990234375,
0.031494140625,
0.056304931640625,
0.0234375,
0.022735595703125,
-0.057159423828125,
0.0266265869140625,
0.0010042190551757812,
0.035675048828125,
-0.0537109375,
-0.035736083984375,
0.0042572021484375,
0.027374267578125,
-0.01204681396484375,
0.026641845703125,
-0.0259246826171875,
0.07012939453125,
-0.00536346435546875,
0.09588623046875,
0.025634765625,
0.056243896484375,
-0.0027713775634765625,
0.05926513671875,
-0.00396728515625,
-0.03857421875,
-0.007457733154296875,
-0.0316162109375,
0.01160430908203125,
-0.02001953125,
-0.0002989768981933594,
0.00867462158203125,
-0.04156494140625,
-0.0299835205078125,
-0.022216796875,
-0.0097503662109375
]
|
5fd0cee6fffff4b90d1271b38af2f7ef771537c7 | Wordpress Stackexchange
Q: What is the design pattern for WordPress Core? What is the design pattern of WordPress Core? As this Stack Overflow question shows, WordPress does not follow the MVC pattern; however, developers can write plugins and themes that follow MVC. But my question pertains exclusively to WordPress Core, not to any additional add-ons, themes, extensions, plugins, or forked projects that may or may not follow an MVC pattern.
If WordPress Core does not follow an MVC design, then what design pattern does it follow?
A: WordPress uses the Event Driven Architecture due to action/hook API.
| Q: What is the design pattern for WordPress Core? What is the design pattern of WordPress Core? As this Stack Overflow question shows, WordPress does not follow the MVC pattern; however, developers can write plugins and themes that follow MVC. But my question pertains exclusively to WordPress Core, not to any additional add-ons, themes, extensions, plugins, or forked projects that may or may not follow an MVC pattern.
If WordPress Core does not follow an MVC design, then what design pattern does it follow?
A: WordPress uses the Event Driven Architecture due to action/hook API.
A: Spaghetti with meatballs
The term "spaghetti with meatballs" is a pejorative term used in
computer science to describe loosely constructed object-oriented
programming (OOP) that remains dependent on procedural code. It may be
the result of a system whose development has included a long life
cycle, language constraints, micro-optimization theatre, or a lack of
coherent coding standards.
It also has a bit of macaroni mixed in...
http://en.wikipedia.org/wiki/Spaghetti_code#Spaghetti_with_meatballs
A: I think it is a singleton design pattern, as there is base class and base object called $wp which is global object.
| wordpress | {
"language": "en",
"length": 185,
"provenance": "stackexchange_00019.jsonl.gz:450894",
"question_score": "16",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169812"
} | [
0.01299285888671875,
-0.00777435302734375,
-0.03314208984375,
0.0094451904296875,
0.0035114288330078125,
-0.043212890625,
0.06689453125,
-0.00988006591796875,
0.0109710693359375,
0.0291900634765625,
0.00811004638671875,
-0.01580810546875,
0.0228729248046875,
-0.0210418701171875,
-0.0116424560546875,
0.0031185150146484375,
0.03717041015625,
0.0012922286987304688,
0.048919677734375,
-0.0023899078369140625,
0.0140533447265625,
0.0177001953125,
0.056365966796875,
0.06378173828125,
0.0213775634765625,
0.010101318359375,
0.0099029541015625,
-0.00933837890625,
0.0281829833984375,
0.0140838623046875,
0.0242462158203125,
-0.043609619140625,
0.035919189453125,
0.0192413330078125,
-0.037078857421875,
-0.00820159912109375,
-0.006748199462890625,
-0.005950927734375,
-0.005657196044921875,
0.016357421875,
-0.01393890380859375,
0.00199127197265625,
0.05426025390625,
-0.048004150390625,
0.016571044921875,
-0.014190673828125,
-0.002086639404296875,
-0.056488037109375,
0.009307861328125,
-0.0266571044921875,
0.0193328857421875,
0.0010280609130859375,
0.044281005859375,
-0.0284881591796875,
-0.0222930908203125,
-0.009521484375,
0.0122528076171875,
-0.03363037109375,
0.0193634033203125,
-0.004669189453125,
-0.006439208984375,
-0.006744384765625,
0.02972412109375,
0.005237579345703125,
0.0031528472900390625,
-0.01107025146484375,
-0.015045166015625,
0.0088653564453125,
-0.0080413818359375,
0.0080718994140625,
0.01442718505859375,
0.0025691986083984375,
-0.006885528564453125,
-0.0209197998046875,
0.00853729248046875,
0.0126190185546875,
0.0018892288208007812,
-0.0221710205078125,
0.0101776123046875,
0.021270751953125,
-0.023895263671875,
0.0182647705078125,
-0.041839599609375,
-0.048614501953125,
-0.00925445556640625,
-0.0236358642578125,
-0.0157928466796875,
-0.004638671875,
-0.037750244140625,
-0.0108795166015625,
-0.0264892578125,
-0.017333984375,
-0.0142059326171875,
-0.0076446533203125,
-0.00656890869140625,
-0.006893157958984375,
-0.025665283203125,
-0.04541015625,
0.0079345703125,
0.0172576904296875,
0.040802001953125,
-0.052154541015625,
0.06707763671875,
-0.00638580322265625,
-0.0308837890625,
0.025054931640625,
0.0257720947265625,
0.017974853515625,
0.006710052490234375,
0.0298004150390625,
0.0023059844970703125,
0.0195770263671875,
0.0207672119140625,
-0.0389404296875,
0.028167724609375,
0.0258026123046875,
0.0030918121337890625,
0.0241851806640625,
-0.0034542083740234375,
-0.037567138671875,
0.003925323486328125,
0.0216827392578125,
0.021484375,
0.006195068359375,
0.013702392578125,
0.041656494140625,
0.000804901123046875,
-0.052032470703125,
-0.007221221923828125,
-0.0130462646484375,
0.007720947265625,
0.0380859375,
0.015899658203125,
0.02606201171875,
-0.0124359130859375,
0.007289886474609375,
0.00878143310546875,
-0.03155517578125,
-0.0178375244140625,
-0.0093994140625,
0.04241943359375,
-0.0101165771484375,
-0.00997161865234375,
-0.005741119384765625,
0.0372314453125,
0.0151214599609375,
0.0122528076171875,
0.01438140869140625,
0.00995635986328125,
-0.0163421630859375,
0.0341796875,
-0.036407470703125,
-0.008453369140625,
0.005321502685546875,
0.049957275390625,
0.0081024169921875,
0.0266571044921875,
-0.01226043701171875,
0.01001739501953125,
0.01678466796875,
-0.0394287109375,
-0.001964569091796875,
0.059478759765625,
-0.016387939453125,
-0.03558349609375,
0.032135009765625,
-0.0166015625,
0.00048804283142089844,
0.036956787109375,
0.0189971923828125,
0.053436279296875,
0.01107025146484375,
0.04132080078125,
0.031280517578125,
0.0157928466796875,
-0.0019588470458984375,
0.0172119140625,
-0.00848388671875,
0.0087127685546875,
0.083984375,
0.0154571533203125,
-0.027069091796875,
0.0247039794921875,
-0.0003826618194580078,
-0.040069580078125,
0.06976318359375,
0.006923675537109375,
0.07879638671875,
-0.004184722900390625,
0.01251220703125,
-0.0016889572143554688,
0.021484375,
-0.0283660888671875,
0.06866455078125,
-0.029449462890625,
-0.05621337890625,
-0.0288543701171875,
0.013519287109375,
-0.0308990478515625,
-0.007389068603515625,
0.0264892578125,
0.0369873046875,
-0.00274658203125,
-0.0017099380493164062,
-0.05731201171875,
0.025054931640625,
-0.0323486328125,
0.046783447265625,
0.0517578125,
0.04290771484375,
0.0023250579833984375,
0.03466796875,
-0.016845703125,
-0.0310821533203125,
-0.038055419921875,
0.006622314453125,
-0.00931549072265625,
-0.02301025390625,
-0.0264434814453125,
-0.028594970703125,
-0.034881591796875,
0.035614013671875,
-0.0301666259765625,
0.0195159912109375,
0.06683349609375,
-0.02734375,
0.01403045654296875,
-0.04229736328125,
0.06732177734375,
-0.004390716552734375,
-0.0235137939453125,
0.0010471343994140625,
0.01088714599609375,
-0.0037937164306640625,
-0.046051025390625,
-0.009185791015625,
-0.0206756591796875,
-0.03271484375,
0.00554656982421875,
0.052001953125,
0.01532745361328125,
0.036285400390625,
0.0033550262451171875,
0.048187255859375,
0.027496337890625,
-0.0362548828125,
-0.01180267333984375,
0.039947509765625,
-0.007137298583984375,
0.0426025390625,
0.0024471282958984375,
-0.01110076904296875,
0.0100860595703125,
-0.025115966796875,
-0.047210693359375,
0.055755615234375,
-0.0013971328735351562,
-0.028900146484375,
-0.016510009765625,
0.017486572265625,
0.0102996826171875,
-0.039093017578125,
-0.056854248046875,
-0.0004699230194091797,
-0.0311279296875,
0.04180908203125,
0.01088714599609375,
0.0290985107421875,
-0.036376953125,
0.0104827880859375,
0.02362060546875,
0.03375244140625,
-0.0090179443359375,
0.056488037109375,
0.00856781005859375,
-0.01120758056640625,
-0.0247650146484375,
-0.01407623291015625,
-0.0122528076171875,
0.032012939453125,
-0.01329803466796875,
0.034637451171875,
-0.043060302734375,
-0.0275421142578125,
0.01300811767578125,
0.01526641845703125,
-0.03271484375,
-0.045654296875,
0.056427001953125,
0.017608642578125,
0.040374755859375,
0.00582122802734375,
-0.03240966796875,
0.07196044921875,
0.0062255859375,
-0.045623779296875,
-0.042938232421875,
0.0025882720947265625,
0.00887298583984375,
-0.0069732666015625,
0.0030975341796875,
0.050567626953125,
0.00545501708984375,
-0.005527496337890625,
-0.005992889404296875,
0.0290069580078125,
0.01192474365234375,
-0.01371002197265625,
-0.0186004638671875,
0.036956787109375,
-0.07843017578125,
0.007740020751953125,
0.031768798828125,
0.10113525390625,
-0.007602691650390625,
-0.0413818359375,
0.0163116455078125,
0.0679931640625,
0.0263671875,
-0.0197601318359375,
0.023895263671875,
-0.00998687744140625,
0.03082275390625,
-0.0291290283203125,
0.01068878173828125,
-0.033599853515625,
-0.00931549072265625,
-0.0084991455078125,
-0.060638427734375,
-0.01335906982421875,
-0.050079345703125,
-0.0877685546875,
-0.06695556640625,
-0.009765625,
-0.01409149169921875,
0.031951904296875,
0.0128631591796875,
0.053955078125,
0.0050201416015625,
-0.06072998046875,
-0.002597808837890625,
0.0121002197265625,
-0.017730712890625,
0.0222320556640625,
-0.0194244384765625,
0.001522064208984375,
-0.03045654296875,
0.00785064697265625,
0.01532745361328125,
-0.0197296142578125,
-0.00447845458984375,
-0.01194000244140625,
-0.00521087646484375,
-0.0439453125,
-0.0176544189453125,
0.02490234375,
-0.004749298095703125,
-0.050537109375,
0.0213470458984375,
-0.059783935546875,
-0.05120849609375,
0.016754150390625,
-0.04052734375,
0.047332763671875,
0.0169830322265625,
-0.00714874267578125,
0.00618743896484375,
0.0305633544921875,
0.0196533203125,
-0.004032135009765625,
-0.017547607421875,
-0.036041259765625,
0.054962158203125,
0.0142669677734375,
0.051239013671875,
-0.00861358642578125,
0.046844482421875,
0.0007376670837402344,
-0.01271820068359375,
0.00463104248046875,
0.0249481201171875,
-0.0045928955078125,
0.0021152496337890625,
-0.0557861328125,
-0.004611968994140625,
0.04705810546875,
0.032440185546875,
-0.004451751708984375,
0.0361328125,
-0.020965576171875,
0.0482177734375,
0.0521240234375,
-0.055755615234375,
-0.00868988037109375,
0.037139892578125,
0.00565338134765625,
-0.0225982666015625,
0.032928466796875,
-0.10162353515625,
-0.01544952392578125,
-0.01371002197265625,
0.005908966064453125,
0.0243988037109375,
-0.031158447265625,
-0.0109405517578125,
0.0187530517578125,
-0.037689208984375,
-0.01812744140625,
0.024688720703125,
-0.039825439453125,
0.033172607421875,
-0.033355712890625,
0.038818359375,
-0.054931640625,
0.021026611328125,
-0.034576416015625,
-0.044281005859375,
-0.0165863037109375,
-0.01277923583984375,
0.05352783203125,
0.046478271484375,
-0.07781982421875,
0.0101776123046875,
0.043853759765625,
-0.0249481201171875,
0.0218658447265625,
-0.005634307861328125,
0.03411865234375,
0.013641357421875,
0.01425933837890625,
-0.00141143798828125,
-0.00206756591796875,
-0.0052490234375,
-0.00742340087890625,
-0.0313720703125,
-0.0202484130859375,
-0.00011974573135375977,
-0.032958984375,
0.03973388671875,
-0.0350341796875,
0.0005879402160644531,
-0.041717529296875,
-0.071044921875,
0.0145721435546875,
-0.058837890625,
0.0244293212890625,
-0.03253173828125,
-0.021087646484375,
0.061126708984375,
-0.004436492919921875,
-0.0166473388671875,
-0.00995635986328125,
0.09197998046875,
0.00850677490234375,
-0.0247039794921875,
-0.06268310546875,
-0.0128326416015625,
0.01305389404296875,
0.06292724609375,
-0.006622314453125,
-0.040740966796875,
-0.00908660888671875,
-0.00948333740234375,
-0.009552001953125,
-0.0088348388671875,
0.000004708766937255859,
0.063232421875,
0.0013265609741210938,
-0.01465606689453125,
0.00434112548828125,
-0.0101165771484375,
-0.004474639892578125,
0.012420654296875,
-0.01384735107421875,
-0.0294036865234375,
0.0047760009765625,
0.071044921875,
0.0005970001220703125,
0.0008749961853027344,
-0.07635498046875,
-0.01300048828125,
0.00978851318359375,
0.01479339599609375,
0.037078857421875,
0.028350830078125,
-0.003406524658203125,
0.0004363059997558594,
-0.00414276123046875,
-0.001861572265625,
0.0083770751953125,
0.0099639892578125,
-0.029449462890625,
0.03326416015625,
0.0030879974365234375,
-0.01493072509765625,
-0.016632080078125,
-0.0188751220703125,
0.06597900390625,
-0.002582550048828125,
-0.0574951171875,
0.0138702392578125,
-0.0166015625,
-0.003650665283203125,
0.0192108154296875,
-0.0758056640625,
-0.0003006458282470703,
0.02301025390625,
-0.018524169921875,
0.0163421630859375,
-0.060516357421875,
-0.021728515625,
-0.0307769775390625,
0.031646728515625,
-0.0007505416870117188,
-0.00034689903259277344,
0.056121826171875,
-0.0055084228515625,
0.020538330078125,
0.013458251953125,
-0.0204315185546875,
0.032928466796875,
0.00862884521484375,
0.044586181640625,
0.021697998046875,
-0.039154052734375,
-0.01727294921875,
0.033172607421875,
-0.01751708984375,
-0.05548095703125,
-0.03759765625,
0.0195465087890625,
0.036712646484375,
0.0271148681640625,
0.0055694580078125,
0.01200103759765625,
0.0227203369140625,
0.0173797607421875,
-0.033233642578125,
-0.0206756591796875,
0.0237579345703125,
0.007747650146484375,
0.0213775634765625,
0.019775390625,
0.0033016204833984375,
-0.0234832763671875,
0.019287109375,
0.0038394927978515625,
0.04083251953125,
-0.005466461181640625,
-0.0270843505859375,
0.0280303955078125,
0.035125732421875,
-0.01377105712890625,
-0.0037021636962890625,
0.00556182861328125,
-0.07440185546875,
-0.021392822265625,
-0.0184478759765625,
-0.01396942138671875,
0.07476806640625,
-0.0303192138671875,
0.03424072265625,
-0.045654296875,
0.0183868408203125,
0.00457763671875,
-0.005107879638671875,
0.092041015625,
0.05517578125,
-0.0160369873046875,
-0.0171051025390625,
-0.039154052734375,
-0.0347900390625,
-0.04718017578125,
-0.044281005859375,
-0.038909912109375,
0.02264404296875,
-0.01230621337890625,
-0.001056671142578125,
-0.019073486328125,
-0.0003101825714111328,
-0.00540924072265625,
0.043914794921875,
0.01322174072265625,
0.04278564453125,
-0.030853271484375,
0.10870361328125,
-0.0209197998046875,
0.049652099609375,
-0.004619598388671875,
0.038330078125,
-0.02337646484375,
0.00023615360260009766,
0.01320648193359375,
-0.059112548828125,
-0.058868408203125,
-0.006275177001953125,
-0.054107666015625,
0.024627685546875,
0.006549835205078125,
-0.0158538818359375,
0.0069732666015625,
-0.0271759033203125,
-0.01190185546875,
-0.0205078125,
0.03173828125,
-0.0194244384765625,
0.020355224609375,
-0.009765625,
-0.0095367431640625,
0.016326904296875,
-0.0421142578125,
-0.016754150390625,
0.00897216796875,
-0.011383056640625,
-0.0020542144775390625,
0.033599853515625,
0.005062103271484375,
0.0338134765625,
0.0411376953125,
-0.01384735107421875,
0.025634765625,
0.0384521484375,
0.009063720703125,
-0.0034351348876953125,
0.0518798828125,
-0.0180206298828125,
-0.05303955078125,
0.08807373046875,
0.033905029296875,
-0.0626220703125,
0.046295166015625,
-0.042449951171875,
0.0010633468627929688,
0.00547027587890625,
0.040496826171875,
-0.055267333984375,
0.0238800048828125,
0.0097198486328125,
-0.003932952880859375,
0.0192413330078125,
0.01139068603515625,
-0.00475311279296875,
-0.0214080810546875,
0.0287017822265625,
-0.0017423629760742188,
-0.0051727294921875,
0.01227569580078125,
-0.01175689697265625,
-0.0028476715087890625,
-0.02880859375,
-0.006526947021484375,
-0.001758575439453125,
-0.01045989990234375,
0.00787353515625,
0.0003466606140136719,
0.005420684814453125,
-0.0196533203125,
0.026123046875,
-0.03179931640625,
0.0206298828125,
-0.03277587890625,
0.0151824951171875,
-0.022369384765625,
0.01119232177734375,
0.037811279296875,
-0.01300811767578125,
-0.034881591796875,
0.0202484130859375,
-0.04791259765625,
0.0667724609375,
-0.027557373046875,
-0.036651611328125,
-0.04571533203125,
-0.057647705078125,
0.003387451171875,
0.03228759765625,
-0.04266357421875,
0.0323486328125,
-0.011474609375,
-0.04425048828125,
0.001247406005859375,
0.0108642578125,
0.051605224609375,
-0.04547119140625,
-0.0009832382202148438,
0.033355712890625,
0.00478363037109375,
-0.006259918212890625,
-0.029083251953125,
-0.037078857421875,
-0.058746337890625,
-0.0011138916015625,
-0.044219970703125,
-0.0161285400390625,
0.07000732421875,
-0.0143280029296875,
0.0019521713256835938,
0.0195770263671875,
0.019073486328125,
-0.0419921875,
0.017333984375,
0.017913818359375,
-0.0301055908203125,
0.0241851806640625,
-0.0211029052734375,
0.031341552734375,
-0.0218963623046875,
-0.0200958251953125,
-0.00412750244140625,
0.0169677734375,
-0.0211029052734375,
-0.0220489501953125,
0.058135986328125,
0.023681640625,
-0.10247802734375,
0.007598876953125,
0.034576416015625,
0.026092529296875,
0.0198822021484375,
0.094482421875,
-0.0206756591796875,
-0.0428466796875,
0.004772186279296875,
0.0146026611328125,
0.020172119140625,
-0.00443267822265625,
-0.027923583984375,
0.01180267333984375,
0.012664794921875,
0.0128173828125,
0.0155181884765625,
0.0031681060791015625,
0.010833740234375,
0.0010175704956054688,
-0.0008821487426757812,
-0.02606201171875,
0.00455474853515625,
-0.005260467529296875,
0.005706787109375,
-0.04852294921875,
-0.004058837890625,
-0.0148773193359375,
0.02740478515625,
-0.001415252685546875,
0.00553131103515625,
0.018463134765625,
0.0321044921875,
-0.0587158203125,
-0.031768798828125,
0.00208282470703125,
0.022735595703125,
-0.07220458984375,
-0.00292205810546875,
-0.0009083747863769531,
0.023895263671875,
-0.051177978515625,
-0.045501708984375,
0.050445556640625,
0.034759521484375,
-0.008697509765625,
-0.017791748046875,
0.00894927978515625,
0.0173492431640625,
0.02606201171875,
-0.0034637451171875,
0.053680419921875,
-0.01690673828125,
-0.00594329833984375,
-0.045379638671875,
-0.022918701171875,
0.01224517822265625,
0.0069427490234375,
-0.00397491455078125,
-0.01763916015625,
0.029388427734375,
-0.01366424560546875,
0.019805908203125,
0.004444122314453125,
0.01409912109375,
-0.01387786865234375,
-0.039276123046875,
0.036102294921875,
-0.01380157470703125,
0.017791748046875,
0.00962066650390625,
0.023681640625,
-0.02581787109375,
-0.003932952880859375,
-0.0306549072265625,
-0.059783935546875,
-0.02288818359375,
0.054931640625,
0.03973388671875,
0.016754150390625,
0.0322265625,
0.04296875,
0.0003483295440673828,
0.008880615234375,
0.042205810546875,
-0.004703521728515625,
-0.037811279296875,
-0.00934600830078125,
-0.03961181640625,
-0.00933074951171875,
-0.03033447265625,
0.01337432861328125,
-0.0003085136413574219,
-0.0015125274658203125,
-0.0100555419921875,
0.03155517578125,
0.0009698867797851562,
-0.0253753662109375,
0.029571533203125,
-0.0077362060546875,
0.07275390625,
0.01357269287109375,
-0.036773681640625,
-0.011566162109375,
-0.02581787109375,
-0.0562744140625,
0.031707763671875,
0.04852294921875,
-0.01849365234375,
0.01058197021484375,
0.0136260986328125,
0.00925445556640625,
-0.01410675048828125,
0.0024623870849609375,
0.0143280029296875,
-0.033447265625,
0.01873779296875,
0.0020313262939453125,
-0.01055145263671875,
-0.005695343017578125,
0.0286865234375,
0.0294647216796875,
-0.01546478271484375,
0.087158203125,
-0.044891357421875,
-0.01097869873046875,
0.01013946533203125,
0.0240631103515625,
-0.01904296875,
-0.00920867919921875,
0.045440673828125,
-0.01016998291015625,
0.0017671585083007812,
-0.006252288818359375,
-0.059051513671875,
-0.04327392578125,
0.04534912109375,
-0.0638427734375,
0.0117645263671875,
-0.0252227783203125,
0.0242462158203125,
-0.06744384765625,
0.0274505615234375,
-0.019287109375,
0.018798828125,
0.039703369140625,
-0.007022857666015625,
0.01419830322265625,
-0.01183319091796875,
-0.0012950897216796875,
0.01025390625,
-0.04022216796875,
-0.043060302734375,
-0.006610870361328125,
-0.04296875,
-0.013580322265625,
0.0286407470703125,
0.0020122528076171875,
-0.03887939453125,
0.026611328125,
-0.0122833251953125,
0.0069427490234375,
-0.000621795654296875,
0.048736572265625,
0.005573272705078125,
-0.07232666015625,
0.0114288330078125,
0.03692626953125,
0.06744384765625,
0.01654052734375,
0.0152740478515625,
0.01181793212890625,
-0.009765625,
-0.00750732421875,
0.0008635520935058594,
-0.02001953125,
-0.003894805908203125,
-0.02923583984375,
-0.00836944580078125,
-0.0074310302734375,
-0.07489013671875,
-0.04443359375,
-0.06402587890625,
0.0330810546875,
0.003871917724609375,
-0.017578125,
-0.01535797119140625,
-0.0009236335754394531,
-0.0321044921875,
-0.0168914794921875,
-0.045745849609375,
0.01401519775390625,
0.03240966796875,
-0.01904296875,
0.00952911376953125,
-0.0225372314453125,
-0.031646728515625,
-0.0007171630859375,
0.04315185546875,
0.04693603515625,
-0.046539306640625,
-0.0292510986328125,
0.06182861328125,
0.04296875,
0.106201171875,
0.023895263671875,
-0.025604248046875,
-0.0186004638671875,
0.0290985107421875,
-0.01256561279296875,
-0.004512786865234375,
0.01506805419921875,
0.0040283203125,
-0.03814697265625,
-0.01300811767578125,
-0.02545166015625,
-0.0257415771484375,
-0.06341552734375,
-0.0740966796875,
0.02899169921875,
-0.00797271728515625,
-0.036590576171875,
-0.052276611328125,
0.034271240234375,
0.02215576171875,
-0.037384033203125,
-0.0313720703125,
-0.01092529296875,
-0.0289764404296875,
0.01323699951171875,
0.038543701171875,
-0.046905517578125,
0.0574951171875,
0.002933502197265625,
-0.01140594482421875,
0.0482177734375,
0.05181884765625,
0.017120361328125,
-0.0036640167236328125,
-0.0012664794921875,
0.034912109375,
0.03619384765625,
-0.033935546875,
0.0166015625,
-0.005847930908203125,
-0.0004630088806152344,
-0.01468658447265625,
-0.05084228515625,
0.0214691162109375,
0.00164031982421875,
-0.00621795654296875,
0.03033447265625,
-0.01064300537109375,
-0.0253753662109375,
-0.0146331787109375,
-0.0003273487091064453,
-0.048828125,
-0.0293731689453125,
0.0273284912109375,
-0.07373046875,
-0.026824951171875,
-0.020355224609375,
-0.023834228515625,
-0.03643798828125,
0.0128173828125,
-0.0479736328125,
0.00011444091796875,
-0.00453948974609375,
-0.018768310546875,
-0.01203155517578125,
-0.0272979736328125,
0.032989501953125,
-0.0015230178833007812,
0.06268310546875,
-0.0149993896484375,
0.0250244140625,
0.052703857421875,
0.05767822265625,
-0.0091552734375,
0.0283050537109375,
-0.0289306640625,
0.0165252685546875,
0.00106048583984375,
0.0073089599609375,
-0.01018524169921875,
0.0024662017822265625,
0.005062103271484375,
0.060791015625,
0.00409698486328125,
0.08380126953125,
-0.018768310546875,
0.02850341796875,
-0.0015249252319335938,
0.0185699462890625,
0.0308837890625,
-0.02813720703125,
0.01125335693359375,
0.031494140625,
-0.0206146240234375,
-0.038818359375,
-0.01146697998046875,
-0.0634765625,
0.007221221923828125,
0.0179443359375,
-0.022064208984375,
-0.03399658203125,
-0.003597259521484375,
0.000324249267578125,
-0.00904083251953125,
0.00839996337890625
]
|
a510941337e9470ab84ce94f95c242ee89955f82 | Wordpress Stackexchange
Q: Widget area inside a widget I tried putting dynamic_sidebar('widget-id') inside a custom widget I created and it worked. The only thing I can't figure out is how I can do this through a loop. Is there a way that when the widget is active, it registers a sidebar automatically with the same id as the dynamic_sidebar function inside it?
| Q: Widget area inside a widget I tried putting dynamic_sidebar('widget-id') inside a custom widget I created and it worked. The only thing I can't figure out is how I can do this through a loop. Is there a way that when the widget is active, it registers a sidebar automatically with the same id as the dynamic_sidebar function inside it?
| wordpress | {
"language": "en",
"length": 60,
"provenance": "stackexchange_00019.jsonl.gz:450917",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169888"
} | [
0.04681396484375,
-0.008453369140625,
0.006122589111328125,
-0.0160064697265625,
0.016571044921875,
-0.0281829833984375,
0.044921875,
-0.036468505859375,
0.0118560791015625,
0.0273895263671875,
-0.0482177734375,
-0.0171051025390625,
-0.0182952880859375,
0.0098419189453125,
-0.03729248046875,
-0.052520751953125,
0.04302978515625,
0.01922607421875,
0.046661376953125,
-0.018707275390625,
-0.01873779296875,
0.01146697998046875,
0.035675048828125,
0.07965087890625,
0.036712646484375,
-0.0391845703125,
0.019805908203125,
0.0162353515625,
0.0192718505859375,
-0.0104522705078125,
0.0479736328125,
-0.01122283935546875,
0.00395965576171875,
-0.01485443115234375,
0.0601806640625,
0.07122802734375,
0.00850677490234375,
0.0180816650390625,
0.045928955078125,
-0.0026454925537109375,
0.0504150390625,
-0.050750732421875,
0.0231475830078125,
-0.00679779052734375,
0.005184173583984375,
-0.0141448974609375,
0.03704833984375,
-0.034149169921875,
0.03375244140625,
-0.01043701171875,
0.031524658203125,
0.0014476776123046875,
0.0404052734375,
-0.012969970703125,
-0.032073974609375,
-0.006229400634765625,
0.00872039794921875,
-0.0579833984375,
0.0496826171875,
0.01036834716796875,
-0.028411865234375,
-0.05621337890625,
0.045257568359375,
-0.043365478515625,
0.01352691650390625,
-0.0384521484375,
-0.0214080810546875,
0.02337646484375,
0.0020618438720703125,
0.03558349609375,
0.05413818359375,
-0.0162506103515625,
0.0121307373046875,
-0.020355224609375,
0.00010710954666137695,
-0.040313720703125,
0.0160675048828125,
-0.025054931640625,
-0.016082763671875,
0.0153656005859375,
-0.0153350830078125,
0.0274810791015625,
-0.0203704833984375,
-0.018463134765625,
0.01265716552734375,
-0.003139495849609375,
-0.022064208984375,
-0.0085601806640625,
0.0017824172973632812,
-0.0008244514465332031,
-0.009185791015625,
-0.036407470703125,
0.03802490234375,
0.00952911376953125,
-0.015594482421875,
-0.0321044921875,
0.019378662109375,
0.055816650390625,
-0.0173492431640625,
0.0609130859375,
-0.0139923095703125,
-0.044952392578125,
0.08038330078125,
-0.0810546875,
0.0009813308715820312,
0.02825927734375,
-0.0246429443359375,
-0.00824737548828125,
0.0289459228515625,
0.0302734375,
0.003177642822265625,
-0.0260467529296875,
0.02142333984375,
-0.0237884521484375,
-0.036590576171875,
0.004573822021484375,
0.004131317138671875,
0.00787353515625,
0.02642822265625,
-0.018310546875,
0.00007599592208862305,
-0.0006098747253417969,
0.054168701171875,
0.0223236083984375,
0.0285797119140625,
0.05352783203125,
-0.005138397216796875,
-0.07275390625,
0.007701873779296875,
-0.0195159912109375,
-0.058258056640625,
0.01369476318359375,
0.09405517578125,
0.0538330078125,
0.038604736328125,
-0.0009675025939941406,
0.049072265625,
0.01425933837890625,
0.047088623046875,
-0.0125579833984375,
0.0242767333984375,
-0.03240966796875,
-0.01617431640625,
0.0269775390625,
0.0095977783203125,
0.044830322265625,
0.0196685791015625,
-0.018035888671875,
-0.01055908203125,
-0.053955078125,
0.01026153564453125,
-0.052642822265625,
-0.0029449462890625,
0.0163726806640625,
0.086669921875,
-0.01142120361328125,
0.0621337890625,
-0.033477783203125,
0.00439453125,
-0.00045013427734375,
0.0069122314453125,
-0.01465606689453125,
-0.0211181640625,
-0.016265869140625,
-0.037261962890625,
0.0179595947265625,
-0.00010126829147338867,
0.0102081298828125,
0.024383544921875,
0.07061767578125,
-0.0066070556640625,
-0.037200927734375,
-0.0227813720703125,
0.027191162109375,
-0.0059967041015625,
0.037078857421875,
-0.01337432861328125,
0.0006146430969238281,
0.0034885406494140625,
0.0276031494140625,
-0.020751953125,
-0.050140380859375,
0.006786346435546875,
0.0008459091186523438,
-0.03619384765625,
0.0023784637451171875,
0.01326751708984375,
0.060760498046875,
0.01947021484375,
0.026763916015625,
-0.01032257080078125,
-0.014404296875,
-0.044647216796875,
-0.02294921875,
0.01102447509765625,
0.006320953369140625,
-0.005695343017578125,
-0.007076263427734375,
0.0026798248291015625,
-0.0009899139404296875,
-0.031524658203125,
-0.0247344970703125,
0.026763916015625,
0.0109100341796875,
-0.0182342529296875,
0.0091552734375,
-0.020263671875,
0.023345947265625,
0.06085205078125,
0.02020263671875,
-0.01319122314453125,
-0.006694793701171875,
0.0249786376953125,
-0.0511474609375,
-0.072509765625,
-0.0268707275390625,
0.00750732421875,
0.052978515625,
0.01513671875,
0.032257080078125,
-0.0124969482421875,
-0.023712158203125,
-0.0012521743774414062,
0.00786590576171875,
0.05255126953125,
-0.01128387451171875,
-0.0189361572265625,
-0.0303497314453125,
0.0133514404296875,
0.03533935546875,
-0.1090087890625,
0.02398681640625,
0.005741119384765625,
-0.0169830322265625,
-0.05987548828125,
-0.018829345703125,
-0.057037353515625,
-0.0187835693359375,
-0.01336669921875,
0.055877685546875,
0.033477783203125,
0.0097503662109375,
0.01454925537109375,
0.03118896484375,
0.007480621337890625,
-0.07421875,
0.0033664703369140625,
0.006023406982421875,
-0.0170440673828125,
0.046356201171875,
-0.0035858154296875,
0.034271240234375,
-0.009124755859375,
-0.0697021484375,
-0.007785797119140625,
0.040985107421875,
-0.0054473876953125,
0.002655029296875,
-0.016082763671875,
0.01056671142578125,
0.012359619140625,
-0.0174713134765625,
-0.0141754150390625,
-0.015472412109375,
0.04010009765625,
0.0206298828125,
0.07330322265625,
0.054107666015625,
0.0036220550537109375,
-0.0219573974609375,
-0.01702880859375,
-0.004486083984375,
0.0047760009765625,
0.0287628173828125,
0.0279998779296875,
-0.015655517578125,
-0.042327880859375,
-0.0223388671875,
0.042510986328125,
0.0196075439453125,
0.0006556510925292969,
0.0228424072265625,
-0.02667236328125,
0.00571441650390625,
-0.0116729736328125,
-0.04937744140625,
0.0156707763671875,
0.05206298828125,
-0.0008840560913085938,
-0.007221221923828125,
-0.0271148681640625,
0.09979248046875,
0.00710296630859375,
0.059661865234375,
0.01450347900390625,
0.018218994140625,
0.061431884765625,
-0.016937255859375,
0.0145263671875,
-0.0057830810546875,
0.049072265625,
0.05499267578125,
0.0023860931396484375,
-0.0090179443359375,
-0.00727081298828125,
-0.0012187957763671875,
0.0027332305908203125,
0.01953125,
0.020904541015625,
-0.002513885498046875,
-0.0384521484375,
0.00799560546875,
0.026275634765625,
0.0672607421875,
0.006591796875,
-0.035919189453125,
0.0156707763671875,
0.053131103515625,
-0.00823974609375,
-0.0316162109375,
0.04425048828125,
-0.013885498046875,
-0.0273895263671875,
-0.0015707015991210938,
-0.01934814453125,
-0.004573822021484375,
0.0004684925079345703,
-0.0171661376953125,
-0.006931304931640625,
-0.0306854248046875,
-0.045745849609375,
-0.04443359375,
-0.048187255859375,
0.03411865234375,
-0.013916015625,
0.01163482666015625,
0.01125335693359375,
0.0232696533203125,
-0.00543212890625,
-0.06317138671875,
0.0083465576171875,
-0.002655029296875,
0.007965087890625,
0.044189453125,
-0.03424072265625,
-0.0157623291015625,
0.0005993843078613281,
-0.0123748779296875,
0.01032257080078125,
0.00858306884765625,
0.0003376007080078125,
0.002532958984375,
0.0133056640625,
-0.0023365020751953125,
0.03643798828125,
-0.002288818359375,
-0.0163726806640625,
0.0268707275390625,
0.0328369140625,
-0.030914306640625,
-0.00875091552734375,
-0.0017442703247070312,
-0.029754638671875,
-0.055877685546875,
-0.02911376953125,
-0.00942230224609375,
-0.002460479736328125,
0.006603240966796875,
-0.0117340087890625,
-0.00577545166015625,
0.0003523826599121094,
-0.0594482421875,
0.06884765625,
0.01174163818359375,
0.0123443603515625,
-0.0033512115478515625,
-0.036651611328125,
-0.045074462890625,
0.02166748046875,
-0.021575927734375,
0.007598876953125,
-0.029022216796875,
0.051025390625,
-0.030120849609375,
-0.006557464599609375,
0.03662109375,
0.0303955078125,
0.037841796875,
0.0003139972686767578,
-0.0307159423828125,
0.01406097412109375,
0.059783935546875,
-0.079833984375,
-0.0186004638671875,
0.0343017578125,
0.031158447265625,
-0.04791259765625,
-0.030181884765625,
-0.07305908203125,
-0.01132965087890625,
-0.0280303955078125,
0.00344085693359375,
0.00286865234375,
-0.001850128173828125,
-0.035491943359375,
0.059356689453125,
-0.0247955322265625,
-0.01285552978515625,
0.0203857421875,
-0.050994873046875,
0.03521728515625,
-0.0019397735595703125,
0.01535797119140625,
-0.01678466796875,
0.01473236083984375,
-0.05841064453125,
-0.05706787109375,
0.006439208984375,
-0.07171630859375,
0.0587158203125,
0.037872314453125,
-0.0113372802734375,
-0.0171051025390625,
0.0176544189453125,
0.011627197265625,
0.02520751953125,
0.031463623046875,
0.00640106201171875,
0.009490966796875,
0.023040771484375,
0.051055908203125,
-0.0223236083984375,
-0.0135498046875,
-0.0124053955078125,
-0.06451416015625,
-0.01421356201171875,
-0.021697998046875,
-0.0196533203125,
0.01544952392578125,
-0.03173828125,
-0.026092529296875,
-0.002044677734375,
0.0230560302734375,
0.03118896484375,
-0.01568603515625,
0.0228424072265625,
-0.005126953125,
-0.0308837890625,
0.0010223388671875,
-0.0307159423828125,
0.0059661865234375,
0.022064208984375,
0.08331298828125,
0.01165008544921875,
0.003223419189453125,
-0.0426025390625,
-0.0210723876953125,
0.047821044921875,
-0.0079193115234375,
-0.016754150390625,
0.01934814453125,
-0.033294677734375,
-0.01267242431640625,
0.0237579345703125,
-0.022430419921875,
0.03448486328125,
0.0860595703125,
0.021636962890625,
0.00661468505859375,
-0.018157958984375,
-0.0026416778564453125,
-0.053924560546875,
0.023712158203125,
-0.0273895263671875,
-0.005222320556640625,
0.015960693359375,
0.04986572265625,
-0.03460693359375,
0.00562286376953125,
-0.058807373046875,
0.002838134765625,
0.0014133453369140625,
-0.01078033447265625,
0.0223846435546875,
0.01297760009765625,
0.0087890625,
-0.0285186767578125,
-0.0213470458984375,
0.0214080810546875,
0.0288543701171875,
-0.0477294921875,
0.0190887451171875,
0.0121917724609375,
0.04266357421875,
0.0270233154296875,
0.045379638671875,
-0.0161590576171875,
0.06561279296875,
0.0205841064453125,
-0.0036449432373046875,
0.000018656253814697266,
-0.012359619140625,
-0.00618743896484375,
0.0044708251953125,
0.025970458984375,
-0.00988006591796875,
0.0233612060546875,
-0.03045654296875,
0.01348114013671875,
0.036407470703125,
0.0247344970703125,
-0.03173828125,
-0.01284027099609375,
-0.002918243408203125,
-0.0008349418640136719,
0.00508880615234375,
0.02813720703125,
-0.0123138427734375,
0.0225067138671875,
-0.0199432373046875,
0.08294677734375,
0.03570556640625,
0.029998779296875,
0.00881195068359375,
0.007472991943359375,
0.022308349609375,
-0.04150390625,
-0.04302978515625,
-0.034820556640625,
-0.0017833709716796875,
0.0255584716796875,
0.0443115234375,
0.0181121826171875,
-0.0035400390625,
-0.0025806427001953125,
-0.03900146484375,
-0.0006155967712402344,
0.050537109375,
-0.01995849609375,
-0.059112548828125,
-0.0390625,
0.00287628173828125,
0.057586669921875,
-0.03143310546875,
-0.01129913330078125,
0.011810302734375,
-0.057281494140625,
0.00681304931640625,
0.00732421875,
0.01202392578125,
-0.004184722900390625,
-0.018890380859375,
-0.0190887451171875,
0.0024280548095703125,
-0.0174102783203125,
-0.035400390625,
-0.06695556640625,
0.0224761962890625,
0.01213836669921875,
-0.00817108154296875,
-0.0399169921875,
0.0330810546875,
-0.0284423828125,
0.01216888427734375,
-0.015777587890625,
0.01308441162109375,
0.0244293212890625,
0.032196044921875,
-0.051849365234375,
0.0033855438232421875,
-0.042816162109375,
-0.0263519287109375,
-0.04681396484375,
-0.07110595703125,
-0.053375244140625,
-0.01291656494140625,
0.0269012451171875,
0.0361328125,
0.005001068115234375,
-0.0203399658203125,
-0.018646240234375,
0.003337860107421875,
0.02154541015625,
0.035858154296875,
-0.0184478759765625,
0.0221405029296875,
0.0164947509765625,
0.048858642578125,
0.0069580078125,
-0.019866943359375,
-0.03582763671875,
-0.018890380859375,
0.005290985107421875,
0.001537322998046875,
-0.0250091552734375,
-0.035247802734375,
0.028717041015625,
-0.0173187255859375,
0.01447296142578125,
-0.0090179443359375,
0.0404052734375,
-0.047119140625,
-0.020660400390625,
0.01132965087890625,
0.022491455078125,
-0.01611328125,
0.034332275390625,
0.049896240234375,
-0.0517578125,
-0.07073974609375,
0.01438140869140625,
2.384185791015625e-7,
0.0210418701171875,
-0.004634857177734375,
-0.030548095703125,
0.0241851806640625,
-0.103271484375,
0.08233642578125,
0.056884765625,
0.028106689453125,
0.046966552734375,
-0.025970458984375,
0.0345458984375,
0.0372314453125,
0.019989013671875,
-0.0210113525390625,
-0.014129638671875,
0.038421630859375,
0.00019800662994384766,
-0.01690673828125,
0.02294921875,
-0.0266571044921875,
-0.0019588470458984375,
0.02581787109375,
0.0328369140625,
-0.06036376953125,
-0.0068206787109375,
-0.01560211181640625,
-0.008636474609375,
0.03485107421875,
-0.006458282470703125,
0.006561279296875,
0.020263671875,
0.061614990234375,
0.01580810546875,
-0.003604888916015625,
0.041168212890625,
0.005252838134765625,
0.0029087066650390625,
-0.014617919921875,
0.02484130859375,
0.03338623046875,
0.02032470703125,
-0.00234222412109375,
-0.007266998291015625,
0.034393310546875,
-0.006717681884765625,
0.0008177757263183594,
0.01531982421875,
-0.0232086181640625,
-0.04583740234375,
0.02685546875,
-0.029876708984375,
0.006031036376953125,
0.04071044921875,
-0.0166015625,
0.06463623046875,
0.0290679931640625,
0.0240936279296875,
0.0038394927978515625,
-0.01534271240234375,
0.01491546630859375,
0.027435302734375,
0.0015392303466796875,
-0.01163482666015625,
-0.0163726806640625,
-0.005207061767578125,
-0.003997802734375,
-0.028594970703125,
-0.007137298583984375,
-0.012939453125,
0.0157928466796875,
0.10107421875,
-0.06231689453125,
-0.01268768310546875,
0.041412353515625,
0.0247039794921875,
-0.0200958251953125,
-0.0284576416015625,
0.003997802734375,
-0.07257080078125,
-0.023773193359375,
-0.031585693359375,
-0.032684326171875,
-0.0110321044921875,
-0.059295654296875,
-0.0185089111328125,
0.07501220703125,
0.00902557373046875,
-0.03277587890625,
0.033599853515625,
0.03985595703125,
-0.04571533203125,
0.025238037109375,
-0.0173187255859375,
0.005558013916015625,
-0.036468505859375,
0.015960693359375,
-0.01090240478515625,
0.017913818359375,
-0.0123291015625,
-0.00830841064453125,
0.0303955078125,
-0.00470733642578125,
0.0269012451171875,
-0.004016876220703125,
0.01141357421875,
0.0246124267578125,
-0.022613525390625,
-0.00493621826171875,
-0.01226806640625,
-0.0013647079467773438,
-0.0258636474609375,
0.016876220703125,
0.04498291015625,
-0.0433349609375,
-0.0577392578125,
0.00765228271484375,
0.026641845703125,
0.043304443359375,
-0.047332763671875,
0.05584716796875,
0.033416748046875,
-0.05609130859375,
-0.006153106689453125,
-0.038360595703125,
-0.0172271728515625,
0.0614013671875,
0.03204345703125,
0.002826690673828125,
0.0120697021484375,
-0.041229248046875,
0.0506591796875,
0.01148223876953125,
-0.005786895751953125,
-0.017578125,
0.005718231201171875,
-0.006214141845703125,
-0.0024662017822265625,
-0.01383209228515625,
0.04254150390625,
-0.0165557861328125,
0.03411865234375,
0.0197296142578125,
0.039093017578125,
-0.0292816162109375,
-0.0027408599853515625,
0.02032470703125,
0.041748046875,
-0.0222320556640625,
-0.038970947265625,
0.02197265625,
0.0070037841796875,
-0.0065765380859375,
0.00925445556640625,
0.0157928466796875,
-0.0158538818359375,
0.02227783203125,
-0.0212554931640625,
-0.03155517578125,
0.01174163818359375,
0.054779052734375,
0.0177764892578125,
0.017822265625,
-0.042144775390625,
-0.07427978515625,
-0.045745849609375,
-0.0035953521728515625,
0.0309295654296875,
0.048736572265625,
0.033935546875,
0.004413604736328125,
-0.0011472702026367188,
-0.0141754150390625,
-0.0010967254638671875,
0.029205322265625,
0.0253143310546875,
0.00838470458984375,
-0.048797607421875,
-0.044830322265625,
0.034576416015625,
0.0426025390625,
-0.0037708282470703125,
0.017730712890625,
0.0041656494140625,
0.0167388916015625,
-0.0033931732177734375,
-0.01387786865234375,
0.0025768280029296875,
-0.0208282470703125,
0.0355224609375,
-0.04229736328125,
0.0258941650390625,
-0.00047969818115234375,
-0.0015878677368164062,
-0.03131103515625,
0.01428985595703125,
0.038726806640625,
0.0102996826171875,
0.03192138671875,
0.002307891845703125,
0.01351165771484375,
0.0421142578125,
-0.0212554931640625,
0.0307769775390625,
0.0242156982421875,
-0.06585693359375,
-0.032806396484375,
0.0165863037109375,
-0.045684814453125,
0.01276397705078125,
0.04925537109375,
-0.020233154296875,
-0.00888824462890625,
0.0166778564453125,
0.0005631446838378906,
-0.0282745361328125,
-0.01593017578125,
0.044647216796875,
0.01421356201171875,
0.002170562744140625,
0.04376220703125,
-0.05938720703125,
-0.0227813720703125,
-0.005306243896484375,
0.004589080810546875,
0.045074462890625,
-0.0086517333984375,
0.053985595703125,
0.00922393798828125,
-0.0253143310546875,
-0.0294189453125,
0.01174163818359375,
-0.0294952392578125,
0.05352783203125,
0.013031005859375,
-0.0367431640625,
-0.026519775390625,
-0.016693115234375,
0.01406097412109375,
0.0263671875,
-0.0164794921875,
-0.0066680908203125,
-0.0249176025390625,
0.0252838134765625,
0.02044677734375,
0.01284027099609375,
-0.0223541259765625,
-0.0020961761474609375,
0.0149993896484375,
0.0106201171875,
0.0304412841796875,
0.00030303001403808594,
-0.0482177734375,
-0.01163482666015625,
-0.01001739501953125,
-0.00913238525390625,
0.0029659271240234375,
0.031707763671875,
-0.02252197265625,
0.01091766357421875,
-0.00853729248046875,
-0.0377197265625,
0.004863739013671875,
-0.0242767333984375,
0.01042938232421875,
-0.0084075927734375,
0.0740966796875,
-0.01513671875,
0.021575927734375,
-0.01067352294921875,
0.052093505859375,
0.027557373046875,
-0.050994873046875,
0.0216827392578125,
0.036468505859375,
-0.0255126953125,
0.041900634765625,
0.034759521484375,
-0.0196990966796875,
-0.06939697265625,
-0.00746917724609375,
0.01165008544921875,
-0.048828125,
0.01473236083984375,
-0.05413818359375,
-0.004734039306640625,
0.040374755859375,
0.0012111663818359375,
-0.047821044921875,
0.01111602783203125,
-0.0210113525390625,
0.0438232421875,
-0.009674072265625,
-0.01336669921875,
0.0216827392578125,
0.0428466796875,
-0.04290771484375,
-0.005084991455078125,
-0.00539398193359375,
-0.01284027099609375,
0.0107421875,
0.02093505859375,
0.014556884765625,
-0.03076171875,
0.04595947265625,
0.049102783203125,
0.0266571044921875,
0.09503173828125,
0.0399169921875,
0.011474609375,
0.0270843505859375,
-0.00043845176696777344,
-0.042694091796875,
-0.030426025390625,
0.016571044921875,
0.003040313720703125,
-0.03692626953125,
-0.012908935546875,
-0.0030975341796875,
-0.0126495361328125,
-0.030975341796875,
-0.031646728515625,
0.031646728515625,
0.01531219482421875,
-0.021270751953125,
-0.0628662109375,
0.0309295654296875,
-0.020172119140625,
-0.0218353271484375,
-0.0118560791015625,
-0.031768798828125,
0.00757598876953125,
0.05145263671875,
0.0281524658203125,
0.00600433349609375,
0.038970947265625,
0.01806640625,
-0.0501708984375,
0.00922393798828125,
-0.00675201416015625,
0.037078857421875,
-0.005218505859375,
-0.01471710205078125,
-0.02001953125,
0.00983428955078125,
-0.052001953125,
-0.0635986328125,
-0.0127410888671875,
0.03314208984375,
-0.0095672607421875,
-0.04132080078125,
0.004878997802734375,
0.00186920166015625,
0.037872314453125,
0.031890869140625,
0.008148193359375,
-0.037872314453125,
0.00847625732421875,
0.0027179718017578125,
-0.0135345458984375,
0.0013093948364257812,
0.0030155181884765625,
-0.0389404296875,
-0.0132293701171875,
0.0014219284057617188,
0.004608154296875,
0.0275726318359375,
-0.01398468017578125,
-0.0020389556884765625,
0.004085540771484375,
0.05908203125,
0.007350921630859375,
-0.034149169921875,
0.015716552734375,
0.040252685546875,
-0.0243072509765625,
0.00696563720703125,
-0.0147705078125,
-0.00044083595275878906,
0.01904296875,
-0.00139617919921875,
0.0232391357421875,
0.049346923828125,
-0.059844970703125,
-0.01183319091796875,
0.0049285888671875,
0.04693603515625,
-0.02777099609375,
-0.0171051025390625,
-0.038177490234375,
0.0200042724609375,
0.005512237548828125,
0.020172119140625,
0.0093231201171875,
0.037872314453125,
0.0190277099609375,
0.06658935546875,
-0.01120758056640625,
0.06488037109375,
-0.006984710693359375,
0.06768798828125,
-0.003025054931640625,
-0.0104827880859375,
0.03179931640625,
-0.0374755859375,
-0.002288818359375,
0.021514892578125,
0.0203857421875,
-0.054046630859375,
0.031219482421875,
0.016448974609375,
0.0311126708984375,
0.0235595703125
]
|
05686d11c65a0e88c7c12d2c455e0beeabfbdcf4 | Wordpress Stackexchange
Q: How to create a theme customizer 'sub' panel? One of the cool new features of WordPress 4.0 is the add_panel() method. In my situation, i'd like to create a new panel for theme options, that's very straight forward, but is it possible to create sub panels under the them options panel, for example one for the header, one for body and one for the footer? If so, how would I go about doing it?
A: You create Panels, and put Sections inside those Panels.
So if you have your panel:
$wp_customize->add_panel( 'panel_id', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __('Theme Options', 'mytheme'),
'description' => __('Several settings pertaining my theme', 'mytheme'),
) );
Then you need to add your sections:
$wp_customize->add_section( 'header_settings', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __('Header Settings', 'mytheme'),
'description' => __('Header elements configuration', 'mytheme'),
'panel' => 'panel_id',
) );
$wp_customize->add_section( 'footer_settings', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __('Footer Settings', 'mytheme'),
'description' => __('Footer elements configuration', 'mytheme'),
'panel' => 'panel_id',
) );
Regular sections are "sub" panels. Then you add your settings to your sections, and you are done.
| Q: How to create a theme customizer 'sub' panel? One of the cool new features of WordPress 4.0 is the add_panel() method. In my situation, i'd like to create a new panel for theme options, that's very straight forward, but is it possible to create sub panels under the them options panel, for example one for the header, one for body and one for the footer? If so, how would I go about doing it?
A: You create Panels, and put Sections inside those Panels.
So if you have your panel:
$wp_customize->add_panel( 'panel_id', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __('Theme Options', 'mytheme'),
'description' => __('Several settings pertaining my theme', 'mytheme'),
) );
Then you need to add your sections:
$wp_customize->add_section( 'header_settings', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __('Header Settings', 'mytheme'),
'description' => __('Header elements configuration', 'mytheme'),
'panel' => 'panel_id',
) );
$wp_customize->add_section( 'footer_settings', array(
'priority' => 10,
'capability' => 'edit_theme_options',
'theme_supports' => '',
'title' => __('Footer Settings', 'mytheme'),
'description' => __('Footer elements configuration', 'mytheme'),
'panel' => 'panel_id',
) );
Regular sections are "sub" panels. Then you add your settings to your sections, and you are done.
| wordpress | {
"language": "en",
"length": 198,
"provenance": "stackexchange_00019.jsonl.gz:450925",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169919"
} | [
0.002544403076171875,
-0.0085906982421875,
-0.0231170654296875,
-0.0206298828125,
0.005245208740234375,
-0.0266265869140625,
0.0178070068359375,
0.00118255615234375,
-0.0042877197265625,
0.01284027099609375,
0.0171051025390625,
0.0112457275390625,
-0.0207061767578125,
-0.025299072265625,
-0.0098114013671875,
-0.0177764892578125,
0.025146484375,
-0.055938720703125,
-0.0174560546875,
-0.0243377685546875,
-0.007022857666015625,
-0.0217742919921875,
0.023406982421875,
0.0517578125,
-0.0022716522216796875,
-0.039031982421875,
0.04791259765625,
-0.002513885498046875,
-0.0010938644409179688,
-0.0169677734375,
0.0047149658203125,
0.0179595947265625,
0.0240020751953125,
-0.01446533203125,
0.03546142578125,
0.01432037353515625,
0.003040313720703125,
-0.006893157958984375,
0.042999267578125,
-0.01222991943359375,
0.036224365234375,
-0.01947021484375,
0.0064849853515625,
0.0411376953125,
-0.00391387939453125,
-0.0279998779296875,
0.03570556640625,
-0.046142578125,
0.01287078857421875,
0.00365447998046875,
0.006195068359375,
-0.0025234222412109375,
0.03338623046875,
-0.042144775390625,
-0.0274658203125,
-0.038970947265625,
-0.0205230712890625,
0.022369384765625,
0.040374755859375,
0.00445556640625,
-0.0205230712890625,
-0.0239410400390625,
0.0191650390625,
-0.0264434814453125,
-0.003910064697265625,
0.01092529296875,
0.007110595703125,
-0.0034770965576171875,
0.0031642913818359375,
0.0181121826171875,
0.0167236328125,
-0.0197296142578125,
0.0189056396484375,
-0.042755126953125,
0.0235595703125,
0.005496978759765625,
-0.01421356201171875,
-0.0010538101196289062,
0.0243682861328125,
-0.012420654296875,
0.049346923828125,
0.006267547607421875,
0.040069580078125,
-0.0067901611328125,
0.00933074951171875,
-0.0218658447265625,
0.0003337860107421875,
-0.003856658935546875,
-0.037109375,
-0.002040863037109375,
-0.0171661376953125,
-0.105224609375,
-0.00014507770538330078,
0.056854248046875,
0.0153045654296875,
-0.00591278076171875,
0.022186279296875,
0.02325439453125,
0.018310546875,
0.044586181640625,
0.0186614990234375,
-0.057647705078125,
0.09320068359375,
-0.05096435546875,
0.005382537841796875,
0.02587890625,
0.0104522705078125,
-0.00522613525390625,
0.01131439208984375,
0.0135650634765625,
-0.028656005859375,
-0.01027679443359375,
0.0230255126953125,
-0.043487548828125,
-0.033050537109375,
-0.004913330078125,
0.0203704833984375,
-0.044586181640625,
0.019287109375,
-0.083740234375,
-0.0137786865234375,
0.037200927734375,
-0.03607177734375,
-0.00830078125,
-0.00792694091796875,
-0.018218994140625,
0.0167999267578125,
-0.01454925537109375,
-0.0029964447021484375,
0.01617431640625,
-0.034912109375,
0.01389312744140625,
0.087158203125,
0.04296875,
0.0228118896484375,
-0.0226593017578125,
0.06292724609375,
-0.00821685791015625,
0.0084228515625,
0.019500732421875,
-0.01448822021484375,
-0.030517578125,
-0.010101318359375,
-0.0223846435546875,
-0.0191650390625,
0.0260772705078125,
0.0252685546875,
0.01345062255859375,
-0.0174102783203125,
-0.0777587890625,
0.0465087890625,
-0.0261077880859375,
0.024932861328125,
0.00896453857421875,
-0.031524658203125,
-0.0221710205078125,
-0.0011768341064453125,
-0.01270294189453125,
0.0215911865234375,
-0.0300445556640625,
-0.01343536376953125,
0.00998687744140625,
0.022674560546875,
-0.030426025390625,
-0.02947998046875,
-0.0104827880859375,
-0.00995635986328125,
-0.004261016845703125,
0.02178955078125,
0.021942138671875,
0.033172607421875,
0.000972747802734375,
-0.0039520263671875,
0.0243377685546875,
0.0056304931640625,
-0.00189971923828125,
0.0026493072509765625,
0.0111541748046875,
0.006221771240234375,
0.00955963134765625,
-0.01503753662109375,
-0.04571533203125,
0.0162811279296875,
-0.0076904296875,
-0.04296875,
0.030853271484375,
0.0190887451171875,
0.07720947265625,
0.00982666015625,
0.0236968994140625,
0.01494598388671875,
-0.01001739501953125,
-0.0440673828125,
-0.00005644559860229492,
-0.018646240234375,
-0.020263671875,
0.002498626708984375,
0.01136016845703125,
-0.02301025390625,
0.0194549560546875,
-0.01873779296875,
0.007793426513671875,
0.0232696533203125,
0.00974273681640625,
0.0118408203125,
-0.00820159912109375,
0.007781982421875,
0.0167236328125,
0.0261993408203125,
-0.028045654296875,
-0.00013124942779541016,
-0.031768798828125,
0.0137786865234375,
-0.034027099609375,
-0.0633544921875,
0.00628662109375,
-0.041290283203125,
0.04461669921875,
0.01515960693359375,
0.03497314453125,
0.03961181640625,
-0.03753662109375,
0.04302978515625,
-0.00946044921875,
0.05999755859375,
-0.0227813720703125,
0.00830078125,
-0.048370361328125,
0.0594482421875,
0.0141143798828125,
-0.024932861328125,
0.00769805908203125,
0.07666015625,
0.03759765625,
-0.0455322265625,
-0.0013914108276367188,
0.00814056396484375,
-0.037078857421875,
-0.030426025390625,
0.049896240234375,
0.029296875,
0.038665771484375,
-0.0109710693359375,
-0.02716064453125,
0.062408447265625,
-0.01375579833984375,
0.0113525390625,
-0.032958984375,
-0.0012035369873046875,
0.004207611083984375,
0.0233154296875,
0.000812530517578125,
0.030670166015625,
0.00679779052734375,
0.0382080078125,
0.0220794677734375,
-0.04302978515625,
-0.03411865234375,
0.02532958984375,
-0.0258636474609375,
0.0235748291015625,
-0.01480865478515625,
-0.01861572265625,
-0.0005655288696289062,
0.0909423828125,
-0.0046234130859375,
0.034332275390625,
0.00678253173828125,
-0.07794189453125,
0.045928955078125,
0.040802001953125,
-0.0006380081176757812,
-0.002857208251953125,
-0.003643035888671875,
-0.003154754638671875,
0.010650634765625,
-0.06768798828125,
0.0300445556640625,
0.027801513671875,
-0.005939483642578125,
-0.0029773712158203125,
0.02606201171875,
-0.033447265625,
-0.016143798828125,
0.00682830810546875,
-0.048858642578125,
-0.0144805908203125,
0.0234222412109375,
-0.00981903076171875,
-0.018951416015625,
0.01763916015625,
0.00792694091796875,
-0.0499267578125,
0.027252197265625,
0.005176544189453125,
-0.0203399658203125,
0.00162506103515625,
-0.029144287109375,
0.028839111328125,
-0.002506256103515625,
0.035430908203125,
0.07452392578125,
0.022491455078125,
-0.0135955810546875,
0.014617919921875,
-0.017425537109375,
0.026824951171875,
-0.00467681884765625,
0.00018668174743652344,
0.005435943603515625,
-0.0214080810546875,
0.04913330078125,
0.031982421875,
0.0210113525390625,
0.0216522216796875,
-0.024078369140625,
-0.00505828857421875,
0.036468505859375,
-0.0177459716796875,
-0.01247406005859375,
0.042266845703125,
-0.067626953125,
-0.031890869140625,
-0.04913330078125,
-0.055633544921875,
0.005504608154296875,
-0.0237884521484375,
-0.0148162841796875,
-0.049896240234375,
-0.039886474609375,
-0.022064208984375,
-0.062164306640625,
-0.03955078125,
-0.0279541015625,
0.00533294677734375,
0.006610870361328125,
-0.00024580955505371094,
0.03533935546875,
0.01186370849609375,
-0.0149078369140625,
0.022430419921875,
0.00794219970703125,
-0.004840850830078125,
-0.0239410400390625,
0.03857421875,
-0.01357269287109375,
0.0149993896484375,
0.0163421630859375,
-0.006092071533203125,
0.0372314453125,
-0.034332275390625,
-0.03363037109375,
-0.03802490234375,
-0.0031681060791015625,
-0.0723876953125,
0.06793212890625,
0.08441162109375,
-0.0587158203125,
-0.048309326171875,
-0.0750732421875,
-0.049835205078125,
-0.00038051605224609375,
-0.0577392578125,
-0.003528594970703125,
0.03692626953125,
-0.00809478759765625,
-0.017181396484375,
0.0078582763671875,
0.026947021484375,
0.01611328125,
0.037689208984375,
-0.0030345916748046875,
-0.0021381378173828125,
-0.0068817138671875,
-0.0009722709655761719,
-0.03826904296875,
0.01131439208984375,
-0.0240020751953125,
0.0252685546875,
0.01055145263671875,
-0.0157928466796875,
-0.02288818359375,
-0.005367279052734375,
-0.031829833984375,
-0.06085205078125,
0.048248291015625,
-0.0498046875,
0.008270263671875,
-0.040863037109375,
-0.0191650390625,
-0.0010499954223632812,
0.09539794921875,
-0.04620361328125,
0.01116943359375,
0.00414276123046875,
0.0019102096557617188,
0.0190887451171875,
-0.0224456787109375,
-0.07391357421875,
-0.00978851318359375,
-0.0853271484375,
0.019256591796875,
0.002529144287109375,
-0.0352783203125,
-0.0208282470703125,
0.0022716522216796875,
-0.045989990234375,
-0.038238525390625,
-0.007762908935546875,
0.0257110595703125,
-0.0196380615234375,
0.01248931884765625,
-0.050994873046875,
0.01983642578125,
0.00424957275390625,
-0.0249786376953125,
-0.06719970703125,
-0.021240234375,
0.0251922607421875,
0.0259857177734375,
-0.0033016204833984375,
-0.0241851806640625,
-0.0076141357421875,
0.047149658203125,
0.0020809173583984375,
0.037628173828125,
0.002994537353515625,
0.0220794677734375,
-0.0118560791015625,
-0.0014772415161132812,
0.02008056640625,
-0.0246124267578125,
0.004161834716796875,
0.01641845703125,
-0.0262298583984375,
0.05859375,
-0.0213165283203125,
0.023468017578125,
-0.00433349609375,
-0.0256195068359375,
-0.03143310546875,
-0.016448974609375,
-0.03302001953125,
-0.02935791015625,
-0.0202484130859375,
-0.02191162109375,
0.01033782958984375,
-0.041534423828125,
0.03558349609375,
-0.0028209686279296875,
0.024139404296875,
0.01241302490234375,
0.08026123046875,
0.01190948486328125,
-0.0259246826171875,
-0.033203125,
0.01280975341796875,
0.041107177734375,
-0.01522064208984375,
0.0207061767578125,
-0.0177001953125,
-0.04156494140625,
0.07666015625,
0.0014925003051757812,
-0.00937652587890625,
0.0127716064453125,
0.005710601806640625,
-0.00537109375,
-0.053253173828125,
0.029144287109375,
-0.0271759033203125,
0.0220947265625,
-0.01039886474609375,
-0.01043701171875,
0.010955810546875,
-0.028656005859375,
0.00183868408203125,
0.02923583984375,
-0.01349639892578125,
-0.01108551025390625,
0.01450347900390625,
-0.00875091552734375,
0.014068603515625,
0.04351806640625,
0.0207977294921875,
0.00946044921875,
-0.0127716064453125,
0.0264434814453125,
-0.00841522216796875,
0.020599365234375,
-0.0036678314208984375,
-0.00608062744140625,
0.007080078125,
0.0164337158203125,
-0.0310821533203125,
0.0216522216796875,
0.0120391845703125,
0.03643798828125,
0.00020205974578857422,
-0.018463134765625,
-0.059173583984375,
0.0158233642578125,
0.00366973876953125,
-0.0113067626953125,
-0.01042938232421875,
0.0235748291015625,
0.0269927978515625,
-0.0048980712890625,
-0.01165008544921875,
-0.00750732421875,
-0.001964569091796875,
-0.027618408203125,
0.052947998046875,
0.0279388427734375,
-0.006755828857421875,
-0.00424957275390625,
0.0479736328125,
0.0552978515625,
-0.019500732421875,
-0.032196044921875,
0.01380157470703125,
0.0628662109375,
0.022186279296875,
0.0208282470703125,
-0.0259552001953125,
-0.00830078125,
0.003833770751953125,
0.0233612060546875,
-0.03564453125,
0.0017385482788085938,
0.03326416015625,
0.0312042236328125,
0.0105133056640625,
-0.01146697998046875,
-0.010772705078125,
-0.01763916015625,
-0.036407470703125,
0.004337310791015625,
-0.04547119140625,
-0.0770263671875,
-0.012451171875,
0.02117919921875,
0.003086090087890625,
-0.0228424072265625,
-0.018341064453125,
0.01143646240234375,
-0.05926513671875,
0.0238494873046875,
-0.0006213188171386719,
0.003204345703125,
-0.007659912109375,
-0.020111083984375,
-0.04949951171875,
0.03558349609375,
0.053955078125,
-0.1522216796875,
-0.1063232421875,
-0.003810882568359375,
-0.0198822021484375,
0.0794677734375,
-0.00443267822265625,
0.00106048583984375,
-0.0282135009765625,
0.00995635986328125,
-0.013458251953125,
0.017181396484375,
0.004673004150390625,
-0.033477783203125,
-0.025482177734375,
0.0102386474609375,
-0.0274658203125,
-0.01100921630859375,
-0.06964111328125,
-0.060791015625,
-0.06451416015625,
-0.004364013671875,
-0.0158843994140625,
0.0010805130004882812,
-0.001102447509765625,
-0.0081024169921875,
-0.019866943359375,
0.0229644775390625,
0.020233154296875,
0.0008473396301269531,
-0.004547119140625,
0.051544189453125,
-0.035614013671875,
0.0167236328125,
-0.00696563720703125,
0.034912109375,
0.0294952392578125,
-0.0169677734375,
0.0080108642578125,
-0.016021728515625,
-0.0127716064453125,
-0.0633544921875,
0.03485107421875,
0.061065673828125,
0.08184814453125,
0.00627899169921875,
0.0117950439453125,
-0.017974853515625,
-0.0003437995910644531,
-0.0131072998046875,
0.004878997802734375,
-0.022247314453125,
0.0006518363952636719,
0.036651611328125,
-0.031829833984375,
0.01253509521484375,
-0.0191192626953125,
0.0300750732421875,
-0.0069732666015625,
-0.04791259765625,
-0.004680633544921875,
0.038970947265625,
-0.0943603515625,
0.08599853515625,
0.0841064453125,
0.0031147003173828125,
0.026336669921875,
-0.0120086669921875,
-0.004093170166015625,
-0.0085296630859375,
0.0106048583984375,
-0.0307464599609375,
0.01361083984375,
0.045135498046875,
0.0130615234375,
-0.006488800048828125,
0.031036376953125,
-0.0134735107421875,
0.006954193115234375,
0.041015625,
0.03143310546875,
-0.094482421875,
0.03411865234375,
-0.0028858184814453125,
0.031341552734375,
0.05950927734375,
-0.00281524658203125,
0.01508331298828125,
-0.018707275390625,
0.038177490234375,
0.00289154052734375,
-0.0089874267578125,
0.0128936767578125,
-0.0113677978515625,
-0.0151519775390625,
0.00836181640625,
0.0292510986328125,
0.0191497802734375,
0.00824737548828125,
-0.0061798095703125,
-0.01338958740234375,
0.0231475830078125,
-0.0212860107421875,
0.0018768310546875,
-0.0159454345703125,
-0.0180511474609375,
-0.06341552734375,
-0.0035877227783203125,
-0.01476287841796875,
-0.00933074951171875,
0.0078887939453125,
-0.015716552734375,
0.01393890380859375,
0.042388916015625,
-0.027587890625,
0.00774383544921875,
0.00930023193359375,
0.020904541015625,
-0.0095062255859375,
0.0012331008911132812,
0.028594970703125,
0.00646209716796875,
-0.028411865234375,
0.01812744140625,
-0.034912109375,
0.003765106201171875,
-0.01360321044921875,
0.0125885009765625,
0.1055908203125,
-0.03021240234375,
-0.037353515625,
0.0212249755859375,
-0.00670623779296875,
-0.01346588134765625,
-0.00917816162109375,
-0.007061004638671875,
-0.0640869140625,
-0.068603515625,
0.01258087158203125,
-0.07501220703125,
0.0192108154296875,
0.0285797119140625,
-0.032989501953125,
0.1182861328125,
-0.0303192138671875,
0.001216888427734375,
-0.002979278564453125,
0.080322265625,
-0.0162506103515625,
0.0513916015625,
0.01096343994140625,
0.02178955078125,
0.01100921630859375,
0.0113983154296875,
-0.004474639892578125,
-0.00363922119140625,
0.01258087158203125,
0.061859130859375,
0.04803466796875,
0.0175628662109375,
0.0145111083984375,
0.01148223876953125,
0.04107666015625,
-0.0035457611083984375,
-0.038909912109375,
0.0401611328125,
-0.0121917724609375,
-0.02734375,
0.021575927734375,
-0.00539398193359375,
0.02056884765625,
0.004528045654296875,
0.0033855438232421875,
0.024627685546875,
-0.012298583984375,
-0.019195556640625,
-0.011962890625,
0.0281829833984375,
-0.037445068359375,
-0.0167694091796875,
0.020782470703125,
-0.06109619140625,
-0.0088653564453125,
0.0018281936645507812,
0.00345611572265625,
-0.0216522216796875,
0.0243377685546875,
-0.02508544921875,
0.041290283203125,
0.004772186279296875,
0.025726318359375,
-0.0262908935546875,
0.0116424560546875,
0.002079010009765625,
-0.00215911865234375,
-0.00041961669921875,
0.060150146484375,
-0.049896240234375,
-0.0009131431579589844,
0.01837158203125,
0.0311126708984375,
-0.0233612060546875,
-0.02960205078125,
0.03790283203125,
0.0181732177734375,
-0.00713348388671875,
-0.05340576171875,
0.0121002197265625,
0.006496429443359375,
-0.0123291015625,
0.0158843994140625,
-0.005565643310546875,
-0.0152587890625,
0.043121337890625,
-0.03729248046875,
-0.01104736328125,
0.021209716796875,
0.03759765625,
-0.00672149658203125,
0.0252532958984375,
-0.02496337890625,
-0.0177154541015625,
-0.0234832763671875,
-0.00830841064453125,
0.027862548828125,
0.0285491943359375,
0.0013866424560546875,
0.029266357421875,
0.021148681640625,
-0.00849151611328125,
-0.01264190673828125,
0.03033447265625,
0.030609130859375,
-0.0001723766326904297,
-0.032196044921875,
-0.05126953125,
0.04248046875,
0.0360107421875,
-0.005096435546875,
-0.0221099853515625,
0.004970550537109375,
0.06756591796875,
0.033538818359375,
-0.00940704345703125,
0.037139892578125,
0.00438690185546875,
-0.01184844970703125,
-0.013336181640625,
-0.022430419921875,
0.01345062255859375,
-0.011138916015625,
0.005100250244140625,
0.0028591156005859375,
0.0487060546875,
0.0183868408203125,
-0.004489898681640625,
0.00635528564453125,
0.01551055908203125,
0.033660888671875,
0.01105499267578125,
0.00853729248046875,
0.04437255859375,
-0.035858154296875,
0.01384735107421875,
-0.04852294921875,
-0.05889892578125,
0.022308349609375,
0.040069580078125,
-0.0175323486328125,
0.0028705596923828125,
-0.035125732421875,
-0.0157928466796875,
0.01059722900390625,
-0.003948211669921875,
-0.0081024169921875,
0.0501708984375,
0.0233306884765625,
0.00856781005859375,
-0.0921630859375,
-0.0229949951171875,
-0.045623779296875,
0.02337646484375,
0.00948333740234375,
0.057952880859375,
-0.007404327392578125,
0.035247802734375,
-0.031494140625,
0.046661376953125,
-0.04437255859375,
-0.024566650390625,
0.0638427734375,
0.0173492431640625,
-0.0114593505859375,
-0.0204925537109375,
-0.0018444061279296875,
0.015625,
0.037872314453125,
-0.049468994140625,
-0.0026493072509765625,
0.01025390625,
0.02423095703125,
0.0017948150634765625,
-0.01059722900390625,
-0.023101806640625,
-0.055572509765625,
-0.051483154296875,
-0.0028362274169921875,
0.01200103759765625,
0.0268402099609375,
0.022705078125,
0.002201080322265625,
0.007381439208984375,
-0.0078277587890625,
0.0247802734375,
0.01424407958984375,
0.046875,
0.035797119140625,
-0.055511474609375,
-0.041046142578125,
0.0297393798828125,
-0.0007529258728027344,
0.0185089111328125,
0.00786590576171875,
0.050872802734375,
0.00989532470703125,
-0.0309295654296875,
0.0517578125,
0.058929443359375,
0.047607421875,
-0.042388916015625,
0.0228118896484375,
0.06536865234375,
-0.01421356201171875,
0.03363037109375,
-0.035888671875,
-0.0380859375,
-0.043670654296875,
0.0091400146484375,
0.0224456787109375,
-0.00792694091796875,
-0.0241241455078125,
-0.07403564453125,
-0.00392913818359375,
0.0308074951171875,
0.00852203369140625,
-0.0543212890625,
0.00921630859375,
-0.005558013916015625,
0.037933349609375,
0.0011606216430664062,
0.03448486328125,
-0.010009765625,
-0.01210784912109375,
-0.0430908203125,
0.0242919921875,
-0.024566650390625,
-0.007465362548828125,
0.01678466796875,
-0.01149749755859375,
0.0142669677734375,
0.00989532470703125,
-0.03387451171875,
0.0207672119140625,
0.002338409423828125,
0.06634521484375,
-0.0306549072265625,
-0.00698089599609375,
0.033416748046875,
-0.00860595703125,
-0.02215576171875,
-0.045928955078125,
-0.00930023193359375,
-0.052581787109375,
0.004852294921875,
0.012054443359375,
-0.01861572265625,
0.00031876564025878906,
-0.03759765625,
-0.047393798828125,
0.06512451171875,
-0.005344390869140625,
-0.026031494140625,
-0.04620361328125,
0.02069091796875,
-0.0187225341796875,
0.0167694091796875,
-0.0228424072265625,
0.017120361328125,
0.0279083251953125,
0.039154052734375,
-0.02056884765625,
0.0374755859375,
-0.004245758056640625,
-0.0286865234375,
-0.03680419921875,
-0.01509857177734375,
-0.0143585205078125,
-0.027252197265625,
0.012420654296875,
-0.0244903564453125,
0.033721923828125,
0.0174713134765625,
-0.03814697265625,
-0.049102783203125,
-0.012481689453125,
0.01222991943359375,
0.024749755859375,
-0.0204010009765625,
-0.037139892578125,
-0.0277862548828125,
0.021759033203125,
0.0186767578125,
0.01708984375,
-0.0069427490234375,
0.039581298828125,
-0.0281982421875,
-0.039093017578125,
0.002719879150390625,
0.020172119140625,
-0.039581298828125,
-0.0269317626953125,
0.033660888671875,
-0.0034503936767578125,
-0.04766845703125,
0.013031005859375,
-0.018890380859375,
-0.031524658203125,
-0.00678253173828125,
-0.01434326171875,
-0.009613037109375,
-0.00955963134765625,
0.0347900390625,
-0.041259765625,
-0.027740478515625,
0.0002014636993408203,
0.0160369873046875,
-0.0221405029296875,
-0.01375579833984375,
-0.001827239990234375,
0.0211639404296875,
-0.05450439453125,
0.03594970703125,
-0.00992584228515625,
0.07183837890625,
-0.06982421875,
-0.016937255859375,
-0.01837158203125,
0.00018274784088134766,
-0.0015611648559570312,
-0.0194244384765625,
0.0007920265197753906,
0.03521728515625,
0.004974365234375,
0.0865478515625,
-0.008453369140625,
0.05426025390625,
-0.02734375,
0.047637939453125,
0.038665771484375,
-0.0220184326171875,
0.05865478515625,
-0.0016918182373046875,
0.0159454345703125,
0.00039267539978027344,
0.0028972625732421875,
-0.0147857666015625,
0.006862640380859375,
-0.0242919921875,
-0.0122222900390625,
0.021026611328125
]
|
b154b00fd287535ee40f22ac18acfa61dbfcabc6 | Wordpress Stackexchange
Q: multiple orderby in pre_get_posts action I used to be able to sort query results by 2 criteria ("sort results first by status=unsold ASC then by date DESC) like this:
add_action( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query )
{
if (is_admin()){
return;
}
if (is_post_type_archive('objet')){
// Stock: sort by unsold first, then by date
$query->set('meta_key', 'wpcf-object-sold-status' );
$query->set('orderby', 'meta_value date');
$query->set('order', 'ASC DESC' );
}
return $query;
}
But now, it does not change the result order anymore. I have no idea why it stopped functioning. Maybe the update from Wordpress 3 to 4?
A: As Milo said :
$query->set('meta_key', 'wpcf-object-sold-status' );
$query->set('orderby', array('meta_value' => 'ASC', 'date' => 'DESC'));
// $query->set('order', 'ASC DESC' ); // not needed
Relevant link: https://make.wordpress.org/core/2014/08/29/a-more-powerful-order-by-in-wordpress-4-0/
| Q: multiple orderby in pre_get_posts action I used to be able to sort query results by 2 criteria ("sort results first by status=unsold ASC then by date DESC) like this:
add_action( 'pre_get_posts', 'my_get_posts' );
function my_get_posts( $query )
{
if (is_admin()){
return;
}
if (is_post_type_archive('objet')){
// Stock: sort by unsold first, then by date
$query->set('meta_key', 'wpcf-object-sold-status' );
$query->set('orderby', 'meta_value date');
$query->set('order', 'ASC DESC' );
}
return $query;
}
But now, it does not change the result order anymore. I have no idea why it stopped functioning. Maybe the update from Wordpress 3 to 4?
A: As Milo said :
$query->set('meta_key', 'wpcf-object-sold-status' );
$query->set('orderby', array('meta_value' => 'ASC', 'date' => 'DESC'));
// $query->set('order', 'ASC DESC' ); // not needed
Relevant link: https://make.wordpress.org/core/2014/08/29/a-more-powerful-order-by-in-wordpress-4-0/
| wordpress | {
"language": "en",
"length": 120,
"provenance": "stackexchange_00019.jsonl.gz:450950",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/169999"
} | [
0.07452392578125,
0.0055084228515625,
0.0255584716796875,
-0.0276031494140625,
0.01399993896484375,
-0.028961181640625,
0.05694580078125,
-0.0238800048828125,
0.03643798828125,
0.0191802978515625,
-0.004215240478515625,
-0.0281982421875,
-0.0096588134765625,
-0.0285491943359375,
-0.04632568359375,
-0.032745361328125,
0.0653076171875,
-0.04876708984375,
0.0379638671875,
0.0171356201171875,
0.0045013427734375,
0.04803466796875,
0.0565185546875,
0.0028514862060546875,
0.018310546875,
-0.00749969482421875,
0.061126708984375,
-0.039154052734375,
0.051605224609375,
-0.01287841796875,
0.017791748046875,
-0.0279693603515625,
0.018768310546875,
-0.016021728515625,
0.0222930908203125,
-0.026641845703125,
0.0413818359375,
-0.0205841064453125,
0.0068817138671875,
0.0113067626953125,
0.01983642578125,
0.00130462646484375,
-0.0166168212890625,
0.0240325927734375,
-0.03216552734375,
-0.055419921875,
0.0423583984375,
-0.0037937164306640625,
0.03094482421875,
-0.018585205078125,
-0.00806427001953125,
-0.01043701171875,
0.00980377197265625,
-0.041168212890625,
-0.033905029296875,
-0.045928955078125,
0.0260467529296875,
0.0000393986701965332,
0.019805908203125,
-0.01216888427734375,
-0.021942138671875,
0.0204010009765625,
-0.00383758544921875,
-0.033721923828125,
-0.0217437744140625,
-0.0178680419921875,
0.056182861328125,
0.00201416015625,
-0.03607177734375,
-0.039794921875,
0.052978515625,
0.0221710205078125,
0.01114654541015625,
-0.026641845703125,
-0.0042572021484375,
0.00743865966796875,
-0.01727294921875,
-0.0221710205078125,
0.0290679931640625,
-0.00927734375,
0.016143798828125,
0.01395416259765625,
-0.06427001953125,
-0.01070404052734375,
0.02740478515625,
0.003238677978515625,
-0.01641845703125,
-0.0155181884765625,
-0.032958984375,
-0.0278472900390625,
-0.025115966796875,
-0.0274200439453125,
-0.0290069580078125,
-0.0141754150390625,
-0.01093292236328125,
-0.0352783203125,
0.0369873046875,
0.07025146484375,
-0.015167236328125,
-0.02252197265625,
-0.01910400390625,
-0.030914306640625,
-0.03216552734375,
-0.0162353515625,
-0.0112457275390625,
-0.04705810546875,
0.006328582763671875,
0.01702880859375,
0.044219970703125,
0.057464599609375,
-0.026702880859375,
0.053680419921875,
0.0229644775390625,
-0.0230712890625,
-0.0219573974609375,
0.0038814544677734375,
0.002429962158203125,
0.003021240234375,
0.017364501953125,
0.0006666183471679688,
0.030242919921875,
0.062347412109375,
0.0051727294921875,
-0.0653076171875,
-0.002246856689453125,
-0.0012664794921875,
-0.0161895751953125,
-0.053619384765625,
-0.02398681640625,
0.0188140869140625,
-0.007843017578125,
0.01141357421875,
0.0185394287109375,
0.0241546630859375,
-0.01477813720703125,
-0.004909515380859375,
0.0309600830078125,
-0.00809478759765625,
-0.004322052001953125,
0.01284027099609375,
0.01387786865234375,
-0.051055908203125,
-0.01329803466796875,
0.03509521484375,
0.004497528076171875,
0.03717041015625,
0.0263214111328125,
-0.0170745849609375,
-0.0107269287109375,
-0.03265380859375,
-0.03271484375,
0.00003814697265625,
0.02703857421875,
0.0001876354217529297,
-0.03936767578125,
0.01131439208984375,
0.00659942626953125,
-0.0068359375,
-0.035400390625,
-0.032073974609375,
0.058197021484375,
0.0010995864868164062,
-0.03802490234375,
-0.006603240966796875,
-0.045074462890625,
-0.01898193359375,
-0.04302978515625,
-0.01050567626953125,
0.0167236328125,
-0.00461578369140625,
0.00714111328125,
-0.003936767578125,
0.061126708984375,
-0.016937255859375,
-0.0242462158203125,
-0.0140838623046875,
0.006591796875,
-0.022857666015625,
0.0162353515625,
-0.005336761474609375,
-0.03619384765625,
-0.032989501953125,
0.0005173683166503906,
-0.003875732421875,
-0.0648193359375,
0.0628662109375,
-0.002033233642578125,
0.050567626953125,
0.0035228729248046875,
0.0024242401123046875,
0.021514892578125,
0.04888916015625,
-0.052215576171875,
0.05609130859375,
0.0227203369140625,
-0.06549072265625,
-0.002170562744140625,
-0.0304107666015625,
0.0200347900390625,
-0.021026611328125,
-0.01000213623046875,
0.01690673828125,
-0.00009012222290039062,
0.03131103515625,
-0.0243682861328125,
0.01259613037109375,
-0.00948333740234375,
0.032135009765625,
-0.0283203125,
0.0025119781494140625,
0.044219970703125,
0.01027679443359375,
-0.0655517578125,
0.06524658203125,
-0.0057373046875,
-0.041168212890625,
-0.013336181640625,
0.03240966796875,
-0.0007319450378417969,
-0.003040313720703125,
0.00785064697265625,
-0.044647216796875,
-0.003093719482421875,
0.03399658203125,
0.040557861328125,
-0.004878997802734375,
-0.000667572021484375,
-0.0174407958984375,
0.06793212890625,
0.0164642333984375,
-0.0017681121826171875,
-0.0158233642578125,
0.036376953125,
0.030975341796875,
-0.0295562744140625,
-0.009857177734375,
0.006290435791015625,
-0.028839111328125,
0.018646240234375,
0.032073974609375,
0.0281829833984375,
0.0189208984375,
0.00438690185546875,
0.01055908203125,
0.0198974609375,
-0.0169219970703125,
0.0172882080078125,
-0.0020961761474609375,
-0.0025119781494140625,
0.033416748046875,
0.036834716796875,
0.034088134765625,
0.003345489501953125,
0.0263824462890625,
0.01064300537109375,
0.0236663818359375,
0.026611328125,
-0.0030651092529296875,
-0.00923919677734375,
0.01305389404296875,
0.0019989013671875,
-0.039581298828125,
-0.05902099609375,
-0.00014221668243408203,
0.0203704833984375,
-0.0094757080078125,
0.037506103515625,
0.0252227783203125,
-0.0172119140625,
0.0001995563507080078,
0.006805419921875,
-0.00734710693359375,
0.01050567626953125,
0.0131378173828125,
-0.090087890625,
0.00864410400390625,
-0.0435791015625,
0.0460205078125,
0.00029087066650390625,
-0.0186004638671875,
-0.00337982177734375,
0.0291290283203125,
-0.007770538330078125,
-0.00884246826171875,
-0.027435302734375,
-0.06683349609375,
0.0166015625,
0.0252838134765625,
-0.040618896484375,
-0.00814056396484375,
0.037445068359375,
-0.002269744873046875,
-0.019500732421875,
0.00439453125,
-0.037567138671875,
-0.012298583984375,
-0.01526641845703125,
-0.0309600830078125,
0.0191192626953125,
-0.03570556640625,
0.0301361083984375,
0.07525634765625,
0.0214691162109375,
0.005401611328125,
-0.0007748603820800781,
0.00388336181640625,
0.0097808837890625,
-0.00624847412109375,
-0.01342010498046875,
0.0162353515625,
-0.0521240234375,
0.015655517578125,
0.05560302734375,
0.07281494140625,
0.01517486572265625,
-0.0270233154296875,
0.01427459716796875,
0.053741455078125,
-0.061614990234375,
-0.125244140625,
-0.039459228515625,
-0.043121337890625,
0.0255126953125,
0.01007080078125,
0.001468658447265625,
-0.0093536376953125,
0.02520751953125,
0.0174713134765625,
0.044158935546875,
0.051849365234375,
-0.06524658203125,
0.031402587890625,
-0.057464599609375,
0.01166534423828125,
-0.0219879150390625,
0.02471923828125,
0.0016431808471679688,
0.05908203125,
0.0155487060546875,
-0.0770263671875,
-0.004779815673828125,
0.0313720703125,
-0.00972747802734375,
0.0303955078125,
0.035003662109375,
-0.033233642578125,
0.0122528076171875,
0.00463104248046875,
0.06805419921875,
0.0295867919921875,
-0.036956787109375,
0.0009851455688476562,
-0.0228424072265625,
0.0028362274169921875,
0.0293121337890625,
-0.007450103759765625,
-0.00991058349609375,
0.0089874267578125,
0.0260772705078125,
-0.033447265625,
0.00931549072265625,
-0.046112060546875,
-0.043792724609375,
-0.0231170654296875,
0.0200347900390625,
0.03887939453125,
-0.030029296875,
-0.00891876220703125,
0.01165008544921875,
0.01158905029296875,
0.0239105224609375,
-0.0144500732421875,
0.0018167495727539062,
-0.00228118896484375,
0.0084075927734375,
-0.03668212890625,
0.04071044921875,
-0.031402587890625,
0.0018310546875,
0.01409149169921875,
-0.00031685829162597656,
0.01031494140625,
-0.0380859375,
-0.00872039794921875,
-0.033599853515625,
0.0400390625,
-0.03436279296875,
-0.01432037353515625,
-0.0408935546875,
-0.017852783203125,
-0.029632568359375,
0.0552978515625,
-0.0203857421875,
-0.0208587646484375,
0.011474609375,
0.033294677734375,
-0.05621337890625,
-0.05377197265625,
-0.020050048828125,
0.0025348663330078125,
-0.0239410400390625,
0.0035800933837890625,
0.00148773193359375,
-0.0188140869140625,
-0.040740966796875,
-0.02276611328125,
-0.0304412841796875,
-0.01617431640625,
0.053985595703125,
-0.0209197998046875,
-0.00799560546875,
0.026611328125,
-0.0213623046875,
-0.01149749755859375,
-0.055511474609375,
0.0263519287109375,
-0.0821533203125,
-0.028533935546875,
0.06072998046875,
0.0276641845703125,
-0.046234130859375,
0.001842498779296875,
-0.0276031494140625,
0.047760009765625,
-0.009185791015625,
-0.019744873046875,
0.034088134765625,
0.034454345703125,
-0.00901031494140625,
-0.0333251953125,
-0.0029144287109375,
-0.059417724609375,
-0.0281524658203125,
-0.05133056640625,
0.001239776611328125,
-0.01145172119140625,
-0.0227813720703125,
0.005664825439453125,
-0.030426025390625,
-0.0021762847900390625,
0.003719329833984375,
-0.01849365234375,
-0.0180206298828125,
0.049102783203125,
-0.025146484375,
0.0014066696166992188,
-0.048828125,
-0.04425048828125,
0.0027828216552734375,
0.0027294158935546875,
-0.025665283203125,
0.0213165283203125,
0.04779052734375,
0.0173492431640625,
-0.006893157958984375,
-0.040313720703125,
-0.0069427490234375,
0.00597381591796875,
-0.0081634521484375,
0.0182647705078125,
-0.0113067626953125,
-0.013641357421875,
0.0262603759765625,
-0.02886962890625,
-0.0093841552734375,
-0.01305389404296875,
-0.0006480216979980469,
-0.0173187255859375,
-0.049652099609375,
0.0231170654296875,
-0.039031982421875,
0.0521240234375,
0.055145263671875,
0.005645751953125,
-0.0384521484375,
-0.012298583984375,
0.0501708984375,
0.00142669677734375,
-0.0020351409912109375,
-0.04278564453125,
-0.033355712890625,
0.0031909942626953125,
-0.013885498046875,
0.04803466796875,
0.00586700439453125,
0.00982666015625,
0.0204315185546875,
0.0457763671875,
0.0096282958984375,
-0.02880859375,
-0.006244659423828125,
-0.033447265625,
0.037506103515625,
-0.03411865234375,
-0.00817108154296875,
0.007244110107421875,
0.001453399658203125,
0.040557861328125,
-0.0009336471557617188,
-0.026092529296875,
-0.05938720703125,
-0.000598907470703125,
0.04937744140625,
-0.0010395050048828125,
-0.05322265625,
0.027862548828125,
0.0206298828125,
-0.0123138427734375,
-0.01442718505859375,
-0.0499267578125,
-0.0048980712890625,
-0.036529541015625,
0.045318603515625,
0.0467529296875,
-0.0060577392578125,
0.0021495819091796875,
0.0745849609375,
0.00467681884765625,
0.03399658203125,
-0.01314544677734375,
0.007476806640625,
0.002193450927734375,
0.036773681640625,
0.034881591796875,
-0.0262451171875,
0.0046234130859375,
0.0204010009765625,
-0.0135498046875,
0.006824493408203125,
-0.01105499267578125,
0.007122039794921875,
-0.04083251953125,
-0.03759765625,
0.01428985595703125,
0.047637939453125,
0.051239013671875,
-0.018951416015625,
-0.0013246536254882812,
0.043487548828125,
0.0187530517578125,
-0.019500732421875,
-0.050689697265625,
-0.0110321044921875,
0.026275634765625,
0.016815185546875,
0.0235443115234375,
0.0014276504516601562,
0.06298828125,
-0.06268310546875,
0.0533447265625,
-0.0296630859375,
-0.0227203369140625,
0.004756927490234375,
-0.021240234375,
-0.004474639892578125,
-0.0273590087890625,
0.0214080810546875,
-0.013427734375,
-0.0207672119140625,
0.036285400390625,
-0.02392578125,
0.0350341796875,
-0.0478515625,
0.023345947265625,
-0.054168701171875,
0.01727294921875,
0.0204010009765625,
0.0161285400390625,
-0.004917144775390625,
-0.0482177734375,
-0.0224761962890625,
-0.055572509765625,
0.00782012939453125,
0.00833892822265625,
-0.03094482421875,
0.0011529922485351562,
0.017974853515625,
0.038787841796875,
-0.01439666748046875,
-0.074462890625,
-0.01214599609375,
-0.0235595703125,
0.0243988037109375,
0.01337432861328125,
0.005519866943359375,
0.11322021484375,
-0.0211944580078125,
0.09368896484375,
0.04193115234375,
0.05596923828125,
-0.059417724609375,
-0.01531982421875,
0.020843505859375,
-0.06744384765625,
-0.041748046875,
-0.0214080810546875,
-0.05303955078125,
0.0272674560546875,
0.0369873046875,
-0.008575439453125,
0.0362548828125,
-0.005092620849609375,
-0.004497528076171875,
-0.00628662109375,
-0.0104217529296875,
-0.007694244384765625,
0.02825927734375,
0.0246429443359375,
0.00006413459777832031,
0.00467681884765625,
-0.03192138671875,
-0.0012674331665039062,
0.029876708984375,
-0.017791748046875,
0.0301513671875,
-0.017974853515625,
-0.045867919921875,
0.0240631103515625,
0.02923583984375,
0.0194091796875,
0.01342010498046875,
-0.03961181640625,
0.01274871826171875,
-0.0243988037109375,
-0.004436492919921875,
0.032012939453125,
0.0061492919921875,
0.0589599609375,
-0.012908935546875,
-0.0206451416015625,
0.0127105712890625,
-0.0323486328125,
0.0287017822265625,
0.0132598876953125,
0.05621337890625,
-0.0269012451171875,
0.0142669677734375,
0.0213470458984375,
-0.046356201171875,
0.012939453125,
-0.00040912628173828125,
-0.004138946533203125,
0.0011043548583984375,
0.032318115234375,
-0.03411865234375,
-0.013214111328125,
0.007038116455078125,
-0.01416778564453125,
-0.01427459716796875,
-0.02313232421875,
-0.014892578125,
-0.00809478759765625,
-0.041229248046875,
0.02471923828125,
0.019775390625,
0.01555633544921875,
-0.01050567626953125,
0.01291656494140625,
-0.01323699951171875,
-0.0224609375,
-0.0709228515625,
-0.0291900634765625,
0.00739288330078125,
-0.039093017578125,
-0.0148773193359375,
-0.007232666015625,
0.045379638671875,
0.0298004150390625,
0.0013551712036132812,
-0.0438232421875,
0.018341064453125,
-0.00420379638671875,
-0.05169677734375,
-0.00991058349609375,
0.021484375,
0.00859832763671875,
0.00017654895782470703,
0.0281219482421875,
-0.02227783203125,
-0.040924072265625,
-0.010498046875,
-0.0328369140625,
0.042938232421875,
-0.032989501953125,
0.0004138946533203125,
0.028778076171875,
0.048309326171875,
-0.0179901123046875,
0.005035400390625,
0.0148162841796875,
-0.0650634765625,
-0.035247802734375,
0.00907135009765625,
-0.02459716796875,
-0.004970550537109375,
-0.00836181640625,
-0.06298828125,
0.0728759765625,
-0.0443115234375,
0.034881591796875,
-0.020721435546875,
0.02496337890625,
0.030120849609375,
0.0246429443359375,
-0.048553466796875,
0.050018310546875,
-0.0230865478515625,
0.09796142578125,
-0.05047607421875,
-0.0102996826171875,
0.043212890625,
0.043487548828125,
0.037689208984375,
0.0015001296997070312,
-0.0732421875,
0.0217132568359375,
0.08154296875,
0.040069580078125,
0.0227813720703125,
0.061279296875,
-0.01371002197265625,
0.03179931640625,
0.0130157470703125,
-0.01922607421875,
0.0283660888671875,
0.0012140274047851562,
-0.051544189453125,
0.035858154296875,
0.0013189315795898438,
0.0097503662109375,
-0.0579833984375,
0.010711669921875,
-0.05963134765625,
-0.0278167724609375,
0.051727294921875,
-0.035186767578125,
0.005275726318359375,
0.010589599609375,
0.0209197998046875,
-0.05426025390625,
-0.00409698486328125,
-0.0239105224609375,
0.03765869140625,
-0.0030364990234375,
0.0286712646484375,
0.043243408203125,
0.01139068603515625,
0.05194091796875,
-0.0189056396484375,
0.012115478515625,
-0.018035888671875,
-0.01377105712890625,
0.05413818359375,
0.0259246826171875,
0.046112060546875,
0.0022869110107421875,
0.0164642333984375,
0.04718017578125,
0.06365966796875,
-0.027099609375,
-0.01113128662109375,
0.0179901123046875,
-0.0089569091796875,
-0.005855560302734375,
-0.031585693359375,
-0.02532958984375,
-0.0162200927734375,
0.00902557373046875,
-0.060302734375,
-0.0171356201171875,
0.0255889892578125,
0.0204315185546875,
-0.01284027099609375,
0.00897216796875,
0.00594329833984375,
-0.039093017578125,
-0.0307464599609375,
0.00997161865234375,
0.0266876220703125,
0.05230712890625,
-0.005401611328125,
0.059478759765625,
-0.05126953125,
-0.0131378173828125,
-0.0362548828125,
0.0447998046875,
-0.00896453857421875,
0.03863525390625,
-0.052001953125,
-0.0223236083984375,
-0.00789642333984375,
0.03448486328125,
0.02301025390625,
-0.01971435546875,
0.0401611328125,
0.06573486328125,
-0.02374267578125,
-0.0005021095275878906,
0.060211181640625,
0.00630950927734375,
-0.035003662109375,
-0.046112060546875,
-0.005863189697265625,
0.026947021484375,
0.0146484375,
0.0191802978515625,
0.0113983154296875,
0.0185089111328125,
-0.01983642578125,
0.027069091796875,
-0.003810882568359375,
-0.0197601318359375,
0.0280609130859375,
-0.0011653900146484375,
0.044708251953125,
0.003971099853515625,
-0.0173797607421875,
-0.01003265380859375,
-0.034088134765625,
-0.006793975830078125,
0.0157623291015625,
0.0286712646484375,
0.0015411376953125,
0.007904052734375,
0.0008215904235839844,
-0.048248291015625,
0.007549285888671875,
0.033416748046875,
0.01318359375,
0.03265380859375,
0.0186004638671875,
0.005474090576171875,
-0.06787109375,
-0.040679931640625,
-0.0034942626953125,
0.0153350830078125,
-0.0239410400390625,
0.007549285888671875,
0.0285491943359375,
0.0015497207641601562,
-0.0028820037841796875,
0.013916015625,
-0.0189971923828125,
-0.00495147705078125,
-0.002117156982421875,
-0.049163818359375,
-0.0206298828125,
0.016143798828125,
0.034637451171875,
-0.0297698974609375,
0.04913330078125,
-0.06671142578125,
-0.0197296142578125,
-0.029052734375,
0.02105712890625,
-0.03094482421875,
0.0312347412109375,
-0.0196533203125,
0.005950927734375,
0.00882720947265625,
-0.0169830322265625,
0.0222930908203125,
-0.004253387451171875,
-0.00876617431640625,
0.03759765625,
0.04998779296875,
0.0036411285400390625,
0.052093505859375,
-0.020263671875,
0.10870361328125,
0.043121337890625,
-0.0152740478515625,
0.06207275390625,
-0.006656646728515625,
-0.029205322265625,
0.05072021484375,
0.01483154296875,
-0.03253173828125,
0.01154327392578125,
0.021820068359375,
-0.0262298583984375,
0.007343292236328125,
0.006160736083984375,
-0.007549285888671875,
-0.0099029541015625,
0.0220489501953125,
-0.03125,
-0.0455322265625,
0.01904296875,
-0.0261993408203125,
-0.0168304443359375,
0.0085906982421875,
-0.016143798828125,
0.02978515625,
-0.0054931640625,
0.051910400390625,
-0.01236724853515625,
0.0338134765625,
0.0227813720703125,
-0.056976318359375,
0.039764404296875,
-0.01029205322265625,
-0.0287933349609375,
0.0298919677734375,
-0.032562255859375,
0.0045623779296875,
-0.007297515869140625,
-0.002292633056640625,
-0.0255126953125,
-0.031982421875,
0.024017333984375,
-0.01364898681640625,
-0.0167083740234375,
-0.013916015625,
0.0031299591064453125,
-0.01363372802734375,
-0.012420654296875,
-0.025360107421875,
0.00628662109375,
0.0184783935546875,
-0.0125579833984375,
0.0007028579711914062,
0.0208892822265625,
-0.0175323486328125,
-0.0826416015625,
0.010101318359375,
-0.0726318359375,
0.015899658203125,
0.010101318359375,
0.012939453125,
0.03228759765625,
-0.005992889404296875,
-0.051513671875,
0.0816650390625,
-0.01366424560546875,
-0.01873779296875,
-0.041534423828125,
0.0033111572265625,
-0.02313232421875,
0.0215911865234375,
-0.0013628005981445312,
-0.023345947265625,
-0.01241302490234375,
0.03265380859375,
-0.004718780517578125,
0.03497314453125,
-0.0284881591796875,
0.03076171875,
-0.07470703125,
0.0117950439453125,
-0.0254669189453125,
-0.01526641845703125,
-0.021453857421875,
-0.0016326904296875,
0.0401611328125,
0.0261077880859375,
-0.00812530517578125,
0.045440673828125,
0.03631591796875,
0.0030059814453125,
0.0280914306640625,
0.0012845993041992188,
-0.055267333984375,
-0.0293121337890625,
0.01090240478515625,
0.037109375,
0.0191192626953125,
-0.02001953125,
-0.006374359130859375,
-0.02813720703125,
-0.00354766845703125,
-0.036346435546875,
0.00601959228515625,
-0.055999755859375,
-0.025177001953125,
-0.0026092529296875,
-0.006549835205078125,
0.0163421630859375,
-0.017852783203125,
-0.0157318115234375,
-0.004180908203125,
-0.01293182373046875,
-0.004703521728515625,
-0.046234130859375,
0.00023424625396728516,
-0.004974365234375,
-0.02288818359375,
-0.042877197265625,
-0.00818634033203125,
0.009368896484375,
-0.047210693359375,
-0.027435302734375,
-0.00403594970703125,
0.017425537109375,
0.025665283203125,
-0.0104522705078125,
0.04583740234375,
-0.00963592529296875,
0.05712890625,
0.00521087646484375,
-0.0275421142578125,
0.004058837890625,
0.007740020751953125,
-0.0124053955078125,
-0.005374908447265625,
-0.0007586479187011719,
0.0098724365234375,
0.063720703125,
0.005054473876953125,
0.08160400390625,
0.0258941650390625,
0.0208740234375,
0.0347900390625,
-0.026336669921875,
0.07012939453125,
-0.0254364013671875,
0.0042724609375,
-0.005878448486328125,
-0.017181396484375,
-0.03887939453125,
0.0256195068359375,
0.0177764892578125,
-0.013336181640625,
0.0215606689453125
]
|
60dd9f980491c48d2245ade35cd2496790abb023 | Wordpress Stackexchange
Q: WordPress wp-admin https redirect loop I am using nginx as my webserver and i have edited the configuration file to point to https, so i change the WordPress url settings to https and also added the WordPress force ssl admin code to my wp-config file but I keep running into the error "This webpage has a redirect loop"
A: Another version for the books, just add this to the top of wp-config.php
Reason is that there could be load balancers or something that does not pass along the proper https value, so you have to grab it from elsewhere and fake it for wordpress.
if ( (isset($_SERVER['HTTP_X_FORWARDED_PORT'] ) && ( '443' == $_SERVER['HTTP_X_FORWARDED_PORT'] ))
|| (isset($_SERVER['HTTP_CF_VISITOR']) && $_SERVER['HTTP_CF_VISITOR'] == '{"scheme":"https"}')) {
$_SERVER['HTTPS'] = 'on';
}
| Q: WordPress wp-admin https redirect loop I am using nginx as my webserver and i have edited the configuration file to point to https, so i change the WordPress url settings to https and also added the WordPress force ssl admin code to my wp-config file but I keep running into the error "This webpage has a redirect loop"
A: Another version for the books, just add this to the top of wp-config.php
Reason is that there could be load balancers or something that does not pass along the proper https value, so you have to grab it from elsewhere and fake it for wordpress.
if ( (isset($_SERVER['HTTP_X_FORWARDED_PORT'] ) && ( '443' == $_SERVER['HTTP_X_FORWARDED_PORT'] ))
|| (isset($_SERVER['HTTP_CF_VISITOR']) && $_SERVER['HTTP_CF_VISITOR'] == '{"scheme":"https"}')) {
$_SERVER['HTTPS'] = 'on';
}
A: I had a similar problem and just added the following snippet to my wp-config.php:
/** SSL */
define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
as suggested in the Codex. This will only be needed in case there's SSL passthrough enabled in your load balancer (or firewall) setup. Meaning that while you can access the site via HTTP within TLS/SSL, the communication that your server receives is HTTP only. To account for that, above header is needed so WordPress can "set" HTTPS to on in the $_SERVER config array.
A: 5 year old Question...
Okay, I had this error, after installing my SSL Certificate and changing all links that were http to https using the wp-cli.phar found here.
I tried various configurations and none seemed to resolve this, unless I set this:
define('FORCE_SSL_ADMIN', true);
define('FORCE_SSL_LOGIN', true);
to this:
define('FORCE_SSL_ADMIN', false);
define('FORCE_SSL_LOGIN', false);
It allowed me to hit the log-in page, but then was unable to actually log-in. I tried answer two but that unfortunately didn't help either, Untill I did the following change:
/** SSL */
define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== true)
$_SERVER['HTTPS']='on';
For some reason, I do not know why - I had to change the
!==
false
to
!==
true
I'm running nginx as host and reverse proxy to nginx unit...
If anyone has any idea why that worked, Please let me know
A: As I do not have the comment privilege yet, I will post this addition as another answer:
The solution proposed by Elias, to add the following to wp-config.php, did the trick for me:
/** SSL */
define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
However, it only worked for me when I put it before everything else in this file!
A: You've added $_SERVER['HTTPS'] = 'on'; to your wp-config.php?
You should also use the WP Migrate DB plugin to migrate from http://yoursite.com to https://yoursite.com
A: Actually... I had this issue and the solving was quite easy and embarassing. Somehow on the webhost my wp-admin folder was deleted and therefore no wp-admin with this same error message.
After hours of testing so many different ways I just saw this and when downloaded and uploaded again it all worked as normal.
Check it guys, it can be that simple.
A: I had the same issue when I hosted my site on Azure webapp service Linux.
Try this plugin. take care when it active it works.
https://wordpress.org/plugins/jsm-force-ssl/
This plugin uses native WordPress filters, instead of PHP’s output
buffer, for maximum reliability, performance and caching compatibility
(this plugin does not affect caching performance), along with 301
permanent redirects for best SEO (301 redirects are considered best
for SEO when moving from HTTP to HTTPS).
Honors proxy / load-balancing variables for large hosting
environments:
HTTP_X_FORWARDED_PROTO HTTP_X_FORWARDED_SSL Requirements:
Your web server must be configured with an SSL certificate and able to
handle HTTPS request.
Simply activate the plugin and you’re done:
There are no plugin settings to adjust, and no changes are made to
your WordPress configuration — simply activate or deactivate the
plugin to enable / disable the filters and dynamic redirects.
A: I ran into this same issue so after hours of research and tweaking things I got it to work. I'd share all I did because I'm not certain if they're all related.
First, I'm hosting my wordpress website on cpanel so I used the Softaculous tool on cpanel to upgrage my wordpress version.
Secondly, I upgraded my wordpress DB.
(I noticed that my .htaccess file in the root folder of my website was updated with an addition of RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] )
Then I checked the .htaccess file of my wp-admin folder then I saw these commands:
Order Allow,Deny
Deny from all
I went to read from the wordpress website that those commands are meant to prevent web access to files in that folder, but this wasn't a behaviour I needed (I think)
So I commented them out and I was able to load my admin section.
A: Configure CloudFlare to https only and in wp-config set
define('FORCE_SSL_ADMIN', false);
define('FORCE_SSL_LOGIN', false);
| wordpress | {
"language": "en",
"length": 861,
"provenance": "stackexchange_00019.jsonl.gz:450990",
"question_score": "76",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/170165"
} | [
0.0447998046875,
0.006481170654296875,
0.01708984375,
0.00232696533203125,
0.006771087646484375,
-0.02337646484375,
0.033477783203125,
-0.054229736328125,
0.0206451416015625,
0.0007920265197753906,
0.006549835205078125,
-0.00801849365234375,
-0.03765869140625,
-0.0423583984375,
0.001537322998046875,
-0.0098114013671875,
0.006557464599609375,
-0.0269927978515625,
0.01508331298828125,
-0.005832672119140625,
0.0172119140625,
0.00020503997802734375,
0.0396728515625,
-0.035369873046875,
-0.007396697998046875,
-0.00888824462890625,
0.0997314453125,
-0.033203125,
-0.01267242431640625,
-0.0347900390625,
-0.0008187294006347656,
0.00600433349609375,
0.031158447265625,
0.043243408203125,
-0.10687255859375,
-0.06536865234375,
-0.01605224609375,
0.0159149169921875,
-0.045867919921875,
0.0367431640625,
0.005580902099609375,
-0.0022830963134765625,
0.05841064453125,
0.024078369140625,
-0.00127410888671875,
-0.017791748046875,
-0.007617950439453125,
-0.050537109375,
-0.006839752197265625,
0.02655029296875,
0.00479888916015625,
-0.00913238525390625,
0.025909423828125,
0.0035648345947265625,
-0.021331787109375,
-0.020172119140625,
0.01009368896484375,
0.00946807861328125,
0.007236480712890625,
-0.02703857421875,
-0.02508544921875,
0.020233154296875,
0.005886077880859375,
0.0093536376953125,
-0.030426025390625,
0.0014715194702148438,
-0.0248565673828125,
0.0218963623046875,
-0.060943603515625,
-0.040008544921875,
0.0139617919921875,
-0.0301666259765625,
-0.01461029052734375,
0.0010089874267578125,
0.00292205810546875,
-0.0121002197265625,
0.0181884765625,
0.0093994140625,
0.004207611083984375,
0.0225830078125,
0.0157012939453125,
-0.00557708740234375,
-0.020721435546875,
0.00966644287109375,
-0.003093719482421875,
0.0206298828125,
-0.0211181640625,
-0.0183563232421875,
0.00545501708984375,
-0.0247650146484375,
-0.0200653076171875,
0.01995849609375,
0.026214599609375,
-0.0287017822265625,
-0.040008544921875,
-0.036895751953125,
0.0150299072265625,
0.0273895263671875,
0.0258026123046875,
0.0019054412841796875,
0.000308990478515625,
-0.038482666015625,
-0.01560211181640625,
-0.0195159912109375,
0.004711151123046875,
0.051544189453125,
-0.0040283203125,
0.053192138671875,
0.05364990234375,
0.022247314453125,
0.037689208984375,
0.0007982254028320312,
-0.02044677734375,
-0.01507568359375,
-0.037628173828125,
0.02203369140625,
-0.04205322265625,
-0.004642486572265625,
-0.0189361572265625,
0.023651123046875,
-0.01654052734375,
0.01406097412109375,
-0.0104217529296875,
-0.0051422119140625,
0.0017080307006835938,
-0.01378631591796875,
0.00013959407806396484,
-0.01824951171875,
0.00901031494140625,
0.0114898681640625,
-0.0245208740234375,
-0.0045318603515625,
0.0655517578125,
0.04071044921875,
0.0264434814453125,
-0.018157958984375,
0.0357666015625,
-0.01611328125,
-0.036041259765625,
0.0355224609375,
0.01235198974609375,
-0.037841796875,
-0.040069580078125,
-0.006267547607421875,
0.05548095703125,
0.0338134765625,
0.006290435791015625,
0.0031585693359375,
0.03277587890625,
-0.04034423828125,
0.018798828125,
-0.0271453857421875,
0.015869140625,
0.024993896484375,
0.03118896484375,
-0.003574371337890625,
0.039154052734375,
-0.019622802734375,
-0.0185546875,
-0.0224609375,
-0.00466156005859375,
-0.00679779052734375,
0.04339599609375,
-0.0288238525390625,
-0.044097900390625,
0.0015649795532226562,
-0.058197021484375,
-0.02349853515625,
0.026458740234375,
0.0291900634765625,
0.00804901123046875,
-0.0180206298828125,
-0.03350830078125,
0.016387939453125,
0.0108795166015625,
0.0239410400390625,
0.0019063949584960938,
0.0309906005859375,
0.0269775390625,
0.037017822265625,
0.018585205078125,
-0.0277557373046875,
0.04486083984375,
0.011016845703125,
-0.0251312255859375,
0.00727081298828125,
-0.0130157470703125,
0.01129913330078125,
0.0242767333984375,
0.004291534423828125,
-0.00086212158203125,
0.0250091552734375,
-0.00960540771484375,
0.040679931640625,
-0.049835205078125,
-0.061248779296875,
-0.025787353515625,
-0.005523681640625,
-0.0430908203125,
0.01629638671875,
-0.01197052001953125,
-0.0044403076171875,
-0.036285400390625,
0.023284912109375,
0.03173828125,
-0.0313720703125,
0.016357421875,
-0.01024627685546875,
0.048004150390625,
0.021942138671875,
-0.0151824951171875,
-0.0146484375,
0.01494598388671875,
-0.0219879150390625,
-0.0232391357421875,
0.0379638671875,
-0.0219573974609375,
0.0200958251953125,
-0.00298309326171875,
0.02850341796875,
-0.006053924560546875,
-0.0266571044921875,
-0.012664794921875,
-0.0283050537109375,
0.036773681640625,
0.0016736984252929688,
-0.0155181884765625,
-0.0033855438232421875,
0.038787841796875,
0.007457733154296875,
-0.0005402565002441406,
0.02142333984375,
0.0239105224609375,
0.0272979736328125,
-0.06048583984375,
-0.00844573974609375,
-0.042266845703125,
-0.005290985107421875,
-0.00019824504852294922,
0.042816162109375,
0.040252685546875,
0.0191650390625,
-0.0201416015625,
-0.0166473388671875,
0.0096588134765625,
-0.07989501953125,
0.002117156982421875,
-0.002841949462890625,
0.017730712890625,
0.020843505859375,
-0.006435394287109375,
-0.01219940185546875,
0.01157379150390625,
-0.040283203125,
-0.000377655029296875,
0.0372314453125,
0.016082763671875,
0.0129241943359375,
-0.01483917236328125,
-0.020263671875,
0.0274658203125,
-0.035797119140625,
-0.07196044921875,
-0.0005311965942382812,
-0.0078887939453125,
-0.039031982421875,
-0.019683837890625,
-0.0225982666015625,
-0.0016384124755859375,
-0.048553466796875,
0.031341552734375,
-0.02777099609375,
0.002246856689453125,
0.0010385513305664062,
0.035186767578125,
-0.0265350341796875,
-0.043914794921875,
0.022613525390625,
0.008697509765625,
0.0007414817810058594,
-0.027862548828125,
0.007343292236328125,
-0.036712646484375,
-0.01438140869140625,
-0.0335693359375,
-0.0256500244140625,
0.024383544921875,
0.025909423828125,
0.0297698974609375,
0.00492095947265625,
0.0439453125,
-0.00580596923828125,
-0.030364990234375,
0.0347900390625,
-0.0213623046875,
-0.03155517578125,
0.055450439453125,
-0.04351806640625,
0.028106689453125,
-0.00019681453704833984,
0.0789794921875,
0.060394287109375,
-0.00901031494140625,
0.0268402099609375,
0.011322021484375,
-0.0236358642578125,
-0.0007476806640625,
0.0256805419921875,
-0.0008764266967773438,
-0.0227813720703125,
-0.053497314453125,
-0.011199951171875,
0.01320648193359375,
-0.0245208740234375,
0.054046630859375,
-0.00893402099609375,
0.01476287841796875,
0.013031005859375,
-0.055755615234375,
-0.07952880859375,
-0.02392578125,
-0.060882568359375,
0.010894775390625,
0.0163726806640625,
-0.0166168212890625,
-0.01314544677734375,
0.05279541015625,
0.0185546875,
0.0222930908203125,
-0.01377105712890625,
-0.08807373046875,
-0.0679931640625,
-0.1068115234375,
-0.0176849365234375,
-0.0233917236328125,
0.025970458984375,
-0.001583099365234375,
0.02203369140625,
-0.01406097412109375,
-0.032073974609375,
-0.01340484619140625,
0.0014200210571289062,
-0.002193450927734375,
-0.0177154541015625,
-0.0740966796875,
0.014190673828125,
-0.01122283935546875,
0.0009546279907226562,
-0.00128936767578125,
-0.025238037109375,
0.04046630859375,
0.0015554428100585938,
0.0031890869140625,
-0.026824951171875,
-0.00612640380859375,
-0.060455322265625,
-0.01290130615234375,
-0.04241943359375,
-0.049346923828125,
-0.06396484375,
0.02691650390625,
-0.010986328125,
-0.00921630859375,
-0.0220489501953125,
0.005016326904296875,
-0.0187530517578125,
-0.01995849609375,
-0.0194244384765625,
0.007106781005859375,
0.00757598876953125,
-0.0017147064208984375,
-0.01357269287109375,
0.051116943359375,
0.001415252685546875,
0.005222320556640625,
-0.033782958984375,
0.051605224609375,
-0.00036716461181640625,
-0.0221710205078125,
0.004375457763671875,
-0.01012420654296875,
-0.01812744140625,
-0.0299530029296875,
-0.06744384765625,
-0.074951171875,
0.048858642578125,
-0.019134521484375,
0.0037994384765625,
-0.014892578125,
-0.0225677490234375,
0.00923919677734375,
0.1005859375,
-0.006130218505859375,
-0.0087127685546875,
0.0160675048828125,
0.0265350341796875,
-0.00339508056640625,
-0.0170745849609375,
-0.01103973388671875,
-0.0273895263671875,
-0.0889892578125,
0.0084228515625,
0.0005826950073242188,
-0.0242462158203125,
0.01934814453125,
-0.040191650390625,
-0.024627685546875,
-0.057830810546875,
0.00930023193359375,
-0.006069183349609375,
0.036224365234375,
-0.01364898681640625,
0.01934814453125,
-0.0220489501953125,
0.0238800048828125,
-0.056488037109375,
-0.110107421875,
-0.0279541015625,
0.01239776611328125,
0.09515380859375,
0.006561279296875,
-0.00899505615234375,
0.0028972625732421875,
0.08770751953125,
0.034027099609375,
0.0215301513671875,
0.013824462890625,
-0.039886474609375,
0.045135498046875,
0.033721923828125,
0.01947021484375,
0.0096893310546875,
-0.0187835693359375,
-0.00937652587890625,
0.0003170967102050781,
0.0166168212890625,
-0.00958251953125,
-0.0281219482421875,
0.036895751953125,
-0.03399658203125,
-0.052703857421875,
-0.0224761962890625,
-0.0124664306640625,
0.0174407958984375,
-0.011322021484375,
-0.0001430511474609375,
-0.02728271484375,
-0.0643310546875,
0.04754638671875,
-0.040924072265625,
-0.0144805908203125,
0.0152130126953125,
0.0648193359375,
0.00341796875,
-0.002170562744140625,
-0.050933837890625,
-0.0178985595703125,
0.00980377197265625,
-0.024627685546875,
0.10260009765625,
0.06781005859375,
0.02569580078125,
0.054779052734375,
-0.0069580078125,
-0.0231781005859375,
0.019012451171875,
-0.0186920166015625,
0.00519561767578125,
-0.045379638671875,
0.0090789794921875,
-0.0211334228515625,
0.0179901123046875,
0.030517578125,
0.03643798828125,
-0.0120849609375,
0.0247955322265625,
-0.00899505615234375,
0.007106781005859375,
-0.025909423828125,
0.021026611328125,
-0.021240234375,
0.0140533447265625,
-0.051177978515625,
0.059051513671875,
0.03485107421875,
0.000835418701171875,
0.04156494140625,
0.057464599609375,
-0.01947021484375,
-0.039154052734375,
-0.014068603515625,
-0.0142364501953125,
0.037139892578125,
-0.05029296875,
-0.03729248046875,
-0.0052642822265625,
-0.0134429931640625,
0.10064697265625,
0.0240020751953125,
-0.07598876953125,
0.039886474609375,
-0.007564544677734375,
-0.0321044921875,
0.0253448486328125,
-0.00939178466796875,
0.0309295654296875,
-0.01214599609375,
-0.034881591796875,
-0.0209503173828125,
-0.033233642578125,
-0.036529541015625,
-0.06390380859375,
0.019989013671875,
-0.0046844482421875,
0.00930023193359375,
0.0074462890625,
0.09356689453125,
0.06390380859375,
0.031646728515625,
-0.04144287109375,
-0.0011739730834960938,
0.01470184326171875,
0.0118255615234375,
0.023468017578125,
0.02581787109375,
0.008941650390625,
-0.0296630859375,
0.0167236328125,
-0.057159423828125,
-0.030181884765625,
0.01219940185546875,
0.0697021484375,
0.0294647216796875,
-0.011749267578125,
0.0181427001953125,
-0.006786346435546875,
-0.021087646484375,
0.023773193359375,
0.00505828857421875,
-0.031402587890625,
-0.01068115234375,
0.0011720657348632812,
0.01898193359375,
0.0011739730834960938,
-0.032135009765625,
0.02301025390625,
-0.0199432373046875,
0.030059814453125,
0.0340576171875,
-0.0182647705078125,
0.01300048828125,
0.0013532638549804688,
-0.0027179718017578125,
-0.03704833984375,
-0.0189208984375,
-0.030181884765625,
0.013580322265625,
-0.0279083251953125,
0.00789642333984375,
0.024383544921875,
-0.00826263427734375,
0.011688232421875,
-0.006893157958984375,
-0.01666259765625,
0.0020694732666015625,
0.007381439208984375,
0.047332763671875,
0.01114654541015625,
-0.05517578125,
0.00799560546875,
-0.0399169921875,
-0.001079559326171875,
0.01511383056640625,
0.0048065185546875,
-0.024749755859375,
-0.0186614990234375,
0.031646728515625,
0.01490020751953125,
0.0016660690307617188,
-0.039825439453125,
-0.0300445556640625,
0.0219268798828125,
0.042572021484375,
0.018310546875,
-0.0180511474609375,
0.0253753662109375,
-0.006969451904296875,
0.0234527587890625,
-0.0192108154296875,
-0.0036182403564453125,
-0.01117706298828125,
-0.00424957275390625,
0.01500701904296875,
-0.046356201171875,
-0.0263214111328125,
-0.0187530517578125,
-0.00914764404296875,
0.01520538330078125,
0.032958984375,
-0.008087158203125,
-0.00626373291015625,
0.003955841064453125,
0.01617431640625,
-0.00930023193359375,
-0.004489898681640625,
0.0438232421875,
-0.0003204345703125,
0.056976318359375,
0.03350830078125,
0.0306396484375,
-0.036529541015625,
-0.0270538330078125,
0.00012373924255371094,
0.0277252197265625,
0.006099700927734375,
-0.0226287841796875,
-0.037017822265625,
0.039215087890625,
0.08770751953125,
0.0228271484375,
0.056671142578125,
0.03765869140625,
0.0074462890625,
0.008056640625,
0.022430419921875,
-0.0191192626953125,
-0.03863525390625,
0.029388427734375,
0.00460052490234375,
-0.0159454345703125,
0.026763916015625,
-0.025543212890625,
-0.01081085205078125,
0.08447265625,
0.07391357421875,
-0.10101318359375,
0.0012874603271484375,
0.04180908203125,
-0.014007568359375,
-0.0303955078125,
-0.01296234130859375,
-0.0107421875,
-0.0177154541015625,
-0.004344940185546875,
0.004268646240234375,
-0.017333984375,
-0.0097198486328125,
0.026885986328125,
-0.01216888427734375,
-0.0203704833984375,
0.04815673828125,
-0.00846099853515625,
-0.041534423828125,
-0.01019287109375,
0.00875091552734375,
-0.017059326171875,
0.0022945404052734375,
0.0019664764404296875,
-0.01503753662109375,
-0.029296875,
-0.03521728515625,
-0.032012939453125,
-0.021759033203125,
0.0031280517578125,
0.0161590576171875,
0.01611328125,
0.0232391357421875,
0.06842041015625,
-0.003978729248046875,
0.00809478759765625,
0.037872314453125,
0.0027313232421875,
0.017486572265625,
-0.0369873046875,
-0.00750732421875,
0.002593994140625,
-0.041473388671875,
0.0078887939453125,
-0.00899505615234375,
-0.01070404052734375,
0.0046539306640625,
-0.0033111572265625,
0.05035400390625,
-0.0270538330078125,
-0.0080413818359375,
0.04669189453125,
0.00450897216796875,
-0.0218658447265625,
-0.004756927490234375,
0.053436279296875,
-0.037109375,
-0.018402099609375,
0.016571044921875,
-0.029327392578125,
-0.022491455078125,
-0.0201416015625,
-0.032012939453125,
0.05694580078125,
-0.01078033447265625,
0.0007472038269042969,
0.034332275390625,
0.025665283203125,
-0.044830322265625,
0.010284423828125,
0.00687408447265625,
0.044708251953125,
0.035186767578125,
-0.003936767578125,
-0.0199432373046875,
-0.0205841064453125,
-0.0022869110107421875,
0.068603515625,
0.06512451171875,
0.0196685791015625,
-0.05706787109375,
0.0217742919921875,
0.06964111328125,
0.0255889892578125,
0.0043487548828125,
0.05816650390625,
0.0033740997314453125,
0.0106658935546875,
0.0338134765625,
-0.01464080810546875,
0.026092529296875,
-0.01494598388671875,
-0.01265716552734375,
0.010894775390625,
0.01537322998046875,
0.0030345916748046875,
0.0170745849609375,
-0.01224517822265625,
-0.0687255859375,
0.0294036865234375,
0.04095458984375,
0.00026416778564453125,
0.0034942626953125,
-0.00940704345703125,
-0.057098388671875,
-0.0186614990234375,
0.03558349609375,
-0.03594970703125,
0.0207366943359375,
-0.0535888671875,
-0.040557861328125,
-0.016326904296875,
0.0011043548583984375,
-0.00608062744140625,
-0.006877899169921875,
-0.0286102294921875,
0.04547119140625,
-0.010406494140625,
0.0310821533203125,
0.019805908203125,
0.0357666015625,
-0.01262664794921875,
0.035797119140625,
0.01316070556640625,
0.04010009765625,
-0.035186767578125,
-0.055816650390625,
-0.01087188720703125,
0.0153961181640625,
0.034881591796875,
0.01334381103515625,
0.025848388671875,
0.008331298828125,
0.0428466796875,
-0.01070404052734375,
0.0164337158203125,
0.06268310546875,
-0.0220794677734375,
0.0237274169921875,
0.06085205078125,
-0.06195068359375,
0.046295166015625,
-0.0251312255859375,
-0.0268096923828125,
0.0129547119140625,
0.0689697265625,
0.027435302734375,
0.036376953125,
-0.005950927734375,
-0.03179931640625,
0.006591796875,
0.009979248046875,
-0.02001953125,
-0.007419586181640625,
-0.02069091796875,
-0.046142578125,
0.0288238525390625,
0.03839111328125,
0.022186279296875,
0.0177459716796875,
0.0179443359375,
0.02484130859375,
0.0184478759765625,
-0.0033473968505859375,
0.0196380615234375,
-0.01374053955078125,
-0.0151519775390625,
-0.0189361572265625,
-0.032684326171875,
0.0025081634521484375,
-0.016021728515625,
-0.0104827880859375,
-0.00333404541015625,
0.0281829833984375,
0.035919189453125,
0.0211639404296875,
0.00525665283203125,
-0.024810791015625,
0.00405120849609375,
0.0020923614501953125,
0.045623779296875,
0.045684814453125,
-0.06298828125,
-0.01116180419921875,
0.017120361328125,
-0.058441162109375,
0.026031494140625,
0.035552978515625,
-0.040924072265625,
0.01284027099609375,
-0.01861572265625,
-0.03021240234375,
0.04498291015625,
0.01397705078125,
-0.0164031982421875,
-0.0027866363525390625,
0.0105438232421875,
-0.040374755859375,
-0.0205535888671875,
-0.0014772415161132812,
-0.0034885406494140625,
0.0159454345703125,
0.01751708984375,
0.07354736328125,
-0.018707275390625,
0.01861572265625,
-0.0240325927734375,
-0.041229248046875,
0.0115814208984375,
0.01096343994140625,
-0.032989501953125,
0.02569580078125,
-0.0266876220703125,
-0.01250457763671875,
-0.0718994140625,
0.0175018310546875,
0.0267791748046875,
-0.0233917236328125,
0.01169586181640625,
0.0230255126953125,
0.0130615234375,
-0.024383544921875,
-0.002002716064453125,
-0.039642333984375,
-0.08453369140625,
-0.053131103515625,
0.04473876953125,
-0.007724761962890625,
0.01213836669921875,
-0.034271240234375,
0.0209197998046875,
-0.0164031982421875,
-0.01030731201171875,
0.007709503173828125,
-0.0290069580078125,
-0.03253173828125,
0.0194854736328125,
-0.033935546875,
0.0038814544677734375,
0.0020999908447265625,
-0.0079803466796875,
0.0280303955078125,
-0.0062255859375,
0.0217742919921875,
-0.0262908935546875,
0.03253173828125,
-0.043975830078125,
0.007904052734375,
-0.01155853271484375,
-0.01434326171875,
0.00971221923828125,
0.01849365234375,
-0.0310516357421875,
-0.03619384765625,
-0.008544921875,
-0.014617919921875,
-0.00266265869140625,
-0.031982421875,
0.01029205322265625,
-0.0210723876953125,
-0.05718994140625,
-0.05975341796875,
0.00801849365234375,
0.00933074951171875,
-0.01910400390625,
0.0036106109619140625,
0.004955291748046875,
-0.0595703125,
0.030517578125,
-0.035919189453125,
0.038787841796875,
0.00952911376953125,
0.0165557861328125,
-0.0645751953125,
-0.02294921875,
-0.00865936279296875,
0.0252838134765625,
-0.037628173828125,
-0.01288604736328125,
0.0325927734375,
-0.00716400146484375,
-0.029083251953125,
-0.0489501953125,
-0.02398681640625,
-0.0047149658203125,
-0.0131378173828125,
0.01959228515625,
0.0196990966796875,
0.01261138916015625,
-0.081787109375,
-0.0662841796875,
0.0307464599609375,
-0.04248046875,
-0.0173797607421875,
0.0025043487548828125,
0.011566162109375,
0.0166168212890625,
-0.040130615234375,
-0.0936279296875,
0.0285186767578125,
-0.01538848876953125,
-0.036468505859375,
-0.076171875,
0.01525115966796875,
-0.0026226043701171875,
0.042724609375,
-0.01261138916015625,
-0.024871826171875,
-0.024169921875,
0.020294189453125,
0.0021457672119140625,
0.03533935546875,
-0.037445068359375,
0.0232391357421875,
0.005462646484375,
0.0498046875,
0.051544189453125,
-0.019500732421875,
0.01561737060546875,
-0.0016851425170898438,
0.02850341796875,
0.07098388671875,
-0.0084075927734375,
-0.023284912109375,
-0.011993408203125,
-0.046630859375,
-0.0135498046875,
-0.01336669921875,
0.00632476806640625,
-0.03564453125,
-0.02154541015625,
0.03253173828125,
-0.0087890625,
0.0174102783203125,
-0.08966064453125,
-0.056304931640625,
0.0175323486328125,
-0.01617431640625,
0.0188140869140625,
-0.08837890625,
0.006824493408203125,
0.02349853515625,
-0.00867462158203125,
-0.0162811279296875,
-0.0005640983581542969,
-0.037811279296875,
0.00670623779296875,
0.00281524658203125,
-0.01959228515625,
-0.0010061264038085938,
0.00024890899658203125,
0.07476806640625,
-0.0452880859375,
0.00811004638671875,
-0.007717132568359375,
0.02508544921875,
0.0162353515625,
-0.0333251953125,
0.00635528564453125,
0.04010009765625,
-0.036468505859375,
-0.0011091232299804688,
0.014617919921875,
-0.011444091796875,
-0.03326416015625,
-0.005313873291015625,
0.0038013458251953125,
0.025115966796875,
-0.0109100341796875,
0.006805419921875,
-0.00643157958984375,
0.0208892822265625,
-0.0141448974609375,
0.07537841796875,
-0.005901336669921875,
0.036285400390625,
-0.0094757080078125,
0.058349609375,
-0.01898193359375,
-0.01409149169921875,
-0.010009765625,
-0.0245819091796875,
0.027435302734375,
0.038970947265625,
0.014495849609375,
0.026824951171875,
-0.00341033935546875,
-0.0487060546875,
0.0026149749755859375,
-0.005207061767578125
]
|
e94d6b4480b66831e093af1f475cb5c3655f6f21 | Wordpress Stackexchange
Q: How to HTML5 FormData Ajax How do I use FormData in wordpress ajax ? I am appending files and strings to formdata.
var formdata = new FormData();
formdata.append('name', 'This is Name')
$.ajax({
url: 'admin-ajax.php',
type: 'POST',
data: {'action':'plugin_save', 'data':formdata},
contentType:false,
processData:false,
success: success,
error: error
});
// php
sends 0 ?
A: The action should be part of the data object:
var formdata = new FormData();
formdata.append('name', 'This is Name');
formdata.append('action', 'plugin_save');
$.ajax({
url: 'admin-ajax.php',
type: 'POST',
data: formdata,
contentType:false,
processData:false,
success: success,
error: error
});
| Q: How to HTML5 FormData Ajax How do I use FormData in wordpress ajax ? I am appending files and strings to formdata.
var formdata = new FormData();
formdata.append('name', 'This is Name')
$.ajax({
url: 'admin-ajax.php',
type: 'POST',
data: {'action':'plugin_save', 'data':formdata},
contentType:false,
processData:false,
success: success,
error: error
});
// php
sends 0 ?
A: The action should be part of the data object:
var formdata = new FormData();
formdata.append('name', 'This is Name');
formdata.append('action', 'plugin_save');
$.ajax({
url: 'admin-ajax.php',
type: 'POST',
data: formdata,
contentType:false,
processData:false,
success: success,
error: error
});
| wordpress | {
"language": "en",
"length": 87,
"provenance": "stackexchange_00019.jsonl.gz:451019",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/170307"
} | [
0.04498291015625,
0.0150299072265625,
-0.06842041015625,
-0.068359375,
0.045074462890625,
-0.037689208984375,
0.014801025390625,
0.0258941650390625,
0.02880859375,
0.00007766485214233398,
-0.04095458984375,
-0.01131439208984375,
-0.0005993843078613281,
-0.01532745361328125,
-0.00585174560546875,
-0.0313720703125,
0.0418701171875,
-0.00946807861328125,
0.0296173095703125,
0.01030731201171875,
-0.0284576416015625,
0.03363037109375,
0.0340576171875,
-0.005496978759765625,
0.0007634162902832031,
0.05133056640625,
0.048553466796875,
0.006076812744140625,
-0.0250701904296875,
-0.0224761962890625,
0.014251708984375,
-0.01800537109375,
0.0031871795654296875,
0.049896240234375,
-0.056610107421875,
0.00368499755859375,
0.0303802490234375,
0.0133819580078125,
0.01885986328125,
0.03497314453125,
0.04779052734375,
-0.03936767578125,
0.033905029296875,
-0.0057830810546875,
0.04486083984375,
-0.04473876953125,
0.07940673828125,
-0.0731201171875,
-0.005306243896484375,
0.048492431640625,
0.0265655517578125,
-0.00478363037109375,
0.0222320556640625,
-0.0249786376953125,
0.00862884521484375,
-0.00330352783203125,
-0.0280303955078125,
0.0164337158203125,
0.0552978515625,
0.0300140380859375,
-0.0291748046875,
-0.0406494140625,
0.0128326416015625,
-0.05523681640625,
0.02508544921875,
-0.0009555816650390625,
0.00760650634765625,
0.017303466796875,
-0.006694793701171875,
0.0277557373046875,
0.0168609619140625,
-0.0292205810546875,
0.006832122802734375,
0.0034999847412109375,
-0.00974273681640625,
-0.0204010009765625,
0.024322509765625,
0.005405426025390625,
-0.005970001220703125,
0.00925445556640625,
-0.004428863525390625,
-0.0111846923828125,
-0.006122589111328125,
-0.031219482421875,
0.00044727325439453125,
-0.0153350830078125,
-0.01861572265625,
0.0023403167724609375,
-0.0174407958984375,
-0.0341796875,
-0.0217132568359375,
-0.06256103515625,
-0.0265960693359375,
0.0266265869140625,
-0.01629638671875,
-0.007709503173828125,
-0.0125274658203125,
-0.0367431640625,
0.03143310546875,
0.013641357421875,
0.0110931396484375,
-0.04608154296875,
0.031982421875,
-0.005916595458984375,
0.0102996826171875,
0.024932861328125,
-0.004955291748046875,
-0.005764007568359375,
0.0088043212890625,
0.011810302734375,
-0.036651611328125,
-0.01268768310546875,
0.004863739013671875,
-0.01396942138671875,
0.00318145751953125,
0.005489349365234375,
-0.01282501220703125,
0.033111572265625,
0.005405426025390625,
0.0074005126953125,
-0.0198516845703125,
-0.0081024169921875,
-0.031707763671875,
0.0291900634765625,
0.00426483154296875,
-0.00701141357421875,
0.00788116455078125,
0.022247314453125,
-0.055206298828125,
0.03924560546875,
-0.01232147216796875,
0.042144775390625,
0.05560302734375,
0.0029735565185546875,
-0.0224609375,
-0.0247955322265625,
0.034393310546875,
-0.022125244140625,
-0.00942230224609375,
0.0150604248046875,
0.000007152557373046875,
-0.024200439453125,
-0.01282501220703125,
-0.0165557861328125,
-0.0197296142578125,
-0.01110076904296875,
0.0164642333984375,
0.0311279296875,
-0.00807952880859375,
-0.0265655517578125,
0.0010328292846679688,
-0.0014247894287109375,
0.0126953125,
0.03515625,
-0.00014662742614746094,
0.03338623046875,
0.04522705078125,
-0.0218048095703125,
-0.03765869140625,
-0.0251922607421875,
0.00623321533203125,
0.00171661376953125,
0.0290069580078125,
-0.0193328857421875,
-0.0325927734375,
-0.00902557373046875,
-0.05517578125,
-0.01202392578125,
0.02923583984375,
0.01229095458984375,
0.0253448486328125,
-0.0235748291015625,
0.0169525146484375,
-0.0027904510498046875,
-0.0214691162109375,
0.01319122314453125,
0.003185272216796875,
-0.015045166015625,
0.045562744140625,
0.0191802978515625,
-0.01904296875,
-0.0186309814453125,
0.06781005859375,
-0.0207672119140625,
-0.054718017578125,
0.04473876953125,
0.01531219482421875,
0.053985595703125,
-0.006450653076171875,
-0.00963592529296875,
0.055816650390625,
0.037384033203125,
0.01497650146484375,
0.0224456787109375,
-0.00948333740234375,
-0.02978515625,
-0.062408447265625,
-0.0091094970703125,
-0.040069580078125,
0.002445220947265625,
0.0282440185546875,
0.0199737548828125,
-0.03173828125,
-0.0162811279296875,
-0.060302734375,
-0.01152801513671875,
-0.00881195068359375,
0.0401611328125,
-0.02313232421875,
-0.0169525146484375,
0.04541015625,
0.0239715576171875,
-0.0521240234375,
-0.0035495758056640625,
-0.023681640625,
0.015625,
-0.0226898193359375,
0.038543701171875,
-0.004558563232421875,
0.06182861328125,
-0.01678466796875,
-0.02899169921875,
-0.0142669677734375,
-0.016571044921875,
0.0037899017333984375,
-0.006122589111328125,
-0.0294342041015625,
-0.0153350830078125,
-0.00457763671875,
-0.01371002197265625,
0.01708984375,
0.0433349609375,
-0.009063720703125,
0.01050567626953125,
-0.01451873779296875,
-0.046966552734375,
-0.047119140625,
-0.09710693359375,
0.0307464599609375,
0.07269287109375,
0.023284912109375,
0.0109100341796875,
0.00745391845703125,
0.041351318359375,
0.0243682861328125,
-0.0039215087890625,
0.0325927734375,
0.006938934326171875,
0.041259765625,
0.05474853515625,
-0.01276397705078125,
-0.05145263671875,
0.020965576171875,
-0.0751953125,
0.002094268798828125,
0.031768798828125,
-0.023223876953125,
0.007472991943359375,
-0.033294677734375,
-0.0009503364562988281,
0.002040863037109375,
-0.01209259033203125,
-0.0189971923828125,
-0.0191802978515625,
0.0214691162109375,
0.0188446044921875,
0.043914794921875,
0.052398681640625,
-0.0181732177734375,
-0.0019130706787109375,
-0.006561279296875,
-0.0160369873046875,
0.0074920654296875,
0.054046630859375,
-0.00829315185546875,
0.03570556640625,
-0.016845703125,
-0.0274658203125,
0.0340576171875,
0.051788330078125,
-0.0263214111328125,
-0.0227813720703125,
0.00276947021484375,
-0.0132904052734375,
0.0294647216796875,
0.0274505615234375,
0.028594970703125,
-0.04376220703125,
0.0213470458984375,
0.0107269287109375,
0.04937744140625,
0.0099945068359375,
-0.00067901611328125,
0.010528564453125,
0.007793426513671875,
-0.02386474609375,
0.01198577880859375,
0.0128326416015625,
0.0063629150390625,
-0.032073974609375,
0.01251983642578125,
0.0263824462890625,
-0.0189208984375,
-0.009735107421875,
-0.0157928466796875,
-0.01171112060546875,
-0.01328277587890625,
0.0018463134765625,
-0.0211181640625,
-0.043670654296875,
-0.007305145263671875,
0.038482666015625,
0.0411376953125,
0.057098388671875,
0.0143585205078125,
-0.0462646484375,
-0.0008158683776855469,
0.05828857421875,
-0.083984375,
-0.08770751953125,
-0.030731201171875,
-0.08880615234375,
0.0271148681640625,
0.0114898681640625,
-0.042236328125,
-0.00458526611328125,
0.06268310546875,
0.029388427734375,
-0.01067352294921875,
0.0035686492919921875,
-0.0212249755859375,
-0.01256561279296875,
-0.016082763671875,
-0.0094451904296875,
-0.0196380615234375,
-0.01103973388671875,
0.003032684326171875,
0.0090179443359375,
0.0006957054138183594,
-0.0318603515625,
-0.005401611328125,
0.047210693359375,
-0.00678253173828125,
-0.0212554931640625,
0.0231475830078125,
-0.053131103515625,
-0.0019664764404296875,
-0.0038356781005859375,
0.068359375,
0.021820068359375,
-0.020721435546875,
0.006988525390625,
-0.019134521484375,
-0.034820556640625,
0.01568603515625,
0.04290771484375,
-0.0027713775634765625,
-0.0210418701171875,
0.0655517578125,
-0.05218505859375,
0.0069580078125,
0.0264129638671875,
-0.0169830322265625,
-0.0699462890625,
0.0212860107421875,
-0.05010986328125,
-0.0204620361328125,
-0.0181121826171875,
-0.0088043212890625,
-0.0245361328125,
0.0088043212890625,
-0.033935546875,
0.0253448486328125,
0.0006923675537109375,
0.0053253173828125,
-0.00862884521484375,
0.01678466796875,
-0.02862548828125,
-0.005084991455078125,
-0.001987457275390625,
-0.00318145751953125,
0.022247314453125,
-0.0246429443359375,
0.01885986328125,
-0.07769775390625,
0.031494140625,
-0.031402587890625,
-0.007701873779296875,
-0.0163421630859375,
-0.0175323486328125,
0.0249481201171875,
0.0716552734375,
-0.00478363037109375,
-0.013641357421875,
-0.021514892578125,
0.00311279296875,
-0.06707763671875,
-0.052337646484375,
-0.035980224609375,
0.01219940185546875,
-0.0184478759765625,
0.01800537109375,
0.00662994384765625,
-0.006011962890625,
0.0245513916015625,
-0.0133056640625,
0.0230865478515625,
-0.0221710205078125,
0.0133056640625,
-0.0560302734375,
0.03253173828125,
-0.03387451171875,
0.0167694091796875,
-0.05364990234375,
0.00881195068359375,
-0.060394287109375,
-0.0282440185546875,
-0.004940032958984375,
-0.031951904296875,
0.028350830078125,
0.0255126953125,
-0.0283355712890625,
-0.00714874267578125,
0.02020263671875,
0.02838134765625,
0.01548004150390625,
0.014129638671875,
-0.02197265625,
0.0091705322265625,
-0.02020263671875,
0.0157623291015625,
-0.03875732421875,
-0.011505126953125,
-0.0238189697265625,
0.0030994415283203125,
0.003864288330078125,
-0.03619384765625,
-0.06689453125,
-0.0246124267578125,
-0.00853729248046875,
-0.033538818359375,
-0.0095977783203125,
-0.04718017578125,
0.005207061767578125,
-0.03466796875,
-0.004131317138671875,
0.0046539306640625,
-0.0673828125,
0.037200927734375,
-0.004817962646484375,
-0.01154327392578125,
0.017578125,
0.055389404296875,
-0.00302886962890625,
-0.006191253662109375,
-0.06243896484375,
0.01434326171875,
0.05615234375,
-0.013153076171875,
0.03436279296875,
0.01123809814453125,
-0.06219482421875,
0.11895751953125,
0.0277099609375,
0.05145263671875,
-0.025299072265625,
0.0120086669921875,
0.0172576904296875,
-0.01209259033203125,
0.0210418701171875,
0.05718994140625,
-0.07989501953125,
-0.03857421875,
-0.03851318359375,
0.034210205078125,
-0.01078033447265625,
0.01027679443359375,
-0.0246429443359375,
0.043365478515625,
-0.0130615234375,
-0.024627685546875,
0.01209259033203125,
-0.08465576171875,
0.07086181640625,
0.0294189453125,
-0.00775146484375,
0.0235443115234375,
0.035430908203125,
-0.0215911865234375,
0.0230255126953125,
-0.0122222900390625,
0.0050506591796875,
0.0017185211181640625,
0.0218963623046875,
-0.02349853515625,
0.01317596435546875,
0.00440216064453125,
-0.02685546875,
-0.00891876220703125,
-0.039764404296875,
-0.015716552734375,
0.006206512451171875,
-0.0019006729125976562,
0.0087890625,
0.0443115234375,
0.0223541259765625,
0.02154541015625,
0.0227203369140625,
-0.005413055419921875,
0.0168609619140625,
0.034759521484375,
-0.0212249755859375,
0.051177978515625,
0.01509857177734375,
-0.0058135986328125,
-0.011260986328125,
0.036590576171875,
0.027679443359375,
-0.004390716552734375,
-0.01629638671875,
0.05694580078125,
-0.00397491455078125,
0.05438232421875,
0.0276031494140625,
-0.029083251953125,
0.030181884765625,
-0.005279541015625,
-0.05487060546875,
-0.02081298828125,
0.017730712890625,
0.0009379386901855469,
-0.0036563873291015625,
0.0004935264587402344,
-0.0240020751953125,
0.03375244140625,
-0.00785064697265625,
0.0023288726806640625,
-0.0069427490234375,
-0.00885772705078125,
-0.01233673095703125,
-0.0028324127197265625,
0.022308349609375,
0.031829833984375,
-0.0023212432861328125,
0.0167388916015625,
0.01513671875,
0.041229248046875,
0.062103271484375,
-0.006488800048828125,
0.0311126708984375,
-0.0004642009735107422,
-0.00893402099609375,
0.051605224609375,
-0.007335662841796875,
-0.04425048828125,
-0.06439208984375,
-0.0233001708984375,
0.0023593902587890625,
0.0224609375,
0.03338623046875,
-0.046478271484375,
0.0418701171875,
-0.0689697265625,
0.05242919921875,
-0.0606689453125,
0.01432037353515625,
0.02130126953125,
0.03375244140625,
-0.00004851818084716797,
-0.0202484130859375,
-0.032989501953125,
-0.034881591796875,
0.0006928443908691406,
0.006511688232421875,
-0.024993896484375,
0.007190704345703125,
-0.0010061264038085938,
0.002437591552734375,
-0.0111083984375,
0.0246429443359375,
0.0200958251953125,
0.0234832763671875,
-0.019378662109375,
0.00521087646484375,
0.005489349365234375,
0.0894775390625,
-0.048828125,
0.055328369140625,
-0.002208709716796875,
0.01435089111328125,
-0.06927490234375,
0.00472259521484375,
-0.0073394775390625,
-0.03411865234375,
-0.01355743408203125,
0.006366729736328125,
-0.0222625732421875,
0.01050567626953125,
0.047393798828125,
-0.0030364990234375,
0.014862060546875,
0.00829315185546875,
-0.007122039794921875,
-0.0082550048828125,
0.025848388671875,
0.0205535888671875,
0.01702880859375,
0.0228729248046875,
0.0016345977783203125,
-0.016448974609375,
-0.016876220703125,
-0.06280517578125,
0.04620361328125,
0.037200927734375,
0.01258087158203125,
-0.01494598388671875,
-0.00479888916015625,
0.007205963134765625,
0.064208984375,
0.003765106201171875,
0.053741455078125,
0.05023193359375,
0.023834228515625,
0.0234222412109375,
0.037139892578125,
-0.0191192626953125,
-0.015625,
0.072998046875,
0.0233154296875,
-0.020355224609375,
0.0472412109375,
-0.039886474609375,
0.027435302734375,
0.049285888671875,
0.07904052734375,
-0.08563232421875,
0.03570556640625,
0.01209259033203125,
-0.0012903213500976562,
0.046417236328125,
-0.0171661376953125,
0.014892578125,
0.01403045654296875,
0.005764007568359375,
0.039794921875,
-0.0279388427734375,
0.0098876953125,
0.0240325927734375,
-0.01220703125,
0.01186370849609375,
0.02203369140625,
0.00028443336486816406,
0.0030517578125,
-0.03265380859375,
0.0012273788452148438,
-0.0034961700439453125,
-0.006267547607421875,
0.0260467529296875,
0.0014810562133789062,
-0.020263671875,
-0.042083740234375,
0.004970550537109375,
0.008453369140625,
-0.04168701171875,
-0.028350830078125,
-0.0025501251220703125,
0.082763671875,
0.057647705078125,
0.007427215576171875,
-0.049652099609375,
0.035247802734375,
0.0460205078125,
-0.013397216796875,
-0.036285400390625,
-0.0068359375,
0.024322509765625,
-0.06964111328125,
0.0205841064453125,
-0.0195465087890625,
0.0235443115234375,
0.0075836181640625,
0.0128936767578125,
0.01377105712890625,
-0.002193450927734375,
-0.033782958984375,
0.0111846923828125,
-0.016693115234375,
0.005859375,
-0.03460693359375,
-0.01910400390625,
-0.0173492431640625,
0.0155792236328125,
-0.0316162109375,
-0.031951904296875,
0.00424957275390625,
-0.056732177734375,
-0.060791015625,
0.12054443359375,
0.03826904296875,
0.007598876953125,
-0.0017213821411132812,
0.059051513671875,
-0.041839599609375,
0.0306243896484375,
-0.0438232421875,
0.03955078125,
0.015716552734375,
0.0203399658203125,
-0.034515380859375,
0.0109405517578125,
-0.00894927978515625,
-0.006832122802734375,
0.02215576171875,
-0.00470733642578125,
0.002056121826171875,
0.0032901763916015625,
0.04290771484375,
0.0265350341796875,
-0.010406494140625,
0.00794219970703125,
0.00981903076171875,
-0.0010137557983398438,
0.06842041015625,
0.002529144287109375,
0.03216552734375,
0.0014638900756835938,
0.0113372802734375,
0.039642333984375,
-0.002124786376953125,
-0.025177001953125,
0.0019159317016601562,
0.00041031837463378906,
-0.03094482421875,
0.0020885467529296875,
-0.002696990966796875,
-0.01103973388671875,
-0.005992889404296875,
0.046661376953125,
0.036712646484375,
0.02569580078125,
0.01116943359375,
-0.0313720703125,
0.0443115234375,
0.028106689453125,
0.008392333984375,
0.0036773681640625,
-0.0011653900146484375,
0.03387451171875,
0.0123291015625,
-0.0074310302734375,
0.036163330078125,
0.00870513916015625,
0.060516357421875,
0.0006394386291503906,
0.01525115966796875,
-0.0860595703125,
-0.05206298828125,
0.032989501953125,
0.08721923828125,
-0.04150390625,
-0.052001953125,
-0.003978729248046875,
0.01383209228515625,
0.0328369140625,
0.0139617919921875,
0.056854248046875,
-0.01134490966796875,
0.0262298583984375,
-0.007450103759765625,
-0.0160369873046875,
0.0184478759765625,
0.023956298828125,
0.00334930419921875,
-0.0005626678466796875,
-0.0294342041015625,
-0.01079559326171875,
-0.041534423828125,
0.0006213188171386719,
0.0128631591796875,
0.049713134765625,
0.027435302734375,
0.0246124267578125,
-0.035797119140625,
-0.0276336669921875,
0.021484375,
0.01183319091796875,
-0.00658416748046875,
-0.0287628173828125,
0.032562255859375,
-0.0085906982421875,
-0.023193359375,
0.0036907196044921875,
0.0240478515625,
0.056884765625,
0.07110595703125,
0.0350341796875,
0.007801055908203125,
0.0033245086669921875,
-0.00914764404296875,
-0.0208587646484375,
-0.0156707763671875,
-0.01332855224609375,
0.03887939453125,
0.0287628173828125,
0.0189971923828125,
-0.00655364990234375,
0.05938720703125,
0.0141143798828125,
-0.052215576171875,
0.062225341796875,
-0.0185546875,
-0.0288238525390625,
0.059906005859375,
-0.049713134765625,
0.10101318359375,
-0.041778564453125,
-0.0924072265625,
-0.00646209716796875,
-0.0021915435791015625,
-0.0618896484375,
0.02874755859375,
0.046661376953125,
-0.04315185546875,
0.033599853515625,
-0.0249481201171875,
-0.02410888671875,
0.01271820068359375,
0.01543426513671875,
-0.00991058349609375,
0.033355712890625,
0.029998779296875,
-0.01398468017578125,
0.023895263671875,
0.03521728515625,
0.03118896484375,
0.002796173095703125,
0.006107330322265625,
0.03973388671875,
-0.004077911376953125,
-0.0018911361694335938,
-0.0055389404296875,
0.015899658203125,
-0.01256561279296875,
-0.0246124267578125,
0.0281524658203125,
0.01320648193359375,
0.008575439453125,
-0.0193939208984375,
-0.013519287109375,
0.0016069412231445312,
0.01451873779296875,
-0.0518798828125,
0.0017337799072265625,
-0.0113372802734375,
0.0124053955078125,
0.005462646484375,
0.0426025390625,
-0.032928466796875,
-0.054290771484375,
-0.0638427734375,
-0.006938934326171875,
0.0210723876953125,
0.0303192138671875,
-0.00128173828125,
0.01885986328125,
-0.007167816162109375,
-0.01465606689453125,
0.0199432373046875,
-0.04119873046875,
0.00919342041015625,
0.022796630859375,
0.004398345947265625,
-0.02935791015625,
0.00492095947265625,
-0.01468658447265625,
0.0208587646484375,
-0.0194244384765625,
0.039215087890625,
0.007526397705078125,
-0.06683349609375,
-0.031951904296875,
0.0204620361328125,
0.0081787109375,
-0.0228271484375,
0.005596160888671875,
0.01453399658203125,
-0.024139404296875,
-0.01393890380859375,
-0.00801849365234375,
-0.0168914794921875,
-0.036712646484375,
0.01611328125,
0.041534423828125,
-0.00920867919921875,
0.0017242431640625,
-0.06488037109375,
-0.005107879638671875,
0.01197052001953125,
-0.0230865478515625,
-0.0095977783203125,
-0.022705078125,
-0.0305023193359375,
0.040435791015625,
-0.019287109375,
0.0015497207641601562,
-0.012603759765625,
0.0279388427734375,
-0.0095062255859375,
-0.055206298828125,
-0.029876708984375,
0.054443359375,
-0.0197906494140625,
0.00684356689453125,
0.024688720703125,
-0.0195159912109375,
-0.0122222900390625,
0.0143585205078125,
0.03076171875,
0.05303955078125,
0.0199127197265625,
-0.0214385986328125,
0.010955810546875,
0.0270843505859375,
-0.0181121826171875,
-0.06414794921875,
-0.0021610260009765625,
-0.0341796875,
0.0083770751953125,
-0.0364990234375,
0.01267242431640625,
0.01407623291015625,
-0.04150390625,
-0.08843994140625,
0.04034423828125,
-0.01242828369140625,
-0.044769287109375,
0.024139404296875,
-0.031951904296875,
0.0028285980224609375,
-0.01262664794921875,
-0.00424957275390625,
-0.0196380615234375,
-0.031829833984375,
-0.0018711090087890625,
-0.012969970703125,
0.031341552734375,
0.006351470947265625,
-0.0040740966796875,
-0.029510498046875,
0.001125335693359375,
0.00177764892578125,
-0.01464080810546875,
0.00844573974609375,
-0.02178955078125,
0.06512451171875,
0.046539306640625,
-0.0021190643310546875,
0.04315185546875,
0.036407470703125,
-0.041290283203125,
0.005107879638671875,
-0.0220794677734375,
-0.02850341796875,
0.00403594970703125,
0.0200347900390625,
0.0618896484375,
0.0095367431640625,
-0.05218505859375,
0.004039764404296875,
-0.0284271240234375,
-0.0242156982421875,
-0.002376556396484375,
0.0038394927978515625,
-0.046966552734375,
0.024169921875,
0.0156707763671875,
0.004360198974609375,
-0.023956298828125,
0.0211944580078125,
-0.01457977294921875,
-0.01190185546875,
0.050262451171875,
-8.940696716308594e-7,
0.00658416748046875,
-0.00058746337890625,
0.06036376953125,
-0.02685546875,
0.027374267578125,
-0.0003516674041748047,
0.0157012939453125,
0.0570068359375,
0.036468505859375,
0.029541015625,
0.060882568359375,
-0.0567626953125,
-0.031951904296875,
0.0216522216796875,
0.003101348876953125,
-0.020538330078125,
-0.012847900390625,
-0.00873565673828125,
0.017486572265625,
-0.01502227783203125,
0.009429931640625,
0.02764892578125,
0.0182647705078125,
-0.0098876953125,
0.0260009765625,
-0.056610107421875,
-0.051727294921875,
-0.043609619140625,
0.0233154296875,
0.018646240234375,
0.015869140625,
0.09271240234375,
-0.0303497314453125,
0.01039886474609375,
0.01410675048828125,
0.01250457763671875,
-0.00492095947265625,
-0.0239105224609375,
-0.01079559326171875,
0.01459503173828125,
-0.003009796142578125
]
|
d0cf0be3bd6118e869471566173e9805f484c766 | Wordpress Stackexchange
Q: Change padding to text indent in "Increase indent" TinyMCE If you click "Increase indent" in the visual editor it adds the following code into the text editor:
<p style="padding-left:30px;">
How to change it to text-indent: 30px; not affecting the core files?
I searched in a lot of files and didn't found any piece of code that would be responsible for that.
Thanks.
A: You need to modify the TinyMCE settings object on instantiation:
Reference: TinyMCE documentation - content formatting
WordPress provides a filter for this very purpose called tiny_mce_before_init which you can use as follows:
function modify_tinymce_settings($settings) {
$settings['indentation'] = '10px';
return $settings;
}
add_filter('tiny_mce_before_init', 'modify_tinymce_settings');
If that does not work precisely, then dump the output of $settings in the hook above to see where values for indentation are held, they may be nested as part of a multi-dimensional array.
| Q: Change padding to text indent in "Increase indent" TinyMCE If you click "Increase indent" in the visual editor it adds the following code into the text editor:
<p style="padding-left:30px;">
How to change it to text-indent: 30px; not affecting the core files?
I searched in a lot of files and didn't found any piece of code that would be responsible for that.
Thanks.
A: You need to modify the TinyMCE settings object on instantiation:
Reference: TinyMCE documentation - content formatting
WordPress provides a filter for this very purpose called tiny_mce_before_init which you can use as follows:
function modify_tinymce_settings($settings) {
$settings['indentation'] = '10px';
return $settings;
}
add_filter('tiny_mce_before_init', 'modify_tinymce_settings');
If that does not work precisely, then dump the output of $settings in the hook above to see where values for indentation are held, they may be nested as part of a multi-dimensional array.
A: This might guide you in the right direction:
http://codex.wordpress.org/TinyMCE_Custom_Buttons
Specifically the part of adding your own buttons. Since there should be hooks you can probably get away with just modifying the filters tinymce already has.
Adding Custom CSS Styles to MCE Editor
A common use-case for custom TinyMCE plugins is the need for buttons
that generate custom styles used in a site's theme, beyond the default
HTML tags like Blockquote and Strong. This need is accounted for by
the built-in (but hidden in WordPress) 'styleselect' button in TinyMCE
and the ability to register custom formats that users can insert using
it.
See TinyMCE Custom Styles for information about adding a pulldown menu
with custom styles to TinyMCE.
Also see add_editor_style() which is used to register a custom CSS
file for TinyMCE that will make the Visual editor display post content
the way it will be shown on the frontend of the site.
| wordpress | {
"language": "en",
"length": 294,
"provenance": "stackexchange_00019.jsonl.gz:451050",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/170397"
} | [
-0.02239990234375,
-0.020538330078125,
-0.031158447265625,
0.0286712646484375,
-0.0149688720703125,
-0.037200927734375,
0.027099609375,
0.00325775146484375,
0.004108428955078125,
0.0367431640625,
-0.03814697265625,
0.01326751708984375,
0.0228729248046875,
-0.00807952880859375,
0.0038280487060546875,
-0.007434844970703125,
0.044097900390625,
-0.0186767578125,
0.0136871337890625,
0.0003571510314941406,
-0.0115814208984375,
0.01067352294921875,
-0.003509521484375,
0.044158935546875,
-0.00958251953125,
-0.0213775634765625,
0.1456298828125,
-0.039154052734375,
0.0007314682006835938,
-0.061553955078125,
0.0190582275390625,
-0.00176239013671875,
0.0184783935546875,
0.06988525390625,
-0.0692138671875,
0.08074951171875,
-0.004764556884765625,
0.03619384765625,
0.02978515625,
0.00705718994140625,
0.036651611328125,
-0.013580322265625,
-0.0302886962890625,
-0.0002617835998535156,
-0.042724609375,
-0.007572174072265625,
0.016265869140625,
-0.01116943359375,
0.0240936279296875,
-0.051849365234375,
-0.00958251953125,
0.033905029296875,
0.01215362548828125,
-0.053985595703125,
-0.023040771484375,
-0.017059326171875,
-0.057952880859375,
0.037750244140625,
0.0140838623046875,
0.04559326171875,
0.022064208984375,
0.0113067626953125,
-0.01421356201171875,
-0.0227508544921875,
0.031585693359375,
-0.001033782958984375,
-0.00402069091796875,
0.0284423828125,
0.015960693359375,
0.0311279296875,
-0.0132598876953125,
-0.01372528076171875,
0.0092315673828125,
-0.039306640625,
0.008697509765625,
0.01629638671875,
-0.035736083984375,
-0.0240478515625,
0.019927978515625,
-0.002033233642578125,
0.05401611328125,
0.015869140625,
-0.0552978515625,
-0.027740478515625,
0.023712158203125,
-0.01387786865234375,
0.00534820556640625,
-0.0282440185546875,
-0.0079498291015625,
-0.005886077880859375,
-0.0153045654296875,
-0.0477294921875,
0.01010894775390625,
0.0305938720703125,
-0.01357269287109375,
-0.0179901123046875,
-0.026702880859375,
-0.042510986328125,
0.0189971923828125,
0.0070343017578125,
0.0208892822265625,
-0.0443115234375,
0.0265655517578125,
-0.00000864267349243164,
0.032196044921875,
-0.017669677734375,
-0.04193115234375,
-0.048553466796875,
0.08013916015625,
0.048797607421875,
-0.01026153564453125,
0.09649658203125,
-0.0106353759765625,
-0.01181793212890625,
-0.028472900390625,
0.0170745849609375,
-0.029754638671875,
0.002483367919921875,
-0.0012426376342773438,
0.0056610107421875,
0.00852203369140625,
0.0413818359375,
-0.027618408203125,
0.00644683837890625,
-0.028717041015625,
-0.034088134765625,
0.00014853477478027344,
-0.0208587646484375,
-0.00933837890625,
0.02587890625,
-0.038055419921875,
0.0135650634765625,
0.048583984375,
0.030303955078125,
0.0036067962646484375,
-0.02606201171875,
-0.0079345703125,
-0.022705078125,
-0.0224609375,
0.024322509765625,
-0.0188446044921875,
0.0179901123046875,
0.04632568359375,
-0.042022705078125,
-0.0126800537109375,
0.01532745361328125,
0.028533935546875,
0.0035839080810546875,
-0.028778076171875,
-0.0689697265625,
0.0531005859375,
-0.038909912109375,
0.039581298828125,
0.026397705078125,
-0.0701904296875,
0.0227203369140625,
0.00820159912109375,
-0.0048980712890625,
-0.05419921875,
-0.04730224609375,
0.046661376953125,
0.0080413818359375,
0.020477294921875,
-0.053466796875,
-0.04998779296875,
-0.042724609375,
-0.08331298828125,
-0.00768280029296875,
0.0200653076171875,
0.07281494140625,
-0.015716552734375,
0.030853271484375,
0.002323150634765625,
0.00506591796875,
-0.01367950439453125,
-0.007518768310546875,
-0.011474609375,
0.01436614990234375,
0.043365478515625,
-0.0018091201782226562,
-0.01172637939453125,
-0.03363037109375,
0.07977294921875,
-0.01221466064453125,
0.0024394989013671875,
0.0102386474609375,
-0.0118560791015625,
0.0060272216796875,
0.01319122314453125,
0.016754150390625,
-0.039581298828125,
0.0295257568359375,
-0.00988006591796875,
-0.003406524658203125,
-0.0118255615234375,
-0.0029754638671875,
0.005401611328125,
0.004779815673828125,
-0.01079559326171875,
-0.00746917724609375,
0.05023193359375,
0.01372528076171875,
-0.005584716796875,
-0.0099029541015625,
-0.0482177734375,
0.0074920654296875,
-0.0010585784912109375,
0.0265350341796875,
-0.0273284912109375,
-0.0237274169921875,
-0.002246856689453125,
-0.03515625,
0.015716552734375,
-0.044403076171875,
-0.01885986328125,
0.03863525390625,
0.02081298828125,
0.0235443115234375,
-0.0006213188171386719,
-0.031768798828125,
0.056549072265625,
-0.00923919677734375,
0.06103515625,
0.08538818359375,
-0.0167694091796875,
-0.047576904296875,
-0.01061248779296875,
-0.0236053466796875,
-0.023468017578125,
-0.0257110595703125,
0.0192718505859375,
0.045989990234375,
0.006626129150390625,
0.00722503662109375,
-0.017822265625,
-0.011566162109375,
-0.0029850006103515625,
-0.0975341796875,
0.0172576904296875,
0.055694580078125,
0.03570556640625,
0.04083251953125,
0.00634765625,
-0.01502227783203125,
0.063720703125,
-0.03253173828125,
0.00537109375,
-0.021270751953125,
0.0013494491577148438,
0.019195556640625,
0.00830078125,
-0.04815673828125,
0.03253173828125,
-0.08282470703125,
0.0072174072265625,
0.0258331298828125,
-0.01454925537109375,
0.0247650146484375,
0.01070404052734375,
0.006168365478515625,
-0.022979736328125,
0.01404571533203125,
0.0278167724609375,
-0.00970458984375,
-0.0190582275390625,
0.030059814453125,
0.0347900390625,
0.049346923828125,
-0.0102996826171875,
-0.0024051666259765625,
0.002460479736328125,
0.039764404296875,
0.0078125,
-0.0049896240234375,
-0.056976318359375,
0.0247955322265625,
-0.040374755859375,
0.03253173828125,
0.01081085205078125,
-0.01085662841796875,
-0.02618408203125,
0.0193939208984375,
-0.0044708251953125,
-0.01383209228515625,
0.0038585662841796875,
-0.0291748046875,
0.018798828125,
-0.0235137939453125,
-0.01412200927734375,
-0.03204345703125,
0.01468658447265625,
0.01280975341796875,
-0.017608642578125,
0.0091705322265625,
-0.0127105712890625,
-0.01441192626953125,
0.065673828125,
0.0002644062042236328,
0.032501220703125,
0.0109100341796875,
0.03607177734375,
0.042144775390625,
0.007083892822265625,
-0.0091094970703125,
0.0171051025390625,
0.0017843246459960938,
-0.006015777587890625,
0.01227569580078125,
0.0022678375244140625,
-0.003971099853515625,
-0.01290130615234375,
0.04949951171875,
0.0170745849609375,
0.025238037109375,
-0.007808685302734375,
-0.028900146484375,
-0.017120361328125,
0.0272979736328125,
-0.0229644775390625,
0.0017414093017578125,
-0.0033855438232421875,
-0.11224365234375,
-0.01522064208984375,
0.01934814453125,
-0.06903076171875,
-0.0092010498046875,
0.06201171875,
0.011077880859375,
0.011199951171875,
-0.016387939453125,
-0.025421142578125,
0.0036716461181640625,
-0.031402587890625,
-0.007144927978515625,
-0.0011758804321289062,
-0.0098419189453125,
0.00907135009765625,
0.033477783203125,
-0.0246124267578125,
-0.0204010009765625,
-0.00730133056640625,
-0.01129913330078125,
0.00637054443359375,
-0.00724029541015625,
0.007781982421875,
-0.050750732421875,
0.01531219482421875,
-0.01006317138671875,
0.007045745849609375,
0.0008149147033691406,
0.02923583984375,
-0.01039886474609375,
-0.051788330078125,
-0.0048370361328125,
-0.001750946044921875,
0.04156494140625,
0.039520263671875,
0.0250701904296875,
0.06475830078125,
-0.01305389404296875,
-0.05377197265625,
0.048492431640625,
-0.024871826171875,
0.0113677978515625,
-0.0220489501953125,
-0.01299285888671875,
0.021148681640625,
0.039886474609375,
0.00140380859375,
-0.00984954833984375,
0.06640625,
-0.04119873046875,
0.0300750732421875,
-0.0147705078125,
-0.031402587890625,
-0.042449951171875,
-0.004459381103515625,
-0.037872314453125,
0.058197021484375,
0.006603240966796875,
0.006275177001953125,
0.005970001220703125,
-0.01546478271484375,
0.00399017333984375,
0.0037899017333984375,
0.0014476776123046875,
-0.039093017578125,
0.046844482421875,
-0.016510009765625,
-0.004230499267578125,
-0.0298309326171875,
0.04559326171875,
-0.026214599609375,
-0.023406982421875,
0.0239715576171875,
0.01029205322265625,
-0.0018634796142578125,
-0.006473541259765625,
-0.0345458984375,
-0.0208892822265625,
-0.038482666015625,
0.0201263427734375,
0.0006213188171386719,
-0.0134735107421875,
-0.049224853515625,
0.0352783203125,
-0.04425048828125,
-0.007568359375,
0.009307861328125,
0.036773681640625,
-0.0261993408203125,
0.01163482666015625,
-0.024566650390625,
-0.00447845458984375,
0.01617431640625,
-0.017547607421875,
-0.06781005859375,
-0.0241241455078125,
-0.01003265380859375,
0.0723876953125,
0.0130615234375,
-0.0239715576171875,
-0.0017366409301757812,
0.057861328125,
0.0041046142578125,
-0.01480865478515625,
0.016143798828125,
0.014404296875,
-0.00910186767578125,
-0.0167694091796875,
-0.005435943603515625,
-0.04046630859375,
-0.00720977783203125,
0.01399993896484375,
-0.0484619140625,
0.006092071533203125,
0.000031828880310058594,
-0.03509521484375,
0.061553955078125,
-0.0439453125,
-0.08306884765625,
-0.0374755859375,
0.022216796875,
-0.0005354881286621094,
0.0109100341796875,
0.006160736083984375,
-0.035003662109375,
-0.058624267578125,
0.03082275390625,
0.0241851806640625,
-0.005977630615234375,
-0.00824737548828125,
0.05706787109375,
0.0164642333984375,
-0.035858154296875,
0.04534912109375,
0.02099609375,
0.053924560546875,
0.050567626953125,
-0.03460693359375,
-0.0190887451171875,
-0.06231689453125,
0.03631591796875,
0.03338623046875,
0.0059967041015625,
-0.0384521484375,
0.0648193359375,
-0.027740478515625,
0.0007433891296386719,
0.0015048980712890625,
-0.042144775390625,
0.0296173095703125,
0.007236480712890625,
0.003170013427734375,
0.006908416748046875,
0.009490966796875,
0.0223846435546875,
0.0304718017578125,
-0.039215087890625,
-0.0175018310546875,
-0.01262664794921875,
-0.0085906982421875,
0.01161956787109375,
0.0228118896484375,
0.0362548828125,
-0.0032787322998046875,
-0.004241943359375,
0.027130126953125,
-0.016021728515625,
0.0069122314453125,
-0.00909423828125,
-0.00031113624572753906,
0.03955078125,
-0.04052734375,
-0.0335693359375,
0.01629638671875,
-0.005558013916015625,
0.034698486328125,
0.04144287109375,
-0.026824951171875,
0.0008487701416015625,
0.00830078125,
0.01873779296875,
-0.038787841796875,
0.0130767822265625,
0.004241943359375,
-0.0247039794921875,
-0.0162200927734375,
0.01169586181640625,
0.0149688720703125,
-0.04913330078125,
-0.017364501953125,
0.01019287109375,
0.00402069091796875,
-0.03326416015625,
0.027252197265625,
-0.0079498291015625,
0.021728515625,
-0.00439453125,
-0.00975799560546875,
-0.009765625,
0.006877899169921875,
0.02740478515625,
0.0380859375,
-0.0152587890625,
-0.0401611328125,
0.04730224609375,
-0.0033664703369140625,
-0.0289459228515625,
0.00841522216796875,
0.01331329345703125,
0.045928955078125,
0.007110595703125,
-0.024169921875,
0.009002685546875,
-0.023162841796875,
0.00431060791015625,
-0.002513885498046875,
-0.0307159423828125,
-0.0335693359375,
0.0028896331787109375,
-0.0185699462890625,
-0.019256591796875,
-0.038360595703125,
-0.033721923828125,
-0.01531219482421875,
-0.097412109375,
0.00019073486328125,
0.000013530254364013672,
0.00249481201171875,
-0.01476287841796875,
-0.035552978515625,
0.005939483642578125,
-0.0018405914306640625,
-0.026123046875,
-0.063720703125,
-0.037109375,
-0.003032684326171875,
-0.0028324127197265625,
0.045135498046875,
-0.01263427734375,
0.0309600830078125,
-0.0389404296875,
0.007747650146484375,
-0.04779052734375,
0.0028896331787109375,
0.0170440673828125,
0.005218505859375,
-0.0263519287109375,
-0.0251312255859375,
-0.0285797119140625,
-0.0083465576171875,
-0.0277557373046875,
-0.0284271240234375,
-0.0147552490234375,
0.02008056640625,
0.044647216796875,
0.0072784423828125,
0.035247802734375,
-0.038970947265625,
-0.017059326171875,
0.0309600830078125,
0.041290283203125,
0.0379638671875,
-0.0022430419921875,
0.046875,
-0.01218414306640625,
0.05535888671875,
0.02032470703125,
0.01490020751953125,
-0.01425933837890625,
-0.03082275390625,
-0.00173187255859375,
-0.03192138671875,
0.007595062255859375,
-0.0036182403564453125,
0.043701171875,
-0.01433563232421875,
-0.0214691162109375,
0.000782012939453125,
0.02191162109375,
-0.018585205078125,
-0.011749267578125,
-0.0223388671875,
0.0261688232421875,
-0.04541015625,
0.031585693359375,
-0.0188751220703125,
0.01418304443359375,
0.06524658203125,
-0.015411376953125,
-0.0394287109375,
0.0350341796875,
-0.00901031494140625,
0.04705810546875,
-0.01143646240234375,
-0.026702880859375,
0.01313018798828125,
-0.012298583984375,
-0.0418701171875,
-0.0157012939453125,
-0.00594329833984375,
-0.004039764404296875,
0.009552001953125,
-0.0241241455078125,
0.038177490234375,
0.077392578125,
0.05072021484375,
-0.030487060546875,
-0.0231170654296875,
-0.0102386474609375,
-0.0457763671875,
0.0243072509765625,
0.061065673828125,
0.0806884765625,
-0.07177734375,
0.01300048828125,
0.024810791015625,
-0.0049285888671875,
0.059722900390625,
-0.00568389892578125,
-0.032867431640625,
-0.06634521484375,
0.11517333984375,
-0.050140380859375,
0.01233673095703125,
0.04522705078125,
-0.026580810546875,
-0.016937255859375,
-0.0487060546875,
0.046478271484375,
0.0194244384765625,
-0.0022716522216796875,
0.052520751953125,
-0.008209228515625,
0.051788330078125,
-0.030914306640625,
0.02392578125,
-0.03631591796875,
0.0027599334716796875,
-0.050262451171875,
-0.0162506103515625,
-0.019012451171875,
-0.0042572021484375,
-0.043304443359375,
-0.0282440185546875,
-0.0149078369140625,
0.03594970703125,
-0.05108642578125,
0.028350830078125,
0.00988006591796875,
0.0059814453125,
0.034912109375,
-0.0009589195251464844,
-0.0201568603515625,
0.0044097900390625,
-0.0235137939453125,
-0.007503509521484375,
-0.03546142578125,
0.04144287109375,
0.0062408447265625,
0.015655517578125,
0.0183563232421875,
-0.01140594482421875,
-0.012481689453125,
0.03387451171875,
0.0005407333374023438,
0.00740814208984375,
-0.040863037109375,
-0.0034942626953125,
-0.0703125,
-0.01409149169921875,
-0.0191192626953125,
-0.021331787109375,
0.03436279296875,
-0.0216064453125,
-0.0164947509765625,
0.06427001953125,
0.0008683204650878906,
-0.03350830078125,
0.0069732666015625,
0.046875,
-0.04742431640625,
0.0208892822265625,
0.0127716064453125,
-0.0025920867919921875,
-0.0026302337646484375,
-0.01461029052734375,
0.01715087890625,
-0.00966644287109375,
-0.003208160400390625,
0.046112060546875,
-0.0009660720825195312,
-0.00968170166015625,
-0.035736083984375,
-0.0110626220703125,
0.038665771484375,
0.0235748291015625,
-0.0038852691650390625,
0.03717041015625,
-0.0016012191772460938,
-0.0008754730224609375,
-0.0032062530517578125,
0.0027141571044921875,
0.0343017578125,
-0.020904541015625,
-0.058563232421875,
0.0260467529296875,
-0.0164337158203125,
-0.037139892578125,
0.0016908645629882812,
0.03424072265625,
-0.01465606689453125,
-0.01134490966796875,
0.0159149169921875,
-0.07806396484375,
-0.0220794677734375,
0.069580078125,
0.01153564453125,
-0.05841064453125,
-0.049285888671875,
-0.03253173828125,
0.0282135009765625,
-0.0215911865234375,
-0.00313568115234375,
0.0521240234375,
0.01080322265625,
0.01153564453125,
-0.0205078125,
0.00821685791015625,
-0.004016876220703125,
-0.009185791015625,
-0.0238037109375,
0.005413055419921875,
0.01442718505859375,
0.01202392578125,
0.03741455078125,
0.027801513671875,
-0.02130126953125,
-0.014739990234375,
-0.01242828369140625,
0.0163116455078125,
-0.0284881591796875,
-0.040802001953125,
-0.03314208984375,
-0.07122802734375,
0.027252197265625,
0.034393310546875,
-0.0212249755859375,
-0.030120849609375,
-0.0035724639892578125,
0.01470184326171875,
-0.01338958740234375,
-0.0172271728515625,
0.037506103515625,
-0.014251708984375,
0.005229949951171875,
-0.0294647216796875,
0.0302886962890625,
0.01605224609375,
0.01136016845703125,
0.0136871337890625,
0.0028667449951171875,
0.007549285888671875,
-0.01064300537109375,
-0.0264129638671875,
0.031768798828125,
-0.014251708984375,
0.024810791015625,
0.046234130859375,
-0.0048370361328125,
0.009796142578125,
-0.01824951171875,
0.00029659271240234375,
-0.00792694091796875,
0.0052490234375,
-0.01168060302734375,
-0.020965576171875,
0.0181121826171875,
-0.0189361572265625,
-0.0162200927734375,
-0.046295166015625,
-0.0037212371826171875,
0.051910400390625,
0.01306915283203125,
0.0262298583984375,
-0.0144500732421875,
0.0633544921875,
0.02447509765625,
-0.01255035400390625,
0.012542724609375,
-0.0233154296875,
-0.016204833984375,
-0.0411376953125,
-0.01282501220703125,
0.01531219482421875,
0.03570556640625,
0.007843017578125,
0.032135009765625,
-0.043121337890625,
-0.0302734375,
0.0382080078125,
0.0155029296875,
-0.00702667236328125,
0.0016260147094726562,
0.01158905029296875,
0.00240325927734375,
-0.051025390625,
0.055877685546875,
0.0158843994140625,
-0.01250457763671875,
0.041778564453125,
-0.02880859375,
-0.038482666015625,
-0.033599853515625,
0.078857421875,
0.00807952880859375,
0.01552581787109375,
-0.01509857177734375,
0.047210693359375,
-0.023284912109375,
0.02288818359375,
-0.01221466064453125,
-0.01953125,
0.01117706298828125,
0.0367431640625,
0.01088714599609375,
-0.021575927734375,
-0.0290069580078125,
0.06695556640625,
0.00908660888671875,
-0.0166168212890625,
0.034698486328125,
0.011322021484375,
-0.002429962158203125,
-0.0259552001953125,
-0.007236480712890625,
-0.006282806396484375,
-0.01000213623046875,
0.003307342529296875,
0.0034008026123046875,
0.0123748779296875,
0.00864410400390625,
-0.0266876220703125,
0.0261993408203125,
0.00876617431640625,
-0.0065765380859375,
0.0292510986328125,
0.0022945404052734375,
0.049346923828125,
0.021270751953125,
-0.032806396484375,
0.0038909912109375,
-0.016845703125,
-0.0159149169921875,
-0.0223236083984375,
0.02349853515625,
-0.0250701904296875,
-0.0007963180541992188,
-0.0244140625,
0.01419830322265625,
0.03826904296875,
0.04266357421875,
-0.0272064208984375,
0.021087646484375,
0.0232391357421875,
0.0024261474609375,
0.025543212890625,
-0.028839111328125,
-0.0255584716796875,
-0.02587890625,
-0.00878143310546875,
0.0340576171875,
-0.01192474365234375,
0.0031299591064453125,
-0.06640625,
-0.015869140625,
0.0005393028259277344,
0.0156097412109375,
-0.050872802734375,
0.03521728515625,
0.0087738037109375,
-0.01259613037109375,
-0.011383056640625,
0.03411865234375,
-0.0182952880859375,
-0.0028781890869140625,
-0.025909423828125,
-0.040802001953125,
-0.013031005859375,
0.07232666015625,
-0.017303466796875,
0.027587890625,
0.0579833984375,
-0.01934814453125,
0.019134521484375,
-0.01386260986328125,
0.0054931640625,
0.047607421875,
-0.068115234375,
0.0014400482177734375,
0.07318115234375,
-0.0155487060546875,
-0.0229644775390625,
-0.125,
-0.0308837890625,
-0.0762939453125,
0.07586669921875,
-0.052825927734375,
0.011322021484375,
-0.0018644332885742188,
-0.05908203125,
-0.06378173828125,
-0.03887939453125,
0.01143646240234375,
-0.035430908203125,
-0.059478759765625,
0.0377197265625,
-0.01226806640625,
0.00003403425216674805,
-0.0098114013671875,
0.0107269287109375,
0.0311737060546875,
0.03448486328125,
0.016448974609375,
0.041259765625,
-0.0006737709045410156,
0.03387451171875,
-0.0142822265625,
0.034271240234375,
0.00040984153747558594,
-0.002490997314453125,
0.003108978271484375,
-0.0025482177734375,
0.0215911865234375,
0.0638427734375,
-0.0011692047119140625,
-0.06072998046875,
-0.0018444061279296875,
-0.07550048828125,
-0.0176544189453125,
-0.0030612945556640625,
-0.0262603759765625,
0.0006084442138671875,
0.10693359375,
0.058074951171875,
0.0281829833984375,
-0.04766845703125,
-0.04669189453125,
-0.0242767333984375,
0.0172119140625,
-0.019744873046875,
0.00501251220703125,
-0.07965087890625,
-0.0159454345703125,
0.00504302978515625,
0.0047149658203125,
0.0135345458984375,
-0.018585205078125,
-0.0024738311767578125,
-0.01055145263671875,
0.004749298095703125,
0.002849578857421875,
-0.046539306640625,
-0.0022487640380859375,
0.01544189453125,
-0.01171875,
-0.00722503662109375,
0.02166748046875,
-0.005809783935546875,
-0.00852203369140625,
0.07635498046875,
-0.04754638671875,
-0.0020294189453125,
-0.018096923828125,
0.025299072265625,
-0.01593017578125,
0.02593994140625,
-0.0247344970703125,
0.0212554931640625,
-0.0031585693359375,
-0.0133056640625,
0.0015392303466796875,
-0.02435302734375,
-0.0032825469970703125,
-0.023895263671875,
-0.024627685546875,
0.0200042724609375,
-0.0265045166015625,
0.07421875,
-0.01201629638671875,
0.03167724609375,
-0.040374755859375,
0.0166473388671875,
-0.0213775634765625,
-0.01070404052734375,
0.0218658447265625,
0.0201568603515625,
0.0255584716796875,
0.0102996826171875,
0.0218353271484375,
0.031890869140625,
-0.005092620849609375,
0.005313873291015625
]
|
1211aa453bf93d4723b2d5b61d48b7adf7568b95 | Wordpress Stackexchange
Q: Alphabetical sorting - local language I want to sort posts by alphabet in local language (croatian language).
So letter Đ should come after D but now it goes in the end, after Z.
Some letters (like Č and Ć) should come after C, but currently Wordpress is sorting them like they all are under C.
I am using localized Wordpress version (4.0.1–hr) and the query for fetching is
$query = new WP_Query( array(
'category_name' => $slug,
'paged' => get_query_var('paged'),
'posts_per_page' => 20,
'orderby' => 'title'
) );
A: I managed to make it work:
In wpconfig.php file I set
define('DB_COLLATE', 'utf8_croatian_ci');
Do an SQL query on database in PhpMyadmin with:
ALTER TABLE wp_posts CONVERT TO CHARACTER SET utf8 COLLATE utf8_croatian_ci
I tried setting with utf8_unicode_ci first, sorting was slightly better but not quite accurate.
| Q: Alphabetical sorting - local language I want to sort posts by alphabet in local language (croatian language).
So letter Đ should come after D but now it goes in the end, after Z.
Some letters (like Č and Ć) should come after C, but currently Wordpress is sorting them like they all are under C.
I am using localized Wordpress version (4.0.1–hr) and the query for fetching is
$query = new WP_Query( array(
'category_name' => $slug,
'paged' => get_query_var('paged'),
'posts_per_page' => 20,
'orderby' => 'title'
) );
A: I managed to make it work:
In wpconfig.php file I set
define('DB_COLLATE', 'utf8_croatian_ci');
Do an SQL query on database in PhpMyadmin with:
ALTER TABLE wp_posts CONVERT TO CHARACTER SET utf8 COLLATE utf8_croatian_ci
I tried setting with utf8_unicode_ci first, sorting was slightly better but not quite accurate.
A: If Wordpress is installed in your language, that shouldn't be a problem.
You are missing the order parameter:
$args = array(
'category_name' => $slug,
'paged' => get_query_var('paged'),
'posts_per_page' => 20,
'orderby' => 'title',
'order' => 'ASC'
);
$query = new WP_Query($args);
Hope this helps, always best to check the codex
| wordpress | {
"language": "en",
"length": 186,
"provenance": "stackexchange_00019.jsonl.gz:451069",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/170450"
} | [
-0.005523681640625,
-0.009857177734375,
0.0041656494140625,
0.0278167724609375,
-0.006305694580078125,
-0.0187835693359375,
0.037994384765625,
-0.03253173828125,
0.044677734375,
0.07061767578125,
0.0244903564453125,
-0.06378173828125,
0.0791015625,
-0.0274200439453125,
-0.0616455078125,
0.016815185546875,
0.03155517578125,
-0.012115478515625,
0.0248870849609375,
-0.0098114013671875,
-0.01123809814453125,
-0.0019092559814453125,
0.034027099609375,
0.000240325927734375,
0.032867431640625,
-0.006256103515625,
0.044677734375,
-0.0042266845703125,
0.006839752197265625,
-0.0096435546875,
0.026397705078125,
-0.0138092041015625,
0.01397705078125,
-0.036163330078125,
0.04473876953125,
0.01378631591796875,
0.046173095703125,
-0.0308837890625,
0.0041961669921875,
0.0237884521484375,
0.0033283233642578125,
0.00331878662109375,
-0.00775146484375,
0.049224853515625,
-0.0288543701171875,
-0.0625,
0.0245513916015625,
-0.01546478271484375,
0.035430908203125,
-0.0014057159423828125,
-0.0159149169921875,
0.052154541015625,
-0.0114898681640625,
-0.0147705078125,
-0.00018155574798583984,
0.0109405517578125,
-0.034149169921875,
0.06005859375,
0.0229034423828125,
0.003143310546875,
-0.0039215087890625,
0.0230865478515625,
-0.00914764404296875,
0.00193023681640625,
-0.033966064453125,
0.0196685791015625,
0.025146484375,
-0.021209716796875,
-0.031097412109375,
-0.0345458984375,
0.0249786376953125,
-0.009674072265625,
0.01062774658203125,
-0.0213775634765625,
0.0047454833984375,
-0.0005035400390625,
-0.0012388229370117188,
-0.0186767578125,
0.015045166015625,
-0.000728607177734375,
-0.0311737060546875,
0.011993408203125,
-0.06451416015625,
-0.050628662109375,
-0.0038051605224609375,
-0.034942626953125,
-0.0269775390625,
0.0012969970703125,
-0.05462646484375,
-0.04559326171875,
-0.040557861328125,
0.006816864013671875,
-0.066162109375,
0.0013418197631835938,
-0.032501220703125,
-0.0015087127685546875,
0.031982421875,
0.045440673828125,
-0.028656005859375,
0.0204315185546875,
-0.017852783203125,
-0.039276123046875,
0.050201416015625,
-0.05224609375,
0.01195526123046875,
-0.043243408203125,
-0.0251007080078125,
0.0304412841796875,
0.07763671875,
0.0477294921875,
-0.017486572265625,
0.04412841796875,
-0.0117950439453125,
-0.06396484375,
0.01434326171875,
0.060272216796875,
0.00864410400390625,
0.033294677734375,
0.0302734375,
0.01050567626953125,
0.0202178955078125,
0.043243408203125,
0.005157470703125,
-0.0574951171875,
0.0030612945556640625,
-0.0272979736328125,
-0.027008056640625,
-0.040069580078125,
0.038238525390625,
0.0230255126953125,
-0.0256195068359375,
-0.00229644775390625,
0.022796630859375,
0.01107025146484375,
-0.021575927734375,
-0.0310516357421875,
-0.041961669921875,
-0.00707244873046875,
-0.0062408447265625,
0.00687408447265625,
0.007354736328125,
-0.03924560546875,
0.04132080078125,
0.041046142578125,
-0.01287078857421875,
0.01386260986328125,
0.00496673583984375,
0.01116943359375,
-0.00331878662109375,
-0.04437255859375,
0.027130126953125,
-0.044189453125,
0.06329345703125,
-0.0227508544921875,
-0.054443359375,
-0.012237548828125,
0.011199951171875,
-0.0188446044921875,
-0.053802490234375,
-0.039398193359375,
-0.035003662109375,
-0.016754150390625,
0.008941650390625,
-0.0263671875,
-0.0031604766845703125,
0.0111846923828125,
-0.00823211669921875,
0.0219268798828125,
0.029541015625,
-0.032623291015625,
0.03717041015625,
0.031768798828125,
0.06414794921875,
-0.0293731689453125,
-0.0204315185546875,
-0.03131103515625,
-0.007442474365234375,
-0.0361328125,
0.0017118453979492188,
0.06500244140625,
0.036376953125,
-0.0021953582763671875,
0.0037097930908203125,
0.0238494873046875,
-0.0255584716796875,
0.03057861328125,
0.01549530029296875,
0.055572509765625,
0.0109710693359375,
0.021728515625,
-0.0181121826171875,
-0.0018310546875,
-0.039459228515625,
0.00533294677734375,
0.005283355712890625,
-0.01152801513671875,
0.02508544921875,
0.0204620361328125,
0.01250457763671875,
-0.02734375,
-0.0019779205322265625,
-0.0160369873046875,
0.0191802978515625,
-0.016937255859375,
-0.0205078125,
-0.0127410888671875,
-0.0097503662109375,
0.0269622802734375,
-0.005336761474609375,
-0.00978851318359375,
0.025360107421875,
0.0017118453979492188,
-0.0357666015625,
0.0179290771484375,
-0.0272369384765625,
0.01482391357421875,
-0.002227783203125,
0.01708984375,
-0.0132904052734375,
0.01824951171875,
-0.01441192626953125,
-0.03082275390625,
-0.0206146240234375,
0.0208587646484375,
0.0295257568359375,
-0.0094451904296875,
-0.015533447265625,
-0.01116180419921875,
0.0207061767578125,
0.01102447509765625,
-0.0164947509765625,
0.01338958740234375,
0.0308380126953125,
0.020355224609375,
-0.0309295654296875,
-0.005664825439453125,
-0.01346588134765625,
-0.00229644775390625,
-0.004642486572265625,
0.03631591796875,
0.0289459228515625,
-0.012054443359375,
0.02099609375,
0.05133056640625,
0.01441192626953125,
-0.013671875,
0.022857666015625,
-0.00433349609375,
0.0304412841796875,
0.07586669921875,
0.0003261566162109375,
0.002979278564453125,
-0.00543212890625,
-0.034423828125,
-0.015228271484375,
0.03717041015625,
-0.01190185546875,
0.01177215576171875,
-0.021270751953125,
-0.006732940673828125,
0.01389312744140625,
-0.0193328857421875,
-0.041259765625,
-0.005802154541015625,
-0.044219970703125,
-0.0306854248046875,
-0.00611114501953125,
-0.00992584228515625,
-0.0112762451171875,
-0.03143310546875,
0.040557861328125,
0.0194091796875,
0.0210418701171875,
-0.01461029052734375,
-0.063232421875,
0.0028591156005859375,
-0.048736572265625,
0.032928466796875,
0.0543212890625,
-0.01021575927734375,
-0.019439697265625,
0.01349639892578125,
-0.00847625732421875,
-0.0195770263671875,
0.01538848876953125,
-0.04595947265625,
-0.0028076171875,
-0.0213165283203125,
-0.09185791015625,
-0.0241241455078125,
0.005741119384765625,
0.0645751953125,
0.0025615692138671875,
-0.01137542724609375,
-0.01052093505859375,
0.0298614501953125,
0.050628662109375,
0.0240478515625,
-0.03076171875,
0.0107269287109375,
0.0213775634765625,
0.0338134765625,
0.02069091796875,
-0.0299224853515625,
0.0242919921875,
-0.023345947265625,
0.005229949951171875,
0.01367950439453125,
0.006305694580078125,
-0.00717926025390625,
-0.033050537109375,
0.041534423828125,
0.026763916015625,
-0.01934814453125,
0.035308837890625,
-0.0038242340087890625,
0.015045166015625,
0.0180816650390625,
-0.0592041015625,
-0.1285400390625,
-0.0191802978515625,
0.00982666015625,
0.03790283203125,
0.0297393798828125,
0.032257080078125,
-0.050537109375,
0.028289794921875,
0.0145721435546875,
-0.00787353515625,
0.0212860107421875,
0.0227508544921875,
0.028289794921875,
0.010040283203125,
0.0002372264862060547,
0.0130157470703125,
-0.005908966064453125,
0.018951416015625,
-0.0201873779296875,
-0.01556396484375,
-0.0277557373046875,
-0.01032257080078125,
0.05291748046875,
-0.0246124267578125,
-0.039886474609375,
-0.0146026611328125,
-0.002033233642578125,
0.04071044921875,
-0.0103607177734375,
0.0384521484375,
0.039520263671875,
-0.028900146484375,
0.004810333251953125,
0.0034847259521484375,
0.01021575927734375,
0.026275634765625,
-0.03692626953125,
-0.01114654541015625,
0.0213165283203125,
-0.006336212158203125,
-0.040008544921875,
-0.0248870849609375,
0.0128936767578125,
-0.00824737548828125,
0.020599365234375,
-0.03521728515625,
-0.008941650390625,
-0.00792694091796875,
0.068115234375,
-0.031646728515625,
-0.0258636474609375,
-0.046173095703125,
-0.0303955078125,
0.055328369140625,
0.01087188720703125,
0.0115203857421875,
0.03936767578125,
0.05072021484375,
-0.0222320556640625,
-0.00418853759765625,
0.0177459716796875,
0.00850677490234375,
0.0086517333984375,
-0.0266571044921875,
-0.0125579833984375,
-0.0240020751953125,
0.039642333984375,
0.0085601806640625,
-0.00580596923828125,
0.01568603515625,
-0.03271484375,
0.0188446044921875,
0.055511474609375,
-0.03460693359375,
0.0025005340576171875,
-0.000759124755859375,
0.0114593505859375,
-0.058441162109375,
-0.027252197265625,
-0.05548095703125,
-0.0001709461212158203,
-0.032623291015625,
0.0143890380859375,
0.0038852691650390625,
-0.009674072265625,
-0.03948974609375,
0.01513671875,
-0.02996826171875,
-0.0164794921875,
0.02752685546875,
0.01934814453125,
-0.025115966796875,
0.0028514862060546875,
-0.036529541015625,
-0.0013055801391601562,
-0.0209503173828125,
0.01392364501953125,
-0.1201171875,
-0.0295257568359375,
-0.0130767822265625,
0.07696533203125,
-0.005199432373046875,
-0.03802490234375,
-0.021484375,
0.07830810546875,
-0.030364990234375,
0.0211639404296875,
0.02056884765625,
0.0498046875,
0.023712158203125,
-0.004230499267578125,
0.01338958740234375,
-0.033538818359375,
0.0157928466796875,
-0.0147705078125,
-0.054229736328125,
-0.035125732421875,
-0.0232696533203125,
-0.0153961181640625,
0.01006317138671875,
-0.052337646484375,
-0.01552581787109375,
-0.01690673828125,
-0.01082611083984375,
0.04266357421875,
-0.0193939208984375,
0.011016845703125,
-0.042327880859375,
-0.034820556640625,
0.04296875,
0.059906005859375,
-0.01226043701171875,
-0.00824737548828125,
0.0294647216796875,
0.0004279613494873047,
-0.055023193359375,
-0.06402587890625,
-0.0167083740234375,
0.0239715576171875,
0.0292816162109375,
0.01751708984375,
-0.0171051025390625,
-0.0282135009765625,
0.042327880859375,
0.006931304931640625,
-0.0355224609375,
0.05328369140625,
-0.05609130859375,
0.030731201171875,
-0.049407958984375,
0.00008398294448852539,
0.015777587890625,
0.0180816650390625,
0.05291748046875,
0.03216552734375,
-0.0615234375,
0.007568359375,
0.036651611328125,
-0.00968170166015625,
0.00460052490234375,
-0.0139923095703125,
-0.08349609375,
0.047332763671875,
-0.06805419921875,
-0.0255889892578125,
-0.032073974609375,
0.00792694091796875,
0.0234832763671875,
-0.01554107666015625,
-0.017669677734375,
0.01029205322265625,
-0.003185272216796875,
0.025146484375,
0.0229644775390625,
-0.0176544189453125,
-0.00939178466796875,
-0.00511932373046875,
-0.0210723876953125,
0.054351806640625,
-0.0025844573974609375,
-0.046722412109375,
-0.00919342041015625,
-0.0004773139953613281,
0.043853759765625,
0.0277099609375,
-0.04510498046875,
-0.034271240234375,
0.0018911361694335938,
0.030792236328125,
0.034637451171875,
-0.0192718505859375,
0.006710052490234375,
0.00946807861328125,
0.0213623046875,
-0.0018215179443359375,
0.0021800994873046875,
-0.034210205078125,
0.082275390625,
-0.00864410400390625,
0.0225677490234375,
-0.00787353515625,
-0.004764556884765625,
-0.006381988525390625,
0.06939697265625,
0.0155487060546875,
-0.060638427734375,
-0.0173187255859375,
0.07562255859375,
0.0073394775390625,
0.01198577880859375,
-0.0257415771484375,
0.0162506103515625,
-0.0242767333984375,
-0.0300750732421875,
0.028289794921875,
0.0173492431640625,
0.040771484375,
-0.0260772705078125,
0.0160675048828125,
0.048797607421875,
0.00458526611328125,
-0.021392822265625,
-0.01947021484375,
0.01250457763671875,
0.029510498046875,
0.00548553466796875,
-0.0016279220581054688,
0.0026416778564453125,
0.013885498046875,
0.0294342041015625,
-0.0014495849609375,
-0.0305633544921875,
-0.032989501953125,
-0.0184173583984375,
-0.01605224609375,
0.025360107421875,
-0.0182342529296875,
0.00943756103515625,
-0.0068359375,
-0.032257080078125,
0.0272064208984375,
0.005466461181640625,
0.033203125,
-0.02197265625,
-0.0276031494140625,
0.0204010009765625,
0.02294921875,
0.0080108642578125,
-0.046966552734375,
-0.0345458984375,
-0.009124755859375,
-0.056121826171875,
-0.034332275390625,
-0.01560211181640625,
-0.01007080078125,
-0.038665771484375,
-0.0031585693359375,
-0.003475189208984375,
0.0160064697265625,
-0.019439697265625,
-0.016754150390625,
-0.0367431640625,
-0.0123138427734375,
0.00626373291015625,
-0.0196685791015625,
-0.01441192626953125,
0.068115234375,
-0.0185699462890625,
0.00943756103515625,
-0.013519287109375,
0.04290771484375,
0.006092071533203125,
0.0000317692756652832,
0.041595458984375,
-0.057037353515625,
-0.036102294921875,
-0.004405975341796875,
-0.09130859375,
-0.01934814453125,
0.0133056640625,
-0.016387939453125,
0.032470703125,
0.00010639429092407227,
0.03265380859375,
0.0005054473876953125,
-0.08636474609375,
-0.00868988037109375,
-0.0010776519775390625,
0.043060302734375,
-0.0014963150024414062,
0.0428466796875,
-0.007617950439453125,
-0.044189453125,
0.051605224609375,
-0.01134490966796875,
0.056884765625,
-0.01226806640625,
-0.00722503662109375,
0.01617431640625,
0.0180816650390625,
0.037445068359375,
0.0215606689453125,
-0.003021240234375,
0.019805908203125,
-0.048004150390625,
-0.039642333984375,
0.013763427734375,
-0.0233612060546875,
0.0036258697509765625,
-0.0275726318359375,
0.003082275390625,
0.0010061264038085938,
-0.0244293212890625,
0.00969696044921875,
0.054290771484375,
0.05517578125,
-0.07562255859375,
-0.0116729736328125,
-0.023345947265625,
-0.05535888671875,
-0.01494598388671875,
0.0115509033203125,
-0.0267333984375,
-0.05462646484375,
0.05328369140625,
-0.04449462890625,
-0.0035858154296875,
0.01425933837890625,
-0.034332275390625,
-0.015655517578125,
-0.0235137939453125,
-0.006389617919921875,
0.01296234130859375,
-0.00821685791015625,
0.0008258819580078125,
0.01012420654296875,
-0.00998687744140625,
-0.01180267333984375,
0.00989532470703125,
-0.01502227783203125,
-0.0028629302978515625,
-0.0285186767578125,
-0.0053863525390625,
-0.043792724609375,
0.005130767822265625,
0.0180206298828125,
-0.006473541259765625,
-0.0058135986328125,
0.046875,
-0.0233612060546875,
-0.0086822509765625,
0.021148681640625,
-0.044281005859375,
0.0159454345703125,
-0.025299072265625,
-0.02484130859375,
0.0225982666015625,
-0.0178680419921875,
-0.00033283233642578125,
-0.01477813720703125,
0.006500244140625,
-0.0140533447265625,
-0.04595947265625,
0.036590576171875,
-0.03985595703125,
0.0134735107421875,
0.01505279541015625,
0.03204345703125,
0.0205535888671875,
-0.00760650634765625,
0.0005917549133300781,
-0.05987548828125,
-0.055145263671875,
0.0032024383544921875,
-0.06732177734375,
-0.0128631591796875,
-0.0306396484375,
-0.063720703125,
0.0467529296875,
-0.01202392578125,
0.054840087890625,
-0.0193634033203125,
0.0179290771484375,
0.035400390625,
0.0212860107421875,
-0.04034423828125,
0.00830841064453125,
-0.04473876953125,
0.07220458984375,
-0.0885009765625,
-0.00714111328125,
0.0033702850341796875,
0.04095458984375,
0.03997802734375,
-0.0058441162109375,
-0.0281982421875,
-0.00897979736328125,
0.08258056640625,
0.08453369140625,
0.034210205078125,
0.0029811859130859375,
-0.0089874267578125,
0.0257415771484375,
-0.0025691986083984375,
-0.0232086181640625,
0.045074462890625,
-0.048370361328125,
-0.048736572265625,
-0.00007700920104980469,
0.0171661376953125,
0.00559234619140625,
-0.01326751708984375,
0.0238800048828125,
-0.031951904296875,
-0.0017862319946289062,
0.0377197265625,
-0.02398681640625,
0.00635528564453125,
0.056396484375,
0.087646484375,
-0.08111572265625,
-0.05889892578125,
-0.031768798828125,
0.048492431640625,
0.0242919921875,
0.048858642578125,
0.0222320556640625,
0.027374267578125,
0.02490234375,
-0.0322265625,
0.0240478515625,
-0.00742340087890625,
-0.044189453125,
0.0114288330078125,
0.019317626953125,
0.02154541015625,
0.0040130615234375,
0.05517578125,
0.03753662109375,
0.024749755859375,
-0.03436279296875,
-0.0167388916015625,
0.0035839080810546875,
-0.016082763671875,
-0.0200042724609375,
-0.021026611328125,
-0.0133056640625,
-0.0253753662109375,
-0.0005049705505371094,
-0.0123138427734375,
-0.047607421875,
0.01152801513671875,
0.057403564453125,
0.0084381103515625,
-0.00635528564453125,
-0.00678253173828125,
-0.07073974609375,
-0.00799560546875,
-0.02099609375,
0.0297088623046875,
0.0462646484375,
-0.0135040283203125,
0.03173828125,
-0.0286865234375,
-0.004840850830078125,
0.03173828125,
-0.0033512115478515625,
-0.03521728515625,
-0.016845703125,
-0.034515380859375,
-0.049224853515625,
-0.0343017578125,
0.046051025390625,
0.0295257568359375,
-0.02978515625,
0.0382080078125,
0.0360107421875,
-0.0243072509765625,
-0.0245513916015625,
0.02435302734375,
-0.007068634033203125,
-0.031280517578125,
-0.048828125,
0.049407958984375,
0.0179901123046875,
0.01654052734375,
0.0193939208984375,
0.064697265625,
0.0006499290466308594,
-0.0027217864990234375,
0.0648193359375,
-0.007747650146484375,
0.0036869049072265625,
0.01177215576171875,
-0.0008664131164550781,
0.066650390625,
0.03167724609375,
-0.0391845703125,
0.00785064697265625,
-0.0091400146484375,
-0.03179931640625,
0.0026798248291015625,
0.0296630859375,
0.0215301513671875,
-0.01464080810546875,
0.0562744140625,
-0.08929443359375,
0.01788330078125,
0.0369873046875,
0.0421142578125,
-0.017669677734375,
-0.02960205078125,
-0.019378662109375,
0.032684326171875,
-0.0022869110107421875,
0.025970458984375,
0.0517578125,
0.0097808837890625,
0.0670166015625,
-0.0350341796875,
0.035003662109375,
-0.0172576904296875,
-0.006397247314453125,
-0.00920867919921875,
-0.0252532958984375,
0.033538818359375,
0.027496337890625,
0.01003265380859375,
-0.01279449462890625,
-0.01044464111328125,
-0.07281494140625,
0.044769287109375,
-0.060760498046875,
-0.055877685546875,
-0.040313720703125,
0.04052734375,
0.002193450927734375,
0.01468658447265625,
-0.0281982421875,
-0.01401519775390625,
-0.0161895751953125,
-0.0094451904296875,
0.026336669921875,
0.03533935546875,
-0.01163482666015625,
0.02587890625,
-0.01494598388671875,
-0.0049896240234375,
0.04461669921875,
-0.0501708984375,
0.057281494140625,
0.0211639404296875,
-0.027801513671875,
0.01617431640625,
0.006702423095703125,
-0.0176544189453125,
0.0161895751953125,
0.00804901123046875,
0.00278472900390625,
0.00992584228515625,
-0.001575469970703125,
-0.0297393798828125,
0.035552978515625,
0.014678955078125,
0.00876617431640625,
0.013885498046875,
0.01812744140625,
-0.03765869140625,
-0.023040771484375,
0.008575439453125,
-0.02008056640625,
0.005283355712890625,
0.007518768310546875,
0.0128936767578125,
0.0224761962890625,
-0.0070343017578125,
-0.03759765625,
-0.039398193359375,
-0.002056121826171875,
-0.037994384765625,
0.03155517578125,
-0.05096435546875,
-0.00435638427734375,
-0.021881103515625,
-0.0265045166015625,
0.016448974609375,
0.006061553955078125,
0.023895263671875,
-0.05316162109375,
-0.04827880859375,
-0.01016998291015625,
0.01568603515625,
-0.0281219482421875,
-0.006801605224609375,
0.0084686279296875,
-0.0027866363525390625,
-0.04168701171875,
-0.005992889404296875,
0.015625,
0.02203369140625,
0.017578125,
-0.0323486328125,
0.049774169921875,
-0.016632080078125,
-0.041595458984375,
-0.07684326171875,
0.031829833984375,
-0.1162109375,
0.01824951171875,
0.02996826171875,
-0.011016845703125,
0.0235137939453125,
-0.020263671875,
-0.049652099609375,
0.040252685546875,
0.0165252685546875,
-0.0257110595703125,
0.0099945068359375,
0.01155853271484375,
0.0020923614501953125,
0.0201568603515625,
0.0159149169921875,
-0.022705078125,
-0.036956787109375,
-0.0262908935546875,
0.005229949951171875,
0.053253173828125,
-0.0183563232421875,
0.00458526611328125,
-0.006015777587890625,
0.0648193359375,
0.05902099609375,
0.00411224365234375,
-0.00531005859375,
0.0026493072509765625,
0.0087890625,
0.022216796875,
-0.034942626953125,
-0.015533447265625,
0.0043182373046875,
-0.006610870361328125,
-0.01326751708984375,
-0.0625,
-0.01336669921875,
-0.03936767578125,
0.0015888214111328125,
0.0255889892578125,
0.0005402565002441406,
-0.0024776458740234375,
-0.00916290283203125,
-0.031585693359375,
0.016510009765625,
-0.027069091796875,
-0.0157470703125,
-0.032745361328125,
-0.01055908203125,
-0.01678466796875,
0.0236663818359375,
0.0197296142578125,
0.0157012939453125,
0.0210113525390625,
-0.033355712890625,
0.032440185546875,
-0.0177459716796875,
-0.036651611328125,
0.0300445556640625,
0.0185394287109375,
-0.01305389404296875,
0.00592803955078125,
-0.0015478134155273438,
-0.00582122802734375,
0.01493072509765625,
0.047027587890625,
-0.032684326171875,
-0.052581787109375,
0.07476806640625,
0.04449462890625,
0.0166473388671875,
-0.004791259765625,
0.048492431640625,
0.0139007568359375,
-0.04339599609375,
0.0144195556640625,
0.0161895751953125,
0.0189666748046875,
-0.0012006759643554688,
0.0144805908203125,
0.03887939453125,
0.031402587890625,
0.010223388671875,
-0.021636962890625,
-0.0182952880859375,
0.0266571044921875,
-0.01898193359375,
-0.0162200927734375,
-0.012054443359375,
-0.021759033203125,
0.0217437744140625,
0.01425933837890625,
0.042327880859375,
0.00774383544921875,
0.003322601318359375,
0.0160675048828125,
-0.006366729736328125,
0.003360748291015625
]
|
f9a02fc2f6b77d7bbed667e1a8fd09104fa748fe | Wordpress Stackexchange
Q: How to change "You must be logged in to post a comment." Some of my users have mentioned that my site is confusing for them. As this is the case, I would like to actually make links to Login/Register for my unregistered visitors to quickly do so if they would like to leave a comment.
Right now it just says "You must be logged in to post a comment." with no link to Login. Where can I edit this and change it to "You must Register or Login to post a comment." with links to them?
A: You can try to modify it with the comment_form_defaults filter:
/**
* Modify the "must_log_in" string of the comment form.
*
* @see http://wordpress.stackexchange.com/a/170492/26350
*/
add_filter( 'comment_form_defaults', function( $fields ) {
$fields['must_log_in'] = sprintf(
__( '<p class="must-log-in">
You must <a href="%s">Register</a> or
<a href="%s">Login</a> to post a comment.</p>'
),
wp_registration_url(),
wp_login_url( apply_filters( 'the_permalink', get_permalink() ) )
);
return $fields;
});
where we use the wp_registration_url() and wp_login_url() core functions.
ps: the info on the comment_form_defaults filter seems to be missing from the Codex.
| Q: How to change "You must be logged in to post a comment." Some of my users have mentioned that my site is confusing for them. As this is the case, I would like to actually make links to Login/Register for my unregistered visitors to quickly do so if they would like to leave a comment.
Right now it just says "You must be logged in to post a comment." with no link to Login. Where can I edit this and change it to "You must Register or Login to post a comment." with links to them?
A: You can try to modify it with the comment_form_defaults filter:
/**
* Modify the "must_log_in" string of the comment form.
*
* @see http://wordpress.stackexchange.com/a/170492/26350
*/
add_filter( 'comment_form_defaults', function( $fields ) {
$fields['must_log_in'] = sprintf(
__( '<p class="must-log-in">
You must <a href="%s">Register</a> or
<a href="%s">Login</a> to post a comment.</p>'
),
wp_registration_url(),
wp_login_url( apply_filters( 'the_permalink', get_permalink() ) )
);
return $fields;
});
where we use the wp_registration_url() and wp_login_url() core functions.
ps: the info on the comment_form_defaults filter seems to be missing from the Codex.
| wordpress | {
"language": "en",
"length": 181,
"provenance": "stackexchange_00019.jsonl.gz:451084",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/170490"
} | [
0.06695556640625,
0.005680084228515625,
0.03192138671875,
-0.0264434814453125,
0.019287109375,
-0.025634765625,
0.050506591796875,
-0.03009033203125,
-0.018310546875,
0.00010246038436889648,
-0.020843505859375,
-0.0004181861877441406,
-0.057830810546875,
-0.01904296875,
-0.01395416259765625,
-0.06243896484375,
-0.005016326904296875,
0.035858154296875,
0.009033203125,
-0.02783203125,
0.0261688232421875,
-0.03094482421875,
-0.017364501953125,
0.06005859375,
0.034942626953125,
-0.03472900390625,
0.1326904296875,
-0.0535888671875,
0.05108642578125,
-0.01434326171875,
0.028045654296875,
-0.05419921875,
-0.002017974853515625,
0.02362060546875,
-0.0134735107421875,
-0.0374755859375,
0.00595855712890625,
0.00833892822265625,
0.0011205673217773438,
0.047271728515625,
0.040496826171875,
-0.018402099609375,
-0.0269622802734375,
0.0020809173583984375,
-0.02587890625,
-0.0059356689453125,
0.011199951171875,
-0.01548004150390625,
0.0299835205078125,
-0.0304107666015625,
-0.0105133056640625,
0.05755615234375,
0.01372528076171875,
-0.0252838134765625,
-0.031524658203125,
-0.0100250244140625,
-0.0169830322265625,
0.007549285888671875,
0.04290771484375,
-0.01800537109375,
-0.02734375,
-0.040435791015625,
0.016876220703125,
-0.01392364501953125,
-0.0003867149353027344,
-0.01183319091796875,
-0.035064697265625,
0.031829833984375,
0.00927734375,
-0.017425537109375,
-0.005687713623046875,
-0.01079559326171875,
-0.01476287841796875,
-0.0240478515625,
-0.0097808837890625,
-0.00548553466796875,
-0.0172271728515625,
-0.024261474609375,
0.0240020751953125,
0.0129547119140625,
-0.01392364501953125,
-0.0145721435546875,
-0.02490234375,
-0.0202789306640625,
0.0205535888671875,
0.01003265380859375,
-0.006832122802734375,
-0.0145263671875,
-0.009033203125,
-0.01430511474609375,
0.004058837890625,
-0.04095458984375,
-0.0244903564453125,
0.0290985107421875,
0.00809478759765625,
-0.045196533203125,
0.004119873046875,
0.0177459716796875,
-0.006793975830078125,
-0.010467529296875,
-0.004077911376953125,
-0.0180206298828125,
-0.0213775634765625,
-0.01374053955078125,
0.0014057159423828125,
0.059051513671875,
-0.0025959014892578125,
0.0269012451171875,
0.0242462158203125,
0.0205078125,
0.025909423828125,
-0.023101806640625,
-0.0163421630859375,
-0.021087646484375,
-0.03448486328125,
0.0205078125,
-0.0286865234375,
-0.015716552734375,
-0.00910186767578125,
0.0221099853515625,
-0.041473388671875,
-0.0216064453125,
0.04376220703125,
-0.0125732421875,
0.0160675048828125,
-0.00472259521484375,
0.0011110305786132812,
-0.030426025390625,
-0.008941650390625,
0.040985107421875,
-0.0295257568359375,
0.00994110107421875,
0.059112548828125,
0.0090484619140625,
-0.0029392242431640625,
-0.032379150390625,
0.0364990234375,
-0.007396697998046875,
-0.0263824462890625,
0.05865478515625,
-0.0222320556640625,
-0.04931640625,
-0.0095367431640625,
-0.0227813720703125,
-0.0007662773132324219,
0.0316162109375,
0.0299072265625,
0.003875732421875,
-0.0185394287109375,
-0.0411376953125,
-0.0185394287109375,
0.0218505859375,
0.00795745849609375,
-0.007778167724609375,
0.01105499267578125,
-0.0193023681640625,
0.02056884765625,
-0.03167724609375,
0.00695037841796875,
-0.0286102294921875,
0.06036376953125,
-0.0021610260009765625,
-0.017578125,
-0.01488494873046875,
-0.0439453125,
-0.006793975830078125,
-0.0438232421875,
-0.00455474853515625,
0.02691650390625,
0.0239105224609375,
-0.00458526611328125,
-0.026519775390625,
0.011688232421875,
0.0042724609375,
0.0004489421844482422,
-0.001781463623046875,
-0.0159149169921875,
0.054595947265625,
0.0010023117065429688,
0.01473236083984375,
0.01776123046875,
-0.0340576171875,
0.0053558349609375,
0.022125244140625,
-0.0239410400390625,
0.0260467529296875,
0.053466796875,
0.06353759765625,
-0.046630859375,
0.03692626953125,
0.03521728515625,
0.052032470703125,
-0.0298309326171875,
0.00222015380859375,
-0.021453857421875,
-0.03997802734375,
0.00940704345703125,
-0.01177215576171875,
-0.021331787109375,
0.0577392578125,
0.00591278076171875,
-0.0234527587890625,
-0.004241943359375,
0.01055908203125,
-0.06561279296875,
0.0022830963134765625,
-0.0263824462890625,
0.017242431640625,
0.00006842613220214844,
-0.0029735565185546875,
0.01445770263671875,
0.01084136962890625,
-0.01000213623046875,
-0.055755615234375,
-0.0382080078125,
0.0276031494140625,
-0.01715087890625,
0.001277923583984375,
-0.02276611328125,
0.03240966796875,
-0.03375244140625,
-0.020904541015625,
-0.049285888671875,
-0.01003265380859375,
0.0227203369140625,
-0.024505615234375,
-0.0106048583984375,
-0.0270233154296875,
0.0153045654296875,
-0.0218353271484375,
-0.002262115478515625,
0.039276123046875,
0.02862548828125,
0.004810333251953125,
-0.037628173828125,
0.0117950439453125,
-0.01088714599609375,
-0.010772705078125,
-0.0041046142578125,
0.04107666015625,
0.034149169921875,
-0.0206756591796875,
0.01009368896484375,
0.027557373046875,
0.0244598388671875,
-0.002559661865234375,
0.037445068359375,
-0.007904052734375,
0.0162811279296875,
0.03863525390625,
0.0121612548828125,
0.01153564453125,
0.022308349609375,
-0.001750946044921875,
0.0222930908203125,
0.0236053466796875,
-0.005706787109375,
-0.0273895263671875,
0.01143646240234375,
0.005100250244140625,
0.0029163360595703125,
-0.036468505859375,
-0.027923583984375,
-0.0106048583984375,
-0.0212554931640625,
-0.05035400390625,
-0.0266265869140625,
-0.034698486328125,
-0.0215301513671875,
-0.0206298828125,
0.032806396484375,
-0.033233642578125,
-0.032196044921875,
0.01029205322265625,
0.048309326171875,
-0.0161590576171875,
-0.0229034423828125,
0.0014190673828125,
-0.02813720703125,
-0.00232696533203125,
-0.0229339599609375,
0.004978179931640625,
-0.0134735107421875,
-0.01062774658203125,
-0.0169525146484375,
-0.03948974609375,
0.02532958984375,
0.00650787353515625,
0.00385284423828125,
-0.05316162109375,
0.0157623291015625,
-0.036376953125,
-0.0582275390625,
0.046295166015625,
0.00885009765625,
-0.0692138671875,
0.01947021484375,
-0.055877685546875,
0.06060791015625,
-0.058868408203125,
-0.0004982948303222656,
0.058563232421875,
0.003993988037109375,
0.0028972625732421875,
0.00872802734375,
0.0025234222412109375,
0.001461029052734375,
0.004100799560546875,
-0.00470733642578125,
-0.0030002593994140625,
-0.0190582275390625,
0.06036376953125,
0.00571441650390625,
-0.0017871856689453125,
-0.0192718505859375,
-0.0301361083984375,
-0.037689208984375,
-0.0100555419921875,
-0.042236328125,
0.004550933837890625,
-0.06256103515625,
-0.058197021484375,
0.0185699462890625,
-0.01218414306640625,
-0.00537872314453125,
0.0214385986328125,
-0.0256195068359375,
0.01045989990234375,
0.013946533203125,
-0.0081024169921875,
-0.08758544921875,
-0.026123046875,
-0.07159423828125,
0.026275634765625,
-0.0149383544921875,
0.022430419921875,
-0.0007042884826660156,
0.05474853515625,
0.01139068603515625,
-0.0150299072265625,
0.0253448486328125,
-0.0245819091796875,
-0.00994110107421875,
-0.0200958251953125,
-0.0252227783203125,
-0.0250701904296875,
0.0184478759765625,
-0.01519775390625,
0.0178375244140625,
0.021026611328125,
0.0036487579345703125,
0.00868988037109375,
0.0038776397705078125,
-0.016357421875,
0.040618896484375,
0.007049560546875,
-0.02752685546875,
0.0008025169372558594,
0.02813720703125,
-0.0501708984375,
0.019805908203125,
-0.0312347412109375,
-0.0280914306640625,
0.01093292236328125,
0.01372528076171875,
-0.0038738250732421875,
-0.006313323974609375,
-0.006381988525390625,
0.01210784912109375,
0.008331298828125,
0.050018310546875,
-0.03338623046875,
0.01065826416015625,
-0.01158905029296875,
-0.0211181640625,
-0.0293426513671875,
0.02093505859375,
-0.03363037109375,
-0.034759521484375,
-0.01849365234375,
-0.008270263671875,
-0.0015630722045898438,
-0.004779815673828125,
-0.0316162109375,
-0.06512451171875,
0.048614501953125,
-0.076904296875,
-0.0122222900390625,
-0.058502197265625,
-0.01543426513671875,
-0.01226043701171875,
0.09259033203125,
-0.02996826171875,
-0.01326751708984375,
-0.00585174560546875,
0.00023233890533447266,
-0.02252197265625,
-0.00797271728515625,
-0.0313720703125,
-0.0049896240234375,
-0.02618408203125,
0.004482269287109375,
-0.0164642333984375,
-0.032623291015625,
0.006465911865234375,
-0.0283355712890625,
-0.00652313232421875,
-0.029022216796875,
0.0164642333984375,
0.046783447265625,
-0.02044677734375,
0.03350830078125,
-0.052276611328125,
0.051849365234375,
-0.0088958740234375,
-0.00017893314361572266,
-0.06597900390625,
-0.030914306640625,
0.00007128715515136719,
0.0848388671875,
0.033538818359375,
-0.049346923828125,
-0.0182342529296875,
0.05029296875,
-0.0034923553466796875,
-0.01201629638671875,
0.0019359588623046875,
0.01241302490234375,
-0.01806640625,
0.0196075439453125,
-0.01666259765625,
-0.01551055908203125,
0.0301361083984375,
0.00815582275390625,
-0.048583984375,
0.0184478759765625,
-0.03277587890625,
0.0279693603515625,
0.0080108642578125,
-0.042938232421875,
-0.041778564453125,
-0.0183868408203125,
0.02093505859375,
0.0162200927734375,
-0.0182647705078125,
0.00884246826171875,
-0.0007672309875488281,
-0.0421142578125,
0.0264434814453125,
-0.017913818359375,
0.001750946044921875,
0.013671875,
0.042266845703125,
0.01284027099609375,
-0.006816864013671875,
-0.007965087890625,
-0.0008783340454101562,
0.033233642578125,
-0.0097808837890625,
0.060577392578125,
0.055389404296875,
-0.0036773681640625,
0.0235137939453125,
0.015869140625,
0.01421356201171875,
-0.033660888671875,
0.038909912109375,
-0.022247314453125,
-0.0175628662109375,
0.0307464599609375,
-0.0386962890625,
0.040557861328125,
-0.0167999267578125,
0.01215362548828125,
-0.019561767578125,
-0.0244293212890625,
0.034088134765625,
0.034576416015625,
-0.00307464599609375,
-0.028656005859375,
-0.0439453125,
0.0154876708984375,
0.00917816162109375,
0.014495849609375,
0.0333251953125,
-0.01287841796875,
0.028778076171875,
-0.01186370849609375,
-0.000048220157623291016,
-0.0285797119140625,
-0.0294647216796875,
-0.00971221923828125,
0.017791748046875,
-0.005001068115234375,
-0.00501251220703125,
-0.01105499267578125,
-0.0268096923828125,
0.123291015625,
0.020355224609375,
-0.04730224609375,
0.045379638671875,
-0.035858154296875,
0.04669189453125,
0.027099609375,
0.01885986328125,
0.0421142578125,
-0.0276031494140625,
-0.032958984375,
-0.008575439453125,
0.0113372802734375,
-0.07708740234375,
-0.04766845703125,
0.01522064208984375,
-0.019012451171875,
0.0160064697265625,
0.0284423828125,
0.0254058837890625,
-0.00324249267578125,
0.03460693359375,
-0.0220489501953125,
0.01995849609375,
0.0010089874267578125,
0.02838134765625,
0.00925445556640625,
0.009307861328125,
0.006805419921875,
-0.0032958984375,
0.021484375,
-0.0107269287109375,
-0.0222625732421875,
0.0212249755859375,
0.0163421630859375,
0.026763916015625,
0.029144287109375,
-0.01397705078125,
-0.0010671615600585938,
-0.005306243896484375,
0.018096923828125,
0.0006651878356933594,
-0.061431884765625,
-0.00203704833984375,
0.0252685546875,
-0.0025806427001953125,
-0.042877197265625,
-0.01010894775390625,
-0.017608642578125,
-0.038970947265625,
-0.004558563232421875,
0.0244140625,
-0.035308837890625,
0.003814697265625,
-0.0022907257080078125,
0.0234375,
-0.03936767578125,
-0.017303466796875,
-0.0294952392578125,
0.0299835205078125,
-0.021942138671875,
0.0116119384765625,
0.033599853515625,
0.0207061767578125,
0.00803375244140625,
-0.0122528076171875,
-0.0219268798828125,
0.0369873046875,
-0.02142333984375,
0.048187255859375,
-0.02362060546875,
-0.01435089111328125,
-0.020782470703125,
-0.0307769775390625,
-0.035186767578125,
-0.062042236328125,
-0.02813720703125,
-0.039703369140625,
0.02044677734375,
0.02801513671875,
0.027008056640625,
-0.006984710693359375,
-0.04046630859375,
-0.035430908203125,
0.002777099609375,
0.0276947021484375,
0.04144287109375,
-0.01299285888671875,
0.056640625,
0.050079345703125,
-0.024658203125,
0.0298309326171875,
0.0460205078125,
-0.0089874267578125,
-0.0084075927734375,
0.001117706298828125,
-0.037445068359375,
-0.021270751953125,
-0.0050201416015625,
-0.058319091796875,
0.0262298583984375,
0.07073974609375,
-0.005809783935546875,
-0.0223541259765625,
0.004207611083984375,
-0.00811004638671875,
-0.036376953125,
0.043060302734375,
0.00811767578125,
0.0328369140625,
-0.061798095703125,
0.0112762451171875,
0.03887939453125,
-0.045166015625,
0.0158843994140625,
-0.0192718505859375,
-0.015167236328125,
-0.014556884765625,
0.024810791015625,
-0.04608154296875,
0.0191650390625,
0.06103515625,
0.0238800048828125,
0.042694091796875,
0.0009016990661621094,
0.02239990234375,
0.03125,
0.0064849853515625,
-0.01108551025390625,
-0.011810302734375,
0.05841064453125,
0.010986328125,
-0.00951385498046875,
0.06329345703125,
-0.0293121337890625,
0.022705078125,
0.06494140625,
0.060546875,
-0.118896484375,
0.0305633544921875,
-0.002834320068359375,
0.035736083984375,
0.09259033203125,
0.023040771484375,
-0.005176544189453125,
-0.004825592041015625,
0.00341796875,
-0.05889892578125,
-0.0153350830078125,
-0.004669189453125,
-0.006717681884765625,
-0.00275421142578125,
0.00240325927734375,
0.0293426513671875,
-0.00820159912109375,
-0.0181732177734375,
-0.0288238525390625,
0.012451171875,
-0.021209716796875,
-0.020172119140625,
-0.0201416015625,
0.033111572265625,
-0.037841796875,
-0.07269287109375,
0.0245208740234375,
-0.0218963623046875,
-0.006641387939453125,
0.05255126953125,
-0.0218048095703125,
0.0693359375,
0.024139404296875,
0.008544921875,
0.0103607177734375,
-0.0190887451171875,
0.015106201171875,
0.0250244140625,
-0.0204620361328125,
0.017303466796875,
0.033660888671875,
-0.0031566619873046875,
0.0200042724609375,
0.02178955078125,
-0.0467529296875,
-0.005390167236328125,
-0.051666259765625,
0.0782470703125,
-0.058990478515625,
0.00439453125,
0.0193328857421875,
-0.015228271484375,
0.00756072998046875,
-0.0352783203125,
0.0013370513916015625,
-0.03875732421875,
-0.0027790069580078125,
-0.032501220703125,
-0.0372314453125,
-0.0027008056640625,
-0.06121826171875,
-0.054901123046875,
0.09967041015625,
0.01233673095703125,
0.01482391357421875,
0.00323486328125,
0.0279693603515625,
-0.02825927734375,
0.0234527587890625,
-0.00482177734375,
0.036834716796875,
0.028167724609375,
0.03485107421875,
-0.0015277862548828125,
-0.0184783935546875,
0.031036376953125,
0.055267333984375,
0.08056640625,
0.033172607421875,
-0.07208251953125,
-0.031524658203125,
0.0223846435546875,
0.0341796875,
0.005458831787109375,
0.045806884765625,
0.00391387939453125,
0.06689453125,
0.054779052734375,
-0.054107666015625,
0.01910400390625,
0.006534576416015625,
-0.0257568359375,
0.020111083984375,
0.0025482177734375,
-0.0258026123046875,
-0.023284912109375,
0.0428466796875,
-0.0594482421875,
-0.000751495361328125,
0.03546142578125,
0.0302581787109375,
-0.027618408203125,
0.035430908203125,
0.023651123046875,
-0.02557373046875,
0.02178955078125,
-0.047271728515625,
0.05413818359375,
0.00850677490234375,
0.00927734375,
0.04864501953125,
0.025848388671875,
0.024169921875,
-0.044891357421875,
-0.0009355545043945312,
-0.0171356201171875,
-0.0023937225341796875,
0.07513427734375,
0.040008544921875,
0.04168701171875,
-0.018768310546875,
0.015777587890625,
0.026824951171875,
0.08245849609375,
-0.0576171875,
0.0012874603271484375,
0.0047454833984375,
0.0232696533203125,
0.0256500244140625,
-0.004669189453125,
0.0709228515625,
-0.025970458984375,
-0.01194000244140625,
-0.01224517822265625,
-0.00726318359375,
0.006694793701171875,
0.0194091796875,
-0.00913238525390625,
-0.031494140625,
-0.0034084320068359375,
0.006549835205078125,
-0.0080718994140625,
0.007755279541015625,
-0.0133056640625,
0.0014886856079101562,
0.0029087066650390625,
0.0224761962890625,
0.01282501220703125,
0.0203704833984375,
0.003116607666015625,
0.01462554931640625,
-0.020538330078125,
-0.0069427490234375,
-0.00720977783203125,
-0.048553466796875,
0.00872802734375,
0.028167724609375,
0.0171356201171875,
-0.008056640625,
-0.00605010986328125,
-0.0294036865234375,
-0.035888671875,
0.004673004150390625,
0.01346588134765625,
-0.03533935546875,
0.020294189453125,
-0.035369873046875,
0.027618408203125,
0.02374267578125,
-0.00875091552734375,
0.0031147003173828125,
-0.01800537109375,
0.051483154296875,
-0.0280303955078125,
0.0030956268310546875,
0.006290435791015625,
-0.0438232421875,
0.0253143310546875,
0.0104217529296875,
0.060302734375,
0.0005784034729003906,
-0.029876708984375,
0.0004818439483642578,
0.004093170166015625,
-0.09136962890625,
0.0222625732421875,
0.050384521484375,
-0.01214599609375,
-0.010467529296875,
0.0160980224609375,
0.006175994873046875,
0.0207672119140625,
-0.037750244140625,
0.001373291015625,
0.01116180419921875,
0.0262908935546875,
-0.0007901191711425781,
-0.049713134765625,
-0.0226898193359375,
-0.046844482421875,
0.031646728515625,
0.045867919921875,
0.09600830078125,
-0.0225372314453125,
0.0399169921875,
-0.053192138671875,
0.0011272430419921875,
-0.026458740234375,
-0.0189666748046875,
0.0199737548828125,
0.0027751922607421875,
-0.03521728515625,
0.0023517608642578125,
-0.0462646484375,
0.10577392578125,
-0.0268707275390625,
0.032806396484375,
0.099609375,
-0.040130615234375,
-0.0261993408203125,
-0.0261077880859375,
0.0114288330078125,
-0.031768798828125,
-0.04949951171875,
-0.025848388671875,
0.0125274658203125,
-0.0078887939453125,
-0.0095367431640625,
-0.01430511474609375,
0.07611083984375,
-0.0379638671875,
0.0235595703125,
-0.00933074951171875,
-0.031463623046875,
-0.02618408203125,
0.022308349609375,
-0.0272674560546875,
0.06671142578125,
-0.00223541259765625,
-0.033203125,
0.019500732421875,
0.00849151611328125,
-0.05712890625,
0.0010938644409179688,
-0.01168060302734375,
-0.0145416259765625,
0.0219879150390625,
0.0345458984375,
-0.01180267333984375,
0.010406494140625,
-0.00566864013671875,
-0.0020599365234375,
0.01447296142578125,
-0.0245361328125,
-0.0308990478515625,
-0.060943603515625,
-0.03546142578125,
-0.00933837890625,
-0.051422119140625,
-0.08953857421875,
-0.042266845703125,
0.033599853515625,
0.00359344482421875,
-0.017852783203125,
-0.04736328125,
0.0289306640625,
-0.01100921630859375,
0.051666259765625,
-0.0445556640625,
0.0028076171875,
-0.003978729248046875,
0.00226593017578125,
-0.0350341796875,
0.0182037353515625,
-0.038543701171875,
-0.0142822265625,
-0.005718231201171875,
0.031829833984375,
0.0712890625,
-0.031524658203125,
-0.02349853515625,
-0.00902557373046875,
-0.0004398822784423828,
0.036590576171875,
-0.0302581787109375,
-0.01441192626953125,
0.0178375244140625,
0.0102386474609375,
-0.0197601318359375,
-0.060089111328125,
-0.006988525390625,
-0.029815673828125,
0.0208892822265625,
-0.01287841796875,
0.002532958984375,
0.0279998779296875,
-0.0325927734375,
-0.087646484375,
0.053253173828125,
-0.0244293212890625,
-0.033843994140625,
-0.06402587890625,
-0.011474609375,
-0.006504058837890625,
0.060089111328125,
-0.0081939697265625,
-0.0367431640625,
-0.049468994140625,
0.0294342041015625,
0.0203704833984375,
-0.024810791015625,
0.05926513671875,
0.00452423095703125,
-0.0222015380859375,
0.0239410400390625,
0.0482177734375,
0.018524169921875,
0.00101470947265625,
0.019744873046875,
0.0181121826171875,
0.038330078125,
-0.031646728515625,
0.043609619140625,
-0.0252227783203125,
0.0201416015625,
-0.0084686279296875,
-0.06927490234375,
0.050262451171875,
0.0252685546875,
0.0016918182373046875,
-0.00830078125,
-0.018280029296875,
-0.0287933349609375,
-0.013946533203125,
-0.01910400390625,
-0.02142333984375,
-0.03216552734375,
0.016845703125,
-0.07220458984375,
-0.0302276611328125,
-0.01175689697265625,
0.0047760009765625,
-0.032958984375,
-0.027099609375,
-0.0254364013671875,
-0.01074981689453125,
0.015350341796875,
0.006687164306640625,
0.04339599609375,
-0.0032749176025390625,
0.03509521484375,
-0.0275726318359375,
0.00011545419692993164,
-0.004718780517578125,
0.01311492919921875,
0.00669097900390625,
-0.0014181137084960938,
-0.00484466552734375,
-0.02734375,
-0.006404876708984375,
-0.00653839111328125,
0.022064208984375,
0.02984619140625,
0.0150146484375,
-0.042724609375,
-0.03070068359375,
0.01096343994140625,
0.0134124755859375,
0.01253509521484375,
-0.0273895263671875,
-0.0131683349609375,
0.013031005859375,
0.043731689453125,
-0.038116455078125,
-0.0219573974609375,
0.0008311271667480469,
-0.00043010711669921875,
0.0017137527465820312,
0.00971221923828125,
0.040771484375,
-0.03515625,
-0.005092620849609375,
-0.0016355514526367188,
0.0084991455078125,
-0.054718017578125,
0.0263824462890625,
-0.0262603759765625,
0.0191650390625,
0.0211029052734375
]
|
998bc3e38cb8c76ff1a20270a66a6bd402a2fe85 | Wordpress Stackexchange
Q: remove_action on after_setup_theme not working from child theme I am trying to remove a theme action for an elegant-themes theme using a child theme..
This works when I remove action after add_action code anywhere in the parent theme functions.php.
However, it does not work when I add it from child theme functions.php.
remove_action ('after_setup_theme', 'et_pb_setup_theme' , 10);
Remove action has same priority 10 as the add action. Shouldn't it work?
add_action( 'after_setup_theme', 'et_pb_setup_theme' ); //parent theme add_action
A: The functions.php file of child themes is loaded right before the parent theme functions.php, so when you run remove_action in child theme, the action you are trying to remove doesn't exist beacuse it is added later.
| Q: remove_action on after_setup_theme not working from child theme I am trying to remove a theme action for an elegant-themes theme using a child theme..
This works when I remove action after add_action code anywhere in the parent theme functions.php.
However, it does not work when I add it from child theme functions.php.
remove_action ('after_setup_theme', 'et_pb_setup_theme' , 10);
Remove action has same priority 10 as the add action. Shouldn't it work?
add_action( 'after_setup_theme', 'et_pb_setup_theme' ); //parent theme add_action
A: The functions.php file of child themes is loaded right before the parent theme functions.php, so when you run remove_action in child theme, the action you are trying to remove doesn't exist beacuse it is added later.
A: As @cybmeta already pointed out, you are too early with your removal. So you have to defer the actual removal, for instance like so:
add_action( 'after_setup_theme', 'wpdev_170663_remove_parent_theme_stuff', 0 );
function wpdev_170663_remove_parent_theme_stuff() {
remove_action( 'after_setup_theme', 'et_pb_setup_theme' );
}
A: Try (just change the names):
add_action( 'init' , 'myyy_remove' , 15 );
function myyy_remove() {
remove_action('ACTION_NAME', 'my_function_name_Something' ,11);
remove_action('ACTION_NAME', 'my_function_name_Another' ,11);
}
| wordpress | {
"language": "en",
"length": 176,
"provenance": "stackexchange_00019.jsonl.gz:451128",
"question_score": "20",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/170663"
} | [
0.03985595703125,
-0.004669189453125,
-0.021270751953125,
-0.03106689453125,
0.0303802490234375,
-0.045013427734375,
0.051727294921875,
-0.00417327880859375,
0.006412506103515625,
0.0484619140625,
0.003597259521484375,
0.0146331787109375,
0.0151519775390625,
-0.02581787109375,
-0.02880859375,
0.0045623779296875,
0.0182647705078125,
-0.01641845703125,
0.0184173583984375,
-0.017669677734375,
-0.0175628662109375,
-0.0041351318359375,
0.033355712890625,
0.01496124267578125,
0.038970947265625,
-0.01093292236328125,
0.0440673828125,
-0.007778167724609375,
0.01812744140625,
-0.006275177001953125,
0.0217742919921875,
-0.0158538818359375,
-0.018951416015625,
0.053070068359375,
-0.000736236572265625,
-0.0220794677734375,
0.00502777099609375,
0.0179443359375,
0.01325225830078125,
0.0252838134765625,
0.0200042724609375,
-0.01059722900390625,
-0.0196685791015625,
0.013946533203125,
-0.0290374755859375,
-0.03802490234375,
0.020416259765625,
-0.01812744140625,
-0.00543212890625,
-0.0460205078125,
0.0113677978515625,
-0.01384735107421875,
0.04278564453125,
0.0010623931884765625,
-0.0176239013671875,
0.007122039794921875,
-0.0706787109375,
0.027740478515625,
0.013153076171875,
0.09417724609375,
0.031158447265625,
0.013885498046875,
-0.0287933349609375,
-0.07769775390625,
0.0270843505859375,
-0.00490570068359375,
-0.0145416259765625,
0.0228118896484375,
-0.051971435546875,
0.0309906005859375,
0.050384521484375,
-0.0518798828125,
-0.01605224609375,
-0.0145416259765625,
-0.0162811279296875,
-0.01995849609375,
0.00949859619140625,
-0.0239410400390625,
0.01152801513671875,
0.007808685302734375,
-0.022705078125,
-0.0157318115234375,
-0.037384033203125,
-0.0390625,
0.01076507568359375,
-0.00859832763671875,
-0.01800537109375,
0.00402069091796875,
-0.04461669921875,
-0.04058837890625,
-0.039794921875,
-0.09619140625,
-0.02423095703125,
-0.0026340484619140625,
-0.00875091552734375,
-0.0188751220703125,
0.040069580078125,
0.057037353515625,
-0.0207366943359375,
0.0020599365234375,
0.021514892578125,
-0.04742431640625,
0.0325927734375,
-0.053558349609375,
-0.0226287841796875,
-0.0157470703125,
-0.0012941360473632812,
-0.01549530029296875,
-0.00429534912109375,
0.048614501953125,
-0.0194091796875,
-0.04217529296875,
-0.01885986328125,
-0.0169830322265625,
-0.0166473388671875,
0.00818634033203125,
-0.0535888671875,
0.0253753662109375,
0.0123443603515625,
0.0283660888671875,
-0.008392333984375,
0.005504608154296875,
-0.01288604736328125,
-0.0287628173828125,
0.0264434814453125,
-0.0027561187744140625,
-0.035980224609375,
0.012420654296875,
0.061309814453125,
0.0016202926635742188,
-0.058258056640625,
0.002040863037109375,
0.06732177734375,
0.00189208984375,
0.002376556396484375,
-0.023223876953125,
0.0089874267578125,
0.00786590576171875,
0.0246734619140625,
-0.02239990234375,
0.0418701171875,
-0.057159423828125,
-0.039825439453125,
0.0679931640625,
-0.0027866363525390625,
0.0239715576171875,
-0.005344390869140625,
-0.0018310546875,
0.0207366943359375,
-0.046875,
0.03558349609375,
-0.06646728515625,
0.03509521484375,
0.00421905517578125,
-0.0006613731384277344,
-0.01629638671875,
0.0216522216796875,
-0.01308441162109375,
0.00226593017578125,
-0.0257568359375,
0.00789642333984375,
-0.009033203125,
-0.002857208251953125,
-0.045379638671875,
-0.080078125,
0.006649017333984375,
-0.0307769775390625,
-0.012847900390625,
0.0230560302734375,
-0.01174163818359375,
0.048431396484375,
-0.05859375,
-0.005207061767578125,
0.007091522216796875,
-0.0118408203125,
0.044281005859375,
-0.0183258056640625,
0.021942138671875,
0.0255889892578125,
-0.009521484375,
-0.02587890625,
-0.0498046875,
0.0291748046875,
-0.00827789306640625,
-0.0604248046875,
0.005138397216796875,
0.0191192626953125,
0.015899658203125,
0.01168060302734375,
0.020111083984375,
0.04376220703125,
0.035247802734375,
-0.01947021484375,
0.004169464111328125,
0.04345703125,
-0.0120697021484375,
-0.01003265380859375,
-0.011322021484375,
-0.00543212890625,
-0.023040771484375,
-0.01100921630859375,
-0.01293182373046875,
0.055877685546875,
-0.018707275390625,
0.003925323486328125,
0.0195465087890625,
-0.034515380859375,
0.037017822265625,
-0.004581451416015625,
0.03662109375,
0.0171356201171875,
0.01178741455078125,
-0.039093017578125,
-0.019256591796875,
-0.0017900466918945312,
0.01427459716796875,
-0.0018672943115234375,
0.07635498046875,
-0.00518035888671875,
0.056549072265625,
-0.0020751953125,
-0.04522705078125,
0.002681732177734375,
-0.0112152099609375,
0.06304931640625,
0.008758544921875,
-0.04388427734375,
-0.0253143310546875,
0.0018243789672851562,
-0.0072784423828125,
-0.0634765625,
0.0927734375,
0.00989532470703125,
0.035797119140625,
-0.040130615234375,
-0.01001739501953125,
-0.050872802734375,
-0.036895751953125,
-0.00685882568359375,
0.052825927734375,
0.02166748046875,
0.042938232421875,
-0.03961181640625,
-0.032958984375,
0.0251922607421875,
-0.048370361328125,
-0.00196075439453125,
-0.0169830322265625,
0.00222015380859375,
0.030548095703125,
0.020294189453125,
0.006641387939453125,
0.01093292236328125,
-0.0333251953125,
0.008697509765625,
0.0225372314453125,
-0.0158538818359375,
-0.09222412109375,
0.0175323486328125,
-0.004177093505859375,
0.044952392578125,
-0.056884765625,
-0.0987548828125,
0.013458251953125,
0.045166015625,
-0.005748748779296875,
0.0164947509765625,
-0.0016870498657226562,
-0.0278167724609375,
0.007633209228515625,
0.033538818359375,
-0.01128387451171875,
-0.002628326416015625,
0.046417236328125,
0.0136871337890625,
0.0005025863647460938,
0.0011491775512695312,
-0.01264190673828125,
-0.0477294921875,
0.01302337646484375,
-0.00583648681640625,
0.0143585205078125,
0.050384521484375,
-0.006618499755859375,
0.002376556396484375,
-0.022369384765625,
0.029571533203125,
-0.00592803955078125,
0.006748199462890625,
-0.0181121826171875,
-0.006008148193359375,
0.0309906005859375,
-0.02166748046875,
0.053192138671875,
0.02764892578125,
-0.02203369140625,
0.0094451904296875,
-0.0078125,
0.0229034423828125,
-0.0156402587890625,
0.0601806640625,
0.057098388671875,
-0.013214111328125,
0.032379150390625,
0.00212860107421875,
-0.004741668701171875,
0.014739990234375,
-0.02081298828125,
-0.01549530029296875,
0.01116180419921875,
-0.055145263671875,
-0.00925445556640625,
0.02386474609375,
0.0204925537109375,
0.0036220550537109375,
-0.03509521484375,
0.00811767578125,
0.01369476318359375,
-0.01070404052734375,
0.0020198822021484375,
-0.0198822021484375,
-0.050994873046875,
0.0299072265625,
-0.01242828369140625,
-0.011077880859375,
-0.0242767333984375,
0.007427215576171875,
0.02435302734375,
0.004924774169921875,
-0.027008056640625,
0.043975830078125,
-0.0086669921875,
-0.00450897216796875,
-0.056884765625,
0.0252685546875,
-0.018890380859375,
0.0138702392578125,
0.09967041015625,
0.0112152099609375,
-0.058258056640625,
0.0185546875,
-0.0450439453125,
-0.0112762451171875,
0.05120849609375,
0.015625,
-0.00787353515625,
-0.021392822265625,
0.0238800048828125,
0.0098876953125,
-0.00012862682342529297,
-0.030120849609375,
-0.0226898193359375,
-0.041259765625,
-0.013702392578125,
-0.01136016845703125,
-0.00286102294921875,
0.04241943359375,
-0.0151824951171875,
-0.0006189346313476562,
-0.0592041015625,
-0.02923583984375,
0.0007810592651367188,
-0.055023193359375,
0.055389404296875,
0.0386962890625,
-0.0116729736328125,
0.005458831787109375,
-0.0015716552734375,
0.01500701904296875,
0.0076751708984375,
0.04803466796875,
-0.01306915283203125,
0.06304931640625,
-0.033416748046875,
-0.028533935546875,
-0.0775146484375,
0.022125244140625,
-0.0021190643310546875,
0.023681640625,
0.004428863525390625,
0.02532958984375,
-0.01520538330078125,
0.036834716796875,
-0.045623779296875,
-0.026123046875,
0.01058197021484375,
-0.00586700439453125,
0.035430908203125,
-0.02850341796875,
-0.0138092041015625,
-0.0164031982421875,
0.0557861328125,
-0.090576171875,
-0.0215301513671875,
0.0133819580078125,
0.022674560546875,
-0.007415771484375,
-0.0010328292846679688,
-0.045318603515625,
-0.0103759765625,
-0.12115478515625,
0.00177764892578125,
-0.0184478759765625,
-0.02825927734375,
-0.0058135986328125,
0.0406494140625,
-0.062744140625,
-0.053497314453125,
0.04437255859375,
0.0214996337890625,
0.00568389892578125,
-0.0161590576171875,
-0.00762939453125,
-0.0341796875,
0.001682281494140625,
0.002651214599609375,
-0.0236358642578125,
0.0029048919677734375,
-0.06695556640625,
0.039459228515625,
0.05352783203125,
-0.0017461776733398438,
0.0057373046875,
0.033294677734375,
0.037994384765625,
0.0298004150390625,
-0.00263214111328125,
-0.0311431884765625,
-0.0181427001953125,
-0.0211334228515625,
-0.0016622543334960938,
-0.0267181396484375,
-0.01331329345703125,
0.0226287841796875,
-0.038818359375,
0.0027408599853515625,
-0.01467132568359375,
-0.0267486572265625,
0.056640625,
-0.046630859375,
-0.038787841796875,
0.0169830322265625,
-0.0175628662109375,
-0.01308441162109375,
-0.00490570068359375,
-0.0252532958984375,
0.0103912353515625,
-0.047149658203125,
0.0019664764404296875,
-0.040924072265625,
0.0031890869140625,
0.00928497314453125,
0.0321044921875,
0.029541015625,
-0.0106201171875,
0.07281494140625,
0.0182037353515625,
0.028533935546875,
0.02593994140625,
0.0103607177734375,
-0.0196685791015625,
-0.0270843505859375,
0.0137481689453125,
0.01174163818359375,
0.0277557373046875,
-0.03277587890625,
0.063720703125,
0.005779266357421875,
-0.0057525634765625,
0.0274810791015625,
0.0191650390625,
-0.0007228851318359375,
-0.0533447265625,
-0.0224456787109375,
0.0286102294921875,
0.01800537109375,
-0.00014281272888183594,
-0.000934600830078125,
0.01558685302734375,
-0.018035888671875,
0.01026153564453125,
-0.0003790855407714844,
-0.0181121826171875,
0.035003662109375,
0.00017464160919189453,
0.0091552734375,
-0.011322021484375,
-0.002231597900390625,
0.0117340087890625,
-0.0018291473388671875,
0.0408935546875,
-0.034271240234375,
0.04864501953125,
-0.006107330322265625,
-0.007213592529296875,
-0.0053558349609375,
-0.0177154541015625,
0.055511474609375,
0.0170135498046875,
0.013427734375,
-0.037567138671875,
-0.007480621337890625,
0.0552978515625,
-0.0271759033203125,
0.00434112548828125,
0.01415252685546875,
0.005687713623046875,
-0.004726409912109375,
-0.01190948486328125,
0.0133209228515625,
-0.0012235641479492188,
-0.0249481201171875,
-0.0158233642578125,
0.015106201171875,
-0.032562255859375,
0.030426025390625,
-0.01145172119140625,
0.0015430450439453125,
0.0004761219024658203,
-0.0028972625732421875,
-0.0053253173828125,
-0.0293731689453125,
0.02447509765625,
0.0035228729248046875,
-0.0132598876953125,
0.05560302734375,
-0.019256591796875,
0.057647705078125,
-0.01126861572265625,
-0.014404296875,
0.037994384765625,
0.044097900390625,
0.00945281982421875,
0.0070953369140625,
-0.004192352294921875,
-0.00433349609375,
-0.02166748046875,
0.037994384765625,
0.028106689453125,
-0.0306854248046875,
0.00004017353057861328,
0.034149169921875,
0.0224151611328125,
0.0090179443359375,
-0.00879669189453125,
0.041046142578125,
-0.0274505615234375,
0.0012683868408203125,
0.0596923828125,
-0.0257720947265625,
-0.014923095703125,
-0.01309967041015625,
-0.047088623046875,
0.0018024444580078125,
-0.005573272705078125,
-0.03204345703125,
-0.06353759765625,
0.0189208984375,
-0.01288604736328125,
0.0199432373046875,
-0.01318359375,
0.01494598388671875,
-0.047882080078125,
0.03289794921875,
-0.064208984375,
-0.00888824462890625,
0.08038330078125,
0.036712646484375,
-0.0369873046875,
-0.03338623046875,
-0.0289154052734375,
-0.022308349609375,
-0.07720947265625,
-0.055328369140625,
-0.0401611328125,
0.039764404296875,
-0.0166473388671875,
0.005046844482421875,
-0.017791748046875,
0.00870513916015625,
-0.0009560585021972656,
0.040374755859375,
0.00844573974609375,
0.0340576171875,
-0.0022716522216796875,
0.06304931640625,
-0.0033817291259765625,
0.019805908203125,
0.0254974365234375,
0.05364990234375,
0.0008249282836914062,
-0.0305633544921875,
0.017669677734375,
-0.01212310791015625,
0.00925445556640625,
-0.02947998046875,
-0.0007786750793457031,
-0.03070068359375,
0.046630859375,
-0.0027923583984375,
0.0167694091796875,
-0.00829315185546875,
0.004180908203125,
-0.0303955078125,
0.0049591064453125,
-0.01483917236328125,
0.02459716796875,
-0.0256195068359375,
-0.07342529296875,
-0.04052734375,
0.003875732421875,
0.03564453125,
0.02362060546875,
-0.0555419921875,
0.0014934539794921875,
0.053985595703125,
-0.036102294921875,
0.044921875,
0.04254150390625,
-0.00946044921875,
0.04180908203125,
-0.01617431640625,
0.0237884521484375,
0.018890380859375,
0.04266357421875,
-0.049072265625,
-0.035308837890625,
0.0438232421875,
0.03167724609375,
0.00150299072265625,
0.04962158203125,
-0.00783538818359375,
0.002223968505859375,
0.0433349609375,
0.037841796875,
-0.06829833984375,
-0.01593017578125,
-0.0098419189453125,
-0.016998291015625,
0.01464080810546875,
-0.02630615234375,
0.02850341796875,
0.0259552001953125,
0.01056671142578125,
0.0390625,
-0.0172882080078125,
0.01800537109375,
0.0029544830322265625,
0.0094146728515625,
-0.0184478759765625,
0.02349853515625,
0.01229095458984375,
-0.01454925537109375,
0.0296630859375,
0.0294952392578125,
0.02496337890625,
-0.030975341796875,
-0.0004730224609375,
0.01279449462890625,
-0.040252685546875,
-0.049224853515625,
0.0069427490234375,
-0.0235748291015625,
0.012603759765625,
-0.035400390625,
-0.0360107421875,
0.00388336181640625,
0.0303955078125,
-0.0545654296875,
0.0010690689086914062,
0.002895355224609375,
-0.010528564453125,
-0.041168212890625,
0.0123138427734375,
0.022674560546875,
-0.049957275390625,
-0.03582763671875,
0.00795745849609375,
-0.08892822265625,
-0.006793975830078125,
-0.0036869049072265625,
-0.0098419189453125,
0.056182861328125,
-0.044403076171875,
-0.0110931396484375,
0.042144775390625,
0.01538848876953125,
-0.01021575927734375,
0.00553131103515625,
0.01045989990234375,
-0.02996826171875,
-0.0108489990234375,
0.01511383056640625,
-0.00130462646484375,
0.016571044921875,
0.009857177734375,
-0.058135986328125,
0.1072998046875,
-0.0548095703125,
0.03485107421875,
-0.0165557861328125,
0.0516357421875,
0.00211334228515625,
0.022064208984375,
-0.0322265625,
0.0614013671875,
0.06597900390625,
0.0211639404296875,
-0.01113128662109375,
-0.01409149169921875,
0.00893402099609375,
0.0200958251953125,
0.040130615234375,
-0.0007462501525878906,
-0.032562255859375,
-0.0008196830749511719,
0.051849365234375,
0.01285552978515625,
-0.0023784637451171875,
0.0282135009765625,
0.005031585693359375,
-0.065673828125,
-0.034515380859375,
0.0170440673828125,
0.0227203369140625,
-0.0606689453125,
-0.01522064208984375,
0.019256591796875,
0.0161285400390625,
0.0021533966064453125,
0.0019121170043945312,
0.0301666259765625,
-0.03485107421875,
0.007419586181640625,
0.02886962890625,
-0.006435394287109375,
-0.01186370849609375,
0.01611328125,
0.002872467041015625,
0.0204925537109375,
-0.018829345703125,
-0.0079193115234375,
0.0276641845703125,
0.0150604248046875,
0.03564453125,
-0.00766754150390625,
0.020599365234375,
-0.051910400390625,
0.006137847900390625,
0.026519775390625,
0.06915283203125,
-0.08203125,
0.00229644775390625,
0.0188446044921875,
0.02587890625,
0.03289794921875,
0.07659912109375,
-0.0208892822265625,
-0.0195159912109375,
-0.0292205810546875,
-0.017608642578125,
0.0041656494140625,
-0.01499176025390625,
-0.006534576416015625,
-0.0250396728515625,
-0.010284423828125,
-0.02410888671875,
0.00041365623474121094,
-0.023590087890625,
-0.0034008026123046875,
0.006504058837890625,
0.03466796875,
0.004344940185546875,
0.031280517578125,
-0.03631591796875,
-0.021942138671875,
-0.0288543701171875,
-0.0174102783203125,
-0.00389862060546875,
0.041259765625,
0.0208740234375,
0.043701171875,
-0.0212860107421875,
-0.0216827392578125,
-0.032867431640625,
0.03570556640625,
-0.034759521484375,
0.05755615234375,
-0.04559326171875,
-0.0275726318359375,
-0.01300048828125,
0.033721923828125,
0.017791748046875,
0.022491455078125,
0.01898193359375,
0.0084075927734375,
0.023773193359375,
-0.00024437904357910156,
0.00966644287109375,
-0.0128936767578125,
-0.0032176971435546875,
-0.028900146484375,
-0.006725311279296875,
-0.0007348060607910156,
0.00026607513427734375,
-0.02056884765625,
0.0081634521484375,
0.01389312744140625,
0.0081787109375,
-0.006893157958984375,
0.0175933837890625,
-0.00926971435546875,
0.01654052734375,
0.00801849365234375,
0.007495880126953125,
0.02191162109375,
-0.0251922607421875,
-0.029296875,
-0.0046844482421875,
0.015594482421875,
0.0120849609375,
0.032684326171875,
0.01361846923828125,
0.0142364501953125,
-0.011566162109375,
-0.0204925537109375,
-0.005245208740234375,
0.0194549560546875,
0.0031337738037109375,
0.050323486328125,
0.005527496337890625,
0.01227569580078125,
0.03692626953125,
0.00569915771484375,
0.0170135498046875,
0.041595458984375,
0.00998687744140625,
0.080810546875,
-0.0704345703125,
0.0222930908203125,
-0.0281829833984375,
0.046112060546875,
-0.01251220703125,
-0.0272674560546875,
0.0501708984375,
0.043182373046875,
-0.005279541015625,
-0.022735595703125,
-0.07220458984375,
0.0232391357421875,
0.020904541015625,
-0.00782012939453125,
0.0166473388671875,
0.0089111328125,
0.0144500732421875,
-0.0030670166015625,
0.004467010498046875,
-0.005336761474609375,
-0.0158538818359375,
-0.0117340087890625,
0.0027751922607421875,
0.0300140380859375,
0.046630859375,
0.01308441162109375,
-0.0206756591796875,
0.045562744140625,
0.0156097412109375,
0.0122528076171875,
0.07421875,
-0.00640106201171875,
0.016815185546875,
-0.01117706298828125,
-0.031524658203125,
0.03985595703125,
-0.01324462890625,
0.0439453125,
0.005687713623046875,
0.0726318359375,
0.05096435546875,
-0.041351318359375,
-0.01001739501953125,
0.0286865234375,
0.0211334228515625,
-0.017059326171875,
0.005214691162109375,
0.040069580078125,
-0.0294952392578125,
-0.009857177734375,
-0.0129852294921875,
-0.00959014892578125,
-0.0178375244140625,
-0.00731658935546875,
0.01480865478515625,
-0.02593994140625,
0.01399993896484375,
-0.028167724609375,
-0.0005121231079101562,
0.04351806640625,
0.04302978515625,
-0.09588623046875,
0.0455322265625,
-0.0007610321044921875,
0.0172576904296875,
0.01849365234375,
0.004154205322265625,
-0.008026123046875,
0.005092620849609375,
-0.031982421875,
-0.024658203125,
-0.0335693359375,
0.03607177734375,
-0.03021240234375,
-0.00006020069122314453,
0.0035037994384765625,
0.009002685546875,
-0.010650634765625,
-0.00739288330078125,
-0.0068817138671875,
0.035888671875,
-0.0006961822509765625,
-0.0295257568359375,
-0.0166168212890625,
0.023529052734375,
0.004764556884765625,
-0.0228271484375,
0.02923583984375,
-0.042633056640625,
-0.026763916015625,
-0.054962158203125,
0.03582763671875,
0.038726806640625,
-0.02618408203125,
-0.02520751953125,
0.036590576171875,
-0.013397216796875,
-0.01885986328125,
-0.0251617431640625,
0.03570556640625,
-0.0166473388671875,
0.0248260498046875,
0.00030541419982910156,
0.013916015625,
0.03289794921875,
0.043426513671875,
0.0021266937255859375,
0.0257110595703125,
0.01296234130859375,
-0.0176239013671875,
-0.025604248046875,
0.0014743804931640625,
0.003528594970703125,
0.01316070556640625,
0.007366180419921875,
-0.0269012451171875,
0.0570068359375,
0.0217437744140625,
-0.0186920166015625,
0.04034423828125,
0.027557373046875,
-0.013214111328125,
-0.026092529296875,
-0.010345458984375,
0.006587982177734375,
0.0312347412109375,
0.0279998779296875,
0.0367431640625,
-0.00580596923828125,
-0.0312042236328125,
-0.022003173828125,
-0.03094482421875,
-0.01123809814453125,
-0.00809478759765625,
0.011810302734375,
-0.053436279296875,
0.013824462890625,
0.0186309814453125,
-0.023162841796875,
0.0017461776733398438,
-0.0306243896484375,
-0.045135498046875,
0.0019311904907226562,
0.002124786376953125,
0.035491943359375,
-0.05059814453125,
-0.01959228515625,
0.027496337890625,
-0.016632080078125,
-0.0015134811401367188,
-0.0102386474609375,
0.0175018310546875,
0.0006084442138671875,
0.0191192626953125,
0.0731201171875,
0.04315185546875,
-0.03887939453125,
0.009124755859375,
0.045623779296875,
0.022857666015625,
-0.0145416259765625,
-0.06170654296875,
-0.01385498046875,
0.0026187896728515625,
-0.0260162353515625,
-0.0163726806640625,
0.00884246826171875,
0.06036376953125,
-0.014068603515625,
0.1358642578125,
0.0162506103515625,
0.12078857421875,
0.0027942657470703125,
0.040374755859375,
0.0258636474609375,
-0.0211334228515625,
0.058349609375,
-0.0302276611328125,
-0.01532745361328125,
-0.01190185546875,
-0.004108428955078125,
-0.092529296875,
0.05267333984375,
0.006694793701171875,
0.0148162841796875,
0.036865234375
]
|
b397462eac75b79c9e82e1d4283eeb8fda329714 | Wordpress Stackexchange
Q: Give to site admin the option to "skip confirmation email" when adding new user in wordpress multisite when we give to site admin the option to add new users, site admin dont have the "checkbox" to add the new user without sending the user email with link activation (see the screenshot)
how can we add this option to site admin?
A: Paste this in your functions.php file:
function my_skip_confirmation_email() {
if ( is_multisite() && current_user_can( 'create_users' ) ) { ?>
<table class="form-table">
<tr>
<th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>
<td>
<input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" />
<label for="noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label>
</td>
</tr>
</table>
<?php }
}
add_action( 'user_new_form', 'my_skip_confirmation_email' );
| Q: Give to site admin the option to "skip confirmation email" when adding new user in wordpress multisite when we give to site admin the option to add new users, site admin dont have the "checkbox" to add the new user without sending the user email with link activation (see the screenshot)
how can we add this option to site admin?
A: Paste this in your functions.php file:
function my_skip_confirmation_email() {
if ( is_multisite() && current_user_can( 'create_users' ) ) { ?>
<table class="form-table">
<tr>
<th scope="row"><?php _e( 'Skip Confirmation Email' ); ?></th>
<td>
<input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" />
<label for="noconfirmation"><?php _e( 'Add the user without sending an email that requires their confirmation.' ); ?></label>
</td>
</tr>
</table>
<?php }
}
add_action( 'user_new_form', 'my_skip_confirmation_email' );
A: Add the following to your funcitons.php file
function skp_custom_user_create_fields($user){
if (!is_super_admin( $user_id )) {
?>
<table class="form-table">
<tr>
<th scope="row"><?php _e('Skip Confirmation Email') ?></th>
<td><input type = "checkbox" name = "noconfirmation" value = "1" <?php checked( $_POST['noconfirmation'], 1 ); ?> /> Add the user without sending an email that requires their confirmation.</td>
</tr>
</table>
<?php
}
}
add_action("user_new_form", "skp_custom_user_create_fields");
function skp_auto_activate_users($user, $user_email, $key, $meta){
if(!current_user_can('manage_options'))
return false;
if (!empty($_POST['noconfirmation']) && $_POST['noconfirmation'] == 1) {
wpmu_activate_signup($key);
return false;
}
}
add_filter('wpmu_signup_user_notification', 'skp_auto_activate_users', 10, 4);
That would do the job.
| wordpress | {
"language": "en",
"length": 214,
"provenance": "stackexchange_00019.jsonl.gz:451158",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/170799"
} | [
0.0960693359375,
-0.0104827880859375,
0.0163116455078125,
-0.050384521484375,
0.0213165283203125,
-0.05438232421875,
0.0330810546875,
-0.034149169921875,
0.00508880615234375,
0.0148468017578125,
-0.021331787109375,
-0.01172637939453125,
0.00841522216796875,
-0.036895751953125,
0.005420684814453125,
-0.0228271484375,
-0.007633209228515625,
0.0283355712890625,
-0.00753021240234375,
-0.02105712890625,
-0.01380157470703125,
-0.00677490234375,
-0.038177490234375,
-0.03277587890625,
-0.03997802734375,
0.034149169921875,
0.035003662109375,
0.000728607177734375,
-0.0305023193359375,
-0.00623321533203125,
-0.0120391845703125,
0.002407073974609375,
0.0167388916015625,
0.037933349609375,
-0.057525634765625,
-0.0271759033203125,
0.01029205322265625,
0.00548553466796875,
0.005077362060546875,
0.0238037109375,
0.01317596435546875,
-0.003223419189453125,
-0.006893157958984375,
0.0138092041015625,
-0.0118560791015625,
-0.0474853515625,
0.025787353515625,
-0.03192138671875,
0.03143310546875,
-0.00724029541015625,
0.016815185546875,
-0.0147247314453125,
0.044036865234375,
-0.06512451171875,
-0.0222320556640625,
-0.006908416748046875,
0.0021839141845703125,
-0.006023406982421875,
0.020477294921875,
0.04168701171875,
-0.00820159912109375,
0.0201568603515625,
-0.00872039794921875,
-0.050018310546875,
0.002105712890625,
-0.0241241455078125,
-0.026702880859375,
0.00418853759765625,
-0.0012731552124023438,
0.0198516845703125,
0.045257568359375,
-0.00601959228515625,
0.00637054443359375,
-0.029998779296875,
-0.01502227783203125,
0.01837158203125,
-0.01276397705078125,
-0.002044677734375,
0.0196075439453125,
-0.007335662841796875,
-0.0054168701171875,
0.00868988037109375,
-0.02587890625,
-0.027191162109375,
0.00981903076171875,
0.002124786376953125,
-0.0105133056640625,
-0.00946807861328125,
-0.0175323486328125,
-0.00958251953125,
-0.020416259765625,
-0.0244293212890625,
0.0169830322265625,
-0.01052093505859375,
-0.03900146484375,
-0.0246734619140625,
0.01239776611328125,
0.030792236328125,
-0.00603485107421875,
-0.036712646484375,
-0.0179443359375,
-0.00853729248046875,
-0.05621337890625,
-0.0084991455078125,
-0.012451171875,
0.071044921875,
0.0010509490966796875,
-0.02545166015625,
-0.01009368896484375,
0.008575439453125,
0.0156402587890625,
-0.032745361328125,
-0.033416748046875,
-0.0276641845703125,
-0.0066680908203125,
0.02685546875,
-0.04290771484375,
0.032989501953125,
0.0048980712890625,
0.02081298828125,
-0.01439666748046875,
0.01174163818359375,
-0.052154541015625,
0.0017385482788085938,
0.01134490966796875,
-0.0197601318359375,
-0.008575439453125,
0.023284912109375,
-0.04656982421875,
0.00765228271484375,
-0.039154052734375,
0.01708984375,
0.066650390625,
0.05255126953125,
0.027923583984375,
-0.01399993896484375,
-0.0008234977722167969,
0.033355712890625,
-0.020599365234375,
0.0271453857421875,
0.00856781005859375,
-0.06341552734375,
-0.038360595703125,
0.0085601806640625,
-0.0072479248046875,
0.047882080078125,
0.01003265380859375,
-0.020721435546875,
0.0195770263671875,
-0.0167236328125,
-0.0517578125,
-0.052764892578125,
-0.0005116462707519531,
0.00673675537109375,
-0.0194854736328125,
0.0018472671508789062,
-0.0285491943359375,
0.0031585693359375,
-0.00980377197265625,
0.0009775161743164062,
0.00930023193359375,
-0.0175933837890625,
0.0146942138671875,
-0.003871917724609375,
-0.032440185546875,
0.0209197998046875,
-0.03997802734375,
-0.00995635986328125,
0.0241851806640625,
-0.02099609375,
0.0173492431640625,
-0.0114593505859375,
0.05303955078125,
0.017730712890625,
-0.0016431808471679688,
0.0263214111328125,
0.034637451171875,
0.01165008544921875,
0.031005859375,
0.01306915283203125,
-0.0063323974609375,
-0.0175018310546875,
0.105712890625,
-0.03900146484375,
-0.04656982421875,
0.034698486328125,
-0.000995635986328125,
0.039276123046875,
0.0009493827819824219,
0.00621795654296875,
0.0183563232421875,
0.05157470703125,
0.041839599609375,
-0.00785064697265625,
-0.0143890380859375,
-0.035430908203125,
-0.03363037109375,
-0.002033233642578125,
-0.035186767578125,
0.0267486572265625,
0.035980224609375,
-0.035858154296875,
0.07159423828125,
-0.0543212890625,
0.00853729248046875,
-0.01153564453125,
-0.01265716552734375,
0.01067352294921875,
0.002483367919921875,
0.02508544921875,
0.01364898681640625,
0.00884246826171875,
-0.021514892578125,
-0.002532958984375,
0.0023593902587890625,
-0.01189422607421875,
-0.0091400146484375,
0.060943603515625,
0.012054443359375,
0.03857421875,
-0.004352569580078125,
-0.049560546875,
0.0180206298828125,
-0.027130126953125,
0.0149993896484375,
-0.061676025390625,
0.01273345947265625,
-0.041656494140625,
0.00400543212890625,
-0.0167694091796875,
-0.00691986083984375,
0.046630859375,
0.005115509033203125,
-0.006256103515625,
-0.0537109375,
0.01285552978515625,
-0.00289154052734375,
0.01360321044921875,
-0.016265869140625,
0.026275634765625,
0.03515625,
0.01226043701171875,
0.010223388671875,
0.03399658203125,
0.0149078369140625,
-0.0214080810546875,
0.024078369140625,
-0.0079498291015625,
-0.0207672119140625,
0.0247650146484375,
-0.0124359130859375,
0.00443267822265625,
0.01486968994140625,
-0.03155517578125,
-0.01403045654296875,
0.03765869140625,
0.0265960693359375,
-0.021331787109375,
-0.018402099609375,
0.005062103271484375,
0.03936767578125,
-0.03253173828125,
-0.07635498046875,
0.0175628662109375,
-0.041351318359375,
-0.01073455810546875,
-0.021697998046875,
-0.01385498046875,
0.0032634735107421875,
-0.01296234130859375,
0.0199737548828125,
-0.052215576171875,
-0.0081939697265625,
-0.0045166015625,
0.052947998046875,
0.016204833984375,
-0.048370361328125,
-0.0006299018859863281,
0.035308837890625,
0.0128326416015625,
-0.043548583984375,
-0.02044677734375,
0.053009033203125,
0.0035762786865234375,
0.00826263427734375,
-0.038543701171875,
0.059783935546875,
-0.037506103515625,
0.011688232421875,
-0.022064208984375,
0.031524658203125,
-0.02545166015625,
-0.03570556640625,
0.0215606689453125,
-0.0040435791015625,
-0.05316162109375,
-0.030670166015625,
0.021392822265625,
-0.01065826416015625,
-0.0026569366455078125,
0.0278778076171875,
0.065185546875,
0.01837158203125,
-0.007114410400390625,
-0.007099151611328125,
-0.0091705322265625,
-0.00914764404296875,
0.012664794921875,
-0.00020825862884521484,
-0.040069580078125,
0.00920867919921875,
0.0303802490234375,
0.0076904296875,
0.004543304443359375,
-0.007335662841796875,
-0.0196685791015625,
-0.00955963134765625,
-0.0165252685546875,
-0.01090240478515625,
-0.01152801513671875,
-0.058349609375,
-0.0679931640625,
-0.0091705322265625,
0.0234222412109375,
-0.033843994140625,
-0.001010894775390625,
0.056304931640625,
0.0202484130859375,
-0.04986572265625,
-0.007305145263671875,
-0.017974853515625,
-0.03253173828125,
-0.031890869140625,
0.0009284019470214844,
-0.0185546875,
0.01268768310546875,
0.00673675537109375,
0.00041413307189941406,
-0.004608154296875,
-0.00853729248046875,
0.00634765625,
-0.038482666015625,
0.0040740966796875,
-0.0196685791015625,
-0.021575927734375,
0.005107879638671875,
0.01739501953125,
0.0116424560546875,
0.0005402565002441406,
0.012939453125,
-0.00621795654296875,
-0.0281219482421875,
0.0142974853515625,
-0.0199432373046875,
0.0005960464477539062,
0.00782012939453125,
-0.00811004638671875,
0.005573272705078125,
0.01270294189453125,
-0.035064697265625,
0.006649017333984375,
0.0229644775390625,
-0.022003173828125,
-0.05010986328125,
-0.00527191162109375,
-0.02215576171875,
0.0189056396484375,
-0.035980224609375,
0.0272979736328125,
0.005374908447265625,
0.00249481201171875,
0.01165008544921875,
-0.024261474609375,
-0.0099029541015625,
0.00319671630859375,
-0.0034847259521484375,
0.031982421875,
-0.015594482421875,
0.0244903564453125,
0.0022716522216796875,
0.00860595703125,
-0.0180511474609375,
0.0167236328125,
-0.045135498046875,
-0.08990478515625,
0.03643798828125,
-0.042755126953125,
0.0350341796875,
-0.061279296875,
-0.0183563232421875,
0.0014019012451171875,
0.1268310546875,
0.0154876708984375,
-0.0247344970703125,
-0.0035457611083984375,
0.021392822265625,
-0.039642333984375,
-0.0428466796875,
0.0181427001953125,
0.002277374267578125,
-0.03424072265625,
0.00974273681640625,
-0.0040435791015625,
-0.01776123046875,
-0.005340576171875,
-0.02850341796875,
-0.00927734375,
-0.0258026123046875,
0.0239105224609375,
-0.032257080078125,
0.020843505859375,
0.0145263671875,
0.00669097900390625,
-0.01441192626953125,
-0.01094818115234375,
-0.036376953125,
-0.01502227783203125,
-0.0026302337646484375,
-0.0215301513671875,
-0.0032253265380859375,
-0.0062103271484375,
0.052886962890625,
-0.041168212890625,
-0.00476837158203125,
-0.012939453125,
-0.0196075439453125,
-0.018218994140625,
0.0081024169921875,
-0.00034546852111816406,
0.0104522705078125,
-0.0302276611328125,
-0.0038051605224609375,
0.003673553466796875,
0.0090484619140625,
-0.0078125,
0.026611328125,
-0.038665771484375,
-0.011566162109375,
0.00015342235565185547,
-0.0302734375,
-0.049957275390625,
-0.061492919921875,
-0.02984619140625,
0.02459716796875,
-0.0205841064453125,
-0.00591278076171875,
-0.06732177734375,
-0.0693359375,
0.0254058837890625,
-0.045684814453125,
-0.015350341796875,
0.00479888916015625,
0.034637451171875,
0.0230712890625,
-0.0010404586791992188,
0.015472412109375,
0.004669189453125,
0.040557861328125,
-0.018951416015625,
0.0311737060546875,
0.037811279296875,
-0.0228729248046875,
0.0185394287109375,
0.02178955078125,
0.036773681640625,
-0.04376220703125,
0.04608154296875,
-0.0054931640625,
-0.03863525390625,
0.0430908203125,
-0.007419586181640625,
-0.0123138427734375,
0.037506103515625,
0.022918701171875,
-0.0247344970703125,
0.0298919677734375,
0.0081787109375,
0.0043487548828125,
-0.03387451171875,
-0.0058441162109375,
-0.03717041015625,
0.007007598876953125,
-0.037750244140625,
-0.020660400390625,
0.03021240234375,
-0.0025768280029296875,
-0.0125732421875,
-0.0169830322265625,
-0.011322021484375,
-0.0215606689453125,
-0.01849365234375,
-0.01035308837890625,
0.01386260986328125,
-0.02496337890625,
-0.01520538330078125,
-0.002483367919921875,
-0.0121612548828125,
0.0361328125,
0.0294189453125,
-0.0240631103515625,
-0.00856781005859375,
0.013824462890625,
0.0577392578125,
-0.02410888671875,
0.020050048828125,
0.0618896484375,
0.0308380126953125,
-0.024444580078125,
-0.02410888671875,
0.005397796630859375,
0.0075836181640625,
-0.0703125,
0.003326416015625,
0.022613525390625,
-0.020538330078125,
0.07537841796875,
0.00972747802734375,
-0.0004608631134033203,
0.042388916015625,
-0.021270751953125,
0.043670654296875,
0.1051025390625,
-0.03253173828125,
0.0179443359375,
0.05133056640625,
-0.03961181640625,
-0.02642822265625,
0.01715087890625,
-0.0218963623046875,
-0.0251007080078125,
0.048553466796875,
0.045013427734375,
0.036834716796875,
0.01287078857421875,
-0.050933837890625,
-0.01113128662109375,
-0.0230712890625,
0.044708251953125,
0.0400390625,
-0.029998779296875,
-0.0247955322265625,
-0.0078277587890625,
-0.0022735595703125,
0.0007853507995605469,
-0.008514404296875,
0.01323699951171875,
-0.0291748046875,
-0.00028061866760253906,
0.03216552734375,
-0.019805908203125,
-0.0284423828125,
-0.0211029052734375,
0.01432037353515625,
-0.0248260498046875,
-0.01486968994140625,
0.004791259765625,
0.014892578125,
-0.0308685302734375,
-0.01462554931640625,
0.0400390625,
0.01036834716796875,
0.030181884765625,
-0.058990478515625,
-0.0039215087890625,
-0.052398681640625,
-0.0189666748046875,
0.0528564453125,
0.011871337890625,
0.018524169921875,
-0.0234375,
-0.062469482421875,
-0.06658935546875,
-0.06634521484375,
-0.0029048919677734375,
-0.044586181640625,
0.04962158203125,
0.01122283935546875,
-0.0047760009765625,
-0.0204925537109375,
-0.06512451171875,
-0.0283355712890625,
0.024932861328125,
0.060577392578125,
-0.002292633056640625,
-0.0245208740234375,
0.0509033203125,
-0.0120391845703125,
0.0469970703125,
0.0192718505859375,
0.028472900390625,
-0.003849029541015625,
-0.02642822265625,
0.0029544830322265625,
-0.02777099609375,
-0.0294952392578125,
-0.0017709732055664062,
-0.04669189453125,
0.01419830322265625,
0.057647705078125,
-0.0112457275390625,
0.01220703125,
0.020843505859375,
0.0027942657470703125,
-0.0164031982421875,
-0.00371551513671875,
0.049591064453125,
0.0306854248046875,
0.01461029052734375,
-0.02130126953125,
0.0099639892578125,
0.0006866455078125,
-0.0024127960205078125,
-0.00286865234375,
-0.0118560791015625,
0.006439208984375,
0.0027904510498046875,
-0.0760498046875,
0.050811767578125,
0.08233642578125,
0.01220703125,
0.05267333984375,
0.00962066650390625,
0.0196075439453125,
0.040191650390625,
0.0016260147094726562,
-0.005176544189453125,
-0.050750732421875,
0.053741455078125,
0.0164642333984375,
-0.02496337890625,
0.0499267578125,
-0.031890869140625,
0.0361328125,
0.08526611328125,
0.10296630859375,
-0.1099853515625,
0.0210113525390625,
0.0087890625,
-0.005596160888671875,
0.05010986328125,
-0.01556396484375,
-0.021514892578125,
-0.06781005859375,
0.061767578125,
-0.04217529296875,
-0.0293731689453125,
-0.01285552978515625,
-0.038116455078125,
-0.0208740234375,
-0.00347137451171875,
-0.0208740234375,
0.01132965087890625,
0.00568389892578125,
0.0258331298828125,
-0.01294708251953125,
0.03570556640625,
0.002838134765625,
0.00794219970703125,
0.006427764892578125,
-0.02178955078125,
-0.050323486328125,
-0.016632080078125,
-0.00743865966796875,
-0.0311431884765625,
-0.0191192626953125,
-0.003841400146484375,
0.058074951171875,
0.049835205078125,
-0.01345062255859375,
-0.017578125,
0.02935791015625,
0.0034847259521484375,
-0.033111572265625,
-0.010528564453125,
0.00983428955078125,
-0.039886474609375,
-0.0186767578125,
0.0306243896484375,
-0.033935546875,
-0.0423583984375,
0.00769805908203125,
0.038299560546875,
0.01085662841796875,
-0.01238250732421875,
-0.02044677734375,
0.060333251953125,
-0.0005178451538085938,
-0.0239715576171875,
0.0006051063537597656,
0.0067596435546875,
-0.06976318359375,
-0.07110595703125,
0.00943756103515625,
-0.06195068359375,
-0.00286865234375,
0.0150299072265625,
-0.056671142578125,
0.07379150390625,
0.0308380126953125,
0.00868988037109375,
0.0030117034912109375,
0.037322998046875,
-0.032196044921875,
0.01024627685546875,
-0.028594970703125,
0.04486083984375,
-0.0164794921875,
0.06793212890625,
-0.07220458984375,
-0.0097808837890625,
0.01473236083984375,
0.037872314453125,
0.07879638671875,
0.02484130859375,
-0.023956298828125,
-0.0208587646484375,
0.004878997802734375,
0.034759521484375,
-0.0289459228515625,
0.0300140380859375,
0.00829315185546875,
0.03900146484375,
0.037139892578125,
-0.0384521484375,
0.00797271728515625,
0.024871826171875,
-0.02789306640625,
0.041900634765625,
-0.0144195556640625,
-0.03143310546875,
0.0208740234375,
0.033966064453125,
-0.033721923828125,
0.0112762451171875,
0.026824951171875,
-0.0260772705078125,
-0.008636474609375,
0.004093170166015625,
-0.01305389404296875,
-0.0137939453125,
0.037322998046875,
-0.025360107421875,
0.036102294921875,
0.007564544677734375,
0.033660888671875,
0.0322265625,
0.02410888671875,
0.040069580078125,
0.01398468017578125,
0.014739990234375,
0.0258026123046875,
-0.007598876953125,
0.013275146484375,
-0.03143310546875,
0.0236358642578125,
-0.07965087890625,
-0.0428466796875,
0.0302276611328125,
0.033416748046875,
-0.0022487640380859375,
-0.022979736328125,
0.008148193359375,
0.007709503173828125,
0.0278472900390625,
0.00879669189453125,
0.07550048828125,
-0.0212554931640625,
-0.02691650390625,
-0.05499267578125,
0.0027408599853515625,
0.0328369140625,
-0.0010929107666015625,
-0.01824951171875,
-0.0003800392150878906,
-0.0003159046173095703,
0.0137176513671875,
-0.042755126953125,
0.0147857666015625,
0.004573822021484375,
0.01091766357421875,
0.02532958984375,
0.006099700927734375,
0.0482177734375,
-0.002986907958984375,
-0.03125,
0.00884246826171875,
0.040740966796875,
0.0157623291015625,
-0.00720977783203125,
0.0232391357421875,
0.0121307373046875,
0.01047515869140625,
-0.0123138427734375,
0.01267242431640625,
0.0665283203125,
0.06219482421875,
-0.036407470703125,
-0.0242462158203125,
0.02191162109375,
-0.02740478515625,
0.0423583984375,
-0.052886962890625,
0.033294677734375,
0.01027679443359375,
-0.0018625259399414062,
-0.0030994415283203125,
-0.01030731201171875,
0.06671142578125,
-0.038177490234375,
0.0178070068359375,
-0.014892578125,
-0.043792724609375,
0.01312255859375,
0.0032176971435546875,
0.052001953125,
-0.0103759765625,
-0.06390380859375,
-0.027679443359375,
0.0169830322265625,
-0.00218963623046875,
0.003276824951171875,
0.030792236328125,
-0.0374755859375,
0.051177978515625,
0.01532745361328125,
0.01611328125,
0.0206146240234375,
-0.02728271484375,
-0.01451873779296875,
-0.0220184326171875,
0.03277587890625,
-0.01000213623046875,
-0.070556640625,
-0.00359344482421875,
0.006198883056640625,
-0.020172119140625,
-0.02325439453125,
0.06005859375,
0.021209716796875,
-0.0090484619140625,
-0.003704071044921875,
0.0277557373046875,
-0.0231475830078125,
-0.031097412109375,
0.0294036865234375,
0.01540374755859375,
0.015655517578125,
-0.00896453857421875,
-0.02789306640625,
0.06243896484375,
0.0032405853271484375,
-0.006008148193359375,
0.0750732421875,
-0.01361846923828125,
-0.0248870849609375,
-0.01983642578125,
0.04913330078125,
-0.0147857666015625,
-0.052886962890625,
-0.056732177734375,
0.0089263916015625,
0.0207061767578125,
0.048828125,
-0.04925537109375,
0.03411865234375,
-0.0049591064453125,
-0.01953125,
-0.001438140869140625,
-0.0192108154296875,
-0.0166473388671875,
0.035369873046875,
-0.0024127960205078125,
0.021697998046875,
0.0254058837890625,
-0.011444091796875,
0.0173797607421875,
0.00850677490234375,
-0.02423095703125,
0.026947021484375,
-0.0328369140625,
0.00695037841796875,
0.024444580078125,
0.01171112060546875,
-0.0296783447265625,
-0.004367828369140625,
0.052764892578125,
-0.0185394287109375,
0.0027446746826171875,
-0.04150390625,
-0.031585693359375,
-0.062744140625,
0.03155517578125,
0.040802001953125,
-0.00844573974609375,
0.01922607421875,
-0.01541900634765625,
0.034759521484375,
0.02911376953125,
0.0103607177734375,
-0.07904052734375,
0.05987548828125,
-0.036834716796875,
0.042144775390625,
-0.0222625732421875,
0.02899169921875,
-0.01386260986328125,
0.0287628173828125,
-0.03765869140625,
-0.0411376953125,
-0.02569580078125,
0.04986572265625,
-0.0309906005859375,
-0.032073974609375,
0.01261138916015625,
0.021331787109375,
-0.0080718994140625,
-0.06744384765625,
-0.04595947265625,
-0.01380157470703125,
-0.0221099853515625,
-0.00437164306640625,
0.0227508544921875,
-0.01493072509765625,
-0.0182342529296875,
-0.048004150390625,
-0.0008187294006347656,
-0.05413818359375,
-0.00930023193359375,
-0.0031833648681640625,
0.009185791015625,
0.02691650390625,
-0.0274200439453125,
-0.0916748046875,
0.065185546875,
-0.0222320556640625,
-0.0298919677734375,
-0.042694091796875,
-0.025421142578125,
-0.019805908203125,
0.03656005859375,
-0.00377655029296875,
-0.04119873046875,
-0.032501220703125,
0.03985595703125,
0.005863189697265625,
0.0169219970703125,
0.013336181640625,
0.00940704345703125,
-0.04248046875,
0.0006651878356933594,
-0.006626129150390625,
0.00302886962890625,
0.0467529296875,
-0.049530029296875,
0.075439453125,
0.07470703125,
-0.0228118896484375,
-0.040283203125,
-0.0002624988555908203,
-0.0645751953125,
-0.035797119140625,
-0.05108642578125,
-0.031829833984375,
-0.0271148681640625,
0.1041259765625,
0.04559326171875,
0.0233154296875,
-0.032196044921875,
-0.011993408203125,
-0.0024261474609375,
-0.008026123046875,
-0.028472900390625,
0.0196685791015625,
-0.0736083984375,
-0.0268402099609375,
0.005306243896484375,
-0.0268402099609375,
0.0258941650390625,
-0.006046295166015625,
-0.03765869140625,
0.01373291015625,
0.0024852752685546875,
-0.006221771240234375,
-0.056854248046875,
0.01517486572265625,
0.003631591796875,
-0.026092529296875,
-0.052490234375,
-0.0098724365234375,
-0.00044798851013183594,
-0.0430908203125,
-0.01580810546875,
0.006439208984375,
0.022796630859375,
-0.049224853515625,
0.0177459716796875,
-0.002460479736328125,
0.0292510986328125,
-0.051513671875,
-0.006866455078125,
0.0153350830078125,
0.0220184326171875,
-0.014129638671875,
0.00809478759765625,
-0.0005025863647460938,
0.043121337890625,
-0.0213165283203125,
0.06829833984375,
-0.01068878173828125,
-0.00902557373046875,
-0.035552978515625,
0.045135498046875,
0.021636962890625,
-0.007137298583984375,
0.065673828125,
-0.0237274169921875,
0.00478363037109375,
-0.0033817291259765625,
0.0287933349609375,
-0.035308837890625,
-0.0007886886596679688,
0.004917144775390625,
0.038543701171875,
0.0197906494140625
]
|
ebaae329ed01867d75ff783a367f71bdbf92dc2a | Wordpress Stackexchange
Q: Send attachments via wp_mail from temporary folder Is it possible to send attachment via wp_mail, using temporary file, instad of uploading them to any actual folder on server?
For example:
<input type="file" name="file">
$attachment[] = $_FILES['file']['name'];
wp_mail(....,$attachment);
Documentation:
The filenames in the $attachments attribute have to be filesystem
paths.
How can i get the path for temporary file (if this is possible)?
A: Yes. it's possible. Attachment file contents are taken by wp_mail call.
Use $_FILES['file']['tmp_name'] for filename
| Q: Send attachments via wp_mail from temporary folder Is it possible to send attachment via wp_mail, using temporary file, instad of uploading them to any actual folder on server?
For example:
<input type="file" name="file">
$attachment[] = $_FILES['file']['name'];
wp_mail(....,$attachment);
Documentation:
The filenames in the $attachments attribute have to be filesystem
paths.
How can i get the path for temporary file (if this is possible)?
A: Yes. it's possible. Attachment file contents are taken by wp_mail call.
Use $_FILES['file']['tmp_name'] for filename
| wordpress | {
"language": "en",
"length": 79,
"provenance": "stackexchange_00019.jsonl.gz:451162",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/170813"
} | [
0.03570556640625,
-0.046356201171875,
0.0216827392578125,
-0.01447296142578125,
-0.036865234375,
-0.01226043701171875,
0.03863525390625,
-0.0166168212890625,
-0.00032973289489746094,
0.03485107421875,
0.039093017578125,
-0.04693603515625,
0.03826904296875,
-0.048797607421875,
-0.0240325927734375,
-0.00318145751953125,
0.01483917236328125,
0.0138702392578125,
0.0304107666015625,
-0.01227569580078125,
0.00791168212890625,
0.01171875,
-0.00409698486328125,
0.0023212432861328125,
-0.0276641845703125,
0.0802001953125,
0.05322265625,
-0.031646728515625,
-0.035736083984375,
-0.02813720703125,
-0.0127105712890625,
0.0148773193359375,
0.037261962890625,
0.0205535888671875,
-0.04620361328125,
0.02154541015625,
0.0153656005859375,
-0.00301361083984375,
-0.0184478759765625,
0.050811767578125,
0.0089263916015625,
-0.0053558349609375,
0.046051025390625,
-0.03204345703125,
0.0113372802734375,
-0.00011259317398071289,
0.006816864013671875,
-0.05523681640625,
0.00897216796875,
0.0290679931640625,
-0.0004611015319824219,
0.02105712890625,
0.00946044921875,
-0.01348876953125,
0.0032711029052734375,
-0.0011749267578125,
-0.044525146484375,
0.0257720947265625,
0.01690673828125,
-0.0233612060546875,
-0.0281829833984375,
-0.0042266845703125,
0.0225372314453125,
0.01189422607421875,
0.014678955078125,
0.009429931640625,
0.0256195068359375,
0.006679534912109375,
-0.027008056640625,
0.005580902099609375,
0.01493072509765625,
-0.0237884521484375,
-0.00965118408203125,
-0.024169921875,
0.02484130859375,
0.0171966552734375,
0.00830078125,
0.01496124267578125,
-0.0005211830139160156,
0.0224761962890625,
-0.00020492076873779297,
-0.044677734375,
-0.034271240234375,
-0.0139923095703125,
0.038421630859375,
0.049407958984375,
0.0018024444580078125,
-0.0179901123046875,
-0.00943756103515625,
-0.01348114013671875,
-0.0157012939453125,
0.0265045166015625,
-0.00913238525390625,
0.00792694091796875,
-0.033172607421875,
-0.00970458984375,
0.0079498291015625,
0.01024627685546875,
-0.01497650146484375,
-0.004261016845703125,
0.004253387451171875,
-0.026336669921875,
-0.007213592529296875,
-0.01837158203125,
-0.00853729248046875,
-0.002574920654296875,
0.0124359130859375,
-0.01806640625,
0.0139007568359375,
0.0202178955078125,
-0.0260467529296875,
0.0144195556640625,
0.032318115234375,
-0.00986480712890625,
0.0032405853271484375,
-0.0008029937744140625,
-0.0084075927734375,
0.06494140625,
0.013885498046875,
0.029693603515625,
-0.0082855224609375,
0.025604248046875,
-0.0269317626953125,
-0.04559326171875,
0.01229095458984375,
-0.0197296142578125,
-0.005077362060546875,
0.0170135498046875,
0.041412353515625,
0.0077972412109375,
-0.024505615234375,
0.00872039794921875,
0.033538818359375,
0.01049041748046875,
0.01104736328125,
-0.00004696846008300781,
-0.0123443603515625,
0.0019130706787109375,
0.01198577880859375,
-0.01047515869140625,
0.0498046875,
-0.01078033447265625,
0.0029926300048828125,
0.039642333984375,
0.01502227783203125,
0.025390625,
0.026031494140625,
0.01432037353515625,
-0.033111572265625,
-0.0418701171875,
0.0254364013671875,
-0.017364501953125,
0.006977081298828125,
0.0312347412109375,
-0.01959228515625,
0.003936767578125,
0.0248870849609375,
-0.02508544921875,
-0.00006604194641113281,
-0.03631591796875,
0.00664520263671875,
-0.005218505859375,
0.013763427734375,
-0.0312042236328125,
-0.015838623046875,
0.000514984130859375,
-0.051544189453125,
-0.0110931396484375,
0.0204010009765625,
0.013824462890625,
0.007038116455078125,
-0.004329681396484375,
-0.01038360595703125,
0.0109100341796875,
0.00042939186096191406,
0.01227569580078125,
0.00591278076171875,
0.01108551025390625,
0.02001953125,
0.0271148681640625,
-0.012847900390625,
-0.0296173095703125,
0.05096435546875,
-0.020538330078125,
-0.01209259033203125,
-0.031524658203125,
0.02056884765625,
0.02349853515625,
0.00946807861328125,
0.0250396728515625,
0.0243072509765625,
-0.002025604248046875,
-0.019195556640625,
-0.006877899169921875,
-0.04498291015625,
-0.0045623779296875,
-0.042236328125,
0.0022182464599609375,
-0.033721923828125,
0.04425048828125,
-0.022674560546875,
-0.0300445556640625,
0.043975830078125,
0.0139007568359375,
0.03302001953125,
0.005794525146484375,
-0.01302337646484375,
0.012725830078125,
-0.026885986328125,
-0.0020008087158203125,
0.02734375,
0.00968170166015625,
-0.024261474609375,
-0.0548095703125,
-0.0257720947265625,
0.003566741943359375,
-0.0291290283203125,
0.03558349609375,
-0.0164794921875,
0.08209228515625,
-0.048492431640625,
-0.04052734375,
-0.039825439453125,
-0.033233642578125,
-0.0179290771484375,
-0.006694793701171875,
-0.0284423828125,
0.00836944580078125,
-0.0316162109375,
-0.0088348388671875,
0.0149688720703125,
0.031890869140625,
-0.036041259765625,
-0.021514892578125,
-0.01155853271484375,
0.0019102096557617188,
-0.0008611679077148438,
-0.0634765625,
0.0150146484375,
0.04241943359375,
0.046630859375,
0.054840087890625,
0.0179595947265625,
0.032379150390625,
0.10040283203125,
0.01922607421875,
0.016357421875,
-0.01332855224609375,
0.0017099380493164062,
-0.01001739501953125,
0.01421356201171875,
-0.0198822021484375,
0.0116729736328125,
-0.0411376953125,
0.006198883056640625,
0.0198822021484375,
0.0306396484375,
-0.0040740966796875,
-0.0201568603515625,
0.04559326171875,
0.007598876953125,
0.05194091796875,
-0.0196380615234375,
0.0290985107421875,
0.0086822509765625,
0.0160369873046875,
0.0328369140625,
0.0220489501953125,
-0.0004870891571044922,
-0.00609588623046875,
-0.004436492919921875,
-0.0333251953125,
0.005886077880859375,
0.086669921875,
0.038970947265625,
0.0160369873046875,
0.00249481201171875,
-0.053955078125,
0.0066070556640625,
0.04852294921875,
-0.028472900390625,
0.01094818115234375,
0.037689208984375,
-0.01364898681640625,
-0.0189666748046875,
0.003765106201171875,
0.043670654296875,
-0.040618896484375,
0.005092620849609375,
-0.00179290771484375,
0.00946044921875,
0.047271728515625,
0.0021762847900390625,
0.036346435546875,
0.021881103515625,
-0.00550079345703125,
-0.0076141357421875,
-0.01108551025390625,
0.03704833984375,
-0.0343017578125,
0.004360198974609375,
0.05462646484375,
-0.0188140869140625,
0.0240936279296875,
-0.0102996826171875,
-0.0045318603515625,
-0.0183868408203125,
0.013824462890625,
-0.005252838134765625,
-0.0745849609375,
0.033782958984375,
0.031982421875,
0.0024890899658203125,
0.051177978515625,
-0.055633544921875,
-0.06640625,
-0.018035888671875,
-0.0016689300537109375,
-0.0704345703125,
-0.04583740234375,
0.03131103515625,
-0.07470703125,
-0.033721923828125,
0.005023956298828125,
-0.055267333984375,
-0.0001308917999267578,
0.046630859375,
-0.0002543926239013672,
-0.0209808349609375,
-0.0197906494140625,
0.007472991943359375,
-0.01456451416015625,
-0.01010894775390625,
-0.0102691650390625,
0.01071929931640625,
-0.01493072509765625,
0.005489349365234375,
0.0278167724609375,
-0.004894256591796875,
-0.03704833984375,
-0.0162200927734375,
0.08319091796875,
0.01555633544921875,
-0.0109405517578125,
0.00811004638671875,
-0.0176239013671875,
-0.004810333251953125,
-0.016571044921875,
0.037628173828125,
0.033416748046875,
-0.0220489501953125,
0.0026912689208984375,
-0.005802154541015625,
0.0196380615234375,
-0.0019235610961914062,
-0.0183258056640625,
-0.000029981136322021484,
-0.00902557373046875,
-0.03253173828125,
-0.057464599609375,
0.0307464599609375,
0.005992889404296875,
-0.00313568115234375,
-0.01453399658203125,
0.00022172927856445312,
-0.0306854248046875,
0.01351165771484375,
-0.00827789306640625,
0.028350830078125,
0.0135498046875,
0.00743865966796875,
0.0014362335205078125,
0.0301971435546875,
0.002208709716796875,
0.029144287109375,
-0.0272369384765625,
0.00910186767578125,
-0.0207977294921875,
0.05438232421875,
0.004734039306640625,
0.0185546875,
-0.01464080810546875,
0.032501220703125,
-0.039398193359375,
-0.084716796875,
0.0675048828125,
-0.065185546875,
0.0130157470703125,
-0.071044921875,
-0.02691650390625,
-0.0150604248046875,
0.1182861328125,
-0.0101165771484375,
-0.04095458984375,
-0.028045654296875,
0.033203125,
-0.057098388671875,
-0.055023193359375,
0.038543701171875,
-0.00872039794921875,
-0.0087738037109375,
0.017333984375,
-0.0171661376953125,
-0.0019044876098632812,
0.01369476318359375,
-0.056884765625,
0.0272369384765625,
-0.043853759765625,
0.022064208984375,
-0.0132904052734375,
0.05438232421875,
-0.0092620849609375,
0.0301361083984375,
-0.01346588134765625,
-0.0167999267578125,
-0.03582763671875,
-0.069580078125,
-0.001834869384765625,
-0.026702880859375,
0.040069580078125,
-0.00044798851013183594,
0.0258636474609375,
-0.00826263427734375,
0.032928466796875,
0.0030670166015625,
0.03704833984375,
0.0108184814453125,
-0.01169586181640625,
0.03472900390625,
0.02471923828125,
0.033843994140625,
0.0013399124145507812,
0.01465606689453125,
-0.043792724609375,
-0.072998046875,
-0.0301971435546875,
-0.041290283203125,
0.0208740234375,
-0.0010881423950195312,
-0.037994384765625,
-0.0030956268310546875,
-0.0301513671875,
-0.01067352294921875,
0.020355224609375,
-0.0430908203125,
0.027099609375,
-0.0347900390625,
-0.01378631591796875,
0.0279693603515625,
0.01311492919921875,
0.00612640380859375,
0.0113372802734375,
0.0625,
0.0033130645751953125,
-0.018096923828125,
-0.09173583984375,
0.037322998046875,
0.035736083984375,
0.004276275634765625,
0.01549530029296875,
-0.00873565673828125,
-0.02838134765625,
0.04833984375,
0.01125335693359375,
0.029388427734375,
-0.0362548828125,
0.061370849609375,
0.0119781494140625,
0.0243072509765625,
0.01568603515625,
0.00846099853515625,
-0.0102081298828125,
0.00376129150390625,
-0.0098114013671875,
-0.0017175674438476562,
-0.0261688232421875,
0.03302001953125,
-0.0198822021484375,
0.038818359375,
-0.028564453125,
-0.07940673828125,
0.0185394287109375,
-0.054779052734375,
0.047515869140625,
0.0084381103515625,
-0.0060272216796875,
0.05419921875,
0.0316162109375,
-0.01213836669921875,
0.0208282470703125,
-0.0037746429443359375,
0.00400543212890625,
0.00913238525390625,
0.0257568359375,
-0.0169219970703125,
0.0170745849609375,
-0.0005931854248046875,
0.00504302978515625,
0.03021240234375,
0.0231781005859375,
-0.0733642578125,
0.0005984306335449219,
0.03515625,
-0.049346923828125,
-0.037078857421875,
0.03350830078125,
0.0208282470703125,
-0.025299072265625,
-0.003173828125,
-0.047088623046875,
-0.00778961181640625,
-0.06549072265625,
0.019805908203125,
0.03131103515625,
-0.0195465087890625,
-0.00919342041015625,
0.040252685546875,
-0.057708740234375,
0.01308441162109375,
0.0205841064453125,
0.0037403106689453125,
0.04693603515625,
-0.0186309814453125,
0.028228759765625,
0.0011396408081054688,
0.0019006729125976562,
-0.0577392578125,
0.017425537109375,
-0.06109619140625,
0.0031185150146484375,
0.019927978515625,
0.06524658203125,
-0.048919677734375,
-0.06756591796875,
0.046783447265625,
-0.040557861328125,
-0.0167083740234375,
-0.007175445556640625,
-0.001911163330078125,
-0.01090240478515625,
-0.0223236083984375,
-0.007595062255859375,
0.00800323486328125,
0.01885986328125,
-0.0005445480346679688,
0.0098876953125,
-0.01271820068359375,
0.0056915283203125,
0.01381683349609375,
-0.01232147216796875,
-0.01983642578125,
-0.0222015380859375,
0.00623321533203125,
0.007259368896484375,
-0.01439666748046875,
-0.06689453125,
-0.018463134765625,
-0.0239105224609375,
-0.0204315185546875,
0.07952880859375,
-0.01329803466796875,
0.0195159912109375,
-0.049560546875,
0.0164794921875,
-0.049468994140625,
-0.01190948486328125,
0.05084228515625,
0.0263519287109375,
-0.06597900390625,
0.0296630859375,
-0.032257080078125,
0.00424957275390625,
-0.018951416015625,
-0.043121337890625,
-0.05108642578125,
-0.022979736328125,
0.008880615234375,
0.017608642578125,
0.005035400390625,
-0.03033447265625,
0.0031070709228515625,
0.005893707275390625,
0.0127716064453125,
0.01373291015625,
0.0179595947265625,
0.0084228515625,
-0.036712646484375,
0.0276641845703125,
0.005435943603515625,
-0.0029888153076171875,
-0.015380859375,
-0.02569580078125,
0.010467529296875,
-0.048553466796875,
-0.0020656585693359375,
-0.01055145263671875,
-0.0223846435546875,
-0.01800537109375,
0.01291656494140625,
0.00199127197265625,
-0.0085906982421875,
-0.027374267578125,
-0.0099639892578125,
-0.02313232421875,
0.0670166015625,
-0.02447509765625,
-0.01201629638671875,
-0.0298614501953125,
-0.04132080078125,
-0.0167694091796875,
-0.000024318695068359375,
0.002288818359375,
0.0299224853515625,
-0.021575927734375,
0.0124664306640625,
0.0238189697265625,
-0.00438690185546875,
0.0147705078125,
0.069580078125,
0.021392822265625,
0.053955078125,
0.049041748046875,
0.0198822021484375,
0.01328277587890625,
0.049652099609375,
-0.0043182373046875,
-0.062164306640625,
0.06585693359375,
0.02813720703125,
-0.006389617919921875,
0.041046142578125,
-0.022857666015625,
0.0377197265625,
0.0372314453125,
0.0584716796875,
-0.052886962890625,
0.0108184814453125,
0.01474761962890625,
-0.046905517578125,
-0.0020198822021484375,
-0.01593017578125,
0.010467529296875,
-0.03564453125,
0.045074462890625,
0.019989013671875,
-0.00644683837890625,
0.00868988037109375,
-0.0160369873046875,
0.002368927001953125,
0.0253753662109375,
0.01308441162109375,
0.0053253173828125,
-0.04620361328125,
-0.047210693359375,
0.052001953125,
-0.0235443115234375,
-0.018402099609375,
0.017608642578125,
0.006946563720703125,
-0.015869140625,
-0.038360595703125,
0.00428009033203125,
-0.0171356201171875,
-0.007022857666015625,
-0.0673828125,
-0.006134033203125,
0.045196533203125,
0.0193939208984375,
0.00875091552734375,
-0.06072998046875,
0.01067352294921875,
0.0001761913299560547,
-0.0012197494506835938,
-0.019866943359375,
0.0156707763671875,
0.053131103515625,
-0.074462890625,
0.0202484130859375,
-0.0154876708984375,
0.0264434814453125,
0.0068817138671875,
0.036956787109375,
0.054168701171875,
-0.046417236328125,
-0.01372528076171875,
0.040374755859375,
0.0281219482421875,
-0.00872039794921875,
0.00714111328125,
0.0128021240234375,
-0.049957275390625,
-0.044830322265625,
0.012115478515625,
-0.05584716796875,
0.007373809814453125,
0.005260467529296875,
-0.07061767578125,
0.10430908203125,
0.0160064697265625,
0.039215087890625,
0.0197601318359375,
0.0240478515625,
-0.038238525390625,
-0.0058441162109375,
-0.052764892578125,
0.0292816162109375,
0.02001953125,
0.03472900390625,
-0.039276123046875,
0.000014901161193847656,
-0.0106201171875,
0.01346588134765625,
0.04583740234375,
0.00750732421875,
-0.00927734375,
-0.0022907257080078125,
0.06591796875,
0.052520751953125,
0.0109710693359375,
0.005962371826171875,
-0.00740814208984375,
-0.006683349609375,
0.0616455078125,
0.01467132568359375,
0.02703857421875,
0.03448486328125,
-0.032073974609375,
0.00815582275390625,
0.00852203369140625,
-0.0023403167724609375,
0.0025539398193359375,
0.0162200927734375,
-0.02081298828125,
-0.00910186767578125,
0.0269317626953125,
-0.0304107666015625,
-0.02105712890625,
0.0101776123046875,
-0.0074462890625,
0.00553131103515625,
-0.0024280548095703125,
-0.01557159423828125,
0.0310821533203125,
0.0243682861328125,
0.0176239013671875,
0.0011272430419921875,
0.0095672607421875,
0.05010986328125,
0.004589080810546875,
0.0031261444091796875,
0.03240966796875,
-0.01036834716796875,
0.043731689453125,
-0.0297088623046875,
-0.0036563873291015625,
-0.07098388671875,
0.007537841796875,
0.019256591796875,
0.039215087890625,
-0.0418701171875,
-0.01116180419921875,
0.01560211181640625,
-0.0013866424560546875,
-0.0008907318115234375,
-0.0338134765625,
-0.001850128173828125,
-0.0352783203125,
-0.0225677490234375,
-0.0509033203125,
0.01258087158203125,
0.059539794921875,
0.0308837890625,
0.0007424354553222656,
0.018157958984375,
-0.07427978515625,
-0.0196685791015625,
-0.0183258056640625,
0.0085296630859375,
0.01496124267578125,
0.01418304443359375,
-0.002368927001953125,
0.019500732421875,
0.01064300537109375,
0.0009946823120117188,
0.000896453857421875,
0.01114654541015625,
-0.01094818115234375,
-0.01250457763671875,
0.0252532958984375,
-0.00923919677734375,
-0.0212860107421875,
0.00843048095703125,
0.036407470703125,
0.057525634765625,
0.060638427734375,
0.0114593505859375,
-0.00792694091796875,
0.0023479461669921875,
-0.031585693359375,
-0.03497314453125,
0.0200347900390625,
-0.031219482421875,
0.02569580078125,
0.0139617919921875,
-0.004703521728515625,
-0.030517578125,
0.001705169677734375,
0.05938720703125,
-0.046295166015625,
0.0523681640625,
-0.01690673828125,
-0.00374603271484375,
0.05059814453125,
-0.032958984375,
0.03509521484375,
-0.02117919921875,
-0.050140380859375,
-0.023590087890625,
-0.016937255859375,
0.04266357421875,
0.008636474609375,
0.03106689453125,
0.0191497802734375,
0.029022216796875,
0.0195465087890625,
-0.00102996826171875,
-0.0027332305908203125,
-0.00212860107421875,
0.0062103271484375,
-0.0282135009765625,
0.01430511474609375,
-0.006916046142578125,
-0.08990478515625,
-0.0560302734375,
-0.051971435546875,
0.0501708984375,
-0.004161834716796875,
0.10430908203125,
-0.0177154541015625,
0.0172882080078125,
-0.0355224609375,
0.04107666015625,
-0.0543212890625,
-0.029205322265625,
0.0206298828125,
0.002716064453125,
-0.00640869140625,
0.002353668212890625,
-0.0022449493408203125,
0.00992584228515625,
0.006206512451171875,
-0.041961669921875,
-0.0166015625,
-0.0186614990234375,
0.02130126953125,
0.03509521484375,
0.01727294921875,
-0.028076171875,
-0.01392364501953125,
-0.028076171875,
-0.034393310546875,
0.035552978515625,
0.0243988037109375,
0.03265380859375,
0.0152130126953125,
0.011505126953125,
-0.0253143310546875,
0.03778076171875,
-0.034515380859375,
0.058685302734375,
0.0391845703125,
-0.0091094970703125,
-0.0760498046875,
0.00444793701171875,
-0.00728607177734375,
-0.001705169677734375,
-0.00922393798828125,
0.10198974609375,
-0.007106781005859375,
0.0227813720703125,
-0.0210113525390625,
0.00684356689453125,
0.048309326171875,
0.005580902099609375,
0.0262603759765625,
-0.043060302734375,
0.0027866363525390625,
0.02008056640625,
-0.0357666015625,
-0.028564453125,
-0.05877685546875,
0.0260009765625,
0.0394287109375,
-0.01210784912109375,
0.00891876220703125,
-0.0150604248046875,
-0.0286407470703125,
0.0277252197265625,
0.01082611083984375,
-0.0302886962890625,
-0.007709503173828125,
-0.0071258544921875,
-0.0051727294921875,
-0.004669189453125,
0.030670166015625,
-0.0145111083984375,
0.01520538330078125,
-0.035369873046875,
-0.0936279296875,
-0.04638671875,
0.09576416015625,
-0.0618896484375,
0.0257415771484375,
0.03448486328125,
-0.0280303955078125,
0.0238494873046875,
0.029541015625,
0.03204345703125,
0.062286376953125,
-0.036163330078125,
-0.0289459228515625,
-0.0161590576171875,
0.01371002197265625,
0.001934051513671875,
-0.0252532958984375,
-0.0011053085327148438,
-0.0126495361328125,
0.0052642822265625,
-0.0139617919921875,
0.0037708282470703125,
0.004268646240234375,
-0.0606689453125,
-0.09033203125,
0.00290679931640625,
-0.01227569580078125,
-0.047637939453125,
-0.053253173828125,
0.018707275390625,
-0.007602691650390625,
0.01837158203125,
-0.01995849609375,
-0.0226287841796875,
-0.005046844482421875,
0.028564453125,
0.0036792755126953125,
0.0204010009765625,
0.01482391357421875,
-0.003322601318359375,
-0.03271484375,
0.0120697021484375,
-0.003631591796875,
0.006641387939453125,
-0.0081939697265625,
-0.01690673828125,
0.06640625,
0.081787109375,
0.0192718505859375,
0.014007568359375,
0.039642333984375,
-0.087646484375,
-0.016815185546875,
-0.0103607177734375,
-0.057647705078125,
0.0238494873046875,
0.07080078125,
0.12548828125,
0.031402587890625,
-0.06549072265625,
0.0197906494140625,
0.01483917236328125,
-0.017242431640625,
0.0164794921875,
0.0073394775390625,
-0.01364898681640625,
0.00576019287109375,
-0.0006651878356933594,
0.0121002197265625,
-0.00853729248046875,
-0.004009246826171875,
-0.005130767822265625,
-0.0163116455078125,
0.013763427734375,
-0.01096343994140625,
0.0009260177612304688,
-0.04351806640625,
0.1153564453125,
-0.053314208984375,
0.0153350830078125,
0.0120086669921875,
0.038543701171875,
0.06439208984375,
0.0193634033203125,
0.0294342041015625,
0.02490234375,
-0.0023670196533203125,
-0.004497528076171875,
0.0288543701171875,
0.0167236328125,
0.0003998279571533203,
-0.0196533203125,
0.0074462890625,
-0.0005807876586914062,
-0.00763702392578125,
-0.0196685791015625,
-0.00147247314453125,
0.028656005859375,
-0.0174560546875,
0.058746337890625,
-0.0150909423828125,
-0.02398681640625,
-0.02093505859375,
0.0279998779296875,
-0.02593994140625,
0.0068206787109375,
0.01116943359375,
-0.039215087890625,
0.004375457763671875,
0.0038909912109375,
0.0160064697265625,
-0.02642822265625,
0.0026760101318359375,
-0.0220794677734375,
0.013916015625,
0.01361846923828125
]
|
ca2a4d6727361764ab07d2a036ae01487f7bfc90 | Wordpress Stackexchange
Q: Loading page content into a variable in template On one of my custom templates, I need to do some work with the content before displaying it. Is there a way that I can load this content into a variable rather than just outputting it to the page?
This is what I've tried but it only outputs the page content, it doesn't load it into the variable.
$content = get_template_part( 'content', 'page');
A: You can always use the output buffering to store the printing contents in a variable.
function return_get_template_part($slug, $name=null) {
ob_start();
get_template_part($slug, $name);
$content = ob_get_contents();
ob_end_clean();
return $content;
}
$content = return_get_template_part('content', 'page');
This would be most preferable to keep using the get_template_part() right now. An alternative would be to use locate_template() function but it would compromise the use the default templates.
Check implementation of get_template_part() and locate_template() you would understand.
| Q: Loading page content into a variable in template On one of my custom templates, I need to do some work with the content before displaying it. Is there a way that I can load this content into a variable rather than just outputting it to the page?
This is what I've tried but it only outputs the page content, it doesn't load it into the variable.
$content = get_template_part( 'content', 'page');
A: You can always use the output buffering to store the printing contents in a variable.
function return_get_template_part($slug, $name=null) {
ob_start();
get_template_part($slug, $name);
$content = ob_get_contents();
ob_end_clean();
return $content;
}
$content = return_get_template_part('content', 'page');
This would be most preferable to keep using the get_template_part() right now. An alternative would be to use locate_template() function but it would compromise the use the default templates.
Check implementation of get_template_part() and locate_template() you would understand.
A: If you want to load a template file, execute the code it contains, and save the results to a variable, you need to use php's output buffering:
ob_start();
get_template_part( 'content', 'page' );
$content = ob_get_contents();
ob_end_clean();
| wordpress | {
"language": "en",
"length": 181,
"provenance": "stackexchange_00019.jsonl.gz:451208",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/171979"
} | [
0.00598907470703125,
-0.0265655517578125,
-0.0008726119995117188,
-0.04638671875,
-0.016326904296875,
-0.01047515869140625,
-0.01349639892578125,
0.0035114288330078125,
0.028076171875,
-0.007801055908203125,
-0.0421142578125,
-0.01016998291015625,
-0.039825439453125,
-0.007354736328125,
-0.005126953125,
-0.049041748046875,
0.051361083984375,
-0.038970947265625,
0.0276641845703125,
0.00396728515625,
-0.0013599395751953125,
0.017608642578125,
0.061309814453125,
0.0160369873046875,
0.049468994140625,
-0.0206298828125,
0.023193359375,
0.0056610107421875,
-0.002407073974609375,
-0.0301513671875,
0.025604248046875,
0.0272674560546875,
0.01513671875,
0.015899658203125,
-0.0034732818603515625,
-0.0147247314453125,
0.0014238357543945312,
0.0013751983642578125,
-0.001659393310546875,
0.0215911865234375,
0.005977630615234375,
-0.0012264251708984375,
0.0145721435546875,
0.0233306884765625,
-0.0093994140625,
-0.0015869140625,
-0.0272064208984375,
-0.064697265625,
0.0006613731384277344,
0.06182861328125,
0.0248870849609375,
-0.0170135498046875,
0.0120697021484375,
0.0206298828125,
-0.004390716552734375,
-0.0230712890625,
-0.012908935546875,
-0.0041351318359375,
0.0156402587890625,
-0.0007452964782714844,
-0.007480621337890625,
0.00833892822265625,
0.017913818359375,
-0.006008148193359375,
0.01280975341796875,
-0.01995849609375,
-0.0005669593811035156,
0.0219879150390625,
-0.055908203125,
0.002994537353515625,
0.04510498046875,
-0.0308685302734375,
-0.004199981689453125,
-0.002292633056640625,
-0.0169219970703125,
-0.009735107421875,
0.0157318115234375,
-0.0113067626953125,
0.01092529296875,
0.00750732421875,
-0.011871337890625,
0.01116180419921875,
-0.0299530029296875,
-0.01181793212890625,
-0.004734039306640625,
0.00923919677734375,
-0.02685546875,
-0.00667572021484375,
0.01239013671875,
-0.0093231201171875,
-0.0092315673828125,
0.06927490234375,
0.047454833984375,
-0.035064697265625,
-0.0751953125,
-0.0199432373046875,
-0.038818359375,
0.01641845703125,
-0.0195770263671875,
0.0299835205078125,
-0.0220947265625,
-0.00881195068359375,
0.0283355712890625,
-0.039093017578125,
0.00783538818359375,
0.0303497314453125,
0.0007905960083007812,
0.01849365234375,
0.0487060546875,
0.012298583984375,
0.00469970703125,
0.0173492431640625,
-0.03045654296875,
-0.0079345703125,
-0.0352783203125,
0.041412353515625,
-0.0177001953125,
-0.033966064453125,
-0.0012664794921875,
0.0039215087890625,
0.0149078369140625,
0.01751708984375,
0.030059814453125,
-0.01450347900390625,
0.00262451171875,
0.02044677734375,
-0.01678466796875,
-0.054168701171875,
0.00998687744140625,
0.0256500244140625,
-0.0205078125,
-0.005290985107421875,
0.0390625,
0.025848388671875,
-0.0038242340087890625,
-0.0174560546875,
-0.00390625,
-0.03936767578125,
0.0006704330444335938,
-0.0012884140014648438,
-0.0198516845703125,
-0.01445770263671875,
0.01483917236328125,
-0.0297698974609375,
0.0116729736328125,
0.016571044921875,
0.0217132568359375,
0.0256195068359375,
-0.0092620849609375,
-0.073974609375,
0.05096435546875,
-0.00725555419921875,
0.0238800048828125,
-0.01279449462890625,
0.0231475830078125,
-0.059844970703125,
-0.0019388198852539062,
-0.0180206298828125,
0.0284423828125,
-0.01412200927734375,
0.01177978515625,
-0.0037174224853515625,
-0.0180816650390625,
-0.04669189453125,
-0.04443359375,
-0.0199737548828125,
-0.02587890625,
0.00749969482421875,
0.00406646728515625,
0.00016391277313232422,
0.00836181640625,
-0.01354217529296875,
-0.04876708984375,
0.0037136077880859375,
0.01102447509765625,
0.027435302734375,
0.007480621337890625,
0.01139068603515625,
-0.00608062744140625,
0.038116455078125,
0.0037364959716796875,
-0.034881591796875,
0.033660888671875,
-0.016571044921875,
-0.055450439453125,
0.030120849609375,
-0.00907135009765625,
0.026641845703125,
0.0297088623046875,
0.0021419525146484375,
0.0097503662109375,
0.01401519775390625,
-0.051300048828125,
0.044403076171875,
0.006374359130859375,
-0.016876220703125,
0.0003991127014160156,
0.006656646728515625,
-0.0013561248779296875,
-0.0198974609375,
-0.008819580078125,
-0.0163116455078125,
0.0182342529296875,
0.0192108154296875,
-0.0054473876953125,
-0.00936126708984375,
-0.0084228515625,
0.00821685791015625,
0.0165863037109375,
0.035858154296875,
0.004093170166015625,
-0.003414154052734375,
-0.01123809814453125,
-0.0135650634765625,
-0.0338134765625,
0.016448974609375,
0.003391265869140625,
0.0253753662109375,
0.0143585205078125,
0.033538818359375,
0.03582763671875,
-0.005401611328125,
0.00926971435546875,
0.0213165283203125,
0.036224365234375,
0.0016078948974609375,
-0.04541015625,
-0.01349639892578125,
-0.01971435546875,
0.01544952392578125,
-0.060546875,
0.060791015625,
0.02734375,
0.0229644775390625,
-0.0267181396484375,
0.00971221923828125,
-0.003673553466796875,
-0.03204345703125,
-0.0205535888671875,
0.03973388671875,
0.033111572265625,
0.0311737060546875,
-0.040435791015625,
-0.042572021484375,
0.07373046875,
-0.01210784912109375,
-0.0037250518798828125,
-0.0216827392578125,
0.04803466796875,
0.057220458984375,
-0.043487548828125,
-0.0157623291015625,
0.01427459716796875,
-0.0743408203125,
0.016387939453125,
0.029449462890625,
0.0017156600952148438,
0.01277923583984375,
-0.00024259090423583984,
0.0221405029296875,
-0.00518798828125,
0.0870361328125,
0.0254974365234375,
0.0217132568359375,
-0.004642486572265625,
0.023193359375,
0.0042266845703125,
0.0022716522216796875,
-0.0499267578125,
0.0167388916015625,
0.034423828125,
0.01751708984375,
-0.00846099853515625,
0.003093719482421875,
-0.0183868408203125,
-0.03759765625,
-0.01526641845703125,
0.0263519287109375,
-0.035858154296875,
-0.01580810546875,
-0.0008726119995117188,
0.044708251953125,
-0.01270294189453125,
-0.01007080078125,
-0.005382537841796875,
-0.044952392578125,
-0.005779266357421875,
0.02288818359375,
0.04803466796875,
0.0538330078125,
0.027069091796875,
0.0850830078125,
0.0222320556640625,
0.05242919921875,
-0.0288238525390625,
0.019622802734375,
0.081787109375,
-0.009674072265625,
0.01177215576171875,
-0.0036182403564453125,
0.06536865234375,
0.042938232421875,
-0.008636474609375,
-0.0010843276977539062,
0.0010786056518554688,
0.00959014892578125,
0.0227508544921875,
-0.01082611083984375,
0.00015592575073242188,
-0.026092529296875,
0.0015096664428710938,
0.017303466796875,
0.032012939453125,
0.06304931640625,
0.0114898681640625,
-0.03338623046875,
0.004909515380859375,
0.035491943359375,
-0.06268310546875,
-0.07354736328125,
0.0543212890625,
-0.044342041015625,
-0.0252227783203125,
-0.0178985595703125,
-0.0465087890625,
-0.014404296875,
-0.0028018951416015625,
-0.0200042724609375,
0.04217529296875,
-0.03887939453125,
-0.09039306640625,
-0.050537109375,
-0.08953857421875,
0.021575927734375,
-0.00304412841796875,
0.022308349609375,
-0.01136016845703125,
0.05462646484375,
-0.0144195556640625,
-0.058319091796875,
-0.0297088623046875,
-0.00214385986328125,
0.0009603500366210938,
-0.001819610595703125,
-0.007778167724609375,
-0.01319122314453125,
0.0008130073547363281,
0.014373779296875,
0.019317626953125,
0.0036220550537109375,
0.0023746490478515625,
-0.0205230712890625,
-0.0223541259765625,
0.002796173095703125,
0.0157623291015625,
0.026885986328125,
0.0237274169921875,
0.0017900466918945312,
0.03466796875,
-0.036712646484375,
-0.03997802734375,
-0.01824951171875,
-0.062286376953125,
0.0224609375,
0.050628662109375,
-0.0078887939453125,
-0.0175933837890625,
0.0082550048828125,
-0.0301055908203125,
0.0008320808410644531,
-0.00121307373046875,
-0.0118865966796875,
0.0307159423828125,
-0.0192413330078125,
-0.0179901123046875,
0.023101806640625,
0.05010986328125,
0.0007424354553222656,
0.021087646484375,
0.0361328125,
0.0250091552734375,
-0.0009069442749023438,
-0.0005059242248535156,
-0.042816162109375,
-0.06884765625,
0.074951171875,
0.036041259765625,
0.046661376953125,
-0.0511474609375,
-0.07208251953125,
-0.004016876220703125,
0.123779296875,
-0.01213836669921875,
-0.023101806640625,
0.01094818115234375,
-0.0011959075927734375,
-0.00965118408203125,
-0.01346588134765625,
-0.025177001953125,
-0.0066375732421875,
-0.0301361083984375,
0.011260986328125,
-0.01013946533203125,
-0.00302886962890625,
-0.040679931640625,
0.03680419921875,
-0.0241241455078125,
-0.0235137939453125,
-0.00030541419982910156,
-0.0091705322265625,
-0.00733184814453125,
0.010528564453125,
-0.032440185546875,
0.020660400390625,
-0.00402069091796875,
-0.03729248046875,
-0.028961181640625,
-0.0195159912109375,
-0.00394439697265625,
0.033355712890625,
0.036468505859375,
-0.043731689453125,
0.0236358642578125,
0.0467529296875,
-0.0028133392333984375,
0.0287628173828125,
0.006511688232421875,
0.016937255859375,
0.00980377197265625,
-0.0110931396484375,
0.0166778564453125,
-0.025665283203125,
-0.01477813720703125,
-0.036407470703125,
-0.0036907196044921875,
0.012481689453125,
-0.042449951171875,
0.0011434555053710938,
-0.039581298828125,
-0.00261688232421875,
-0.005756378173828125,
0.0440673828125,
0.036895751953125,
0.00848388671875,
0.034027099609375,
-0.0341796875,
0.047882080078125,
0.0017852783203125,
0.041015625,
0.054412841796875,
-0.0433349609375,
-0.01093292236328125,
0.044281005859375,
0.04254150390625,
-0.051177978515625,
-0.01557159423828125,
0.0079345703125,
0.055908203125,
-0.01788330078125,
0.03509521484375,
0.032501220703125,
-0.04412841796875,
0.052947998046875,
0.01450347900390625,
0.013641357421875,
-0.003192901611328125,
0.0665283203125,
-0.01184844970703125,
-0.0021800994873046875,
0.015380859375,
-0.01727294921875,
-0.0243682861328125,
0.031036376953125,
-0.034576416015625,
-0.022125244140625,
0.0098419189453125,
0.0611572265625,
-0.041046142578125,
0.04803466796875,
-0.0523681640625,
-0.01555633544921875,
-0.01059722900390625,
0.00855255126953125,
0.042266845703125,
0.01421356201171875,
0.0172271728515625,
0.004611968994140625,
0.0196075439453125,
0.0005941390991210938,
0.042205810546875,
-0.009033203125,
0.032196044921875,
0.01221466064453125,
0.039642333984375,
0.00893402099609375,
0.032318115234375,
0.0017957687377929688,
-0.0129852294921875,
-0.01343536376953125,
-0.029327392578125,
-0.035888671875,
0.00290679931640625,
0.0401611328125,
0.0276947021484375,
0.024078369140625,
0.0276947021484375,
0.023712158203125,
-0.002925872802734375,
-0.00646209716796875,
0.035186767578125,
0.0157928466796875,
-0.0361328125,
0.0030517578125,
-0.01267242431640625,
-0.01305389404296875,
-0.0335693359375,
0.053314208984375,
-0.06439208984375,
0.0116424560546875,
0.00873565673828125,
-0.0008525848388671875,
0.0020294189453125,
0.00811004638671875,
0.02142333984375,
0.00739288330078125,
-0.0026607513427734375,
-0.0192413330078125,
0.021636962890625,
-0.00949859619140625,
0.0187530517578125,
-0.0023784637451171875,
0.052093505859375,
-0.080078125,
-0.062042236328125,
0.065673828125,
-0.08642578125,
0.0009646415710449219,
0.0228424072265625,
-0.0266876220703125,
-0.05316162109375,
-0.03216552734375,
-0.00383758544921875,
0.0258026123046875,
-0.015289306640625,
0.00724029541015625,
-0.004543304443359375,
-0.011444091796875,
0.030059814453125,
-0.01352691650390625,
0.01308441162109375,
-0.0249481201171875,
-0.0274810791015625,
-0.019256591796875,
-0.01873779296875,
0.0250396728515625,
-0.037567138671875,
0.0011377334594726562,
-0.03582763671875,
-0.0256195068359375,
0.06329345703125,
-0.04541015625,
0.0208740234375,
-0.033782958984375,
0.0142669677734375,
-0.048126220703125,
0.01617431640625,
0.034393310546875,
0.03778076171875,
-0.048614501953125,
0.0236968994140625,
-0.05224609375,
-0.00016736984252929688,
-0.06304931640625,
-0.07843017578125,
-0.03125,
-0.000026047229766845703,
0.01311492919921875,
0.02740478515625,
-0.008819580078125,
-0.0284271240234375,
-0.01444244384765625,
0.03192138671875,
0.0278472900390625,
0.07525634765625,
0.034423828125,
0.059814453125,
-0.0243988037109375,
0.056915283203125,
0.03997802734375,
0.03155517578125,
-0.0276336669921875,
-0.043975830078125,
-0.00852203369140625,
-0.0298004150390625,
0.006610870361328125,
0.003631591796875,
0.0213775634765625,
0.024871826171875,
0.038330078125,
0.0136260986328125,
0.0034809112548828125,
-0.01629638671875,
-0.0020923614501953125,
-0.0189056396484375,
0.0229339599609375,
-0.01351165771484375,
-0.01276397705078125,
0.003978729248046875,
0.00516510009765625,
-0.0384521484375,
-0.0149078369140625,
-0.0157928466796875,
0.00202178955078125,
0.032073974609375,
0.0007309913635253906,
-0.05181884765625,
-0.058624267578125,
0.06207275390625,
0.0789794921875,
0.0020580291748046875,
0.04364013671875,
-0.00698089599609375,
0.002788543701171875,
0.040069580078125,
0.048675537109375,
-0.005523681640625,
-0.058258056640625,
0.042236328125,
0.01050567626953125,
-0.01459503173828125,
0.0257110595703125,
-0.033660888671875,
0.019775390625,
0.08367919921875,
0.05596923828125,
-0.0986328125,
-0.005802154541015625,
0.0072784423828125,
-0.02130126953125,
-0.01824951171875,
-0.007762908935546875,
-0.00045299530029296875,
-0.01119232177734375,
0.0333251953125,
0.0197296142578125,
0.000263214111328125,
0.0239410400390625,
0.005908966064453125,
-0.0168914794921875,
-0.00543975830078125,
0.03125,
0.016571044921875,
-0.0222015380859375,
0.0305938720703125,
0.003688812255859375,
0.029266357421875,
-0.03692626953125,
0.037017822265625,
-0.0182037353515625,
0.028533935546875,
-0.004261016845703125,
0.059844970703125,
-0.0167236328125,
0.0200958251953125,
0.01419830322265625,
0.03900146484375,
-0.01361846923828125,
0.0396728515625,
-0.00995635986328125,
0.01580810546875,
0.0179595947265625,
-0.0211639404296875,
0.03302001953125,
-0.00972747802734375,
0.018524169921875,
0.0167083740234375,
-0.033538818359375,
0.006023406982421875,
-0.00930023193359375,
-0.0153350830078125,
-0.0101318359375,
0.0107574462890625,
0.07354736328125,
0.00783538818359375,
-0.040496826171875,
0.036590576171875,
0.0052490234375,
-0.03759765625,
-0.01511383056640625,
0.0537109375,
-0.023193359375,
0.01971435546875,
0.01910400390625,
0.025054931640625,
-0.0455322265625,
-0.0229644775390625,
-0.11669921875,
0.144775390625,
0.035797119140625,
0.08758544921875,
-0.018402099609375,
0.034271240234375,
-0.03802490234375,
0.0140380859375,
-0.0640869140625,
0.0865478515625,
0.06695556640625,
0.05224609375,
-0.0814208984375,
-0.032379150390625,
0.018310546875,
0.045684814453125,
-0.0172119140625,
-0.0013895034790039062,
-0.004940032958984375,
-0.01263427734375,
0.028076171875,
0.023895263671875,
0.0091705322265625,
0.0108642578125,
0.0131378173828125,
0.05413818359375,
0.0341796875,
-0.07781982421875,
0.01277923583984375,
-0.035614013671875,
0.00787353515625,
0.032806396484375,
0.0182037353515625,
0.00506591796875,
0.02960205078125,
-0.0239715576171875,
-0.0675048828125,
0.01415252685546875,
0.045318603515625,
-0.00899505615234375,
-0.005275726318359375,
0.01233673095703125,
0.00743865966796875,
-0.037994384765625,
-0.0145721435546875,
-0.02587890625,
0.0335693359375,
0.0103912353515625,
0.002796173095703125,
0.0106658935546875,
-0.0005650520324707031,
0.04779052734375,
-0.040435791015625,
-0.0115966796875,
-0.0022430419921875,
0.0137786865234375,
0.0245361328125,
0.007762908935546875,
0.02197265625,
-0.041900634765625,
0.0012073516845703125,
0.03436279296875,
0.03704833984375,
-0.0189361572265625,
-0.00952911376953125,
0.013580322265625,
0.0036563873291015625,
-0.0258636474609375,
-0.01505279541015625,
-0.01004791259765625,
0.0201416015625,
0.0298309326171875,
-0.041229248046875,
-0.01898193359375,
0.009368896484375,
-0.00047779083251953125,
-0.016845703125,
-0.00208282470703125,
0.0281524658203125,
-0.025054931640625,
-0.027740478515625,
-0.00058746337890625,
0.0178985595703125,
0.04205322265625,
0.0010709762573242188,
0.041229248046875,
-0.0382080078125,
-0.0083160400390625,
-0.00782012939453125,
-0.0016450881958007812,
-0.01007843017578125,
0.00954437255859375,
-0.0018110275268554688,
0.01076507568359375,
-0.022186279296875,
0.0030727386474609375,
0.019927978515625,
-0.004314422607421875,
0.03863525390625,
0.03302001953125,
-0.0279541015625,
-0.0111083984375,
0.01284027099609375,
-0.0142364501953125,
0.0307769775390625,
-0.046173095703125,
0.0030879974365234375,
-0.022979736328125,
-0.0235748291015625,
-0.01214599609375,
-0.022308349609375,
0.0304107666015625,
-0.00429534912109375,
0.022796630859375,
-0.0025653839111328125,
-0.01236724853515625,
0.06488037109375,
-0.049224853515625,
0.052734375,
-0.00439453125,
-0.06011962890625,
0.0099639892578125,
-0.052093505859375,
-0.07763671875,
0.0164031982421875,
0.052093505859375,
-0.000675201416015625,
-0.0118865966796875,
0.0031147003173828125,
0.023345947265625,
-0.0106353759765625,
-0.015655517578125,
-0.002162933349609375,
0.0142974853515625,
0.032562255859375,
0.0238037109375,
-0.043609619140625,
-0.02728271484375,
-0.0032100677490234375,
0.0501708984375,
-0.01280975341796875,
0.039276123046875,
-0.01166534423828125,
0.024871826171875,
-0.0021953582763671875,
-0.0100250244140625,
0.00518798828125,
-0.0103912353515625,
-0.0011510848999023438,
0.0171966552734375,
0.0252227783203125,
-0.02667236328125,
-0.0238800048828125,
0.050628662109375,
0.02874755859375,
-0.0061798095703125,
0.01467132568359375,
0.00640869140625,
0.002597808837890625,
-0.007167816162109375,
0.010009765625,
-0.0023860931396484375,
-0.009613037109375,
-0.006366729736328125,
-0.01068878173828125,
0.03997802734375,
0.0750732421875,
0.01526641845703125,
0.0426025390625,
-0.01384735107421875,
-0.03912353515625,
0.017578125,
-0.06317138671875,
0.01105499267578125,
0.0250244140625,
0.01561737060546875,
-0.036285400390625,
0.01678466796875,
-0.0196075439453125,
0.0129852294921875,
0.01041412353515625,
0.0526123046875,
0.00792694091796875,
0.003681182861328125,
0.0175018310546875,
-0.0439453125,
0.029571533203125,
-0.009735107421875,
-0.0038928985595703125,
-0.02044677734375,
0.04486083984375,
-0.031585693359375,
-0.048614501953125,
-0.0080718994140625,
-0.023223876953125,
-0.006649017333984375,
0.0225677490234375,
-0.0072784423828125,
-0.005550384521484375,
-0.01105499267578125,
-0.0104827880859375,
0.024078369140625,
-0.0003254413604736328,
-0.0116119384765625,
-0.0062713623046875,
-0.01861572265625,
-0.00458526611328125,
-0.00019538402557373047,
-0.007770538330078125,
0.0023593902587890625,
0.0316162109375,
-0.0212249755859375,
0.024322509765625,
-0.0246124267578125,
-0.025146484375,
0.0154876708984375,
0.036895751953125,
0.05487060546875,
-0.01293182373046875,
0.001422882080078125,
0.025054931640625,
0.0084381103515625,
0.08709716796875,
-0.041748046875,
-0.006877899169921875,
0.034210205078125,
-0.00927734375,
-0.0232086181640625,
-0.054351806640625,
0.006687164306640625,
-0.02642822265625,
0.016876220703125,
0.01454925537109375,
-0.0225830078125,
-0.00299072265625,
-0.04620361328125,
-0.07305908203125,
0.01453399658203125,
0.004852294921875,
-0.03570556640625,
-0.0159912109375,
0.005031585693359375,
0.009918212890625,
-0.054840087890625,
-0.0177001953125,
-0.0091705322265625,
-0.0259552001953125,
0.0283203125,
0.021331787109375,
-0.021148681640625,
0.0697021484375,
0.0009708404541015625,
-0.103271484375,
-0.0341796875,
-0.07568359375,
-0.014190673828125,
-0.019775390625,
-0.0033206939697265625,
0.00743865966796875,
0.01263427734375,
-0.0289764404296875,
-0.037445068359375,
0.021240234375,
0.0004088878631591797,
-0.039337158203125,
-0.01203155517578125,
0.021331787109375,
0.008575439453125,
0.066162109375,
0.0328369140625,
0.002887725830078125,
-0.0377197265625,
0.017852783203125,
0.0227508544921875,
-0.09857177734375,
-0.02203369140625,
0.060943603515625,
-0.09027099609375,
-0.022369384765625,
0.0016613006591796875,
-0.00627899169921875,
0.0230865478515625,
-0.0521240234375,
-0.0260467529296875,
-0.0032958984375,
-0.0260772705078125,
0.028289794921875,
-0.03778076171875,
-0.027587890625,
0.032623291015625,
-0.0198974609375,
0.006145477294921875,
-0.021484375,
0.0328369140625,
0.0164794921875,
0.0024318695068359375,
0.0079193115234375,
0.0298004150390625,
-0.062042236328125,
-0.022735595703125,
0.004177093505859375,
0.03961181640625,
-0.01495361328125,
-0.0156707763671875,
-0.0019207000732421875,
0.00885772705078125,
-0.0274658203125,
-0.009552001953125,
0.00960540771484375,
0.0306549072265625,
-0.0096435546875,
0.05670166015625,
-0.045440673828125,
0.0182647705078125,
-0.0299530029296875,
0.01529693603515625,
-0.036376953125,
0.02655029296875,
0.0076446533203125,
-0.0064239501953125,
0.003936767578125,
-0.0179443359375,
-0.00717926025390625,
-0.0374755859375,
0.00826263427734375,
-0.05718994140625,
-0.01514434814453125,
0.01403045654296875
]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.