id
stringlengths 40
40
| text
stringlengths 29
2.03k
| original_text
stringlengths 3
154k
| subdomain
stringclasses 20
values | metadata
dict | emb
sequencelengths 1.02k
1.02k
|
---|---|---|---|---|---|
33491b01073b92dfe35a545c34aa355e8b70a0eb | Wordpress Stackexchange
Q: How to search only by post title and category? I'm currently working on my first theme (based on underscores) and just realized the search does not return any results if I input a category name, nor does it give accurate results when searching titles.
So, how do I make my theme search only "post titles" and "categories"? Should something be added to the Functions.php?
Thanks
A: You'll have to write a custom WP_Query in search.php.
Also since you want to search in post_title + categories, you might have to run 2 separate queries and merge results of them into 1.
Something like:
$q1 = get_posts(array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => '-1',
's' => get_search_query()
));
$q2 = get_posts(array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => '-1',
'tax_query' => array(
//YOUR tax query here
)
));
$merged = array_merge( $q1, $q2 );
And use $merged to show your results.
Also you can also use WPDB to achieve this using MySQL query.
| Q: How to search only by post title and category? I'm currently working on my first theme (based on underscores) and just realized the search does not return any results if I input a category name, nor does it give accurate results when searching titles.
So, how do I make my theme search only "post titles" and "categories"? Should something be added to the Functions.php?
Thanks
A: You'll have to write a custom WP_Query in search.php.
Also since you want to search in post_title + categories, you might have to run 2 separate queries and merge results of them into 1.
Something like:
$q1 = get_posts(array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => '-1',
's' => get_search_query()
));
$q2 = get_posts(array(
'post_type' => 'post',
'post_status' => 'publish',
'posts_per_page' => '-1',
'tax_query' => array(
//YOUR tax query here
)
));
$merged = array_merge( $q1, $q2 );
And use $merged to show your results.
Also you can also use WPDB to achieve this using MySQL query.
| wordpress | {
"language": "en",
"length": 165,
"provenance": "stackexchange_00019.jsonl.gz:470436",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/246862"
} | [
0.01439666748046875,
0.0179901123046875,
0.00445556640625,
0.044036865234375,
0.0095062255859375,
-0.045989990234375,
0.06671142578125,
-0.0548095703125,
0.016326904296875,
0.036712646484375,
-0.0340576171875,
0.006999969482421875,
0.01556396484375,
-0.014801025390625,
-0.01409149169921875,
-0.0164947509765625,
0.007381439208984375,
-0.053070068359375,
0.0023479461669921875,
-0.02423095703125,
0.0333251953125,
-0.011474609375,
0.00787353515625,
-0.003692626953125,
0.024383544921875,
-0.0576171875,
0.0858154296875,
-0.03424072265625,
0.029510498046875,
-0.02880859375,
0.0273590087890625,
-0.0087432861328125,
0.007732391357421875,
-0.002109527587890625,
0.0421142578125,
0.049285888671875,
-0.00643157958984375,
0.0194549560546875,
0.0277862548828125,
0.01560211181640625,
0.0265960693359375,
-0.0048828125,
-0.01995849609375,
0.040557861328125,
-0.0142364501953125,
-0.061431884765625,
0.04705810546875,
-0.020355224609375,
0.00504302978515625,
-0.08782958984375,
-0.014801025390625,
0.03656005859375,
0.0234832763671875,
-0.08740234375,
-0.01409149169921875,
0.0244598388671875,
-0.0157623291015625,
-0.0254669189453125,
0.045166015625,
-0.03363037109375,
-0.050933837890625,
-0.06365966796875,
0.04083251953125,
-0.021331787109375,
-0.0251617431640625,
0.0016202926635742188,
0.06231689453125,
0.0007991790771484375,
-0.0081634521484375,
-0.037261962890625,
0.0311737060546875,
0.005340576171875,
0.003265380859375,
0.0254974365234375,
-0.0297393798828125,
-0.053619384765625,
0.0241241455078125,
-0.0193328857421875,
0.0164642333984375,
0.0235137939453125,
-0.003513336181640625,
-0.0265655517578125,
-0.0011539459228515625,
-0.0137481689453125,
0.023529052734375,
0.0025577545166015625,
-0.00949859619140625,
-0.0023059844970703125,
-0.037933349609375,
-0.031707763671875,
-0.01519012451171875,
-0.020263671875,
-0.10009765625,
0.0100250244140625,
0.034271240234375,
-0.0462646484375,
0.025299072265625,
0.07305908203125,
-0.0095977783203125,
0.012542724609375,
-0.01050567626953125,
-0.0278778076171875,
0.002391815185546875,
-0.044677734375,
0.04766845703125,
0.027587890625,
-0.044281005859375,
-0.031158447265625,
0.06402587890625,
0.0411376953125,
0.025238037109375,
0.0396728515625,
-0.0212249755859375,
0.0016145706176757812,
-0.033477783203125,
0.041015625,
-0.020416259765625,
-0.0021991729736328125,
-0.0244140625,
0.050048828125,
0.0145111083984375,
0.043609619140625,
-0.00659942626953125,
-0.037506103515625,
-0.00574493408203125,
-0.0117034912109375,
-0.0169525146484375,
-0.017608642578125,
-0.0016126632690429688,
0.0167999267578125,
-0.027435302734375,
0.01953125,
0.046356201171875,
0.0171356201171875,
-0.0088958740234375,
-0.0207672119140625,
-0.004825592041015625,
0.005756378173828125,
0.0006384849548339844,
-0.01959228515625,
0.033843994140625,
-0.0059967041015625,
0.0192413330078125,
0.00580596923828125,
0.0171661376953125,
-0.00995635986328125,
0.0064849853515625,
0.037078857421875,
0.0287933349609375,
-0.0169830322265625,
0.0187225341796875,
0.006938934326171875,
0.022674560546875,
0.028106689453125,
-0.056549072265625,
0.01910400390625,
0.01200103759765625,
-0.0000022649765014648438,
-0.0308837890625,
-0.038055419921875,
0.00838470458984375,
0.002391815185546875,
0.0279998779296875,
-0.0074462890625,
-0.0272369384765625,
0.01044464111328125,
-0.05804443359375,
-0.0106201171875,
0.00229644775390625,
-0.031585693359375,
0.01523590087890625,
0.004016876220703125,
0.0233306884765625,
-0.022216796875,
-0.0079498291015625,
-0.0095062255859375,
-0.002655029296875,
-0.009307861328125,
0.01392364501953125,
0.034210205078125,
0.003574371337890625,
-0.0259552001953125,
0.017333984375,
-0.01557159423828125,
-0.037933349609375,
0.036773681640625,
0.01849365234375,
0.03375244140625,
-0.0244140625,
0.0184326171875,
0.045684814453125,
0.05511474609375,
-0.037384033203125,
0.00366973876953125,
-0.008758544921875,
-0.02008056640625,
-0.005626678466796875,
-0.01108551025390625,
-0.01337432861328125,
0.0189056396484375,
0.046905517578125,
0.016693115234375,
-0.002788543701171875,
0.00672149658203125,
-0.030975341796875,
-0.0005307197570800781,
-0.0019683837890625,
0.0046844482421875,
-0.037994384765625,
0.04193115234375,
0.03424072265625,
0.0033664703369140625,
-0.0309600830078125,
-0.0117340087890625,
-0.00193023681640625,
-0.04412841796875,
0.0009622573852539062,
0.0005736351013183594,
0.0010156631469726562,
-0.00536346435546875,
0.01348876953125,
0.0087890625,
0.0151519775390625,
0.04730224609375,
0.07720947265625,
0.005535125732421875,
0.00540924072265625,
-0.0266265869140625,
0.07672119140625,
0.03192138671875,
-0.043182373046875,
-0.014739990234375,
0.0438232421875,
0.056396484375,
-0.0215301513671875,
0.012115478515625,
0.025970458984375,
-0.00146484375,
-0.00786590576171875,
0.0294647216796875,
0.0292205810546875,
0.024017333984375,
-0.01282501220703125,
-0.00852203369140625,
0.0256805419921875,
-0.061065673828125,
-0.00974273681640625,
-0.0029010772705078125,
0.03363037109375,
0.059722900390625,
0.01233673095703125,
-0.0147247314453125,
0.0164337158203125,
-0.0119476318359375,
0.0128326416015625,
0.030670166015625,
0.0095672607421875,
0.006664276123046875,
-0.0140533447265625,
-0.0009355545043945312,
0.0014514923095703125,
-0.046539306640625,
-0.041412353515625,
-0.0003151893615722656,
0.0176239013671875,
0.040679931640625,
0.0248870849609375,
0.01995849609375,
-0.0255889892578125,
0.03497314453125,
-0.0018815994262695312,
-0.029266357421875,
0.0149078369140625,
0.0467529296875,
0.004520416259765625,
0.00368499755859375,
-0.0230560302734375,
-0.0134735107421875,
0.0068817138671875,
0.0182037353515625,
0.0128631591796875,
0.036041259765625,
0.017730712890625,
0.0008997917175292969,
-0.01117706298828125,
-0.055633544921875,
0.02288818359375,
0.04052734375,
-0.010955810546875,
0.0219573974609375,
0.0183563232421875,
0.04730224609375,
-0.00926971435546875,
0.0318603515625,
-0.0129547119140625,
0.013916015625,
0.01557159423828125,
-0.042083740234375,
0.0289306640625,
-0.041046142578125,
0.044647216796875,
0.049560546875,
-0.03155517578125,
0.01172637939453125,
-0.0036869049072265625,
-0.0033702850341796875,
-0.01239013671875,
0.005390167236328125,
-0.0187835693359375,
-0.01088714599609375,
-0.061126708984375,
0.0072479248046875,
0.0204620361328125,
0.0224456787109375,
0.032012939453125,
-0.039886474609375,
0.035858154296875,
0.021270751953125,
-0.049407958984375,
-0.06854248046875,
0.005218505859375,
-0.01032257080078125,
-0.0193634033203125,
0.0254974365234375,
-0.0031147003173828125,
-0.010986328125,
0.016326904296875,
-0.0096588134765625,
0.041473388671875,
-0.0225830078125,
-0.07867431640625,
-0.01372528076171875,
-0.0877685546875,
-0.00978851318359375,
-0.01068878173828125,
0.017822265625,
0.01183319091796875,
0.0645751953125,
0.045989990234375,
-0.05609130859375,
0.036407470703125,
0.0855712890625,
-0.03564453125,
0.0205078125,
0.032562255859375,
-0.01525115966796875,
-0.0156707763671875,
0.02679443359375,
-0.007564544677734375,
0.000438690185546875,
-0.00905609130859375,
-0.0184173583984375,
0.00844573974609375,
0.0245513916015625,
0.01473236083984375,
0.0016460418701171875,
-0.013153076171875,
0.033233642578125,
0.00322723388671875,
-0.0274810791015625,
-0.048736572265625,
-0.01094818115234375,
-0.05340576171875,
0.005893707275390625,
0.0294036865234375,
0.007678985595703125,
-0.03460693359375,
0.0225372314453125,
0.027191162109375,
0.0181121826171875,
-0.0281219482421875,
-0.0210113525390625,
0.043701171875,
0.02374267578125,
0.040130615234375,
0.0082855224609375,
-0.010406494140625,
-0.05029296875,
0.043304443359375,
-0.00516510009765625,
-0.0023555755615234375,
-0.0110626220703125,
0.00847625732421875,
-0.01031494140625,
-0.0254974365234375,
0.02423095703125,
-0.0130157470703125,
0.04058837890625,
-0.032073974609375,
-0.029205322265625,
-0.02020263671875,
0.07440185546875,
-0.056976318359375,
-0.0187835693359375,
-0.01364898681640625,
0.023834228515625,
0.0002853870391845703,
-0.06939697265625,
-0.01386260986328125,
-0.0161895751953125,
-0.10589599609375,
-0.0023822784423828125,
-0.033905029296875,
-0.0301055908203125,
0.022125244140625,
-0.041534423828125,
-0.0228729248046875,
-0.054534912109375,
0.0301971435546875,
-0.0033721923828125,
0.034332275390625,
-0.0183563232421875,
0.00736236572265625,
-0.011077880859375,
-0.0289459228515625,
-0.01451873779296875,
-0.045654296875,
-0.004283905029296875,
0.00986480712890625,
0.01568603515625,
-0.02130126953125,
0.030120849609375,
-0.0184783935546875,
0.02557373046875,
-0.00841522216796875,
0.0289764404296875,
-0.000043272972106933594,
-0.00225067138671875,
0.00946044921875,
0.028533935546875,
0.0050048828125,
-0.0080718994140625,
-0.0164947509765625,
-0.0153961181640625,
0.01456451416015625,
0.031036376953125,
-0.0362548828125,
0.0028896331787109375,
-0.0396728515625,
0.0025959014892578125,
-0.0113983154296875,
-0.0203094482421875,
-0.0086822509765625,
0.01457977294921875,
-0.0198516845703125,
0.0096588134765625,
-0.0225677490234375,
-0.0225372314453125,
0.0809326171875,
0.0217742919921875,
0.022247314453125,
-0.01107025146484375,
0.09130859375,
-0.00957489013671875,
-0.052459716796875,
-0.059112548828125,
-0.0183258056640625,
0.02239990234375,
-0.0165252685546875,
0.03131103515625,
-0.0364990234375,
-0.03607177734375,
0.09100341796875,
-0.022674560546875,
-0.018096923828125,
-0.01538848876953125,
0.031524658203125,
-0.015838623046875,
-0.043975830078125,
0.0218505859375,
-0.031707763671875,
0.037811279296875,
0.03192138671875,
-0.0012521743774414062,
-0.016357421875,
-0.01448822021484375,
0.0313720703125,
0.0085906982421875,
0.00833892822265625,
-0.0164642333984375,
0.0033702850341796875,
-0.0236358642578125,
0.040496826171875,
0.026123046875,
0.048187255859375,
-0.01438140869140625,
-0.00518798828125,
0.0304718017578125,
-0.0198211669921875,
0.01018524169921875,
0.048553466796875,
-0.01107025146484375,
0.016082763671875,
-0.01337432861328125,
-0.036376953125,
-0.036529541015625,
-0.0024623870849609375,
-0.0008072853088378906,
-0.024017333984375,
-0.0255126953125,
-0.0154571533203125,
-0.016693115234375,
0.026641845703125,
0.042572021484375,
0.00341796875,
0.000255584716796875,
0.0207061767578125,
-0.007747650146484375,
0.01593017578125,
-0.01763916015625,
0.0075531005859375,
-0.010345458984375,
0.03570556640625,
0.01139068603515625,
-0.0103759765625,
0.00927734375,
0.055511474609375,
-0.029510498046875,
0.041259765625,
0.0021495819091796875,
0.0128631591796875,
-0.00457000732421875,
0.041351318359375,
-0.0016145706176757812,
-0.02593994140625,
0.02362060546875,
0.0178985595703125,
0.045501708984375,
-0.0198211669921875,
0.013519287109375,
0.01528167724609375,
-0.00594329833984375,
-0.012176513671875,
-0.03118896484375,
0.0400390625,
-0.0032062530517578125,
-0.016876220703125,
-0.0114898681640625,
0.007061004638671875,
0.01226043701171875,
-0.029510498046875,
-0.035003662109375,
-0.0016155242919921875,
0.037078857421875,
-0.007625579833984375,
-0.0179443359375,
-0.0310516357421875,
-0.0017347335815429688,
0.006610870361328125,
-0.01096343994140625,
0.007537841796875,
0.0146484375,
-0.039642333984375,
-0.017913818359375,
0.0310211181640625,
0.0115509033203125,
-0.00887298583984375,
-0.018341064453125,
-0.0305633544921875,
0.01177215576171875,
-0.00017273426055908203,
0.0477294921875,
-0.0257568359375,
-0.0209197998046875,
0.033599853515625,
-0.00780487060546875,
0.04833984375,
0.017547607421875,
-0.0465087890625,
-0.005985260009765625,
-0.03485107421875,
-0.00035953521728515625,
0.000286102294921875,
-0.036468505859375,
-0.03179931640625,
-0.0304718017578125,
0.030059814453125,
0.01152801513671875,
0.0013170242309570312,
-0.0687255859375,
-0.04541015625,
0.00472259521484375,
0.06536865234375,
0.0100860595703125,
-0.049957275390625,
0.07513427734375,
0.0193023681640625,
0.04840087890625,
-0.0245208740234375,
0.0097503662109375,
-0.0033435821533203125,
-0.00791168212890625,
0.005588531494140625,
-0.0911865234375,
-0.051300048828125,
0.01763916015625,
-0.08056640625,
0.04449462890625,
0.022369384765625,
-0.0013685226440429688,
0.002765655517578125,
-0.007511138916015625,
-0.00292205810546875,
-0.0014791488647460938,
0.0015020370483398438,
-0.01171875,
-0.0221710205078125,
0.057830810546875,
0.0264739990234375,
0.044921875,
-0.040618896484375,
-0.03265380859375,
0.0162200927734375,
0.00675201416015625,
0.0139923095703125,
0.004871368408203125,
-0.040618896484375,
0.043914794921875,
0.0418701171875,
-0.0028362274169921875,
0.0177001953125,
0.00865936279296875,
-0.0031490325927734375,
-0.035400390625,
0.0021495819091796875,
-0.018768310546875,
0.006114959716796875,
0.06610107421875,
0.010894775390625,
-0.0179290771484375,
0.040283203125,
-0.0310211181640625,
-0.0272979736328125,
0.059661865234375,
0.034149169921875,
-0.06378173828125,
-0.0168914794921875,
0.02392578125,
-0.00536346435546875,
-0.063232421875,
0.0362548828125,
-0.012939453125,
-0.0255126953125,
-0.013336181640625,
-0.005397796630859375,
-0.0220947265625,
-0.0028781890869140625,
0.007312774658203125,
0.004718780517578125,
-0.003818511962890625,
0.07269287109375,
0.01177215576171875,
-0.0833740234375,
0.003093719482421875,
0.036773681640625,
0.005733489990234375,
-0.0267486572265625,
0.00372314453125,
0.0204315185546875,
-0.0277557373046875,
-0.0997314453125,
0.011993408203125,
0.0291900634765625,
-0.0264434814453125,
0.0069580078125,
0.031890869140625,
0.0172882080078125,
0.04620361328125,
-0.004299163818359375,
-0.0092010498046875,
0.0188751220703125,
-0.03533935546875,
-0.02386474609375,
0.00565338134765625,
0.005222320556640625,
0.035186767578125,
-0.0211334228515625,
0.0204010009765625,
-0.038665771484375,
0.01117706298828125,
-0.00893402099609375,
-0.04913330078125,
0.03387451171875,
-0.0277252197265625,
-0.0062713623046875,
-0.0008292198181152344,
0.035980224609375,
0.0291900634765625,
-0.003963470458984375,
0.0276031494140625,
-0.029571533203125,
0.0190582275390625,
0.00934600830078125,
0.0162506103515625,
0.0026302337646484375,
-0.0005979537963867188,
-0.04559326171875,
0.059478759765625,
-0.01361846923828125,
0.013916015625,
0.0193328857421875,
0.02618408203125,
-0.0135650634765625,
0.00798797607421875,
-0.03790283203125,
0.083251953125,
0.01004791259765625,
0.024627685546875,
-0.03436279296875,
0.0112457275390625,
0.024444580078125,
0.01236724853515625,
0.05908203125,
0.006046295166015625,
-0.0284271240234375,
-0.0196380615234375,
0.04571533203125,
0.061737060546875,
-0.00025343894958496094,
0.0263824462890625,
-0.00395965576171875,
0.0283966064453125,
0.057281494140625,
-0.0238037109375,
0.0290374755859375,
0.0181427001953125,
-0.01239776611328125,
0.03155517578125,
0.0209503173828125,
0.0452880859375,
0.0171966552734375,
-0.036041259765625,
0.01494598388671875,
0.00009357929229736328,
-0.006011962890625,
-0.017181396484375,
0.0246429443359375,
0.0269775390625,
0.0538330078125,
-0.1126708984375,
-0.027313232421875,
-0.034271240234375,
0.056610107421875,
0.01158905029296875,
0.03546142578125,
0.0142822265625,
-0.004062652587890625,
0.11419677734375,
-0.00792694091796875,
0.01319122314453125,
0.0142059326171875,
0.00445556640625,
0.027313232421875,
0.0109100341796875,
0.019195556640625,
-0.03167724609375,
0.0007462501525878906,
0.05230712890625,
0.04559326171875,
-0.037261962890625,
-0.068359375,
0.00876617431640625,
0.0027065277099609375,
-0.00568389892578125,
0.0256500244140625,
-0.022796630859375,
0.044891357421875,
0.099365234375,
-0.0190277099609375,
0.007549285888671875,
0.0215301513671875,
-0.01277923583984375,
-0.0092926025390625,
0.007137298583984375,
0.0200347900390625,
0.024200439453125,
-0.02099609375,
0.0248565673828125,
0.03094482421875,
0.04888916015625,
-0.0261383056640625,
0.06842041015625,
-0.05029296875,
-0.012451171875,
-0.0014543533325195312,
0.0135955810546875,
-0.044708251953125,
0.0158233642578125,
-0.038818359375,
-0.06982421875,
-0.01593017578125,
0.0384521484375,
0.05572509765625,
0.004405975341796875,
0.05047607421875,
0.040008544921875,
-0.00258636474609375,
-0.0038661956787109375,
-0.0091552734375,
-0.00994873046875,
-0.0293121337890625,
-0.027587890625,
0.004199981689453125,
0.029083251953125,
0.0084686279296875,
0.0142059326171875,
0.0472412109375,
0.00678253173828125,
0.00936126708984375,
-0.020843505859375,
0.01137542724609375,
-0.04913330078125,
0.03045654296875,
0.0046844482421875,
0.04644775390625,
0.031768798828125,
-0.08441162109375,
-0.00897216796875,
-0.0304718017578125,
-0.067626953125,
0.0216522216796875,
0.044189453125,
-0.00850677490234375,
-0.0117645263671875,
0.0225982666015625,
-0.05145263671875,
0.0213775634765625,
0.0186309814453125,
0.0094757080078125,
0.019012451171875,
-0.0029449462890625,
0.0013246536254882812,
0.004001617431640625,
-0.00458526611328125,
0.021240234375,
0.035491943359375,
-0.0018739700317382812,
0.032958984375,
-0.0203094482421875,
0.00238800048828125,
-0.031524658203125,
0.0548095703125,
-0.07928466796875,
-0.032928466796875,
0.025177001953125,
-0.0229034423828125,
0.018646240234375,
0.0002429485321044922,
0.0007061958312988281,
-0.0181732177734375,
0.037200927734375,
-0.047210693359375,
-0.00545501708984375,
-0.039398193359375,
0.0261383056640625,
-0.035675048828125,
0.0235137939453125,
-0.01509857177734375,
0.025390625,
-0.0180511474609375,
-0.046630859375,
0.059234619140625,
0.0140838623046875,
0.01519775390625,
0.01406097412109375,
-0.0177154541015625,
-0.01739501953125,
0.0242156982421875,
-0.024383544921875,
0.0333251953125,
0.040252685546875,
-0.02880859375,
0.01406097412109375,
0.01381683349609375,
-0.006221771240234375,
0.01532745361328125,
0.0306396484375,
-0.01922607421875,
0.0139312744140625,
-0.019317626953125,
-0.054351806640625,
0.016204833984375,
0.039794921875,
-0.0012969970703125,
0.03643798828125,
-0.02398681640625,
-0.0223541259765625,
-0.01448822021484375,
0.0157623291015625,
-0.0211029052734375,
-0.006298065185546875,
-0.03607177734375,
0.0015058517456054688,
-0.0189361572265625,
-0.0501708984375,
-0.0574951171875,
-0.01393890380859375,
0.0168914794921875,
-0.00035309791564941406,
-0.01171875,
0.03790283203125,
-0.0333251953125,
-0.031646728515625,
-0.0103302001953125,
-0.027099609375,
0.019195556640625,
0.028472900390625,
-0.04071044921875,
0.0128021240234375,
-0.0251007080078125,
-0.034698486328125,
-0.02203369140625,
0.0046844482421875,
0.036407470703125,
-0.01242828369140625,
-0.037750244140625,
0.0008053779602050781,
-0.01241302490234375,
0.05712890625,
0.0250396728515625,
-0.0017347335815429688,
0.0095062255859375,
0.0150604248046875,
-0.05035400390625,
-0.054473876953125,
0.0257415771484375,
-0.041656494140625,
-0.0221710205078125,
-0.000014901161193847656,
-0.0181884765625,
-0.00116729736328125,
-0.03778076171875,
-0.056884765625,
0.0751953125,
-0.009307861328125,
-0.026763916015625,
-0.06878662109375,
-0.0022678375244140625,
0.0047149658203125,
0.01038360595703125,
-0.020111083984375,
-0.01422882080078125,
-0.06280517578125,
0.03131103515625,
0.04461669921875,
0.00682830810546875,
0.01416015625,
0.04132080078125,
-0.07080078125,
0.0283355712890625,
-0.01210784912109375,
0.01197052001953125,
0.005878448486328125,
-0.00414276123046875,
0.00031447410583496094,
0.0137939453125,
-0.053924560546875,
-0.00342559814453125,
-0.043426513671875,
0.0055389404296875,
0.012420654296875,
-0.034759521484375,
-0.0732421875,
-0.05206298828125,
0.061248779296875,
0.037322998046875,
0.0272674560546875,
-0.0025501251220703125,
-0.0278472900390625,
-0.01457977294921875,
0.005420684814453125,
0.0006222724914550781,
0.0178375244140625,
-0.05206298828125,
-0.00467681884765625,
0.0156707763671875,
-0.01067352294921875,
0.0093994140625,
-0.031219482421875,
-0.0308990478515625,
-0.01441192626953125,
-0.0301361083984375,
0.00803375244140625,
-0.0357666015625,
0.018218994140625,
0.019439697265625,
-0.044952392578125,
-0.07171630859375,
0.018798828125,
-0.00481414794921875,
-0.051544189453125,
-0.03802490234375,
0.0118255615234375,
0.038299560546875,
-0.00980377197265625,
-0.0070953369140625,
0.0283660888671875,
-0.01529693603515625,
0.01163482666015625,
0.0030803680419921875,
-0.03167724609375,
0.0250244140625,
0.02740478515625,
0.00959014892578125,
-0.044769287109375,
0.0543212890625,
0.0270843505859375,
0.059783935546875,
0.0234832763671875,
-0.0033054351806640625,
-0.00986480712890625,
0.05181884765625,
0.034912109375,
-0.062255859375,
0.03765869140625,
-0.03997802734375,
0.00360870361328125,
-0.005146026611328125,
-0.01241302490234375,
-0.028656005859375,
-0.0030994415283203125,
-0.0499267578125,
-0.011505126953125,
0.0162811279296875
] |
1fbc9b07890a17cb11689fd03373ff1f041dd3fa | Wordpress Stackexchange
Q: Update media library files after upload via FTP I had to upload many files massive and directly to /wp-content/uploads/[year]/[month]/ but those files does not appears in Dashboard>Media>Library
Is there a way to update or refresh it to load those files or it's simply happening because it should have been writen also in database and I avoided it? In this case, is there a plugin to fix it?
A: Avoid direct upload WordPress doesn't scan upload directory for new files, instead use WordPress media uploader to add files WordPress automatically creates folder and store them accordingly.
But you can use this plugin to import those uploaded files into WordPress, it should help you https://wordpress.org/plugins/add-from-server/
| Q: Update media library files after upload via FTP I had to upload many files massive and directly to /wp-content/uploads/[year]/[month]/ but those files does not appears in Dashboard>Media>Library
Is there a way to update or refresh it to load those files or it's simply happening because it should have been writen also in database and I avoided it? In this case, is there a plugin to fix it?
A: Avoid direct upload WordPress doesn't scan upload directory for new files, instead use WordPress media uploader to add files WordPress automatically creates folder and store them accordingly.
But you can use this plugin to import those uploaded files into WordPress, it should help you https://wordpress.org/plugins/add-from-server/
| wordpress | {
"language": "en",
"length": 114,
"provenance": "stackexchange_00019.jsonl.gz:470444",
"question_score": "15",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/246882"
} | [
0.033905029296875,
-0.004467010498046875,
-0.01052093505859375,
0.01065826416015625,
-0.0030364990234375,
-0.026611328125,
0.0635986328125,
-0.0184326171875,
0.04046630859375,
0.00982666015625,
-0.01560211181640625,
-0.0202178955078125,
0.026275634765625,
-0.02264404296875,
-0.0183563232421875,
-0.0243072509765625,
0.0227203369140625,
-0.01409149169921875,
0.046142578125,
0.0009298324584960938,
0.00701904296875,
0.0328369140625,
0.046844482421875,
0.005634307861328125,
-0.0031948089599609375,
0.02734375,
0.0266571044921875,
0.004924774169921875,
-0.01300048828125,
-0.034881591796875,
0.006011962890625,
0.024810791015625,
0.033782958984375,
0.0016431808471679688,
-0.026519775390625,
0.0205535888671875,
0.0276336669921875,
-0.02032470703125,
-0.0012483596801757812,
0.0239105224609375,
-0.002986907958984375,
0.0079345703125,
0.045379638671875,
0.0072479248046875,
0.01499176025390625,
-0.035003662109375,
-0.00885009765625,
-0.060821533203125,
0.0198211669921875,
0.048065185546875,
-0.00286102294921875,
0.0015201568603515625,
0.004974365234375,
-0.010101318359375,
-0.0051116943359375,
-0.034759521484375,
-0.0012788772583007812,
0.03900146484375,
0.005489349365234375,
-0.0223236083984375,
-0.0188140869140625,
0.02691650390625,
0.02191162109375,
0.01432037353515625,
-0.0309906005859375,
0.0050048828125,
0.011383056640625,
0.002994537353515625,
-0.07012939453125,
-0.0509033203125,
0.041107177734375,
-0.03643798828125,
-0.004596710205078125,
-0.030029296875,
0.05389404296875,
0.037506103515625,
-0.01062774658203125,
0.006717681884765625,
0.004512786865234375,
0.0302276611328125,
0.03460693359375,
-0.0036487579345703125,
0.0258331298828125,
-0.0242462158203125,
0.0287628173828125,
0.00270843505859375,
0.004871368408203125,
-0.0181884765625,
0.0088043212890625,
0.02783203125,
-0.01424407958984375,
-0.0020351409912109375,
0.0242156982421875,
0.0479736328125,
-0.01007843017578125,
0.0214691162109375,
0.01091766357421875,
0.06378173828125,
-0.02203369140625,
0.028778076171875,
-0.01236724853515625,
-0.0262908935546875,
0.028656005859375,
-0.048492431640625,
0.0123138427734375,
0.005828857421875,
-0.004924774169921875,
-0.05218505859375,
0.02813720703125,
0.0088653564453125,
-0.0271148681640625,
0.06512451171875,
0.0141754150390625,
-0.02618408203125,
-0.01641845703125,
0.018707275390625,
0.005161285400390625,
0.019439697265625,
0.01152801513671875,
0.018798828125,
-0.0040740966796875,
0.0294647216796875,
-0.09527587890625,
-0.03387451171875,
0.0233001708984375,
-0.037506103515625,
-0.0169219970703125,
0.07135009765625,
-0.005176544189453125,
0.036895751953125,
-0.0294647216796875,
0.0069580078125,
0.046600341796875,
0.0149078369140625,
-0.0036792755126953125,
-0.0206146240234375,
-0.0052642822265625,
0.0025234222412109375,
0.0103759765625,
0.009796142578125,
0.0093841552734375,
-0.04046630859375,
-0.0024929046630859375,
0.016571044921875,
0.050628662109375,
0.0268707275390625,
0.00888824462890625,
0.003902435302734375,
0.019256591796875,
-0.0043182373046875,
0.0073394775390625,
-0.0024700164794921875,
0.0377197265625,
0.0182952880859375,
0.022247314453125,
-0.04803466796875,
0.0908203125,
-0.0699462890625,
0.012939453125,
-0.073974609375,
0.014190673828125,
-0.00843048095703125,
0.00920867919921875,
-0.037628173828125,
-0.046356201171875,
0.00647735595703125,
-0.056976318359375,
-0.003505706787109375,
0.0291900634765625,
0.0173187255859375,
0.006439208984375,
-0.035430908203125,
0.051025390625,
0.0029087066650390625,
-0.022125244140625,
0.019195556640625,
0.038055419921875,
0.0174407958984375,
0.013336181640625,
0.04852294921875,
0.006992340087890625,
-0.023193359375,
0.0882568359375,
-0.042572021484375,
-0.04681396484375,
-0.0066680908203125,
-0.0006995201110839844,
0.0265655517578125,
0.03521728515625,
0.00797271728515625,
0.03863525390625,
-0.01419830322265625,
-0.037933349609375,
-0.004398345947265625,
-0.01561737060546875,
0.0200347900390625,
-0.00881195068359375,
0.039703369140625,
-0.0112457275390625,
-0.0275115966796875,
-0.0156707763671875,
0.04144287109375,
-0.040740966796875,
0.020538330078125,
-0.034088134765625,
0.01049041748046875,
-0.0139007568359375,
0.03558349609375,
0.035919189453125,
0.02142333984375,
0.003208160400390625,
0.031524658203125,
-0.03289794921875,
-0.0217132568359375,
-0.048583984375,
0.007274627685546875,
-0.046051025390625,
0.020263671875,
-0.005641937255859375,
0.034912109375,
-0.0274658203125,
0.007099151611328125,
-0.015899658203125,
-0.008392333984375,
-0.00383758544921875,
0.00865936279296875,
-0.03204345703125,
-0.0042877197265625,
-0.00024306774139404297,
0.006641387939453125,
0.01287841796875,
0.03369140625,
-0.008819580078125,
-0.0023345947265625,
-0.03515625,
-0.0160064697265625,
-0.0494384765625,
-0.09088134765625,
0.019256591796875,
0.0692138671875,
0.007411956787109375,
0.01485443115234375,
0.02081298828125,
0.0745849609375,
0.033721923828125,
0.01192474365234375,
0.0304412841796875,
0.020538330078125,
0.018951416015625,
0.03143310546875,
-0.03369140625,
-0.0190277099609375,
0.01308441162109375,
-0.0489501953125,
-0.01009368896484375,
0.03668212890625,
-0.01690673828125,
-0.0281524658203125,
-0.0118560791015625,
-0.007213592529296875,
0.02410888671875,
-0.054779052734375,
-0.05364990234375,
-0.0141754150390625,
0.0313720703125,
0.01995849609375,
0.0234832763671875,
0.031890869140625,
-0.01499176025390625,
0.0209808349609375,
0.01065826416015625,
-0.04339599609375,
0.0144805908203125,
0.06024169921875,
-0.036041259765625,
-0.0116424560546875,
-0.00016939640045166016,
-0.014739990234375,
-0.016448974609375,
0.01203155517578125,
-0.037322998046875,
-0.024505615234375,
-0.0232696533203125,
-0.01345062255859375,
0.0028858184814453125,
-0.048797607421875,
0.023223876953125,
-0.032867431640625,
-0.0295867919921875,
0.00270843505859375,
0.0271759033203125,
0.046630859375,
-0.008636474609375,
0.019989013671875,
0.00902557373046875,
0.00962066650390625,
0.043182373046875,
-0.03125,
0.035064697265625,
-0.01434326171875,
0.061920166015625,
0.060455322265625,
-0.0192413330078125,
0.01727294921875,
0.00321197509765625,
0.04583740234375,
0.00376129150390625,
0.01293182373046875,
0.0006108283996582031,
-0.006977081298828125,
-0.032379150390625,
-0.00815582275390625,
0.016815185546875,
0.0031299591064453125,
-0.007808685302734375,
-0.04266357421875,
-0.0175628662109375,
0.0057220458984375,
-0.0858154296875,
-0.05487060546875,
-0.0164794921875,
-0.06988525390625,
0.035552978515625,
-0.01397705078125,
-0.03326416015625,
-0.0230712890625,
0.02789306640625,
0.014801025390625,
0.0343017578125,
-0.01080322265625,
-0.0189056396484375,
-0.0274810791015625,
-0.0478515625,
-0.039459228515625,
0.0020389556884765625,
-0.007671356201171875,
-0.0063934326171875,
0.03839111328125,
-0.021514892578125,
-0.056427001953125,
-0.036102294921875,
0.035430908203125,
0.0015201568603515625,
-0.01110076904296875,
0.041015625,
-0.0259552001953125,
0.02435302734375,
-0.0037364959716796875,
0.051055908203125,
0.08026123046875,
-0.07427978515625,
0.00394439697265625,
-0.00623321533203125,
-0.025665283203125,
-0.03985595703125,
0.034515380859375,
0.03277587890625,
-0.06353759765625,
-0.0478515625,
-0.085205078125,
0.030609130859375,
-0.01197052001953125,
0.0039043426513671875,
-0.00202178955078125,
-0.03558349609375,
-0.004955291748046875,
-0.043212890625,
0.0367431640625,
-0.0239715576171875,
0.021820068359375,
-0.0031757354736328125,
-0.0278472900390625,
-0.0033435821533203125,
-0.01042938232421875,
-0.033905029296875,
0.0166778564453125,
0.0289306640625,
-0.0011005401611328125,
-0.018310546875,
0.006603240966796875,
0.02099609375,
-0.03570556640625,
0.045989990234375,
-0.08502197265625,
-0.040740966796875,
0.02435302734375,
-0.0640869140625,
-0.00018227100372314453,
-0.06695556640625,
-0.004116058349609375,
-0.0249176025390625,
0.06982421875,
-0.0270233154296875,
-0.007305145263671875,
0.01175689697265625,
0.03228759765625,
-0.060760498046875,
-0.0599365234375,
-0.036956787109375,
-0.00853729248046875,
0.011566162109375,
-0.0241241455078125,
-0.0030364990234375,
-0.0258636474609375,
0.0030117034912109375,
-0.0382080078125,
-0.0006151199340820312,
-0.01398468017578125,
0.0274200439453125,
-0.0352783203125,
0.02423095703125,
-0.023529052734375,
0.033111572265625,
-0.06292724609375,
0.0009446144104003906,
-0.042022705078125,
-0.09771728515625,
-0.028411865234375,
0.002780914306640625,
0.0826416015625,
-0.0089874267578125,
-0.00040984153747558594,
-0.04541015625,
0.042449951171875,
0.0250244140625,
0.01369476318359375,
0.0203704833984375,
-0.0105743408203125,
0.041534423828125,
-0.01056671142578125,
0.011444091796875,
-0.0225372314453125,
-0.03106689453125,
-0.07080078125,
-0.004932403564453125,
0.00890350341796875,
-0.02777099609375,
0.0281829833984375,
-0.048187255859375,
0.0298309326171875,
-0.0244598388671875,
-0.026123046875,
-0.051513671875,
0.006008148193359375,
-0.0433349609375,
0.0203399658203125,
-0.0248870849609375,
-0.040313720703125,
0.048065185546875,
0.00007700920104980469,
0.01128387451171875,
0.01447296142578125,
0.07080078125,
0.00206756591796875,
-0.01535797119140625,
-0.0902099609375,
0.0163116455078125,
0.03350830078125,
0.02044677734375,
0.01605224609375,
0.0213623046875,
-0.017608642578125,
0.00439453125,
0.0105743408203125,
0.035247802734375,
-0.0174407958984375,
0.0214691162109375,
0.019134521484375,
0.00933837890625,
0.009674072265625,
0.0277252197265625,
-0.019683837890625,
0.006320953369140625,
-0.007724761962890625,
0.007476806640625,
-0.0257110595703125,
0.019317626953125,
0.0380859375,
-0.0218963623046875,
-0.04901123046875,
-0.09515380859375,
0.023162841796875,
-0.0335693359375,
0.00958251953125,
-0.03515625,
0.0108184814453125,
0.0246429443359375,
0.03271484375,
-0.01088714599609375,
0.0298614501953125,
0.02301025390625,
-0.02056884765625,
0.0218963623046875,
0.018157958984375,
-0.0254364013671875,
0.00429534912109375,
-0.009765625,
0.0170745849609375,
-0.0167236328125,
-0.051971435546875,
0.0252838134765625,
-0.022369384765625,
0.040985107421875,
0.03399658203125,
0.00490570068359375,
0.033172607421875,
0.032745361328125,
0.0157012939453125,
-0.0209197998046875,
-0.011962890625,
0.0211181640625,
-0.0300750732421875,
0.01025390625,
0.023345947265625,
-0.0340576171875,
0.007419586181640625,
0.0026950836181640625,
0.005107879638671875,
-0.0244293212890625,
0.005619049072265625,
0.02459716796875,
0.006084442138671875,
0.028839111328125,
0.0309295654296875,
-0.007221221923828125,
-0.005496978759765625,
0.00806427001953125,
-0.01812744140625,
-0.034759521484375,
0.041748046875,
-0.021270751953125,
0.0291595458984375,
-0.0096893310546875,
-0.051055908203125,
0.0635986328125,
-0.053985595703125,
-0.01123046875,
0.03277587890625,
-0.023956298828125,
-0.040771484375,
-0.0244598388671875,
0.0023822784423828125,
0.0477294921875,
-0.015869140625,
-0.005016326904296875,
-0.006412506103515625,
-0.021331787109375,
0.010467529296875,
0.06219482421875,
-0.0264892578125,
-0.0010433197021484375,
-0.0028018951416015625,
0.059295654296875,
-0.0103607177734375,
-0.0223388671875,
-0.00829315185546875,
0.0235748291015625,
-0.0396728515625,
-0.025604248046875,
0.08685302734375,
0.00685882568359375,
0.007450103759765625,
-0.02618408203125,
0.0007467269897460938,
0.0023670196533203125,
0.01837158203125,
0.00046062469482421875,
-0.02874755859375,
0.006374359130859375,
-0.0013360977172851562,
-0.045562744140625,
-0.04656982421875,
-0.00937652587890625,
-0.01641845703125,
-0.0460205078125,
-0.0169677734375,
0.01103973388671875,
0.034515380859375,
-0.02935791015625,
-0.040313720703125,
0.01316070556640625,
-0.0026607513427734375,
0.006893157958984375,
0.028350830078125,
0.02337646484375,
0.009063720703125,
0.0069580078125,
0.01096343994140625,
0.0193328857421875,
0.002223968505859375,
-0.034454345703125,
-0.023162841796875,
-0.0361328125,
-0.03131103515625,
0.018218994140625,
0.032440185546875,
0.004974365234375,
0.0172119140625,
0.0283050537109375,
0.02001953125,
0.011749267578125,
-0.040557861328125,
0.0016374588012695312,
-0.01316070556640625,
0.052947998046875,
-0.04693603515625,
-0.0242462158203125,
0.03631591796875,
-0.01464080810546875,
-0.01416015625,
-0.006511688232421875,
-0.058319091796875,
0.05950927734375,
0.014312744140625,
0.01398468017578125,
0.0008363723754882812,
-0.016815185546875,
0.068359375,
0.03558349609375,
-0.033721923828125,
0.0233306884765625,
0.0216217041015625,
-0.00701904296875,
0.011688232421875,
-0.025115966796875,
0.042877197265625,
0.023101806640625,
0.033294677734375,
-0.02252197265625,
0.01137542724609375,
0.00919342041015625,
-0.021484375,
0.01495361328125,
-0.00782012939453125,
0.0312347412109375,
-0.005519866943359375,
0.0120849609375,
-0.005382537841796875,
-0.012786865234375,
0.04296875,
-0.02667236328125,
-0.020263671875,
-0.05584716796875,
0.031402587890625,
-0.0203857421875,
-0.054412841796875,
-0.02386474609375,
-0.0170745849609375,
-0.01194000244140625,
0.0135650634765625,
0.04345703125,
0.020263671875,
-0.021484375,
-0.05633544921875,
0.0306549072265625,
-0.052520751953125,
0.024169921875,
0.01462554931640625,
-0.025848388671875,
-0.0197601318359375,
-0.025970458984375,
-0.004581451416015625,
-0.0279083251953125,
-0.01236724853515625,
0.02288818359375,
-0.004863739013671875,
0.044708251953125,
0.040191650390625,
0.0028018951416015625,
-0.00853729248046875,
0.0168304443359375,
-0.003376007080078125,
-0.000060439109802246094,
-0.0220947265625,
0.024993896484375,
0.026641845703125,
-0.029632568359375,
0.019775390625,
-0.0009908676147460938,
-0.028411865234375,
-0.01105499267578125,
-0.049407958984375,
0.055511474609375,
-0.047515869140625,
0.0123443603515625,
0.026458740234375,
0.0404052734375,
-0.0208282470703125,
-0.0015430450439453125,
0.04425048828125,
-0.074462890625,
-0.040069580078125,
0.0254058837890625,
-0.0121307373046875,
-0.0252227783203125,
0.0189971923828125,
-0.05328369140625,
0.1114501953125,
-0.0153961181640625,
0.0170440673828125,
0.021453857421875,
0.041717529296875,
-0.033721923828125,
0.0122222900390625,
-0.039642333984375,
0.04736328125,
0.01215362548828125,
0.01441192626953125,
-0.0797119140625,
-0.01357269287109375,
-0.016754150390625,
0.0221099853515625,
0.0223388671875,
0.007381439208984375,
-0.0433349609375,
0.0016374588012695312,
0.040496826171875,
0.07135009765625,
0.0499267578125,
0.026947021484375,
-0.025390625,
0.007297515869140625,
0.017181396484375,
-0.051849365234375,
0.0127105712890625,
-0.0036678314208984375,
-0.032440185546875,
-0.0038890838623046875,
0.0341796875,
0.048492431640625,
0.01357269287109375,
0.0391845703125,
0.027191162109375,
-0.0044097900390625,
0.0002846717834472656,
0.016265869140625,
0.0204620361328125,
0.019622802734375,
0.004878997802734375,
-0.017181396484375,
-0.0135955810546875,
-0.01319122314453125,
0.0261077880859375,
-0.0304107666015625,
0.0190277099609375,
0.017547607421875,
-0.0031528472900390625,
0.027923583984375,
0.01148223876953125,
0.005970001220703125,
0.00954437255859375,
0.0164794921875,
0.06341552734375,
0.0103302001953125,
0.0214691162109375,
-0.0440673828125,
-0.018218994140625,
0.054901123046875,
0.08245849609375,
-0.041534423828125,
-0.0183258056640625,
0.01885986328125,
0.0197296142578125,
-0.03070068359375,
-0.0287628173828125,
-0.03790283203125,
-0.059295654296875,
0.003360748291015625,
-0.00922393798828125,
-0.00586700439453125,
0.0204620361328125,
0.0291595458984375,
-0.006992340087890625,
-0.007694244384765625,
-0.01282501220703125,
-0.0032444000244140625,
-0.03082275390625,
0.056243896484375,
-0.0012998580932617188,
0.0164642333984375,
-0.0265655517578125,
0.035308837890625,
-0.038482666015625,
0.01023101806640625,
0.00626373291015625,
0.038116455078125,
-0.0207672119140625,
0.002910614013671875,
-0.035675048828125,
-0.07598876953125,
0.0223846435546875,
0.041412353515625,
0.0298919677734375,
0.041778564453125,
0.049713134765625,
0.04217529296875,
-0.01702880859375,
0.005702972412109375,
0.0184478759765625,
-0.0127105712890625,
-0.0187530517578125,
-0.047515869140625,
0.0298309326171875,
0.031982421875,
0.0028247833251953125,
0.01464080810546875,
-0.0109405517578125,
0.059814453125,
-0.03289794921875,
0.0238189697265625,
-0.01020050048828125,
-0.042449951171875,
0.03363037109375,
-0.01032257080078125,
0.08154296875,
-0.0018749237060546875,
-0.050079345703125,
-0.01904296875,
-0.00772857666015625,
-0.00827789306640625,
0.00824737548828125,
0.034210205078125,
-0.01096343994140625,
0.0094757080078125,
-0.02081298828125,
-0.0126495361328125,
-0.01247406005859375,
-0.0128173828125,
0.04315185546875,
-0.00980377197265625,
-0.024017333984375,
0.01004791259765625,
-0.01094818115234375,
0.001430511474609375,
-0.0257415771484375,
0.03173828125,
0.0283660888671875,
0.07940673828125,
-0.0282440185546875,
0.033172607421875,
0.02191162109375,
-0.002895355224609375,
0.0014553070068359375,
0.024749755859375,
-0.024658203125,
-0.00202178955078125,
0.00894927978515625,
-0.0278778076171875,
-0.0137786865234375,
0.048431396484375,
0.0018281936645507812,
-0.004680633544921875,
-0.0035858154296875,
-0.0294036865234375,
0.020721435546875,
0.0594482421875,
-0.002933502197265625,
-0.024200439453125,
-0.0205078125,
0.01461029052734375,
0.029571533203125,
-0.007534027099609375,
-0.00827789306640625,
-0.0269775390625,
0.0232391357421875,
-0.002155303955078125,
-0.005985260009765625,
0.005901336669921875,
-0.007110595703125,
0.0178680419921875,
0.035186767578125,
-0.021514892578125,
-0.041900634765625,
-0.01509857177734375,
-0.010284423828125,
-0.02392578125,
0.0167388916015625,
0.028778076171875,
-0.0020160675048828125,
-0.00270843505859375,
-0.0016374588012695312,
0.0178375244140625,
0.033294677734375,
-0.01253509521484375,
-0.0008630752563476562,
0.0030803680419921875,
-0.0171661376953125,
0.0038700103759765625,
-0.02777099609375,
-0.0219573974609375,
-0.0390625,
-0.00006657838821411133,
0.03167724609375,
-0.0126495361328125,
0.01146697998046875,
-0.03765869140625,
0.03143310546875,
0.046173095703125,
-0.003803253173828125,
-0.088623046875,
0.033233642578125,
-0.032135009765625,
0.10858154296875,
-0.021270751953125,
-0.0128326416015625,
-0.0089569091796875,
0.040740966796875,
-0.034820556640625,
-0.048828125,
-0.045440673828125,
0.0137939453125,
-0.05438232421875,
0.002208709716796875,
0.00904083251953125,
-0.01235198974609375,
0.04705810546875,
0.0114898681640625,
0.0293426513671875,
0.06500244140625,
0.019989013671875,
-0.04827880859375,
-0.00018775463104248047,
-0.017425537109375,
0.04541015625,
0.0031147003173828125,
-0.0230255126953125,
-0.0214691162109375,
-0.001190185546875,
0.005466461181640625,
-0.0167694091796875,
-0.0078277587890625,
-0.054412841796875,
-0.100830078125,
0.04473876953125,
-0.01024627685546875,
-0.04461669921875,
-0.0301971435546875,
0.0110931396484375,
-0.035736083984375,
0.044891357421875,
0.004947662353515625,
-0.0243682861328125,
0.036468505859375,
0.060882568359375,
-0.008758544921875,
0.0275115966796875,
0.006866455078125,
-0.00981903076171875,
-0.0207061767578125,
-0.0024700164794921875,
-0.00826263427734375,
0.0004374980926513672,
0.0112457275390625,
-0.02008056640625,
0.043487548828125,
0.03094482421875,
-0.033477783203125,
0.03729248046875,
0.0125885009765625,
-0.0193023681640625,
-0.0223541259765625,
-0.020233154296875,
-0.043609619140625,
-0.0108489990234375,
0.08203125,
0.06488037109375,
0.019134521484375,
-0.01641845703125,
0.0369873046875,
0.006439208984375,
0.043853759765625,
0.0081329345703125,
-0.01763916015625,
-0.0003871917724609375,
-0.01629638671875,
-0.0166473388671875,
0.01029205322265625,
-0.04095458984375,
-0.012237548828125,
-0.028106689453125,
-0.0294342041015625,
0.0012483596801757812,
0.00507354736328125,
-0.004459381103515625,
-0.00864410400390625,
0.08123779296875,
-0.037017822265625,
0.018310546875,
0.01641845703125,
0.0176544189453125,
0.04376220703125,
0.03143310546875,
-0.006023406982421875,
0.02838134765625,
-0.024810791015625,
0.02032470703125,
0.01096343994140625,
-0.00418853759765625,
-0.0248870849609375,
0.0264434814453125,
0.00957489013671875,
0.0067901611328125,
-0.023406982421875,
-0.01445770263671875,
0.0027217864990234375,
0.04144287109375,
-0.03057861328125,
0.09820556640625,
-0.0213775634765625,
-0.039398193359375,
-0.031463623046875,
0.0230255126953125,
-0.055999755859375,
0.0089569091796875,
-0.00299072265625,
-0.04461669921875,
0.005260467529296875,
0.01425933837890625,
-0.0178680419921875,
-0.039215087890625,
0.013946533203125,
-0.0699462890625,
-0.0015621185302734375,
0.0144805908203125
] |
1a7d685e590f974674c5aad85dc07901f3ed0c9a | Wordpress Stackexchange
Q: Order get_terms by term meta I have a custom taxonomy called prod-cat
I want to order the output in the template by number, so I added a term_meta to the taxonomy like this:
add_action( 'prod-cat_add_form_fields', 'add_feature_group_field', 10, 2 );
function add_feature_group_field($taxonomy) {
?>
<div class="form-field term-order-wrap">
<label for="term-order">Order</label>
<input type="text" name="wm-cat-prod-order" />
</div>
<?php
}
And then:
add_action( 'created_prod-cat', 'save_feature_meta', 10, 2 );
function save_feature_meta( $term_id, $tt_id ){
if( isset( $_POST['wm-cat-prod-order'] ) && '' !== $_POST['wm-cat-prod-order'] ){
add_term_meta( $term_id, 'wm-cat-prod-order', $_POST['wm-cat-prod-order'], true );
}
}
I have the term_meta working, It's getting saved. Then in the template I do this:
$args = array(
'taxonomy' => 'categoria-de-productos',
'orderby' => 'wm-cat-prod-order',
'order' => 'ASC',
'hide_empty' => false,
'hierarchical' => false,
'parent' => 0,
);
$terms = get_terms( $args );
But I can't get it to orderby the "wm-cat-prod-order" meta.
Anyone on this?
Thanks
A: $args = array(
'taxonomy' => 'MY_TAX',
'meta_key' => 'ordem',
'meta_compare' => 'NUMERIC',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'hide_empty' => false,
);
$the_query = new WP_Term_Query($args);
foreach ( $the_query->get_terms() as $term )
{
...
}
| Q: Order get_terms by term meta I have a custom taxonomy called prod-cat
I want to order the output in the template by number, so I added a term_meta to the taxonomy like this:
add_action( 'prod-cat_add_form_fields', 'add_feature_group_field', 10, 2 );
function add_feature_group_field($taxonomy) {
?>
<div class="form-field term-order-wrap">
<label for="term-order">Order</label>
<input type="text" name="wm-cat-prod-order" />
</div>
<?php
}
And then:
add_action( 'created_prod-cat', 'save_feature_meta', 10, 2 );
function save_feature_meta( $term_id, $tt_id ){
if( isset( $_POST['wm-cat-prod-order'] ) && '' !== $_POST['wm-cat-prod-order'] ){
add_term_meta( $term_id, 'wm-cat-prod-order', $_POST['wm-cat-prod-order'], true );
}
}
I have the term_meta working, It's getting saved. Then in the template I do this:
$args = array(
'taxonomy' => 'categoria-de-productos',
'orderby' => 'wm-cat-prod-order',
'order' => 'ASC',
'hide_empty' => false,
'hierarchical' => false,
'parent' => 0,
);
$terms = get_terms( $args );
But I can't get it to orderby the "wm-cat-prod-order" meta.
Anyone on this?
Thanks
A: $args = array(
'taxonomy' => 'MY_TAX',
'meta_key' => 'ordem',
'meta_compare' => 'NUMERIC',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'hide_empty' => false,
);
$the_query = new WP_Term_Query($args);
foreach ( $the_query->get_terms() as $term )
{
...
}
A: I was having a rough time with this as well, and I created my meta field with ACF. This is what I did to get it to work (removed some properties for brevity):
$args = array(
'taxonomy' => 'categoria-de-productos',
'order' => 'ASC',
'orderby' => 'meta_value_num',//Treat the meta value as numeric
'meta_key' => 'wm-cat-prod-order'//Meta key
);
$terms_query = new WP_Term_Query( $args );
if( ! empty( $terms_query->terms ) ) {
foreach( $terms_query->terms as $term ) {
//Do stuff, $term is a WP_Term object
}
}
One of the things I usually do is define a fallback, like 'meta_value_num term_id' to use term_id if the values for wm-cat-prod-order are all the same, but this broke it entirely and produced unexpected results. It only worked if 'meta_value_num' was the only value for orderby.
A: get_terms supports a meta_query which calls a new WP_Meta_Query parameter as you can see here. To query your terms with your desired meta, you could change your function call to something like this:
$args = array(
'taxonomy' => 'categoria-de-productos',
'orderby' => 'meta_value_num',
'order' => 'ASC',
'hide_empty' => false,
'hierarchical' => false,
'parent' => 0,
'meta_query' => [[
'key' => 'wm-cat-prod-order',
'type' => 'NUMERIC',
]],
);
$terms = get_terms( $args );
This code is untested and may needs to be changed in your example. But the links should guide you to the solution.
A: for me, I made a custom taxonomy and in that custom taxonomy I had a custom meta. I wanted to have in the admin backend a column and made it sortable. to make sortable work for a custom taxonomy in a custom meta I did this.
https://pastebin.com/vr2sCKzX
public function pre_get_terms( $query ) {
$meta_query_args = array(
'relation' => 'AND', // Optional, defaults to "AND"
array(
'key' => 'order_index',
'value' => 0,
'compare' => '>='
)
);
$meta_query = new WP_Meta_Query( $meta_query_args );
$query->meta_query = $meta_query;
$query->orderby = 'position_clause';
}
I found the answer in this link https://core.trac.wordpress.org/ticket/34996
I just had to adapt the answer provided in the comments by @eherman24
| wordpress | {
"language": "en",
"length": 512,
"provenance": "stackexchange_00019.jsonl.gz:470472",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/246975"
} | [
0.0201416015625,
-0.0006384849548339844,
-0.0037059783935546875,
-0.04608154296875,
0.001399993896484375,
-0.01027679443359375,
0.0020599365234375,
-0.0013256072998046875,
-0.0095367431640625,
0.0281829833984375,
0.00501251220703125,
-0.06317138671875,
-0.021759033203125,
-0.048919677734375,
-0.039337158203125,
-0.057220458984375,
0.02197265625,
0.000058770179748535156,
0.0484619140625,
0.01493072509765625,
0.0205535888671875,
0.041229248046875,
0.012298583984375,
-0.0301513671875,
0.02532958984375,
-0.01483154296875,
0.05126953125,
-0.04962158203125,
0.0330810546875,
-0.033447265625,
0.025604248046875,
-0.00661468505859375,
0.03399658203125,
-0.0225830078125,
0.01555633544921875,
-0.0197296142578125,
0.0301666259765625,
-0.02197265625,
-0.007015228271484375,
0.01953125,
0.0222930908203125,
-0.003894805908203125,
0.003849029541015625,
0.0267486572265625,
-0.019683837890625,
-0.04541015625,
0.023040771484375,
-0.03448486328125,
0.01727294921875,
0.01490020751953125,
0.0296173095703125,
-0.0094757080078125,
0.03485107421875,
-0.031585693359375,
-0.0312042236328125,
-0.0222015380859375,
-0.034637451171875,
0.025238037109375,
0.0169677734375,
0.0382080078125,
0.0015993118286132812,
-0.0021457672119140625,
-0.004425048828125,
-0.037353515625,
-0.0030002593994140625,
0.0160980224609375,
0.0272369384765625,
0.00701141357421875,
-0.04229736328125,
0.00403594970703125,
0.03326416015625,
-0.03558349609375,
0.0182037353515625,
0.00994110107421875,
0.0038738250732421875,
-0.06988525390625,
0.016876220703125,
-0.0238037109375,
0.01305389404296875,
0.03045654296875,
0.0238189697265625,
-0.00848388671875,
0.0083465576171875,
-0.01486968994140625,
0.004974365234375,
0.005207061767578125,
-0.008514404296875,
-0.0152740478515625,
-0.0042724609375,
-0.037506103515625,
-0.0011692047119140625,
-0.04119873046875,
-0.0184173583984375,
-0.0031223297119140625,
-0.0081024169921875,
-0.046905517578125,
0.0184326171875,
0.060272216796875,
-0.0245208740234375,
-0.0234832763671875,
-0.01529693603515625,
-0.0283050537109375,
-0.01494598388671875,
-0.0296630859375,
-0.01239776611328125,
-0.00492095947265625,
-0.0129241943359375,
-0.0097503662109375,
0.0291748046875,
0.0294952392578125,
-0.0018014907836914062,
-0.0074462890625,
0.0038814544677734375,
-0.033111572265625,
0.00016260147094726562,
-0.010986328125,
-0.032928466796875,
0.036956787109375,
0.01316070556640625,
-0.01534271240234375,
0.01512908935546875,
0.0290069580078125,
0.034637451171875,
-0.03759765625,
-0.01509857177734375,
-0.019256591796875,
-0.033538818359375,
-0.061126708984375,
-0.0372314453125,
0.0232696533203125,
-0.0462646484375,
0.01407623291015625,
0.06866455078125,
0.0202484130859375,
-0.006282806396484375,
-0.01454925537109375,
-0.0023174285888671875,
-0.0164794921875,
0.00783538818359375,
-0.005649566650390625,
0.00502777099609375,
0.0014390945434570312,
0.059051513671875,
-0.00901031494140625,
-0.026702880859375,
-0.00896453857421875,
-0.0008006095886230469,
0.018524169921875,
0.018829345703125,
0.00801849365234375,
-0.024810791015625,
-0.0239715576171875,
0.07659912109375,
-0.005092620849609375,
-0.0648193359375,
0.004459381103515625,
0.0223388671875,
-0.0148468017578125,
-0.07275390625,
-0.061279296875,
-0.012847900390625,
-0.01168060302734375,
0.0347900390625,
-0.057830810546875,
-0.065185546875,
0.0211029052734375,
-0.04986572265625,
-0.0266876220703125,
0.025787353515625,
0.03204345703125,
0.00640106201171875,
-0.01458740234375,
0.00986480712890625,
0.0085601806640625,
-0.0118408203125,
0.00829315185546875,
-0.0209503173828125,
0.01525115966796875,
0.033203125,
-0.00658416748046875,
-0.046051025390625,
-0.0616455078125,
0.0292510986328125,
-0.017852783203125,
-0.05615234375,
0.04010009765625,
0.003162384033203125,
0.041351318359375,
0.00439453125,
-0.0005950927734375,
0.06494140625,
0.021453857421875,
-0.06915283203125,
0.06475830078125,
0.01407623291015625,
-0.0244598388671875,
-0.03399658203125,
-0.01094818115234375,
-0.005245208740234375,
-0.0302734375,
-0.01097869873046875,
0.0241241455078125,
-0.01021575927734375,
-0.0009093284606933594,
-0.036224365234375,
0.005687713623046875,
-0.0202484130859375,
0.03900146484375,
-0.037384033203125,
0.004787445068359375,
0.0229339599609375,
-0.039825439453125,
-0.0165557861328125,
0.0211181640625,
0.006561279296875,
-0.00852203369140625,
-0.005756378173828125,
0.05670166015625,
0.00829315185546875,
0.010772705078125,
-0.01485443115234375,
-0.0362548828125,
0.00637054443359375,
0.035247802734375,
0.00850677490234375,
0.0160675048828125,
-0.0338134765625,
0.004451751708984375,
-0.013885498046875,
0.023956298828125,
-0.0195770263671875,
0.01503753662109375,
0.006275177001953125,
0.01800537109375,
-0.0362548828125,
-0.00991058349609375,
0.0119476318359375,
-0.051055908203125,
0.01137542724609375,
0.0460205078125,
0.0181884765625,
0.001277923583984375,
0.01374053955078125,
0.04986572265625,
0.060699462890625,
0.017242431640625,
0.01092529296875,
-0.004642486572265625,
0.00817108154296875,
0.02093505859375,
0.0176849365234375,
0.006481170654296875,
-0.0063018798828125,
0.004131317138671875,
0.02642822265625,
0.01360321044921875,
-0.0279693603515625,
-0.0126953125,
-0.007007598876953125,
-0.0166168212890625,
0.015106201171875,
-0.0687255859375,
-0.0416259765625,
-0.0203094482421875,
0.022308349609375,
0.0199127197265625,
0.03411865234375,
0.0239410400390625,
-0.058929443359375,
0.00787353515625,
0.037078857421875,
0.04937744140625,
0.0049896240234375,
-0.03302001953125,
-0.039825439453125,
-0.01506805419921875,
-0.031982421875,
0.03436279296875,
0.00968170166015625,
-0.039093017578125,
0.01166534423828125,
0.04486083984375,
0.013671875,
-0.0018949508666992188,
-0.03289794921875,
-0.074951171875,
0.01544189453125,
0.054962158203125,
-0.03021240234375,
-0.0007405281066894531,
0.01611328125,
0.043426513671875,
-0.01087188720703125,
0.003078460693359375,
-0.00743865966796875,
0.0131683349609375,
0.0013704299926757812,
-0.022369384765625,
0.042572021484375,
-0.038848876953125,
0.004390716552734375,
0.044677734375,
-0.020904541015625,
0.021514892578125,
0.009033203125,
-0.0275115966796875,
-0.01131439208984375,
0.04144287109375,
0.0003952980041503906,
-0.0170135498046875,
-0.045654296875,
-0.0198516845703125,
0.034423828125,
0.01934814453125,
0.031463623046875,
-0.020355224609375,
0.017303466796875,
0.04449462890625,
-0.01953125,
-0.031005859375,
0.021514892578125,
-0.03460693359375,
0.018310546875,
-0.023162841796875,
-0.025115966796875,
-0.0234222412109375,
-0.00036144256591796875,
0.006622314453125,
0.0083465576171875,
-0.006397247314453125,
-0.05975341796875,
-0.0285186767578125,
-0.07562255859375,
0.01381683349609375,
0.00392913818359375,
0.0311431884765625,
0.00821685791015625,
0.0899658203125,
0.01322174072265625,
-0.033233642578125,
0.034454345703125,
-0.004436492919921875,
0.01323699951171875,
0.05755615234375,
0.01099395751953125,
-0.055908203125,
0.01136016845703125,
-0.0175018310546875,
0.0269012451171875,
0.018463134765625,
-0.0092620849609375,
0.0108489990234375,
0.0113983154296875,
0.030426025390625,
0.0294189453125,
0.01171112060546875,
-0.0174713134765625,
0.0273590087890625,
0.042449951171875,
-0.0164947509765625,
-0.00533294677734375,
-0.003101348876953125,
-0.01256561279296875,
0.0266571044921875,
-0.0159759521484375,
-0.00110626220703125,
-0.004405975341796875,
0.027313232421875,
-0.0005011558532714844,
0.016937255859375,
0.01324462890625,
-0.007465362548828125,
-0.011077880859375,
-0.01380157470703125,
-0.031005859375,
-0.0261688232421875,
0.03753662109375,
-0.004497528076171875,
-0.0212554931640625,
0.00449371337890625,
0.006183624267578125,
-0.0236358642578125,
-0.0015621185302734375,
-0.064208984375,
-0.06695556640625,
0.050048828125,
-0.0294342041015625,
0.0061187744140625,
-0.056854248046875,
-0.02093505859375,
-0.0248870849609375,
0.08837890625,
-0.01064300537109375,
-0.0362548828125,
-0.0110626220703125,
0.017608642578125,
-0.03240966796875,
-0.02227783203125,
0.0013132095336914062,
0.0051422119140625,
-0.0926513671875,
0.023101806640625,
0.006549835205078125,
-0.0274658203125,
-0.021820068359375,
-0.01479339599609375,
-0.07135009765625,
-0.0322265625,
0.06402587890625,
-0.036529541015625,
0.0218658447265625,
0.015869140625,
0.014556884765625,
-0.0104217529296875,
-0.040130615234375,
0.01422882080078125,
-0.04052734375,
-0.0056915283203125,
-0.01053619384765625,
0.004467010498046875,
-0.01306915283203125,
0.0200653076171875,
-0.00702667236328125,
0.04473876953125,
-0.01297760009765625,
0.02886962890625,
-0.004791259765625,
0.0316162109375,
-0.03424072265625,
-0.032440185546875,
0.0067291259765625,
-0.046722412109375,
-0.04888916015625,
-0.011962890625,
-0.00936126708984375,
0.019775390625,
0.003513336181640625,
0.0022640228271484375,
0.0287628173828125,
-0.0020999908447265625,
-0.060302734375,
-0.04718017578125,
-0.079833984375,
-0.018524169921875,
-0.05133056640625,
-0.0155792236328125,
-0.046722412109375,
-0.08233642578125,
0.00487518310546875,
-0.035125732421875,
0.00014579296112060547,
0.016021728515625,
0.0653076171875,
0.0305328369140625,
0.0143890380859375,
-0.017578125,
0.01806640625,
0.0340576171875,
0.0186309814453125,
-0.01520538330078125,
-0.04010009765625,
-0.041748046875,
0.048065185546875,
-0.01062774658203125,
0.00037360191345214844,
-0.016815185546875,
0.0234222412109375,
0.00786590576171875,
-0.042236328125,
0.037628173828125,
-0.01113128662109375,
0.0229949951171875,
0.0166015625,
-0.0171356201171875,
-0.050445556640625,
-0.032012939453125,
0.06500244140625,
-0.00411224365234375,
0.046295166015625,
-0.053619384765625,
-0.042816162109375,
0.014801025390625,
-0.0229644775390625,
0.0027599334716796875,
0.018524169921875,
-0.00870513916015625,
0.01296234130859375,
-0.01288604736328125,
0.0185699462890625,
-0.02740478515625,
0.01128387451171875,
-0.058624267578125,
0.01189422607421875,
0.019134521484375,
-0.01535797119140625,
-0.0009088516235351562,
-0.00899505615234375,
0.04583740234375,
0.0162353515625,
-0.026947021484375,
-0.0029277801513671875,
0.001201629638671875,
0.055145263671875,
-0.0023975372314453125,
-0.018646240234375,
-0.005733489990234375,
0.01155853271484375,
0.025146484375,
0.0006923675537109375,
-0.06268310546875,
0.05963134765625,
-0.01068878173828125,
-0.0286102294921875,
0.0003788471221923828,
-0.0190582275390625,
-0.01120758056640625,
0.08740234375,
-0.034332275390625,
0.052978515625,
-0.014129638671875,
0.01200103759765625,
0.0154876708984375,
0.0188446044921875,
0.034637451171875,
-0.019927978515625,
0.01201629638671875,
-0.031707763671875,
0.0218963623046875,
-0.0251312255859375,
-0.02081298828125,
-0.00699615478515625,
0.0231781005859375,
-0.01055908203125,
-0.0013990402221679688,
0.03271484375,
0.004917144775390625,
-0.0207672119140625,
-0.003971099853515625,
0.006313323974609375,
-0.01690673828125,
-0.0103912353515625,
-0.01373291015625,
-0.015411376953125,
0.00879669189453125,
0.01096343994140625,
0.02496337890625,
0.011749267578125,
0.03924560546875,
-0.039459228515625,
0.040802001953125,
-0.029052734375,
-0.026123046875,
-0.04693603515625,
0.011749267578125,
0.0304107666015625,
0.0021514892578125,
-0.04254150390625,
-0.0034732818603515625,
-0.042724609375,
0.03179931640625,
-0.030670166015625,
0.05419921875,
-0.045654296875,
0.01221466064453125,
-0.034393310546875,
0.0257568359375,
0.00445556640625,
0.00970458984375,
-0.01483917236328125,
-0.0142974853515625,
-0.0144805908203125,
-0.0172576904296875,
-0.0234527587890625,
-0.0227813720703125,
-0.0162811279296875,
0.007610321044921875,
-0.031341552734375,
0.018310546875,
-0.0283050537109375,
-0.0163726806640625,
-0.0010242462158203125,
-0.007904052734375,
-0.0162353515625,
-0.002300262451171875,
0.008056640625,
0.044952392578125,
-0.036041259765625,
0.0570068359375,
0.01018524169921875,
-0.0070343017578125,
-0.0303955078125,
-0.013824462890625,
-0.00823211669921875,
-0.07305908203125,
-0.0129241943359375,
0.005840301513671875,
-0.044189453125,
0.0435791015625,
0.04339599609375,
0.016265869140625,
0.01308441162109375,
0.01380157470703125,
0.0195159912109375,
-0.0002243518829345703,
-0.040252685546875,
0.0340576171875,
-0.007434844970703125,
0.0283660888671875,
-0.057403564453125,
-0.0019388198852539062,
0.0191650390625,
-0.00795745849609375,
0.07061767578125,
-0.0428466796875,
0.06103515625,
0.0200347900390625,
-0.0150604248046875,
0.0162811279296875,
0.030059814453125,
0.056549072265625,
0.058837890625,
-0.0036144256591796875,
0.066650390625,
0.0106964111328125,
0.01047515869140625,
0.0179595947265625,
0.0260772705078125,
0.07421875,
-0.005504608154296875,
-0.0250244140625,
0.0399169921875,
-0.04315185546875,
0.01326751708984375,
0.00800323486328125,
0.03790283203125,
-0.034149169921875,
0.0145416259765625,
0.00777435302734375,
-0.008209228515625,
0.0565185546875,
0.020263671875,
-0.023895263671875,
-0.0120391845703125,
0.0035495758056640625,
-0.0288238525390625,
-0.0176544189453125,
0.0221405029296875,
0.01422882080078125,
-0.01152801513671875,
0.00307464599609375,
-0.002147674560546875,
-0.0124664306640625,
-0.0007925033569335938,
-0.04180908203125,
-0.006832122802734375,
-0.02349853515625,
-0.0439453125,
0.0262298583984375,
0.003139495849609375,
-0.001953125,
-0.05731201171875,
0.02496337890625,
0.00130462646484375,
0.007076263427734375,
0.039764404296875,
-0.034637451171875,
0.030975341796875,
0.0237274169921875,
-0.00899505615234375,
-0.009918212890625,
-0.01314544677734375,
-0.030975341796875,
-0.00775146484375,
-0.018096923828125,
-0.0147552490234375,
-0.0478515625,
0.0004355907440185547,
0.00464630126953125,
-0.0325927734375,
-0.037139892578125,
-0.00864410400390625,
-0.01788330078125,
0.02294921875,
-0.0182952880859375,
-0.015869140625,
0.0152587890625,
0.061004638671875,
0.0201873779296875,
-0.0017080307006835938,
0.0140380859375,
-0.068603515625,
-0.01788330078125,
0.0207977294921875,
0.0036602020263671875,
-0.00604248046875,
0.0000623464584350586,
-0.08123779296875,
0.1317138671875,
-0.0133819580078125,
0.03338623046875,
-0.025970458984375,
0.0628662109375,
-0.01265716552734375,
0.03509521484375,
-0.033538818359375,
0.0635986328125,
0.0240631103515625,
0.042938232421875,
-0.056243896484375,
-0.0308685302734375,
0.013946533203125,
0.07147216796875,
0.03509521484375,
0.006244659423828125,
-0.07958984375,
-0.0189666748046875,
0.052093505859375,
0.039459228515625,
0.0304718017578125,
0.06353759765625,
0.0022182464599609375,
0.0296478271484375,
0.03741455078125,
-0.01514434814453125,
0.0258636474609375,
0.0110931396484375,
-0.03277587890625,
0.040557861328125,
0.016326904296875,
0.004734039306640625,
-0.047210693359375,
0.027008056640625,
-0.067626953125,
-0.0103912353515625,
0.05645751953125,
-0.017669677734375,
0.0069427490234375,
0.001331329345703125,
-0.00295257568359375,
-0.03533935546875,
-0.0011425018310546875,
-0.025848388671875,
0.037445068359375,
0.005779266357421875,
0.05291748046875,
0.037933349609375,
0.036590576171875,
0.0572509765625,
-0.057586669921875,
0.0225982666015625,
-0.01259613037109375,
-0.0501708984375,
0.03277587890625,
-0.005023956298828125,
0.01476287841796875,
-0.033111572265625,
0.040252685546875,
0.034332275390625,
0.03448486328125,
-0.04290771484375,
-0.0335693359375,
0.01441192626953125,
-0.00783538818359375,
-0.000050187110900878906,
-0.01093292236328125,
0.004924774169921875,
0.032470703125,
0.04742431640625,
-0.054962158203125,
-0.007373809814453125,
0.04180908203125,
0.02593994140625,
-0.00904083251953125,
-0.01361083984375,
-0.0212249755859375,
-0.016387939453125,
-0.059234619140625,
0.047454833984375,
0.0164794921875,
0.057037353515625,
0.0010404586791992188,
0.08154296875,
-0.0379638671875,
-0.0264739990234375,
-0.028533935546875,
0.026336669921875,
0.0101776123046875,
0.0177459716796875,
-0.016876220703125,
0.0212249755859375,
-0.0084228515625,
0.01812744140625,
-0.0062408447265625,
0.047637939453125,
0.031646728515625,
0.0841064453125,
0.041168212890625,
-0.01080322265625,
0.08111572265625,
-0.0027027130126953125,
-0.0297393798828125,
-0.03045654296875,
0.03167724609375,
0.057342529296875,
0.03204345703125,
0.0145111083984375,
0.0152435302734375,
0.07086181640625,
-0.0352783203125,
0.0697021484375,
-0.0113983154296875,
0.0006685256958007812,
0.028839111328125,
-0.02459716796875,
0.053619384765625,
0.0091094970703125,
-0.038726806640625,
-0.011138916015625,
-0.03985595703125,
-0.0161590576171875,
0.0278472900390625,
0.039642333984375,
0.00518035888671875,
0.0094451904296875,
-0.01404571533203125,
-0.0010395050048828125,
-0.000995635986328125,
-0.005985260009765625,
0.007480621337890625,
-0.01387786865234375,
0.0156402587890625,
-0.0070953369140625,
-0.0301513671875,
-0.0205230712890625,
0.0135955810546875,
0.0145263671875,
-0.0273590087890625,
0.04632568359375,
-0.01435089111328125,
-0.0057525634765625,
-0.039459228515625,
-0.003711700439453125,
-0.0255889892578125,
-0.0484619140625,
0.0750732421875,
0.01512908935546875,
-0.02685546875,
-0.01812744140625,
0.0487060546875,
-0.02630615234375,
0.05926513671875,
-0.0726318359375,
-0.0298614501953125,
-0.0263519287109375,
0.0308990478515625,
-0.0228118896484375,
0.042083740234375,
-0.0193328857421875,
-0.0255279541015625,
-0.058013916015625,
-0.04132080078125,
0.052154541015625,
0.070068359375,
0.019989013671875,
0.006450653076171875,
0.02587890625,
-0.0261383056640625,
0.039642333984375,
-0.015899658203125,
0.08587646484375,
0.033447265625,
-0.0184783935546875,
0.015045166015625,
0.010162353515625,
-0.0218505859375,
0.021636962890625,
0.00823211669921875,
-0.007411956787109375,
0.0248870849609375,
-0.0440673828125,
0.01280975341796875,
0.0229034423828125,
0.032562255859375,
-0.02178955078125,
-0.006221771240234375,
0.0290069580078125,
-0.0276031494140625,
-0.0138397216796875,
-0.004077911376953125,
-0.03631591796875,
-0.032623291015625,
0.0211029052734375,
0.0172576904296875,
0.00211334228515625,
-0.0036182403564453125,
-0.034454345703125,
0.00013709068298339844,
0.0288238525390625,
-0.005374908447265625,
0.00940704345703125,
-0.019989013671875,
-0.0157318115234375,
0.01273345947265625,
0.016632080078125,
-0.04132080078125,
0.0063629150390625,
0.023345947265625,
0.01186370849609375,
0.0304107666015625,
-0.0312347412109375,
-0.03216552734375,
0.0015649795532226562,
0.0011749267578125,
-0.0146331787109375,
0.003589630126953125,
0.024932861328125,
0.0112457275390625,
0.002777099609375,
0.050323486328125,
0.03131103515625,
-0.020050048828125,
-0.005096435546875,
0.0287017822265625,
-0.041229248046875,
-0.053680419921875,
0.03265380859375,
-0.021209716796875,
-0.0167083740234375,
-0.0299072265625,
0.017242431640625,
0.0270233154296875,
-0.049102783203125,
-0.07720947265625,
0.03167724609375,
-0.014892578125,
-0.0399169921875,
-0.0189208984375,
-0.037139892578125,
-0.0182647705078125,
0.0438232421875,
0.012603759765625,
-0.01355743408203125,
-0.038177490234375,
0.03802490234375,
-0.008575439453125,
0.036773681640625,
-0.00820159912109375,
0.022857666015625,
-0.052886962890625,
0.0078582763671875,
-0.020416259765625,
-0.021697998046875,
-0.03326416015625,
0.0053558349609375,
0.00064849853515625,
0.0158843994140625,
-0.0207366943359375,
-0.03521728515625,
0.035888671875,
0.0146636962890625,
0.0213470458984375,
-0.06488037109375,
-0.01261138916015625,
-0.0300445556640625,
0.03857421875,
-0.03515625,
0.00023663043975830078,
-0.00975799560546875,
-0.03302001953125,
-0.0243682861328125,
-0.0148162841796875,
-0.0218658447265625,
0.024078369140625,
-0.107666015625,
-0.03692626953125,
0.040802001953125,
-0.0020275115966796875,
0.0223388671875,
0.0008473396301269531,
-0.027740478515625,
0.006122589111328125,
0.0335693359375,
-0.0048065185546875,
-0.06689453125,
0.02410888671875,
0.032379150390625,
-0.05615234375,
-0.0521240234375,
-0.0236053466796875,
-0.002643585205078125,
-0.038360595703125,
-0.061737060546875,
-0.021484375,
-0.004116058349609375,
-0.0030422210693359375,
0.0113677978515625,
0.00423431396484375,
0.00948333740234375,
0.0173492431640625,
0.004352569580078125,
-0.037200927734375,
0.00014078617095947266,
0.01493072509765625,
-0.027679443359375,
-0.038238525390625,
0.044830322265625,
0.022003173828125,
0.0758056640625,
-0.033905029296875,
0.0457763671875,
-0.006397247314453125,
-0.00267791748046875,
-0.0219268798828125,
0.0246429443359375,
0.04119873046875,
-0.01555633544921875,
0.02752685546875,
-0.032379150390625,
0.0119781494140625,
0.01421356201171875,
-0.02728271484375,
-0.013671875,
-0.042144775390625,
0.01427459716796875
] |
a00d2b74e1667207abc7f166cee9d9a63afcdaa8 | Wordpress Stackexchange
Q: Is it possible to generate JPEG progressive thumbnails? I noticed the even if I upload a progressive JPEG in Wordpress media when it generates the thumbnails it creates them in baseline format instead of original progressive format.
Is it possible to change this behavior using some hook?
A: I don't know if Wordpress has a way to handle this or if its based on server features and the ability of PHP but I think you could achieve this by 3rd party plugins such as Smush.it if I am not mistaken due to the fact that the image needs to be converted this way.
| Q: Is it possible to generate JPEG progressive thumbnails? I noticed the even if I upload a progressive JPEG in Wordpress media when it generates the thumbnails it creates them in baseline format instead of original progressive format.
Is it possible to change this behavior using some hook?
A: I don't know if Wordpress has a way to handle this or if its based on server features and the ability of PHP but I think you could achieve this by 3rd party plugins such as Smush.it if I am not mistaken due to the fact that the image needs to be converted this way.
| wordpress | {
"language": "en",
"length": 104,
"provenance": "stackexchange_00019.jsonl.gz:470487",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247029"
} | [
0.06744384765625,
0.01309967041015625,
-0.01003265380859375,
-0.031494140625,
0.040191650390625,
-0.04315185546875,
0.07366943359375,
-0.01531982421875,
0.0079498291015625,
0.021240234375,
0.0079193115234375,
-0.0086212158203125,
-0.0095672607421875,
-0.0301971435546875,
-0.007694244384765625,
-0.01184844970703125,
0.0311279296875,
0.01525115966796875,
0.053924560546875,
-0.01386260986328125,
0.0219879150390625,
0.01093292236328125,
0.037933349609375,
0.06036376953125,
0.0193939208984375,
0.042236328125,
0.02703857421875,
0.01324462890625,
-0.006702423095703125,
0.0004048347473144531,
0.026336669921875,
-0.032501220703125,
0.0247955322265625,
0.0023288726806640625,
-0.012481689453125,
0.01123046875,
0.004802703857421875,
0.01043701171875,
0.0080108642578125,
0.005138397216796875,
0.013214111328125,
-0.0098724365234375,
0.01531982421875,
-0.0299835205078125,
-0.01512908935546875,
-0.00736236572265625,
-0.0154571533203125,
-0.0509033203125,
0.03363037109375,
0.01349639892578125,
0.00824737548828125,
0.025909423828125,
0.007259368896484375,
-0.006633758544921875,
-0.0125579833984375,
-0.003795623779296875,
-0.0560302734375,
0.051971435546875,
0.03131103515625,
0.004581451416015625,
-0.020751953125,
-0.0185089111328125,
0.019744873046875,
-0.00904083251953125,
-0.014892578125,
-0.002330780029296875,
-0.08013916015625,
-0.011627197265625,
-0.008209228515625,
0.0119476318359375,
0.03875732421875,
-0.0478515625,
-0.00809478759765625,
-0.0276947021484375,
-0.01007080078125,
0.045745849609375,
-0.02239990234375,
-0.0019321441650390625,
0.00391387939453125,
-0.0044097900390625,
0.050201416015625,
-0.0164794921875,
-0.03680419921875,
0.01235198974609375,
0.0270233154296875,
0.04443359375,
0.01715087890625,
-0.0394287109375,
-0.022308349609375,
-0.023651123046875,
-0.01300048828125,
-0.00890350341796875,
-0.059814453125,
0.0250396728515625,
-0.0028018951416015625,
-0.0173797607421875,
0.002925872802734375,
-0.035736083984375,
0.0117034912109375,
0.0241851806640625,
0.034393310546875,
-0.06866455078125,
0.07171630859375,
-0.046844482421875,
0.0068206787109375,
-0.039459228515625,
-0.0105743408203125,
0.002819061279296875,
0.0465087890625,
0.058319091796875,
-0.01910400390625,
0.0799560546875,
-0.03369140625,
-0.0238189697265625,
-0.02801513671875,
0.0670166015625,
-0.007183074951171875,
-0.014404296875,
-0.0006256103515625,
0.0166473388671875,
-0.0215606689453125,
0.0081634521484375,
0.053314208984375,
-0.004604339599609375,
0.0228729248046875,
0.035552978515625,
0.00439453125,
-0.059417724609375,
-0.0256195068359375,
0.007568359375,
-0.0233154296875,
0.016876220703125,
0.07830810546875,
0.0545654296875,
0.01219940185546875,
-0.006008148193359375,
0.0074615478515625,
-0.041534423828125,
-0.00894927978515625,
0.034637451171875,
-0.056549072265625,
-0.043487548828125,
0.03802490234375,
-0.0360107421875,
0.0380859375,
-0.0026988983154296875,
0.0077667236328125,
0.047210693359375,
0.0257110595703125,
0.00676727294921875,
0.045928955078125,
-0.002002716064453125,
0.01207733154296875,
-0.004322052001953125,
0.0665283203125,
-0.06561279296875,
0.0560302734375,
-0.047576904296875,
0.027130126953125,
-0.037017822265625,
0.025146484375,
-0.0184173583984375,
-0.00701904296875,
0.026702880859375,
-0.003917694091796875,
0.01556396484375,
-0.0011777877807617188,
-0.00164794921875,
0.033599853515625,
0.0186614990234375,
0.03753662109375,
0.0027294158935546875,
0.0867919921875,
0.004238128662109375,
-0.01113128662109375,
-0.002285003662109375,
0.0138397216796875,
-0.035919189453125,
0.013946533203125,
0.0654296875,
-0.01019287109375,
-0.035980224609375,
0.0133819580078125,
-0.007694244384765625,
-0.0201416015625,
-0.0264434814453125,
-0.006805419921875,
0.01450347900390625,
0.04986572265625,
0.0166473388671875,
-0.00823211669921875,
-0.034881591796875,
-0.05230712890625,
0.0236663818359375,
0.00795745849609375,
0.0272674560546875,
-0.048309326171875,
0.01291656494140625,
-0.01678466796875,
-0.022735595703125,
0.0222015380859375,
0.005126953125,
-0.0255279541015625,
0.015899658203125,
-0.049407958984375,
-0.01457977294921875,
-0.016754150390625,
0.0151519775390625,
0.00720977783203125,
0.023162841796875,
0.0090484619140625,
0.00042557716369628906,
-0.017181396484375,
-0.0025787353515625,
-0.017822265625,
0.00859832763671875,
-0.002803802490234375,
-0.006267547607421875,
0.0019779205322265625,
0.0240325927734375,
-0.038787841796875,
0.012542724609375,
-0.052459716796875,
-0.0167694091796875,
-0.009552001953125,
0.00763702392578125,
-0.0248870849609375,
-0.00006580352783203125,
-0.0192413330078125,
0.004940032958984375,
-0.002208709716796875,
0.040618896484375,
-0.04351806640625,
-0.017181396484375,
-0.016815185546875,
-0.00832366943359375,
-0.01128387451171875,
-0.07061767578125,
0.03125,
0.049560546875,
0.053985595703125,
0.04150390625,
0.01401519775390625,
-0.000728607177734375,
0.1025390625,
0.004894256591796875,
0.02581787109375,
-0.0294189453125,
-0.01110076904296875,
-0.03515625,
0.005733489990234375,
-0.053497314453125,
0.0267791748046875,
-0.0863037109375,
-0.00890350341796875,
0.0291290283203125,
0.0157928466796875,
0.00905609130859375,
-0.0159454345703125,
0.043121337890625,
-0.0015993118286132812,
0.03216552734375,
-0.003055572509765625,
0.007476806640625,
0.004337310791015625,
-0.006481170654296875,
0.0128936767578125,
0.0175323486328125,
0.0024318695068359375,
-0.0021457672119140625,
0.01430511474609375,
-0.03948974609375,
0.01232147216796875,
0.04083251953125,
0.001789093017578125,
0.02191162109375,
-0.0283966064453125,
-0.006710052490234375,
0.0027637481689453125,
0.0201568603515625,
-0.0082244873046875,
-0.0037784576416015625,
-0.02508544921875,
-0.0014543533325195312,
-0.0252838134765625,
-0.05291748046875,
0.030426025390625,
0.044464111328125,
-0.056365966796875,
-0.0218505859375,
0.01654052734375,
0.04107666015625,
-0.0189208984375,
0.01383209228515625,
-0.0308074951171875,
0.0175628662109375,
-0.0494384765625,
-0.041839599609375,
0.056671142578125,
-0.065673828125,
0.0293731689453125,
0.07794189453125,
-0.03961181640625,
0.0574951171875,
-0.0200347900390625,
0.0171661376953125,
-0.033355712890625,
0.0188751220703125,
-0.002025604248046875,
-0.0272979736328125,
-0.0295867919921875,
-0.03826904296875,
0.009063720703125,
0.02618408203125,
-0.02197265625,
-0.0223541259765625,
-0.01678466796875,
0.024566650390625,
-0.011474609375,
0.022430419921875,
-0.0228729248046875,
-0.04815673828125,
0.01120758056640625,
-0.0164794921875,
-0.022979736328125,
-0.00934600830078125,
0.01983642578125,
0.01543426513671875,
-0.01108551025390625,
-0.018280029296875,
-0.003734588623046875,
-0.0265350341796875,
-0.04620361328125,
-0.0226593017578125,
0.00897979736328125,
0.012786865234375,
0.026611328125,
0.009307861328125,
0.01134490966796875,
-0.0478515625,
0.01351165771484375,
0.026458740234375,
-0.02459716796875,
0.0048980712890625,
-0.035858154296875,
0.0146636962890625,
-0.004199981689453125,
-0.0009474754333496094,
0.00586700439453125,
0.0186920166015625,
-0.00754547119140625,
-0.004482269287109375,
-0.052398681640625,
0.0149383544921875,
-0.041778564453125,
0.069580078125,
0.09368896484375,
-0.0248260498046875,
-0.02410888671875,
-0.048370361328125,
-0.01629638671875,
0.0032501220703125,
-0.047119140625,
0.0280303955078125,
0.0083160400390625,
-0.023406982421875,
0.0155792236328125,
0.01325225830078125,
-0.00128173828125,
-0.003665924072265625,
-0.01380157470703125,
-0.0197296142578125,
0.01113128662109375,
-0.01177215576171875,
0.00396728515625,
0.0171356201171875,
-0.00991058349609375,
-0.02838134765625,
0.054656982421875,
-0.00872039794921875,
0.00925445556640625,
-0.01255035400390625,
0.0426025390625,
-0.0310211181640625,
-0.024932861328125,
0.013458251953125,
-0.06878662109375,
-0.0013265609741210938,
0.0019073486328125,
0.01245880126953125,
0.0264434814453125,
0.051605224609375,
-0.04583740234375,
-0.01035308837890625,
-0.022003173828125,
0.0213775634765625,
-0.0206451416015625,
-0.043609619140625,
-0.029296875,
-0.01233673095703125,
-0.06585693359375,
0.0223388671875,
0.012969970703125,
-0.030517578125,
-0.0158538818359375,
-0.017547607421875,
-0.03515625,
-0.0226593017578125,
0.030426025390625,
0.055023193359375,
0.004634857177734375,
0.036895751953125,
-0.002758026123046875,
0.03424072265625,
-0.02001953125,
0.0066070556640625,
-0.08984375,
-0.0246429443359375,
-0.0276947021484375,
0.077392578125,
0.01024627685546875,
-0.0132293701171875,
-0.0241241455078125,
0.061981201171875,
-0.03717041015625,
0.0130767822265625,
0.00252532958984375,
0.026397705078125,
0.029815673828125,
0.0030803680419921875,
0.0052337646484375,
-0.0233001708984375,
-0.01505279541015625,
-0.08209228515625,
-0.02886962890625,
-0.038726806640625,
-0.032806396484375,
0.0160980224609375,
-0.045013427734375,
0.0145111083984375,
-0.038330078125,
-0.0308990478515625,
0.0026569366455078125,
0.035125732421875,
-0.0015916824340820312,
0.0163726806640625,
-0.056060791015625,
-0.03375244140625,
0.04541015625,
0.032562255859375,
0.004970550537109375,
-0.0009140968322753906,
0.087890625,
0.0119781494140625,
-0.019744873046875,
-0.0921630859375,
-0.0195159912109375,
0.031341552734375,
-0.022003173828125,
0.00330352783203125,
0.00870513916015625,
-0.017974853515625,
0.0105438232421875,
-0.0032138824462890625,
-0.017822265625,
-0.00826263427734375,
0.0689697265625,
0.0107574462890625,
-0.0211639404296875,
0.0283050537109375,
0.005153656005859375,
-0.0177001953125,
0.023468017578125,
-0.006679534912109375,
0.0150299072265625,
-0.04620361328125,
0.0165863037109375,
0.039581298828125,
-0.0487060546875,
-0.060333251953125,
-0.043487548828125,
0.01396942138671875,
-0.054962158203125,
0.038665771484375,
0.020233154296875,
-0.01239776611328125,
0.0225677490234375,
0.030364990234375,
0.02557373046875,
-0.00464630126953125,
-0.037994384765625,
-0.00457000732421875,
0.043853759765625,
0.00394439697265625,
0.034332275390625,
0.024200439453125,
0.002689361572265625,
-0.0421142578125,
0.027557373046875,
-0.021240234375,
-0.03411865234375,
0.0172119140625,
-0.006000518798828125,
-0.036163330078125,
-0.0477294921875,
0.005397796630859375,
0.0501708984375,
-0.00010913610458374023,
-0.007495880126953125,
-0.0183563232421875,
0.0219879150390625,
-0.039764404296875,
0.02520751953125,
0.0089874267578125,
-0.00833892822265625,
0.06011962890625,
-0.003940582275390625,
0.033538818359375,
0.008331298828125,
-0.02239990234375,
-0.00024700164794921875,
0.021331787109375,
-0.00815582275390625,
0.0221405029296875,
0.04058837890625,
-0.00347900390625,
-0.017913818359375,
0.036956787109375,
-0.017364501953125,
0.01003265380859375,
0.01065826416015625,
0.002910614013671875,
-0.00606536865234375,
-0.01045989990234375,
0.01328277587890625,
-0.00798797607421875,
0.01308441162109375,
-0.070068359375,
-0.04815673828125,
0.033660888671875,
0.0217437744140625,
-0.0061187744140625,
0.0108184814453125,
0.0241546630859375,
-0.0225067138671875,
0.017059326171875,
-0.00768280029296875,
0.006671905517578125,
-0.03167724609375,
-0.03509521484375,
0.0111083984375,
0.0232086181640625,
-0.017730712890625,
-0.04022216796875,
-0.06024169921875,
0.03466796875,
0.007640838623046875,
0.006816864013671875,
0.007904052734375,
0.01776123046875,
-0.03277587890625,
-0.047821044921875,
-0.0118865966796875,
0.055084228515625,
-0.045318603515625,
0.01561737060546875,
0.0191802978515625,
-0.0022220611572265625,
-0.021697998046875,
-0.00850677490234375,
-0.0278778076171875,
-0.0168609619140625,
0.0108795166015625,
-0.00804901123046875,
-0.0298004150390625,
-0.01885986328125,
0.01065826416015625,
0.0244293212890625,
0.005702972412109375,
0.017181396484375,
-0.010833740234375,
0.032501220703125,
-0.0044097900390625,
0.053253173828125,
-0.00594329833984375,
-0.01071929931640625,
0.0079193115234375,
0.0227813720703125,
-0.012603759765625,
-0.025848388671875,
-0.0136260986328125,
-0.0264434814453125,
-0.0015573501586914062,
-0.05706787109375,
0.0021514892578125,
0.01194000244140625,
-0.027008056640625,
-0.007053375244140625,
0.01406097412109375,
0.007442474365234375,
0.0233154296875,
-0.014739990234375,
0.01241302490234375,
-0.0199127197265625,
0.0201416015625,
-0.047454833984375,
-0.03790283203125,
0.03582763671875,
-0.034332275390625,
0.00868988037109375,
-0.000789642333984375,
-0.0240936279296875,
0.0235137939453125,
-0.0245361328125,
0.0035915374755859375,
0.047576904296875,
0.0462646484375,
-0.0158843994140625,
-0.0259552001953125,
-0.0276336669921875,
0.002002716064453125,
0.04730224609375,
0.0181884765625,
0.0057525634765625,
-0.0177764892578125,
0.0027942657470703125,
0.0228729248046875,
0.0303192138671875,
-0.0157623291015625,
-0.0008721351623535156,
0.01445770263671875,
-0.020660400390625,
0.041595458984375,
0.040740966796875,
0.058074951171875,
-0.059783935546875,
0.02410888671875,
-0.001983642578125,
-0.022735595703125,
0.040863037109375,
-0.007175445556640625,
-0.0002465248107910156,
-0.02471923828125,
0.01470947265625,
-0.01702880859375,
-0.03961181640625,
-0.0153961181640625,
-0.038909912109375,
-0.0249786376953125,
-0.0010433197021484375,
0.0024890899658203125,
0.011260986328125,
-0.048583984375,
0.0163116455078125,
0.0295257568359375,
-0.0129547119140625,
-0.0020923614501953125,
-0.01177978515625,
-0.04351806640625,
-0.01331329345703125,
-0.0189056396484375,
-0.0298004150390625,
-0.0487060546875,
0.01390838623046875,
-0.005016326904296875,
0.01361846923828125,
0.068603515625,
0.033233642578125,
0.007904052734375,
-0.0111236572265625,
0.01812744140625,
-0.026580810546875,
0.0172882080078125,
-0.0081787109375,
-0.0024662017822265625,
0.005199432373046875,
-0.02349853515625,
-0.0032863616943359375,
-0.0258636474609375,
0.0136260986328125,
-0.018402099609375,
-0.017608642578125,
0.041534423828125,
-0.061920166015625,
0.0171051025390625,
0.0416259765625,
0.08624267578125,
-0.012237548828125,
0.0007448196411132812,
-0.03253173828125,
-0.04010009765625,
0.00989532470703125,
-0.01207733154296875,
0.00044345855712890625,
0.0263671875,
-0.01111602783203125,
-0.03204345703125,
-0.0171356201171875,
-0.00691986083984375,
-0.0184173583984375,
0.0157928466796875,
-0.00879669189453125,
0.003612518310546875,
-0.0185546875,
-0.002040863037109375,
0.01544189453125,
-0.04595947265625,
0.0338134765625,
-0.03741455078125,
0.004421234130859375,
0.018096923828125,
0.0251312255859375,
0.0059661865234375,
0.002864837646484375,
-0.029541015625,
0.01027679443359375,
0.045928955078125,
0.0152587890625,
0.00672149658203125,
0.037017822265625,
-0.010009765625,
-0.016448974609375,
0.041259765625,
-0.00650787353515625,
0.038360595703125,
-0.04327392578125,
-0.0035419464111328125,
-0.0180816650390625,
-0.0172119140625,
-0.032257080078125,
0.031219482421875,
-0.00612640380859375,
-0.01395416259765625,
0.00029850006103515625,
0.0010480880737304688,
-0.031707763671875,
0.0268707275390625,
0.0751953125,
0.060333251953125,
0.0003542900085449219,
-0.027069091796875,
-0.02294921875,
0.060791015625,
-0.00506591796875,
0.00405120849609375,
0.01416778564453125,
0.00502777099609375,
0.024566650390625,
-0.00829315185546875,
-0.0048980712890625,
-0.00323486328125,
0.0091552734375,
0.0010166168212890625,
0.006740570068359375,
0.019989013671875,
-0.0302886962890625,
-0.018035888671875,
0.0286102294921875,
0.0115814208984375,
-0.015045166015625,
-0.072265625,
-0.00843048095703125,
-0.0361328125,
0.04132080078125,
0.01059722900390625,
0.036346435546875,
-0.061767578125,
-0.05694580078125,
-0.01557159423828125,
-0.015289306640625,
0.02783203125,
0.0462646484375,
0.007282257080078125,
0.00243377685546875,
-0.01898193359375,
-0.035614013671875,
-0.0253753662109375,
0.007801055908203125,
0.0156402587890625,
0.043487548828125,
0.00046563148498535156,
0.05902099609375,
-0.0180816650390625,
-0.01087188720703125,
-0.0230255126953125,
0.07470703125,
-0.0171966552734375,
0.00998687744140625,
-0.03289794921875,
-0.048309326171875,
0.0059661865234375,
0.03424072265625,
0.0037384033203125,
0.022125244140625,
0.021942138671875,
0.0169525146484375,
-0.0162200927734375,
-0.007015228271484375,
0.052093505859375,
-0.0202484130859375,
-0.00377655029296875,
-0.0347900390625,
0.030975341796875,
0.04107666015625,
0.006664276123046875,
-0.0037326812744140625,
0.0012216567993164062,
0.0806884765625,
-0.004894256591796875,
0.01065826416015625,
0.004238128662109375,
-0.0458984375,
0.04290771484375,
0.0031452178955078125,
0.06402587890625,
0.01123809814453125,
-0.08477783203125,
-0.0107269287109375,
-0.005466461181640625,
-0.034027099609375,
0.0305633544921875,
0.025604248046875,
-0.052734375,
0.0377197265625,
0.051513671875,
-0.00717926025390625,
0.0228729248046875,
-0.0171661376953125,
0.0271453857421875,
-0.054412841796875,
0.0137481689453125,
-0.00499725341796875,
-0.0731201171875,
-0.042755126953125,
-0.0684814453125,
0.048614501953125,
0.01511383056640625,
0.1416015625,
-0.0594482421875,
0.019866943359375,
0.0275115966796875,
-0.04559326171875,
0.034759521484375,
0.03802490234375,
-0.031890869140625,
0.004924774169921875,
-0.01332855224609375,
-0.023590087890625,
-0.006687164306640625,
-0.01251220703125,
0.00855255126953125,
-0.0302734375,
-0.07049560546875,
-0.015106201171875,
0.036468505859375,
0.07647705078125,
0.007701873779296875,
-0.021392822265625,
-0.04998779296875,
-0.018218994140625,
0.033721923828125,
0.00215911865234375,
0.03912353515625,
-0.0164642333984375,
0.02362060546875,
0.049652099609375,
-0.007801055908203125,
0.0389404296875,
-0.0157318115234375,
0.08197021484375,
0.04071044921875,
-0.0037555694580078125,
-0.053192138671875,
-0.0091552734375,
-0.0117950439453125,
0.00559234619140625,
-0.0012063980102539062,
0.04541015625,
-0.0005707740783691406,
-0.03399658203125,
0.0205535888671875,
-0.01482391357421875,
0.0166015625,
-0.0435791015625,
-0.026947021484375,
-0.0010976791381835938,
0.0093841552734375,
0.048858642578125,
-0.0013561248779296875,
-0.0194549560546875,
-0.06304931640625,
0.00933074951171875,
0.02801513671875,
-0.03863525390625,
0.032623291015625,
-0.034454345703125,
-0.03436279296875,
0.018829345703125,
0.0206298828125,
-0.0213470458984375,
0.003414154052734375,
0.0105133056640625,
-0.029876708984375,
0.022979736328125,
-0.0031108856201171875,
-0.02423095703125,
-0.0159759521484375,
-0.0362548828125,
-0.088623046875,
-0.040191650390625,
0.0921630859375,
-0.048370361328125,
0.029541015625,
0.047210693359375,
-0.03546142578125,
0.0225067138671875,
0.03582763671875,
0.034393310546875,
0.10760498046875,
-0.0171966552734375,
-0.01934814453125,
0.003765106201171875,
-0.003948211669921875,
-0.005901336669921875,
-0.039764404296875,
0.00923919677734375,
-0.0731201171875,
-0.0164337158203125,
-0.00876617431640625,
-0.01001739501953125,
0.00418853759765625,
-0.043212890625,
-0.07147216796875,
0.0062255859375,
0.00325775146484375,
-0.048919677734375,
0.00864410400390625,
0.0197296142578125,
0.00783538818359375,
-0.0226898193359375,
-0.00606536865234375,
0.020538330078125,
-0.0103912353515625,
-0.021942138671875,
0.0102996826171875,
-0.003475189208984375,
0.0120697021484375,
0.0222625732421875,
0.00650787353515625,
0.050079345703125,
0.051666259765625,
-0.03131103515625,
0.0103912353515625,
0.019317626953125,
0.017242431640625,
0.058380126953125,
-0.0310516357421875,
-0.0060272216796875,
-0.044189453125,
-0.0175018310546875,
-0.01776123046875,
0.0247955322265625,
-0.0200347900390625,
-0.00013625621795654297,
0.0626220703125,
0.06256103515625,
0.01190948486328125,
-0.0198516845703125,
0.0645751953125,
-0.0027904510498046875,
-0.03363037109375,
-0.007427215576171875,
0.0211181640625,
-0.0472412109375,
-0.033447265625,
0.02178955078125,
0.0249481201171875,
-0.03228759765625,
-0.037445068359375,
-0.02349853515625,
-0.034698486328125,
0.0034046173095703125,
0.021636962890625,
0.00827789306640625,
-0.059356689453125,
0.01043701171875,
-0.0027446746826171875,
0.0125274658203125,
-0.01104736328125,
0.035064697265625,
-0.003124237060546875,
0.034027099609375,
0.0160064697265625,
0.064697265625,
-0.0165557861328125,
-0.01512908935546875,
0.048187255859375,
-0.031707763671875,
0.017669677734375,
-0.00693511962890625,
-0.0172882080078125,
0.01226806640625,
0.01413726806640625,
0.034637451171875,
-0.005420684814453125,
-0.006137847900390625,
0.01108551025390625,
-0.009246826171875,
-0.0234375,
-0.051239013671875,
-0.025177001953125,
-0.0006628036499023438,
-0.037689208984375,
0.01947021484375,
0.01678466796875,
0.004192352294921875,
0.0154571533203125,
0.028076171875,
-0.00778961181640625,
-0.01016998291015625,
-0.0204315185546875,
-0.08099365234375,
0.00743865966796875,
-0.007251739501953125
] |
e86035f82c0f022b45e65764f12c37c3bcc8bf60 | Wordpress Stackexchange
Q: How do I fix the "sorry, you are not allowed to access this page" error I get on the "plugins > settings" links? I just upgraded to WordPress 4.6, and now when I try to click on the Settings link on some of my plugins I get this "Sorry, you are not allowed to access this page." message.
I can active/deactivate the plugin fine but for some reason I can't go under the settings view.
I tried following some of the methods that other people used to fix this; like adding a new administrator and updating the "wp_capabilities" and "wp_user_level" values in the DB but it still does not work.
Does anyone know how I can further debug or resolve this issue?
A: According to me Login into PHPMyAdmin goto wp_usermeta then edit wp32_capabilities of any user and add this a:1:{s:13:"administrator";s:1:"1";} It will change the user Privilege to admin. There are several reasons it will change and you will get the error.
I was getting this error on my website and I try this only once and it was resolved.
| Q: How do I fix the "sorry, you are not allowed to access this page" error I get on the "plugins > settings" links? I just upgraded to WordPress 4.6, and now when I try to click on the Settings link on some of my plugins I get this "Sorry, you are not allowed to access this page." message.
I can active/deactivate the plugin fine but for some reason I can't go under the settings view.
I tried following some of the methods that other people used to fix this; like adding a new administrator and updating the "wp_capabilities" and "wp_user_level" values in the DB but it still does not work.
Does anyone know how I can further debug or resolve this issue?
A: According to me Login into PHPMyAdmin goto wp_usermeta then edit wp32_capabilities of any user and add this a:1:{s:13:"administrator";s:1:"1";} It will change the user Privilege to admin. There are several reasons it will change and you will get the error.
I was getting this error on my website and I try this only once and it was resolved.
A: If you have https on WordPress and you added below code on wp-config.php,then be sure that lines must be on top of page. I found this issue. And may be it can help.
define('FORCE_SSL_ADMIN', true);
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
A: Also search wp-setting.php file for "define('DISALLOW_FILE_MODS',true);" and delete it. Non of the above solutions worked for me except this one!
A: You can keep more than one WP as long the prefixes are different and do not collide, this post has the fix for the access error when changed the prefix but facing the error: https://www.mysysadmintips.com/other/web/743-wordpress-admin-sorry-you-are-not-allowed-to-access-this-page
A: I discover this message “Sorry, you are not allowed to access this page” mostly occur when various WordPress sites are in the same phpMyAdmin – all bearing the same table prefix, irrespective of the database name. I can’t tell how many WordPress sites are expected to be in the same phpMyAdmin with the same table prefix.
A: By default, capabilities will be assigned to “Administrative” and “Editor” role when plugin runs for the first time. You can add or remove capabilities for user by using a great plugin named Members if its not there.
A: Wordpress shows a default 403 page when any of a handful of backend events occur:
*
*The user is not allowed access because their role has incorrect permissions
*The backend page is not found, which happens when a plugin or theme is no longer active and left relic data in the database, or when it is misrouting its admin page because it is misconfigured. This often happens if you use url rewrite plugins, and they do not handle the backend uris correctly or omit rewriting them. This often also leads to being locked out of the login screen.
*There is an error with the internal core routing mechanism, and it receives a result it doesn't understand, can't process, or maps to an unrecognized schema
*A critical but not fatal error occurs during the routing step for the dashboard
In your case, it is probably the 3rd possibility. Wordpress core code does not do very rigorous type checking, and it typically proceeds through its internals without really spending much time on verifying that the data it received was properly formatted or is valid for the current purpose. This results in very strange and difficult to diagnose errors frequently if you do not understand how the core internals work.
The following remedies are in order as a preliminary preflight:
*
*Make sure that each site running on the same installation has its own database assigned, which has its own dedicated user that does not have permission to access any other database within your cluster. For example, when you login to PhpMyAdmin as root, you have access to the entire cluster. For any given application, it should have a dedicated database and user within your cluster, and the user should not have access to any other database in your cluster unless it is a shared resource created explicitly for data to pass between two applications. This alleviates the likelihood of your application getting confused by trying to fetch data from the wrong database, and prevents any issues with collisions between two or more wordpress installs with identical prefixes. Do not put two wordpress installs in the same database or they will both break.
*Check the network panel in your browser web inspector and check the error code for the request. If it is a 403 (it should be), then the issue is either the page doesn't actually exist, or the user lacks permissions. If it is a 500 (it should not be), then it means that the server encountered an error and fell back to the standard exit procedure. If it is a 500, you have a bad plugin, theme, or database issue to handle. If it is a 403, it is most likely one of a bad update, incorrect configuration, or legitimate access denied.
A: Change table prefix to "_" in wp-config.php and save. Then try load wp-admin/. you might see a new install message. Don't install, go back and change prefix again to "WP". This worked for me. I am not sure this will work for everyone.
before: $table_prefix = 'wp_';
in between: $table_prefix = '_';
after: $table_prefix = 'WP_';
| wordpress | {
"language": "en",
"length": 895,
"provenance": "stackexchange_00019.jsonl.gz:470491",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247039"
} | [
0.09991455078125,
-0.019683837890625,
0.0565185546875,
-0.0195465087890625,
-0.005153656005859375,
-0.0247039794921875,
0.047637939453125,
-0.048858642578125,
0.038818359375,
-0.007633209228515625,
-0.0294647216796875,
-0.01085662841796875,
-0.04248046875,
-0.01499176025390625,
-0.0254974365234375,
-0.048736572265625,
0.0095977783203125,
-0.0003273487091064453,
0.0159454345703125,
-0.02239990234375,
0.007904052734375,
-0.022552490234375,
0.0169830322265625,
0.0227508544921875,
0.00778961181640625,
0.0242156982421875,
0.0662841796875,
-0.044891357421875,
0.01078033447265625,
-0.02764892578125,
0.016937255859375,
-0.010955810546875,
0.024688720703125,
0.014556884765625,
-0.025665283203125,
-0.0401611328125,
0.0268096923828125,
-0.01424407958984375,
-0.006420135498046875,
0.02313232421875,
0.015350341796875,
0.01409912109375,
-0.028717041015625,
0.09332275390625,
-0.03338623046875,
-0.08941650390625,
0.042449951171875,
-0.052032470703125,
0.005401611328125,
-0.03619384765625,
0.002483367919921875,
-0.0082855224609375,
0.017730712890625,
0.005420684814453125,
-0.03369140625,
-0.029693603515625,
0.0211944580078125,
0.02301025390625,
0.00673675537109375,
0.0178680419921875,
-0.022186279296875,
0.052154541015625,
-0.01898193359375,
-0.0338134765625,
0.019378662109375,
-0.0147705078125,
0.0221710205078125,
0.0166015625,
-0.005832672119140625,
0.0151824951171875,
0.0160064697265625,
0.00005942583084106445,
0.00632476806640625,
0.0030040740966796875,
0.01320648193359375,
-0.011749267578125,
-0.0017805099487304688,
-0.006198883056640625,
0.022705078125,
0.015472412109375,
0.055938720703125,
-0.00875091552734375,
-0.0467529296875,
0.0300445556640625,
-0.00750732421875,
0.03131103515625,
0.01617431640625,
-0.0305023193359375,
0.0024566650390625,
0.03729248046875,
-0.0155792236328125,
-0.008270263671875,
0.060028076171875,
0.0189361572265625,
-0.036529541015625,
0.00484466552734375,
0.03533935546875,
0.062469482421875,
-0.017120361328125,
-0.01371002197265625,
0.003368377685546875,
-0.048492431640625,
0.011962890625,
-0.03076171875,
-0.00925445556640625,
0.037841796875,
0.01947021484375,
0.020416259765625,
0.0270233154296875,
0.0176544189453125,
0.0135955810546875,
-0.01204681396484375,
0.00788116455078125,
-0.035919189453125,
0.004871368408203125,
0.035797119140625,
0.0108184814453125,
-0.0138397216796875,
0.00650787353515625,
-0.02117919921875,
-0.026458740234375,
0.01094818115234375,
-0.07562255859375,
0.01287078857421875,
0.004276275634765625,
-0.0224456787109375,
0.012054443359375,
0.0323486328125,
0.0023860931396484375,
0.000537872314453125,
-0.01043701171875,
-0.01035308837890625,
0.002223968505859375,
0.045257568359375,
0.006725311279296875,
-0.0082244873046875,
0.033294677734375,
-0.0423583984375,
-0.023223876953125,
0.037109375,
-0.0139617919921875,
-0.03839111328125,
0.0008072853088378906,
-0.03271484375,
-0.0171356201171875,
-0.01451873779296875,
0.0204925537109375,
0.05694580078125,
-0.0028362274169921875,
-0.032806396484375,
0.020843505859375,
0.0154266357421875,
0.0552978515625,
0.00785064697265625,
-0.0036029815673828125,
-0.011749267578125,
0.06256103515625,
-0.039215087890625,
-0.03729248046875,
-0.057403564453125,
0.025299072265625,
0.02392578125,
0.043304443359375,
0.0047454833984375,
0.00844573974609375,
-0.04290771484375,
-0.057861328125,
-0.00628662109375,
0.01433563232421875,
0.005756378173828125,
-0.0094757080078125,
0.0164947509765625,
-0.01314544677734375,
0.0164794921875,
0.012420654296875,
0.0194854736328125,
-0.0224761962890625,
0.029022216796875,
0.0177154541015625,
0.033843994140625,
0.0170440673828125,
-0.0138092041015625,
0.050689697265625,
0.00864410400390625,
-0.01438140869140625,
0.003932952880859375,
-0.005672454833984375,
-0.00870513916015625,
0.01104736328125,
0.00402069091796875,
0.025146484375,
0.0200042724609375,
0.0135498046875,
0.0421142578125,
0.0185089111328125,
-0.0716552734375,
-0.01255035400390625,
-0.0090484619140625,
-0.0158233642578125,
-0.029754638671875,
0.0259246826171875,
-0.01531219482421875,
0.01386260986328125,
0.0122833251953125,
-0.03631591796875,
-0.0036449432373046875,
-0.0157470703125,
0.006931304931640625,
0.019866943359375,
0.0208892822265625,
0.004146575927734375,
0.0125274658203125,
-0.0083770751953125,
-0.02801513671875,
-0.031402587890625,
0.01447296142578125,
-0.0231170654296875,
0.0675048828125,
0.003185272216796875,
0.047637939453125,
0.0176849365234375,
-0.0479736328125,
0.036773681640625,
-0.0015172958374023438,
-0.0028362274169921875,
-0.01021575927734375,
0.0081787109375,
-0.0032939910888671875,
0.03314208984375,
0.0178680419921875,
0.03900146484375,
-0.0264434814453125,
-0.01029205322265625,
0.0299530029296875,
-0.00569915771484375,
-0.017364501953125,
0.0003037452697753906,
-0.05072021484375,
0.03900146484375,
0.03424072265625,
0.042877197265625,
0.00421905517578125,
-0.0567626953125,
-0.07464599609375,
0.004177093505859375,
-0.114990234375,
-0.02374267578125,
-0.0005245208740234375,
0.01282501220703125,
0.00832366943359375,
0.0025787353515625,
-0.0022869110107421875,
0.06298828125,
0.05706787109375,
-0.0008120536804199219,
0.055572509765625,
-0.01885986328125,
0.004909515380859375,
-0.02032470703125,
-0.00670623779296875,
0.0101776123046875,
-0.018646240234375,
-0.0161895751953125,
-0.0109710693359375,
0.05438232421875,
-0.020538330078125,
0.04315185546875,
0.024749755859375,
0.0086669921875,
-0.00174713134765625,
-0.0009832382202148438,
-0.0758056640625,
-0.0005216598510742188,
-0.02337646484375,
0.060302734375,
0.0245819091796875,
-0.0555419921875,
0.0084228515625,
0.041534423828125,
0.00957489013671875,
-0.0237274169921875,
0.003200531005859375,
-0.06280517578125,
-0.0161590576171875,
-0.01331329345703125,
-0.0138092041015625,
0.0016584396362304688,
0.0251617431640625,
0.0226593017578125,
0.0022945404052734375,
0.041229248046875,
0.00463104248046875,
-0.02899169921875,
0.042755126953125,
-0.029144287109375,
-0.04339599609375,
0.0167999267578125,
-0.05181884765625,
0.0253753662109375,
-0.031494140625,
0.045318603515625,
0.058746337890625,
0.00023031234741210938,
0.0053558349609375,
0.0193328857421875,
-0.02947998046875,
0.0014820098876953125,
0.032135009765625,
0.01453399658203125,
0.0026702880859375,
-0.043121337890625,
0.045989990234375,
0.0313720703125,
0.004283905029296875,
0.0025463104248046875,
-0.0288848876953125,
-0.049835205078125,
0.010528564453125,
-0.0909423828125,
-0.057525634765625,
-0.0300140380859375,
-0.058319091796875,
0.028717041015625,
0.003574371337890625,
-0.0192718505859375,
-0.0144195556640625,
0.05474853515625,
0.01514434814453125,
0.00083160400390625,
-0.00937652587890625,
-0.05413818359375,
-0.02685546875,
-0.05133056640625,
-0.0082550048828125,
-0.00836944580078125,
0.011749267578125,
-0.00028824806213378906,
0.0458984375,
-0.00557708740234375,
-0.053741455078125,
-0.02081298828125,
-0.009857177734375,
-0.01025390625,
-0.007511138916015625,
-0.023590087890625,
0.030181884765625,
0.01323699951171875,
0.025665283203125,
0.02862548828125,
-0.0061187744140625,
-0.006195068359375,
-0.059661865234375,
-0.0011644363403320312,
-0.003879547119140625,
-0.0030918121337890625,
0.033782958984375,
0.01261138916015625,
0.0164794921875,
-0.0057830810546875,
-0.033447265625,
-0.0291595458984375,
-0.01090240478515625,
-0.056121826171875,
0.046783447265625,
0.049285888671875,
-0.030059814453125,
0.01169586181640625,
-0.004825592041015625,
0.007640838623046875,
0.0010881423950195312,
0.047454833984375,
-0.01169586181640625,
0.0086822509765625,
-0.0238037109375,
-0.03399658203125,
-0.037994384765625,
0.062103271484375,
-0.005321502685546875,
-0.011627197265625,
0.020233154296875,
-0.004680633544921875,
-0.002933502197265625,
-0.0123138427734375,
-0.043701171875,
-0.0206298828125,
0.028167724609375,
-0.0810546875,
-0.0019102096557617188,
-0.037628173828125,
0.003498077392578125,
-0.0233612060546875,
0.057952880859375,
-0.0244598388671875,
-0.00482940673828125,
0.0021648406982421875,
0.00553131103515625,
-0.00986480712890625,
0.0056610107421875,
-0.0592041015625,
-0.0009946823120117188,
-0.0299072265625,
-0.0018796920776367188,
-0.00426483154296875,
-0.030029296875,
-0.018829345703125,
-0.0335693359375,
-0.01617431640625,
-0.00981903076171875,
0.04290771484375,
0.0019254684448242188,
0.0022068023681640625,
-0.00418853759765625,
-0.0321044921875,
-0.0202484130859375,
-0.0423583984375,
0.0117034912109375,
-0.141357421875,
-0.0298004150390625,
0.057403564453125,
0.05731201171875,
-0.0236053466796875,
-0.049285888671875,
-0.031097412109375,
0.061309814453125,
0.007106781005859375,
0.01329803466796875,
-0.005401611328125,
-0.01464080810546875,
-0.005352020263671875,
0.0125732421875,
-0.0015201568603515625,
-0.00438690185546875,
0.0211029052734375,
0.0145263671875,
-0.038299560546875,
-0.0177154541015625,
-0.0212554931640625,
-0.046356201171875,
0.01505279541015625,
-0.05596923828125,
-0.03240966796875,
-0.026336669921875,
-0.019744873046875,
0.02020263671875,
0.00873565673828125,
-0.003627777099609375,
-0.048248291015625,
-0.05548095703125,
0.050750732421875,
-0.0183258056640625,
-0.017486572265625,
-0.00009495019912719727,
0.05535888671875,
0.0034847259521484375,
-0.0328369140625,
-0.0068817138671875,
0.003055572509765625,
0.015289306640625,
-0.0355224609375,
0.037994384765625,
0.013580322265625,
-0.0006499290466308594,
0.0426025390625,
-0.024261474609375,
0.0022716522216796875,
-0.0064239501953125,
0.006557464599609375,
0.01027679443359375,
-0.03558349609375,
0.0186309814453125,
0.004924774169921875,
0.020477294921875,
0.0165863037109375,
0.0028476715087890625,
-0.004360198974609375,
-0.01070404052734375,
-0.0006933212280273438,
0.0106964111328125,
0.014739990234375,
-0.004261016845703125,
-0.041748046875,
0.020538330078125,
-0.01959228515625,
0.03546142578125,
0.00809478759765625,
0.005054473876953125,
0.028564453125,
-0.0025653839111328125,
-0.00850677490234375,
-0.0290679931640625,
0.01397705078125,
-0.0173187255859375,
0.0201263427734375,
-0.01317596435546875,
-0.007747650146484375,
-0.038726806640625,
-0.0095672607421875,
0.0792236328125,
-0.000021696090698242188,
-0.06573486328125,
-0.01312255859375,
-0.005008697509765625,
0.00820159912109375,
0.036834716796875,
0.0019683837890625,
0.04071044921875,
-0.004558563232421875,
-0.003200531005859375,
0.002986907958984375,
0.004817962646484375,
-0.0181427001953125,
-0.028228759765625,
0.05438232421875,
0.00775909423828125,
0.0026035308837890625,
0.0024433135986328125,
0.052978515625,
-0.01450347900390625,
0.033935546875,
0.0001558065414428711,
-0.0112762451171875,
0.0102996826171875,
0.01189422607421875,
0.01499176025390625,
0.0021228790283203125,
0.0218963623046875,
-0.02044677734375,
0.0528564453125,
-0.0303802490234375,
-0.029144287109375,
0.0462646484375,
0.0175933837890625,
-0.01427459716796875,
-0.00948333740234375,
0.0157012939453125,
0.02764892578125,
-0.022613525390625,
0.0645751953125,
-0.0090484619140625,
-0.078125,
-0.03741455078125,
0.02203369140625,
0.044158935546875,
-0.048492431640625,
0.01557159423828125,
0.01374053955078125,
-0.00473785400390625,
0.0006666183471679688,
-0.01020050048828125,
-0.0026187896728515625,
-0.049346923828125,
-0.0297393798828125,
0.01953125,
-0.0189361572265625,
-0.00565338134765625,
-0.0294189453125,
-0.0009751319885253906,
-0.01947021484375,
0.00788116455078125,
0.03228759765625,
0.003997802734375,
0.0187835693359375,
-0.041290283203125,
-0.0103302001953125,
-0.0221405029296875,
-0.0014667510986328125,
0.032745361328125,
-0.010589599609375,
-0.09600830078125,
0.00646209716796875,
-0.01415252685546875,
-0.01477813720703125,
-0.01018524169921875,
-0.01001739501953125,
-0.07672119140625,
0.0050811767578125,
0.004497528076171875,
0.0299835205078125,
-0.04345703125,
-0.0211944580078125,
-0.038604736328125,
0.01403045654296875,
0.02105712890625,
0.068603515625,
-0.03082275390625,
0.05072021484375,
0.01465606689453125,
0.0252532958984375,
0.005428314208984375,
0.0517578125,
0.0251617431640625,
-0.033111572265625,
0.0296478271484375,
-0.0035991668701171875,
-0.03912353515625,
-0.0487060546875,
-0.004940032958984375,
0.00902557373046875,
0.0650634765625,
-0.020660400390625,
-0.0194549560546875,
-0.0249481201171875,
-0.0029735565185546875,
-0.0264129638671875,
0.08984375,
-0.00640106201171875,
-0.02838134765625,
0.0190582275390625,
-0.04608154296875,
0.0304412841796875,
0.01016998291015625,
0.001323699951171875,
0.0291595458984375,
-0.03948974609375,
0.041778564453125,
0.0189208984375,
-0.04144287109375,
0.033599853515625,
0.055694580078125,
0.005786895751953125,
0.044830322265625,
0.001987457275390625,
0.018035888671875,
0.03741455078125,
0.005115509033203125,
0.018768310546875,
0.0201416015625,
0.044189453125,
-0.00724029541015625,
-0.0287322998046875,
-0.015899658203125,
-0.04180908203125,
0.031402587890625,
0.06207275390625,
0.057861328125,
-0.097900390625,
0.01430511474609375,
-0.0093994140625,
-0.007495880126953125,
0.04150390625,
-0.01284027099609375,
0.0186004638671875,
-0.048858642578125,
0.05133056640625,
0.00478363037109375,
0.0079498291015625,
0.0159759521484375,
-0.0272369384765625,
-0.0306243896484375,
-0.0013036727905273438,
0.03411865234375,
0.0174560546875,
0.005718231201171875,
0.0063934326171875,
-0.0093841552734375,
0.007419586181640625,
0.0225982666015625,
-0.006580352783203125,
-0.01268768310546875,
-0.04742431640625,
-0.033416748046875,
-0.023956298828125,
-0.032623291015625,
-0.032958984375,
0.0066375732421875,
-0.0131683349609375,
0.01434326171875,
0.03326416015625,
-0.0201873779296875,
0.0129547119140625,
0.004016876220703125,
0.0209197998046875,
0.056854248046875,
-0.0384521484375,
-0.010467529296875,
0.052581787109375,
-0.026123046875,
0.004364013671875,
0.039276123046875,
-0.02484130859375,
-0.0235748291015625,
-0.038909912109375,
0.0782470703125,
-0.034942626953125,
-0.00041174888610839844,
0.033050537109375,
0.0257720947265625,
-0.043670654296875,
0.0016679763793945312,
0.006282806396484375,
-0.01543426513671875,
0.020416259765625,
0.00835418701171875,
0.017547607421875,
0.01180267333984375,
0.0360107421875,
-0.03253173828125,
0.0229034423828125,
-0.060089111328125,
0.0170440673828125,
0.0261688232421875,
0.0045623779296875,
0.01270294189453125,
-0.00626373291015625,
-0.007289886474609375,
0.024383544921875,
0.004146575927734375,
0.048126220703125,
0.0106353759765625,
-0.00012087821960449219,
0.013763427734375,
0.041748046875,
0.07965087890625,
0.03802490234375,
-0.0638427734375,
-0.014892578125,
0.02313232421875,
0.004833221435546875,
-0.0107879638671875,
0.06976318359375,
-0.01406097412109375,
-0.0007214546203613281,
0.012939453125,
-0.048004150390625,
0.0268707275390625,
-0.035430908203125,
-0.0108795166015625,
0.0031070709228515625,
-0.031463623046875,
-0.06890869140625,
-0.053802490234375,
0.08087158203125,
-0.048553466796875,
-0.0389404296875,
0.00605010986328125,
-0.007427215576171875,
0.01174163818359375,
0.0296478271484375,
0.029327392578125,
-0.0253143310546875,
-0.003223419189453125,
-0.0274658203125,
0.048675537109375,
-0.0012655258178710938,
-0.0276641845703125,
-0.01568603515625,
-0.00876617431640625,
0.0256500244140625,
-0.031707763671875,
-0.0357666015625,
0.0094146728515625,
0.0022182464599609375,
0.0501708984375,
-0.00899505615234375,
0.004215240478515625,
-0.058624267578125,
0.03497314453125,
0.03668212890625,
0.04791259765625,
-0.056488037109375,
-0.07958984375,
0.002590179443359375,
-0.00888824462890625,
0.003936767578125,
0.037109375,
0.001617431640625,
0.04608154296875,
0.09912109375,
-0.01104736328125,
-0.005580902099609375,
0.0276641845703125,
0.00968170166015625,
0.00901031494140625,
0.025360107421875,
-0.0308837890625,
-0.007476806640625,
-0.031463623046875,
-0.004795074462890625,
0.0006537437438964844,
0.003803253173828125,
0.01264190673828125,
0.029541015625,
0.0260467529296875,
0.00530242919921875,
-0.01134490966796875,
0.04266357421875,
-0.038330078125,
0.0223846435546875,
-0.0504150390625,
-0.07635498046875,
0.01342010498046875,
0.049896240234375,
-0.0362548828125,
-0.01308441162109375,
-0.00614166259765625,
0.0208587646484375,
0.007541656494140625,
-0.028717041015625,
0.0252227783203125,
-0.00838470458984375,
-0.044586181640625,
-0.013885498046875,
0.0087890625,
0.0194091796875,
0.004161834716796875,
-0.00914764404296875,
0.050628662109375,
0.020233154296875,
-0.005016326904296875,
0.0219268798828125,
-0.0010080337524414062,
0.00008606910705566406,
0.023681640625,
-0.0280609130859375,
0.0291900634765625,
0.0135040283203125,
-0.06072998046875,
-0.0006093978881835938,
-0.059783935546875,
0.009765625,
-0.0167083740234375,
-0.00045228004455566406,
-0.0053863525390625,
0.042510986328125,
0.01557159423828125,
0.0007333755493164062,
-0.0032024383544921875,
-0.019989013671875,
0.032989501953125,
0.01203155517578125,
-0.00299835205078125,
0.01554107666015625,
-0.01052093505859375,
-0.02447509765625,
-0.02435302734375,
0.06610107421875,
0.0343017578125,
0.092041015625,
-0.045379638671875,
0.038665771484375,
0.0100555419921875,
0.047821044921875,
-0.00569915771484375,
-0.023284912109375,
0.061309814453125,
0.01151275634765625,
0.019989013671875,
-0.022186279296875,
-0.06072998046875,
0.1112060546875,
-0.01165771484375,
0.0174713134765625,
0.05438232421875,
0.0214385986328125,
-0.01331329345703125,
0.0126190185546875,
0.01085662841796875,
-0.0340576171875,
-0.0496826171875,
-0.00521087646484375,
0.0124359130859375,
-0.007503509521484375,
0.00014090538024902344,
-0.0032711029052734375,
0.026214599609375,
-0.031097412109375,
0.00382232666015625,
0.002796173095703125,
0.007503509521484375,
-0.028228759765625,
0.0161285400390625,
-0.02935791015625,
-0.03668212890625,
0.007602691650390625,
-0.00823974609375,
-0.003154754638671875,
0.007572174072265625,
0.04278564453125,
0.00040078163146972656,
-0.0088958740234375,
-0.00982666015625,
-0.035125732421875,
0.005359649658203125,
-0.044525146484375,
-0.0260009765625,
-0.0034008026123046875,
0.02557373046875,
-0.0400390625,
-0.014007568359375,
-0.0178375244140625,
-0.05352783203125,
0.007366180419921875,
0.0178375244140625,
-0.02093505859375,
-0.0014657974243164062,
-0.0204010009765625,
0.0310516357421875,
0.0322265625,
0.019622802734375,
-0.0968017578125,
0.057861328125,
-0.034149169921875,
0.05584716796875,
-0.0035953521728515625,
-0.00984954833984375,
0.021759033203125,
0.03790283203125,
-0.0341796875,
0.0054168701171875,
-0.01026153564453125,
-0.005077362060546875,
0.0106964111328125,
0.024322509765625,
0.0390625,
-0.0115814208984375,
-0.035797119140625,
0.03497314453125,
-0.0029296875,
0.0838623046875,
-0.01334381103515625,
-0.0181884765625,
0.0188446044921875,
-0.00965118408203125,
-0.0127410888671875,
-0.05975341796875,
-0.005168914794921875,
-0.079833984375,
0.00386810302734375,
-0.004711151123046875,
-0.031646728515625,
-0.01047515869140625,
-0.043853759765625,
-0.035736083984375,
0.0201263427734375,
0.01317596435546875,
-0.0390625,
-0.055694580078125,
0.00038814544677734375,
-0.0056304931640625,
0.044281005859375,
-0.003826141357421875,
-0.03253173828125,
-0.034820556640625,
0.0330810546875,
0.0157318115234375,
-0.00917816162109375,
0.00714874267578125,
0.0271759033203125,
-0.07080078125,
0.031951904296875,
0.0211944580078125,
-0.006229400634765625,
-0.01528167724609375,
0.019775390625,
-0.007160186767578125,
0.0259857177734375,
-0.0171661376953125,
-0.0118255615234375,
-0.0060882568359375,
-0.002223968505859375,
0.00897979736328125,
0.00897216796875,
-0.00701904296875,
-0.005863189697265625,
-0.00859832763671875,
0.052276611328125,
0.0017490386962890625,
-0.005718231201171875,
-0.0234375,
-0.07293701171875,
-0.033843994140625,
-0.0162200927734375,
0.0257415771484375,
-0.07000732421875,
0.023956298828125,
0.027557373046875,
0.0113983154296875,
0.0227813720703125,
-0.0201568603515625,
-0.00978851318359375,
-0.0347900390625,
0.0010862350463867188,
0.0008907318115234375,
-0.050537109375,
0.00382232666015625,
0.054107666015625,
-0.034088134765625,
-0.0187530517578125,
0.0246734619140625,
-0.00724029541015625,
0.00652313232421875,
0.00612640380859375,
-0.02008056640625,
-0.03875732421875,
-0.0160675048828125,
0.02874755859375,
-0.018035888671875,
0.052978515625,
-0.044281005859375,
-0.029632568359375,
0.02734375,
0.0130462646484375,
-0.02264404296875,
0.006877899169921875,
0.01534271240234375,
0.0270233154296875,
-0.033843994140625,
0.054656982421875,
0.0223236083984375,
0.01210784912109375,
0.00626373291015625,
0.032867431640625,
0.002593994140625,
-0.03533935546875,
0.01128387451171875,
-0.0244293212890625,
0.01177215576171875,
0.0322265625,
0.07257080078125,
-0.026092529296875,
0.03314208984375,
-0.0157623291015625,
0.0221099853515625,
-0.0028972625732421875
] |
c72b0d226bba0e013f6b822a0dd1be77648ed077 | Wordpress Stackexchange
Q: Transaction when using WP functions rather than vanilla SQL? Does WordPress provide a way of rolling back when using, for example, update_post_meta or wp_insert_post?
E.g. I'm inserting a new post and giving it some post meta inside one function:
some_wp_transaction_init_function();
try{
$post_id = wp_insert_post($args, true);
update_post_meta($post_id, 'meta_key', 'meta_value');
}catch(Exception $e){
some_wp_rollback_function();
}
some_wp_commit_function();
Or do I have to use vanilla SQL, or the $wpdb object?
Thanks
A: There is no functions in wordpress to handle transactions but you can easily use the $wpdb object to make a simple query to achieve this. The following function will start a transaction and then insert a new user into the database and finally rollback the current transaction. In order to make the transaction permanent you would instead use $wpdb->query('COMMIT');
function test_transaction() {
global $wpdb;
// begin transaction
$wpdb->query('START TRANSACTION');
$user = array(
'user_pass' => 'sample_password',
'user_login' => 'sample_login',
'user_email' => '[email protected]',
'first_name' => 'sample_firstname',
'last_name' => 'sample_lastname',
);
$user_id = wp_insert_user($user);
// roll back everything - e.g remove the new user record from the database
$wpdb->query('ROLLBACK');
};
| Q: Transaction when using WP functions rather than vanilla SQL? Does WordPress provide a way of rolling back when using, for example, update_post_meta or wp_insert_post?
E.g. I'm inserting a new post and giving it some post meta inside one function:
some_wp_transaction_init_function();
try{
$post_id = wp_insert_post($args, true);
update_post_meta($post_id, 'meta_key', 'meta_value');
}catch(Exception $e){
some_wp_rollback_function();
}
some_wp_commit_function();
Or do I have to use vanilla SQL, or the $wpdb object?
Thanks
A: There is no functions in wordpress to handle transactions but you can easily use the $wpdb object to make a simple query to achieve this. The following function will start a transaction and then insert a new user into the database and finally rollback the current transaction. In order to make the transaction permanent you would instead use $wpdb->query('COMMIT');
function test_transaction() {
global $wpdb;
// begin transaction
$wpdb->query('START TRANSACTION');
$user = array(
'user_pass' => 'sample_password',
'user_login' => 'sample_login',
'user_email' => '[email protected]',
'first_name' => 'sample_firstname',
'last_name' => 'sample_lastname',
);
$user_id = wp_insert_user($user);
// roll back everything - e.g remove the new user record from the database
$wpdb->query('ROLLBACK');
};
| wordpress | {
"language": "en",
"length": 175,
"provenance": "stackexchange_00019.jsonl.gz:470523",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247128"
} | [
0.042205810546875,
0.001758575439453125,
-0.02679443359375,
-0.05572509765625,
0.023101806640625,
-0.027923583984375,
0.0135040283203125,
-0.005962371826171875,
0.026947021484375,
0.026275634765625,
-0.042877197265625,
-0.0223846435546875,
0.009613037109375,
-0.0255279541015625,
-0.0389404296875,
-0.039703369140625,
0.04754638671875,
-0.017974853515625,
0.03662109375,
0.006290435791015625,
0.0120697021484375,
0.044769287109375,
0.0295257568359375,
0.00423431396484375,
0.031097412109375,
-0.015167236328125,
0.06768798828125,
-0.020294189453125,
0.05499267578125,
0.015899658203125,
0.03790283203125,
-0.0836181640625,
-0.005176544189453125,
0.0244293212890625,
-0.0063323974609375,
-0.0033435821533203125,
0.0253143310546875,
0.01018524169921875,
0.017120361328125,
0.01267242431640625,
0.02728271484375,
-0.00881195068359375,
-0.05242919921875,
0.0192108154296875,
-0.035064697265625,
-0.06817626953125,
0.0245208740234375,
-0.033111572265625,
0.0281219482421875,
0.030914306640625,
0.019683837890625,
0.00553131103515625,
0.034912109375,
-0.00363922119140625,
-0.01031494140625,
-0.0190887451171875,
-0.0692138671875,
0.004791259765625,
0.0224609375,
0.09271240234375,
0.0167388916015625,
-0.032196044921875,
-0.0175628662109375,
-0.072509765625,
0.006107330322265625,
-0.019866943359375,
0.008819580078125,
0.03204345703125,
-0.0236053466796875,
0.006134033203125,
0.026824951171875,
0.0068511962890625,
-0.034576416015625,
0.0218048095703125,
-0.0005283355712890625,
-0.0084686279296875,
0.03778076171875,
-0.013458251953125,
-0.014495849609375,
0.0670166015625,
-0.0291900634765625,
-0.02294921875,
-0.049041748046875,
0.0061492919921875,
-0.0106201171875,
0.0389404296875,
-0.02294921875,
-0.0097808837890625,
-0.042755126953125,
-0.00894927978515625,
-0.025421142578125,
-0.020782470703125,
-0.032501220703125,
0.00982666015625,
0.003574371337890625,
-0.01514434814453125,
0.00702667236328125,
0.0025043487548828125,
-0.003658294677734375,
0.0164947509765625,
0.013763427734375,
-0.04107666015625,
0.057342529296875,
-0.032012939453125,
0.00001913309097290039,
0.0474853515625,
-0.005062103271484375,
-0.04034423828125,
0.01210784912109375,
0.02044677734375,
0.01525115966796875,
-0.0130767822265625,
-0.00829315185546875,
-0.0224456787109375,
-0.0294952392578125,
0.0018711090087890625,
-0.04461669921875,
0.0131378173828125,
0.006725311279296875,
-0.0013265609741210938,
0.01529693603515625,
0.030426025390625,
-0.054931640625,
-0.02630615234375,
-0.0063018798828125,
-0.05035400390625,
-0.0272369384765625,
0.02862548828125,
-0.049224853515625,
0.04095458984375,
-0.049530029296875,
0.02435302734375,
0.134521484375,
0.0236358642578125,
0.007358551025390625,
-0.0213165283203125,
0.0016260147094726562,
-0.00797271728515625,
-0.020416259765625,
0.03411865234375,
0.02484130859375,
-0.0831298828125,
-0.052764892578125,
0.0242462158203125,
0.047119140625,
0.006481170654296875,
0.031646728515625,
0.005462646484375,
0.00617218017578125,
0.0080413818359375,
-0.0181884765625,
0.018096923828125,
-0.0305328369140625,
0.0175018310546875,
0.046051025390625,
0.0161285400390625,
-0.037384033203125,
0.006954193115234375,
0.03509521484375,
0.049041748046875,
-0.0032672882080078125,
-0.01105499267578125,
0.00664520263671875,
0.00902557373046875,
-0.03411865234375,
0.038299560546875,
-0.0103302001953125,
-0.00978851318359375,
0.022491455078125,
0.0775146484375,
0.00550079345703125,
0.0418701171875,
0.038177490234375,
0.004817962646484375,
-0.02020263671875,
-0.04815673828125,
-0.0185394287109375,
0.043243408203125,
0.00717926025390625,
0.034820556640625,
0.0116119384765625,
-0.0179443359375,
0.0438232421875,
-0.0032196044921875,
-0.01532745361328125,
0.006908416748046875,
0.01540374755859375,
0.050079345703125,
0.01306915283203125,
0.032318115234375,
-0.00958251953125,
0.006885528564453125,
-0.01139068603515625,
0.034027099609375,
0.0200653076171875,
-0.044097900390625,
-0.041259765625,
-0.0272216796875,
-0.0157470703125,
-0.00832366943359375,
0.02960205078125,
0.041107177734375,
-0.0150146484375,
0.00019407272338867188,
-0.082763671875,
0.039398193359375,
-0.04571533203125,
0.049957275390625,
-0.0124053955078125,
0.062103271484375,
0.0286712646484375,
0.034759521484375,
-0.06573486328125,
0.0491943359375,
-0.00489044189453125,
-0.07989501953125,
-0.03936767578125,
0.05084228515625,
-0.017608642578125,
0.050445556640625,
-0.026702880859375,
-0.0243377685546875,
-0.023162841796875,
-0.039398193359375,
0.049102783203125,
-0.0023784637451171875,
0.002574920654296875,
-0.0284271240234375,
0.046356201171875,
-0.006103515625,
-0.01020050048828125,
0.040130615234375,
-0.0100860595703125,
-0.039398193359375,
-0.040679931640625,
-0.01485443115234375,
-0.04248046875,
-0.07550048828125,
0.002674102783203125,
0.07550048828125,
0.031341552734375,
-0.00489044189453125,
0.004055023193359375,
0.0295562744140625,
0.0016145706176757812,
-0.054962158203125,
0.000705718994140625,
0.01068115234375,
0.004703521728515625,
0.027801513671875,
-0.026275634765625,
0.00043654441833496094,
0.0241241455078125,
-0.040771484375,
-0.0008192062377929688,
0.049224853515625,
-0.0257110595703125,
-0.0253143310546875,
0.007617950439453125,
-0.01007843017578125,
0.005207061767578125,
-0.062103271484375,
0.004428863525390625,
-0.0294036865234375,
0.043212890625,
-0.0411376953125,
0.0255889892578125,
0.0031337738037109375,
-0.02154541015625,
-0.01421356201171875,
0.0211334228515625,
-0.0276641845703125,
0.0102691650390625,
0.030487060546875,
0.0038509368896484375,
0.03021240234375,
-0.030517578125,
-0.00368499755859375,
0.033782958984375,
0.0321044921875,
-0.01317596435546875,
0.038177490234375,
0.0185394287109375,
-0.016265869140625,
-0.004421234130859375,
-0.0146026611328125,
0.0160980224609375,
-0.0176544189453125,
-0.0255279541015625,
-0.047698974609375,
-0.00395965576171875,
0.01383209228515625,
-0.05908203125,
0.054443359375,
0.00914764404296875,
-0.033447265625,
-0.01168060302734375,
-0.01319122314453125,
0.006999969482421875,
-0.0184326171875,
0.0146331787109375,
0.048614501953125,
0.017120361328125,
-0.0017957687377929688,
0.0137939453125,
-0.0250701904296875,
0.006862640380859375,
0.02044677734375,
-0.01482391357421875,
-0.0260009765625,
-0.04632568359375,
0.0010967254638671875,
0.0207672119140625,
0.04913330078125,
-0.0177764892578125,
-0.052947998046875,
-0.0108184814453125,
0.0278778076171875,
-0.051971435546875,
-0.07318115234375,
-0.058807373046875,
-0.07318115234375,
0.0126800537109375,
-0.01502227783203125,
-0.033538818359375,
0.01654052734375,
0.01324462890625,
0.0246734619140625,
-0.006931304931640625,
-0.01247406005859375,
-0.032196044921875,
-0.03094482421875,
-0.04534912109375,
0.0284423828125,
0.01201629638671875,
0.01389312744140625,
0.0083160400390625,
0.077880859375,
0.0026416778564453125,
-0.07513427734375,
-0.03271484375,
0.0302276611328125,
-0.032989501953125,
-0.0033416748046875,
0.0262298583984375,
0.0026073455810546875,
-0.001430511474609375,
0.003955841064453125,
-0.048736572265625,
0.0087890625,
-0.0137939453125,
-0.0272216796875,
0.0205078125,
-0.00644683837890625,
0.047821044921875,
-0.0008516311645507812,
-0.045135498046875,
0.041259765625,
0.0633544921875,
-0.01459503173828125,
-0.003376007080078125,
0.0036144256591796875,
-0.023651123046875,
-0.02203369140625,
-0.006504058837890625,
-0.0080718994140625,
0.004474639892578125,
0.013092041015625,
0.038330078125,
0.043701171875,
0.000995635986328125,
0.030029296875,
-0.00015974044799804688,
-0.01531219482421875,
0.0236053466796875,
-0.026214599609375,
0.035736083984375,
-0.00746917724609375,
-0.014617919921875,
0.001171112060546875,
0.0165557861328125,
-0.004459381103515625,
-0.033294677734375,
-0.061767578125,
-0.09136962890625,
0.039581298828125,
-0.05999755859375,
0.0001920461654663086,
-0.056671142578125,
-0.016632080078125,
-0.00742340087890625,
0.10052490234375,
-0.00473785400390625,
-0.0016813278198242188,
0.0205535888671875,
0.015777587890625,
-0.0218048095703125,
-0.0165252685546875,
-0.0433349609375,
-0.0016756057739257812,
-0.004894256591796875,
-0.01435089111328125,
-0.007965087890625,
-0.016265869140625,
0.00811767578125,
-0.0367431640625,
0.0010576248168945312,
-0.0189056396484375,
0.0190887451171875,
-0.0221099853515625,
0.02874755859375,
0.005199432373046875,
0.0013284683227539062,
-0.0192413330078125,
0.008636474609375,
-0.0289764404296875,
-0.0701904296875,
-0.0135498046875,
-0.03985595703125,
0.06292724609375,
0.04510498046875,
-0.0574951171875,
-0.0209503173828125,
0.011474609375,
-0.0135650634765625,
0.002338409423828125,
0.009429931640625,
0.03167724609375,
0.0275726318359375,
-0.03277587890625,
-0.017333984375,
-0.0181121826171875,
-0.0012693405151367188,
-0.044891357421875,
-0.022308349609375,
0.016845703125,
-0.03985595703125,
0.034027099609375,
-0.042877197265625,
-0.0023288726806640625,
0.005756378173828125,
-0.0304718017578125,
-0.0268402099609375,
0.0266876220703125,
-0.0221099853515625,
0.0022754669189453125,
-0.053192138671875,
-0.018310546875,
0.040313720703125,
-0.007843017578125,
-0.00830078125,
-0.0049591064453125,
0.06658935546875,
0.0289459228515625,
-0.0249176025390625,
-0.0010099411010742188,
0.0152130126953125,
0.0208892822265625,
-0.010040283203125,
0.014190673828125,
-0.018035888671875,
-0.011016845703125,
0.04962158203125,
-0.0250701904296875,
0.01090240478515625,
-0.064208984375,
0.077880859375,
-0.01568603515625,
-0.021453857421875,
0.0190582275390625,
-0.0382080078125,
0.038665771484375,
0.019287109375,
-0.0035686492919921875,
-0.0224456787109375,
-0.002780914306640625,
0.0197296142578125,
-0.023773193359375,
0.0458984375,
-0.0119171142578125,
-0.0665283203125,
0.0197906494140625,
-0.03863525390625,
-0.01342010498046875,
-0.00928497314453125,
-0.0004849433898925781,
0.0244293212890625,
-0.01538848876953125,
0.00482940673828125,
-0.0238037109375,
-0.019989013671875,
-0.015899658203125,
0.0139923095703125,
0.00829315185546875,
0.00826263427734375,
-0.0201263427734375,
-0.00702667236328125,
0.0640869140625,
0.019561767578125,
-0.040924072265625,
-0.00458526611328125,
0.0038471221923828125,
0.049285888671875,
0.005252838134765625,
0.0150909423828125,
0.02105712890625,
-0.00724029541015625,
-0.006664276123046875,
-0.031707763671875,
0.0043182373046875,
-0.00252532958984375,
-0.0379638671875,
0.00913238525390625,
0.0095977783203125,
-0.0015869140625,
0.0258941650390625,
0.044281005859375,
-0.00396728515625,
0.031341552734375,
-0.0277862548828125,
0.07916259765625,
0.05560302734375,
0.0142059326171875,
-0.00933074951171875,
0.0054168701171875,
0.021209716796875,
-0.026123046875,
0.001827239990234375,
-0.0225372314453125,
0.006183624267578125,
0.0278472900390625,
0.044036865234375,
0.0019464492797851562,
-0.0020046234130859375,
0.01375579833984375,
-0.022979736328125,
-0.00769805908203125,
0.0207977294921875,
0.008514404296875,
-0.03289794921875,
-0.0024852752685546875,
0.00942230224609375,
0.020599365234375,
-0.03167724609375,
0.025299072265625,
-0.02252197265625,
-0.023651123046875,
0.0118408203125,
-0.027740478515625,
0.049835205078125,
-0.05841064453125,
-0.068115234375,
-0.005084991455078125,
-0.0281829833984375,
-0.045074462890625,
0.08087158203125,
0.03924560546875,
-0.0277252197265625,
-0.059417724609375,
0.062347412109375,
-0.029754638671875,
-0.01200103759765625,
-0.0225830078125,
0.0290069580078125,
-0.0751953125,
-0.005069732666015625,
0.07037353515625,
0.039306640625,
0.015777587890625,
-0.034210205078125,
-0.0231475830078125,
-0.0153656005859375,
0.040802001953125,
-0.01540374755859375,
-0.01189422607421875,
-0.00811767578125,
0.02960205078125,
-0.0006823539733886719,
-0.0105743408203125,
-0.05303955078125,
-0.016448974609375,
0.0014467239379882812,
0.0183563232421875,
-0.0281982421875,
-0.0232086181640625,
0.07208251953125,
-0.0158538818359375,
0.04351806640625,
0.032470703125,
0.058441162109375,
0.0195159912109375,
-0.0237274169921875,
-0.0153045654296875,
-0.03936767578125,
0.0027179718017578125,
-0.0299530029296875,
-0.0194549560546875,
0.04046630859375,
0.0814208984375,
0.004833221435546875,
0.0234375,
-0.0115814208984375,
0.01001739501953125,
-0.0011272430419921875,
0.0151519775390625,
-0.00605010986328125,
-0.035858154296875,
0.08062744140625,
-0.053924560546875,
-0.0433349609375,
0.0020847320556640625,
0.02294921875,
0.0200653076171875,
-0.034576416015625,
-0.0220947265625,
0.03826904296875,
-0.038177490234375,
-0.0026721954345703125,
0.0325927734375,
0.0469970703125,
0.050872802734375,
-0.0213775634765625,
0.042572021484375,
0.03228759765625,
-0.034515380859375,
-0.028961181640625,
-0.00130462646484375,
0.039825439453125,
-0.00238800048828125,
-0.0253143310546875,
0.047454833984375,
-0.0222320556640625,
0.0316162109375,
0.07318115234375,
0.09539794921875,
-0.07183837890625,
0.0087890625,
0.031707763671875,
-0.043487548828125,
0.017547607421875,
-0.0006275177001953125,
-0.0233154296875,
-0.0121917724609375,
-0.002902984619140625,
0.0282440185546875,
-0.0178985595703125,
0.005634307861328125,
0.048919677734375,
-0.00545501708984375,
-0.032135009765625,
-0.022796630859375,
0.005352020263671875,
0.020599365234375,
0.046661376953125,
-0.01380157470703125,
0.04241943359375,
-0.050201416015625,
0.007671356201171875,
0.0014247894287109375,
0.0166168212890625,
-0.040771484375,
0.039306640625,
-0.0255279541015625,
0.0264434814453125,
-0.0253448486328125,
-0.0182342529296875,
0.08038330078125,
0.024658203125,
0.004970550537109375,
-0.041900634765625,
0.00311279296875,
0.038726806640625,
-0.0672607421875,
-0.0116119384765625,
0.02734375,
-0.0108642578125,
-0.0250701904296875,
0.036651611328125,
-0.048309326171875,
-0.0302276611328125,
-0.01513671875,
-0.054718017578125,
0.06884765625,
-0.0213165283203125,
-0.01081085205078125,
0.007694244384765625,
0.00307464599609375,
0.0022830963134765625,
0.0171356201171875,
0.013458251953125,
-0.031494140625,
-0.0318603515625,
0.0004241466522216797,
-0.07220458984375,
-0.0274505615234375,
0.002285003662109375,
-0.07135009765625,
0.06982421875,
0.0196685791015625,
0.0303497314453125,
0.00994873046875,
0.0030975341796875,
-0.01401519775390625,
-0.0140533447265625,
-0.059417724609375,
0.049560546875,
0.007366180419921875,
0.045623779296875,
-0.042510986328125,
0.0005936622619628906,
0.003314971923828125,
0.00844573974609375,
0.0482177734375,
0.0300445556640625,
-0.07537841796875,
-0.0174102783203125,
-0.0036945343017578125,
0.0259246826171875,
0.0098419189453125,
0.0567626953125,
-0.0005764961242675781,
0.0682373046875,
0.08056640625,
-0.05810546875,
0.033660888671875,
-0.005596160888671875,
-0.015838623046875,
0.022247314453125,
0.00939178466796875,
-0.0002608299255371094,
-0.029754638671875,
0.021209716796875,
-0.006168365478515625,
-0.0174560546875,
0.007335662841796875,
0.0157623291015625,
0.016448974609375,
0.0252532958984375,
0.016845703125,
0.0198822021484375,
0.017425537109375,
-0.0178680419921875,
0.03466796875,
0.00218963623046875,
-0.0289154052734375,
0.024871826171875,
0.0034465789794921875,
-0.001514434814453125,
0.01552581787109375,
-0.0183258056640625,
-0.006008148193359375,
0.045806884765625,
0.06866455078125,
0.051177978515625,
0.030670166015625,
-0.026458740234375,
0.004161834716796875,
0.06854248046875,
0.08282470703125,
-0.06146240234375,
-0.01293182373046875,
-0.010162353515625,
-0.005680084228515625,
0.0199737548828125,
-0.0177001953125,
0.036529541015625,
0.0277862548828125,
-0.0017108917236328125,
0.004100799560546875,
-0.0012063980102539062,
0.0014429092407226562,
-0.017120361328125,
-0.00022470951080322266,
0.0526123046875,
-0.0022640228271484375,
0.021820068359375,
-0.0153656005859375,
0.0287933349609375,
0.0193939208984375,
-0.00688934326171875,
-0.02337646484375,
0.03302001953125,
0.03717041015625,
0.0285186767578125,
-0.0113677978515625,
0.050537109375,
0.031890869140625,
0.01318359375,
-0.019500732421875,
-0.0323486328125,
0.0173797607421875,
0.0236053466796875,
0.003856658935546875,
0.027587890625,
0.03936767578125,
0.0531005859375,
-0.0081634521484375,
-0.005451202392578125,
0.042236328125,
-0.008819580078125,
-0.005901336669921875,
-0.00909423828125,
-0.022918701171875,
-0.01338958740234375,
-0.02752685546875,
0.007312774658203125,
0.050506591796875,
-0.027435302734375,
0.0168609619140625,
0.0299835205078125,
0.01123046875,
-0.0214080810546875,
-0.0136871337890625,
-0.00040078163146972656,
0.022003173828125,
0.0404052734375,
-0.01248931884765625,
-0.016021728515625,
-0.00775146484375,
0.0399169921875,
-0.0150604248046875,
0.00177764892578125,
0.005054473876953125,
0.047393798828125,
-0.04010009765625,
-0.005130767822265625,
0.039154052734375,
-0.00106048583984375,
-0.01605224609375,
-0.010345458984375,
0.0192108154296875,
-0.0226898193359375,
-0.052520751953125,
-0.0089111328125,
-0.006259918212890625,
0.0034999847412109375,
-0.03387451171875,
0.07769775390625,
-0.025482177734375,
-0.0113372802734375,
-0.0103759765625,
0.00035643577575683594,
-0.01427459716796875,
0.01221466064453125,
0.00018644332885742188,
-0.003459930419921875,
-0.0080718994140625,
-0.007335662841796875,
0.0011472702026367188,
0.020172119140625,
0.0261077880859375,
-0.0115509033203125,
0.00040602684020996094,
-0.02740478515625,
0.0292510986328125,
-0.01397705078125,
0.0276031494140625,
-0.0009741783142089844,
0.011932373046875,
-0.004261016845703125,
0.0026187896728515625,
0.05352783203125,
0.040435791015625,
-0.03607177734375,
0.04571533203125,
0.0243682861328125,
0.005962371826171875,
-0.005878448486328125,
-0.01922607421875,
-0.004886627197265625,
0.01715087890625,
0.0208282470703125,
0.005802154541015625,
-0.003452301025390625,
-0.0288543701171875,
0.01386260986328125,
0.0092620849609375,
0.022613525390625,
0.004901885986328125,
-0.053680419921875,
0.0130462646484375,
0.02496337890625,
0.03619384765625,
0.020477294921875,
0.01018524169921875,
-0.0094757080078125,
-0.0100555419921875,
-0.004383087158203125,
-0.005207061767578125,
-0.0360107421875,
-0.0206298828125,
-0.0110321044921875,
-0.0073699951171875,
0.0131988525390625,
-0.058441162109375,
-0.0258636474609375,
-0.00359344482421875,
0.01122283935546875,
-0.0015287399291992188,
-0.0565185546875,
0.0169830322265625,
-0.0028228759765625,
0.0232696533203125,
-0.037384033203125,
-0.0302734375,
0.00508880615234375,
0.04498291015625,
-0.0179290771484375,
-0.049041748046875,
-0.03009033203125,
0.0296630859375,
-0.0528564453125,
-0.01169586181640625,
-0.0091094970703125,
0.004302978515625,
-0.009063720703125,
-0.0232086181640625,
-0.00974273681640625,
0.0123748779296875,
0.0165252685546875,
-0.018768310546875,
0.01348114013671875,
0.01290130615234375,
0.005123138427734375,
-0.0771484375,
-0.03411865234375,
-0.009368896484375,
0.0221099853515625,
-0.0162353515625,
0.018218994140625,
0.03448486328125,
-0.021942138671875,
-0.049468994140625,
0.040283203125,
-0.018524169921875,
-0.030181884765625,
-0.04364013671875,
0.0112762451171875,
-0.0175323486328125,
0.034881591796875,
-0.0163421630859375,
-0.0112762451171875,
-0.006046295166015625,
0.046539306640625,
0.004543304443359375,
0.0222930908203125,
0.01424407958984375,
-0.00897979736328125,
-0.0096588134765625,
0.0186920166015625,
0.0240478515625,
0.0030841827392578125,
0.0180816650390625,
-0.0109100341796875,
0.040283203125,
0.048675537109375,
-0.018768310546875,
0.02618408203125,
-0.004962921142578125,
-0.03887939453125,
-0.022308349609375,
-0.01409912109375,
-0.0240936279296875,
0.006134033203125,
0.0794677734375,
0.0504150390625,
0.01436614990234375,
-0.04913330078125,
-0.03155517578125,
-0.03594970703125,
-0.006504058837890625,
-0.0168914794921875,
0.00923919677734375,
-0.049835205078125,
-0.0012445449829101562,
-0.002750396728515625,
-0.0018091201782226562,
-0.005306243896484375,
0.015228271484375,
0.0037631988525390625,
-0.0153656005859375,
0.057342529296875,
-0.01546478271484375,
-0.0003533363342285156,
0.005779266357421875,
0.054351806640625,
-0.03289794921875,
-0.02032470703125,
-0.008209228515625,
-0.002223968505859375,
-0.0034332275390625,
-0.036529541015625,
-0.01032257080078125,
0.01358795166015625,
-0.0033721923828125,
0.01145172119140625,
0.0038547515869140625,
0.025604248046875,
-0.01078033447265625,
0.0095977783203125,
-0.0267791748046875,
0.009063720703125,
0.004852294921875,
-0.0016031265258789062,
0.0037860870361328125,
0.0408935546875,
0.016326904296875,
0.045806884765625,
-0.0149688720703125,
-0.00934600830078125,
-0.0005321502685546875,
0.0124664306640625,
-0.0012178421020507812,
-0.0027332305908203125,
0.03460693359375,
-0.02484130859375,
-0.0106201171875,
-0.0233001708984375,
0.02911376953125,
-0.049224853515625,
0.01551055908203125,
0.01531982421875,
0.0031375885009765625,
0.0205230712890625
] |
a88e095f6b844993770583c36927494e8041cc32 | Wordpress Stackexchange
Q: How to inject custom url path for page ? Is it possible to make custom URL path for pages ?
The current page url is http://localhost.dev/insight which I need to show like http://localhost.dev/city/local/insight are any option in wordpress to customise the url ?
A: you can use this plugin to generate this kind of permalink https://wordpress.org/plugins/wp-category-permalink/
| Q: How to inject custom url path for page ? Is it possible to make custom URL path for pages ?
The current page url is http://localhost.dev/insight which I need to show like http://localhost.dev/city/local/insight are any option in wordpress to customise the url ?
A: you can use this plugin to generate this kind of permalink https://wordpress.org/plugins/wp-category-permalink/
A: It's probably best to register a new post type for this. In custom post types you can easily control the url structure. Use the register_post_type function for this.
In this function you can add a rewrite variable. This variable controls the slug / url structure. Check out this example:
function insight_init() {
register_post_type( 'insight', array(
'labels' => array(),
'public' => true,
'hierarchical' => false,
'show_ui' => true,
'show_in_nav_menus' => true,
'supports' => array( 'title', 'editor' ),
'has_archive' => false,
'rewrite' => array('slug' => 'city/local')),
'query_var' => true,
'menu_icon' => 'dashicons-analytics',
) );
}
add_action( 'init', 'insight_init' );
A: For a page, you need to create a parent page(s) with the slug you want to put in between. Then you may choose these pages as a parent to the last slug page (insight page in your case). It will insert the needed slugs into your URL.
So you need to create /city page, then /local page and make /local child to /city page parent. then make /insight page child to /local parent.
Then you may change parent pages visibility to i.e. drafts or private. URL will be preserved.
A: The custom post type method mentioned is likely the superior one, but if you are not comfortable with registering a post type or using that code in a plugin of your own, there is a plugin that the WordPress codex recommends for this: WP Category Permalink.
This is part of the larger entry regarding using permalinks.
| wordpress | {
"language": "en",
"length": 302,
"provenance": "stackexchange_00019.jsonl.gz:470532",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247167"
} | [
0.04046630859375,
-0.006343841552734375,
0.01244354248046875,
-0.058624267578125,
-0.023651123046875,
-0.008148193359375,
0.00215911865234375,
0.014312744140625,
-0.045623779296875,
-0.0226287841796875,
0.009918212890625,
0.006343841552734375,
-0.048004150390625,
-0.059295654296875,
0.05859375,
-0.03533935546875,
0.0307769775390625,
-0.007427215576171875,
0.0185699462890625,
-0.0110015869140625,
0.012359619140625,
-0.00020325183868408203,
0.006805419921875,
0.0457763671875,
0.040679931640625,
-0.00885009765625,
0.01474761962890625,
-0.0256195068359375,
0.00769805908203125,
-0.0236663818359375,
0.027191162109375,
0.00589752197265625,
0.01177215576171875,
0.00531768798828125,
0.0142364501953125,
-0.031097412109375,
0.0018968582153320312,
0.0007967948913574219,
0.0050201416015625,
0.0230560302734375,
0.0272979736328125,
-0.023345947265625,
0.00684356689453125,
0.01910400390625,
0.0085601806640625,
-0.0439453125,
0.03900146484375,
-0.0479736328125,
0.0208587646484375,
0.0041961669921875,
-0.0198211669921875,
0.0263214111328125,
-0.01904296875,
0.019134521484375,
-0.030364990234375,
-0.047637939453125,
-0.0013370513916015625,
-0.039215087890625,
0.0216217041015625,
-0.03497314453125,
-0.0084991455078125,
-0.006862640380859375,
0.04449462890625,
0.05096435546875,
-0.01800537109375,
-0.01019287109375,
0.0159912109375,
0.039794921875,
-0.013397216796875,
-0.0357666015625,
0.01399993896484375,
0.01116943359375,
-0.0223236083984375,
-0.0214080810546875,
-0.06884765625,
-0.004070281982421875,
0.0333251953125,
-0.052642822265625,
-0.0147705078125,
0.010223388671875,
0.0219573974609375,
-0.041168212890625,
-0.0148468017578125,
-0.0269622802734375,
0.0256805419921875,
-0.003223419189453125,
0.0009984970092773438,
-0.0034580230712890625,
-0.0188140869140625,
0.02447509765625,
-0.0302581787109375,
0.0089263916015625,
0.0149993896484375,
0.00814056396484375,
-0.0294647216796875,
0.0245513916015625,
-0.006961822509765625,
-0.01078033447265625,
0.00408935546875,
0.0259246826171875,
0.0284423828125,
-0.0426025390625,
0.0716552734375,
-0.035369873046875,
0.00872039794921875,
0.057098388671875,
0.0162811279296875,
0.01751708984375,
0.0214996337890625,
-0.0152130126953125,
-0.0006012916564941406,
0.017791748046875,
0.0005764961242675781,
-0.004695892333984375,
-0.00891876220703125,
0.02557373046875,
-0.01071929931640625,
0.0037326812744140625,
-0.016693115234375,
0.021881103515625,
-0.004276275634765625,
0.040313720703125,
0.00957489013671875,
-0.011566162109375,
-0.007762908935546875,
-0.0031909942626953125,
-0.0062713623046875,
-0.0465087890625,
-0.012908935546875,
-0.0165863037109375,
-0.0249481201171875,
0.0218658447265625,
0.056732177734375,
0.042724609375,
0.024078369140625,
-0.01407623291015625,
0.046295166015625,
-0.0198974609375,
-0.0022106170654296875,
0.0182952880859375,
-0.0005993843078613281,
-0.0168914794921875,
0.00983428955078125,
-0.00659942626953125,
0.0137481689453125,
0.021942138671875,
-0.0027599334716796875,
0.016265869140625,
0.0255889892578125,
0.0005297660827636719,
-0.0195159912109375,
-0.013946533203125,
0.01468658447265625,
0.0228729248046875,
0.0153045654296875,
0.0007104873657226562,
0.03643798828125,
-0.0146636962890625,
-0.006931304931640625,
-0.00897979736328125,
0.03173828125,
0.00618743896484375,
0.016448974609375,
0.003177642822265625,
-0.00380706787109375,
-0.02520751953125,
-0.043701171875,
0.0032367706298828125,
0.031036376953125,
0.07666015625,
0.02398681640625,
-0.018524169921875,
-0.03753662109375,
0.023529052734375,
0.0072479248046875,
-0.00360107421875,
0.007335662841796875,
0.017730712890625,
-0.0099639892578125,
0.0699462890625,
0.0421142578125,
-0.0206146240234375,
0.036529541015625,
0.0052490234375,
-0.035400390625,
0.06402587890625,
0.002452850341796875,
0.059112548828125,
-0.01898193359375,
0.00579833984375,
0.01308441162109375,
0.03662109375,
-0.037841796875,
0.033172607421875,
-0.0020160675048828125,
-0.0268707275390625,
0.021148681640625,
0.008453369140625,
-0.00968170166015625,
-0.024505615234375,
-0.0162353515625,
0.04266357421875,
-0.0031833648681640625,
0.0523681640625,
0.01393890380859375,
0.0609130859375,
-0.0199127197265625,
0.034637451171875,
0.01335906982421875,
-0.0116729736328125,
-0.01229095458984375,
-0.00640106201171875,
0.0318603515625,
-0.10919189453125,
-0.051666259765625,
0.060760498046875,
0.0298004150390625,
-0.00733184814453125,
-0.031402587890625,
-0.008514404296875,
-0.015350341796875,
0.01404571533203125,
-0.036163330078125,
0.05755615234375,
0.0264434814453125,
-0.008880615234375,
-0.0034160614013671875,
-0.007785797119140625,
0.0148162841796875,
0.0219268798828125,
-0.0308380126953125,
0.0035572052001953125,
0.0232696533203125,
0.046844482421875,
-0.032623291015625,
-0.0180206298828125,
-0.0209197998046875,
-0.0282440185546875,
-0.003925323486328125,
0.04541015625,
0.047088623046875,
-0.0079498291015625,
-0.015655517578125,
-0.0482177734375,
0.029632568359375,
-0.034423828125,
0.0127410888671875,
-0.041778564453125,
0.0229949951171875,
0.042022705078125,
-0.01137542724609375,
0.00646209716796875,
0.02679443359375,
-0.027923583984375,
0.0128021240234375,
0.029693603515625,
-0.036102294921875,
-0.034759521484375,
0.00894927978515625,
0.0069580078125,
0.0178985595703125,
0.04876708984375,
-0.00567626953125,
0.021728515625,
-0.02825927734375,
0.035888671875,
0.02178955078125,
0.046783447265625,
-0.0036754608154296875,
-0.00792694091796875,
0.006107330322265625,
0.012420654296875,
0.005146026611328125,
0.00556182861328125,
0.02093505859375,
-0.0235748291015625,
-0.006282806396484375,
0.0021038055419921875,
-0.0021514892578125,
-0.00494384765625,
-0.007244110107421875,
0.0248870849609375,
-0.01496124267578125,
-0.002471923828125,
-0.007541656494140625,
-0.058441162109375,
-0.0021648406982421875,
0.0195770263671875,
0.032684326171875,
0.02978515625,
0.06524658203125,
-0.0131378173828125,
-0.031951904296875,
0.033172607421875,
-0.0034046173095703125,
-0.04364013671875,
0.04095458984375,
-0.046630859375,
0.02923583984375,
-0.019775390625,
0.04327392578125,
0.0703125,
-0.0125885009765625,
0.0169525146484375,
0.0019483566284179688,
0.00928497314453125,
0.00861358642578125,
0.01434326171875,
0.01210784912109375,
-0.03375244140625,
-0.01465606689453125,
-0.033416748046875,
0.016510009765625,
-0.0316162109375,
0.0235748291015625,
-0.0170135498046875,
-0.006610870361328125,
-0.00679779052734375,
-0.1021728515625,
-0.09375,
0.01554107666015625,
-0.0023555755615234375,
-0.004184722900390625,
0.00940704345703125,
0.003986358642578125,
-0.02716064453125,
0.0110321044921875,
0.004638671875,
-0.007320404052734375,
-0.041900634765625,
-0.04888916015625,
-0.0843505859375,
-0.07940673828125,
-0.05035400390625,
-0.0011987686157226562,
-0.00965118408203125,
0.01369476318359375,
0.030029296875,
0.02838134765625,
0.0008611679077148438,
0.047149658203125,
0.046539306640625,
-0.004360198974609375,
-0.0164947509765625,
-0.0041656494140625,
-0.03680419921875,
0.0501708984375,
-0.020050048828125,
0.11688232421875,
0.048370361328125,
-0.0291290283203125,
0.0201416015625,
-0.0303802490234375,
0.0285491943359375,
-0.01306915283203125,
-0.00885009765625,
0.06195068359375,
0.032073974609375,
-0.0257568359375,
-0.0296783447265625,
-0.0250396728515625,
0.0030574798583984375,
-0.033599853515625,
0.00894927978515625,
0.0243988037109375,
-0.0277557373046875,
-0.01513671875,
0.010711669921875,
0.01528167724609375,
-0.021392822265625,
0.0209808349609375,
-0.0255584716796875,
0.0447998046875,
0.0040283203125,
0.0272979736328125,
-0.033447265625,
0.06134033203125,
-0.01690673828125,
0.03369140625,
0.03216552734375,
-0.005290985107421875,
0.005481719970703125,
-0.014129638671875,
-0.047882080078125,
-0.0186920166015625,
0.0400390625,
-0.0229339599609375,
-0.023651123046875,
0.01519012451171875,
-0.0183868408203125,
0.0241546630859375,
0.050689697265625,
-0.04327392578125,
0.00858306884765625,
0.0250701904296875,
0.00795745849609375,
-0.054962158203125,
0.01111602783203125,
-0.12261962890625,
0.005340576171875,
-0.08038330078125,
0.00792694091796875,
-0.007259368896484375,
-0.041595458984375,
-0.0146636962890625,
-0.016632080078125,
-0.045257568359375,
-0.0321044921875,
0.032989501953125,
0.0235595703125,
0.00531005859375,
0.01241302490234375,
0.0200042724609375,
-0.01187896728515625,
-0.03350830078125,
0.01308441162109375,
-0.08770751953125,
-0.0189056396484375,
-0.0167999267578125,
0.05755615234375,
0.0174560546875,
-0.03863525390625,
0.011871337890625,
0.078125,
-0.0055999755859375,
0.01537322998046875,
0.017242431640625,
-0.018707275390625,
0.0170135498046875,
0.056732177734375,
0.0290679931640625,
0.006465911865234375,
0.0163421630859375,
-0.018280029296875,
-0.09735107421875,
-0.037139892578125,
-0.007038116455078125,
0.0143280029296875,
0.04254150390625,
-0.0511474609375,
-0.0675048828125,
-0.041290283203125,
-0.01203155517578125,
0.0143585205078125,
0.01068115234375,
-0.01346588134765625,
-0.040863037109375,
-0.08111572265625,
0.025634765625,
-0.0019989013671875,
0.01031494140625,
-0.0029392242431640625,
0.04217529296875,
0.0096588134765625,
-0.0245361328125,
0.0224609375,
0.0214080810546875,
0.0273590087890625,
0.0261077880859375,
0.06683349609375,
0.040679931640625,
0.01556396484375,
0.0007524490356445312,
0.01459503173828125,
0.0216522216796875,
-0.0216064453125,
0.04254150390625,
-0.0097503662109375,
0.00710296630859375,
0.0296783447265625,
-0.01288604736328125,
-0.0042266845703125,
0.0357666015625,
-0.0111236572265625,
0.0012598037719726562,
-0.011322021484375,
0.0217132568359375,
-0.03424072265625,
0.023681640625,
-0.024444580078125,
-0.0142669677734375,
0.019439697265625,
0.027740478515625,
0.046905517578125,
0.0264129638671875,
-0.00605010986328125,
0.0268402099609375,
-0.0125885009765625,
0.0008220672607421875,
0.033843994140625,
0.0259552001953125,
-0.00327301025390625,
0.022491455078125,
0.0251312255859375,
-0.009521484375,
-0.0015382766723632812,
-0.006549835205078125,
0.06011962890625,
0.003040313720703125,
-0.0091400146484375,
-0.0328369140625,
-0.0285491943359375,
-0.0125885009765625,
0.005924224853515625,
-0.006710052490234375,
0.01202392578125,
0.0007958412170410156,
0.0199432373046875,
0.0085296630859375,
-0.01349639892578125,
0.0041656494140625,
-0.0122528076171875,
0.0122222900390625,
-0.001903533935546875,
-0.004608154296875,
0.005435943603515625,
0.045074462890625,
0.00554656982421875,
0.017364501953125,
-0.0138092041015625,
0.0119781494140625,
0.05596923828125,
0.01462554931640625,
-0.00228118896484375,
0.003459930419921875,
-0.01103973388671875,
-0.01041412353515625,
0.027130126953125,
-0.0257720947265625,
-0.00812530517578125,
0.0419921875,
0.03643798828125,
-0.0693359375,
-0.0374755859375,
0.021636962890625,
-0.0107879638671875,
-0.0206756591796875,
0.022064208984375,
-0.0298614501953125,
-0.038604736328125,
-0.012115478515625,
-0.0017147064208984375,
0.01007843017578125,
-0.0172576904296875,
-0.00540924072265625,
-0.004718780517578125,
-0.0255889892578125,
0.0165557861328125,
-0.00479888916015625,
-0.001567840576171875,
-0.0119476318359375,
-0.0205535888671875,
0.0004069805145263672,
-0.0132598876953125,
0.00540924072265625,
-0.0012350082397460938,
-0.020050048828125,
-0.03240966796875,
-0.008087158203125,
0.06927490234375,
0.033782958984375,
0.0458984375,
-0.038726806640625,
-0.046173095703125,
-0.0093536376953125,
0.00490570068359375,
0.008392333984375,
-0.0128631591796875,
-0.03216552734375,
-0.0201568603515625,
-0.033935546875,
0.00698089599609375,
0.0303955078125,
0.0107421875,
-0.0126800537109375,
0.00046133995056152344,
0.0291595458984375,
0.040435791015625,
-0.0024776458740234375,
-0.0193023681640625,
-0.044464111328125,
0.0092620849609375,
0.0241851806640625,
0.06689453125,
-0.0012941360473632812,
0.07940673828125,
-0.0037784576416015625,
0.05609130859375,
0.03265380859375,
0.04937744140625,
-0.018768310546875,
-0.039215087890625,
0.0186767578125,
-0.00284576416015625,
-0.0601806640625,
-0.0215911865234375,
-0.034820556640625,
0.03863525390625,
0.09375,
-0.0166168212890625,
0.022491455078125,
0.0097808837890625,
0.016448974609375,
-0.00786590576171875,
-0.03497314453125,
-0.004138946533203125,
0.00933074951171875,
0.0191192626953125,
0.03515625,
0.0618896484375,
0.00524139404296875,
-0.010528564453125,
-0.023162841796875,
0.0155487060546875,
0.0162200927734375,
-0.0225372314453125,
-0.0634765625,
0.04754638671875,
0.09930419921875,
0.041961669921875,
0.07373046875,
0.0211334228515625,
0.028228759765625,
0.0479736328125,
0.01001739501953125,
-0.0005097389221191406,
-0.0073089599609375,
0.030059814453125,
0.00780487060546875,
-0.003925323486328125,
0.0219268798828125,
-0.005649566650390625,
0.0031566619873046875,
0.05596923828125,
0.04461669921875,
-0.09405517578125,
0.0214996337890625,
-0.003448486328125,
0.0179901123046875,
0.03607177734375,
0.0290985107421875,
-0.005413055419921875,
0.019012451171875,
-0.035736083984375,
0.00408172607421875,
-0.022186279296875,
-0.0105438232421875,
0.02313232421875,
0.006275177001953125,
-0.007293701171875,
0.01177215576171875,
-0.010833740234375,
-0.021270751953125,
-0.01971435546875,
0.006366729736328125,
-0.0144195556640625,
0.0095062255859375,
-0.007221221923828125,
0.0166473388671875,
-0.0205078125,
0.02142333984375,
0.0675048828125,
-0.044036865234375,
0.0273895263671875,
0.037841796875,
0.001712799072265625,
0.0280303955078125,
0.001461029052734375,
0.0007758140563964844,
0.0171966552734375,
-0.04412841796875,
-0.005924224853515625,
0.047882080078125,
0.006134033203125,
-0.0236968994140625,
-0.005859375,
-0.00434112548828125,
-0.0184326171875,
-0.033294677734375,
0.035491943359375,
-0.0116729736328125,
0.0217742919921875,
0.0977783203125,
-0.03070068359375,
-0.0285797119140625,
0.0271148681640625,
-0.0011358261108398438,
-0.014251708984375,
0.00444793701171875,
-0.01702880859375,
-0.00988006591796875,
0.01094818115234375,
-0.0199432373046875,
-0.0192718505859375,
0.032379150390625,
-0.021148681640625,
-0.0654296875,
0.08843994140625,
-0.003452301025390625,
0.053863525390625,
0.0290374755859375,
0.024261474609375,
-0.024169921875,
-0.0017518997192382812,
-0.00614166259765625,
0.047088623046875,
0.04095458984375,
0.030120849609375,
0.008819580078125,
-0.024200439453125,
0.056549072265625,
0.044586181640625,
0.03521728515625,
0.0178070068359375,
-0.0302581787109375,
-0.01389312744140625,
0.0018901824951171875,
0.00858306884765625,
-0.029937744140625,
0.050628662109375,
0.018524169921875,
0.027099609375,
0.039825439453125,
-0.0055694580078125,
0.039886474609375,
-0.01267242431640625,
-0.0106964111328125,
0.024505615234375,
0.0192108154296875,
0.02484130859375,
-0.03961181640625,
0.0206146240234375,
-0.0276031494140625,
-0.0296478271484375,
0.0269012451171875,
-0.0227508544921875,
-0.0250701904296875,
0.0118255615234375,
0.00007492303848266602,
-0.059356689453125,
-0.060791015625,
-0.0213165283203125,
0.027191162109375,
0.01322174072265625,
-0.025299072265625,
-0.0054168701171875,
-0.000797271728515625,
-0.0080718994140625,
-0.01324462890625,
-0.034393310546875,
0.0232696533203125,
0.0034847259521484375,
0.0794677734375,
0.07012939453125,
0.022857666015625,
0.01314544677734375,
0.0128326416015625,
0.043426513671875,
0.08489990234375,
-0.061981201171875,
-0.03387451171875,
-0.005886077880859375,
-0.0107269287109375,
0.0269622802734375,
-0.0170745849609375,
0.0281829833984375,
0.0211639404296875,
0.0379638671875,
-0.007415771484375,
-0.01073455810546875,
0.0008020401000976562,
0.013946533203125,
-0.00519561767578125,
-0.014190673828125,
0.0026397705078125,
0.00015604496002197266,
-0.03289794921875,
0.00896453857421875,
-0.007663726806640625,
0.0269927978515625,
0.04302978515625,
-0.0202789306640625,
-0.00220489501953125,
-0.0204010009765625,
-0.005275726318359375,
0.0275421142578125,
0.059295654296875,
-0.00894927978515625,
-0.006557464599609375,
-0.0018835067749023438,
0.08062744140625,
0.01119232177734375,
0.0516357421875,
0.055145263671875,
0.03778076171875,
-0.01328277587890625,
0.0207366943359375,
0.0212554931640625,
0.0166473388671875,
-0.0189666748046875,
0.05230712890625,
-0.07208251953125,
0.044158935546875,
-0.0247955322265625,
-0.0052947998046875,
-0.031829833984375,
-0.0026912689208984375,
0.01309967041015625,
-0.007579803466796875,
0.0211181640625,
0.003326416015625,
-0.0107421875,
0.044281005859375,
-0.0258636474609375,
0.02630615234375,
0.0113525390625,
-0.00862884521484375,
0.005466461181640625,
-0.026885986328125,
-0.0291900634765625,
0.0222320556640625,
0.0445556640625,
0.0104827880859375,
-0.00016009807586669922,
0.0017213821411132812,
0.032745361328125,
-0.0185546875,
-0.03509521484375,
0.005191802978515625,
-0.041717529296875,
0.0095977783203125,
0.00662994384765625,
-0.042205810546875,
-0.007781982421875,
-0.0328369140625,
0.008087158203125,
0.0226593017578125,
0.1466064453125,
-0.048980712890625,
0.0160369873046875,
0.01666259765625,
0.007579803466796875,
-0.0015926361083984375,
0.01483154296875,
-0.02789306640625,
0.0140533447265625,
0.041290283203125,
-0.020782470703125,
-0.0239715576171875,
0.021697998046875,
0.01027679443359375,
-0.033355712890625,
0.011260986328125,
-0.033782958984375,
0.01544952392578125,
0.00875091552734375,
0.01010894775390625,
-0.0330810546875,
-0.0281219482421875,
-0.0665283203125,
-0.025726318359375,
0.037506103515625,
0.018035888671875,
-0.018310546875,
0.0467529296875,
0.0260772705078125,
-0.0010890960693359375,
0.0244598388671875,
-0.037811279296875,
0.059417724609375,
0.038848876953125,
-0.0186920166015625,
-0.0213165283203125,
0.034088134765625,
-0.003566741943359375,
0.003662109375,
0.0189208984375,
0.01495361328125,
0.0224151611328125,
-0.0015735626220703125,
-0.0159149169921875,
-0.04205322265625,
0.00969696044921875,
0.006443023681640625,
-0.0202484130859375,
-0.05859375,
-0.0020656585693359375,
0.01308441162109375,
-0.049774169921875,
-0.018768310546875,
-0.052764892578125,
0.0137939453125,
0.0328369140625,
-0.0196685791015625,
-0.0113525390625,
-0.0157012939453125,
0.002044677734375,
0.018341064453125,
0.0189056396484375,
-0.0694580078125,
0.03704833984375,
-0.021942138671875,
0.042449951171875,
-0.0177001953125,
0.0005588531494140625,
-0.0002689361572265625,
0.03851318359375,
-0.036346435546875,
-0.0121307373046875,
-0.0164947509765625,
0.0006990432739257812,
-0.028778076171875,
0.015838623046875,
0.0308380126953125,
-0.0129241943359375,
-0.035858154296875,
0.01493072509765625,
0.01403045654296875,
0.074951171875,
-0.0294189453125,
-0.0335693359375,
-0.0007653236389160156,
0.01000213623046875,
-0.033843994140625,
-0.019866943359375,
0.035614013671875,
-0.035736083984375,
-0.010406494140625,
0.0071258544921875,
-0.00860595703125,
0.02484130859375,
-0.02508544921875,
-0.0628662109375,
0.005767822265625,
0.00811767578125,
-0.03875732421875,
-0.0250396728515625,
0.03033447265625,
-0.002681732177734375,
0.034912109375,
0.00791168212890625,
0.006633758544921875,
-0.0133209228515625,
-0.016754150390625,
0.0201568603515625,
0.08251953125,
-0.024169921875,
0.026275634765625,
0.022308349609375,
0.07293701171875,
0.0465087890625,
0.0216827392578125,
0.0230255126953125,
0.0003845691680908203,
0.010467529296875,
0.043304443359375,
-0.036590576171875,
-0.04058837890625,
-0.041015625,
-0.018310546875,
-0.033843994140625,
-0.037200927734375,
-0.0256195068359375,
-0.021820068359375,
0.06591796875,
0.07666015625,
0.01447296142578125,
-0.01329803466796875,
-0.014404296875,
-0.050689697265625,
-0.002567291259765625,
-0.02294921875,
0.0330810546875,
-0.06732177734375,
-0.0022125244140625,
0.026031494140625,
0.015899658203125,
-0.001674652099609375,
-0.01271820068359375,
0.00004863739013671875,
-0.01751708984375,
0.0195159912109375,
-0.0096435546875,
-0.021209716796875,
0.054901123046875,
0.08392333984375,
-0.06671142578125,
0.0021114349365234375,
0.0216827392578125,
-0.0123291015625,
0.042816162109375,
-0.025787353515625,
-0.004650115966796875,
0.0201873779296875,
-0.03631591796875,
0.0100860595703125,
0.0008940696716308594,
0.040252685546875,
-0.037567138671875,
-0.0167083740234375,
0.006378173828125,
0.0229949951171875,
-0.0178680419921875,
0.01084136962890625,
0.00994110107421875,
0.0245208740234375,
-0.01372528076171875,
0.053070068359375,
-0.005802154541015625,
-0.015045166015625,
-0.012298583984375,
0.019073486328125,
-0.061492919921875,
0.009735107421875,
-0.037872314453125,
-0.03802490234375,
-0.006160736083984375,
0.00859832763671875,
-0.077392578125,
-0.0355224609375,
-0.03387451171875,
-0.052093505859375,
-0.0211639404296875,
0.00104522705078125
] |
d3f35276ce663cc2021642a30cbf144455171ca9 | Wordpress Stackexchange
Q: Export and overwrite pages on import? I'm doing a major rework of an existing homepage in my dev environment. There are some new pages but also lots of changes to existing pages. How can I best transfer these changes to my live environment? Exporting and importing only works for pages that does not already exists, it seems.
I would like to export chosen content and overwrite existing content if it exists. I'm not in a position to just migrate the entire site since the live site is an active site with lot's of daily updates on some parts.
A: You have a narrow selection to choose from. Either replace the database tables with something like wp-cli or have a special import-export process for your data.
If you want to make this granular, you could make a post metabox to import/export post content and metadata as json. Then updates could be incremental and on the fly.
But if you develop locally on a different database, then you run the risk of your post IDs being out of sync. So keep that in mind during import/export in any way you choose.
| Q: Export and overwrite pages on import? I'm doing a major rework of an existing homepage in my dev environment. There are some new pages but also lots of changes to existing pages. How can I best transfer these changes to my live environment? Exporting and importing only works for pages that does not already exists, it seems.
I would like to export chosen content and overwrite existing content if it exists. I'm not in a position to just migrate the entire site since the live site is an active site with lot's of daily updates on some parts.
A: You have a narrow selection to choose from. Either replace the database tables with something like wp-cli or have a special import-export process for your data.
If you want to make this granular, you could make a post metabox to import/export post content and metadata as json. Then updates could be incremental and on the fly.
But if you develop locally on a different database, then you run the risk of your post IDs being out of sync. So keep that in mind during import/export in any way you choose.
| wordpress | {
"language": "en",
"length": 190,
"provenance": "stackexchange_00019.jsonl.gz:470558",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247254"
} | [
0.0197296142578125,
-0.007541656494140625,
-0.004177093505859375,
0.0241851806640625,
-0.02276611328125,
-0.048675537109375,
0.044952392578125,
-0.0465087890625,
0.002254486083984375,
0.016143798828125,
-0.023773193359375,
0.0047760009765625,
-0.04742431640625,
-0.025054931640625,
-0.0114898681640625,
-0.0377197265625,
0.038330078125,
-0.04034423828125,
0.00540924072265625,
-0.0177154541015625,
-0.003894805908203125,
0.01136016845703125,
0.021270751953125,
0.04644775390625,
0.03631591796875,
-0.021270751953125,
-0.0408935546875,
0.027801513671875,
0.003719329833984375,
0.0183563232421875,
0.0194091796875,
-0.00542449951171875,
0.02508544921875,
0.000873565673828125,
-0.0186004638671875,
-0.00372314453125,
-0.0013895034790039062,
0.00013005733489990234,
-0.0265045166015625,
0.037689208984375,
0.01690673828125,
0.0020351409912109375,
0.03704833984375,
0.005092620849609375,
-0.006893157958984375,
-0.04083251953125,
0.030975341796875,
-0.035308837890625,
-0.01202392578125,
0.01904296875,
0.0198211669921875,
0.00200653076171875,
0.0233306884765625,
0.0205535888671875,
-0.01806640625,
-0.032135009765625,
-0.042205810546875,
0.0345458984375,
0.04827880859375,
-0.005657196044921875,
-0.0281982421875,
-0.034088134765625,
0.0189666748046875,
-0.03460693359375,
0.00978851318359375,
-0.007221221923828125,
0.0084075927734375,
0.004924774169921875,
-0.100341796875,
0.008758544921875,
0.07208251953125,
-0.048797607421875,
0.01444244384765625,
-0.0193939208984375,
-0.018035888671875,
0.0262451171875,
0.00782012939453125,
0.028656005859375,
0.00847625732421875,
-0.002628326416015625,
-0.01160430908203125,
0.031158447265625,
-0.00836944580078125,
-0.08612060546875,
0.0419921875,
-0.0284423828125,
-0.0195770263671875,
-0.01096343994140625,
-0.0095672607421875,
0.008270263671875,
-0.0038204193115234375,
-0.00876617431640625,
-0.0440673828125,
0.03326416015625,
0.01904296875,
-0.0206756591796875,
-0.0208740234375,
-0.00690460205078125,
-0.006305694580078125,
0.05059814453125,
-0.0201873779296875,
-0.03192138671875,
0.046966552734375,
-0.0308380126953125,
0.025115966796875,
-0.017120361328125,
-0.0218963623046875,
-0.04473876953125,
0.049835205078125,
0.03466796875,
-0.04071044921875,
0.05908203125,
-0.00258636474609375,
0.0158843994140625,
-0.0161285400390625,
0.0264129638671875,
-0.00716400146484375,
-0.001720428466796875,
-0.031585693359375,
0.03948974609375,
-0.0175323486328125,
0.036529541015625,
-0.06280517578125,
-0.0335693359375,
0.005481719970703125,
-0.0187225341796875,
0.0168609619140625,
0.0113372802734375,
0.047027587890625,
0.038299560546875,
-0.045867919921875,
-0.0231475830078125,
0.072021484375,
0.02532958984375,
0.0228729248046875,
-0.03546142578125,
0.030242919921875,
-0.01396942138671875,
0.01035308837890625,
0.015960693359375,
-0.0174713134765625,
-0.037933349609375,
-0.003299713134765625,
-0.019622802734375,
0.017547607421875,
0.01337432861328125,
0.00241851806640625,
0.0214691162109375,
0.0101470947265625,
0.0001424551010131836,
0.01235198974609375,
-0.047119140625,
0.028656005859375,
-0.017059326171875,
0.025665283203125,
-0.0877685546875,
0.04888916015625,
-0.0762939453125,
0.058807373046875,
-0.073486328125,
0.0147705078125,
0.0103759765625,
0.03753662109375,
0.0019378662109375,
-0.008697509765625,
-0.0237579345703125,
-0.05853271484375,
-0.0055694580078125,
0.01361083984375,
0.0209503173828125,
-0.0185699462890625,
-0.0277557373046875,
0.01039886474609375,
-0.01502227783203125,
-0.027587890625,
0.0328369140625,
-0.0218048095703125,
-0.01166534423828125,
0.0231781005859375,
0.0294342041015625,
0.0156707763671875,
-0.00626373291015625,
0.00855255126953125,
0.031951904296875,
-0.028594970703125,
0.0064697265625,
0.00041174888610839844,
0.0253143310546875,
0.0257110595703125,
0.0258636474609375,
0.00353240966796875,
-0.01812744140625,
-0.0543212890625,
-0.01776123046875,
-0.01611328125,
0.0141448974609375,
0.041656494140625,
0.0200347900390625,
0.01270294189453125,
0.007671356201171875,
0.0029048919677734375,
0.0063018798828125,
-0.0269012451171875,
0.01506805419921875,
-0.03912353515625,
-0.0040283203125,
-0.0125885009765625,
0.020904541015625,
0.0069122314453125,
0.04571533203125,
0.01311492919921875,
0.016143798828125,
-0.0251312255859375,
-0.006000518798828125,
-0.021026611328125,
0.006610870361328125,
-0.01032257080078125,
-0.01335906982421875,
-0.002979278564453125,
0.0034332275390625,
-0.01320648193359375,
0.00039196014404296875,
-0.039154052734375,
0.0096588134765625,
0.008453369140625,
0.00748443603515625,
-0.01456451416015625,
-0.0108489990234375,
-0.004245758056640625,
0.005046844482421875,
-0.0073394775390625,
0.03662109375,
0.050445556640625,
0.04241943359375,
-0.0240631103515625,
-0.0016298294067382812,
-0.0134429931640625,
-0.034332275390625,
-0.0038623809814453125,
0.04351806640625,
0.031768798828125,
0.024261474609375,
0.0206146240234375,
0.043914794921875,
0.0538330078125,
-0.007785797119140625,
0.00982666015625,
0.00865936279296875,
0.0160369873046875,
0.05914306640625,
-0.0291595458984375,
0.018310546875,
0.00567626953125,
-0.078857421875,
0.0008296966552734375,
0.061798095703125,
-0.04632568359375,
-0.0113067626953125,
-0.01541900634765625,
-0.033477783203125,
0.010986328125,
-0.0302734375,
-0.0017423629760742188,
-0.00988006591796875,
0.01409149169921875,
0.0082550048828125,
0.0182647705078125,
0.005939483642578125,
-0.0098114013671875,
-0.00240325927734375,
0.0186309814453125,
-0.0294952392578125,
0.02545166015625,
0.05316162109375,
0.003353118896484375,
0.0770263671875,
-0.05810546875,
-0.037628173828125,
0.047607421875,
0.06988525390625,
-0.011932373046875,
0.027374267578125,
0.0379638671875,
-0.01242828369140625,
0.0264129638671875,
-0.00534820556640625,
0.004436492919921875,
-0.051788330078125,
0.01367950439453125,
0.0014600753784179688,
0.02435302734375,
0.0163726806640625,
-0.01371002197265625,
0.017333984375,
-0.0198516845703125,
-0.00972747802734375,
0.09197998046875,
-0.035675048828125,
0.037750244140625,
-0.00531005859375,
0.07293701171875,
0.04559326171875,
-0.0309600830078125,
0.04180908203125,
-0.0191497802734375,
0.025177001953125,
0.0097198486328125,
-0.01105499267578125,
-0.0296173095703125,
-0.0148162841796875,
-0.05767822265625,
-0.0158538818359375,
0.032928466796875,
0.017364501953125,
0.003971099853515625,
-0.0190582275390625,
-0.0222930908203125,
0.001598358154296875,
-0.0684814453125,
-0.056060791015625,
-0.0222625732421875,
-0.039794921875,
0.0024280548095703125,
0.025543212890625,
-0.0094757080078125,
-0.0070648193359375,
0.04425048828125,
0.0163116455078125,
0.042236328125,
-0.059844970703125,
-0.0311126708984375,
-0.095458984375,
-0.09246826171875,
-0.10797119140625,
0.0247955322265625,
-0.00431060791015625,
-0.001953125,
0.05328369140625,
0.0008711814880371094,
-0.05029296875,
-0.0183563232421875,
0.049102783203125,
-0.021331787109375,
-0.0208740234375,
0.0196685791015625,
-0.01561737060546875,
-0.005466461181640625,
-0.00943756103515625,
0.054840087890625,
0.023529052734375,
-0.035247802734375,
-0.007480621337890625,
-0.01499176025390625,
-0.00026726722717285156,
-0.041229248046875,
-0.01117706298828125,
0.03631591796875,
-0.0037479400634765625,
-0.05963134765625,
-0.038330078125,
-0.0141448974609375,
0.01483154296875,
-0.031890869140625,
-0.0035839080810546875,
0.01287841796875,
-0.0231170654296875,
0.0277862548828125,
-0.01549530029296875,
0.02093505859375,
0.037872314453125,
0.04461669921875,
0.0305938720703125,
-0.049713134765625,
-0.0408935546875,
-0.0460205078125,
-0.042083740234375,
0.05426025390625,
-0.00513458251953125,
0.034759521484375,
0.0306549072265625,
-0.0160064697265625,
-0.04156494140625,
0.054718017578125,
-0.0303802490234375,
-0.08209228515625,
0.044189453125,
-0.022613525390625,
0.010162353515625,
-0.0258331298828125,
-0.019317626953125,
0.0258636474609375,
0.11248779296875,
-0.0419921875,
-0.01019287109375,
0.0175933837890625,
-0.004673004150390625,
0.004138946533203125,
0.0017948150634765625,
-0.05731201171875,
-0.0074615478515625,
-0.0148468017578125,
-0.0243072509765625,
-0.0299530029296875,
-0.0250396728515625,
-0.0035114288330078125,
-0.032196044921875,
0.0129547119140625,
-0.0361328125,
0.0232086181640625,
0.01349639892578125,
-0.0166168212890625,
-0.00440216064453125,
0.00208282470703125,
-0.035736083984375,
0.015655517578125,
-0.007129669189453125,
-0.07025146484375,
0.004985809326171875,
-0.020233154296875,
0.0234832763671875,
-0.01715087890625,
0.0294036865234375,
-0.03961181640625,
0.0028591156005859375,
-0.0312042236328125,
0.03363037109375,
-0.0278167724609375,
0.02496337890625,
-0.004673004150390625,
-0.01488494873046875,
-0.005512237548828125,
-0.02313232421875,
-0.015869140625,
-0.044464111328125,
-0.0380859375,
-0.00634765625,
-0.01507568359375,
0.0294189453125,
-0.0210723876953125,
0.000255584716796875,
-0.030181884765625,
-0.035797119140625,
-0.0208740234375,
-0.00879669189453125,
0.007389068603515625,
-0.036956787109375,
-0.024261474609375,
-0.03668212890625,
0.0208587646484375,
0.01441192626953125,
-0.0345458984375,
0.01177978515625,
0.048583984375,
0.0211334228515625,
-0.027130126953125,
-0.047760009765625,
0.00635528564453125,
0.013763427734375,
0.0037841796875,
0.033782958984375,
0.013427734375,
0.01084136962890625,
-0.00624847412109375,
-0.01361083984375,
-0.006992340087890625,
-0.0296478271484375,
0.00469970703125,
-0.0009517669677734375,
-0.004848480224609375,
0.005153656005859375,
-0.01271820068359375,
0.05633544921875,
0.0419921875,
0.00897979736328125,
-0.03875732421875,
-0.0157318115234375,
0.0305938720703125,
0.0185699462890625,
-0.01296234130859375,
-0.043609619140625,
0.0059967041015625,
-0.01239776611328125,
0.0166168212890625,
0.0017976760864257812,
0.0186920166015625,
-0.007259368896484375,
-0.0250091552734375,
0.00350189208984375,
0.0081024169921875,
0.01448822021484375,
0.01861572265625,
-0.03411865234375,
0.02850341796875,
0.0181732177734375,
-0.0229949951171875,
0.00948333740234375,
-0.00665283203125,
0.04254150390625,
0.0013942718505859375,
-0.047698974609375,
-0.02825927734375,
-0.01078033447265625,
-0.011199951171875,
0.0256805419921875,
0.027130126953125,
-0.0069122314453125,
0.0043487548828125,
-0.0200958251953125,
-0.029541015625,
0.035430908203125,
-0.0159759521484375,
-0.035888671875,
-0.056915283203125,
-0.00954437255859375,
-0.03125,
0.02166748046875,
0.00623321533203125,
-0.07421875,
0.03497314453125,
0.00991058349609375,
0.01242828369140625,
0.01288604736328125,
0.023712158203125,
0.005687713623046875,
-0.0186614990234375,
0.04461669921875,
-0.02996826171875,
0.01003265380859375,
-0.023193359375,
-0.0118255615234375,
0.0184173583984375,
0.06256103515625,
-0.026092529296875,
-0.0206298828125,
0.01169586181640625,
-0.04376220703125,
-0.0091552734375,
0.072021484375,
-0.0035457611083984375,
-0.071044921875,
-0.01471710205078125,
-0.026580810546875,
-0.01114654541015625,
-0.03997802734375,
-0.007144927978515625,
0.00414276123046875,
-0.0199737548828125,
0.021759033203125,
0.00482940673828125,
0.005107879638671875,
-0.0205078125,
-0.0223236083984375,
-0.032379150390625,
-0.039459228515625,
0.00412750244140625,
-0.0091094970703125,
-0.008056640625,
-0.0186004638671875,
-0.021392822265625,
0.032012939453125,
0.01152801513671875,
0.0281829833984375,
-0.0032672882080078125,
-0.04864501953125,
0.0109405517578125,
0.004238128662109375,
0.0286865234375,
-0.0107879638671875,
0.0223846435546875,
-0.003917694091796875,
-0.0626220703125,
-0.025146484375,
0.005382537841796875,
-0.0109710693359375,
-0.038330078125,
-0.0244903564453125,
0.0223541259765625,
0.04144287109375,
-0.0173187255859375,
-0.047119140625,
0.01299285888671875,
-0.041015625,
-0.0052947998046875,
-0.0038089752197265625,
0.006732940673828125,
0.0987548828125,
-0.052093505859375,
0.08319091796875,
0.0092926025390625,
0.053009033203125,
-0.019683837890625,
-0.0208740234375,
-0.0061492919921875,
0.037872314453125,
-0.01241302490234375,
-0.007114410400390625,
0.0517578125,
0.0046234130859375,
0.060638427734375,
-0.005313873291015625,
0.032379150390625,
-0.037109375,
-0.005924224853515625,
-0.02734375,
0.028411865234375,
-0.07305908203125,
-0.0272674560546875,
0.0499267578125,
-0.0216217041015625,
-0.00036454200744628906,
-0.0029430389404296875,
0.0026340484619140625,
0.01318359375,
-0.01873779296875,
0.0055694580078125,
0.008209228515625,
-0.017425537109375,
0.0089111328125,
0.0195770263671875,
-0.04443359375,
0.02288818359375,
-0.0138397216796875,
0.005039215087890625,
0.07562255859375,
0.0145416259765625,
0.0201263427734375,
0.020721435546875,
0.024139404296875,
-0.02044677734375,
-0.02301025390625,
-0.04132080078125,
-0.0253448486328125,
0.032562255859375,
0.054656982421875,
0.048004150390625,
-0.0755615234375,
0.0039215087890625,
0.0188751220703125,
-0.02410888671875,
0.001644134521484375,
-0.007724761962890625,
-0.005077362060546875,
-0.0419921875,
-0.01140594482421875,
0.04107666015625,
-0.0206146240234375,
-0.0248565673828125,
0.01268768310546875,
-0.029449462890625,
-0.03271484375,
0.029022216796875,
0.01690673828125,
-0.0093841552734375,
0.041290283203125,
0.01154327392578125,
0.006511688232421875,
-0.00890350341796875,
-0.01025390625,
0.0178375244140625,
-0.0290069580078125,
-0.029296875,
0.042022705078125,
-0.053985595703125,
0.018768310546875,
-0.0290069580078125,
-0.010345458984375,
0.07281494140625,
0.0238800048828125,
0.010467529296875,
-0.04290771484375,
-0.0172271728515625,
0.05206298828125,
0.006198883056640625,
-0.006793975830078125,
0.036376953125,
-0.019195556640625,
-0.033843994140625,
0.021240234375,
-0.02685546875,
-0.036651611328125,
-0.0230712890625,
-0.040374755859375,
0.07122802734375,
-0.0308837890625,
-0.02545166015625,
0.006183624267578125,
0.020904541015625,
-0.005733489990234375,
0.00872802734375,
0.0274658203125,
-0.0447998046875,
-0.039825439453125,
0.0164794921875,
-0.043914794921875,
-0.0423583984375,
-0.008544921875,
-0.085693359375,
0.124267578125,
0.00937652587890625,
0.036346435546875,
0.004039764404296875,
0.048431396484375,
-0.053863525390625,
0.0152740478515625,
-0.041900634765625,
0.0648193359375,
0.037750244140625,
0.0297698974609375,
-0.046539306640625,
-0.0202484130859375,
0.0028820037841796875,
0.034088134765625,
0.019134521484375,
0.00907135009765625,
0.0026035308837890625,
-0.0059356689453125,
0.0263214111328125,
0.0269775390625,
0.00421142578125,
0.040374755859375,
-0.0240936279296875,
0.02813720703125,
0.032135009765625,
-0.07598876953125,
0.007724761962890625,
-0.007411956787109375,
-0.0166778564453125,
0.0105133056640625,
0.0024127960205078125,
0.0113525390625,
-0.005062103271484375,
-0.02301025390625,
0.017181396484375,
-0.01103973388671875,
-0.0178985595703125,
0.0015716552734375,
0.0144195556640625,
-0.0283966064453125,
-0.0213623046875,
-0.0076751708984375,
0.01445770263671875,
-0.0012922286987304688,
0.0172271728515625,
0.004344940185546875,
0.039215087890625,
0.0438232421875,
0.0159912109375,
0.058807373046875,
0.00672149658203125,
0.0188751220703125,
-0.00392913818359375,
0.0167388916015625,
0.061248779296875,
0.052490234375,
0.051544189453125,
0.0107574462890625,
-0.01221466064453125,
0.0186920166015625,
0.06549072265625,
-0.0286865234375,
-0.032440185546875,
0.033782958984375,
0.016937255859375,
-0.01488494873046875,
-0.005352020263671875,
-0.01251983642578125,
-0.04949951171875,
0.02703857421875,
-0.01035308837890625,
-0.0180206298828125,
0.0111083984375,
-0.0145263671875,
0.012847900390625,
0.03179931640625,
0.028350830078125,
-0.0081787109375,
-0.0438232421875,
0.0272369384765625,
0.0289764404296875,
0.027862548828125,
-0.00846099853515625,
0.038970947265625,
0.021087646484375,
-0.00019693374633789062,
-0.00682830810546875,
-0.004085540771484375,
-0.010162353515625,
0.00623321533203125,
-0.03570556640625,
-0.041900634765625,
0.023101806640625,
0.03302001953125,
0.0024471282958984375,
0.0223388671875,
0.06414794921875,
0.050506591796875,
-0.03387451171875,
-0.02215576171875,
0.0250701904296875,
-0.0265655517578125,
-0.007160186767578125,
-0.05902099609375,
0.035369873046875,
0.00867462158203125,
0.00927734375,
-0.0096435546875,
0.0140533447265625,
0.038848876953125,
-0.0227508544921875,
0.060699462890625,
-0.01934814453125,
-0.0277099609375,
0.05926513671875,
0.0001131296157836914,
0.1307373046875,
0.012298583984375,
-0.0288238525390625,
-0.0186920166015625,
-0.0254364013671875,
0.032379150390625,
-0.0157012939453125,
0.0067901611328125,
-0.0014820098876953125,
0.039581298828125,
0.0338134765625,
0.0026683807373046875,
0.00848388671875,
0.005512237548828125,
-0.0089263916015625,
0.050994873046875,
0.042266845703125,
0.0318603515625,
-0.0279693603515625,
-0.022216796875,
-0.01299285888671875,
0.0562744140625,
0.040313720703125,
0.057830810546875,
-0.0069122314453125,
0.025146484375,
0.057281494140625,
0.011138916015625,
0.01055145263671875,
0.0207366943359375,
0.01432037353515625,
-0.02496337890625,
0.043304443359375,
-0.0142364501953125,
-0.030853271484375,
-0.003559112548828125,
0.0235748291015625,
-0.048797607421875,
-0.01690673828125,
-0.018463134765625,
0.0196380615234375,
0.00434112548828125,
-0.021026611328125,
-0.0419921875,
0.0193634033203125,
0.029998779296875,
-0.0272064208984375,
0.01641845703125,
-0.020843505859375,
0.030975341796875,
0.009674072265625,
0.04620361328125,
-0.01233673095703125,
0.01500701904296875,
-0.005527496337890625,
0.0271759033203125,
0.0281524658203125,
0.036865234375,
-0.056396484375,
0.032440185546875,
-0.005908966064453125,
-0.002742767333984375,
0.01910400390625,
0.0863037109375,
0.02117919921875,
-0.01032257080078125,
-0.031585693359375,
-0.0028362274169921875,
-0.00531768798828125,
-0.0158538818359375,
-0.0080413818359375,
0.0047149658203125,
-0.019134521484375,
-0.007625579833984375,
-0.018218994140625,
-0.0209197998046875,
-0.03570556640625,
0.012176513671875,
0.037567138671875,
-0.02545166015625,
-0.0010938644409179688,
-0.052581787109375,
-0.01377105712890625,
-0.01305389404296875,
0.005657196044921875,
-0.0287017822265625,
0.0367431640625,
0.0016164779663085938,
-0.0122222900390625,
-0.0244140625,
0.016204833984375,
-0.039093017578125,
-0.0264892578125,
-0.0217437744140625,
-0.031646728515625,
-0.04254150390625,
0.05999755859375,
-0.013092041015625,
0.01264190673828125,
0.041778564453125,
-0.01849365234375,
-0.020538330078125,
-0.02154541015625,
-0.0008859634399414062,
0.0205078125,
-0.0066375732421875,
-0.038482666015625,
0.0001195669174194336,
-0.0191650390625,
0.01459503173828125,
0.0005588531494140625,
0.011138916015625,
-0.03680419921875,
-0.003589630126953125,
0.01203155517578125,
-0.0092315673828125,
0.0244903564453125,
-0.0209503173828125,
-0.0535888671875,
0.0206756591796875,
0.012786865234375,
-0.0343017578125,
0.01947021484375,
0.006099700927734375,
-0.0186920166015625,
-0.01558685302734375,
0.006927490234375,
0.01036834716796875,
0.0181732177734375,
0.01038360595703125,
0.0029506683349609375,
0.038604736328125,
0.00628662109375,
-0.0170135498046875,
-0.03204345703125,
-0.0002620220184326172,
-0.0007200241088867188,
0.0269317626953125,
-0.024810791015625,
0.00910186767578125,
0.032073974609375,
0.06317138671875,
0.005481719970703125,
0.006618499755859375,
0.0236663818359375,
-0.047332763671875,
-0.01081085205078125,
0.039947509765625,
-0.07666015625,
0.01258087158203125,
0.09686279296875,
0.13232421875,
0.047332763671875,
-0.04656982421875,
0.00927734375,
-0.00506591796875,
0.0225677490234375,
-0.0206298828125,
-0.0101318359375,
-0.0391845703125,
-0.0224761962890625,
-0.0145721435546875,
-0.0067138671875,
0.00864410400390625,
-0.04254150390625,
-0.0099029541015625,
-0.0005021095275878906,
0.0163421630859375,
0.01065826416015625,
-0.0142974853515625,
-0.0236053466796875,
0.057647705078125,
-0.036834716796875,
0.00637054443359375,
0.0152130126953125,
0.0025119781494140625,
0.036224365234375,
0.0260009765625,
-0.0161590576171875,
-0.003604888916015625,
-0.021209716796875,
-0.0034275054931640625,
-0.0208587646484375,
0.06805419921875,
-0.028167724609375,
-0.0172576904296875,
0.034149169921875,
0.0143280029296875,
-0.0220947265625,
0.006439208984375,
-0.021453857421875,
0.0384521484375,
-0.05108642578125,
0.048248291015625,
-0.0264892578125,
-0.01509857177734375,
-0.035980224609375,
0.0236053466796875,
-0.04827880859375,
0.0208740234375,
-0.00826263427734375,
-0.01690673828125,
-0.0061492919921875,
-0.028167724609375,
-0.01430511474609375,
-0.045257568359375,
-0.0029582977294921875,
0.00507354736328125,
-0.020172119140625,
0.0231475830078125
] |
bcd99e9b8926a5981b19899e25f06e8139a379b7 | Wordpress Stackexchange
Q: Change Custom Post Type slug I'm working within a child theme so I don't want to edit the file that is registering a Portfolio CPT to my site. I used a plugin to change the name from Portfolio to Stories, but the plugin doesn't give an option for the slug.
I tried using the following function:
function change_slug_of_post_type_portfolio() {
register_post_type('portfolio', array('rewrite' => array ('slug' => 'stories',)));
}
add_action('init', 'change_slug_of_post_type_portfolio', 20);
But it removes Portfolio entirely from the WordPress admin sidebar.
A: @dave-romsey answer didn't work for me, PHP kept telling me Warning: Cannot use a scalar value as an array in /path/to/functions.php
So I went the array_merge way.
Complete function you need to add to your child's theme functions.php file:
function update_portfolios_slug( $args, $post_type ) {
if ( 'portfolios' === $post_type ) {
//$args['rewrite']['slug'] = 'presidentes';
$my_args = array(
'rewrite' => array( 'slug' => 'presidentes', 'with_front' => false )
);
return array_merge( $args, $my_args );
}
return $args;
}
add_filter( 'register_post_type_args', 'update_portfolios_slug', 10, 2 );
After uploading your code don't forget to "refresh" your Permalinks by going to Settings > Permalinks and hitting Save changes.
Cheers.
| Q: Change Custom Post Type slug I'm working within a child theme so I don't want to edit the file that is registering a Portfolio CPT to my site. I used a plugin to change the name from Portfolio to Stories, but the plugin doesn't give an option for the slug.
I tried using the following function:
function change_slug_of_post_type_portfolio() {
register_post_type('portfolio', array('rewrite' => array ('slug' => 'stories',)));
}
add_action('init', 'change_slug_of_post_type_portfolio', 20);
But it removes Portfolio entirely from the WordPress admin sidebar.
A: @dave-romsey answer didn't work for me, PHP kept telling me Warning: Cannot use a scalar value as an array in /path/to/functions.php
So I went the array_merge way.
Complete function you need to add to your child's theme functions.php file:
function update_portfolios_slug( $args, $post_type ) {
if ( 'portfolios' === $post_type ) {
//$args['rewrite']['slug'] = 'presidentes';
$my_args = array(
'rewrite' => array( 'slug' => 'presidentes', 'with_front' => false )
);
return array_merge( $args, $my_args );
}
return $args;
}
add_filter( 'register_post_type_args', 'update_portfolios_slug', 10, 2 );
After uploading your code don't forget to "refresh" your Permalinks by going to Settings > Permalinks and hitting Save changes.
Cheers.
A: The register_post_type_args filter can be used to modify post type arguments:
add_filter( 'register_post_type_args', 'wpse247328_register_post_type_args', 10, 2 );
function wpse247328_register_post_type_args( $args, $post_type ) {
if ( 'portfolio' === $post_type ) {
$args['rewrite']['slug'] = 'stories';
}
return $args;
}
| wordpress | {
"language": "en",
"length": 225,
"provenance": "stackexchange_00019.jsonl.gz:470577",
"question_score": "11",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247328"
} | [
0.028045654296875,
-0.0063629150390625,
0.019256591796875,
-0.0175018310546875,
-0.0005316734313964844,
-0.0158538818359375,
0.03778076171875,
-0.04541015625,
-0.057373046875,
0.0135040283203125,
0.00865936279296875,
-0.01361846923828125,
-0.037628173828125,
-0.0438232421875,
0.0158538818359375,
-0.042205810546875,
0.0050506591796875,
0.001651763916015625,
0.0207061767578125,
-0.02618408203125,
0.025909423828125,
-0.022705078125,
-0.003887176513671875,
0.005352020263671875,
0.0220794677734375,
-0.0223388671875,
0.042877197265625,
-0.023040771484375,
-0.00026798248291015625,
-0.04534912109375,
0.014739990234375,
0.025238037109375,
0.0061187744140625,
-0.00882720947265625,
0.049713134765625,
0.06201171875,
0.040985107421875,
-0.0035247802734375,
0.0494384765625,
-0.00200653076171875,
0.043548583984375,
-0.01971435546875,
-0.004436492919921875,
0.041839599609375,
-0.0099334716796875,
-0.032562255859375,
0.0272979736328125,
-0.04876708984375,
0.0161895751953125,
-0.0186614990234375,
-0.0024013519287109375,
0.00818634033203125,
0.01160430908203125,
-0.013763427734375,
-0.0050811767578125,
0.01317596435546875,
-0.0379638671875,
0.04193115234375,
0.03192138671875,
0.055389404296875,
-0.01285552978515625,
0.003173828125,
-0.0197906494140625,
-0.07757568359375,
-0.0185546875,
0.0081634521484375,
-0.04052734375,
0.01555633544921875,
-0.044769287109375,
-0.01092529296875,
0.0159149169921875,
-0.05023193359375,
0.00745391845703125,
-0.01666259765625,
0.0025730133056640625,
-0.0330810546875,
-0.006137847900390625,
-0.03265380859375,
0.0098419189453125,
0.017120361328125,
-0.0009965896606445312,
-0.01421356201171875,
-0.00768280029296875,
0.003330230712890625,
-0.0084686279296875,
0.00934600830078125,
-0.0217437744140625,
-0.007358551025390625,
-0.0188140869140625,
0.02398681640625,
-0.0113677978515625,
0.01195526123046875,
-0.018951416015625,
0.03948974609375,
0.0139312744140625,
-0.00792694091796875,
0.002094268798828125,
0.021484375,
-0.00673675537109375,
0.01776123046875,
0.01611328125,
-0.04608154296875,
0.037353515625,
-0.035675048828125,
0.024993896484375,
0.053741455078125,
0.01194000244140625,
0.00875091552734375,
0.041534423828125,
0.0033473968505859375,
0.022125244140625,
0.058013916015625,
-0.03472900390625,
-0.01544952392578125,
-0.022674560546875,
0.045196533203125,
-0.03704833984375,
-0.00043463706970214844,
-0.0092010498046875,
0.0426025390625,
0.00406646728515625,
0.028900146484375,
0.0303497314453125,
-0.043487548828125,
-0.0031147003173828125,
-0.00717926025390625,
-0.017333984375,
-0.055267333984375,
0.055084228515625,
0.03216552734375,
-0.0494384765625,
-0.01328277587890625,
0.082275390625,
0.04180908203125,
0.0323486328125,
-0.0202178955078125,
0.041015625,
-0.007579803466796875,
-0.0208892822265625,
0.0302734375,
0.00943756103515625,
-0.017242431640625,
-0.004741668701171875,
-0.0191802978515625,
0.0275421142578125,
0.0018177032470703125,
0.0122528076171875,
0.0247650146484375,
0.027496337890625,
-0.01088714599609375,
0.0187225341796875,
-0.0328369140625,
0.0225982666015625,
0.03521728515625,
0.0006346702575683594,
0.004863739013671875,
0.045135498046875,
-0.0177001953125,
-0.0146331787109375,
-0.03656005859375,
-0.0209503173828125,
-0.0288543701171875,
-0.0047760009765625,
-0.031768798828125,
-0.048553466796875,
0.062408447265625,
-0.00484466552734375,
0.003017425537109375,
0.0132598876953125,
-0.01535797119140625,
0.0283966064453125,
-0.0184783935546875,
-0.02947998046875,
0.0009975433349609375,
0.00864410400390625,
0.0140380859375,
-0.01529693603515625,
0.033782958984375,
0.019439697265625,
0.0177459716796875,
0.005222320556640625,
-0.0284423828125,
0.047607421875,
-0.00042319297790527344,
-0.048370361328125,
0.00018870830535888672,
0.0116119384765625,
0.01026153564453125,
0.01468658447265625,
0.00678253173828125,
0.0296173095703125,
0.00701904296875,
-0.0380859375,
0.0189666748046875,
0.0033893585205078125,
-0.0038738250732421875,
-0.0067901611328125,
0.0053558349609375,
-0.00276947021484375,
-0.01202392578125,
-0.0186004638671875,
0.0299072265625,
-0.0173797607421875,
0.01922607421875,
-0.037200927734375,
0.008331298828125,
-0.01064300537109375,
0.049224853515625,
0.037139892578125,
0.04327392578125,
-0.01413726806640625,
0.00936126708984375,
-0.028076171875,
0.00348663330078125,
-0.025390625,
0.016845703125,
0.01543426513671875,
-0.0263824462890625,
-0.0231475830078125,
-0.0145721435546875,
-0.038330078125,
0.0175628662109375,
-0.049713134765625,
0.035125732421875,
0.056549072265625,
-0.01293182373046875,
-0.0168914794921875,
-0.0265350341796875,
0.01035308837890625,
0.0231781005859375,
-0.094970703125,
0.035552978515625,
0.0189666748046875,
-0.013916015625,
-0.0362548828125,
0.019195556640625,
0.0253753662109375,
0.0075531005859375,
-0.01416778564453125,
0.0308074951171875,
0.018768310546875,
0.01568603515625,
-0.008331298828125,
-0.000016450881958007812,
0.0594482421875,
-0.00804901123046875,
0.00690460205078125,
0.001148223876953125,
-0.0074462890625,
0.031951904296875,
-0.0006952285766601562,
0.0274810791015625,
0.01145172119140625,
0.00551605224609375,
-0.0125274658203125,
0.040771484375,
-0.028350830078125,
-0.0219879150390625,
0.01461029052734375,
-0.00787353515625,
0.00434112548828125,
-0.045867919921875,
-0.0240936279296875,
-0.01422882080078125,
0.0007724761962890625,
0.03814697265625,
-0.0033702850341796875,
-0.01073455810546875,
-0.06378173828125,
0.0311431884765625,
0.036346435546875,
0.0283355712890625,
-0.003444671630859375,
0.046722412109375,
0.06085205078125,
-0.02099609375,
-0.03472900390625,
-0.01129150390625,
-0.0035457611083984375,
0.00833892822265625,
-0.023590087890625,
0.015899658203125,
0.01505279541015625,
0.0009551048278808594,
-0.038482666015625,
-0.041595458984375,
0.036865234375,
0.0194549560546875,
-0.0028095245361328125,
-0.037078857421875,
0.008758544921875,
-0.0134429931640625,
-0.03131103515625,
0.012939453125,
0.01343536376953125,
-0.046173095703125,
0.042266845703125,
-0.0509033203125,
0.048828125,
-0.044921875,
0.053375244140625,
0.048828125,
-0.00934600830078125,
-0.00803375244140625,
0.01007080078125,
-0.045196533203125,
-0.036529541015625,
0.055938720703125,
0.007373809814453125,
-0.0305633544921875,
-0.025115966796875,
0.04473876953125,
0.0086517333984375,
-0.0224609375,
0.00786590576171875,
-0.0287322998046875,
-0.01311492919921875,
-0.003208160400390625,
-0.051361083984375,
-0.036041259765625,
0.01446533203125,
-0.057037353515625,
-0.0310516357421875,
0.00998687744140625,
-0.042999267578125,
0.004245758056640625,
0.0299224853515625,
-0.006381988525390625,
0.0443115234375,
-0.020904541015625,
-0.050201416015625,
-0.025390625,
-0.0784912109375,
-0.002010345458984375,
0.0145721435546875,
0.016387939453125,
0.0205535888671875,
0.016937255859375,
0.00848388671875,
-0.031341552734375,
0.029296875,
0.01270294189453125,
-0.01108551025390625,
0.0229034423828125,
0.0240020751953125,
-0.043792724609375,
0.005077362060546875,
-0.0091705322265625,
0.07208251953125,
0.03509521484375,
-0.036956787109375,
0.008575439453125,
-0.01104736328125,
-0.018218994140625,
0.01078033447265625,
0.053192138671875,
0.0257568359375,
-0.011138916015625,
0.049560546875,
-0.035308837890625,
-0.06915283203125,
-0.01515960693359375,
-0.0556640625,
0.0109710693359375,
0.01806640625,
0.026885986328125,
-0.0286407470703125,
0.048858642578125,
-0.01271820068359375,
0.02423095703125,
0.034881591796875,
-0.033447265625,
0.03765869140625,
-0.022979736328125,
-0.03692626953125,
-0.03961181640625,
-0.0037994384765625,
-0.020599365234375,
0.0189971923828125,
-0.00634765625,
0.0284271240234375,
0.01091766357421875,
0.01172637939453125,
-0.024139404296875,
-0.06756591796875,
0.006801605224609375,
-0.087646484375,
-0.0222930908203125,
-0.057281494140625,
0.01123809814453125,
-0.01105499267578125,
0.060699462890625,
-0.0226898193359375,
-0.00878143310546875,
0.005283355712890625,
-0.014068603515625,
0.0231781005859375,
-0.00695037841796875,
-0.043731689453125,
-0.0159149169921875,
-0.00421142578125,
-0.02105712890625,
-0.005626678466796875,
-0.01641845703125,
-0.006114959716796875,
0.041839599609375,
-0.004016876220703125,
-0.0085601806640625,
0.055450439453125,
-0.03472900390625,
0.0223541259765625,
0.004062652587890625,
0.005859375,
-0.031768798828125,
-0.056396484375,
-0.00283050537109375,
-0.10699462890625,
-0.0236663818359375,
0.030181884765625,
0.07244873046875,
-0.01104736328125,
-0.0265655517578125,
-0.00876617431640625,
0.08294677734375,
0.0369873046875,
-0.003910064697265625,
0.0269622802734375,
-0.021636962890625,
-0.01047515869140625,
0.00597381591796875,
0.01476287841796875,
-0.01180267333984375,
-0.0200042724609375,
-0.0207061767578125,
-0.033782958984375,
0.01544952392578125,
-0.008575439453125,
0.018646240234375,
0.02294921875,
-0.0233306884765625,
-0.06048583984375,
-0.0194091796875,
0.0038776397705078125,
0.0135955810546875,
0.0007262229919433594,
-0.005779266357421875,
-0.025909423828125,
-0.04620361328125,
0.0673828125,
-0.034637451171875,
-0.004375457763671875,
0.00397491455078125,
0.11395263671875,
0.01093292236328125,
-0.0225982666015625,
-0.0269012451171875,
0.0074615478515625,
0.0304107666015625,
0.01727294921875,
0.0165557861328125,
-0.00296783447265625,
-0.00928497314453125,
0.037109375,
0.0014848709106445312,
-0.040802001953125,
0.01146697998046875,
0.031982421875,
0.027740478515625,
0.00672149658203125,
-0.0257720947265625,
-0.03631591796875,
0.05462646484375,
0.0212554931640625,
-0.0069580078125,
0.028411865234375,
-0.0266571044921875,
0.004024505615234375,
0.0231170654296875,
-0.0258636474609375,
-0.03692626953125,
-0.04345703125,
0.02777099609375,
0.024444580078125,
0.00891876220703125,
0.0160369873046875,
-0.00942230224609375,
0.018218994140625,
-0.0200042724609375,
-0.0034580230712890625,
-0.039093017578125,
0.0022125244140625,
-0.0085296630859375,
0.01537322998046875,
-0.004055023193359375,
0.00792694091796875,
-0.049346923828125,
-0.00011670589447021484,
0.012847900390625,
0.01015472412109375,
0.01175689697265625,
-0.058349609375,
0.00438690185546875,
0.038482666015625,
-0.0184173583984375,
0.0302886962890625,
0.04974365234375,
0.038330078125,
0.00579071044921875,
-0.033905029296875,
-0.035736083984375,
0.056243896484375,
-0.048980712890625,
0.0251312255859375,
0.0074310302734375,
0.0009303092956542969,
-0.045013427734375,
0.07122802734375,
0.04931640625,
-0.01262664794921875,
-0.0227508544921875,
0.015869140625,
0.0184173583984375,
0.00559234619140625,
0.0194549560546875,
0.013092041015625,
0.008697509765625,
-0.039825439453125,
0.03155517578125,
-0.040313720703125,
0.01493072509765625,
0.0250701904296875,
0.037811279296875,
-0.0012464523315429688,
-0.037689208984375,
0.02069091796875,
-0.0279693603515625,
-0.0116729736328125,
-0.0019550323486328125,
-0.0386962890625,
-0.0179595947265625,
-0.01458740234375,
0.0146942138671875,
0.024017333984375,
-0.009979248046875,
-0.021759033203125,
0.007251739501953125,
-0.0251922607421875,
0.0070648193359375,
0.0079345703125,
-0.0279083251953125,
0.004627227783203125,
0.0165557861328125,
0.0010242462158203125,
-0.011932373046875,
-0.005035400390625,
-0.02423095703125,
-0.0153350830078125,
-0.01036834716796875,
-0.01120758056640625,
0.037445068359375,
-0.0247955322265625,
0.05499267578125,
-0.02435302734375,
-0.037322998046875,
0.05279541015625,
0.0025234222412109375,
0.053466796875,
0.0230560302734375,
-0.03900146484375,
0.008026123046875,
-0.01031494140625,
0.01306915283203125,
0.03118896484375,
-0.0235443115234375,
-0.02655029296875,
-0.04083251953125,
-0.0082855224609375,
0.03338623046875,
-0.0186767578125,
0.001659393310546875,
-0.0175933837890625,
0.0103607177734375,
0.01580810546875,
0.0816650390625,
-0.02569580078125,
0.0264434814453125,
0.01525115966796875,
0.004169464111328125,
-0.0151519775390625,
-0.0266571044921875,
-0.01186370849609375,
0.0022869110107421875,
-0.033599853515625,
-0.05517578125,
0.017059326171875,
0.038848876953125,
-0.0293426513671875,
0.01447296142578125,
0.05810546875,
0.0179901123046875,
0.0177764892578125,
-0.007183074951171875,
0.00536346435546875,
-0.01461029052734375,
-0.00992584228515625,
-0.019317626953125,
0.01071929931640625,
0.031341552734375,
-0.0009703636169433594,
0.023101806640625,
0.0116729736328125,
-0.0421142578125,
0.0208892822265625,
0.004161834716796875,
0.01329803466796875,
0.022857666015625,
-0.048126220703125,
0.01922607421875,
0.0210418701171875,
-0.0016307830810546875,
0.0188751220703125,
-0.0158538818359375,
0.01561737060546875,
0.0025997161865234375,
-0.01270294189453125,
0.032989501953125,
0.034271240234375,
0.08721923828125,
-0.0014591217041015625,
-0.0036869049072265625,
0.050506591796875,
-0.034210205078125,
-0.018798828125,
0.05706787109375,
0.033233642578125,
-0.06585693359375,
-0.0147247314453125,
0.00440216064453125,
0.0260467529296875,
0.04852294921875,
0.0033397674560546875,
-0.009185791015625,
0.0474853515625,
-0.00519561767578125,
-0.052398681640625,
-0.05462646484375,
-0.00868988037109375,
0.01080322265625,
0.0009202957153320312,
0.0078125,
0.056121826171875,
-0.001781463623046875,
-0.03179931640625,
-0.0197601318359375,
0.00943756103515625,
-0.022216796875,
-0.03948974609375,
0.01338958740234375,
-0.01177978515625,
-0.00665283203125,
-0.058013916015625,
0.0223846435546875,
-0.00264739990234375,
0.00800323486328125,
0.06573486328125,
0.0162353515625,
0.0194244384765625,
0.01500701904296875,
0.0146484375,
-0.00914764404296875,
-0.00919342041015625,
-0.0233154296875,
-0.019561767578125,
-0.029998779296875,
0.01015472412109375,
0.0081939697265625,
-0.039398193359375,
0.0232696533203125,
-0.03131103515625,
-0.0163116455078125,
-0.0135650634765625,
-0.0225830078125,
0.0506591796875,
-0.0211181640625,
-0.0225982666015625,
0.0185546875,
0.026702880859375,
-0.00428009033203125,
0.0269012451171875,
-0.0041046142578125,
-0.07989501953125,
-0.078369140625,
0.0272979736328125,
-0.10540771484375,
-0.013671875,
0.0208892822265625,
-0.0755615234375,
0.1558837890625,
-0.00875091552734375,
0.05706787109375,
0.0216522216796875,
0.05816650390625,
-0.048004150390625,
0.0247650146484375,
-0.0299835205078125,
0.04498291015625,
0.01361083984375,
0.0254974365234375,
-0.04461669921875,
-0.01053619384765625,
0.002960205078125,
0.0245208740234375,
0.0867919921875,
0.01558685302734375,
-0.037078857421875,
-0.0225830078125,
0.0859375,
0.063232421875,
0.0203399658203125,
0.0199127197265625,
-0.0202789306640625,
0.03546142578125,
-0.0115814208984375,
-0.041778564453125,
0.028961181640625,
-0.0323486328125,
-0.06463623046875,
0.01458740234375,
0.0277252197265625,
0.034454345703125,
-0.01007843017578125,
-0.041717529296875,
-0.020599365234375,
-0.008697509765625,
0.0166015625,
0.0020351409912109375,
-0.0187225341796875,
0.03936767578125,
0.0300750732421875,
-0.0225982666015625,
-0.006633758544921875,
-0.03192138671875,
0.058197021484375,
0.0018062591552734375,
-0.038055419921875,
-0.002010345458984375,
0.0020580291748046875,
-0.047760009765625,
-0.01605224609375,
-0.0293426513671875,
0.0380859375,
-0.00598907470703125,
0.0264434814453125,
0.038238525390625,
0.01445770263671875,
-0.0005555152893066406,
0.06561279296875,
0.07586669921875,
0.040863037109375,
-0.060455322265625,
-0.0396728515625,
0.0214996337890625,
0.0271453857421875,
-0.016357421875,
0.01018524169921875,
-0.0038604736328125,
-0.03265380859375,
0.03338623046875,
-0.0445556640625,
-0.012481689453125,
0.01554107666015625,
0.0159912109375,
-0.0183868408203125,
-0.05072021484375,
0.01351165771484375,
0.006114959716796875,
-0.07586669921875,
0.04046630859375,
0.01180267333984375,
0.06646728515625,
0.0139007568359375,
0.0828857421875,
-0.006137847900390625,
-0.03253173828125,
-0.03173828125,
0.01535797119140625,
-0.0053558349609375,
0.03546142578125,
-0.0728759765625,
-0.035675048828125,
0.04254150390625,
0.05816650390625,
0.046417236328125,
-0.0011796951293945312,
0.0173492431640625,
0.015869140625,
0.0294342041015625,
0.0019683837890625,
0.0183563232421875,
0.00662994384765625,
0.0093994140625,
-0.036956787109375,
0.01369476318359375,
-0.004730224609375,
-0.0109100341796875,
-0.00524139404296875,
0.00841522216796875,
0.00860595703125,
-0.0157928466796875,
0.03173828125,
0.0027713775634765625,
-0.0026073455810546875,
0.037567138671875,
0.026031494140625,
0.044036865234375,
0.034271240234375,
-0.051422119140625,
0.0077972412109375,
-0.05023193359375,
-0.08807373046875,
0.041168212890625,
0.03875732421875,
-0.032073974609375,
0.01187896728515625,
0.0008196830749511719,
0.003925323486328125,
0.0014781951904296875,
0.00812530517578125,
-0.0104522705078125,
0.0276336669921875,
0.032745361328125,
0.0212860107421875,
-0.031524658203125,
-0.023040771484375,
0.0007801055908203125,
0.0294189453125,
0.003337860107421875,
0.1090087890625,
-0.033538818359375,
0.0019683837890625,
-0.0248565673828125,
-0.01020050048828125,
-0.002346038818359375,
-0.02264404296875,
-0.0017557144165039062,
0.0006184577941894531,
0.0131683349609375,
0.002895355224609375,
0.006565093994140625,
-0.0364990234375,
0.0665283203125,
-0.0758056640625,
-0.023834228515625,
-0.0188140869140625,
0.031341552734375,
-0.047515869140625,
-0.010101318359375,
-0.03558349609375,
-0.0345458984375,
-0.034576416015625,
-0.011322021484375,
0.0159149169921875,
-0.00051116943359375,
-0.01503753662109375,
0.054901123046875,
-0.00266265869140625,
-0.049041748046875,
0.00896453857421875,
-0.051361083984375,
-0.0164947509765625,
0.0279083251953125,
0.045257568359375,
-0.0210418701171875,
0.0236968994140625,
-0.00846099853515625,
0.024566650390625,
0.009765625,
0.056976318359375,
0.004150390625,
-0.01079559326171875,
-0.01261138916015625,
-0.01611328125,
0.0078277587890625,
-0.004627227783203125,
0.0079803466796875,
-0.03192138671875,
-0.007457733154296875,
0.00142669677734375,
-0.009613037109375,
-0.0208740234375,
-0.038482666015625,
0.007724761962890625,
0.0338134765625,
-0.012237548828125,
0.0175018310546875,
-0.050323486328125,
-0.01031494140625,
0.064697265625,
0.0103302001953125,
-0.04168701171875,
0.0204315185546875,
-0.0303497314453125,
0.0168609619140625,
0.00885009765625,
-0.049591064453125,
0.0249176025390625,
0.0560302734375,
-0.0249176025390625,
0.017730712890625,
-0.033447265625,
-0.05657958984375,
-0.03936767578125,
0.0167694091796875,
0.046234130859375,
-0.0229949951171875,
-0.01953125,
-0.01486968994140625,
-0.0103302001953125,
0.043426513671875,
-0.0245513916015625,
-0.028167724609375,
0.02264404296875,
0.01348876953125,
0.00687408447265625,
-0.08160400390625,
-0.03033447265625,
-0.05126953125,
0.042144775390625,
0.010955810546875,
-0.025970458984375,
0.0027713775634765625,
-0.0347900390625,
-0.031768798828125,
0.0804443359375,
0.0009775161743164062,
-0.023468017578125,
-0.0204620361328125,
0.0296478271484375,
0.0048980712890625,
-0.008087158203125,
-0.00024008750915527344,
-0.03790283203125,
-0.02020263671875,
0.0012226104736328125,
-0.0023517608642578125,
0.07452392578125,
-0.0298919677734375,
0.034393310546875,
0.017974853515625,
0.040924072265625,
0.023162841796875,
-0.0243072509765625,
0.027099609375,
-0.0259552001953125,
0.037750244140625,
0.0223236083984375,
-0.03594970703125,
-0.0217742919921875,
-0.0048675537109375,
-0.031524658203125,
-0.0047760009765625,
-0.04071044921875,
-0.0243988037109375,
-0.0180816650390625,
0.08837890625,
0.01242828369140625,
0.017333984375,
-0.01021575927734375,
-0.0047760009765625,
0.00469970703125,
-0.043304443359375,
0.0221710205078125,
0.046844482421875,
-0.06689453125,
0.010498046875,
0.0345458984375,
0.0323486328125,
0.011138916015625,
-0.0107574462890625,
0.0305023193359375,
-0.0221099853515625,
0.042327880859375,
-0.0213775634765625,
-0.0030269622802734375,
0.01148223876953125,
0.012176513671875,
0.0050506591796875,
0.033233642578125,
-0.03338623046875,
0.010498046875,
0.01502227783203125,
-0.01288604736328125,
-0.037445068359375,
0.00876617431640625,
0.007415771484375,
0.022735595703125,
0.005886077880859375,
0.0298004150390625,
-0.00782012939453125,
0.0213775634765625,
-0.0220794677734375,
-0.0111541748046875,
0.00860595703125,
-0.02117919921875,
-0.026031494140625,
0.01029205322265625,
-0.0065460205078125,
0.06622314453125,
-0.01055145263671875,
0.005893707275390625,
0.0168304443359375,
0.0004439353942871094,
-0.0109405517578125,
0.007671356201171875,
0.02178955078125,
-0.049774169921875,
0.022491455078125,
-0.016265869140625,
0.004467010498046875,
-0.031494140625,
0.0007257461547851562,
0.0097198486328125,
-0.01348114013671875,
0.01788330078125
] |
0fceb426a1ea646acc8d767009e8cff5612eff58 | Wordpress Stackexchange
Q: How do i upload an image and return the image id? I need to import images from an url and return the image id
is it possible to make a function like this?
<?php
$link = 'https://mosaic01.ztat.net/vgs/media/pdp-zoom/NI/11/3D/03/4D/11/[email protected]';
$title = 'the image title';
$alt = 'the image alt';
$image_id = insert_image($link, $title, $alt);
?>
A: Take a look at side loading images. media_sideload_image()/wp_handle_sideload() and get the ID from the URL. attachment_url_to_postid.
<?php
$url = "http://wordpress.org/about/images/logos/wordpress-logo-stacked-rgb.png";
$title = "Some Image Title";
$alt_text = "Some Alt Text";
require_once(ABSPATH . 'wp-admin/includes/media.php');
require_once(ABSPATH . 'wp-admin/includes/file.php');
require_once(ABSPATH . 'wp-admin/includes/image.php');
// sideload the image --- requires the files above to work correctly
$src = media_sideload_image( $url, null, null, 'src' );
// convert the url to image id
$image_id = attachment_url_to_postid( $src );
if( $image_id ) {
// make sure the post exists
$image = get_post( $image_id );
if( $image) {
// Add title to image
wp_update_post( array (
'ID' => $image->ID,
'post_title' => "Some Image Title",
) );
// Add Alt text to image
update_post_meta($image->ID, '_wp_attachment_image_alt', $alt_text);
}
}
| Q: How do i upload an image and return the image id? I need to import images from an url and return the image id
is it possible to make a function like this?
<?php
$link = 'https://mosaic01.ztat.net/vgs/media/pdp-zoom/NI/11/3D/03/4D/11/[email protected]';
$title = 'the image title';
$alt = 'the image alt';
$image_id = insert_image($link, $title, $alt);
?>
A: Take a look at side loading images. media_sideload_image()/wp_handle_sideload() and get the ID from the URL. attachment_url_to_postid.
<?php
$url = "http://wordpress.org/about/images/logos/wordpress-logo-stacked-rgb.png";
$title = "Some Image Title";
$alt_text = "Some Alt Text";
require_once(ABSPATH . 'wp-admin/includes/media.php');
require_once(ABSPATH . 'wp-admin/includes/file.php');
require_once(ABSPATH . 'wp-admin/includes/image.php');
// sideload the image --- requires the files above to work correctly
$src = media_sideload_image( $url, null, null, 'src' );
// convert the url to image id
$image_id = attachment_url_to_postid( $src );
if( $image_id ) {
// make sure the post exists
$image = get_post( $image_id );
if( $image) {
// Add title to image
wp_update_post( array (
'ID' => $image->ID,
'post_title' => "Some Image Title",
) );
// Add Alt text to image
update_post_meta($image->ID, '_wp_attachment_image_alt', $alt_text);
}
}
A: What id? The HTML ID? If not, maybe you need a regex to search the url in order to find a pattern that you can assign as id. This question are a little confusing, can you give me a plain explain about it?
| wordpress | {
"language": "en",
"length": 217,
"provenance": "stackexchange_00019.jsonl.gz:470578",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247332"
} | [
0.08905029296875,
0.00208282470703125,
0.04986572265625,
-0.01105499267578125,
0.027374267578125,
-0.0238189697265625,
0.09014892578125,
-0.03643798828125,
-0.00182342529296875,
0.030975341796875,
-0.04193115234375,
0.006816864013671875,
-0.043701171875,
-0.004772186279296875,
-0.02789306640625,
-0.052276611328125,
0.03692626953125,
-0.0285797119140625,
0.026275634765625,
0.022064208984375,
-0.0187225341796875,
0.05938720703125,
0.012786865234375,
-0.0090484619140625,
0.0026988983154296875,
-0.0214691162109375,
0.035888671875,
-0.01039886474609375,
-0.007568359375,
-0.0277862548828125,
0.0106353759765625,
0.043670654296875,
0.031585693359375,
-0.0163421630859375,
0.0224151611328125,
0.0396728515625,
0.03961181640625,
-0.01250457763671875,
0.010467529296875,
0.01079559326171875,
0.026885986328125,
-0.00725555419921875,
0.0513916015625,
-0.0023345947265625,
0.00350189208984375,
-0.0125885009765625,
0.017059326171875,
-0.03192138671875,
0.00711822509765625,
0.05303955078125,
0.03564453125,
0.0003104209899902344,
0.032928466796875,
0.0264129638671875,
-0.00811767578125,
-0.0008864402770996094,
-0.0067291259765625,
0.01473236083984375,
0.038604736328125,
0.00910186767578125,
-0.049560546875,
-0.0188446044921875,
0.015716552734375,
-0.0460205078125,
-0.0020275115966796875,
0.01165008544921875,
0.0260772705078125,
0.0163421630859375,
-0.07147216796875,
-0.043731689453125,
0.01392364501953125,
-0.04010009765625,
-0.0173492431640625,
-0.032073974609375,
-0.0191650390625,
0.019317626953125,
0.01531982421875,
-0.0214385986328125,
-0.0104522705078125,
-0.00019931793212890625,
-0.0017538070678710938,
-0.00991058349609375,
-0.060211181640625,
0.0186767578125,
0.0223236083984375,
0.0616455078125,
-0.010345458984375,
-0.03155517578125,
-0.01934814453125,
0.021270751953125,
-0.0245208740234375,
-0.00469207763671875,
0.0168609619140625,
0.0016736984252929688,
-0.024871826171875,
-0.0164947509765625,
0.010986328125,
0.04022216796875,
-0.002445220947265625,
0.045501708984375,
-0.015899658203125,
-0.03704833984375,
0.058349609375,
-0.056640625,
0.00495147705078125,
0.0005946159362792969,
0.00576019287109375,
-0.040863037109375,
0.0017461776733398438,
0.015960693359375,
-0.022735595703125,
0.004688262939453125,
-0.023284912109375,
0.01458740234375,
-0.023529052734375,
0.036285400390625,
-0.042999267578125,
0.00289154052734375,
-0.042724609375,
0.0276031494140625,
-0.0183563232421875,
-0.0050506591796875,
0.01309967041015625,
-0.01088714599609375,
0.0194854736328125,
-0.0019378662109375,
-0.01953125,
-0.0159912109375,
-0.026458740234375,
0.00652313232421875,
-0.05450439453125,
0.034423828125,
0.09735107421875,
0.0169525146484375,
0.016876220703125,
-0.0164947509765625,
0.006160736083984375,
-0.01261138916015625,
-0.0167694091796875,
0.01235198974609375,
0.0168914794921875,
-0.0283050537109375,
-0.0189361572265625,
0.0009407997131347656,
0.0000794529914855957,
0.042022705078125,
-0.00376129150390625,
-0.004192352294921875,
-0.0018892288208007812,
-0.06683349609375,
0.0245361328125,
-0.06390380859375,
0.0159149169921875,
0.0144195556640625,
0.0156402587890625,
-0.00940704345703125,
0.0557861328125,
-0.036102294921875,
0.0068206787109375,
-0.04669189453125,
0.0271453857421875,
0.0129852294921875,
0.032684326171875,
0.004932403564453125,
0.0111236572265625,
-0.0225372314453125,
-0.053619384765625,
-0.0075531005859375,
0.0224151611328125,
0.056640625,
0.0017490386962890625,
-0.00560760498046875,
0.0025081634521484375,
0.020233154296875,
-0.01320648193359375,
0.0002605915069580078,
0.0229339599609375,
0.006439208984375,
0.0011091232299804688,
0.059906005859375,
-0.0028076171875,
-0.0258636474609375,
0.033233642578125,
-0.018402099609375,
-0.03399658203125,
0.04376220703125,
0.0074462890625,
0.048553466796875,
0.01433563232421875,
0.01145172119140625,
0.0267791748046875,
0.02642822265625,
-0.026947021484375,
0.055419921875,
-0.039398193359375,
-0.032684326171875,
-0.015472412109375,
0.0062713623046875,
-0.048614501953125,
0.007686614990234375,
0.015472412109375,
0.00978851318359375,
-0.0004916191101074219,
0.024658203125,
-0.01148223876953125,
-0.005817413330078125,
0.0015554428100585938,
0.003154754638671875,
0.0181427001953125,
0.022918701171875,
0.0034389495849609375,
0.009429931640625,
-0.0277252197265625,
-0.014190673828125,
-0.00992584228515625,
0.015838623046875,
-0.02191162109375,
-0.007625579833984375,
-0.05120849609375,
0.0714111328125,
-0.09332275390625,
-0.00164031982421875,
-0.07794189453125,
0.0247650146484375,
0.0286102294921875,
0.016326904296875,
-0.013214111328125,
-0.00746917724609375,
0.0187225341796875,
0.020477294921875,
-0.0276641845703125,
0.007411956787109375,
0.0120391845703125,
-0.004669189453125,
-0.031158447265625,
-0.01049041748046875,
0.00901031494140625,
-0.0711669921875,
0.0126953125,
0.059600830078125,
0.029449462890625,
0.0230712890625,
0.004314422607421875,
0.0249176025390625,
0.07000732421875,
0.02374267578125,
0.02984619140625,
-0.015411376953125,
-0.01035308837890625,
0.0006814002990722656,
-0.03143310546875,
0.004421234130859375,
0.029876708984375,
-0.04962158203125,
0.0028972625732421875,
0.04876708984375,
-0.0261077880859375,
-0.0271148681640625,
-0.002071380615234375,
0.01483154296875,
0.01032257080078125,
-0.00647735595703125,
0.004131317138671875,
-0.0130462646484375,
-0.005863189697265625,
0.04571533203125,
0.0205078125,
0.029693603515625,
-0.03277587890625,
0.0164642333984375,
0.004474639892578125,
-0.0093231201171875,
-0.00797271728515625,
0.01186370849609375,
0.031402587890625,
-0.002994537353515625,
-0.0150299072265625,
-0.004802703857421875,
-0.0003542900085449219,
-0.00916290283203125,
-0.0243988037109375,
0.0013437271118164062,
0.007251739501953125,
-0.002582550048828125,
-0.0271759033203125,
-0.05450439453125,
0.04962158203125,
0.02117919921875,
-0.005474090576171875,
-0.0089569091796875,
0.01153564453125,
0.04302978515625,
0.008514404296875,
0.021697998046875,
0.00945281982421875,
-0.0029277801513671875,
0.048095703125,
-0.044952392578125,
0.0281219482421875,
-0.0088653564453125,
0.078125,
0.061614990234375,
-0.0154571533203125,
0.0284881591796875,
0.0011663436889648438,
-0.004245758056640625,
-0.0036678314208984375,
0.0269317626953125,
-0.00028228759765625,
-0.0264892578125,
-0.048614501953125,
-0.01003265380859375,
0.00911712646484375,
0.04656982421875,
-0.035125732421875,
-0.061431884765625,
-0.01104736328125,
-0.01248931884765625,
-0.0955810546875,
-0.09527587890625,
-0.007205963134765625,
-0.06390380859375,
-0.0357666015625,
-0.003509521484375,
-0.05364990234375,
0.0248260498046875,
0.01253509521484375,
-0.008758544921875,
-0.0210723876953125,
0.0107269287109375,
-0.06329345703125,
-0.040802001953125,
-0.07073974609375,
-0.0007510185241699219,
-0.0166778564453125,
0.0206451416015625,
0.008514404296875,
-0.0003495216369628906,
0.018310546875,
-0.01837158203125,
0.046844482421875,
0.0784912109375,
-0.0155487060546875,
-0.01396942138671875,
-0.003612518310546875,
-0.029083251953125,
-0.0154266357421875,
-0.0186309814453125,
0.047027587890625,
0.0183563232421875,
-0.0313720703125,
0.027008056640625,
-0.042694091796875,
-0.00433349609375,
-0.022125244140625,
0.00958251953125,
0.05072021484375,
-0.00806427001953125,
0.005702972412109375,
-0.036041259765625,
-0.01158905029296875,
-0.047576904296875,
-0.045867919921875,
0.033355712890625,
0.016937255859375,
0.0206298828125,
-0.025543212890625,
0.03558349609375,
0.0075531005859375,
0.025482177734375,
0.004024505615234375,
-0.021240234375,
0.0222930908203125,
-0.021453857421875,
-0.00502777099609375,
-0.019622802734375,
0.0257568359375,
0.0027923583984375,
-0.01059722900390625,
0.0003387928009033203,
0.043365478515625,
-0.0070953369140625,
-0.004619598388671875,
-0.06549072265625,
-0.033721923828125,
0.061248779296875,
0.0206298828125,
0.036590576171875,
-0.047149658203125,
-0.043121337890625,
-0.047149658203125,
0.0814208984375,
0.0135345458984375,
-0.0321044921875,
-0.0175323486328125,
0.00608062744140625,
-0.0406494140625,
-0.0240020751953125,
-0.01519012451171875,
0.0132598876953125,
-0.03228759765625,
-0.0026798248291015625,
0.000843048095703125,
-0.01922607421875,
0.009246826171875,
-0.0021648406982421875,
-0.006130218505859375,
-0.027130126953125,
0.032379150390625,
-0.002368927001953125,
0.0260162353515625,
0.0479736328125,
-0.004657745361328125,
0.03729248046875,
-0.0225067138671875,
-0.0152740478515625,
-0.0933837890625,
-0.01953125,
0.01438140869140625,
0.061309814453125,
-0.0274200439453125,
0.0164642333984375,
-0.0290374755859375,
0.057220458984375,
-0.0017671585083007812,
-0.00908660888671875,
-0.01788330078125,
0.0150146484375,
-0.0014123916625976562,
-0.0018215179443359375,
-0.0257720947265625,
-0.01128387451171875,
-0.0325927734375,
-0.052215576171875,
-0.05694580078125,
-0.041717529296875,
-0.01309967041015625,
0.00621795654296875,
0.01297760009765625,
-0.01291656494140625,
-0.023956298828125,
-0.00643157958984375,
0.026885986328125,
0.0283355712890625,
0.01300048828125,
-0.0134735107421875,
-0.01053619384765625,
-0.0127716064453125,
0.0256500244140625,
-0.005584716796875,
-0.0238189697265625,
0.01453399658203125,
0.05596923828125,
0.019683837890625,
-0.01479339599609375,
-0.05816650390625,
0.0004892349243164062,
0.0254974365234375,
-0.00604248046875,
0.044464111328125,
0.0266265869140625,
-0.0030727386474609375,
0.026763916015625,
0.004161834716796875,
0.01531982421875,
-0.00737762451171875,
0.039093017578125,
-0.01128387451171875,
-0.0244903564453125,
0.035125732421875,
-0.005222320556640625,
-0.0243988037109375,
0.016998291015625,
-0.032440185546875,
-0.003082275390625,
-0.028350830078125,
0.036407470703125,
-0.04156494140625,
0.05364990234375,
-0.0188446044921875,
-0.052398681640625,
0.0057525634765625,
-0.00701141357421875,
0.0207061767578125,
0.0025577545166015625,
0.00022339820861816406,
0.008026123046875,
0.02227783203125,
-0.003154754638671875,
-0.002689361572265625,
-0.00276947021484375,
-0.0095367431640625,
0.03314208984375,
0.0030059814453125,
-0.0171966552734375,
0.017578125,
0.00843048095703125,
0.0167694091796875,
0.01454925537109375,
-0.01435089111328125,
-0.03302001953125,
0.004558563232421875,
-0.002315521240234375,
-0.024261474609375,
-0.00890350341796875,
0.03466796875,
0.044036865234375,
-0.017608642578125,
-0.0029659271240234375,
-0.01268768310546875,
0.00878143310546875,
-0.046173095703125,
0.01457977294921875,
0.03375244140625,
-0.02783203125,
0.0146636962890625,
0.04620361328125,
-0.03472900390625,
0.022857666015625,
0.002777099609375,
0.0300750732421875,
0.05926513671875,
0.0225982666015625,
0.01015472412109375,
-0.004268646240234375,
-0.025970458984375,
0.033203125,
0.018096923828125,
-0.06341552734375,
0.024261474609375,
0.0265655517578125,
0.06695556640625,
-0.01367950439453125,
-0.07037353515625,
0.0166168212890625,
-0.059112548828125,
-0.04241943359375,
0.0616455078125,
0.0028209686279296875,
-0.06268310546875,
-0.058807373046875,
-0.007602691650390625,
0.05706787109375,
-0.01238250732421875,
-0.016143798828125,
0.003131866455078125,
-0.01617431640625,
0.00623321533203125,
-0.0070953369140625,
-0.042144775390625,
0.0185089111328125,
0.036651611328125,
0.01898193359375,
-0.0179443359375,
-0.03656005859375,
0.07781982421875,
0.0157012939453125,
-0.0297393798828125,
-0.05291748046875,
0.06463623046875,
-0.0201416015625,
-0.00734710693359375,
-0.00811004638671875,
-0.007526397705078125,
-0.0164031982421875,
0.010345458984375,
0.041168212890625,
0.0119476318359375,
0.0078125,
-0.02716064453125,
-0.01030731201171875,
-0.0037899017333984375,
0.04901123046875,
-0.0007677078247070312,
0.0008153915405273438,
-0.01934814453125,
-0.01947021484375,
0.03546142578125,
0.0031871795654296875,
0.039154052734375,
0.0074310302734375,
0.017303466796875,
-0.01885986328125,
0.07012939453125,
0.0085296630859375,
0.0218505859375,
0.0165863037109375,
0.03729248046875,
0.0369873046875,
0.0219879150390625,
-0.0109710693359375,
-0.038360595703125,
-0.0555419921875,
-0.053436279296875,
0.057769775390625,
0.0231781005859375,
0.054351806640625,
0.0295562744140625,
0.0122222900390625,
0.044036865234375,
0.0215301513671875,
-0.0035686492919921875,
-0.0163421630859375,
-0.0112457275390625,
0.0236968994140625,
0.004283905029296875,
0.0020084381103515625,
0.033355712890625,
-0.058441162109375,
-0.025390625,
0.0124359130859375,
0.0240936279296875,
0.01088714599609375,
-0.042022705078125,
-0.01190185546875,
0.038970947265625,
-0.01387786865234375,
0.038909912109375,
0.12103271484375,
-0.0028285980224609375,
0.06317138671875,
0.05242919921875,
0.0031223297119140625,
0.0655517578125,
0.053253173828125,
0.014434814453125,
-0.0242462158203125,
0.048919677734375,
0.0079193115234375,
-0.017303466796875,
0.0222320556640625,
-0.0233154296875,
0.032196044921875,
-0.00457000732421875,
0.058380126953125,
0.0262451171875,
0.0040435791015625,
0.019256591796875,
-0.05877685546875,
0.004550933837890625,
0.01052093505859375,
-0.0164794921875,
-0.03955078125,
0.04144287109375,
-0.03485107421875,
-0.0135345458984375,
-0.0025730133056640625,
-0.01120758056640625,
0.0008225440979003906,
-0.00970458984375,
0.0195465087890625,
0.00501251220703125,
-0.055267333984375,
-0.0223541259765625,
0.047576904296875,
-0.025054931640625,
-0.00995635986328125,
0.0279083251953125,
-0.0192413330078125,
0.01439666748046875,
-0.0305328369140625,
0.0251007080078125,
-0.01800537109375,
0.00494384765625,
0.0292510986328125,
0.020782470703125,
0.046356201171875,
0.03363037109375,
0.0230560302734375,
-0.00015866756439208984,
-0.017547607421875,
0.0208282470703125,
0.031494140625,
-0.01776123046875,
-0.021942138671875,
0.004425048828125,
-0.00933074951171875,
-0.004222869873046875,
-0.018402099609375,
0.006832122802734375,
-0.007747650146484375,
-0.005794525146484375,
0.07086181640625,
-0.0270233154296875,
-0.0180206298828125,
0.0217437744140625,
0.031463623046875,
-0.007030487060546875,
-0.01433563232421875,
0.06097412109375,
-0.06829833984375,
-0.027587890625,
0.0079498291015625,
-0.04193115234375,
-0.051513671875,
-0.051300048828125,
-0.07110595703125,
0.11572265625,
0.0025157928466796875,
0.04376220703125,
0.0265045166015625,
0.03118896484375,
-0.025726318359375,
0.0025501251220703125,
-0.0208282470703125,
0.01151275634765625,
-0.0419921875,
-0.0352783203125,
-0.063232421875,
-0.0030994415283203125,
-0.062347412109375,
0.0263824462890625,
0.0654296875,
0.01175689697265625,
-0.044769287109375,
-0.0117950439453125,
0.04608154296875,
0.043548583984375,
0.011474609375,
0.044281005859375,
-0.015716552734375,
-0.0013456344604492188,
0.042877197265625,
-0.033721923828125,
0.018798828125,
-0.00443267822265625,
-0.00018155574798583984,
0.0208282470703125,
0.0290069580078125,
0.030242919921875,
0.00804901123046875,
0.00894927978515625,
-0.02545166015625,
0.005718231201171875,
0.03857421875,
-0.0225067138671875,
0.054290771484375,
-0.0011053085327148438,
-0.0027828216552734375,
-0.01342010498046875,
0.02142333984375,
-0.008026123046875,
0.046295166015625,
-0.0209808349609375,
0.01416778564453125,
0.02508544921875,
0.0158233642578125,
0.034820556640625,
0.00008922815322875977,
-0.001041412353515625,
0.0228118896484375,
-0.0015439987182617188,
0.041961669921875,
0.0165863037109375,
0.0214691162109375,
-0.058349609375,
0.0191497802734375,
0.06524658203125,
0.06573486328125,
-0.048492431640625,
-0.01552581787109375,
0.006595611572265625,
0.00021946430206298828,
0.01226806640625,
-0.0217132568359375,
0.03515625,
-0.0677490234375,
-0.046173095703125,
-0.0120086669921875,
0.0237274169921875,
0.04974365234375,
0.0390625,
0.02374267578125,
0.01275634765625,
-0.09503173828125,
0.0014925003051757812,
-0.039825439453125,
0.0294189453125,
0.014617919921875,
0.023345947265625,
-0.01509857177734375,
0.0224151611328125,
0.0019502639770507812,
0.00923919677734375,
0.00415802001953125,
0.0313720703125,
0.0004725456237792969,
0.006072998046875,
-0.0174407958984375,
-0.054290771484375,
0.001861572265625,
0.0225830078125,
0.005542755126953125,
0.021514892578125,
0.043792724609375,
0.0072479248046875,
-0.07342529296875,
-0.0068511962890625,
0.04443359375,
-0.027313232421875,
0.0223846435546875,
-0.04345703125,
0.0243072509765625,
0.02447509765625,
-0.0100250244140625,
0.0095977783203125,
-0.036590576171875,
0.0654296875,
-0.00811004638671875,
0.04913330078125,
-0.013641357421875,
-0.006351470947265625,
0.0258636474609375,
-0.01557159423828125,
0.058837890625,
0.0024356842041015625,
-0.07806396484375,
-0.0006151199340820312,
-0.0287933349609375,
-0.044525146484375,
0.00922393798828125,
0.01428985595703125,
-0.036224365234375,
0.055267333984375,
-0.00714111328125,
-0.0101470947265625,
0.01375579833984375,
-0.003940582275390625,
0.0145263671875,
0.013946533203125,
0.0167083740234375,
-0.005779266357421875,
-0.033416748046875,
-0.0158233642578125,
-0.015655517578125,
0.036224365234375,
0.048187255859375,
-0.00969696044921875,
0.014129638671875,
0.04534912109375,
0.0149078369140625,
-0.01229095458984375,
-0.0311431884765625,
0.0176849365234375,
-0.0267791748046875,
-0.041534423828125,
-0.006221771240234375,
0.007106781005859375,
0.0011272430419921875,
0.022247314453125,
0.0220184326171875,
-0.005832672119140625,
-0.028228759765625,
-0.002063751220703125,
0.0263519287109375,
0.039520263671875,
0.0180206298828125,
-0.01885986328125,
-0.005611419677734375,
-0.028594970703125,
-0.00864410400390625,
0.049285888671875,
0.0227813720703125,
-0.030670166015625,
0.01226806640625,
0.0016021728515625,
-0.0175323486328125,
0.0189361572265625,
-0.03173828125,
0.020660400390625,
0.0293731689453125,
-0.0210723876953125,
-0.032623291015625,
0.01131439208984375,
-0.00438690185546875,
-0.00751495361328125,
0.01959228515625,
0.051971435546875,
0.0116424560546875,
-0.02166748046875,
0.06396484375,
0.0186614990234375,
0.0428466796875,
-0.033294677734375,
-0.009735107421875,
0.037109375,
0.00579833984375,
-0.01361846923828125,
-0.0159759521484375,
-0.01174163818359375,
-0.070556640625,
-0.0203857421875,
0.00527191162109375,
-0.035552978515625,
0.00823974609375,
0.02105712890625,
-0.011993408203125,
0.0249786376953125,
0.00537109375,
-0.03045654296875,
0.004383087158203125,
-0.00506591796875,
0.01419830322265625,
0.0003902912139892578,
0.01116943359375,
-0.0103302001953125,
0.018341064453125,
-0.0377197265625,
-0.056243896484375,
-0.0455322265625,
0.027984619140625,
-0.05108642578125,
0.02593994140625,
0.041717529296875,
-0.046600341796875,
0.005191802978515625,
0.021636962890625,
0.036163330078125,
0.08160400390625,
-0.0288238525390625,
-0.02587890625,
-0.0013399124145507812,
0.0241851806640625,
0.0019168853759765625,
-0.051971435546875,
0.0001341104507446289,
-0.039520263671875,
-0.001255035400390625,
-0.0582275390625,
0.02703857421875,
0.0174102783203125,
-0.040740966796875,
-0.048553466796875,
0.0275421142578125,
-0.0249786376953125,
-0.032318115234375,
-0.0193939208984375,
0.011932373046875,
-0.004058837890625,
0.0238494873046875,
0.013153076171875,
-0.038330078125,
-0.00905609130859375,
0.010528564453125,
0.0101470947265625,
-0.02520751953125,
0.03619384765625,
-0.003337860107421875,
-0.0487060546875,
0.00624847412109375,
0.0006880760192871094,
-0.00978851318359375,
0.037078857421875,
-0.05987548828125,
0.062347412109375,
0.0289764404296875,
-0.037933349609375,
-0.0002961158752441406,
0.01334381103515625,
-0.0018711090087890625,
-0.039642333984375,
-0.046783447265625,
0.01120758056640625,
0.028472900390625,
0.06341552734375,
0.07464599609375,
0.01050567626953125,
-0.07196044921875,
0.026519775390625,
0.0012969970703125,
-0.0286102294921875,
-0.0070037841796875,
0.011627197265625,
-0.04931640625,
-0.03912353515625,
0.014678955078125,
-0.01348876953125,
0.0157012939453125,
-0.02099609375,
-0.048431396484375,
-0.008331298828125,
-0.01134490966796875,
-0.0174560546875,
-0.056243896484375,
0.031402587890625,
0.064208984375,
-0.041656494140625,
0.033111572265625,
-0.01904296875,
0.00283050537109375,
0.04364013671875,
-0.048187255859375,
-0.0178070068359375,
0.0247039794921875,
-0.003398895263671875,
0.0117645263671875,
0.00952911376953125,
-0.01456451416015625,
0.01373291015625,
0.01702880859375,
0.0085601806640625,
0.004459381103515625,
-0.0170745849609375,
-0.0009784698486328125,
0.02142333984375,
-0.0029926300048828125,
-0.035736083984375,
0.058807373046875,
-0.038360595703125,
0.041229248046875,
0.006671905517578125,
-0.0018091201782226562,
-0.049713134765625,
0.0265960693359375,
0.0079803466796875,
-0.04827880859375,
0.011749267578125,
-0.003917694091796875,
-0.0042877197265625,
-0.0208892822265625,
0.004665374755859375,
-0.00949859619140625,
-0.0199737548828125,
0.0008749961853027344
] |
9bb5f62db2f9c0050cea2354c80f5d38ce1c5e7e | Wordpress Stackexchange
Q: Different template for subcategories I would like to have a different template for categories and subcategories
The categories template is set in categories.php
is it somehow possible to load the subcategories template from subcategories.php or something like that?
A: I have edited your code to add more functionality. For cases where someone would want to have a different template for each child category. For example if you have categories ordered like this:
*
*continent
*
*country
*
*city
And you need a different template for city. First we look if city has a child, if not we call the template for city. The rest of code is to check if a category has a parent.
// Different template for subcategories
function wpd_subcategory_template( $template ) {
$cat = get_queried_object();
$children = get_terms( $cat->taxonomy, array(
'parent' => $cat->term_id,
'hide_empty' => false
) );
if( ! $children ) {
$template = locate_template( 'category-country-city.php' );
} elseif( 0 < $cat->category_parent ) {
$template = locate_template( 'category-country.php' );
}
return $template;
}
add_filter( 'category_template', 'wpd_subcategory_template' );
| Q: Different template for subcategories I would like to have a different template for categories and subcategories
The categories template is set in categories.php
is it somehow possible to load the subcategories template from subcategories.php or something like that?
A: I have edited your code to add more functionality. For cases where someone would want to have a different template for each child category. For example if you have categories ordered like this:
*
*continent
*
*country
*
*city
And you need a different template for city. First we look if city has a child, if not we call the template for city. The rest of code is to check if a category has a parent.
// Different template for subcategories
function wpd_subcategory_template( $template ) {
$cat = get_queried_object();
$children = get_terms( $cat->taxonomy, array(
'parent' => $cat->term_id,
'hide_empty' => false
) );
if( ! $children ) {
$template = locate_template( 'category-country-city.php' );
} elseif( 0 < $cat->category_parent ) {
$template = locate_template( 'category-country.php' );
}
return $template;
}
add_filter( 'category_template', 'wpd_subcategory_template' );
A: The template hierarchy has filters for all types of templates. Here we can use category_template, check if the current category has a parent, and load the subcategory.php file in that case:
function wpd_subcategory_template( $template ) {
$cat = get_queried_object();
if ( isset( $cat ) && $cat->category_parent ) {
$template = locate_template( 'subcategory.php' );
}
return $template;
}
add_filter( 'category_template', 'wpd_subcategory_template' );
| wordpress | {
"language": "en",
"length": 234,
"provenance": "stackexchange_00019.jsonl.gz:470590",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247367"
} | [
0.00508880615234375,
0.006298065185546875,
-0.0168304443359375,
-0.04296875,
0.026214599609375,
-0.0213165283203125,
0.0222320556640625,
-0.0144195556640625,
-0.0211029052734375,
0.0132598876953125,
-0.03759765625,
-0.00911712646484375,
0.00661468505859375,
-0.003833770751953125,
-0.00814056396484375,
-0.0509033203125,
0.0199432373046875,
-0.033721923828125,
-0.00652313232421875,
-0.006916046142578125,
0.003692626953125,
0.00984954833984375,
-0.01279449462890625,
0.047332763671875,
0.0105438232421875,
-0.058349609375,
0.0849609375,
-0.022430419921875,
0.00043487548828125,
-0.041656494140625,
0.0203399658203125,
0.0286712646484375,
0.0194091796875,
0.022796630859375,
-0.039337158203125,
-0.003139495849609375,
0.01291656494140625,
0.003704071044921875,
-0.00848388671875,
0.041900634765625,
0.010406494140625,
-0.01285552978515625,
0.06549072265625,
0.032806396484375,
0.020538330078125,
-0.02960205078125,
0.033355712890625,
-0.0657958984375,
0.0191497802734375,
-0.0016078948974609375,
0.034149169921875,
-0.00939178466796875,
0.043670654296875,
-0.0261383056640625,
-0.017303466796875,
0.0171661376953125,
-0.027801513671875,
0.042724609375,
0.039581298828125,
0.0148162841796875,
-0.0401611328125,
0.0002455711364746094,
-0.0016050338745117188,
-0.042236328125,
-0.027374267578125,
0.002994537353515625,
0.0230560302734375,
0.006198883056640625,
-0.01258087158203125,
-0.01165771484375,
0.0163421630859375,
-0.01212310791015625,
0.0186767578125,
-0.032806396484375,
-0.0303497314453125,
-0.03125,
0.0484619140625,
-0.013824462890625,
0.0006289482116699219,
-0.03057861328125,
-0.0016651153564453125,
-0.0065765380859375,
-0.031951904296875,
-0.034881591796875,
0.03460693359375,
0.00042724609375,
-0.0036792755126953125,
-0.00873565673828125,
-0.06402587890625,
-0.02264404296875,
-0.0430908203125,
-0.0694580078125,
-0.041534423828125,
0.0058441162109375,
-0.0038127899169921875,
-0.007221221923828125,
-0.007305145263671875,
0.05682373046875,
-0.033905029296875,
-0.0031719207763671875,
-0.0175018310546875,
0.0022296905517578125,
-0.0325927734375,
-0.036529541015625,
0.00879669189453125,
0.0184478759765625,
0.0034465789794921875,
0.00025343894958496094,
0.049591064453125,
0.038604736328125,
0.01178741455078125,
0.07257080078125,
0.0233612060546875,
-0.0421142578125,
-0.0164794921875,
0.023773193359375,
0.014495849609375,
0.00348663330078125,
0.029022216796875,
-0.0098876953125,
0.0222015380859375,
0.0513916015625,
0.044586181640625,
-0.016815185546875,
0.0182952880859375,
0.0229644775390625,
-0.0120697021484375,
-0.08544921875,
0.0157470703125,
-0.05877685546875,
-0.043182373046875,
0.0299530029296875,
0.06890869140625,
0.0538330078125,
0.0312347412109375,
0.006023406982421875,
0.01043701171875,
0.0075836181640625,
0.0223541259765625,
-0.028472900390625,
0.02001953125,
0.01212310791015625,
0.00017547607421875,
-0.00011849403381347656,
0.005584716796875,
-0.00424957275390625,
0.01093292236328125,
0.029296875,
0.0037021636962890625,
-0.009765625,
0.0286865234375,
-0.058013916015625,
0.0489501953125,
0.002567291259765625,
-0.0352783203125,
-0.037841796875,
0.0198211669921875,
-0.037933349609375,
-0.020416259765625,
-0.065185546875,
-0.005245208740234375,
-0.00554656982421875,
0.032958984375,
-0.04962158203125,
-0.039886474609375,
0.0170135498046875,
-0.048492431640625,
-0.00876617431640625,
0.0241851806640625,
0.006999969482421875,
0.05303955078125,
-0.00555419921875,
-0.02899169921875,
0.01308441162109375,
0.0128173828125,
0.006450653076171875,
-0.033905029296875,
0.005359649658203125,
0.021453857421875,
0.0179443359375,
-0.010009765625,
-0.042816162109375,
-0.0229034423828125,
0.024627685546875,
-0.049346923828125,
0.01517486572265625,
0.0123748779296875,
0.0302886962890625,
0.00814056396484375,
0.0204620361328125,
0.021881103515625,
0.026641845703125,
-0.082275390625,
0.0711669921875,
0.006633758544921875,
-0.02520751953125,
-0.05450439453125,
0.0022258758544921875,
-0.00836944580078125,
-0.056427001953125,
0.0037555694580078125,
-0.00934600830078125,
-0.0011777877807617188,
0.004291534423828125,
-0.0120391845703125,
-0.01219940185546875,
-0.005260467529296875,
0.0206298828125,
-0.0157012939453125,
0.012725830078125,
-0.0029239654541015625,
-0.039031982421875,
0.004913330078125,
-0.042999267578125,
-0.02099609375,
0.0011205673217773438,
0.0003802776336669922,
-0.0070037841796875,
-0.003871917724609375,
-0.0136871337890625,
0.00089263916015625,
0.007038116455078125,
-0.006439208984375,
0.02581787109375,
0.047882080078125,
-0.002429962158203125,
-0.0299835205078125,
-0.0183258056640625,
-0.0206756591796875,
0.0654296875,
-0.1539306640625,
0.0242156982421875,
0.0246429443359375,
0.03143310546875,
-0.042205810546875,
0.0116729736328125,
-0.0007166862487792969,
0.0223236083984375,
-0.028411865234375,
0.0278472900390625,
0.026702880859375,
-0.0019216537475585938,
-0.0218505859375,
-0.0165252685546875,
0.06982421875,
-0.0015611648559570312,
0.004486083984375,
-0.02374267578125,
-0.0240325927734375,
-0.006275177001953125,
-0.01369476318359375,
0.00591278076171875,
0.0288848876953125,
-0.024566650390625,
0.00746917724609375,
0.0305938720703125,
-0.00202178955078125,
-0.025970458984375,
0.0511474609375,
0.0065155029296875,
0.023345947265625,
0.05126953125,
-0.0196075439453125,
0.024688720703125,
0.06744384765625,
-0.01454925537109375,
0.0237884521484375,
0.0017328262329101562,
-0.0155792236328125,
-0.0009303092956542969,
0.013671875,
-0.04571533203125,
0.00861358642578125,
0.0291290283203125,
-0.00933837890625,
0.05694580078125,
-0.0303192138671875,
-0.01641845703125,
0.0204925537109375,
0.0307464599609375,
-0.00034117698669433594,
0.08538818359375,
-0.01181793212890625,
-0.01148223876953125,
-0.0543212890625,
-0.0667724609375,
-0.01776123046875,
0.026947021484375,
-0.0092620849609375,
0.01320648193359375,
0.03125,
0.024383544921875,
-0.000027179718017578125,
0.00688934326171875,
-0.006465911865234375,
-0.0021228790283203125,
0.053436279296875,
-0.02935791015625,
0.0477294921875,
-0.03704833984375,
0.0127105712890625,
0.04095458984375,
-0.014068603515625,
0.00914764404296875,
-0.00632476806640625,
0.00797271728515625,
0.024322509765625,
-0.01129913330078125,
-0.021484375,
-0.020660400390625,
-0.00969696044921875,
0.0191802978515625,
0.0205078125,
0.044158935546875,
0.0006008148193359375,
-0.0175628662109375,
0.020751953125,
0.020843505859375,
0.02227783203125,
-0.00858306884765625,
-0.0115203857421875,
0.0243072509765625,
0.0408935546875,
0.01377105712890625,
0.0268096923828125,
-0.04888916015625,
0.005199432373046875,
0.0095977783203125,
0.05712890625,
-0.05389404296875,
-0.06085205078125,
-0.04241943359375,
-0.06622314453125,
-0.0350341796875,
-0.00017321109771728516,
-0.0189056396484375,
-0.00006574392318725586,
0.0767822265625,
0.01340484619140625,
-0.043914794921875,
-0.00432586669921875,
0.047515869140625,
-0.00788116455078125,
0.0016775131225585938,
0.025970458984375,
-0.051116943359375,
0.0372314453125,
0.005184173583984375,
0.0006804466247558594,
0.0321044921875,
-0.01352691650390625,
-0.0173187255859375,
-0.005748748779296875,
0.0205841064453125,
0.024078369140625,
0.0021953582763671875,
-0.002105712890625,
0.0149993896484375,
0.00463104248046875,
-0.034942626953125,
-0.05108642578125,
-0.03240966796875,
-0.053955078125,
0.07305908203125,
0.041412353515625,
0.00560760498046875,
0.013458251953125,
0.0217742919921875,
0.01256561279296875,
-0.007305145263671875,
-0.01070404052734375,
-0.032440185546875,
0.040252685546875,
0.0172882080078125,
0.0250091552734375,
-0.007747650146484375,
-0.017486572265625,
-0.04248046875,
-0.0015287399291992188,
-0.0218048095703125,
-0.03070068359375,
-0.0174560546875,
0.00830841064453125,
0.0217437744140625,
-0.078857421875,
0.0662841796875,
-0.032073974609375,
-0.0230865478515625,
-0.050140380859375,
-0.0259857177734375,
-0.00032830238342285156,
0.08172607421875,
-0.0374755859375,
-0.0279541015625,
0.002574920654296875,
0.0088653564453125,
-0.005725860595703125,
-0.0014200210571289062,
-0.025970458984375,
-0.01177215576171875,
-0.056427001953125,
0.014862060546875,
-0.0177459716796875,
-0.0253143310546875,
-0.0022258758544921875,
-0.004505157470703125,
-0.0203399658203125,
-0.036529541015625,
0.02789306640625,
-0.007030487060546875,
-0.0240325927734375,
-0.00669097900390625,
-0.01580810546875,
-0.0269317626953125,
0.0021686553955078125,
-0.01654052734375,
-0.005008697509765625,
0.0005030632019042969,
-0.0016088485717773438,
-0.0187225341796875,
0.0198516845703125,
-0.05322265625,
0.01806640625,
0.02972412109375,
0.0110015869140625,
-0.018707275390625,
0.0155487060546875,
0.01593017578125,
-0.027130126953125,
0.005352020263671875,
-0.0004458427429199219,
-0.0220184326171875,
-0.01629638671875,
-0.03070068359375,
-0.026641845703125,
0.015411376953125,
-0.0257110595703125,
0.0325927734375,
-0.004215240478515625,
-0.00476837158203125,
-0.044403076171875,
-0.046142578125,
-0.0307769775390625,
-0.01378631591796875,
-0.0100250244140625,
-0.01506805419921875,
-0.032989501953125,
-0.045166015625,
0.045135498046875,
0.04010009765625,
-0.0278778076171875,
0.0215911865234375,
0.0372314453125,
0.003559112548828125,
-0.048797607421875,
-0.0809326171875,
-0.0052490234375,
0.023101806640625,
-0.018310546875,
0.03973388671875,
0.0192108154296875,
-0.010162353515625,
0.031036376953125,
0.002185821533203125,
0.01459503173828125,
-0.01410675048828125,
0.08154296875,
-0.00562286376953125,
-0.023956298828125,
0.03619384765625,
-0.006870269775390625,
-0.024566650390625,
0.0010499954223632812,
-0.0004763603210449219,
-0.0386962890625,
-0.02587890625,
0.0513916015625,
0.044647216796875,
-0.00839996337890625,
-0.06329345703125,
-0.00720977783203125,
0.007328033447265625,
0.0223541259765625,
0.0216522216796875,
0.0235748291015625,
-0.00519561767578125,
-0.019500732421875,
-0.0223846435546875,
-0.0114898681640625,
0.003208160400390625,
0.005706787109375,
0.00998687744140625,
0.021484375,
-0.0005993843078613281,
-0.00482177734375,
-0.0263214111328125,
0.006526947021484375,
-0.005306243896484375,
0.0085296630859375,
0.0014905929565429688,
-0.0372314453125,
0.010650634765625,
0.00862884521484375,
-0.00186920166015625,
-0.0340576171875,
0.0173797607421875,
0.0093994140625,
0.01129150390625,
0.03314208984375,
-0.0462646484375,
-0.0059967041015625,
-0.0183868408203125,
-0.0219268798828125,
0.001331329345703125,
-0.0235595703125,
0.0137481689453125,
0.0120697021484375,
-0.037689208984375,
0.01092529296875,
0.0075225830078125,
0.0179443359375,
0.0165557861328125,
0.02166748046875,
0.023529052734375,
-0.0024471282958984375,
0.007755279541015625,
-0.0018167495727539062,
0.0238800048828125,
-0.03179931640625,
-0.0269012451171875,
0.0081939697265625,
0.043182373046875,
-0.020050048828125,
-0.0108184814453125,
0.0215301513671875,
-0.0282135009765625,
-0.00319671630859375,
-0.017852783203125,
-0.01369476318359375,
-0.0037555694580078125,
-0.019439697265625,
-0.0159149169921875,
0.0090179443359375,
0.0113525390625,
-0.0167999267578125,
0.006717681884765625,
-0.050079345703125,
-0.000014424324035644531,
0.0207366943359375,
-0.03717041015625,
-0.0005588531494140625,
-0.00676727294921875,
-0.07879638671875,
0.005889892578125,
0.040985107421875,
-0.03948974609375,
-0.05828857421875,
-0.005126953125,
-0.0245819091796875,
0.036224365234375,
-0.0236663818359375,
0.03887939453125,
-0.004398345947265625,
-0.0197296142578125,
0.00775909423828125,
0.02301025390625,
0.02691650390625,
0.022369384765625,
-0.0548095703125,
0.0140838623046875,
-0.0640869140625,
-0.0160675048828125,
-0.08258056640625,
-0.07598876953125,
-0.05670166015625,
0.014312744140625,
-0.01230621337890625,
0.0030765533447265625,
-0.0054168701171875,
0.0161285400390625,
-0.03460693359375,
0.022735595703125,
0.02325439453125,
0.0240478515625,
-0.0399169921875,
0.10009765625,
0.01258087158203125,
0.007717132568359375,
-0.0093994140625,
0.0187225341796875,
-0.0306396484375,
0.0216064453125,
-0.0293121337890625,
-0.06256103515625,
0.017578125,
0.004596710205078125,
-0.019561767578125,
0.0482177734375,
0.070068359375,
0.0157928466796875,
0.0623779296875,
-0.03839111328125,
0.0020389556884765625,
-0.0098876953125,
-0.0141754150390625,
-0.058746337890625,
0.027008056640625,
0.019561767578125,
-0.01413726806640625,
0.0269012451171875,
0.004428863525390625,
-0.022552490234375,
0.0294189453125,
-0.0137939453125,
0.014068603515625,
0.01373291015625,
-0.0309600830078125,
0.04986572265625,
0.0283966064453125,
-0.008941650390625,
0.02337646484375,
-0.0025005340576171875,
0.017730712890625,
-0.00698089599609375,
0.0015869140625,
0.040557861328125,
-0.0022602081298828125,
0.0584716796875,
0.003490447998046875,
-0.0179901123046875,
0.0377197265625,
-0.032958984375,
-0.027313232421875,
0.022308349609375,
-0.0021800994873046875,
-0.05029296875,
-0.0027923583984375,
-0.01165008544921875,
0.02471923828125,
-0.01528167724609375,
0.021575927734375,
-0.051116943359375,
-0.03265380859375,
0.00911712646484375,
-0.0438232421875,
-0.0399169921875,
-0.0024566650390625,
0.0294647216796875,
-0.030487060546875,
-0.0140228271484375,
0.03704833984375,
0.033111572265625,
0.01369476318359375,
0.028411865234375,
-0.023193359375,
0.043670654296875,
0.0006046295166015625,
0.0303955078125,
-0.031494140625,
0.0050506591796875,
-0.00011914968490600586,
0.0282135009765625,
-0.00914764404296875,
0.00641632080078125,
-0.01107025146484375,
-0.036895751953125,
0.0177154541015625,
0.032562255859375,
-0.0269317626953125,
0.006748199462890625,
-0.0009293556213378906,
-0.0259552001953125,
0.032745361328125,
-0.0025730133056640625,
-0.022186279296875,
-0.0016689300537109375,
-0.0546875,
-0.0129547119140625,
-0.04107666015625,
0.03863525390625,
-0.003849029541015625,
0.004016876220703125,
0.04364013671875,
0.0021038055419921875,
-0.033203125,
0.042449951171875,
0.024322509765625,
-0.0192718505859375,
0.03521728515625,
0.0272369384765625,
-0.01593017578125,
-0.0394287109375,
0.035614013671875,
-0.04486083984375,
-0.00905609130859375,
0.027618408203125,
-0.08807373046875,
0.043731689453125,
-0.01195526123046875,
0.059600830078125,
0.007549285888671875,
-0.00567626953125,
-0.002117156982421875,
-0.0114898681640625,
-0.0189361572265625,
0.04656982421875,
0.050201416015625,
0.01488494873046875,
0.0131378173828125,
0.003997802734375,
0.01349639892578125,
0.032989501953125,
0.0374755859375,
0.0003464221954345703,
0.0166778564453125,
0.0176849365234375,
0.046539306640625,
-0.012359619140625,
-0.0445556640625,
0.035430908203125,
-0.0262298583984375,
-0.031829833984375,
-0.01436614990234375,
-0.0278472900390625,
0.0171661376953125,
-0.035308837890625,
-0.0189361572265625,
-0.0147705078125,
0.030242919921875,
0.052001953125,
-0.01123809814453125,
0.00937652587890625,
0.004669189453125,
-0.0164642333984375,
0.007144927978515625,
-0.049774169921875,
0.031280517578125,
0.009246826171875,
0.0247955322265625,
-0.03851318359375,
0.026275634765625,
-0.0256805419921875,
0.0538330078125,
0.01053619384765625,
0.00780487060546875,
0.02099609375,
0.006656646728515625,
0.06915283203125,
-0.01102447509765625,
-0.0008702278137207031,
0.0229339599609375,
-0.0038471221923828125,
0.03521728515625,
0.013214111328125,
0.0277099609375,
-0.0272216796875,
0.03326416015625,
0.05377197265625,
0.034637451171875,
-0.04266357421875,
-0.048797607421875,
0.0126953125,
-0.0003573894500732422,
-0.0015869140625,
0.00855255126953125,
0.00948333740234375,
0.004802703857421875,
0.038665771484375,
-0.0235595703125,
-0.0171661376953125,
0.01300048828125,
0.0196380615234375,
0.007965087890625,
0.01043701171875,
0.0033931732177734375,
-0.0194091796875,
-0.03741455078125,
0.005725860595703125,
0.0330810546875,
0.0687255859375,
-0.00035762786865234375,
0.0740966796875,
-0.04376220703125,
-0.0377197265625,
0.00827789306640625,
-0.0231170654296875,
-0.006565093994140625,
-0.0309295654296875,
0.006946563720703125,
-0.015625,
0.00785064697265625,
0.0279388427734375,
-0.002288818359375,
-0.00849151611328125,
0.058258056640625,
0.04473876953125,
-0.039886474609375,
-0.0211334228515625,
0.0197296142578125,
-0.021636962890625,
0.0251922607421875,
-0.040313720703125,
-0.01050567626953125,
-0.0037097930908203125,
-0.0269775390625,
-0.0004222393035888672,
-0.01325225830078125,
0.04888916015625,
-0.033935546875,
0.045379638671875,
-0.01502227783203125,
-0.031707763671875,
0.04498291015625,
-0.01488494873046875,
0.081787109375,
0.0013322830200195312,
-0.1129150390625,
-0.016937255859375,
-0.046417236328125,
-0.047515869140625,
0.06103515625,
0.046417236328125,
-0.028961181640625,
0.01812744140625,
0.018035888671875,
-0.0213775634765625,
-0.016326904296875,
0.01381683349609375,
0.0221710205078125,
-0.04193115234375,
0.0039520263671875,
-0.01174163818359375,
-0.027374267578125,
-0.031005859375,
-0.0188751220703125,
0.04638671875,
0.0199737548828125,
0.07305908203125,
-0.024383544921875,
0.025787353515625,
-0.0263214111328125,
0.052215576171875,
-0.06658935546875,
-0.04498291015625,
0.08624267578125,
-0.03570556640625,
-0.0200958251953125,
0.0014820098876953125,
-0.026031494140625,
0.005054473876953125,
0.030487060546875,
-0.0258026123046875,
0.00585174560546875,
-0.0223388671875,
0.016693115234375,
-0.0263671875,
0.0258941650390625,
-0.0011510848999023438,
-0.027130126953125,
-0.04443359375,
-0.00034356117248535156,
0.0396728515625,
0.11370849609375,
0.01263427734375,
0.0295257568359375,
-0.0303955078125,
-0.022613525390625,
0.0253753662109375,
-0.01230621337890625,
0.0162200927734375,
0.0260162353515625,
-0.06561279296875,
-0.01629638671875,
0.051971435546875,
-0.00551605224609375,
0.04034423828125,
-0.002620697021484375,
0.05328369140625,
0.036376953125,
-0.059112548828125,
-0.00264739990234375,
-0.018463134765625,
-0.007701873779296875,
-0.059478759765625,
-0.0156402587890625,
0.034210205078125,
-0.0094757080078125,
-0.0155792236328125,
-0.04730224609375,
-0.031494140625,
-0.01433563232421875,
0.0088958740234375,
0.0252685546875,
0.022613525390625,
-0.03070068359375,
-0.0255279541015625,
-0.025360107421875,
0.0546875,
0.0316162109375,
-0.05426025390625,
-0.0019168853759765625,
0.009735107421875,
0.06011962890625,
0.0267791748046875,
-0.038330078125,
0.002902984619140625,
-0.0206451416015625,
-0.0107879638671875,
0.04632568359375,
-0.0570068359375,
-0.04510498046875,
0.01218414306640625,
0.017608642578125,
0.0266876220703125,
-0.020263671875,
0.009124755859375,
0.0269012451171875,
0.0192413330078125,
0.08197021484375,
-0.01548004150390625,
-0.0234222412109375,
0.003292083740234375,
0.0003542900085449219,
-0.02203369140625,
0.0102691650390625,
0.021453857421875,
0.0008840560913085938,
-0.034942626953125,
-0.01212310791015625,
0.0121917724609375,
0.0413818359375,
-0.044189453125,
-0.09674072265625,
0.061981201171875,
-0.039031982421875,
-0.04052734375,
-0.00885772705078125,
0.0059356689453125,
-0.03155517578125,
0.0224456787109375,
0.01250457763671875,
-0.0294647216796875,
0.01934814453125,
0.039825439453125,
0.0303802490234375,
-0.002719879150390625,
0.03851318359375,
-0.01371002197265625,
-0.042144775390625,
0.0161285400390625,
0.01203155517578125,
0.0282440185546875,
-0.034332275390625,
-0.0024261474609375,
-0.0081329345703125,
0.01371002197265625,
-0.0245361328125,
-0.05426025390625,
0.0274658203125,
0.026031494140625,
0.0213623046875,
-0.00861358642578125,
-0.04193115234375,
-0.003337860107421875,
0.0526123046875,
0.03289794921875,
0.0246734619140625,
-0.0287628173828125,
-0.00914764404296875,
-0.039276123046875,
-0.043609619140625,
-0.0171356201171875,
0.034637451171875,
-0.07464599609375,
0.00878143310546875,
0.028839111328125,
-0.01004791259765625,
-0.004383087158203125,
0.015289306640625,
-0.0218048095703125,
0.0016641616821289062,
0.030120849609375,
-0.006763458251953125,
-0.056182861328125,
0.05267333984375,
0.006977081298828125,
-0.03936767578125,
-0.037811279296875,
-0.0201568603515625,
-0.005466461181640625,
-0.047149658203125,
-0.07037353515625,
-0.034149169921875,
0.042327880859375,
-0.056610107421875,
-0.02239990234375,
0.0009365081787109375,
0.003597259521484375,
-0.0081024169921875,
0.038909912109375,
-0.0302886962890625,
0.0033512115478515625,
0.01023101806640625,
-0.0150604248046875,
-0.021514892578125,
0.062744140625,
0.025360107421875,
0.06768798828125,
0.01287078857421875,
0.0289459228515625,
-0.0175323486328125,
0.052703857421875,
-0.01080322265625,
-0.0184783935546875,
-0.0216217041015625,
-0.0026302337646484375,
-0.0003809928894042969,
0.0157470703125,
-0.0027828216552734375,
-0.034576416015625,
0.0125885009765625,
-0.005237579345703125,
0.006229400634765625,
0.01052093505859375
] |
693892ae4381d3960fb7ef83c66fef4d119603db | Wordpress Stackexchange
Q: Filter on the_content ignores shortcodes My function only affects the Page content and not the page content from the posts in page plugin which I call with a shortcode in the page.
My plugin function
add_filter('the_content', 'modify_tables', 10, 1);
function modify_tables($content) {
//modifications...
return $content;
} // function modify_tables
My template code to ouput page
while (have_posts()) : the_post();
the_content();
endwhile;
A: Unmodified do_shortcode is effectively a filter on the_content with priority 11. Your filter has priority 10. So it runs before the shortcode is evaluated and it won't affect the post you put inside your page with a shortcode.
Now, you would think that the filter should also be triggered when the post inside the page is retrieved. This, however, is not necessarily true. The filter is only triggered when the content is retrieved with the_content, not with get_the_content.
Depending on what your modifications are, you may get the desired result if you set the priority on your filter to 99 or so, forcing the shortcode to be evaluated before the filter is applied.
| Q: Filter on the_content ignores shortcodes My function only affects the Page content and not the page content from the posts in page plugin which I call with a shortcode in the page.
My plugin function
add_filter('the_content', 'modify_tables', 10, 1);
function modify_tables($content) {
//modifications...
return $content;
} // function modify_tables
My template code to ouput page
while (have_posts()) : the_post();
the_content();
endwhile;
A: Unmodified do_shortcode is effectively a filter on the_content with priority 11. Your filter has priority 10. So it runs before the shortcode is evaluated and it won't affect the post you put inside your page with a shortcode.
Now, you would think that the filter should also be triggered when the post inside the page is retrieved. This, however, is not necessarily true. The filter is only triggered when the content is retrieved with the_content, not with get_the_content.
Depending on what your modifications are, you may get the desired result if you set the priority on your filter to 99 or so, forcing the shortcode to be evaluated before the filter is applied.
| wordpress | {
"language": "en",
"length": 176,
"provenance": "stackexchange_00019.jsonl.gz:470593",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247375"
} | [
0.049560546875,
0.0181121826171875,
0.0258941650390625,
-0.028778076171875,
0.033843994140625,
-0.029205322265625,
0.041473388671875,
-0.0399169921875,
0.0166778564453125,
0.0361328125,
-0.0230560302734375,
-0.0275421142578125,
-0.01136016845703125,
-0.026641845703125,
-0.0291290283203125,
-0.040008544921875,
0.0104522705078125,
0.0052032470703125,
0.0141754150390625,
-0.0362548828125,
0.011993408203125,
-0.0308990478515625,
-0.0037288665771484375,
0.00797271728515625,
0.01302337646484375,
-0.051788330078125,
0.06689453125,
-0.0177459716796875,
0.02728271484375,
-0.0086517333984375,
0.0184478759765625,
-0.02606201171875,
0.042022705078125,
0.031951904296875,
-0.1080322265625,
0.014007568359375,
-0.0280609130859375,
0.0066680908203125,
-0.038665771484375,
0.0261077880859375,
0.0236663818359375,
-0.00939178466796875,
0.0302886962890625,
0.025054931640625,
0.00019562244415283203,
-0.01776123046875,
0.044189453125,
-0.05047607421875,
-0.0061187744140625,
-0.0131072998046875,
0.018463134765625,
-0.004901885986328125,
0.035552978515625,
-0.0716552734375,
-0.0025196075439453125,
0.0060272216796875,
-0.03985595703125,
-0.0003924369812011719,
0.00887298583984375,
0.02105712890625,
0.0135498046875,
0.01541900634765625,
-0.00835418701171875,
-0.019775390625,
0.016998291015625,
0.01861572265625,
0.0302734375,
-0.00366973876953125,
-0.061126708984375,
0.0280303955078125,
0.060821533203125,
-0.056365966796875,
-0.0087127685546875,
-0.0160675048828125,
-0.0218353271484375,
-0.0053253173828125,
0.0150909423828125,
-0.016143798828125,
0.00476837158203125,
0.002140045166015625,
0.0133209228515625,
0.0088043212890625,
-0.01508331298828125,
0.02685546875,
-0.0303497314453125,
0.0277862548828125,
-0.0026950836181640625,
-0.0226593017578125,
-0.0079193115234375,
0.0245513916015625,
-0.006259918212890625,
0.035797119140625,
-0.005443572998046875,
0.0135345458984375,
-0.0119476318359375,
-0.00004953145980834961,
0.0284881591796875,
0.07550048828125,
0.00115966796875,
0.04803466796875,
-0.00208282470703125,
-0.0633544921875,
0.072265625,
-0.07037353515625,
0.006572723388671875,
-0.00019466876983642578,
0.004734039306640625,
-0.002979278564453125,
0.04119873046875,
0.032806396484375,
-0.0168609619140625,
0.042388916015625,
-0.0268707275390625,
0.0113525390625,
-0.024169921875,
-0.00725555419921875,
-0.0673828125,
-0.02142333984375,
-0.021026611328125,
-0.014801025390625,
0.01019287109375,
-0.00299072265625,
0.0235748291015625,
-0.03448486328125,
-0.00847625732421875,
-0.04510498046875,
-0.06378173828125,
0.0104217529296875,
0.0355224609375,
-0.006069183349609375,
-0.0308380126953125,
0.0003368854522705078,
0.01519775390625,
0.030914306640625,
0.0162200927734375,
-0.00804901123046875,
-0.00882720947265625,
-0.044525146484375,
-0.00325775146484375,
0.00042057037353515625,
-0.0254669189453125,
0.00913238525390625,
0.0295257568359375,
-0.035675048828125,
-0.00665283203125,
0.01020050048828125,
0.033905029296875,
0.02581787109375,
-0.03802490234375,
-0.07525634765625,
0.0257720947265625,
0.0158233642578125,
0.0496826171875,
-0.01373291015625,
-0.0180206298828125,
-0.0195159912109375,
0.011505126953125,
-0.042327880859375,
-0.0227813720703125,
-0.0386962890625,
0.041259765625,
-0.007213592529296875,
-0.0175933837890625,
-0.025970458984375,
-0.0540771484375,
-0.003398895263671875,
-0.05267333984375,
-0.004791259765625,
0.0198822021484375,
0.01605224609375,
0.01055908203125,
0.0011320114135742188,
-0.0070953369140625,
-0.005767822265625,
-0.0127105712890625,
0.0007109642028808594,
-0.01800537109375,
0.0275421142578125,
0.0308380126953125,
0.004390716552734375,
-0.017333984375,
-0.041748046875,
0.06689453125,
-0.0127410888671875,
-0.0679931640625,
0.040557861328125,
0.040679931640625,
0.0809326171875,
-0.013641357421875,
0.0262908935546875,
0.05560302734375,
0.03515625,
-0.035980224609375,
-0.007144927978515625,
-0.006580352783203125,
-0.039154052734375,
0.020660400390625,
-0.019134521484375,
0.00872039794921875,
0.0450439453125,
0.0254364013671875,
-0.031585693359375,
0.0438232421875,
-0.02423095703125,
-0.039642333984375,
-0.018707275390625,
-0.02288818359375,
0.0154266357421875,
-0.01029205322265625,
-0.019561767578125,
0.0155029296875,
-0.025970458984375,
-0.045623779296875,
0.051605224609375,
-0.0223541259765625,
0.017852783203125,
-0.0528564453125,
0.017547607421875,
-0.0006837844848632812,
0.053070068359375,
0.0157928466796875,
-0.0208282470703125,
-0.01125335693359375,
-0.0246124267578125,
0.05364990234375,
-0.0296783447265625,
0.0147247314453125,
-0.0190887451171875,
0.03741455078125,
0.002964019775390625,
-0.022308349609375,
0.01372528076171875,
0.0285797119140625,
0.012298583984375,
-0.06353759765625,
-0.01092529296875,
-0.04339599609375,
-0.0176239013671875,
-0.010955810546875,
0.060272216796875,
0.057098388671875,
0.05096435546875,
0.005825042724609375,
-0.00611114501953125,
0.09173583984375,
-0.0203857421875,
0.025634765625,
-0.0236968994140625,
0.0401611328125,
0.0838623046875,
-0.00446319580078125,
0.0002815723419189453,
-0.0026149749755859375,
-0.066162109375,
0.029052734375,
0.007030487060546875,
-0.0095367431640625,
0.004795074462890625,
-0.00792694091796875,
-0.01042938232421875,
0.00849151611328125,
-0.0191802978515625,
-0.00754547119140625,
-0.021209716796875,
0.032318115234375,
0.00949859619140625,
0.025421142578125,
0.01371002197265625,
-0.0195770263671875,
0.01052093505859375,
0.022735595703125,
-0.00321197509765625,
-0.0003509521484375,
0.050048828125,
0.0074462890625,
0.01218414306640625,
-0.0576171875,
-0.005641937255859375,
0.02734375,
0.0311279296875,
-0.00788116455078125,
0.01068878173828125,
-0.0227203369140625,
-0.01421356201171875,
0.021636962890625,
0.029937744140625,
0.0007462501525878906,
-0.015777587890625,
0.00008988380432128906,
-0.0246734619140625,
0.003963470458984375,
0.03564453125,
-0.007587432861328125,
0.0249786376953125,
0.035125732421875,
-0.01128387451171875,
0.046783447265625,
-0.0260162353515625,
0.0257110595703125,
-0.042633056640625,
0.0168304443359375,
0.04638671875,
-0.0221099853515625,
-0.0096435546875,
0.0192718505859375,
0.0020236968994140625,
0.0188751220703125,
0.004123687744140625,
0.01334381103515625,
0.033416748046875,
-0.04302978515625,
0.035003662109375,
0.0295867919921875,
0.033599853515625,
0.006504058837890625,
-0.04705810546875,
-0.0019741058349609375,
0.04144287109375,
-0.057342529296875,
-0.03619384765625,
0.0084991455078125,
-0.037384033203125,
-0.0164031982421875,
-0.034027099609375,
-0.0188446044921875,
0.006671905517578125,
-0.037811279296875,
-0.004589080810546875,
-0.0499267578125,
0.003963470458984375,
0.00907135009765625,
-0.00791168212890625,
-0.01104736328125,
0.063232421875,
0.002307891845703125,
0.0206298828125,
0.01508331298828125,
0.051727294921875,
0.01033782958984375,
-0.07403564453125,
-0.01296234130859375,
-0.0047760009765625,
-0.03466796875,
0.02587890625,
0.0272216796875,
-0.0224609375,
-0.022857666015625,
0.018768310546875,
0.0004267692565917969,
0.03204345703125,
-0.0227508544921875,
-0.0178070068359375,
-0.007762908935546875,
0.031585693359375,
0.028778076171875,
-0.01082611083984375,
0.00754547119140625,
0.044708251953125,
0.032257080078125,
-0.0217742919921875,
0.0010328292846679688,
-0.006053924560546875,
-0.031890869140625,
-0.0107421875,
0.032501220703125,
-0.01488494873046875,
-0.0207977294921875,
0.0102996826171875,
0.03350830078125,
0.018951416015625,
0.032440185546875,
0.005950927734375,
-0.006046295166015625,
0.005069732666015625,
0.0173187255859375,
-0.02789306640625,
0.01995849609375,
-0.0135650634765625,
0.0010061264038085938,
0.0009407997131347656,
0.0252838134765625,
0.0161895751953125,
-0.00792694091796875,
-0.0193634033203125,
-0.0254058837890625,
0.044342041015625,
0.0166015625,
0.0306549072265625,
-0.03839111328125,
-0.037933349609375,
-0.01242828369140625,
0.08880615234375,
-0.0418701171875,
-0.00414276123046875,
0.0032520294189453125,
0.0036830902099609375,
0.0423583984375,
-0.047454833984375,
-0.020416259765625,
-0.050262451171875,
-0.034149169921875,
0.01538848876953125,
0.000354766845703125,
-0.01043701171875,
0.004024505615234375,
0.0021209716796875,
-0.01806640625,
-0.0103912353515625,
0.0416259765625,
-0.016082763671875,
0.00370025634765625,
0.01555633544921875,
-0.013031005859375,
-0.00899505615234375,
-0.032745361328125,
0.012725830078125,
-0.040496826171875,
0.007030487060546875,
-0.0147552490234375,
0.01971435546875,
0.024078369140625,
-0.021270751953125,
-0.0269775390625,
0.008148193359375,
-0.0032215118408203125,
0.019561767578125,
-0.01556396484375,
-0.0013856887817382812,
0.01629638671875,
0.0183258056640625,
0.005405426025390625,
-0.0024623870849609375,
0.0016260147094726562,
0.01445770263671875,
-0.0018930435180664062,
0.049041748046875,
-0.040313720703125,
-0.0191802978515625,
-0.006137847900390625,
-0.042144775390625,
-0.048828125,
-0.04620361328125,
-0.04473876953125,
-0.0287628173828125,
-0.06146240234375,
0.03131103515625,
-0.036651611328125,
-0.03607177734375,
0.0584716796875,
-0.0060882568359375,
-0.038787841796875,
0.0006985664367675781,
0.06036376953125,
0.02227783203125,
-0.0266876220703125,
-0.0430908203125,
-0.00646209716796875,
0.04150390625,
-0.04144287109375,
0.0772705078125,
0.0416259765625,
-0.03790283203125,
0.102783203125,
0.0059051513671875,
0.0204620361328125,
-0.05572509765625,
0.0924072265625,
0.001434326171875,
0.02313232421875,
-0.0020160675048828125,
-0.00007927417755126953,
0.00643157958984375,
0.004657745361328125,
-0.01525115966796875,
0.0038204193115234375,
0.0167236328125,
0.006565093994140625,
-0.0078582763671875,
0.0154571533203125,
-0.0194549560546875,
-0.0216522216796875,
0.007266998291015625,
0.057037353515625,
0.03558349609375,
0.032196044921875,
0.01157379150390625,
0.0157318115234375,
0.0204925537109375,
0.03326416015625,
0.0205078125,
0.055572509765625,
-0.03460693359375,
0.0745849609375,
-0.01511383056640625,
0.00849151611328125,
-0.0244598388671875,
-0.0016765594482421875,
0.04376220703125,
-0.01544952392578125,
-0.028656005859375,
-0.00400543212890625,
-0.0235595703125,
-0.0157318115234375,
0.00972747802734375,
0.02313232421875,
0.0005660057067871094,
-0.0028820037841796875,
0.01323699951171875,
0.0125885009765625,
0.0248260498046875,
0.013458251953125,
-0.0080108642578125,
-0.0074615478515625,
-0.007354736328125,
-0.020782470703125,
0.005588531494140625,
-0.0204010009765625,
-0.056182861328125,
-0.004932403564453125,
0.00946807861328125,
0.022918701171875,
0.0165557861328125,
0.004184722900390625,
0.021270751953125,
0.0117950439453125,
-0.0084381103515625,
-0.0002231597900390625,
-0.0015125274658203125,
-0.033355712890625,
-0.060882568359375,
0.031341552734375,
0.04632568359375,
-0.040496826171875,
0.0228271484375,
0.01061248779296875,
0.02496337890625,
-0.0032711029052734375,
0.0101318359375,
0.006290435791015625,
0.001781463623046875,
-0.032073974609375,
-0.0081939697265625,
0.040313720703125,
0.03839111328125,
-0.004177093505859375,
-0.00836181640625,
-0.01332855224609375,
0.01131439208984375,
-0.014862060546875,
-0.0263824462890625,
0.005558013916015625,
-0.004947662353515625,
0.020294189453125,
-0.029541015625,
-0.034149169921875,
-0.01531982421875,
-0.00989532470703125,
0.0116729736328125,
0.03570556640625,
0.0276031494140625,
-0.017791748046875,
0.059600830078125,
-0.0221099853515625,
-0.03436279296875,
-0.007778167724609375,
0.0192413330078125,
0.025299072265625,
0.0213165283203125,
-0.04132080078125,
-0.004627227783203125,
-0.0278167724609375,
-0.0191802978515625,
-0.06689453125,
-0.042510986328125,
-0.041748046875,
0.01300811767578125,
-0.016693115234375,
0.025360107421875,
-0.0237884521484375,
-0.0204315185546875,
-0.01325225830078125,
-0.01471710205078125,
-0.01393890380859375,
0.0341796875,
-0.0020236968994140625,
0.0655517578125,
0.002513885498046875,
0.0297698974609375,
0.02880859375,
0.055694580078125,
0.0067138671875,
-0.029876708984375,
0.00801849365234375,
-0.0535888671875,
-0.03424072265625,
0.0166168212890625,
-0.047027587890625,
0.0209197998046875,
0.01279449462890625,
-0.01312255859375,
0.06268310546875,
-0.0166015625,
-0.004817962646484375,
-0.019256591796875,
-0.01163482666015625,
-0.045135498046875,
0.0164031982421875,
0.011383056640625,
-0.030914306640625,
0.009765625,
-0.0225677490234375,
-0.0200958251953125,
0.06378173828125,
-0.020050048828125,
0.0311126708984375,
0.035888671875,
-0.006744384765625,
0.05230712890625,
0.057861328125,
-0.033538818359375,
-0.005893707275390625,
0.0322265625,
-0.032806396484375,
-0.02740478515625,
-0.00970458984375,
0.01230621337890625,
-0.00485992431640625,
0.039886474609375,
-0.0021686553955078125,
-0.00665283203125,
0.037078857421875,
-0.022125244140625,
0.021575927734375,
0.06134033203125,
0.04296875,
-0.1051025390625,
0.01535797119140625,
0.020599365234375,
-0.003917694091796875,
-0.0214080810546875,
0.01216888427734375,
-0.006366729736328125,
0.012481689453125,
0.0221405029296875,
0.007755279541015625,
-0.01433563232421875,
0.035888671875,
0.0155487060546875,
-0.042449951171875,
-0.0167694091796875,
-0.00727081298828125,
0.0055999755859375,
0.025787353515625,
-0.0092620849609375,
-0.040374755859375,
-0.006378173828125,
-0.01415252685546875,
0.04449462890625,
-0.0006270408630371094,
-0.0311737060546875,
-0.049285888671875,
0.009307861328125,
0.05621337890625,
-0.05218505859375,
0.0130615234375,
-0.0206298828125,
0.0008225440979003906,
0.057647705078125,
-0.0517578125,
0.061859130859375,
0.0187225341796875,
-0.01071929931640625,
0.032623291015625,
-0.0263671875,
-0.0059661865234375,
0.0214080810546875,
-0.0241851806640625,
0.003009796142578125,
0.0100555419921875,
-0.019378662109375,
-0.01023101806640625,
-0.0906982421875,
0.048370361328125,
-0.04547119140625,
-0.00157928466796875,
-0.006443023681640625,
-0.005306243896484375,
-0.0028095245361328125,
-0.00740814208984375,
0.0206451416015625,
-0.0118408203125,
0.01050567626953125,
-0.0069732666015625,
0.002651214599609375,
-0.03271484375,
-0.018280029296875,
-0.1085205078125,
0.09564208984375,
0.00896453857421875,
0.044830322265625,
-0.0188446044921875,
0.0240936279296875,
-0.03973388671875,
-0.032470703125,
-0.048828125,
0.0811767578125,
-0.00014221668243408203,
0.07208251953125,
-0.068115234375,
-0.01336669921875,
0.02655029296875,
0.03924560546875,
0.037506103515625,
0.00795745849609375,
-0.03155517578125,
-0.0220947265625,
0.040985107421875,
0.012725830078125,
0.00165557861328125,
0.02899169921875,
-0.0419921875,
0.03631591796875,
-0.01074981689453125,
-0.05474853515625,
0.0006275177001953125,
-0.0214691162109375,
-0.054779052734375,
-0.0021419525146484375,
0.0113067626953125,
0.008544921875,
-0.0117950439453125,
0.010986328125,
0.015594482421875,
-0.0164794921875,
-0.0041351318359375,
-0.031890869140625,
-0.04571533203125,
0.0548095703125,
-0.01325225830078125,
-0.0650634765625,
-0.06060791015625,
-0.041778564453125,
0.019561767578125,
-0.00545501708984375,
0.07110595703125,
0.045501708984375,
0.040069580078125,
0.055450439453125,
-0.01320648193359375,
0.05072021484375,
0.00995635986328125,
-0.044677734375,
0.020660400390625,
0.01450347900390625,
0.00894927978515625,
-0.033294677734375,
-0.0015916824340820312,
0.0022487640380859375,
0.020843505859375,
-0.0184173583984375,
0.013458251953125,
0.0307769775390625,
0.0200653076171875,
-0.0285797119140625,
-0.05157470703125,
-0.035400390625,
-0.0482177734375,
-0.00870513916015625,
-0.0234527587890625,
-0.0120697021484375,
0.0089874267578125,
0.01611328125,
-0.0014238357543945312,
-0.007022857666015625,
0.0189971923828125,
-0.010894775390625,
-0.01424407958984375,
0.015625,
0.001468658447265625,
0.0192108154296875,
-0.00901031494140625,
0.04742431640625,
-0.053497314453125,
-0.00783538818359375,
-0.037353515625,
0.00637054443359375,
-0.054168701171875,
0.0701904296875,
-0.07354736328125,
-0.0181121826171875,
-0.02142333984375,
0.06207275390625,
0.01428985595703125,
-0.0031795501708984375,
0.034210205078125,
0.036041259765625,
-0.0227203369140625,
-0.005615234375,
0.03875732421875,
-0.0174560546875,
-0.01375579833984375,
-0.04412841796875,
0.0228118896484375,
0.0159454345703125,
0.0076904296875,
-0.0037670135498046875,
0.01026153564453125,
0.022247314453125,
-0.014068603515625,
0.040985107421875,
-0.01165008544921875,
-0.03424072265625,
0.00728607177734375,
0.00868988037109375,
0.06744384765625,
0.003643035888671875,
-0.04840087890625,
-0.0150604248046875,
-0.0178375244140625,
-0.053680419921875,
0.0138397216796875,
0.047760009765625,
0.0035114288330078125,
-0.01110076904296875,
0.002681732177734375,
-0.039886474609375,
-0.0095367431640625,
0.036529541015625,
0.00860595703125,
0.01294708251953125,
0.0028171539306640625,
-0.015716552734375,
0.0255889892578125,
0.0197601318359375,
0.00980377197265625,
0.0377197265625,
0.0341796875,
0.0926513671875,
-0.03778076171875,
0.026641845703125,
0.007518768310546875,
-0.020751953125,
-0.00110626220703125,
-0.00014281272888183594,
0.042877197265625,
-0.0289459228515625,
-0.0228424072265625,
-0.01033782958984375,
0.0116424560546875,
-0.02618408203125,
0.0750732421875,
-0.031646728515625,
-0.01229095458984375,
-0.0168609619140625,
0.02203369140625,
-0.047332763671875,
0.0239715576171875,
-0.018829345703125,
0.0267486572265625,
-0.01154327392578125,
-0.0308990478515625,
0.04412841796875,
0.0135955810546875,
0.0131683349609375,
-0.0035381317138671875,
0.046844482421875,
-0.020111083984375,
0.0174713134765625,
0.00864410400390625,
0.0284576416015625,
0.03857421875,
0.0117340087890625,
0.0457763671875,
0.00799560546875,
-0.0113067626953125,
0.035400390625,
0.026153564453125,
-0.030303955078125,
0.0312347412109375,
-0.020843505859375,
-0.009185791015625,
0.018585205078125,
0.056884765625,
0.01441192626953125,
0.0279388427734375,
-0.003482818603515625,
-0.0041961669921875,
-0.02044677734375,
0.0675048828125,
-0.01268768310546875,
-0.01116943359375,
-0.02972412109375,
-0.035614013671875,
0.00091552734375,
-0.0787353515625,
-0.02801513671875,
0.016448974609375,
0.01444244384765625,
0.0223388671875,
-0.101806640625,
0.04168701171875,
0.00911712646484375,
0.057708740234375,
-0.0221405029296875,
0.04669189453125,
-0.0257568359375,
-0.022735595703125,
-0.0626220703125,
-0.016265869140625,
-0.043548583984375,
0.0155029296875,
-0.01239013671875,
-0.00042128562927246094,
0.034149169921875,
0.0025806427001953125,
-0.0283355712890625,
0.026885986328125,
-0.040313720703125,
0.08087158203125,
-0.06793212890625,
-0.0183868408203125,
0.04583740234375,
-0.0187225341796875,
-0.0164794921875,
-0.0384521484375,
-0.00650787353515625,
-0.042388916015625,
0.0228271484375,
0.01230621337890625,
-0.01548004150390625,
-0.0015821456909179688,
-0.033294677734375,
-0.05023193359375,
-0.0127716064453125,
0.0208892822265625,
-0.03363037109375,
-0.028564453125,
-0.02288818359375,
-0.00595855712890625,
0.01446533203125,
-0.0120391845703125,
-0.0258941650390625,
-0.05682373046875,
0.03082275390625,
0.00534820556640625,
0.037200927734375,
0.015869140625,
-0.004184722900390625,
-0.04461669921875,
-0.0063323974609375,
-0.0312347412109375,
0.00232696533203125,
-0.004734039306640625,
-0.016876220703125,
0.0302886962890625,
0.0217437744140625,
-0.02545166015625,
-0.00836944580078125,
0.0223846435546875,
-0.0029163360595703125,
-0.00876617431640625,
-0.050445556640625,
-0.047332763671875,
-0.039459228515625,
0.11834716796875,
0.030029296875,
0.032073974609375,
-0.01561737060546875,
0.0173492431640625,
0.012725830078125,
0.0210723876953125,
-0.003658294677734375,
-0.005260467529296875,
-0.0233154296875,
-0.029327392578125,
-0.0229034423828125,
-0.032196044921875,
0.016815185546875,
-0.039398193359375,
-0.040435791015625,
0.0010366439819335938,
-0.0252685546875,
0.00931549072265625,
-0.0236663818359375,
-0.054779052734375,
-0.0046539306640625,
-0.0021381378173828125,
-0.0028839111328125,
0.0037479400634765625,
0.037445068359375,
-0.01220703125,
0.0450439453125,
-0.00350189208984375,
0.02069091796875,
-0.0171966552734375,
-0.005344390869140625,
0.0169677734375,
0.0017070770263671875,
0.01995849609375,
0.000171661376953125,
-0.0005855560302734375,
0.0030384063720703125,
-0.023712158203125,
-0.00827789306640625,
0.0253753662109375,
0.01739501953125,
-0.0175628662109375,
0.055511474609375,
-0.0146484375,
0.04443359375,
-0.008331298828125,
0.0214691162109375,
0.0121002197265625,
-0.01458740234375,
0.026885986328125,
-0.02545166015625,
-0.01316070556640625,
0.0242919921875,
-0.0006356239318847656,
-0.03118896484375,
0.0089874267578125,
-0.106689453125,
0.0257415771484375,
-0.0023193359375
] |
137734686a0c8c5b9452f8e6b11083e004c923f3 | Wordpress Stackexchange
Q: PHP warning are displaying when using WP CLI I'm running WP CLI 0.25.0 on Debian, PHP 7.0. I keep getting the PHP warnings displayed. In php.ini used for cli I have set error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING (and checked the change), but no difference, the warning is output.
Ran WP CLI with --debug=false, still no effect.
How to suppress the warning display, as it breaks the JSON output ?
Edit 1
Before using error_log = Off :
PHP Warning: Invalid argument supplied for foreach() in /var/.../theme-settings.php on line 2805
Warning: Invalid argument supplied for foreach() in /var/.../theme-settings.php on line 2805
Using error_log = Off :
Warning: Invalid argument supplied for foreach() in /var/.../theme-settings.php on line 2805
Pay attention that the PHP Warning disapeared, and theres the Warning left.
A: The first thing to check for this issue is the WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY constants in the wp-config.php file. They have to be set to false or be commented out (the default value is false). Else, no matter which global log_errors, display_errors or error_reporting settings you have, you will still see those warnings when running wp-cli.
| Q: PHP warning are displaying when using WP CLI I'm running WP CLI 0.25.0 on Debian, PHP 7.0. I keep getting the PHP warnings displayed. In php.ini used for cli I have set error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT & ~E_WARNING (and checked the change), but no difference, the warning is output.
Ran WP CLI with --debug=false, still no effect.
How to suppress the warning display, as it breaks the JSON output ?
Edit 1
Before using error_log = Off :
PHP Warning: Invalid argument supplied for foreach() in /var/.../theme-settings.php on line 2805
Warning: Invalid argument supplied for foreach() in /var/.../theme-settings.php on line 2805
Using error_log = Off :
Warning: Invalid argument supplied for foreach() in /var/.../theme-settings.php on line 2805
Pay attention that the PHP Warning disapeared, and theres the Warning left.
A: The first thing to check for this issue is the WP_DEBUG, WP_DEBUG_LOG and WP_DEBUG_DISPLAY constants in the wp-config.php file. They have to be set to false or be commented out (the default value is false). Else, no matter which global log_errors, display_errors or error_reporting settings you have, you will still see those warnings when running wp-cli.
| wordpress | {
"language": "en",
"length": 190,
"provenance": "stackexchange_00019.jsonl.gz:470649",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247581"
} | [
0.04681396484375,
-0.033935546875,
-0.0298309326171875,
-0.0562744140625,
-0.00620269775390625,
-0.0274200439453125,
0.01421356201171875,
0.032501220703125,
0.040313720703125,
0.006465911865234375,
-0.037017822265625,
-0.03204345703125,
-0.0034046173095703125,
-0.0189361572265625,
-0.02734375,
-0.03826904296875,
0.011505126953125,
0.01739501953125,
0.030517578125,
-0.01287841796875,
-0.004791259765625,
-0.001186370849609375,
0.00704193115234375,
0.0567626953125,
0.00843048095703125,
-0.043426513671875,
0.069091796875,
-0.016632080078125,
-0.000659942626953125,
-0.037445068359375,
0.00811004638671875,
0.0225372314453125,
0.030792236328125,
0.06744384765625,
-0.10736083984375,
0.00522613525390625,
-0.012725830078125,
0.010528564453125,
-0.032623291015625,
0.0655517578125,
-0.014739990234375,
0.0011844635009765625,
0.065673828125,
-0.03118896484375,
0.0106353759765625,
-0.0204620361328125,
0.005001068115234375,
-0.038970947265625,
-0.0135040283203125,
0.00365447998046875,
0.0097198486328125,
-0.0157623291015625,
0.0189056396484375,
0.007503509521484375,
-0.00916290283203125,
-0.0206146240234375,
-0.034698486328125,
0.0159454345703125,
0.036865234375,
0.051971435546875,
-0.021514892578125,
-0.018768310546875,
-0.007289886474609375,
-0.058746337890625,
0.01849365234375,
0.005321502685546875,
0.0226898193359375,
0.034912109375,
-0.037567138671875,
-0.0023288726806640625,
0.024658203125,
-0.03070068359375,
0.01149749755859375,
-0.0254669189453125,
0.00716400146484375,
-0.0033206939697265625,
0.02142333984375,
0.00807952880859375,
0.007228851318359375,
0.0088348388671875,
0.0233154296875,
0.003345489501953125,
-0.04718017578125,
0.01409912109375,
0.03192138671875,
0.048187255859375,
0.0025882720947265625,
-0.0362548828125,
0.002117156982421875,
-0.04876708984375,
-0.0111236572265625,
-0.00007092952728271484,
-0.036712646484375,
-0.033599853515625,
-0.0103912353515625,
-0.05242919921875,
-0.01465606689453125,
0.0098114013671875,
-0.005359649658203125,
-0.0150604248046875,
-0.0106201171875,
0.006641387939453125,
-0.040618896484375,
0.01418304443359375,
0.01180267333984375,
0.0556640625,
-0.0157012939453125,
-0.01165008544921875,
0.03472900390625,
0.03271484375,
0.0214996337890625,
-0.0167999267578125,
-0.0306243896484375,
-0.048248291015625,
0.0011844635009765625,
0.047393798828125,
-0.0335693359375,
0.0200347900390625,
0.005161285400390625,
0.034149169921875,
0.032867431640625,
0.0621337890625,
-0.0244903564453125,
-0.00440216064453125,
-0.0117034912109375,
0.00492095947265625,
0.00847625732421875,
-0.0625,
-0.0021610260009765625,
0.036468505859375,
-0.0169830322265625,
0.00893402099609375,
0.00002586841583251953,
0.0114288330078125,
-0.020233154296875,
-0.01389312744140625,
0.0245208740234375,
0.01263427734375,
0.006214141845703125,
0.036834716796875,
-0.0276031494140625,
-0.051849365234375,
0.00809478759765625,
0.01263427734375,
-0.0113372802734375,
0.0180816650390625,
0.01812744140625,
0.0254364013671875,
-0.0228271484375,
-0.07025146484375,
0.0133056640625,
-0.004688262939453125,
0.0235443115234375,
0.00832366943359375,
-0.0052947998046875,
-0.0195159912109375,
0.028839111328125,
-0.03326416015625,
0.005619049072265625,
-0.040618896484375,
-0.056121826171875,
-0.01120758056640625,
0.002269744873046875,
-0.07904052734375,
-0.06268310546875,
0.0024127960205078125,
0.0110321044921875,
0.00978851318359375,
0.013946533203125,
0.0229339599609375,
0.008941650390625,
0.002094268798828125,
-0.00791168212890625,
-0.0005631446838378906,
-0.004638671875,
-0.012176513671875,
-0.0211334228515625,
-0.0024280548095703125,
0.043975830078125,
-0.007602691650390625,
-0.0212554931640625,
-0.0282745361328125,
0.02801513671875,
0.00757598876953125,
-0.08404541015625,
0.004062652587890625,
-0.01222991943359375,
0.01276397705078125,
0.06793212890625,
-0.0230865478515625,
0.07476806640625,
-0.0268096923828125,
0.032562255859375,
0.017364501953125,
-0.016021728515625,
-0.050750732421875,
-0.03692626953125,
-0.01076507568359375,
-0.034759521484375,
0.0205230712890625,
-0.006725311279296875,
-0.050506591796875,
0.0195465087890625,
-0.03076171875,
-0.11676025390625,
-0.0103302001953125,
-0.061798095703125,
0.04388427734375,
-0.01084136962890625,
-0.0055694580078125,
0.0274505615234375,
-0.0087432861328125,
-0.0193328857421875,
0.014190673828125,
-0.0242462158203125,
0.0211639404296875,
-0.031646728515625,
0.07464599609375,
0.00008463859558105469,
0.059112548828125,
-0.0281524658203125,
-0.019775390625,
-0.00441741943359375,
-0.02459716796875,
0.008392333984375,
0.0171966552734375,
-0.0169525146484375,
-0.0098724365234375,
0.044769287109375,
-0.01053619384765625,
0.06707763671875,
0.0082855224609375,
0.007381439208984375,
0.0305023193359375,
-0.005901336669921875,
-0.006198883056640625,
0.01416015625,
-0.073486328125,
0.0183563232421875,
0.038787841796875,
0.039642333984375,
0.03363037109375,
-0.0080413818359375,
-0.0002589225769042969,
0.0362548828125,
-0.03289794921875,
0.0308990478515625,
-0.0211181640625,
0.01092529296875,
-0.049560546875,
-0.0074310302734375,
-0.061065673828125,
0.073974609375,
-0.02447509765625,
0.03369140625,
0.03515625,
-0.006801605224609375,
-0.054779052734375,
-0.0034389495849609375,
0.0278778076171875,
0.0157012939453125,
-0.01114654541015625,
-0.044036865234375,
0.024017333984375,
0.00832366943359375,
-0.011138916015625,
0.007251739501953125,
-0.0145721435546875,
-0.00296783447265625,
-0.007190704345703125,
0.00429534912109375,
-0.058319091796875,
-0.0005588531494140625,
0.01497650146484375,
-0.033660888671875,
0.01434326171875,
-0.039093017578125,
0.0205535888671875,
0.01479339599609375,
-0.004352569580078125,
-0.00484466552734375,
0.0323486328125,
0.051910400390625,
-0.0011072158813476562,
-0.0133514404296875,
0.00740814208984375,
0.04443359375,
0.0190887451171875,
0.01155853271484375,
-0.049224853515625,
-0.021942138671875,
0.054901123046875,
-0.036346435546875,
0.0699462890625,
0.023345947265625,
-0.032806396484375,
0.041717529296875,
-0.0231475830078125,
0.01448822021484375,
-0.0014390945434570312,
0.04443359375,
0.055572509765625,
0.011871337890625,
-0.015716552734375,
-0.00830078125,
0.042755126953125,
0.015625,
-0.01444244384765625,
-0.0221405029296875,
-0.0021209716796875,
-0.043609619140625,
-0.0310211181640625,
0.00846099853515625,
0.01971435546875,
-0.0298919677734375,
-0.04522705078125,
-0.048004150390625,
0.0022449493408203125,
-0.0751953125,
-0.033050537109375,
-0.043731689453125,
-0.01873779296875,
-0.009368896484375,
-0.0081939697265625,
-0.005657196044921875,
0.00902557373046875,
-0.005062103271484375,
0.018463134765625,
0.06494140625,
-0.0576171875,
-0.042816162109375,
-0.052764892578125,
-0.0716552734375,
-0.016357421875,
0.015228271484375,
-0.01201629638671875,
-0.0034084320068359375,
0.1038818359375,
0.0211639404296875,
-0.053863525390625,
0.0035915374755859375,
0.0311279296875,
-0.0215301513671875,
0.015533447265625,
-0.026641845703125,
0.01338958740234375,
0.0247344970703125,
0.00557708740234375,
-0.0238037109375,
0.00004756450653076172,
0.012359619140625,
-0.034637451171875,
0.00205230712890625,
-0.015869140625,
-0.028228759765625,
-0.0172119140625,
0.01316070556640625,
-0.058990478515625,
-0.05572509765625,
-0.0657958984375,
-0.030975341796875,
0.018951416015625,
-0.039215087890625,
0.03314208984375,
0.031829833984375,
-0.02996826171875,
0.0129547119140625,
-0.00882720947265625,
-0.004119873046875,
0.027923583984375,
-0.01261138916015625,
-0.021392822265625,
0.030517578125,
-0.00313568115234375,
0.005374908447265625,
0.006160736083984375,
0.0433349609375,
-0.0110626220703125,
-0.033935546875,
0.0140228271484375,
-0.00801849365234375,
0.003795623779296875,
-0.0257110595703125,
-0.00827789306640625,
-0.01690673828125,
0.013824462890625,
-0.039276123046875,
0.0245819091796875,
-0.01093292236328125,
0.00844573974609375,
-0.006359100341796875,
0.051666259765625,
-0.043670654296875,
-0.03936767578125,
-0.0124969482421875,
0.022613525390625,
0.004352569580078125,
-0.01548004150390625,
0.0163421630859375,
-0.036224365234375,
-0.0355224609375,
0.028350830078125,
0.0207672119140625,
-0.004608154296875,
-0.025665283203125,
0.011383056640625,
-0.036834716796875,
-0.025360107421875,
0.0290679931640625,
-0.01519012451171875,
0.0582275390625,
0.01186370849609375,
0.032379150390625,
-0.0008540153503417969,
-0.0135498046875,
-0.036376953125,
-0.13916015625,
-0.0286407470703125,
-0.006801605224609375,
0.0863037109375,
-0.0163116455078125,
-0.01261138916015625,
-0.04931640625,
0.050262451171875,
0.01557159423828125,
-0.037353515625,
0.041229248046875,
-0.0011186599731445312,
0.01120758056640625,
-0.000957489013671875,
0.005146026611328125,
-0.0247955322265625,
-0.01331329345703125,
-0.018096923828125,
-0.0211944580078125,
-0.0047454833984375,
-0.00949859619140625,
0.00604248046875,
0.02154541015625,
-0.0220184326171875,
-0.0304718017578125,
-0.0501708984375,
-0.032257080078125,
0.00986480712890625,
-0.0135345458984375,
-0.0024662017822265625,
-0.0462646484375,
-0.02850341796875,
0.042572021484375,
-0.039093017578125,
-0.01068115234375,
0.01119232177734375,
0.09130859375,
0.0140533447265625,
0.00250244140625,
-0.032806396484375,
-0.0282440185546875,
0.0108795166015625,
-0.0087432861328125,
0.053253173828125,
0.007404327392578125,
0.0103759765625,
0.0241546630859375,
-0.02850341796875,
0.0017490386962890625,
0.00038695335388183594,
-0.01102447509765625,
-0.019744873046875,
-0.06536865234375,
0.0207672119140625,
-0.0301513671875,
0.031280517578125,
0.028289794921875,
0.02581787109375,
-0.004650115966796875,
0.08642578125,
0.009033203125,
-0.0245819091796875,
-0.042236328125,
-0.00782012939453125,
-0.036590576171875,
0.01488494873046875,
-0.022369384765625,
0.020660400390625,
-0.006786346435546875,
0.0186004638671875,
0.01971435546875,
0.00913238525390625,
-0.016204833984375,
0.002109527587890625,
0.033447265625,
-0.0257415771484375,
0.003108978271484375,
0.043701171875,
-0.0263671875,
-0.027008056640625,
-0.01505279541015625,
0.05731201171875,
0.017822265625,
-0.018890380859375,
-0.01039886474609375,
-0.01593017578125,
0.01401519775390625,
-0.028564453125,
-0.0006175041198730469,
0.03302001953125,
0.01410675048828125,
-0.0167083740234375,
-0.005084991455078125,
-0.007965087890625,
-0.0166778564453125,
-0.0304718017578125,
0.0111236572265625,
-0.018280029296875,
-0.004505157470703125,
0.0046539306640625,
0.00664520263671875,
0.006855010986328125,
-0.00016295909881591797,
-0.003139495849609375,
0.004848480224609375,
0.003032684326171875,
0.03619384765625,
0.0215301513671875,
-0.01080322265625,
0.023712158203125,
-0.01198577880859375,
0.0229034423828125,
-0.017364501953125,
-0.049774169921875,
0.02728271484375,
0.0197601318359375,
-0.0159454345703125,
0.0205841064453125,
-0.00634002685546875,
0.01495361328125,
-0.003490447998046875,
0.048126220703125,
-0.00249481201171875,
-0.053436279296875,
-0.01280975341796875,
-0.01416015625,
0.0189208984375,
-0.053253173828125,
-0.002712249755859375,
0.01190185546875,
-0.00853729248046875,
0.0022907257080078125,
0.0019407272338867188,
-0.052703857421875,
0.005092620849609375,
0.01294708251953125,
-0.04400634765625,
-0.0221710205078125,
0.00777435302734375,
-0.08404541015625,
-0.03997802734375,
0.00433349609375,
0.00913238525390625,
0.01331329345703125,
-0.03887939453125,
0.0167236328125,
-0.0042724609375,
-0.001705169677734375,
0.03240966796875,
0.025390625,
0.043182373046875,
0.0228118896484375,
-0.032684326171875,
0.047210693359375,
-0.0423583984375,
-0.01788330078125,
-0.0234375,
-0.0408935546875,
-0.072998046875,
-0.04766845703125,
0.0300140380859375,
-0.0063629150390625,
0.00757598876953125,
-0.036590576171875,
-0.05413818359375,
0.04534912109375,
0.05828857421875,
0.0552978515625,
-0.01514434814453125,
-0.01537322998046875,
0.0161590576171875,
-0.0335693359375,
-0.0060882568359375,
-0.029754638671875,
0.007122039794921875,
-0.003383636474609375,
0.0266571044921875,
-0.0067291259765625,
-0.0159759521484375,
-0.02178955078125,
-0.00710296630859375,
-0.035491943359375,
0.031707763671875,
-0.0202789306640625,
0.040863037109375,
0.0030918121337890625,
0.002628326416015625,
-0.0033435821533203125,
0.0235137939453125,
0.000255584716796875,
0.022613525390625,
0.07757568359375,
0.0014963150024414062,
0.0122528076171875,
-0.002185821533203125,
0.0075531005859375,
-0.0016326904296875,
-0.00559234619140625,
-0.002094268798828125,
-0.02447509765625,
-0.033782958984375,
0.058258056640625,
0.11187744140625,
-0.00586700439453125,
0.037872314453125,
0.030914306640625,
-0.026275634765625,
0.026397705078125,
-0.002338409423828125,
-0.026947021484375,
-0.01151275634765625,
0.04656982421875,
0.0095977783203125,
-0.03240966796875,
0.028533935546875,
-0.0271148681640625,
0.0142822265625,
0.051361083984375,
0.09747314453125,
-0.088134765625,
0.023284912109375,
0.0601806640625,
0.01055145263671875,
0.005649566650390625,
-0.0253448486328125,
0.0081329345703125,
0.0147247314453125,
0.035400390625,
0.0028839111328125,
-0.02874755859375,
0.0114288330078125,
-0.01235198974609375,
0.0088043212890625,
-0.018157958984375,
0.05535888671875,
0.0264892578125,
-0.042938232421875,
0.029022216796875,
0.036346435546875,
0.0198974609375,
0.032440185546875,
0.0179901123046875,
-0.051971435546875,
-0.066162109375,
-0.07183837890625,
-0.085205078125,
-0.0004429817199707031,
-0.055908203125,
0.01727294921875,
-0.0113677978515625,
0.013336181640625,
0.03662109375,
-0.016998291015625,
0.00960540771484375,
0.020172119140625,
-0.016632080078125,
0.0168914794921875,
-0.03643798828125,
0.01351165771484375,
0.0758056640625,
-0.0780029296875,
0.0167694091796875,
-0.011444091796875,
0.013946533203125,
0.0181884765625,
0.036865234375,
0.058197021484375,
-0.039093017578125,
-0.022613525390625,
0.01078033447265625,
-0.0227813720703125,
0.02587890625,
-0.03179931640625,
0.05487060546875,
-0.08172607421875,
-0.035186767578125,
0.0044403076171875,
-0.022705078125,
-0.034637451171875,
-0.03302001953125,
-0.0236053466796875,
0.03131103515625,
-0.0158538818359375,
-0.034210205078125,
0.022491455078125,
0.0225830078125,
-0.02294921875,
-0.004016876220703125,
-0.00894927978515625,
0.032684326171875,
0.0296630859375,
0.05743408203125,
-0.037750244140625,
-0.0294342041015625,
0.0416259765625,
0.0740966796875,
-0.0032672882080078125,
0.0016717910766601562,
0.0262908935546875,
0.01494598388671875,
0.007396697998046875,
-0.0164794921875,
-0.039825439453125,
0.018829345703125,
0.0179443359375,
0.012908935546875,
0.03350830078125,
-0.01186370849609375,
0.046630859375,
-0.047119140625,
-0.003757476806640625,
0.0210723876953125,
0.01178741455078125,
-0.000009834766387939453,
-0.01215362548828125,
-0.01084136962890625,
-0.0130767822265625,
-0.00568389892578125,
-0.006153106689453125,
0.017547607421875,
-0.0176239013671875,
0.01088714599609375,
-0.009552001953125,
-0.004123687744140625,
-0.0246124267578125,
-0.018310546875,
0.0243682861328125,
0.004863739013671875,
-0.007358551025390625,
0.010162353515625,
0.0028324127197265625,
-0.003131866455078125,
0.0007686614990234375,
-0.00669097900390625,
0.03680419921875,
-0.019683837890625,
-0.003734588623046875,
0.0308837890625,
0.041046142578125,
0.035247802734375,
0.047088623046875,
0.01126861572265625,
-0.008056640625,
-0.01233673095703125,
-0.07318115234375,
-0.00824737548828125,
-0.00811767578125,
0.023406982421875,
0.0187530517578125,
0.00434112548828125,
-0.0272979736328125,
0.038055419921875,
-0.0576171875,
-0.00826263427734375,
0.00849151611328125,
0.00876617431640625,
-0.006603240966796875,
0.0224609375,
0.00469207763671875,
-0.023284912109375,
-0.0419921875,
0.01165771484375,
0.01373291015625,
0.0703125,
0.0182952880859375,
0.020782470703125,
-0.02911376953125,
-0.035003662109375,
-0.0116729736328125,
0.032440185546875,
-0.02288818359375,
0.01363372802734375,
-0.0169525146484375,
-0.0141143798828125,
-0.0033931732177734375,
0.0245513916015625,
-0.004375457763671875,
-0.0309295654296875,
0.033721923828125,
0.03851318359375,
-0.0560302734375,
-0.02679443359375,
0.035308837890625,
-0.01495361328125,
-0.067626953125,
0.002948760986328125,
-0.0076751708984375,
0.0411376953125,
0.01465606689453125,
0.0142059326171875,
0.041839599609375,
0.017547607421875,
-0.0163421630859375,
-0.00846099853515625,
0.005908966064453125,
-0.0194244384765625,
0.04534912109375,
-0.0084686279296875,
0.014617919921875,
0.01139068603515625,
0.032806396484375,
0.006473541259765625,
-0.0268096923828125,
0.03472900390625,
-0.0164031982421875,
0.004344940185546875,
0.026397705078125,
0.0300140380859375,
0.036163330078125,
0.023468017578125,
-0.007083892822265625,
-0.0131988525390625,
-0.002605438232421875,
-0.041656494140625,
0.03302001953125,
0.006847381591796875,
-0.0418701171875,
-0.034637451171875,
-0.030487060546875,
0.047027587890625,
0.017547607421875,
0.08544921875,
-0.0288848876953125,
0.0307159423828125,
-0.019134521484375,
-0.0029087066650390625,
-0.01433563232421875,
-0.02294921875,
0.04266357421875,
0.005664825439453125,
-0.0196990966796875,
-0.0266876220703125,
-0.06292724609375,
0.041534423828125,
0.0093231201171875,
0.00003510713577270508,
0.07183837890625,
-0.03631591796875,
-0.006015777587890625,
-0.0322265625,
0.0151824951171875,
-0.015472412109375,
-0.049072265625,
-0.01319122314453125,
0.0341796875,
0.0033359527587890625,
0.044891357421875,
-0.00021004676818847656,
-0.0382080078125,
0.00736236572265625,
-0.032318115234375,
0.006511688232421875,
0.0275421142578125,
0.00495147705078125,
0.04302978515625,
-0.0014848709106445312,
0.02093505859375,
-0.06793212890625,
-0.0455322265625,
0.0113525390625,
-0.01123046875,
-0.01555633544921875,
-0.05072021484375,
0.02337646484375,
-0.0110321044921875,
-0.014984130859375,
0.0153045654296875,
-0.0296173095703125,
0.00011610984802246094,
-0.00604248046875,
0.0164642333984375,
0.0161895751953125,
0.00710296630859375,
0.00031256675720214844,
-0.0201263427734375,
-0.0206756591796875,
0.012786865234375,
-0.04443359375,
-0.0161895751953125,
-0.0271759033203125,
0.0158538818359375,
0.06365966796875,
-0.002346038818359375,
-0.018768310546875,
0.005970001220703125,
-0.032958984375,
0.036285400390625,
0.026519775390625,
0.005718231201171875,
-0.0039520263671875,
-0.019989013671875,
-0.03314208984375,
-0.0338134765625,
-0.0338134765625,
0.03253173828125,
-0.023773193359375,
-0.00640869140625,
0.006511688232421875,
0.000835418701171875,
-0.003246307373046875,
-0.026275634765625,
-0.01169586181640625,
0.0243988037109375,
-0.00537872314453125,
-0.022705078125,
0.012969970703125,
0.0225830078125,
-0.0343017578125,
-0.07403564453125,
0.00620269775390625,
-0.060943603515625,
0.0210723876953125,
-0.00009888410568237305,
-0.038604736328125,
-0.0132904052734375,
-0.06072998046875,
-0.07611083984375,
0.07794189453125,
-0.01049041748046875,
-0.0223236083984375,
0.0024261474609375,
-0.036956787109375,
-0.02410888671875,
0.042449951171875,
0.01094818115234375,
-0.01434326171875,
-0.018157958984375,
0.04608154296875,
0.0000788569450378418,
-0.02740478515625,
0.048492431640625,
-0.04852294921875,
-0.0205230712890625,
0.004974365234375,
0.0355224609375,
0.01245880126953125,
-0.0173187255859375,
0.01107025146484375,
0.0273895263671875,
0.02545166015625,
-0.0207977294921875,
0.06512451171875,
0.004947662353515625,
0.01508331298828125,
0.0111083984375,
-0.00940704345703125,
-0.03021240234375,
-0.01526641845703125,
0.07867431640625,
0.003391265869140625,
0.017059326171875,
-0.01456451416015625,
-0.051483154296875,
-0.035308837890625,
0.02459716796875,
-0.016326904296875,
0.0005445480346679688,
-0.062103271484375,
-0.007568359375,
-0.0021915435791015625,
0.017181396484375,
0.02166748046875,
0.0169219970703125,
0.002498626708984375,
-0.0225067138671875,
0.020355224609375,
-0.0213775634765625,
-0.034759521484375,
-0.07049560546875,
0.01166534423828125,
0.0023059844970703125,
0.0264434814453125,
-0.021087646484375,
0.04840087890625,
0.0135498046875,
0.026519775390625,
0.0033130645751953125,
0.0079345703125,
-0.003658294677734375,
0.0279998779296875,
0.0184173583984375,
0.0164031982421875,
-0.0123443603515625,
-0.025054931640625,
0.002361297607421875,
-0.0076751708984375,
-0.0162200927734375,
-0.007549285888671875,
0.0216827392578125,
-0.0310516357421875,
-0.028594970703125,
0.04937744140625,
-0.034423828125,
0.0123291015625,
-0.055206298828125,
0.0556640625,
-0.0293731689453125,
0.0082550048828125,
0.004528045654296875,
0.006252288818359375,
0.0211639404296875,
0.0158538818359375,
0.02349853515625,
-0.0227203369140625,
0.01544952392578125,
0.0675048828125,
0.01288604736328125,
0.01313018798828125
] |
e4d5cc6fc86c4e495c6c54786bc24159b6e3612c | Wordpress Stackexchange
Q: Nginx - Prevent Access to Debug file I am logging to debug file
wp-content/debug.log
but any user can download the file, if they put the url on their browser. How could I prevent access to this file using Nginx?
A: I've frequently seen this used in Apache 2.2:
<Files "debug.log">
Order allow,deny
Deny from all
</Files>
but that's deprecated in Apache 2.4:
The Allow, Deny, and Order directives, provided by mod_access_compat,
are deprecated and will go away in a future version. You should avoid
using them, and avoid outdated tutorials recommending their use.
I just tested with the Require directive in Apache 2.4:
Require all denied
Access is denied unconditionally.
with:
<Files "debug.log">
Require all denied
</Files>
and it seems to block it with 403 forbidden.
Note that it will block access from example.tld/debug.log, example.tld/wp-content/debug.log etc.
Update
I just noticed that you mentioned NginX, so I tested various location patterns and this seems to work:
location ~* /debug\.log$
{
deny all;
}
where the ~* modifier is for case insensitive regular expression matching.
| Q: Nginx - Prevent Access to Debug file I am logging to debug file
wp-content/debug.log
but any user can download the file, if they put the url on their browser. How could I prevent access to this file using Nginx?
A: I've frequently seen this used in Apache 2.2:
<Files "debug.log">
Order allow,deny
Deny from all
</Files>
but that's deprecated in Apache 2.4:
The Allow, Deny, and Order directives, provided by mod_access_compat,
are deprecated and will go away in a future version. You should avoid
using them, and avoid outdated tutorials recommending their use.
I just tested with the Require directive in Apache 2.4:
Require all denied
Access is denied unconditionally.
with:
<Files "debug.log">
Require all denied
</Files>
and it seems to block it with 403 forbidden.
Note that it will block access from example.tld/debug.log, example.tld/wp-content/debug.log etc.
Update
I just noticed that you mentioned NginX, so I tested various location patterns and this seems to work:
location ~* /debug\.log$
{
deny all;
}
where the ~* modifier is for case insensitive regular expression matching.
| wordpress | {
"language": "en",
"length": 174,
"provenance": "stackexchange_00019.jsonl.gz:470661",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247627"
} | [
0.061798095703125,
0.0146026611328125,
0.0176849365234375,
-0.053253173828125,
0.0035858154296875,
0.0022373199462890625,
-0.0137176513671875,
-0.025787353515625,
-0.01505279541015625,
0.0263214111328125,
-0.003368377685546875,
-0.0224609375,
0.028289794921875,
-0.022308349609375,
0.00174713134765625,
-0.026702880859375,
0.0207366943359375,
0.025390625,
0.05328369140625,
-0.005985260009765625,
-0.00402069091796875,
0.0141143798828125,
0.038543701171875,
0.0009975433349609375,
0.007541656494140625,
0.023529052734375,
0.050567626953125,
-0.01235198974609375,
0.0228118896484375,
0.018310546875,
0.0127105712890625,
-0.05535888671875,
0.049713134765625,
0.0758056640625,
-0.1336669921875,
0.0333251953125,
-0.013580322265625,
0.00598907470703125,
-0.032958984375,
0.045166015625,
0.0280303955078125,
-0.0087890625,
0.024871826171875,
0.0281829833984375,
-0.004306793212890625,
-0.0242156982421875,
0.0276641845703125,
-0.0474853515625,
0.040435791015625,
0.0182952880859375,
-0.0006170272827148438,
0.037384033203125,
-0.007709503173828125,
0.01007843017578125,
-0.0145111083984375,
-0.0086669921875,
-0.0460205078125,
0.047149658203125,
0.009857177734375,
0.01216888427734375,
0.0057830810546875,
0.00891876220703125,
0.006038665771484375,
-0.005397796630859375,
0.0233154296875,
-0.00980377197265625,
-0.002880096435546875,
0.0272216796875,
-0.0556640625,
0.0281829833984375,
0.036651611328125,
-0.04931640625,
0.00994873046875,
-0.01282501220703125,
0.01305389404296875,
-0.0222625732421875,
-0.0027141571044921875,
-0.0004379749298095703,
0.0209808349609375,
0.004947662353515625,
0.0081634521484375,
-0.08734130859375,
0.01071929931640625,
0.0219268798828125,
-0.036834716796875,
0.01541900634765625,
0.006816864013671875,
0.001354217529296875,
0.0119171142578125,
-0.01230621337890625,
-0.016937255859375,
0.048004150390625,
-0.005062103271484375,
-0.01491546630859375,
-0.0250396728515625,
-0.03363037109375,
-0.0127105712890625,
-0.006580352783203125,
0.011383056640625,
-0.00533294677734375,
0.00469207763671875,
-0.01934814453125,
-0.03753662109375,
-0.0023479461669921875,
-0.0191650390625,
0.07598876953125,
-0.003520965576171875,
0.018463134765625,
0.038330078125,
0.019500732421875,
0.043060302734375,
0.005672454833984375,
-0.0177154541015625,
-0.04058837890625,
-0.0140380859375,
0.044158935546875,
-0.00258636474609375,
-0.005306243896484375,
0.0130462646484375,
0.005237579345703125,
0.00609588623046875,
0.0159454345703125,
0.0074005126953125,
-0.0240631103515625,
0.00920867919921875,
-0.008819580078125,
-0.03338623046875,
0.00579833984375,
0.0236663818359375,
0.057861328125,
-0.005954742431640625,
-0.005046844482421875,
-0.05035400390625,
-0.035125732421875,
-0.0333251953125,
-0.0277252197265625,
-0.0016307830810546875,
-0.0014495849609375,
0.022430419921875,
0.0012197494506835938,
-0.002208709716796875,
-0.03533935546875,
0.0164031982421875,
0.02008056640625,
-0.023345947265625,
-0.0035533905029296875,
0.01006317138671875,
0.0226898193359375,
0.0031890869140625,
-0.04833984375,
0.011871337890625,
-0.01210784912109375,
0.041778564453125,
-0.0017375946044921875,
-0.028045654296875,
-0.022003173828125,
0.0245513916015625,
-0.03570556640625,
-0.03179931640625,
-0.0517578125,
0.005924224853515625,
0.01064300537109375,
0.0279388427734375,
-0.0784912109375,
-0.058837890625,
-0.0281524658203125,
-0.053558349609375,
-0.007602691650390625,
0.0197601318359375,
0.03411865234375,
-0.00261688232421875,
-0.01201629638671875,
0.0001112222671508789,
0.01103973388671875,
0.00336456298828125,
0.0231781005859375,
0.00830841064453125,
-0.01471710205078125,
0.003936767578125,
0.058807373046875,
0.02374267578125,
-0.01334381103515625,
0.03326416015625,
0.0007381439208984375,
-0.039825439453125,
0.01155853271484375,
-0.0100250244140625,
0.00921630859375,
0.04193115234375,
-0.01751708984375,
0.05328369140625,
0.0014543533325195312,
-0.01666259765625,
0.0308837890625,
-0.01027679443359375,
-0.04058837890625,
-0.017425537109375,
-0.009033203125,
-0.029510498046875,
-0.0083770751953125,
0.00487518310546875,
0.00962066650390625,
-0.0013570785522460938,
0.00882720947265625,
0.004001617431640625,
-0.01305389404296875,
0.0003097057342529297,
0.0149383544921875,
-0.00800323486328125,
-0.01326751708984375,
0.0043182373046875,
0.005550384521484375,
-0.00279998779296875,
-0.048004150390625,
-0.0298919677734375,
0.0213775634765625,
-0.0284576416015625,
0.06439208984375,
0.0063629150390625,
0.038177490234375,
-0.01030731201171875,
-0.0347900390625,
0.01318359375,
-0.049285888671875,
0.0152587890625,
0.0044403076171875,
-0.01238250732421875,
0.002643585205078125,
0.059478759765625,
-0.0030078887939453125,
0.058074951171875,
0.0083770751953125,
0.039764404296875,
0.0229034423828125,
-0.016937255859375,
-0.0216827392578125,
-0.020416259765625,
-0.1212158203125,
0.029937744140625,
0.0704345703125,
0.035064697265625,
-0.0024871826171875,
-0.0177764892578125,
-0.01210784912109375,
-0.02337646484375,
-0.0821533203125,
0.007701873779296875,
-0.01300048828125,
-0.01922607421875,
-0.01195526123046875,
-0.01459503173828125,
0.004787445068359375,
0.03509521484375,
-0.011260986328125,
-0.0241546630859375,
0.048187255859375,
0.044281005859375,
0.016510009765625,
-0.06329345703125,
0.05029296875,
0.0091705322265625,
0.037567138671875,
-0.0287933349609375,
0.026885986328125,
-0.030731201171875,
-0.033843994140625,
-0.0084686279296875,
0.01526641845703125,
0.031463623046875,
-0.045196533203125,
0.015869140625,
-0.01335906982421875,
-0.00768280029296875,
0.0159759521484375,
0.0067901611328125,
0.0126953125,
-0.03680419921875,
0.0036983489990234375,
0.0153961181640625,
0.016693115234375,
-0.03289794921875,
0.012451171875,
-0.0289154052734375,
-0.0212554931640625,
0.01800537109375,
-0.0278472900390625,
-0.0164794921875,
-0.045745849609375,
0.0196990966796875,
-0.01385498046875,
0.007511138916015625,
0.018218994140625,
-0.00722503662109375,
0.03924560546875,
-0.004302978515625,
-0.0380859375,
-0.004222869873046875,
-0.0360107421875,
0.041168212890625,
-0.035186767578125,
0.0132598876953125,
0.06976318359375,
-0.0034999847412109375,
0.005428314208984375,
0.01375579833984375,
0.04266357421875,
-0.0092315673828125,
-0.00858306884765625,
-0.0036869049072265625,
0.031951904296875,
-0.07305908203125,
0.00568389892578125,
0.01540374755859375,
-0.052276611328125,
0.044464111328125,
0.003631591796875,
-0.00324249267578125,
-0.0034351348876953125,
-0.04461669921875,
-0.054412841796875,
-0.027862548828125,
-0.0699462890625,
0.035675048828125,
-0.0071868896484375,
-0.027984619140625,
-0.02398681640625,
0.0264434814453125,
0.01183319091796875,
-0.0291290283203125,
-0.01317596435546875,
-0.0460205078125,
-0.051177978515625,
-0.027801513671875,
0.036773681640625,
-0.016510009765625,
0.00952911376953125,
0.00991058349609375,
0.056121826171875,
-0.0181427001953125,
-0.0504150390625,
-0.0294036865234375,
-0.029632568359375,
-0.0214385986328125,
-0.0224456787109375,
-0.0450439453125,
0.0074005126953125,
-0.0219573974609375,
-0.0016536712646484375,
-0.030029296875,
-0.0265960693359375,
0.042694091796875,
-0.01522064208984375,
-0.006084442138671875,
-0.023712158203125,
0.01513671875,
-0.004787445068359375,
0.015350341796875,
0.0002894401550292969,
0.01555633544921875,
-0.042755126953125,
0.00682830810546875,
-0.01523590087890625,
-0.033203125,
-0.01259613037109375,
0.014617919921875,
-0.0066680908203125,
0.0003883838653564453,
-0.006694793701171875,
0.061187744140625,
0.044219970703125,
-0.01107025146484375,
0.02227783203125,
0.016632080078125,
-0.0013036727905273438,
0.0296630859375,
-0.046478271484375,
0.06591796875,
-0.0094757080078125,
-0.036102294921875,
0.01096343994140625,
-0.02032470703125,
-0.006839752197265625,
-0.033905029296875,
-0.019439697265625,
0.007129669189453125,
0.032440185546875,
-0.01361846923828125,
0.058685302734375,
-0.054290771484375,
-0.018798828125,
-0.057373046875,
0.03509521484375,
-0.0067596435546875,
-0.0127105712890625,
-0.0093994140625,
0.0189056396484375,
-0.016082763671875,
-0.054901123046875,
-0.00830841064453125,
-0.01215362548828125,
0.0267181396484375,
-0.0033969879150390625,
-0.00439453125,
-0.0230865478515625,
0.0145263671875,
-0.1279296875,
0.01407623291015625,
-0.0305328369140625,
0.0201873779296875,
-0.016815185546875,
0.03680419921875,
0.002643585205078125,
0.06939697265625,
-0.034912109375,
0.01320648193359375,
-0.032867431640625,
-0.0413818359375,
-0.02056884765625,
-0.0110931396484375,
0.047637939453125,
0.004657745361328125,
0.00548553466796875,
-0.007183074951171875,
0.0435791015625,
0.002880096435546875,
-0.0416259765625,
0.0308990478515625,
-0.0010824203491210938,
-0.03173828125,
0.05389404296875,
0.0285491943359375,
-0.009307861328125,
0.01198577880859375,
0.006397247314453125,
-0.0272979736328125,
0.004055023193359375,
-0.03570556640625,
-0.035308837890625,
0.01229095458984375,
-0.03948974609375,
-0.0244140625,
-0.01666259765625,
-0.0006227493286132812,
0.01001739501953125,
0.032379150390625,
-0.044677734375,
-0.03717041015625,
-0.023834228515625,
0.027618408203125,
-0.011138916015625,
-0.01479339599609375,
0.0019025802612304688,
0.0263214111328125,
0.01708984375,
-0.01515960693359375,
-0.005123138427734375,
0.044891357421875,
0.02362060546875,
-0.0533447265625,
0.0738525390625,
0.032073974609375,
-0.0025653839111328125,
0.033843994140625,
-0.0335693359375,
0.01194000244140625,
-0.0166168212890625,
-0.006420135498046875,
-0.01922607421875,
-0.041259765625,
0.02752685546875,
-0.022918701171875,
0.0214691162109375,
0.009185791015625,
0.0010309219360351562,
0.0246429443359375,
0.00510406494140625,
-0.0025234222412109375,
-0.006744384765625,
-0.007358551025390625,
-0.0076751708984375,
-0.048004150390625,
0.0022792816162109375,
-0.045013427734375,
0.03680419921875,
0.003726959228515625,
0.004177093505859375,
0.032562255859375,
0.036773681640625,
-0.01279449462890625,
0.044403076171875,
0.0576171875,
0.0032444000244140625,
0.0269927978515625,
0.046234130859375,
-0.01151275634765625,
-0.0379638671875,
-0.012237548828125,
0.0150146484375,
-0.0173187255859375,
-0.0706787109375,
0.03656005859375,
-0.026123046875,
0.007236480712890625,
0.0208282470703125,
-0.0285797119140625,
0.0016155242919921875,
-0.028045654296875,
-0.01523590087890625,
0.02679443359375,
-0.0054473876953125,
-0.06365966796875,
-0.01535797119140625,
0.005939483642578125,
-0.0179443359375,
-0.0171051025390625,
0.050567626953125,
-0.0157928466796875,
-0.05908203125,
0.031036376953125,
0.00414276123046875,
-0.0011987686157226562,
-0.001888275146484375,
0.0287322998046875,
0.017547607421875,
-0.00687408447265625,
0.01198577880859375,
-0.01116180419921875,
0.03173828125,
-0.0499267578125,
-0.0261077880859375,
0.039337158203125,
0.058929443359375,
-0.03363037109375,
-0.032928466796875,
0.010406494140625,
-0.0095672607421875,
0.014068603515625,
-0.016082763671875,
-0.042572021484375,
-0.006931304931640625,
-0.00850677490234375,
-0.034759521484375,
0.0003323554992675781,
-0.020904541015625,
0.002017974853515625,
0.0276947021484375,
0.022186279296875,
0.01263427734375,
0.048126220703125,
-0.059967041015625,
0.00933074951171875,
0.032470703125,
-0.011688232421875,
-0.038299560546875,
-0.02685546875,
0.0211181640625,
0.01360321044921875,
-0.01180267333984375,
-0.0198974609375,
0.0224609375,
-0.01406097412109375,
0.0224151611328125,
-0.039520263671875,
-0.00614166259765625,
-0.003986358642578125,
0.00024318695068359375,
0.052764892578125,
0.0301055908203125,
-0.0010967254638671875,
0.004306793212890625,
-0.03125,
-0.0318603515625,
0.00913238525390625,
-0.007122039794921875,
-0.017913818359375,
-0.00881195068359375,
-0.00583648681640625,
0.0037097930908203125,
-0.01296234130859375,
-0.00948333740234375,
0.001438140869140625,
0.031646728515625,
0.0134429931640625,
0.021820068359375,
-0.0340576171875,
0.037017822265625,
0.0186920166015625,
-0.01338958740234375,
0.0085296630859375,
0.03692626953125,
0.01314544677734375,
-0.0109100341796875,
0.0266876220703125,
-0.00968170166015625,
-0.0372314453125,
-0.054229736328125,
0.01070404052734375,
0.0190277099609375,
0.08074951171875,
-0.01300811767578125,
-0.005947113037109375,
-0.00943756103515625,
-0.00021648406982421875,
-0.022369384765625,
0.01334381103515625,
0.0026721954345703125,
0.0156402587890625,
-0.041351318359375,
0.0033779144287109375,
0.046539306640625,
-0.04010009765625,
-0.0267333984375,
0.04986572265625,
-0.016143798828125,
0.056488037109375,
-0.0039825439453125,
0.0173797607421875,
0.0241546630859375,
0.1318359375,
0.01136016845703125,
0.0675048828125,
0.0560302734375,
0.004436492919921875,
0.04998779296875,
0.0347900390625,
0.00905609130859375,
-0.0277099609375,
0.030364990234375,
0.00669097900390625,
-0.006580352783203125,
0.0008754730224609375,
-0.025482177734375,
0.0152130126953125,
0.04693603515625,
0.034210205078125,
-0.0667724609375,
0.01007843017578125,
-0.00666046142578125,
-0.0019855499267578125,
0.0433349609375,
-0.0164794921875,
0.004077911376953125,
-0.0283203125,
0.003810882568359375,
-0.0008893013000488281,
-0.0183563232421875,
-0.012420654296875,
-0.0164031982421875,
0.028839111328125,
0.005069732666015625,
0.0128326416015625,
-0.007965087890625,
-0.0160980224609375,
-0.0204010009765625,
0.015106201171875,
0.0265960693359375,
-0.0090179443359375,
-0.007320404052734375,
-0.0259246826171875,
-0.0501708984375,
-0.047454833984375,
-0.028076171875,
-0.0113983154296875,
-0.021087646484375,
0.0047454833984375,
0.03057861328125,
-0.003742218017578125,
0.037994384765625,
-0.00991058349609375,
0.012176513671875,
-0.0006785392761230469,
0.00019299983978271484,
0.020233154296875,
-0.004619598388671875,
-0.03521728515625,
-0.0300140380859375,
0.026519775390625,
-0.008392333984375,
-0.018951416015625,
-0.0167236328125,
-0.003208160400390625,
0.004207611083984375,
0.0765380859375,
-0.0648193359375,
-0.0099029541015625,
0.0189056396484375,
-0.004749298095703125,
-0.00505828857421875,
-0.00482177734375,
0.0139007568359375,
-0.0325927734375,
0.0098419189453125,
0.0008540153503417969,
0.0003833770751953125,
0.01036834716796875,
0.004848480224609375,
-0.022125244140625,
0.037200927734375,
-0.0291290283203125,
0.0081939697265625,
0.0269317626953125,
-0.0030879974365234375,
-0.02545166015625,
-0.01044464111328125,
-0.03668212890625,
0.07763671875,
0.0139923095703125,
0.0723876953125,
-0.0379638671875,
-0.0264129638671875,
0.056427001953125,
0.04449462890625,
0.0164947509765625,
0.0242462158203125,
-0.06280517578125,
-0.0243072509765625,
-0.01023101806640625,
-0.034637451171875,
-0.006793975830078125,
0.0765380859375,
-0.0208587646484375,
0.01163482666015625,
-0.01157379150390625,
-0.051239013671875,
0.007419586181640625,
-0.02374267578125,
-0.0181427001953125,
-0.0017852783203125,
0.0066680908203125,
-0.02313232421875,
-0.00615692138671875,
0.041656494140625,
-0.0811767578125,
0.015350341796875,
0.045867919921875,
0.04644775390625,
-0.0009088516235351562,
0.0328369140625,
0.05816650390625,
-0.051177978515625,
-0.055450439453125,
-0.0210723876953125,
0.05181884765625,
0.02825927734375,
-0.027069091796875,
0.0291900634765625,
0.024871826171875,
-0.07562255859375,
-0.022552490234375,
-0.01416015625,
0.0148162841796875,
-0.03802490234375,
-0.01018524169921875,
0.07366943359375,
0.0369873046875,
0.0501708984375,
0.0000743865966796875,
0.037628173828125,
0.0173187255859375,
-0.0059356689453125,
-0.05987548828125,
0.0030574798583984375,
-0.020965576171875,
0.0030517578125,
0.0183258056640625,
0.0025386810302734375,
-0.01103973388671875,
0.020263671875,
-0.0228424072265625,
0.00786590576171875,
0.0233001708984375,
-0.00847625732421875,
0.006725311279296875,
0.0292510986328125,
-0.0090179443359375,
0.00574493408203125,
0.0154266357421875,
-0.024200439453125,
0.00543975830078125,
-0.0222015380859375,
0.0060272216796875,
-0.027801513671875,
0.01499176025390625,
0.0210113525390625,
-0.023712158203125,
0.0296630859375,
-0.0017938613891601562,
0.0266571044921875,
-0.043670654296875,
-0.029998779296875,
-0.0072174072265625,
0.048248291015625,
0.0634765625,
0.0294036865234375,
0.029998779296875,
0.0013170242309570312,
-0.0113983154296875,
0.0144805908203125,
0.0294342041015625,
-0.016510009765625,
0.00806427001953125,
-0.0234222412109375,
-0.05279541015625,
-0.017242431640625,
-0.038543701171875,
-0.0023212432861328125,
-0.026275634765625,
-0.0086517333984375,
-0.01238250732421875,
0.0031032562255859375,
0.0015087127685546875,
-0.01445770263671875,
0.032562255859375,
-0.06939697265625,
-0.020172119140625,
-0.0260009765625,
-0.0011835098266601562,
0.01053619384765625,
0.001316070556640625,
-0.043792724609375,
-0.0150299072265625,
0.01471710205078125,
-0.0038471221923828125,
0.02850341796875,
0.037200927734375,
0.0009174346923828125,
-0.035430908203125,
0.0026912689208984375,
0.015869140625,
-0.06683349609375,
0.01556396484375,
-0.0178070068359375,
-0.057464599609375,
-0.01015472412109375,
-0.03851318359375,
0.01143646240234375,
0.0273284912109375,
0.04248046875,
0.001983642578125,
0.027496337890625,
-0.032928466796875,
-0.01000213623046875,
-0.0216522216796875,
0.0085296630859375,
-0.0452880859375,
0.004100799560546875,
-0.0094451904296875,
0.007366180419921875,
-0.057891845703125,
0.0672607421875,
0.01479339599609375,
0.01479339599609375,
0.06439208984375,
-0.01508331298828125,
-0.00612640380859375,
-0.0191802978515625,
-0.03167724609375,
-0.0404052734375,
-0.05841064453125,
0.0079803466796875,
0.033233642578125,
-0.035614013671875,
-0.01806640625,
-0.00032711029052734375,
0.04351806640625,
-0.002948760986328125,
0.0203094482421875,
0.01214599609375,
-0.022674560546875,
0.0009307861328125,
0.01708984375,
-0.0271148681640625,
0.0146942138671875,
-0.03509521484375,
-0.037750244140625,
0.042755126953125,
-0.023834228515625,
0.0236053466796875,
-0.03961181640625,
0.03936767578125,
-0.050567626953125,
0.034088134765625,
0.051116943359375,
0.027801513671875,
0.032135009765625,
-0.049407958984375,
-0.004367828369140625,
-0.0022258758544921875,
-0.0145721435546875,
-0.01325225830078125,
-0.0176849365234375,
-0.004241943359375,
0.01403045654296875,
-0.001255035400390625,
-0.046844482421875,
-0.0287933349609375,
0.0187835693359375,
0.037139892578125,
-0.0229644775390625,
-0.034271240234375,
0.0396728515625,
-0.05755615234375,
0.0416259765625,
-0.005641937255859375,
0.0435791015625,
-0.034637451171875,
-0.0244598388671875,
-0.038543701171875,
-0.018707275390625,
-0.027191162109375,
0.04681396484375,
0.00527191162109375,
0.006916046142578125,
0.0037994384765625,
0.02227783203125,
0.03033447265625,
0.0030117034912109375,
-0.020721435546875,
0.052215576171875,
-0.08795166015625,
-0.0248565673828125,
-0.015869140625,
-0.01482391357421875,
-0.0142822265625,
-0.024871826171875,
0.01259613037109375,
-0.05804443359375,
-0.04571533203125,
0.024566650390625,
-0.0246124267578125,
-0.014129638671875,
-0.049163818359375,
-0.10028076171875,
0.034027099609375,
0.0045623779296875,
-0.04779052734375,
-0.0625,
-0.0157012939453125,
-0.0010585784912109375,
0.07537841796875,
-0.004505157470703125,
-0.028961181640625,
-0.045074462890625,
0.021087646484375,
-0.012603759765625,
-0.0037994384765625,
-0.00769805908203125,
0.013946533203125,
0.019378662109375,
0.052703857421875,
0.07086181640625,
-0.049713134765625,
-0.0310821533203125,
0.01073455810546875,
0.054107666015625,
0.0211639404296875,
0.01273345947265625,
0.099609375,
0.054351806640625,
-0.032379150390625,
-0.00894927978515625,
0.0091552734375,
-0.039581298828125,
-0.0150299072265625,
0.06524658203125,
0.091064453125,
0.0241851806640625,
-0.0255279541015625,
-0.033721923828125,
-0.07965087890625,
-0.0013875961303710938,
-0.024871826171875,
0.02691650390625,
-0.09283447265625,
0.0061187744140625,
0.0396728515625,
0.00998687744140625,
0.01947021484375,
0.008758544921875,
-0.026153564453125,
-0.007167816162109375,
0.0170440673828125,
-0.0176239013671875,
-0.055908203125,
-0.007381439208984375,
0.06689453125,
-0.04180908203125,
0.03594970703125,
-0.0308837890625,
0.03643798828125,
0.06011962890625,
-0.060150146484375,
-0.027191162109375,
-0.00824737548828125,
0.003940582275390625,
0.043548583984375,
0.0030651092529296875,
0.044342041015625,
-0.024200439453125,
0.006313323974609375,
-0.037750244140625,
-0.004085540771484375,
0.007221221923828125,
-0.01605224609375,
-0.0084075927734375,
0.0299224853515625,
0.015899658203125,
0.08380126953125,
-0.01204681396484375,
-0.03778076171875,
-0.02935791015625,
0.032958984375,
-0.01274871826171875,
-0.014556884765625,
0.0201568603515625,
-0.01541900634765625,
0.0096282958984375,
0.02423095703125,
0.0263671875,
-0.01067352294921875,
0.0211944580078125,
-0.019287109375,
0.018646240234375,
0.001682281494140625
] |
32b8a9d405924134578a8a2a26c1b94300f3b357 | Wordpress Stackexchange
Q: How to prevent WP-CLI shell from exiting when an exception occurs? I am using WP-CLI shell to quickly debug some code, but every time I run into a fatal exception (e.g. undefined constants/functions) the shell exits and I lose my shell session. Is there a way to prevent this?
wp> new DoesntExist();
Fatal error: Class 'DoesntExist' not found in phar:///usr/local/bin/wp/php/WP_CLI/REPL.php(37) : eval()'d code on line 1
Shell exits..
A: This is the default behavior of WP-CLI's built-in PHP REPL. If you look at the wp shell documentation, it shows that you can also use the Boris or PsySH PHP REPLs.
The Boris REPL does not seem to be actively maintained; however the PsySH REPL has fairly recent maintenance, and it fixes the problem that you're experiencing.
The easiest way to integrate PsySH with WP-CLI is to use the wp-cli-psysh plugin:
# Make sure WP-CLI is up to date
wp cli update
# Install the plugin
wp package install [email protected]:schlessera/wp-cli-psysh.git
After installing the plugin, running wp shell should show you a PsySH header that's similar to this:
$ wp shell
Psy Shell v0.9.9 (PHP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 — cli) by Justin Hileman
>>>
| Q: How to prevent WP-CLI shell from exiting when an exception occurs? I am using WP-CLI shell to quickly debug some code, but every time I run into a fatal exception (e.g. undefined constants/functions) the shell exits and I lose my shell session. Is there a way to prevent this?
wp> new DoesntExist();
Fatal error: Class 'DoesntExist' not found in phar:///usr/local/bin/wp/php/WP_CLI/REPL.php(37) : eval()'d code on line 1
Shell exits..
A: This is the default behavior of WP-CLI's built-in PHP REPL. If you look at the wp shell documentation, it shows that you can also use the Boris or PsySH PHP REPLs.
The Boris REPL does not seem to be actively maintained; however the PsySH REPL has fairly recent maintenance, and it fixes the problem that you're experiencing.
The easiest way to integrate PsySH with WP-CLI is to use the wp-cli-psysh plugin:
# Make sure WP-CLI is up to date
wp cli update
# Install the plugin
wp package install [email protected]:schlessera/wp-cli-psysh.git
After installing the plugin, running wp shell should show you a PsySH header that's similar to this:
$ wp shell
Psy Shell v0.9.9 (PHP 7.3.1-1+ubuntu18.04.1+deb.sury.org+1 — cli) by Justin Hileman
>>>
| wordpress | {
"language": "en",
"length": 191,
"provenance": "stackexchange_00019.jsonl.gz:470670",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247658"
} | [
0.04315185546875,
-0.00445556640625,
0.0020961761474609375,
-0.0716552734375,
0.00888824462890625,
0.003448486328125,
-0.036529541015625,
-0.01068878173828125,
0.01898193359375,
0.016387939453125,
-0.01374053955078125,
-0.0323486328125,
-0.0272369384765625,
-0.025299072265625,
-0.03106689453125,
-0.041778564453125,
0.0249176025390625,
-0.0237274169921875,
0.0253448486328125,
-0.0207061767578125,
0.0228424072265625,
-0.018035888671875,
0.085205078125,
0.05023193359375,
0.00691986083984375,
-0.01049041748046875,
0.06622314453125,
0.0084228515625,
-0.004337310791015625,
-0.02886962890625,
0.00942230224609375,
0.006038665771484375,
0.0297698974609375,
0.04644775390625,
-0.058074951171875,
0.0214996337890625,
-0.0160980224609375,
0.02154541015625,
-0.01361846923828125,
0.00598907470703125,
-0.05657958984375,
0.0562744140625,
0.0214996337890625,
-0.021636962890625,
-0.034637451171875,
-0.0182647705078125,
-0.0655517578125,
-0.0062408447265625,
0.0291290283203125,
-0.0246429443359375,
-0.0155181884765625,
0.07275390625,
-0.005016326904296875,
-0.029266357421875,
-0.01148223876953125,
-0.00289154052734375,
-0.06304931640625,
0.010894775390625,
0.0108642578125,
0.052520751953125,
0.024505615234375,
-0.00897216796875,
-0.004833221435546875,
-0.011322021484375,
0.0161895751953125,
0.005130767822265625,
-0.015594482421875,
0.045074462890625,
-0.057373046875,
0.008148193359375,
0.028167724609375,
-0.051422119140625,
0.02618408203125,
0.001445770263671875,
-0.005275726318359375,
-0.0263824462890625,
-0.005916595458984375,
-0.006008148193359375,
0.0292510986328125,
-0.0022716522216796875,
0.03265380859375,
-0.0165863037109375,
-0.007312774658203125,
0.020599365234375,
0.0168914794921875,
0.05059814453125,
-0.00679779052734375,
-0.031341552734375,
-0.006801605224609375,
0.0140838623046875,
-0.02215576171875,
-0.01068878173828125,
-0.0118865966796875,
0.01458740234375,
0.00891876220703125,
-0.0313720703125,
-0.05908203125,
-0.07611083984375,
-0.0304412841796875,
0.0242462158203125,
0.0269927978515625,
-0.0268096923828125,
0.046630859375,
-0.0003757476806640625,
0.001796722412109375,
0.089111328125,
-0.02020263671875,
-0.040924072265625,
-0.0007653236389160156,
0.006710052490234375,
0.0118560791015625,
-0.05316162109375,
-0.0208587646484375,
-0.07354736328125,
0.01409912109375,
0.058685302734375,
-0.0006089210510253906,
-0.005886077880859375,
0.030548095703125,
-0.004711151123046875,
0.01123809814453125,
0.0081787109375,
-0.00844573974609375,
-0.0178070068359375,
0.0238494873046875,
0.0200958251953125,
-0.0211639404296875,
-0.0087127685546875,
0.0132598876953125,
-0.0218505859375,
-0.019073486328125,
0.01291656494140625,
0.046905517578125,
0.04791259765625,
0.01549530029296875,
-0.003753662109375,
0.042877197265625,
-0.0261383056640625,
0.0099029541015625,
0.032623291015625,
-0.025299072265625,
-0.0213470458984375,
0.0269927978515625,
-0.01320648193359375,
0.02056884765625,
0.04736328125,
0.032318115234375,
-0.0250396728515625,
-0.00267791748046875,
-0.02264404296875,
-0.031982421875,
-0.006954193115234375,
0.03466796875,
0.0118865966796875,
0.022216796875,
-0.017547607421875,
0.037200927734375,
-0.03240966796875,
0.014862060546875,
-0.0268096923828125,
0.01305389404296875,
-0.029571533203125,
-0.029510498046875,
-0.016571044921875,
-0.04278564453125,
0.04498291015625,
-0.00441741943359375,
-0.0065765380859375,
0.01200103759765625,
0.0077362060546875,
0.034454345703125,
-0.0023555755615234375,
0.0222320556640625,
0.00818634033203125,
-0.00460052490234375,
-0.0091094970703125,
-0.011932373046875,
0.01392364501953125,
0.04364013671875,
-0.01358795166015625,
-0.04058837890625,
-0.04705810546875,
0.04595947265625,
-0.02642822265625,
-0.056182861328125,
0.01195526123046875,
-0.0002244710922241211,
0.03125,
0.0511474609375,
0.000017940998077392578,
0.02069091796875,
-0.009735107421875,
-0.0025768280029296875,
0.0234832763671875,
-0.0268707275390625,
-0.041229248046875,
0.02911376953125,
0.0280303955078125,
-0.01451873779296875,
-0.009552001953125,
-0.0226898193359375,
-0.007659912109375,
0.00385284423828125,
-0.0048065185546875,
-0.11785888671875,
0.04052734375,
-0.058349609375,
0.04486083984375,
-0.0164794921875,
0.0148468017578125,
0.0103607177734375,
0.01519012451171875,
-0.0016736984252929688,
-0.031829833984375,
-0.0228118896484375,
0.03021240234375,
-0.045440673828125,
0.095703125,
0.01004791259765625,
0.0777587890625,
-0.005611419677734375,
-0.0287933349609375,
0.03570556640625,
-0.0684814453125,
-0.0010633468627929688,
0.0008134841918945312,
-0.0165252685546875,
0.0053863525390625,
0.0191497802734375,
0.00739288330078125,
0.06890869140625,
-0.00090789794921875,
-0.01534271240234375,
0.048583984375,
-0.03045654296875,
-0.0220489501953125,
-0.040008544921875,
-0.0035533905029296875,
0.03851318359375,
0.0254669189453125,
0.04461669921875,
-0.00457000732421875,
-0.01300811767578125,
-0.050323486328125,
0.0311737060546875,
-0.018951416015625,
0.041717529296875,
-0.0775146484375,
-0.040313720703125,
-0.00933074951171875,
0.0243377685546875,
-0.0018749237060546875,
0.0202484130859375,
0.02069091796875,
-0.04638671875,
0.034271240234375,
-0.01546478271484375,
-0.07196044921875,
0.0113677978515625,
-0.032958984375,
0.042388916015625,
-0.0625,
-0.08447265625,
-0.00555419921875,
0.0169525146484375,
-0.06634521484375,
-0.0263671875,
-0.0277862548828125,
0.01160430908203125,
-0.044525146484375,
0.028228759765625,
-0.04193115234375,
0.01323699951171875,
0.022430419921875,
0.0203857421875,
0.04119873046875,
-0.0304107666015625,
-0.024688720703125,
0.0207977294921875,
0.019378662109375,
-0.003093719482421875,
0.039520263671875,
0.00928497314453125,
-0.01385498046875,
-0.0256500244140625,
-0.0009784698486328125,
0.034271240234375,
0.0166015625,
0.03546142578125,
0.0006093978881835938,
0.0095367431640625,
0.0271453857421875,
0.0201873779296875,
0.030517578125,
0.054534912109375,
-0.0188446044921875,
0.0928955078125,
0.04736328125,
-0.0134124755859375,
0.049163818359375,
0.048065185546875,
0.021881103515625,
-0.0316162109375,
0.0147247314453125,
-0.00592803955078125,
0.035003662109375,
-0.00971221923828125,
0.00905609130859375,
-0.028228759765625,
-0.01363372802734375,
-0.07000732421875,
-0.046661376953125,
0.01922607421875,
0.0621337890625,
-0.01812744140625,
-0.05950927734375,
-0.00931549072265625,
0.008148193359375,
-0.085693359375,
-0.11297607421875,
0.0252532958984375,
-0.04052734375,
0.0016689300537109375,
-0.01354217529296875,
-0.034912109375,
-0.00827789306640625,
-0.0004572868347167969,
0.0014009475708007812,
-0.0021305084228515625,
-0.031768798828125,
-0.01934814453125,
-0.08050537109375,
-0.07421875,
-0.05316162109375,
0.00799560546875,
0.0181427001953125,
-0.00977325439453125,
0.009979248046875,
0.00516510009765625,
-0.0494384765625,
0.00858306884765625,
0.030303955078125,
0.0114288330078125,
0.020782470703125,
-0.043609619140625,
0.0015087127685546875,
0.034332275390625,
0.004962921142578125,
0.056915283203125,
0.00591278076171875,
0.0022735595703125,
-0.006866455078125,
-0.0007243156433105469,
-0.0294647216796875,
0.01067352294921875,
0.027496337890625,
-0.0228118896484375,
-0.041839599609375,
0.022430419921875,
-0.06805419921875,
-0.0226593017578125,
-0.0006279945373535156,
-0.045989990234375,
0.029632568359375,
0.069580078125,
-0.03302001953125,
-0.03497314453125,
-0.0283355712890625,
-0.006195068359375,
0.01224517822265625,
0.0081329345703125,
-0.0118255615234375,
0.027618408203125,
-0.01464080810546875,
-0.0009713172912597656,
-0.01136016845703125,
0.053863525390625,
0.0095367431640625,
-0.07806396484375,
0.00920867919921875,
0.0027484893798828125,
0.014434814453125,
-0.0009870529174804688,
0.012542724609375,
0.041412353515625,
0.01415252685546875,
-0.0035457611083984375,
0.037261962890625,
-0.01129150390625,
-0.0009732246398925781,
-0.0248260498046875,
0.0197296142578125,
-0.038299560546875,
-0.04486083984375,
-0.02447509765625,
0.0246429443359375,
-0.047119140625,
-0.060791015625,
0.0305328369140625,
-0.00820159912109375,
-0.033966064453125,
-0.0076141357421875,
-0.0113525390625,
-0.02386474609375,
0.00554656982421875,
-0.03131103515625,
-0.005031585693359375,
-0.03509521484375,
0.0243682861328125,
-0.0689697265625,
0.01495361328125,
-0.00485992431640625,
0.0179595947265625,
-0.0645751953125,
-0.028656005859375,
-0.039154052734375,
-0.09173583984375,
0.00567626953125,
-0.058013916015625,
0.050445556640625,
-0.0129547119140625,
0.05462646484375,
-0.0270843505859375,
0.0455322265625,
0.03338623046875,
-0.01306915283203125,
0.04412841796875,
-0.01535797119140625,
0.04974365234375,
-0.006725311279296875,
0.0462646484375,
-0.02386474609375,
-0.0160064697265625,
-0.018280029296875,
-0.0606689453125,
-0.01123046875,
-0.006378173828125,
-0.0458984375,
0.038421630859375,
-0.02685546875,
-0.01348876953125,
-0.044921875,
0.000545501708984375,
0.0423583984375,
-0.01739501953125,
0.0311737060546875,
-0.0712890625,
-0.0279388427734375,
0.0176544189453125,
0.007709503173828125,
-0.0158233642578125,
0.00788116455078125,
0.0377197265625,
0.0222320556640625,
-0.019744873046875,
0.00028133392333984375,
0.0166168212890625,
0.01953125,
-0.00412750244140625,
0.0576171875,
0.002643585205078125,
0.006015777587890625,
0.047515869140625,
-0.019989013671875,
0.0119781494140625,
0.0008792877197265625,
-0.027496337890625,
-0.0008211135864257812,
-0.031524658203125,
0.00249481201171875,
-0.0097503662109375,
0.04669189453125,
-0.032470703125,
-0.0044708251953125,
0.0214385986328125,
0.0233612060546875,
-0.009765625,
0.0085296630859375,
-0.0062103271484375,
-0.004001617431640625,
-0.0200958251953125,
0.0223388671875,
-0.11175537109375,
0.0152740478515625,
0.017547607421875,
-0.00994110107421875,
0.0202178955078125,
-0.01953125,
-0.006008148193359375,
-0.01415252685546875,
-0.03857421875,
0.0002913475036621094,
0.0150604248046875,
0.0007038116455078125,
-0.0011129379272460938,
0.0177459716796875,
0.01212310791015625,
0.03106689453125,
0.00196075439453125,
-0.01450347900390625,
-0.03900146484375,
0.01055145263671875,
-0.0421142578125,
0.0018663406372070312,
0.0259246826171875,
0.0267791748046875,
-0.0170745849609375,
0.0270233154296875,
-0.03021240234375,
-0.035400390625,
-0.01351165771484375,
-0.03106689453125,
0.037017822265625,
-0.007373809814453125,
-0.007232666015625,
0.033477783203125,
-0.031585693359375,
0.004772186279296875,
-0.01389312744140625,
-0.0026302337646484375,
-0.005645751953125,
0.0193328857421875,
0.02362060546875,
0.01091766357421875,
-0.01172637939453125,
0.00415802001953125,
-0.012054443359375,
0.038787841796875,
-0.05657958984375,
-0.0122528076171875,
0.042572021484375,
0.053466796875,
-0.01120758056640625,
-0.02239990234375,
0.002834320068359375,
-0.00913238525390625,
-0.0021762847900390625,
0.032379150390625,
0.04083251953125,
0.0297698974609375,
-0.0298309326171875,
-0.0350341796875,
0.0234375,
0.0274658203125,
-0.012847900390625,
0.01137542724609375,
-0.0266571044921875,
-0.01221466064453125,
0.0289459228515625,
-0.06439208984375,
-0.01108551025390625,
0.0103607177734375,
0.02960205078125,
-0.0081634521484375,
-0.015106201171875,
-0.037872314453125,
-0.0186004638671875,
-0.033447265625,
-0.006198883056640625,
0.06500244140625,
-0.04144287109375,
-0.003543853759765625,
-0.004791259765625,
0.0020847320556640625,
0.01123809814453125,
0.022247314453125,
0.023406982421875,
0.0191802978515625,
-0.024444580078125,
0.00004112720489501953,
-0.01336669921875,
-0.02178955078125,
-0.0089874267578125,
-0.05157470703125,
-0.0278472900390625,
-0.0293731689453125,
0.0164947509765625,
0.0008211135864257812,
0.01483154296875,
-0.010009765625,
-0.06396484375,
0.060821533203125,
0.06439208984375,
0.057403564453125,
-0.01494598388671875,
0.01284027099609375,
0.0028285980224609375,
-0.022979736328125,
-0.0186767578125,
-0.007366180419921875,
0.0220489501953125,
0.002521514892578125,
0.004207611083984375,
-0.01036834716796875,
-0.0110321044921875,
-0.028472900390625,
0.046630859375,
0.020965576171875,
0.037017822265625,
0.0016384124755859375,
-0.033782958984375,
0.01251983642578125,
0.00695037841796875,
-0.006999969482421875,
0.0159454345703125,
0.045318603515625,
-0.04486083984375,
0.0240325927734375,
-0.031524658203125,
-0.0114593505859375,
0.023162841796875,
0.003414154052734375,
0.0232696533203125,
-0.00635528564453125,
0.006916046142578125,
-0.004680633544921875,
-0.0697021484375,
0.04632568359375,
0.05859375,
0.0300750732421875,
0.032958984375,
-0.0067291259765625,
0.018768310546875,
-0.0238037109375,
-0.0165557861328125,
0.0330810546875,
0.033050537109375,
0.051025390625,
-0.01727294921875,
0.0079193115234375,
0.01229095458984375,
-0.017242431640625,
-0.0245208740234375,
0.0259246826171875,
0.018524169921875,
-0.03302001953125,
-0.0106201171875,
-0.0129547119140625,
-0.0201416015625,
-0.028961181640625,
0.0018558502197265625,
-0.01532745361328125,
-0.039642333984375,
-0.0001214146614074707,
-0.0012531280517578125,
-0.0279388427734375,
0.00308990478515625,
0.0033111572265625,
-0.031280517578125,
-0.043426513671875,
0.0194244384765625,
0.0239105224609375,
-0.03289794921875,
0.051116943359375,
0.028228759765625,
0.025665283203125,
0.026702880859375,
0.008087158203125,
-0.028076171875,
-0.035675048828125,
-0.0185394287109375,
-0.009918212890625,
-0.035614013671875,
-0.017425537109375,
0.07275390625,
0.020538330078125,
0.0615234375,
0.03692626953125,
0.0312042236328125,
0.0048065185546875,
0.006198883056640625,
-0.0164794921875,
-0.0035877227783203125,
-0.00926971435546875,
0.053009033203125,
0.0256805419921875,
-0.10101318359375,
0.025115966796875,
-0.04241943359375,
-0.0126953125,
-0.00917816162109375,
-0.0186614990234375,
0.087646484375,
-0.038604736328125,
-0.024749755859375,
0.0221099853515625,
-0.01351165771484375,
-0.0016498565673828125,
0.025604248046875,
0.013092041015625,
-0.034027099609375,
-0.017669677734375,
0.0270538330078125,
-0.0330810546875,
0.01102447509765625,
0.032501220703125,
0.0013103485107421875,
0.04351806640625,
0.0081634521484375,
-0.037200927734375,
0.042327880859375,
0.021942138671875,
-0.06396484375,
-0.0126800537109375,
0.00461578369140625,
0.038482666015625,
-0.0083160400390625,
0.036712646484375,
-0.0221099853515625,
-0.01239013671875,
0.0295257568359375,
0.0419921875,
0.01123046875,
0.0114288330078125,
-0.0078277587890625,
-0.0181732177734375,
-0.010467529296875,
-0.018463134765625,
-0.03350830078125,
0.04205322265625,
-0.00963592529296875,
0.0027675628662109375,
-0.004077911376953125,
-0.0220947265625,
0.0216827392578125,
-0.0411376953125,
-0.0243377685546875,
-0.00009948015213012695,
0.00897216796875,
0.0013513565063476562,
-0.00836944580078125,
0.0274658203125,
-0.034820556640625,
0.00008726119995117188,
0.0021533966064453125,
0.053192138671875,
0.005741119384765625,
0.0285186767578125,
-0.0087432861328125,
0.0019321441650390625,
-0.00868988037109375,
-0.015106201171875,
0.039306640625,
-0.025726318359375,
-0.01183319091796875,
-0.022369384765625,
-0.0009307861328125,
-0.0111846923828125,
-0.031097412109375,
-0.02838134765625,
0.0175323486328125,
-0.018798828125,
0.007572174072265625,
0.030609130859375,
0.039337158203125,
0.0194854736328125,
0.06658935546875,
0.01544189453125,
0.0196533203125,
-0.0372314453125,
-0.041168212890625,
0.00365447998046875,
0.0227508544921875,
0.01226806640625,
0.0273284912109375,
0.01099395751953125,
0.023834228515625,
0.06781005859375,
-0.0264739990234375,
0.00173187255859375,
0.0142974853515625,
0.0032958984375,
-0.01000213623046875,
-0.02099609375,
0.0236358642578125,
0.01313018798828125,
-0.0265045166015625,
0.00940704345703125,
0.03253173828125,
0.04150390625,
-0.0019273757934570312,
0.037261962890625,
-0.00745391845703125,
0.00027108192443847656,
-0.0311279296875,
0.0273590087890625,
0.00481414794921875,
0.0274505615234375,
-0.00286102294921875,
-0.005268096923828125,
0.01197052001953125,
0.0228118896484375,
-0.0167083740234375,
0.0067596435546875,
0.0185394287109375,
0.0272064208984375,
-0.00576019287109375,
-0.0204315185546875,
0.0386962890625,
-0.020782470703125,
-0.01523590087890625,
0.031646728515625,
-0.0193939208984375,
0.0099945068359375,
-0.023529052734375,
0.00188446044921875,
0.08514404296875,
-0.028045654296875,
0.005229949951171875,
0.0009336471557617188,
0.009918212890625,
-0.0251922607421875,
0.0241241455078125,
-0.0046539306640625,
0.03729248046875,
0.0413818359375,
-0.006702423095703125,
-0.005767822265625,
-0.02276611328125,
0.023101806640625,
-0.0181732177734375,
0.01172637939453125,
0.0228424072265625,
0.01522064208984375,
0.040496826171875,
-0.005672454833984375,
0.0099334716796875,
-0.0144500732421875,
0.0153350830078125,
-0.033843994140625,
0.0223236083984375,
0.00504302978515625,
-0.01044464111328125,
-0.031646728515625,
-0.041656494140625,
0.07940673828125,
0.020751953125,
0.01346588134765625,
-0.02862548828125,
0.056640625,
-0.048095703125,
-0.01201629638671875,
0.006168365478515625,
-0.00757598876953125,
-0.0222320556640625,
0.052764892578125,
0.0027713775634765625,
-0.02398681640625,
-0.02423095703125,
0.045806884765625,
0.0225982666015625,
-0.00714111328125,
0.0289459228515625,
-0.0134429931640625,
0.018341064453125,
0.0238189697265625,
0.03155517578125,
-0.01358795166015625,
-0.0177764892578125,
-0.03240966796875,
-0.03460693359375,
0.036895751953125,
0.04119873046875,
0.0299530029296875,
0.0234375,
-0.012420654296875,
-0.03570556640625,
0.01256561279296875,
-0.04052734375,
-0.025421142578125,
0.01171875,
0.030670166015625,
-0.0007166862487792969,
-0.08038330078125,
-0.050567626953125,
-0.0269012451171875,
0.004253387451171875,
-0.020904541015625,
-0.047943115234375,
0.0188751220703125,
0.0170745849609375,
-0.0155029296875,
0.003650665283203125,
-0.04425048828125,
-0.007598876953125,
-0.021820068359375,
0.0236358642578125,
0.0144195556640625,
-0.0677490234375,
-0.027862548828125,
-0.08441162109375,
0.01535797119140625,
0.0272674560546875,
-0.0404052734375,
-0.004619598388671875,
0.0202484130859375,
-0.033050537109375,
0.040435791015625,
-0.0170745849609375,
0.0262908935546875,
-0.0222320556640625,
-0.02276611328125,
-0.048370361328125,
0.0239105224609375,
0.0523681640625,
-0.025909423828125,
-0.01190185546875,
-0.053131103515625,
-0.0372314453125,
-0.030914306640625,
0.06353759765625,
-0.0262298583984375,
-0.01299285888671875,
0.031707763671875,
-0.005214691162109375,
-0.0093231201171875,
-0.029998779296875,
-0.006931304931640625,
0.016815185546875,
-0.033447265625,
-0.027923583984375,
0.0125579833984375,
0.01035308837890625,
-0.04052734375,
-0.023956298828125,
0.0248565673828125,
-0.019561767578125,
0.00125885009765625,
0.015960693359375,
0.0162506103515625,
0.031402587890625,
-0.0255584716796875,
-0.040802001953125,
0.052825927734375,
0.0021572113037109375,
-0.03143310546875,
-0.059539794921875,
-0.02581787109375,
0.0167388916015625,
0.00423431396484375,
-0.0206756591796875,
-0.035552978515625,
-0.07305908203125,
0.0279388427734375,
-0.021820068359375,
0.00732421875,
0.020477294921875,
-0.0185699462890625,
0.00555419921875,
0.0055084228515625,
0.00437164306640625,
-0.025146484375,
-0.06695556640625,
0.032501220703125,
-0.017425537109375,
0.030181884765625,
0.0139617919921875,
-0.01739501953125,
0.035003662109375,
0.0005793571472167969,
-0.01007080078125,
-0.006103515625,
-0.0196075439453125,
-0.001384735107421875,
0.06939697265625,
0.045745849609375,
0.00782012939453125,
-0.0281982421875,
-0.047698974609375,
-0.04437255859375,
0.001171112060546875,
-0.027557373046875,
0.00930023193359375,
-0.0885009765625,
-0.01235198974609375,
0.0090789794921875,
-0.0019550323486328125,
0.0693359375,
-0.020721435546875,
0.007503509521484375,
0.0018053054809570312,
0.031341552734375,
-0.0132598876953125,
-0.035064697265625,
-0.042022705078125,
0.039825439453125,
-0.0093994140625,
0.049774169921875,
-0.0242462158203125,
0.03546142578125,
0.043792724609375,
0.03790283203125,
-0.038482666015625,
0.00005936622619628906,
-0.0120391845703125,
0.03057861328125,
-0.0092926025390625,
0.0273590087890625,
-0.009429931640625,
0.0223541259765625,
0.0215606689453125,
0.015869140625,
-0.01525115966796875,
0.04498291015625,
0.0277557373046875,
-0.042236328125,
-0.03582763671875,
-0.0164031982421875,
-0.0218658447265625,
-0.01389312744140625,
-0.027435302734375,
0.030303955078125,
0.0012655258178710938,
-0.01354217529296875,
0.045440673828125,
0.004657745361328125,
0.0017232894897460938,
0.0140838623046875,
-0.03155517578125,
-0.047210693359375,
0.03021240234375,
0.06787109375,
0.0224761962890625,
0.0166168212890625
] |
de510a30279eb8aa851f9b8a51facc71485b32b6 | Wordpress Stackexchange
Q: Difference between 2 internationalization (i18n) functions __() & _e() I'm learning from a plugin development course, and encountered two different internationalization functions:
<?php __('Newsletter Subscriber', 'ns_domain'); ?>
&
<?php _e('Title:'); ?>
I cannot find any reference information on when to use each one of these.
Can you point me in the right direction to learn more about these please?
A: __() "Retrieves the translated string from the translate() function" without echoing. _e() does the same thing but echos the output.
For more information, take a look at these help articles:
*
*Internationalization
*Localization
*How to Internationalize Your Plugin
*Internationalization Security
| Q: Difference between 2 internationalization (i18n) functions __() & _e() I'm learning from a plugin development course, and encountered two different internationalization functions:
<?php __('Newsletter Subscriber', 'ns_domain'); ?>
&
<?php _e('Title:'); ?>
I cannot find any reference information on when to use each one of these.
Can you point me in the right direction to learn more about these please?
A: __() "Retrieves the translated string from the translate() function" without echoing. _e() does the same thing but echos the output.
For more information, take a look at these help articles:
*
*Internationalization
*Localization
*How to Internationalize Your Plugin
*Internationalization Security
A: It is probably good to know. The foundation of the internalization is the translate function
File: wp-includes/l10n.php
78: /**
79: * Retrieve the translation of $text.
80: *
81: * If there is no translation, or the text domain isn't loaded, the original text is returned.
82: *
83: * *Note:* Don't use translate() directly, use __() or related functions.
84: *
85: * @since 2.2.0
86: *
87: * @param string $text Text to translate.
88: * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings.
89: * Default 'default'.
90: * @return string Translated text
91: */
92: function translate( $text, $domain = 'default' ) {
Anytime you call any of the wrappers
File:wp-includes/l10n.php
172: function __( $text, $domain = 'default' ) {
173: return translate( $text, $domain );
174: }
or
File: wp-includes/l10n.php
188: function esc_attr__( $text, $domain = 'default' ) {
189: return esc_attr( translate( $text, $domain ) );
190: }
or
File: wp-includes/l10n.php
217: function _e( $text, $domain = 'default' ) {
218: echo translate( $text, $domain );
219: }
or many other from wp-includes/l10n.php, this function will be called. But you never call this function directly.
| wordpress | {
"language": "en",
"length": 297,
"provenance": "stackexchange_00019.jsonl.gz:470683",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247711"
} | [
-0.007808685302734375,
-0.0103759765625,
-0.002315521240234375,
0.0256805419921875,
-0.013824462890625,
-0.0212860107421875,
0.037445068359375,
-0.048583984375,
0.01491546630859375,
0.046844482421875,
0.00621795654296875,
0.0303192138671875,
0.0181732177734375,
-0.0240936279296875,
0.003963470458984375,
0.0207366943359375,
0.032989501953125,
-0.036285400390625,
-0.004695892333984375,
-0.0251312255859375,
-0.0031490325927734375,
-0.0039043426513671875,
0.01232147216796875,
0.00521087646484375,
0.03741455078125,
-0.085205078125,
0.07379150390625,
-0.0181732177734375,
0.00737762451171875,
-0.0242156982421875,
0.03759765625,
0.0161285400390625,
0.0294647216796875,
0.04461669921875,
-0.07769775390625,
-0.02655029296875,
-0.042205810546875,
0.0186614990234375,
-0.029632568359375,
0.0153350830078125,
0.042449951171875,
-0.040496826171875,
0.006313323974609375,
0.00672149658203125,
0.01448822021484375,
-0.0389404296875,
0.06585693359375,
-0.0229949951171875,
-0.005706787109375,
0.004413604736328125,
0.03594970703125,
-0.02532958984375,
0.03955078125,
-0.0212554931640625,
-0.0025424957275390625,
-0.0012645721435546875,
-0.034210205078125,
0.040863037109375,
0.0005831718444824219,
0.037353515625,
-0.0068817138671875,
0.045135498046875,
-0.0010709762573242188,
-0.01519775390625,
-0.057647705078125,
0.040924072265625,
0.00797271728515625,
-0.0081024169921875,
0.004718780517578125,
-0.0927734375,
-0.041259765625,
0.0018701553344726562,
0.0271759033203125,
-0.03338623046875,
0.01555633544921875,
0.0228118896484375,
-0.02740478515625,
0.0085906982421875,
0.0394287109375,
-0.0157318115234375,
-0.0228271484375,
0.017852783203125,
-0.08154296875,
-0.0240631103515625,
0.0196533203125,
0.0008449554443359375,
-0.0203094482421875,
-0.014801025390625,
-0.0238800048828125,
-0.04046630859375,
-0.0230255126953125,
-0.06915283203125,
-0.06207275390625,
0.035858154296875,
0.027008056640625,
-0.044342041015625,
0.01268768310546875,
0.03485107421875,
-0.04840087890625,
-0.01418304443359375,
-0.01678466796875,
-0.00823974609375,
-0.012451171875,
-0.00740814208984375,
0.020538330078125,
0.022552490234375,
-0.0219268798828125,
0.0167388916015625,
0.058380126953125,
0.01389312744140625,
0.009796142578125,
0.0517578125,
0.01474761962890625,
-0.03973388671875,
0.0278778076171875,
0.00907135009765625,
-0.00954437255859375,
0.062286376953125,
0.0312347412109375,
0.004150390625,
0.0161895751953125,
0.0245819091796875,
0.0601806640625,
-0.02532958984375,
0.013275146484375,
-0.0017423629760742188,
-0.0400390625,
-0.050689697265625,
0.01416015625,
0.0250396728515625,
-0.0401611328125,
-0.01184844970703125,
0.06719970703125,
0.0101776123046875,
-0.011322021484375,
-0.027984619140625,
-0.019866943359375,
0.02056884765625,
0.00353240966796875,
0.0003116130828857422,
0.008270263671875,
-0.0285797119140625,
0.01293182373046875,
0.006763458251953125,
-0.059295654296875,
0.0059051513671875,
0.004741668701171875,
0.01690673828125,
-0.00986480712890625,
-0.0538330078125,
0.0064849853515625,
-0.032745361328125,
0.0333251953125,
0.002422332763671875,
-0.05560302734375,
-0.023101806640625,
-0.01354217529296875,
-0.0330810546875,
0.004413604736328125,
-0.041961669921875,
-0.01163482666015625,
-0.02423095703125,
-0.020904541015625,
-0.0511474609375,
-0.084228515625,
0.0411376953125,
-0.02520751953125,
-0.00811767578125,
0.00820159912109375,
-0.038665771484375,
0.00909423828125,
0.0047607421875,
-0.0389404296875,
-0.0157318115234375,
0.0078277587890625,
0.0101776123046875,
-0.06805419921875,
-0.007415771484375,
0.0225830078125,
0.0168609619140625,
0.00655364990234375,
-0.0246429443359375,
-0.0015325546264648438,
0.0272064208984375,
-0.042022705078125,
-0.03143310546875,
0.01453399658203125,
-0.01422882080078125,
0.032745361328125,
-0.00020062923431396484,
0.0496826171875,
0.0157623291015625,
-0.01486968994140625,
0.035186767578125,
0.00786590576171875,
-0.034423828125,
0.00757598876953125,
0.0174407958984375,
-0.01418304443359375,
-0.047760009765625,
0.0008792877197265625,
-0.0223236083984375,
0.031219482421875,
0.015960693359375,
-0.03912353515625,
0.0117950439453125,
-0.0328369140625,
0.026123046875,
0.0233612060546875,
0.03741455078125,
-0.0183868408203125,
0.00612640380859375,
-0.01190948486328125,
-0.0124359130859375,
-0.0220794677734375,
-0.00875091552734375,
-0.01163482666015625,
0.032073974609375,
0.00490570068359375,
0.01071929931640625,
0.0305633544921875,
-0.02301025390625,
0.0274200439453125,
0.01503753662109375,
0.0428466796875,
0.006683349609375,
-0.001743316650390625,
-0.00194549560546875,
0.06451416015625,
-0.003398895263671875,
0.03289794921875,
0.00908660888671875,
0.019195556640625,
0.019927978515625,
-0.031524658203125,
0.0018253326416015625,
0.00875091552734375,
-0.03729248046875,
0.01064300537109375,
0.055389404296875,
0.047637939453125,
0.015655517578125,
-0.00750732421875,
-0.0304412841796875,
0.04638671875,
-0.01004791259765625,
0.0266265869140625,
-0.03680419921875,
0.0096435546875,
0.02703857421875,
-0.01033782958984375,
0.0014944076538085938,
0.010833740234375,
-0.05908203125,
-0.0166168212890625,
0.04608154296875,
-0.04656982421875,
-0.058807373046875,
0.006072998046875,
0.00977325439453125,
0.014984130859375,
-0.0110626220703125,
-0.006954193115234375,
0.004657745361328125,
-0.003330230712890625,
-0.0224609375,
0.0030841827392578125,
0.006282806396484375,
-0.006290435791015625,
-0.030487060546875,
0.0265960693359375,
0.034149169921875,
0.00433349609375,
0.01009368896484375,
-0.0390625,
0.01837158203125,
-0.0169219970703125,
0.00786590576171875,
-0.0012674331665039062,
-0.01479339599609375,
-0.0175628662109375,
0.05853271484375,
-0.044647216796875,
-0.0310211181640625,
-0.0222320556640625,
-0.0082244873046875,
-0.044891357421875,
-0.0297393798828125,
0.0135498046875,
-0.0048675537109375,
0.0252532958984375,
-0.0141754150390625,
-0.043243408203125,
0.04412841796875,
-0.00789642333984375,
-0.04437255859375,
0.0213165283203125,
-0.0023937225341796875,
-0.003711700439453125,
-0.041259765625,
0.0127410888671875,
0.0218505859375,
0.0066986083984375,
-0.07000732421875,
0.01418304443359375,
-0.0280609130859375,
0.02850341796875,
-0.0139617919921875,
-0.0154876708984375,
0.016143798828125,
-0.07366943359375,
-0.031829833984375,
0.003204345703125,
0.0216217041015625,
-0.0253143310546875,
-0.049530029296875,
-0.0201263427734375,
-0.0005097389221191406,
-0.0972900390625,
-0.04571533203125,
-0.0516357421875,
-0.04986572265625,
0.033599853515625,
-0.004230499267578125,
-0.0009369850158691406,
-0.0088348388671875,
0.0015716552734375,
0.031890869140625,
0.0244140625,
-0.03973388671875,
-0.0307159423828125,
-0.035369873046875,
-0.03533935546875,
0.019012451171875,
0.002048492431640625,
-0.009765625,
-0.0004761219024658203,
-0.0382080078125,
-0.0002263784408569336,
0.0157470703125,
0.044830322265625,
0.07879638671875,
0.0132904052734375,
-0.004215240478515625,
-0.03460693359375,
-0.0102081298828125,
0.0164337158203125,
-0.007007598876953125,
-0.06829833984375,
0.000530242919921875,
0.033172607421875,
-0.0261688232421875,
0.0166015625,
0.0174560546875,
0.037200927734375,
-0.0229034423828125,
-0.020721435546875,
0.0213775634765625,
-0.009368896484375,
-0.047637939453125,
-0.022430419921875,
-0.004398345947265625,
-0.04913330078125,
0.0274810791015625,
0.04144287109375,
-0.005428314208984375,
0.0028629302978515625,
-0.012786865234375,
-0.0251922607421875,
-0.00278472900390625,
0.0058441162109375,
-0.0213775634765625,
-0.0152130126953125,
-0.0174713134765625,
-0.022003173828125,
0.01213836669921875,
0.04827880859375,
0.0248870849609375,
-0.0250701904296875,
0.0173797607421875,
0.045501708984375,
0.00455474853515625,
-0.0242919921875,
-0.056488037109375,
-0.040924072265625,
0.0333251953125,
-0.034759521484375,
0.0093841552734375,
-0.001392364501953125,
-0.00952911376953125,
0.020355224609375,
0.0584716796875,
0.027496337890625,
-0.00815582275390625,
-0.01212310791015625,
0.002979278564453125,
-0.05126953125,
-0.024505615234375,
-0.03436279296875,
0.01812744140625,
0.00064849853515625,
-0.020965576171875,
-0.02294921875,
0.0008325576782226562,
-0.04754638671875,
0.062164306640625,
-0.035552978515625,
0.011962890625,
0.006587982177734375,
0.003696441650390625,
-0.00926971435546875,
0.019500732421875,
-0.0318603515625,
0.01212310791015625,
-0.0008683204650878906,
-0.034027099609375,
-0.0271148681640625,
-0.0088348388671875,
-0.01270294189453125,
0.03057861328125,
0.0013017654418945312,
-0.014801025390625,
-0.030853271484375,
0.0164031982421875,
-0.028045654296875,
0.00738525390625,
-0.00334930419921875,
0.01446533203125,
0.0192718505859375,
0.0245513916015625,
0.01097869873046875,
0.01023101806640625,
0.00962066650390625,
0.0171051025390625,
-0.0552978515625,
0.037872314453125,
-0.00016117095947265625,
0.03076171875,
0.023193359375,
-0.045562744140625,
-0.0684814453125,
-0.0030803680419921875,
-0.00890350341796875,
-0.021514892578125,
-0.00011444091796875,
-0.0189361572265625,
0.019134521484375,
-0.0360107421875,
0.068115234375,
0.06585693359375,
-0.0239715576171875,
-0.0136260986328125,
0.0298919677734375,
0.017913818359375,
-0.0743408203125,
-0.0439453125,
-0.0110626220703125,
0.0278167724609375,
0.0224151611328125,
0.0233612060546875,
-0.007175445556640625,
-0.0341796875,
0.039276123046875,
-0.0004000663757324219,
0.0162506103515625,
0.0116424560546875,
0.0455322265625,
0.0023097991943359375,
-0.0253448486328125,
0.0245513916015625,
-0.0009965896606445312,
-0.0452880859375,
-0.015869140625,
-0.01006317138671875,
-0.0177764892578125,
0.01953125,
-0.007160186767578125,
-0.030517578125,
0.07330322265625,
0.031951904296875,
-0.0016727447509765625,
0.01503753662109375,
0.036865234375,
-0.016693115234375,
0.0167083740234375,
-0.0109710693359375,
-0.0450439453125,
-0.047882080078125,
-0.004100799560546875,
0.07861328125,
0.022796630859375,
0.037322998046875,
0.0122833251953125,
0.06341552734375,
-0.00127410888671875,
-0.004428863525390625,
0.0007066726684570312,
0.035797119140625,
-0.00836181640625,
-0.0234527587890625,
-0.046905517578125,
0.00023305416107177734,
-0.0185546875,
0.0068206787109375,
0.000058770179748535156,
-0.004306793212890625,
0.0198822021484375,
-0.0223541259765625,
0.03369140625,
0.06793212890625,
-0.01413726806640625,
-0.004375457763671875,
-0.034942626953125,
-0.020233154296875,
-0.0166778564453125,
-0.0250244140625,
0.05242919921875,
-0.06097412109375,
0.0261383056640625,
0.0084228515625,
0.00833892822265625,
-0.01433563232421875,
0.041107177734375,
0.0309906005859375,
-0.037078857421875,
0.00860595703125,
0.00826263427734375,
-0.0013399124145507812,
-0.0006732940673828125,
0.0298614501953125,
0.0175933837890625,
0.00940704345703125,
-0.0007824897766113281,
-0.0083160400390625,
0.003856658935546875,
-0.01538848876953125,
-0.03564453125,
0.0555419921875,
0.04241943359375,
-0.048126220703125,
-0.0286102294921875,
-0.00433349609375,
0.0164031982421875,
-0.0006575584411621094,
0.0001131892204284668,
0.01189422607421875,
-0.0302734375,
-0.016448974609375,
0.0111083984375,
-0.043609619140625,
-0.0064849853515625,
0.0045166015625,
-0.035186767578125,
0.00638580322265625,
0.02081298828125,
-0.040740966796875,
-0.045989990234375,
-0.0063629150390625,
0.0007605552673339844,
0.0390625,
-0.02984619140625,
-0.006732940673828125,
-0.036163330078125,
0.0509033203125,
-0.012847900390625,
-0.006092071533203125,
0.06976318359375,
0.0184326171875,
-0.04046630859375,
-0.00644683837890625,
-0.052703857421875,
-0.01218414306640625,
-0.034393310546875,
-0.06756591796875,
-0.052215576171875,
-0.01364898681640625,
-0.0007257461547851562,
0.04071044921875,
0.0011129379272460938,
0.01092529296875,
0.03839111328125,
0.0210113525390625,
-0.041534423828125,
0.04974365234375,
-0.01558685302734375,
0.0684814453125,
0.018524169921875,
0.01605224609375,
-0.00926971435546875,
0.04718017578125,
0.006778717041015625,
-0.0098419189453125,
0.005023956298828125,
-0.0157012939453125,
0.0103302001953125,
-0.01337432861328125,
0.0250091552734375,
-0.0291748046875,
0.01221466064453125,
-0.004001617431640625,
0.02130126953125,
0.0065765380859375,
0.00379180908203125,
-0.0125579833984375,
-0.016845703125,
-0.005687713623046875,
0.003185272216796875,
0.01491546630859375,
-0.0712890625,
-0.0265655517578125,
0.04046630859375,
0.03387451171875,
0.01898193359375,
-0.047698974609375,
-0.01375579833984375,
0.06396484375,
-0.019134521484375,
0.005229949951171875,
0.036224365234375,
0.0192718505859375,
0.035797119140625,
0.015960693359375,
0.01459503173828125,
-0.0279693603515625,
-0.0226898193359375,
0.005157470703125,
0.04949951171875,
0.04052734375,
-0.017822265625,
0.0213775634765625,
0.0011730194091796875,
0.0015783309936523438,
0.02911376953125,
0.08642578125,
0.09942626953125,
-0.09967041015625,
-0.000720977783203125,
0.052398681640625,
-0.0306396484375,
-0.04052734375,
-0.0088043212890625,
-0.0247802734375,
-0.0823974609375,
0.0634765625,
0.0025539398193359375,
0.005741119384765625,
0.009063720703125,
-0.00862884521484375,
0.0013170242309570312,
-0.0170440673828125,
0.05340576171875,
0.04144287109375,
-0.01203155517578125,
0.0040435791015625,
-0.01678466796875,
0.0243682861328125,
-0.03729248046875,
-0.0011034011840820312,
0.0106964111328125,
-0.036224365234375,
-0.06787109375,
-0.004726409912109375,
0.00829315185546875,
-0.00827789306640625,
-0.0304412841796875,
-0.018096923828125,
0.035369873046875,
0.032135009765625,
-0.0216827392578125,
-0.0213165283203125,
0.0193023681640625,
0.02923583984375,
0.01129150390625,
-0.00750732421875,
0.005126953125,
0.049072265625,
-0.053741455078125,
0.0089111328125,
-0.03204345703125,
0.03131103515625,
0.013702392578125,
-0.0042572021484375,
0.038299560546875,
0.0245208740234375,
-0.04296875,
0.0167694091796875,
-0.03814697265625,
-0.006256103515625,
-0.0248565673828125,
0.0115814208984375,
-0.0853271484375,
-0.04034423828125,
-0.0139617919921875,
-0.06402587890625,
0.0018796920776367188,
-0.025970458984375,
-0.09246826171875,
0.10089111328125,
0.00724029541015625,
0.057464599609375,
-0.01316070556640625,
0.032562255859375,
-0.0038661956787109375,
-0.01556396484375,
-0.0213623046875,
-0.0130615234375,
-0.0099029541015625,
-0.012786865234375,
0.01323699951171875,
0.0273590087890625,
-0.01459503173828125,
-0.018829345703125,
0.04229736328125,
-0.0002834796905517578,
0.038177490234375,
-0.0019359588623046875,
0.0302734375,
0.010223388671875,
-0.046295166015625,
-0.0192413330078125,
0.01313018798828125,
0.0184326171875,
0.048858642578125,
-0.031036376953125,
0.016204833984375,
-0.006526947021484375,
0.021820068359375,
0.037017822265625,
-0.00910186767578125,
-0.0478515625,
0.01898193359375,
0.0015087127685546875,
-0.040802001953125,
-0.0079193115234375,
0.00524139404296875,
0.00168609619140625,
-0.01177978515625,
0.0205230712890625,
0.016448974609375,
-0.00881195068359375,
0.036834716796875,
-0.036376953125,
0.05499267578125,
0.0209503173828125,
0.019439697265625,
0.0557861328125,
0.023193359375,
0.0209808349609375,
0.0252532958984375,
0.01763916015625,
0.0243988037109375,
0.0077056884765625,
-0.0126953125,
-0.009765625,
0.007198333740234375,
-0.032257080078125,
-0.03680419921875,
0.0537109375,
0.01401519775390625,
-0.004474639892578125,
-0.040679931640625,
0.0173797607421875,
-0.010162353515625,
-0.0029125213623046875,
0.0191802978515625,
0.0019521713256835938,
-0.044158935546875,
-0.00507354736328125,
-0.0021762847900390625,
0.014434814453125,
0.03582763671875,
0.00074005126953125,
0.00341796875,
0.01641845703125,
-0.0241851806640625,
0.012298583984375,
-0.053436279296875,
0.0296478271484375,
0.00023818016052246094,
0.0229644775390625,
-0.010894775390625,
0.08453369140625,
0.03814697265625,
-0.0015478134155273438,
-0.00504302978515625,
0.002056121826171875,
-0.0225067138671875,
0.004802703857421875,
-0.05078125,
-0.033447265625,
0.0189666748046875,
0.040008544921875,
0.024749755859375,
-0.01241302490234375,
0.05633544921875,
0.02813720703125,
-0.0672607421875,
-0.0032253265380859375,
0.0114898681640625,
-0.0171356201171875,
0.00574493408203125,
-0.031829833984375,
-0.00400543212890625,
0.01432037353515625,
-0.01313018798828125,
-0.00963592529296875,
-0.002712249755859375,
0.03363037109375,
-0.02349853515625,
0.04156494140625,
-0.0097503662109375,
-0.036285400390625,
0.01378631591796875,
-0.0302581787109375,
0.0902099609375,
-0.0106658935546875,
-0.03759765625,
-0.0013036727905273438,
-0.00879669189453125,
-0.03887939453125,
0.0377197265625,
0.042999267578125,
0.010467529296875,
0.0095062255859375,
0.041961669921875,
-0.003871917724609375,
0.026824951171875,
-0.0185089111328125,
-0.0084686279296875,
-0.0249481201171875,
0.0277862548828125,
-0.005565643310546875,
-0.038330078125,
-0.0222320556640625,
-0.01934814453125,
0.04180908203125,
0.0081024169921875,
-0.002452850341796875,
0.01227569580078125,
0.03582763671875,
-0.0122528076171875,
-0.0056304931640625,
-0.0167083740234375,
-0.01413726806640625,
0.043304443359375,
0.00916290283203125,
-0.009368896484375,
-0.0238189697265625,
-0.06060791015625,
0.0125579833984375,
0.0215301513671875,
-0.01502227783203125,
0.0188446044921875,
-0.0016765594482421875,
0.0197906494140625,
-0.016448974609375,
0.0312042236328125,
-0.025634765625,
-0.01300048828125,
-0.032928466796875,
-0.0087432861328125,
0.032623291015625,
0.0049591064453125,
-0.017333984375,
-0.0269775390625,
-0.021087646484375,
-0.0340576171875,
0.0048370361328125,
0.033782958984375,
-0.04583740234375,
0.0170745849609375,
-0.02337646484375,
-0.0276947021484375,
0.03131103515625,
-0.01174163818359375,
-0.01206207275390625,
0.020599365234375,
0.047882080078125,
-0.00067901611328125,
-0.004734039306640625,
-0.023712158203125,
-0.01190185546875,
-0.017974853515625,
-0.042877197265625,
-0.00472259521484375,
0.019622802734375,
-0.020233154296875,
-0.0145721435546875,
-0.00601959228515625,
-0.00878143310546875,
-0.02593994140625,
0.00472259521484375,
-0.0008668899536132812,
0.0303192138671875,
-0.0249786376953125,
0.028045654296875,
-0.007007598876953125,
-0.002147674560546875,
-0.0170440673828125,
-0.0013580322265625,
-0.0219268798828125,
-0.0118408203125,
0.01276397705078125,
-0.04736328125,
-0.010650634765625,
0.00007808208465576172,
0.028900146484375,
-0.051910400390625,
-0.005077362060546875,
-0.0721435546875,
-0.03216552734375,
-0.054962158203125,
0.0273590087890625,
0.0360107421875,
-0.013641357421875,
-0.0142059326171875,
0.048309326171875,
0.005908966064453125,
0.09820556640625,
-0.0306396484375,
-0.027069091796875,
0.03851318359375,
-0.013427734375,
-0.0143280029296875,
-0.07000732421875,
0.004070281982421875,
-0.07525634765625,
-0.006938934326171875,
0.01995849609375,
-0.0204010009765625,
-0.004810333251953125,
-0.035797119140625,
-0.061676025390625,
0.13623046875,
-0.0132598876953125,
-0.0120849609375,
-0.06927490234375,
0.0333251953125,
0.01166534423828125,
0.0256805419921875,
-0.0198974609375,
-0.00385284423828125,
-0.036468505859375,
0.0011911392211914062,
0.028717041015625,
0.0031261444091796875,
0.0660400390625,
-0.0213775634765625,
-0.00785064697265625,
0.0233001708984375,
0.046539306640625,
-0.0006422996520996094,
0.0211029052734375,
-0.004222869873046875,
0.0180206298828125,
0.0245513916015625,
-0.03662109375,
-0.05413818359375,
-0.01153564453125,
-0.017181396484375,
-0.042572021484375,
-0.04388427734375,
0.035186767578125,
0.035614013671875,
0.08721923828125,
0.033721923828125,
0.005207061767578125,
-0.0792236328125,
0.05340576171875,
0.024017333984375,
-0.040802001953125,
-0.019439697265625,
0.0223236083984375,
-0.042938232421875,
-0.047698974609375,
-0.01177215576171875,
0.0123291015625,
0.022705078125,
-0.034912109375,
-0.0247650146484375,
-0.0250091552734375,
-0.041412353515625,
-0.0170135498046875,
0.00113677978515625,
-0.050384521484375,
0.05609130859375,
-0.04254150390625,
-0.0389404296875,
0.05548095703125,
0.0225982666015625,
-0.00870513916015625,
0.0714111328125,
0.019378662109375,
-0.0033931732177734375,
-0.0019016265869140625,
0.006900787353515625,
0.0208282470703125,
0.01739501953125,
0.02044677734375,
-0.033172607421875,
0.007495880126953125,
0.02410888671875,
-0.0153656005859375,
0.0296783447265625,
-0.0118865966796875,
0.08056640625,
0.00862884521484375,
0.018707275390625,
-0.0090179443359375,
0.04119873046875,
-0.031280517578125,
0.01181793212890625,
-0.04364013671875,
0.013275146484375,
-0.04388427734375,
0.0316162109375,
0.0300750732421875,
-0.000759124755859375,
0.016510009765625,
0.01233673095703125,
0.00856781005859375,
-0.0369873046875,
-0.034271240234375,
0.00951385498046875
] |
16d0b2a01a68418e3c4a054f7a4bda4e59ca375e | Wordpress Stackexchange
Q: Get current URL (permalink) without /page/{pagenum}/ How can I retrieve the current URL (whether homepage, archive, post type archive, category archive, etc) but always without the /page/{pagenum}/ part if it's present? So, if the real URL is:
example.com/category/uncategorized/
OR
example.com/category/uncategorized/page/2/
then the return value will always be
example.com/category/uncategorized/
A: My specifics were very similar to Ihor Vorotnov's, exept that I had more than one parameter. So, starting from his answer, I modified the code to use a regular expression:
function get_nopaging_url() {
$current_url = $_SERVER[REQUEST_URI];
$pattern = '/page\\/[0-9]+\\//i';
$nopaging_url = preg_replace($pattern, '', $current_url);
return $nopaging_url;
}
| Q: Get current URL (permalink) without /page/{pagenum}/ How can I retrieve the current URL (whether homepage, archive, post type archive, category archive, etc) but always without the /page/{pagenum}/ part if it's present? So, if the real URL is:
example.com/category/uncategorized/
OR
example.com/category/uncategorized/page/2/
then the return value will always be
example.com/category/uncategorized/
A: My specifics were very similar to Ihor Vorotnov's, exept that I had more than one parameter. So, starting from his answer, I modified the code to use a regular expression:
function get_nopaging_url() {
$current_url = $_SERVER[REQUEST_URI];
$pattern = '/page\\/[0-9]+\\//i';
$nopaging_url = preg_replace($pattern, '', $current_url);
return $nopaging_url;
}
A: You can get the current URL through home_url( $wp->request ).
Try the example below:
global $wp;
// get current url with query string.
$current_url = home_url( $wp->request );
// get the position where '/page.. ' text start.
$pos = strpos($current_url , '/page');
// remove string from the specific postion
$finalurl = substr($current_url,0,$pos);
echo $finalurl;
A: Actually the easiest would be to use get_pagenum_link() which will return you the current URL without any /page/* paramaters.
Bonus
You can also simply use it to build "Previous" and "Next" links dynamically using the 'paged' query variable:
// Get the current page number.
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$first_page = '<a href="' . get_pagenum_link() . '" class="page-first"><<</a>';
$prev_page = '<a href="' . get_pagenum_link($paged - 1) . '" class="page-prev"><</a>';
$next_page = '<a href="' . get_pagenum_link($paged + 1) . ' class="page-next">></a>';
// And having a `WP_Query` object you can also build the link for the last page:
$max = $the_query->max_num_pages;
$last_page = '<a href="' . get_pagenum_link($max) . '" class="page-last">>></a>';
A: Answer by Govind Kumar worked, however, it only returned the URL if /page/{pagenum}/ was present in the URL and returned nothing if not. I needed a universal solution that will always return the base URL without pagination, so I modified Govind's code a bit and wrapped into a function:
function get_nopaging_url() {
global $wp;
$current_url = home_url( $wp->request );
$position = strpos( $current_url , '/page' );
$nopaging_url = ( $position ) ? substr( $current_url, 0, $position ) : $current_url;
return trailingslashit( $nopaging_url );
}
echo get_nopaging_url();
Now, it always returns correct URL.
(This is useful if you need to implement some kind of post filters that add a param to filter posts by, let's say, a meta filed. So, even if a user sets the filter param on page X, the new filtered results will always start from the base URL, not page X and throwing 404 if there's less filtered posts.)
A: If you want to remove all possible pagination combinations then use this snippet:
// remove pagination from url
$pattern = '/page(\/)*([0-9\/])*/i';
$url = preg_replace($pattern, '', $GLOBALS['wp']->request);
It will take care of
/page
/page/
/page/1
/page/1/
...
and is case insensitive, works for any pagination page number and also will remove any combination of trailing number/number/number...
(tests here: https://regex101.com/r/9fQaLC/1)
If you want to get the full url with leading http(s) just add
$url = home_url($url);
In that line you can also add any custom GET parameter like so
$url = home_url($url . '?typ=test');
A: function getCurrentUrlSeo() {
global $wp;
$current_url = home_url($wp->request);
$pos = mb_strpos($current_url, '/page');
$finalurl = $pos ? substr($current_url, 0, $pos) : $current_url;
return $finalurl.'/';
}
A: While this question was already answered here (not accepted), this snippet should do the trick: home_url(add_query_arg(NULL, NULL));.
A: trait TraitURLStrip {
/**
* Strips off paging and query string. Returns a filter-the-results friendly URL
*
* @param bool $str_url
* @param string $str_page
*
* @return bool|string
*/
protected function urlStrip( $str_url = false , $str_page = 'page' ){
if ( is_string( $str_url) ) {
$arr_parse_url = wp_parse_url( $str_url );
$str_path_no_page = '';
if ( isset( $arr_parse_url['path'] ) ) {
// if we're paging then remove that. please!
$str_path_no_page = preg_replace( "/\/{$str_page}\/[0-9]*\/$/", "/", $arr_parse_url['path'] );
}
$str_scheme_host = "{$arr_parse_url['scheme']}://{$arr_parse_url['host']}";
return $str_scheme_host . $str_path_no_page;
}
return false;
}
}
| wordpress | {
"language": "en",
"length": 643,
"provenance": "stackexchange_00019.jsonl.gz:470689",
"question_score": "13",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247730"
} | [
0.06475830078125,
0.0092010498046875,
-0.02911376953125,
-0.044891357421875,
0.004505157470703125,
-0.039215087890625,
0.015899658203125,
-0.01873779296875,
-0.005886077880859375,
0.003681182861328125,
0.01451873779296875,
-0.0194244384765625,
-0.011444091796875,
-0.07476806640625,
0.049560546875,
-0.0011463165283203125,
0.037200927734375,
-0.0069427490234375,
0.02850341796875,
-0.0002498626708984375,
-0.00244140625,
0.0200042724609375,
0.015625,
0.047393798828125,
0.042755126953125,
-0.035064697265625,
0.0418701171875,
-0.0132904052734375,
-0.0034008026123046875,
-0.042022705078125,
0.0164642333984375,
0.026885986328125,
0.0276947021484375,
-0.003719329833984375,
0.00013554096221923828,
0.00971221923828125,
-0.0176239013671875,
0.016571044921875,
0.01125335693359375,
-0.005725860595703125,
0.00875091552734375,
-0.0059051513671875,
-0.03271484375,
0.0052490234375,
-0.0501708984375,
0.0007658004760742188,
-0.0011835098266601562,
-0.00621795654296875,
-0.03985595703125,
0.0477294921875,
0.007518768310546875,
0.033111572265625,
0.0080413818359375,
0.054046630859375,
0.0019006729125976562,
-0.028076171875,
0.0207672119140625,
-0.04608154296875,
0.0273284912109375,
-0.050445556640625,
-0.0263214111328125,
-0.0242919921875,
0.055908203125,
0.0291290283203125,
-0.027496337890625,
-0.006496429443359375,
-0.006328582763671875,
0.01239013671875,
-0.0258026123046875,
-0.0295867919921875,
0.0210418701171875,
-0.00939178466796875,
0.005657196044921875,
-0.01537322998046875,
-0.0389404296875,
-0.0210113525390625,
0.005374908447265625,
-0.034576416015625,
-0.004669189453125,
0.00684356689453125,
0.000835418701171875,
0.004673004150390625,
-0.040008544921875,
-0.0287933349609375,
0.01068878173828125,
-0.00824737548828125,
0.007213592529296875,
-0.014617919921875,
-0.03900146484375,
-0.0034637451171875,
-0.03778076171875,
-0.01568603515625,
-0.01296234130859375,
-0.0195465087890625,
-0.0193023681640625,
-0.0186767578125,
0.00588226318359375,
0.0322265625,
-0.010986328125,
0.0014772415161132812,
-0.02508544921875,
-0.0162200927734375,
-0.01165771484375,
-0.0386962890625,
0.0165252685546875,
0.019683837890625,
0.021240234375,
0.0292816162109375,
0.05755615234375,
-0.0222930908203125,
-0.0187225341796875,
0.054595947265625,
-0.01325225830078125,
0.00347137451171875,
-0.0128326416015625,
0.038818359375,
-0.022918701171875,
-0.0161895751953125,
-0.0277099609375,
0.009368896484375,
0.0065155029296875,
0.049102783203125,
0.01097869873046875,
-0.021636962890625,
0.0128173828125,
0.012054443359375,
-0.0186767578125,
-0.04901123046875,
0.033538818359375,
0.0249176025390625,
-0.02960205078125,
-0.000804901123046875,
0.024383544921875,
0.005130767822265625,
-0.0007691383361816406,
-0.023162841796875,
0.016845703125,
-0.0177459716796875,
0.00962066650390625,
-0.009857177734375,
-0.01453399658203125,
-0.010833740234375,
0.02020263671875,
-0.033721923828125,
0.02685546875,
0.029144287109375,
0.01323699951171875,
0.01342010498046875,
0.0122222900390625,
-0.0118560791015625,
-0.000568389892578125,
-0.01517486572265625,
0.041229248046875,
0.006465911865234375,
-0.0445556640625,
-0.03826904296875,
0.01849365234375,
-0.042205810546875,
0.0119781494140625,
-0.056365966796875,
0.0623779296875,
-0.01708984375,
-0.014801025390625,
-0.0204620361328125,
-0.06280517578125,
0.01103973388671875,
-0.057464599609375,
-0.018768310546875,
0.00762176513671875,
0.016326904296875,
-0.0031375885009765625,
0.0107269287109375,
-0.0099639892578125,
-0.002410888671875,
0.005268096923828125,
-0.0189056396484375,
-0.026153564453125,
0.01256561279296875,
-0.00008982419967651367,
0.0933837890625,
0.04022216796875,
-0.03057861328125,
0.007091522216796875,
0.01000213623046875,
-0.0731201171875,
0.07147216796875,
0.0168304443359375,
0.060150146484375,
-0.0176544189453125,
0.0012617111206054688,
0.05718994140625,
0.05181884765625,
-0.05487060546875,
0.007114410400390625,
-0.001953125,
-0.0017309188842773438,
0.01290130615234375,
0.01971435546875,
-0.01470184326171875,
-0.02069091796875,
0.002582550048828125,
-0.0002493858337402344,
-0.000270843505859375,
0.0159759521484375,
-0.0154571533203125,
0.001728057861328125,
-0.01073455810546875,
0.0246124267578125,
-0.0063934326171875,
0.0325927734375,
0.0157470703125,
0.0016536712646484375,
-0.0250244140625,
-0.0367431640625,
-0.0184783935546875,
0.035491943359375,
-0.0019512176513671875,
-0.017364501953125,
-0.0216217041015625,
0.0139617919921875,
-0.01074981689453125,
-0.01464080810546875,
-0.04583740234375,
0.0239410400390625,
0.0364990234375,
-0.021697998046875,
-0.0177459716796875,
-0.0377197265625,
-0.00902557373046875,
-0.007312774658203125,
-0.06683349609375,
0.05047607421875,
0.02197265625,
0.036163330078125,
-0.0174713134765625,
0.0009813308715820312,
0.0047607421875,
-0.038848876953125,
0.00212860107421875,
0.0489501953125,
0.037811279296875,
0.0006275177001953125,
0.004146575927734375,
-0.0260772705078125,
0.006195068359375,
-0.06951904296875,
-0.0013675689697265625,
-0.023773193359375,
0.005367279052734375,
0.0212554931640625,
0.0201416015625,
0.022369384765625,
0.012237548828125,
0.0137176513671875,
0.0007081031799316406,
0.031280517578125,
0.00930023193359375,
0.0343017578125,
-0.046173095703125,
0.00574493408203125,
0.005214691162109375,
0.06109619140625,
-0.015655517578125,
0.0191192626953125,
-0.024200439453125,
0.029449462890625,
0.004108428955078125,
0.036346435546875,
-0.0027446746826171875,
-0.0097503662109375,
-0.002696990966796875,
0.0245208740234375,
0.0095367431640625,
0.0188751220703125,
0.031646728515625,
-0.04425048828125,
0.00222015380859375,
-0.0201263427734375,
0.0140838623046875,
0.0012254714965820312,
-0.0195465087890625,
0.044525146484375,
-0.016448974609375,
-0.01445770263671875,
-0.034393310546875,
-0.049896240234375,
-0.01490020751953125,
0.001735687255859375,
0.0291748046875,
0.040618896484375,
0.04681396484375,
0.0008654594421386719,
-0.0257568359375,
0.04705810546875,
-0.0213623046875,
-0.0131988525390625,
0.0019512176513671875,
-0.0164642333984375,
0.036529541015625,
-0.0296783447265625,
0.03460693359375,
0.041656494140625,
-0.0254058837890625,
0.0234832763671875,
0.006778717041015625,
-0.0168304443359375,
0.01444244384765625,
-0.034942626953125,
-0.02734375,
0.026214599609375,
-0.07861328125,
0.034393310546875,
0.00811767578125,
0.0211944580078125,
-0.01560211181640625,
-0.0496826171875,
-0.007175445556640625,
-0.0183868408203125,
-0.10296630859375,
-0.104736328125,
0.030364990234375,
-0.040802001953125,
-0.01444244384765625,
0.029937744140625,
-0.023468017578125,
-0.0253753662109375,
0.0772705078125,
0.0052642822265625,
0.025177001953125,
-0.0469970703125,
-0.09893798828125,
-0.067626953125,
-0.115966796875,
-0.01088714599609375,
-0.0055694580078125,
0.0085296630859375,
-0.00008797645568847656,
0.0073394775390625,
-0.0005741119384765625,
-0.0361328125,
-0.005710601806640625,
0.031829833984375,
0.01107025146484375,
-0.0165557861328125,
-0.0484619140625,
0.0279693603515625,
0.005641937255859375,
0.01212310791015625,
0.03387451171875,
0.0237274169921875,
-0.0179443359375,
0.0041961669921875,
-0.01398468017578125,
-0.01357269287109375,
-0.00006848573684692383,
0.035369873046875,
0.01165771484375,
0.00405120849609375,
0.0215911865234375,
-0.0570068359375,
-0.0535888671875,
-0.016357421875,
-0.0794677734375,
0.0699462890625,
0.050537109375,
-0.002460479736328125,
0.024810791015625,
0.006710052490234375,
0.00435638427734375,
-0.0192413330078125,
0.035430908203125,
-0.0308074951171875,
0.0299224853515625,
-0.0009260177612304688,
0.0008664131164550781,
-0.03582763671875,
0.0633544921875,
-0.012359619140625,
0.031036376953125,
0.033294677734375,
-0.0110931396484375,
0.01146697998046875,
-0.0290985107421875,
-0.0025119781494140625,
-0.048858642578125,
0.04754638671875,
-0.045257568359375,
-0.01467132568359375,
-0.047088623046875,
-0.00720977783203125,
0.0021266937255859375,
0.08026123046875,
-0.0231170654296875,
-0.0218963623046875,
-0.00820159912109375,
0.030975341796875,
-0.034027099609375,
-0.09405517578125,
-0.01114654541015625,
-0.0204315185546875,
-0.07037353515625,
-0.020782470703125,
-0.03729248046875,
-0.0218048095703125,
0.0120849609375,
-0.0016489028930664062,
0.0125885009765625,
-0.05487060546875,
0.037689208984375,
0.00688934326171875,
-0.01177215576171875,
0.0182952880859375,
-0.01433563232421875,
-0.01125335693359375,
-0.019683837890625,
-0.0012521743774414062,
-0.04986572265625,
-0.016204833984375,
0.01708984375,
0.0121612548828125,
-0.005207061767578125,
-0.0285186767578125,
-0.0110321044921875,
0.037994384765625,
-0.029205322265625,
0.0013761520385742188,
0.01261138916015625,
0.03045654296875,
-0.002071380615234375,
0.0309600830078125,
0.02117919921875,
-0.0209197998046875,
0.0280914306640625,
-0.0015344619750976562,
-0.041473388671875,
-0.033721923828125,
-0.047607421875,
-0.0084381103515625,
-0.0028934478759765625,
-0.03558349609375,
-0.06488037109375,
-0.014984130859375,
-0.00768280029296875,
0.0180816650390625,
0.0060577392578125,
-0.032318115234375,
0.01216888427734375,
-0.07086181640625,
0.0295257568359375,
0.038299560546875,
-0.00855255126953125,
-0.00412750244140625,
0.0185699462890625,
0.01169586181640625,
-0.037750244140625,
-0.01393890380859375,
-0.0171051025390625,
0.020172119140625,
0.003139495849609375,
0.06134033203125,
0.006259918212890625,
-0.0158538818359375,
0.04296875,
-0.0236358642578125,
0.002925872802734375,
0.01873779296875,
0.014190673828125,
-0.00643157958984375,
-0.0176544189453125,
0.01001739501953125,
-0.0109405517578125,
0.01187896728515625,
0.037139892578125,
-0.024322509765625,
-0.01146697998046875,
-0.03582763671875,
0.01232147216796875,
-0.0235443115234375,
0.04290771484375,
-0.0183258056640625,
-0.033233642578125,
0.0121002197265625,
0.05303955078125,
0.02813720703125,
0.030303955078125,
-0.01380157470703125,
0.054962158203125,
0.01348876953125,
-0.003589630126953125,
0.01422882080078125,
0.0308990478515625,
0.00127410888671875,
0.046539306640625,
-0.050201416015625,
-0.0190887451171875,
-0.0037994384765625,
0.0009965896606445312,
0.023468017578125,
-0.03155517578125,
-0.03546142578125,
-0.043731689453125,
-0.0357666015625,
-0.04132080078125,
0.043212890625,
-0.028594970703125,
0.0308074951171875,
0.016021728515625,
-0.01413726806640625,
0.000007450580596923828,
-0.041778564453125,
-0.0252532958984375,
-0.05352783203125,
0.050384521484375,
0.002819061279296875,
0.00801849365234375,
-0.01450347900390625,
0.09075927734375,
0.041900634765625,
0.03460693359375,
-0.0252838134765625,
-0.020263671875,
-0.03955078125,
0.0511474609375,
0.0003387928009033203,
-0.02783203125,
0.03326416015625,
0.0098876953125,
0.06854248046875,
-0.0421142578125,
-0.016082763671875,
0.037689208984375,
0.055084228515625,
-0.0079345703125,
-0.030426025390625,
-0.00829315185546875,
-0.0238189697265625,
-0.0231170654296875,
0.038238525390625,
0.01666259765625,
-0.00028204917907714844,
-0.05810546875,
-0.042572021484375,
0.027862548828125,
0.0149993896484375,
-0.01885986328125,
0.03265380859375,
-0.0011310577392578125,
0.0027675628662109375,
0.047821044921875,
-0.035919189453125,
-0.0030155181884765625,
0.00749969482421875,
-0.0081024169921875,
-0.027130126953125,
0.02728271484375,
-0.0016345977783203125,
0.05596923828125,
-0.063720703125,
-0.0662841796875,
0.067626953125,
0.018646240234375,
0.07958984375,
-0.0587158203125,
-0.032806396484375,
0.0196533203125,
-0.00910186767578125,
0.0419921875,
0.017364501953125,
-0.029449462890625,
0.0092620849609375,
-0.044036865234375,
-0.01250457763671875,
0.036895751953125,
-0.01552581787109375,
-0.016815185546875,
-0.0304412841796875,
0.04315185546875,
0.01113128662109375,
0.043182373046875,
0.023681640625,
0.003509521484375,
0.0269012451171875,
0.00992584228515625,
0.055328369140625,
-0.0246124267578125,
0.0635986328125,
0.043487548828125,
0.0262451171875,
0.006282806396484375,
0.026214599609375,
-0.0306549072265625,
-0.0098724365234375,
0.005504608154296875,
-0.02093505859375,
-0.01702880859375,
-0.0026912689208984375,
-0.0089569091796875,
0.0253448486328125,
0.039764404296875,
0.01119232177734375,
-0.036529541015625,
0.006679534912109375,
0.00797271728515625,
-0.02978515625,
0.0229339599609375,
0.021087646484375,
-0.0193328857421875,
-0.0190887451171875,
0.0239105224609375,
0.040313720703125,
-0.006702423095703125,
-0.0220489501953125,
-0.01242828369140625,
0.020538330078125,
-0.004955291748046875,
-0.005062103271484375,
-0.042083740234375,
0.044586181640625,
0.12371826171875,
0.0016613006591796875,
0.058349609375,
0.0282745361328125,
0.0176849365234375,
0.03814697265625,
0.002780914306640625,
0.01158905029296875,
0.0028781890869140625,
0.0726318359375,
0.02691650390625,
-0.002445220947265625,
0.08160400390625,
-0.0155181884765625,
-0.002819061279296875,
0.0290374755859375,
0.0718994140625,
-0.03546142578125,
-0.0027599334716796875,
0.02606201171875,
-0.01459503173828125,
-0.00850677490234375,
0.050323486328125,
-0.0305938720703125,
-0.030364990234375,
-0.0017070770263671875,
-0.03265380859375,
0.007389068603515625,
0.00931549072265625,
-0.002994537353515625,
-0.0202178955078125,
-0.0222930908203125,
0.03570556640625,
-0.006866455078125,
-0.0010442733764648438,
-0.0259857177734375,
0.001026153564453125,
-0.0400390625,
-0.0264434814453125,
0.0208282470703125,
0.010223388671875,
-0.01904296875,
-0.033660888671875,
0.036376953125,
0.01861572265625,
-0.00301361083984375,
0.0270538330078125,
0.003692626953125,
0.0283050537109375,
0.026611328125,
-0.00688934326171875,
-0.0011148452758789062,
0.0034942626953125,
-0.0284881591796875,
0.054962158203125,
-0.0106353759765625,
0.0153656005859375,
-0.01087188720703125,
-0.01556396484375,
-0.0199737548828125,
-0.026885986328125,
-0.0007386207580566406,
-0.00484466552734375,
0.01332855224609375,
0.1317138671875,
-0.07305908203125,
-0.020355224609375,
-0.0015020370483398438,
0.02606201171875,
0.01416778564453125,
-0.000286102294921875,
-0.006328582763671875,
-0.01885986328125,
0.0191497802734375,
-0.0207672119140625,
0.0020999908447265625,
0.0260772705078125,
-0.035430908203125,
-0.046234130859375,
0.05169677734375,
-0.0303497314453125,
0.05780029296875,
0.0294189453125,
0.01204681396484375,
0.03118896484375,
0.0210418701171875,
-0.0242919921875,
0.060333251953125,
-0.0015544891357421875,
-0.01459503173828125,
-0.02716064453125,
0.002582550048828125,
-0.0193939208984375,
0.01019287109375,
0.078857421875,
0.0217437744140625,
-0.01287078857421875,
0.0157318115234375,
0.046234130859375,
0.01074981689453125,
-0.0252227783203125,
0.03582763671875,
0.0186309814453125,
0.04595947265625,
0.05731201171875,
-0.04473876953125,
0.01031494140625,
0.002803802490234375,
-0.0014028549194335938,
0.03912353515625,
0.03643798828125,
0.036895751953125,
0.0232086181640625,
-0.018096923828125,
-0.0299530029296875,
0.020782470703125,
0.052520751953125,
-0.032135009765625,
0.008819580078125,
0.0289154052734375,
0.026885986328125,
-0.052886962890625,
-0.0247344970703125,
-0.0262451171875,
0.0430908203125,
-0.010955810546875,
0.007617950439453125,
0.034637451171875,
0.0171051025390625,
0.0469970703125,
-0.0274810791015625,
-0.00478363037109375,
0.0028438568115234375,
0.00664520263671875,
0.08648681640625,
0.053009033203125,
0.035675048828125,
0.0025539398193359375,
0.00675201416015625,
0.039093017578125,
0.0966796875,
-0.058441162109375,
-0.034393310546875,
0.005992889404296875,
-0.0212860107421875,
0.01131439208984375,
0.002765655517578125,
0.01290130615234375,
0.0021820068359375,
0.00007849931716918945,
-0.002582550048828125,
-0.0081634521484375,
0.016387939453125,
0.07061767578125,
-0.0031032562255859375,
-0.0309600830078125,
-0.051177978515625,
-0.026763916015625,
-0.035247802734375,
-0.0004706382751464844,
-0.0044708251953125,
0.048675537109375,
0.032928466796875,
0.033416748046875,
-0.02508544921875,
-0.0181884765625,
0.0020999908447265625,
0.0156402587890625,
-0.031890869140625,
0.00841522216796875,
-0.0298614501953125,
-0.0218353271484375,
-0.0301361083984375,
0.04071044921875,
0.0645751953125,
-0.0126495361328125,
0.0219879150390625,
-0.0225677490234375,
-0.016021728515625,
0.0239105224609375,
0.0108184814453125,
-0.00836181640625,
0.026611328125,
-0.05877685546875,
0.043121337890625,
0.0030117034912109375,
0.0019016265869140625,
-0.001743316650390625,
-0.0239410400390625,
0.05389404296875,
-0.024658203125,
0.005466461181640625,
0.00821685791015625,
-0.0311737060546875,
0.0193328857421875,
-0.0288848876953125,
0.009918212890625,
-0.01265716552734375,
-0.06109619140625,
-0.02496337890625,
-0.0283050537109375,
0.00884246826171875,
0.01995849609375,
0.0379638671875,
0.0015306472778320312,
0.020233154296875,
-0.006809234619140625,
0.0347900390625,
-0.0259552001953125,
-0.0325927734375,
-0.0015134811401367188,
0.005710601806640625,
0.0184478759765625,
0.02667236328125,
-0.010284423828125,
-0.01107025146484375,
0.0117645263671875,
0.0134124755859375,
0.0176544189453125,
0.09783935546875,
-0.041534423828125,
-0.01806640625,
-0.00574493408203125,
0.040740966796875,
-0.06451416015625,
-0.0007047653198242188,
-0.037841796875,
-0.0208282470703125,
0.03240966796875,
0.01336669921875,
-0.0161285400390625,
0.032958984375,
0.01470947265625,
-0.0066680908203125,
0.031463623046875,
-0.039520263671875,
0.012603759765625,
0.006717681884765625,
0.0166015625,
-0.0296478271484375,
-0.06280517578125,
-0.0264892578125,
0.00722503662109375,
-0.0016727447509765625,
0.0220184326171875,
-0.025970458984375,
0.04656982421875,
-0.0009937286376953125,
-0.005207061767578125,
0.00730133056640625,
-0.0177764892578125,
0.03485107421875,
0.0391845703125,
-0.0206451416015625,
0.034210205078125,
-0.0111846923828125,
-0.0253143310546875,
0.02825927734375,
0.00933837890625,
-0.00943756103515625,
0.0024013519287109375,
0.043487548828125,
-0.00902557373046875,
-0.033599853515625,
0.0182647705078125,
0.0169677734375,
-0.004302978515625,
-0.033538818359375,
0.00714874267578125,
-0.0232696533203125,
-0.033172607421875,
-0.0138702392578125,
-0.0703125,
-0.0094146728515625,
0.00043487548828125,
-0.0557861328125,
-0.0178375244140625,
0.0202789306640625,
-0.01380157470703125,
-0.0137176513671875,
0.0087127685546875,
-0.05615234375,
0.05596923828125,
-0.00496673583984375,
0.001987457275390625,
-0.049591064453125,
0.024688720703125,
-0.0302276611328125,
0.0016164779663085938,
-0.039337158203125,
0.013275146484375,
-0.03802490234375,
-0.0099334716796875,
-0.00189208984375,
0.0013208389282226562,
0.0193939208984375,
0.010833740234375,
-0.038970947265625,
-0.0231781005859375,
-0.035125732421875,
0.0478515625,
-0.050689697265625,
-0.006732940673828125,
-0.0025348663330078125,
0.0085296630859375,
-0.04791259765625,
-0.01690673828125,
0.02752685546875,
0.006511688232421875,
-0.02484130859375,
0.0008597373962402344,
-0.038665771484375,
-0.026092529296875,
-0.03826904296875,
-0.032318115234375,
0.0285186767578125,
0.0186614990234375,
-0.028350830078125,
-0.006633758544921875,
0.015228271484375,
-0.000499725341796875,
0.0276641845703125,
0.006351470947265625,
-0.03167724609375,
-0.0125885009765625,
-0.001995086669921875,
0.051483154296875,
0.01495361328125,
0.006595611572265625,
0.0284576416015625,
-0.046966552734375,
0.057586669921875,
0.041290283203125,
0.05743408203125,
0.01171875,
0.004177093505859375,
0.01690673828125,
0.0286865234375,
-0.030059814453125,
0.05035400390625,
0.0080718994140625,
-0.007762908935546875,
-0.01113128662109375,
-0.047607421875,
-0.036590576171875,
-0.02001953125,
0.062469482421875,
0.0399169921875,
0.0188751220703125,
-0.0148162841796875,
-0.042724609375,
-0.0322265625,
-0.005764007568359375,
-0.03363037109375,
0.023773193359375,
-0.08721923828125,
0.00411224365234375,
0.0093536376953125,
-0.014251708984375,
-0.049224853515625,
0.0024929046630859375,
-0.052154541015625,
0.0009098052978515625,
-0.0299224853515625,
-0.01019287109375,
-0.0181884765625,
-0.0023746490478515625,
0.030792236328125,
-0.043609619140625,
-0.031982421875,
0.01678466796875,
0.01187896728515625,
-0.01483917236328125,
-0.024749755859375,
0.01226806640625,
0.073486328125,
-0.028411865234375,
-0.024383544921875,
0.058013916015625,
0.0255889892578125,
0.0220947265625,
0.0044097900390625,
0.00460052490234375,
0.006969451904296875,
-0.0011053085327148438,
-0.00870513916015625,
-0.002506256103515625,
0.010040283203125,
-0.00806427001953125,
-0.0029850006103515625,
0.024200439453125,
-0.02227783203125,
-0.003551483154296875,
0.0262298583984375,
0.0003616809844970703,
-0.03912353515625,
0.020721435546875,
-0.04864501953125,
-0.01296234130859375,
-0.01242828369140625,
-0.044342041015625,
-0.059326171875,
0.011871337890625,
-0.046966552734375,
0.0001163482666015625,
0.0347900390625
] |
3e75c23b8c651efd9e2b9bfa701f746e95643580 | Wordpress Stackexchange
Q: How to get category id of current post? I need to get the category id of the current post outside the loop. First I get the category based on the post id:
global $wp_query;
$postcat = get_the_category( $wp_query->post->ID );
Now how to get the category id? I tried: $cat_id = $postcat->term_id; but it's not working.
A: Old post I know, but wp_get_post_categories is likely what you want.
$cats = wp_get_post_categories( get_the_ID(), array( 'fields' => 'ids' ) );
This will return an array of category IDs like so
array (size=3)
0 => int 13
1 => int 15
2 => int 120
So if you just want one category ID, you can get that from the first key in the array of category IDs.
$category_id = $cats[0];
| Q: How to get category id of current post? I need to get the category id of the current post outside the loop. First I get the category based on the post id:
global $wp_query;
$postcat = get_the_category( $wp_query->post->ID );
Now how to get the category id? I tried: $cat_id = $postcat->term_id; but it's not working.
A: Old post I know, but wp_get_post_categories is likely what you want.
$cats = wp_get_post_categories( get_the_ID(), array( 'fields' => 'ids' ) );
This will return an array of category IDs like so
array (size=3)
0 => int 13
1 => int 15
2 => int 120
So if you just want one category ID, you can get that from the first key in the array of category IDs.
$category_id = $cats[0];
A: When you use get_the_category() function to get category's data, it return the array of object so you have to access category id by passing array key, like this $postcat[0]->term_id
global $post;
$postcat = get_the_category( $post->ID );
// try print_r($postcat) ;
if ( ! empty( $postcat ) ) {
echo esc_html( $postcat[0]->name );
}
Hope this help!
A: An improvement to Govind Kumar answer, as the asker askes about category ID, not the category name. The property name of the object for category ID is "cat_ID".
// get cat ID for general view
$postcat = get_the_category( $query->post->ID );
if ( ! empty( $postcat ) ) {
echo $postcat[0]->cat_ID;
}
A:
global $post;
$postcat = get_the_category( $post->ID );
if ( ! empty( $postcat ) ) {
foreach ($postcat as $nameCategory) {
echo $nameCategory->name .' ';
}
}?>
A: function catName($cat_id) {
$cat_id = (int) $cat_id;
$category = &get_category($cat_id);
return $category->name;
}
function catLink($cat_id) {
$category = get_the_category();
$category_link = get_category_link($cat_id);
echo $category_link;
}
function catCustom() {
$cats = get_the_category($post->ID);
$parent = get_category($cats[1]->category_parent);
if (is_wp_error($parent)){
$cat = get_category($cats[0]);
}
else{
$cat = $parent;
}
echo '<a href="'.get_category_link($cat).'">'.$cat->name.'</a>';
}
USE <a href="<?php catLink(1); ?>"> <?php catName(1); ?>
| wordpress | {
"language": "en",
"length": 321,
"provenance": "stackexchange_00019.jsonl.gz:470722",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247859"
} | [
0.043853759765625,
-0.0115203857421875,
-0.01300048828125,
-0.0233154296875,
0.0226287841796875,
-0.03192138671875,
0.047088623046875,
0.0031585693359375,
0.0037288665771484375,
0.01995849609375,
-0.03717041015625,
-0.0023326873779296875,
-0.01200103759765625,
-0.0183258056640625,
-0.0175628662109375,
-0.027130126953125,
0.045166015625,
-0.04107666015625,
0.029632568359375,
-0.0041961669921875,
-0.00824737548828125,
0.010498046875,
0.053924560546875,
0.050933837890625,
0.026763916015625,
-0.0187835693359375,
0.031097412109375,
-0.034393310546875,
0.007030487060546875,
-0.03961181640625,
0.0197906494140625,
0.037567138671875,
0.00319671630859375,
-0.015716552734375,
0.032684326171875,
0.018035888671875,
0.0198516845703125,
0.0016088485717773438,
0.047637939453125,
0.00547027587890625,
0.032196044921875,
-0.025054931640625,
0.017547607421875,
0.0009493827819824219,
-0.01488494873046875,
-0.0229644775390625,
0.01250457763671875,
-0.038482666015625,
0.0173797607421875,
-0.0295867919921875,
0.0271148681640625,
0.01342010498046875,
0.0477294921875,
-0.019256591796875,
-0.0274658203125,
-0.0167236328125,
-0.003017425537109375,
-0.0233612060546875,
0.06573486328125,
-0.020843505859375,
-0.05438232421875,
-0.06292724609375,
0.052764892578125,
-0.039398193359375,
0.006072998046875,
0.007587432861328125,
0.081787109375,
0.020172119140625,
-0.02642822265625,
-0.0205535888671875,
0.023956298828125,
0.0010690689086914062,
0.003192901611328125,
0.00301361083984375,
-0.033599853515625,
-0.052154541015625,
0.04888916015625,
-0.033355712890625,
-0.0268402099609375,
0.01971435546875,
-0.0171966552734375,
-0.007617950439453125,
-0.0655517578125,
0.018341064453125,
-0.0171661376953125,
0.019866943359375,
-0.01363372802734375,
-0.021728515625,
-0.02337646484375,
-0.0302886962890625,
-0.0250701904296875,
-0.0155029296875,
-0.040313720703125,
0.00170135498046875,
-0.0101470947265625,
-0.046051025390625,
0.03314208984375,
0.06341552734375,
-0.03009033203125,
-0.01351165771484375,
-0.0198516845703125,
-0.0273895263671875,
-0.01824951171875,
-0.019683837890625,
0.005825042724609375,
0.01287078857421875,
-0.0020389556884765625,
0.005611419677734375,
0.044342041015625,
0.034912109375,
-0.00704193115234375,
0.019439697265625,
0.01031494140625,
0.003726959228515625,
-0.045806884765625,
0.03564453125,
-0.0015430450439453125,
-0.02093505859375,
-0.021331787109375,
0.005657196044921875,
0.006359100341796875,
0.036865234375,
0.0014810562133789062,
-0.0036182403564453125,
0.0158538818359375,
0.024169921875,
-0.0172576904296875,
-0.044158935546875,
0.005889892578125,
-0.0229339599609375,
-0.054656982421875,
0.01995849609375,
0.09423828125,
0.046539306640625,
0.037261962890625,
-0.019317626953125,
0.003459930419921875,
-0.0192413330078125,
0.01363372802734375,
-0.007633209228515625,
-0.01374053955078125,
-0.0006155967712402344,
0.0384521484375,
-0.0287628173828125,
0.004154205322265625,
0.0230865478515625,
0.009674072265625,
0.011566162109375,
0.007274627685546875,
-0.033721923828125,
0.031982421875,
-0.048126220703125,
0.027008056640625,
0.01898193359375,
0.0153350830078125,
0.0053863525390625,
0.0546875,
-0.037841796875,
-0.021942138671875,
-0.044891357421875,
0.056060791015625,
0.016448974609375,
0.0277557373046875,
0.0204010009765625,
-0.0175628662109375,
-0.01161956787109375,
-0.06719970703125,
-0.02008056640625,
0.0222320556640625,
0.06488037109375,
0.01189422607421875,
-0.0177001953125,
0.01934814453125,
-0.001495361328125,
-0.028045654296875,
-0.0164031982421875,
-0.02105712890625,
-0.040802001953125,
0.044708251953125,
0.0222930908203125,
-0.040496826171875,
-0.039703369140625,
-0.0384521484375,
0.0177001953125,
-0.023681640625,
0.036468505859375,
0.0144805908203125,
0.0687255859375,
-0.00839996337890625,
0.0252532958984375,
0.00046539306640625,
0.0063934326171875,
-0.0660400390625,
-0.00487518310546875,
0.0078582763671875,
0.0211029052734375,
-0.019256591796875,
0.0178375244140625,
-0.0035610198974609375,
-0.0179443359375,
0.018829345703125,
0.0118865966796875,
-0.01155853271484375,
0.0103302001953125,
-0.05889892578125,
0.00650787353515625,
-0.0032291412353515625,
0.043365478515625,
-0.01045989990234375,
-0.004894256591796875,
0.0227813720703125,
-0.028350830078125,
0.0032634735107421875,
-0.055877685546875,
-0.031341552734375,
0.032958984375,
-0.01328277587890625,
-0.007633209228515625,
-0.01690673828125,
0.011077880859375,
-0.05377197265625,
0.021881103515625,
-0.05023193359375,
0.0137939453125,
0.052764892578125,
0.014801025390625,
-0.01369476318359375,
-0.02862548828125,
0.038421630859375,
0.04412841796875,
-0.08868408203125,
-0.028350830078125,
0.0176544189453125,
0.0165557861328125,
-0.0283355712890625,
-0.006450653076171875,
0.03643798828125,
-0.0306396484375,
0.0101470947265625,
0.04217529296875,
0.033843994140625,
0.003757476806640625,
0.00030922889709472656,
-0.00865936279296875,
0.026092529296875,
-0.03656005859375,
0.00484466552734375,
-0.0287322998046875,
0.022064208984375,
0.035186767578125,
0.0143585205078125,
0.00891876220703125,
0.0206298828125,
0.035186767578125,
0.0244293212890625,
0.03924560546875,
-0.00788116455078125,
-0.0156707763671875,
0.004627227783203125,
-0.00494384765625,
0.004238128662109375,
-0.051788330078125,
-0.038116455078125,
-0.01067352294921875,
0.0298614501953125,
0.007904052734375,
0.0482177734375,
0.04437255859375,
0.005069732666015625,
-0.022003173828125,
-0.01461029052734375,
0.0086212158203125,
-0.00408172607421875,
0.031646728515625,
-0.0168304443359375,
0.0194549560546875,
-0.019012451171875,
-0.0078125,
0.007083892822265625,
0.00701141357421875,
-0.0114288330078125,
0.054412841796875,
0.0038127899169921875,
-0.0147857666015625,
-0.0305633544921875,
-0.0675048828125,
-0.00464630126953125,
-0.0121612548828125,
-0.0201263427734375,
0.0019931793212890625,
0.0210113525390625,
0.053375244140625,
-0.00728607177734375,
0.0241851806640625,
-0.02490234375,
0.03009033203125,
0.04510498046875,
-0.02166748046875,
0.0268707275390625,
-0.01641845703125,
0.05279541015625,
0.048004150390625,
-0.026092529296875,
0.02825927734375,
0.0128326416015625,
-0.00311279296875,
0.04888916015625,
-0.01273345947265625,
-0.00727081298828125,
0.0200653076171875,
-0.053619384765625,
0.0263824462890625,
0.0279541015625,
0.09967041015625,
-0.024017333984375,
-0.050933837890625,
0.01462554931640625,
0.036956787109375,
-0.059356689453125,
-0.08294677734375,
0.031005859375,
-0.03594970703125,
0.005702972412109375,
-0.024932861328125,
-0.0123748779296875,
-0.016571044921875,
-0.015655517578125,
-0.0055084228515625,
0.01277923583984375,
-0.03643798828125,
-0.07647705078125,
-0.055938720703125,
-0.08367919921875,
-0.0209808349609375,
-0.01094818115234375,
-0.00035762786865234375,
0.01082611083984375,
0.03289794921875,
0.01320648193359375,
-0.0272064208984375,
0.00965118408203125,
0.04119873046875,
-0.02606201171875,
-0.0230865478515625,
-0.006992340087890625,
-0.005126953125,
0.005680084228515625,
0.002719879150390625,
-0.01418304443359375,
0.0159759521484375,
0.0015716552734375,
-0.00185394287109375,
-0.028076171875,
0.032684326171875,
0.0118865966796875,
0.0187835693359375,
0.0167236328125,
0.06317138671875,
0.040985107421875,
-0.004302978515625,
-0.0164031982421875,
-0.022003173828125,
-0.032562255859375,
-0.0008592605590820312,
0.003589630126953125,
0.00835418701171875,
-0.0238037109375,
0.0126495361328125,
-0.0226593017578125,
-0.0295867919921875,
-0.016510009765625,
-0.04058837890625,
0.058013916015625,
0.0196685791015625,
0.0243377685546875,
0.027435302734375,
-0.008026123046875,
-0.0390625,
0.01922607421875,
-0.0179901123046875,
-0.012451171875,
-0.0350341796875,
0.016357421875,
-0.0279693603515625,
-0.048583984375,
0.048248291015625,
-0.0125274658203125,
-0.013580322265625,
-0.0234222412109375,
-0.031890869140625,
0.01186370849609375,
0.09893798828125,
-0.0284423828125,
-0.03204345703125,
-0.019683837890625,
0.01097869873046875,
-0.0198211669921875,
-0.046630859375,
-0.0289306640625,
-0.0230865478515625,
-0.04132080078125,
-0.0004687309265136719,
-0.01202392578125,
-0.00658416748046875,
-0.014373779296875,
0.053009033203125,
-0.02825927734375,
-0.018280029296875,
0.041259765625,
-0.060272216796875,
0.01361083984375,
-0.0023593902587890625,
0.002521514892578125,
-0.0182647705078125,
-0.03448486328125,
-0.01207733154296875,
-0.0291595458984375,
0.0029659271240234375,
-0.014068603515625,
0.0191650390625,
0.00794219970703125,
0.01280975341796875,
0.0028171539306640625,
0.0318603515625,
-0.0131072998046875,
0.01044464111328125,
0.002086639404296875,
0.0457763671875,
-0.01454925537109375,
-0.011962890625,
-0.0026702880859375,
-0.032196044921875,
-0.014862060546875,
-0.032470703125,
-0.00763702392578125,
-0.008880615234375,
-0.05401611328125,
-0.021575927734375,
-0.042755126953125,
-0.0124359130859375,
-0.057373046875,
-0.040802001953125,
-0.00991058349609375,
0.0223541259765625,
-0.02447509765625,
0.0236053466796875,
-0.0257568359375,
-0.05841064453125,
0.078857421875,
0.0401611328125,
-0.008392333984375,
-0.018768310546875,
0.091064453125,
0.007965087890625,
-0.04473876953125,
-0.045318603515625,
-0.0013589859008789062,
0.04718017578125,
-0.0195159912109375,
0.048828125,
0.0328369140625,
-0.044921875,
0.07550048828125,
0.028350830078125,
-0.0290679931640625,
-0.01149749755859375,
0.0623779296875,
-0.0044708251953125,
-0.0018911361694335938,
-0.0159149169921875,
-0.04376220703125,
0.045379638671875,
0.004360198974609375,
-0.034881591796875,
-0.007015228271484375,
-0.0088348388671875,
0.045013427734375,
-0.0213623046875,
0.031890869140625,
-0.03985595703125,
-0.048187255859375,
0.017852783203125,
0.038909912109375,
0.0207672119140625,
0.040008544921875,
-0.00021350383758544922,
0.049896240234375,
0.0296630859375,
-0.00920867919921875,
-0.032440185546875,
-0.01038360595703125,
-0.0005583763122558594,
0.01342010498046875,
-0.0258636474609375,
-0.01190948486328125,
-0.00728607177734375,
0.01198577880859375,
-0.0025615692138671875,
-0.0338134765625,
-0.04461669921875,
-0.0186920166015625,
-0.0146331787109375,
-0.01019287109375,
0.0419921875,
-0.046630859375,
0.026458740234375,
0.026336669921875,
-0.00988006591796875,
0.0040740966796875,
-0.08319091796875,
-0.01551055908203125,
-0.03265380859375,
-0.004302978515625,
-0.0068511962890625,
-0.0014982223510742188,
0.03314208984375,
0.053253173828125,
0.007389068603515625,
0.05499267578125,
-0.0272674560546875,
0.03509521484375,
-0.018341064453125,
0.046234130859375,
0.010345458984375,
-0.01922607421875,
0.01251220703125,
-0.004764556884765625,
-0.0053863525390625,
-0.06201171875,
0.015899658203125,
-0.006610870361328125,
0.0465087890625,
-0.0032176971435546875,
-0.046142578125,
0.047515869140625,
-0.016754150390625,
-0.002685546875,
0.0194549560546875,
0.01666259765625,
-0.0015697479248046875,
-0.01448822021484375,
-0.0016384124755859375,
0.02142333984375,
0.0223236083984375,
-0.0137481689453125,
0.00141143798828125,
-0.041534423828125,
0.024139404296875,
0.005512237548828125,
0.026885986328125,
-0.0161895751953125,
-0.0198822021484375,
-0.063720703125,
-0.02740478515625,
-0.01146697998046875,
0.038299560546875,
-0.0046844482421875,
-0.012481689453125,
-0.0504150390625,
0.029937744140625,
0.0258026123046875,
0.07122802734375,
-0.033782958984375,
-0.0595703125,
0.041900634765625,
-0.0230865478515625,
0.05926513671875,
0.016082763671875,
-0.0304718017578125,
-0.00107574462890625,
-0.055419921875,
-0.00402069091796875,
0.046356201171875,
-0.03509521484375,
-0.0191192626953125,
-0.03466796875,
0.0153656005859375,
0.03021240234375,
0.01306915283203125,
0.0129852294921875,
-0.0296783447265625,
0.0011377334594726562,
0.0016279220581054688,
0.03741455078125,
-0.01238250732421875,
0.0244140625,
0.021728515625,
0.031890869140625,
-0.00124359130859375,
0.00696563720703125,
-0.0170135498046875,
-0.0227813720703125,
-0.01522064208984375,
-0.043243408203125,
0.0181884765625,
0.028411865234375,
-0.00699615478515625,
-0.0147857666015625,
0.0270538330078125,
0.009124755859375,
-0.01456451416015625,
0.0088653564453125,
0.0117340087890625,
-0.010772705078125,
-0.03082275390625,
0.045745849609375,
-0.025543212890625,
0.04388427734375,
-0.021026611328125,
-0.0082855224609375,
-0.0022411346435546875,
0.025299072265625,
-0.0128326416015625,
-0.032440185546875,
-0.0104522705078125,
0.037384033203125,
-0.004772186279296875,
0.040740966796875,
0.07525634765625,
0.00418853759765625,
0.05072021484375,
0.0202789306640625,
0.021881103515625,
0.00012874603271484375,
0.0245361328125,
0.026397705078125,
-0.0032291412353515625,
0.07391357421875,
0.0164337158203125,
-0.0108489990234375,
0.037811279296875,
-0.0484619140625,
-0.0169219970703125,
-0.0196685791015625,
0.027557373046875,
0.003612518310546875,
0.0174560546875,
0.03350830078125,
-0.03887939453125,
-0.0338134765625,
0.036224365234375,
-0.019866943359375,
-0.01334381103515625,
0.0241851806640625,
-0.044586181640625,
-0.01406097412109375,
0.024932861328125,
-0.0086822509765625,
-0.0012178421020507812,
-0.01169586181640625,
0.04803466796875,
0.0166473388671875,
-0.045013427734375,
-0.0087127685546875,
0.0208587646484375,
0.005390167236328125,
-0.03790283203125,
-0.010528564453125,
0.0165252685546875,
-0.0090789794921875,
-0.0614013671875,
0.062469482421875,
-0.0008072853088378906,
0.032562255859375,
0.008270263671875,
-0.023101806640625,
0.015869140625,
0.03240966796875,
-0.01007843017578125,
-0.0005345344543457031,
0.00719451904296875,
-0.043243408203125,
0.03143310546875,
-0.004791259765625,
-0.007007598876953125,
0.050506591796875,
-0.030853271484375,
0.002330780029296875,
0.0006356239318847656,
0.0260467529296875,
-0.0096435546875,
-0.032867431640625,
0.068359375,
-0.05889892578125,
0.0041046142578125,
0.025787353515625,
0.057098388671875,
-0.0032024383544921875,
-0.00014829635620117188,
0.00420379638671875,
0.00390625,
0.04150390625,
0.0012559890747070312,
0.046600341796875,
0.01441192626953125,
-0.0030269622802734375,
-0.0450439453125,
0.022918701171875,
-0.0255584716796875,
0.032928466796875,
0.0294952392578125,
-0.00970458984375,
-0.00428009033203125,
-0.026702880859375,
-0.041168212890625,
0.043701171875,
-0.0108489990234375,
0.02874755859375,
-0.057220458984375,
-0.0118408203125,
-0.0017795562744140625,
0.037384033203125,
0.08648681640625,
0.022857666015625,
-0.01544952392578125,
-0.0210113525390625,
0.0106201171875,
0.03851318359375,
-0.0184173583984375,
0.0217437744140625,
0.01105499267578125,
0.0123443603515625,
0.041900634765625,
-0.01030731201171875,
0.047515869140625,
-0.01094818115234375,
-0.0205841064453125,
0.0174560546875,
0.0249786376953125,
0.0247039794921875,
0.0025348663330078125,
0.01049041748046875,
-0.0284881591796875,
0.01059722900390625,
0.02423095703125,
-0.02886962890625,
0.00213623046875,
0.08074951171875,
0.072509765625,
-0.040557861328125,
0.0126800537109375,
-0.04443359375,
0.07470703125,
0.00678253173828125,
0.0352783203125,
0.0447998046875,
0.0297088623046875,
0.053436279296875,
0.016387939453125,
0.042633056640625,
0.0263519287109375,
-0.02301025390625,
0.0751953125,
0.04425048828125,
0.0235137939453125,
-0.0177001953125,
0.0181732177734375,
0.0345458984375,
0.08074951171875,
-0.060577392578125,
-0.04168701171875,
0.0270538330078125,
0.0196533203125,
0.00908660888671875,
0.031463623046875,
0.04022216796875,
0.0300445556640625,
0.060760498046875,
-0.05267333984375,
-0.00992584228515625,
0.0296478271484375,
0.052215576171875,
0.0083770751953125,
-0.0027675628662109375,
-0.055511474609375,
-0.036285400390625,
-0.06414794921875,
0.0099639892578125,
0.021575927734375,
0.054656982421875,
0.0247344970703125,
0.06658935546875,
-0.00981903076171875,
-0.0325927734375,
0.0268707275390625,
0.0244293212890625,
-0.006343841552734375,
-0.039093017578125,
0.0217742919921875,
-0.037353515625,
-0.0204925537109375,
0.01448822021484375,
0.005573272705078125,
0.00212860107421875,
0.032958984375,
0.045013427734375,
-0.00922393798828125,
-0.028076171875,
0.0287017822265625,
-0.0006518363952636719,
-0.0163421630859375,
-0.02850341796875,
0.01274871826171875,
0.0278778076171875,
0.006679534912109375,
0.0087127685546875,
0.016815185546875,
0.050933837890625,
-0.00801849365234375,
0.038726806640625,
0.007236480712890625,
-0.015167236328125,
0.0223541259765625,
-0.024139404296875,
0.03125,
0.0003681182861328125,
-0.1099853515625,
-0.0130615234375,
-0.06939697265625,
-0.0237579345703125,
0.0396728515625,
0.0287933349609375,
-0.0136260986328125,
0.0125732421875,
-0.00782012939453125,
-0.025238037109375,
0.01190185546875,
0.00853729248046875,
0.00888824462890625,
0.014190673828125,
0.01074981689453125,
0.00835418701171875,
-0.0279998779296875,
-0.005535125732421875,
0.01154327392578125,
-0.004741668701171875,
0.046844482421875,
-0.037384033203125,
0.0506591796875,
0.01436614990234375,
-0.029388427734375,
0.05828857421875,
-0.11358642578125,
-0.053802490234375,
0.0799560546875,
-0.034271240234375,
-0.01097869873046875,
0.0020999908447265625,
-0.007633209228515625,
0.0224456787109375,
0.048187255859375,
-0.00003790855407714844,
0.000041365623474121094,
-0.0131072998046875,
0.016387939453125,
-0.0040283203125,
0.029632568359375,
-0.01558685302734375,
-0.005168914794921875,
-0.028228759765625,
-0.043548583984375,
0.052276611328125,
0.048370361328125,
0.0229339599609375,
-0.0043487548828125,
-0.0143280029296875,
0.005199432373046875,
-0.0099639892578125,
0.056976318359375,
-0.01358795166015625,
0.038330078125,
-0.07025146484375,
0.0215911865234375,
0.0225372314453125,
-0.0078125,
0.0165252685546875,
0.0161590576171875,
-0.0005369186401367188,
0.00998687744140625,
-0.0071258544921875,
0.01183319091796875,
0.0294036865234375,
0.04754638671875,
-0.023468017578125,
0.03179931640625,
0.006343841552734375,
0.003040313720703125,
0.0200958251953125,
-0.057861328125,
-0.0323486328125,
-0.046600341796875,
-0.0115966796875,
0.029083251953125,
-0.0246429443359375,
-0.016510009765625,
-0.043548583984375,
-0.0240936279296875,
0.01486968994140625,
-0.004695892333984375,
-0.00618743896484375,
0.0138397216796875,
-0.01096343994140625,
0.0092010498046875,
-0.026519775390625,
-0.016754150390625,
0.0091400146484375,
0.0223541259765625,
-0.05511474609375,
0.01255035400390625,
-0.0095367431640625,
-0.0224609375,
0.002040863037109375,
0.0281219482421875,
0.0015707015991210938,
-0.03106689453125,
-0.037017822265625,
0.0531005859375,
0.0237579345703125,
0.0787353515625,
0.045013427734375,
-0.0127410888671875,
0.00457763671875,
0.0239105224609375,
-0.055023193359375,
-0.0198516845703125,
0.055145263671875,
-0.031585693359375,
-0.026885986328125,
-0.039306640625,
0.02587890625,
0.0340576171875,
-0.00908660888671875,
-0.00759124755859375,
0.01271820068359375,
-0.00921630859375,
-0.032257080078125,
-0.0018901824951171875,
0.0025539398193359375,
0.005847930908203125,
-0.038177490234375,
-0.00861358642578125,
-0.036224365234375,
-0.021026611328125,
0.020782470703125,
0.038177490234375,
0.025787353515625,
0.031707763671875,
0.0166473388671875,
-0.0716552734375,
0.01617431640625,
-0.0158538818359375,
0.056671142578125,
-0.0301055908203125,
0.021270751953125,
-0.024139404296875,
0.01438140869140625,
-0.055999755859375,
-0.0068817138671875,
-0.00714111328125,
0.0677490234375,
-0.0047607421875,
-0.040985107421875,
-0.031341552734375,
-0.019317626953125,
0.0245208740234375,
0.03668212890625,
0.0037288665771484375,
-0.01739501953125,
-0.04058837890625,
-0.0307769775390625,
-0.021209716796875,
-0.012939453125,
0.02581787109375,
-0.061553955078125,
0.0195465087890625,
0.01123046875,
-0.00725555419921875,
-0.0234527587890625,
-0.018707275390625,
-0.049774169921875,
-0.002490997314453125,
-0.03369140625,
0.008941650390625,
-0.0246124267578125,
0.04876708984375,
-0.002086639404296875,
-0.0254669189453125,
-0.041961669921875,
-0.005828857421875,
-0.0229644775390625,
-0.0252685546875,
-0.0362548828125,
0.0071258544921875,
0.0305023193359375,
-0.0288238525390625,
-0.010009765625,
0.017791748046875,
0.01552581787109375,
0.01349639892578125,
0.0024776458740234375,
-0.0114288330078125,
0.021026611328125,
0.003143310546875,
0.0159149169921875,
-0.01041412353515625,
0.032257080078125,
0.01320648193359375,
0.0310516357421875,
0.02655029296875,
-0.0023593902587890625,
-0.007045745849609375,
0.07159423828125,
-0.0107421875,
-0.05419921875,
-0.0006604194641113281,
-0.058380126953125,
-0.007549285888671875,
0.00254058837890625,
0.00977325439453125,
-0.01131439208984375,
0.007080078125,
0.004871368408203125,
0.0006418228149414062,
0.0140533447265625
] |
ea7fe674197c687682fbc90cec232828b58824a6 | Wordpress Stackexchange
Q: WP REST API Is it rather easy to rename the default wp-json uri part? The WP REST API exposes a lot of information so I filter endpoints that aren't needed to expose.
I can't filter everything: The location of needed media files are exposed for example.
As an extra protection I'd like to mystify the default uri.
I would like to change for example: http://example.com/wp-json/wp/v2/ to http://example.com/mistified/wp/v2/
Is this rather easy possible?
A: Please note that for current versions of WordPress, using the json_url_prefix filter no longer works.
On WordPress 4.7 (and using the REST API from the core instead of a plugin), this is what I needed to change the API prefix.
add_filter( 'rest_url_prefix', 'my_theme_api_slug');
function my_theme_api_slug( $slug ) { return 'api'; }
If this doesn't work straight away, you'll need to flush the rewrite rules. You can run this piece of code once to do so (don't leave it in your code so it runs everytime):
flush_rewrite_rules(true);
| Q: WP REST API Is it rather easy to rename the default wp-json uri part? The WP REST API exposes a lot of information so I filter endpoints that aren't needed to expose.
I can't filter everything: The location of needed media files are exposed for example.
As an extra protection I'd like to mystify the default uri.
I would like to change for example: http://example.com/wp-json/wp/v2/ to http://example.com/mistified/wp/v2/
Is this rather easy possible?
A: Please note that for current versions of WordPress, using the json_url_prefix filter no longer works.
On WordPress 4.7 (and using the REST API from the core instead of a plugin), this is what I needed to change the API prefix.
add_filter( 'rest_url_prefix', 'my_theme_api_slug');
function my_theme_api_slug( $slug ) { return 'api'; }
If this doesn't work straight away, you'll need to flush the rewrite rules. You can run this piece of code once to do so (don't leave it in your code so it runs everytime):
flush_rewrite_rules(true);
A: You could use the json_url_prefix hook to remove 'wp-json' across all API routes. The below example will do the example in your question:
add_filter( 'json_url_prefix', 'my_theme_api_slug');
function my_theme_api_slug( $slug ) {
return 'mistified';
}
| wordpress | {
"language": "en",
"length": 195,
"provenance": "stackexchange_00019.jsonl.gz:470723",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/247862"
} | [
0.003459930419921875,
-0.01329803466796875,
-0.034881591796875,
-0.024444580078125,
-0.0185546875,
-0.012237548828125,
0.0030002593994140625,
0.00513458251953125,
-0.0233917236328125,
0.0189208984375,
0.021759033203125,
-0.017364501953125,
-0.0008778572082519531,
-0.04327392578125,
0.000030875205993652344,
-0.040924072265625,
0.0121612548828125,
0.034210205078125,
0.0180206298828125,
-0.0230712890625,
0.01209259033203125,
-0.0261993408203125,
0.00772857666015625,
0.09161376953125,
0.00983428955078125,
-0.017791748046875,
0.0765380859375,
-0.048126220703125,
0.00968170166015625,
-0.022430419921875,
0.007720947265625,
-0.001956939697265625,
0.01800537109375,
0.058502197265625,
-0.061553955078125,
0.0016202926635742188,
0.01343536376953125,
0.014862060546875,
-0.0109100341796875,
0.0323486328125,
0.0197601318359375,
-0.0189208984375,
-0.0013475418090820312,
-0.028778076171875,
-0.01294708251953125,
-0.00540924072265625,
0.0264129638671875,
-0.00879669189453125,
0.0169830322265625,
0.0222320556640625,
-0.004302978515625,
0.0330810546875,
-0.0013713836669921875,
0.012908935546875,
0.006580352783203125,
0.0064697265625,
0.049163818359375,
-0.021453857421875,
0.032440185546875,
-0.0244903564453125,
-0.031829833984375,
0.0249176025390625,
0.010498046875,
-0.00746917724609375,
0.04144287109375,
0.006664276123046875,
0.0106353759765625,
0.0213470458984375,
-0.0107574462890625,
0.051239013671875,
0.0216217041015625,
-0.034332275390625,
0.0033893585205078125,
-0.0201416015625,
-0.01422882080078125,
-0.019683837890625,
0.0194854736328125,
-0.01039886474609375,
0.01007080078125,
-0.0010280609130859375,
0.03009033203125,
-0.0728759765625,
0.0250396728515625,
0.006435394287109375,
0.0077056884765625,
0.0113983154296875,
0.00323486328125,
0.0038051605224609375,
-0.03131103515625,
0.0009608268737792969,
-0.020843505859375,
-0.07891845703125,
-0.03533935546875,
0.0491943359375,
0.0282745361328125,
-0.00688934326171875,
-0.01097869873046875,
-0.0277557373046875,
-0.00510406494140625,
0.0177154541015625,
0.05194091796875,
-0.0645751953125,
0.07781982421875,
-0.022247314453125,
0.032257080078125,
0.002986907958984375,
-0.003902435302734375,
0.034820556640625,
0.06890869140625,
0.007049560546875,
-0.01523590087890625,
0.082275390625,
0.00608062744140625,
0.034027099609375,
-0.062255859375,
-0.043792724609375,
-0.04644775390625,
-0.0229339599609375,
-0.0305328369140625,
-0.021759033203125,
-0.00749969482421875,
-0.00711822509765625,
0.00469207763671875,
0.029327392578125,
0.003780364990234375,
0.011077880859375,
-0.0229339599609375,
0.00658416748046875,
-0.017425537109375,
0.011322021484375,
-0.0035724639892578125,
0.024383544921875,
0.0240325927734375,
0.022857666015625,
-0.011260986328125,
-0.00946044921875,
0.0318603515625,
0.01494598388671875,
0.0023479461669921875,
0.00690460205078125,
0.00920867919921875,
-0.0079498291015625,
0.0034027099609375,
0.0020351409912109375,
0.0330810546875,
0.01224517822265625,
0.02099609375,
0.0103607177734375,
0.0022373199462890625,
-0.00553131103515625,
-0.016021728515625,
0.021942138671875,
0.02484130859375,
0.0103607177734375,
0.0153656005859375,
-0.033843994140625,
0.048370361328125,
-0.054046630859375,
0.003345489501953125,
-0.050506591796875,
-0.020111083984375,
-0.042633056640625,
-0.004863739013671875,
-0.004573822021484375,
-0.02410888671875,
0.047882080078125,
0.0020694732666015625,
-0.00260162353515625,
0.01258087158203125,
0.035797119140625,
-0.00760650634765625,
0.004901885986328125,
-0.06280517578125,
0.007785797119140625,
0.016876220703125,
-0.006252288818359375,
0.00884246826171875,
0.0252532958984375,
0.00482940673828125,
0.04730224609375,
0.034698486328125,
-0.0296630859375,
0.0462646484375,
0.0024051666259765625,
-0.0872802734375,
0.0859375,
0.00977325439453125,
0.09521484375,
0.0107574462890625,
-0.00518798828125,
0.0633544921875,
0.0293426513671875,
-0.0010128021240234375,
0.0018091201782226562,
-0.031402587890625,
-0.05657958984375,
0.050689697265625,
-0.0078277587890625,
-0.01561737060546875,
0.04736328125,
-0.0300140380859375,
0.0008268356323242188,
-0.0214080810546875,
0.0035533905029296875,
-0.05352783203125,
-0.011688232421875,
-0.028533935546875,
0.03350830078125,
-0.034027099609375,
0.00824737548828125,
0.0254364013671875,
-0.00226593017578125,
-0.03509521484375,
0.011322021484375,
0.0155487060546875,
0.026458740234375,
0.00034737586975097656,
0.013214111328125,
0.014495849609375,
0.03350830078125,
0.01153564453125,
-0.00569915771484375,
-0.005496978759765625,
0.001956939697265625,
0.037628173828125,
-0.042755126953125,
-0.0019664764404296875,
-0.042999267578125,
0.0653076171875,
-0.032501220703125,
0.034271240234375,
0.04071044921875,
0.040863037109375,
0.0207061767578125,
-0.0191650390625,
0.0020046234130859375,
0.0172271728515625,
-0.037384033203125,
0.01537322998046875,
0.044830322265625,
0.0143585205078125,
0.0242462158203125,
-0.01873779296875,
0.005634307861328125,
0.03411865234375,
-0.044219970703125,
0.00370025634765625,
0.00360870361328125,
0.031829833984375,
0.031005859375,
-0.04376220703125,
-0.039642333984375,
0.0302581787109375,
-0.07806396484375,
-0.00931549072265625,
0.040679931640625,
-0.0038700103759765625,
-0.052490234375,
0.002780914306640625,
0.0169830322265625,
0.0202484130859375,
-0.01531219482421875,
-0.04315185546875,
0.0023326873779296875,
0.004100799560546875,
0.0006866455078125,
0.019989013671875,
0.01849365234375,
-0.0204010009765625,
-0.01464080810546875,
0.017120361328125,
0.03631591796875,
-0.01293182373046875,
0.069580078125,
0.06292724609375,
-0.03448486328125,
-0.0281829833984375,
-0.0165557861328125,
0.01456451416015625,
0.046966552734375,
-0.00629425048828125,
0.038604736328125,
-0.0264892578125,
-0.005657196044921875,
-0.01611328125,
-0.032989501953125,
-0.00510406494140625,
0.0215301513671875,
0.0181427001953125,
0.0229949951171875,
0.0215606689453125,
0.064208984375,
0.01036834716796875,
0.0345458984375,
0.005626678466796875,
0.01464080810546875,
0.0439453125,
-0.0207061767578125,
0.03631591796875,
-0.0273895263671875,
-0.01021575927734375,
0.03460693359375,
-0.0087890625,
-0.0242919921875,
-0.004062652587890625,
-0.007411956787109375,
-0.024871826171875,
-0.00400543212890625,
-0.03070068359375,
-0.00852203369140625,
-0.038360595703125,
0.0474853515625,
0.01056671142578125,
-0.0075836181640625,
0.01153564453125,
-0.031890869140625,
-0.0010271072387695312,
0.0038051605224609375,
-0.07757568359375,
-0.066650390625,
0.0155792236328125,
-0.02301025390625,
-0.0288543701171875,
0.00652313232421875,
-0.0175323486328125,
0.00829315185546875,
0.002201080322265625,
-0.0152587890625,
0.0260162353515625,
-0.01702880859375,
-0.06500244140625,
-0.03424072265625,
-0.08392333984375,
-0.00986480712890625,
-0.00792694091796875,
0.01534271240234375,
0.01410675048828125,
0.003509521484375,
0.0179901123046875,
-0.006488800048828125,
0.0394287109375,
0.04620361328125,
-0.0085296630859375,
-0.0308380126953125,
0.00917816162109375,
-0.004428863525390625,
0.019927978515625,
-0.01110076904296875,
0.054901123046875,
0.062744140625,
-0.054962158203125,
0.0160369873046875,
-0.0114288330078125,
-0.007053375244140625,
-0.018463134765625,
0.05169677734375,
0.039794921875,
-0.03826904296875,
0.002513885498046875,
-0.043609619140625,
-0.006183624267578125,
-0.0157012939453125,
-0.023345947265625,
0.019866943359375,
0.0092315673828125,
-0.0156707763671875,
-0.0236053466796875,
0.033966064453125,
-0.0090179443359375,
-0.00787353515625,
0.0345458984375,
-0.027984619140625,
0.04638671875,
-0.01654052734375,
-0.0158538818359375,
-0.033599853515625,
0.08892822265625,
0.004138946533203125,
-0.05609130859375,
0.0212554931640625,
-0.0227813720703125,
-0.0203399658203125,
-0.0203399658203125,
-0.05694580078125,
-0.0537109375,
0.037261962890625,
-0.041595458984375,
-0.006061553955078125,
-0.057769775390625,
-0.004352569580078125,
-0.04156494140625,
0.047119140625,
-0.0299530029296875,
-0.0167236328125,
0.00884246826171875,
0.01708984375,
-0.01189422607421875,
-0.015716552734375,
-0.013580322265625,
-0.0252227783203125,
-0.03253173828125,
-0.00608062744140625,
-0.0313720703125,
-0.0141143798828125,
0.017608642578125,
-0.0196685791015625,
0.0288543701171875,
-0.045806884765625,
0.0321044921875,
-0.0684814453125,
0.00446319580078125,
0.0244903564453125,
0.0144805908203125,
-0.02716064453125,
-0.0245513916015625,
-0.0310211181640625,
-0.09771728515625,
-0.030487060546875,
0.006526947021484375,
0.09454345703125,
0.019378662109375,
-0.051788330078125,
-0.00310516357421875,
0.054840087890625,
-0.0044708251953125,
-0.0015668869018554688,
-0.0240936279296875,
-0.0201416015625,
-0.0025787353515625,
0.04052734375,
-0.01446533203125,
0.0215606689453125,
-0.0174560546875,
-0.0227508544921875,
-0.06689453125,
0.0028400421142578125,
0.01247406005859375,
0.02734375,
0.03277587890625,
-0.0245819091796875,
-0.06640625,
-0.05303955078125,
-0.0283355712890625,
0.000675201416015625,
-0.0223388671875,
0.005481719970703125,
-0.045867919921875,
-0.045501708984375,
0.04833984375,
-0.00997161865234375,
-0.018524169921875,
0.004787445068359375,
0.044158935546875,
0.0016508102416992188,
-0.0267486572265625,
-0.033477783203125,
0.007160186767578125,
0.00861358642578125,
0.016357421875,
0.046539306640625,
-0.0204010009765625,
0.00173187255859375,
0.07818603515625,
-0.0229644775390625,
-0.013336181640625,
0.037261962890625,
-0.008819580078125,
0.01033782958984375,
-0.033050537109375,
0.0153350830078125,
0.0173187255859375,
-0.026336669921875,
0.0252227783203125,
0.007709503173828125,
-0.01363372802734375,
0.01184844970703125,
0.037261962890625,
-0.0209197998046875,
0.006420135498046875,
-0.0308380126953125,
-0.046661376953125,
0.033843994140625,
-0.03472900390625,
-0.01270294189453125,
-0.0270843505859375,
0.00937652587890625,
-0.0015306472778320312,
-0.002796173095703125,
0.01366424560546875,
-0.03204345703125,
0.026458740234375,
-0.056884765625,
0.046295166015625,
-0.036041259765625,
-0.0240325927734375,
-0.03857421875,
-0.0215606689453125,
0.08056640625,
-0.00836181640625,
-0.050201416015625,
0.0124969482421875,
-0.0231475830078125,
0.0128631591796875,
0.035797119140625,
-0.017486572265625,
0.01197052001953125,
0.0131988525390625,
-0.022796630859375,
0.00933074951171875,
-0.032379150390625,
-0.0013885498046875,
-0.036163330078125,
0.039154052734375,
0.015289306640625,
-0.01116943359375,
-0.0175933837890625,
0.057281494140625,
0.01360321044921875,
0.01512908935546875,
-0.005252838134765625,
0.004337310791015625,
-0.038055419921875,
0.050079345703125,
0.006343841552734375,
0.0182037353515625,
0.013397216796875,
0.0272064208984375,
0.0169677734375,
-0.0220947265625,
-0.018280029296875,
0.036651611328125,
0.0352783203125,
-0.0401611328125,
-0.0226593017578125,
0.0132598876953125,
-0.01277923583984375,
-0.018157958984375,
-0.00913238525390625,
-0.045867919921875,
-0.016082763671875,
-0.0244903564453125,
0.01300811767578125,
0.0262603759765625,
0.01496124267578125,
-0.002498626708984375,
0.006252288818359375,
0.015869140625,
0.00823211669921875,
0.0189208984375,
-0.039794921875,
0.00580596923828125,
0.003238677978515625,
-0.0081329345703125,
-0.0230560302734375,
-0.0230712890625,
-0.0211944580078125,
-0.01035308837890625,
-0.013336181640625,
-0.01523590087890625,
0.05194091796875,
-0.022552490234375,
0.006519317626953125,
0.00774383544921875,
-0.0097503662109375,
-0.005176544189453125,
0.01543426513671875,
0.030059814453125,
0.01238250732421875,
-0.02069091796875,
-0.01055908203125,
-0.032806396484375,
-0.010833740234375,
0.055694580078125,
-0.00046062469482421875,
-0.01348876953125,
-0.034454345703125,
0.01233673095703125,
0.0280609130859375,
0.0029354095458984375,
0.005970001220703125,
0.0017757415771484375,
0.0105438232421875,
-0.005886077880859375,
0.04595947265625,
-0.034759521484375,
0.041778564453125,
-0.0075225830078125,
0.0037860870361328125,
-0.00960540771484375,
0.00499725341796875,
-0.02349853515625,
0.0063934326171875,
-0.0121307373046875,
-0.06658935546875,
-0.027130126953125,
0.005645751953125,
-0.0623779296875,
0.08856201171875,
0.0810546875,
0.010223388671875,
0.030303955078125,
-0.0220489501953125,
-0.0117950439453125,
-0.0158843994140625,
0.0274658203125,
-0.0341796875,
0.057220458984375,
-0.005199432373046875,
0.042266845703125,
0.03814697265625,
-0.060699462890625,
-0.0109405517578125,
-0.0253448486328125,
0.01496124267578125,
-0.0022525787353515625,
-0.003101348876953125,
-0.0438232421875,
0.0714111328125,
0.103759765625,
-0.01448822021484375,
0.0509033203125,
0.039520263671875,
0.00030422210693359375,
0.052459716796875,
-0.007358551025390625,
0.00908660888671875,
-0.0034732818603515625,
-0.011688232421875,
-0.0072784423828125,
0.01218414306640625,
-0.00522613525390625,
-0.00788116455078125,
0.0251922607421875,
0.0150909423828125,
0.042877197265625,
-0.029815673828125,
-0.0006041526794433594,
-0.0083770751953125,
-0.04498291015625,
0.03521728515625,
0.010009765625,
-0.010467529296875,
0.01471710205078125,
-0.011077880859375,
-0.06854248046875,
-0.034698486328125,
-0.01268768310546875,
0.0105743408203125,
-0.01490020751953125,
-0.005802154541015625,
0.033721923828125,
0.01390838623046875,
0.049713134765625,
-0.0269927978515625,
-0.036346435546875,
0.01541900634765625,
0.00681304931640625,
0.00373077392578125,
0.017425537109375,
-0.038238525390625,
-0.057830810546875,
0.01910400390625,
-0.009002685546875,
-0.025238037109375,
0.0067291259765625,
-0.0264739990234375,
0.0258636474609375,
0.052490234375,
-0.0277862548828125,
0.01036834716796875,
0.0287628173828125,
-0.00937652587890625,
0.032012939453125,
-0.0209197998046875,
0.00484466552734375,
0.0265655517578125,
-0.0250091552734375,
0.01178741455078125,
0.00685882568359375,
-0.01983642578125,
-0.00771331787109375,
-0.0645751953125,
0.10687255859375,
-0.07000732421875,
0.0022792816162109375,
-0.00872039794921875,
0.01209259033203125,
0.012969970703125,
0.003734588623046875,
0.032440185546875,
-0.042236328125,
-0.0322265625,
0.01230621337890625,
-0.035675048828125,
-0.00966644287109375,
0.00821685791015625,
-0.049163818359375,
0.0848388671875,
0.0202484130859375,
0.0222015380859375,
-0.001209259033203125,
0.03558349609375,
-0.01111602783203125,
0.0236358642578125,
-0.005207061767578125,
0.02081298828125,
0.0078277587890625,
-0.00884246826171875,
0.0260772705078125,
0.014617919921875,
0.0158843994140625,
-0.00376129150390625,
0.05755615234375,
0.0229034423828125,
-0.03900146484375,
0.00518798828125,
0.023040771484375,
-0.0225830078125,
-0.039581298828125,
0.073486328125,
0.006526947021484375,
0.0142974853515625,
0.02783203125,
-0.040985107421875,
0.005035400390625,
-0.007038116455078125,
0.0095977783203125,
0.02178955078125,
0.03704833984375,
0.05780029296875,
-0.0106048583984375,
0.073486328125,
-0.0256805419921875,
-0.0145721435546875,
0.050262451171875,
-0.0302581787109375,
-0.050384521484375,
0.04150390625,
0.003467559814453125,
-0.01021575927734375,
0.008331298828125,
-0.047576904296875,
0.028717041015625,
0.010284423828125,
0.045074462890625,
0.031463623046875,
0.03436279296875,
0.01397705078125,
-0.00531768798828125,
0.0262451171875,
0.0308380126953125,
-0.058807373046875,
0.042694091796875,
0.048797607421875,
0.051727294921875,
0.006580352783203125,
-0.0216522216796875,
0.0201416015625,
0.062103271484375,
-0.0255584716796875,
-0.038848876953125,
0.01904296875,
-0.0144500732421875,
0.0179595947265625,
-0.014129638671875,
0.027923583984375,
-0.061309814453125,
-0.045440673828125,
-0.006809234619140625,
0.016937255859375,
0.0241546630859375,
0.006053924560546875,
0.01268768310546875,
0.027008056640625,
-0.046295166015625,
0.0251312255859375,
-0.0430908203125,
0.00868988037109375,
0.03497314453125,
0.06866455078125,
0.00579833984375,
0.06903076171875,
-0.006191253662109375,
-0.01812744140625,
0.003147125244140625,
0.0254974365234375,
0.018463134765625,
-0.006134033203125,
-0.0115814208984375,
-0.0262908935546875,
0.051422119140625,
0.01149749755859375,
0.030120849609375,
0.0275726318359375,
0.06304931640625,
-0.00611114501953125,
-0.06787109375,
0.0018091201782226562,
0.00867462158203125,
-0.04864501953125,
0.03204345703125,
-0.0660400390625,
0.01438140869140625,
-0.0273895263671875,
-0.016937255859375,
-0.0014410018920898438,
-0.00534820556640625,
-0.005229949951171875,
0.00052642822265625,
0.034027099609375,
0.0010051727294921875,
-0.032470703125,
0.02667236328125,
-0.004749298095703125,
0.060272216796875,
0.02484130859375,
-0.03228759765625,
-0.0038604736328125,
-0.01325225830078125,
-0.03558349609375,
0.000736236572265625,
0.0292510986328125,
-0.0159912109375,
0.032501220703125,
-0.00983428955078125,
0.02520751953125,
-0.0033779144287109375,
-0.02593994140625,
-0.00858306884765625,
-0.0279541015625,
0.0284271240234375,
-0.0003643035888671875,
-0.04144287109375,
-0.025299072265625,
-0.033721923828125,
0.0147705078125,
-0.005481719970703125,
0.1241455078125,
-0.037628173828125,
0.0079803466796875,
-0.05889892578125,
-0.0274810791015625,
-0.0187225341796875,
-0.0176544189453125,
-0.033905029296875,
0.016571044921875,
-0.004116058349609375,
0.01904296875,
-0.004993438720703125,
0.0014905929565429688,
0.036376953125,
-0.050079345703125,
0.04638671875,
-0.04888916015625,
0.01020050048828125,
-0.06591796875,
0.0312042236328125,
-0.039459228515625,
-0.06817626953125,
-0.043121337890625,
0.03076171875,
-0.0147705078125,
-0.0081939697265625,
-0.033843994140625,
0.00562286376953125,
-0.00003337860107421875,
-0.0011529922485351562,
-0.00836181640625,
0.017730712890625,
-0.00243377685546875,
0.0390625,
-0.040252685546875,
0.039642333984375,
-0.00655364990234375,
-0.03057861328125,
0.0128021240234375,
0.0015058517456054688,
-0.019317626953125,
-0.011444091796875,
0.0382080078125,
-0.05999755859375,
-0.031646728515625,
0.0009293556213378906,
-0.0040435791015625,
0.0059661865234375,
-0.0460205078125,
-0.00475311279296875,
-0.004547119140625,
0.0255279541015625,
-0.0022869110107421875,
-0.0157470703125,
-0.01224517822265625,
0.0022258758544921875,
0.00844573974609375,
-0.01154327392578125,
0.005138397216796875,
-0.0056610107421875,
0.000377655029296875,
-0.006114959716796875,
-0.018951416015625,
0.037078857421875,
-0.0214385986328125,
0.01068878173828125,
-0.03564453125,
-0.02935791015625,
-0.0231781005859375,
-0.039276123046875,
-0.030548095703125,
-0.0265655517578125,
-0.0687255859375,
0.02056884765625,
-0.0396728515625,
-0.031646728515625,
0.00531005859375,
0.01357269287109375,
-0.026092529296875,
-0.04302978515625,
-0.0386962890625,
0.012481689453125,
-0.04571533203125,
-0.0024051666259765625,
0.00865936279296875,
0.01082611083984375,
-0.031341552734375,
-0.046173095703125,
0.005126953125,
-0.033905029296875,
-0.004146575927734375,
0.0127716064453125,
-0.0207061767578125,
-0.003032684326171875,
-0.04229736328125,
-0.068359375,
0.0214996337890625,
-0.0011005401611328125,
-0.0292816162109375,
-0.09588623046875,
-0.01134490966796875,
0.0018901824951171875,
0.0295867919921875,
-0.031402587890625,
-0.0171051025390625,
-0.054290771484375,
0.050323486328125,
-0.00146484375,
0.06304931640625,
-0.038604736328125,
0.02301025390625,
-0.01392364501953125,
0.0364990234375,
0.02838134765625,
0.00559234619140625,
-0.0017871856689453125,
0.01317596435546875,
0.035308837890625,
0.047332763671875,
-0.0102386474609375,
0.05926513671875,
-0.00927734375,
-0.038360595703125,
-0.0195159912109375,
-0.042724609375,
-0.037109375,
-0.0175018310546875,
0.0733642578125,
0.061431884765625,
0.01406097412109375,
-0.039825439453125,
-0.03515625,
-0.031768798828125,
0.03887939453125,
-0.01018524169921875,
-0.0019664764404296875,
-0.048797607421875,
-0.007781982421875,
0.0164031982421875,
0.02532958984375,
0.032012939453125,
-0.09222412109375,
0.007602691650390625,
-0.007236480712890625,
-0.01062774658203125,
0.00860595703125,
0.0426025390625,
-0.0199737548828125,
0.024322509765625,
-0.0242462158203125,
0.0010442733764648438,
-0.01806640625,
0.044525146484375,
0.0059967041015625,
-0.0238494873046875,
-0.025177001953125,
-0.0255584716796875,
0.005275726318359375,
0.006237030029296875,
0.00330352783203125,
-0.01071929931640625,
0.0037670135498046875,
-0.0167694091796875,
-0.032135009765625,
0.0229339599609375,
0.0174560546875,
0.03729248046875,
-0.0154266357421875,
0.0220489501953125,
0.037109375,
0.016754150390625,
-0.0267333984375,
0.0242919921875,
-0.004077911376953125,
0.0241546630859375,
-0.0272369384765625,
0.00768280029296875,
0.0241851806640625,
-0.0245361328125,
0.0084075927734375,
0.01605224609375,
-0.006656646728515625,
-0.0260009765625,
-0.0037364959716796875,
-0.034271240234375,
0.0010480880737304688,
0.00363922119140625
] |
da2c60e49bde789cd2f0ac37dac8c8d1acc765d3 | Wordpress Stackexchange
Q: allow arabic letters when register new account How can allow arabic letters when register new account ?
i don't need to lose any security.
If any of us, Arabs, want to register in any wordpress blogs we have to use English letters in “username” that will be very difficult for many of users.
Thanks.
| Q: allow arabic letters when register new account How can allow arabic letters when register new account ?
i don't need to lose any security.
If any of us, Arabs, want to register in any wordpress blogs we have to use English letters in “username” that will be very difficult for many of users.
Thanks.
| wordpress | {
"language": "en",
"length": 55,
"provenance": "stackexchange_00019.jsonl.gz:470762",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/248000"
} | [
0.00437164306640625,
-0.0268707275390625,
0.040740966796875,
0.032196044921875,
-0.0494384765625,
-0.004978179931640625,
0.03009033203125,
-0.036590576171875,
-0.00695037841796875,
0.038482666015625,
0.0169525146484375,
0.00605010986328125,
0.030670166015625,
-0.0308074951171875,
0.01555633544921875,
0.00539398193359375,
0.044189453125,
-0.03173828125,
0.0007238388061523438,
-0.0296173095703125,
0.005828857421875,
-0.00814056396484375,
0.036712646484375,
0.034393310546875,
0.0231475830078125,
-0.021881103515625,
0.06622314453125,
-0.0215301513671875,
0.0211639404296875,
-0.0254669189453125,
0.0081634521484375,
-0.008544921875,
-0.0171966552734375,
0.0008344650268554688,
0.05743408203125,
0.006580352783203125,
0.00966644287109375,
0.0218505859375,
0.04632568359375,
-0.02392578125,
0.0259552001953125,
-0.0090484619140625,
-0.0092010498046875,
0.046112060546875,
-0.0164031982421875,
-0.08233642578125,
0.053741455078125,
-0.0283050537109375,
0.003082275390625,
0.0097503662109375,
0.01525115966796875,
0.01235198974609375,
0.029998779296875,
0.0325927734375,
-0.003353118896484375,
0.0156097412109375,
0.00923919677734375,
0.019683837890625,
0.03948974609375,
0.0123291015625,
-0.0309295654296875,
0.0144500732421875,
0.0025272369384765625,
-0.03515625,
0.0011959075927734375,
-0.0162200927734375,
0.01702880859375,
0.03753662109375,
-0.058380126953125,
-0.020721435546875,
0.0413818359375,
-0.032928466796875,
-0.00791168212890625,
-0.01206207275390625,
0.006839752197265625,
0.043060302734375,
-0.0296478271484375,
0.0160064697265625,
0.01910400390625,
0.02545166015625,
-0.0196685791015625,
-0.0038166046142578125,
-0.044769287109375,
-0.018402099609375,
-0.0229339599609375,
0.0009646415710449219,
-0.021697998046875,
-0.005237579345703125,
-0.036956787109375,
-0.05267333984375,
-0.02960205078125,
-0.039794921875,
-0.07147216796875,
0.006351470947265625,
0.00933837890625,
-0.0275421142578125,
0.0311431884765625,
0.0308074951171875,
0.01291656494140625,
-0.0003941059112548828,
0.0306549072265625,
-0.06317138671875,
0.046356201171875,
-0.027099609375,
0.00452423095703125,
0.037506103515625,
0.00119781494140625,
0.0235595703125,
0.038726806640625,
0.00955963134765625,
0.0021800994873046875,
0.0145111083984375,
0.024322509765625,
-0.01220703125,
-0.0146942138671875,
-0.0013933181762695312,
-0.0160980224609375,
0.0276947021484375,
0.0015611648559570312,
-0.01105499267578125,
0.0105743408203125,
0.037933349609375,
0.02325439453125,
-0.0171051025390625,
0.01129913330078125,
0.0166473388671875,
-0.007061004638671875,
-0.054443359375,
-0.041900634765625,
0.033905029296875,
0.006839752197265625,
0.0023860931396484375,
-0.052825927734375,
0.0230255126953125,
-0.019256591796875,
-0.0159454345703125,
0.0194091796875,
0.0040283203125,
-0.0134124755859375,
0.03131103515625,
0.0247955322265625,
-0.05352783203125,
-0.013153076171875,
0.0150604248046875,
0.0067138671875,
0.0229034423828125,
-0.0151519775390625,
0.0084991455078125,
0.03759765625,
-0.046112060546875,
0.0482177734375,
-0.10614013671875,
0.042327880859375,
0.0189361572265625,
-0.0164031982421875,
-0.00394439697265625,
0.002605438232421875,
-0.00473785400390625,
-0.01357269287109375,
-0.02838134765625,
0.004299163818359375,
-0.00982666015625,
0.0172119140625,
0.029998779296875,
-0.0276031494140625,
0.020416259765625,
-0.0098419189453125,
-0.004711151123046875,
0.027801513671875,
-0.03790283203125,
0.0206298828125,
-0.0073089599609375,
0.06646728515625,
-0.0240325927734375,
-0.0059814453125,
0.01654052734375,
-0.005977630615234375,
-0.005947113037109375,
0.006755828857421875,
0.084228515625,
0.0428466796875,
-0.0178375244140625,
0.005130767822265625,
0.00909423828125,
-0.026947021484375,
-0.0087432861328125,
-0.0013685226440429688,
0.016082763671875,
0.0277862548828125,
0.005573272705078125,
0.04022216796875,
0.001857757568359375,
-0.04345703125,
0.0044708251953125,
-0.0165863037109375,
-0.016510009765625,
0.034210205078125,
0.0173492431640625,
0.0103302001953125,
-0.0170440673828125,
0.013519287109375,
-0.037384033203125,
0.038604736328125,
-0.0215606689453125,
0.03173828125,
-0.0213775634765625,
0.01910400390625,
0.0048675537109375,
0.016510009765625,
0.025421142578125,
-0.006145477294921875,
-0.00113677978515625,
-0.032073974609375,
0.036773681640625,
-0.005634307861328125,
0.01067352294921875,
-0.0343017578125,
0.044830322265625,
-0.0010986328125,
0.0386962890625,
0.00027751922607421875,
-0.045196533203125,
0.016204833984375,
-0.00908660888671875,
0.0304107666015625,
-0.065673828125,
-0.000014662742614746094,
-0.0667724609375,
-0.0294952392578125,
-0.03271484375,
-0.06317138671875,
0.09283447265625,
-0.01366424560546875,
-0.00894927978515625,
-0.0240478515625,
-0.010772705078125,
-0.00467681884765625,
-0.04046630859375,
0.0308990478515625,
0.051300048828125,
0.018890380859375,
-0.01189422607421875,
-0.0149688720703125,
-0.0078277587890625,
-0.0218505859375,
0.009765625,
0.042816162109375,
-0.018218994140625,
-0.021240234375,
0.041473388671875,
-0.01413726806640625,
0.00675201416015625,
0.0011320114135742188,
-0.0631103515625,
-0.023468017578125,
0.036285400390625,
-0.02362060546875,
-0.022003173828125,
0.01282501220703125,
-0.00537109375,
0.007476806640625,
-0.0208892822265625,
-0.00586700439453125,
-0.012939453125,
-0.00765228271484375,
0.0233154296875,
0.0212554931640625,
0.0212554931640625,
-0.030242919921875,
0.0007777214050292969,
0.0189361572265625,
0.0254058837890625,
-0.002017974853515625,
0.029449462890625,
0.046173095703125,
0.0259857177734375,
-0.03106689453125,
-0.0189361572265625,
0.035797119140625,
0.02838134765625,
0.0019083023071289062,
0.0168914794921875,
-0.0078582763671875,
-0.0078887939453125,
0.0224761962890625,
-0.072998046875,
-0.0028553009033203125,
0.031646728515625,
-0.027923583984375,
-0.034576416015625,
-0.007080078125,
0.050628662109375,
0.004634857177734375,
0.0167083740234375,
0.048248291015625,
-0.0160675048828125,
-0.026123046875,
-0.029266357421875,
0.00832366943359375,
-0.0257568359375,
0.0004227161407470703,
0.055938720703125,
0.05560302734375,
-0.058624267578125,
0.002735137939453125,
0.019439697265625,
0.0207366943359375,
-0.015960693359375,
-0.011077880859375,
-0.01204681396484375,
-0.02691650390625,
0.0182647705078125,
0.0014247894287109375,
0.016998291015625,
-0.0299835205078125,
-0.045196533203125,
-0.0254364013671875,
-0.006328582763671875,
-0.03515625,
-0.0108642578125,
-0.00792694091796875,
-0.026885986328125,
0.01202392578125,
-0.013214111328125,
-0.01012420654296875,
-0.00699615478515625,
0.006683349609375,
0.0004944801330566406,
0.00279998779296875,
-0.0174102783203125,
-0.0272979736328125,
-0.03729248046875,
-0.03729248046875,
-0.0394287109375,
0.003753662109375,
-0.0127105712890625,
0.01053619384765625,
0.0238800048828125,
0.004550933837890625,
-0.01271820068359375,
0.0233612060546875,
-0.023712158203125,
-0.0003762245178222656,
0.0070953369140625,
0.00960540771484375,
-0.039886474609375,
-0.003635406494140625,
-0.001312255859375,
0.004970550537109375,
0.031341552734375,
-0.0172119140625,
0.02020263671875,
-0.004947662353515625,
-0.0197601318359375,
0.027191162109375,
-0.034637451171875,
-0.0277557373046875,
0.01403045654296875,
0.00514984130859375,
-0.05743408203125,
-0.0188751220703125,
0.044097900390625,
-0.002986907958984375,
-0.05645751953125,
-0.023468017578125,
-0.0287933349609375,
-0.01207733154296875,
0.009002685546875,
-0.0115203857421875,
-0.0052337646484375,
-0.0159912109375,
-0.045013427734375,
0.05126953125,
0.0102386474609375,
0.01837158203125,
0.018951416015625,
-0.0092010498046875,
-0.040771484375,
0.00115966796875,
-0.0261077880859375,
-0.031829833984375,
-0.033447265625,
0.031951904296875,
-0.00116729736328125,
-0.077392578125,
0.042633056640625,
-0.0775146484375,
-0.025360107421875,
-0.0308990478515625,
-0.0109405517578125,
0.017608642578125,
0.090576171875,
-0.028167724609375,
0.0037555694580078125,
-0.017608642578125,
0.0168914794921875,
-0.0653076171875,
-0.054351806640625,
-0.0589599609375,
0.017242431640625,
0.02099609375,
-0.0135955810546875,
-0.016326904296875,
-0.01555633544921875,
-0.029327392578125,
-0.05267333984375,
0.0156707763671875,
-0.001499176025390625,
0.030029296875,
0.007537841796875,
0.01010894775390625,
-0.0003509521484375,
-0.00554656982421875,
0.01275634765625,
-0.02630615234375,
-0.001140594482421875,
-0.11309814453125,
-0.0291900634765625,
-0.03741455078125,
0.10125732421875,
0.0232391357421875,
-0.01132965087890625,
-0.037109375,
0.05645751953125,
-0.01311492919921875,
0.019927978515625,
-0.00968170166015625,
0.0166778564453125,
0.0352783203125,
0.025665283203125,
-0.028106689453125,
-0.003734588623046875,
0.011138916015625,
0.0019550323486328125,
-0.0428466796875,
0.002071380615234375,
-0.00745391845703125,
-0.000042438507080078125,
0.02899169921875,
-0.0477294921875,
-0.0166015625,
-0.00959014892578125,
0.01277923583984375,
0.0273590087890625,
0.0005655288696289062,
-0.0054779052734375,
-0.02423095703125,
-0.0195465087890625,
0.0246734619140625,
-0.00959014892578125,
-0.006336212158203125,
0.012542724609375,
0.040435791015625,
0.009033203125,
-0.018951416015625,
-0.019012451171875,
0.027313232421875,
0.032073974609375,
0.02484130859375,
0.055938720703125,
0.0355224609375,
-0.01207733154296875,
0.057098388671875,
0.034423828125,
-0.005237579345703125,
0.01009368896484375,
-0.0011997222900390625,
0.0211639404296875,
-0.0086212158203125,
0.0017032623291015625,
0.03759765625,
0.0062408447265625,
0.008087158203125,
0.026824951171875,
-0.03558349609375,
0.02197265625,
0.0229644775390625,
0.01207733154296875,
-0.0029449462890625,
-0.01213836669921875,
-0.00800323486328125,
0.0203704833984375,
0.0064697265625,
-0.0186614990234375,
-0.0447998046875,
0.01453399658203125,
-0.0782470703125,
-0.02606201171875,
-0.01345062255859375,
-0.0124053955078125,
-0.031036376953125,
0.01485443115234375,
0.0247039794921875,
-0.0292510986328125,
-0.0068359375,
-0.0006275177001953125,
-0.03570556640625,
0.091064453125,
-0.0014438629150390625,
-0.07598876953125,
0.0285186767578125,
-0.0203704833984375,
0.042724609375,
0.0233917236328125,
-0.006488800048828125,
0.0191650390625,
0.006252288818359375,
-0.030364990234375,
0.005985260009765625,
-0.00711822509765625,
-0.0189971923828125,
-0.04205322265625,
0.001728057861328125,
-0.00356292724609375,
-0.021392822265625,
-0.0232696533203125,
0.06622314453125,
-0.036407470703125,
0.036346435546875,
0.0026378631591796875,
0.0290069580078125,
0.024200439453125,
0.027801513671875,
0.026031494140625,
-0.01568603515625,
-0.01123809814453125,
0.022491455078125,
-0.0185546875,
-0.03155517578125,
0.0026836395263671875,
0.02960205078125,
0.047454833984375,
-0.01055908203125,
-0.011932373046875,
0.005870819091796875,
-0.0322265625,
0.030731201171875,
0.0017271041870117188,
-0.040557861328125,
-0.03558349609375,
-0.0166778564453125,
0.005558013916015625,
0.018310546875,
-0.03924560546875,
0.04541015625,
-0.0294952392578125,
0.00861358642578125,
0.01172637939453125,
0.001537322998046875,
0.042022705078125,
-0.0609130859375,
-0.07373046875,
-0.00034809112548828125,
0.0020751953125,
0.002475738525390625,
0.019012451171875,
-0.01457977294921875,
-0.0184173583984375,
-0.028045654296875,
0.0523681640625,
0.00232696533203125,
0.02288818359375,
-0.0345458984375,
0.00489044189453125,
0.01245880126953125,
0.00475311279296875,
0.032501220703125,
-0.008331298828125,
-0.04168701171875,
-0.01390838623046875,
-0.0081024169921875,
-0.00786590576171875,
-0.0268707275390625,
-0.033477783203125,
-0.03594970703125,
0.00020360946655273438,
0.0364990234375,
0.005451202392578125,
0.005767822265625,
-0.0199127197265625,
-0.00557708740234375,
0.043212890625,
0.046112060546875,
0.06805419921875,
-0.06756591796875,
0.0389404296875,
0.037994384765625,
-0.020965576171875,
-0.01522064208984375,
0.03228759765625,
0.07025146484375,
0.0013723373413085938,
0.023895263671875,
-0.0220184326171875,
-0.031341552734375,
-0.00925445556640625,
-0.029296875,
-0.0328369140625,
0.0187530517578125,
-0.0110015869140625,
0.0073394775390625,
0.0014734268188476562,
0.00579071044921875,
-0.00806427001953125,
0.01525115966796875,
-0.017791748046875,
0.01491546630859375,
0.01442718505859375,
-0.01532745361328125,
0.01308441162109375,
0.00045490264892578125,
-0.0162200927734375,
0.0300750732421875,
-0.002407073974609375,
0.0034008026123046875,
0.0246734619140625,
0.010345458984375,
-0.0026073455810546875,
-0.0017709732055664062,
0.028594970703125,
0.0224761962890625,
-0.0001437664031982422,
0.04144287109375,
-0.0280609130859375,
-0.017425537109375,
-0.028961181640625,
-0.0073699951171875,
0.028839111328125,
-0.00150299072265625,
-0.0022373199462890625,
0.031585693359375,
-0.020416259765625,
0.009613037109375,
0.116455078125,
0.076171875,
-0.1568603515625,
-0.004718780517578125,
-0.00013971328735351562,
-0.00041294097900390625,
0.006504058837890625,
0.016693115234375,
-0.026336669921875,
-0.046783447265625,
0.049072265625,
-0.05389404296875,
0.003925323486328125,
0.0298919677734375,
-0.00881195068359375,
0.0225677490234375,
0.00978851318359375,
0.04766845703125,
0.002925872802734375,
-0.03875732421875,
-0.031707763671875,
-0.003154754638671875,
0.0229644775390625,
-0.0167999267578125,
-0.0233001708984375,
0.01554107666015625,
-0.01470184326171875,
-0.04510498046875,
0.022125244140625,
-0.0496826171875,
0.0243377685546875,
0.0055694580078125,
0.00791168212890625,
0.061370849609375,
0.02349853515625,
0.0159912109375,
-0.0262451171875,
-0.00989532470703125,
-0.003078460693359375,
0.02764892578125,
-0.0116424560546875,
-0.0008907318115234375,
0.0286865234375,
-0.034515380859375,
0.002765655517578125,
-0.01461029052734375,
0.00921630859375,
0.0095672607421875,
-0.031494140625,
-0.0120849609375,
0.032073974609375,
-0.019195556640625,
0.036773681640625,
-0.021392822265625,
-0.0252227783203125,
0.00267791748046875,
-0.037841796875,
-0.066162109375,
-0.054229736328125,
-0.0248260498046875,
-0.10369873046875,
-0.00010848045349121094,
-0.0144195556640625,
-0.06402587890625,
-0.004657745361328125,
0.01163482666015625,
0.027191162109375,
-0.00377655029296875,
0.004093170166015625,
-0.0006551742553710938,
-0.021728515625,
-0.0309600830078125,
0.04681396484375,
0.02593994140625,
0.008270263671875,
-0.058929443359375,
-0.0024738311767578125,
-0.0034847259521484375,
0.020355224609375,
0.01396942138671875,
-0.01079559326171875,
-0.00887298583984375,
-0.028594970703125,
0.015899658203125,
0.06304931640625,
0.02947998046875,
0.0041351318359375,
-0.024871826171875,
0.032470703125,
0.047027587890625,
-0.03131103515625,
0.0301971435546875,
0.02581787109375,
-0.0487060546875,
-0.0006957054138183594,
-0.0207977294921875,
-0.034576416015625,
0.0146331787109375,
-0.004547119140625,
-0.0159912109375,
0.00202178955078125,
-0.011077880859375,
-0.0036106109619140625,
0.016021728515625,
-0.006107330322265625,
0.01416015625,
-0.054656982421875,
-0.007488250732421875,
-0.033172607421875,
0.033447265625,
0.005161285400390625,
0.0124053955078125,
0.037689208984375,
0.028594970703125,
0.01088714599609375,
0.003875732421875,
0.01433563232421875,
-0.004638671875,
0.0026683807373046875,
-0.0017614364624023438,
0.01369476318359375,
0.03509521484375,
-0.02685546875,
0.00441741943359375,
0.042724609375,
0.01058197021484375,
-0.0229949951171875,
0.0089874267578125,
0.004405975341796875,
0.0234832763671875,
0.032257080078125,
-0.01080322265625,
0.07794189453125,
0.029571533203125,
0.00833892822265625,
-0.017303466796875,
0.004535675048828125,
0.0200347900390625,
0.00933837890625,
0.0019989013671875,
0.00939178466796875,
-0.0128631591796875,
0.0181732177734375,
-0.03424072265625,
0.004138946533203125,
0.013671875,
0.0269775390625,
0.00006574392318725586,
0.05767822265625,
0.0159759521484375,
-0.01214599609375,
-0.033538818359375,
-0.0129241943359375,
0.03216552734375,
0.0272216796875,
-0.039154052734375,
0.01445770263671875,
0.043792724609375,
0.04302978515625,
-0.0212249755859375,
-0.042266845703125,
0.01461029052734375,
0.0248260498046875,
-0.044677734375,
-0.03887939453125,
-0.0055389404296875,
-0.011260986328125,
0.0743408203125,
-0.04364013671875,
0.053192138671875,
0.027801513671875,
-0.01355743408203125,
-0.007904052734375,
-0.0170135498046875,
0.07012939453125,
0.016265869140625,
-0.0030994415283203125,
0.00885009765625,
-0.00572967529296875,
0.0043487548828125,
0.01499176025390625,
-0.01146697998046875,
0.04718017578125,
-0.1248779296875,
-0.02789306640625,
-0.028594970703125,
-0.045654296875,
0.036041259765625,
0.0517578125,
-0.0229339599609375,
0.01221466064453125,
0.036376953125,
-0.025421142578125,
-0.00496673583984375,
0.0188446044921875,
0.0264129638671875,
-0.00594329833984375,
-0.006229400634765625,
0.0008707046508789062,
-0.03472900390625,
-0.0017499923706054688,
0.006282806396484375,
0.0030765533447265625,
-0.0191650390625,
0.074462890625,
-0.0024662017822265625,
-0.01248931884765625,
-0.027984619140625,
0.00009173154830932617,
0.007503509521484375,
-0.0236053466796875,
0.056427001953125,
0.03546142578125,
-0.01708984375,
-0.0298309326171875,
-0.06402587890625,
0.058685302734375,
-0.0242767333984375,
0.001720428466796875,
0.0562744140625,
-0.054443359375,
-0.0024394989013671875,
0.003692626953125,
0.01104736328125,
-0.039398193359375,
-0.08758544921875,
-0.08074951171875,
0.04345703125,
-0.00799560546875,
-0.0025005340576171875,
-0.07684326171875,
0.07098388671875,
-0.06658935546875,
-0.0189208984375,
0.003627777099609375,
-0.09161376953125,
-0.0411376953125,
-0.0015535354614257812,
0.0213470458984375,
-0.008941650390625,
-0.055694580078125,
-0.035003662109375,
-0.01407623291015625,
-0.0017194747924804688,
-0.0010309219360351562,
-0.02978515625,
0.005252838134765625,
-0.004741668701171875,
0.0611572265625,
0.055450439453125,
-0.0006337165832519531,
0.0311737060546875,
0.0011043548583984375,
-0.03564453125,
0.0430908203125,
-0.010833740234375,
0.0021877288818359375,
-0.01358795166015625,
-0.02734375,
0.00605010986328125,
-0.01009368896484375,
-0.007053375244140625,
-0.0042572021484375,
0.014617919921875,
0.0151214599609375,
-0.018585205078125,
-0.04632568359375,
-0.0255126953125,
0.01224517822265625,
0.109375,
-0.046630859375,
-0.026214599609375,
0.00664520263671875,
0.0243377685546875,
-0.044830322265625,
-0.02227783203125,
-0.02392578125,
-0.0010137557983398438,
-0.0288238525390625,
-0.0033550262451171875,
0.01468658447265625,
-0.0150146484375,
-0.0008144378662109375,
0.0276031494140625,
0.0144805908203125,
0.06011962890625,
0.03656005859375,
-0.0003762245178222656,
0.02398681640625,
-0.01541900634765625,
-0.02374267578125,
-0.05499267578125,
0.01435089111328125,
-0.07501220703125,
-0.039703369140625,
-0.02777099609375,
-0.01197052001953125,
-0.00969696044921875,
-0.03680419921875,
-0.0577392578125,
0.045806884765625,
-0.010894775390625,
-0.035125732421875,
-0.0282440185546875,
0.0006880760192871094,
0.008636474609375,
0.005901336669921875,
-0.01163482666015625,
-0.0247955322265625,
-0.051483154296875,
0.00885009765625,
-0.0150299072265625,
0.01485443115234375,
0.023773193359375,
-0.00626373291015625,
0.020721435546875,
0.026519775390625,
0.0266265869140625,
-0.03692626953125,
0.009796142578125,
0.0242919921875,
-0.0090484619140625,
0.042083740234375,
-0.032958984375,
-0.0206756591796875,
-0.03729248046875,
-0.01139068603515625,
-0.037994384765625,
-0.09649658203125,
-0.011260986328125,
-0.04681396484375,
0.08026123046875,
0.01751708984375,
0.004802703857421875,
-0.00945281982421875,
-0.004169464111328125,
-0.02294921875,
-0.01113128662109375,
-0.01439666748046875,
0.01421356201171875,
-0.0528564453125,
0.0006041526794433594,
0.004886627197265625,
0.054229736328125,
0.0313720703125,
-0.033966064453125,
0.035003662109375,
-0.047760009765625,
0.004482269287109375,
-0.0011186599731445312,
-0.00011748075485229492,
-0.0131378173828125,
0.038055419921875,
-0.031158447265625,
-0.028045654296875,
-0.01079559326171875,
0.019317626953125,
-0.0209197998046875,
-0.016082763671875,
0.00531005859375,
-0.07952880859375,
0.0704345703125,
0.0589599609375,
0.03277587890625,
0.0082855224609375,
0.0170135498046875,
-0.029327392578125,
0.0114593505859375,
0.0445556640625,
0.02935791015625,
0.06671142578125,
-0.045257568359375,
0.04949951171875,
0.01186370849609375,
-0.01187896728515625,
0.01021575927734375,
-0.103759765625,
-0.0286865234375,
0.012939453125,
-0.022491455078125,
-0.00972747802734375,
-0.0166778564453125,
-0.01497650146484375,
0.0216522216796875,
0.013946533203125,
0.0355224609375,
-0.004947662353515625,
0.01654052734375,
0.0360107421875,
0.01265716552734375,
0.01110076904296875
] |
4b8cbfd61d64ee0a3aa3e29cbee4e3a2173d65fb | Wordpress Stackexchange
Q: Convert custom fields to post categories Does anyone know how to convert custom fields to categories? And also assign the converted categories to the proper post? This would have to loop through all the posts somehow. Does anyone know of a specific plugin that can do that?
A: It's a good question. There is many ways to apply a little script but the simplest way to do this take a few lines.
A note about the following code:
Most parameters might be added to the query like meta_query, category.
wp_create_category(), will create a category once.
wp_set_post_terms(), only work with native post types, will append the new category to other existing.
function wpse_248054(){
$custom_field_name = '_credit';
$posts = new WP_Query(
array(
'posts_per_page' => -1,
'post_type'=> 'post',
)
);
foreach($posts->posts as $post){
$meta = get_post_meta($post->ID, '_credit', true);
if(! empty( $meta )){
$term_id = wp_create_category($meta, 3); // 2nd argument, parent id (optional)
$new_post_cat = wp_set_post_terms( $post->ID, $term_id, 'category', true );
}
}
}
add_action('admin_init', 'wpse_248054');
But sorry, I don't know a plugin to do it ;-)
| Q: Convert custom fields to post categories Does anyone know how to convert custom fields to categories? And also assign the converted categories to the proper post? This would have to loop through all the posts somehow. Does anyone know of a specific plugin that can do that?
A: It's a good question. There is many ways to apply a little script but the simplest way to do this take a few lines.
A note about the following code:
Most parameters might be added to the query like meta_query, category.
wp_create_category(), will create a category once.
wp_set_post_terms(), only work with native post types, will append the new category to other existing.
function wpse_248054(){
$custom_field_name = '_credit';
$posts = new WP_Query(
array(
'posts_per_page' => -1,
'post_type'=> 'post',
)
);
foreach($posts->posts as $post){
$meta = get_post_meta($post->ID, '_credit', true);
if(! empty( $meta )){
$term_id = wp_create_category($meta, 3); // 2nd argument, parent id (optional)
$new_post_cat = wp_set_post_terms( $post->ID, $term_id, 'category', true );
}
}
}
add_action('admin_init', 'wpse_248054');
But sorry, I don't know a plugin to do it ;-)
| wordpress | {
"language": "en",
"length": 174,
"provenance": "stackexchange_00019.jsonl.gz:470773",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/248054"
} | [
0.04376220703125,
0.02166748046875,
-0.0176544189453125,
-0.034515380859375,
0.030853271484375,
-0.03460693359375,
0.01473236083984375,
-0.039520263671875,
-0.031768798828125,
-0.0205230712890625,
-0.005413055419921875,
-0.02667236328125,
-0.040069580078125,
-0.051055908203125,
0.019866943359375,
-0.05865478515625,
0.0142974853515625,
-0.01824951171875,
0.0166168212890625,
-0.01490020751953125,
0.036590576171875,
-0.0136871337890625,
0.0191497802734375,
-0.0138702392578125,
0.031768798828125,
-0.02593994140625,
0.03875732421875,
-0.0311279296875,
0.01385498046875,
-0.0301513671875,
0.031280517578125,
0.01189422607421875,
0.0182037353515625,
-0.005382537841796875,
0.0174713134765625,
0.031005859375,
0.044281005859375,
-0.0166015625,
-0.00228118896484375,
0.045501708984375,
0.06341552734375,
-0.04931640625,
-0.0036163330078125,
0.0101318359375,
0.01751708984375,
-0.0103607177734375,
0.046630859375,
-0.045623779296875,
0.01140594482421875,
-0.06707763671875,
0.0088653564453125,
-0.0203857421875,
0.04095458984375,
-0.05908203125,
-0.03387451171875,
-0.01226806640625,
-0.061981201171875,
-0.0159912109375,
0.032196044921875,
0.041656494140625,
0.00496673583984375,
-0.03753662109375,
0.012603759765625,
-0.034820556640625,
0.01355743408203125,
0.01904296875,
0.00438690185546875,
0.0206756591796875,
0.0116119384765625,
0.019500732421875,
-0.00650787353515625,
-0.023651123046875,
-0.0124969482421875,
0.0010461807250976562,
-0.01076507568359375,
-0.00557708740234375,
0.0104522705078125,
-0.0183868408203125,
0.0147857666015625,
0.0244598388671875,
0.0175323486328125,
0.02978515625,
-0.0008511543273925781,
-0.016845703125,
0.0035724639892578125,
-0.0032367706298828125,
-0.0184326171875,
-0.02166748046875,
-0.0240936279296875,
-0.031524658203125,
-0.0125274658203125,
-0.01416015625,
-0.0697021484375,
0.0201568603515625,
0.00989532470703125,
-0.03857421875,
0.0013608932495117188,
0.0191802978515625,
-0.01445770263671875,
0.0102386474609375,
0.004634857177734375,
-0.034912109375,
0.03509521484375,
-0.01430511474609375,
0.03680419921875,
0.0214385986328125,
-0.029388427734375,
-0.0224609375,
0.06683349609375,
0.0159759521484375,
0.0021839141845703125,
0.0635986328125,
0.00786590576171875,
0.0008053779602050781,
-0.03314208984375,
0.00359344482421875,
-0.0260467529296875,
0.0024242401123046875,
-0.0293121337890625,
0.0110321044921875,
-0.0097503662109375,
-0.01468658447265625,
0.028472900390625,
0.003231048583984375,
0.00984954833984375,
-0.00887298583984375,
-0.030029296875,
-0.01433563232421875,
0.0159454345703125,
-0.033050537109375,
-0.03607177734375,
0.029571533203125,
0.0972900390625,
0.04913330078125,
0.0311126708984375,
0.0031871795654296875,
0.027496337890625,
-0.04046630859375,
-0.006038665771484375,
0.01617431640625,
-0.008880615234375,
-0.027496337890625,
-0.0093231201171875,
-0.01192474365234375,
0.040618896484375,
0.00867462158203125,
0.0205841064453125,
0.0179595947265625,
0.005527496337890625,
-0.026824951171875,
0.03857421875,
-0.037841796875,
0.034515380859375,
0.006023406982421875,
-0.0051116943359375,
-0.01102447509765625,
0.035491943359375,
-0.0282440185546875,
-0.0308837890625,
-0.046966552734375,
0.0272216796875,
0.00653076171875,
-0.0004267692565917969,
-0.04156494140625,
-0.024139404296875,
-0.0135498046875,
-0.0411376953125,
-0.001087188720703125,
0.0264434814453125,
0.0088043212890625,
0.0281524658203125,
0.00952911376953125,
0.0160064697265625,
-0.020965576171875,
-0.004825592041015625,
-0.0133056640625,
-0.039703369140625,
-0.0131378173828125,
0.0279693603515625,
0.0171356201171875,
-0.00972747802734375,
-0.037139892578125,
-0.01151275634765625,
0.016387939453125,
-0.0226593017578125,
0.03228759765625,
-0.00006943941116333008,
0.0209808349609375,
0.00756072998046875,
0.0133056640625,
0.0012302398681640625,
0.022796630859375,
0.014434814453125,
-0.0174407958984375,
0.014251708984375,
-0.01467132568359375,
-0.026702880859375,
-0.004856109619140625,
-0.0005359649658203125,
0.0173797607421875,
0.004947662353515625,
0.0241851806640625,
-0.0284271240234375,
0.02886962890625,
-0.0191192626953125,
0.0216827392578125,
-0.00753021240234375,
0.0180816650390625,
-0.0237884521484375,
-0.003223419189453125,
0.02386474609375,
-0.0174407958984375,
-0.00733184814453125,
-0.01114654541015625,
-0.0145721435546875,
0.01091766357421875,
0.018341064453125,
-0.00966644287109375,
-0.01145172119140625,
-0.0394287109375,
0.001880645751953125,
-0.018218994140625,
-0.0069427490234375,
0.06829833984375,
0.033233642578125,
0.01496124267578125,
-0.01824951171875,
-0.00894927978515625,
0.027374267578125,
0.024871826171875,
-0.02801513671875,
0.0135955810546875,
0.03228759765625,
-0.018157958984375,
-0.024658203125,
0.020843505859375,
0.0311126708984375,
-0.05987548828125,
-0.0208282470703125,
0.05328369140625,
0.0333251953125,
-0.007778167724609375,
-0.042816162109375,
-0.057708740234375,
0.089599609375,
-0.0167694091796875,
-0.006381988525390625,
-0.02252197265625,
0.0318603515625,
0.07769775390625,
-0.045501708984375,
0.00823211669921875,
0.027618408203125,
-0.05078125,
0.01433563232421875,
0.05133056640625,
-0.023223876953125,
-0.058319091796875,
0.0238800048828125,
-0.0171051025390625,
0.0234527587890625,
-0.0626220703125,
-0.07159423828125,
0.00433349609375,
0.03265380859375,
0.0389404296875,
0.039306640625,
0.0290374755859375,
-0.04827880859375,
0.0130767822265625,
0.0217132568359375,
0.0290985107421875,
0.0037441253662109375,
-0.01456451416015625,
0.00601959228515625,
0.022186279296875,
-0.03350830078125,
0.01043701171875,
0.018096923828125,
-0.004322052001953125,
0.0182952880859375,
0.06976318359375,
-0.00937652587890625,
-0.01629638671875,
-0.024749755859375,
-0.040191650390625,
-0.015716552734375,
0.0302886962890625,
-0.049163818359375,
-0.0304107666015625,
0.0064239501953125,
0.039764404296875,
-0.0197296142578125,
0.0078582763671875,
-0.004871368408203125,
0.0030651092529296875,
0.01215362548828125,
-0.032318115234375,
0.03570556640625,
-0.040679931640625,
0.0185546875,
0.053314208984375,
-0.0148468017578125,
-0.00836944580078125,
-0.009033203125,
0.021209716796875,
0.0007166862487792969,
0.02490234375,
-0.002910614013671875,
-0.051300048828125,
-0.01222991943359375,
-0.043426513671875,
0.001918792724609375,
0.08624267578125,
-0.024627685546875,
-0.06695556640625,
0.0190582275390625,
0.0301361083984375,
-0.03302001953125,
-0.023590087890625,
0.001861572265625,
-0.04931640625,
-0.0256500244140625,
-0.019439697265625,
-0.0265350341796875,
0.00894927978515625,
-0.028594970703125,
0.00389862060546875,
0.058197021484375,
-0.03271484375,
-0.053497314453125,
-0.035247802734375,
-0.0731201171875,
-0.0263519287109375,
-0.006771087646484375,
-0.01061248779296875,
0.0114288330078125,
0.02911376953125,
0.00969696044921875,
-0.0233612060546875,
0.005435943603515625,
0.031707763671875,
-0.006072998046875,
-0.0016946792602539062,
0.0178375244140625,
0.0037326812744140625,
0.04498291015625,
0.0192718505859375,
-0.004791259765625,
0.032012939453125,
-0.0265960693359375,
-0.033050537109375,
-0.045623779296875,
0.06280517578125,
-0.0134429931640625,
0.0090789794921875,
0.06097412109375,
0.031463623046875,
-0.0120391845703125,
-0.0277862548828125,
0.00220489501953125,
-0.020294189453125,
-0.00487518310546875,
0.010711669921875,
-0.03228759765625,
0.00995635986328125,
-0.010589599609375,
0.033538818359375,
-0.0002263784408569336,
0.0014715194702148438,
0.00733184814453125,
-0.0111083984375,
0.0006937980651855469,
0.0017070770263671875,
0.0008540153503417969,
-0.01031494140625,
-0.031585693359375,
-0.034942626953125,
0.020751953125,
-0.01509857177734375,
0.00632476806640625,
-0.01432037353515625,
0.0182952880859375,
-0.01311492919921875,
-0.10626220703125,
0.035369873046875,
-0.07586669921875,
-0.0020236968994140625,
-0.0677490234375,
-0.0170135498046875,
-0.0033817291259765625,
0.115478515625,
-0.052215576171875,
-0.01274871826171875,
0.002010345458984375,
0.00505828857421875,
-0.004283905029296875,
-0.01178741455078125,
-0.048309326171875,
-0.0283966064453125,
-0.09991455078125,
0.0035228729248046875,
-0.0007715225219726562,
-0.043304443359375,
-0.0256805419921875,
0.038238525390625,
-0.07086181640625,
-0.037689208984375,
0.034942626953125,
-0.0328369140625,
0.018096923828125,
-0.00551605224609375,
0.01123046875,
-0.019775390625,
-0.023468017578125,
-0.0014057159423828125,
-0.07061767578125,
-0.0110931396484375,
-0.00852203369140625,
0.02618408203125,
0.007556915283203125,
-0.005855560302734375,
-0.003345489501953125,
0.06353759765625,
0.0248260498046875,
-0.00836944580078125,
0.002727508544921875,
0.0032501220703125,
-0.008880615234375,
-0.0190277099609375,
-0.0035915374755859375,
-0.01555633544921875,
-0.0274505615234375,
-0.042205810546875,
0.0159454345703125,
0.016876220703125,
-0.039703369140625,
0.01544952392578125,
-0.0377197265625,
0.006793975830078125,
-0.0190277099609375,
-0.0164337158203125,
-0.06402587890625,
-0.007129669189453125,
-0.05694580078125,
-0.0023937225341796875,
-0.0035858154296875,
-0.040130615234375,
0.0236968994140625,
0.0031414031982421875,
0.0089874267578125,
0.0135955810546875,
0.07537841796875,
0.0214996337890625,
-0.0173492431640625,
-0.03558349609375,
-0.0008053779602050781,
0.01544189453125,
-0.0002865791320800781,
0.049224853515625,
-0.00441741943359375,
-0.0210113525390625,
0.09722900390625,
-0.0131683349609375,
-0.01934814453125,
-0.057342529296875,
0.0703125,
0.0006747245788574219,
-0.00267791748046875,
0.0013265609741210938,
-0.0242767333984375,
0.06634521484375,
-0.006748199462890625,
-0.0108489990234375,
-0.02716064453125,
0.0037555694580078125,
0.06134033203125,
0.01103973388671875,
0.0029926300048828125,
-0.04217529296875,
-0.051361083984375,
0.01104736328125,
0.0201873779296875,
-0.005947113037109375,
0.0321044921875,
-0.009796142578125,
0.0127410888671875,
-0.0131378173828125,
0.01483917236328125,
-0.029083251953125,
-0.0116424560546875,
-0.01548004150390625,
0.0142364501953125,
-0.0006108283996582031,
0.000644683837890625,
-0.00870513916015625,
0.003116607666015625,
0.00909423828125,
-0.028076171875,
-0.036834716796875,
-0.03570556640625,
-0.0204620361328125,
0.01751708984375,
0.01361846923828125,
-0.023101806640625,
0.031585693359375,
0.04290771484375,
-0.0240478515625,
-0.00009542703628540039,
-0.045806884765625,
0.0164794921875,
-0.0396728515625,
-0.00951385498046875,
0.0091552734375,
-0.01702880859375,
-0.00614166259765625,
0.051727294921875,
0.0198211669921875,
0.0059356689453125,
-0.0171356201171875,
0.0599365234375,
0.034576416015625,
0.0280609130859375,
0.016571044921875,
-0.031494140625,
-0.0004603862762451172,
-0.01546478271484375,
-0.0163116455078125,
-0.051605224609375,
0.01268768310546875,
0.0284576416015625,
0.038177490234375,
-0.00667572021484375,
-0.0312042236328125,
0.020660400390625,
-0.01837158203125,
-0.0052032470703125,
-0.0157623291015625,
-0.0184478759765625,
-0.00775146484375,
-0.006183624267578125,
0.0128173828125,
0.006866455078125,
-0.0037689208984375,
-0.000762939453125,
0.005886077880859375,
-0.016265869140625,
0.020782470703125,
-0.024383544921875,
0.0101470947265625,
-0.01076507568359375,
0.0015392303466796875,
-0.050994873046875,
-0.01329803466796875,
0.019775390625,
0.0261993408203125,
-0.0038471221923828125,
-0.01605224609375,
-0.05499267578125,
0.02960205078125,
0.01221466064453125,
0.029449462890625,
-0.0294647216796875,
-0.0119781494140625,
0.0139007568359375,
-0.00708770751953125,
0.038909912109375,
0.0010957717895507812,
-0.03741455078125,
-0.019866943359375,
-0.048980712890625,
-0.00975799560546875,
-0.01120758056640625,
0.00530242919921875,
-0.01690673828125,
0.0193939208984375,
0.01555633544921875,
0.0200347900390625,
-0.0022602081298828125,
-0.047454833984375,
-0.025787353515625,
-0.0301055908203125,
0.0209197998046875,
-0.03204345703125,
-0.0178985595703125,
0.04779052734375,
0.03216552734375,
0.033538818359375,
0.0197296142578125,
0.010040283203125,
-0.022064208984375,
-0.0086669921875,
-0.03839111328125,
-0.058868408203125,
0.01047515869140625,
0.025665283203125,
-0.00786590576171875,
0.055511474609375,
0.04022216796875,
0.01079559326171875,
0.0197601318359375,
0.004268646240234375,
0.0054168701171875,
-0.023193359375,
-0.032073974609375,
-0.00939178466796875,
0.00478363037109375,
0.0157928466796875,
-0.0191802978515625,
0.0279541015625,
0.00140380859375,
0.0122833251953125,
0.020904541015625,
-0.0390625,
0.041168212890625,
0.006862640380859375,
-0.06146240234375,
0.0504150390625,
0.0248565673828125,
0.008544921875,
0.02398681640625,
-0.00826263427734375,
0.0154876708984375,
-0.006153106689453125,
0.01096343994140625,
0.0206756591796875,
-0.007537841796875,
0.040130615234375,
0.0017290115356445312,
-0.009429931640625,
0.0265350341796875,
-0.03240966796875,
0.0007910728454589844,
0.0528564453125,
0.04937744140625,
-0.0989990234375,
0.03521728515625,
0.00890350341796875,
0.01605224609375,
0.035797119140625,
0.0259246826171875,
0.0016660690307617188,
0.0203857421875,
-0.0203399658203125,
-0.023590087890625,
-0.018798828125,
0.0006213188171386719,
0.00797271728515625,
-0.00588226318359375,
-0.005229949951171875,
0.00844573974609375,
0.0148468017578125,
-0.0004382133483886719,
0.005229949951171875,
-0.01227569580078125,
0.0229644775390625,
-0.031890869140625,
0.0009326934814453125,
0.0168914794921875,
0.0015687942504882812,
-0.06976318359375,
0.036285400390625,
-0.01294708251953125,
0.0028285980224609375,
0.003009796142578125,
0.020965576171875,
0.063232421875,
0.0499267578125,
0.0169677734375,
-0.00785064697265625,
0.01226043701171875,
0.0157623291015625,
-0.0215911865234375,
-0.021881103515625,
-0.0015897750854492188,
0.0428466796875,
-0.0274505615234375,
0.0195770263671875,
-0.0050811767578125,
-0.01201629638671875,
-0.0146942138671875,
-0.0362548828125,
0.07415771484375,
-0.0222015380859375,
-0.019439697265625,
0.01522064208984375,
0.0219268798828125,
-0.007198333740234375,
-0.0177764892578125,
0.021942138671875,
-0.040740966796875,
-0.01068115234375,
0.005046844482421875,
0.01074981689453125,
0.012176513671875,
-0.0048980712890625,
-0.07073974609375,
0.099609375,
-0.01493072509765625,
0.01934814453125,
0.0129547119140625,
0.036895751953125,
-0.036895751953125,
0.005519866943359375,
-0.0313720703125,
0.06683349609375,
0.0285491943359375,
0.0248870849609375,
-0.043792724609375,
-0.031219482421875,
0.0126495361328125,
0.04888916015625,
0.048095703125,
0.017913818359375,
-0.0406494140625,
-0.00914764404296875,
0.028564453125,
0.0341796875,
-0.004886627197265625,
0.046905517578125,
0.00408172607421875,
0.0156707763671875,
0.04608154296875,
-0.018524169921875,
0.03985595703125,
0.003387451171875,
-0.0182037353515625,
0.017852783203125,
0.021942138671875,
0.026153564453125,
-0.0217437744140625,
0.01485443115234375,
-0.0364990234375,
-0.00885009765625,
0.0299835205078125,
-0.01300048828125,
0.016845703125,
0.0282745361328125,
0.01259613037109375,
-0.020477294921875,
0.0204620361328125,
-0.03094482421875,
0.0404052734375,
-0.037078857421875,
0.05206298828125,
-0.0013742446899414062,
0.00699615478515625,
0.0771484375,
-0.0085601806640625,
0.0202484130859375,
0.04107666015625,
-0.031768798828125,
0.0572509765625,
0.0213775634765625,
0.01557159423828125,
-0.020233154296875,
0.031524658203125,
0.00868988037109375,
0.0589599609375,
-0.053985595703125,
-0.08319091796875,
0.0062713623046875,
0.01194000244140625,
0.057861328125,
0.04193115234375,
0.0626220703125,
-0.0020275115966796875,
0.0240020751953125,
-0.06890869140625,
0.0162200927734375,
0.047637939453125,
0.032989501953125,
-0.00019049644470214844,
0.0185394287109375,
-0.07391357421875,
-0.0204620361328125,
-0.06329345703125,
0.0115203857421875,
0.01446533203125,
0.07891845703125,
0.039276123046875,
0.05511474609375,
-0.00861358642578125,
-0.0450439453125,
0.0233306884765625,
0.0196075439453125,
0.0243377685546875,
-0.0237579345703125,
0.0166778564453125,
-0.0064544677734375,
-0.020416259765625,
0.0072021484375,
-0.01483154296875,
0.0292816162109375,
0.038421630859375,
0.0574951171875,
-0.018707275390625,
-0.02130126953125,
0.0360107421875,
-0.02117919921875,
-0.0249176025390625,
-0.0330810546875,
0.0086669921875,
0.01261138916015625,
0.0070953369140625,
0.01934814453125,
0.01666259765625,
0.0243072509765625,
0.0186920166015625,
0.028533935546875,
0.00711822509765625,
-0.028411865234375,
0.048736572265625,
0.00997161865234375,
0.07666015625,
0.039276123046875,
-0.09930419921875,
-0.01332855224609375,
-0.0295257568359375,
-0.0789794921875,
0.04443359375,
0.039886474609375,
-0.045623779296875,
0.02423095703125,
-0.0003361701965332031,
-0.0501708984375,
0.036712646484375,
0.0098876953125,
-0.002017974853515625,
0.01157379150390625,
0.00528717041015625,
-0.030609130859375,
-0.0391845703125,
-0.0245513916015625,
-0.0287933349609375,
0.0281524658203125,
0.0257568359375,
0.032562255859375,
-0.00020766258239746094,
0.04107666015625,
-0.033477783203125,
0.0090484619140625,
-0.04168701171875,
-0.046966552734375,
0.04449462890625,
0.0086669921875,
-0.001373291015625,
-0.01161956787109375,
0.01242828369140625,
-0.027557373046875,
0.04998779296875,
-0.045196533203125,
-0.06634521484375,
0.01374053955078125,
0.034454345703125,
0.02423095703125,
0.038818359375,
-0.0227508544921875,
-0.0187835693359375,
-0.05615234375,
-0.04376220703125,
0.04754638671875,
0.0201263427734375,
-0.0128326416015625,
0.03765869140625,
0.030914306640625,
0.0224151611328125,
0.016326904296875,
-0.0006971359252929688,
0.025543212890625,
0.046417236328125,
-0.0207366943359375,
-0.01201629638671875,
0.056304931640625,
-0.01345062255859375,
0.01535797119140625,
0.03350830078125,
0.03204345703125,
0.045684814453125,
-0.055694580078125,
-0.01451873779296875,
0.03125,
0.0228729248046875,
-0.0517578125,
0.020660400390625,
0.0233917236328125,
-0.01580810546875,
0.01067352294921875,
-0.06390380859375,
-0.043365478515625,
-0.042572021484375,
0.002826690673828125,
0.02032470703125,
-0.01546478271484375,
-0.059326171875,
-0.07421875,
0.01076507568359375,
0.04119873046875,
-0.00769805908203125,
-0.00679779052734375,
0.032623291015625,
-0.056427001953125,
0.00040602684020996094,
-0.0002841949462890625,
-0.02105712890625,
0.0190582275390625,
0.048583984375,
-0.050048828125,
-0.0005059242248535156,
-0.03948974609375,
-0.045166015625,
-0.045379638671875,
0.043121337890625,
0.028472900390625,
-0.039459228515625,
-0.05120849609375,
0.05023193359375,
0.026397705078125,
0.08087158203125,
0.09405517578125,
-0.0176544189453125,
-0.0017671585083007812,
0.0007271766662597656,
-0.0394287109375,
-0.0316162109375,
0.052581787109375,
-0.0633544921875,
-0.044189453125,
-0.0239105224609375,
0.01457977294921875,
0.021209716796875,
-0.0174102783203125,
-0.03692626953125,
0.00366973876953125,
-0.01117706298828125,
-0.024871826171875,
-0.05908203125,
-0.01114654541015625,
-0.00484466552734375,
0.0236968994140625,
0.0006442070007324219,
-0.0284881591796875,
-0.0306396484375,
0.04217529296875,
0.0239105224609375,
0.0193939208984375,
-0.0007081031799316406,
0.0274200439453125,
-0.08599853515625,
0.0192108154296875,
-0.001922607421875,
0.0211639404296875,
0.002040863037109375,
0.020965576171875,
-0.0185546875,
0.0347900390625,
-0.04217529296875,
-0.04766845703125,
-0.045166015625,
-0.0095367431640625,
0.00527191162109375,
-0.043792724609375,
-0.0325927734375,
-0.0284271240234375,
0.036834716796875,
0.02239990234375,
0.00710296630859375,
0.001033782958984375,
-0.0496826171875,
-0.0445556640625,
0.00121307373046875,
-0.00836944580078125,
0.0021877288818359375,
-0.054443359375,
0.0051116943359375,
0.015960693359375,
-0.007080078125,
-0.01027679443359375,
-0.004978179931640625,
-0.01374053955078125,
-0.00799560546875,
0.0223388671875,
-0.00928497314453125,
-0.0251312255859375,
0.031280517578125,
0.00701141357421875,
-0.041900634765625,
-0.061370849609375,
0.01751708984375,
-0.005764007568359375,
-0.042022705078125,
-0.014404296875,
-0.01465606689453125,
-0.025146484375,
0.005954742431640625,
0.023590087890625,
0.000576019287109375,
0.0179901123046875,
-0.01523590087890625,
0.0003294944763183594,
-0.01296234130859375,
0.03857421875,
-0.003742218017578125,
0.0259857177734375,
-0.036651611328125,
0.0491943359375,
0.01103973388671875,
0.0723876953125,
-0.00568389892578125,
-0.037689208984375,
-0.0179443359375,
0.035675048828125,
-0.02117919921875,
-0.007373809814453125,
0.01314544677734375,
-0.056396484375,
0.00725555419921875,
0.01334381103515625,
-0.0311126708984375,
-0.0052032470703125,
0.00493621826171875,
-0.004486083984375,
-0.025390625,
0.0034198760986328125
] |
0f21b084ef2683d9cd47ee56b572c4291149618d | Wordpress Stackexchange
Q: Can we hook a static method of a class to add_action inside that class? So basically, what I'm trying to do is to hook a static method of a class to another static method of that same class.
Code is here :
class LocatorMap {
public static function init() {
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'register_scripts' ) );
}
/* add_action( 'wp_enqueue_script', array( 'LocatorMap', 'register_scripts' ) ); */
public function register_scripts() {
global $post;
/* http or https */
$scheme = parse_url( get_bloginfo('url'), PHP_URL_SCHEME );
/* register gmaps api and info box */
wp_register_script( 'google-maps-api', $scheme . '://maps.googleapis.com/maps/api/js', array('jquery'), FALSE, true );
wp_register_script( 'google-maps-info-box', $scheme . '://cdn.rawgit.com/googlemaps/v3-utility-library/infobox/1.1.13/src/infobox.js', array( 'jquery', 'google-maps-api' ), '1.1.13', true );
}
}
Is this possible? I don't know since I'm a bit new on this kind of a structure.
UPDATE
I am also calling this class on an external file.
define( DEALERSHIP_MAP_URL, untrailingslashit( plugin_dir_url( __FILE__ ) ) );
define( DEALERSHIP_MAP_DIR, untrailingslashit( plugin_dir_path( __FILE__ ) ) );
define( DEALERSHIP_MAP_TEMPLATE, DEALERSHIP_MAP_DIR . '/templates' );
require_once( 'core/class-locator-map.php' );
register_activation_hook( __FILE__, array( 'LocatorMap', 'init' ) );
A: use the function get_called_class()
public static function init() {
add_action( 'wp_enqueue_scripts', array( get_called_class(), 'register_scripts' ) );
}
| Q: Can we hook a static method of a class to add_action inside that class? So basically, what I'm trying to do is to hook a static method of a class to another static method of that same class.
Code is here :
class LocatorMap {
public static function init() {
add_action( 'wp_enqueue_scripts', array( __CLASS__, 'register_scripts' ) );
}
/* add_action( 'wp_enqueue_script', array( 'LocatorMap', 'register_scripts' ) ); */
public function register_scripts() {
global $post;
/* http or https */
$scheme = parse_url( get_bloginfo('url'), PHP_URL_SCHEME );
/* register gmaps api and info box */
wp_register_script( 'google-maps-api', $scheme . '://maps.googleapis.com/maps/api/js', array('jquery'), FALSE, true );
wp_register_script( 'google-maps-info-box', $scheme . '://cdn.rawgit.com/googlemaps/v3-utility-library/infobox/1.1.13/src/infobox.js', array( 'jquery', 'google-maps-api' ), '1.1.13', true );
}
}
Is this possible? I don't know since I'm a bit new on this kind of a structure.
UPDATE
I am also calling this class on an external file.
define( DEALERSHIP_MAP_URL, untrailingslashit( plugin_dir_url( __FILE__ ) ) );
define( DEALERSHIP_MAP_DIR, untrailingslashit( plugin_dir_path( __FILE__ ) ) );
define( DEALERSHIP_MAP_TEMPLATE, DEALERSHIP_MAP_DIR . '/templates' );
require_once( 'core/class-locator-map.php' );
register_activation_hook( __FILE__, array( 'LocatorMap', 'init' ) );
A: use the function get_called_class()
public static function init() {
add_action( 'wp_enqueue_scripts', array( get_called_class(), 'register_scripts' ) );
}
A: I recently had to do the same thing and ended up using the static:: late static binding along with special ::class constant. The static:: binding will reference the calling class, while the ::class constant will return a string that is the name of the calling class (with namespacing!)
Using the example from the questiom, the implementation would like something like this:
class LocatorMap {
public static function init() {
add_action( 'wp_enqueue_scripts', array( static::class, 'registerScripts' ) );
}
public function registerScripts() {}
}
Since static:: references the calling class, this allows to write reusable classes for your plugins/themes, and kind of wrap up some of WordPress' legacy ugliness.
For example, you could write an abstract class for custom post types like this:
namespace WordpressPlugin;
abstract class AbstractPostType {
const SLUG;
private function __construct() {}
public static function initialize() {
add_action( 'init', array( static::class, 'registerPostType' ), 0 );
add_action( 'init', array( static::class, 'registerTaxonomies' ), 1 );
add_action( 'add_meta_boxes', array( static::class, 'addMetaBox' ) );
}
public static function registerPostType() {}
public static function registerTaxonomies() {}
public static function addMetaBox() {}
}
Aftet that, you can now create custom post types without having to duplicate all of the boilerplate in each subclass, like this:
namespace WordpressPlugin;
class ExamplePostType extends AbstractPostType {
const SLUG = 'example-post-type';
public static function registerPostType() {
register_post_type( self::SLUG, array(
...
) );
}
}
A: register_activation_hook only runs once i.e. when the plugin is first activated - use the init hook instead to "boot up" your plugin:
add_action( 'init', 'LocatorMap::init' );
| wordpress | {
"language": "en",
"length": 446,
"provenance": "stackexchange_00019.jsonl.gz:470865",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/248392"
} | [
0.0518798828125,
0.006336212158203125,
0.0003848075866699219,
-0.037750244140625,
0.003753662109375,
-0.0208282470703125,
0.0261077880859375,
-0.01052093505859375,
-0.006671905517578125,
-0.01038360595703125,
-0.051544189453125,
0.043609619140625,
-0.039276123046875,
-0.0030574798583984375,
0.037017822265625,
-0.0196990966796875,
0.0594482421875,
-0.045135498046875,
0.0307769775390625,
-0.01461029052734375,
0.0165252685546875,
0.0122833251953125,
0.021453857421875,
0.06353759765625,
-0.00556182861328125,
0.00293731689453125,
0.06304931640625,
-0.001689910888671875,
-0.0222320556640625,
-0.020172119140625,
0.006229400634765625,
0.00875091552734375,
0.0242462158203125,
0.023193359375,
-0.0289154052734375,
-0.0036067962646484375,
0.0390625,
0.00897979736328125,
-0.0009050369262695312,
0.0221405029296875,
0.0189056396484375,
-0.00787353515625,
-0.045318603515625,
0.05145263671875,
-0.05657958984375,
-0.061553955078125,
0.02191162109375,
0.00951385498046875,
0.02911376953125,
0.01496124267578125,
0.01439666748046875,
0.000606536865234375,
0.0215911865234375,
-0.03070068359375,
-0.00801849365234375,
0.00885009765625,
-0.06866455078125,
-0.0009608268737792969,
0.0115814208984375,
0.087158203125,
0.037628173828125,
-0.0189666748046875,
-0.023040771484375,
-0.05419921875,
-0.01126861572265625,
-0.0189056396484375,
-0.022491455078125,
0.0135955810546875,
-0.03399658203125,
-0.0156402587890625,
0.038360595703125,
-0.023773193359375,
-0.026275634765625,
-0.007068634033203125,
-0.01523590087890625,
0.0208740234375,
0.0038928985595703125,
-0.002574920654296875,
0.007122039794921875,
0.0147552490234375,
0.044647216796875,
-0.004436492919921875,
0.0207061767578125,
0.006855010986328125,
0.00878143310546875,
0.0227813720703125,
-0.00027632713317871094,
-0.0243072509765625,
0.0001703500747680664,
-0.022247314453125,
-0.017486572265625,
-0.01276397705078125,
0.00832366943359375,
0.00433349609375,
-0.00708770751953125,
-0.048736572265625,
0.0171966552734375,
0.041656494140625,
0.0079345703125,
0.0278167724609375,
-0.0011110305786132812,
-0.03753662109375,
0.0157623291015625,
-0.042999267578125,
-0.00043702125549316406,
0.0352783203125,
0.01439666748046875,
-0.0037899017333984375,
0.001834869384765625,
0.01226806640625,
-0.00998687744140625,
-0.021453857421875,
0.0213470458984375,
-0.00342559814453125,
-0.048095703125,
-0.040557861328125,
-0.01788330078125,
-0.01702880859375,
0.0166473388671875,
-0.0618896484375,
0.024078369140625,
0.019012451171875,
0.022430419921875,
0.012908935546875,
0.021240234375,
0.025238037109375,
-0.036163330078125,
-0.024505615234375,
0.034820556640625,
-0.04522705078125,
-0.01247406005859375,
0.035675048828125,
0.0286102294921875,
0.03460693359375,
-0.004711151123046875,
0.01328277587890625,
0.0288848876953125,
0.0491943359375,
-0.004852294921875,
0.01336669921875,
-0.004131317138671875,
-0.0308990478515625,
0.007297515869140625,
0.00533294677734375,
0.06591796875,
-0.0021152496337890625,
0.0160980224609375,
0.020721435546875,
0.0261993408203125,
0.0084686279296875,
0.055511474609375,
-0.035736083984375,
0.02099609375,
0.01053619384765625,
0.01204681396484375,
-0.03680419921875,
0.054168701171875,
-0.045196533203125,
0.0078582763671875,
-0.047454833984375,
0.037445068359375,
-0.0484619140625,
-0.050323486328125,
-0.0543212890625,
-0.06622314453125,
0.0216217041015625,
-0.0164031982421875,
0.00733184814453125,
0.013580322265625,
0.0220794677734375,
-0.00011295080184936523,
0.055328369140625,
-0.057952880859375,
0.01030731201171875,
0.0254669189453125,
-0.020233154296875,
-0.015838623046875,
0.0328369140625,
0.040740966796875,
-0.017181396484375,
-0.0102386474609375,
-0.04315185546875,
0.08807373046875,
-0.020263671875,
-0.06982421875,
0.0950927734375,
0.01334381103515625,
0.0877685546875,
-0.01235198974609375,
-0.003437042236328125,
0.044677734375,
0.04693603515625,
-0.0135955810546875,
0.0250396728515625,
0.01514434814453125,
-0.041656494140625,
-0.003131866455078125,
-0.0050048828125,
0.0021495819091796875,
-0.0309906005859375,
-0.01493072509765625,
-0.0225677490234375,
0.03375244140625,
-0.00492095947265625,
0.018157958984375,
0.004955291748046875,
-0.0009946823120117188,
0.0254974365234375,
-0.0272369384765625,
0.01409149169921875,
-0.00792694091796875,
-0.0291595458984375,
-0.0022029876708984375,
-0.0009813308715820312,
0.0196380615234375,
0.023590087890625,
-0.011688232421875,
0.01107025146484375,
0.0031375885009765625,
0.0007138252258300781,
0.0030364990234375,
-0.0069122314453125,
-0.01195526123046875,
0.0038661956787109375,
-0.0043487548828125,
0.0070648193359375,
-0.04248046875,
-0.0052642822265625,
-0.0307464599609375,
0.01093292236328125,
-0.00791168212890625,
0.03216552734375,
-0.037750244140625,
-0.00020623207092285156,
-0.0214385986328125,
-0.0233154296875,
0.0000947117805480957,
-0.02484130859375,
0.0241546630859375,
0.0307464599609375,
0.0275726318359375,
0.02777099609375,
-0.0310821533203125,
-0.019561767578125,
0.048858642578125,
0.006664276123046875,
0.0075225830078125,
-0.0214691162109375,
-0.05059814453125,
-0.01104736328125,
0.0113525390625,
0.01329803466796875,
0.0290374755859375,
0.058685302734375,
-0.047637939453125,
0.033935546875,
-0.00795745849609375,
-0.020782470703125,
-0.0043487548828125,
-0.0288848876953125,
0.045166015625,
-0.03607177734375,
-0.08184814453125,
0.01898193359375,
0.007274627685546875,
0.00832366943359375,
0.02459716796875,
0.038665771484375,
-0.02557373046875,
-0.010772705078125,
0.02825927734375,
0.052001953125,
-0.0010280609130859375,
0.042724609375,
-0.0020542144775390625,
0.0018491744995117188,
-0.025482177734375,
-0.00920867919921875,
-0.004665374755859375,
0.006313323974609375,
0.004474639892578125,
0.0170135498046875,
0.0221710205078125,
-0.01142120361328125,
0.0242919921875,
-0.061859130859375,
0.0104217529296875,
-0.0204925537109375,
0.0264739990234375,
0.040435791015625,
0.04986572265625,
0.007171630859375,
-0.0162200927734375,
0.04400634765625,
-0.0161895751953125,
-0.01519012451171875,
0.06732177734375,
0.0161895751953125,
0.0049896240234375,
0.00444793701171875,
0.03533935546875,
0.04180908203125,
-0.0193939208984375,
0.018951416015625,
0.004840850830078125,
-0.00490570068359375,
-0.00385284423828125,
0.01316070556640625,
0.01280975341796875,
-0.00948333740234375,
0.01091766357421875,
0.08941650390625,
0.0208740234375,
0.01629638671875,
-0.0133056640625,
-0.044158935546875,
-0.01361083984375,
-0.004558563232421875,
-0.10107421875,
-0.06451416015625,
0.02880859375,
-0.04364013671875,
0.037078857421875,
0.03900146484375,
-0.0258636474609375,
-0.05859375,
0.08355712890625,
0.0130767822265625,
-0.00640106201171875,
-0.03131103515625,
-0.01995849609375,
-0.05902099609375,
-0.06939697265625,
-0.0151214599609375,
0.0201263427734375,
0.01418304443359375,
0.0132904052734375,
-0.028656005859375,
0.01226806640625,
-0.006137847900390625,
0.06805419921875,
0.0782470703125,
-0.00044989585876464844,
0.00861358642578125,
-0.02191162109375,
-0.007160186767578125,
-0.000042378902435302734,
-0.006023406982421875,
-0.0281219482421875,
-0.00769805908203125,
0.009765625,
-0.01861572265625,
0.03961181640625,
0.032135009765625,
0.0421142578125,
0.0255279541015625,
-0.03399658203125,
0.032745361328125,
0.01505279541015625,
-0.02838134765625,
0.0048370361328125,
0.0277099609375,
-0.0092315673828125,
-0.04547119140625,
0.0008687973022460938,
-0.040374755859375,
0.0001558065414428711,
-0.01430511474609375,
0.0098724365234375,
-0.0033168792724609375,
-0.0006775856018066406,
0.01971435546875,
0.01435089111328125,
-0.0216522216796875,
-0.008087158203125,
-0.0171661376953125,
0.02825927734375,
-0.0172271728515625,
0.017181396484375,
-0.002410888671875,
0.0068359375,
-0.00803375244140625,
0.0017757415771484375,
-0.05133056640625,
0.00969696044921875,
0.0250701904296875,
-0.005115509033203125,
0.0275421142578125,
0.0029010772705078125,
-0.018890380859375,
0.002544403076171875,
0.05438232421875,
-0.068115234375,
-0.00304412841796875,
0.031494140625,
0.03082275390625,
-0.046478271484375,
-0.04327392578125,
-0.0635986328125,
-0.01007080078125,
-0.0298004150390625,
-0.02618408203125,
0.015533447265625,
-0.050262451171875,
-0.0165557861328125,
-0.0238189697265625,
-0.058135986328125,
-0.026885986328125,
0.0380859375,
-0.04052734375,
-0.007659912109375,
0.06298828125,
-0.00896453857421875,
0.01139068603515625,
-0.0487060546875,
-0.015411376953125,
-0.04248046875,
-0.0125274658203125,
-0.038177490234375,
0.07989501953125,
0.059478759765625,
-0.054595947265625,
0.0017271041870117188,
0.05206298828125,
0.00656890869140625,
-0.0180816650390625,
0.029632568359375,
0.015899658203125,
0.022705078125,
0.0029582977294921875,
-0.01169586181640625,
-0.01093292236328125,
0.0309295654296875,
0.0174560546875,
-0.0341796875,
0.039825439453125,
-0.04315185546875,
-0.0009288787841796875,
0.002197265625,
-0.052642822265625,
-0.0270538330078125,
-0.0258026123046875,
-0.0122833251953125,
0.01067352294921875,
-0.0174713134765625,
0.000823974609375,
-0.020355224609375,
-0.01062774658203125,
-0.05511474609375,
-0.057525634765625,
-0.0198516845703125,
0.0341796875,
0.058074951171875,
0.041351318359375,
0.036895751953125,
0.0175018310546875,
-0.023651123046875,
0.0204620361328125,
0.0078887939453125,
0.03948974609375,
0.0259857177734375,
-0.00432586669921875,
-0.007350921630859375,
-0.0025424957275390625,
0.005615234375,
-0.0012035369873046875,
0.0628662109375,
0.0246124267578125,
0.0345458984375,
-0.027679443359375,
0.02777099609375,
-0.0308380126953125,
-0.006549835205078125,
-0.0294342041015625,
0.0132293701171875,
-0.005786895751953125,
0.02923583984375,
-0.041229248046875,
0.0684814453125,
-0.01261138916015625,
-0.002285003662109375,
0.003902435302734375,
-0.044921875,
0.03228759765625,
0.018768310546875,
0.006656646728515625,
-0.0239105224609375,
0.00661468505859375,
0.004322052001953125,
0.0904541015625,
0.04180908203125,
0.01190185546875,
0.039642333984375,
0.057952880859375,
-0.0197601318359375,
0.01490020751953125,
0.004795074462890625,
0.0119476318359375,
-0.003932952880859375,
-0.0247802734375,
-0.03448486328125,
0.0012464523315429688,
-0.0137176513671875,
-0.0180816650390625,
-0.0175323486328125,
0.0305328369140625,
0.0228118896484375,
-0.015533447265625,
-0.03558349609375,
-0.0156402587890625,
-0.01371002197265625,
-0.047760009765625,
0.01108551025390625,
0.0287628173828125,
-0.0228424072265625,
-0.01430511474609375,
0.02703857421875,
0.0195770263671875,
-0.016693115234375,
-0.0042266845703125,
0.035797119140625,
-0.032073974609375,
0.053375244140625,
0.0167083740234375,
-0.03338623046875,
0.0215301513671875,
-0.0034637451171875,
-0.0296630859375,
-0.0005617141723632812,
-0.0007171630859375,
-0.004207611083984375,
0.002681732177734375,
-0.017364501953125,
0.00957489013671875,
0.0167388916015625,
-0.00525665283203125,
-0.02813720703125,
0.033172607421875,
0.016082763671875,
-0.0517578125,
-0.0286407470703125,
-0.01329803466796875,
0.02789306640625,
-0.008148193359375,
0.005680084228515625,
0.0506591796875,
0.019622802734375,
0.060546875,
-0.04022216796875,
0.021270751953125,
-0.0163116455078125,
0.0054473876953125,
-0.07989501953125,
-0.01904296875,
0.0229034423828125,
-0.03155517578125,
-0.0187530517578125,
0.002544403076171875,
-0.02813720703125,
-0.0036830902099609375,
-0.04803466796875,
0.0224761962890625,
-0.035430908203125,
0.0291900634765625,
-0.018035888671875,
0.01251983642578125,
0.049835205078125,
0.037567138671875,
-0.01360321044921875,
0.0178680419921875,
-0.0435791015625,
-0.023529052734375,
-0.0016632080078125,
-0.03118896484375,
-0.01251220703125,
-0.0298004150390625,
0.01397705078125,
0.04345703125,
-0.00862884521484375,
-0.0219573974609375,
0.0243072509765625,
0.004665374755859375,
-0.0224609375,
0.054290771484375,
-0.02276611328125,
0.061126708984375,
-0.00989532470703125,
0.035919189453125,
-0.006328582763671875,
0.003986358642578125,
-0.0367431640625,
0.010650634765625,
-0.01189422607421875,
-0.06390380859375,
-0.031219482421875,
0.036376953125,
-0.046478271484375,
0.045135498046875,
0.03753662109375,
-0.0008902549743652344,
-0.00893402099609375,
0.019012451171875,
-0.0005941390991210938,
-0.0236663818359375,
0.03106689453125,
0.02044677734375,
0.0362548828125,
-0.0201416015625,
-0.014678955078125,
0.0204315185546875,
-0.0191497802734375,
-0.0266265869140625,
0.036163330078125,
-0.023193359375,
0.0203094482421875,
0.0185546875,
-0.06158447265625,
0.018096923828125,
0.07037353515625,
0.0281982421875,
0.06500244140625,
-0.0207366943359375,
0.0296173095703125,
0.0692138671875,
0.026031494140625,
-0.02935791015625,
-0.022796630859375,
0.030426025390625,
-0.0006952285766601562,
-0.0207061767578125,
0.0207672119140625,
-0.0203094482421875,
0.0246429443359375,
-0.004558563232421875,
0.004940032958984375,
-0.0293121337890625,
0.01323699951171875,
-0.03778076171875,
-0.03216552734375,
0.055206298828125,
0.03619384765625,
-0.004062652587890625,
0.0197296142578125,
-0.018890380859375,
-0.006412506103515625,
-0.0153656005859375,
0.02008056640625,
0.0233306884765625,
-0.0252838134765625,
-0.018829345703125,
-0.0653076171875,
-0.0066375732421875,
-0.051055908203125,
0.05706787109375,
0.029022216796875,
0.01264190673828125,
0.0096282958984375,
-0.00518035888671875,
0.04327392578125,
-0.03656005859375,
-0.016021728515625,
0.035003662109375,
-0.046051025390625,
-0.025604248046875,
-0.00811004638671875,
-0.036956787109375,
0.07720947265625,
0.037841796875,
0.00411224365234375,
-0.01049041748046875,
0.004390716552734375,
0.0269775390625,
0.0274505615234375,
-0.0018815994262695312,
-0.01198577880859375,
0.0390625,
-0.02423095703125,
0.00829315185546875,
-0.005657196044921875,
0.0286102294921875,
-0.002803802490234375,
-0.032257080078125,
-0.0142364501953125,
0.0280303955078125,
-0.039215087890625,
0.040130615234375,
-0.0170440673828125,
-0.0167236328125,
0.0225830078125,
0.03460693359375,
-0.052001953125,
-0.011444091796875,
0.031341552734375,
-0.0159912109375,
-0.023284912109375,
-0.0003693103790283203,
-0.00235748291015625,
0.1107177734375,
-0.0311737060546875,
-0.0390625,
-0.0124664306640625,
0.07440185546875,
-0.007617950439453125,
0.0625,
-0.0069732666015625,
0.0159149169921875,
-0.020050048828125,
-0.00684356689453125,
-0.0032596588134765625,
0.01043701171875,
-0.0056610107421875,
0.004940032958984375,
-0.044677734375,
-0.00014412403106689453,
-0.04296875,
-0.0295562744140625,
-0.0609130859375,
-0.0352783203125,
-0.0266876220703125,
0.04888916015625,
0.01425933837890625,
-0.017791748046875,
0.00893402099609375,
0.0183563232421875,
0.0297698974609375,
-0.04473876953125,
-0.0194091796875,
0.034515380859375,
0.004795074462890625,
0.0167388916015625,
0.00722503662109375,
0.054595947265625,
-0.0274200439453125,
-0.0029163360595703125,
0.0251007080078125,
0.030914306640625,
-0.0120849609375,
0.0275421142578125,
-0.03387451171875,
0.03460693359375,
-0.03277587890625,
-0.00225830078125,
0.01416778564453125,
-0.0163421630859375,
-0.028106689453125,
0.0013875961303710938,
-0.00494384765625,
0.01342010498046875,
0.0181427001953125,
-0.0305633544921875,
0.036346435546875,
0.0247650146484375,
0.0570068359375,
0.04376220703125,
0.0411376953125,
0.01302337646484375,
0.033935546875,
0.0095367431640625,
0.05316162109375,
-0.038665771484375,
-0.0244903564453125,
0.005096435546875,
0.00861358642578125,
0.0124969482421875,
-0.00687408447265625,
0.01293182373046875,
-0.018341064453125,
-0.0025882720947265625,
-0.050811767578125,
-0.020416259765625,
0.0352783203125,
0.0269927978515625,
0.0024623870849609375,
0.01117706298828125,
-0.007450103759765625,
-0.04315185546875,
-0.040679931640625,
0.0184783935546875,
0.0104522705078125,
0.08489990234375,
-0.01314544677734375,
0.084716796875,
-0.04034423828125,
-0.041534423828125,
-0.0166778564453125,
0.0185546875,
0.01507568359375,
0.0142059326171875,
-0.031341552734375,
-0.0034160614013671875,
-0.007778167724609375,
0.02947998046875,
0.0278472900390625,
0.05731201171875,
0.016448974609375,
0.0285491943359375,
0.0361328125,
0.024505615234375,
0.06890869140625,
-0.0021915435791015625,
-0.00428009033203125,
-0.01727294921875,
-0.02215576171875,
-0.004924774169921875,
-0.0101165771484375,
0.01190948486328125,
-0.004283905029296875,
0.020294189453125,
-0.0433349609375,
0.0280609130859375,
-0.0189361572265625,
-0.03460693359375,
0.06707763671875,
0.0304412841796875,
0.07562255859375,
0.005237579345703125,
-0.0211944580078125,
-0.0006246566772460938,
-0.0010366439819335938,
-0.04132080078125,
0.01690673828125,
0.03472900390625,
-0.034393310546875,
0.045806884765625,
0.018951416015625,
0.0477294921875,
-0.0106048583984375,
-0.0197906494140625,
-0.01299285888671875,
-0.00476837158203125,
0.07415771484375,
0.019866943359375,
0.011871337890625,
-0.0007219314575195312,
0.014129638671875,
0.030548095703125,
0.0064697265625,
0.052093505859375,
-0.026519775390625,
0.019195556640625,
0.0294647216796875,
-0.03570556640625,
0.0333251953125,
0.0195770263671875,
-0.023193359375,
-0.0196990966796875,
-0.003265380859375,
-0.0046539306640625,
-0.044830322265625,
0.0281524658203125,
0.042877197265625,
-0.028839111328125,
0.0252532958984375,
0.046630859375,
0.01287078857421875,
-0.046722412109375,
0.035400390625,
-0.0272369384765625,
-0.0100860595703125,
-0.02789306640625,
-0.0223388671875,
0.022308349609375,
-0.007701873779296875,
-0.015045166015625,
0.023406982421875,
0.01824951171875,
-0.037841796875,
0.0162811279296875,
-0.0439453125,
0.03204345703125,
0.048248291015625,
0.0010166168212890625,
0.0108489990234375,
-0.01407623291015625,
-0.01270294189453125,
0.00080108642578125,
0.0120849609375,
-0.03265380859375,
-0.00894927978515625,
0.004058837890625,
0.006649017333984375,
0.031036376953125,
0.024139404296875,
-0.0301971435546875,
0.01526641845703125,
0.040679931640625,
-0.0180816650390625,
0.01438140869140625,
0.0018329620361328125,
-0.020782470703125,
-0.020172119140625,
-0.0095977783203125,
0.0169677734375,
-0.01244354248046875,
-0.0269775390625,
-0.073486328125,
0.020233154296875,
0.045166015625,
0.0012655258178710938,
-0.060089111328125,
0.006298065185546875,
-0.0243988037109375,
0.09039306640625,
-0.00855255126953125,
0.032501220703125,
-0.00691986083984375,
-0.0074615478515625,
-0.04156494140625,
-0.0200958251953125,
0.004413604736328125,
0.04827880859375,
0.01141357421875,
0.033416748046875,
0.050384521484375,
-0.0112762451171875,
0.007038116455078125,
0.031982421875,
0.0193328857421875,
0.08306884765625,
-0.08160400390625,
-0.03411865234375,
0.0151519775390625,
-0.00710296630859375,
-0.003086090087890625,
-0.0213470458984375,
-0.0149383544921875,
-0.0092620849609375,
-0.00759124755859375,
0.0264129638671875,
-0.03173828125,
-0.0149383544921875,
-0.032958984375,
-0.04296875,
0.08624267578125,
0.0214080810546875,
-0.024810791015625,
-0.054351806640625,
-0.01441192626953125,
-0.0063934326171875,
0.0230865478515625,
-0.045440673828125,
0.0177154541015625,
-0.0215911865234375,
0.050384521484375,
0.025482177734375,
0.03192138671875,
0.0284423828125,
0.01593017578125,
-0.004360198974609375,
0.0257720947265625,
0.00386810302734375,
0.001262664794921875,
0.02593994140625,
0.0037593841552734375,
0.060638427734375,
0.07830810546875,
-0.00531005859375,
0.0745849609375,
-0.004253387451171875,
-0.032257080078125,
-0.0135650634765625,
-0.04071044921875,
-0.0243377685546875,
-0.018585205078125,
0.0396728515625,
0.033935546875,
0.0085906982421875,
-0.03350830078125,
-0.0014390945434570312,
-0.02899169921875,
-0.03253173828125,
-0.0219879150390625,
0.0235137939453125,
-0.07012939453125,
-0.0024204254150390625,
0.0184173583984375,
0.02178955078125,
-0.026031494140625,
-0.01910400390625,
-0.00147247314453125,
-0.01270294189453125,
0.06573486328125,
0.0207672119140625,
0.0180511474609375,
-0.0032367706298828125,
0.06439208984375,
-0.044097900390625,
0.012420654296875,
0.00933837890625,
0.003795623779296875,
0.05279541015625,
0.02764892578125,
0.0053863525390625,
0.0206451416015625,
-0.049530029296875,
0.007511138916015625,
-0.00670623779296875,
0.0199432373046875,
-0.048919677734375,
-0.0019016265869140625,
-0.036865234375,
0.021240234375,
0.0328369140625,
0.02960205078125,
-0.03411865234375,
0.010162353515625,
0.0305938720703125,
0.0023174285888671875,
-0.040802001953125,
0.047119140625,
-0.03826904296875,
0.033660888671875,
0.003887176513671875,
0.014251708984375,
0.053955078125,
0.008087158203125,
0.01174163818359375,
-0.00713348388671875,
-0.014984130859375,
-0.050994873046875,
0.04833984375,
0.035614013671875,
-0.00499725341796875,
0.034515380859375
] |
074c3673e4cb4214b0dc872979c60c8f6957fb1b | Wordpress Stackexchange
Q: Multiple email recipient using wp_mail() I want to define multiple recipients email address outside the array. like
$adminmail = get_option(admin_email);
$adminmail2 = like an email address;
$multiple_recipients = array($adminmail,$adminmail2);
$subj = 'The email subject';
$body = 'This is the body of the email';
wp_mail( $multiple_recipients, $subj, $body );
Is this possible ?
A: Yes it's possible, $to accepts an array or comma-separated list of email addresses to send message.
You can read more here, about optional headers parameter that can add from, cc, content-type, fields.
If you want to send automaticaly WordPress admin notifications, you can have a look to this.
| Q: Multiple email recipient using wp_mail() I want to define multiple recipients email address outside the array. like
$adminmail = get_option(admin_email);
$adminmail2 = like an email address;
$multiple_recipients = array($adminmail,$adminmail2);
$subj = 'The email subject';
$body = 'This is the body of the email';
wp_mail( $multiple_recipients, $subj, $body );
Is this possible ?
A: Yes it's possible, $to accepts an array or comma-separated list of email addresses to send message.
You can read more here, about optional headers parameter that can add from, cc, content-type, fields.
If you want to send automaticaly WordPress admin notifications, you can have a look to this.
| wordpress | {
"language": "en",
"length": 102,
"provenance": "stackexchange_00019.jsonl.gz:470891",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/248477"
} | [
0.0305633544921875,
-0.03082275390625,
0.0089569091796875,
-0.057708740234375,
-0.012115478515625,
-0.00775146484375,
0.008087158203125,
-0.003192901611328125,
-0.01611328125,
0.0298004150390625,
0.053466796875,
-0.002166748046875,
-0.00844573974609375,
-0.045166015625,
-0.00966644287109375,
-0.0069732666015625,
0.00909423828125,
0.0016069412231445312,
-0.021575927734375,
-0.0169525146484375,
0.031524658203125,
0.0010938644409179688,
-0.075439453125,
0.06610107421875,
-0.045928955078125,
0.04791259765625,
0.0338134765625,
-0.0350341796875,
-0.043365478515625,
-0.026153564453125,
-0.0189056396484375,
0.034423828125,
0.04205322265625,
0.0164031982421875,
-0.048126220703125,
-0.01248931884765625,
-0.01059722900390625,
-0.006870269775390625,
-0.00203704833984375,
0.01392364501953125,
0.0012922286987304688,
-0.0082244873046875,
0.071533203125,
0.0025577545166015625,
0.0157318115234375,
-0.0026493072509765625,
-0.0015096664428710938,
-0.0660400390625,
0.04620361328125,
-0.0194854736328125,
-0.00652313232421875,
-0.00189208984375,
0.007175445556640625,
-0.00472259521484375,
-0.0301055908203125,
-0.00847625732421875,
0.0038356781005859375,
-0.0001533031463623047,
0.037078857421875,
-0.021087646484375,
-0.055816650390625,
0.0004649162292480469,
0.02642822265625,
-0.02587890625,
-0.0080108642578125,
0.01435089111328125,
-0.009918212890625,
0.01055145263671875,
-0.033782958984375,
-0.022857666015625,
0.005558013916015625,
-0.037017822265625,
-0.0098876953125,
-0.028228759765625,
-0.009185791015625,
0.0040740966796875,
-0.00328826904296875,
-0.006427764892578125,
0.007114410400390625,
0.00004798173904418945,
0.00453948974609375,
-0.0212860107421875,
-0.060028076171875,
0.037139892578125,
-0.016998291015625,
0.052276611328125,
-0.005977630615234375,
-0.0222625732421875,
-0.0276031494140625,
-0.01471710205078125,
-0.03118896484375,
-0.04986572265625,
0.019500732421875,
-0.0035552978515625,
-0.039794921875,
-0.01593017578125,
0.0254974365234375,
0.0281219482421875,
-0.0187835693359375,
-0.0323486328125,
-0.023956298828125,
-0.0029201507568359375,
-0.04779052734375,
0.001132965087890625,
-0.0198974609375,
0.029083251953125,
0.0189666748046875,
0.042633056640625,
0.0186920166015625,
0.03045654296875,
-0.0151519775390625,
0.0159912109375,
0.0374755859375,
-0.00556182861328125,
0.00516510009765625,
-0.04437255859375,
-0.036834716796875,
0.04522705078125,
-0.00201416015625,
-0.03009033203125,
0.006511688232421875,
0.04266357421875,
0.032470703125,
-0.039337158203125,
-0.004444122314453125,
0.0016832351684570312,
-0.0020771026611328125,
-0.08087158203125,
0.022918701171875,
-0.015289306640625,
-0.0257110595703125,
0.0258636474609375,
0.057830810546875,
0.0269927978515625,
0.0250701904296875,
0.0119781494140625,
-0.01010894775390625,
0.052825927734375,
-0.0012979507446289062,
-0.0149688720703125,
0.044708251953125,
-0.034698486328125,
-0.0355224609375,
0.031341552734375,
-0.006900787353515625,
0.0267791748046875,
0.016876220703125,
-0.0033473968505859375,
0.0023975372314453125,
-0.0146331787109375,
-0.04156494140625,
-0.0164947509765625,
-0.024871826171875,
0.042449951171875,
-0.006649017333984375,
0.0489501953125,
-0.021331787109375,
0.0193939208984375,
-0.00469970703125,
0.01995849609375,
0.006168365478515625,
-0.0289459228515625,
0.0222320556640625,
-0.039154052734375,
-0.053466796875,
0.050445556640625,
-0.08197021484375,
-0.0275115966796875,
0.0257415771484375,
-0.0738525390625,
0.014434814453125,
0.01520538330078125,
0.0615234375,
-0.0004360675811767578,
0.01268768310546875,
0.027130126953125,
0.00004839897155761719,
-0.0206146240234375,
0.017120361328125,
-0.007137298583984375,
-0.03729248046875,
-0.038726806640625,
-0.019195556640625,
0.00203704833984375,
-0.04254150390625,
0.024810791015625,
0.01134490966796875,
0.0810546875,
0.0156097412109375,
0.0310821533203125,
-0.001514434814453125,
0.0007915496826171875,
0.027191162109375,
-0.0141143798828125,
-0.052398681640625,
-0.025299072265625,
-0.024261474609375,
0.0193939208984375,
-0.045379638671875,
0.0284423828125,
0.0135955810546875,
-0.03521728515625,
0.040435791015625,
0.01120758056640625,
0.005687713623046875,
0.0011434555053710938,
-0.01505279541015625,
-0.00036215782165527344,
-0.00455474853515625,
0.003993988037109375,
0.001129150390625,
-0.01390838623046875,
0.01296234130859375,
-0.06317138671875,
-0.04962158203125,
-0.01995849609375,
-0.0143280029296875,
0.037689208984375,
-0.030029296875,
0.0543212890625,
-0.045318603515625,
-0.061492919921875,
-0.0263214111328125,
0.01837158203125,
0.042327880859375,
-0.0158233642578125,
-0.01480865478515625,
-0.0278167724609375,
0.00988006591796875,
-0.004180908203125,
-0.04559326171875,
0.059783935546875,
0.01715087890625,
0.022064208984375,
-0.0222015380859375,
-0.0013151168823242188,
0.023956298828125,
-0.019317626953125,
0.0026683807373046875,
0.029632568359375,
0.0482177734375,
0.0269622802734375,
0.01293182373046875,
0.0154876708984375,
0.08349609375,
-0.0295257568359375,
0.00362396240234375,
-0.003604888916015625,
-0.022796630859375,
0.00823974609375,
-0.036529541015625,
0.0094451904296875,
0.0277557373046875,
-0.0889892578125,
0.0031757354736328125,
0.05535888671875,
0.035614013671875,
-0.01371002197265625,
-0.015960693359375,
0.034149169921875,
0.0096588134765625,
0.00403594970703125,
-0.05322265625,
0.0255584716796875,
-0.0101318359375,
-0.0206756591796875,
0.0187530517578125,
-0.007457733154296875,
0.01560211181640625,
-0.041900634765625,
0.0084075927734375,
-0.025848388671875,
0.001178741455078125,
0.004638671875,
-0.0174102783203125,
0.03863525390625,
-0.005863189697265625,
-0.00884246826171875,
0.00777435302734375,
-0.0033016204833984375,
-0.0433349609375,
0.013397216796875,
-0.0121612548828125,
-0.0304107666015625,
-0.001987457275390625,
0.005207061767578125,
-0.0021915435791015625,
-0.054412841796875,
0.006366729736328125,
-0.019256591796875,
0.0112762451171875,
0.045196533203125,
-0.0251312255859375,
0.059478759765625,
-0.006916046142578125,
-0.0235443115234375,
-0.05633544921875,
-0.01090240478515625,
0.0200042724609375,
-0.036712646484375,
0.004962921142578125,
0.05181884765625,
-0.002620697021484375,
-0.007236480712890625,
-0.0225372314453125,
0.006866455078125,
-0.0194091796875,
0.00522613525390625,
-0.01555633544921875,
-0.07379150390625,
0.0305938720703125,
0.01433563232421875,
0.006175994873046875,
0.048980712890625,
-0.0229644775390625,
-0.05859375,
-0.01160430908203125,
0.0100555419921875,
-0.05633544921875,
-0.03582763671875,
0.051422119140625,
-0.0229339599609375,
-0.0127410888671875,
-0.01218414306640625,
-0.018951416015625,
-0.023040771484375,
0.004016876220703125,
-0.01210784912109375,
0.0033397674560546875,
-0.0208587646484375,
-0.0277862548828125,
-0.0158538818359375,
-0.0543212890625,
0.007762908935546875,
0.002483367919921875,
0.0134124755859375,
-0.00244140625,
0.0416259765625,
-0.01453399658203125,
-0.045562744140625,
-0.0260467529296875,
0.0198516845703125,
0.003505706787109375,
-0.0192413330078125,
-0.0281524658203125,
-0.0141448974609375,
-0.0102081298828125,
-0.0023441314697265625,
-0.0016603469848632812,
-0.0028858184814453125,
0.01212310791015625,
-0.00705718994140625,
-0.0031375885009765625,
0.02130126953125,
0.036834716796875,
-0.0592041015625,
-0.0203094482421875,
0.03948974609375,
-0.01116943359375,
-0.0252227783203125,
0.033935546875,
0.00853729248046875,
-0.0017328262329101562,
-0.046600341796875,
0.00942230224609375,
-0.035369873046875,
-0.0025177001953125,
-0.031097412109375,
0.0158538818359375,
-0.0162353515625,
-0.0221710205078125,
-0.0276336669921875,
0.031524658203125,
0.01308441162109375,
0.0276031494140625,
0.004131317138671875,
-0.017364501953125,
-0.0151214599609375,
0.0111541748046875,
-0.0171966552734375,
0.03448486328125,
-0.006114959716796875,
0.048858642578125,
-0.020111083984375,
-0.09197998046875,
0.0811767578125,
-0.0151214599609375,
-0.0143890380859375,
-0.051177978515625,
-0.041351318359375,
-0.00507354736328125,
0.10888671875,
0.01751708984375,
-0.032379150390625,
-0.00920867919921875,
0.0202484130859375,
-0.035247802734375,
-0.045318603515625,
0.01300048828125,
-0.01508331298828125,
0.00910186767578125,
0.0023040771484375,
-0.031707763671875,
0.0226593017578125,
-0.02032470703125,
0.01084136962890625,
0.03863525390625,
-0.040283203125,
0.016693115234375,
-0.020355224609375,
0.01520538330078125,
0.01168060302734375,
0.0126953125,
-0.0179443359375,
0.00653839111328125,
-0.0306549072265625,
-0.0262603759765625,
-0.009368896484375,
0.002361297607421875,
0.0244598388671875,
-0.015716552734375,
0.0357666015625,
-0.0062255859375,
0.03326416015625,
-0.01506805419921875,
0.0244293212890625,
-0.01085662841796875,
0.01727294921875,
0.01323699951171875,
0.0222320556640625,
0.0139617919921875,
0.0105438232421875,
-0.0036220550537109375,
-0.01873779296875,
-0.03485107421875,
0.01551055908203125,
-0.044403076171875,
0.011474609375,
-0.01413726806640625,
-0.0187225341796875,
0.0037841796875,
-0.00885772705078125,
-0.043670654296875,
0.0096588134765625,
-0.0308990478515625,
0.0029296875,
-0.01335906982421875,
-0.0253448486328125,
0.0167999267578125,
0.01458740234375,
-0.0209808349609375,
0.021881103515625,
0.02569580078125,
0.01263427734375,
-0.0192413330078125,
-0.11578369140625,
-0.0075225830078125,
0.0625,
0.0091094970703125,
-0.0242767333984375,
0.0204925537109375,
-0.040130615234375,
0.01300048828125,
0.0396728515625,
0.00431060791015625,
0.00930023193359375,
0.03411865234375,
0.017181396484375,
-0.01416778564453125,
0.007320404052734375,
-0.01287078857421875,
-0.01396942138671875,
0.0248870849609375,
0.01042938232421875,
-0.03125,
-0.0252532958984375,
0.044952392578125,
0.001667022705078125,
0.003261566162109375,
-0.0562744140625,
-0.0654296875,
0.02459716796875,
-0.057342529296875,
0.01023101806640625,
0.0160675048828125,
-0.0095367431640625,
0.0116424560546875,
-0.006832122802734375,
0.017730712890625,
-0.01666259765625,
0.006084442138671875,
-0.0048828125,
0.028533935546875,
0.018463134765625,
0.012664794921875,
-0.02557373046875,
0.0065155029296875,
-0.0006418228149414062,
0.019989013671875,
-0.00255584716796875,
-0.04083251953125,
0.01232147216796875,
-0.01427459716796875,
-0.0112152099609375,
-0.04541015625,
0.04949951171875,
0.059326171875,
-0.00708770751953125,
0.0081024169921875,
-0.03631591796875,
0.0011625289916992188,
-0.0440673828125,
-0.007663726806640625,
0.01435089111328125,
-0.0078125,
0.00936126708984375,
0.09222412109375,
-0.00856781005859375,
0.045989990234375,
-0.02227783203125,
0.05718994140625,
0.078369140625,
0.0036468505859375,
0.00830078125,
0.017547607421875,
-0.007015228271484375,
-0.0196685791015625,
-0.0083160400390625,
-0.027923583984375,
-0.005184173583984375,
0.0157318115234375,
0.029083251953125,
0.0526123046875,
0.026092529296875,
-0.0278167724609375,
-0.013458251953125,
-0.0341796875,
0.0210418701171875,
-0.005401611328125,
-0.0416259765625,
-0.01102447509765625,
-0.006565093994140625,
0.003833770751953125,
-0.0009870529174804688,
-0.0150604248046875,
-0.0076446533203125,
-0.020233154296875,
0.00789642333984375,
-0.0281524658203125,
-0.01415252685546875,
-0.002895355224609375,
0.004505157470703125,
0.0090484619140625,
0.0257568359375,
-0.0028285980224609375,
-0.0799560546875,
-0.06756591796875,
-0.0024089813232421875,
0.0128631591796875,
0.06787109375,
-0.0347900390625,
0.00475311279296875,
-0.002681732177734375,
0.0028839111328125,
-0.0548095703125,
0.024139404296875,
0.001239776611328125,
0.015899658203125,
-0.042694091796875,
0.0001761913299560547,
-0.056671142578125,
-0.00809478759765625,
-0.0469970703125,
-0.031005859375,
-0.02630615234375,
0.01189422607421875,
0.0278778076171875,
0.0242767333984375,
0.01529693603515625,
-0.0262451171875,
-0.024322509765625,
-0.02655029296875,
0.0165557861328125,
0.0061798095703125,
-0.0014505386352539062,
0.039215087890625,
-0.029388427734375,
0.035797119140625,
-0.00913238525390625,
-0.006603240966796875,
-0.02447509765625,
-0.005420684814453125,
-0.00946044921875,
-0.04681396484375,
-0.01387786865234375,
0.013916015625,
-0.00811767578125,
0.005558013916015625,
0.019989013671875,
-0.004764556884765625,
0.00476837158203125,
-0.037994384765625,
-0.0021514892578125,
-0.033843994140625,
0.03558349609375,
-0.05731201171875,
-0.020721435546875,
-0.011749267578125,
-0.0037784576416015625,
0.03216552734375,
-0.032318115234375,
-0.029327392578125,
0.02117919921875,
-0.0012416839599609375,
0.0174713134765625,
0.0221405029296875,
-0.003200531005859375,
0.0166015625,
0.03607177734375,
0.00746917724609375,
0.040191650390625,
0.00792694091796875,
0.0255126953125,
0.0269622802734375,
0.01209259033203125,
0.0266265869140625,
-0.0309906005859375,
0.022796630859375,
-0.01141357421875,
0.020416259765625,
0.0157318115234375,
-0.010406494140625,
0.00006133317947387695,
0.038665771484375,
0.061614990234375,
-0.0523681640625,
0.005512237548828125,
0.0040283203125,
-0.00511932373046875,
0.00695037841796875,
-0.0031909942626953125,
-0.02203369140625,
-0.05853271484375,
0.058074951171875,
0.022552490234375,
-0.006061553955078125,
0.0218048095703125,
-0.002124786376953125,
-0.0250701904296875,
-0.020233154296875,
0.0124664306640625,
0.0242156982421875,
0.013214111328125,
0.0229339599609375,
-0.0106201171875,
0.0213623046875,
-0.0163421630859375,
-0.0097503662109375,
0.01971435546875,
-0.04669189453125,
-0.06268310546875,
-0.014434814453125,
-0.008148193359375,
-0.00856781005859375,
-0.08392333984375,
0.0204925537109375,
0.022125244140625,
0.034149169921875,
0.004852294921875,
-0.053619384765625,
0.040557861328125,
-0.0229949951171875,
-0.026885986328125,
-0.03497314453125,
0.01313018798828125,
0.038330078125,
-0.0615234375,
0.036163330078125,
-0.01800537109375,
-0.01078033447265625,
0.00592041015625,
0.03887939453125,
0.007049560546875,
0.06463623046875,
-0.06756591796875,
0.05035400390625,
-0.003932952880859375,
-0.034088134765625,
0.033966064453125,
0.0219879150390625,
-0.03973388671875,
-0.0562744140625,
0.01186370849609375,
-0.0809326171875,
0.00982666015625,
0.01473236083984375,
-0.07275390625,
0.10028076171875,
0.007534027099609375,
0.0411376953125,
0.01270294189453125,
0.020355224609375,
-0.0263519287109375,
-0.001529693603515625,
-0.027801513671875,
0.0299530029296875,
0.018768310546875,
0.00565338134765625,
-0.037078857421875,
-0.00431060791015625,
-0.016143798828125,
0.0219879150390625,
0.0340576171875,
0.0142059326171875,
0.02996826171875,
0.0200347900390625,
0.047576904296875,
0.01091766357421875,
-0.0338134765625,
0.005664825439453125,
0.005573272705078125,
-0.0118865966796875,
0.044097900390625,
0.01568603515625,
0.0408935546875,
-0.0081787109375,
-0.006443023681640625,
0.02239990234375,
-0.00952911376953125,
-0.003932952880859375,
0.00846099853515625,
0.01427459716796875,
-0.010284423828125,
-0.01531219482421875,
0.00965118408203125,
-0.0882568359375,
0.0176849365234375,
-0.00759124755859375,
-0.012664794921875,
0.005584716796875,
0.098876953125,
-0.041259765625,
0.04541015625,
-0.00940704345703125,
0.018768310546875,
0.03582763671875,
0.0096435546875,
0.0657958984375,
0.0233154296875,
0.00836944580078125,
0.0223388671875,
0.01131439208984375,
0.01189422607421875,
-0.036285400390625,
-0.0008177757263183594,
-0.109375,
-0.03094482421875,
0.020172119140625,
0.0322265625,
-0.023040771484375,
-0.0027923583984375,
0.0162811279296875,
0.0241851806640625,
0.02545166015625,
-0.02813720703125,
0.027984619140625,
-0.02130126953125,
-0.00160980224609375,
-0.020477294921875,
-0.01120758056640625,
0.019866943359375,
0.04278564453125,
-0.0008254051208496094,
-0.017578125,
-0.02398681640625,
-0.03057861328125,
-0.047088623046875,
0.0219573974609375,
0.0369873046875,
0.04180908203125,
-0.002872467041015625,
0.0474853515625,
0.01153564453125,
-0.01490020751953125,
-0.007076263427734375,
0.004123687744140625,
0.024322509765625,
-0.031494140625,
0.03546142578125,
0.01331329345703125,
0.00606536865234375,
-0.00424957275390625,
-0.005237579345703125,
0.021209716796875,
0.046966552734375,
0.050811767578125,
-0.02789306640625,
-0.0244598388671875,
0.0014438629150390625,
-0.029266357421875,
0.034423828125,
-0.034515380859375,
-0.036224365234375,
-0.031097412109375,
-0.0418701171875,
-0.002674102783203125,
-0.024322509765625,
0.025787353515625,
0.019256591796875,
-0.030670166015625,
0.0195465087890625,
-0.0125885009765625,
0.006587982177734375,
0.00402069091796875,
-0.0197601318359375,
0.02764892578125,
-0.1241455078125,
-0.04742431640625,
0.01401519775390625,
-0.0109710693359375,
0.0506591796875,
0.059600830078125,
-0.025604248046875,
0.0008654594421386719,
-0.0003478527069091797,
0.01314544677734375,
-0.00400543212890625,
-0.006771087646484375,
-0.01334381103515625,
-0.05487060546875,
0.0292205810546875,
-0.0310211181640625,
-0.078857421875,
-0.030731201171875,
-0.0276947021484375,
0.01132965087890625,
0.016021728515625,
0.0357666015625,
0.024505615234375,
0.0246429443359375,
-0.0284576416015625,
0.041778564453125,
-0.060943603515625,
-0.04266357421875,
0.032684326171875,
-0.0281829833984375,
-0.0093231201171875,
0.0213165283203125,
-0.0031108856201171875,
0.0162811279296875,
0.032318115234375,
-0.06500244140625,
0.01103973388671875,
-0.00836181640625,
0.00016486644744873047,
-0.028656005859375,
0.06854248046875,
-0.0193634033203125,
-0.0521240234375,
-0.08367919921875,
-0.007434844970703125,
0.039459228515625,
0.06134033203125,
-0.0135955810546875,
-0.0225067138671875,
0.00463104248046875,
-0.046661376953125,
0.01410675048828125,
-0.00905609130859375,
-0.00431060791015625,
0.0206756591796875,
0.0101318359375,
-0.06256103515625,
-0.0178985595703125,
-0.014404296875,
-0.003925323486328125,
-0.003936767578125,
0.061676025390625,
-0.007015228271484375,
0.053680419921875,
-0.0154876708984375,
0.038360595703125,
0.0304107666015625,
-0.02130126953125,
0.00405120849609375,
0.0185546875,
-0.0243682861328125,
0.0032596588134765625,
-0.0273590087890625,
-0.027435302734375,
-0.0621337890625,
0.0221710205078125,
0.0303802490234375,
-0.005710601806640625,
0.0111083984375,
-0.03155517578125,
0.0227508544921875,
0.031707763671875,
-0.0267486572265625,
0.0101165771484375,
-0.022003173828125,
-0.0291290283203125,
0.0489501953125,
-0.003772735595703125,
-0.0086212158203125,
0.0009756088256835938,
0.0111541748046875,
-0.03692626953125,
-0.06884765625,
-0.044647216796875,
0.0626220703125,
-0.057403564453125,
-0.003925323486328125,
0.0175933837890625,
-0.006198883056640625,
-0.01873779296875,
0.0042877197265625,
0.0014352798461914062,
0.0533447265625,
0.007488250732421875,
-0.004199981689453125,
0.0204620361328125,
0.01094818115234375,
-0.038818359375,
-0.086181640625,
-0.00506591796875,
-0.061004638671875,
0.00563812255859375,
0.029541015625,
-0.0026111602783203125,
0.0274505615234375,
-0.041839599609375,
-0.1065673828125,
0.061553955078125,
-0.0252685546875,
-0.03790283203125,
-0.06768798828125,
-0.00421142578125,
-0.003814697265625,
0.00423431396484375,
-0.027557373046875,
-0.00039887428283691406,
-0.035247802734375,
0.0445556640625,
-0.00437164306640625,
0.004467010498046875,
0.043243408203125,
0.008575439453125,
-0.00969696044921875,
0.0025348663330078125,
-0.00913238525390625,
-0.039886474609375,
0.00475311279296875,
-0.006267547607421875,
0.050628662109375,
0.06024169921875,
0.01499176025390625,
0.0005517005920410156,
0.0227508544921875,
-0.089111328125,
-0.0281982421875,
-0.0307159423828125,
-0.0241241455078125,
-0.0020923614501953125,
0.088623046875,
0.08184814453125,
0.0270843505859375,
-0.0435791015625,
0.0207672119140625,
-0.0259552001953125,
-0.006587982177734375,
-0.019287109375,
-0.004566192626953125,
-0.0159149169921875,
-0.01085662841796875,
-0.0213470458984375,
-0.003627777099609375,
-0.01132965087890625,
-0.0202789306640625,
-0.02313232421875,
-0.007572174072265625,
0.00786590576171875,
0.00750732421875,
-0.01020050048828125,
0.0138702392578125,
0.031829833984375,
-0.0308380126953125,
-0.0256195068359375,
0.012603759765625,
-0.00725555419921875,
-0.01029205322265625,
0.01409912109375,
0.009765625,
-0.046112060546875,
-0.03216552734375,
0.019500732421875,
-0.0145111083984375,
0.057586669921875,
-0.047332763671875,
-0.048004150390625,
-0.032684326171875,
0.025787353515625,
-0.01198577880859375,
0.011932373046875,
-0.002899169921875,
0.06390380859375,
0.0241546630859375,
0.078369140625,
-0.012664794921875,
-0.0097503662109375,
-0.037078857421875,
0.055267333984375,
0.01287841796875,
-0.0254974365234375,
0.025543212890625,
-0.0209808349609375,
0.00695037841796875,
0.036834716796875,
0.0258636474609375,
-0.0258331298828125,
0.00969696044921875,
0.033050537109375,
0.047119140625,
0.01302337646484375
] |
5ef5789ce7e67ec72d399d6266dee3c5aebc8a27 | Wordpress Stackexchange
Q: Looking for a way to load a function after customizer preview refresh complete I need to load a callback function after a wp.customize.previewer.refresh(). I need this because I want to update a template position which is displayed with a custom hook in my theme and scroll the preview frame on the new template position.
I use wp.customize.previewer.bind('synced', ...) but every time I change the position on my control, this bind event calls itself as many times as I change the position. So after the first position update on my control, the bind event calls itself once, but the second update calls the bind event twice and so on...
For your information I use WordPress 4.7.
A: If you want to bind the callback from the customizer panel you can use:
wp.customizer.bind( 'preview-ready', callbackFn );
otherwise if you need to bind it from preview itself you can use:
wp.customize.previewer.bind('ready', callbackFn);
| Q: Looking for a way to load a function after customizer preview refresh complete I need to load a callback function after a wp.customize.previewer.refresh(). I need this because I want to update a template position which is displayed with a custom hook in my theme and scroll the preview frame on the new template position.
I use wp.customize.previewer.bind('synced', ...) but every time I change the position on my control, this bind event calls itself as many times as I change the position. So after the first position update on my control, the bind event calls itself once, but the second update calls the bind event twice and so on...
For your information I use WordPress 4.7.
A: If you want to bind the callback from the customizer panel you can use:
wp.customizer.bind( 'preview-ready', callbackFn );
otherwise if you need to bind it from preview itself you can use:
wp.customize.previewer.bind('ready', callbackFn);
| wordpress | {
"language": "en",
"length": 150,
"provenance": "stackexchange_00019.jsonl.gz:470996",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/248831"
} | [
0.048492431640625,
0.018035888671875,
0.00476837158203125,
-0.10107421875,
0.01514434814453125,
0.004367828369140625,
-0.045074462890625,
-0.02294921875,
-0.01152801513671875,
0.0272369384765625,
-0.0214080810546875,
0.0413818359375,
-0.0233001708984375,
0.003551483154296875,
-0.0202789306640625,
-0.0282135009765625,
0.0567626953125,
-0.0362548828125,
0.0460205078125,
-0.005420684814453125,
-0.00713348388671875,
0.03680419921875,
0.059112548828125,
0.09307861328125,
0.0131683349609375,
0.01153564453125,
0.044921875,
-0.0011453628540039062,
-0.01155853271484375,
-0.015472412109375,
0.016143798828125,
0.004810333251953125,
0.0218963623046875,
0.055389404296875,
-0.08367919921875,
0.0084075927734375,
0.022918701171875,
0.0033206939697265625,
-0.017059326171875,
0.07403564453125,
0.01309967041015625,
0.0022373199462890625,
-0.0631103515625,
0.058746337890625,
-0.05279541015625,
-0.064453125,
0.043121337890625,
-0.0198516845703125,
-0.006290435791015625,
0.049102783203125,
0.0316162109375,
-0.01885986328125,
0.029144287109375,
0.03289794921875,
0.00565338134765625,
0.0010175704956054688,
-0.055908203125,
0.08050537109375,
-0.00665283203125,
0.0804443359375,
0.032012939453125,
0.0728759765625,
-0.046417236328125,
-0.042572021484375,
-0.00009548664093017578,
0.021026611328125,
-0.038848876953125,
0.009307861328125,
0.0016727447509765625,
-0.010711669921875,
-0.01219940185546875,
-0.04229736328125,
-0.0190582275390625,
0.01099395751953125,
-0.0275421142578125,
-0.004669189453125,
0.0245819091796875,
-0.0059661865234375,
0.00615692138671875,
0.01197052001953125,
0.050933837890625,
-0.038421630859375,
0.03131103515625,
0.0054168701171875,
0.0022487640380859375,
0.01910400390625,
0.00311279296875,
-0.01739501953125,
-0.01087188720703125,
-0.024566650390625,
-0.0240325927734375,
-0.01177978515625,
0.0216064453125,
0.005741119384765625,
-0.041839599609375,
0.0015592575073242188,
-0.0294342041015625,
0.0200347900390625,
-0.005428314208984375,
0.01519775390625,
0.027374267578125,
-0.033966064453125,
0.02728271484375,
-0.04443359375,
-0.0222930908203125,
0.03466796875,
0.033935546875,
0.01800537109375,
0.0008554458618164062,
0.01181793212890625,
-0.0190277099609375,
-0.020843505859375,
0.031890869140625,
0.01532745361328125,
-0.0238037109375,
-0.051116943359375,
-0.0285797119140625,
0.004383087158203125,
-0.023284912109375,
-0.043914794921875,
0.0026264190673828125,
0.0030975341796875,
-0.010101318359375,
0.0249786376953125,
-0.001750946044921875,
-0.007404327392578125,
-0.00908660888671875,
-0.00798797607421875,
-0.025665283203125,
0.004024505615234375,
-0.02264404296875,
0.005908966064453125,
0.0567626953125,
0.075439453125,
0.0285186767578125,
-0.0193023681640625,
0.048187255859375,
0.041259765625,
0.0215301513671875,
-0.00615692138671875,
-0.011077880859375,
-0.04095458984375,
-0.0341796875,
0.0045013427734375,
0.034393310546875,
0.0194091796875,
0.00489044189453125,
-0.0005350112915039062,
0.023590087890625,
-0.005420684814453125,
0.0114593505859375,
-0.0174407958984375,
0.01401519775390625,
0.034637451171875,
0.01024627685546875,
-0.00991058349609375,
0.037506103515625,
-0.0276031494140625,
0.0077667236328125,
-0.0260467529296875,
0.0234832763671875,
-0.0164794921875,
-0.0684814453125,
-0.045562744140625,
-0.06396484375,
0.006938934326171875,
0.00589752197265625,
0.01666259765625,
0.0259552001953125,
0.08197021484375,
-0.0015325546264648438,
0.0028133392333984375,
-0.01508331298828125,
0.038177490234375,
0.00804901123046875,
-0.0030956268310546875,
0.043731689453125,
0.0177764892578125,
-0.0012197494506835938,
0.00370025634765625,
-0.025482177734375,
-0.037139892578125,
0.06268310546875,
-0.06329345703125,
-0.0302734375,
0.02166748046875,
0.00965118408203125,
0.08026123046875,
0.0240631103515625,
0.0269012451171875,
-0.0197601318359375,
-0.00368499755859375,
-0.0380859375,
-0.02862548828125,
-0.01019287109375,
0.01812744140625,
-0.03448486328125,
0.00982666015625,
-0.02203369140625,
0.0246429443359375,
-0.00841522216796875,
0.0270843505859375,
-0.0081787109375,
-0.0124053955078125,
-0.06427001953125,
0.0207061767578125,
-0.03466796875,
0.06451416015625,
0.049224853515625,
0.0281982421875,
-0.00543212890625,
0.006122589111328125,
-0.024261474609375,
0.0299835205078125,
-0.0224456787109375,
0.00675201416015625,
-0.0037994384765625,
0.0693359375,
0.004459381103515625,
0.048248291015625,
-0.004871368408203125,
-0.0096435546875,
-0.0207366943359375,
0.006008148193359375,
0.00649261474609375,
0.00948333740234375,
-0.031951904296875,
-0.0174713134765625,
-0.00704193115234375,
-0.00458526611328125,
0.0138702392578125,
0.049591064453125,
0.0206451416015625,
0.0006880760192871094,
-0.011444091796875,
0.0151519775390625,
0.01904296875,
-0.0677490234375,
-0.010101318359375,
0.0404052734375,
0.0029468536376953125,
-0.006069183349609375,
0.00949859619140625,
0.080322265625,
0.016448974609375,
0.02294921875,
0.0287933349609375,
0.0218048095703125,
0.04095458984375,
0.053924560546875,
0.0048065185546875,
-0.027435302734375,
-0.0007109642028808594,
-0.046051025390625,
0.0386962890625,
0.0166778564453125,
-0.00923919677734375,
0.006244659423828125,
-0.00476837158203125,
0.0277862548828125,
-0.01166534423828125,
0.0176849365234375,
0.0182952880859375,
-0.0035076141357421875,
0.012237548828125,
-0.0118865966796875,
0.01271820068359375,
-0.0001569986343383789,
-0.00554656982421875,
-0.00860595703125,
0.0318603515625,
-0.0186004638671875,
0.005462646484375,
0.0038394927978515625,
-0.0029754638671875,
-0.017608642578125,
0.005523681640625,
0.0018129348754882812,
-0.0246429443359375,
-0.01132965087890625,
0.004741668701171875,
0.0518798828125,
-0.0809326171875,
-0.0249481201171875,
-0.011138916015625,
-0.036224365234375,
-0.041595458984375,
0.005252838134765625,
0.04833984375,
0.0151519775390625,
0.03216552734375,
0.03045654296875,
-0.01171875,
0.057952880859375,
-0.0005369186401367188,
-0.0279388427734375,
-0.0201568603515625,
-0.00920867919921875,
0.007465362548828125,
-0.0142822265625,
0.01212310791015625,
0.06207275390625,
0.01468658447265625,
0.00554656982421875,
-0.0007176399230957031,
0.0234527587890625,
0.04339599609375,
-0.0120697021484375,
-0.0036067962646484375,
-0.01210784912109375,
-0.0287628173828125,
-0.01451873779296875,
0.0390625,
0.11053466796875,
-0.046966552734375,
-0.04486083984375,
-0.0216217041015625,
0.0401611328125,
-0.0278778076171875,
-0.056732177734375,
0.025177001953125,
-0.0540771484375,
-0.0023517608642578125,
-0.0259246826171875,
-0.0267181396484375,
-0.0086517333984375,
-0.0264129638671875,
0.00372314453125,
-0.0015811920166015625,
-0.0270843505859375,
-0.042999267578125,
-0.070556640625,
-0.06060791015625,
-0.035614013671875,
-0.004276275634765625,
-0.014984130859375,
-0.0079345703125,
0.05224609375,
-0.0117034912109375,
-0.03704833984375,
-0.0130767822265625,
0.0226593017578125,
-0.00937652587890625,
-0.0204315185546875,
0.0036754608154296875,
-0.0125732421875,
0.059326171875,
-0.017333984375,
0.000050902366638183594,
0.0465087890625,
-0.01971435546875,
-0.0236663818359375,
-0.00652313232421875,
-0.0097198486328125,
-0.0249786376953125,
0.10858154296875,
0.03851318359375,
-0.0176849365234375,
0.028656005859375,
-0.05621337890625,
0.00978851318359375,
-0.01470947265625,
-0.03240966796875,
-0.020965576171875,
0.0615234375,
-0.040863037109375,
-0.053131103515625,
-0.02569580078125,
0.019439697265625,
0.0223236083984375,
0.0088958740234375,
0.0053253173828125,
0.0419921875,
-0.0013570785522460938,
0.0015926361083984375,
-0.023223876953125,
0.0465087890625,
-0.01003265380859375,
0.0127105712890625,
0.0218963623046875,
0.0174713134765625,
-0.01258087158203125,
-0.0443115234375,
-0.0845947265625,
-0.00685882568359375,
0.052734375,
0.0239105224609375,
0.0221710205078125,
-0.016357421875,
-0.04058837890625,
-0.0027217864990234375,
0.08209228515625,
-0.0181121826171875,
0.0182037353515625,
-0.0249176025390625,
-0.01617431640625,
-0.0094757080078125,
-0.017364501953125,
-0.08648681640625,
0.01361846923828125,
-0.047119140625,
0.0264129638671875,
-0.0205535888671875,
0.0026798248291015625,
-0.044281005859375,
0.0406494140625,
-0.0379638671875,
-0.035369873046875,
0.024688720703125,
-0.0089263916015625,
0.0113525390625,
-0.0188446044921875,
0.00286102294921875,
-0.04547119140625,
0.019195556640625,
-0.031402587890625,
-0.08758544921875,
0.00244903564453125,
-0.038726806640625,
0.03094482421875,
0.043609619140625,
-0.0609130859375,
0.0014352798461914062,
0.02056884765625,
0.059600830078125,
0.028167724609375,
0.0288848876953125,
-0.0259246826171875,
0.019744873046875,
-0.037353515625,
0.025360107421875,
-0.054412841796875,
-0.005859375,
-0.0015764236450195312,
-0.043975830078125,
0.0183563232421875,
-0.015960693359375,
-0.020965576171875,
0.0181121826171875,
-0.035430908203125,
-0.051116943359375,
-0.0020084381103515625,
0.02032470703125,
-0.00815582275390625,
-0.001827239990234375,
-0.005123138427734375,
0.019561767578125,
-0.032135009765625,
-0.017242431640625,
-0.0439453125,
0.0121002197265625,
0.00826263427734375,
0.006755828857421875,
0.024932861328125,
0.00402069091796875,
0.06903076171875,
0.0292816162109375,
0.0408935546875,
0.039031982421875,
-0.00841522216796875,
-0.004276275634765625,
-0.0389404296875,
0.01313018798828125,
0.0316162109375,
0.0229339599609375,
-0.019744873046875,
0.02740478515625,
0.005382537841796875,
-0.057464599609375,
0.047210693359375,
0.02154541015625,
-0.03155517578125,
0.07110595703125,
-0.00981903076171875,
-0.0257415771484375,
0.0179290771484375,
0.026702880859375,
-0.0625,
0.0192718505859375,
-0.01090240478515625,
-0.006439208984375,
0.007717132568359375,
0.033935546875,
0.0728759765625,
0.024932861328125,
0.006923675537109375,
0.0235443115234375,
0.021942138671875,
0.02886962890625,
0.0523681640625,
0.03314208984375,
0.0005965232849121094,
0.022552490234375,
0.08319091796875,
0.01629638671875,
0.00867462158203125,
-0.001125335693359375,
0.022613525390625,
-0.0009098052978515625,
-0.0236358642578125,
-0.043975830078125,
0.0031566619873046875,
0.0185394287109375,
-0.0311126708984375,
0.016265869140625,
0.0296478271484375,
-0.0150604248046875,
0.0026111602783203125,
0.00501251220703125,
0.00798797607421875,
-0.009246826171875,
-0.01230621337890625,
0.07666015625,
-0.004550933837890625,
0.0040435791015625,
0.0006976127624511719,
0.014404296875,
0.025787353515625,
-0.0217742919921875,
-0.008026123046875,
0.0272216796875,
-0.01172637939453125,
0.034759521484375,
0.0246734619140625,
-0.006988525390625,
0.0100555419921875,
0.006435394287109375,
-0.00467681884765625,
-0.0301361083984375,
0.027252197265625,
-0.0029125213623046875,
0.0202789306640625,
-0.00638580322265625,
-0.023406982421875,
0.049560546875,
-0.01459503173828125,
-0.0257415771484375,
0.061676025390625,
0.055267333984375,
-0.05181884765625,
-0.00384521484375,
0.022796630859375,
0.007656097412109375,
-0.00377655029296875,
0.0232086181640625,
-0.0311279296875,
0.00926971435546875,
-0.0019779205322265625,
-0.05816650390625,
-0.00531005859375,
-0.0092620849609375,
-0.005451202392578125,
-0.029815673828125,
0.0023670196533203125,
0.026458740234375,
-0.0770263671875,
-0.0299835205078125,
-0.004482269287109375,
-0.016082763671875,
0.055694580078125,
-0.0265045166015625,
0.003459930419921875,
-0.0250091552734375,
0.01334381103515625,
-0.0791015625,
0.034149169921875,
0.0209197998046875,
0.01715087890625,
-0.0054931640625,
-0.01558685302734375,
-0.05450439453125,
-0.0251312255859375,
-0.06927490234375,
-0.050201416015625,
-0.040618896484375,
0.004913330078125,
0.0074310302734375,
0.03216552734375,
0.0084991455078125,
0.01529693603515625,
0.00849151611328125,
-0.01006317138671875,
-0.0116119384765625,
0.0382080078125,
0.0189971923828125,
0.0187225341796875,
0.00968170166015625,
0.06414794921875,
0.027923583984375,
0.01140594482421875,
-0.005565643310546875,
-0.058349609375,
0.0017633438110351562,
0.005138397216796875,
0.0147247314453125,
-0.05120849609375,
0.021209716796875,
-0.01232147216796875,
0.060394287109375,
0.002475738525390625,
0.0271759033203125,
-0.0413818359375,
0.0025634765625,
-0.01255035400390625,
0.03814697265625,
-0.04681396484375,
-0.007045745849609375,
0.020599365234375,
-0.006427764892578125,
-0.00690460205078125,
0.0025501251220703125,
0.0256500244140625,
-0.000018656253814697266,
-0.00922393798828125,
0.0164031982421875,
-0.058349609375,
-0.05596923828125,
0.01371002197265625,
0.028839111328125,
0.034942626953125,
0.040374755859375,
-0.027130126953125,
0.0244903564453125,
0.0283966064453125,
0.0201416015625,
-0.00826263427734375,
-0.0248870849609375,
0.002277374267578125,
-0.0042877197265625,
0.01546478271484375,
-0.0159149169921875,
-0.0013475418090820312,
-0.00818634033203125,
-0.00528717041015625,
0.0355224609375,
-0.0050201416015625,
0.0007882118225097656,
0.01366424560546875,
-0.00795745849609375,
0.007534027099609375,
-0.0163116455078125,
-0.0272369384765625,
-0.043731689453125,
0.039337158203125,
0.005474090576171875,
-0.0191650390625,
0.0252227783203125,
0.006359100341796875,
0.0070648193359375,
-0.001651763916015625,
0.027130126953125,
0.01004791259765625,
0.0117034912109375,
0.0135345458984375,
-0.0189056396484375,
0.0435791015625,
-0.0286407470703125,
0.002231597900390625,
0.00241851806640625,
-0.0384521484375,
-0.033905029296875,
0.0263671875,
0.0151214599609375,
-0.01306915283203125,
0.00047278404235839844,
0.0232391357421875,
0.0206298828125,
0.042694091796875,
-0.01079559326171875,
0.023956298828125,
-0.000060498714447021484,
0.0169677734375,
-0.0224761962890625,
-0.01248931884765625,
0.026275634765625,
0.04840087890625,
-0.07318115234375,
0.03363037109375,
-0.0158843994140625,
0.01355743408203125,
-0.020233154296875,
0.0026149749755859375,
0.06207275390625,
-0.02197265625,
-0.0200958251953125,
0.0540771484375,
0.0276947021484375,
-0.046661376953125,
-0.00926971435546875,
0.0287628173828125,
-0.0833740234375,
-0.05438232421875,
0.016143798828125,
-0.040557861328125,
-0.05303955078125,
-0.0223846435546875,
-0.07720947265625,
0.1094970703125,
0.01087188720703125,
0.06256103515625,
0.023681640625,
0.02947998046875,
-0.01424407958984375,
0.01227569580078125,
-0.01194000244140625,
0.05615234375,
0.0164947509765625,
0.031951904296875,
-0.0055389404296875,
0.0009174346923828125,
0.0238494873046875,
0.03570556640625,
0.00557708740234375,
0.0005826950073242188,
0.0184783935546875,
-0.00135040283203125,
0.002971649169921875,
0.035552978515625,
-0.01806640625,
-0.01457977294921875,
-0.0111236572265625,
-0.0019330978393554688,
-0.019805908203125,
-0.0169677734375,
0.010040283203125,
-0.029266357421875,
-0.03948974609375,
0.022491455078125,
0.0175628662109375,
0.031219482421875,
0.006488800048828125,
0.051849365234375,
-0.05023193359375,
0.0170440673828125,
0.041717529296875,
0.0272979736328125,
0.005084991455078125,
0.0002346038818359375,
-0.005878448486328125,
-0.01210784912109375,
0.0201416015625,
-0.0262298583984375,
0.02374267578125,
-0.01348114013671875,
-0.00579833984375,
-0.0223236083984375,
-0.0030231475830078125,
-0.059051513671875,
-0.01337432861328125,
-0.0213623046875,
0.033050537109375,
-0.0281219482421875,
0.054473876953125,
0.03302001953125,
0.0305633544921875,
-0.02410888671875,
-0.049560546875,
0.02984619140625,
0.06390380859375,
-0.0216217041015625,
-0.021575927734375,
0.02069091796875,
0.01953125,
-0.001285552978515625,
-0.01245880126953125,
0.01342010498046875,
-0.0275115966796875,
0.00726318359375,
-0.0068206787109375,
-0.0187530517578125,
-0.0027294158935546875,
0.0223541259765625,
0.005374908447265625,
0.02825927734375,
-0.01171112060546875,
-0.023468017578125,
-0.005096435546875,
0.002368927001953125,
0.033477783203125,
0.0132293701171875,
-0.0299835205078125,
0.045867919921875,
-0.00135040283203125,
0.006649017333984375,
-0.0005517005920410156,
0.022796630859375,
0.01352691650390625,
-0.007843017578125,
0.0197601318359375,
0.00034928321838378906,
-0.01389312744140625,
0.01241302490234375,
0.0244140625,
-0.0269622802734375,
0.00899505615234375,
0.0198211669921875,
-0.0072174072265625,
0.00010991096496582031,
0.043914794921875,
-0.0013151168823242188,
0.005756378173828125,
-0.0204315185546875,
0.0114593505859375,
0.007568359375,
-0.007354736328125,
-0.01157379150390625,
0.012420654296875,
0.0264434814453125,
-0.035888671875,
0.039947509765625,
-0.014373779296875,
-0.0293426513671875,
0.03955078125,
-0.0296630859375,
0.083740234375,
-0.0145111083984375,
-0.0090179443359375,
0.03778076171875,
-0.03173828125,
-0.09625244140625,
0.027313232421875,
0.0439453125,
-0.045257568359375,
0.034149169921875,
0.0182037353515625,
-0.0296783447265625,
0.006744384765625,
0.0173492431640625,
0.0130767822265625,
0.0037288665771484375,
0.0036220550537109375,
0.0015840530395507812,
-0.07366943359375,
-0.0308685302734375,
-0.0139007568359375,
0.022979736328125,
-0.0289764404296875,
0.07562255859375,
-0.01788330078125,
0.01323699951171875,
0.057708740234375,
0.009429931640625,
0.038604736328125,
0.01507568359375,
0.033935546875,
0.004360198974609375,
0.01403045654296875,
-0.03515625,
0.01096343994140625,
0.048583984375,
-0.0029239654541015625,
-0.00812530517578125,
0.039581298828125,
-0.0232696533203125,
-0.0006971359252929688,
0.00901031494140625,
0.01459503173828125,
-0.0312042236328125,
-0.0030536651611328125,
-0.01468658447265625,
-0.03521728515625,
0.013641357421875,
-0.0200958251953125,
0.0245513916015625,
-0.0095367431640625,
0.00975799560546875,
0.00457763671875,
-0.006107330322265625,
0.0308074951171875,
-0.00820159912109375,
0.0295562744140625,
-0.037322998046875,
0.0254974365234375,
-0.0184326171875,
-0.017578125,
0.0247802734375,
-0.002593994140625,
-0.019683837890625,
0.0007863044738769531,
-0.0270538330078125,
0.025604248046875,
0.03173828125,
0.05902099609375,
-0.014251708984375,
0.0240325927734375,
0.0178375244140625,
0.013916015625,
-0.01363372802734375,
-0.048919677734375,
-0.0171661376953125,
-0.0382080078125,
0.0008840560913085938,
0.017822265625,
-0.022674560546875,
-0.026031494140625,
-0.030670166015625,
-0.004436492919921875,
0.0631103515625,
0.0230712890625,
-0.08502197265625,
0.048858642578125,
-0.035247802734375,
0.044464111328125,
0.00844573974609375,
-0.03448486328125,
0.033294677734375,
0.07196044921875,
0.019866943359375,
-0.0185699462890625,
0.00615692138671875,
0.01352691650390625,
0.005222320556640625,
-0.002593994140625,
0.0274658203125,
0.0025882720947265625,
-0.0291748046875,
-0.003322601318359375,
0.006832122802734375,
0.054412841796875,
-0.0224151611328125,
-0.0084075927734375,
0.039581298828125,
0.01342010498046875,
-0.0230865478515625,
-0.054840087890625,
-0.029388427734375,
0.024871826171875,
0.04840087890625,
-0.03375244140625,
0.00485992431640625,
0.0061187744140625,
-0.045074462890625,
-0.06732177734375,
0.0341796875,
-0.009063720703125,
-0.0306243896484375,
-0.0692138671875,
0.01336669921875,
0.0194854736328125,
-0.0153961181640625,
-0.039581298828125,
0.01410675048828125,
-0.03466796875,
0.0135955810546875,
-0.006374359130859375,
0.0005254745483398438,
0.052093505859375,
-0.0261993408203125,
-0.02850341796875,
-0.00867462158203125,
-0.00009292364120483398,
-0.0115509033203125,
-0.040985107421875,
-0.00750732421875,
0.0130615234375,
0.006793975830078125,
-0.0341796875,
-0.0535888671875,
0.0274505615234375,
0.04571533203125,
-0.0026798248291015625,
-0.051055908203125,
-0.0025081634521484375,
-0.0055389404296875,
0.04058837890625,
-0.01080322265625,
0.01503753662109375,
-0.0253143310546875,
0.019775390625,
-0.01161956787109375,
-0.03765869140625,
-0.0043182373046875,
0.0240478515625,
-0.04522705078125,
-0.01235198974609375,
0.0138397216796875,
0.002208709716796875,
-0.0206298828125,
0.004058837890625,
-0.0206756591796875,
-0.02862548828125,
-0.0077972412109375,
0.0341796875,
-0.0928955078125,
-0.02191162109375,
0.0535888671875,
-0.03167724609375,
0.016815185546875,
0.0202789306640625,
0.0212554931640625,
0.028717041015625,
0.0218505859375,
0.018341064453125,
0.05291748046875,
-0.053314208984375,
-0.019134521484375,
0.0259246826171875,
0.025787353515625,
-0.0084075927734375,
-0.016448974609375,
0.01326751708984375,
-0.0176544189453125,
-0.0121307373046875,
-0.05279541015625,
0.0245361328125,
0.032135009765625,
-0.035858154296875,
0.046051025390625,
-0.03472900390625,
0.055023193359375,
-0.01381683349609375,
0.0214996337890625,
-0.0305328369140625,
0.027435302734375,
0.028564453125,
-0.0189971923828125,
0.0036640167236328125,
-0.003734588623046875,
-0.0113067626953125,
-0.0302734375,
0.0059967041015625,
-0.02740478515625,
-0.0030460357666015625,
0.01348114013671875
] |
1a18b6fa83a8ee555606cae52c6d536e617c1a5d | Wordpress Stackexchange
Q: Is the Wordpress REST API installed and enabled in a vanilla Wordpress 4.7 installation? I've just installed Wordpress 4.7. One of the mentions in the announcement is that it features a REST API.
My understanding is:
*
*The Wordpress REST API plugin is not needed anymore, because supposely it has already been merged with core in Wordpress 4.7.
*The Wordpress REST API is enabled by default
However, I notice that in a vanilla Wordpress 4.7 install, none of the endpoints seems to work (for example http://examples.com/wp-json/wp/v2/posts).
How can I tell if the new REST API is really activated? Can the REST API be enabled or disabled with the vanilla Wordpress UI, or should I install a third party plugin to do so?
A: If REST API isn't working out-of-box or after a fresh install and after typing in
mydomain/wp-json/wp/v2/posts
then you would need to simply activate your "permalinks" as post_name located:
WP Dashboard->Settings->Permalinks
Or if you do not wish to activate permalinks, you can simply type:
mydomain?rest_route=/wp/v2/posts
Man, I wish WordPress would update their Rest handbook to be more user-friendly. I like the old version of docs :)
| Q: Is the Wordpress REST API installed and enabled in a vanilla Wordpress 4.7 installation? I've just installed Wordpress 4.7. One of the mentions in the announcement is that it features a REST API.
My understanding is:
*
*The Wordpress REST API plugin is not needed anymore, because supposely it has already been merged with core in Wordpress 4.7.
*The Wordpress REST API is enabled by default
However, I notice that in a vanilla Wordpress 4.7 install, none of the endpoints seems to work (for example http://examples.com/wp-json/wp/v2/posts).
How can I tell if the new REST API is really activated? Can the REST API be enabled or disabled with the vanilla Wordpress UI, or should I install a third party plugin to do so?
A: If REST API isn't working out-of-box or after a fresh install and after typing in
mydomain/wp-json/wp/v2/posts
then you would need to simply activate your "permalinks" as post_name located:
WP Dashboard->Settings->Permalinks
Or if you do not wish to activate permalinks, you can simply type:
mydomain?rest_route=/wp/v2/posts
Man, I wish WordPress would update their Rest handbook to be more user-friendly. I like the old version of docs :)
A: 4.7 has it enabled by default. The easy way to check if it is working is just to visit the example.com/wp-json url, and you should get a list of registered end points there
There is no official option to disable it as (at least there was a talk about it not sure if it got in the release), some core functionality depends on it.
The most obvious things to check for if it is not working is your htaccess rules, and do you have a wp-json directory
Also, if /wp-json/wp/v2/posts type URLs don't work for you, but /?rest_route=/wp-json/wp/v2/posts does, it means you need to enable pretty permalinks in the settings (suggested by Giles Butler in comments below).
A: I had 4.7 also thought that REST API was disabled, but I was tricked by the URL. To see the correct URL seek a line looking something like that:
link rel='https://api.w.org/' href='http://mysite?rest_route=/' />.
So, using http://mysite?rest_route=/ as the prefix solved my problem. For instance to recover the posts is enought to type: http://mysite?rest_route=/wp/json
I couldn't find on documentation that the query param was needed. Was I the only one?
A: I see you have fixed the issue but leaving my solution here as it worked for me too. I had this same issue when updating from beta15 to the core api in wp 4.7 Turns out the issue was that I had some plugins that were using a deprecated function register_api_field which I changed to register_rest_field according to this note in the changelog:
BREAKING CHANGE: Rename register_api_field() to register_rest_field().
Introduces a register_api_field() function for backwards compat, which
calls _doing_it_wrong(). However, register_api_field() won't ever be
committed to WordPress core, so you should update your function calls.
| wordpress | {
"language": "en",
"length": 473,
"provenance": "stackexchange_00019.jsonl.gz:471011",
"question_score": "43",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/248879"
} | [
0.063720703125,
-0.002140045166015625,
-0.029632568359375,
-0.016357421875,
0.0295867919921875,
-0.04302978515625,
0.08587646484375,
0.0093841552734375,
0.0310211181640625,
0.0090179443359375,
-0.02099609375,
0.0008540153503417969,
-0.032379150390625,
-0.0225982666015625,
-0.0323486328125,
-0.03948974609375,
0.029998779296875,
-0.00579071044921875,
0.0186004638671875,
-0.0182037353515625,
0.0183868408203125,
-0.008148193359375,
0.01708984375,
0.0511474609375,
0.0196685791015625,
0.03973388671875,
0.0369873046875,
-0.0297698974609375,
0.0058746337890625,
-0.00952911376953125,
0.0141448974609375,
-0.0202789306640625,
-0.0032634735107421875,
0.049285888671875,
-0.025665283203125,
-0.054107666015625,
0.0013580322265625,
0.016998291015625,
-0.0016851425170898438,
0.02471923828125,
0.0084075927734375,
-0.0084381103515625,
0.0157928466796875,
0.01464080810546875,
-0.0035991668701171875,
-0.0147705078125,
0.018218994140625,
-0.03271484375,
0.0175323486328125,
0.01210784912109375,
-0.01537322998046875,
0.0016536712646484375,
-0.0153045654296875,
0.017608642578125,
-0.01528167724609375,
-0.0224761962890625,
0.0443115234375,
-0.0112152099609375,
0.03326416015625,
-0.02264404296875,
-0.0325927734375,
0.00018703937530517578,
0.02337646484375,
-0.001392364501953125,
0.036468505859375,
-0.01534271240234375,
0.01165008544921875,
0.019775390625,
-0.036712646484375,
0.0614013671875,
0.044464111328125,
-0.0494384765625,
0.001506805419921875,
-0.007297515869140625,
0.015838623046875,
-0.035552978515625,
-0.003917694091796875,
-0.039215087890625,
0.01568603515625,
0.0257110595703125,
-0.00875091552734375,
-0.0025730133056640625,
0.030120849609375,
-0.04400634765625,
0.005023956298828125,
-0.032379150390625,
0.00017786026000976562,
0.01145172119140625,
-0.022247314453125,
0.0076904296875,
-0.022674560546875,
-0.10296630859375,
0.0143890380859375,
0.03173828125,
0.00927734375,
-0.0124969482421875,
0.01206207275390625,
-0.0150604248046875,
-0.007144927978515625,
0.00007218122482299805,
0.044189453125,
-0.05645751953125,
0.06085205078125,
-0.015625,
-0.01139068603515625,
-0.0377197265625,
0.007633209228515625,
0.0191192626953125,
0.061798095703125,
0.04180908203125,
-0.01806640625,
0.0924072265625,
0.0230255126953125,
0.016448974609375,
-0.032257080078125,
-0.027191162109375,
-0.0234832763671875,
0.0035915374755859375,
-0.006687164306640625,
-0.004863739013671875,
-0.0139923095703125,
0.028045654296875,
-0.03497314453125,
0.0137481689453125,
0.002437591552734375,
-0.0007901191711425781,
0.006744384765625,
-0.01329803466796875,
-0.01404571533203125,
0.0212860107421875,
0.0157470703125,
0.031646728515625,
-0.017425537109375,
0.006072998046875,
-0.046142578125,
-0.0027103424072265625,
0.01442718505859375,
0.01180267333984375,
0.0100860595703125,
0.004062652587890625,
0.005847930908203125,
-0.039794921875,
-0.00757598876953125,
0.00811004638671875,
0.031768798828125,
0.0037174224853515625,
0.0310516357421875,
0.0125885009765625,
0.0016040802001953125,
0.01551055908203125,
-0.02679443359375,
0.0474853515625,
0.01003265380859375,
0.022247314453125,
0.02435302734375,
-0.0090179443359375,
0.036895751953125,
-0.0216522216796875,
-0.005466461181640625,
-0.019134521484375,
0.01512908935546875,
-0.02606201171875,
-0.0011272430419921875,
-0.006134033203125,
-0.01312255859375,
0.03955078125,
-0.03973388671875,
-0.0022029876708984375,
0.0217742919921875,
0.02142333984375,
-0.011505126953125,
-0.0248870849609375,
0.005947113037109375,
-0.01297760009765625,
-0.00909423828125,
0.006103515625,
0.01074981689453125,
0.044830322265625,
0.019561767578125,
0.0364990234375,
0.0171661376953125,
-0.02166748046875,
0.11431884765625,
-0.036590576171875,
-0.056243896484375,
0.06927490234375,
0.018585205078125,
0.08795166015625,
-0.027099609375,
0.0175323486328125,
0.044342041015625,
0.063720703125,
0.0031986236572265625,
0.05120849609375,
0.0115203857421875,
-0.08349609375,
0.001434326171875,
-0.01483917236328125,
-0.0172882080078125,
-0.030975341796875,
0.0013532638549804688,
0.0106658935546875,
0.024200439453125,
0.01343536376953125,
-0.01409149169921875,
0.006622314453125,
-0.01035308837890625,
0.01351165771484375,
-0.01470947265625,
0.01442718505859375,
0.015716552734375,
0.0034503936767578125,
-0.033599853515625,
0.026824951171875,
-0.00260162353515625,
0.0022125244140625,
-0.03546142578125,
0.054718017578125,
0.00605010986328125,
0.0259552001953125,
0.034393310546875,
-0.024444580078125,
0.059722900390625,
0.0091552734375,
0.02362060546875,
-0.0318603515625,
0.0223236083984375,
-0.029632568359375,
0.06805419921875,
-0.0112762451171875,
0.054931640625,
0.00518035888671875,
0.0161590576171875,
0.00719451904296875,
-0.0164794921875,
-0.00347137451171875,
0.010528564453125,
-0.044403076171875,
0.0095672607421875,
0.04156494140625,
0.0389404296875,
-0.0011692047119140625,
-0.004302978515625,
-0.02166748046875,
-0.0103607177734375,
-0.064697265625,
0.0227508544921875,
-0.024810791015625,
-0.01434326171875,
-0.00804901123046875,
0.0021381378173828125,
-0.0028247833251953125,
0.041473388671875,
0.00543975830078125,
-0.00986480712890625,
0.040771484375,
-0.01317596435546875,
-0.0374755859375,
0.0015058517456054688,
-0.025665283203125,
0.03912353515625,
-0.0282135009765625,
-0.053741455078125,
0.0004267692565917969,
0.0115509033203125,
0.0162506103515625,
0.0374755859375,
0.0572509765625,
-0.034820556640625,
-0.01267242431640625,
0.025054931640625,
0.05120849609375,
-0.00591278076171875,
0.04241943359375,
0.06640625,
0.010101318359375,
-0.0345458984375,
-0.02886962890625,
0.0255279541015625,
0.04266357421875,
-0.0153045654296875,
-0.0165252685546875,
-0.027008056640625,
-0.0022068023681640625,
-0.0183868408203125,
-0.0653076171875,
0.036590576171875,
0.05517578125,
0.00827789306640625,
0.0287322998046875,
0.041656494140625,
0.038909912109375,
-0.0141448974609375,
0.0511474609375,
-0.0167999267578125,
0.0019063949584960938,
0.0036830902099609375,
-0.0252532958984375,
0.0204925537109375,
-0.03515625,
0.005321502685546875,
0.03961181640625,
-0.00463104248046875,
-0.00518035888671875,
0.0142059326171875,
-0.03118896484375,
-0.0004341602325439453,
0.0206756591796875,
0.0028972625732421875,
-0.01152801513671875,
-0.041961669921875,
0.0418701171875,
0.00885009765625,
0.007053375244140625,
-0.030975341796875,
-0.060394287109375,
-0.023681640625,
-0.006702423095703125,
-0.11322021484375,
-0.07342529296875,
0.0142669677734375,
-0.047027587890625,
-0.01544189453125,
0.0003032684326171875,
-0.0256805419921875,
-0.00768280029296875,
0.025848388671875,
-0.005786895751953125,
-0.030242919921875,
-0.007221221923828125,
-0.060211181640625,
-0.050537109375,
-0.08154296875,
-0.0005469322204589844,
-0.0032939910888671875,
0.02911376953125,
0.0046234130859375,
0.01116180419921875,
-0.0171051025390625,
-0.0258941650390625,
0.0007076263427734375,
-0.021087646484375,
-0.002590179443359375,
-0.0241241455078125,
0.00091552734375,
0.0137176513671875,
0.007160186767578125,
0.00151824951171875,
0.04119873046875,
0.04278564453125,
-0.052703857421875,
-0.0026111602783203125,
-0.020721435546875,
-0.0235748291015625,
-0.0297698974609375,
0.031829833984375,
0.036895751953125,
-0.040985107421875,
-0.007144927978515625,
-0.0660400390625,
-0.0041046142578125,
-0.02105712890625,
-0.04034423828125,
-0.03515625,
-0.002025604248046875,
0.0185546875,
-0.03424072265625,
0.031280517578125,
-0.00788116455078125,
-0.017364501953125,
0.02593994140625,
-0.0175628662109375,
0.03851318359375,
-0.025360107421875,
-0.038482666015625,
-0.040283203125,
0.05133056640625,
-0.0150146484375,
-0.037872314453125,
0.0047149658203125,
-0.02978515625,
-0.04132080078125,
-0.0067901611328125,
-0.0770263671875,
-0.039031982421875,
0.04913330078125,
-0.0293731689453125,
-0.0374755859375,
-0.004718780517578125,
-0.0167236328125,
0.0279693603515625,
0.06573486328125,
-0.0012769699096679688,
-0.00835418701171875,
0.0138397216796875,
0.0037441253662109375,
-0.027099609375,
-0.007350921630859375,
-0.048004150390625,
-0.011383056640625,
0.020477294921875,
-0.043548583984375,
-0.014984130859375,
-0.0282745361328125,
-0.00203704833984375,
0.0206756591796875,
0.0178070068359375,
0.00568389892578125,
0.003582000732421875,
-0.04449462890625,
-0.0252685546875,
0.00597381591796875,
-0.02923583984375,
-0.042938232421875,
0.0146026611328125,
-0.047637939453125,
-0.07733154296875,
-0.01369476318359375,
-0.0025539398193359375,
0.05096435546875,
0.0064697265625,
-0.040191650390625,
-0.010284423828125,
0.037750244140625,
0.00580596923828125,
-0.026336669921875,
0.031494140625,
0.018646240234375,
-0.033782958984375,
0.0086517333984375,
0.01055908203125,
-0.028839111328125,
-0.01300811767578125,
0.0030040740966796875,
-0.0283050537109375,
0.0017871856689453125,
0.003231048583984375,
-0.00098419189453125,
0.025848388671875,
-0.03350830078125,
-0.031402587890625,
-0.0279998779296875,
-0.036529541015625,
0.001987457275390625,
-0.016326904296875,
-0.0183563232421875,
-0.035400390625,
-0.057861328125,
0.018310546875,
-0.0290679931640625,
0.008544921875,
0.006351470947265625,
0.0303955078125,
0.000400543212890625,
-0.008331298828125,
0.008392333984375,
0.019439697265625,
0.0277099609375,
0.0229339599609375,
0.040802001953125,
0.002838134765625,
-0.00972747802734375,
0.0400390625,
-0.0018224716186523438,
0.01221466064453125,
-0.0032062530517578125,
-0.0011243820190429688,
0.00614166259765625,
-0.025787353515625,
0.030120849609375,
0.0223541259765625,
-0.009613037109375,
0.042755126953125,
0.0245361328125,
-0.0396728515625,
0.01464080810546875,
0.022705078125,
-0.00927734375,
-0.00237274169921875,
-0.0203094482421875,
-0.07489013671875,
0.04058837890625,
-0.050384521484375,
-0.0131072998046875,
-0.01922607421875,
0.0107574462890625,
0.01123046875,
-0.0224151611328125,
-0.01479339599609375,
0.0084381103515625,
0.02349853515625,
-0.0079498291015625,
0.0190582275390625,
0.007232666015625,
-0.0306549072265625,
-0.0200958251953125,
-0.0180206298828125,
0.10809326171875,
-0.0096588134765625,
-0.072998046875,
0.009429931640625,
-0.0223541259765625,
0.04925537109375,
0.03643798828125,
0.01335906982421875,
0.04327392578125,
0.0443115234375,
0.00986480712890625,
-0.0200958251953125,
-0.0155029296875,
0.043121337890625,
-0.04962158203125,
0.032562255859375,
0.0040130615234375,
0.0006585121154785156,
-0.01806640625,
0.06982421875,
-0.01099395751953125,
0.04180908203125,
-0.00788116455078125,
0.01454925537109375,
0.03125,
0.031951904296875,
0.013397216796875,
-0.0247802734375,
-0.006122589111328125,
0.00690460205078125,
0.00922393798828125,
-0.0770263671875,
-0.039520263671875,
0.0178680419921875,
0.08380126953125,
-0.0032787322998046875,
-0.03765869140625,
0.02313232421875,
-0.0079345703125,
-0.028839111328125,
0.021728515625,
-0.033294677734375,
-0.040557861328125,
-0.030242919921875,
0.0281982421875,
0.04193115234375,
-0.0117340087890625,
0.004886627197265625,
0.004100799560546875,
0.0216522216796875,
0.0302886962890625,
-0.0312347412109375,
-0.01432037353515625,
0.0198516845703125,
0.0275115966796875,
0.031646728515625,
-0.0054168701171875,
-0.01335906982421875,
0.0187835693359375,
0.0167236328125,
-0.0341796875,
-0.02740478515625,
0.049713134765625,
-0.00777435302734375,
0.0035190582275390625,
-0.023040771484375,
0.01259613037109375,
-0.041473388671875,
0.01305389404296875,
0.003993988037109375,
-0.0091400146484375,
-0.01105499267578125,
-0.025848388671875,
-0.030914306640625,
-0.02752685546875,
0.044342041015625,
0.02886962890625,
-0.03497314453125,
-0.0032901763916015625,
0.005519866943359375,
0.0021457672119140625,
-0.0077972412109375,
-0.003292083740234375,
-0.0291748046875,
0.043121337890625,
0.015350341796875,
0.0259857177734375,
0.0233917236328125,
0.0694580078125,
-0.0245208740234375,
0.0482177734375,
0.03515625,
0.0390625,
-0.05322265625,
-0.0156707763671875,
0.01318359375,
-0.0552978515625,
-0.04571533203125,
-0.034912109375,
-0.049652099609375,
0.083984375,
0.0989990234375,
-0.004108428955078125,
0.00620269775390625,
-0.0207366943359375,
0.0036468505859375,
-0.01354217529296875,
0.04180908203125,
-0.025543212890625,
-0.0027942657470703125,
0.02996826171875,
0.00878143310546875,
0.028289794921875,
-0.061981201171875,
-0.051788330078125,
0.040740966796875,
0.0164642333984375,
0.0311737060546875,
-0.0003921985626220703,
-0.042755126953125,
0.0462646484375,
0.11419677734375,
0.0143280029296875,
0.062255859375,
0.007625579833984375,
-0.006450653076171875,
0.0621337890625,
0.00494384765625,
0.0017919540405273438,
-0.008209228515625,
-0.016357421875,
-0.01241302490234375,
0.0084381103515625,
-0.01143646240234375,
-0.004886627197265625,
0.03057861328125,
0.006153106689453125,
0.06494140625,
-0.025634765625,
0.007755279541015625,
0.01132965087890625,
-0.019378662109375,
0.041259765625,
-0.01947021484375,
-0.01812744140625,
-0.028350830078125,
0.0390625,
-0.043853759765625,
-0.032958984375,
0.0021495819091796875,
-0.01328277587890625,
-0.0185546875,
-0.00984954833984375,
0.0237274169921875,
0.03082275390625,
0.0350341796875,
0.027099609375,
-0.0294342041015625,
0.04962158203125,
0.006439208984375,
-0.0014095306396484375,
0.0012722015380859375,
-0.0299835205078125,
-0.047210693359375,
0.00827789306640625,
-0.03387451171875,
-0.032196044921875,
-0.002796173095703125,
-0.0019168853759765625,
0.025665283203125,
0.03173828125,
-0.009063720703125,
-0.025115966796875,
0.0233306884765625,
-0.01812744140625,
0.0016803741455078125,
-0.029693603515625,
0.006015777587890625,
0.031585693359375,
-0.01399993896484375,
0.021759033203125,
0.024932861328125,
-0.0400390625,
-0.0085296630859375,
-0.044830322265625,
0.10601806640625,
-0.033233642578125,
-0.0160064697265625,
-0.01210784912109375,
-0.00974273681640625,
0.0228424072265625,
-0.00988006591796875,
0.027618408203125,
-0.048065185546875,
-0.017913818359375,
0.00191497802734375,
-0.015380859375,
0.0031528472900390625,
0.0214080810546875,
-0.01274871826171875,
0.1207275390625,
-0.0243377685546875,
-0.0182037353515625,
0.00024962425231933594,
0.0706787109375,
-0.0188751220703125,
0.0634765625,
0.00791168212890625,
0.0296783447265625,
-0.0259857177734375,
0.00350189208984375,
0.0014333724975585938,
0.0070343017578125,
0.0019397735595703125,
0.03228759765625,
0.07513427734375,
0.0224609375,
-0.0389404296875,
-0.0198974609375,
-0.004383087158203125,
-0.0019283294677734375,
-0.02789306640625,
0.04766845703125,
-0.01021575927734375,
0.03948974609375,
0.060699462890625,
-0.026580810546875,
0.0243377685546875,
0.034027099609375,
-0.0239105224609375,
0.021728515625,
0.0132598876953125,
0.00904083251953125,
-0.0192108154296875,
0.04205322265625,
0.01044464111328125,
-0.03253173828125,
0.007049560546875,
-0.0222320556640625,
-0.03155517578125,
0.0283203125,
-0.0416259765625,
-0.03741455078125,
0.03594970703125,
-0.055755615234375,
0.016326904296875,
-0.037261962890625,
0.0117645263671875,
0.0153350830078125,
0.03656005859375,
0.01336669921875,
-0.02215576171875,
0.0133514404296875,
0.041595458984375,
-0.0565185546875,
0.027435302734375,
0.055419921875,
0.05950927734375,
0.0277099609375,
-0.039520263671875,
0.0169525146484375,
0.040985107421875,
-0.00994873046875,
-0.03564453125,
0.01088714599609375,
0.01885986328125,
0.041900634765625,
-0.0029392242431640625,
0.06903076171875,
-0.049102783203125,
-0.005794525146484375,
0.01111602783203125,
0.0050506591796875,
0.0016155242919921875,
0.00450897216796875,
0.0241546630859375,
0.05572509765625,
-0.027130126953125,
0.0221710205078125,
-0.0233917236328125,
0.01006317138671875,
0.0123443603515625,
0.0175323486328125,
-0.006061553955078125,
0.039215087890625,
-0.0229339599609375,
-0.001495361328125,
0.005130767822265625,
0.0233917236328125,
0.01611328125,
-0.0220184326171875,
0.005672454833984375,
-0.0670166015625,
0.037933349609375,
0.00737762451171875,
0.0264129638671875,
0.0051116943359375,
0.056060791015625,
0.0250701904296875,
-0.037750244140625,
-0.0073699951171875,
0.053192138671875,
-0.00974273681640625,
-0.034912109375,
-0.03167724609375,
-0.019287109375,
0.018463134765625,
-0.003520965576171875,
0.04595947265625,
0.0028934478759765625,
0.0086669921875,
-0.007232666015625,
0.035125732421875,
0.007221221923828125,
-0.0100555419921875,
0.0248565673828125,
0.0200653076171875,
0.040313720703125,
0.00885772705078125,
-0.045989990234375,
0.005771636962890625,
-0.027801513671875,
-0.03680419921875,
0.006778717041015625,
0.031768798828125,
-0.023956298828125,
0.0226287841796875,
-0.042388916015625,
0.005100250244140625,
0.0124969482421875,
-0.0165252685546875,
-0.0200653076171875,
0.011993408203125,
0.0160675048828125,
-0.01241302490234375,
-0.04638671875,
-0.01800537109375,
-0.0294647216796875,
0.038909912109375,
-0.0183868408203125,
0.09716796875,
-0.044219970703125,
0.00952911376953125,
-0.0518798828125,
0.02703857421875,
-0.0380859375,
-0.023040771484375,
-0.0322265625,
0.021514892578125,
0.0256805419921875,
0.0183563232421875,
-0.08746337890625,
0.0482177734375,
0.01898193359375,
0.01715087890625,
0.07025146484375,
-0.021697998046875,
0.0013360977172851562,
-0.0279388427734375,
0.0194854736328125,
-0.04364013671875,
-0.045928955078125,
-0.0250701904296875,
0.00839996337890625,
-0.0305633544921875,
-0.0270843505859375,
0.0136566162109375,
0.005161285400390625,
0.037139892578125,
0.004642486572265625,
-0.0012350082397460938,
0.0296630859375,
0.0097503662109375,
0.0277252197265625,
-0.01125335693359375,
0.058868408203125,
-0.03741455078125,
-0.037689208984375,
0.03839111328125,
-0.0289764404296875,
-0.0281219482421875,
-0.0168304443359375,
0.0038471221923828125,
-0.009918212890625,
-0.00711822509765625,
0.02215576171875,
0.00926971435546875,
0.0002498626708984375,
-0.03558349609375,
0.005352020263671875,
-0.0015211105346679688,
0.00701141357421875,
-0.00830841064453125,
-0.028717041015625,
-0.013336181640625,
0.006504058837890625,
-0.03546142578125,
-0.0294952392578125,
-0.048248291015625,
-0.0099334716796875,
0.018341064453125,
-0.0016422271728515625,
-0.033843994140625,
0.00907135009765625,
-0.0145111083984375,
0.0203399658203125,
-0.02001953125,
-0.0248870849609375,
0.01059722900390625,
0.046875,
-0.027801513671875,
0.00788116455078125,
-0.0244598388671875,
-0.0396728515625,
-0.0175933837890625,
0.0032901763916015625,
0.007099151611328125,
0.00008606910705566406,
-0.03363037109375,
0.0008454322814941406,
-0.0128173828125,
0.040740966796875,
0.0227203369140625,
-0.005615234375,
-0.039703369140625,
0.007266998291015625,
-0.01812744140625,
-0.026763916015625,
0.0190887451171875,
-0.047119140625,
-0.046905517578125,
-0.055450439453125,
0.041717529296875,
0.0287322998046875,
-0.04022216796875,
-0.09381103515625,
0.0264739990234375,
-0.036773681640625,
-0.0355224609375,
-0.082763671875,
-0.03021240234375,
-0.00502777099609375,
0.054412841796875,
-0.024932861328125,
-0.03875732421875,
-0.057769775390625,
0.06365966796875,
0.02008056640625,
0.023162841796875,
0.00421905517578125,
0.01416015625,
-0.01947021484375,
0.03460693359375,
0.0225372314453125,
0.008636474609375,
0.002422332763671875,
0.0213470458984375,
0.01299285888671875,
0.0267181396484375,
-0.035919189453125,
0.056640625,
-0.0218505859375,
0.0191650390625,
-0.0182037353515625,
-0.05291748046875,
-0.01493072509765625,
-0.005107879638671875,
0.05401611328125,
0.07366943359375,
0.01320648193359375,
-0.054931640625,
-0.0106201171875,
-0.053955078125,
0.035186767578125,
-0.00970458984375,
-0.0208282470703125,
-0.01091766357421875,
0.0198211669921875,
-0.0018301010131835938,
0.037139892578125,
0.015106201171875,
-0.039703369140625,
0.03338623046875,
-0.038116455078125,
0.01491546630859375,
-0.0240325927734375,
0.02587890625,
-0.02239990234375,
0.0230865478515625,
-0.0168609619140625,
0.01526641845703125,
-0.0212249755859375,
0.0290679931640625,
0.0165557861328125,
0.017852783203125,
0.00955963134765625,
0.01325225830078125,
-0.003082275390625,
0.00830841064453125,
0.01959228515625,
0.023101806640625,
-0.00617218017578125,
-0.016876220703125,
-0.0276947021484375,
0.0201416015625,
0.017822265625,
0.042510986328125,
-0.0113525390625,
-0.0160369873046875,
0.018341064453125,
0.0289459228515625,
0.01318359375,
0.0269775390625,
0.004627227783203125,
0.034637451171875,
-0.001068115234375,
-0.0298614501953125,
0.023345947265625,
-0.057708740234375,
0.005123138427734375,
0.022064208984375,
0.0079345703125,
-0.048065185546875,
0.022003173828125,
-0.0019350051879882812,
0.01210784912109375,
0.021331787109375
] |
b844cefefc111dc464c8cd69de4e8a3be59f1bd0 | Wordpress Stackexchange
Q: Get post id shortcode I'm new at this.
I need a shortcode that returns the post id of the post in which the shortcode is inserted.
If someone could provide that it would open the doors of understanding for me :)
Much appreciated!
A: Place the below code to your themes functions.php or inside your plugin and the [return_post_id] shortcode will print the post ID.
add_shortcode( 'return_post_id', 'the_dramatist_return_post_id' );
function the_dramatist_return_post_id() {
return get_the_ID();
}
Hope that helps.
| Q: Get post id shortcode I'm new at this.
I need a shortcode that returns the post id of the post in which the shortcode is inserted.
If someone could provide that it would open the doors of understanding for me :)
Much appreciated!
A: Place the below code to your themes functions.php or inside your plugin and the [return_post_id] shortcode will print the post ID.
add_shortcode( 'return_post_id', 'the_dramatist_return_post_id' );
function the_dramatist_return_post_id() {
return get_the_ID();
}
Hope that helps.
A: Shortcode: Embeddable Post Excerpts
After installing the shortcode (follow steps 1 + 2 below) you can execute it anywhere WordPress accepts shortcodes. To connect to a post, you simply need to enter the post ID you wish to display:
https://marketersdelight.net/snippets/embeddable-excerpts/
| wordpress | {
"language": "en",
"length": 120,
"provenance": "stackexchange_00019.jsonl.gz:471017",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/248904"
} | [
0.00891876220703125,
-0.0154571533203125,
0.0199432373046875,
0.042572021484375,
-0.01251983642578125,
-0.0096588134765625,
0.04437255859375,
-0.045257568359375,
-0.040374755859375,
0.041229248046875,
-0.0027332305908203125,
0.01308441162109375,
-0.031585693359375,
-0.0119171142578125,
-0.021392822265625,
-0.041656494140625,
0.03631591796875,
-0.004886627197265625,
0.01465606689453125,
-0.0158233642578125,
-0.0216064453125,
-0.00302886962890625,
0.034912109375,
0.036590576171875,
0.0289306640625,
-0.0031032562255859375,
0.07354736328125,
-0.005764007568359375,
0.006420135498046875,
-0.00968170166015625,
0.03997802734375,
-0.0335693359375,
0.0184783935546875,
0.0030002593994140625,
0.0080413818359375,
0.07781982421875,
-0.031280517578125,
0.023193359375,
0.0396728515625,
-0.01541900634765625,
0.012664794921875,
0.007236480712890625,
0.0158233642578125,
-0.005523681640625,
-0.018524169921875,
-0.01192474365234375,
-0.004276275634765625,
-0.027587890625,
0.00543975830078125,
0.01248931884765625,
0.035400390625,
0.01094818115234375,
0.03668212890625,
0.0082855224609375,
-0.016998291015625,
0.0011272430419921875,
-0.0160369873046875,
-0.035125732421875,
0.05322265625,
-0.01265716552734375,
-0.0394287109375,
-0.060302734375,
0.041229248046875,
-0.050140380859375,
-0.00970458984375,
0.0223846435546875,
0.0171966552734375,
0.0177459716796875,
-0.006450653076171875,
-0.01235198974609375,
-0.0031070709228515625,
-0.016693115234375,
0.01190948486328125,
0.0273284912109375,
-0.04150390625,
-0.04571533203125,
0.0276031494140625,
-0.00920867919921875,
0.01203155517578125,
-0.005657196044921875,
-0.0204620361328125,
-0.035369873046875,
-0.043121337890625,
0.007495880126953125,
-0.01531219482421875,
0.027374267578125,
-0.011138916015625,
-0.007244110107421875,
-0.037353515625,
-0.034393310546875,
-0.03729248046875,
-0.0139312744140625,
-0.0140533447265625,
0.001102447509765625,
-0.03607177734375,
-0.019683837890625,
0.007205963134765625,
0.07110595703125,
-0.0243988037109375,
0.032623291015625,
-0.02044677734375,
-0.0283660888671875,
0.036346435546875,
-0.0521240234375,
-0.0196380615234375,
-0.00365447998046875,
0.013427734375,
-0.013885498046875,
0.00772857666015625,
0.04583740234375,
-0.0269012451171875,
0.0025653839111328125,
-0.03143310546875,
0.0036602020263671875,
-0.0234527587890625,
0.0146942138671875,
-0.0552978515625,
0.00434112548828125,
-0.0289306640625,
-0.0026950836181640625,
0.050384521484375,
0.037933349609375,
0.03314208984375,
-0.02252197265625,
-0.020233154296875,
-0.0149688720703125,
-0.058319091796875,
-0.0511474609375,
0.0062713623046875,
0.01342010498046875,
-0.03607177734375,
0.0167694091796875,
0.06817626953125,
0.0128936767578125,
-0.006961822509765625,
-0.0215301513671875,
-0.026519775390625,
-0.0125732421875,
0.01142120361328125,
-0.02099609375,
-0.0151519775390625,
0.0077972412109375,
0.04766845703125,
-0.0156402587890625,
-0.0211639404296875,
0.031494140625,
0.012664794921875,
0.006801605224609375,
-0.023223876953125,
-0.07080078125,
0.00025916099548339844,
-0.0031871795654296875,
0.005619049072265625,
0.0251312255859375,
0.052978515625,
0.01207733154296875,
0.0667724609375,
-0.020355224609375,
-0.00588226318359375,
-0.00786590576171875,
0.03961181640625,
0.0271759033203125,
0.0207061767578125,
0.021697998046875,
-0.005558013916015625,
-0.03369140625,
-0.031402587890625,
-0.004756927490234375,
0.016021728515625,
0.11181640625,
-0.003498077392578125,
-0.00006836652755737305,
-0.02764892578125,
0.00452423095703125,
-0.02947998046875,
-0.022705078125,
-0.0142974853515625,
-0.0280609130859375,
0.0222015380859375,
0.0251617431640625,
-0.01104736328125,
-0.025482177734375,
0.00537109375,
0.021331787109375,
-0.0207061767578125,
0.0479736328125,
0.0289154052734375,
0.07269287109375,
-0.034759521484375,
0.0276641845703125,
-0.0037784576416015625,
0.04827880859375,
-0.0242919921875,
0.00951385498046875,
0.0189971923828125,
-0.03179931640625,
-0.029998779296875,
-0.0294189453125,
-0.0001614093780517578,
0.0021724700927734375,
0.00046563148498535156,
0.006168365478515625,
-0.0019426345825195312,
0.0200958251953125,
-0.0130462646484375,
-0.00493621826171875,
-0.01123046875,
0.02679443359375,
0.013885498046875,
-0.00994110107421875,
0.00899505615234375,
-0.01337432861328125,
-0.0166168212890625,
0.004505157470703125,
-0.0298614501953125,
0.058349609375,
-0.057525634765625,
-0.005588531494140625,
-0.0235748291015625,
0.0194549560546875,
-0.034820556640625,
0.0157318115234375,
-0.03289794921875,
-0.0242462158203125,
0.03271484375,
-0.00661468505859375,
-0.0113067626953125,
-0.0296630859375,
0.004817962646484375,
0.0145416259765625,
-0.06304931640625,
0.01061248779296875,
-0.005786895751953125,
-0.01389312744140625,
-0.0306396484375,
-0.002315521240234375,
0.0009598731994628906,
-0.0311431884765625,
0.017120361328125,
0.0419921875,
0.051422119140625,
0.03076171875,
-0.01058197021484375,
-0.048736572265625,
0.068359375,
-0.029327392578125,
0.012969970703125,
-0.041229248046875,
0.035614013671875,
0.076904296875,
-0.00626373291015625,
-0.01309967041015625,
0.006927490234375,
-0.046844482421875,
0.0183563232421875,
0.02325439453125,
-0.01148223876953125,
0.0310821533203125,
0.002105712890625,
-0.0007424354553222656,
-0.01361083984375,
-0.036285400390625,
0.028106689453125,
-0.04473876953125,
0.052093505859375,
0.032928466796875,
0.04034423828125,
0.033782958984375,
-0.046295166015625,
0.033966064453125,
0.003704071044921875,
-0.0057220458984375,
0.0011701583862304688,
0.040374755859375,
0.0176239013671875,
0.01424407958984375,
-0.030029296875,
-0.02496337890625,
0.03131103515625,
0.0209503173828125,
0.0022678375244140625,
0.0648193359375,
-0.0122222900390625,
-0.0113372802734375,
0.002010345458984375,
-0.032623291015625,
-0.031585693359375,
-0.01078033447265625,
0.005458831787109375,
-0.01438140869140625,
-0.0238800048828125,
0.09478759765625,
0.0020351409912109375,
0.062103271484375,
0.029052734375,
0.01375579833984375,
0.0662841796875,
-0.0743408203125,
0.06378173828125,
-0.051177978515625,
0.0034275054931640625,
0.054473876953125,
-0.02227783203125,
0.0235137939453125,
0.00040149688720703125,
-0.016204833984375,
-0.02191162109375,
0.007343292236328125,
0.005645751953125,
-0.009002685546875,
-0.0430908203125,
0.0418701171875,
0.0279998779296875,
0.061737060546875,
-0.0144805908203125,
-0.04022216796875,
0.00418853759765625,
0.036468505859375,
-0.07525634765625,
-0.0758056640625,
0.0093841552734375,
-0.033172607421875,
-0.0170135498046875,
-0.042999267578125,
-0.0211944580078125,
0.01287078857421875,
-0.047027587890625,
-0.00887298583984375,
-0.0005340576171875,
-0.008758544921875,
-0.0648193359375,
-0.03448486328125,
-0.0599365234375,
0.0024738311767578125,
-0.016510009765625,
0.018341064453125,
0.00936126708984375,
0.05035400390625,
0.01470947265625,
-0.026397705078125,
0.0015287399291992188,
0.025115966796875,
-0.041168212890625,
-0.033203125,
-0.01412200927734375,
-0.026702880859375,
-0.0565185546875,
0.008636474609375,
-0.026519775390625,
-0.0225067138671875,
0.0288848876953125,
0.01259613037109375,
-0.0205230712890625,
0.0018968582153320312,
0.0262451171875,
0.0098114013671875,
0.0009160041809082031,
0.029205322265625,
0.045867919921875,
-0.028076171875,
0.023590087890625,
-0.03131103515625,
-0.027435302734375,
-0.0177154541015625,
-0.0207061767578125,
0.0091552734375,
-0.0311279296875,
0.0173492431640625,
0.0176239013671875,
0.01406097412109375,
0.011444091796875,
-0.00630950927734375,
0.05029296875,
-0.00286102294921875,
0.032470703125,
-0.02130126953125,
-0.01367950439453125,
-0.044830322265625,
0.0027923583984375,
-0.020172119140625,
-0.01007080078125,
-0.003864288330078125,
-0.0230865478515625,
0.0194854736328125,
-0.0457763671875,
0.0377197265625,
-0.012115478515625,
0.0015802383422851562,
-0.019500732421875,
-0.0285186767578125,
0.007843017578125,
0.08404541015625,
-0.0255126953125,
-0.0003421306610107422,
-0.0150604248046875,
-0.01453399658203125,
-0.0028018951416015625,
-0.017303466796875,
-0.07452392578125,
-0.00649261474609375,
-0.039459228515625,
0.012664794921875,
0.00238037109375,
0.0032176971435546875,
-0.031982421875,
0.04278564453125,
-0.02117919921875,
-0.012176513671875,
0.023651123046875,
-0.05010986328125,
0.041046142578125,
-0.0020618438720703125,
0.0271759033203125,
-0.0208282470703125,
-0.0081329345703125,
-0.03948974609375,
-0.037384033203125,
-0.00919342041015625,
0.0239105224609375,
0.031219482421875,
0.0167694091796875,
-0.065185546875,
-0.01377105712890625,
0.01230621337890625,
-0.0194091796875,
0.0299072265625,
-0.017120361328125,
0.0264129638671875,
-0.01393890380859375,
0.033966064453125,
0.00046062469482421875,
0.005329132080078125,
-0.00011152029037475586,
0.006740570068359375,
-0.007663726806640625,
0.040679931640625,
-0.043304443359375,
-0.016357421875,
-0.021759033203125,
-0.0233001708984375,
-0.04266357421875,
-0.033294677734375,
0.0086669921875,
0.034881591796875,
-0.00701904296875,
0.0212860107421875,
-0.047637939453125,
-0.047332763671875,
0.0399169921875,
0.0243682861328125,
-0.00786590576171875,
-0.0078582763671875,
0.057220458984375,
0.026153564453125,
-0.034393310546875,
0.0034008026123046875,
0.041473388671875,
0.06951904296875,
-0.00846099853515625,
0.0533447265625,
0.050079345703125,
-0.046722412109375,
0.055755615234375,
0.03997802734375,
-0.00803375244140625,
-0.0198516845703125,
0.04937744140625,
-0.0297393798828125,
-0.01568603515625,
0.0215911865234375,
-0.04302978515625,
0.0279083251953125,
0.0197601318359375,
-0.04205322265625,
0.00296783447265625,
-0.023651123046875,
0.046905517578125,
-0.031494140625,
0.0540771484375,
-0.0294647216796875,
-0.06109619140625,
0.025054931640625,
0.0244293212890625,
-0.036468505859375,
0.00852203369140625,
0.00203704833984375,
-0.001018524169921875,
-0.0093841552734375,
0.0162200927734375,
0.016082763671875,
0.0148468017578125,
-0.002208709716796875,
0.0487060546875,
-0.0219268798828125,
0.00467681884765625,
0.003406524658203125,
-0.0120391845703125,
0.07257080078125,
0.0087738037109375,
-0.0268707275390625,
-0.0007796287536621094,
-0.03350830078125,
-0.030181884765625,
0.0021991729736328125,
-0.006572723388671875,
0.046478271484375,
0.06536865234375,
-0.013214111328125,
-0.015594482421875,
-0.038482666015625,
0.030792236328125,
-0.046295166015625,
-0.002529144287109375,
-0.0241546630859375,
-0.0049285888671875,
-0.0020904541015625,
0.045166015625,
-0.019927978515625,
0.0193328857421875,
-0.01141357421875,
0.04754638671875,
0.017364501953125,
0.03375244140625,
0.01287078857421875,
-0.0226593017578125,
0.00287628173828125,
0.01171112060546875,
-0.0201873779296875,
-0.056427001953125,
-0.0194091796875,
0.048858642578125,
0.0682373046875,
-0.026336669921875,
-0.04345703125,
0.00876617431640625,
-0.0181732177734375,
-0.0118560791015625,
0.01395416259765625,
0.035430908203125,
-0.01062774658203125,
-0.018402099609375,
0.0076904296875,
0.0267791748046875,
0.0208892822265625,
0.015869140625,
-0.035247802734375,
0.004119873046875,
-0.004878997802734375,
-0.0265960693359375,
-0.0194854736328125,
-0.0206756591796875,
-0.0077667236328125,
-0.032440185546875,
0.00255584716796875,
-0.03277587890625,
0.0016641616821289062,
-0.039398193359375,
0.01483917236328125,
-0.0223236083984375,
0.0242156982421875,
-0.0180511474609375,
0.048065185546875,
-0.029693603515625,
-0.01375579833984375,
-0.007472991943359375,
0.001918792724609375,
0.057281494140625,
0.03167724609375,
-0.0248870849609375,
-0.01454925537109375,
-0.02301025390625,
0.004695892333984375,
0.04083251953125,
-0.0202484130859375,
-0.00841522216796875,
-0.028594970703125,
-0.0159759521484375,
0.0244293212890625,
-0.018768310546875,
0.01544952392578125,
0.0035839080810546875,
0.01885986328125,
-0.024017333984375,
0.051025390625,
0.0108184814453125,
0.0226287841796875,
-0.0017194747924804688,
0.04443359375,
0.0262908935546875,
0.021514892578125,
0.01418304443359375,
-0.056549072265625,
0.008575439453125,
0.016021728515625,
-0.0086212158203125,
-0.00506591796875,
0.037261962890625,
-0.046356201171875,
-0.0082244873046875,
-0.0016460418701171875,
0.011566162109375,
0.0231475830078125,
0.002468109130859375,
-0.0183868408203125,
-0.024658203125,
0.04034423828125,
0.01898193359375,
0.0098724365234375,
-0.060089111328125,
-0.025115966796875,
0.01342010498046875,
0.03955078125,
-0.0027828216552734375,
-0.05322265625,
-0.0131683349609375,
0.037506103515625,
-0.0028209686279296875,
0.035858154296875,
0.07159423828125,
-0.01081085205078125,
0.0267486572265625,
0.0250396728515625,
-0.0016431808471679688,
-0.0024547576904296875,
0.0217437744140625,
-0.0302581787109375,
-0.0098876953125,
0.07769775390625,
0.02557373046875,
-0.0367431640625,
0.05584716796875,
-0.037017822265625,
0.0167236328125,
-0.00756072998046875,
0.03656005859375,
-0.004913330078125,
-0.00023472309112548828,
0.0155792236328125,
-0.05828857421875,
-0.0308990478515625,
-0.01788330078125,
0.02044677734375,
0.0015497207641601562,
0.04901123046875,
0.00559234619140625,
-0.01715087890625,
0.0164337158203125,
-0.01776123046875,
-0.005706787109375,
-0.044769287109375,
0.043670654296875,
0.0115203857421875,
0.006122589111328125,
0.0212249755859375,
-0.01800537109375,
0.0215911865234375,
-0.043548583984375,
-0.0010042190551757812,
0.0274658203125,
-0.0128021240234375,
-0.053436279296875,
0.0675048828125,
-0.007099151611328125,
0.0229339599609375,
0.024200439453125,
-0.00963592529296875,
0.031036376953125,
0.0347900390625,
-0.0126495361328125,
0.0164642333984375,
0.0103912353515625,
-0.003093719482421875,
0.01413726806640625,
-0.02239990234375,
-0.00908660888671875,
0.04400634765625,
-0.034912109375,
0.01081085205078125,
-0.0111236572265625,
-0.00847625732421875,
-0.0097808837890625,
-0.0523681640625,
0.08343505859375,
-0.08575439453125,
0.01325225830078125,
-0.0135955810546875,
0.03173828125,
0.0175933837890625,
-0.0121002197265625,
0.0167388916015625,
-0.01410675048828125,
0.0269317626953125,
0.001613616943359375,
0.0026264190673828125,
-0.025115966796875,
-0.034515380859375,
-0.07757568359375,
0.0677490234375,
0.035003662109375,
0.01947021484375,
-0.01328277587890625,
0.0217132568359375,
-0.0268707275390625,
-0.00803375244140625,
-0.02813720703125,
0.0321044921875,
-0.0165557861328125,
0.0362548828125,
-0.048980712890625,
-0.01357269287109375,
0.006198883056640625,
0.037445068359375,
0.08941650390625,
0.0193634033203125,
-0.0272674560546875,
-0.0009937286376953125,
0.06005859375,
0.026702880859375,
-0.0009455680847167969,
0.040252685546875,
0.023284912109375,
0.05126953125,
0.053436279296875,
-0.021087646484375,
0.048248291015625,
-0.01033782958984375,
-0.00626373291015625,
0.039215087890625,
0.01342010498046875,
-0.0010290145874023438,
-0.0026416778564453125,
-0.02899169921875,
-0.025665283203125,
0.01007843017578125,
-0.00022721290588378906,
0.0240936279296875,
-0.005092620849609375,
0.041961669921875,
0.07342529296875,
-0.08642578125,
-0.034576416015625,
-0.031280517578125,
0.06591796875,
0.0266876220703125,
0.0291748046875,
0.038848876953125,
0.0245819091796875,
0.0274200439453125,
0.00980377197265625,
0.034515380859375,
0.029022216796875,
-0.02783203125,
0.0304107666015625,
0.03485107421875,
-0.0031337738037109375,
-0.048614501953125,
0.007572174072265625,
0.07928466796875,
0.05889892578125,
-0.0389404296875,
0.0181732177734375,
0.02618408203125,
0.026275634765625,
-0.01222991943359375,
-0.035491943359375,
0.00539398193359375,
-0.018707275390625,
0.0021209716796875,
-0.013336181640625,
-0.0205535888671875,
0.0223236083984375,
0.0701904296875,
0.007537841796875,
-0.00475311279296875,
-0.0675048828125,
-0.062744140625,
-0.049285888671875,
0.019866943359375,
-0.004619598388671875,
0.03997802734375,
0.0180511474609375,
0.0638427734375,
-0.0266265869140625,
-0.0159912109375,
0.0265045166015625,
0.019378662109375,
0.019439697265625,
-0.0279541015625,
0.007671356201171875,
-0.0256805419921875,
0.0115814208984375,
0.00626373291015625,
0.017425537109375,
0.0217437744140625,
0.0274505615234375,
0.01593017578125,
-0.00905609130859375,
-0.016510009765625,
0.036651611328125,
-0.0122833251953125,
0.028076171875,
-0.047027587890625,
0.0071258544921875,
-0.013885498046875,
-0.0161590576171875,
-0.00017535686492919922,
-0.011260986328125,
0.0235137939453125,
-0.045562744140625,
0.06549072265625,
-0.00864410400390625,
-0.00008893013000488281,
0.0311737060546875,
0.005573272705078125,
0.0261993408203125,
-0.0189056396484375,
-0.060333251953125,
-0.000579833984375,
-0.040771484375,
-0.07513427734375,
0.034088134765625,
0.0355224609375,
-0.01409912109375,
0.006977081298828125,
-0.0094146728515625,
-0.0328369140625,
-0.0006270408630371094,
0.035064697265625,
0.01483917236328125,
0.0281219482421875,
0.00547027587890625,
-0.0164337158203125,
-0.09149169921875,
-0.049652099609375,
-0.031341552734375,
0.01004791259765625,
0.028594970703125,
-0.0182037353515625,
0.046478271484375,
0.0308990478515625,
-0.05401611328125,
0.0265655517578125,
-0.0797119140625,
-0.043670654296875,
0.058624267578125,
-0.014862060546875,
-0.029876708984375,
0.0038909912109375,
-0.023590087890625,
0.02197265625,
0.0230865478515625,
0.004730224609375,
0.0208587646484375,
-0.047576904296875,
0.0230712890625,
0.00016069412231445312,
0.0282745361328125,
-0.01190185546875,
-0.02777099609375,
-0.048065185546875,
-0.005771636962890625,
0.03179931640625,
0.017578125,
-0.0228271484375,
0.01995849609375,
0.00250244140625,
-0.0248260498046875,
0.04095458984375,
-0.03521728515625,
0.03546142578125,
0.0296478271484375,
-0.00434112548828125,
0.029144287109375,
0.0294342041015625,
-0.033782958984375,
0.03912353515625,
0.00679779052734375,
0.0241851806640625,
0.00379180908203125,
-0.05242919921875,
0.00988006591796875,
0.020294189453125,
0.07916259765625,
0.019256591796875,
0.034454345703125,
-0.0419921875,
0.006137847900390625,
-0.0093536376953125,
-0.03369140625,
-0.022216796875,
-0.050933837890625,
0.00572967529296875,
0.0272216796875,
-0.0282135009765625,
0.01265716552734375,
-0.03521728515625,
-0.0125579833984375,
-0.0097808837890625,
-0.002933502197265625,
-0.0014362335205078125,
-0.013763427734375,
0.0270843505859375,
0.014495849609375,
-0.01000213623046875,
0.044647216796875,
-0.00586700439453125,
0.0265350341796875,
-0.043365478515625,
-0.034271240234375,
-0.01206207275390625,
0.044158935546875,
-0.0200653076171875,
0.026275634765625,
0.037017822265625,
-0.029754638671875,
-0.01326751708984375,
0.045135498046875,
0.0094451904296875,
0.09039306640625,
-0.0049285888671875,
-0.004970550537109375,
0.02081298828125,
0.002376556396484375,
-0.01525115966796875,
-0.0703125,
0.01291656494140625,
-0.057647705078125,
-0.0008344650268554688,
-0.050262451171875,
0.038482666015625,
0.044586181640625,
-0.011688232421875,
-0.018280029296875,
0.05462646484375,
-0.0174407958984375,
-0.023468017578125,
-0.06268310546875,
-0.0027790069580078125,
0.00814056396484375,
-0.01110076904296875,
-0.022613525390625,
-0.0401611328125,
-0.0361328125,
0.035858154296875,
0.016265869140625,
0.00013971328735351562,
0.03741455078125,
0.0171661376953125,
-0.035400390625,
-0.003002166748046875,
-0.028228759765625,
-0.023681640625,
0.028656005859375,
-0.032012939453125,
0.02239990234375,
0.0220184326171875,
-0.06463623046875,
-0.076171875,
-0.02435302734375,
0.031768798828125,
0.01143646240234375,
-0.07952880859375,
-0.01364898681640625,
0.0033168792724609375,
0.030426025390625,
0.01328277587890625,
0.0082855224609375,
-0.0328369140625,
-0.0089111328125,
-0.0038852691650390625,
-0.029022216796875,
-0.005283355712890625,
0.0199737548828125,
-0.059234619140625,
-0.0166778564453125,
-0.006439208984375,
-0.01105499267578125,
0.0229949951171875,
-0.03466796875,
-0.0362548828125,
-0.00206756591796875,
-0.038787841796875,
-0.00391387939453125,
-0.045928955078125,
0.007190704345703125,
0.048980712890625,
-0.028778076171875,
0.0150604248046875,
-0.005886077880859375,
0.011077880859375,
0.025054931640625,
-0.00994110107421875,
0.0087890625,
0.0243377685546875,
-0.005199432373046875,
0.0016841888427734375,
0.0300445556640625,
0.01377105712890625,
0.00630950927734375,
0.001621246337890625,
-0.00037670135498046875,
0.007965087890625,
-0.00438690185546875,
-0.0001976490020751953,
0.02081298828125,
0.01263427734375,
-0.00616455078125,
0.05267333984375,
-0.006374359130859375,
0.0623779296875,
0.00624847412109375,
0.062164306640625,
-0.052398681640625,
-0.004901885986328125,
-0.00835418701171875,
-0.050933837890625,
0.00389862060546875,
0.047027587890625,
0.0416259765625,
-0.0076446533203125,
0.0364990234375,
0.049835205078125,
0.05242919921875,
-0.00455474853515625
] |
77a31f94f5883a57c5553d7be8ec71f9979bc234 | Wordpress Stackexchange
Q: WP Rest API Querying Custom Posts by ACF fields I have custom posts that represent real estate property and they have an ACF field of price. I'm trying to use the WP Rest API to query a certain price range, but to no avail.
E.g. querying the following URL returns all items rather than specific ones:
http://localhost/wp-json/wp/v2/property?filter[meta_query][relation]=AND&filter[meta_query][0][key]=price&filter[meta_query][0][value]=0&filter[meta_query][0][compare]=>&filter[meta_query][1][key]=price&filter[meta_query][1][value]=2681724&filter[meta_query][1][compare]=<
Even querying a specific price returns all items, e.g.:
http://localhost/wp-json/wp/v2/property?filter[meta_key]=price&filter[meta_value]=3000000
I've already added the relevant variables via the rest_query_vars filter:
function bones_allow_meta_query( $vars ) {
$vars[] = 'meta_key';
$vars[] = 'meta_value';
$vars[] = 'meta_query';
return $vars;
}
add_filter( 'rest_query_vars', 'bones_allow_meta_query' );
It seems as though the filter query is completely ignored. What am I doing wrong?
A: Couldn't get it to work. The only solution that I found was to setup a custom endpoint:
http://v2.wp-api.org/extending/adding/
| Q: WP Rest API Querying Custom Posts by ACF fields I have custom posts that represent real estate property and they have an ACF field of price. I'm trying to use the WP Rest API to query a certain price range, but to no avail.
E.g. querying the following URL returns all items rather than specific ones:
http://localhost/wp-json/wp/v2/property?filter[meta_query][relation]=AND&filter[meta_query][0][key]=price&filter[meta_query][0][value]=0&filter[meta_query][0][compare]=>&filter[meta_query][1][key]=price&filter[meta_query][1][value]=2681724&filter[meta_query][1][compare]=<
Even querying a specific price returns all items, e.g.:
http://localhost/wp-json/wp/v2/property?filter[meta_key]=price&filter[meta_value]=3000000
I've already added the relevant variables via the rest_query_vars filter:
function bones_allow_meta_query( $vars ) {
$vars[] = 'meta_key';
$vars[] = 'meta_value';
$vars[] = 'meta_query';
return $vars;
}
add_filter( 'rest_query_vars', 'bones_allow_meta_query' );
It seems as though the filter query is completely ignored. What am I doing wrong?
A: Couldn't get it to work. The only solution that I found was to setup a custom endpoint:
http://v2.wp-api.org/extending/adding/
| wordpress | {
"language": "en",
"length": 133,
"provenance": "stackexchange_00019.jsonl.gz:471047",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249014"
} | [
0.0209197998046875,
-0.024261474609375,
0.018218994140625,
0.01092529296875,
-0.0221710205078125,
-0.0219573974609375,
0.03466796875,
-0.0164031982421875,
0.0222320556640625,
0.032562255859375,
-0.007717132568359375,
-0.005977630615234375,
0.0093994140625,
-0.0333251953125,
-0.023712158203125,
-0.01522064208984375,
0.04132080078125,
0.008026123046875,
0.01538848876953125,
-0.00960540771484375,
-0.006683349609375,
0.007083892822265625,
0.0302886962890625,
0.057403564453125,
0.03533935546875,
-0.019073486328125,
0.039276123046875,
-0.0167999267578125,
0.05035400390625,
0.00699615478515625,
0.02520751953125,
-0.051849365234375,
0.00740814208984375,
0.03515625,
-0.0099029541015625,
-0.0213623046875,
0.042999267578125,
0.00589752197265625,
0.00609588623046875,
0.02130126953125,
0.03857421875,
-0.0211029052734375,
-0.07080078125,
0.041595458984375,
-0.0584716796875,
-0.024505615234375,
0.0164642333984375,
-0.0006170272827148438,
0.046539306640625,
0.032470703125,
-0.02423095703125,
-0.0085296630859375,
-0.015869140625,
-0.005401611328125,
-0.020782470703125,
-0.041351318359375,
0.0655517578125,
-0.0369873046875,
0.0400390625,
-0.06353759765625,
-0.0594482421875,
-0.020965576171875,
0.049530029296875,
-0.003406524658203125,
-0.002796173095703125,
-0.035308837890625,
0.0191497802734375,
0.01227569580078125,
-0.002483367919921875,
-0.0188446044921875,
0.011688232421875,
0.0280303955078125,
0.01091766357421875,
-0.0091094970703125,
-0.020477294921875,
-0.033233642578125,
0.007747650146484375,
-0.0305633544921875,
0.01148223876953125,
0.0018033981323242188,
0.006988525390625,
0.01004791259765625,
-0.04638671875,
0.045074462890625,
-0.03753662109375,
0.04925537109375,
-0.0264892578125,
-0.0221099853515625,
-0.042724609375,
-0.025970458984375,
-0.02789306640625,
-0.086181640625,
-0.07952880859375,
0.016693115234375,
0.02655029296875,
-0.0300750732421875,
-0.005828857421875,
0.002269744873046875,
-0.01195526123046875,
0.0081939697265625,
0.0129852294921875,
-0.022613525390625,
0.0110626220703125,
-0.0124359130859375,
0.0295562744140625,
0.033111572265625,
-0.01226806640625,
0.0307159423828125,
0.07574462890625,
0.0168914794921875,
0.024078369140625,
0.0770263671875,
-0.00724029541015625,
0.0284271240234375,
-0.043243408203125,
-0.0246124267578125,
-0.0176849365234375,
-0.04150390625,
-0.03582763671875,
-0.0478515625,
-0.01416015625,
-0.0008845329284667969,
0.043792724609375,
0.003368377685546875,
0.03240966796875,
0.04290771484375,
-0.0199432373046875,
-0.035308837890625,
-0.088134765625,
0.0540771484375,
0.0196380615234375,
0.012725830078125,
-0.0026836395263671875,
0.01776123046875,
-0.04266357421875,
-0.025848388671875,
0.050048828125,
0.006305694580078125,
0.005222320556640625,
0.00738525390625,
0.050750732421875,
-0.0077972412109375,
-0.010711669921875,
0.008392333984375,
-0.0260467529296875,
0.0131378173828125,
0.030975341796875,
0.00992584228515625,
-0.0286407470703125,
-0.04058837890625,
-0.0099334716796875,
0.01229095458984375,
0.0372314453125,
0.0151519775390625,
-0.00841522216796875,
-0.01235198974609375,
0.079345703125,
-0.045166015625,
-0.039215087890625,
-0.05804443359375,
0.0191802978515625,
-0.0193939208984375,
-0.01513671875,
-0.031982421875,
-0.028045654296875,
-0.007732391357421875,
-0.0196685791015625,
0.004680633544921875,
0.01971435546875,
0.062469482421875,
0.0142364501953125,
-0.0307769775390625,
-0.0252838134765625,
0.0008959770202636719,
-0.0202178955078125,
-0.00042319297790527344,
0.016021728515625,
0.061187744140625,
0.0209197998046875,
-0.0286407470703125,
-0.020477294921875,
-0.04595947265625,
0.09228515625,
-0.0278472900390625,
-0.05181884765625,
0.0274505615234375,
0.007114410400390625,
0.017364501953125,
-0.00296783447265625,
-0.0124664306640625,
0.06939697265625,
0.044586181640625,
-0.007282257080078125,
0.0260162353515625,
-0.004779815673828125,
-0.052825927734375,
0.0016269683837890625,
-0.021026611328125,
-0.0038661956787109375,
0.02154541015625,
-0.016571044921875,
0.01535797119140625,
0.0220489501953125,
-0.0007195472717285156,
0.0254364013671875,
-0.022216796875,
0.0086212158203125,
0.033905029296875,
-0.07257080078125,
-0.01367950439453125,
0.0491943359375,
-0.0111083984375,
-0.047149658203125,
0.058135986328125,
0.0258636474609375,
0.00603485107421875,
0.033416748046875,
0.040863037109375,
0.002849578857421875,
0.0167236328125,
0.03265380859375,
-0.0257568359375,
0.02130126953125,
0.057769775390625,
0.0633544921875,
0.005985260009765625,
-0.010528564453125,
-0.0131072998046875,
0.07928466796875,
0.0053558349609375,
0.015167236328125,
0.0162811279296875,
0.024261474609375,
0.0009822845458984375,
-0.01629638671875,
0.0157470703125,
0.0080718994140625,
-0.0264892578125,
-0.0108184814453125,
0.038665771484375,
0.038055419921875,
-0.003795623779296875,
0.0022125244140625,
0.00013756752014160156,
0.048583984375,
-0.0218963623046875,
-0.0003833770751953125,
-0.02313232421875,
0.00020444393157958984,
0.0244598388671875,
-0.0296783447265625,
-0.025482177734375,
0.0269012451171875,
-0.0325927734375,
-0.0185699462890625,
0.0438232421875,
-0.005580902099609375,
-0.007114410400390625,
-0.0025463104248046875,
0.00711822509765625,
-0.01153564453125,
-0.03857421875,
-0.01355743408203125,
-0.0167999267578125,
0.0208740234375,
0.0172576904296875,
0.046142578125,
0.055023193359375,
-0.0266265869140625,
-0.00011658668518066406,
0.01386260986328125,
0.06158447265625,
0.004573822021484375,
-0.0204010009765625,
-0.026519775390625,
-0.0017833709716796875,
-0.048980712890625,
0.035247802734375,
0.034912109375,
-0.02569580078125,
0.0045318603515625,
0.0224151611328125,
-0.054718017578125,
0.0008769035339355469,
-0.01311492919921875,
-0.029632568359375,
0.004169464111328125,
0.030548095703125,
0.0306854248046875,
0.0239410400390625,
0.0528564453125,
0.0029850006103515625,
0.00598907470703125,
0.016754150390625,
-0.005706787109375,
-0.0217742919921875,
-0.0201263427734375,
-0.02783203125,
0.03302001953125,
-0.04437255859375,
0.0048828125,
0.051971435546875,
-0.00933074951171875,
0.007694244384765625,
0.007068634033203125,
-0.01425933837890625,
0.0018815994262695312,
0.0240020751953125,
-0.0089111328125,
-0.0260772705078125,
-0.0207672119140625,
0.004741668701171875,
0.0262603759765625,
-0.006099700927734375,
0.0252532958984375,
-0.016448974609375,
-0.00823211669921875,
0.00341796875,
-0.12078857421875,
-0.10498046875,
0.057403564453125,
-0.032928466796875,
-0.0184783935546875,
-0.0279083251953125,
-0.039154052734375,
0.006702423095703125,
-0.018310546875,
-0.0285491943359375,
0.0015048980712890625,
-0.009124755859375,
-0.0738525390625,
-0.0419921875,
-0.07183837890625,
-0.004451751708984375,
-0.00643157958984375,
-0.00506591796875,
-0.0030670166015625,
0.057647705078125,
0.0113525390625,
-0.03594970703125,
0.0203857421875,
0.0123748779296875,
-0.00847625732421875,
0.00274658203125,
0.0117034912109375,
-0.0237884521484375,
0.03582763671875,
-0.02777099609375,
0.0689697265625,
0.055511474609375,
-0.039703369140625,
0.009979248046875,
-0.0216064453125,
-0.003879547119140625,
-0.0237579345703125,
0.0256195068359375,
0.0298919677734375,
-0.018157958984375,
0.008819580078125,
-0.03936767578125,
-0.057708740234375,
-0.0215301513671875,
-0.05828857421875,
0.01187896728515625,
0.0249176025390625,
0.025726318359375,
-0.05084228515625,
0.06292724609375,
-0.0252838134765625,
-0.035675048828125,
0.027099609375,
-0.05230712890625,
0.00859832763671875,
-0.0019741058349609375,
-0.009918212890625,
-0.003391265869140625,
0.03826904296875,
-0.0128173828125,
-0.00336456298828125,
-0.000051975250244140625,
-0.017242431640625,
-0.03173828125,
-0.03466796875,
-0.0787353515625,
0.003490447998046875,
0.08123779296875,
0.036041259765625,
0.0355224609375,
-0.035980224609375,
-0.06561279296875,
-0.052886962890625,
0.057281494140625,
-0.0252227783203125,
-0.0164947509765625,
-0.0133056640625,
-0.001186370849609375,
-0.005619049072265625,
-0.0301971435546875,
-0.0005464553833007812,
0.0026798248291015625,
-0.0291900634765625,
-0.00919342041015625,
-0.032379150390625,
-0.0269622802734375,
-0.0081024169921875,
-0.0345458984375,
-0.018798828125,
-0.025787353515625,
0.048187255859375,
-0.046478271484375,
0.01953125,
-0.01497650146484375,
0.0294952392578125,
-0.056396484375,
-0.0022258758544921875,
-0.01812744140625,
-0.06658935546875,
-0.038177490234375,
0.032196044921875,
0.0692138671875,
0.0116119384765625,
-0.04388427734375,
-0.0017347335815429688,
0.052001953125,
0.00408935546875,
0.010162353515625,
-0.00604248046875,
-0.00275421142578125,
0.0070037841796875,
-0.00885009765625,
-0.020538330078125,
-0.030548095703125,
-0.0158233642578125,
-0.007488250732421875,
-0.00789642333984375,
0.0184326171875,
-0.01245880126953125,
-0.0132293701171875,
-0.005588531494140625,
-0.017333984375,
-0.055816650390625,
-0.0118408203125,
-0.0216064453125,
-0.005641937255859375,
-0.0246734619140625,
-0.0248260498046875,
0.01302337646484375,
-0.057586669921875,
0.01065826416015625,
0.02166748046875,
-0.00457763671875,
0.007648468017578125,
0.040374755859375,
0.02105712890625,
-0.027801513671875,
-0.0352783203125,
-0.00130462646484375,
0.0039825439453125,
0.0020313262939453125,
0.042633056640625,
-0.0157318115234375,
-0.007587432861328125,
0.0733642578125,
-0.0300750732421875,
0.022735595703125,
-0.01076507568359375,
0.01953125,
0.00733184814453125,
-0.0091705322265625,
0.025299072265625,
0.037628173828125,
-0.033935546875,
0.005397796630859375,
0.0034332275390625,
-0.020111083984375,
0.041046142578125,
0.022491455078125,
-0.03564453125,
0.0269317626953125,
0.0034160614013671875,
-0.007389068603515625,
0.006282806396484375,
0.026641845703125,
0.0253448486328125,
-0.0017099380493164062,
0.01006317138671875,
-0.01055908203125,
-0.020111083984375,
0.036895751953125,
-0.038177490234375,
0.06719970703125,
-0.07501220703125,
0.05255126953125,
-0.0179290771484375,
-0.01316070556640625,
-0.050750732421875,
-0.0026607513427734375,
0.035003662109375,
-0.03717041015625,
-0.061126708984375,
-0.023468017578125,
-0.0092926025390625,
0.0226898193359375,
0.049774169921875,
-0.0009207725524902344,
0.029022216796875,
0.058258056640625,
-0.0212249755859375,
0.006237030029296875,
0.036285400390625,
-0.015289306640625,
-0.032501220703125,
0.05792236328125,
-0.0024566650390625,
0.0207061767578125,
-0.0260772705078125,
0.100830078125,
0.006130218505859375,
0.04547119140625,
-0.02862548828125,
0.0289764404296875,
0.0174407958984375,
0.019012451171875,
0.01003265380859375,
-0.0156707763671875,
0.01763916015625,
-0.00431060791015625,
0.0054779052734375,
-0.005626678466796875,
-0.0203704833984375,
-0.0024814605712890625,
0.01322174072265625,
-0.0300445556640625,
-0.003734588623046875,
0.038055419921875,
-0.0017690658569335938,
-0.03411865234375,
0.007358551025390625,
0.005565643310546875,
-0.012481689453125,
-0.0411376953125,
-0.0016622543334960938,
0.0328369140625,
0.0307159423828125,
-0.005954742431640625,
0.007297515869140625,
0.0255279541015625,
0.06243896484375,
-0.052215576171875,
0.0226898193359375,
0.005847930908203125,
-0.001316070556640625,
-0.0186004638671875,
-0.039398193359375,
-0.039459228515625,
0.00656890869140625,
-0.01415252685546875,
-0.0136871337890625,
-0.0055694580078125,
0.03668212890625,
-0.0005974769592285156,
0.0294647216796875,
-0.040069580078125,
-0.0103912353515625,
-0.0250091552734375,
-0.0018453598022460938,
0.047637939453125,
0.017913818359375,
0.019866943359375,
-0.0181732177734375,
-0.015899658203125,
-0.0294952392578125,
0.052459716796875,
0.0194091796875,
-0.00897216796875,
-0.02886962890625,
0.0028095245361328125,
0.0282440185546875,
0.00007218122482299805,
-0.0262451171875,
0.0035915374755859375,
-0.0184783935546875,
-0.01361083984375,
0.0008664131164550781,
-0.03143310546875,
0.07281494140625,
-0.0188751220703125,
0.053741455078125,
0.003086090087890625,
0.01190185546875,
-0.02490234375,
-0.0022792816162109375,
0.024444580078125,
-0.0303497314453125,
-0.047119140625,
-0.0025577545166015625,
-0.06683349609375,
0.021392822265625,
0.050048828125,
-0.01537322998046875,
0.032958984375,
-0.01395416259765625,
-0.0087127685546875,
-0.02044677734375,
-0.0026073455810546875,
-0.0259857177734375,
0.039794921875,
-0.00881195068359375,
0.016632080078125,
0.0419921875,
-0.0228424072265625,
-0.041046142578125,
0.02459716796875,
0.01139068603515625,
0.02587890625,
0.00458526611328125,
0.0013055801391601562,
0.01363372802734375,
0.076171875,
0.0077667236328125,
0.06414794921875,
0.00458526611328125,
0.0185699462890625,
0.0428466796875,
-0.0112457275390625,
0.0232696533203125,
-0.0116729736328125,
-0.005756378173828125,
-0.031005859375,
-0.00791168212890625,
-0.0014734268188476562,
-0.00966644287109375,
0.022857666015625,
0.046142578125,
0.0186767578125,
-0.07635498046875,
0.004322052001953125,
-0.01458740234375,
-0.03173828125,
0.0251007080078125,
0.010772705078125,
0.00007534027099609375,
-0.0011987686157226562,
-0.033782958984375,
0.001735687255859375,
-0.036102294921875,
-0.002132415771484375,
0.03094482421875,
0.003780364990234375,
-0.01308441162109375,
0.01434326171875,
-0.0275421142578125,
-0.01313018798828125,
-0.0162506103515625,
0.00005066394805908203,
-0.01561737060546875,
0.008697509765625,
0.0103607177734375,
0.01189422607421875,
-0.051177978515625,
-0.08251953125,
-0.0301513671875,
-0.013702392578125,
-0.06402587890625,
0.00812530517578125,
0.032867431640625,
0.06982421875,
0.036956787109375,
0.023162841796875,
-0.0224456787109375,
0.0243377685546875,
0.0191497802734375,
-0.007274627685546875,
-0.060333251953125,
-0.0122833251953125,
0.056121826171875,
-0.037506103515625,
0.037139892578125,
0.035858154296875,
-0.03790283203125,
0.003284454345703125,
0.002750396728515625,
0.07501220703125,
-0.007701873779296875,
-0.031524658203125,
0.04541015625,
-0.00966644287109375,
-0.0299835205078125,
0.038543701171875,
0.0164794921875,
-0.041900634765625,
-0.02667236328125,
0.031036376953125,
-0.03680419921875,
-0.03143310546875,
0.032012939453125,
-0.01328277587890625,
0.035186767578125,
-0.0008158683776855469,
-0.039947509765625,
-0.0009756088256835938,
0.040130615234375,
-0.0196075439453125,
0.021697998046875,
-0.0262298583984375,
0.041107177734375,
0.01544189453125,
0.02899169921875,
-0.06610107421875,
-0.03179931640625,
0.005611419677734375,
0.0697021484375,
0.05950927734375,
0.022674560546875,
-0.0633544921875,
-0.0283966064453125,
-0.00982666015625,
0.016845703125,
-0.0182952880859375,
0.06585693359375,
0.01560211181640625,
0.0675048828125,
0.040069580078125,
-0.0592041015625,
0.0171661376953125,
-0.02850341796875,
0.0009512901306152344,
0.04522705078125,
0.0239410400390625,
0.046966552734375,
-0.016693115234375,
0.01080322265625,
0.031494140625,
-0.020721435546875,
0.00914764404296875,
-0.07489013671875,
-0.000537872314453125,
0.01702880859375,
0.00879669189453125,
0.004291534423828125,
0.0019197463989257812,
-0.0085296630859375,
0.02850341796875,
0.01056671142578125,
0.012969970703125,
0.051544189453125,
0.0252685546875,
-0.005077362060546875,
-0.022125244140625,
0.0162811279296875,
-0.007633209228515625,
-0.0219268798828125,
0.01308441162109375,
0.0021800994873046875,
0.015869140625,
-0.02117919921875,
0.0189361572265625,
0.0093536376953125,
0.01715087890625,
-0.0253143310546875,
-0.0201873779296875,
0.017242431640625,
0.0164794921875,
0.0003707408905029297,
0.01194000244140625,
0.01190948486328125,
0.0261688232421875,
0.04119873046875,
-0.040435791015625,
0.0253143310546875,
0.0205078125,
0.0064849853515625,
0.0003376007080078125,
0.044586181640625,
-0.03619384765625,
0.00736236572265625,
-0.0194091796875,
-0.0224761962890625,
0.00600433349609375,
0.0506591796875,
0.01412200927734375,
0.042205810546875,
-0.034423828125,
-0.019989013671875,
-0.024078369140625,
0.020263671875,
0.018280029296875,
0.017852783203125,
-0.0174407958984375,
0.0016565322875976562,
0.0048370361328125,
0.00997161865234375,
0.018768310546875,
0.0833740234375,
0.056427001953125,
0.00461578369140625,
-0.0189361572265625,
0.0182952880859375,
0.054718017578125,
-0.037567138671875,
-0.041534423828125,
-0.06390380859375,
-0.00405120849609375,
0.0073089599609375,
0.002384185791015625,
0.0286102294921875,
-0.0274810791015625,
0.01010894775390625,
0.0264892578125,
-0.0016374588012695312,
0.01335906982421875,
-0.03631591796875,
-0.0399169921875,
0.0092926025390625,
0.005886077880859375,
0.034881591796875,
0.011077880859375,
0.0128936767578125,
-0.0290374755859375,
-0.033538818359375,
-0.00907135009765625,
0.0166778564453125,
0.0027294158935546875,
0.01690673828125,
0.005161285400390625,
-0.033294677734375,
0.0285797119140625,
0.0011138916015625,
0.018035888671875,
-0.021331787109375,
-0.00543975830078125,
-0.009521484375,
-0.038665771484375,
-0.0230560302734375,
-0.0026454925537109375,
0.0270843505859375,
-0.0164794921875,
0.10186767578125,
-0.046844482421875,
-0.00031638145446777344,
-0.02813720703125,
0.0029087066650390625,
-0.00998687744140625,
0.0020580291748046875,
-0.01971435546875,
0.0261077880859375,
-0.0031833648681640625,
-0.00835418701171875,
0.02398681640625,
-0.03179931640625,
0.06524658203125,
-0.063720703125,
-0.01399993896484375,
-0.04541015625,
0.0297088623046875,
-0.035675048828125,
-0.006378173828125,
-0.045989990234375,
-0.0294342041015625,
-0.052764892578125,
-0.0455322265625,
0.0265350341796875,
0.0074462890625,
0.037872314453125,
0.02484130859375,
0.030364990234375,
-0.0005788803100585938,
0.029144287109375,
-0.0291748046875,
0.07989501953125,
0.038665771484375,
-0.0328369140625,
0.081787109375,
-0.01494598388671875,
-0.0299530029296875,
0.020538330078125,
0.0009937286376953125,
-0.07403564453125,
0.0214080810546875,
0.0213165283203125,
-0.03271484375,
-0.0135955810546875,
0.02490234375,
-0.0013980865478515625,
0.01027679443359375,
-0.0086212158203125,
-0.01003265380859375,
-0.023956298828125,
0.0019855499267578125,
-0.0175323486328125,
-0.03192138671875,
0.00446319580078125,
0.01177978515625,
0.00676727294921875,
-0.0023212432861328125,
0.01611328125,
-0.008544921875,
0.0185089111328125,
-0.0019025802612304688,
-0.0290069580078125,
0.04052734375,
-0.04345703125,
-0.02545166015625,
0.00917816162109375,
0.0015878677368164062,
-0.0011873245239257812,
0.029449462890625,
0.0045318603515625,
0.018402099609375,
-0.00189971923828125,
-0.00307464599609375,
0.03131103515625,
0.00012671947479248047,
0.0144500732421875,
-0.0128326416015625,
-0.00684356689453125,
-0.007419586181640625,
0.017669677734375,
0.0187835693359375,
0.03643798828125,
-0.01222991943359375,
-0.0216064453125,
0.02081298828125,
-0.0280609130859375,
-0.04510498046875,
0.0406494140625,
-0.0728759765625,
-0.01425933837890625,
-0.0220184326171875,
0.036590576171875,
0.048248291015625,
-0.0264892578125,
-0.09466552734375,
0.022796630859375,
-0.0250701904296875,
-0.037017822265625,
-0.035186767578125,
-0.050018310546875,
0.00414276123046875,
0.024688720703125,
-0.01540374755859375,
-0.04559326171875,
-0.0828857421875,
0.0203857421875,
0.033966064453125,
0.021453857421875,
0.0177154541015625,
0.0005245208740234375,
-0.076904296875,
0.0019006729125976562,
-0.026885986328125,
0.044891357421875,
-0.01401519775390625,
-0.01357269287109375,
0.0239410400390625,
0.00957489013671875,
-0.043548583984375,
0.016754150390625,
0.004932403564453125,
0.0038166046142578125,
0.0025157928466796875,
-0.023468017578125,
-0.03021240234375,
-0.03399658203125,
0.05511474609375,
0.0175323486328125,
0.0103302001953125,
-0.0205230712890625,
0.002841949462890625,
-0.0204315185546875,
0.0233917236328125,
-0.0242767333984375,
-0.015472412109375,
-0.034759521484375,
-0.0167236328125,
-0.01195526123046875,
0.0298919677734375,
0.039703369140625,
-0.04376220703125,
0.02838134765625,
-0.0362548828125,
0.02392578125,
-0.0091094970703125,
0.0013170242309570312,
-0.01995849609375,
0.04083251953125,
-0.034332275390625,
-0.033966064453125,
-0.0081329345703125,
0.0188140869140625,
-0.011749267578125,
-0.008056640625,
-0.043914794921875,
-0.0239410400390625,
0.0189361572265625,
0.02752685546875,
-0.007778167724609375,
-0.0145721435546875,
0.01152801513671875,
0.015472412109375,
-0.036102294921875,
0.01441192626953125,
0.0157928466796875,
0.03106689453125,
-0.0110015869140625,
-0.0030059814453125,
0.0205535888671875,
0.021087646484375,
0.006046295166015625,
0.08966064453125,
0.0131072998046875,
0.023529052734375,
-0.0033473968505859375,
-0.019195556640625,
0.0182342529296875,
-0.006488800048828125,
0.0037555694580078125,
0.00798797607421875,
-0.00991058349609375,
-0.02471923828125,
-0.00923919677734375,
0.01389312744140625,
0.0027790069580078125,
0.01165008544921875
] |
10b2dfc23b309d14f737d021f221b6d0133bb771 | Wordpress Stackexchange
Q: PHP Coding Standards, Widgets and Sanitization I have an issue with custom widgets and WordPress Coding Standards. When you create a custom widget, your class should have a "widget" method that will display the widget. Something like:
<?php
public function widget( $args, $instance ) {
echo $args['before_widget'];
?> <span><?php echo esc_html( 'Great widget', 'text-domain' ); ?></span> <?php
echo $args['after_widget'];
}
?>
While this is perfectly functional, this will not pass PHP code sniffer tests with WordPress coding standards because $args['after_widget']; and $args['before_widget']; are not escaped...
What am I doing wrong?
A: These arguments contain arbitrary HTML and cannot be properly escaped. This is essentially a limitation on how Widgets code was designed and you can see in core Widget classes that no escaping is done on these.
Lessons to learn:
*
*WP core doesn't consistently adhere to its own coding standards (and getting there isn't considered worth targeted effort);
*passing around chunks of HTML is bad idea, in your own code pass data and render appropriately with proper escaping.
| Q: PHP Coding Standards, Widgets and Sanitization I have an issue with custom widgets and WordPress Coding Standards. When you create a custom widget, your class should have a "widget" method that will display the widget. Something like:
<?php
public function widget( $args, $instance ) {
echo $args['before_widget'];
?> <span><?php echo esc_html( 'Great widget', 'text-domain' ); ?></span> <?php
echo $args['after_widget'];
}
?>
While this is perfectly functional, this will not pass PHP code sniffer tests with WordPress coding standards because $args['after_widget']; and $args['before_widget']; are not escaped...
What am I doing wrong?
A: These arguments contain arbitrary HTML and cannot be properly escaped. This is essentially a limitation on how Widgets code was designed and you can see in core Widget classes that no escaping is done on these.
Lessons to learn:
*
*WP core doesn't consistently adhere to its own coding standards (and getting there isn't considered worth targeted effort);
*passing around chunks of HTML is bad idea, in your own code pass data and render appropriately with proper escaping.
A: This is a problem with overly strict coding standards, not with how you should write wordpress code. In this context both parameters are assumed to be valid HTML (they are defined in sidebar registration time).
Anyway in most tools like that there is a way to instruct the linter/sniffer to ignore that line or function.
BTW the standards you are talking about are probably the wordpress.com VIP standards, not the wordpress one - https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/
| wordpress | {
"language": "en",
"length": 245,
"provenance": "stackexchange_00019.jsonl.gz:471048",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249015"
} | [
0.082763671875,
-0.022979736328125,
0.01507568359375,
-0.043975830078125,
0.00970458984375,
-0.0206756591796875,
0.06341552734375,
-0.01235198974609375,
-0.0110015869140625,
0.019989013671875,
-0.0013675689697265625,
-0.0113067626953125,
-0.0265960693359375,
-0.02593994140625,
-0.002410888671875,
-0.031982421875,
0.0027408599853515625,
0.0203704833984375,
0.0115509033203125,
-0.03521728515625,
0.00748443603515625,
-0.03643798828125,
0.0165863037109375,
0.02105712890625,
0.00789642333984375,
-0.031707763671875,
0.10150146484375,
-0.008453369140625,
0.0078125,
-0.007190704345703125,
0.0245361328125,
-0.0340576171875,
0.0267181396484375,
0.08038330078125,
-0.09783935546875,
-0.005496978759765625,
-0.0172119140625,
0.02325439453125,
-0.0018205642700195312,
0.0237884521484375,
0.00751495361328125,
-0.0233612060546875,
0.034271240234375,
-0.023956298828125,
0.0030689239501953125,
0.0003502368927001953,
0.0120391845703125,
-0.0228118896484375,
0.0280914306640625,
0.0005974769592285156,
-0.006206512451171875,
-0.034759521484375,
0.005428314208984375,
-0.0465087890625,
-0.0089111328125,
0.00447845458984375,
0.0032062530517578125,
-0.037109375,
0.0322265625,
0.0277862548828125,
-0.024871826171875,
-0.0298614501953125,
0.00800323486328125,
-0.057708740234375,
0.012786865234375,
0.0025310516357421875,
-0.005840301513671875,
0.00025272369384765625,
-0.0091705322265625,
-0.004215240478515625,
0.0200347900390625,
-0.031829833984375,
-0.006622314453125,
-0.046142578125,
0.0112457275390625,
0.03338623046875,
-0.01335906982421875,
-0.01776123046875,
0.0103302001953125,
0.015350341796875,
0.056365966796875,
0.0224456787109375,
-0.0245513916015625,
-0.0160675048828125,
0.03125,
0.00408935546875,
-0.00417327880859375,
-0.0278167724609375,
0.02911376953125,
0.0040435791015625,
0.003536224365234375,
-0.0226898193359375,
0.06658935546875,
-0.01000213623046875,
0.0038814544677734375,
-0.04852294921875,
-0.00897979736328125,
0.01788330078125,
-0.007633209228515625,
0.043670654296875,
0.010772705078125,
-0.0276641845703125,
0.055145263671875,
-0.0440673828125,
-0.007720947265625,
0.04205322265625,
-0.0221099853515625,
0.004909515380859375,
0.0241241455078125,
0.039154052734375,
0.034149169921875,
-0.03741455078125,
-0.0011386871337890625,
-0.064697265625,
-0.0135345458984375,
0.0369873046875,
0.0186004638671875,
-0.0196380615234375,
0.03704833984375,
-0.04351806640625,
0.017578125,
0.01371002197265625,
0.04241943359375,
-0.005641937255859375,
0.01132965087890625,
0.0223541259765625,
-0.0007519721984863281,
-0.061492919921875,
0.032318115234375,
-0.003582000732421875,
-0.040557861328125,
-0.00177764892578125,
0.039886474609375,
0.0306549072265625,
0.016693115234375,
-0.00537109375,
0.051513671875,
-0.028228759765625,
-0.02178955078125,
0.0212860107421875,
-0.038818359375,
-0.0115966796875,
0.00768280029296875,
-0.0614013671875,
0.0322265625,
0.046661376953125,
0.01004791259765625,
-0.00972747802734375,
0.0097808837890625,
-0.035736083984375,
0.044281005859375,
-0.07891845703125,
0.037841796875,
0.0025615692138671875,
-0.032989501953125,
-0.038543701171875,
0.01250457763671875,
-0.035430908203125,
-0.0099029541015625,
-0.040985107421875,
-0.007221221923828125,
-0.0272979736328125,
-0.013031005859375,
-0.04107666015625,
-0.04388427734375,
0.02423095703125,
-0.006389617919921875,
0.007694244384765625,
0.0160675048828125,
0.032257080078125,
-0.01345062255859375,
-0.028045654296875,
-0.0017709732055664062,
0.0119781494140625,
-0.0108642578125,
0.0241851806640625,
-0.028961181640625,
0.00763702392578125,
0.0423583984375,
0.006359100341796875,
0.002689361572265625,
-0.020660400390625,
0.053863525390625,
-0.006740570068359375,
-0.0546875,
0.00972747802734375,
0.0316162109375,
0.0819091796875,
0.005451202392578125,
0.026611328125,
0.0218048095703125,
-0.008575439453125,
-0.0241851806640625,
0.036590576171875,
-0.0171966552734375,
-0.030364990234375,
-0.01253509521484375,
-0.007427215576171875,
-0.0235137939453125,
0.0154876708984375,
0.019500732421875,
-0.0198974609375,
0.019287109375,
-0.0108642578125,
-0.040771484375,
0.011627197265625,
-0.0233917236328125,
0.024200439453125,
0.005218505859375,
0.042144775390625,
0.0228271484375,
0.02325439453125,
-0.046112060546875,
0.044708251953125,
-0.01544952392578125,
-0.033660888671875,
0.01468658447265625,
0.0926513671875,
0.0166473388671875,
0.036834716796875,
0.0205078125,
-0.0750732421875,
0.034576416015625,
0.0272064208984375,
0.042266845703125,
-0.008758544921875,
-0.00730133056640625,
-0.0132598876953125,
0.0489501953125,
0.00594329833984375,
0.009185791015625,
-0.00750732421875,
0.0276947021484375,
0.008544921875,
-0.038421630859375,
-0.007274627685546875,
-0.0191497802734375,
-0.040130615234375,
-0.0028629302978515625,
0.05322265625,
0.033843994140625,
0.057098388671875,
-0.0103759765625,
-0.0042724609375,
0.041900634765625,
-0.0904541015625,
-0.00577545166015625,
-0.0165557861328125,
-0.0029659271240234375,
-0.0133819580078125,
-0.015777587890625,
0.0021514892578125,
0.040069580078125,
-0.05224609375,
-0.0015897750854492188,
0.047271728515625,
-0.029937744140625,
-0.0157928466796875,
-0.0133056640625,
-0.0028972625732421875,
0.004947662353515625,
-0.0760498046875,
-0.029998779296875,
-0.0261077880859375,
0.023590087890625,
0.015899658203125,
0.0247650146484375,
0.0135498046875,
-0.04644775390625,
0.006000518798828125,
0.034393310546875,
0.00864410400390625,
-0.01503753662109375,
0.007801055908203125,
0.045166015625,
0.0164947509765625,
-0.044677734375,
-0.008514404296875,
-0.00455474853515625,
0.0113067626953125,
0.0264434814453125,
0.0667724609375,
0.0242767333984375,
-0.0106201171875,
-0.01043701171875,
0.004604339599609375,
0.00628662109375,
0.0276641845703125,
0.02288818359375,
-0.023162841796875,
-0.0019483566284179688,
0.0163116455078125,
-0.0190887451171875,
0.050323486328125,
0.026275634765625,
-0.044097900390625,
0.02783203125,
-0.0233917236328125,
0.0213165283203125,
0.00299072265625,
0.0537109375,
0.062164306640625,
-0.005359649658203125,
-0.00019860267639160156,
-0.005893707275390625,
0.00333404541015625,
-0.00183868408203125,
0.0282745361328125,
-0.00649261474609375,
-0.042266845703125,
-0.04156494140625,
-0.03643798828125,
0.025543212890625,
0.07318115234375,
-0.031646728515625,
-0.04217529296875,
-0.014617919921875,
0.0262298583984375,
-0.0421142578125,
-0.03936767578125,
0.051910400390625,
0.01239776611328125,
-0.00968170166015625,
0.007007598876953125,
0.01044464111328125,
-0.019134521484375,
0.005985260009765625,
-0.016448974609375,
-0.0244903564453125,
-0.0214996337890625,
-0.0350341796875,
-0.053985595703125,
-0.053009033203125,
0.03265380859375,
0.0016412734985351562,
0.019500732421875,
-0.0051727294921875,
0.033172607421875,
-0.01454925537109375,
-0.059417724609375,
-0.0157470703125,
0.0011510848999023438,
0.00638580322265625,
0.01519012451171875,
-0.02337646484375,
-0.0272979736328125,
-0.01708984375,
-0.01372528076171875,
0.031982421875,
-0.007732391357421875,
0.0200653076171875,
0.007415771484375,
0.0215911865234375,
-0.0310516357421875,
0.00991058349609375,
0.0264892578125,
-0.0260772705078125,
-0.03155517578125,
0.00238800048828125,
-0.05828857421875,
0.018585205078125,
0.01383209228515625,
-0.004375457763671875,
0.00848388671875,
-0.0238189697265625,
-0.031890869140625,
0.0231170654296875,
0.015380859375,
-0.014678955078125,
0.0021190643310546875,
0.02001953125,
-0.0259552001953125,
0.00972747802734375,
0.0057373046875,
0.020355224609375,
0.0023250579833984375,
-0.0292205810546875,
-0.0318603515625,
0.00716400146484375,
-0.0177459716796875,
0.0059967041015625,
-0.020660400390625,
0.02630615234375,
-0.05206298828125,
-0.035888671875,
0.04052734375,
-0.0052490234375,
0.04132080078125,
-0.03955078125,
-0.0213470458984375,
-0.0174713134765625,
0.06890869140625,
-0.07232666015625,
-0.00917816162109375,
0.01555633544921875,
0.02880859375,
-0.035247802734375,
-0.0367431640625,
-0.053924560546875,
-0.0186920166015625,
-0.06903076171875,
0.01161956787109375,
0.02099609375,
-0.044158935546875,
0.01245880126953125,
-0.035186767578125,
-0.0555419921875,
-0.025970458984375,
0.0304412841796875,
0.0021343231201171875,
0.059906005859375,
-0.03302001953125,
0.04656982421875,
-0.04791259765625,
-0.0018682479858398438,
-0.018798828125,
-0.11822509765625,
-0.003726959228515625,
-0.0703125,
0.07891845703125,
0.05517578125,
-0.029296875,
-0.028717041015625,
0.0516357421875,
0.0020580291748046875,
-0.0269317626953125,
0.0328369140625,
0.01483917236328125,
-0.0116424560546875,
0.030426025390625,
0.0091552734375,
-0.0048675537109375,
-0.01062774658203125,
-0.0016384124755859375,
-0.043304443359375,
-0.034088134765625,
-0.0252532958984375,
-0.07525634765625,
0.045867919921875,
-0.05694580078125,
-0.0386962890625,
-0.038543701171875,
-0.0296478271484375,
0.0184783935546875,
-0.03564453125,
0.0200653076171875,
-0.036865234375,
-0.051544189453125,
0.061492919921875,
0.0192718505859375,
-0.0034542083740234375,
-0.01023101806640625,
0.09649658203125,
0.00815582275390625,
-0.038238525390625,
-0.040740966796875,
-0.0601806640625,
0.0200958251953125,
-0.00952911376953125,
0.0237274169921875,
0.009979248046875,
-0.033050537109375,
0.0382080078125,
-0.0197296142578125,
0.01187896728515625,
0.006267547607421875,
0.044219970703125,
0.01019287109375,
-0.00362396240234375,
0.0079345703125,
0.0161285400390625,
-0.050323486328125,
0.029296875,
-0.0026836395263671875,
-0.0007052421569824219,
0.035125732421875,
-0.00328826904296875,
-0.0199432373046875,
-0.01666259765625,
0.00994873046875,
0.019256591796875,
-0.006420135498046875,
0.00322723388671875,
0.01328277587890625,
0.0257720947265625,
0.007709503173828125,
-0.040283203125,
-0.0031833648681640625,
-0.00197601318359375,
0.0124969482421875,
-0.0037822723388671875,
-0.029754638671875,
0.01520538330078125,
-0.00289154052734375,
-0.039764404296875,
0.0261383056640625,
0.0016956329345703125,
0.060760498046875,
0.025177001953125,
0.0003528594970703125,
-0.029937744140625,
0.01093292236328125,
-0.0235137939453125,
-0.0207977294921875,
0.055755615234375,
0.037750244140625,
0.01325225830078125,
-0.029693603515625,
-0.010955810546875,
0.0013456344604492188,
0.030426025390625,
-0.04412841796875,
-0.049041748046875,
-0.0242767333984375,
-0.007373809814453125,
0.030242919921875,
-0.017608642578125,
-0.03228759765625,
0.02435302734375,
-0.01178741455078125,
0.03948974609375,
0.03411865234375,
0.0401611328125,
0.032684326171875,
-0.064697265625,
0.015869140625,
-0.0166473388671875,
-0.0301513671875,
-0.03424072265625,
-0.0372314453125,
0.0090179443359375,
0.03631591796875,
-0.0258941650390625,
-0.00432586669921875,
0.039825439453125,
0.00977325439453125,
-0.030426025390625,
0.02618408203125,
0.0278167724609375,
-0.0159149169921875,
-0.037567138671875,
-0.03668212890625,
0.0157318115234375,
0.030364990234375,
-0.02484130859375,
0.0229034423828125,
-0.0545654296875,
0.0233917236328125,
-0.029052734375,
0.0252838134765625,
-0.02056884765625,
-0.0287628173828125,
0.0248870849609375,
-0.012176513671875,
-0.0224151611328125,
-0.039276123046875,
-0.005218505859375,
-0.01123046875,
-0.0239715576171875,
0.05950927734375,
-0.02911376953125,
0.049560546875,
-0.03997802734375,
-0.00608062744140625,
-0.035003662109375,
0.0233001708984375,
0.021392822265625,
0.020599365234375,
-0.07537841796875,
0.005054473876953125,
-0.052001953125,
-0.0018281936645507812,
-0.028350830078125,
-0.044158935546875,
-0.04693603515625,
-0.0005497932434082031,
0.007785797119140625,
0.03228759765625,
0.004131317138671875,
-0.007049560546875,
-0.01369476318359375,
0.0014696121215820312,
-0.0095367431640625,
0.056884765625,
-0.044158935546875,
0.0347900390625,
0.0274505615234375,
0.06268310546875,
-0.040771484375,
-0.00611114501953125,
0.0269775390625,
-0.007083892822265625,
0.050994873046875,
-0.0131683349609375,
-0.050048828125,
-0.0313720703125,
-0.024658203125,
-0.027008056640625,
0.0308380126953125,
-0.0321044921875,
0.047760009765625,
-0.01499176025390625,
0.0009813308715820312,
-0.01430511474609375,
0.0067596435546875,
-0.03607177734375,
0.0299530029296875,
0.0169525146484375,
-0.0197296142578125,
-0.0209808349609375,
0.02056884765625,
0.01129913330078125,
-0.004154205322265625,
0.00550079345703125,
-0.01123809814453125,
-0.01352691650390625,
-0.0235748291015625,
0.01007080078125,
0.0263671875,
0.01067352294921875,
0.05548095703125,
0.00628662109375,
0.0248565673828125,
0.048858642578125,
-0.00492095947265625,
-0.027679443359375,
0.005405426025390625,
0.0242156982421875,
-0.01174163818359375,
0.01407623291015625,
0.0034847259521484375,
0.009185791015625,
0.0238037109375,
0.08782958984375,
0.09185791015625,
-0.10015869140625,
0.004245758056640625,
0.0308074951171875,
-0.033905029296875,
0.0007810592651367188,
-0.0196075439453125,
0.00305938720703125,
-0.0169830322265625,
0.06072998046875,
-0.0003170967102050781,
-0.006328582763671875,
0.040069580078125,
-0.0101470947265625,
0.0024394989013671875,
-0.01453399658203125,
0.0399169921875,
0.01520538330078125,
-0.070068359375,
0.0235748291015625,
0.0303192138671875,
0.00994110107421875,
0.01036834716796875,
0.006748199462890625,
-0.0186004638671875,
-0.04278564453125,
-0.049560546875,
-0.01499176025390625,
-0.028839111328125,
-0.05474853515625,
-0.00814056396484375,
-0.006732940673828125,
0.044097900390625,
0.03668212890625,
-0.0116424560546875,
0.033294677734375,
-0.0229339599609375,
0.0479736328125,
0.00390625,
0.000392913818359375,
0.004283905029296875,
0.05035400390625,
-0.0208740234375,
0.01297760009765625,
-0.0176849365234375,
0.01155853271484375,
-0.00865936279296875,
0.04364013671875,
0.08209228515625,
-0.03314208984375,
-0.0241241455078125,
0.0144195556640625,
0.04144287109375,
0.0005393028259277344,
-0.022979736328125,
-0.0094451904296875,
-0.06787109375,
-0.01873779296875,
-0.0223541259765625,
-0.05059814453125,
0.014862060546875,
-0.04302978515625,
-0.05950927734375,
0.0758056640625,
0.044281005859375,
0.0295257568359375,
0.01312255859375,
0.0159912109375,
-0.032867431640625,
-0.00469207763671875,
-0.024993896484375,
0.004608154296875,
0.003780364990234375,
-0.007472991943359375,
-0.0286407470703125,
-0.01093292236328125,
-0.0183258056640625,
0.01419830322265625,
0.0019178390502929688,
-0.006717681884765625,
0.00820159912109375,
0.0107879638671875,
0.0270538330078125,
0.0234222412109375,
-0.0258636474609375,
0.00650787353515625,
0.023284912109375,
0.0013751983642578125,
0.0023517608642578125,
0.00890350341796875,
0.041290283203125,
-0.0582275390625,
-0.005107879638671875,
0.0377197265625,
0.0133209228515625,
0.0004799365997314453,
-0.0204010009765625,
0.026031494140625,
-0.03106689453125,
-0.00824737548828125,
0.009124755859375,
0.030792236328125,
-0.032867431640625,
0.052581787109375,
0.0318603515625,
-0.04559326171875,
-0.0207672119140625,
-0.037994384765625,
0.0418701171875,
0.01763916015625,
0.040740966796875,
0.04888916015625,
0.0254058837890625,
0.007610321044921875,
0.017669677734375,
0.037322998046875,
0.0238494873046875,
-0.0192718505859375,
0.03765869140625,
0.0157318115234375,
0.0279083251953125,
-0.0196990966796875,
0.008697509765625,
0.01175689697265625,
0.040924072265625,
-0.0266876220703125,
-0.01519775390625,
0.0186309814453125,
0.0213165283203125,
0.000919342041015625,
0.0139923095703125,
0.0389404296875,
-0.0286712646484375,
-0.0015439987182617188,
-0.046417236328125,
-0.00016307830810546875,
0.02935791015625,
0.01140594482421875,
-0.005584716796875,
-0.03759765625,
-0.0128173828125,
-0.005405426025390625,
-0.03302001953125,
-0.0174407958984375,
-0.0025272369384765625,
0.0709228515625,
0.0400390625,
0.0175323486328125,
-0.0160675048828125,
-0.03802490234375,
-0.005077362060546875,
0.02838134765625,
0.002593994140625,
0.001972198486328125,
-0.01824951171875,
-0.0210113525390625,
0.025848388671875,
0.0223236083984375,
-0.00640106201171875,
0.013214111328125,
0.0034847259521484375,
-0.00679779052734375,
-0.033721923828125,
-0.0018253326416015625,
0.0296173095703125,
-0.03558349609375,
0.018524169921875,
-0.049652099609375,
0.026580810546875,
-0.004573822021484375,
-0.0006842613220214844,
-0.01375579833984375,
0.0074615478515625,
0.033966064453125,
-0.01470947265625,
0.06793212890625,
-0.01222991943359375,
0.0069732666015625,
0.0210723876953125,
-0.052215576171875,
0.04296875,
-0.00365447998046875,
-0.0257568359375,
-0.017669677734375,
0.034942626953125,
-0.057830810546875,
0.0220184326171875,
0.043975830078125,
-0.0008797645568847656,
-0.0195159912109375,
0.0440673828125,
-0.00492095947265625,
0.00911712646484375,
-0.00682830810546875,
0.01861572265625,
-0.026123046875,
0.020721435546875,
0.0125274658203125,
-0.0214996337890625,
-0.035247802734375,
-0.004978179931640625,
0.0733642578125,
0.0253753662109375,
0.08270263671875,
-0.04595947265625,
0.023345947265625,
-0.0181884765625,
0.0379638671875,
-0.0364990234375,
-0.028106689453125,
0.037841796875,
-0.00759124755859375,
0.012969970703125,
-0.004291534423828125,
-0.0185546875,
0.0047454833984375,
0.023529052734375,
-0.055084228515625,
-0.00640869140625,
-0.00618743896484375,
0.0173492431640625,
-0.0175933837890625,
0.0243072509765625,
-0.0287322998046875,
-0.04510498046875,
-0.033416748046875,
0.005161285400390625,
0.01544952392578125,
0.03961181640625,
0.0025081634521484375,
0.0170745849609375,
0.0235748291015625,
-0.017364501953125,
0.0321044921875,
-0.0379638671875,
0.040924072265625,
0.0296173095703125,
0.00916290283203125,
-0.05499267578125,
0.01407623291015625,
-0.0124359130859375,
-0.0213775634765625,
0.016845703125,
0.0275726318359375,
-0.01441192626953125,
-0.01436614990234375,
-0.0245208740234375,
0.04248046875,
0.017730712890625,
-0.032318115234375,
0.0268402099609375,
0.0479736328125,
-0.04052734375,
0.031463623046875,
-0.037322998046875,
-0.0255584716796875,
-0.0250701904296875,
0.0005679130554199219,
0.03271484375,
-0.00601959228515625,
-0.037261962890625,
-0.072265625,
-0.0230865478515625,
0.040771484375,
0.023956298828125,
-0.0274505615234375,
-0.0168914794921875,
-0.00803375244140625,
-0.004566192626953125,
0.01361846923828125,
0.03863525390625,
-0.02923583984375,
-0.0019521713256835938,
-0.0174560546875,
-0.0258331298828125,
-0.034637451171875,
0.05975341796875,
-0.0146331787109375,
0.028106689453125,
0.0250396728515625,
-0.0274658203125,
-0.041748046875,
0.0521240234375,
0.036865234375,
0.0845947265625,
0.04315185546875,
-0.0020999908447265625,
0.017059326171875,
0.0433349609375,
-0.043548583984375,
-0.07470703125,
0.012298583984375,
-0.020263671875,
0.01543426513671875,
0.03692626953125,
-0.035064697265625,
-0.018218994140625,
-0.053009033203125,
-0.08563232421875,
0.05389404296875,
0.000008940696716308594,
-0.0362548828125,
0.004772186279296875,
0.0151519775390625,
-0.00798797607421875,
-0.01059722900390625,
0.00891876220703125,
-0.03240966796875,
-0.005016326904296875,
0.0005116462707519531,
0.03204345703125,
-0.0123138427734375,
0.05401611328125,
0.00403594970703125,
-0.0418701171875,
0.0020809173583984375,
-0.01279449462890625,
-0.0009083747863769531,
-0.05242919921875,
0.007549285888671875,
0.00666046142578125,
0.02996826171875,
-0.0066680908203125,
-0.0321044921875,
0.027069091796875,
0.031890869140625,
-0.01016998291015625,
-0.0491943359375,
-0.00598907470703125,
-0.003108978271484375,
0.0335693359375,
0.02618408203125,
0.001071929931640625,
-0.035675048828125,
-0.02252197265625,
0.0214691162109375,
-0.0099639892578125,
-0.012664794921875,
0.01245880126953125,
-0.08282470703125,
-0.04437255859375,
0.0029811859130859375,
0.00954437255859375,
0.035308837890625,
-0.00864410400390625,
0.00765228271484375,
-0.0059051513671875,
0.03497314453125,
-0.01526641845703125,
-0.01517486572265625,
-0.05499267578125,
0.0780029296875,
-0.0265960693359375,
0.038116455078125,
-0.0125274658203125,
0.040618896484375,
0.05853271484375,
0.016021728515625,
0.01024627685546875,
0.002254486083984375,
-0.0218048095703125,
0.0017747879028320312,
0.0020961761474609375,
0.0303955078125,
-0.009521484375,
-0.0232391357421875,
0.003170013427734375,
0.01052093505859375,
-0.01357269287109375,
0.01551055908203125,
0.02960205078125,
0.01434326171875,
-0.00894927978515625,
0.0262451171875,
-0.04388427734375,
0.007419586181640625,
-0.0106964111328125,
0.0036029815673828125,
0.01409149169921875,
0.01395416259765625,
0.069580078125,
-0.02777099609375,
0.029998779296875,
-0.0293426513671875,
0.05560302734375,
-0.0206451416015625,
0.0033550262451171875,
-0.0026397705078125,
-0.015960693359375,
0.0104217529296875
] |
7b470f37a01d3bcde3e0d9af4a31e65043fd2b0c | Wordpress Stackexchange
Q: How to get around WP REST API per page limit without pagination? So I know that using /wp-json/wp/v2/customposts/?per_page=100&page=2 will allow me to bypass the default of 10 returned at a time. But I am trying to return over 2k custom posts. The only other way I have seen to return all is to modify the per page maximum in the plugin, which I'd prefer not to do.
Does anyone know another way to return all content without pagination?
| Q: How to get around WP REST API per page limit without pagination? So I know that using /wp-json/wp/v2/customposts/?per_page=100&page=2 will allow me to bypass the default of 10 returned at a time. But I am trying to return over 2k custom posts. The only other way I have seen to return all is to modify the per page maximum in the plugin, which I'd prefer not to do.
Does anyone know another way to return all content without pagination?
| wordpress | {
"language": "en",
"length": 79,
"provenance": "stackexchange_00019.jsonl.gz:471051",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249030"
} | [
0.0609130859375,
-0.0109405517578125,
0.00885009765625,
-0.034820556640625,
-0.003559112548828125,
-0.021514892578125,
0.036590576171875,
-0.007534027099609375,
-0.0032711029052734375,
0.002895355224609375,
-0.00978851318359375,
-0.00437164306640625,
-0.0186767578125,
-0.034912109375,
0.0146331787109375,
-0.035247802734375,
0.034820556640625,
0.03643798828125,
0.050506591796875,
-0.01520538330078125,
0.024444580078125,
-0.025146484375,
0.03704833984375,
0.1334228515625,
0.035552978515625,
0.015777587890625,
0.00010246038436889648,
-0.046417236328125,
0.0091400146484375,
-0.038726806640625,
0.01678466796875,
0.0185546875,
0.0116119384765625,
0.03936767578125,
-0.049285888671875,
-0.050506591796875,
-0.0159759521484375,
0.0206451416015625,
-0.014617919921875,
0.01232147216796875,
0.0158538818359375,
-0.00978851318359375,
-0.00978851318359375,
0.00945281982421875,
-0.0191192626953125,
-0.021759033203125,
0.0126190185546875,
-0.0155487060546875,
-0.01129913330078125,
0.007137298583984375,
-0.01328277587890625,
0.006572723388671875,
-0.0044708251953125,
0.00754547119140625,
-0.00275421142578125,
-0.0176239013671875,
0.07598876953125,
-0.0672607421875,
0.04254150390625,
-0.09942626953125,
-0.051788330078125,
-0.0194549560546875,
0.058441162109375,
0.034637451171875,
0.002048492431640625,
-0.0013341903686523438,
-0.0318603515625,
0.032745361328125,
-0.00551605224609375,
0.0024585723876953125,
-0.006946563720703125,
-0.024322509765625,
0.01049041748046875,
-0.006641387939453125,
-0.019744873046875,
-0.0240020751953125,
-0.0195465087890625,
-0.0214691162109375,
0.03729248046875,
-0.0138397216796875,
-0.020111083984375,
-0.010498046875,
-0.0186920166015625,
-0.03955078125,
0.00933074951171875,
-0.00917816162109375,
-0.01219940185546875,
-0.00472259521484375,
-0.0102386474609375,
0.008392333984375,
-0.01078033447265625,
-0.041717529296875,
-0.0474853515625,
0.050994873046875,
0.028778076171875,
-0.02191162109375,
-0.0020008087158203125,
-0.007472991943359375,
0.0160369873046875,
0.02093505859375,
0.008148193359375,
-0.038818359375,
0.05230712890625,
-0.030242919921875,
0.0201873779296875,
-0.019927978515625,
-0.0090789794921875,
-0.01476287841796875,
0.06640625,
0.0305633544921875,
-0.00975799560546875,
0.11126708984375,
0.0160064697265625,
0.02386474609375,
-0.043609619140625,
-0.04998779296875,
-0.038482666015625,
-0.004238128662109375,
-0.00907135009765625,
-0.0257110595703125,
-0.00933837890625,
-0.00019228458404541016,
-0.00272369384765625,
0.005985260009765625,
0.03216552734375,
0.02276611328125,
-0.0249481201171875,
-0.00400543212890625,
0.0246124267578125,
0.02874755859375,
-0.0171661376953125,
-0.0142059326171875,
-0.0078582763671875,
0.00958251953125,
0.01019287109375,
-0.0156097412109375,
0.0274810791015625,
-0.00860595703125,
-0.01393890380859375,
0.038360595703125,
-0.0421142578125,
-0.040130615234375,
0.004695892333984375,
-0.032867431640625,
0.0221099853515625,
-0.006603240966796875,
0.026641845703125,
0.0361328125,
-0.01103973388671875,
0.0177001953125,
0.0038051605224609375,
0.0305023193359375,
0.0234527587890625,
-0.01873779296875,
0.005199432373046875,
-0.03240966796875,
-0.005588531494140625,
-0.0186614990234375,
0.0025424957275390625,
-0.000873565673828125,
0.011962890625,
-0.039154052734375,
-0.013397216796875,
-0.0382080078125,
-0.060089111328125,
0.037628173828125,
-0.0220947265625,
-0.004825592041015625,
0.028411865234375,
0.07330322265625,
0.026092529296875,
-0.045196533203125,
-0.01549530029296875,
-0.0015993118286132812,
-0.019927978515625,
0.004100799560546875,
0.012603759765625,
0.046600341796875,
-0.0009531974792480469,
0.0255279541015625,
0.0170440673828125,
-0.035614013671875,
0.0655517578125,
-0.01270294189453125,
-0.05438232421875,
0.035186767578125,
0.03857421875,
0.0804443359375,
-0.027679443359375,
0.025238037109375,
0.059112548828125,
0.041656494140625,
-0.004302978515625,
-0.0105133056640625,
0.012176513671875,
-0.046875,
0.005008697509765625,
-0.03662109375,
0.0004265308380126953,
0.038177490234375,
-0.015380859375,
-0.01325225830078125,
-0.002979278564453125,
0.00209808349609375,
0.004940032958984375,
-0.033599853515625,
-0.0014371871948242188,
0.01212310791015625,
-0.0308837890625,
0.023590087890625,
0.0181121826171875,
0.01105499267578125,
-0.0300140380859375,
0.0138702392578125,
0.005397796630859375,
-0.018310546875,
-0.0130767822265625,
0.038116455078125,
0.00405120849609375,
0.025848388671875,
0.026947021484375,
-0.06488037109375,
0.00749969482421875,
0.02783203125,
0.06353759765625,
-0.057037353515625,
0.01432037353515625,
-0.049072265625,
0.06866455078125,
-0.027099609375,
-0.00870513916015625,
0.039306640625,
0.03778076171875,
0.037506103515625,
0.00998687744140625,
0.00206756591796875,
0.030914306640625,
-0.07806396484375,
0.0170440673828125,
0.0411376953125,
0.0216064453125,
-0.0214080810546875,
-0.020538330078125,
0.004184722900390625,
0.01149749755859375,
-0.033233642578125,
0.0015659332275390625,
0.0030155181884765625,
0.0001653432846069336,
-0.0072784423828125,
0.0026378631591796875,
-0.036834716796875,
0.02239990234375,
-0.061279296875,
0.01067352294921875,
0.010894775390625,
0.01197052001953125,
0.00688934326171875,
-0.032318115234375,
0.0216217041015625,
0.01236724853515625,
0.0408935546875,
-0.0025386810302734375,
0.0237884521484375,
-0.0237884521484375,
0.004299163818359375,
0.01155853271484375,
0.0252227783203125,
-0.0206298828125,
-0.037689208984375,
0.02783203125,
0.0697021484375,
0.00678253173828125,
-0.017608642578125,
0.0080718994140625,
-0.00839996337890625,
-0.04681396484375,
0.0176849365234375,
0.048675537109375,
0.000885009765625,
-0.01418304443359375,
0.0218658447265625,
-0.03045654296875,
-0.00649261474609375,
0.0026340484619140625,
-0.034881591796875,
-0.0245819091796875,
0.018798828125,
-0.014068603515625,
0.03753662109375,
0.032470703125,
0.04913330078125,
-0.0105133056640625,
0.023101806640625,
-0.0112457275390625,
0.0289459228515625,
0.0310516357421875,
-0.080322265625,
0.07318115234375,
-0.058319091796875,
0.03314208984375,
0.062042236328125,
-0.022125244140625,
0.039154052734375,
-0.01345062255859375,
-0.015960693359375,
-0.0221710205078125,
0.0009412765502929688,
-0.0225677490234375,
-0.034881591796875,
-0.01433563232421875,
0.0389404296875,
0.0038433074951171875,
0.042999267578125,
-0.00399017333984375,
-0.052703857421875,
0.01050567626953125,
0.0225677490234375,
-0.0655517578125,
-0.060028076171875,
0.08319091796875,
-0.053314208984375,
-0.031280517578125,
-0.01436614990234375,
-0.049072265625,
-0.024627685546875,
0.0260162353515625,
-0.027008056640625,
-0.02978515625,
-0.03399658203125,
-0.0311126708984375,
-0.0728759765625,
-0.0655517578125,
-0.004543304443359375,
0.0207366943359375,
0.01605224609375,
-0.004749298095703125,
0.0982666015625,
0.0010995864868164062,
-0.06695556640625,
-0.034942626953125,
0.0079803466796875,
-0.0165863037109375,
-0.0045928955078125,
0.0004258155822753906,
0.00072479248046875,
0.032135009765625,
0.00453948974609375,
0.0196380615234375,
0.032135009765625,
-0.028778076171875,
-0.01322174072265625,
-0.0098876953125,
-0.017425537109375,
-0.007053375244140625,
0.040008544921875,
0.02850341796875,
0.0058135986328125,
0.019927978515625,
-0.02703857421875,
-0.0263824462890625,
-0.0013017654418945312,
-0.0625,
-0.0258331298828125,
0.039215087890625,
0.001129150390625,
-0.024261474609375,
-0.0131378173828125,
-0.0030765533447265625,
-0.0011119842529296875,
0.004985809326171875,
-0.01099395751953125,
0.02862548828125,
0.00485992431640625,
-0.00045990943908691406,
-0.01374053955078125,
0.07958984375,
0.006763458251953125,
0.0006375312805175781,
0.043670654296875,
-0.00543975830078125,
-0.019073486328125,
0.01971435546875,
-0.04083251953125,
-0.06231689453125,
0.046966552734375,
0.00225067138671875,
0.0014104843139648438,
-0.002147674560546875,
-0.037750244140625,
0.028045654296875,
0.096435546875,
-0.0002608299255371094,
-0.004352569580078125,
-0.0090789794921875,
0.0148468017578125,
-0.032135009765625,
-0.07562255859375,
-0.0123138427734375,
-0.01096343994140625,
-0.0069580078125,
0.002948760986328125,
-0.019378662109375,
-0.00264739990234375,
0.01352691650390625,
-0.010955810546875,
0.017181396484375,
-0.0229034423828125,
0.0379638671875,
-0.0254669189453125,
0.0167083740234375,
-0.04217529296875,
0.0283355712890625,
-0.06195068359375,
-0.02081298828125,
-0.0114288330078125,
-0.08734130859375,
-0.0107879638671875,
-0.02392578125,
0.04693603515625,
0.0211181640625,
-0.02557373046875,
-0.0193023681640625,
0.024383544921875,
0.0202178955078125,
0.027557373046875,
-0.006862640380859375,
-0.0101165771484375,
-0.0306549072265625,
-0.0037212371826171875,
0.01265716552734375,
-0.0197601318359375,
-0.041290283203125,
-0.0557861328125,
0.018035888671875,
-0.01457977294921875,
-0.0149383544921875,
-0.0265045166015625,
-0.0157318115234375,
0.0228424072265625,
-0.09503173828125,
-0.0170745849609375,
-0.0245819091796875,
0.017547607421875,
-0.01282501220703125,
0.002674102783203125,
-0.03912353515625,
-0.1131591796875,
0.049896240234375,
0.023345947265625,
-0.045013427734375,
0.009002685546875,
0.062225341796875,
0.0162353515625,
-0.031890869140625,
-0.0999755859375,
-0.0269622802734375,
0.0083160400390625,
-0.00403594970703125,
0.03448486328125,
-0.015716552734375,
-0.0151824951171875,
0.07659912109375,
-0.03839111328125,
-0.00757598876953125,
0.00959014892578125,
-0.0029239654541015625,
-0.0138702392578125,
-0.01922607421875,
0.01605224609375,
-0.0308837890625,
0.0186004638671875,
0.040771484375,
-0.00716400146484375,
-0.018280029296875,
-0.0012149810791015625,
0.054656982421875,
-0.044952392578125,
0.01898193359375,
-0.031829833984375,
0.0011148452758789062,
0.001094818115234375,
0.01354217529296875,
0.01462554931640625,
0.0032520294189453125,
0.01265716552734375,
-0.0175933837890625,
0.01099395751953125,
0.0296478271484375,
0.0406494140625,
0.04351806640625,
-0.0223236083984375,
0.06005859375,
-0.00366973876953125,
0.010223388671875,
0.0113677978515625,
-0.006351470947265625,
0.032989501953125,
-0.0303955078125,
-0.046905517578125,
-0.01482391357421875,
-0.0128021240234375,
0.0244293212890625,
0.030731201171875,
0.001934051513671875,
0.0294189453125,
0.0230255126953125,
-0.010467529296875,
-0.00013685226440429688,
-0.0022754669189453125,
0.007572174072265625,
-0.044647216796875,
0.0482177734375,
0.00882720947265625,
-0.00524139404296875,
-0.0105133056640625,
0.051025390625,
0.0239715576171875,
0.005153656005859375,
-0.01187896728515625,
0.00689697265625,
0.0120391845703125,
0.0301971435546875,
0.0159912109375,
0.0024623870849609375,
-0.0181884765625,
0.021392822265625,
0.005634307861328125,
-0.032012939453125,
-0.037139892578125,
0.046905517578125,
0.0382080078125,
-0.0030117034912109375,
0.00909423828125,
-0.0230712890625,
0.00113677978515625,
-0.03936767578125,
0.023529052734375,
0.021087646484375,
-0.014892578125,
-0.0284271240234375,
0.015777587890625,
0.0267181396484375,
0.03662109375,
0.00823974609375,
-0.0008459091186523438,
0.03955078125,
0.0265960693359375,
-0.0304718017578125,
-0.0164031982421875,
0.0005221366882324219,
0.0160675048828125,
-0.0150604248046875,
-0.0219879150390625,
-0.01849365234375,
-0.007709503173828125,
-0.003330230712890625,
-0.0055999755859375,
-0.020538330078125,
0.0023059844970703125,
-0.0033321380615234375,
0.04498291015625,
-0.0187225341796875,
-0.0292816162109375,
-0.07275390625,
0.0167083740234375,
0.0272216796875,
0.037811279296875,
0.0164642333984375,
0.01262664794921875,
-0.05133056640625,
-0.03314208984375,
0.044097900390625,
0.01279449462890625,
-0.0303802490234375,
-0.040283203125,
0.039703369140625,
0.02813720703125,
-0.0013484954833984375,
-0.0772705078125,
-0.026641845703125,
0.0010690689086914062,
0.042877197265625,
0.00977325439453125,
-0.048004150390625,
0.08343505859375,
-0.0003204345703125,
0.04339599609375,
0.00579833984375,
0.0604248046875,
0.041168212890625,
-0.03228759765625,
0.00597381591796875,
-0.08587646484375,
-0.04302978515625,
0.0067291259765625,
-0.047454833984375,
0.057769775390625,
0.016693115234375,
0.002071380615234375,
0.0005202293395996094,
-0.042816162109375,
-0.0015277862548828125,
-0.0221099853515625,
0.054412841796875,
-0.0277099609375,
-0.01361846923828125,
0.009307861328125,
0.0284423828125,
-0.0081024169921875,
-0.0361328125,
-0.018768310546875,
-0.01229095458984375,
0.043548583984375,
-0.006290435791015625,
-0.04791259765625,
0.0101470947265625,
-0.0031185150146484375,
0.085693359375,
0.002391815185546875,
0.04278564453125,
0.029144287109375,
0.01186370849609375,
0.031341552734375,
0.032562255859375,
-0.0111083984375,
-0.03826904296875,
0.0259857177734375,
0.0214385986328125,
0.00872802734375,
0.037353515625,
-0.01088714599609375,
0.0242767333984375,
0.01605224609375,
0.034454345703125,
-0.045989990234375,
0.0269317626953125,
-0.0038585662841796875,
-0.0172576904296875,
0.0155029296875,
0.006946563720703125,
-0.0083160400390625,
-0.044891357421875,
0.0078125,
-0.045440673828125,
-0.0178070068359375,
-0.02056884765625,
-0.0413818359375,
-0.022186279296875,
-0.038360595703125,
-0.0192718505859375,
0.004608154296875,
0.00885009765625,
0.0225982666015625,
-0.006130218505859375,
0.01123046875,
-0.0007686614990234375,
0.01202392578125,
0.027191162109375,
-0.0223541259765625,
-0.033111572265625,
0.03662109375,
-0.02874755859375,
-0.0236968994140625,
0.024078369140625,
-0.0011453628540039062,
-0.017303466796875,
0.04669189453125,
-0.03009033203125,
0.0250244140625,
0.027252197265625,
-0.046051025390625,
-0.0087127685546875,
-0.042236328125,
0.0075225830078125,
-0.0184326171875,
-0.01824951171875,
0.0171966552734375,
-0.00434112548828125,
-0.0633544921875,
-0.01218414306640625,
-0.015594482421875,
0.0858154296875,
-0.0357666015625,
-0.004184722900390625,
0.035491943359375,
0.020477294921875,
-0.028961181640625,
-0.01309967041015625,
0.006679534912109375,
-0.02520751953125,
0.02740478515625,
-0.0101165771484375,
0.006771087646484375,
0.0006012916564941406,
-0.0190277099609375,
-0.03289794921875,
0.12548828125,
-0.0210723876953125,
-0.00041031837463378906,
0.00482940673828125,
0.060516357421875,
-0.0184326171875,
0.052703857421875,
-0.0321044921875,
0.0401611328125,
0.0243377685546875,
0.007534027099609375,
-0.0243988037109375,
-0.0070953369140625,
-0.0022907257080078125,
0.01409912109375,
0.052398681640625,
0.0269927978515625,
-0.06689453125,
-0.026702880859375,
-0.004230499267578125,
0.0219573974609375,
0.008392333984375,
0.0595703125,
0.0185089111328125,
0.052978515625,
0.0775146484375,
-0.059478759765625,
0.0156402587890625,
0.02227783203125,
0.022247314453125,
0.04266357421875,
0.02191162109375,
0.0056304931640625,
-0.0016002655029296875,
0.0055084228515625,
-0.04241943359375,
0.0014171600341796875,
0.0200042724609375,
0.00879669189453125,
0.0023632049560546875,
0.0653076171875,
0.06903076171875,
-0.060699462890625,
-0.0218505859375,
-0.0416259765625,
0.053070068359375,
-0.004390716552734375,
0.043243408203125,
0.01508331298828125,
0.0210723876953125,
0.046783447265625,
-0.01351165771484375,
0.0276031494140625,
0.038360595703125,
-0.03594970703125,
0.033721923828125,
0.0230255126953125,
0.01155853271484375,
-0.06475830078125,
-0.018798828125,
0.064208984375,
0.0557861328125,
-0.039794921875,
-0.038421630859375,
0.00785064697265625,
0.0157318115234375,
0.01904296875,
-0.01371002197265625,
0.0243988037109375,
0.0062713623046875,
0.0245208740234375,
-0.0224151611328125,
0.00798797607421875,
0.0036258697509765625,
0.0304107666015625,
-0.00606536865234375,
0.01702880859375,
-0.0271148681640625,
-0.002899169921875,
-0.028533935546875,
0.0007004737854003906,
0.0208587646484375,
0.037017822265625,
0.0244598388671875,
0.0277252197265625,
-0.00792694091796875,
-0.007335662841796875,
0.017059326171875,
0.00521087646484375,
-0.00363922119140625,
-0.016876220703125,
-0.00677490234375,
-0.045928955078125,
0.02703857421875,
0.011383056640625,
0.0231170654296875,
-0.01555633544921875,
0.01442718505859375,
0.021942138671875,
-0.002826690673828125,
-0.0145263671875,
0.0257110595703125,
-0.00934600830078125,
0.003948211669921875,
-0.058258056640625,
-0.0284423828125,
-0.017578125,
-0.024505615234375,
0.006732940673828125,
-0.0308990478515625,
0.0181732177734375,
0.0281524658203125,
0.0196380615234375,
0.01427459716796875,
-0.01299285888671875,
0.03961181640625,
-0.0024967193603515625,
0.050140380859375,
0.045654296875,
-0.0830078125,
-0.01300811767578125,
-0.042633056640625,
-0.025665283203125,
0.040130615234375,
0.036956787109375,
-0.027252197265625,
0.042724609375,
-0.02496337890625,
0.02178955078125,
0.006053924560546875,
-0.028717041015625,
0.006999969482421875,
0.03411865234375,
0.032623291015625,
0.00836944580078125,
-0.08087158203125,
-0.06512451171875,
-0.03314208984375,
0.0272064208984375,
0.004718780517578125,
0.074951171875,
-0.005023956298828125,
0.005039215087890625,
0.005924224853515625,
-0.0038852691650390625,
0.01904296875,
0.00689697265625,
-0.0033130645751953125,
0.047027587890625,
0.0462646484375,
-0.028564453125,
-0.060394287109375,
0.039459228515625,
0.0175933837890625,
0.01050567626953125,
0.04541015625,
-0.045654296875,
0.01439666748046875,
-0.016937255859375,
-0.029205322265625,
-0.038482666015625,
-0.02447509765625,
-0.0172576904296875,
0.007320404052734375,
0.003208160400390625,
-0.0251312255859375,
-0.024261474609375,
0.00775146484375,
0.0206146240234375,
-0.0194854736328125,
0.0197296142578125,
-0.01284027099609375,
0.053955078125,
0.033721923828125,
-0.028228759765625,
0.0234375,
-0.027984619140625,
-0.0294189453125,
0.0196685791015625,
-0.00600433349609375,
-0.020782470703125,
0.0122528076171875,
0.051300048828125,
-0.0372314453125,
-0.0213165283203125,
0.004608154296875,
-0.0299835205078125,
-0.018829345703125,
-0.0128326416015625,
0.003688812255859375,
-0.00665283203125,
-0.002902984619140625,
-0.004421234130859375,
-0.0202789306640625,
-0.01151275634765625,
0.01123046875,
-0.00646209716796875,
-0.006053924560546875,
0.01224517822265625,
-0.03033447265625,
0.0186920166015625,
0.0029449462890625,
-0.032196044921875,
0.02899169921875,
-0.01277923583984375,
-0.020416259765625,
-0.0182037353515625,
0.01068115234375,
-0.004238128662109375,
0.02020263671875,
-0.01385498046875,
0.00742340087890625,
-0.022216796875,
0.007904052734375,
0.010223388671875,
-0.00409698486328125,
0.0176849365234375,
-0.0139007568359375,
-0.024383544921875,
-0.012542724609375,
0.01500701904296875,
0.022735595703125,
0.03179931640625,
0.0225677490234375,
0.0170135498046875,
0.03265380859375,
-0.0543212890625,
-0.0946044921875,
0.0001633167266845703,
-0.0163421630859375,
0.0131072998046875,
0.0057220458984375,
0.0084991455078125,
0.0238189697265625,
-0.01123809814453125,
-0.02703857421875,
0.006427764892578125,
0.0134124755859375,
-0.023040771484375,
-0.04656982421875,
-0.0202484130859375,
-0.00789642333984375,
0.005283355712890625,
-0.01209259033203125,
-0.0290374755859375,
-0.037322998046875,
0.04217529296875,
0.019775390625,
0.0306243896484375,
0.019989013671875,
0.03338623046875,
-0.048492431640625,
0.035888671875,
0.0123443603515625,
0.0185089111328125,
-0.006618499755859375,
0.02642822265625,
0.03759765625,
0.055908203125,
-0.0170440673828125,
0.05694580078125,
-0.0004546642303466797,
-0.004100799560546875,
-0.0096893310546875,
-0.0034961700439453125,
-0.00763702392578125,
0.001125335693359375,
0.022216796875,
0.07147216796875,
-0.00033473968505859375,
-0.044342041015625,
0.047088623046875,
-0.014801025390625,
-0.0174560546875,
-0.0034923553466796875,
-0.0139007568359375,
-0.016021728515625,
-0.005214691162109375,
-0.0027065277099609375,
0.00881195068359375,
0.04876708984375,
-0.051025390625,
-0.0164642333984375,
-0.004878997802734375,
-0.02337646484375,
0.00670623779296875,
-0.05645751953125,
0.0411376953125,
-0.0239715576171875,
-0.014678955078125,
-0.00803375244140625,
-0.0160675048828125,
0.0007147789001464844,
-0.03302001953125,
-0.0162506103515625,
-0.051849365234375,
0.005542755126953125,
-0.039703369140625,
0.002521514892578125,
-0.020599365234375,
0.031341552734375,
-0.0264892578125,
0.0284881591796875,
0.00417327880859375,
0.0225372314453125,
-0.0003726482391357422,
0.0230255126953125,
0.013427734375,
0.001865386962890625,
-0.003139495849609375,
0.00627899169921875,
-0.00531005859375,
0.0673828125,
0.004489898681640625,
0.0177001953125,
-0.02227783203125,
-0.0008139610290527344,
0.0010614395141601562,
-0.04339599609375,
-0.00026798248291015625,
0.0016088485717773438,
-0.0204925537109375,
-0.04296875,
0.0032138824462890625,
0.006015777587890625,
-0.0083160400390625,
0.00971221923828125
] |
ecf4521b0ee4501b3bc94a98376c79168fda107a | Wordpress Stackexchange
Q: How to edit or override a Core function? I want to add a data argument to links generated by the paginate_links() function. Then, I can more easily extend my custom pagination to use AJAX.
As far as I can tell, this function is not pluggable, nor does it have any hooks available.
The links generated by paginate_links() look like this:
<a class="page-numbers" href="https://example.com/list/page/2/"><span class="screen-reader-text">Page </span>2</a>
I want to add the data-page argument to the <a> tag so it looks like this:
<a data-page="2" class="page-numbers" href="https://example.com/list/page/2/"><span class="screen-reader-text">Page </span>2</a>
What would be the best way to edit a Core WordPress function that is not pluggable?
A: There is no filter, but you can set the type argument to array when you call paginate_links(), and then you can run a filter on the returned array.
Example:
$links = array_map(
function( $link ) {
if ( FALSE === strpos( $link, '/page/' ) )
return str_replace( '<a ', '<a data-page="1" ', $link );
return preg_replace(
'~<a (.*)/page/(\d+)~',
'<a data-page="\\2" \\1/page/\\2',
$link
);
},
paginate_links( [ 'type' => 'array' ] )
);
print join( ' | ', $links );
| Q: How to edit or override a Core function? I want to add a data argument to links generated by the paginate_links() function. Then, I can more easily extend my custom pagination to use AJAX.
As far as I can tell, this function is not pluggable, nor does it have any hooks available.
The links generated by paginate_links() look like this:
<a class="page-numbers" href="https://example.com/list/page/2/"><span class="screen-reader-text">Page </span>2</a>
I want to add the data-page argument to the <a> tag so it looks like this:
<a data-page="2" class="page-numbers" href="https://example.com/list/page/2/"><span class="screen-reader-text">Page </span>2</a>
What would be the best way to edit a Core WordPress function that is not pluggable?
A: There is no filter, but you can set the type argument to array when you call paginate_links(), and then you can run a filter on the returned array.
Example:
$links = array_map(
function( $link ) {
if ( FALSE === strpos( $link, '/page/' ) )
return str_replace( '<a ', '<a data-page="1" ', $link );
return preg_replace(
'~<a (.*)/page/(\d+)~',
'<a data-page="\\2" \\1/page/\\2',
$link
);
},
paginate_links( [ 'type' => 'array' ] )
);
print join( ' | ', $links );
| wordpress | {
"language": "en",
"length": 184,
"provenance": "stackexchange_00019.jsonl.gz:471116",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249240"
} | [
0.06787109375,
-0.01166534423828125,
0.00820159912109375,
-0.046478271484375,
0.01910400390625,
-0.02777099609375,
0.06524658203125,
0.00537109375,
-0.0046234130859375,
-0.020294189453125,
0.0034923553466796875,
-0.0257110595703125,
-0.01551055908203125,
-0.0587158203125,
0.037384033203125,
-0.02398681640625,
0.0130157470703125,
0.022247314453125,
0.023193359375,
-0.01062774658203125,
0.0263519287109375,
-0.0037078857421875,
-0.01152801513671875,
0.1142578125,
0.0294036865234375,
-0.0088348388671875,
0.0313720703125,
-0.04010009765625,
0.0199432373046875,
-0.01446533203125,
0.00897216796875,
-0.00838470458984375,
0.0386962890625,
0.00004214048385620117,
-0.0345458984375,
-0.037353515625,
0.0135345458984375,
-0.0194854736328125,
-0.0214691162109375,
0.013092041015625,
0.006160736083984375,
0.00878143310546875,
0.0164642333984375,
0.01015472412109375,
-0.0304107666015625,
-0.00365447998046875,
0.0032176971435546875,
-0.007137298583984375,
0.0015354156494140625,
0.032012939453125,
0.0091552734375,
0.0531005859375,
-0.00914764404296875,
0.05279541015625,
0.0247039794921875,
0.048004150390625,
-0.0163116455078125,
-0.0290069580078125,
-0.004901885986328125,
0.01032257080078125,
0.0306854248046875,
0.00545501708984375,
0.00679779052734375,
0.0299072265625,
-0.0061798095703125,
-0.0167694091796875,
-0.029632568359375,
0.0093841552734375,
0.010711669921875,
0.006805419921875,
0.017486572265625,
-0.0022678375244140625,
0.0032978057861328125,
-0.0005888938903808594,
0.007625579833984375,
-0.00027251243591308594,
-0.00600433349609375,
0.0012216567993164062,
0.014404296875,
-0.0013275146484375,
-0.002521514892578125,
-0.007404327392578125,
0.0284271240234375,
-0.0222625732421875,
0.032470703125,
0.0128021240234375,
-0.00909423828125,
-0.01200103759765625,
-0.01117706298828125,
0.007472991943359375,
-0.01849365234375,
-0.0121917724609375,
0.0292816162109375,
-0.0113067626953125,
-0.03497314453125,
-0.0121002197265625,
0.01206207275390625,
0.0244903564453125,
0.004894256591796875,
0.029327392578125,
0.0212249755859375,
-0.045928955078125,
0.053375244140625,
-0.042510986328125,
0.004779815673828125,
0.054046630859375,
0.0245208740234375,
0.02215576171875,
0.039154052734375,
0.00428009033203125,
0.007663726806640625,
0.06915283203125,
-0.0243377685546875,
-0.010284423828125,
-0.01995849609375,
0.0303192138671875,
-0.0265960693359375,
-0.025177001953125,
-0.0061187744140625,
-0.025634765625,
-0.01153564453125,
0.0001380443572998047,
-0.01493072509765625,
0.006000518798828125,
0.01554107666015625,
0.0014200210571289062,
-0.0027027130126953125,
-0.0162200927734375,
0.01104736328125,
0.0142669677734375,
-0.047271728515625,
0.010986328125,
0.07183837890625,
0.0280914306640625,
0.029937744140625,
-0.02490234375,
0.0179443359375,
-0.04107666015625,
-0.04913330078125,
0.052734375,
-0.00841522216796875,
-0.04351806640625,
-0.0190277099609375,
-0.03021240234375,
0.043670654296875,
-0.0277252197265625,
0.0161590576171875,
0.0433349609375,
0.032257080078125,
0.0173797607421875,
0.00882720947265625,
0.00931549072265625,
0.036224365234375,
0.00788116455078125,
-0.04486083984375,
0.00057220458984375,
0.01419830322265625,
-0.026763916015625,
-0.0182037353515625,
-0.0256500244140625,
0.00199127197265625,
-0.023956298828125,
0.002559661865234375,
-0.052093505859375,
-0.0628662109375,
0.00328826904296875,
-0.040069580078125,
-0.0109710693359375,
0.0217437744140625,
0.0091552734375,
0.0180816650390625,
-0.01250457763671875,
-0.00182342529296875,
0.02581787109375,
0.019012451171875,
0.01255035400390625,
-0.0079345703125,
0.0308685302734375,
0.041778564453125,
0.024261474609375,
0.0026874542236328125,
-0.03564453125,
0.0792236328125,
-0.025787353515625,
-0.05914306640625,
0.07830810546875,
0.01031494140625,
0.09112548828125,
-0.0047454833984375,
0.0233306884765625,
0.018310546875,
0.0184173583984375,
-0.040740966796875,
0.0036411285400390625,
-0.0079345703125,
-0.031280517578125,
0.03778076171875,
-0.0020160675048828125,
-0.016448974609375,
0.01593017578125,
0.039093017578125,
0.032745361328125,
-0.0268707275390625,
-0.0049591064453125,
-0.10626220703125,
0.0225372314453125,
-0.039581298828125,
0.048309326171875,
-0.0159759521484375,
0.0299224853515625,
0.020751953125,
0.03472900390625,
-0.03509521484375,
-0.01052093505859375,
0.00687408447265625,
0.012115478515625,
0.0163116455078125,
-0.00656890869140625,
-0.0019388198852539062,
0.01104736328125,
-0.0032825469970703125,
0.013580322265625,
-0.0294952392578125,
0.00743865966796875,
0.053924560546875,
-0.0307769775390625,
-0.01001739501953125,
-0.04022216796875,
0.00909423828125,
-0.017669677734375,
-0.0328369140625,
0.07855224609375,
0.096435546875,
0.07037353515625,
-0.0183258056640625,
-0.0140533447265625,
0.0266571044921875,
-0.048553466796875,
0.0081787109375,
0.049896240234375,
0.049560546875,
0.0126800537109375,
-0.01451873779296875,
-0.043365478515625,
0.03680419921875,
0.013641357421875,
0.033294677734375,
-0.04541015625,
-0.00853729248046875,
0.04400634765625,
0.02447509765625,
-0.0017118453979492188,
0.00334930419921875,
-0.004787445068359375,
-0.0032253265380859375,
0.0282440185546875,
0.0184478759765625,
0.0240936279296875,
-0.0252685546875,
0.0195770263671875,
-0.0256805419921875,
0.01280975341796875,
0.00855255126953125,
0.0053253173828125,
0.039154052734375,
0.00595855712890625,
0.04083251953125,
0.037078857421875,
-0.025146484375,
-0.021942138671875,
0.0183258056640625,
0.031890869140625,
-0.00588226318359375,
0.0309295654296875,
0.0025634765625,
-0.0266571044921875,
-0.0297698974609375,
0.0087890625,
-0.017486572265625,
0.0052032470703125,
0.007171630859375,
0.056549072265625,
-0.004474639892578125,
-0.028961181640625,
0.0017757415771484375,
0.00968170166015625,
-0.0233612060546875,
-0.0177154541015625,
-0.0142059326171875,
-0.0230560302734375,
0.0207977294921875,
0.0034923553466796875,
-0.04547119140625,
0.036834716796875,
-0.0477294921875,
-0.0272216796875,
0.029296875,
-0.048828125,
0.051910400390625,
-0.0457763671875,
0.0265350341796875,
0.053497314453125,
-0.01323699951171875,
0.00036144256591796875,
-0.030426025390625,
-0.0027008056640625,
-0.027252197265625,
-0.00495147705078125,
-0.027435302734375,
-0.035797119140625,
0.0024051666259765625,
0.04510498046875,
0.00475311279296875,
0.036865234375,
-0.034576416015625,
-0.06365966796875,
-0.03533935546875,
-0.0037059783935546875,
-0.12420654296875,
-0.08966064453125,
0.0845947265625,
-0.040496826171875,
-0.0282440185546875,
0.03564453125,
-0.03826904296875,
-0.0202789306640625,
0.08306884765625,
-0.02880859375,
-0.0049896240234375,
-0.026123046875,
-0.051361083984375,
-0.07049560546875,
-0.0970458984375,
0.00008219480514526367,
0.0082244873046875,
0.0218658447265625,
-0.002880096435546875,
0.032562255859375,
0.0179443359375,
-0.02764892578125,
0.034912109375,
0.06610107421875,
-0.0119781494140625,
-0.0234527587890625,
-0.0199737548828125,
-0.016082763671875,
-0.019927978515625,
-0.016387939453125,
0.10162353515625,
0.006801605224609375,
-0.01282501220703125,
0.04534912109375,
0.00464630126953125,
0.0171661376953125,
0.01418304443359375,
0.0024814605712890625,
-0.007434844970703125,
0.03326416015625,
0.0198822021484375,
-0.02362060546875,
-0.022216796875,
0.00958251953125,
-0.022491455078125,
0.0426025390625,
0.0239410400390625,
-0.013702392578125,
0.00797271728515625,
0.0207672119140625,
0.00499725341796875,
-0.0019130706787109375,
0.0235748291015625,
-0.018463134765625,
-0.0032634735107421875,
-0.014984130859375,
0.00025582313537597656,
-0.0295562744140625,
0.07830810546875,
0.007602691650390625,
0.0038471221923828125,
0.043487548828125,
0.00955963134765625,
0.00588226318359375,
0.007114410400390625,
-0.0190582275390625,
-0.0258636474609375,
0.033843994140625,
-0.0294342041015625,
-0.006282806396484375,
-0.00115203857421875,
-0.00769805908203125,
0.0152435302734375,
0.06329345703125,
-0.0097503662109375,
-0.0330810546875,
0.004730224609375,
0.0215301513671875,
0.00037550926208496094,
-0.02655029296875,
0.00811004638671875,
-0.025146484375,
-0.0872802734375,
0.0215911865234375,
-0.0067291259765625,
-0.0252227783203125,
0.0050811767578125,
0.0272979736328125,
-0.022003173828125,
-0.03375244140625,
0.03363037109375,
0.0207366943359375,
-0.03143310546875,
0.04644775390625,
-0.025146484375,
0.011505126953125,
-0.0247802734375,
0.0284881591796875,
-0.039703369140625,
-0.0030498504638671875,
-0.023895263671875,
0.037994384765625,
0.050445556640625,
-0.0433349609375,
-0.018646240234375,
0.0110015869140625,
0.007083892822265625,
0.0428466796875,
0.014129638671875,
0.017669677734375,
0.00484466552734375,
0.01291656494140625,
0.042999267578125,
-0.0257568359375,
-0.0010128021240234375,
0.019439697265625,
-0.0082244873046875,
0.0301971435546875,
0.00368499755859375,
-0.0096282958984375,
0.039520263671875,
-0.034210205078125,
-0.08941650390625,
-0.057403564453125,
-0.046600341796875,
-0.00494384765625,
-0.0087890625,
-0.0440673828125,
-0.049835205078125,
-0.09832763671875,
0.0399169921875,
0.018707275390625,
-0.031585693359375,
-0.01268768310546875,
0.034393310546875,
0.025054931640625,
-0.0298614501953125,
-0.0067596435546875,
-0.0004730224609375,
-0.01194000244140625,
0.02081298828125,
0.038330078125,
-0.040985107421875,
-0.0006022453308105469,
0.037872314453125,
-0.039642333984375,
0.018341064453125,
-0.00937652587890625,
0.023406982421875,
0.01666259765625,
-0.00409698486328125,
0.0141448974609375,
0.0175628662109375,
-0.0182952880859375,
-0.0192413330078125,
-0.027313232421875,
0.01056671142578125,
0.01197052001953125,
0.04754638671875,
-0.004261016845703125,
0.0281982421875,
-0.043792724609375,
-0.0008349418640136719,
-0.00498199462890625,
0.0248260498046875,
0.056488037109375,
0.026214599609375,
-0.0133209228515625,
0.0237884521484375,
0.04205322265625,
0.042938232421875,
0.03857421875,
0.032073974609375,
-0.060089111328125,
0.07745361328125,
-0.0029144287109375,
0.0004911422729492188,
0.02142333984375,
0.0022945404052734375,
0.0017490386962890625,
-0.0028591156005859375,
-0.019775390625,
-0.056671142578125,
-0.0015535354614257812,
0.0257568359375,
-0.0219268798828125,
0.00567626953125,
0.00079345703125,
0.0212554931640625,
-0.01605224609375,
0.01219940185546875,
0.0231170654296875,
0.014556884765625,
-0.01702880859375,
0.02197265625,
0.0122833251953125,
-0.0121612548828125,
-0.022735595703125,
0.0293426513671875,
0.03155517578125,
-0.0278472900390625,
-0.0172271728515625,
0.0066986083984375,
-0.0284576416015625,
0.046295166015625,
0.0138092041015625,
0.01026153564453125,
0.006267547607421875,
0.0270233154296875,
0.01812744140625,
-0.024078369140625,
-0.03143310546875,
0.044219970703125,
0.01983642578125,
0.0423583984375,
0.033447265625,
-0.058929443359375,
0.01532745361328125,
-0.0154266357421875,
0.036224365234375,
0.03192138671875,
-0.024658203125,
-0.03277587890625,
-0.0083770751953125,
0.0322265625,
-0.004482269287109375,
0.009552001953125,
0.0022640228271484375,
0.0005927085876464844,
0.0200042724609375,
-0.003047943115234375,
0.002201080322265625,
-0.017791748046875,
-0.01171112060546875,
-0.0146331787109375,
-0.019195556640625,
0.0019445419311523438,
-0.007282257080078125,
-0.0175933837890625,
-0.02178955078125,
-0.01043701171875,
0.058380126953125,
-0.024505615234375,
0.07421875,
-0.055206298828125,
-0.0150604248046875,
-0.01082611083984375,
-0.00655364990234375,
0.053253173828125,
0.036773681640625,
-0.055938720703125,
0.0073394775390625,
-0.08245849609375,
-0.03271484375,
-0.028778076171875,
-0.0206298828125,
-0.0292816162109375,
0.016387939453125,
0.007045745849609375,
0.010406494140625,
-0.00431060791015625,
-0.0196685791015625,
-0.0026187896728515625,
0.00787353515625,
0.01276397705078125,
0.026123046875,
-0.0174407958984375,
0.054534912109375,
-0.0033779144287109375,
0.03338623046875,
0.0119476318359375,
0.0308837890625,
0.0018711090087890625,
-0.0198516845703125,
0.0032253265380859375,
-0.055877685546875,
-0.029266357421875,
-0.0182952880859375,
-0.01104736328125,
0.04278564453125,
0.052215576171875,
0.0028018951416015625,
0.007305145263671875,
-0.000050902366638183594,
-0.0126495361328125,
-0.0345458984375,
0.03253173828125,
0.0087432861328125,
0.0296783447265625,
0.0007719993591308594,
0.00931549072265625,
0.014984130859375,
-0.014678955078125,
-0.0038547515869140625,
0.012939453125,
0.0122528076171875,
0.01058197021484375,
-0.025115966796875,
-0.036285400390625,
0.0224761962890625,
0.0714111328125,
0.0029277801513671875,
0.042327880859375,
0.0150146484375,
0.01494598388671875,
0.03759765625,
-0.006282806396484375,
0.052093505859375,
0.037384033203125,
0.06927490234375,
-0.009674072265625,
-0.001247406005859375,
0.04345703125,
-0.0360107421875,
0.0005064010620117188,
0.03314208984375,
0.03997802734375,
-0.08294677734375,
0.024932861328125,
0.0029392242431640625,
0.010040283203125,
0.0311737060546875,
0.0227813720703125,
0.0028553009033203125,
0.036376953125,
-0.031341552734375,
-0.00547027587890625,
-0.0241241455078125,
0.001373291015625,
0.016876220703125,
-0.0328369140625,
-0.02252197265625,
-0.042327880859375,
-0.004734039306640625,
-0.0041656494140625,
-0.0228118896484375,
-0.00019228458404541016,
-0.01474761962890625,
-0.017852783203125,
0.00045299530029296875,
0.03216552734375,
-0.0301361083984375,
-0.0623779296875,
0.0053863525390625,
-0.002964019775390625,
-0.00612640380859375,
0.0183868408203125,
0.036285400390625,
0.01070404052734375,
0.01100921630859375,
0.01410675048828125,
-0.041412353515625,
-0.01053619384765625,
-0.006687164306640625,
0.00479888916015625,
-0.037628173828125,
-0.00594329833984375,
-0.004344940185546875,
0.0006365776062011719,
0.004669189453125,
-0.0086669921875,
-0.0323486328125,
-0.0007824897766113281,
0.0103607177734375,
0.0670166015625,
-0.039276123046875,
-0.01727294921875,
0.0162811279296875,
-0.0240631103515625,
-0.00628662109375,
-0.0297088623046875,
-0.005733489990234375,
-0.06298828125,
-0.0118865966796875,
-0.0278472900390625,
-0.039337158203125,
0.039398193359375,
-0.03692626953125,
-0.048431396484375,
0.1226806640625,
-0.0457763671875,
0.0240478515625,
0.030181884765625,
0.052398681640625,
-0.0226898193359375,
0.029815673828125,
-0.0269622802734375,
0.02423095703125,
-0.000008046627044677734,
0.0272674560546875,
-0.0098876953125,
0.007457733154296875,
0.00896453857421875,
0.0183258056640625,
0.00238037109375,
0.023681640625,
-0.0262298583984375,
-0.015655517578125,
-0.02557373046875,
0.019622802734375,
-0.0020084381103515625,
0.0233001708984375,
-0.006008148193359375,
0.00911712646484375,
0.040130615234375,
-0.05572509765625,
-0.0012788772583007812,
-0.0137481689453125,
0.006511688232421875,
0.0266876220703125,
0.0099334716796875,
0.01361083984375,
-0.001804351806640625,
-0.008941650390625,
-0.0093231201171875,
0.0037784576416015625,
0.0032501220703125,
0.006839752197265625,
-0.020111083984375,
0.068359375,
0.049530029296875,
-0.036346435546875,
-0.0684814453125,
-0.0251922607421875,
0.0340576171875,
0.0014219284057617188,
0.01375579833984375,
0.0265045166015625,
0.01953125,
0.04547119140625,
-0.021697998046875,
-0.00804901123046875,
0.0037555694580078125,
0.00815582275390625,
0.054595947265625,
0.022186279296875,
0.0289154052734375,
-0.0295257568359375,
-0.0026798248291015625,
0.06903076171875,
0.0755615234375,
-0.03607177734375,
-0.0205230712890625,
0.0038509368896484375,
-0.01192474365234375,
0.012939453125,
0.010467529296875,
0.041778564453125,
0.0006165504455566406,
-0.007671356201171875,
-0.023834228515625,
-0.035736083984375,
0.005802154541015625,
0.03204345703125,
-0.006595611572265625,
-0.035675048828125,
0.031463623046875,
-0.042694091796875,
-0.0307159423828125,
0.012847900390625,
-0.01349639892578125,
0.0218963623046875,
0.005962371826171875,
0.04345703125,
0.0015773773193359375,
-0.014190673828125,
0.0220184326171875,
0.042449951171875,
-0.03173828125,
-0.0022907257080078125,
-0.0175018310546875,
-0.061798095703125,
-0.02923583984375,
0.029693603515625,
0.03424072265625,
0.01041412353515625,
0.0172119140625,
0.0013904571533203125,
-0.00017881393432617188,
0.0246124267578125,
0.06414794921875,
-0.006160736083984375,
0.02264404296875,
-0.035369873046875,
0.022552490234375,
-0.0190887451171875,
0.0080108642578125,
-0.02459716796875,
0.027099609375,
-0.005657196044921875,
0.004730224609375,
0.040679931640625,
-0.0011701583862304688,
-0.0004303455352783203,
0.0255584716796875,
0.00009971857070922852,
0.067626953125,
0.036865234375,
-0.09033203125,
-0.0228424072265625,
-0.01421356201171875,
-0.06207275390625,
0.03717041015625,
0.040374755859375,
-0.03155517578125,
0.0174713134765625,
0.00212860107421875,
0.004222869873046875,
0.031402587890625,
-0.0130615234375,
-0.0216217041015625,
0.037322998046875,
0.03558349609375,
0.009735107421875,
0.0167388916015625,
0.01068878173828125,
0.006969451904296875,
0.0291748046875,
-0.01006317138671875,
0.11962890625,
-0.06658935546875,
-0.009185791015625,
0.016998291015625,
0.0133056640625,
-0.03955078125,
-0.0021114349365234375,
-0.007015228271484375,
-0.043487548828125,
0.01238250732421875,
0.00385284423828125,
-0.0085906982421875,
0.01313018798828125,
0.039703369140625,
-0.0207672119140625,
0.005725860595703125,
-0.0050811767578125,
0.0220947265625,
-0.0048675537109375,
0.017120361328125,
-0.0099945068359375,
-0.049774169921875,
-0.01806640625,
0.006862640380859375,
0.013458251953125,
0.0750732421875,
0.0291748046875,
0.024627685546875,
0.020965576171875,
0.005970001220703125,
0.0247344970703125,
-0.0269622802734375,
0.07159423828125,
0.048126220703125,
-0.0438232421875,
-0.0139007568359375,
-0.0132904052734375,
-0.02117919921875,
-0.01433563232421875,
0.0163726806640625,
-0.01861572265625,
-0.007755279541015625,
-0.021392822265625,
-0.0213165283203125,
0.00879669189453125,
0.01531982421875,
-0.0195770263671875,
0.0100860595703125,
0.0004763603210449219,
-0.01404571533203125,
0.0278778076171875,
-0.021820068359375,
-0.018585205078125,
-0.02923583984375,
-0.0288543701171875,
0.0019989013671875,
-0.01776123046875,
-0.07330322265625,
-0.0419921875,
0.0022411346435546875,
0.0182647705078125,
0.04742431640625,
-0.11346435546875,
0.062469482421875,
0.00925445556640625,
0.046173095703125,
-0.004161834716796875,
0.0136260986328125,
-0.0212249755859375,
0.005619049072265625,
-0.032012939453125,
-0.020263671875,
-0.058013916015625,
0.02398681640625,
-0.036102294921875,
0.01015472412109375,
0.038421630859375,
-0.0162811279296875,
-0.026214599609375,
0.023712158203125,
-0.000025391578674316406,
0.07928466796875,
-0.0169525146484375,
-0.0263824462890625,
0.00750732421875,
0.0228271484375,
-0.0285186767578125,
-0.10833740234375,
-0.014068603515625,
-0.07647705078125,
0.066650390625,
0.028717041015625,
-0.035919189453125,
-0.026885986328125,
-0.0273590087890625,
-0.0264129638671875,
0.0877685546875,
0.01416778564453125,
-0.01529693603515625,
0.007297515869140625,
0.0149383544921875,
-0.021575927734375,
0.023681640625,
0.01259613037109375,
-0.0211181640625,
0.007366180419921875,
0.00519561767578125,
0.0272216796875,
0.00325775146484375,
0.009124755859375,
0.0275421142578125,
-0.0304412841796875,
0.06854248046875,
0.03607177734375,
0.0279083251953125,
-0.0128631591796875,
-0.0013704299926757812,
0.042694091796875,
0.043701171875,
0.0008230209350585938,
0.0328369140625,
0.0289154052734375,
-0.031585693359375,
-0.0030879974365234375,
-0.03778076171875,
-0.0236053466796875,
0.0009145736694335938,
0.0650634765625,
0.01314544677734375,
0.01329803466796875,
-0.03265380859375,
-0.030364990234375,
0.00043272972106933594,
0.005084991455078125,
0.013671875,
0.01161956787109375,
-0.054962158203125,
0.0150146484375,
0.0159759521484375,
-0.0179595947265625,
0.018768310546875,
0.0169830322265625,
-0.0226287841796875,
-0.0053253173828125,
0.0063323974609375,
-0.0214996337890625,
-0.03326416015625,
-0.006366729736328125,
0.045684814453125,
-0.04058837890625,
-0.0013866424560546875,
0.0136260986328125,
-0.003017425537109375,
0.00896453857421875,
0.010406494140625,
-0.0188140869140625,
0.020050048828125,
-0.0293426513671875,
-0.006702423095703125,
0.01470184326171875,
0.0291290283203125,
0.01385498046875,
-0.00946807861328125,
0.007442474365234375,
0.032928466796875,
-0.00585174560546875,
0.03448486328125,
-0.0280609130859375,
0.036590576171875,
-0.022674560546875,
0.031951904296875,
-0.0177459716796875,
0.04937744140625,
0.0164337158203125,
0.0151824951171875,
0.005855560302734375,
-0.0112762451171875,
0.045379638671875,
-0.0236968994140625,
0.010040283203125,
0.0028285980224609375,
-0.0295867919921875,
-0.0177154541015625,
-0.027069091796875,
-0.04107666015625,
-0.019927978515625,
0.0028362274169921875
] |
ff3b014268fa9b99a232712dfe8f9151518e337c | Wordpress Stackexchange
Q: Does anyone have a visual breakdown of core hooks and when they are fired? The title says it all really. I'd like to get an idea of the chronology of when the actions are fired and filters called for WordPress, preferably visually although I'm thinking of downloading, altering core to log to a file whenever an action or filter is registered, then again when fired and working with the output of that.
It'd essentially make my life much easier if anyone else has visualised it before.
A: The Action Reference in Codex has a roughly chronological list of actions called during both front-end and admin requests, though it's nothing fancier than a simple list.
Filters are a bit trickier, as they primarily handle output, so it's going to be specific to what theme and plugins you've got and what they're doing during different kinds of requests.
You can log when all actions and filters are invoked without editing core with the all action:
function wpd_log_all_filters(){
var_dump( current_filter() );
}
add_action( 'all', 'wpd_log_all_filters' );
This will fire for both actions and filters, actions are a simple kind of filter under the hood.
| Q: Does anyone have a visual breakdown of core hooks and when they are fired? The title says it all really. I'd like to get an idea of the chronology of when the actions are fired and filters called for WordPress, preferably visually although I'm thinking of downloading, altering core to log to a file whenever an action or filter is registered, then again when fired and working with the output of that.
It'd essentially make my life much easier if anyone else has visualised it before.
A: The Action Reference in Codex has a roughly chronological list of actions called during both front-end and admin requests, though it's nothing fancier than a simple list.
Filters are a bit trickier, as they primarily handle output, so it's going to be specific to what theme and plugins you've got and what they're doing during different kinds of requests.
You can log when all actions and filters are invoked without editing core with the all action:
function wpd_log_all_filters(){
var_dump( current_filter() );
}
add_action( 'all', 'wpd_log_all_filters' );
This will fire for both actions and filters, actions are a simple kind of filter under the hood.
A: I completely forgot about this until I was just reviewing my profile. I made a plugin that allows me to log the order of execution whilst debugging complex issues and analysing the content.
https://github.com/WordPress-Thinstall/working-files/blob/5ee79d55552fd2ecf58778783495e3c262bb6c83/plugins/wp-save-hooks-sql.php
It requires PHP7 (or to be more accurate it's tested on 7, 7.1, 7.2) and the 'all' special tag was pointed out by https://www.reddit.com/user/konradkar on reddit.
It should be noted that this may require a significant amount of RAM to execute, and will probably slow down a response, so shouldn't be used in production, but the RAW data will help you to understand for a request_uri, given certain specific inputs (logs post and get data), at a given time what hooks were fired, and in what order, function arguments, etc.
I found that searching the SQL log table gave me enough data to visualise fully per-request what was going on and when.
| wordpress | {
"language": "en",
"length": 339,
"provenance": "stackexchange_00019.jsonl.gz:471140",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249315"
} | [
0.039093017578125,
0.00244903564453125,
-0.0299530029296875,
-0.041778564453125,
0.0289306640625,
-0.03472900390625,
0.0494384765625,
0.016082763671875,
0.0227203369140625,
0.04779052734375,
-0.0012350082397460938,
-0.007740020751953125,
0.04644775390625,
-0.01983642578125,
-0.0279083251953125,
-0.00432586669921875,
0.0634765625,
-0.0276641845703125,
0.043212890625,
0.0087738037109375,
-0.003421783447265625,
0.046905517578125,
0.03802490234375,
0.07452392578125,
0.0156402587890625,
-0.0482177734375,
0.068603515625,
-0.0069732666015625,
0.050018310546875,
0.0104522705078125,
0.0218505859375,
-0.05938720703125,
0.0088043212890625,
0.040496826171875,
-0.04034423828125,
0.050201416015625,
0.002437591552734375,
0.02783203125,
0.0147247314453125,
0.00789642333984375,
0.00722503662109375,
0.0005555152893066406,
0.026092529296875,
-0.03680419921875,
-0.0015544891357421875,
-0.015838623046875,
0.0258941650390625,
-0.0200653076171875,
0.03717041015625,
0.0052490234375,
0.0234375,
0.03759765625,
0.027801513671875,
-0.00641632080078125,
-0.0226898193359375,
-0.007564544677734375,
-0.06610107421875,
0.049041748046875,
0.0243682861328125,
0.03924560546875,
0.0166473388671875,
0.0035228729248046875,
-0.00714111328125,
-0.0235595703125,
0.0189056396484375,
-0.0034027099609375,
-0.0019664764404296875,
0.0173797607421875,
0.005462646484375,
0.01824951171875,
-0.00806427001953125,
-0.00861358642578125,
-0.0308685302734375,
-0.021331787109375,
0.0195770263671875,
-0.002044677734375,
-0.004535675048828125,
-0.049530029296875,
0.007411956787109375,
0.042205810546875,
-0.00728607177734375,
-0.014434814453125,
-0.009033203125,
0.0183868408203125,
-0.0276641845703125,
0.020294189453125,
-0.01427459716796875,
-0.00823974609375,
-0.0295562744140625,
-0.00849151611328125,
-0.0236663818359375,
0.0070648193359375,
-0.033966064453125,
-0.0163421630859375,
0.00567626953125,
-0.03619384765625,
0.0005469322204589844,
0.0302734375,
-0.042266845703125,
-0.03631591796875,
-0.005157470703125,
-0.0116119384765625,
-0.0258331298828125,
0.00827789306640625,
0.003780364990234375,
0.038055419921875,
0.0217132568359375,
0.07110595703125,
0.03302001953125,
0.0096588134765625,
0.003292083740234375,
0.037078857421875,
0.003749847412109375,
-0.0146026611328125,
0.00988006591796875,
-0.02117919921875,
-0.0306549072265625,
0.0322265625,
-0.0211181640625,
-0.005542755126953125,
0.006282806396484375,
0.01031494140625,
0.015960693359375,
-0.0001665353775024414,
0.005420684814453125,
0.00881195068359375,
-0.011627197265625,
-0.04376220703125,
0.01367950439453125,
0.01078033447265625,
-0.0149383544921875,
0.022552490234375,
0.0267486572265625,
-0.01512908935546875,
-0.0225677490234375,
-0.01263427734375,
0.04022216796875,
-0.02337646484375,
-0.00864410400390625,
0.00473785400390625,
0.0256195068359375,
-0.0276641845703125,
-0.031524658203125,
-0.004451751708984375,
0.028289794921875,
-0.005672454833984375,
0.013946533203125,
0.03009033203125,
0.0298614501953125,
-0.021270751953125,
0.041473388671875,
-0.0260772705078125,
0.0271759033203125,
0.012176513671875,
-0.01507568359375,
0.0156707763671875,
0.04742431640625,
-0.020660400390625,
-0.04931640625,
-0.0265655517578125,
-0.0254669189453125,
0.0023822784423828125,
0.00830841064453125,
-0.039398193359375,
-0.034515380859375,
-0.01213836669921875,
0.002704620361328125,
0.006656646728515625,
0.0298919677734375,
0.0106353759765625,
0.0197906494140625,
-0.00835418701171875,
0.021759033203125,
0.0057220458984375,
-0.00827789306640625,
0.00836944580078125,
-0.0208740234375,
-0.003414154052734375,
0.033111572265625,
0.039581298828125,
-0.00946044921875,
-0.030303955078125,
0.04876708984375,
-0.011688232421875,
-0.0195770263671875,
-0.0190277099609375,
0.0202178955078125,
0.04522705078125,
-0.0011396408081054688,
0.0227813720703125,
-0.011688232421875,
0.0033321380615234375,
-0.039459228515625,
0.030853271484375,
-0.0124053955078125,
-0.0169677734375,
-0.02032470703125,
0.007335662841796875,
-0.0149078369140625,
-0.0087738037109375,
0.04315185546875,
0.02935791015625,
-0.004192352294921875,
-0.057861328125,
-0.10980224609375,
0.015899658203125,
-0.04046630859375,
0.074951171875,
0.007297515869140625,
-0.00566864013671875,
0.0262298583984375,
0.03265380859375,
-0.032928466796875,
-0.0345458984375,
-0.046142578125,
0.042999267578125,
-0.02520751953125,
0.0017862319946289062,
0.01363372802734375,
-0.0028839111328125,
0.02618408203125,
-0.003997802734375,
-0.00870513916015625,
-0.003265380859375,
0.06341552734375,
-0.032745361328125,
0.0177154541015625,
-0.036468505859375,
0.057373046875,
-0.00350189208984375,
-0.01885986328125,
0.0138092041015625,
0.0628662109375,
0.0931396484375,
-0.00994110107421875,
-0.0198822021484375,
-0.0220794677734375,
-0.05206298828125,
0.0012912750244140625,
0.047943115234375,
0.01386260986328125,
0.063720703125,
0.01134490966796875,
0.0247650146484375,
0.0256195068359375,
-0.032684326171875,
0.0199127197265625,
-0.0000451207160949707,
0.00023162364959716797,
0.052520751953125,
-0.0159759521484375,
0.0033206939697265625,
0.0131378173828125,
-0.0203399658203125,
-0.005840301513671875,
0.03656005859375,
-0.0029735565185546875,
-0.040069580078125,
-0.0132598876953125,
-0.01456451416015625,
0.03436279296875,
-0.0750732421875,
-0.079345703125,
-0.00894927978515625,
-0.015350341796875,
-0.01253509521484375,
0.01129150390625,
0.00687408447265625,
-0.0013217926025390625,
-0.01230621337890625,
0.025787353515625,
-0.00022411346435546875,
-0.019561767578125,
0.0120086669921875,
0.03436279296875,
-0.04833984375,
0.0149688720703125,
-0.009124755859375,
-0.048736572265625,
-0.0251617431640625,
-0.0201416015625,
0.052520751953125,
0.01125335693359375,
-0.02197265625,
0.0015382766723632812,
0.0029239654541015625,
-0.007091522216796875,
-0.0594482421875,
0.033599853515625,
-0.01161956787109375,
0.003692626953125,
0.027496337890625,
-0.01580810546875,
0.052001953125,
0.01763916015625,
-0.03155517578125,
0.0164947509765625,
-0.0206451416015625,
0.036041259765625,
-0.0182952880859375,
0.0335693359375,
0.06768798828125,
-0.006946563720703125,
0.01044464111328125,
-0.0000413060188293457,
0.0181884765625,
0.00861358642578125,
-0.035858154296875,
-0.0251617431640625,
0.00576019287109375,
-0.0194244384765625,
0.052978515625,
0.0146026611328125,
0.07159423828125,
-0.04010009765625,
-0.06951904296875,
-0.032623291015625,
0.0111083984375,
-0.06048583984375,
-0.034759521484375,
-0.0667724609375,
-0.07550048828125,
0.043853759765625,
-0.0208740234375,
-0.0277557373046875,
-0.01348876953125,
0.0133209228515625,
0.0205841064453125,
-0.04864501953125,
0.01178741455078125,
-0.00677490234375,
-0.01073455810546875,
-0.0262298583984375,
0.03485107421875,
-0.005207061767578125,
0.016693115234375,
0.0007367134094238281,
0.10797119140625,
-0.00719451904296875,
-0.091796875,
-0.0284576416015625,
-0.0343017578125,
-0.03985595703125,
0.01361846923828125,
-0.02166748046875,
0.00942230224609375,
-0.0002751350402832031,
-0.0005650520324707031,
-0.03424072265625,
0.01096343994140625,
0.0047760009765625,
-0.00707244873046875,
0.005306243896484375,
-0.013336181640625,
0.004192352294921875,
0.0374755859375,
-0.0084228515625,
-0.03656005859375,
0.0144805908203125,
-0.0631103515625,
0.0011568069458007812,
0.025604248046875,
-0.01560211181640625,
-0.0202484130859375,
0.0061798095703125,
-0.041839599609375,
0.02239990234375,
-0.018096923828125,
0.01093292236328125,
-0.00569915771484375,
0.007274627685546875,
-0.0230255126953125,
0.03131103515625,
-0.0042724609375,
0.0289764404296875,
-0.025299072265625,
-0.0027256011962890625,
-0.0284271240234375,
0.0224151611328125,
0.00702667236328125,
0.01123809814453125,
0.013275146484375,
-0.004695892333984375,
0.011505126953125,
0.00859832763671875,
0.033111572265625,
0.02362060546875,
-0.001987457275390625,
0.0166473388671875,
-0.020751953125,
0.01462554931640625,
0.024810791015625,
-0.046142578125,
0.00615692138671875,
0.017059326171875,
0.022857666015625,
-0.0188751220703125,
-0.04937744140625,
-0.057708740234375,
-0.0131072998046875,
-0.1778564453125,
0.051971435546875,
0.031494140625,
-0.0675048828125,
-0.005435943603515625,
-0.038787841796875,
-0.118896484375,
-0.059234619140625,
0.0184478759765625,
0.002399444580078125,
-0.0027599334716796875,
-0.017791748046875,
-0.00991058349609375,
-0.0248260498046875,
-0.017181396484375,
0.00936126708984375,
-0.06646728515625,
-0.01419830322265625,
-0.06744384765625,
0.05712890625,
0.0623779296875,
-0.049224853515625,
0.0201263427734375,
0.045928955078125,
0.008941650390625,
0.018096923828125,
0.016387939453125,
0.0006961822509765625,
0.034515380859375,
-0.0201416015625,
0.0038814544677734375,
-0.02655029296875,
-0.0268402099609375,
-0.0304718017578125,
-0.0053558349609375,
0.0158538818359375,
-0.01268768310546875,
0.00592041015625,
-0.00672149658203125,
0.019073486328125,
-0.031097412109375,
-0.04254150390625,
-0.0821533203125,
-0.0312347412109375,
-0.0308380126953125,
-0.0223846435546875,
-0.032928466796875,
-0.06781005859375,
0.0011434555053710938,
-0.04400634765625,
-0.0035648345947265625,
0.015625,
0.0478515625,
0.0265655517578125,
0.0189361572265625,
0.0120697021484375,
-0.00879669189453125,
0.0235443115234375,
-0.0156402587890625,
0.038482666015625,
0.018280029296875,
-0.0026416778564453125,
0.01444244384765625,
-0.0040740966796875,
-0.0019054412841796875,
-0.060028076171875,
0.1002197265625,
0.0203857421875,
0.0262451171875,
-0.0185394287109375,
0.00820159912109375,
0.0091400146484375,
0.01348876953125,
-0.024749755859375,
-0.0182342529296875,
-0.0027332305908203125,
0.06671142578125,
-0.0462646484375,
0.07232666015625,
-0.040924072265625,
0.01213836669921875,
-0.01242828369140625,
0.00484466552734375,
0.10272216796875,
0.05499267578125,
-0.01432037353515625,
0.034912109375,
0.030364990234375,
0.019775390625,
-0.021575927734375,
-0.0175323486328125,
-0.024749755859375,
0.052337646484375,
-0.0162506103515625,
0.0179901123046875,
-0.01403045654296875,
-0.0189666748046875,
0.0111846923828125,
-0.032989501953125,
-0.0782470703125,
0.01140594482421875,
-0.0176239013671875,
0.07415771484375,
0.061920166015625,
-0.049346923828125,
-0.0131988525390625,
0.061614990234375,
-0.016448974609375,
0.0201873779296875,
0.005035400390625,
0.01123809814453125,
-0.006702423095703125,
0.008056640625,
-0.0167388916015625,
-0.01375579833984375,
0.03814697265625,
-0.029296875,
-0.048614501953125,
0.00235748291015625,
0.0011148452758789062,
0.01151275634765625,
-0.0292816162109375,
0.046142578125,
0.029052734375,
-0.0245513916015625,
-0.004169464111328125,
0.032501220703125,
-0.00594329833984375,
-0.024627685546875,
-0.0271148681640625,
0.0227813720703125,
0.0073394775390625,
0.00039958953857421875,
0.01849365234375,
0.007038116455078125,
0.028472900390625,
-0.0165863037109375,
0.04034423828125,
0.0288848876953125,
-0.0217132568359375,
-0.03131103515625,
-0.0008206367492675781,
0.0206298828125,
0.007450103759765625,
-0.00024306774139404297,
0.0197601318359375,
0.042633056640625,
0.061676025390625,
-0.027435302734375,
-0.005764007568359375,
0.03106689453125,
0.04144287109375,
-0.0550537109375,
-0.021270751953125,
0.0106353759765625,
-0.01849365234375,
-0.0335693359375,
-0.0158233642578125,
-0.00954437255859375,
0.050079345703125,
-0.0214385986328125,
0.0238189697265625,
-0.037109375,
0.0010690689086914062,
0.031494140625,
0.005992889404296875,
0.07904052734375,
0.03485107421875,
-0.05059814453125,
-0.00907135009765625,
-0.0196533203125,
-0.00875091552734375,
-0.019989013671875,
-0.0268402099609375,
-0.0435791015625,
0.01003265380859375,
-0.0269622802734375,
0.0019588470458984375,
0.018218994140625,
0.069091796875,
0.022430419921875,
0.03350830078125,
-0.043914794921875,
-0.00678253173828125,
-0.0278472900390625,
0.08184814453125,
-0.0188751220703125,
0.0286865234375,
0.00424957275390625,
0.0205535888671875,
-0.015869140625,
0.007598876953125,
0.0101165771484375,
-0.0118408203125,
-0.02899169921875,
-0.030731201171875,
-0.03668212890625,
0.00719451904296875,
0.05108642578125,
-0.0216064453125,
-0.01364898681640625,
0.0031490325927734375,
-0.002841949462890625,
-0.01146697998046875,
0.038177490234375,
0.033782958984375,
-0.00399017333984375,
0.03204345703125,
-0.0308685302734375,
-0.01432037353515625,
-0.0297698974609375,
-0.0207977294921875,
0.057708740234375,
-0.01751708984375,
0.0135498046875,
0.041015625,
0.0223388671875,
0.019378662109375,
0.037139892578125,
-0.01409912109375,
0.039825439453125,
0.048370361328125,
0.025299072265625,
0.01241302490234375,
0.00403594970703125,
-0.0018587112426757812,
-0.0251312255859375,
0.060302734375,
0.0182037353515625,
-0.01131439208984375,
0.0601806640625,
-0.030059814453125,
0.030853271484375,
-0.0029430389404296875,
0.052978515625,
-0.033782958984375,
0.03314208984375,
0.023193359375,
-0.004016876220703125,
0.06243896484375,
0.0197296142578125,
0.0000699758529663086,
-0.006191253662109375,
-0.005096435546875,
0.0297698974609375,
0.0099945068359375,
0.0261993408203125,
0.028228759765625,
0.01194000244140625,
-0.040618896484375,
0.01898193359375,
-0.017242431640625,
-0.0068359375,
-0.012176513671875,
0.0097503662109375,
-0.015655517578125,
-0.024383544921875,
0.0265350341796875,
-0.017303466796875,
-0.0094451904296875,
-0.0097808837890625,
0.02362060546875,
0.01105499267578125,
-0.0018482208251953125,
0.0164031982421875,
0.0034694671630859375,
0.0019779205322265625,
0.0166473388671875,
-0.02081298828125,
0.015625,
-0.0156707763671875,
-0.001171112060546875,
-0.07598876953125,
-0.0170135498046875,
0.007904052734375,
0.039093017578125,
-0.032318115234375,
0.0487060546875,
-0.04071044921875,
-0.0032176971435546875,
-0.0020275115966796875,
-0.020233154296875,
0.045440673828125,
-0.0189666748046875,
-0.0190582275390625,
0.00600433349609375,
-0.0104522705078125,
0.00958251953125,
0.00243377685546875,
-0.0038166046142578125,
-0.036956787109375,
0.003509521484375,
0.00408935546875,
-0.003185272216796875,
0.00814056396484375,
0.01338958740234375,
-0.042388916015625,
0.0016889572143554688,
0.0081939697265625,
0.002285003662109375,
-0.0002930164337158203,
-0.01064300537109375,
-0.0157318115234375,
-0.0279998779296875,
-0.058349609375,
0.068603515625,
0.009490966796875,
0.05792236328125,
-0.0682373046875,
-0.00045108795166015625,
0.01203155517578125,
0.007762908935546875,
0.0250396728515625,
0.006481170654296875,
-0.02825927734375,
-0.00848388671875,
0.04205322265625,
0.01111602783203125,
-0.000008225440979003906,
0.0517578125,
-0.0005931854248046875,
0.003620147705078125,
-0.0244903564453125,
0.012725830078125,
0.03607177734375,
-0.0399169921875,
-0.062255859375,
0.025421142578125,
-0.004123687744140625,
0.0006866455078125,
0.0277252197265625,
0.005146026611328125,
0.01512908935546875,
0.0024394989013671875,
-0.01303863525390625,
-0.0035076141357421875,
0.000179290771484375,
0.0256805419921875,
0.0198211669921875,
-0.024627685546875,
-0.02325439453125,
-0.026641845703125,
0.033599853515625,
0.003116607666015625,
-0.0054779052734375,
0.0157623291015625,
0.029998779296875,
-0.02667236328125,
-0.0246429443359375,
-0.00687408447265625,
0.0289459228515625,
-0.04315185546875,
0.06256103515625,
-0.0197601318359375,
0.0265350341796875,
-0.050689697265625,
0.004413604736328125,
0.0283966064453125,
0.0693359375,
-0.0211029052734375,
-0.0540771484375,
0.0158843994140625,
-0.00791168212890625,
0.004852294921875,
0.005878448486328125,
0.005992889404296875,
-0.04632568359375,
0.01007843017578125,
-0.0255889892578125,
-0.031890869140625,
0.002788543701171875,
0.046783447265625,
0.0062103271484375,
0.00894927978515625,
-0.0167999267578125,
-0.03729248046875,
-0.0158538818359375,
0.005931854248046875,
0.0007071495056152344,
0.02960205078125,
-0.0087890625,
0.053680419921875,
-0.0186614990234375,
0.00701904296875,
-0.0083160400390625,
0.01342010498046875,
-0.0179443359375,
0.01873779296875,
-0.018646240234375,
-0.023406982421875,
-0.023193359375,
0.033203125,
0.06878662109375,
0.00667572021484375,
0.02252197265625,
0.0018863677978515625,
-0.02679443359375,
0.014678955078125,
0.038604736328125,
-0.019561767578125,
-0.009918212890625,
-0.033447265625,
0.00969696044921875,
0.02960205078125,
-0.001956939697265625,
0.01194000244140625,
-0.00843048095703125,
0.04644775390625,
-0.05181884765625,
0.0313720703125,
-0.0167388916015625,
-0.0413818359375,
0.07012939453125,
-0.06817626953125,
0.091064453125,
-0.04547119140625,
-0.049224853515625,
0.008880615234375,
-0.0171661376953125,
-0.0921630859375,
0.0171661376953125,
0.04913330078125,
-0.010528564453125,
-0.008453369140625,
-0.0035343170166015625,
-0.018157958984375,
-0.0016202926635742188,
0.01152801513671875,
0.00943756103515625,
0.006114959716796875,
0.0177154541015625,
-0.009521484375,
-0.0109405517578125,
0.0185394287109375,
0.0031566619873046875,
0.00028967857360839844,
-0.00670623779296875,
0.0712890625,
-0.01056671142578125,
0.0007700920104980469,
0.063232421875,
-0.0103302001953125,
0.00878143310546875,
0.02703857421875,
0.030120849609375,
-0.051971435546875,
-0.0160064697265625,
-0.01239776611328125,
-0.04864501953125,
-0.002227783203125,
0.02435302734375,
-0.021392822265625,
0.0004496574401855469,
-0.0064239501953125,
0.02142333984375,
-0.00838470458984375,
0.04144287109375,
-0.0183868408203125,
-0.0318603515625,
-0.0111083984375,
-0.01123809814453125,
0.018646240234375,
0.0303192138671875,
0.033416748046875,
0.001926422119140625,
-0.0185394287109375,
-0.0025482177734375,
-0.016265869140625,
0.0190582275390625,
-0.03656005859375,
0.0196533203125,
-0.010406494140625,
0.0120086669921875,
0.00907135009765625,
-0.031982421875,
0.0045166015625,
0.009857177734375,
-0.01001739501953125,
-0.0117950439453125,
-0.02154541015625,
-0.039642333984375,
-0.01172637939453125,
0.051910400390625,
0.00891876220703125,
0.037322998046875,
-0.0511474609375,
0.0260162353515625,
-0.00826263427734375,
-0.0175933837890625,
-0.0290374755859375,
-0.02813720703125,
-0.018096923828125,
0.00041985511779785156,
-0.0183868408203125,
-0.081298828125,
-0.044036865234375,
-0.047943115234375,
0.052032470703125,
0.0347900390625,
-0.05963134765625,
0.0296630859375,
0.00943756103515625,
-0.00009107589721679688,
0.005889892578125,
0.031341552734375,
-0.0213165283203125,
-0.02752685546875,
-0.041656494140625,
-0.0099945068359375,
-0.0243072509765625,
0.04736328125,
-0.00022017955780029297,
0.0036525726318359375,
0.0188751220703125,
-0.0200042724609375,
-0.018035888671875,
0.010986328125,
0.005626678466796875,
0.05267333984375,
-0.000743865966796875,
-0.0231781005859375,
-0.03009033203125,
0.0367431640625,
-0.0132904052734375,
0.0269012451171875,
0.032440185546875,
0.0333251953125,
-0.056671142578125,
-0.027587890625,
-0.0200042724609375,
-0.0303497314453125,
-0.054840087890625,
-0.0721435546875,
0.054901123046875,
-0.01812744140625,
-0.0292205810546875,
-0.07269287109375,
0.035247802734375,
0.037109375,
-0.04925537109375,
-0.03387451171875,
-0.00795745849609375,
-0.037872314453125,
0.0107269287109375,
0.0218658447265625,
-0.007648468017578125,
0.03216552734375,
0.014617919921875,
-0.00473785400390625,
0.02838134765625,
0.034515380859375,
0.002185821533203125,
0.01088714599609375,
-0.0110321044921875,
0.04022216796875,
0.040740966796875,
-0.03497314453125,
0.048980712890625,
0.002071380615234375,
-0.00418853759765625,
-0.0223541259765625,
-0.023162841796875,
-0.02813720703125,
-0.0031337738037109375,
0.07159423828125,
0.05859375,
0.019073486328125,
-0.040130615234375,
0.0257720947265625,
0.019073486328125,
-0.042724609375,
-0.004795074462890625,
0.00171661376953125,
-0.01910400390625,
-0.017181396484375,
-0.028076171875,
0.006683349609375,
0.001018524169921875,
-0.0307159423828125,
-0.00492095947265625,
-0.022979736328125,
-0.004180908203125,
0.012725830078125,
0.002101898193359375,
-0.059814453125,
0.0215911865234375,
-0.01317596435546875,
-0.01531219482421875,
0.0167694091796875,
0.0250701904296875,
-0.005069732666015625,
0.05181884765625,
0.023193359375,
-0.0025844573974609375,
-0.00904083251953125,
0.00858306884765625,
0.027618408203125,
-0.022369384765625,
0.0260467529296875,
-0.032745361328125,
0.00043654441833496094,
0.0141754150390625,
-0.00313568115234375,
0.008056640625,
-0.0176544189453125,
0.01345062255859375,
-0.03619384765625,
0.0859375,
-0.0175628662109375,
0.050811767578125,
0.0048828125,
0.047119140625,
-0.00594329833984375,
-0.01922607421875,
0.0218963623046875,
-0.03875732421875,
-0.0012140274047851562,
0.03424072265625,
-0.00815582275390625,
-0.0295867919921875,
0.01148223876953125,
0.0460205078125,
0.013275146484375,
0.0133209228515625
] |
d183e0ddb7aecc789a7de3d85557ce73f14f43b9 | Wordpress Stackexchange
Q: Implement ssl to a WP docker container I was able to setup a WordPress containerised app using the docker-compose.yml file below and it is working fine:
wp1:
image: wordpress
links:
- db:mysql
ports:
- 9001:80
environment:
WORDPRESS_DB_NAME: mysql_db1
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: password
phpmyadmin:
image: corbinu/docker-phpmyadmin
links:
- db:mysql
ports:
- 8000:80
I also installed lets-encrypt and was able to make my main domain in https work like https://domain.com but when I access the WP app in docker https://domain.com:9001 it is not working but http://domain.com:9001 is working
What I have tried is changing the ports from
ports:
- 9001:80
to
ports:
- 9001:443
I'm using the default Digitalocean 1-click app 1.12.3 docker in Ubuntu 16.4 running on Apache2
What would be the proper way to implement ssl so I can access my dockerised sites with ssl like: https://domain.com:9001 ?
| Q: Implement ssl to a WP docker container I was able to setup a WordPress containerised app using the docker-compose.yml file below and it is working fine:
wp1:
image: wordpress
links:
- db:mysql
ports:
- 9001:80
environment:
WORDPRESS_DB_NAME: mysql_db1
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: password
phpmyadmin:
image: corbinu/docker-phpmyadmin
links:
- db:mysql
ports:
- 8000:80
I also installed lets-encrypt and was able to make my main domain in https work like https://domain.com but when I access the WP app in docker https://domain.com:9001 it is not working but http://domain.com:9001 is working
What I have tried is changing the ports from
ports:
- 9001:80
to
ports:
- 9001:443
I'm using the default Digitalocean 1-click app 1.12.3 docker in Ubuntu 16.4 running on Apache2
What would be the proper way to implement ssl so I can access my dockerised sites with ssl like: https://domain.com:9001 ?
| wordpress | {
"language": "en",
"length": 141,
"provenance": "stackexchange_00019.jsonl.gz:471143",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249327"
} | [
-0.0182342529296875,
-0.004993438720703125,
-0.026947021484375,
0.0467529296875,
-0.013397216796875,
-0.04595947265625,
0.0406494140625,
-0.0233612060546875,
0.03759765625,
0.01824951171875,
0.036407470703125,
-0.01464080810546875,
0.017852783203125,
-0.0430908203125,
-0.02081298828125,
0.0118865966796875,
0.0033855438232421875,
0.02001953125,
0.017181396484375,
-0.03582763671875,
0.01415252685546875,
-0.031646728515625,
0.008941650390625,
0.052215576171875,
0.0308074951171875,
-0.0261077880859375,
0.062347412109375,
0.0018215179443359375,
0.03558349609375,
0.017242431640625,
0.037353515625,
-0.056427001953125,
0.0309295654296875,
0.03594970703125,
-0.0638427734375,
-0.017547607421875,
-0.050628662109375,
0.031707763671875,
-0.023529052734375,
0.0150299072265625,
0.01922607421875,
-0.00159454345703125,
0.0972900390625,
0.02178955078125,
0.04278564453125,
-0.05108642578125,
0.04449462890625,
-0.065185546875,
0.0197296142578125,
-0.010406494140625,
0.0209808349609375,
0.022491455078125,
0.03131103515625,
-0.0023555755615234375,
-0.01293182373046875,
0.01453399658203125,
-0.007518768310546875,
-0.02734375,
0.0013141632080078125,
0.0283203125,
-0.00122833251953125,
0.0308685302734375,
0.006839752197265625,
-0.00595855712890625,
-0.029296875,
-0.0030689239501953125,
0.0026226043701171875,
0.01384735107421875,
-0.051483154296875,
-0.058807373046875,
0.0091094970703125,
-0.0111083984375,
-0.02398681640625,
-0.007843017578125,
-0.01036834716796875,
0.02197265625,
0.054046630859375,
0.03948974609375,
-0.0289459228515625,
0.0200347900390625,
-0.0023593902587890625,
-0.01397705078125,
-0.0333251953125,
-0.03619384765625,
0.01390838623046875,
-0.011474609375,
-0.0072174072265625,
-0.0093841552734375,
0.0186004638671875,
-0.0014829635620117188,
0.003810882568359375,
0.01061248779296875,
0.00608062744140625,
0.04119873046875,
-0.01322174072265625,
-0.0213165283203125,
-0.006229400634765625,
-0.021820068359375,
0.0355224609375,
0.049652099609375,
0.00540924072265625,
-0.0496826171875,
0.06280517578125,
-0.026397705078125,
-0.00856781005859375,
0.051300048828125,
0.01111602783203125,
0.035430908203125,
0.0184783935546875,
0.00738525390625,
0.0003523826599121094,
-0.004108428955078125,
-0.0251312255859375,
-0.06085205078125,
0.0523681640625,
0.04534912109375,
-0.03424072265625,
0.059478759765625,
0.007232666015625,
0.023468017578125,
-0.031982421875,
0.01105499267578125,
-0.04180908203125,
0.029510498046875,
0.0014390945434570312,
-0.0033512115478515625,
0.036285400390625,
-0.007640838623046875,
-0.0025768280029296875,
0.017242431640625,
-0.028533935546875,
0.0179595947265625,
0.04833984375,
0.032684326171875,
-0.00591278076171875,
-0.01131439208984375,
0.051971435546875,
0.0311431884765625,
0.0037250518798828125,
-0.005672454833984375,
0.0261993408203125,
-0.00885009765625,
-0.0272674560546875,
-0.0003490447998046875,
0.0092315673828125,
0.03778076171875,
0.0297088623046875,
-0.008331298828125,
-0.0087890625,
-0.040618896484375,
0.0013904571533203125,
0.005840301513671875,
0.005615234375,
0.03387451171875,
0.0193328857421875,
0.02685546875,
0.02484130859375,
-0.009490966796875,
0.0007929801940917969,
-0.0032749176025390625,
-0.0009660720825195312,
-0.006252288818359375,
0.037109375,
0.01251220703125,
-0.004486083984375,
0.0210723876953125,
-0.01451873779296875,
0.00519561767578125,
0.032623291015625,
0.039093017578125,
0.0204620361328125,
0.0066070556640625,
-0.0001685619354248047,
-0.0008463859558105469,
-0.0013256072998046875,
-0.01319122314453125,
0.0279388427734375,
0.043304443359375,
0.003284454345703125,
0.04547119140625,
0.01331329345703125,
-0.03204345703125,
0.1025390625,
-0.036956787109375,
-0.002269744873046875,
-0.00949859619140625,
0.0132293701171875,
0.033966064453125,
-0.00397491455078125,
0.0350341796875,
-0.0007610321044921875,
0.0024871826171875,
-0.034515380859375,
0.0116424560546875,
-0.0131378173828125,
-0.019500732421875,
-0.046051025390625,
-0.0007376670837402344,
-0.0200042724609375,
-0.00832366943359375,
-0.0292510986328125,
-0.005771636962890625,
0.0090484619140625,
0.04412841796875,
0.0203857421875,
0.0006575584411621094,
-0.004425048828125,
0.000032961368560791016,
0.002132415771484375,
-0.00934600830078125,
0.01551055908203125,
-0.0073699951171875,
0.00040459632873535156,
-0.04058837890625,
-0.05010986328125,
0.0276641845703125,
-0.027099609375,
0.05072021484375,
-0.01953125,
0.057403564453125,
-0.01800537109375,
-0.048980712890625,
-0.01267242431640625,
-0.02069091796875,
-0.000576019287109375,
0.0015735626220703125,
0.0004792213439941406,
-0.0051727294921875,
0.04669189453125,
0.02398681640625,
0.05072021484375,
-0.034393310546875,
0.0249176025390625,
0.0124053955078125,
-0.054229736328125,
-0.01325225830078125,
-0.0384521484375,
-0.020843505859375,
-0.014434814453125,
0.0679931640625,
0.035552978515625,
0.0089111328125,
-0.03912353515625,
-0.040618896484375,
0.03167724609375,
-0.042999267578125,
0.008087158203125,
-0.0290679931640625,
0.003582000732421875,
-0.01236724853515625,
0.014984130859375,
-0.004276275634765625,
0.0374755859375,
-0.0012731552124023438,
0.00975799560546875,
0.034912109375,
-0.00037670135498046875,
0.01690673828125,
-0.037750244140625,
-0.01401519775390625,
0.0294342041015625,
-0.052764892578125,
-0.05145263671875,
-0.01514434814453125,
-0.0115509033203125,
-0.0095672607421875,
-0.0024433135986328125,
-0.0096435546875,
-0.0110015869140625,
-0.004856109619140625,
0.027679443359375,
-0.040435791015625,
-0.006801605224609375,
-0.03668212890625,
-0.0007638931274414062,
-0.000576019287109375,
-0.01360321044921875,
0.022491455078125,
0.0140380859375,
-0.0216827392578125,
-0.0225067138671875,
0.0013580322265625,
-0.03558349609375,
-0.01204681396484375,
-0.01448822021484375,
-0.059112548828125,
0.0205841064453125,
0.015411376953125,
-0.03240966796875,
0.0012655258178710938,
0.034759521484375,
0.00914764404296875,
-0.00859832763671875,
-0.0010347366333007812,
-0.01192474365234375,
0.0019083023071289062,
0.06512451171875,
-0.034210205078125,
0.03533935546875,
-0.033966064453125,
0.01392364501953125,
0.04498291015625,
-0.0061798095703125,
0.00049591064453125,
0.00571441650390625,
-0.044342041015625,
-0.002506256103515625,
-0.01018524169921875,
-0.03326416015625,
-0.00033092498779296875,
-0.1131591796875,
-0.007843017578125,
0.0194549560546875,
-0.04608154296875,
0.038818359375,
-0.011016845703125,
-0.0022125244140625,
-0.0012445449829101562,
-0.059417724609375,
-0.053466796875,
-0.0374755859375,
-0.036712646484375,
-0.01158905029296875,
0.01334381103515625,
-0.0160369873046875,
0.01314544677734375,
0.0207061767578125,
0.0079193115234375,
-0.016571044921875,
-0.0230560302734375,
-0.07159423828125,
-0.08477783203125,
-0.09423828125,
0.00011801719665527344,
-0.01129913330078125,
0.03338623046875,
-0.0062408447265625,
0.06640625,
0.0006551742553710938,
-0.061004638671875,
-0.0173797607421875,
0.04241943359375,
-0.0108795166015625,
0.0176544189453125,
-0.013824462890625,
-0.0118560791015625,
-0.0111083984375,
-0.0014896392822265625,
0.05743408203125,
0.019500732421875,
-0.0211639404296875,
-0.002696990966796875,
-0.01021575927734375,
-0.006114959716796875,
0.01380157470703125,
-0.05328369140625,
-0.0023784637451171875,
0.01236724853515625,
-0.0272064208984375,
-0.046783447265625,
0.044891357421875,
-0.0219573974609375,
0.005901336669921875,
-0.0311279296875,
-0.042205810546875,
-0.009796142578125,
-0.01971435546875,
0.008636474609375,
0.01043701171875,
0.0017328262329101562,
0.016998291015625,
-0.00878143310546875,
0.028411865234375,
0.006320953369140625,
-0.01062774658203125,
-0.02984619140625,
0.064697265625,
-0.00675201416015625,
-0.062408447265625,
-0.0098724365234375,
-0.017333984375,
-0.035247802734375,
0.006412506103515625,
-0.049346923828125,
-0.02215576171875,
0.039825439453125,
0.0031490325927734375,
0.03680419921875,
-0.0278472900390625,
-0.034393310546875,
-0.0016679763793945312,
0.0867919921875,
-0.004917144775390625,
-0.0212554931640625,
0.032958984375,
0.040924072265625,
-0.07611083984375,
-0.00414276123046875,
-0.033050537109375,
-0.0084381103515625,
-0.037017822265625,
-0.022735595703125,
-0.024627685546875,
-0.0195770263671875,
0.0396728515625,
-0.10284423828125,
0.00829315185546875,
-0.060760498046875,
0.01399993896484375,
0.00429534912109375,
0.0076904296875,
0.00701141357421875,
-0.02349853515625,
0.00868988037109375,
-0.007045745849609375,
-0.034637451171875,
-0.1341552734375,
-0.0296630859375,
-0.01364898681640625,
0.10321044921875,
0.0002301931381225586,
-0.000011861324310302734,
-0.033905029296875,
0.058258056640625,
0.0167083740234375,
0.013702392578125,
-0.0020923614501953125,
-0.0007948875427246094,
0.017242431640625,
-0.004848480224609375,
0.004482269287109375,
-0.0150909423828125,
-0.02142333984375,
-0.0156707763671875,
-0.007221221923828125,
-0.002887725830078125,
-0.01126861572265625,
-0.01528167724609375,
0.015838623046875,
-0.02197265625,
-0.0360107421875,
0.01360321044921875,
-0.01493072509765625,
0.03900146484375,
-0.02850341796875,
0.0168304443359375,
-0.006649017333984375,
-0.045318603515625,
0.0570068359375,
-0.016632080078125,
0.00931549072265625,
0.0068359375,
0.058349609375,
-0.01499176025390625,
-0.0187225341796875,
-0.0477294921875,
0.00395965576171875,
0.0419921875,
-0.0154266357421875,
0.054229736328125,
0.06781005859375,
-0.0003371238708496094,
-0.002262115478515625,
0.041015625,
0.01294708251953125,
0.049896240234375,
-0.049468994140625,
0.022491455078125,
-0.0203399658203125,
0.0003783702850341797,
0.03436279296875,
-0.04180908203125,
0.030426025390625,
0.00843048095703125,
0.020843505859375,
0.0322265625,
-0.0540771484375,
-0.007320404052734375,
-0.0209197998046875,
0.0400390625,
-0.048919677734375,
0.01739501953125,
-0.059814453125,
0.043548583984375,
0.00939178466796875,
0.0019178390502929688,
0.0380859375,
0.01357269287109375,
0.0031375885009765625,
-0.038909912109375,
-0.0085906982421875,
-0.00180816650390625,
0.0287322998046875,
-0.0125579833984375,
0.01763916015625,
-0.029144287109375,
-0.034393310546875,
0.1376953125,
0.015869140625,
-0.061126708984375,
0.043365478515625,
-0.0447998046875,
0.0037937164306640625,
0.0310516357421875,
-0.0171051025390625,
0.0082855224609375,
0.00820159912109375,
-0.0386962890625,
-0.0185699462890625,
-0.0171356201171875,
-0.038818359375,
-0.051788330078125,
0.01788330078125,
0.00428009033203125,
-0.00948333740234375,
0.0164337158203125,
0.050811767578125,
0.0226287841796875,
0.0211639404296875,
-0.0281829833984375,
0.00421905517578125,
0.0013399124145507812,
0.01297760009765625,
0.0062408447265625,
0.0150299072265625,
-0.0103302001953125,
0.017364501953125,
0.0259552001953125,
-0.0137939453125,
-0.0296630859375,
0.0287017822265625,
0.0146942138671875,
0.0408935546875,
0.03790283203125,
-0.011688232421875,
0.0254974365234375,
-0.0038814544677734375,
-0.010833740234375,
-0.014617919921875,
-0.012786865234375,
0.004512786865234375,
-0.006420135498046875,
0.0050201416015625,
-0.001956939697265625,
-0.0276031494140625,
0.0189361572265625,
-0.02276611328125,
0.03643798828125,
-0.007045745849609375,
0.0036373138427734375,
0.005558013916015625,
-0.01174163818359375,
0.07525634765625,
-0.01568603515625,
-0.031829833984375,
0.038055419921875,
0.03387451171875,
-0.03558349609375,
-0.0028667449951171875,
0.0297088623046875,
-0.0163116455078125,
0.0172882080078125,
-0.0128021240234375,
-0.0082550048828125,
-0.01161956787109375,
0.01560211181640625,
0.01128387451171875,
0.009613037109375,
0.017852783203125,
-0.029998779296875,
-0.00992584228515625,
-0.03582763671875,
0.04840087890625,
0.0181121826171875,
-0.027740478515625,
0.0015745162963867188,
0.0325927734375,
0.0183258056640625,
-0.0253143310546875,
-0.0728759765625,
-0.0078277587890625,
0.012298583984375,
0.03570556640625,
-0.002475738525390625,
-0.025970458984375,
0.0699462890625,
0.004055023193359375,
0.042938232421875,
-0.0037441253662109375,
-0.007747650146484375,
-0.026397705078125,
0.0083770751953125,
0.005756378173828125,
-0.03399658203125,
-0.0017528533935546875,
-0.042388916015625,
0.016845703125,
0.032012939453125,
0.06585693359375,
-0.0013990402221679688,
-0.0010156631469726562,
-0.0134429931640625,
-0.003963470458984375,
-0.010650634765625,
0.0032482147216796875,
-0.003692626953125,
0.0016927719116210938,
0.00551605224609375,
0.01398468017578125,
0.06494140625,
-0.0306243896484375,
0.0023937225341796875,
-0.007404327392578125,
-0.01302337646484375,
0.004268646240234375,
0.014678955078125,
0.0242767333984375,
0.022308349609375,
0.08990478515625,
-0.006927490234375,
0.059783935546875,
0.043914794921875,
0.003971099853515625,
0.0217132568359375,
-0.00948333740234375,
-0.057281494140625,
0.00757598876953125,
0.0084381103515625,
0.00201416015625,
-0.01157379150390625,
0.009796142578125,
-0.02239990234375,
-0.0120849609375,
0.02423095703125,
0.043212890625,
-0.024078369140625,
0.0014791488647460938,
0.0279388427734375,
-0.0308380126953125,
-0.0616455078125,
-0.0251922607421875,
-0.0188446044921875,
-0.0266571044921875,
0.039031982421875,
-0.01629638671875,
-0.043975830078125,
0.001659393310546875,
0.004550933837890625,
-0.0238189697265625,
-0.00029087066650390625,
0.0141448974609375,
0.0027980804443359375,
-0.030426025390625,
-0.004688262939453125,
0.016387939453125,
-0.008514404296875,
0.03607177734375,
-0.00922393798828125,
-0.0136260986328125,
-0.036407470703125,
-0.04400634765625,
-0.04119873046875,
-0.046112060546875,
-0.045684814453125,
0.02777099609375,
0.01171875,
0.00270843505859375,
0.05377197265625,
0.001438140869140625,
0.00835418701171875,
0.0177001953125,
-0.0394287109375,
-0.0266265869140625,
-0.00408172607421875,
-0.010162353515625,
0.02825927734375,
-0.04034423828125,
0.00804901123046875,
-0.0477294921875,
0.0242156982421875,
-0.004528045654296875,
-0.012237548828125,
0.097900390625,
-0.046722412109375,
-0.003314971923828125,
0.0170745849609375,
-0.002170562744140625,
0.00955963134765625,
-0.028961181640625,
0.010040283203125,
-0.052520751953125,
0.0265045166015625,
-0.0207366943359375,
0.0136260986328125,
-0.0155792236328125,
-0.027984619140625,
-0.01751708984375,
0.06646728515625,
-0.0258026123046875,
-0.0014400482177734375,
-0.0002892017364501953,
0.0269317626953125,
0.01227569580078125,
0.041168212890625,
0.0113677978515625,
0.0136260986328125,
0.025665283203125,
-0.01396942138671875,
0.01419830322265625,
-0.006359100341796875,
-0.0092315673828125,
0.045867919921875,
0.0733642578125,
0.023681640625,
-0.0750732421875,
-0.0187835693359375,
0.0596923828125,
0.05224609375,
0.033782958984375,
0.050262451171875,
-0.0198822021484375,
-0.0095672607421875,
0.02447509765625,
-0.0230255126953125,
0.0141754150390625,
0.0023899078369140625,
-0.01023101806640625,
0.01165008544921875,
0.01361846923828125,
0.006435394287109375,
0.030120849609375,
0.04547119140625,
-0.011383056640625,
0.01456451416015625,
0.01483917236328125,
-0.036712646484375,
0.01483917236328125,
-0.005245208740234375,
-0.0025806427001953125,
-0.0321044921875,
0.007965087890625,
-0.022430419921875,
0.0204620361328125,
-0.0118255615234375,
-0.0287933349609375,
-0.00574493408203125,
0.005237579345703125,
-0.04852294921875,
0.036102294921875,
-0.0204620361328125,
0.052398681640625,
-0.01265716552734375,
0.016876220703125,
0.0129241943359375,
0.0223541259765625,
0.005710601806640625,
0.05670166015625,
0.0185699462890625,
0.0179595947265625,
-0.045745849609375,
-0.045989990234375,
0.001979827880859375,
0.023162841796875,
0.0452880859375,
0.0026569366455078125,
0.036041259765625,
-0.0281982421875,
0.0245819091796875,
0.033905029296875,
0.01515960693359375,
0.01065826416015625,
-0.02618408203125,
0.0174407958984375,
0.053558349609375,
-0.01032257080078125,
0.054168701171875,
-0.013458251953125,
-0.0162353515625,
0.00513458251953125,
0.0316162109375,
0.0119476318359375,
0.020111083984375,
-0.0088043212890625,
-0.005893707275390625,
0.0152587890625,
0.01470947265625,
0.041107177734375,
-0.046783447265625,
0.01214599609375,
-0.036285400390625,
0.024200439453125,
0.02178955078125,
0.01435089111328125,
0.004161834716796875,
0.02862548828125,
0.055023193359375,
0.0135040283203125,
-0.0154876708984375,
0.06024169921875,
0.006183624267578125,
-0.01195526123046875,
-0.0297698974609375,
-0.010009765625,
0.014373779296875,
-0.0120086669921875,
0.0208892822265625,
-0.00984954833984375,
0.03314208984375,
-0.0032806396484375,
0.0494384765625,
-0.0027923583984375,
0.0101470947265625,
0.033477783203125,
-0.044281005859375,
0.0106201171875,
-0.00838470458984375,
-0.002685546875,
-0.030517578125,
0.06793212890625,
0.007595062255859375,
-0.0006880760192871094,
0.04058837890625,
0.0178375244140625,
-0.0185546875,
0.038787841796875,
-0.0474853515625,
0.033447265625,
0.052764892578125,
-0.01091766357421875,
-0.000675201416015625,
0.03167724609375,
-0.0187835693359375,
-0.0171966552734375,
-0.020477294921875,
0.0227813720703125,
0.047760009765625,
-0.026153564453125,
0.04449462890625,
-0.0265045166015625,
0.00188446044921875,
-0.0207366943359375,
-0.0007886886596679688,
-0.0014657974243164062,
0.004680633544921875,
-0.0027370452880859375,
0.04010009765625,
0.003894805908203125,
-0.01739501953125,
-0.0151214599609375,
0.007659912109375,
0.0196380615234375,
-0.06793212890625,
-0.00565338134765625,
-0.019500732421875,
0.017608642578125,
-0.032806396484375,
-0.01457977294921875,
-0.03271484375,
-0.06854248046875,
-0.0105133056640625,
0.050323486328125,
-0.0264892578125,
0.0227203369140625,
-0.02813720703125,
0.01666259765625,
-0.03955078125,
-0.00205230712890625,
0.01030731201171875,
-0.024810791015625,
-0.0250701904296875,
0.000934600830078125,
-0.02984619140625,
-0.0360107421875,
-0.00450897216796875,
-0.007617950439453125,
0.00643157958984375,
-0.00616455078125,
0.03509521484375,
0.01219940185546875,
0.006435394287109375,
0.004123687744140625,
0.040313720703125,
0.035003662109375,
0.00884246826171875,
0.0105438232421875,
0.0219268798828125,
-0.0200958251953125,
-0.0213623046875,
0.0022029876708984375,
-0.03265380859375,
-0.0083770751953125,
-0.03509521484375,
-0.0041351318359375,
-0.027984619140625,
-0.09197998046875,
-0.1004638671875,
0.0013713836669921875,
0.0166473388671875,
-0.03271484375,
0.01378631591796875,
-0.0238037109375,
-0.040374755859375,
0.013641357421875,
-0.033203125,
0.06463623046875,
-0.01552581787109375,
0.0244598388671875,
-0.0266876220703125,
-0.04443359375,
-0.00391387939453125,
0.055419921875,
-0.006671905517578125,
0.020477294921875,
0.054779052734375,
-0.00951385498046875,
-0.046966552734375,
0.00901031494140625,
-0.00437164306640625,
0.0587158203125,
-0.039581298828125,
-0.0011119842529296875,
-0.00920867919921875,
0.00804901123046875,
-0.0298919677734375,
-0.0765380859375,
0.0234527587890625,
-0.08245849609375,
-0.022003173828125,
0.005035400390625,
-0.00609588623046875,
0.018280029296875,
-0.03961181640625,
-0.06451416015625,
0.042205810546875,
-0.007389068603515625,
-0.0294342041015625,
-0.10504150390625,
0.0225982666015625,
-0.0164794921875,
0.06842041015625,
-0.0247344970703125,
-0.0235137939453125,
-0.0288848876953125,
0.0692138671875,
-0.004749298095703125,
0.0242919921875,
-0.042144775390625,
0.023681640625,
0.0052490234375,
0.060394287109375,
0.051971435546875,
-0.0299835205078125,
-0.01470184326171875,
0.008575439453125,
0.0267181396484375,
0.0333251953125,
-0.0249481201171875,
0.041168212890625,
0.0110321044921875,
-0.03887939453125,
-0.00774383544921875,
-0.0111846923828125,
0.005672454833984375,
-0.01904296875,
0.0194091796875,
0.02191162109375,
-0.0004248619079589844,
-0.012176513671875,
-0.049163818359375,
-0.0802001953125,
0.00519561767578125,
-0.037384033203125,
0.0180816650390625,
-0.082275390625,
0.00998687744140625,
0.0182647705078125,
0.0278167724609375,
-0.00614166259765625,
-0.0110015869140625,
0.0223236083984375,
-0.01313018798828125,
0.0226287841796875,
-0.0296783447265625,
0.0231170654296875,
-0.002796173095703125,
0.1258544921875,
-0.0731201171875,
-0.0242462158203125,
0.0172576904296875,
0.02294921875,
0.044647216796875,
-0.0369873046875,
-0.0248870849609375,
-0.052734375,
0.0053253173828125,
0.03619384765625,
-0.0243988037109375,
0.017547607421875,
-0.04766845703125,
-0.0141143798828125,
-0.0205230712890625,
0.00351715087890625,
0.0194854736328125,
0.024871826171875,
0.0013189315795898438,
-0.0034694671630859375,
0.0261383056640625,
-0.0096282958984375,
-0.011871337890625,
-0.018157958984375,
-0.01364898681640625,
0.030548095703125,
-0.043243408203125,
-0.0024242401123046875,
-0.0178375244140625,
-0.037933349609375,
-0.0005846023559570312,
0.001018524169921875,
-0.020904541015625,
-0.0170440673828125,
-0.00787353515625,
0.01465606689453125,
-0.00856781005859375,
-0.004913330078125
] |
cc89c93a49af2fd42e42a034943a375b17c6c01f | Wordpress Stackexchange
Q: Which functions in theme or plugin load first I created a plugin to override a theme's function. As I learn that function in plugin loads first but I got an error
Fatal error: Cannot redeclare wooc_extra_register_fields() (previously
declared in ****/themes/****/functions.php:247) in
***/plugins/custom-plugin/custom-plugin.php on line 89
Not sure what I am doing wrong.
Also put theme's functions need to be override in if !function exist.
So what is the right way to override a theme function wrap in !function exist using a plugin??
A: In wp-settings.php, WordPress first checks for any must-use plugins (plugins in the optional mu-plugins folder) and loads those.
Then, if you're running a multisite installation, it checks for plugins that are network-activated and loads those.
| Q: Which functions in theme or plugin load first I created a plugin to override a theme's function. As I learn that function in plugin loads first but I got an error
Fatal error: Cannot redeclare wooc_extra_register_fields() (previously
declared in ****/themes/****/functions.php:247) in
***/plugins/custom-plugin/custom-plugin.php on line 89
Not sure what I am doing wrong.
Also put theme's functions need to be override in if !function exist.
So what is the right way to override a theme function wrap in !function exist using a plugin??
A: In wp-settings.php, WordPress first checks for any must-use plugins (plugins in the optional mu-plugins folder) and loads those.
Then, if you're running a multisite installation, it checks for plugins that are network-activated and loads those.
A: For your situation it would be best to wrap the plugin in function_exists
if ( ! function_exists( 'wooc_extra_register_fields' ) ) {
function wooc_extra_register_fields() {
}
}
in the parent theme, as this makes the functions of the theme pluggable. You can then create a child theme and redeclare the function in the child theme's functions.php
| wordpress | {
"language": "en",
"length": 175,
"provenance": "stackexchange_00019.jsonl.gz:471162",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249429"
} | [
0.055419921875,
-0.01161956787109375,
0.0280914306640625,
-0.038604736328125,
-0.0191497802734375,
0.004230499267578125,
-0.01335906982421875,
-0.03717041015625,
-0.033905029296875,
0.0180206298828125,
-0.052215576171875,
0.01885986328125,
-0.044097900390625,
-0.005382537841796875,
-0.0157318115234375,
-0.067138671875,
0.022125244140625,
-0.004978179931640625,
0.0291595458984375,
-0.01543426513671875,
0.02996826171875,
0.00839996337890625,
0.004482269287109375,
0.09759521484375,
0.022247314453125,
-0.050262451171875,
0.07391357421875,
-0.0254364013671875,
0.02764892578125,
-0.0235595703125,
0.031585693359375,
0.0010814666748046875,
0.0093841552734375,
0.0386962890625,
-0.054443359375,
-0.05548095703125,
0.02685546875,
0.00913238525390625,
-0.0085601806640625,
0.045654296875,
0.0233154296875,
-0.0011835098266601562,
0.0038356781005859375,
0.024505615234375,
-0.01525115966796875,
-0.0745849609375,
0.053924560546875,
-0.020477294921875,
-0.01348876953125,
-0.0206451416015625,
0.00901031494140625,
0.004810333251953125,
0.038604736328125,
-0.0281524658203125,
-0.0255889892578125,
-0.03399658203125,
-0.0450439453125,
0.035064697265625,
0.006534576416015625,
0.053985595703125,
0.0231475830078125,
0.02960205078125,
-0.0140228271484375,
-0.0198974609375,
0.0196685791015625,
-0.023406982421875,
-0.0277099609375,
0.0406494140625,
-0.08038330078125,
0.0116424560546875,
0.050018310546875,
-0.045440673828125,
0.0017843246459960938,
0.01303863525390625,
-0.029449462890625,
-0.0299835205078125,
0.041717529296875,
0.01366424560546875,
0.026763916015625,
-0.00701141357421875,
-0.00330352783203125,
-0.0146942138671875,
0.00811004638671875,
0.01038360595703125,
-0.01390838623046875,
0.04241943359375,
-0.019500732421875,
-0.0178680419921875,
-0.025634765625,
-0.01947021484375,
-0.0234527587890625,
0.0090179443359375,
-0.037109375,
-0.00921630859375,
-0.01319122314453125,
-0.0127105712890625,
0.03863525390625,
0.052490234375,
0.005428314208984375,
0.0009365081787109375,
-0.0027523040771484375,
-0.06256103515625,
0.0228271484375,
-0.032989501953125,
-0.0006747245788574219,
0.04315185546875,
-0.0098419189453125,
0.005992889404296875,
0.00675201416015625,
0.040069580078125,
0.00945281982421875,
-0.0477294921875,
0.013458251953125,
-0.0205078125,
-0.0002130270004272461,
0.0047760009765625,
-0.01947021484375,
0.0212249755859375,
0.0022754669189453125,
0.00887298583984375,
0.02606201171875,
0.03515625,
-0.0038585662841796875,
-0.021331787109375,
-0.03302001953125,
-0.04486083984375,
-0.031829833984375,
-0.0236358642578125,
-0.0119171142578125,
0.0285491943359375,
-0.018280029296875,
-0.0055389404296875,
0.026611328125,
0.0212554931640625,
-0.0019969940185546875,
-0.0192718505859375,
0.06561279296875,
0.02911376953125,
-0.005954742431640625,
0.00122833251953125,
0.0255584716796875,
-0.021392822265625,
-0.035614013671875,
-0.0008263587951660156,
-0.0220489501953125,
0.0208587646484375,
0.00901031494140625,
0.0084228515625,
-0.033355712890625,
-0.06488037109375,
0.0164794921875,
-0.038360595703125,
0.0239105224609375,
-0.0049591064453125,
0.03253173828125,
0.008575439453125,
0.0455322265625,
-0.018310546875,
-0.03289794921875,
-0.0034008026123046875,
-0.006946563720703125,
-0.03497314453125,
-0.03253173828125,
-0.042083740234375,
-0.06488037109375,
0.04815673828125,
0.002593994140625,
0.01049041748046875,
0.02734375,
0.01593017578125,
0.03668212890625,
0.0013246536254882812,
0.027496337890625,
0.039581298828125,
0.00656890869140625,
0.0095977783203125,
0.006900787353515625,
0.032470703125,
0.00920867919921875,
0.044036865234375,
0.0113525390625,
-0.0225067138671875,
0.031646728515625,
-0.01519012451171875,
-0.061126708984375,
0.01372528076171875,
0.00957489013671875,
0.0528564453125,
0.02496337890625,
0.02191162109375,
0.0244140625,
-0.00479888916015625,
-0.0110015869140625,
0.01125335693359375,
-0.033355712890625,
-0.033721923828125,
0.033233642578125,
0.023406982421875,
-0.0241241455078125,
0.0117950439453125,
0.01824951171875,
0.015411376953125,
0.007633209228515625,
-0.0186004638671875,
-0.03460693359375,
-0.0051116943359375,
-0.0129852294921875,
0.030364990234375,
0.06414794921875,
0.044464111328125,
-0.01557159423828125,
0.007518768310546875,
-0.0081329345703125,
-0.00283050537109375,
-0.0460205078125,
-0.0101776123046875,
-0.041290283203125,
0.061492919921875,
-0.003841400146484375,
0.06243896484375,
0.005344390869140625,
-0.048553466796875,
0.005535125732421875,
-0.017333984375,
-0.00870513916015625,
0.00499725341796875,
-0.020294189453125,
-0.01068878173828125,
-0.0089874267578125,
0.01349639892578125,
0.004421234130859375,
0.0200042724609375,
0.0210418701171875,
-0.0017242431640625,
-0.03350830078125,
0.0165863037109375,
-0.0022182464599609375,
-0.0312347412109375,
-0.0247039794921875,
0.035186767578125,
0.032928466796875,
0.0287017822265625,
-0.005771636962890625,
0.0306396484375,
0.0228118896484375,
-0.059478759765625,
-0.0036373138427734375,
0.0235137939453125,
0.040069580078125,
0.021636962890625,
0.006366729736328125,
-0.0185089111328125,
0.02557373046875,
-0.037109375,
0.06378173828125,
0.0212860107421875,
-0.007160186767578125,
-0.06671142578125,
0.02032470703125,
-0.004772186279296875,
0.0059814453125,
-0.08477783203125,
-0.06671142578125,
-0.00118255615234375,
0.037445068359375,
-0.0306854248046875,
0.00478363037109375,
-0.0130767822265625,
-0.00617218017578125,
-0.01434326171875,
0.036346435546875,
-0.017242431640625,
-0.024078369140625,
-0.0006670951843261719,
0.011322021484375,
-0.0022125244140625,
-0.0501708984375,
0.035858154296875,
-0.018585205078125,
-0.006710052490234375,
-0.01296234130859375,
-0.006103515625,
-0.059326171875,
-0.01221466064453125,
0.012542724609375,
-0.0379638671875,
-0.000019729137420654297,
0.029327392578125,
0.0009584426879882812,
-0.0306396484375,
-0.00637054443359375,
-0.00323486328125,
-0.05645751953125,
0.04998779296875,
-0.02545166015625,
-0.0396728515625,
-0.04132080078125,
-0.04620361328125,
0.02276611328125,
-0.0224761962890625,
-0.005001068115234375,
0.060272216796875,
0.03424072265625,
-0.01548004150390625,
0.0011615753173828125,
-0.0347900390625,
0.02294921875,
-0.01739501953125,
-0.02886962890625,
-0.024017333984375,
-0.050994873046875,
-0.006977081298828125,
0.03497314453125,
0.047698974609375,
0.004425048828125,
-0.03240966796875,
-0.0172271728515625,
0.039337158203125,
-0.060211181640625,
-0.0526123046875,
-0.060089111328125,
-0.0279541015625,
0.0123138427734375,
0.002727508544921875,
0.00547027587890625,
0.01110076904296875,
0.0005116462707519531,
0.0223846435546875,
-0.01303863525390625,
-0.03387451171875,
-0.030120849609375,
-0.061859130859375,
-0.063720703125,
-0.01361846923828125,
0.007556915283203125,
0.0203399658203125,
-0.0154876708984375,
0.06671142578125,
-0.016082763671875,
-0.06378173828125,
-0.0203704833984375,
0.0010480880737304688,
-0.006000518798828125,
0.0023193359375,
0.00372314453125,
-0.0132293701171875,
-0.01203155517578125,
0.01303863525390625,
0.007213592529296875,
0.0007171630859375,
-0.0101318359375,
-0.021240234375,
-0.0031604766845703125,
-0.052459716796875,
-0.017181396484375,
0.051727294921875,
-0.0019626617431640625,
-0.07220458984375,
0.010162353515625,
-0.08392333984375,
-0.0160675048828125,
0.0187530517578125,
-0.036529541015625,
0.0278167724609375,
0.027008056640625,
-0.032867431640625,
0.01346588134765625,
-0.0126495361328125,
0.0010938644409179688,
0.00865936279296875,
0.0380859375,
-0.03656005859375,
0.035186767578125,
-0.01032257080078125,
-0.01055145263671875,
-0.043304443359375,
0.06341552734375,
0.0047760009765625,
-0.024932861328125,
0.014190673828125,
0.01727294921875,
-0.016326904296875,
-0.0099945068359375,
-0.07135009765625,
-0.0198211669921875,
0.0245361328125,
-0.0236358642578125,
0.01708984375,
-0.035247802734375,
-0.0006194114685058594,
-0.0219268798828125,
0.0531005859375,
-0.005046844482421875,
-0.006694793701171875,
0.0372314453125,
0.00769805908203125,
-0.0550537109375,
0.0062255859375,
-0.0946044921875,
0.004180908203125,
-0.059906005859375,
-0.0099029541015625,
-0.0162353515625,
-0.018402099609375,
-0.008636474609375,
0.07550048828125,
-0.035736083984375,
-0.028900146484375,
0.01026153564453125,
0.01849365234375,
-0.01549530029296875,
0.01357269287109375,
-0.022918701171875,
-0.01125335693359375,
0.01849365234375,
-0.0235443115234375,
-0.1031494140625,
-0.007495880126953125,
-0.06561279296875,
0.090576171875,
0.02374267578125,
0.01494598388671875,
-0.03668212890625,
0.0292510986328125,
0.00040984153747558594,
0.0170135498046875,
0.01041412353515625,
0.00301361083984375,
0.0294952392578125,
-0.011474609375,
0.00547027587890625,
-0.01450347900390625,
-0.0005860328674316406,
0.0002142190933227539,
-0.0265960693359375,
0.043914794921875,
0.00627899169921875,
0.0149383544921875,
0.0287628173828125,
-0.029998779296875,
0.002552032470703125,
-0.01264190673828125,
-0.0338134765625,
-0.001888275146484375,
0.0031871795654296875,
-0.03277587890625,
0.00563812255859375,
-0.0014715194702148438,
-0.0009140968322753906,
-0.07061767578125,
-0.023529052734375,
0.03192138671875,
0.08056640625,
0.0208282470703125,
0.0248260498046875,
-0.01470947265625,
-0.00041294097900390625,
0.0164031982421875,
0.047821044921875,
-0.01242828369140625,
-0.0364990234375,
-0.01727294921875,
0.002719879150390625,
0.0013675689697265625,
0.0107879638671875,
-0.0307464599609375,
0.040374755859375,
-0.0017404556274414062,
-0.036956787109375,
0.02508544921875,
-0.007808685302734375,
0.0333251953125,
0.0072784423828125,
-0.003574371337890625,
0.00788116455078125,
0.035797119140625,
-0.0183868408203125,
-0.017822265625,
0.0007681846618652344,
0.0133056640625,
-0.0151519775390625,
0.01177978515625,
0.041656494140625,
0.036529541015625,
0.032257080078125,
-0.005603790283203125,
0.0289459228515625,
0.0158538818359375,
-0.01232147216796875,
0.035369873046875,
0.027374267578125,
-0.0157623291015625,
0.019744873046875,
0.042083740234375,
-0.02142333984375,
0.01568603515625,
-0.016693115234375,
0.08026123046875,
-0.0283050537109375,
-0.048187255859375,
-0.02349853515625,
-0.0158233642578125,
0.024627685546875,
0.036712646484375,
-0.00604248046875,
0.0290374755859375,
0.032745361328125,
-0.035675048828125,
-0.0122833251953125,
-0.003204345703125,
0.00453948974609375,
-0.05029296875,
0.031524658203125,
0.028717041015625,
-0.022613525390625,
0.00738525390625,
0.0173492431640625,
0.01049041748046875,
-0.0025615692138671875,
0.00377655029296875,
0.04632568359375,
-0.006946563720703125,
0.037689208984375,
0.0128021240234375,
-0.017303466796875,
0.0168304443359375,
-0.00800323486328125,
-0.003749847412109375,
-0.0299072265625,
-0.0184326171875,
-0.0091094970703125,
0.029632568359375,
-0.018798828125,
-0.01276397705078125,
0.0289306640625,
-0.0140380859375,
-0.006649017333984375,
0.0423583984375,
0.02459716796875,
-0.052398681640625,
0.0101318359375,
0.01480865478515625,
0.0238494873046875,
-0.0258026123046875,
-0.0036983489990234375,
0.051422119140625,
-0.0012865066528320312,
0.02899169921875,
-0.006961822509765625,
-0.032958984375,
0.0006947517395019531,
0.018157958984375,
0.004665374755859375,
0.005290985107421875,
-0.0096435546875,
-0.0341796875,
-0.0333251953125,
-0.006191253662109375,
0.0021953582763671875,
0.037933349609375,
-0.035888671875,
0.0165252685546875,
-0.00804901123046875,
-0.005252838134765625,
-0.01605224609375,
0.0219879150390625,
0.052032470703125,
0.029205322265625,
-0.043182373046875,
-0.0169219970703125,
-0.01485443115234375,
-0.04107666015625,
-0.062408447265625,
-0.0152435302734375,
-0.068359375,
0.021514892578125,
-0.0165557861328125,
0.0179595947265625,
-0.05157470703125,
-0.048309326171875,
-0.0081329345703125,
0.0047454833984375,
0.0171966552734375,
-0.0007677078247070312,
-0.008544921875,
0.0521240234375,
0.04388427734375,
-0.0018453598022460938,
0.0253753662109375,
0.0299530029296875,
-0.0029544830322265625,
-0.0204010009765625,
-0.028839111328125,
-0.052764892578125,
-0.0198974609375,
0.0129547119140625,
-0.042999267578125,
0.0633544921875,
0.0877685546875,
0.00269317626953125,
0.05218505859375,
-0.02288818359375,
-0.0192108154296875,
-0.004695892333984375,
0.0277099609375,
-0.019317626953125,
0.044830322265625,
0.025726318359375,
-0.01511383056640625,
0.0139007568359375,
0.013916015625,
-0.0158538818359375,
0.0271148681640625,
-0.00616455078125,
0.045166015625,
-0.01003265380859375,
-0.072998046875,
0.07623291015625,
0.01218414306640625,
0.007099151611328125,
0.0219573974609375,
-0.024566650390625,
0.0142822265625,
-0.0200653076171875,
0.032867431640625,
-0.01074981689453125,
-0.02874755859375,
0.026336669921875,
0.006908416748046875,
0.00910186767578125,
0.006710052490234375,
-0.0095977783203125,
0.007213592529296875,
0.046173095703125,
0.06280517578125,
-0.089599609375,
0.01611328125,
0.02294921875,
0.01499176025390625,
0.0172271728515625,
-0.010284423828125,
-0.01100921630859375,
-0.006755828857421875,
0.06671142578125,
-0.026885986328125,
-0.0009899139404296875,
0.037109375,
-0.00684356689453125,
-0.038238525390625,
-0.006023406982421875,
0.023773193359375,
0.04345703125,
0.0209808349609375,
0.037322998046875,
-0.0221099853515625,
0.043426513671875,
-0.0036830902099609375,
0.04522705078125,
0.0014638900756835938,
-0.0175018310546875,
-0.039642333984375,
0.005222320556640625,
0.024688720703125,
-0.043853759765625,
0.017425537109375,
-0.02874755859375,
0.025390625,
0.041168212890625,
-0.0236053466796875,
0.027618408203125,
0.0028133392333984375,
0.00896453857421875,
0.0098419189453125,
-0.06549072265625,
0.0009393692016601562,
0.042205810546875,
-0.053924560546875,
0.0230560302734375,
0.0269927978515625,
-0.058074951171875,
-0.030242919921875,
-0.071044921875,
0.071533203125,
-0.0396728515625,
0.00981903076171875,
0.0225677490234375,
0.0830078125,
-0.019012451171875,
-0.0484619140625,
0.0487060546875,
-0.0718994140625,
-0.00945281982421875,
-0.012176513671875,
0.01148223876953125,
-0.0285797119140625,
-0.04248046875,
-0.0611572265625,
0.128662109375,
0.0167694091796875,
0.025146484375,
0.0222015380859375,
0.043853759765625,
-0.04229736328125,
0.0191802978515625,
-0.037567138671875,
0.033355712890625,
-0.0033054351806640625,
0.044036865234375,
-0.031402587890625,
0.0019359588623046875,
-0.00621795654296875,
0.01104736328125,
0.034912109375,
0.0003724098205566406,
-0.0099639892578125,
0.0158233642578125,
0.057403564453125,
0.0462646484375,
0.007648468017578125,
0.0148162841796875,
-0.0058746337890625,
0.0022220611572265625,
-0.01507568359375,
-0.031402587890625,
0.017364501953125,
-0.051605224609375,
-0.015228271484375,
0.0248565673828125,
-0.004032135009765625,
-0.0156402587890625,
-0.0098419189453125,
-0.0294036865234375,
-0.0565185546875,
0.01294708251953125,
0.03143310546875,
0.02606201171875,
-0.0276641845703125,
0.00943756103515625,
-0.0302734375,
0.007633209228515625,
0.00971221923828125,
-0.019012451171875,
0.0257568359375,
-0.00952911376953125,
0.0252532958984375,
0.017547607421875,
0.0105743408203125,
0.0169219970703125,
-0.006374359130859375,
0.00079345703125,
0.016937255859375,
-0.01343536376953125,
0.0206146240234375,
0.01067352294921875,
0.0227813720703125,
-0.0193634033203125,
0.01377105712890625,
0.0190277099609375,
0.0184173583984375,
-0.0213623046875,
-0.03875732421875,
0.00862884521484375,
0.00685882568359375,
-0.002216339111328125,
0.028533935546875,
0.033447265625,
-0.006351470947265625,
0.02337646484375,
-0.03253173828125,
-0.033111572265625,
0.006488800048828125,
0.042236328125,
0.0015859603881835938,
-0.0010547637939453125,
0.0027923583984375,
-0.05963134765625,
-0.01080322265625,
0.007755279541015625,
0.008636474609375,
0.00782012939453125,
-0.017974853515625,
0.033721923828125,
0.01245880126953125,
0.00624847412109375,
-0.0177154541015625,
0.0276336669921875,
-0.00130462646484375,
0.0106658935546875,
-0.04974365234375,
-0.044342041015625,
0.0185089111328125,
0.0390625,
-0.007709503173828125,
0.0032787322998046875,
0.01436614990234375,
0.032440185546875,
-0.01666259765625,
-0.01136016845703125,
0.046051025390625,
-0.005207061767578125,
-0.024322509765625,
-0.0148773193359375,
0.003116607666015625,
-0.01279449462890625,
-0.01010894775390625,
-0.004474639892578125,
0.03875732421875,
0.00351715087890625,
-0.004547119140625,
0.021331787109375,
0.01108551025390625,
-0.0207366943359375,
0.0279693603515625,
0.0063629150390625,
0.06634521484375,
0.025665283203125,
-0.10101318359375,
0.004802703857421875,
-0.06646728515625,
-0.054962158203125,
0.040313720703125,
0.03631591796875,
-0.04132080078125,
0.032562255859375,
0.0221710205078125,
-0.032501220703125,
0.0338134765625,
-0.0030651092529296875,
0.02020263671875,
0.02294921875,
-0.0028896331787109375,
0.0110015869140625,
-0.051788330078125,
-0.01922607421875,
-0.0107269287109375,
0.0292816162109375,
0.0099945068359375,
0.0706787109375,
-0.01508331298828125,
0.0196075439453125,
0.0355224609375,
-0.022369384765625,
0.0307159423828125,
0.018402099609375,
-0.005184173583984375,
-0.01230621337890625,
0.00743865966796875,
-0.0019168853759765625,
-0.0498046875,
0.01142120361328125,
0.021728515625,
-0.0181884765625,
0.028594970703125,
-0.0222625732421875,
0.0282440185546875,
-0.0166473388671875,
0.040069580078125,
-0.0116119384765625,
-0.02685546875,
-0.00023794174194335938,
0.02581787109375,
0.0108184814453125,
0.02606201171875,
0.003414154052734375,
-0.03546142578125,
0.039764404296875,
-0.02984619140625,
-0.0032520294189453125,
0.038116455078125,
-0.00922393798828125,
0.0246429443359375,
0.00481414794921875,
-0.061614990234375,
-0.0243988037109375,
-0.0201873779296875,
-0.0012025833129882812,
-0.01268768310546875,
0.055419921875,
-0.0244903564453125,
-0.04632568359375,
0.0011224746704101562,
0.03790283203125,
0.028106689453125,
-0.03131103515625,
0.01122283935546875,
0.048797607421875,
-0.02459716796875,
-0.01134490966796875,
-0.042449951171875,
-0.0306243896484375,
-0.0684814453125,
-0.0133514404296875,
0.001285552978515625,
-0.0484619140625,
-0.039306640625,
-0.0111083984375,
-0.008087158203125,
0.00839996337890625,
-0.017608642578125,
-0.05908203125,
0.00188446044921875,
-0.012603759765625,
0.052886962890625,
-0.058349609375,
-0.033203125,
0.010284423828125,
0.04925537109375,
-0.0020542144775390625,
-0.0310821533203125,
-0.02911376953125,
0.01163482666015625,
-0.033447265625,
0.02752685546875,
0.051239013671875,
-0.0306243896484375,
-0.044677734375,
0.0277099609375,
0.0006933212280273438,
0.07037353515625,
0.0041656494140625,
-0.004119873046875,
0.048614501953125,
-0.0099029541015625,
-0.03753662109375,
-0.071044921875,
-0.007534027099609375,
-0.06256103515625,
0.00760650634765625,
-0.046875,
0.00238800048828125,
0.00325775146484375,
-0.03741455078125,
-0.00980377197265625,
0.05279541015625,
0.00135040283203125,
-0.0104827880859375,
-0.07489013671875,
0.0182647705078125,
-0.005916595458984375,
0.005275726318359375,
-0.0190582275390625,
-0.0181121826171875,
-0.0214691162109375,
0.0457763671875,
0.01024627685546875,
-0.0181427001953125,
0.05035400390625,
-0.021759033203125,
-0.036407470703125,
0.0005869865417480469,
0.0005388259887695312,
0.0174713134765625,
-0.005550384521484375,
-0.03057861328125,
0.056671142578125,
0.036529541015625,
-0.0135345458984375,
0.0231170654296875,
0.03289794921875,
-0.006183624267578125,
-0.0304107666015625,
-0.041961669921875,
0.0174102783203125,
0.01361846923828125,
0.0689697265625,
0.03314208984375,
0.0029277801513671875,
-0.0477294921875,
-0.03790283203125,
-0.01471710205078125,
0.00325775146484375,
-0.0037097930908203125,
0.0271759033203125,
-0.10693359375,
-0.022674560546875,
0.049591064453125,
-0.04095458984375,
0.02081298828125,
0.01140594482421875,
-0.06036376953125,
0.016448974609375,
-0.0264739990234375,
-0.0182952880859375,
-0.0810546875,
0.0014352798461914062,
0.0565185546875,
-0.0298309326171875,
0.0047760009765625,
0.0109710693359375,
0.0023250579833984375,
0.0100555419921875,
0.0034427642822265625,
0.0157623291015625,
0.00844573974609375,
-0.031829833984375,
-0.017822265625,
0.0121002197265625,
0.043212890625,
0.00939178466796875,
-0.0445556640625,
-0.0004832744598388672,
0.0174713134765625,
-0.004627227783203125,
0.009552001953125,
0.00791168212890625,
0.0017042160034179688,
-0.0262298583984375,
0.08038330078125,
-0.0228118896484375,
0.059539794921875,
-0.00841522216796875,
0.00656890869140625,
-0.0025177001953125,
0.01129913330078125,
0.04034423828125,
-0.0142669677734375,
0.00931549072265625,
0.027313232421875,
-0.0169525146484375,
-0.0015621185302734375,
0.0101318359375,
-0.016815185546875,
-0.019134521484375,
-0.0027103424072265625
] |
ee688968fd5fba4fe1f7225088891389da2ee4a4 | Wordpress Stackexchange
Q: Moved to new server, all pages work EXCEPT home page (page not found) I've got the opposite problem a lot of people can when switching servers. All the pages work fine, EXCEPT the home page, which is generating a 404. It's just the blog URL by itself (mysite.com/blogfolder/). Wordpress is installed in a folder in the site root, and worked fine at the old host. htaccess is all what it is supposed to be for this kind of installation. What could cause this??
A: If you are using a static page as homepage, make sure that the page which you were using as static homepage actually exists.
https://stackoverflow.com/questions/40186902/virtualhost-sets-the-url-as-abc-com-subdirectory/40187170#40187170
Have a look at this. It's fairly the same scenario.
| Q: Moved to new server, all pages work EXCEPT home page (page not found) I've got the opposite problem a lot of people can when switching servers. All the pages work fine, EXCEPT the home page, which is generating a 404. It's just the blog URL by itself (mysite.com/blogfolder/). Wordpress is installed in a folder in the site root, and worked fine at the old host. htaccess is all what it is supposed to be for this kind of installation. What could cause this??
A: If you are using a static page as homepage, make sure that the page which you were using as static homepage actually exists.
https://stackoverflow.com/questions/40186902/virtualhost-sets-the-url-as-abc-com-subdirectory/40187170#40187170
Have a look at this. It's fairly the same scenario.
A: I had the same problem after Ubuntu Upgrade 16.04 to 18.04, and it was solved by pressing "Purge Caches" in /wp-admin/admin.php?page=w3tc_objectcache
A: Try the following:
*
*Ensure that you have the right URL for Wordpress & Site Address in Settings > General
*Save permalinks in Settings > Permalinks
*Update the 'Your Homepage displays' in Settings > Readin
| wordpress | {
"language": "en",
"length": 177,
"provenance": "stackexchange_00019.jsonl.gz:471193",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249512"
} | [
0.021636962890625,
0.008697509765625,
0.004665374755859375,
0.034576416015625,
-0.007183074951171875,
-0.048675537109375,
0.053985595703125,
-0.070068359375,
0.0207061767578125,
0.0137176513671875,
-0.0182647705078125,
-0.005077362060546875,
0.01270294189453125,
-0.025421142578125,
0.0231475830078125,
-0.0119781494140625,
0.03533935546875,
0.002521514892578125,
0.0440673828125,
-0.00655364990234375,
0.004055023193359375,
0.01715087890625,
0.0254364013671875,
0.0533447265625,
0.00417327880859375,
-0.033416748046875,
0.066650390625,
-0.01331329345703125,
-0.0008273124694824219,
-0.019256591796875,
0.02032470703125,
0.0103607177734375,
0.0161285400390625,
0.0238494873046875,
-0.037872314453125,
-0.05950927734375,
0.007686614990234375,
0.0038509368896484375,
-0.01849365234375,
0.0297088623046875,
0.021728515625,
-0.0189971923828125,
0.05316162109375,
0.05072021484375,
0.0200958251953125,
-0.03216552734375,
0.0235137939453125,
-0.065185546875,
0.0219268798828125,
-0.0009102821350097656,
-0.009429931640625,
0.02386474609375,
-0.0008988380432128906,
-0.017242431640625,
-0.007289886474609375,
-0.009735107421875,
0.0316162109375,
0.022918701171875,
0.009002685546875,
-0.059234619140625,
-0.031524658203125,
0.0626220703125,
0.018218994140625,
0.05352783203125,
-0.022308349609375,
0.00969696044921875,
0.014007568359375,
0.00665283203125,
-0.1041259765625,
-0.053802490234375,
0.06317138671875,
-0.044097900390625,
0.01806640625,
-0.016021728515625,
0.00846099853515625,
-0.0011043548583984375,
-0.018310546875,
-0.004337310791015625,
0.017242431640625,
0.0189361572265625,
-0.037811279296875,
-0.0166168212890625,
-0.042938232421875,
-0.0767822265625,
0.0416259765625,
-0.03167724609375,
-0.01168060302734375,
0.003757476806640625,
-0.022979736328125,
-0.016357421875,
-0.0230560302734375,
-0.0152435302734375,
-0.026611328125,
0.0258026123046875,
-0.01009368896484375,
0.010101318359375,
-0.00627899169921875,
0.04534912109375,
-0.0246124267578125,
0.016632080078125,
-0.0406494140625,
-0.0011968612670898438,
0.00360870361328125,
-0.048248291015625,
0.0202484130859375,
0.023040771484375,
0.002262115478515625,
0.0259552001953125,
0.043426513671875,
0.01334381103515625,
-0.000005900859832763672,
0.043701171875,
-0.0275421142578125,
-0.0266876220703125,
-0.00038242340087890625,
0.05291748046875,
-0.032806396484375,
-0.0274505615234375,
-0.0284271240234375,
-0.00927734375,
0.0147247314453125,
0.052978515625,
-0.026519775390625,
-0.02191162109375,
-0.0238037109375,
-0.0308074951171875,
0.00511932373046875,
-0.02923583984375,
0.034210205078125,
0.0211334228515625,
-0.0253753662109375,
0.01496124267578125,
0.021697998046875,
0.0000871419906616211,
-0.00785064697265625,
-0.02496337890625,
0.031341552734375,
-0.0235748291015625,
-0.0169219970703125,
0.01568603515625,
0.005794525146484375,
-0.034271240234375,
-0.01334381103515625,
-0.01018524169921875,
0.01611328125,
0.0255279541015625,
0.0231781005859375,
0.0128021240234375,
-0.02484130859375,
-0.04107666015625,
0.011322021484375,
-0.01125335693359375,
0.05419921875,
-0.00826263427734375,
0.0290069580078125,
-0.05572509765625,
0.055755615234375,
-0.06170654296875,
-0.006473541259765625,
-0.045745849609375,
0.04205322265625,
0.0367431640625,
0.03076171875,
-0.022186279296875,
-0.054107666015625,
-0.0625,
-0.048431396484375,
-0.033538818359375,
0.0077972412109375,
0.005168914794921875,
-0.02716064453125,
-0.0034580230712890625,
0.01300048828125,
-0.0154571533203125,
-0.006916046142578125,
0.0136260986328125,
-0.0014438629150390625,
0.00316619873046875,
0.003932952880859375,
0.0606689453125,
0.01534271240234375,
-0.01470947265625,
0.009674072265625,
0.017364501953125,
-0.059783935546875,
0.029296875,
0.00577545166015625,
0.0386962890625,
-0.0057830810546875,
0.006999969482421875,
0.048919677734375,
0.03753662109375,
-0.03436279296875,
0.031585693359375,
0.00821685791015625,
0.007251739501953125,
-0.033782958984375,
0.0100250244140625,
-0.006500244140625,
-0.036376953125,
-0.030792236328125,
0.00948333740234375,
0.011932373046875,
0.02996826171875,
0.046539306640625,
-0.0144500732421875,
0.0089263916015625,
0.008270263671875,
0.00954437255859375,
0.037139892578125,
-0.003452301025390625,
0.0018157958984375,
-0.00466156005859375,
-0.061676025390625,
-0.0219268798828125,
0.02630615234375,
-0.0257720947265625,
0.0299072265625,
-0.00214385986328125,
0.0265045166015625,
-0.0350341796875,
-0.01023101806640625,
-0.02532958984375,
-0.0020236968994140625,
0.0302581787109375,
-0.031524658203125,
-0.00940704345703125,
-0.039276123046875,
-0.0031890869140625,
0.00018799304962158203,
-0.075927734375,
0.0374755859375,
-0.0258331298828125,
0.002620697021484375,
-0.06976318359375,
-0.0145111083984375,
-0.058685302734375,
0.021087646484375,
0.0126495361328125,
0.040374755859375,
0.0242462158203125,
-0.01358795166015625,
-0.01224517822265625,
0.003971099853515625,
-0.006656646728515625,
-0.044921875,
0.0159149169921875,
-0.0037860870361328125,
-0.023162841796875,
0.04388427734375,
-0.01053619384765625,
0.01715087890625,
0.005950927734375,
-0.07208251953125,
-0.041961669921875,
0.063720703125,
-0.0028781890869140625,
0.017730712890625,
-0.031829833984375,
0.0200958251953125,
0.0081329345703125,
0.019378662109375,
-0.0112457275390625,
0.00506591796875,
-0.00566864013671875,
0.036529541015625,
0.0289154052734375,
0.03887939453125,
-0.0258636474609375,
0.007602691650390625,
-0.0025634765625,
-0.01324462890625,
0.0033130645751953125,
0.055023193359375,
0.047607421875,
-0.006076812744140625,
-0.016510009765625,
-0.021392822265625,
0.0053863525390625,
0.036651611328125,
-0.005016326904296875,
0.0117645263671875,
-0.0136260986328125,
-0.006244659423828125,
0.00487518310546875,
-0.051666259765625,
0.0042877197265625,
0.0212860107421875,
0.0322265625,
0.00972747802734375,
0.01303863525390625,
0.026092529296875,
-0.033782958984375,
0.057464599609375,
0.041595458984375,
-0.046966552734375,
0.036651611328125,
-0.04827880859375,
0.0246429443359375,
-0.0201416015625,
0.052001953125,
0.048553466796875,
0.01543426513671875,
-0.0225372314453125,
0.0112762451171875,
0.009552001953125,
0.038238525390625,
-0.01080322265625,
-0.013214111328125,
0.0335693359375,
-0.08489990234375,
-0.0227203369140625,
0.01097869873046875,
0.0038280487060546875,
-0.0026454925537109375,
-0.05169677734375,
0.004589080810546875,
-0.00971221923828125,
-0.10491943359375,
-0.10162353515625,
-0.06903076171875,
-0.00676727294921875,
-0.018096923828125,
0.0098419189453125,
-0.004268646240234375,
0.016754150390625,
0.01404571533203125,
0.0264892578125,
0.037139892578125,
-0.03680419921875,
-0.077880859375,
-0.0626220703125,
-0.10601806640625,
-0.02862548828125,
0.003814697265625,
0.0140380859375,
0.005153656005859375,
-0.0160675048828125,
-0.01041412353515625,
-0.052276611328125,
-0.0192413330078125,
0.032501220703125,
0.006031036376953125,
-0.0172271728515625,
0.009857177734375,
-0.0435791015625,
-0.020172119140625,
-0.0009722709655761719,
0.0626220703125,
0.0157470703125,
-0.0169830322265625,
0.005092620849609375,
-0.0268096923828125,
-0.044158935546875,
-0.04315185546875,
0.007579803466796875,
0.0555419921875,
-0.039306640625,
-0.038330078125,
-0.056732177734375,
-0.04168701171875,
-0.0090179443359375,
-0.050933837890625,
0.034698486328125,
0.05072021484375,
-0.0164947509765625,
0.010589599609375,
-0.01812744140625,
-0.0159454345703125,
0.01078033447265625,
0.042572021484375,
-0.0038814544677734375,
-0.0016794204711914062,
-0.0282440185546875,
-0.0595703125,
-0.04083251953125,
0.030670166015625,
-0.0104217529296875,
-0.0091094970703125,
0.007350921630859375,
-0.01654052734375,
-0.01995849609375,
0.040069580078125,
-0.0205841064453125,
-0.04266357421875,
0.025177001953125,
-0.0193939208984375,
0.01052093505859375,
0.006076812744140625,
-0.001781463623046875,
0.03338623046875,
0.0726318359375,
-0.08245849609375,
-0.0203857421875,
0.0238189697265625,
0.018280029296875,
-0.006221771240234375,
-0.0139312744140625,
-0.052764892578125,
-0.0203094482421875,
-0.0224151611328125,
-0.014190673828125,
-0.0224151611328125,
-0.0090484619140625,
-0.007747650146484375,
-0.03924560546875,
-0.0043182373046875,
-0.044036865234375,
0.0268096923828125,
0.0112762451171875,
-0.00698089599609375,
-0.00958251953125,
0.01361083984375,
-0.0386962890625,
-0.0058746337890625,
0.005031585693359375,
-0.0523681640625,
-0.01250457763671875,
0.028472900390625,
0.04534912109375,
-0.00028228759765625,
-0.0254974365234375,
0.005588531494140625,
0.052032470703125,
-0.03594970703125,
0.070556640625,
-0.032196044921875,
0.00759124755859375,
0.041259765625,
-0.0205841064453125,
-0.0175323486328125,
-0.0040130615234375,
0.01519775390625,
-0.02880859375,
-0.05609130859375,
-0.046630859375,
-0.02716064453125,
0.01458740234375,
0.0212554931640625,
-0.03582763671875,
-0.018157958984375,
-0.047515869140625,
-0.01334381103515625,
-0.00751495361328125,
0.01122283935546875,
-0.017120361328125,
-0.032135009765625,
-0.0027561187744140625,
0.015838623046875,
-0.0251007080078125,
-0.039581298828125,
0.0064239501953125,
0.041778564453125,
0.018524169921875,
-0.01277923583984375,
0.0252227783203125,
0.0133819580078125,
0.0230255126953125,
0.0433349609375,
0.054290771484375,
0.0128631591796875,
0.005481719970703125,
0.0316162109375,
0.0214996337890625,
-0.0159912109375,
0.013031005859375,
0.01654052734375,
0.016448974609375,
-0.040985107421875,
0.01509857177734375,
0.0042877197265625,
0.00302886962890625,
0.038238525390625,
0.0065460205078125,
-0.00830078125,
-0.0170440673828125,
-0.0020236968994140625,
-0.0240020751953125,
0.0014810562133789062,
-0.0294647216796875,
-0.0460205078125,
0.00238037109375,
-0.01239776611328125,
0.0300445556640625,
-0.0098114013671875,
0.0182342529296875,
0.032257080078125,
0.047393798828125,
-0.037872314453125,
0.0017328262329101562,
0.0067291259765625,
0.0255126953125,
-0.0019588470458984375,
-0.00405120849609375,
-0.039031982421875,
-0.027496337890625,
-0.018035888671875,
0.0229034423828125,
0.024444580078125,
-0.053253173828125,
0.061859130859375,
-0.0177154541015625,
-0.029022216796875,
0.0350341796875,
-0.00991058349609375,
-0.0063934326171875,
-0.03900146484375,
-0.01904296875,
-0.0085296630859375,
-0.0308837890625,
-0.024993896484375,
-0.03643798828125,
0.026397705078125,
-0.0027313232421875,
-0.0010595321655273438,
0.023529052734375,
0.0277862548828125,
-0.00011396408081054688,
0.0226287841796875,
-0.0257415771484375,
-0.0303497314453125,
0.004543304443359375,
0.057281494140625,
0.0192718505859375,
-0.0149688720703125,
0.01128387451171875,
0.0367431640625,
0.042022705078125,
-0.0428466796875,
-0.018280029296875,
0.0380859375,
0.0679931640625,
0.01361083984375,
-0.0103759765625,
-0.01934814453125,
-0.03277587890625,
-0.01316070556640625,
0.038177490234375,
-0.05157470703125,
-0.059661865234375,
-0.023529052734375,
0.004451751708984375,
0.03106689453125,
-0.0303955078125,
-0.0104827880859375,
-0.002964019775390625,
0.0002868175506591797,
0.034942626953125,
-0.01175689697265625,
-0.0104827880859375,
0.01316070556640625,
0.0244598388671875,
-0.00489044189453125,
-0.01031494140625,
-0.00653076171875,
-0.00705718994140625,
-0.00955963134765625,
-0.03143310546875,
-0.036163330078125,
0.05682373046875,
-0.0202789306640625,
0.050323486328125,
-0.00830078125,
-0.04254150390625,
0.005176544189453125,
0.032073974609375,
0.01448822021484375,
0.01219940185546875,
-0.055450439453125,
0.04119873046875,
-0.04022216796875,
-0.00946044921875,
0.0308685302734375,
-0.0290374755859375,
-0.060638427734375,
-0.05157470703125,
-0.0001474618911743164,
-0.005077362060546875,
0.0012044906616210938,
-0.0236053466796875,
-0.05206298828125,
0.01552581787109375,
0.060882568359375,
-0.0357666015625,
-0.037353515625,
0.058685302734375,
-0.004749298095703125,
0.043243408203125,
-0.01454925537109375,
0.02203369140625,
0.004169464111328125,
-0.01399993896484375,
0.03253173828125,
-0.008514404296875,
-0.010955810546875,
-0.048675537109375,
-0.011566162109375,
-0.0012903213500976562,
0.048095703125,
-0.0088043212890625,
-0.0188140869140625,
-0.007488250732421875,
-0.0082244873046875,
-0.029449462890625,
0.01029205322265625,
0.0026340484619140625,
0.0028476715087890625,
-0.0177154541015625,
0.005649566650390625,
0.0029296875,
-0.02874755859375,
0.0043182373046875,
-0.0163726806640625,
0.029876708984375,
-0.0156097412109375,
-0.01259613037109375,
-0.04998779296875,
0.07208251953125,
0.0926513671875,
0.0247039794921875,
0.07305908203125,
0.006778717041015625,
0.02752685546875,
0.041595458984375,
0.011138916015625,
-0.01215362548828125,
-0.03839111328125,
-0.00262451171875,
-0.01605224609375,
-0.0289306640625,
-0.0170440673828125,
-0.0113525390625,
-0.0101318359375,
0.058349609375,
0.033447265625,
-0.06890869140625,
-0.031341552734375,
0.0003540515899658203,
-0.01346588134765625,
-0.027618408203125,
0.041351318359375,
0.0018444061279296875,
-0.004894256591796875,
-0.029296875,
-0.01099395751953125,
-0.006671905517578125,
-0.007526397705078125,
0.019195556640625,
-0.00696563720703125,
0.005313873291015625,
0.0210113525390625,
0.01207733154296875,
-0.056488037109375,
0.0107269287109375,
0.04144287109375,
0.004741668701171875,
-0.0022525787353515625,
0.0034618377685546875,
0.0079498291015625,
-0.0270538330078125,
-0.06805419921875,
-0.010040283203125,
-0.0205841064453125,
-0.028656005859375,
0.0213470458984375,
-0.01605224609375,
0.0035552978515625,
0.01322174072265625,
-0.0149383544921875,
0.0288238525390625,
-0.024505615234375,
-0.0287933349609375,
0.046661376953125,
-0.005344390869140625,
0.0255126953125,
0.0140533447265625,
-0.0311126708984375,
-0.005950927734375,
0.0012159347534179688,
-0.01308441162109375,
-0.0190582275390625,
-0.0521240234375,
0.053802490234375,
-0.0279388427734375,
-0.00916290283203125,
-0.0088043212890625,
0.0234375,
0.016510009765625,
0.012603759765625,
0.00850677490234375,
-0.045379638671875,
-0.02197265625,
0.0187225341796875,
-0.008148193359375,
-0.0103607177734375,
0.0194854736328125,
-0.060272216796875,
0.034881591796875,
-0.0101470947265625,
0.041412353515625,
0.011993408203125,
0.0048675537109375,
-0.00875091552734375,
-0.00689697265625,
-0.008453369140625,
0.051361083984375,
-0.031890869140625,
0.037322998046875,
-0.037353515625,
-0.00882720947265625,
0.0279998779296875,
0.04510498046875,
0.061614990234375,
0.007633209228515625,
-0.0357666015625,
-0.015899658203125,
0.02960205078125,
0.00638580322265625,
-0.015106201171875,
0.06402587890625,
-0.048614501953125,
0.01995849609375,
-0.005977630615234375,
-0.0445556640625,
0.01511383056640625,
0.003143310546875,
-0.0771484375,
-0.031402587890625,
-0.0089263916015625,
-0.0313720703125,
0.046051025390625,
-0.05975341796875,
-0.0218963623046875,
0.02685546875,
-0.007076263427734375,
-0.019012451171875,
0.0182342529296875,
0.03076171875,
0.02569580078125,
-0.05010986328125,
-0.019683837890625,
-0.022857666015625,
0.038330078125,
-0.01061248779296875,
0.00811767578125,
-0.0015459060668945312,
0.016265869140625,
0.052734375,
-0.01371002197265625,
-0.0194091796875,
0.051544189453125,
-0.02703857421875,
0.048095703125,
0.05322265625,
0.044189453125,
0.0038204193115234375,
0.00858306884765625,
0.028045654296875,
0.0631103515625,
-0.0305023193359375,
-0.045440673828125,
0.003063201904296875,
-0.02203369140625,
0.00154876708984375,
-0.004398345947265625,
0.0025959014892578125,
0.0173492431640625,
0.014251708984375,
-0.020904541015625,
-0.00428009033203125,
0.0142669677734375,
0.007244110107421875,
-0.0011262893676757812,
-0.0077667236328125,
0.024383544921875,
-0.00302886962890625,
-0.007465362548828125,
-0.0005865097045898438,
-0.005931854248046875,
0.025146484375,
0.01953125,
0.02069091796875,
-0.024200439453125,
-0.00885772705078125,
-0.0132598876953125,
0.0645751953125,
-0.021331787109375,
0.0310516357421875,
-0.07672119140625,
-0.0787353515625,
0.01178741455078125,
0.0648193359375,
0.0149993896484375,
0.05224609375,
0.020721435546875,
0.003009796142578125,
0.0134124755859375,
0.006969451904296875,
0.0190277099609375,
-0.0384521484375,
0.035552978515625,
-0.01558685302734375,
0.025482177734375,
-0.01102447509765625,
-0.024078369140625,
-0.0171966552734375,
0.045166015625,
0.0137939453125,
-0.0001233816146850586,
0.0273895263671875,
0.0044403076171875,
-0.0247039794921875,
0.012603759765625,
0.0289154052734375,
0.0675048828125,
0.037872314453125,
-0.006992340087890625,
-0.033416748046875,
-0.01416778564453125,
0.0133819580078125,
0.0216217041015625,
0.042724609375,
0.035858154296875,
-0.0099334716796875,
-0.003543853759765625,
-0.03497314453125,
-0.02044677734375,
0.0423583984375,
0.0051422119140625,
0.014801025390625,
0.0161895751953125,
-0.000046133995056152344,
-0.042236328125,
-0.04248046875,
-0.0103759765625,
0.03875732421875,
-0.0160980224609375,
0.1341552734375,
-0.042694091796875,
-0.0021724700927734375,
-0.0124053955078125,
0.037261962890625,
-0.0214996337890625,
-0.0177764892578125,
0.01462554931640625,
0.004001617431640625,
0.027923583984375,
-0.01387786865234375,
-0.08673095703125,
0.0200042724609375,
-0.01035308837890625,
-0.0102081298828125,
0.04620361328125,
-0.045196533203125,
0.00701141357421875,
0.0088348388671875,
-0.0185546875,
-0.0443115234375,
-0.059539794921875,
-0.061553955078125,
0.00339508056640625,
-0.0014867782592773438,
0.0107269287109375,
-0.0134735107421875,
0.07769775390625,
-0.004413604736328125,
-0.02239990234375,
0.058197021484375,
-0.101806640625,
0.06903076171875,
0.03485107421875,
0.031829833984375,
-0.0570068359375,
0.00855255126953125,
-0.003997802734375,
0.0140838623046875,
-0.004261016845703125,
0.07208251953125,
0.01751708984375,
-0.038909912109375,
-0.0291900634765625,
-0.04345703125,
-0.01198577880859375,
-0.037322998046875,
-0.01277923583984375,
-0.016082763671875,
-0.0038700103759765625,
0.0213623046875,
-0.0184173583984375,
0.006992340087890625,
0.0183563232421875,
-0.040191650390625,
0.00806427001953125,
0.002262115478515625,
-0.02142333984375,
-0.0190582275390625,
-0.039093017578125,
0.0233154296875,
0.005336761474609375,
-0.022796630859375,
-0.0075531005859375,
-0.0282745361328125,
0.00960540771484375,
-0.019012451171875,
0.0257568359375,
-0.014495849609375,
0.0264892578125,
-0.0288543701171875,
0.033477783203125,
-0.0223236083984375,
-0.01690673828125,
0.00893402099609375,
-0.0007605552673339844,
0.046966552734375,
-0.01087188720703125,
-0.021453857421875,
-0.02410888671875,
-0.0255279541015625,
0.037628173828125,
-0.06201171875,
-0.0217132568359375,
0.0019083023071289062,
-0.0275421142578125,
-0.01174163818359375,
-0.0011301040649414062,
0.0130615234375,
-0.026092529296875,
-0.0450439453125,
0.018035888671875,
-0.01355743408203125,
-0.0179290771484375,
-0.0445556640625,
-0.04052734375,
0.0294647216796875,
0.0305938720703125,
-0.0230712890625,
-0.062347412109375,
-0.0024700164794921875,
-0.00843048095703125,
0.035675048828125,
-0.02362060546875,
-0.026031494140625,
-0.0264892578125,
0.057586669921875,
0.030548095703125,
0.06103515625,
-0.004062652587890625,
0.019927978515625,
0.0022068023681640625,
0.035675048828125,
0.0219573974609375,
0.04400634765625,
0.01053619384765625,
-0.02069091796875,
0.02459716796875,
0.0694580078125,
0.0025997161865234375,
-0.03485107421875,
0.0017690658569335938,
-0.0772705078125,
0.0183258056640625,
-0.041107177734375,
-0.03363037109375,
-0.05206298828125,
0.01055908203125,
-0.0111846923828125,
0.01161956787109375,
0.0208892822265625,
-0.040802001953125,
-0.03997802734375,
-0.01535797119140625,
-0.053985595703125,
0.0221710205078125,
-0.0853271484375,
0.001506805419921875,
-0.0179290771484375,
-0.0086669921875,
-0.0126190185546875,
-0.03619384765625,
-0.034393310546875,
-0.005596160888671875,
0.0162353515625,
0.019287109375,
0.0037479400634765625,
-0.03167724609375,
0.060333251953125,
-0.027740478515625,
-0.0016050338745117188,
0.0186920166015625,
0.02789306640625,
0.027587890625,
0.0283355712890625,
0.006755828857421875,
0.001300811767578125,
0.00788116455078125,
0.01079559326171875,
0.02191162109375,
0.0028591156005859375,
-0.01168060302734375,
-0.029541015625,
0.0298919677734375,
0.0190277099609375,
-0.0012254714965820312,
0.0211029052734375,
0.01715087890625,
-0.001583099365234375,
-0.045074462890625,
0.043060302734375,
0.0180816650390625,
0.015838623046875,
-0.01084136962890625,
0.05706787109375,
-0.00859832763671875,
-0.0235748291015625,
-0.001834869384765625,
-0.019805908203125,
-0.005039215087890625,
0.00841522216796875,
-0.01036834716796875,
-0.0238189697265625,
0.007099151611328125,
-0.0147857666015625,
-0.0018863677978515625,
0.0011749267578125
] |
7940f47fc2d23b14ee1ff76f6fda2dadab598afc | Wordpress Stackexchange
Q: WP WC CLI - WooCommerce setup store with wp-cli WP-CLI provides a few commands to manage coupons, orders and more.
Is a command exist to setup a store with wp-cli(The setup screen with store settings and WooCommerce store pages)?
Something like:
wp wc store create --store_page_name=Shop ...
| Q: WP WC CLI - WooCommerce setup store with wp-cli WP-CLI provides a few commands to manage coupons, orders and more.
Is a command exist to setup a store with wp-cli(The setup screen with store settings and WooCommerce store pages)?
Something like:
wp wc store create --store_page_name=Shop ...
| wordpress | {
"language": "en",
"length": 48,
"provenance": "stackexchange_00019.jsonl.gz:471208",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249569"
} | [
-0.01549530029296875,
-0.033660888671875,
-0.0234375,
-0.039215087890625,
-0.048370361328125,
-0.0045928955078125,
-0.03277587890625,
0.00868988037109375,
-0.00968170166015625,
0.007659912109375,
-0.0355224609375,
0.01242828369140625,
-0.004608154296875,
-0.011505126953125,
0.0216827392578125,
-0.033538818359375,
0.0426025390625,
-0.01097869873046875,
0.0379638671875,
-0.00003355741500854492,
-0.0055694580078125,
0.0313720703125,
0.044830322265625,
0.052093505859375,
0.0246429443359375,
-0.05023193359375,
0.08984375,
-0.0105743408203125,
0.0214385986328125,
-0.01248931884765625,
0.01336669921875,
-0.02142333984375,
0.02813720703125,
-0.0282440185546875,
0.026763916015625,
0.021636962890625,
-0.0006084442138671875,
-0.009246826171875,
0.0182952880859375,
-0.0088653564453125,
-0.012451171875,
0.01351165771484375,
0.06573486328125,
0.005382537841796875,
0.001262664794921875,
-0.005828857421875,
-0.03594970703125,
-0.046630859375,
0.027313232421875,
0.016815185546875,
-0.0274505615234375,
0.050323486328125,
-0.00455474853515625,
-0.00804901123046875,
-0.01044464111328125,
-0.035980224609375,
0.0226898193359375,
-0.025665283203125,
0.0328369140625,
0.026824951171875,
-0.0311126708984375,
0.0080413818359375,
0.007965087890625,
-0.0469970703125,
0.0269622802734375,
-0.02508544921875,
-0.0250244140625,
0.032562255859375,
-0.0263824462890625,
0.041107177734375,
0.05181884765625,
-0.0287933349609375,
0.0068206787109375,
0.0111846923828125,
-0.00679779052734375,
-0.02435302734375,
-0.0037479400634765625,
-0.02337646484375,
0.0251312255859375,
0.00738525390625,
0.0645751953125,
0.0246429443359375,
0.032562255859375,
-0.055145263671875,
0.04718017578125,
-0.012176513671875,
0.0164031982421875,
-0.0182952880859375,
-0.0350341796875,
-0.06353759765625,
-0.0308074951171875,
-0.0184173583984375,
-0.037841796875,
-0.045135498046875,
-0.050933837890625,
-0.0284576416015625,
-0.01238250732421875,
-0.01580810546875,
-0.027496337890625,
0.0034809112548828125,
0.0462646484375,
-0.02667236328125,
0.0362548828125,
-0.00876617431640625,
0.0017099380493164062,
0.05499267578125,
0.007030487060546875,
0.04345703125,
0.0345458984375,
0.006145477294921875,
0.00010210275650024414,
-0.021026611328125,
0.0135345458984375,
-0.01259613037109375,
0.0098419189453125,
-0.026214599609375,
-0.042816162109375,
0.061859130859375,
-0.006580352783203125,
0.006679534912109375,
0.01506805419921875,
0.038360595703125,
0.012786865234375,
0.006587982177734375,
-0.01441192626953125,
0.010223388671875,
0.006862640380859375,
-0.054168701171875,
-0.0521240234375,
-0.00836944580078125,
0.0183868408203125,
0.0227813720703125,
-0.006977081298828125,
0.024688720703125,
-0.0283966064453125,
0.016815185546875,
0.0604248046875,
0.0174713134765625,
0.033294677734375,
-0.00904083251953125,
0.011871337890625,
0.005405426025390625,
-0.004032135009765625,
0.007610321044921875,
0.0721435546875,
0.0044097900390625,
0.006488800048828125,
0.01140594482421875,
0.047698974609375,
0.047027587890625,
-0.022674560546875,
0.004726409912109375,
-0.0247650146484375,
0.0158538818359375,
0.060394287109375,
0.00984954833984375,
0.01303863525390625,
0.0059814453125,
0.021942138671875,
0.01038360595703125,
-0.04925537109375,
-0.0101776123046875,
0.044525146484375,
-0.04583740234375,
-0.044036865234375,
0.0274200439453125,
-0.04248046875,
-0.00498199462890625,
0.01275634765625,
0.044708251953125,
0.0114898681640625,
-0.027587890625,
-0.015533447265625,
0.0038547515869140625,
-0.016845703125,
0.0090484619140625,
-0.004909515380859375,
-0.019287109375,
0.0307769775390625,
0.0211181640625,
0.000545501708984375,
-0.01117706298828125,
0.032440185546875,
-0.0012655258178710938,
-0.023223876953125,
-0.023162841796875,
0.01495361328125,
0.0322265625,
0.041046142578125,
0.02337646484375,
0.00980377197265625,
-0.0240325927734375,
-0.03656005859375,
0.030609130859375,
-0.030914306640625,
-0.0241851806640625,
0.00397491455078125,
0.0199737548828125,
-0.01971435546875,
-0.0008029937744140625,
-0.033935546875,
-0.030364990234375,
0.03314208984375,
0.033355712890625,
-0.0086822509765625,
0.015350341796875,
-0.021697998046875,
0.0187530517578125,
-0.01153564453125,
-0.041259765625,
0.01702880859375,
-0.01183319091796875,
0.0208587646484375,
-0.0806884765625,
-0.06610107421875,
0.01491546630859375,
-0.0189971923828125,
0.08282470703125,
-0.0276641845703125,
0.0421142578125,
-0.0171661376953125,
-0.04791259765625,
0.0196990966796875,
0.0262451171875,
0.004947662353515625,
0.03515625,
-0.0278167724609375,
0.0157623291015625,
0.0208740234375,
0.01416015625,
0.02362060546875,
-0.004711151123046875,
0.01873779296875,
-0.00079345703125,
-0.0254058837890625,
-0.00406646728515625,
0.001129150390625,
-0.081787109375,
0.003330230712890625,
0.0604248046875,
0.0223236083984375,
0.050811767578125,
-0.007724761962890625,
0.005275726318359375,
0.043426513671875,
-0.01348876953125,
0.032135009765625,
-0.0254669189453125,
-0.0144805908203125,
0.053497314453125,
0.00780487060546875,
0.032318115234375,
-0.01016998291015625,
-0.0308990478515625,
-0.01611328125,
0.025726318359375,
-0.016387939453125,
-0.018646240234375,
0.053924560546875,
-0.0253448486328125,
0.005809783935546875,
-0.01212310791015625,
-0.0114288330078125,
-0.004589080810546875,
0.02294921875,
0.0049591064453125,
0.0189056396484375,
0.0021209716796875,
-0.0103912353515625,
0.01314544677734375,
0.006763458251953125,
-0.05096435546875,
0.01317596435546875,
0.00890350341796875,
-0.00785064697265625,
-0.0009908676147460938,
-0.0338134765625,
-0.00885772705078125,
0.0269012451171875,
-0.00255584716796875,
-0.0002865791320800781,
0.0147857666015625,
-0.0113372802734375,
-0.00762939453125,
-0.00652313232421875,
-0.0200958251953125,
0.02117919921875,
0.0428466796875,
-0.0262908935546875,
-0.044586181640625,
0.00257110595703125,
-0.008087158203125,
-0.04827880859375,
0.0256195068359375,
0.0029659271240234375,
-0.038421630859375,
0.06329345703125,
0.0006809234619140625,
-0.0037860870361328125,
0.0006794929504394531,
0.027099609375,
0.0272216796875,
0.01129150390625,
-0.042236328125,
0.009368896484375,
0.00916290283203125,
0.028289794921875,
-0.00922393798828125,
-0.009246826171875,
0.0287322998046875,
-0.05804443359375,
0.006496429443359375,
0.00563812255859375,
0.06256103515625,
-0.035797119140625,
-0.06005859375,
-0.005741119384765625,
0.0036678314208984375,
-0.069580078125,
-0.0814208984375,
-0.01654052734375,
-0.047027587890625,
0.0214691162109375,
-0.0030384063720703125,
-0.0025806427001953125,
-0.02044677734375,
0.0273284912109375,
0.0174560546875,
-0.00397491455078125,
-0.0262451171875,
0.018890380859375,
-0.0229644775390625,
-0.017852783203125,
-0.024658203125,
0.012786865234375,
-0.00966644287109375,
-0.00726318359375,
0.0262603759765625,
-0.0006556510925292969,
-0.020538330078125,
-0.003021240234375,
0.046295166015625,
0.006290435791015625,
-0.0265350341796875,
-0.007068634033203125,
-0.027801513671875,
0.046112060546875,
-0.019622802734375,
0.01096343994140625,
0.0288543701171875,
-0.0055084228515625,
-0.00949859619140625,
0.03179931640625,
-0.01213836669921875,
-0.01548004150390625,
0.021331787109375,
-0.0145416259765625,
-0.031036376953125,
-0.0345458984375,
-0.07330322265625,
-0.01328277587890625,
-0.012237548828125,
-0.04315185546875,
0.006427764892578125,
0.0214691162109375,
-0.0005979537963867188,
-0.0009698867797851562,
-0.0098724365234375,
0.0031566619873046875,
0.00363922119140625,
0.004314422607421875,
-0.0233612060546875,
0.0401611328125,
-0.0017337799072265625,
-0.00514984130859375,
-0.0178375244140625,
0.03753662109375,
-0.0225372314453125,
0.002044677734375,
0.0179595947265625,
-0.0180816650390625,
-0.00389862060546875,
-0.0150299072265625,
0.0007939338684082031,
-0.042205810546875,
0.04876708984375,
-0.01183319091796875,
0.034515380859375,
-0.06732177734375,
-0.0335693359375,
-0.04736328125,
0.08856201171875,
-0.010406494140625,
-0.044097900390625,
0.042877197265625,
0.038299560546875,
-0.0537109375,
0.016082763671875,
-0.02032470703125,
-0.02935791015625,
-0.048614501953125,
-0.008087158203125,
0.006412506103515625,
-0.0300445556640625,
0.0195770263671875,
-0.031951904296875,
-0.0106658935546875,
-0.0545654296875,
0.0380859375,
0.003662109375,
0.0277099609375,
-0.00968170166015625,
0.0269775390625,
-0.03314208984375,
-0.0085906982421875,
-0.0008296966552734375,
-0.05889892578125,
-0.0169525146484375,
0.028594970703125,
0.0433349609375,
-0.023101806640625,
0.01314544677734375,
-0.0261688232421875,
0.047607421875,
-0.0028705596923828125,
0.023895263671875,
-0.0008015632629394531,
0.003635406494140625,
0.0177001953125,
-0.0579833984375,
-0.005161285400390625,
-0.033843994140625,
-0.021636962890625,
-0.04248046875,
-0.01294708251953125,
0.0106964111328125,
-0.0005664825439453125,
0.043853759765625,
0.023681640625,
0.004230499267578125,
-0.04656982421875,
-0.049530029296875,
0.01473236083984375,
-0.0173797607421875,
-0.0018339157104492188,
0.0170745849609375,
-0.0294952392578125,
-0.002384185791015625,
0.006805419921875,
-0.053436279296875,
0.0112152099609375,
0.0148773193359375,
0.037445068359375,
0.00672149658203125,
0.008636474609375,
-0.011962890625,
0.0257415771484375,
0.021759033203125,
0.07122802734375,
0.012725830078125,
-0.0106201171875,
0.0011663436889648438,
-0.0343017578125,
0.0227203369140625,
-0.01397705078125,
0.0068359375,
-0.00902557373046875,
0.01085662841796875,
-0.0231781005859375,
-0.00835418701171875,
-0.0146331787109375,
0.031982421875,
0.02899169921875,
0.0180816650390625,
-0.0228118896484375,
0.043182373046875,
0.0081329345703125,
-0.0250091552734375,
-0.0144195556640625,
0.002910614013671875,
-0.015289306640625,
0.0006985664367675781,
-0.0202789306640625,
0.015869140625,
0.023956298828125,
0.00286865234375,
0.00007104873657226562,
-0.004329681396484375,
0.01505279541015625,
0.01007843017578125,
-0.0086669921875,
-0.00901031494140625,
0.0266265869140625,
0.003833770751953125,
0.01145172119140625,
-0.001773834228515625,
-0.021026611328125,
0.033447265625,
-0.0009217262268066406,
-0.0254364013671875,
-0.0084686279296875,
-0.036163330078125,
0.02252197265625,
0.00865936279296875,
0.00960540771484375,
0.0357666015625,
-0.0269012451171875,
-0.0413818359375,
-0.019622802734375,
-0.004528045654296875,
-0.08013916015625,
-0.05401611328125,
-0.0091094970703125,
0.003887176513671875,
-0.0129852294921875,
0.01519775390625,
0.050140380859375,
-0.0157318115234375,
0.033203125,
-0.0291595458984375,
0.03973388671875,
0.027069091796875,
-0.0030269622802734375,
0.01174163818359375,
-0.0013189315795898438,
0.01042938232421875,
-0.03558349609375,
0.0266876220703125,
0.00026702880859375,
-0.024749755859375,
0.021026611328125,
0.00757598876953125,
0.00310516357421875,
0.021240234375,
-0.01409912109375,
0.00975799560546875,
-0.0133056640625,
-0.005401611328125,
-0.01837158203125,
-0.0269775390625,
0.01039886474609375,
0.0182342529296875,
-0.008758544921875,
-0.01236724853515625,
-0.0185699462890625,
0.056488037109375,
-0.039031982421875,
-0.002593994140625,
0.0614013671875,
-0.03021240234375,
-0.02227783203125,
-0.01434326171875,
-0.009674072265625,
0.00799560546875,
0.024139404296875,
-0.0292510986328125,
-0.0103759765625,
-0.0265045166015625,
-0.0270538330078125,
0.04095458984375,
-0.049713134765625,
-0.006931304931640625,
-0.00926971435546875,
0.02508544921875,
-0.048675537109375,
0.0269012451171875,
0.0246734619140625,
0.041748046875,
-0.01345062255859375,
-0.006069183349609375,
-0.026824951171875,
-0.05419921875,
-0.040313720703125,
0.0018224716186523438,
-0.0821533203125,
0.018829345703125,
0.01212310791015625,
-0.004909515380859375,
-0.006378173828125,
-0.02587890625,
-0.028350830078125,
0.03485107421875,
0.0472412109375,
0.005527496337890625,
-0.01064300537109375,
0.006526947021484375,
-0.0020694732666015625,
0.02099609375,
-0.01274871826171875,
-0.00525665283203125,
0.01259613037109375,
-0.01517486572265625,
0.00882720947265625,
0.01271820068359375,
-0.030426025390625,
-0.04693603515625,
0.02197265625,
0.03656005859375,
0.08538818359375,
-0.0082855224609375,
0.022705078125,
-0.0092315673828125,
-0.018829345703125,
-0.0249786376953125,
-0.0116119384765625,
-0.0016870498657226562,
0.0118865966796875,
0.00981903076171875,
-0.03997802734375,
0.0355224609375,
0.02825927734375,
0.05853271484375,
-0.011749267578125,
-0.0635986328125,
0.01503753662109375,
0.009002685546875,
-0.0699462890625,
0.08575439453125,
0.090576171875,
-0.00855255126953125,
0.036590576171875,
-0.0106201171875,
0.0015697479248046875,
0.01543426513671875,
-0.01483917236328125,
-0.003147125244140625,
-0.0224609375,
0.06011962890625,
0.004543304443359375,
-0.0210418701171875,
0.06292724609375,
-0.03265380859375,
0.03717041015625,
0.0684814453125,
0.0943603515625,
-0.086669921875,
-0.00472259521484375,
0.0250244140625,
-0.035614013671875,
0.01244354248046875,
0.0028553009033203125,
0.0303192138671875,
-0.0016317367553710938,
0.01251983642578125,
0.034820556640625,
-0.006744384765625,
0.005619049072265625,
-0.0277252197265625,
-0.0071563720703125,
0.0257110595703125,
0.01038360595703125,
0.00406646728515625,
-0.03179931640625,
0.0013751983642578125,
0.033050537109375,
-0.01085662841796875,
-0.01413726806640625,
0.03936767578125,
-0.04449462890625,
0.01068115234375,
-0.012237548828125,
0.0264129638671875,
-0.005016326904296875,
0.0107574462890625,
0.047332763671875,
0.01342010498046875,
0.01491546630859375,
0.05682373046875,
-0.0193328857421875,
0.021728515625,
0.0162200927734375,
-0.0007829666137695312,
-0.05242919921875,
-0.03131103515625,
0.02374267578125,
0.0548095703125,
-0.11761474609375,
0.040252685546875,
-0.06329345703125,
0.0202789306640625,
-0.00469970703125,
0.0308380126953125,
0.0265655517578125,
0.00685882568359375,
-0.03485107421875,
0.039794921875,
-0.01091766357421875,
-0.00772857666015625,
0.0184478759765625,
0.044891357421875,
-0.03662109375,
-0.0184783935546875,
0.044769287109375,
-0.013580322265625,
-0.052337646484375,
0.0330810546875,
-0.0260772705078125,
0.051849365234375,
-0.040863037109375,
-0.00872802734375,
0.051300048828125,
0.016326904296875,
-0.034088134765625,
-0.002254486083984375,
-0.045318603515625,
0.032806396484375,
0.0012254714965820312,
0.0716552734375,
-0.00616455078125,
-0.00400543212890625,
0.038970947265625,
0.0247039794921875,
0.047027587890625,
0.0011186599731445312,
0.0186309814453125,
-0.0092010498046875,
0.042877197265625,
-0.019622802734375,
-0.032867431640625,
0.0325927734375,
-0.005199432373046875,
-0.0117034912109375,
0.015380859375,
-0.0232086181640625,
0.03985595703125,
-0.056640625,
0.0011615753173828125,
0.0029811859130859375,
0.0158538818359375,
0.0207672119140625,
-0.005985260009765625,
0.08685302734375,
-0.046112060546875,
-0.006328582763671875,
0.03448486328125,
0.04473876953125,
-0.0182342529296875,
-0.023834228515625,
-0.0650634765625,
0.028289794921875,
0.005069732666015625,
-0.014892578125,
0.007843017578125,
-0.0192718505859375,
0.01296234130859375,
0.005542755126953125,
0.0193023681640625,
0.046478271484375,
-0.038787841796875,
0.001708984375,
0.004261016845703125,
-0.0247802734375,
-0.0135650634765625,
0.0111541748046875,
0.0239715576171875,
0.00022721290588378906,
0.044891357421875,
0.016326904296875,
-0.01488494873046875,
-0.01934814453125,
-0.05377197265625,
0.0005888938903808594,
0.000026524066925048828,
0.0291290283203125,
-0.01352691650390625,
-0.00860595703125,
-0.0271759033203125,
0.0305633544921875,
-0.054595947265625,
0.03204345703125,
0.060516357421875,
0.0158233642578125,
-0.0008153915405273438,
0.030426025390625,
-0.08660888671875,
0.0205535888671875,
0.0121917724609375,
-0.012939453125,
-0.02471923828125,
0.045867919921875,
0.016998291015625,
0.052978515625,
-0.0751953125,
-0.0237274169921875,
0.00040030479431152344,
0.0161590576171875,
0.0015420913696289062,
0.008087158203125,
-0.01971435546875,
-0.0197906494140625,
0.0011272430419921875,
0.029815673828125,
-0.0050201416015625,
0.0875244140625,
0.046844482421875,
0.0694580078125,
0.05633544921875,
-0.006168365478515625,
0.0775146484375,
-0.0024738311767578125,
0.025115966796875,
0.020904541015625,
0.0259857177734375,
0.0034656524658203125,
-0.0191192626953125,
-0.06475830078125,
0.09222412109375,
0.0002815723419189453,
-0.049896240234375,
0.057861328125,
-0.0123138427734375,
-0.0007295608520507812,
0.043548583984375,
0.00597381591796875,
0.058807373046875,
-0.01004791259765625,
-0.0247650146484375,
-0.0030422210693359375,
-0.0269317626953125,
-0.0188140869140625,
0.004039764404296875,
0.029205322265625,
0.0025691986083984375,
0.0224761962890625,
0.0074310302734375,
-0.00743865966796875,
0.0182952880859375,
0.0158233642578125,
-0.01161956787109375,
-0.0316162109375,
0.0255126953125,
-0.0289154052734375,
-0.05218505859375,
-0.0253448486328125,
-0.03521728515625,
0.036712646484375,
0.04779052734375,
0.024322509765625,
0.0026912689208984375,
0.043701171875,
-0.01232147216796875,
-0.021392822265625,
0.023101806640625,
-0.022125244140625,
0.0400390625,
0.033233642578125,
-0.0163726806640625,
-0.037628173828125,
0.023956298828125,
-0.00897979736328125,
0.0192413330078125,
-0.04327392578125,
-0.027130126953125,
-0.03570556640625,
0.03692626953125,
0.02655029296875,
0.052886962890625,
-0.0125579833984375,
-0.041900634765625,
-0.0310211181640625,
-0.019500732421875,
0.033416748046875,
0.0433349609375,
0.030548095703125,
0.0007681846618652344,
0.004001617431640625,
-0.023468017578125,
0.02154541015625,
-0.006404876708984375,
0.014251708984375,
0.01544189453125,
0.011932373046875,
0.016815185546875,
-0.0190582275390625,
-0.01873779296875,
-0.01409149169921875,
0.0280609130859375,
-0.06201171875,
0.005645751953125,
-0.0406494140625,
0.01177215576171875,
0.033935546875,
0.0249176025390625,
-0.036163330078125,
-0.001766204833984375,
0.00684356689453125,
-0.020782470703125,
0.0501708984375,
-0.03802490234375,
-0.01483154296875,
-0.0249786376953125,
-0.0029754638671875,
0.01023101806640625,
-0.0106658935546875,
-0.0113677978515625,
-0.00518798828125,
-0.0249786376953125,
0.036407470703125,
-0.004825592041015625,
0.0213165283203125,
-0.00557708740234375,
-0.032867431640625,
-0.03662109375,
0.033172607421875,
-0.0061798095703125,
-0.033111572265625,
-0.041168212890625,
-0.0200653076171875,
-0.03399658203125,
-0.07568359375,
0.045013427734375,
-0.0271759033203125,
0.01349639892578125,
0.0226898193359375,
-0.034820556640625,
-0.036224365234375,
-0.003955841064453125,
0.020599365234375,
0.03631591796875,
0.054168701171875,
-0.04693603515625,
-0.015655517578125,
0.0135498046875,
0.01410675048828125,
-0.0433349609375,
-0.0138702392578125,
-0.04071044921875,
0.00909423828125,
-0.0157470703125,
-0.01129150390625,
0.0032215118408203125,
-0.058380126953125,
-0.11480712890625,
0.06085205078125,
-0.02685546875,
-0.031402587890625,
-0.043701171875,
0.0153961181640625,
-0.0174102783203125,
0.0279541015625,
-0.0205535888671875,
0.0066986083984375,
0.01068115234375,
0.05194091796875,
-0.0266876220703125,
0.004878997802734375,
0.0126495361328125,
-0.061676025390625,
0.0100555419921875,
0.0022220611572265625,
0.04254150390625,
-0.0164031982421875,
0.042999267578125,
-0.03729248046875,
0.035400390625,
0.0380859375,
-0.0379638671875,
-0.040618896484375,
-0.0159759521484375,
-0.035491943359375,
0.0030307769775390625,
0.039764404296875,
-0.017120361328125,
0.005401611328125,
-0.00928497314453125,
0.05804443359375,
-0.004596710205078125,
-0.005214691162109375,
-0.02386474609375,
-0.0159454345703125,
0.0262298583984375,
-0.00827789306640625,
-0.0104217529296875,
-0.0193023681640625,
0.006519317626953125,
-0.020782470703125,
0.0146331787109375,
0.006893157958984375,
0.05291748046875,
0.0055999755859375,
-0.02862548828125,
0.049346923828125,
-0.007350921630859375,
-0.08251953125,
-0.033203125,
0.0628662109375,
-0.048797607421875,
-0.0093994140625,
-0.003993988037109375,
0.035186767578125,
0.01499176025390625,
-0.0243988037109375,
-0.0184783935546875,
0.01287841796875,
-0.04534912109375,
0.014801025390625,
-0.0299224853515625,
0.040924072265625,
-0.0609130859375,
0.0226898193359375,
-0.0211181640625,
0.04693603515625,
0.004241943359375,
0.052520751953125,
0.0005178451538085938,
0.04730224609375,
0.02508544921875,
0.0224456787109375,
0.0238189697265625,
-0.04852294921875,
-0.051727294921875,
0.09613037109375,
-0.00205230712890625,
-0.0472412109375,
-0.015289306640625,
-0.007671356201171875,
-0.009613037109375,
-0.03228759765625,
-0.049346923828125,
-0.0919189453125,
0.0301666259765625,
0.06793212890625,
-0.0153350830078125,
0.04193115234375
] |
7ffd5779d0ae15c95ee6c21c838c3e4de6a9e11b | Wordpress Stackexchange
Q: How to debug when error_log not working as expected Trying to debug my development and running into a lot of frustrations with lack of output in the debug.log. For example, I have this defined in wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
ini_set( 'display_errors', 0 );
I have this in my functions.php
add_filter( 'the_content', 'my_custom_function' );
function my_custom_function( $content ){
error_log( 'this fired' ); //never works!
$return $content;
}
What am I missing?
A: After disabling all plugins I was able to narrow down which one was affecting the log output. The client had installed Speed of Light plugin to provide caching and compression which was also effecting wp_debug capabilities.
| Q: How to debug when error_log not working as expected Trying to debug my development and running into a lot of frustrations with lack of output in the debug.log. For example, I have this defined in wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
ini_set( 'display_errors', 0 );
I have this in my functions.php
add_filter( 'the_content', 'my_custom_function' );
function my_custom_function( $content ){
error_log( 'this fired' ); //never works!
$return $content;
}
What am I missing?
A: After disabling all plugins I was able to narrow down which one was affecting the log output. The client had installed Speed of Light plugin to provide caching and compression which was also effecting wp_debug capabilities.
| wordpress | {
"language": "en",
"length": 117,
"provenance": "stackexchange_00019.jsonl.gz:471218",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249592"
} | [
0.0219573974609375,
-0.0253143310546875,
-0.0194549560546875,
-0.034576416015625,
-0.0205841064453125,
-0.0121307373046875,
-0.0037174224853515625,
-0.005733489990234375,
0.0214080810546875,
-0.01114654541015625,
0.0083160400390625,
-0.04541015625,
-0.044586181640625,
-0.045562744140625,
-0.03826904296875,
-0.0576171875,
0.038818359375,
-0.01354217529296875,
0.0262451171875,
-0.0218353271484375,
0.00689697265625,
0.000652313232421875,
-0.007427215576171875,
0.09771728515625,
0.035919189453125,
-0.004302978515625,
0.031463623046875,
-0.006214141845703125,
0.0266265869140625,
0.0015935897827148438,
0.0263214111328125,
-0.03253173828125,
0.027313232421875,
0.0623779296875,
-0.09814453125,
0.0067596435546875,
0.01300811767578125,
-0.00039958953857421875,
-0.0277862548828125,
0.07623291015625,
0.0117645263671875,
0.0033206939697265625,
0.075927734375,
-0.035888671875,
0.0184478759765625,
-0.024810791015625,
0.02490234375,
-0.027130126953125,
-0.013427734375,
-0.0263824462890625,
0.00534820556640625,
-0.0012865066528320312,
0.026458740234375,
-0.022003173828125,
-0.00711822509765625,
-0.01349639892578125,
-0.051025390625,
0.06500244140625,
0.015625,
0.017730712890625,
-0.007442474365234375,
0.0171051025390625,
-0.01412200927734375,
-0.01262664794921875,
0.00762176513671875,
0.0211181640625,
0.01641845703125,
0.01116180419921875,
-0.01477813720703125,
0.02056884765625,
0.0163116455078125,
-0.03125,
-0.0032291412353515625,
0.03289794921875,
0.0041046142578125,
-0.059051513671875,
0.03961181640625,
-0.008331298828125,
-0.006195068359375,
0.043853759765625,
0.03131103515625,
-0.04620361328125,
-0.0009546279907226562,
0.028961181640625,
-0.0089569091796875,
0.051116943359375,
0.004192352294921875,
-0.0211944580078125,
-0.016510009765625,
-0.035675048828125,
-0.0273284912109375,
-0.0179901123046875,
-0.029266357421875,
-0.033843994140625,
-0.0166015625,
-0.046783447265625,
0.01447296142578125,
0.03411865234375,
-0.0268707275390625,
-0.03326416015625,
-0.0204925537109375,
-0.0103302001953125,
-0.027008056640625,
0.0008993148803710938,
0.009246826171875,
0.049041748046875,
-0.00911712646484375,
-0.0221405029296875,
0.0225830078125,
0.02838134765625,
0.01216888427734375,
-0.0216827392578125,
-0.0156707763671875,
-0.06689453125,
0.01824951171875,
0.0665283203125,
0.0129852294921875,
0.0137939453125,
0.0214691162109375,
0.0008387565612792969,
0.027496337890625,
0.05755615234375,
-0.043365478515625,
-0.0154571533203125,
-0.02398681640625,
-0.03173828125,
-0.007137298583984375,
-0.022674560546875,
0.0753173828125,
0.018341064453125,
-0.0362548828125,
0.01251220703125,
0.0064849853515625,
-0.037506103515625,
-0.00945281982421875,
-0.01995849609375,
0.016998291015625,
-0.0194854736328125,
-0.0112762451171875,
0.01007843017578125,
0.0174102783203125,
-0.0185546875,
-0.0209197998046875,
-0.00977325439453125,
-0.00885009765625,
0.0114593505859375,
0.0243988037109375,
0.02117919921875,
-0.0101165771484375,
-0.062255859375,
0.024993896484375,
0.00501251220703125,
0.007659912109375,
0.0128173828125,
0.0374755859375,
-0.042755126953125,
0.0287322998046875,
-0.04296875,
0.0236663818359375,
-0.03192138671875,
-0.0003085136413574219,
-0.005237579345703125,
0.00757598876953125,
-0.0228424072265625,
-0.017974853515625,
-0.0086212158203125,
-0.0224761962890625,
-0.00028586387634277344,
0.0176239013671875,
-0.00127410888671875,
0.02685546875,
-0.00897216796875,
-0.01275634765625,
-0.0186920166015625,
-0.0123443603515625,
-0.0033130645751953125,
-0.0302734375,
0.02374267578125,
0.0115966796875,
0.0174102783203125,
-0.005695343017578125,
-0.0277862548828125,
0.0316162109375,
0.0030078887939453125,
-0.045623779296875,
0.03839111328125,
0.01238250732421875,
0.034881591796875,
0.003223419189453125,
0.00968170166015625,
0.020294189453125,
0.0396728515625,
-0.017181396484375,
0.052764892578125,
-0.007228851318359375,
-0.059326171875,
-0.02850341796875,
-0.020294189453125,
-0.0264129638671875,
0.01165008544921875,
-0.0200347900390625,
0.0130462646484375,
-0.00774383544921875,
0.00010716915130615234,
-0.11749267578125,
0.0191192626953125,
-0.06085205078125,
0.058319091796875,
0.03424072265625,
0.00506591796875,
-0.01200103759765625,
-0.0019931793212890625,
0.0182342529296875,
-0.033203125,
-0.03680419921875,
0.061431884765625,
-0.032958984375,
0.0516357421875,
-0.007080078125,
0.032379150390625,
-0.020263671875,
-0.026123046875,
-0.01264190673828125,
-0.034515380859375,
0.05194091796875,
0.008056640625,
-0.00600433349609375,
-0.012664794921875,
0.06573486328125,
-0.00019419193267822266,
0.0260772705078125,
0.0246429443359375,
0.03692626953125,
0.041046142578125,
-0.01543426513671875,
-0.03009033203125,
-0.0185546875,
-0.06622314453125,
0.0170745849609375,
0.0626220703125,
0.051605224609375,
0.0340576171875,
-0.020233154296875,
-0.02911376953125,
0.0200347900390625,
-0.06719970703125,
0.008087158203125,
-0.027923583984375,
-0.00400543212890625,
-0.00313568115234375,
-0.00927734375,
-0.0029735565185546875,
0.0386962890625,
-0.047393798828125,
0.0031032562255859375,
0.048675537109375,
-0.005596160888671875,
-0.019561767578125,
0.0036563873291015625,
0.0247039794921875,
-0.005889892578125,
0.01110076904296875,
0.01000213623046875,
-0.0018558502197265625,
-0.0160369873046875,
0.007549285888671875,
-0.0160980224609375,
-0.004291534423828125,
-0.01409149169921875,
0.0196533203125,
0.021484375,
-0.045928955078125,
0.00029730796813964844,
0.00952911376953125,
-0.0042877197265625,
0.037567138671875,
-0.04229736328125,
0.005870819091796875,
0.00920867919921875,
0.0140533447265625,
-0.019012451171875,
0.044921875,
0.0232391357421875,
-0.0121307373046875,
-0.021240234375,
-0.0260009765625,
0.0169677734375,
-0.026031494140625,
0.0194549560546875,
-0.034881591796875,
-0.0110321044921875,
0.04913330078125,
-0.0303955078125,
0.0703125,
-0.015380859375,
-0.0111541748046875,
0.006732940673828125,
-0.0673828125,
0.06024169921875,
-0.048095703125,
0.0271453857421875,
0.07867431640625,
-0.0079803466796875,
0.01241302490234375,
0.0017948150634765625,
0.01210784912109375,
-0.0005173683166503906,
-0.00629425048828125,
-0.0129852294921875,
-0.00518798828125,
-0.052154541015625,
0.0179901123046875,
0.00965118408203125,
0.039276123046875,
0.007541656494140625,
-0.036224365234375,
0.00592803955078125,
0.02838134765625,
-0.060821533203125,
-0.086669921875,
-0.0841064453125,
-0.10125732421875,
0.019866943359375,
-0.007167816162109375,
-0.035369873046875,
0.00655364990234375,
0.0211181640625,
0.02838134765625,
0.026336669921875,
-0.050506591796875,
-0.04412841796875,
-0.04815673828125,
-0.0693359375,
0.0211944580078125,
0.0189208984375,
0.018646240234375,
0.0009374618530273438,
0.08599853515625,
0.0025920867919921875,
-0.07275390625,
-0.0233306884765625,
-0.0028629302978515625,
-0.0168304443359375,
0.0122222900390625,
-0.0257110595703125,
0.0054931640625,
0.01007843017578125,
-0.00659942626953125,
-0.033477783203125,
-0.0014400482177734375,
0.017822265625,
-0.028839111328125,
-0.03179931640625,
-0.018524169921875,
0.00017940998077392578,
-0.0504150390625,
0.036865234375,
-0.002391815185546875,
-0.004695892333984375,
-0.03851318359375,
0.00559234619140625,
-0.01224517822265625,
-0.031982421875,
0.033416748046875,
0.0030269622802734375,
-0.012237548828125,
0.0166473388671875,
-0.01100921630859375,
0.0272369384765625,
0.032562255859375,
0.01134490966796875,
0.0006289482116699219,
0.02301025390625,
-0.0004019737243652344,
0.00594329833984375,
-0.0323486328125,
0.038818359375,
-0.0149078369140625,
-0.024810791015625,
0.00870513916015625,
-0.0155029296875,
-0.01354217529296875,
0.0025119781494140625,
-0.01641845703125,
-0.0016870498657226562,
0.021759033203125,
-0.016265869140625,
0.034912109375,
-0.0191650390625,
-0.013458251953125,
-0.01406097412109375,
0.04779052734375,
-0.0255889892578125,
-0.012847900390625,
-0.016571044921875,
0.00482177734375,
-0.0099029541015625,
-0.0282440185546875,
-0.023773193359375,
-0.0085906982421875,
-0.03546142578125,
-0.0072021484375,
-0.01364898681640625,
-0.0282440185546875,
-0.0222625732421875,
0.00356292724609375,
-0.0467529296875,
-0.03076171875,
0.01568603515625,
-0.024627685546875,
0.004047393798828125,
-0.031585693359375,
0.0253143310546875,
-0.06719970703125,
0.0245208740234375,
-0.039154052734375,
-0.089111328125,
-0.010894775390625,
-0.043853759765625,
0.06732177734375,
0.040863037109375,
-0.0552978515625,
0.0013446807861328125,
0.043701171875,
-0.003978729248046875,
-0.003787994384765625,
0.012481689453125,
0.007137298583984375,
-0.00482177734375,
0.03125,
0.0311279296875,
-0.004547119140625,
0.0008120536804199219,
-0.00402069091796875,
-0.033355712890625,
0.0478515625,
-0.01456451416015625,
0.0304107666015625,
0.01018524169921875,
-0.0298614501953125,
0.0007901191711425781,
-0.00737762451171875,
0.00914764404296875,
0.005687713623046875,
0.018646240234375,
-0.029815673828125,
-0.00860595703125,
0.0015192031860351562,
0.03253173828125,
-0.05322265625,
-0.02386474609375,
0.00588226318359375,
0.0775146484375,
0.0271453857421875,
0.0076904296875,
-0.0011358261108398438,
-0.006519317626953125,
0.016326904296875,
-0.0244140625,
0.02130126953125,
-0.00524139404296875,
-0.0119476318359375,
0.033966064453125,
-0.033050537109375,
0.0010271072387695312,
-0.018768310546875,
0.0253753662109375,
0.0007061958312988281,
-0.024017333984375,
0.0178070068359375,
-0.00518798828125,
0.01342010498046875,
0.0274810791015625,
0.0034503936767578125,
-0.01345062255859375,
0.042724609375,
0.02777099609375,
-0.05572509765625,
0.0254669189453125,
0.002185821533203125,
-0.041290283203125,
0.00382232666015625,
-0.0241851806640625,
0.0562744140625,
0.032257080078125,
-0.0102386474609375,
0.04779052734375,
0.030914306640625,
0.006328582763671875,
0.0323486328125,
0.032379150390625,
-0.0098724365234375,
0.0360107421875,
0.052520751953125,
0.00577545166015625,
-0.020599365234375,
-0.0215301513671875,
0.0843505859375,
0.028228759765625,
-0.043487548828125,
0.033111572265625,
-0.019989013671875,
-0.0206146240234375,
-0.008697509765625,
-0.0237274169921875,
0.0401611328125,
0.0292816162109375,
-0.0173797607421875,
0.004779815673828125,
-0.00711822509765625,
-0.007633209228515625,
-0.03692626953125,
0.0124969482421875,
-0.045989990234375,
0.0032501220703125,
0.033966064453125,
0.02166748046875,
-0.07244873046875,
0.049835205078125,
0.0007395744323730469,
-0.0072784423828125,
-0.0250701904296875,
0.0732421875,
0.037384033203125,
-0.078857421875,
0.0182647705078125,
0.0153656005859375,
0.0291595458984375,
-0.0241546630859375,
-0.032958984375,
-0.032501220703125,
0.018280029296875,
-0.046173095703125,
0.0023860931396484375,
0.05645751953125,
0.0007534027099609375,
0.000023484230041503906,
0.04437255859375,
-0.005481719970703125,
-0.06103515625,
-0.01605224609375,
-0.02105712890625,
0.003200531005859375,
-0.05303955078125,
0.0175323486328125,
0.050567626953125,
0.033782958984375,
0.047027587890625,
-0.0258636474609375,
-0.0008077621459960938,
-0.0259246826171875,
-0.0012960433959960938,
-0.00919342041015625,
-0.0268707275390625,
-0.00847625732421875,
0.0083770751953125,
-0.0028629302978515625,
-0.007236480712890625,
-0.00852203369140625,
0.01555633544921875,
-0.06817626953125,
-0.003978729248046875,
-0.01129150390625,
0.028350830078125,
-0.04644775390625,
0.0247802734375,
0.0305633544921875,
0.041107177734375,
-0.046905517578125,
0.0199737548828125,
-0.0277252197265625,
-0.0132293701171875,
0.01367950439453125,
-0.02276611328125,
-0.048797607421875,
-0.03509521484375,
0.0016794204711914062,
0.01229095458984375,
-0.0180816650390625,
-0.041473388671875,
-0.03509521484375,
0.0167388916015625,
0.040924072265625,
0.006320953369140625,
0.0018367767333984375,
0.04827880859375,
-0.01203155517578125,
0.01387786865234375,
0.0208740234375,
0.0316162109375,
-0.01393890380859375,
-0.0198974609375,
0.01241302490234375,
0.0279693603515625,
-0.028717041015625,
-0.0288543701171875,
0.029571533203125,
-0.0065155029296875,
0.06048583984375,
-0.0213775634765625,
0.00012004375457763672,
-0.0207977294921875,
-0.01044464111328125,
-0.0142059326171875,
0.0655517578125,
0.01456451416015625,
0.00748443603515625,
0.0265350341796875,
-0.0264892578125,
-0.0364990234375,
-0.005748748779296875,
0.006412506103515625,
-0.0021495819091796875,
0.01023101806640625,
-0.019775390625,
-0.009918212890625,
-0.0030345916748046875,
0.0242919921875,
0.06781005859375,
0.0003604888916015625,
0.042144775390625,
0.0254974365234375,
0.0034332275390625,
0.01119232177734375,
0.01522064208984375,
0.0164794921875,
-0.0240020751953125,
0.05963134765625,
0.005496978759765625,
-0.0183258056640625,
0.014312744140625,
-0.033905029296875,
0.0111236572265625,
0.062744140625,
0.049102783203125,
-0.0809326171875,
0.0087738037109375,
0.01873779296875,
0.0025844573974609375,
0.0262298583984375,
-0.034698486328125,
0.032958984375,
0.01849365234375,
0.0390625,
-0.0027904510498046875,
-0.0270843505859375,
0.01021575927734375,
-0.03631591796875,
0.0136566162109375,
0.00600433349609375,
0.0513916015625,
0.0095062255859375,
-0.082763671875,
0.032745361328125,
0.04498291015625,
0.01322174072265625,
0.0006422996520996094,
0.0175323486328125,
-0.03338623046875,
-0.036468505859375,
-0.062347412109375,
-0.03131103515625,
-0.0172119140625,
-0.0275726318359375,
0.00382232666015625,
0.014129638671875,
0.0116729736328125,
0.033447265625,
-0.0015354156494140625,
-0.0213165283203125,
0.0221710205078125,
-0.02880859375,
0.04473876953125,
-0.01474761962890625,
0.03985595703125,
0.0299835205078125,
-0.0565185546875,
0.0022754669189453125,
-0.00838470458984375,
-0.0158233642578125,
-0.006793975830078125,
-0.0135650634765625,
0.1041259765625,
-0.0401611328125,
-0.0147552490234375,
0.003643035888671875,
0.016876220703125,
-0.00029277801513671875,
-0.0144195556640625,
0.035858154296875,
-0.02813720703125,
0.0251922607421875,
0.0008339881896972656,
0.0188446044921875,
-0.0167694091796875,
-0.007053375244140625,
-0.028778076171875,
0.09765625,
-0.01953125,
-0.004390716552734375,
0.044586181640625,
0.03668212890625,
-0.04595947265625,
0.007289886474609375,
-0.0517578125,
0.08447265625,
0.002166748046875,
0.064453125,
-0.0927734375,
-0.024383544921875,
0.0191650390625,
0.05078125,
0.01200103759765625,
-0.0067901611328125,
-0.0253753662109375,
-0.0144805908203125,
0.0264434814453125,
-0.022247314453125,
-0.006500244140625,
0.053436279296875,
-0.0140838623046875,
0.0012540817260742188,
-0.0236358642578125,
-0.025177001953125,
0.021209716796875,
-0.025634765625,
-0.041046142578125,
0.0214996337890625,
-0.006320953369140625,
-0.02569580078125,
0.0022983551025390625,
0.01446533203125,
-0.039306640625,
-0.0033702850341796875,
0.0169830322265625,
0.043853759765625,
0.013641357421875,
0.039886474609375,
0.06622314453125,
-0.060546875,
-0.061370849609375,
-0.01129150390625,
0.039276123046875,
0.000004708766937255859,
-0.0240631103515625,
-0.01136016845703125,
0.006687164306640625,
-0.0384521484375,
-0.0304107666015625,
-0.034637451171875,
0.0189056396484375,
-0.0038623809814453125,
0.00023293495178222656,
0.009735107421875,
0.00484466552734375,
-0.00922393798828125,
0.007274627685546875,
0.03680419921875,
0.021942138671875,
-0.016357421875,
-0.061370849609375,
0.01012420654296875,
0.0001506805419921875,
0.0162200927734375,
0.005840301513671875,
-0.0032367706298828125,
-0.0303802490234375,
0.0173797607421875,
-0.0297088623046875,
-0.013458251953125,
-0.00933074951171875,
0.0068359375,
-0.01190185546875,
0.0017728805541992188,
0.017059326171875,
-0.01337432861328125,
-0.016082763671875,
-0.018524169921875,
0.0037384033203125,
0.05291748046875,
0.03924560546875,
-0.00946044921875,
-0.0270233154296875,
-0.01416015625,
-0.01140594482421875,
0.0016889572143554688,
-0.04638671875,
0.033447265625,
-0.0423583984375,
-0.02105712890625,
-0.0302276611328125,
0.0408935546875,
-0.0027561187744140625,
-0.0188446044921875,
0.02197265625,
0.0259246826171875,
-0.04083251953125,
-0.0240478515625,
0.035888671875,
-0.01528167724609375,
-0.053009033203125,
-0.04229736328125,
0.0046844482421875,
0.031646728515625,
0.0212860107421875,
0.033721923828125,
0.01220703125,
0.01629638671875,
-0.027252197265625,
0.0058135986328125,
0.0031280517578125,
-0.04425048828125,
0.03533935546875,
-0.03558349609375,
0.057861328125,
-0.01061248779296875,
-0.054290771484375,
-0.0237884521484375,
0.0082244873046875,
-0.01020050048828125,
0.00042366981506347656,
0.040374755859375,
0.04296875,
-0.02252197265625,
-0.0089111328125,
0.01149749755859375,
-0.016571044921875,
-0.0140380859375,
0.0015554428100585938,
-0.052093505859375,
0.0082550048828125,
-0.02886962890625,
-0.01523590087890625,
-0.0102996826171875,
-0.006397247314453125,
0.028839111328125,
0.0118408203125,
0.056121826171875,
-0.01386260986328125,
0.0068206787109375,
0.004711151123046875,
-0.0009603500366210938,
-0.01258087158203125,
0.0230255126953125,
-0.0276947021484375,
0.01107025146484375,
0.0020008087158203125,
-0.01210784912109375,
-0.07855224609375,
0.0643310546875,
0.0037746429443359375,
0.0239410400390625,
0.06878662109375,
-0.041351318359375,
0.0024967193603515625,
-0.01247406005859375,
-0.0224151611328125,
-0.02728271484375,
-0.01412200927734375,
0.02337646484375,
0.0179595947265625,
-0.0012254714965820312,
-0.0119476318359375,
0.004974365234375,
-0.0081634521484375,
-0.007778167724609375,
-0.052398681640625,
0.0121612548828125,
-0.017578125,
0.006389617919921875,
0.0297698974609375,
0.007671356201171875,
-0.042633056640625,
-0.05078125,
-0.0244903564453125,
-0.00287628173828125,
-0.01534271240234375,
0.04937744140625,
-0.038726806640625,
0.061981201171875,
-0.00992584228515625,
0.002567291259765625,
0.003078460693359375,
-0.04974365234375,
-0.0112762451171875,
0.035888671875,
-0.000047087669372558594,
-0.0037746429443359375,
-0.005435943603515625,
-0.0105438232421875,
-0.0021495819091796875,
-0.0088043212890625,
-0.004138946533203125,
0.0318603515625,
-0.0265350341796875,
0.025848388671875,
-0.0008230209350585938,
0.04345703125,
-0.01453399658203125,
-0.007694244384765625,
-0.0234527587890625,
-0.04290771484375,
0.0311126708984375,
0.00795745849609375,
-0.0208282470703125,
0.018280029296875,
0.0352783203125,
-0.00714111328125,
-0.0197906494140625,
0.0017614364624023438,
0.0244903564453125,
-0.0018320083618164062,
0.03485107421875,
0.033050537109375,
-0.0182037353515625,
-0.0122528076171875,
0.052703857421875,
0.005702972412109375,
0.1033935546875,
-0.0258636474609375,
-0.0238037109375,
-0.02264404296875,
-0.010040283203125,
0.006298065185546875,
0.0038909912109375,
0.0325927734375,
-0.05682373046875,
-0.06591796875,
0.00856781005859375,
-0.022186279296875,
-0.0004987716674804688,
-0.056304931640625,
-0.08929443359375,
0.00287628173828125,
0.005847930908203125,
-0.043548583984375,
-0.05023193359375,
-0.0430908203125,
0.005611419677734375,
0.005084991455078125,
-0.0237884521484375,
-0.006038665771484375,
-0.0701904296875,
0.04986572265625,
0.0173492431640625,
-0.00701904296875,
0.038177490234375,
-0.005870819091796875,
-0.04364013671875,
0.0064849853515625,
0.01096343994140625,
-0.0009732246398925781,
-0.02532958984375,
0.009979248046875,
0.01812744140625,
0.017425537109375,
-0.01094818115234375,
0.0007867813110351562,
0.032958984375,
0.00862884521484375,
0.01666259765625,
-0.017333984375,
-0.029815673828125,
-0.0226287841796875,
0.07659912109375,
-0.009490966796875,
0.022796630859375,
-0.01276397705078125,
-0.0560302734375,
-0.042510986328125,
-0.01256561279296875,
-0.0213623046875,
0.0184326171875,
-0.08306884765625,
0.00821685791015625,
-0.006443023681640625,
0.0013036727905273438,
-0.001941680908203125,
-0.015228271484375,
-0.006103515625,
-0.004146575927734375,
0.042022705078125,
0.004177093505859375,
0.020538330078125,
-0.03662109375,
0.0714111328125,
-0.0299835205078125,
0.0426025390625,
-0.01561737060546875,
0.034881591796875,
0.059967041015625,
0.0101318359375,
0.024017333984375,
0.022247314453125,
-0.05133056640625,
-0.00463104248046875,
0.01328277587890625,
0.0643310546875,
-0.00804901123046875,
-0.0413818359375,
0.00984954833984375,
-0.00798797607421875,
-0.03179931640625,
-0.0278472900390625,
0.0428466796875,
-0.010223388671875,
-0.0433349609375,
0.09075927734375,
-0.006805419921875,
-0.0235595703125,
-0.0322265625,
0.033203125,
-0.03466796875,
-0.00009232759475708008,
-0.01549530029296875,
-0.01479339599609375,
0.018035888671875,
0.0391845703125,
0.05316162109375,
-0.011962890625,
0.033721923828125,
0.042938232421875,
0.0245819091796875,
0.015899658203125
] |
e1937f64122babad356534ffd609cf0143a992a8 | Wordpress Stackexchange
Q: Check if a post has any term in this custom taxonomy? This,
if( has_term( 'jazz', 'genre' ) ) {
// do something
}
will check if a post has the term jazz from the custom taxonomy genre. But how to check if a post belongs to a custom taxonomy genre? No matter whatever term it has, as long as it has something from the genre taxonomy, it will check.
So something like this,
if ( has_taxonomy('genre') ) {
// whether it's jazz, blues, rock and roll; doesn't matter as long as the post has any of them.
}
A: if ( has_term('', 'genre') ) {
// whether it's jazz, blues, rock and roll; doesn't matter as long as the post has any of them.
}
would return true if the post contains any term in the genre taxonomy
| Q: Check if a post has any term in this custom taxonomy? This,
if( has_term( 'jazz', 'genre' ) ) {
// do something
}
will check if a post has the term jazz from the custom taxonomy genre. But how to check if a post belongs to a custom taxonomy genre? No matter whatever term it has, as long as it has something from the genre taxonomy, it will check.
So something like this,
if ( has_taxonomy('genre') ) {
// whether it's jazz, blues, rock and roll; doesn't matter as long as the post has any of them.
}
A: if ( has_term('', 'genre') ) {
// whether it's jazz, blues, rock and roll; doesn't matter as long as the post has any of them.
}
would return true if the post contains any term in the genre taxonomy
A: You can have the term input empty, e.g.
if( has_term( '', 'genre' ) ) {
// do something
}
to see if the current post object has any terms in the genre taxonomy.
It uses is_object_in_term() where:
The given terms are checked against the object’s terms’ term_ids,
names and slugs. Terms given as integers will only be checked against
the object’s terms’ term_ids. If no terms are given, determines if
object is associated with any terms in the given taxonomy.
| wordpress | {
"language": "en",
"length": 220,
"provenance": "stackexchange_00019.jsonl.gz:471232",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249630"
} | [
0.0556640625,
0.01085662841796875,
-0.0271453857421875,
-0.050933837890625,
0.042938232421875,
-0.024017333984375,
0.044403076171875,
-0.00870513916015625,
-0.0166473388671875,
-0.0167236328125,
-0.02099609375,
0.001804351806640625,
-0.053314208984375,
-0.0266265869140625,
0.02020263671875,
-0.052520751953125,
0.03424072265625,
-0.00450897216796875,
0.061248779296875,
-0.000029027462005615234,
0.03619384765625,
0.0140380859375,
0.03179931640625,
-0.0217132568359375,
0.046844482421875,
-0.045684814453125,
0.087646484375,
-0.038421630859375,
0.044769287109375,
-0.006763458251953125,
0.059051513671875,
-0.040283203125,
0.00969696044921875,
0.0031414031982421875,
0.0294952392578125,
0.0179290771484375,
0.0233001708984375,
-0.00772857666015625,
0.03082275390625,
0.016815185546875,
0.055908203125,
-0.0279083251953125,
-0.029754638671875,
0.053070068359375,
-0.0157470703125,
-0.06878662109375,
0.06298828125,
-0.034423828125,
0.031463623046875,
-0.0400390625,
0.00958251953125,
0.0000921487808227539,
0.0309295654296875,
-0.07391357421875,
-0.0236968994140625,
0.018890380859375,
-0.049530029296875,
0.006305694580078125,
0.0335693359375,
-0.007110595703125,
0.0029754638671875,
-0.0296783447265625,
0.031524658203125,
0.01436614990234375,
0.001678466796875,
0.0225677490234375,
-0.0047149658203125,
0.00926971435546875,
-0.0762939453125,
-0.0428466796875,
0.0252227783203125,
-0.058990478515625,
-0.0006494522094726562,
0.005970001220703125,
-0.00356292724609375,
-0.07684326171875,
0.0255889892578125,
-0.038818359375,
-0.01311492919921875,
0.046875,
-0.0080108642578125,
-0.006237030029296875,
-0.0188446044921875,
0.02490234375,
-0.01523590087890625,
0.0266876220703125,
-0.0231781005859375,
-0.00677490234375,
-0.0222015380859375,
-0.033599853515625,
-0.01007080078125,
-0.042572021484375,
-0.028350830078125,
0.017120361328125,
0.0014829635620117188,
-0.01800537109375,
0.0292816162109375,
0.061798095703125,
-0.032470703125,
-0.00699615478515625,
-0.0130767822265625,
-0.038848876953125,
-0.01291656494140625,
-0.039154052734375,
0.0187530517578125,
0.040435791015625,
0.005458831787109375,
-0.034912109375,
0.03155517578125,
0.004108428955078125,
0.002780914306640625,
0.04217529296875,
-0.00995635986328125,
0.0164642333984375,
-0.0338134765625,
-0.0205078125,
-0.044586181640625,
-0.0145111083984375,
-0.0267181396484375,
-0.01387786865234375,
0.0046844482421875,
0.0305938720703125,
0.0269622802734375,
-0.055419921875,
0.0230712890625,
0.0088043212890625,
-0.0362548828125,
-0.029205322265625,
-0.0091400146484375,
0.0321044921875,
-0.0273590087890625,
0.032684326171875,
0.025146484375,
-0.013458251953125,
-0.025909423828125,
-0.0188140869140625,
0.0237884521484375,
0.0275726318359375,
-0.0159759521484375,
-0.00888824462890625,
0.00885009765625,
-0.0117340087890625,
0.01355743408203125,
-0.0195465087890625,
0.0180816650390625,
0.0021457672119140625,
0.022064208984375,
0.0294952392578125,
-0.00815582275390625,
-0.038848876953125,
0.058746337890625,
-0.01522064208984375,
0.048614501953125,
-0.0017595291137695312,
-0.0167388916015625,
0.01120758056640625,
0.0262298583984375,
-0.0087890625,
-0.059356689453125,
-0.024505615234375,
0.00513458251953125,
-0.0330810546875,
-0.012481689453125,
-0.00597381591796875,
-0.0275115966796875,
0.0478515625,
-0.019073486328125,
0.0022125244140625,
0.0280303955078125,
-0.01010894775390625,
0.035369873046875,
0.0200042724609375,
0.036376953125,
0.0080413818359375,
0.01062774658203125,
-0.001712799072265625,
0.012786865234375,
0.003719329833984375,
0.030181884765625,
0.05218505859375,
-0.006046295166015625,
-0.024627685546875,
0.0877685546875,
-0.033203125,
-0.034393310546875,
-0.0081787109375,
0.0069732666015625,
0.047210693359375,
0.0333251953125,
0.016082763671875,
0.00992584228515625,
-0.0270538330078125,
-0.052215576171875,
-0.005008697509765625,
0.01485443115234375,
0.0013837814331054688,
-0.016632080078125,
-0.016082763671875,
0.00952911376953125,
0.0274658203125,
-0.0031757354736328125,
0.003932952880859375,
0.0005707740783691406,
0.0007352828979492188,
-0.0038967132568359375,
-0.0011463165283203125,
-0.006748199462890625,
0.0292510986328125,
-0.0200958251953125,
0.0218505859375,
0.0171966552734375,
-0.00975799560546875,
-0.0093841552734375,
-0.035919189453125,
-0.00795745849609375,
-0.01201629638671875,
-0.0099639892578125,
-0.0126800537109375,
-0.031097412109375,
-0.02911376953125,
-0.04473876953125,
0.00804901123046875,
-0.044189453125,
0.052490234375,
0.0230865478515625,
0.021209716796875,
-0.015472412109375,
0.0164642333984375,
0.0047454833984375,
0.072021484375,
-0.0645751953125,
-0.039703369140625,
0.054931640625,
0.0004856586456298828,
-0.0271148681640625,
0.004169464111328125,
0.032440185546875,
-0.065185546875,
-0.00102996826171875,
0.055572509765625,
0.03271484375,
0.0240936279296875,
-0.037841796875,
-0.050323486328125,
0.019805908203125,
-0.07440185546875,
-0.0152740478515625,
-0.0194244384765625,
0.0114593505859375,
0.051055908203125,
0.01316070556640625,
0.02001953125,
-0.008697509765625,
0.0255279541015625,
0.00524139404296875,
0.012359619140625,
-0.0067596435546875,
-0.017852783203125,
0.0242919921875,
0.00455474853515625,
-0.0036983489990234375,
0.03253173828125,
0.003635406494140625,
0.01049041748046875,
0.0301361083984375,
-0.0041656494140625,
0.02593994140625,
0.0216827392578125,
-0.0167388916015625,
-0.0079498291015625,
0.01390838623046875,
-0.022064208984375,
0.009674072265625,
0.048065185546875,
0.076904296875,
0.053314208984375,
-0.056884765625,
-0.03662109375,
0.06414794921875,
0.0555419921875,
-0.020263671875,
0.00858306884765625,
-0.033599853515625,
-0.0144195556640625,
-0.040283203125,
-0.04302978515625,
0.025543212890625,
0.021484375,
0.0095062255859375,
0.018829345703125,
0.0124053955078125,
0.06298828125,
0.01129913330078125,
0.028472900390625,
0.025634765625,
0.01294708251953125,
-0.00878143310546875,
-0.00403594970703125,
0.01399993896484375,
-0.0172576904296875,
0.00814056396484375,
0.051788330078125,
0.009796142578125,
-0.0099334716796875,
-0.00730133056640625,
-0.0132293701171875,
-0.01331329345703125,
0.02435302734375,
-0.00640106201171875,
-0.03363037109375,
-0.044525146484375,
-0.00876617431640625,
0.0116119384765625,
-0.02862548828125,
0.03985595703125,
0.0090179443359375,
0.0163726806640625,
0.00849151611328125,
-0.01166534423828125,
-0.0218353271484375,
0.05230712890625,
-0.00015985965728759766,
0.01190185546875,
-0.017303466796875,
0.0178680419921875,
-0.03826904296875,
-0.021942138671875,
-0.0122528076171875,
-0.007190704345703125,
-0.01384735107421875,
-0.056427001953125,
-0.0753173828125,
-0.078857421875,
-0.029052734375,
-0.00348663330078125,
0.00447845458984375,
0.00853729248046875,
0.060760498046875,
0.0156707763671875,
-0.043548583984375,
0.0224151611328125,
0.01277923583984375,
-0.00978851318359375,
0.043975830078125,
-0.00850677490234375,
0.003971099853515625,
-0.0035552978515625,
-0.0014476776123046875,
0.00640869140625,
0.015594482421875,
-0.006927490234375,
-0.01474761962890625,
-0.021697998046875,
0.007442474365234375,
0.0120849609375,
-0.021270751953125,
0.01666259765625,
0.0670166015625,
0.039031982421875,
0.01277923583984375,
-0.035888671875,
0.0068359375,
-0.022216796875,
0.050567626953125,
-0.01397705078125,
-0.0000845789909362793,
0.0114898681640625,
0.041351318359375,
-0.0404052734375,
-0.005298614501953125,
-0.024688720703125,
-0.034912109375,
0.055084228515625,
-0.0028972625732421875,
-0.0028533935546875,
0.019256591796875,
0.007671356201171875,
-0.026214599609375,
0.02496337890625,
-0.01165008544921875,
0.00366973876953125,
-0.033447265625,
0.0209197998046875,
-0.054443359375,
-0.0533447265625,
0.019195556640625,
-0.040771484375,
0.01157379150390625,
-0.0207977294921875,
-0.01522064208984375,
0.0171661376953125,
0.0887451171875,
0.009490966796875,
-0.0150146484375,
0.00026297569274902344,
0.0006051063537597656,
0.00991058349609375,
0.005970001220703125,
-0.02984619140625,
-0.026947021484375,
-0.03619384765625,
0.01052093505859375,
0.01366424560546875,
-0.0307769775390625,
-0.03411865234375,
0.007747650146484375,
-0.059295654296875,
-0.00030040740966796875,
0.018707275390625,
-0.07952880859375,
0.0220489501953125,
0.00115203857421875,
0.006580352783203125,
-0.035369873046875,
0.0014066696166992188,
-0.062164306640625,
-0.037109375,
0.00777435302734375,
0.022369384765625,
-0.03778076171875,
-0.0290985107421875,
0.006866455078125,
0.0164642333984375,
0.033294677734375,
0.0271148681640625,
-0.0216217041015625,
-0.0003757476806640625,
-0.025115966796875,
-0.00991058349609375,
0.034820556640625,
-0.00994110107421875,
0.00201416015625,
0.0047607421875,
0.0189056396484375,
0.0032901763916015625,
0.046234130859375,
-0.02789306640625,
-0.01131439208984375,
-0.00832366943359375,
-0.0361328125,
-0.0273284912109375,
-0.0107269287109375,
-0.0285797119140625,
-0.0033111572265625,
-0.01438140869140625,
-0.0191192626953125,
-0.023345947265625,
-0.0266571044921875,
0.026458740234375,
0.01085662841796875,
-0.01276397705078125,
0.00885009765625,
0.0911865234375,
0.02008056640625,
-0.01904296875,
-0.0304718017578125,
0.0198822021484375,
0.031524658203125,
0.025787353515625,
0.040191650390625,
0.0034046173095703125,
-0.033843994140625,
0.07244873046875,
0.01293182373046875,
-0.0205841064453125,
-0.021728515625,
0.06402587890625,
-0.0041961669921875,
-0.0078277587890625,
-0.005218505859375,
-0.026611328125,
0.0382080078125,
0.0159759521484375,
-0.003734588623046875,
-0.04815673828125,
0.003376007080078125,
0.06304931640625,
-0.054107666015625,
0.06695556640625,
-0.02349853515625,
-0.046356201171875,
0.035980224609375,
-0.056671142578125,
0.00661468505859375,
-0.007373809814453125,
-0.00305938720703125,
0.00649261474609375,
-0.0214385986328125,
-0.00782012939453125,
0.0623779296875,
0.0389404296875,
0.00811767578125,
0.033477783203125,
0.036407470703125,
-0.0197601318359375,
0.004505157470703125,
-0.0043182373046875,
0.050689697265625,
-0.0191497802734375,
-0.0828857421875,
0.00212860107421875,
-0.01611328125,
0.023712158203125,
0.05914306640625,
0.052886962890625,
0.08380126953125,
0.0173187255859375,
-0.013519287109375,
-0.019073486328125,
-0.0216217041015625,
0.032867431640625,
-0.0565185546875,
0.011322021484375,
0.017730712890625,
-0.033905029296875,
-0.0303955078125,
0.0335693359375,
-0.0022220611572265625,
-0.01432037353515625,
0.004116058349609375,
-0.0007615089416503906,
0.0146484375,
0.0595703125,
0.034698486328125,
-0.040985107421875,
-0.0162200927734375,
0.016021728515625,
-0.01397705078125,
-0.02789306640625,
-0.02166748046875,
-0.0187530517578125,
0.0029773712158203125,
-0.045166015625,
-0.016357421875,
0.0731201171875,
0.0190887451171875,
-0.02685546875,
-0.0183868408203125,
-0.018218994140625,
-0.01227569580078125,
-0.0198516845703125,
0.004047393798828125,
0.01971435546875,
0.033447265625,
-0.0238494873046875,
-0.004974365234375,
0.0016927719116210938,
0.054718017578125,
-0.012481689453125,
-0.0172119140625,
0.04254150390625,
0.044952392578125,
-0.0810546875,
-0.022186279296875,
0.051055908203125,
-0.0404052734375,
-0.020599365234375,
-0.031219482421875,
-0.055816650390625,
0.031402587890625,
-0.004695892333984375,
0.0219879150390625,
-0.013641357421875,
-0.039215087890625,
0.01427459716796875,
0.0021038055419921875,
0.058563232421875,
0.006374359130859375,
-0.05194091796875,
0.00962066650390625,
-0.044677734375,
-0.0014638900756835938,
-0.01419830322265625,
-0.042236328125,
-0.031585693359375,
-0.01462554931640625,
-0.0218048095703125,
0.01021575927734375,
0.0004177093505859375,
0.0140838623046875,
0.0020885467529296875,
0.0162200927734375,
-0.0075225830078125,
-0.0242462158203125,
-0.0231170654296875,
0.0245513916015625,
0.006328582763671875,
0.0207977294921875,
-0.01441192626953125,
-0.0013990402221679688,
0.0098419189453125,
-0.0291290283203125,
-0.035247802734375,
-0.068359375,
0.0187530517578125,
0.015655517578125,
-0.00032591819763183594,
0.045196533203125,
0.030548095703125,
0.0301666259765625,
0.031951904296875,
-0.011993408203125,
0.0037593841552734375,
-0.0171661376953125,
-0.0068511962890625,
-0.003192901611328125,
0.01544189453125,
0.021209716796875,
-0.0290985107421875,
0.0235443115234375,
0.004730224609375,
-0.02349853515625,
0.036041259765625,
-0.021697998046875,
0.033294677734375,
0.0241851806640625,
0.005214691162109375,
0.01522064208984375,
-0.04913330078125,
-0.01224517822265625,
-0.01296234130859375,
-0.017852783203125,
0.01177215576171875,
-0.04046630859375,
-0.0079803466796875,
0.0021419525146484375,
-0.0184783935546875,
0.03680419921875,
-0.004241943359375,
-0.01074981689453125,
0.030426025390625,
-0.0284881591796875,
-0.01041412353515625,
0.00980377197265625,
0.02984619140625,
-0.01059722900390625,
-0.01259613037109375,
0.0171661376953125,
-0.025970458984375,
-0.0183258056640625,
-0.0127410888671875,
0.015960693359375,
0.01580810546875,
0.0159149169921875,
-0.00490570068359375,
-0.0248565673828125,
0.0025959014892578125,
-0.0200653076171875,
-0.0237274169921875,
-0.015899658203125,
-0.00191497802734375,
0.01430511474609375,
-0.0165863037109375,
0.00868988037109375,
0.017059326171875,
-0.0294036865234375,
0.006069183349609375,
0.01438140869140625,
-0.0240936279296875,
0.00638580322265625,
-0.007198333740234375,
0.037139892578125,
-0.05474853515625,
0.016510009765625,
0.041778564453125,
-0.006927490234375,
0.041015625,
0.036224365234375,
-0.004058837890625,
0.01061248779296875,
-0.00014901161193847656,
-0.0142822265625,
-0.0743408203125,
-0.017913818359375,
0.0197601318359375,
0.060150146484375,
-0.0296630859375,
0.046722412109375,
-0.0157470703125,
-0.002471923828125,
-0.02020263671875,
-0.0277862548828125,
0.10162353515625,
-0.040802001953125,
-0.00827789306640625,
0.0119781494140625,
0.0421142578125,
0.002803802490234375,
0.00423431396484375,
0.04449462890625,
-0.054718017578125,
-0.03021240234375,
0.0254058837890625,
-0.026519775390625,
-0.052093505859375,
0.0016307830810546875,
-0.07879638671875,
0.0858154296875,
-0.011688232421875,
0.0389404296875,
-0.00626373291015625,
0.032806396484375,
-0.00632476806640625,
0.0117340087890625,
-0.04754638671875,
0.01312255859375,
-0.0335693359375,
0.03436279296875,
-0.0755615234375,
-0.01032257080078125,
-0.0194854736328125,
0.043975830078125,
0.032867431640625,
-0.00390625,
-0.012451171875,
0.00994110107421875,
0.0794677734375,
0.04205322265625,
0.00665283203125,
0.0103607177734375,
-0.00806427001953125,
0.042572021484375,
0.023529052734375,
-0.0300445556640625,
0.034210205078125,
-0.01511383056640625,
-0.038482666015625,
0.0228729248046875,
0.01788330078125,
0.0204010009765625,
-0.0029315948486328125,
-0.03143310546875,
-0.0103759765625,
-0.01067352294921875,
0.019439697265625,
-0.032012939453125,
0.00598907470703125,
0.023529052734375,
0.035308837890625,
-0.05877685546875,
0.0274658203125,
-0.041015625,
0.053497314453125,
-0.0196075439453125,
0.07684326171875,
0.0015020370483398438,
0.015106201171875,
0.05889892578125,
-0.00554656982421875,
0.04876708984375,
0.039215087890625,
-0.06768798828125,
0.035247802734375,
0.0133056640625,
-0.0022983551025390625,
-0.044677734375,
0.003589630126953125,
-0.00942230224609375,
0.04364013671875,
-0.044036865234375,
-0.053192138671875,
0.01331329345703125,
-0.0121002197265625,
-0.0303497314453125,
0.00646209716796875,
-0.037384033203125,
0.0653076171875,
0.0782470703125,
-0.076171875,
0.035980224609375,
0.0287628173828125,
0.01375579833984375,
-0.028594970703125,
-0.01441192626953125,
-0.03662109375,
0.0217742919921875,
-0.06561279296875,
0.040496826171875,
0.01788330078125,
0.08941650390625,
0.00743865966796875,
0.087890625,
-0.040283203125,
-0.039520263671875,
0.019134521484375,
0.0168609619140625,
0.00536346435546875,
-0.0243682861328125,
-0.016021728515625,
-0.05145263671875,
0.0201416015625,
0.0276031494140625,
0.01044464111328125,
-0.006099700927734375,
0.0016813278198242188,
0.00276947021484375,
-0.000025987625122070312,
0.006160736083984375,
0.042327880859375,
-0.0145416259765625,
-0.0274658203125,
-0.042388916015625,
0.03204345703125,
0.04193115234375,
0.005603790283203125,
0.030975341796875,
0.0111541748046875,
0.042510986328125,
0.0114288330078125,
0.046356201171875,
0.021697998046875,
-0.018341064453125,
0.0197296142578125,
0.03350830078125,
0.0711669921875,
0.0491943359375,
-0.071533203125,
-0.011932373046875,
-0.05126953125,
-0.07037353515625,
0.033355712890625,
0.0516357421875,
-0.000843048095703125,
-0.021331787109375,
-0.01161956787109375,
-0.022796630859375,
0.0006880760192871094,
0.044708251953125,
-0.0077362060546875,
-0.005985260009765625,
0.01080322265625,
-0.017974853515625,
-0.0084075927734375,
-0.006389617919921875,
0.0145263671875,
0.021148681640625,
-0.002201080322265625,
0.059173583984375,
-0.0213470458984375,
0.0018100738525390625,
-0.02728271484375,
0.028900146484375,
-0.039031982421875,
-0.050933837890625,
0.0484619140625,
-0.003971099853515625,
0.003284454345703125,
0.012481689453125,
-0.048675537109375,
0.042327880859375,
0.03936767578125,
-0.0208587646484375,
0.0271453857421875,
0.0225067138671875,
0.0007734298706054688,
-0.0245819091796875,
0.028778076171875,
-0.020294189453125,
-0.00981903076171875,
-0.0202789306640625,
-0.028289794921875,
0.040435791015625,
0.038238525390625,
0.0211944580078125,
0.00760650634765625,
0.0017576217651367188,
-0.04119873046875,
0.0082550048828125,
-0.021759033203125,
0.0175323486328125,
0.03759765625,
0.004077911376953125,
-0.041412353515625,
-0.004230499267578125,
-0.0086212158203125,
-0.008270263671875,
0.01149749755859375,
0.021484375,
0.01020050048828125,
0.003437042236328125,
0.0095977783203125,
0.0026226043701171875,
0.01517486572265625,
-0.01107025146484375,
-0.0013990402221679688,
0.01517486572265625,
-0.001499176025390625,
-0.0261077880859375,
-0.003021240234375,
-0.0220947265625,
-0.037078857421875,
0.01064300537109375,
-0.00429534912109375,
0.0027523040771484375,
0.01187896728515625,
0.015899658203125,
-0.005702972412109375,
0.0221099853515625,
-0.040252685546875,
0.0330810546875,
-0.014678955078125,
-0.07098388671875,
0.0003528594970703125,
-0.0217437744140625,
-0.0032482147216796875,
0.018402099609375,
0.0458984375,
0.0036716461181640625,
0.013427734375,
0.0032711029052734375,
-0.002635955810546875,
0.028533935546875,
0.02032470703125,
0.0092620849609375,
-0.054107666015625,
-0.034332275390625,
0.0227813720703125,
0.04736328125,
0.038421630859375,
0.07293701171875,
-0.021697998046875,
0.0207061767578125,
-0.01055908203125,
-0.018524169921875,
-0.04119873046875,
0.030364990234375,
-0.0625,
-0.0201416015625,
-0.0084686279296875,
0.00893402099609375,
0.0217437744140625,
-0.034759521484375,
-0.0924072265625,
0.038818359375,
-0.0145721435546875,
-0.03668212890625,
-0.05010986328125,
-0.0137939453125,
-0.006214141845703125,
0.0272369384765625,
-0.01690673828125,
-0.0018758773803710938,
-0.04229736328125,
0.0294342041015625,
0.0211639404296875,
0.024200439453125,
0.01403045654296875,
0.025604248046875,
-0.08966064453125,
0.0123443603515625,
-0.0210113525390625,
0.0283355712890625,
0.01739501953125,
-0.009002685546875,
-0.0189666748046875,
0.017181396484375,
-0.06512451171875,
-0.09112548828125,
-0.037811279296875,
0.0270538330078125,
-0.0052337646484375,
-0.03509521484375,
0.0019073486328125,
-0.029083251953125,
0.047515869140625,
0.003692626953125,
0.01015472412109375,
-0.00923919677734375,
-0.06182861328125,
-0.044403076171875,
-0.0122833251953125,
0.01241302490234375,
0.0102996826171875,
-0.028228759765625,
0.06024169921875,
-0.00431060791015625,
-0.004364013671875,
0.0025424957275390625,
-0.0263824462890625,
-0.046173095703125,
-0.00931549072265625,
-0.0193023681640625,
0.0260467529296875,
-0.048004150390625,
0.0440673828125,
-0.04180908203125,
0.0031032562255859375,
-0.0179290771484375,
-0.0185394287109375,
-0.01189422607421875,
-0.031524658203125,
0.027313232421875,
0.019989013671875,
0.026336669921875,
0.0136566162109375,
-0.019683837890625,
0.04217529296875,
-0.007781982421875,
0.046844482421875,
-0.0038166046142578125,
-0.03314208984375,
-0.007205963134765625,
0.01371002197265625,
-0.0160369873046875,
-0.01389312744140625,
-0.0191497802734375,
0.00635528564453125,
0.03253173828125,
-0.005161285400390625,
-0.00402069091796875,
-0.0223236083984375,
0.036590576171875,
-0.0031604766845703125,
-0.011962890625,
0.028900146484375,
-0.029205322265625,
0.0019102096557617188,
-0.005550384521484375,
-0.024658203125,
-0.044403076171875,
0.003734588623046875,
-0.0230865478515625,
-0.001201629638671875,
0.009368896484375
] |
6a10e14c6692a034d1e143a776585faffe3b2fd6 | Wordpress Stackexchange
Q: Add_action to wp_head via functions.php I installed the Twenty Seventeen theme and a child theme. Now I want to add the following code to functions.php to add meta data to the <head> tag using the wp_head action:
if ( is_single() ) echo get_post_meta($post->ID, "meta-head", true); ?>
I tried this, but it did not work:
add_action ('wp_head','hook_inHeader');
function hook_inHeader() {
if ( is_single() ) {
echo get_post_meta($post->ID, "meta-head", true);
}
}
A: The reason the code posted is not working is that $post is not referencing the global $post variable, which is the goal here.
Using get_the_ID() is a good way of accessing the ID associated with the current post. That's how I'd suggest doing it, but there are other ways too:
add_action ( 'wp_head', 'hook_inHeader' );
function hook_inHeader() {
if ( is_single() ) {
// Get the post id using the get_the_ID(); function:
echo get_post_meta( get_the_ID(), 'meta-head', true );
/* Or, globalize $post so that we're accessing the global $post variable: */
//global $post;
//echo get_post_meta( $post->ID, 'meta-head', true );
/* Or, access the global $post variable directly: */
// echo get_post_meta( $GLOBALS['post']->ID, 'meta-head', true );
}
}
| Q: Add_action to wp_head via functions.php I installed the Twenty Seventeen theme and a child theme. Now I want to add the following code to functions.php to add meta data to the <head> tag using the wp_head action:
if ( is_single() ) echo get_post_meta($post->ID, "meta-head", true); ?>
I tried this, but it did not work:
add_action ('wp_head','hook_inHeader');
function hook_inHeader() {
if ( is_single() ) {
echo get_post_meta($post->ID, "meta-head", true);
}
}
A: The reason the code posted is not working is that $post is not referencing the global $post variable, which is the goal here.
Using get_the_ID() is a good way of accessing the ID associated with the current post. That's how I'd suggest doing it, but there are other ways too:
add_action ( 'wp_head', 'hook_inHeader' );
function hook_inHeader() {
if ( is_single() ) {
// Get the post id using the get_the_ID(); function:
echo get_post_meta( get_the_ID(), 'meta-head', true );
/* Or, globalize $post so that we're accessing the global $post variable: */
//global $post;
//echo get_post_meta( $post->ID, 'meta-head', true );
/* Or, access the global $post variable directly: */
// echo get_post_meta( $GLOBALS['post']->ID, 'meta-head', true );
}
}
| wordpress | {
"language": "en",
"length": 189,
"provenance": "stackexchange_00019.jsonl.gz:471266",
"question_score": "11",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249765"
} | [
0.051361083984375,
-0.023101806640625,
-0.0020503997802734375,
-0.032867431640625,
0.00720977783203125,
-0.006603240966796875,
0.035552978515625,
0.00008594989776611328,
-0.0201873779296875,
0.0252838134765625,
-0.0189056396484375,
-0.007656097412109375,
-0.003673553466796875,
-0.0272064208984375,
0.00568389892578125,
-0.016143798828125,
0.05401611328125,
-0.040985107421875,
0.0306549072265625,
0.016021728515625,
0.0035381317138671875,
0.042388916015625,
0.031829833984375,
0.0115509033203125,
0.0361328125,
-0.047698974609375,
-0.00010800361633300781,
-0.0242156982421875,
0.02349853515625,
-0.01160430908203125,
0.017486572265625,
0.0203704833984375,
0.0286865234375,
-0.0166473388671875,
0.01361083984375,
0.02899169921875,
0.00830841064453125,
0.002208709716796875,
0.018157958984375,
0.01258087158203125,
0.01052093505859375,
-0.00566864013671875,
-0.0028533935546875,
0.031707763671875,
-0.01143646240234375,
-0.06982421875,
0.040283203125,
-0.033447265625,
0.01096343994140625,
0.016387939453125,
-0.004161834716796875,
0.033843994140625,
0.01132965087890625,
-0.032440185546875,
0.0022296905517578125,
0.00017440319061279297,
-0.031463623046875,
-0.044525146484375,
0.030517578125,
0.0435791015625,
-0.0125732421875,
-0.056060791015625,
0.01084136962890625,
-0.052398681640625,
0.026580810546875,
0.0079498291015625,
0.003170013427734375,
0.0309600830078125,
-0.07421875,
-0.006778717041015625,
0.041168212890625,
-0.04608154296875,
0.00927734375,
0.01403045654296875,
0.00881195068359375,
-0.07275390625,
0.0008711814880371094,
-0.03509521484375,
0.016448974609375,
0.0246124267578125,
-0.011627197265625,
-0.04449462890625,
-0.018646240234375,
-0.005218505859375,
0.006313323974609375,
0.0233917236328125,
-0.01087188720703125,
-0.005214691162109375,
-0.0426025390625,
-0.044830322265625,
-0.02996826171875,
-0.039794921875,
-0.01898193359375,
-0.0328369140625,
-0.0232391357421875,
-0.0214080810546875,
0.0177459716796875,
0.045684814453125,
-0.022003173828125,
0.00806427001953125,
0.00007712841033935547,
-0.032928466796875,
0.0504150390625,
-0.0546875,
0.006183624267578125,
0.01039886474609375,
0.0170135498046875,
-0.004688262939453125,
0.0229034423828125,
0.01194000244140625,
-0.01447296142578125,
0.01483917236328125,
0.0169677734375,
0.01552581787109375,
-0.04437255859375,
-0.007602691650390625,
-0.036651611328125,
0.00507354736328125,
-0.0087738037109375,
0.0194854736328125,
0.023223876953125,
0.025421142578125,
0.0035247802734375,
-0.00859832763671875,
0.0012493133544921875,
-0.00952911376953125,
-0.034637451171875,
-0.0272064208984375,
-0.0423583984375,
-0.011474609375,
-0.01534271240234375,
0.035797119140625,
0.08575439453125,
0.0288543701171875,
-0.018157958984375,
-0.01161956787109375,
-0.00920867919921875,
-0.010467529296875,
-0.00861358642578125,
0.0196685791015625,
-0.04058837890625,
-0.050262451171875,
0.0247039794921875,
-0.00521087646484375,
-0.008026123046875,
0.003612518310546875,
0.0187835693359375,
0.00440216064453125,
-0.0094451904296875,
-0.01558685302734375,
-0.0309906005859375,
-0.0013532638549804688,
-0.007656097412109375,
0.0250701904296875,
-0.0031185150146484375,
0.01317596435546875,
0.025299072265625,
-0.0325927734375,
0.002979278564453125,
-0.00933837890625,
0.0079498291015625,
-0.004024505615234375,
0.015228271484375,
-0.0006899833679199219,
-0.0210113525390625,
0.003993988037109375,
-0.01708984375,
0.00446319580078125,
0.00887298583984375,
0.026824951171875,
0.0157928466796875,
0.040771484375,
0.019989013671875,
-0.006275177001953125,
-0.01061248779296875,
-0.053436279296875,
-0.0080108642578125,
0.0299530029296875,
0.00812530517578125,
-0.00827789306640625,
-0.006496429443359375,
-0.0211181640625,
0.04254150390625,
-0.0030193328857421875,
-0.063232421875,
0.06549072265625,
0.01161956787109375,
0.0626220703125,
0.0214691162109375,
0.003276824951171875,
0.0265350341796875,
0.00957489013671875,
-0.023773193359375,
-0.0021686553955078125,
-0.01251220703125,
0.0011320114135742188,
-0.002658843994140625,
0.007415771484375,
-0.015960693359375,
0.015411376953125,
0.0274658203125,
0.0020275115966796875,
0.01425933837890625,
0.0096435546875,
-0.05303955078125,
0.009368896484375,
-0.0208740234375,
0.024871826171875,
-0.002414703369140625,
-0.00769805908203125,
0.0199127197265625,
-0.043212890625,
0.020355224609375,
-0.0369873046875,
-0.0212860107421875,
0.039276123046875,
-0.025634765625,
0.043121337890625,
-0.013671875,
0.043182373046875,
-0.00923919677734375,
-0.0200958251953125,
-0.005985260009765625,
0.005168914794921875,
0.062255859375,
0.008758544921875,
-0.0259552001953125,
-0.0045013427734375,
0.002338409423828125,
0.03387451171875,
-0.08990478515625,
0.0312042236328125,
-0.03912353515625,
-0.0054931640625,
-0.020355224609375,
-0.0115966796875,
-0.0207672119140625,
-0.0660400390625,
0.01389312744140625,
0.060272216796875,
0.033843994140625,
0.023590087890625,
0.021453857421875,
0.061676025390625,
0.0177764892578125,
-0.03240966796875,
0.01471710205078125,
-0.004695892333984375,
0.0222930908203125,
0.0391845703125,
-0.0028095245361328125,
0.01177978515625,
0.027923583984375,
-0.039642333984375,
0.0188140869140625,
0.035491943359375,
-0.029998779296875,
-0.038055419921875,
0.00356292724609375,
-0.0306549072265625,
0.0272064208984375,
-0.0263671875,
-0.048614501953125,
0.0034122467041015625,
0.053924560546875,
-0.0276336669921875,
0.040863037109375,
0.0174713134765625,
-0.01070404052734375,
-0.0239410400390625,
0.017242431640625,
0.019439697265625,
-0.0074310302734375,
0.0220184326171875,
0.0015048980712890625,
0.00804901123046875,
-0.031463623046875,
0.01221466064453125,
0.002105712890625,
0.0008339881896972656,
-0.0010023117065429688,
0.037567138671875,
-0.01453399658203125,
0.002758026123046875,
0.00830841064453125,
-0.00817108154296875,
-0.003505706787109375,
0.0008416175842285156,
0.06634521484375,
0.01154327392578125,
0.0256195068359375,
0.01580810546875,
-0.0377197265625,
0.07183837890625,
0.01165771484375,
-0.0384521484375,
0.06854248046875,
-0.0279693603515625,
0.025634765625,
-0.0153350830078125,
0.061004638671875,
0.04425048828125,
-0.021728515625,
0.0232391357421875,
0.0013132095336914062,
-0.034088134765625,
-0.015625,
0.0230712890625,
0.004619598388671875,
-0.0609130859375,
-0.004730224609375,
0.0184478759765625,
0.0167388916015625,
0.00909423828125,
-0.0026493072509765625,
-0.042999267578125,
-0.00444793701171875,
-0.005207061767578125,
-0.11334228515625,
-0.0885009765625,
0.01221466064453125,
-0.0849609375,
-0.0135650634765625,
-0.027984619140625,
-0.06622314453125,
-0.0017690658569335938,
0.0019464492797851562,
0.002166748046875,
-0.0168304443359375,
-0.016357421875,
-0.043975830078125,
-0.049560546875,
-0.059814453125,
-0.0214996337890625,
-0.00496673583984375,
-0.0007767677307128906,
-0.00933837890625,
0.051666259765625,
0.01393890380859375,
-0.021392822265625,
0.0173797607421875,
0.0479736328125,
-0.0120391845703125,
-0.0202484130859375,
0.01222991943359375,
-0.03570556640625,
0.0240020751953125,
-0.0036163330078125,
-0.0180511474609375,
0.0247955322265625,
-0.013214111328125,
-0.026763916015625,
0.0022373199462890625,
0.0228271484375,
0.04193115234375,
0.047943115234375,
0.0036106109619140625,
0.0037746429443359375,
0.0491943359375,
-0.03204345703125,
0.003948211669921875,
-0.016326904296875,
-0.034454345703125,
-0.0231475830078125,
0.0210723876953125,
-0.0041656494140625,
-0.032623291015625,
0.0003857612609863281,
0.0205230712890625,
0.0251617431640625,
0.03094482421875,
0.024017333984375,
-0.00579071044921875,
-0.0202789306640625,
-0.006053924560546875,
-0.0206451416015625,
-0.00890350341796875,
-0.001270294189453125,
0.0287933349609375,
-0.007755279541015625,
0.0509033203125,
0.0050201416015625,
0.004238128662109375,
-0.05975341796875,
0.0005545616149902344,
0.0284576416015625,
0.014862060546875,
0.049346923828125,
-0.024627685546875,
-0.03619384765625,
-0.035919189453125,
0.051971435546875,
-0.04815673828125,
-0.01629638671875,
-0.0010166168212890625,
0.00878143310546875,
-0.02923583984375,
-0.0298614501953125,
-0.0194549560546875,
-0.002521514892578125,
-0.08135986328125,
0.017852783203125,
0.004650115966796875,
-0.014923095703125,
-0.00638580322265625,
0.0455322265625,
-0.045196533203125,
-0.034637451171875,
0.0205078125,
-0.01410675048828125,
-0.0020084381103515625,
0.06463623046875,
-0.040069580078125,
0.056304931640625,
-0.0245361328125,
-0.028228759765625,
-0.08697509765625,
-0.0178985595703125,
-0.0007319450378417969,
0.061492919921875,
-0.00467681884765625,
-0.02056884765625,
-0.0318603515625,
0.030426025390625,
0.0066680908203125,
0.0223846435546875,
0.01291656494140625,
0.0226593017578125,
0.0217742919921875,
-0.05072021484375,
-0.00896453857421875,
-0.044525146484375,
-0.030731201171875,
0.01690673828125,
-0.003688812255859375,
0.01493072509765625,
-0.0233001708984375,
-0.07232666015625,
0.02117919921875,
-0.035888671875,
-0.07171630859375,
-0.029022216796875,
0.01047515869140625,
0.0006098747253417969,
-0.0241851806640625,
0.01824951171875,
-0.026580810546875,
-0.055389404296875,
0.07147216796875,
0.01947021484375,
-0.01079559326171875,
-0.016204833984375,
0.074462890625,
0.0164642333984375,
-0.04425048828125,
-0.03680419921875,
0.0276641845703125,
0.043060302734375,
-0.0237884521484375,
0.032562255859375,
0.00970458984375,
-0.0160675048828125,
0.0335693359375,
-0.004360198974609375,
0.036712646484375,
-0.04327392578125,
0.05224609375,
-0.031280517578125,
-0.0219879150390625,
0.038604736328125,
-0.035614013671875,
0.0241546630859375,
0.0084228515625,
0.001743316650390625,
-0.047027587890625,
0.009796142578125,
0.046661376953125,
-0.0222930908203125,
0.060302734375,
-0.0212554931640625,
-0.00225067138671875,
-0.00875091552734375,
-0.00244140625,
0.019744873046875,
0.02850341796875,
0.00971221923828125,
0.003231048583984375,
-0.016021728515625,
0.012237548828125,
-0.0208892822265625,
0.0251312255859375,
-0.031494140625,
0.003589630126953125,
0.0250701904296875,
-0.020416259765625,
-0.020355224609375,
-0.010955810546875,
0.06280517578125,
0.004306793212890625,
-0.0292205810546875,
-0.005634307861328125,
-0.0225067138671875,
0.06072998046875,
-0.0013904571533203125,
0.006038665771484375,
0.03192138671875,
0.021209716796875,
-0.006221771240234375,
0.0037403106689453125,
0.0014200210571289062,
0.00664520263671875,
-0.032684326171875,
-0.014892578125,
-0.01039886474609375,
-0.00693511962890625,
-0.00522613525390625,
0.07281494140625,
0.00574493408203125,
0.0298004150390625,
-0.028411865234375,
0.00513458251953125,
-0.003864288330078125,
0.030181884765625,
0.0195770263671875,
-0.0167388916015625,
0.00698089599609375,
0.008758544921875,
0.0086822509765625,
-0.0152740478515625,
-0.0007658004760742188,
0.022186279296875,
0.0271148681640625,
0.0140533447265625,
0.006622314453125,
-0.0047607421875,
-0.009063720703125,
-0.030853271484375,
0.029205322265625,
0.0206756591796875,
-0.046173095703125,
0.00363922119140625,
0.03131103515625,
0.011627197265625,
0.0019092559814453125,
0.0128936767578125,
0.0292816162109375,
0.036773681640625,
0.044647216796875,
-0.0171356201171875,
0.016082763671875,
-0.0011510848999023438,
-0.0008983612060546875,
-0.006587982177734375,
0.0055999755859375,
0.0113677978515625,
-0.0277862548828125,
-0.03961181640625,
-0.0104827880859375,
-0.0201263427734375,
0.043701171875,
-0.00897216796875,
0.043701171875,
-0.0310211181640625,
-0.023162841796875,
-0.0087432861328125,
-0.01445770263671875,
0.08544921875,
0.04510498046875,
-0.0418701171875,
0.00254058837890625,
-0.0202178955078125,
0.00460052490234375,
0.0175933837890625,
-0.0257110595703125,
-0.0208740234375,
-0.0024738311767578125,
0.009521484375,
0.039306640625,
-0.004795074462890625,
0.00783538818359375,
0.02850341796875,
0.027496337890625,
-0.0301055908203125,
0.07427978515625,
-0.01049041748046875,
0.06103515625,
-0.0153350830078125,
-0.0010890960693359375,
0.00833892822265625,
0.0256805419921875,
-0.00357818603515625,
0.00835418701171875,
0.02056884765625,
-0.046112060546875,
-0.004058837890625,
-0.034515380859375,
0.015625,
0.00444793701171875,
0.0149993896484375,
-0.00598907470703125,
-0.006893157958984375,
0.01384735107421875,
-0.0005497932434082031,
-0.0160675048828125,
-0.0308074951171875,
0.04534912109375,
-0.041595458984375,
0.043182373046875,
-0.041351318359375,
-0.0230255126953125,
-0.006366729736328125,
-0.00968170166015625,
0.043792724609375,
-0.0172882080078125,
0.01959228515625,
0.02020263671875,
-0.07275390625,
0.07928466796875,
0.1353759765625,
0.051666259765625,
0.0712890625,
-0.007808685302734375,
0.0128326416015625,
0.0192718505859375,
0.0557861328125,
-0.034149169921875,
-0.01462554931640625,
0.027191162109375,
0.01090240478515625,
-0.0214691162109375,
0.00763702392578125,
-0.0199737548828125,
0.012939453125,
-0.01090240478515625,
0.04754638671875,
0.00511932373046875,
0.00592041015625,
0.0306854248046875,
-0.0166473388671875,
0.035797119140625,
-0.01369476318359375,
-0.01039886474609375,
0.00769805908203125,
0.0272216796875,
0.0157470703125,
-0.0218658447265625,
0.039642333984375,
0.037689208984375,
0.0016870498657226562,
-0.054473876953125,
0.02496337890625,
0.0016355514526367188,
0.0007624626159667969,
0.0188140869140625,
0.018707275390625,
-0.013946533203125,
-0.03765869140625,
-0.0114288330078125,
-0.0040740966796875,
-0.03277587890625,
-0.072998046875,
-0.0017461776733398438,
-0.0201568603515625,
0.00803375244140625,
0.039642333984375,
0.003299713134765625,
0.005565643310546875,
0.032257080078125,
-0.0016450881958007812,
0.01557159423828125,
-0.0223846435546875,
0.02166748046875,
-0.0703125,
-0.0160980224609375,
0.032257080078125,
0.0204315185546875,
0.0014190673828125,
0.038665771484375,
-0.01416778564453125,
-0.0537109375,
-0.00107574462890625,
-0.0057830810546875,
0.0509033203125,
-0.006374359130859375,
-0.04229736328125,
0.0003070831298828125,
-0.00981903076171875,
0.0211944580078125,
0.010986328125,
0.037811279296875,
-0.036865234375,
-0.0142059326171875,
0.031036376953125,
-0.01120758056640625,
-0.0347900390625,
0.01021575927734375,
-0.07269287109375,
0.0880126953125,
0.0006012916564941406,
0.0249786376953125,
0.00868988037109375,
0.0199737548828125,
-0.03240966796875,
-0.00665283203125,
-0.0667724609375,
0.06561279296875,
0.01580810546875,
0.050018310546875,
-0.0819091796875,
-0.0034275054931640625,
0.0038814544677734375,
0.037384033203125,
0.059478759765625,
0.0203399658203125,
-0.026397705078125,
-0.003383636474609375,
0.0220489501953125,
0.0241241455078125,
-0.01727294921875,
0.0110931396484375,
-0.0014705657958984375,
0.00536346435546875,
0.00984954833984375,
-0.0184173583984375,
0.03131103515625,
-0.0300750732421875,
-0.033660888671875,
0.0221710205078125,
0.003955841064453125,
-0.023895263671875,
-0.00759124755859375,
-0.002223968505859375,
-0.0408935546875,
0.00786590576171875,
0.00351715087890625,
0.0162811279296875,
-0.000537872314453125,
0.0296783447265625,
0.00661468505859375,
0.01198577880859375,
-0.03155517578125,
-0.0109100341796875,
0.036407470703125,
0.0011882781982421875,
-0.0186920166015625,
0.003543853759765625,
0.00876617431640625,
0.0072021484375,
0.00203704833984375,
-0.0236663818359375,
0.021820068359375,
0.033935546875,
0.093017578125,
0.05059814453125,
0.017364501953125,
-0.0287628173828125,
0.04583740234375,
0.04437255859375,
0.08428955078125,
-0.07147216796875,
-0.03125,
-0.01568603515625,
-0.0149688720703125,
0.0026454925537109375,
-0.016265869140625,
0.01410675048828125,
0.031219482421875,
0.0361328125,
-0.065673828125,
0.0128326416015625,
0.03826904296875,
0.038665771484375,
0.0032196044921875,
0.0182647705078125,
-0.08721923828125,
-0.0235137939453125,
-0.06060791015625,
0.0033435821533203125,
0.0241241455078125,
0.0733642578125,
0.036163330078125,
0.046417236328125,
-0.01140594482421875,
-0.0274658203125,
-0.0258636474609375,
0.04632568359375,
0.0268707275390625,
0.0226593017578125,
-0.06256103515625,
-0.04840087890625,
0.04547119140625,
0.04351806640625,
0.029754638671875,
0.0289306640625,
0.04071044921875,
0.003063201904296875,
-0.037445068359375,
0.0014467239379882812,
0.038726806640625,
-0.027862548828125,
0.0023956298828125,
0.0025577545166015625,
-0.0063934326171875,
-0.007289886474609375,
-0.0185394287109375,
-0.0172119140625,
0.055419921875,
-0.0167388916015625,
-0.02197265625,
0.00852203369140625,
0.0099945068359375,
-0.037200927734375,
0.04241943359375,
0.021697998046875,
0.0631103515625,
0.020904541015625,
-0.0280609130859375,
0.01534271240234375,
-0.03948974609375,
-0.07733154296875,
0.0287628173828125,
0.033905029296875,
-0.029510498046875,
0.036956787109375,
-0.029632568359375,
0.0092010498046875,
0.06298828125,
-0.0185546875,
-0.044189453125,
0.068115234375,
0.05059814453125,
0.0017948150634765625,
-0.0223541259765625,
-0.0263671875,
0.0013475418090820312,
0.052978515625,
0.04443359375,
-0.01558685302734375,
0.01178741455078125,
0.047332763671875,
-0.0186309814453125,
0.030670166015625,
-0.04248046875,
-0.013214111328125,
0.007282257080078125,
0.0002129077911376953,
0.0109405517578125,
-0.0028858184814453125,
-0.0357666015625,
0.0057220458984375,
0.045989990234375,
-0.0266571044921875,
0.004817962646484375,
-0.0032901763916015625,
0.01910400390625,
-0.040130615234375,
0.01554107666015625,
-0.011199951171875,
-0.0232086181640625,
-0.083740234375,
-0.046600341796875,
0.07598876953125,
0.0589599609375,
0.0034580230712890625,
-0.0065460205078125,
-0.0203094482421875,
-0.0309295654296875,
0.01898193359375,
0.018707275390625,
0.00426483154296875,
0.033233642578125,
-0.0282440185546875,
-0.006381988525390625,
0.03302001953125,
-0.0248870849609375,
0.038238525390625,
0.01824951171875,
0.02911376953125,
0.01522064208984375,
-0.053680419921875,
-0.0008358955383300781,
0.0293426513671875,
0.045562744140625,
-0.019561767578125,
0.01219940185546875,
0.048919677734375,
-0.0120849609375,
-0.0364990234375,
-0.03741455078125,
-0.0283660888671875,
-0.057769775390625,
-0.005489349365234375,
0.019866943359375,
-0.025665283203125,
-0.0198822021484375,
-0.003498077392578125,
0.0016660690307617188,
0.03192138671875,
-0.01910400390625,
-0.0121307373046875,
-0.0215301513671875,
-0.0174102783203125,
0.038177490234375,
0.00927734375,
0.005626678466796875,
-0.01194000244140625,
0.0179443359375,
-0.02911376953125,
-0.0057373046875,
-0.0267333984375,
0.0282440185546875,
-0.01560211181640625,
0.02520751953125,
0.0238037109375,
-0.01352691650390625,
0.01303863525390625,
0.03759765625,
0.00897979736328125,
0.07318115234375,
0.01165771484375,
-0.02508544921875,
0.006130218505859375,
0.018096923828125,
0.01067352294921875,
-0.053985595703125,
-0.000736236572265625,
-0.05035400390625,
-0.0018053054809570312,
-0.03350830078125,
0.020843505859375,
0.0361328125,
-0.034942626953125,
-0.06787109375,
0.03314208984375,
-0.01641845703125,
-0.03668212890625,
-0.082275390625,
-0.0076141357421875,
0.0263519287109375,
0.0268402099609375,
-0.03216552734375,
-0.03277587890625,
-0.061279296875,
0.0341796875,
0.02301025390625,
-0.0160369873046875,
0.06634521484375,
0.012603759765625,
-0.0187835693359375,
0.0081787109375,
0.0018720626831054688,
-0.0303497314453125,
-0.01369476318359375,
-0.007114410400390625,
0.017822265625,
0.019439697265625,
-0.05145263671875,
0.00665283203125,
0.008026123046875,
0.040924072265625,
-0.01451873779296875,
-0.08612060546875,
-0.0195770263671875,
-0.0014600753784179688,
0.034454345703125,
0.039794921875,
0.0008349418640136719,
-0.060943603515625,
0.02105712890625,
0.01523590087890625,
-0.1058349609375,
0.0251922607421875,
0.052520751953125,
-0.049560546875,
0.00152587890625,
0.011962890625,
-0.0114593505859375,
-0.01093292236328125,
-0.0010824203491210938,
-0.0254669189453125,
0.004241943359375,
0.0306243896484375,
0.0019702911376953125,
-0.003345489501953125,
-0.0296783447265625,
0.09234619140625,
-0.053009033203125,
-0.022003173828125,
0.02801513671875,
0.00653076171875,
0.0284576416015625,
0.01165008544921875,
-0.00839996337890625,
0.01517486572265625,
0.0011005401611328125,
0.0243072509765625,
0.01242828369140625,
0.03302001953125,
-0.01534271240234375,
0.0004143714904785156,
-0.02935791015625,
0.0190887451171875,
0.0013914108276367188,
0.0272674560546875,
-0.00958251953125,
0.0261993408203125,
0.0162353515625,
0.0450439453125,
-0.030426025390625,
0.034698486328125,
-0.006561279296875,
-0.00026798248291015625,
-0.0222320556640625,
0.02655029296875,
0.0227813720703125,
-0.00859832763671875,
-0.01194000244140625,
-0.0208282470703125,
0.00466156005859375,
-0.053466796875,
0.0268402099609375,
-0.0015707015991210938,
0.009552001953125,
0.032135009765625
] |
137e746ad05c07dd93eee30c0a08469718a5fc5e | Wordpress Stackexchange
Q: Multiple custom fields for 'orderby' in 'WP_Query' I am trying to order blog posts by 'city' first and then order by 'street_name' within each city. I can't seem to get the 'street_name' to display in alphabetical order. I am using WP_Query:
<?php
$args = array(
'post_type'=> 'property',
'meta_query' => array(
array(
'relation' => 'AND' ,
array(
'meta_key' => 'city',
'orderby' => 'meta_value',
'order' => 'ASC'
),
array(
'meta_key' => 'street_name',
'orderby' => 'meta_value',
'order' => 'ASC'
),
)
),
Any ideas?
A: meta_query and orderby are seperate parameters, you just put them together in an array. You will have to do one then the other.
e.g.
<?php
$args = array(
'post_type' => 'property',
'meta_query' => array(
array(
'relation' => 'AND',
'city_clause' => array(
'key' => 'city',
'compare' => 'EXISTS',
),
'street_clause' => array(
'key' => 'street_name',
'compare' => 'EXISTS',
),
)
)
'orderby' => array(
'city_clause' => 'desc',
'street_clause' => 'desc',
)
)
?>
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
| Q: Multiple custom fields for 'orderby' in 'WP_Query' I am trying to order blog posts by 'city' first and then order by 'street_name' within each city. I can't seem to get the 'street_name' to display in alphabetical order. I am using WP_Query:
<?php
$args = array(
'post_type'=> 'property',
'meta_query' => array(
array(
'relation' => 'AND' ,
array(
'meta_key' => 'city',
'orderby' => 'meta_value',
'order' => 'ASC'
),
array(
'meta_key' => 'street_name',
'orderby' => 'meta_value',
'order' => 'ASC'
),
)
),
Any ideas?
A: meta_query and orderby are seperate parameters, you just put them together in an array. You will have to do one then the other.
e.g.
<?php
$args = array(
'post_type' => 'property',
'meta_query' => array(
array(
'relation' => 'AND',
'city_clause' => array(
'key' => 'city',
'compare' => 'EXISTS',
),
'street_clause' => array(
'key' => 'street_name',
'compare' => 'EXISTS',
),
)
)
'orderby' => array(
'city_clause' => 'desc',
'street_clause' => 'desc',
)
)
?>
https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
A: Took me awhile to figure out how to order by numeric values with multiple meta keys since you can't just use orderby meta_value_num. Instead you set the type to numeric in the meta query. This is working production code.
$meta_query = array(
'relation' => 'AND',
'query_one' => array(
'key' => '_rama_ads_type'
),
'query_two' => array(
'key' => '_rama_ads_order',
'type' => 'NUMERIC',
),
);
$order_by = array(
'query_one' => 'ASC',
'query_two' => 'DESC',
);
$query->set( 'meta_query', $meta_query );
$query->set( 'orderby', $order_by );
A: You need to order by specific clauses for meta_query.
This link should cover everything to help you sort out the syntax and get it working.
https://make.wordpress.org/core/2015/03/30/query-improvements-in-wp-4-2-orderby-and-meta_query/
A: Try this, it might help.
<?php
$args = array(
'post_type' => 'Sports',
'meta_query' => array(
array(
'key' => 'league_count',
'orderby' => 'meta_value_num', /* use this only
if the key stores number otherwise use 'meta_value' */
'order' => 'ASC'
),
array(
'key' => 'matches_count',
'orderby' => 'meta_value_num',
'order' => 'ASC'
),
),
);
$query = new WP_Query( $args );
?>
| wordpress | {
"language": "en",
"length": 325,
"provenance": "stackexchange_00019.jsonl.gz:471297",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/249881"
} | [
0.039794921875,
-0.00746917724609375,
0.03131103515625,
-0.036865234375,
-0.00872039794921875,
0.007045745849609375,
0.0113983154296875,
-0.018035888671875,
0.025360107421875,
0.006519317626953125,
-0.04815673828125,
-0.0322265625,
-0.0116119384765625,
-0.0237884521484375,
-0.0169830322265625,
-0.05841064453125,
0.06451416015625,
-0.049346923828125,
-0.0012617111206054688,
-0.00701141357421875,
0.0023651123046875,
0.03857421875,
0.0012054443359375,
0.043304443359375,
0.044677734375,
-0.041351318359375,
0.08892822265625,
-0.049102783203125,
0.04705810546875,
-0.01548004150390625,
0.03546142578125,
-0.03790283203125,
0.009429931640625,
-0.00916290283203125,
0.03472900390625,
-0.01479339599609375,
0.042938232421875,
-0.019775390625,
0.01137542724609375,
0.022705078125,
0.03326416015625,
-0.020294189453125,
-0.04046630859375,
0.05084228515625,
-0.038543701171875,
-0.07305908203125,
0.05877685546875,
-0.001941680908203125,
0.0232086181640625,
-0.0044097900390625,
-0.01235198974609375,
0.026275634765625,
0.005641937255859375,
-0.037506103515625,
-0.00817108154296875,
0.0110321044921875,
-0.0037136077880859375,
0.0162506103515625,
0.005161285400390625,
0.01345062255859375,
0.01442718505859375,
0.045196533203125,
-0.0036487579345703125,
0.0011119842529296875,
-0.0271148681640625,
0.0338134765625,
0.03021240234375,
-0.011474609375,
-0.041259765625,
-0.04248046875,
0.01085662841796875,
-0.0177001953125,
-0.006969451904296875,
-0.0274505615234375,
0.01549530029296875,
-0.0009675025939941406,
-0.022064208984375,
-0.03472900390625,
0.024078369140625,
0.0312347412109375,
0.0177001953125,
0.0012226104736328125,
-0.023895263671875,
0.022216796875,
-0.018218994140625,
0.033966064453125,
-0.021453857421875,
-0.0249786376953125,
-0.038787841796875,
-0.053192138671875,
-0.02227783203125,
-0.0390625,
-0.04248046875,
0.0020160675048828125,
-0.0205841064453125,
-0.01458740234375,
0.01250457763671875,
0.04876708984375,
-0.03082275390625,
-0.005817413330078125,
-0.025146484375,
-0.01061248779296875,
0.0038471221923828125,
-0.025634765625,
-0.00614166259765625,
-0.020355224609375,
0.00556182861328125,
0.01136016845703125,
0.017608642578125,
0.02496337890625,
-0.0229644775390625,
0.0097198486328125,
0.0021762847900390625,
-0.037078857421875,
-0.0213470458984375,
0.0006074905395507812,
-0.017791748046875,
-0.00879669189453125,
0.018096923828125,
-0.036376953125,
0.0061798095703125,
0.037322998046875,
-0.006622314453125,
-0.0298309326171875,
0.023895263671875,
0.0125579833984375,
-0.006221771240234375,
-0.03521728515625,
-0.0259552001953125,
0.037139892578125,
-0.0400390625,
0.01236724853515625,
0.0419921875,
0.0284271240234375,
-0.00905609130859375,
-0.0226898193359375,
0.0224609375,
-0.0027141571044921875,
0.00494384765625,
0.0166473388671875,
-0.00507354736328125,
-0.044952392578125,
-0.0033740997314453125,
0.0077667236328125,
0.0022296905517578125,
0.001766204833984375,
0.001323699951171875,
0.0163421630859375,
0.0201568603515625,
-0.034576416015625,
0.0021533966064453125,
-0.049530029296875,
0.0296783447265625,
0.0095672607421875,
-0.04681396484375,
0.00539398193359375,
0.01497650146484375,
-0.03326416015625,
-0.04071044921875,
-0.04376220703125,
0.00994873046875,
0.004314422607421875,
-0.007450103759765625,
-0.04974365234375,
-0.041778564453125,
-0.0205078125,
-0.0316162109375,
-0.004802703857421875,
0.00571441650390625,
0.004619598388671875,
0.0007634162902832031,
0.0189666748046875,
0.0178680419921875,
0.0011739730834960938,
-0.004238128662109375,
-0.0027008056640625,
0.00569915771484375,
-0.042449951171875,
0.0182952880859375,
-0.01129150390625,
-0.046356201171875,
-0.040374755859375,
-0.008697509765625,
0.003856658935546875,
-0.10736083984375,
0.08447265625,
-0.01102447509765625,
0.0736083984375,
0.0300140380859375,
-0.00804901123046875,
0.06744384765625,
0.032501220703125,
-0.0699462890625,
0.06695556640625,
0.017547607421875,
-0.033203125,
-0.0290069580078125,
0.0048828125,
0.001434326171875,
-0.05316162109375,
0.005035400390625,
-0.02349853515625,
0.0166778564453125,
0.004119873046875,
0.02166748046875,
-0.023223876953125,
0.0164947509765625,
-0.003772735595703125,
-0.0255279541015625,
0.01276397705078125,
0.0237884521484375,
-0.0154571533203125,
-0.01352691650390625,
-0.00823211669921875,
-0.022857666015625,
-0.023681640625,
0.0008339881896972656,
0.00437164306640625,
-0.03521728515625,
-0.0006928443908691406,
-0.0592041015625,
-0.03399658203125,
-0.05169677734375,
0.05596923828125,
0.03973388671875,
-0.0469970703125,
-0.01435089111328125,
-0.04412841796875,
-0.01462554931640625,
-0.00125885009765625,
-0.055389404296875,
0.052978515625,
0.005908966064453125,
0.066650390625,
-0.01416015625,
-0.01070404052734375,
0.00920867919921875,
-0.0087432861328125,
0.03045654296875,
0.01499176025390625,
0.028106689453125,
-0.00879669189453125,
0.006061553955078125,
0.03411865234375,
-0.030517578125,
-0.024505615234375,
0.024688720703125,
-0.01213836669921875,
0.004566192626953125,
0.061676025390625,
0.003265380859375,
0.0267791748046875,
0.0000820159912109375,
-0.01806640625,
0.006244659423828125,
0.01470184326171875,
-0.0307159423828125,
0.0025501251220703125,
0.0211334228515625,
-0.0039215087890625,
-0.0048828125,
-0.038360595703125,
0.00577545166015625,
-0.021575927734375,
0.0234375,
-0.01308441162109375,
0.0251922607421875,
0.01708984375,
-0.0299530029296875,
-0.001689910888671875,
0.0211181640625,
0.00911712646484375,
0.0023403167724609375,
-0.01248931884765625,
-0.054168701171875,
-0.0004546642303466797,
-0.0140228271484375,
0.024383544921875,
-0.0133819580078125,
-0.036346435546875,
0.006103515625,
0.0187530517578125,
0.00801849365234375,
0.003131866455078125,
0.0004634857177734375,
-0.03997802734375,
0.0260772705078125,
0.0545654296875,
-0.0523681640625,
-0.0426025390625,
0.0070037841796875,
0.021759033203125,
-0.03790283203125,
0.0106658935546875,
0.002277374267578125,
-0.02777099609375,
-0.01505279541015625,
-0.00821685791015625,
0.005462646484375,
-0.02166748046875,
0.006183624267578125,
0.053497314453125,
0.007068634033203125,
-0.011444091796875,
-0.01139068603515625,
0.018951416015625,
-0.007137298583984375,
-0.01123809814453125,
-0.0258331298828125,
-0.019317626953125,
-0.039306640625,
-0.00142669677734375,
0.055755615234375,
0.01030731201171875,
0.06610107421875,
0.0242919921875,
0.03680419921875,
0.060638427734375,
-0.0295257568359375,
-0.10711669921875,
0.002780914306640625,
0.0258026123046875,
0.01445770263671875,
0.0001170039176940918,
0.026092529296875,
-0.02197265625,
-0.022491455078125,
-0.01030731201171875,
0.0325927734375,
-0.00914764404296875,
-0.07305908203125,
-0.03155517578125,
-0.058837890625,
0.011932373046875,
-0.00609588623046875,
-0.0023097991943359375,
0.0272369384765625,
0.036346435546875,
0.0266265869140625,
-0.024932861328125,
0.06329345703125,
0.017791748046875,
-0.0254669189453125,
0.038482666015625,
0.01511383056640625,
-0.02490234375,
-0.01129913330078125,
-0.002422332763671875,
0.040374755859375,
0.040008544921875,
-0.024627685546875,
0.02410888671875,
-0.0226898193359375,
0.01132965087890625,
0.0243988037109375,
0.0005550384521484375,
0.006809234619140625,
0.0180816650390625,
0.0260162353515625,
-0.031280517578125,
-0.01140594482421875,
-0.007671356201171875,
-0.0235137939453125,
-0.00392913818359375,
0.02056884765625,
0.00809478759765625,
-0.0136871337890625,
0.007450103759765625,
0.01271820068359375,
-0.001220703125,
-0.0135955810546875,
-0.01470184326171875,
0.027130126953125,
-0.0099029541015625,
0.0293121337890625,
-0.0129241943359375,
0.048919677734375,
-0.0124969482421875,
-0.017852783203125,
0.01088714599609375,
0.005901336669921875,
-0.00933074951171875,
-0.004360198974609375,
-0.04364013671875,
-0.040283203125,
0.0560302734375,
-0.01617431640625,
0.01511383056640625,
-0.04754638671875,
-0.028350830078125,
-0.035552978515625,
0.07342529296875,
-0.0340576171875,
-0.02410888671875,
0.0054473876953125,
0.01250457763671875,
-0.035369873046875,
0.0254058837890625,
-0.035797119140625,
-0.01099395751953125,
-0.050537109375,
0.0210418701171875,
-0.0081024169921875,
-0.0245513916015625,
-0.040618896484375,
-0.03582763671875,
-0.055755615234375,
-0.032623291015625,
0.0239410400390625,
-0.048797607421875,
-0.005794525146484375,
0.037261962890625,
-0.0296630859375,
-0.002109527587890625,
-0.0162200927734375,
-0.006412506103515625,
-0.066162109375,
-0.00876617431640625,
0.008453369140625,
0.0284576416015625,
-0.0106964111328125,
-0.01473236083984375,
-0.043670654296875,
0.03948974609375,
-0.00638580322265625,
-0.01560211181640625,
0.0367431640625,
0.023284912109375,
-0.00472259521484375,
0.0230712890625,
0.00748443603515625,
-0.03271484375,
-0.0006794929504394531,
-0.0115509033203125,
-0.00708770751953125,
0.0156402587890625,
-0.048004150390625,
-0.0232086181640625,
-0.03216552734375,
-0.02337646484375,
0.020050048828125,
0.0015401840209960938,
-0.032012939453125,
0.00943756103515625,
-0.035186767578125,
-0.0072021484375,
0.01021575927734375,
-0.00786590576171875,
-0.014251708984375,
-0.02490234375,
-0.0225677490234375,
0.03466796875,
0.037841796875,
0.0178985595703125,
-0.00341033935546875,
-0.058929443359375,
-0.0200347900390625,
0.002979278564453125,
0.042633056640625,
0.05108642578125,
0.017425537109375,
0.025604248046875,
-0.0126495361328125,
0.006103515625,
-0.0129547119140625,
0.0194091796875,
0.0023670196533203125,
0.00946807861328125,
-0.0295562744140625,
0.0085906982421875,
-0.00897216796875,
0.0196380615234375,
0.0222625732421875,
0.00751495361328125,
-0.05328369140625,
0.0012683868408203125,
0.049072265625,
-0.0193328857421875,
0.05181884765625,
-0.007354736328125,
-0.0176849365234375,
0.007801055908203125,
-0.002044677734375,
0.01142120361328125,
-0.015716552734375,
0.011199951171875,
-0.02288818359375,
-0.00998687744140625,
0.01435089111328125,
0.04376220703125,
0.04315185546875,
-0.0182037353515625,
0.03851318359375,
0.0191497802734375,
-0.0178985595703125,
0.019073486328125,
-0.00685882568359375,
0.1075439453125,
-0.0183868408203125,
-0.034210205078125,
-0.081298828125,
-0.0200042724609375,
0.05938720703125,
-0.0006880760192871094,
-0.00229644775390625,
0.01303863525390625,
0.03997802734375,
0.014984130859375,
0.0136871337890625,
-0.01409912109375,
0.053192138671875,
-0.01018524169921875,
0.062469482421875,
0.0231170654296875,
0.001621246337890625,
-0.0235748291015625,
0.076416015625,
-0.00659942626953125,
0.0267486572265625,
-0.024444580078125,
-0.021087646484375,
-0.003162384033203125,
0.02154541015625,
0.0221710205078125,
-0.01477813720703125,
0.0123443603515625,
0.00653839111328125,
0.0304718017578125,
0.0288238525390625,
0.003459930419921875,
-0.0160369873046875,
-0.051849365234375,
-0.0112152099609375,
0.021728515625,
0.038238525390625,
0.0254058837890625,
-0.01181793212890625,
0.0190582275390625,
0.0271148681640625,
-0.019866943359375,
-0.0225067138671875,
-0.043426513671875,
-0.0136871337890625,
-0.01296234130859375,
0.011138916015625,
0.01384735107421875,
0.01003265380859375,
0.043487548828125,
-0.055145263671875,
0.04962158203125,
-0.016082763671875,
-0.0174407958984375,
0.0098419189453125,
-0.0032520294189453125,
-0.001110076904296875,
0.0259246826171875,
-0.0083465576171875,
-0.00927734375,
-0.0122222900390625,
0.0445556640625,
-0.031524658203125,
0.0199737548828125,
-0.0347900390625,
0.0127105712890625,
-0.0160675048828125,
0.0222930908203125,
0.03875732421875,
0.01418304443359375,
0.0014429092407226562,
-0.0026416778564453125,
-0.04302978515625,
-0.0308990478515625,
-0.00771331787109375,
-0.034332275390625,
-0.0227203369140625,
0.0100860595703125,
0.03094482421875,
0.029296875,
0.018951416015625,
-0.034332275390625,
-0.023345947265625,
-0.00934600830078125,
0.005222320556640625,
0.0021953582763671875,
-0.017303466796875,
0.06341552734375,
-0.006526947021484375,
0.0521240234375,
0.00012385845184326172,
0.006298065185546875,
-0.0214080810546875,
0.005123138427734375,
0.027618408203125,
-0.072998046875,
-0.043975830078125,
-0.0193328857421875,
-0.0850830078125,
0.03515625,
0.05267333984375,
-0.01068115234375,
0.07098388671875,
0.013885498046875,
0.0214996337890625,
0.005126953125,
-0.08355712890625,
-0.006153106689453125,
0.0270538330078125,
0.046600341796875,
-0.013214111328125,
0.00445556640625,
-0.00818634033203125,
-0.0396728515625,
0.03228759765625,
0.0061492919921875,
0.0399169921875,
-0.0244140625,
-0.054443359375,
0.0220184326171875,
0.0615234375,
0.028472900390625,
0.05303955078125,
0.005886077880859375,
0.0268096923828125,
0.043487548828125,
-0.003925323486328125,
0.002925872802734375,
0.01239776611328125,
0.05389404296875,
-0.00878143310546875,
-0.01172637939453125,
0.0350341796875,
-0.03289794921875,
0.0276641845703125,
0.0307769775390625,
0.04620361328125,
-0.06634521484375,
0.02606201171875,
0.018218994140625,
-0.00885772705078125,
0.025634765625,
0.01220703125,
-0.0043487548828125,
0.0133056640625,
-0.0090179443359375,
-0.030426025390625,
-0.037994384765625,
0.0020294189453125,
-0.002033233642578125,
-0.013702392578125,
-0.01442718505859375,
-0.03619384765625,
0.0024623870849609375,
-0.0182647705078125,
0.031951904296875,
0.004322052001953125,
0.01506805419921875,
-0.0135345458984375,
0.00814056396484375,
-0.0292510986328125,
-0.00397491455078125,
-0.044921875,
-0.0062103271484375,
-0.0521240234375,
-0.0102081298828125,
0.0192718505859375,
-0.036712646484375,
0.032806396484375,
0.034637451171875,
0.001506805419921875,
-0.04010009765625,
0.00960540771484375,
-0.036102294921875,
-0.0211181640625,
-0.004791259765625,
0.0183563232421875,
0.0010061264038085938,
-0.02398681640625,
0.01800537109375,
-0.016448974609375,
-0.012481689453125,
-0.014678955078125,
0.0038471221923828125,
0.034820556640625,
0.02081298828125,
-0.028533935546875,
0.028594970703125,
0.06744384765625,
-0.0216827392578125,
-0.006732940673828125,
0.04412841796875,
-0.07415771484375,
-0.054473876953125,
0.022674560546875,
-0.03228759765625,
-0.035736083984375,
-0.006927490234375,
-0.06427001953125,
0.0914306640625,
0.00708770751953125,
0.038177490234375,
-0.0011472702026367188,
0.037872314453125,
-0.007205963134765625,
0.030914306640625,
-0.041107177734375,
0.05828857421875,
-0.018890380859375,
0.068115234375,
-0.0638427734375,
-0.004520416259765625,
0.01001739501953125,
0.044219970703125,
-0.0007061958312988281,
0.00507354736328125,
-0.03509521484375,
-0.006580352783203125,
0.033599853515625,
0.0265045166015625,
0.010223388671875,
0.04425048828125,
0.029876708984375,
0.0556640625,
0.047027587890625,
-0.02508544921875,
0.042022705078125,
-0.047393798828125,
-0.0177459716796875,
0.025604248046875,
0.037628173828125,
0.0616455078125,
-0.024322509765625,
-0.00867462158203125,
-0.0322265625,
-0.0119171142578125,
0.035919189453125,
-0.0083465576171875,
0.022125244140625,
0.05316162109375,
0.062408447265625,
-0.026153564453125,
-0.08203125,
-0.00238037109375,
0.035247802734375,
0.03924560546875,
0.045074462890625,
0.04638671875,
0.0272369384765625,
0.004276275634765625,
0.004901885986328125,
0.040252685546875,
0.0018815994262695312,
-0.056060791015625,
0.074462890625,
-0.01351165771484375,
0.0164642333984375,
-0.072509765625,
0.03131103515625,
0.0439453125,
0.085693359375,
-0.05694580078125,
0.00583648681640625,
0.01690673828125,
-0.01459503173828125,
-0.00897216796875,
-0.047271728515625,
-0.0343017578125,
0.0159454345703125,
0.00409698486328125,
-0.06817626953125,
0.001766204833984375,
0.0361328125,
0.011260986328125,
-0.013214111328125,
-0.017913818359375,
-0.029693603515625,
-0.0187835693359375,
-0.0223541259765625,
0.00018417835235595703,
0.024322509765625,
0.048614501953125,
-0.0162353515625,
0.060211181640625,
-0.042877197265625,
-0.02484130859375,
-0.0445556640625,
0.00550079345703125,
-0.00838470458984375,
0.04925537109375,
-0.040069580078125,
0.004688262939453125,
-0.00605010986328125,
0.037841796875,
0.01389312744140625,
0.0210113525390625,
0.047210693359375,
0.068115234375,
0.027496337890625,
-0.00115966796875,
0.057220458984375,
-0.002597808837890625,
-0.0347900390625,
-0.03466796875,
-0.031280517578125,
-0.0012178421020507812,
-0.00852203369140625,
0.03741455078125,
0.024871826171875,
0.0125579833984375,
-0.0034313201904296875,
0.036590576171875,
0.01114654541015625,
-0.00928497314453125,
-0.00891876220703125,
0.004665374755859375,
0.027130126953125,
0.038909912109375,
-0.032196044921875,
-0.0263214111328125,
-0.0304718017578125,
-0.0183563232421875,
0.031829833984375,
0.0457763671875,
0.04541015625,
-0.020111083984375,
0.009490966796875,
-0.05963134765625,
-0.002155303955078125,
0.04718017578125,
0.0259246826171875,
0.04779052734375,
-0.003124237060546875,
0.004241943359375,
-0.06488037109375,
-0.04620361328125,
-0.0018072128295898438,
0.020050048828125,
-0.018157958984375,
0.039886474609375,
0.0102691650390625,
0.00038623809814453125,
0.006084442138671875,
0.0090484619140625,
0.0024242401123046875,
-0.01200103759765625,
0.04669189453125,
-0.01183319091796875,
-0.02978515625,
-0.01171112060546875,
0.039337158203125,
-0.038330078125,
0.0699462890625,
-0.07965087890625,
-0.048736572265625,
0.00841522216796875,
0.02392578125,
-0.039520263671875,
0.00881195068359375,
-0.0396728515625,
-0.037261962890625,
-0.0268402099609375,
-0.004985809326171875,
-0.00786590576171875,
0.0167999267578125,
0.00986480712890625,
0.04193115234375,
0.0265655517578125,
-0.026123046875,
0.040557861328125,
-0.059173583984375,
0.10205078125,
0.040985107421875,
0.0133819580078125,
0.0031795501708984375,
0.004901885986328125,
-0.0196685791015625,
0.018768310546875,
0.018890380859375,
-0.0237884521484375,
0.021331787109375,
-0.00983428955078125,
-0.01540374755859375,
0.01873779296875,
0.0189361572265625,
-0.001026153564453125,
0.0049285888671875,
0.0092926025390625,
-0.042327880859375,
-0.02093505859375,
-0.005584716796875,
-0.06597900390625,
-0.030609130859375,
0.026611328125,
0.009674072265625,
0.0241546630859375,
-0.007640838623046875,
-0.0305023193359375,
-0.0322265625,
-0.0010356903076171875,
-0.0232696533203125,
0.03839111328125,
-0.0311279296875,
-0.0301971435546875,
-0.039093017578125,
-0.0197296142578125,
-0.04290771484375,
0.002490997314453125,
0.003387451171875,
-0.00011855363845825195,
0.01207733154296875,
-0.0308990478515625,
0.0033740997314453125,
0.01030731201171875,
0.026336669921875,
0.0176239013671875,
-0.019134521484375,
0.0014543533325195312,
0.037078857421875,
0.040283203125,
0.056243896484375,
0.0212860107421875,
-0.010162353515625,
0.03582763671875,
0.006237030029296875,
-0.037353515625,
-0.09869384765625,
0.01139068603515625,
-0.0635986328125,
0.024505615234375,
0.0310211181640625,
0.0244140625,
0.06060791015625,
0.00514984130859375,
-0.022735595703125,
0.089599609375,
0.003803253173828125,
-0.023162841796875,
0.01387786865234375,
-0.0285186767578125,
-0.0011491775512695312,
0.0180816650390625,
0.018157958984375,
-0.01849365234375,
-0.04107666015625,
-0.00933074951171875,
0.002323150634765625,
0.032501220703125,
-0.015228271484375,
0.0211334228515625,
-0.0653076171875,
0.034271240234375,
0.0016946792602539062,
-0.005161285400390625,
0.004741668701171875,
-0.006397247314453125,
0.0238800048828125,
0.030487060546875,
-0.028289794921875,
-0.033447265625,
0.006649017333984375,
0.00927734375,
0.00759124755859375,
-0.0181884765625,
-0.061004638671875,
-0.01959228515625,
0.061370849609375,
0.06524658203125,
0.02703857421875,
-0.03155517578125,
-0.0172119140625,
-0.0173797607421875,
-0.01910400390625,
-0.0298919677734375,
0.01605224609375,
-0.06134033203125,
-0.024017333984375,
-0.002964019775390625,
-0.0013885498046875,
0.0243988037109375,
0.00237274169921875,
-0.0178070068359375,
-0.0200347900390625,
0.0114288330078125,
-0.0036449432373046875,
-0.08038330078125,
0.0289764404296875,
0.035552978515625,
-0.04730224609375,
-0.031463623046875,
-0.0246124267578125,
0.011260986328125,
-0.0171966552734375,
-0.04840087890625,
-0.04022216796875,
-0.002162933349609375,
0.0119476318359375,
0.0046234130859375,
0.011077880859375,
0.0093841552734375,
0.023193359375,
0.028778076171875,
-0.04583740234375,
0.02020263671875,
0.019256591796875,
-0.00164794921875,
-0.038604736328125,
0.0189056396484375,
0.01971435546875,
0.08001708984375,
-0.035308837890625,
0.08819580078125,
0.005084991455078125,
0.012969970703125,
-0.0240325927734375,
0.02587890625,
0.030914306640625,
-0.0238037109375,
-0.0040130615234375,
0.0035991668701171875,
-0.007320404052734375,
-0.0018815994262695312,
-0.030731201171875,
0.0003495216369628906,
-0.0277099609375,
0.0026149749755859375
] |
52c910ee75315dd13ed59fbb05fbdad626e203b1 | Wordpress Stackexchange
Q: Set relationship between custom_post_types I am trying to create and enforce such a relationship between custom_post_types.
Question:
How to 'link' the post_types in a manner that allows finding parent/child of any post_type?
Examples:
Querying for parent of 'barter' should give classified_post_type .
Querying for leaf nodes of user_post_type gives all the leaf nodes. etc
I understand this cannot be achieved just by creating custom_post_types. But is there any way like taxonomy/metafield to link different custom post types together ? Actually I am not bent on using customn_post_types. Just want the above mentioned behaviour, if possible.
ty
A: I would suggest you create a common hierarchical taxonomy that you register with each of your custom post types.
The terms of this taxonomy would match your custom post types (for example use the custom post type slug as the term slug).
You can then structure your taxonomy to match your designed hierarchy, and every time you need to find the parent/child you refer back to the taxonomy.
You could have a parent_post and a child_post meta fields to store the post IDs of the respective parent and child post.
| Q: Set relationship between custom_post_types I am trying to create and enforce such a relationship between custom_post_types.
Question:
How to 'link' the post_types in a manner that allows finding parent/child of any post_type?
Examples:
Querying for parent of 'barter' should give classified_post_type .
Querying for leaf nodes of user_post_type gives all the leaf nodes. etc
I understand this cannot be achieved just by creating custom_post_types. But is there any way like taxonomy/metafield to link different custom post types together ? Actually I am not bent on using customn_post_types. Just want the above mentioned behaviour, if possible.
ty
A: I would suggest you create a common hierarchical taxonomy that you register with each of your custom post types.
The terms of this taxonomy would match your custom post types (for example use the custom post type slug as the term slug).
You can then structure your taxonomy to match your designed hierarchy, and every time you need to find the parent/child you refer back to the taxonomy.
You could have a parent_post and a child_post meta fields to store the post IDs of the respective parent and child post.
A: use taxonomy then you can identify by category (like post category or tags).
add_action( 'init', 'create_custom_tax' );
function create_custom_tax() {
register_taxonomy(
'category',
'user-post-type', // name of your custom post type
array(
'label' => __( 'Category' ),
'rewrite' => array( 'slug' => 'category' ),
'hierarchical' => true,
)
);
}
https://codex.wordpress.org/Function_Reference/register_taxonomy
A: As @Milo said, a quick solution would be Posts 2 Posts plugin. I've been using Pods Framework for this for about 2-3 years now. It's easy implement relationships using it's UI interface or via it's powerful API.
| wordpress | {
"language": "en",
"length": 277,
"provenance": "stackexchange_00019.jsonl.gz:471393",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/250274"
} | [
0.05377197265625,
0.006755828857421875,
0.001544952392578125,
-0.0305328369140625,
0.006237030029296875,
-0.00836181640625,
0.0423583984375,
-0.0133209228515625,
-0.04620361328125,
0.0033664703369140625,
0.01149749755859375,
-0.026763916015625,
-0.031463623046875,
-0.055816650390625,
0.0158233642578125,
-0.057525634765625,
0.0252532958984375,
-0.00788116455078125,
0.0460205078125,
-0.0177764892578125,
0.023345947265625,
-0.01201629638671875,
0.047637939453125,
-0.0163421630859375,
0.046051025390625,
-0.0357666015625,
0.050018310546875,
-0.0291900634765625,
0.058807373046875,
0.0069427490234375,
0.03729248046875,
-0.04730224609375,
0.0145721435546875,
-0.0033893585205078125,
0.01456451416015625,
-0.037750244140625,
0.0328369140625,
-0.0095977783203125,
-0.0014886856079101562,
0.02520751953125,
0.0037097930908203125,
0.0022716522216796875,
0.002780914306640625,
0.01031494140625,
-0.0290985107421875,
-0.0308990478515625,
0.0069580078125,
-0.009246826171875,
0.030059814453125,
-0.0180511474609375,
0.0164031982421875,
-0.030303955078125,
0.0308990478515625,
-0.0294036865234375,
-0.028289794921875,
-0.019012451171875,
-0.006748199462890625,
-0.0268402099609375,
0.0244293212890625,
-0.02044677734375,
-0.0176849365234375,
-0.0172576904296875,
0.0224456787109375,
0.01007080078125,
0.01495361328125,
-0.00762176513671875,
0.0006227493286132812,
0.0164947509765625,
-0.0556640625,
0.000026285648345947266,
0.040008544921875,
-0.03582763671875,
0.0197906494140625,
-0.0040130615234375,
0.0135040283203125,
-0.045623779296875,
0.036712646484375,
0.00614166259765625,
-0.00567626953125,
0.03802490234375,
-0.01343536376953125,
-0.01264190673828125,
-0.049072265625,
-0.00890350341796875,
-0.00739288330078125,
-0.0023403167724609375,
-0.024200439453125,
0.002635955810546875,
-0.041717529296875,
-0.024932861328125,
-0.0303802490234375,
-0.056884765625,
-0.04669189453125,
0.01971435546875,
0.004039764404296875,
-0.0095367431640625,
0.0273284912109375,
0.034881591796875,
-0.0119171142578125,
0.01247406005859375,
-0.003612518310546875,
-0.03948974609375,
0.05230712890625,
-0.035736083984375,
0.031585693359375,
0.021453857421875,
-0.04095458984375,
-0.0135498046875,
0.09112548828125,
0.033355712890625,
0.0289764404296875,
0.061920166015625,
-0.004673004150390625,
0.0218963623046875,
-0.040374755859375,
0.000045359134674072266,
-0.035675048828125,
-0.003509521484375,
-0.0328369140625,
0.039520263671875,
-0.00848388671875,
0.0100555419921875,
0.0236968994140625,
-0.0027408599853515625,
-0.016876220703125,
-0.0191192626953125,
-0.01338958740234375,
-0.0325927734375,
0.033447265625,
0.0229644775390625,
-0.054443359375,
-0.006351470947265625,
0.09228515625,
0.037109375,
0.01922607421875,
-0.024871826171875,
0.0193023681640625,
-0.0235748291015625,
0.00547027587890625,
-0.0113677978515625,
0.0285491943359375,
-0.0294189453125,
0.005176544189453125,
0.034393310546875,
0.0282440185546875,
0.050445556640625,
0.019256591796875,
-0.01181793212890625,
-0.01222991943359375,
-0.031524658203125,
0.006809234619140625,
-0.04705810546875,
0.06103515625,
-0.024627685546875,
-0.033172607421875,
-0.06005859375,
0.0028133392333984375,
-0.033416748046875,
-0.00920867919921875,
-0.055572509765625,
-0.005847930908203125,
0.004673004150390625,
0.028656005859375,
-0.0255584716796875,
-0.06475830078125,
0.0109100341796875,
-0.019927978515625,
-0.020172119140625,
0.0208282470703125,
-0.0293426513671875,
0.03826904296875,
0.00302886962890625,
-0.03741455078125,
-0.01091766357421875,
0.0157012939453125,
-0.0190887451171875,
-0.04693603515625,
0.0177001953125,
0.02862548828125,
0.0135040283203125,
0.007335662841796875,
-0.038604736328125,
0.0143280029296875,
0.0260467529296875,
-0.03961181640625,
0.045318603515625,
-0.00550079345703125,
0.01428985595703125,
0.00923919677734375,
0.00295257568359375,
0.008697509765625,
0.040985107421875,
-0.029296875,
0.02484130859375,
-0.007678985595703125,
-0.0174560546875,
-0.03289794921875,
-0.00921630859375,
-0.0113067626953125,
-0.0023651123046875,
-0.07513427734375,
0.01800537109375,
-0.01421356201171875,
0.026580810546875,
0.006805419921875,
0.0045928955078125,
-0.01016998291015625,
0.048004150390625,
-0.023406982421875,
0.0189971923828125,
0.034271240234375,
0.0019245147705078125,
-0.0175323486328125,
-0.0518798828125,
-0.0028018951416015625,
0.00196075439453125,
0.003711700439453125,
0.0194244384765625,
-0.005405426025390625,
-0.0087432861328125,
-0.011322021484375,
-0.0209808349609375,
-0.01538848876953125,
0.028961181640625,
0.00908660888671875,
0.04107666015625,
-0.02752685546875,
0.0289764404296875,
-0.01422119140625,
0.07244873046875,
-0.07958984375,
-0.01480865478515625,
0.035186767578125,
-0.016998291015625,
-0.0224456787109375,
0.022430419921875,
0.043212890625,
-0.04052734375,
-0.00965118408203125,
0.035919189453125,
0.0289459228515625,
0.0126495361328125,
-0.032318115234375,
-0.01206207275390625,
0.00006651878356933594,
-0.045379638671875,
0.00308990478515625,
-0.00431060791015625,
0.00885772705078125,
0.04949951171875,
-0.0290069580078125,
0.0312042236328125,
0.01352691650390625,
0.0011882781982421875,
0.00823974609375,
0.037200927734375,
-0.004108428955078125,
-0.025177001953125,
0.00487518310546875,
0.007793426513671875,
0.007415771484375,
-0.035797119140625,
-0.03558349609375,
-0.00829315185546875,
0.0357666015625,
-0.002346038818359375,
0.044189453125,
0.023956298828125,
-0.025390625,
-0.013427734375,
0.024139404296875,
0.029754638671875,
0.00299072265625,
-0.002353668212890625,
0.0153961181640625,
-0.006084442138671875,
-0.00524139404296875,
-0.01064300537109375,
0.0083160400390625,
-0.01309967041015625,
-0.0020999908447265625,
0.0157012939453125,
-0.034637451171875,
0.0035572052001953125,
-0.01904296875,
-0.0452880859375,
0.0206146240234375,
0.060150146484375,
-0.0193939208984375,
-0.0203399658203125,
0.0024623870849609375,
0.0252227783203125,
-0.005466461181640625,
0.0115203857421875,
-0.006549835205078125,
-0.006870269775390625,
0.0036678314208984375,
-0.051544189453125,
0.040985107421875,
-0.04742431640625,
0.06268310546875,
0.05364990234375,
-0.0303955078125,
0.0204010009765625,
-0.00197601318359375,
0.0292816162109375,
-0.0015392303466796875,
0.0192413330078125,
0.0009007453918457031,
-0.05645751953125,
0.01493072509765625,
-0.00252532958984375,
0.0297698974609375,
0.046966552734375,
0.006038665771484375,
-0.025604248046875,
0.00881195068359375,
0.037445068359375,
-0.011016845703125,
-0.00936126708984375,
0.054901123046875,
-0.0116729736328125,
-0.033721923828125,
-0.01104736328125,
-0.00951385498046875,
-0.01654052734375,
-0.0032863616943359375,
-0.02008056640625,
-0.0035381317138671875,
-0.0380859375,
-0.07867431640625,
-0.0762939453125,
-0.06634521484375,
0.00930023193359375,
-0.004974365234375,
0.01221466064453125,
0.0160675048828125,
0.03546142578125,
0.0124969482421875,
-0.054718017578125,
0.0186004638671875,
0.07220458984375,
-0.025146484375,
0.0186767578125,
-0.001010894775390625,
-0.0023860931396484375,
0.061370849609375,
0.007694244384765625,
-0.0294952392578125,
0.022979736328125,
-0.010711669921875,
-0.051513671875,
0.0015401840209960938,
0.047332763671875,
0.041656494140625,
-0.004894256591796875,
-0.0191497802734375,
0.06494140625,
0.039154052734375,
-0.00704193115234375,
-0.01035308837890625,
-0.027252197265625,
-0.030609130859375,
0.0143585205078125,
0.0158538818359375,
-0.005184173583984375,
-0.0489501953125,
0.0460205078125,
0.01103973388671875,
0.015472412109375,
0.00518798828125,
-0.025970458984375,
0.02099609375,
0.0116729736328125,
0.036956787109375,
-0.01076507568359375,
0.01129913330078125,
-0.0157318115234375,
0.01025390625,
0.0027599334716796875,
0.037078857421875,
-0.005275726318359375,
0.0286102294921875,
-0.044342041015625,
-0.07672119140625,
0.06781005859375,
-0.00341796875,
0.018280029296875,
-0.04583740234375,
-0.04638671875,
-0.00995635986328125,
0.11474609375,
-0.048828125,
0.0019683837890625,
-0.0123138427734375,
0.00540924072265625,
-0.0097808837890625,
-0.034393310546875,
-0.04901123046875,
-0.0092926025390625,
-0.0176544189453125,
0.0219268798828125,
-0.0005822181701660156,
-0.0029964447021484375,
-0.021728515625,
0.01019287109375,
-0.0207366943359375,
-0.012969970703125,
0.033966064453125,
-0.012359619140625,
-0.0088043212890625,
0.05023193359375,
-0.01284027099609375,
0.0279998779296875,
-0.03570556640625,
0.006015777587890625,
-0.061553955078125,
-0.0270538330078125,
0.00897979736328125,
0.07366943359375,
0.01508331298828125,
-0.037353515625,
-0.00844573974609375,
0.05450439453125,
0.040374755859375,
0.0233612060546875,
0.0168304443359375,
-0.015777587890625,
0.0076751708984375,
0.0153656005859375,
0.00542449951171875,
-0.01508331298828125,
-0.033355712890625,
-0.042755126953125,
-0.0093536376953125,
0.01374053955078125,
-0.0168609619140625,
0.0034027099609375,
-0.009613037109375,
-0.004489898681640625,
-0.053741455078125,
-0.027313232421875,
-0.0606689453125,
0.0174560546875,
0.0121917724609375,
-0.0433349609375,
-0.069580078125,
-0.10089111328125,
0.01416778564453125,
0.0126953125,
-0.0157623291015625,
0.0184783935546875,
0.046295166015625,
0.01215362548828125,
-0.0089874267578125,
-0.0511474609375,
-0.010833740234375,
-0.0033397674560546875,
0.00318145751953125,
0.034881591796875,
0.00543212890625,
0.0178985595703125,
-0.00792694091796875,
-0.0248565673828125,
-0.006214141845703125,
0.00894927978515625,
0.05609130859375,
-0.01508331298828125,
-0.0260772705078125,
0.034027099609375,
-0.0300140380859375,
-0.0032215118408203125,
0.0236053466796875,
-0.010406494140625,
-0.03759765625,
-0.01934814453125,
0.06304931640625,
-0.03094482421875,
0.039947509765625,
-0.050262451171875,
-0.002994537353515625,
0.011810302734375,
-0.022003173828125,
0.01303863525390625,
0.0211181640625,
-0.00823974609375,
-0.0238189697265625,
-0.057098388671875,
0.010101318359375,
-0.0283355712890625,
0.0034999847412109375,
-0.0027332305908203125,
0.02752685546875,
-0.0009565353393554688,
0.0175323486328125,
-0.0272216796875,
-0.005687713623046875,
0.05718994140625,
0.0004038810729980469,
-0.03778076171875,
0.02496337890625,
-0.01308441162109375,
-0.01445770263671875,
0.0012674331665039062,
0.0318603515625,
0.040283203125,
0.01412200927734375,
0.0063934326171875,
-0.000629425048828125,
-0.0009121894836425781,
0.0215606689453125,
-0.0303192138671875,
-0.011138916015625,
0.004047393798828125,
-0.00629425048828125,
-0.033660888671875,
0.04913330078125,
0.0036830902099609375,
0.002353668212890625,
-0.0177459716796875,
0.026885986328125,
0.0308074951171875,
0.0300750732421875,
0.02099609375,
-0.0206451416015625,
-0.00904083251953125,
0.00930023193359375,
-0.0014085769653320312,
-0.0231475830078125,
-0.00009930133819580078,
0.008392333984375,
0.04071044921875,
-0.003742218017578125,
-0.01678466796875,
0.03271484375,
-0.03741455078125,
-0.0062255859375,
-0.0156707763671875,
-0.0021839141845703125,
0.00571441650390625,
-0.0154876708984375,
-0.005725860595703125,
0.01009368896484375,
0.0253143310546875,
-0.034942626953125,
0.024017333984375,
-0.05023193359375,
0.0294036865234375,
-0.03814697265625,
-0.0045318603515625,
0.01523590087890625,
0.02642822265625,
-0.04833984375,
-0.0202789306640625,
0.0266265869140625,
-0.029449462890625,
-0.022003173828125,
-0.01434326171875,
-0.0310516357421875,
0.0122222900390625,
-0.0224609375,
0.0309600830078125,
-0.0288543701171875,
-0.004547119140625,
-0.0110626220703125,
0.0017633438110351562,
0.0765380859375,
0.03857421875,
-0.0206146240234375,
-0.00795745849609375,
-0.049468994140625,
-0.01229095458984375,
-0.06646728515625,
-0.055511474609375,
-0.0430908203125,
0.0289764404296875,
0.0015430450439453125,
0.01397705078125,
0.00807952880859375,
-0.00592041015625,
-0.00302886962890625,
-0.0130767822265625,
-0.00765228271484375,
-0.0347900390625,
0.016998291015625,
0.079833984375,
-0.027679443359375,
0.078369140625,
0.0140228271484375,
0.00469207763671875,
-0.059051513671875,
-0.00853729248046875,
-0.0076141357421875,
-0.06866455078125,
-0.001941680908203125,
-0.02398681640625,
0.01629638671875,
0.036468505859375,
0.0160064697265625,
0.01177978515625,
0.038543701171875,
-0.0256195068359375,
-0.01027679443359375,
-0.025238037109375,
0.0031795501708984375,
-0.046051025390625,
0.023345947265625,
-0.0015430450439453125,
0.0005097389221191406,
0.043609619140625,
0.00847625732421875,
-0.01419830322265625,
0.00675201416015625,
-0.002201080322265625,
0.03277587890625,
-0.0118408203125,
-0.03265380859375,
0.02154541015625,
-0.00015032291412353516,
0.00885009765625,
0.03460693359375,
-0.022735595703125,
0.034820556640625,
0.02166748046875,
0.028778076171875,
-0.00524139404296875,
-0.01271820068359375,
0.0312347412109375,
0.003429412841796875,
-0.0216064453125,
-0.0017910003662109375,
-0.0321044921875,
-0.04864501953125,
0.0019464492797851562,
-0.0233306884765625,
-0.03192138671875,
-0.02154541015625,
-0.02227783203125,
0.0206756591796875,
0.00215911865234375,
0.01288604736328125,
0.0186004638671875,
0.03826904296875,
-0.02679443359375,
-0.0243988037109375,
-0.0279998779296875,
-0.0023593902587890625,
-0.0177154541015625,
-0.019378662109375,
0.0005435943603515625,
0.00921630859375,
-0.0017032623291015625,
0.085693359375,
-0.040069580078125,
-0.038604736328125,
-0.0006237030029296875,
-0.0003604888916015625,
0.0360107421875,
-0.035552978515625,
0.003818511962890625,
-0.037506103515625,
-0.0028705596923828125,
-0.037384033203125,
-0.0097198486328125,
0.0184478759765625,
-0.00806427001953125,
0.03961181640625,
0.02410888671875,
-0.0004858970642089844,
-0.0157012939453125,
-0.019775390625,
0.0012903213500976562,
-0.040069580078125,
-0.041595458984375,
0.01149749755859375,
-0.001430511474609375,
-0.043365478515625,
0.018157958984375,
-0.049713134765625,
-0.038787841796875,
-0.013275146484375,
-0.025909423828125,
0.052520751953125,
-0.029571533203125,
0.0012149810791015625,
0.0450439453125,
0.05792236328125,
-0.0244140625,
0.0085296630859375,
0.01403045654296875,
-0.0312042236328125,
-0.052337646484375,
-0.0015516281127929688,
-0.0772705078125,
-0.01947021484375,
-0.0182037353515625,
-0.044647216796875,
0.06622314453125,
-0.0117034912109375,
0.01342010498046875,
0.0076751708984375,
0.02874755859375,
-0.006366729736328125,
0.0209503173828125,
-0.03106689453125,
0.0672607421875,
0.0008893013000488281,
0.05322265625,
-0.07086181640625,
-0.041015625,
0.0142364501953125,
0.06585693359375,
0.0711669921875,
0.0252532958984375,
-0.04608154296875,
-0.00862884521484375,
0.041259765625,
0.011077880859375,
-0.022430419921875,
0.050537109375,
0.0158233642578125,
0.0131378173828125,
0.0445556640625,
0.0184173583984375,
0.0430908203125,
0.006999969482421875,
-0.042510986328125,
0.0310516357421875,
0.0200653076171875,
0.020721435546875,
-0.0162506103515625,
-0.002735137939453125,
-0.033538818359375,
-0.0007429122924804688,
0.035736083984375,
-0.0169525146484375,
0.057586669921875,
-0.00966644287109375,
0.03955078125,
-0.017486572265625,
-0.006008148193359375,
0.0021343231201171875,
0.0457763671875,
-0.0012121200561523438,
0.017791748046875,
-0.0211639404296875,
0.00002014636993408203,
0.013397216796875,
-0.0308380126953125,
-0.0013446807861328125,
0.0092315673828125,
-0.025299072265625,
0.0352783203125,
0.01338958740234375,
0.0242767333984375,
-0.05755615234375,
-0.0255279541015625,
0.04840087890625,
0.06982421875,
-0.0261993408203125,
-0.091796875,
0.01446533203125,
-0.0081329345703125,
0.007648468017578125,
0.0300445556640625,
-0.0159759521484375,
0.01454925537109375,
0.07733154296875,
-0.066162109375,
0.025146484375,
0.006343841552734375,
0.0484619140625,
-0.0225372314453125,
-0.005023956298828125,
-0.0762939453125,
-0.01403045654296875,
-0.01561737060546875,
-0.0200042724609375,
0.0090179443359375,
0.0307464599609375,
0.01788330078125,
0.0355224609375,
-0.0019588470458984375,
-0.003734588623046875,
0.027191162109375,
-0.0205841064453125,
0.016693115234375,
-0.026031494140625,
0.05120849609375,
0.02154541015625,
-0.0157623291015625,
-0.0098724365234375,
0.0262451171875,
0.0631103515625,
0.050994873046875,
0.0162506103515625,
-0.006671905517578125,
0.005680084228515625,
0.0161285400390625,
-0.0278778076171875,
-0.0019130706787109375,
-0.01788330078125,
-0.014434814453125,
0.00255584716796875,
-0.021575927734375,
-0.010589599609375,
-0.012176513671875,
0.0301971435546875,
0.0223541259765625,
0.06243896484375,
0.0031719207763671875,
0.0019130706787109375,
0.040924072265625,
0.01102447509765625,
0.07696533203125,
0.04376220703125,
-0.0318603515625,
-0.03167724609375,
0.00925445556640625,
-0.035430908203125,
0.03302001953125,
0.049530029296875,
-0.00017344951629638672,
-0.0175018310546875,
0.0079345703125,
-0.032440185546875,
-0.002971649169921875,
0.038116455078125,
0.01165771484375,
0.006084442138671875,
0.00888824462890625,
-0.004848480224609375,
-0.0193634033203125,
0.0032901763916015625,
0.01116943359375,
-0.00716400146484375,
0.0066680908203125,
0.029937744140625,
0.005519866943359375,
0.00968170166015625,
-0.0040283203125,
0.0650634765625,
-0.058685302734375,
-0.021759033203125,
0.053985595703125,
-0.01403045654296875,
0.0085906982421875,
-0.0007619857788085938,
0.01068115234375,
-0.00815582275390625,
0.049285888671875,
-0.04168701171875,
-0.031402587890625,
-0.00823211669921875,
0.0286712646484375,
0.0036487579345703125,
-0.0052337646484375,
-0.02996826171875,
0.004062652587890625,
-0.01702880859375,
-0.043487548828125,
0.049591064453125,
0.01143646240234375,
0.0018177032470703125,
0.056671142578125,
0.028167724609375,
-0.0186920166015625,
0.03570556640625,
-0.06988525390625,
0.055419921875,
0.03155517578125,
-0.00119781494140625,
-0.03057861328125,
0.0149383544921875,
-0.00902557373046875,
0.0038814544677734375,
0.0059814453125,
0.042877197265625,
0.022796630859375,
-0.041717529296875,
0.01715087890625,
0.046173095703125,
0.023529052734375,
-0.0279083251953125,
0.00677490234375,
0.0484619140625,
-0.037750244140625,
0.01042938232421875,
-0.034149169921875,
-0.0254974365234375,
-0.03564453125,
0.017578125,
0.01195526123046875,
0.01027679443359375,
-0.0216217041015625,
0.0006275177001953125,
0.0173187255859375,
0.0391845703125,
0.0259552001953125,
-0.06280517578125,
0.042724609375,
-0.0294036865234375,
0.01190185546875,
0.0282135009765625,
-0.0631103515625,
0.02825927734375,
0.028045654296875,
0.012481689453125,
0.026092529296875,
-0.00853729248046875,
-0.0361328125,
0.0232696533203125,
0.0347900390625,
0.011474609375,
-0.036895751953125,
-0.0023326873779296875,
0.0576171875,
0.047271728515625,
0.0931396484375,
0.06231689453125,
-0.034423828125,
-0.0249481201171875,
-0.0015401840209960938,
-0.0041656494140625,
-0.01084136962890625,
0.04986572265625,
-0.07037353515625,
-0.05364990234375,
-0.036285400390625,
0.046722412109375,
0.052886962890625,
-0.02130126953125,
-0.0714111328125,
0.10552978515625,
-0.0377197265625,
-0.0223388671875,
-0.07269287109375,
-0.005626678466796875,
0.0030422210693359375,
0.023193359375,
-0.004726409912109375,
-0.03265380859375,
-0.053131103515625,
0.0330810546875,
-0.01873779296875,
0.0185546875,
0.00589752197265625,
-0.01158905029296875,
-0.0215911865234375,
-0.0003459453582763672,
0.00858306884765625,
-0.031768798828125,
-0.00977325439453125,
0.0170745849609375,
-0.01045989990234375,
0.0177459716796875,
-0.04931640625,
0.00734710693359375,
-0.019317626953125,
0.021820068359375,
0.004314422607421875,
-0.03271484375,
-0.01428985595703125,
-0.0396728515625,
0.00975799560546875,
0.01259613037109375,
-0.00006598234176635742,
0.00789642333984375,
-0.0243377685546875,
-0.0645751953125,
-0.07122802734375,
0.0005459785461425781,
0.0193328857421875,
-0.0430908203125,
0.044097900390625,
0.0133819580078125,
-0.0016527175903320312,
-0.01441192626953125,
-0.0002053976058959961,
-0.01284027099609375,
-0.01142120361328125,
0.029571533203125,
-0.01300048828125,
-0.0166473388671875,
0.09185791015625,
-0.0217132568359375,
-0.01154327392578125,
-0.0008835792541503906,
-0.0312347412109375,
-0.03228759765625,
-0.020751953125,
-0.0216064453125,
0.005218505859375,
0.00003612041473388672,
-0.00991058349609375,
0.01910400390625,
0.007709503173828125,
0.00988006591796875,
-0.00396728515625,
-0.004215240478515625,
-0.0521240234375,
0.0175628662109375,
0.02984619140625,
0.005695343017578125,
-0.06524658203125,
0.09356689453125,
0.060211181640625,
0.058624267578125,
0.032958984375,
0.0137786865234375,
-0.0011653900146484375,
0.042022705078125,
-0.032257080078125,
-0.0134429931640625,
-0.046356201171875,
0.003635406494140625,
0.00885009765625,
-0.04034423828125,
-0.0039825439453125,
-0.06390380859375,
0.0275115966796875,
0.057769775390625,
-0.018096923828125,
0.043853759765625
] |
b879ef7b528b9cbc4a0aaab8d4f72b075ddc9478 | Wordpress Stackexchange
Q: Best way to end WordPress ajax request and why? Considering regular WordPress ajax requests like these:
add_action( 'wp_ajax_merrychristmas_happynewyear', array( $this, 'merrychristmas_happynewyear' ) );
add_action( 'wp_ajax_nopriv_merrychristmas_happynewyear', array( $this, 'merrychristmas_happynewyear' ) );
Will it be best to end function merrychristmas_happynewyear with die(), die(0), wp_die(), or something else and why?
A: For using wordpress ajax / woo commerce ajax general syntax is as follows:
add_action( 'wp_ajax_my_action', 'my_action_callback' );
add_action( 'wp_ajax_nopriv_my_action', 'my_action_callback' );
function my_action_callback()
{
// your code goes here
wp_die();
}
You should use wp_die() at end of the function.Because wordpress internally uses a filter during wp_die() function.So any plugin which is working using that filter may not work if we do not include the wp_die(). Also die() and other functions are immediately kill the PHP execution without considering any wordpress function which should be consider while terminating execution.
If you are using wp_send_json() inside you function like this
function my_action_callback()
{
// your code goes here
wp_send_json();
//wp_die(); not necessary to use wp_die();
}
Its not necessary to use wp_die() at the end if you include wp_send_json() inside callback function. because wordpress itself use wp_die() function safely inside wp_send_json() function.
| Q: Best way to end WordPress ajax request and why? Considering regular WordPress ajax requests like these:
add_action( 'wp_ajax_merrychristmas_happynewyear', array( $this, 'merrychristmas_happynewyear' ) );
add_action( 'wp_ajax_nopriv_merrychristmas_happynewyear', array( $this, 'merrychristmas_happynewyear' ) );
Will it be best to end function merrychristmas_happynewyear with die(), die(0), wp_die(), or something else and why?
A: For using wordpress ajax / woo commerce ajax general syntax is as follows:
add_action( 'wp_ajax_my_action', 'my_action_callback' );
add_action( 'wp_ajax_nopriv_my_action', 'my_action_callback' );
function my_action_callback()
{
// your code goes here
wp_die();
}
You should use wp_die() at end of the function.Because wordpress internally uses a filter during wp_die() function.So any plugin which is working using that filter may not work if we do not include the wp_die(). Also die() and other functions are immediately kill the PHP execution without considering any wordpress function which should be consider while terminating execution.
If you are using wp_send_json() inside you function like this
function my_action_callback()
{
// your code goes here
wp_send_json();
//wp_die(); not necessary to use wp_die();
}
Its not necessary to use wp_die() at the end if you include wp_send_json() inside callback function. because wordpress itself use wp_die() function safely inside wp_send_json() function.
A: Using wp_die() is the best of those options.
As others have noted, there are many reasons to prefer a WordPress-specific function over the plain die or exit:
*
*It allows other plugins to hook into the actions called by wp_die().
*It allows a special handler for exiting to be used based on context (the behavior of wp_die() is tailored based on whether the request is an Ajax request or not).
*It makes it possible to test your code.
The last one is more important, which is why I added that note to the Codex. If you want to create unit/integration tests for your code, you will not be able to test a function that calls exit or die directly. It will terminate the script, like it is supposed to. The way that WordPress's own tests are set up to avoid this (for the Ajax callbacks that it has tests for), is to hook into the actions triggered by wp_die() and throw an exception. This allows the exception to be caught within the test, and the output of the callback (if any) to be analyzed.
The only time that you would use die or exit is if you want to bypass any special handling from wp_die() and kill the execution immediately. There are some places where WordPress does this (and other places where it might use die directly just because the handling from wp_die() is not important, or nobody has attempted to create tests for a piece of code yet, so it was overlooked). Remember that this also makes your code more difficult to test, so it would generally only be used in code that isn't in a function body anyway (like WordPress does in admin-ajax.php). So if the handling from wp_die() is specifically not desired, or you are killing the script at a certain point as a precaution (like admin-ajax.php does, expecting that usually an Ajax callback will have already properly exited), then you might consider using die directly.
In terms of wp_die() vs wp_die( 0 ), which you should use depends on what is handling the response of that Ajax request on the front end. If it is expecting a particular response body, then you need to pass that message (or integer, in this case) to wp_die(). If all it is listening for is the response being successful (200 response code or whatever), then there is no need to pass anything to wp_die(). I would note, though, that ending with wp_die( 0 ) would make the response indistinguishable from the default admin-ajax.php response. So ending with 0 does not tell you whether your callback was hooked up properly and actually ran. A different message would be better.
As pointed out in other answers, you will often find wp_send_json() et al. to be helpful if you are sending a JSON response back, which is generally a good idea. This is also superior to just calling wp_die() with a code, because you can pass much more information back in a JSON object, if needed. Using wp_send_json_success() and wp_send_json_error() will also send the success/error message back in a standard format that any JS Ajax helper functions provided by WordPress will be able to understand (like wp.ajax).
TL;DR: You should probably always use wp_die(), whether in an Ajax callback or not. Even better, send information back with wp_send_json() and friends.
A: This is just in addition to what others said. The reason to prefer wp_die is that core can trigger actions there and plugins can properly complete things like tracing, monitoring, or caching.
In general you should always prefer a core API call over if one available as it is most likely adding some value (caching, plugin integration or whatever) which you don't get from the direct PHP call.
A: I will not accept this answer, this would not be fair. I just wanted to create an outline and possible hints on the items I find important:
The main definition of wp-die()
File: wp-includes/functions.php
2607: /**
2608: * Kill WordPress execution and display HTML message with error message.
2609: *
2610: * This function complements the `die()` PHP function. The difference is that
2611: * HTML will be displayed to the user. It is recommended to use this function
2612: * only when the execution should not continue any further. It is not recommended
2613: * to call this function very often, and try to handle as many errors as possible
2614: * silently or more gracefully.
2615: *
2616: * As a shorthand, the desired HTTP response code may be passed as an integer to
2617: * the `$title` parameter (the default title would apply) or the `$args` parameter.
2618: *
2619: * @since 2.0.4
2620: * @since 4.1.0 The `$title` and `$args` parameters were changed to optionally accept
2621: * an integer to be used as the response code.
2622: *
2623: * @param string|WP_Error $message Optional. Error message. If this is a WP_Error object,
2624: * and not an Ajax or XML-RPC request, the error's messages are used.
2625: * Default empty.
2626: * @param string|int $title Optional. Error title. If `$message` is a `WP_Error` object,
2627: * error data with the key 'title' may be used to specify the title.
2628: * If `$title` is an integer, then it is treated as the response
2629: * code. Default empty.
2630: * @param string|array|int $args {
2631: * Optional. Arguments to control behavior. If `$args` is an integer, then it is treated
2632: * as the response code. Default empty array.
2633: *
2634: * @type int $response The HTTP response code. Default 200 for Ajax requests, 500 otherwise.
2635: * @type bool $back_link Whether to include a link to go back. Default false.
2636: * @type string $text_direction The text direction. This is only useful internally, when WordPress
2637: * is still loading and the site's locale is not set up yet. Accepts 'rtl'.
2638: * Default is the value of is_rtl().
2639: * }
2640: */
2641: function wp_die( $message = '', $title = '', $args = array() ) {
2642:
2643: if ( is_int( $args ) ) {
2644: $args = array( 'response' => $args );
2645: } elseif ( is_int( $title ) ) {
2646: $args = array( 'response' => $title );
2647: $title = '';
2648: }
2649:
2650: if ( wp_doing_ajax() ) {
2651: /**
2652: * Filters the callback for killing WordPress execution for Ajax requests.
2653: *
2654: * @since 3.4.0
2655: *
2656: * @param callable $function Callback function name.
2657: */
2658: $function = apply_filters( 'wp_die_ajax_handler', '_ajax_wp_die_handler' );
2659: } elseif ( defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST ) {
2660: /**
2661: * Filters the callback for killing WordPress execution for XML-RPC requests.
2662: *
2663: * @since 3.4.0
2664: *
2665: * @param callable $function Callback function name.
2666: */
2667: $function = apply_filters( 'wp_die_xmlrpc_handler', '_xmlrpc_wp_die_handler' );
2668: } else {
2669: /**
2670: * Filters the callback for killing WordPress execution for all non-Ajax, non-XML-RPC requests.
2671: *
2672: * @since 3.0.0
2673: *
2674: * @param callable $function Callback function name.
2675: */
2676: $function = apply_filters( 'wp_die_handler', '_default_wp_die_handler' );
2677: }
2678:
2679: call_user_func( $function, $message, $title, $args );
2680: }
wp_send_json
File: wp-includes/functions.php
3144: /**
3145: * Send a JSON response back to an Ajax request.
3146: *
3147: * @since 3.5.0
3148: * @since 4.7.0 The `$status_code` parameter was added.
3149: *
3150: * @param mixed $response Variable (usually an array or object) to encode as JSON,
3151: * then print and die.
3152: * @param int $status_code The HTTP status code to output.
3153: */
3154: function wp_send_json( $response, $status_code = null ) {
3155: @header( 'Content-Type: application/json; charset=' . get_option( 'blog_charset' ) );
3156: if ( null !== $status_code ) {
3157: status_header( $status_code );
3158: }
3159: echo wp_json_encode( $response );
3160:
3161: if ( wp_doing_ajax() ) {
3162: wp_die( '', '', array(
3163: 'response' => null,
3164: ) );
3165: } else {
3166: die;
3167: }
3168: }
wp_doing_ajax
File: wp-includes/load.php
1044: /**
1045: * Determines whether the current request is a WordPress Ajax request.
1046: *
1047: * @since 4.7.0
1048: *
1049: * @return bool True if it's a WordPress Ajax request, false otherwise.
1050: */
1051: function wp_doing_ajax() {
1052: /**
1053: * Filters whether the current request is a WordPress Ajax request.
1054: *
1055: * @since 4.7.0
1056: *
1057: * @param bool $wp_doing_ajax Whether the current request is a WordPress Ajax request.
1058: */
1059: return apply_filters( 'wp_doing_ajax', defined( 'DOING_AJAX' ) && DOING_AJAX );
1060: }
Typically what we get from ajax call is some kind of the response.
The response may be encoded in json or may not be encoded in json.
In case we need json outupt wp_send_json or two satelites are great idea.
However, we may return x-www-form-urlencoded or multipart/form-data or text/xml or any other encoding type. In that case we don't use wp_send_json.
We may return the whole html and in that case it has sense to use wp_die() first and second parameter, else these parameters should be empty.
wp_die( '', '', array(
'response' => null,
) );
But what is a benefit of calling wp_die() without parameters?
Finaly, if you check the great WP core you may find
File: wp-includes/class-wp-ajax-response.php
139: /**
140: * Display XML formatted responses.
141: *
142: * Sets the content type header to text/xml.
143: *
144: * @since 2.1.0
145: */
146: public function send() {
147: header( 'Content-Type: text/xml; charset=' . get_option( 'blog_charset' ) );
148: echo "<?xml version='1.0' encoding='" . get_option( 'blog_charset' ) . "' standalone='yes'?><wp_ajax>";
149: foreach ( (array) $this->responses as $response )
150: echo $response;
151: echo '</wp_ajax>';
152: if ( wp_doing_ajax() )
153: wp_die();
154: else
155: die();
Both formats are used die() and wp_die(). Can you explain why?
Finally here is what admin-ajax.php returns die( '0' );
Why not wp_die(...)?
A: From the codex AJAX in Plugins
add_action( 'wp_ajax_my_action', 'my_action_callback' );
function my_action_callback() {
global $wpdb; // this is how you get access to the database
$whatever = intval( $_POST['whatever'] );
$whatever += 10;
echo $whatever;
wp_die(); // this is required to terminate immediately and return a proper response
}
Notice the use of wp_die(), instead of die() or exit(). Most of the
time you should be using wp_die() in your Ajax callback function. This
provides better integration with WordPress and makes it easier to test
your code.
A: You can also use wp_send_json() described in the Codex as send a JSON response back to an AJAX request, and die().
So, if you have to return an array, you only have end your function with wp_send_json($array_with_values);. No need to echo or die.
You also get two help helper functions wp_send_json_success() and wp_send_json_error() which adds a key named success which will be true or false respectively.
For example:
$array_val = range( 1,10 );
var_dump( wp_send_json_error( $array_val ) ); # Output: {"success":false,"data":[1,2,3,4,5,6,7,8,9,10]}
echo 'Hey there'; # Not executed because already died.
A: Use wp_die(). It is better to use WordPress functions as much as you can.
A: If you use echo, it will force you to use die() or die(0) or wp_die().
If you don’t use echo, JavaScript can handle that.
Then you should use a better way to return data: wp_send_json().
To send data in your callback (in json format), you can use followings:
wp_send_json()
wp_send_json_success()
wp_send_json_error()
All of them will die for you. No need to exit or die afterwards.
UPDATE
And if you don't need json as output format, you should use:
wp_die($response)
It will return your response before it dies. As per the codex:
The function wp_die() is designed to give output just before it dies
to avoid empty or time-outing responses.
Please read full codex article here.
| wordpress | {
"language": "en",
"length": 2155,
"provenance": "stackexchange_00019.jsonl.gz:471395",
"question_score": "24",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/250280"
} | [
0.09051513671875,
0.005184173583984375,
-0.02423095703125,
-0.09564208984375,
0.045318603515625,
-0.039794921875,
0.0007925033569335938,
0.001445770263671875,
0.045166015625,
0.0204315185546875,
0.0128021240234375,
-0.043853759765625,
0.034881591796875,
-0.042327880859375,
-0.025634765625,
-0.0013151168823242188,
0.055389404296875,
-0.025848388671875,
0.01160430908203125,
0.011474609375,
-0.0166778564453125,
0.046966552734375,
0.0037384033203125,
0.048065185546875,
-0.00914764404296875,
-0.012725830078125,
0.07696533203125,
-0.0221405029296875,
-0.006374359130859375,
-0.0262451171875,
0.003265380859375,
0.0011444091796875,
-0.0028972625732421875,
0.063720703125,
-0.03790283203125,
0.0159149169921875,
-0.0070037841796875,
0.04046630859375,
0.018310546875,
0.046661376953125,
0.0222320556640625,
-0.0086517333984375,
0.00986480712890625,
-0.0009469985961914062,
-0.0031299591064453125,
-0.030487060546875,
0.038848876953125,
-0.038055419921875,
-0.01025390625,
0.01166534423828125,
0.029052734375,
-0.01497650146484375,
0.0232696533203125,
-0.0024776458740234375,
-0.01873779296875,
-0.006420135498046875,
-0.035400390625,
0.017486572265625,
0.0323486328125,
0.049041748046875,
-0.01038360595703125,
-0.01207733154296875,
-0.0025234222412109375,
-0.059661865234375,
0.050811767578125,
0.000263214111328125,
0.049224853515625,
0.02740478515625,
-0.0330810546875,
0.06036376953125,
0.04742431640625,
-0.036865234375,
-0.00029087066650390625,
-0.00959014892578125,
0.006557464599609375,
-0.005840301513671875,
0.00496673583984375,
0.0098114013671875,
-0.0099639892578125,
0.02752685546875,
-0.001483917236328125,
-0.041900634765625,
-0.0004839897155761719,
-0.0181121826171875,
0.0168914794921875,
-0.0104827880859375,
-0.00008732080459594727,
0.00785064697265625,
-0.042755126953125,
-0.06683349609375,
-0.03131103515625,
-0.05645751953125,
-0.040252685546875,
-0.029998779296875,
-0.0234527587890625,
-0.040771484375,
-0.0029582977294921875,
-0.0350341796875,
-0.0021762847900390625,
-0.004180908203125,
0.04925537109375,
-0.04095458984375,
0.020904541015625,
0.0006937980651855469,
0.021759033203125,
0.065185546875,
-0.018402099609375,
-0.015594482421875,
0.03741455078125,
0.011474609375,
0.00847625732421875,
0.004093170166015625,
-0.01215362548828125,
-0.035888671875,
0.01763916015625,
0.005283355712890625,
-0.041351318359375,
0.0596923828125,
0.0113677978515625,
0.02239990234375,
-0.0234832763671875,
-0.020416259765625,
0.0266571044921875,
0.032989501953125,
0.018341064453125,
0.01690673828125,
-0.029144287109375,
0.014678955078125,
0.0400390625,
0.032196044921875,
-0.034637451171875,
0.0029048919677734375,
0.03656005859375,
-0.01346588134765625,
0.0009698867797851562,
-0.0239410400390625,
0.001186370849609375,
0.03704833984375,
0.0268402099609375,
0.0013647079467773438,
0.0225982666015625,
-0.034759521484375,
0.0045318603515625,
0.04541015625,
0.041748046875,
-0.038330078125,
0.0008873939514160156,
0.0289154052734375,
0.0352783203125,
0.04705810546875,
0.0057525634765625,
-0.0046844482421875,
0.018035888671875,
0.0034332275390625,
0.009429931640625,
0.0008497238159179688,
0.0014438629150390625,
-0.01605224609375,
0.01477813720703125,
0.0020885467529296875,
-0.0203704833984375,
0.0088348388671875,
0.03570556640625,
-0.048797607421875,
-0.031036376953125,
-0.0101165771484375,
-0.048828125,
-0.0082244873046875,
0.0261993408203125,
0.0291900634765625,
0.017852783203125,
-0.0259246826171875,
0.0221099853515625,
-0.007232666015625,
-0.0246429443359375,
0.01314544677734375,
-0.0153656005859375,
0.05120849609375,
0.047576904296875,
-0.045135498046875,
-0.040313720703125,
-0.04046630859375,
0.11224365234375,
-0.03900146484375,
-0.047576904296875,
0.0782470703125,
0.010284423828125,
0.07489013671875,
-0.009857177734375,
0.01526641845703125,
0.00997161865234375,
0.052001953125,
-0.009918212890625,
0.017303466796875,
0.01318359375,
-0.054718017578125,
-0.013671875,
-0.0307159423828125,
-0.013885498046875,
0.00860595703125,
0.032379150390625,
0.042388916015625,
-0.0178680419921875,
0.00980377197265625,
-0.0958251953125,
0.04400634765625,
-0.04339599609375,
0.048980712890625,
0.0129241943359375,
0.047210693359375,
0.01458740234375,
0.04852294921875,
-0.035430908203125,
-0.00736236572265625,
-0.020477294921875,
-0.0175018310546875,
-0.03179931640625,
0.078857421875,
0.0005030632019042969,
0.0625,
-0.0181121826171875,
-0.044677734375,
0.0078887939453125,
-0.0253753662109375,
0.06011962890625,
0.0243377685546875,
-0.043548583984375,
-0.015411376953125,
0.042449951171875,
0.013214111328125,
-0.00702667236328125,
0.064208984375,
0.030609130859375,
0.0187530517578125,
-0.0142669677734375,
-0.011810302734375,
-0.0217132568359375,
-0.07891845703125,
0.0018749237060546875,
0.060791015625,
0.0177001953125,
0.0380859375,
-0.0215911865234375,
-0.0042877197265625,
0.0156402587890625,
-0.0869140625,
-0.015167236328125,
-0.007503509521484375,
0.004505157470703125,
-0.007472991943359375,
-0.016265869140625,
-0.036956787109375,
0.034393310546875,
-0.078369140625,
0.00962066650390625,
0.02716064453125,
-0.0170440673828125,
-0.0556640625,
0.00820159912109375,
-0.0147857666015625,
0.02764892578125,
-0.03985595703125,
-0.0615234375,
0.0015192031860351562,
0.0052490234375,
-0.02447509765625,
0.01044464111328125,
0.02008056640625,
0.0199127197265625,
-0.035369873046875,
0.017242431640625,
-0.00249481201171875,
-0.01479339599609375,
0.060333251953125,
0.0721435546875,
-0.004596710205078125,
-0.043182373046875,
-0.0192718505859375,
-0.0234832763671875,
0.03955078125,
-0.01152801513671875,
0.049102783203125,
0.01418304443359375,
-0.027587890625,
-0.004932403564453125,
0.0244598388671875,
0.001605987548828125,
-0.058258056640625,
0.055572509765625,
0.0161285400390625,
0.044036865234375,
0.016693115234375,
0.0021038055419921875,
0.038543701171875,
-0.005130767822265625,
-0.03448486328125,
0.051422119140625,
0.037017822265625,
-0.01336669921875,
0.0295562744140625,
0.0009756088256835938,
0.01351165771484375,
0.020477294921875,
-0.0290069580078125,
0.007190704345703125,
0.00939178466796875,
0.0255126953125,
-0.039520263671875,
-0.05206298828125,
0.006290435791015625,
-0.06268310546875,
-0.0007967948913574219,
0.0406494140625,
0.0836181640625,
0.02032470703125,
-0.042327880859375,
0.0345458984375,
0.058135986328125,
-0.053436279296875,
-0.10614013671875,
0.02288818359375,
-0.0235595703125,
0.0218048095703125,
-0.0018253326416015625,
-0.0092010498046875,
-0.04296875,
0.01010894775390625,
0.00366973876953125,
-0.026611328125,
0.0058746337890625,
0.002101898193359375,
-0.044525146484375,
-0.0262908935546875,
-0.031829833984375,
-0.004062652587890625,
-0.0078277587890625,
-0.00469970703125,
0.00922393798828125,
-0.007549285888671875,
-0.01123809814453125,
-0.00823211669921875,
0.01561737060546875,
-0.031982421875,
-0.05938720703125,
0.003948211669921875,
-0.002887725830078125,
-0.01397705078125,
0.01523590087890625,
0.02935791015625,
0.02496337890625,
-0.03582763671875,
-0.003143310546875,
-0.016754150390625,
0.021759033203125,
0.025390625,
0.05908203125,
0.0139923095703125,
0.035675048828125,
0.04339599609375,
-0.0189971923828125,
-0.031005859375,
0.01161956787109375,
-0.03021240234375,
0.024078369140625,
0.046417236328125,
-0.0374755859375,
0.00946044921875,
0.014801025390625,
-0.006511688232421875,
0.025177001953125,
-0.0210113525390625,
-0.0030517578125,
0.0556640625,
-0.0157928466796875,
-0.011260986328125,
-0.0148468017578125,
0.031036376953125,
-0.0203704833984375,
-0.036651611328125,
0.0033245086669921875,
-0.00494384765625,
-0.00199127197265625,
-0.0193023681640625,
-0.03631591796875,
0.0029735565185546875,
0.0179443359375,
-0.0162353515625,
-0.00887298583984375,
0.00792694091796875,
-0.0014715194702148438,
-0.0029392242431640625,
0.0240631103515625,
0.060791015625,
-0.0245819091796875,
-0.0204620361328125,
-0.006969451904296875,
-0.032623291015625,
-0.0017681121826171875,
-0.00545501708984375,
0.0234222412109375,
-0.019866943359375,
0.0027446746826171875,
-0.0188446044921875,
0.00408172607421875,
-0.0186004638671875,
0.030914306640625,
-0.0273284912109375,
-0.036407470703125,
0.005962371826171875,
-0.0252685546875,
-0.021942138671875,
0.01509857177734375,
-0.037200927734375,
-0.019500732421875,
-0.0001838207244873047,
-0.0284881591796875,
-0.0467529296875,
0.022918701171875,
-0.0849609375,
0.0228424072265625,
0.046051025390625,
-0.037872314453125,
-0.0150146484375,
0.0054473876953125,
0.0170745849609375,
0.037689208984375,
-0.00405120849609375,
-0.035614013671875,
0.01345062255859375,
0.0467529296875,
0.0296478271484375,
0.0191192626953125,
-0.00799560546875,
-0.005313873291015625,
-0.038330078125,
-0.005157470703125,
-0.007213592529296875,
-0.0171661376953125,
0.04095458984375,
-0.030303955078125,
-0.126220703125,
-0.06298828125,
0.00439453125,
0.004673004150390625,
-0.0136566162109375,
0.01300048828125,
-0.0576171875,
-0.08892822265625,
0.01275634765625,
-0.0002923011779785156,
0.003108978271484375,
0.012481689453125,
0.03924560546875,
0.0145416259765625,
-0.0085296630859375,
-0.039093017578125,
0.0075836181640625,
0.0253753662109375,
-0.0029125213623046875,
0.0074920654296875,
-0.03521728515625,
-0.032379150390625,
0.091064453125,
-0.029388427734375,
0.031707763671875,
-0.06378173828125,
0.08428955078125,
0.004512786865234375,
0.015594482421875,
0.0180511474609375,
0.00926971435546875,
-0.007965087890625,
0.00907135009765625,
-0.014251708984375,
-0.0006566047668457031,
0.04156494140625,
0.0117645263671875,
-0.0673828125,
0.0555419921875,
0.007495880126953125,
-0.0146026611328125,
0.0036792755126953125,
0.01800537109375,
0.0511474609375,
0.046630859375,
-0.0102081298828125,
0.023956298828125,
0.01383209228515625,
0.015228271484375,
-0.032745361328125,
-0.024139404296875,
-0.027801513671875,
0.0174407958984375,
-0.0027828216552734375,
0.003215789794921875,
-0.01219940185546875,
0.016876220703125,
-0.0181427001953125,
0.0008091926574707031,
0.00989532470703125,
-0.10211181640625,
0.003643035888671875,
0.00774383544921875,
-0.02734375,
-0.00330352783203125,
0.0181121826171875,
0.007587432861328125,
-0.01038360595703125,
-0.00875091552734375,
-0.00018465518951416016,
-0.01369476318359375,
-0.022430419921875,
0.0220947265625,
0.0169677734375,
-0.000705718994140625,
-0.0299835205078125,
0.07598876953125,
0.061859130859375,
0.0009059906005859375,
-0.037872314453125,
0.076171875,
0.0003819465637207031,
0.051513671875,
0.006847381591796875,
-0.021087646484375,
-0.005828857421875,
0.018096923828125,
-0.045440673828125,
-0.02777099609375,
-0.027130126953125,
0.0227203369140625,
0.00882720947265625,
-0.0006022453308105469,
0.0203857421875,
0.0167694091796875,
0.035186767578125,
-0.021820068359375,
0.0263214111328125,
0.039337158203125,
-0.0053863525390625,
-0.024505615234375,
-0.041961669921875,
0.01264190673828125,
0.032958984375,
0.026336669921875,
-0.01279449462890625,
0.01479339599609375,
0.0015344619750976562,
-0.0083160400390625,
0.00016009807586669922,
-0.0262908935546875,
-0.0160369873046875,
-0.006366729736328125,
-0.01018524169921875,
-0.01371002197265625,
-0.033721923828125,
-0.0097198486328125,
-0.0296478271484375,
-0.024444580078125,
0.0555419921875,
-0.0335693359375,
0.0018739700317382812,
-0.0004260540008544922,
-0.01319122314453125,
0.00879669189453125,
0.01207733154296875,
0.061126708984375,
0.03277587890625,
-0.04681396484375,
0.0051422119140625,
-0.022705078125,
-0.01641845703125,
0.010406494140625,
-0.00798797607421875,
-0.022979736328125,
-0.0305633544921875,
0.016571044921875,
0.025299072265625,
0.00688934326171875,
-0.0203704833984375,
0.01016998291015625,
0.003162384033203125,
-0.006984710693359375,
0.0289764404296875,
-0.0008416175842285156,
0.039306640625,
-0.0191802978515625,
0.056427001953125,
0.0027103424072265625,
-0.00722503662109375,
-0.02618408203125,
-0.01273345947265625,
0.0096893310546875,
-0.020477294921875,
0.00295257568359375,
-0.042816162109375,
0.00010591745376586914,
-0.00862884521484375,
0.047821044921875,
-0.012481689453125,
0.0014286041259765625,
0.01055908203125,
-0.003459930419921875,
0.00665283203125,
0.0012025833129882812,
0.0506591796875,
-0.009735107421875,
0.04559326171875,
-0.01178741455078125,
0.013214111328125,
-0.0196380615234375,
-0.0091400146484375,
0.0167083740234375,
-0.0157928466796875,
0.002468109130859375,
0.0179901123046875,
0.0004916191101074219,
-0.005893707275390625,
0.019134521484375,
-0.0136871337890625,
0.0287933349609375,
-0.0111236572265625,
0.018646240234375,
0.0189971923828125,
0.06890869140625,
-0.032073974609375,
-0.0853271484375,
0.0192108154296875,
0.019989013671875,
-0.026519775390625,
0.0160369873046875,
-0.00753021240234375,
0.01177978515625,
0.04364013671875,
0.06378173828125,
-0.057098388671875,
0.0035190582275390625,
0.0155181884765625,
-0.055450439453125,
-0.0193328857421875,
-0.038970947265625,
0.01312255859375,
-0.026947021484375,
0.07586669921875,
0.02374267578125,
-0.02191162109375,
0.011077880859375,
-0.01009368896484375,
0.0190887451171875,
-0.0042724609375,
0.0201873779296875,
-0.0130462646484375,
-0.07672119140625,
0.01441192626953125,
0.034820556640625,
0.00966644287109375,
0.0191497802734375,
0.0122833251953125,
-0.02606201171875,
-0.0178985595703125,
-0.018218994140625,
-0.00045013427734375,
-0.0343017578125,
-0.014007568359375,
0.0026264190673828125,
0.00925445556640625,
0.04754638671875,
0.07952880859375,
-0.0283050537109375,
0.0208740234375,
0.042388916015625,
0.015838623046875,
-0.0341796875,
-0.0159149169921875,
0.0386962890625,
0.02093505859375,
-0.07720947265625,
0.0318603515625,
-0.05242919921875,
-0.0155487060546875,
-0.007671356201171875,
0.005123138427734375,
0.059356689453125,
-0.0584716796875,
0.01294708251953125,
0.039794921875,
0.043853759765625,
-0.0191802978515625,
-0.006206512451171875,
0.03253173828125,
-0.028411865234375,
0.0020904541015625,
0.00013363361358642578,
-0.0236968994140625,
-0.03778076171875,
-0.03082275390625,
-0.0240478515625,
0.125732421875,
0.00640106201171875,
-0.033172607421875,
-0.009033203125,
0.06329345703125,
-0.0218658447265625,
0.049591064453125,
-0.0142974853515625,
0.028564453125,
-0.024169921875,
0.0161590576171875,
-0.0240478515625,
0.0112152099609375,
0.005031585693359375,
0.01407623291015625,
0.00814056396484375,
0.00020062923431396484,
0.005558013916015625,
-0.033843994140625,
-0.01418304443359375,
0.0127105712890625,
-0.022796630859375,
0.0041961669921875,
-0.0182647705078125,
-0.0214691162109375,
0.00481414794921875,
-0.0038242340087890625,
0.0287933349609375,
0.0032958984375,
-0.033416748046875,
0.022705078125,
0.00931549072265625,
0.0217132568359375,
-0.003322601318359375,
0.0316162109375,
-0.01092529296875,
-0.00045418739318847656,
0.019989013671875,
0.0053863525390625,
-0.0273895263671875,
0.01157379150390625,
0.00759124755859375,
-0.033416748046875,
0.00858306884765625,
-0.031707763671875,
0.02587890625,
0.011260986328125,
0.01201629638671875,
0.037994384765625,
0.003787994384765625,
0.003398895263671875,
0.024322509765625,
0.00005930662155151367,
0.0157470703125,
0.031768798828125,
0.0254669189453125,
0.0230255126953125,
0.03265380859375,
-0.03179931640625,
-0.014495849609375,
0.0316162109375,
0.055877685546875,
-0.03704833984375,
-0.037261962890625,
-0.0140380859375,
0.0022678375244140625,
0.050811767578125,
0.0035190582275390625,
0.080078125,
-0.046844482421875,
-0.04620361328125,
-0.03668212890625,
0.00196075439453125,
0.011749267578125,
0.04010009765625,
-0.0038242340087890625,
0.034210205078125,
-0.03509521484375,
-0.043060302734375,
-0.00092315673828125,
-0.01418304443359375,
0.0259857177734375,
0.02337646484375,
-0.009490966796875,
0.049346923828125,
-0.018402099609375,
-0.006336212158203125,
-0.00789642333984375,
0.01428985595703125,
-0.0028839111328125,
0.0025577545166015625,
-0.013916015625,
-0.04150390625,
0.0072021484375,
0.029754638671875,
0.01270294189453125,
0.06463623046875,
0.0230865478515625,
0.039886474609375,
0.05609130859375,
0.015960693359375,
0.0537109375,
-0.008209228515625,
-0.00925445556640625,
-0.0296630859375,
0.0087127685546875,
0.0121612548828125,
0.005161285400390625,
0.01494598388671875,
0.0235137939453125,
0.0006947517395019531,
-0.04656982421875,
0.01441192626953125,
-0.01206207275390625,
-0.032440185546875,
0.025238037109375,
-0.02093505859375,
0.08892822265625,
-0.033111572265625,
-0.035888671875,
-0.02374267578125,
-0.0209503173828125,
0.06341552734375,
-0.0135955810546875,
0.003978729248046875,
0.004093170166015625,
0.050323486328125,
-0.0306243896484375,
-0.00022482872009277344,
0.0298004150390625,
0.0163726806640625,
-0.050140380859375,
-0.003948211669921875,
0.049285888671875,
-0.037139892578125,
0.00360870361328125,
-0.004405975341796875,
0.01385498046875,
0.042938232421875,
0.030517578125,
0.030487060546875,
-0.01190185546875,
0.0242767333984375,
0.006740570068359375,
-0.0307464599609375,
0.025054931640625,
0.00693511962890625,
0.005039215087890625,
-0.0051116943359375,
-0.012542724609375,
-0.019775390625,
-0.038665771484375,
-0.0157012939453125,
0.011688232421875,
-0.0239105224609375,
0.0048980712890625,
-0.0266571044921875,
0.0264892578125,
-0.003444671630859375,
0.05511474609375,
-0.017608642578125,
-0.0259246826171875,
-0.048858642578125,
-0.0184783935546875,
0.03997802734375,
0.0238800048828125,
-0.0031108856201171875,
-0.003993988037109375,
-0.00685882568359375,
-0.025604248046875,
0.00962066650390625,
-0.01221466064453125,
0.00505828857421875,
0.0229034423828125,
-0.01174163818359375,
0.0021114349365234375,
0.0218505859375,
-0.0190277099609375,
0.0272216796875,
0.00420379638671875,
0.0168914794921875,
0.01381683349609375,
-0.06103515625,
-0.031829833984375,
0.01751708984375,
0.0235748291015625,
0.0009670257568359375,
0.0177001953125,
-0.02947998046875,
-0.013824462890625,
0.00757598876953125,
0.0258026123046875,
-0.0016498565673828125,
0.0088653564453125,
-0.0231781005859375,
-0.0181732177734375,
0.0266265869140625,
-0.03240966796875,
0.04376220703125,
-0.0287322998046875,
0.046417236328125,
-0.0029239654541015625,
-0.0225677490234375,
-0.002231597900390625,
-0.03472900390625,
0.0071258544921875,
0.005687713623046875,
0.0296783447265625,
-0.021392822265625,
0.0146026611328125,
-0.0237274169921875,
-0.073974609375,
-0.0120697021484375,
0.0889892578125,
-0.0281524658203125,
-0.0204315185546875,
0.002315521240234375,
0.004856109619140625,
-0.0022602081298828125,
-0.0523681640625,
-0.0242767333984375,
-0.0172271728515625,
-0.0078125,
-0.0087738037109375,
0.033416748046875,
-0.0003197193145751953,
-0.0308074951171875,
-0.0272979736328125,
0.00464630126953125,
-0.01448822021484375,
-0.00811004638671875,
0.039093017578125,
-0.0181884765625,
0.0099334716796875,
-0.0173797607421875,
-0.028564453125,
0.05963134765625,
0.01039886474609375,
-0.0167694091796875,
-0.033905029296875,
-0.009307861328125,
-0.0016412734985351562,
0.0121917724609375,
-0.0269012451171875,
0.00939178466796875,
-0.02764892578125,
0.0246734619140625,
0.00728607177734375,
0.0253143310546875,
0.00732421875,
-0.0203094482421875,
0.009185791015625,
0.0289459228515625,
0.03521728515625,
0.005725860595703125,
-0.025726318359375,
-0.0003476142883300781,
0.0584716796875,
0.033111572265625,
-0.005126953125,
0.052093505859375,
0.037109375,
0.004062652587890625,
-0.01271820068359375,
0.0026645660400390625,
0.035247802734375,
0.045257568359375,
0.04547119140625,
-0.0015230178833007812,
-0.00815582275390625,
-0.058319091796875,
-0.0399169921875,
-0.01538848876953125,
0.043609619140625,
-0.00881195068359375,
-0.0306396484375,
-0.0109100341796875,
0.01404571533203125,
-0.038665771484375,
-0.0195465087890625,
0.0006237030029296875,
0.0007810592651367188,
-0.025726318359375,
0.0127105712890625,
0.016937255859375,
-0.0007948875427246094,
-0.00359344482421875,
-0.0021572113037109375,
0.033447265625,
-0.0184783935546875,
0.0015621185302734375,
0.0203399658203125,
-0.00768280029296875,
0.01104736328125,
0.0469970703125,
0.01317596435546875,
0.054718017578125,
-0.062103271484375,
-0.0050811767578125,
0.0063323974609375,
0.03759765625,
-0.047882080078125,
-0.01181793212890625,
-0.0057525634765625,
0.01494598388671875,
-0.007167816162109375,
0.033111572265625,
0.04095458984375,
-0.004608154296875,
0.0079803466796875,
-0.0135650634765625,
-0.04620361328125,
0.06732177734375,
-0.005191802978515625,
0.0030364990234375,
0.0445556640625,
0.00946044921875,
0.12457275390625,
-0.0285797119140625,
0.00200653076171875,
0.03839111328125,
0.01268768310546875,
0.0017881393432617188,
0.008056640625,
0.043914794921875,
0.023101806640625,
-0.0034008026123046875
] |
3145ad67d7898d3f5019238cb821d92fcd6e8b03 | Wordpress Stackexchange
Q: Why "Contact Form 7" doesn't update PHPmailer library? I realized that popular Wordpress plugin Contact Form 7 uses this library https://github.com/PHPMailer/PHPMailer.
When I check source of mail, which has been sended from Contact Form 7, it looks like this:
X-Mailer: PHPMailer 5.2.14 (https://github.com/PHPMailer/PHPMailer)
X-WPCF7-Content-Type: text/plain
So, this version is from (Nov 1st 2015).
https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md
The latests one is:
Version 5.2.18 (December 24th 2016)
SECURITY Critical security update for CVE-2016-10033 please update now! Thanks to Dawid Golunski.
Why Contact Form 7 uses old versions of PHPMailer?
A: PHPMailer is not part of the plugin, it is shipped with WordPress. So it is up to WordPress to keep it up to date. There is a patch already in ticket #37210.
In the mean time, you can create a mu-plugin, include the newer version of PHPMailer here, create an instance and assign it to the global variable $phpmailer. WordPress will then use that instead of its own outdated version. But be aware that WordPress’ version has some changes that are not compatible with the original class, so you might break some plugins.
| Q: Why "Contact Form 7" doesn't update PHPmailer library? I realized that popular Wordpress plugin Contact Form 7 uses this library https://github.com/PHPMailer/PHPMailer.
When I check source of mail, which has been sended from Contact Form 7, it looks like this:
X-Mailer: PHPMailer 5.2.14 (https://github.com/PHPMailer/PHPMailer)
X-WPCF7-Content-Type: text/plain
So, this version is from (Nov 1st 2015).
https://github.com/PHPMailer/PHPMailer/blob/master/changelog.md
The latests one is:
Version 5.2.18 (December 24th 2016)
SECURITY Critical security update for CVE-2016-10033 please update now! Thanks to Dawid Golunski.
Why Contact Form 7 uses old versions of PHPMailer?
A: PHPMailer is not part of the plugin, it is shipped with WordPress. So it is up to WordPress to keep it up to date. There is a patch already in ticket #37210.
In the mean time, you can create a mu-plugin, include the newer version of PHPMailer here, create an instance and assign it to the global variable $phpmailer. WordPress will then use that instead of its own outdated version. But be aware that WordPress’ version has some changes that are not compatible with the original class, so you might break some plugins.
| wordpress | {
"language": "en",
"length": 180,
"provenance": "stackexchange_00019.jsonl.gz:471408",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/250315"
} | [
0.035247802734375,
-0.0125732421875,
-0.048797607421875,
-0.0654296875,
-0.0007925033569335938,
-0.032562255859375,
-0.00943756103515625,
0.0261383056640625,
0.040771484375,
-0.01251983642578125,
-0.0181884765625,
-0.0302734375,
-0.011260986328125,
-0.037506103515625,
0.01239776611328125,
-0.0309295654296875,
0.0181121826171875,
0.01470184326171875,
0.01177978515625,
-0.032012939453125,
0.027435302734375,
-0.0225677490234375,
0.002288818359375,
0.08441162109375,
-0.0298614501953125,
0.0179901123046875,
0.059906005859375,
-0.00777435302734375,
-0.03863525390625,
-0.0345458984375,
-0.006870269775390625,
0.025665283203125,
0.048187255859375,
0.053009033203125,
-0.1092529296875,
-0.041717529296875,
0.02587890625,
-0.01102447509765625,
-0.04547119140625,
0.067138671875,
0.01441192626953125,
-0.00001823902130126953,
0.043975830078125,
-0.0343017578125,
0.004791259765625,
-0.0269927978515625,
0.024017333984375,
-0.03021240234375,
0.0178070068359375,
0.028350830078125,
-0.0218963623046875,
0.0133514404296875,
-0.0263824462890625,
0.018157958984375,
-0.0020275115966796875,
-0.0205841064453125,
-0.01320648193359375,
0.0531005859375,
-0.003505706787109375,
-0.00344085693359375,
-0.0034923553466796875,
0.06854248046875,
-0.0026397705078125,
0.025604248046875,
-0.00970458984375,
-0.0034999847412109375,
0.0193939208984375,
-0.0101318359375,
-0.03564453125,
-0.0118865966796875,
0.0479736328125,
-0.0130462646484375,
0.017791748046875,
-0.042999267578125,
0.0166778564453125,
0.0215301513671875,
0.0008702278137207031,
0.0174407958984375,
0.006259918212890625,
0.0005955696105957031,
0.005367279052734375,
-0.06854248046875,
-0.052398681640625,
0.00006759166717529297,
0.0234375,
0.034210205078125,
0.0074310302734375,
-0.00762939453125,
-0.0272979736328125,
-0.031585693359375,
-0.02825927734375,
-0.0257415771484375,
-0.045379638671875,
-0.00722503662109375,
-0.006103515625,
-0.0213470458984375,
-0.010772705078125,
-0.01038360595703125,
-0.01168060302734375,
-0.012054443359375,
0.01029205322265625,
-0.013824462890625,
-0.0187225341796875,
0.00508880615234375,
-0.0160064697265625,
0.07086181640625,
0.007190704345703125,
0.0199737548828125,
0.0007104873657226562,
-0.003871917724609375,
0.01374053955078125,
-0.00125885009765625,
-0.0102996826171875,
-0.0217132568359375,
-0.003353118896484375,
0.01525115966796875,
-0.044830322265625,
0.05950927734375,
0.00804901123046875,
0.0596923828125,
-0.022369384765625,
0.0236358642578125,
0.013946533203125,
-0.07183837890625,
-0.0012340545654296875,
-0.03143310546875,
-0.00724029541015625,
-0.01629638671875,
0.03656005859375,
0.01114654541015625,
-0.009307861328125,
0.0038738250732421875,
0.004795074462890625,
0.03594970703125,
0.00701904296875,
0.0057525634765625,
-0.0142059326171875,
0.01551055908203125,
-0.00970458984375,
0.0092620849609375,
-0.035614013671875,
-0.03497314453125,
0.028045654296875,
-0.0165252685546875,
-0.009979248046875,
0.029083251953125,
0.019317626953125,
-0.008758544921875,
-0.005401611328125,
-0.03173828125,
-0.0269622802734375,
-0.01425933837890625,
0.0265960693359375,
0.034393310546875,
-0.0010480880737304688,
0.052490234375,
0.060455322265625,
-0.01214599609375,
-0.06170654296875,
-0.028076171875,
0.01096343994140625,
-0.026885986328125,
0.003177642822265625,
-0.0214996337890625,
-0.0291290283203125,
0.0307769775390625,
-0.0687255859375,
-0.004238128662109375,
0.009063720703125,
-0.0645751953125,
0.017333984375,
-0.0039215087890625,
0.00040721893310546875,
0.00019824504852294922,
0.0240325927734375,
0.029632568359375,
-0.00560760498046875,
0.056365966796875,
0.026702880859375,
-0.0310516357421875,
-0.046905517578125,
-0.052154541015625,
0.0784912109375,
-0.0347900390625,
-0.0237274169921875,
0.014923095703125,
-0.006000518798828125,
-0.0187225341796875,
0.001068115234375,
-0.00372314453125,
0.03619384765625,
0.049072265625,
0.005977630615234375,
0.06494140625,
-0.04034423828125,
-0.0298309326171875,
-0.0144195556640625,
0.051300048828125,
-0.042999267578125,
-0.0445556640625,
-0.011688232421875,
-0.0111846923828125,
0.0080718994140625,
-0.004428863525390625,
-0.053253173828125,
-0.006439208984375,
-0.03240966796875,
0.0196990966796875,
-0.01155853271484375,
0.0162353515625,
0.0225830078125,
0.0010929107666015625,
-0.037750244140625,
0.0175628662109375,
-0.006561279296875,
-0.0224761962890625,
-0.02850341796875,
0.047271728515625,
0.0030651092529296875,
0.0401611328125,
-0.01251983642578125,
-0.035186767578125,
-0.00335693359375,
-0.0174713134765625,
-0.007312774658203125,
0.01242828369140625,
-0.032196044921875,
0.00176239013671875,
-0.0244293212890625,
-0.002593994140625,
0.027679443359375,
0.06231689453125,
-0.01470184326171875,
0.0234375,
-0.031280517578125,
-0.013763427734375,
-0.019775390625,
-0.03741455078125,
0.0165557861328125,
0.04150390625,
0.046173095703125,
0.045654296875,
0.019500732421875,
-0.00450897216796875,
0.037261962890625,
-0.043701171875,
0.019989013671875,
-0.0234832763671875,
-0.0269012451171875,
0.0106353759765625,
0.016448974609375,
0.033599853515625,
0.0189971923828125,
0.004611968994140625,
-0.00383758544921875,
0.0263519287109375,
0.01898193359375,
-0.020416259765625,
-0.01092529296875,
0.00661468505859375,
0.01380157470703125,
-0.0264892578125,
-0.080078125,
0.0060882568359375,
-0.0178680419921875,
0.01393890380859375,
0.0361328125,
0.03936767578125,
0.01371002197265625,
-0.0213165283203125,
0.0014743804931640625,
-0.0008053779602050781,
0.019622802734375,
0.057098388671875,
-0.045318603515625,
0.077392578125,
-0.0169830322265625,
-0.0163726806640625,
0.0186004638671875,
0.042572021484375,
-0.0123443603515625,
-0.01538848876953125,
0.0283203125,
-0.0011167526245117188,
0.002407073974609375,
-0.056121826171875,
0.03802490234375,
0.00791168212890625,
0.03619384765625,
0.0234527587890625,
0.04693603515625,
-0.00426483154296875,
-0.033966064453125,
0.053009033203125,
0.006855010986328125,
-0.03546142578125,
-0.008087158203125,
0.0009260177612304688,
0.027313232421875,
-0.0289764404296875,
0.01229095458984375,
0.044830322265625,
-0.0212554931640625,
0.007427215576171875,
-0.00418853759765625,
-0.046234130859375,
-0.003223419189453125,
0.035064697265625,
-0.005580902099609375,
-0.06195068359375,
-0.01120758056640625,
0.0160980224609375,
-0.00382232666015625,
-0.0088348388671875,
-0.044219970703125,
-0.0672607421875,
-0.0341796875,
-0.031707763671875,
-0.11346435546875,
-0.059417724609375,
-0.01092529296875,
-0.035858154296875,
-0.03375244140625,
0.005321502685546875,
-0.0192718505859375,
0.0079345703125,
0.01296234130859375,
-0.0007638931274414062,
0.003559112548828125,
-0.0258636474609375,
-0.0889892578125,
-0.06805419921875,
-0.09759521484375,
0.00007510185241699219,
-0.00797271728515625,
0.02349853515625,
-0.00934600830078125,
0.0302581787109375,
-0.035125732421875,
-0.05340576171875,
-0.05194091796875,
0.00750732421875,
0.00980377197265625,
-0.0294342041015625,
-0.0280914306640625,
0.0224761962890625,
-0.0005068778991699219,
0.009246826171875,
-0.0244598388671875,
0.0016088485717773438,
0.00013124942779541016,
-0.023895263671875,
-0.0241241455078125,
-0.0572509765625,
0.0004649162292480469,
0.033721923828125,
0.0092926025390625,
-0.0633544921875,
0.0399169921875,
-0.07354736328125,
0.04571533203125,
0.01244354248046875,
0.036712646484375,
-0.00872039794921875,
-0.04693603515625,
-0.0325927734375,
0.0247650146484375,
-0.011810302734375,
-0.01995849609375,
-0.0081787109375,
0.0207366943359375,
-0.056732177734375,
0.061676025390625,
-0.009124755859375,
-0.0211029052734375,
-0.01154327392578125,
0.0157928466796875,
-0.0184783935546875,
0.0309600830078125,
0.0116729736328125,
0.0028324127197265625,
-0.00873565673828125,
0.023468017578125,
-0.015655517578125,
-0.0780029296875,
0.0362548828125,
-0.0794677734375,
-0.031341552734375,
-0.038421630859375,
0.007556915283203125,
0.00615692138671875,
0.07305908203125,
-0.0293121337890625,
-0.03155517578125,
0.0211944580078125,
0.0168304443359375,
-0.0181732177734375,
0.0204620361328125,
-0.0211181640625,
-0.0207061767578125,
-0.025360107421875,
0.0074005126953125,
0.014312744140625,
-0.01181793212890625,
0.001453399658203125,
0.01497650146484375,
-0.0020923614501953125,
-0.026123046875,
-0.0214691162109375,
0.01541900634765625,
0.0064849853515625,
-0.004413604736328125,
-0.0201416015625,
-0.003261566162109375,
0.05218505859375,
-0.0594482421875,
-0.092041015625,
-0.011810302734375,
-0.01174163818359375,
0.06707763671875,
-0.009613037109375,
0.0247344970703125,
-0.032867431640625,
0.041015625,
0.022216796875,
0.003387451171875,
-0.0265045166015625,
-0.03814697265625,
-0.018402099609375,
0.050628662109375,
0.00890350341796875,
0.0163421630859375,
-0.01071929931640625,
-0.0183868408203125,
-0.045196533203125,
-0.039398193359375,
-0.00962066650390625,
-0.0190887451171875,
0.035247802734375,
-0.036224365234375,
-0.0328369140625,
-0.0391845703125,
-0.03155517578125,
-0.04443359375,
-0.024566650390625,
-0.01119232177734375,
0.0045013427734375,
-0.023223876953125,
0.0506591796875,
0.030670166015625,
-0.016265869140625,
-0.006649017333984375,
0.0390625,
0.01727294921875,
-0.035919189453125,
-0.020355224609375,
0.02447509765625,
0.07135009765625,
0.016937255859375,
-0.0018281936645507812,
0.029083251953125,
-0.047760009765625,
0.0201873779296875,
0.0635986328125,
0.018310546875,
-0.0187835693359375,
0.0595703125,
0.005767822265625,
-0.02520751953125,
0.0287933349609375,
0.0061798095703125,
-0.02783203125,
-0.01177215576171875,
0.01464080810546875,
-0.034088134765625,
-0.0101470947265625,
0.0234375,
0.0291595458984375,
0.0212860107421875,
-0.0212249755859375,
-0.078125,
0.031524658203125,
-0.049041748046875,
0.033233642578125,
0.003997802734375,
-0.00418853759765625,
0.054718017578125,
0.0158843994140625,
0.01396942138671875,
-0.018951416015625,
-0.01226806640625,
0.0163421630859375,
0.0247039794921875,
0.04583740234375,
0.0299072265625,
-0.027679443359375,
-0.01023101806640625,
0.032440185546875,
0.0191192626953125,
-0.006397247314453125,
-0.027740478515625,
-0.01296234130859375,
-0.022796630859375,
-0.034454345703125,
0.002132415771484375,
0.0167999267578125,
0.02496337890625,
0.004413604736328125,
-0.0007305145263671875,
-0.005340576171875,
0.0472412109375,
-0.023651123046875,
-0.02294921875,
0.035186767578125,
-0.04119873046875,
-0.00763702392578125,
0.0325927734375,
-0.007720947265625,
0.00482177734375,
0.00357818603515625,
0.03961181640625,
0.05401611328125,
0.00376129150390625,
0.0184173583984375,
0.0032291412353515625,
-0.0034542083740234375,
-0.019775390625,
-0.0004763603210449219,
-0.037872314453125,
-0.038543701171875,
0.0114593505859375,
0.01233673095703125,
-0.005710601806640625,
0.0201263427734375,
0.01076507568359375,
0.031768798828125,
0.0074005126953125,
-0.018310546875,
0.0087738037109375,
0.01522064208984375,
-0.00119781494140625,
0.01142120361328125,
0.0159149169921875,
0.0044097900390625,
0.0014085769653320312,
-0.024169921875,
-0.0182647705078125,
-0.01378631591796875,
0.0033893585205078125,
-0.031402587890625,
-0.000820159912109375,
0.002857208251953125,
0.0784912109375,
0.00080108642578125,
-0.044097900390625,
-0.0045623779296875,
-0.00677490234375,
-0.0274658203125,
0.019134521484375,
0.07989501953125,
-0.042083740234375,
0.032440185546875,
-0.0185089111328125,
-0.002208709716796875,
-0.0259857177734375,
0.033660888671875,
-0.00010955333709716797,
0.017730712890625,
-0.0013170242309570312,
-0.0179901123046875,
-0.044158935546875,
-0.04571533203125,
0.0015192031860351562,
-0.0142059326171875,
-0.035400390625,
-0.0120086669921875,
0.00399017333984375,
0.00733184814453125,
-0.029754638671875,
-0.04248046875,
-0.01413726806640625,
0.0177764892578125,
0.034576416015625,
0.04156494140625,
-0.0283050537109375,
0.057830810546875,
-0.0211181640625,
0.03173828125,
-0.01482391357421875,
0.003818511962890625,
-0.025970458984375,
0.0088043212890625,
-0.00016760826110839844,
-0.043365478515625,
0.01318359375,
-0.00984954833984375,
0.0239715576171875,
-0.0212554931640625,
-0.0036678314208984375,
0.0017337799072265625,
-0.002696990966796875,
-0.0384521484375,
0.0010194778442382812,
-0.0226287841796875,
0.061126708984375,
-0.06048583984375,
-0.035308837890625,
0.0252532958984375,
-0.0079345703125,
0.015380859375,
-0.005771636962890625,
-0.0013341903686523438,
0.00612640380859375,
-0.00235748291015625,
0.010467529296875,
-0.0062103271484375,
-0.01383209228515625,
0.04547119140625,
0.051177978515625,
-0.0133056640625,
0.0195770263671875,
0.0160675048828125,
0.0004515647888183594,
0.0016937255859375,
0.035125732421875,
0.0301971435546875,
-0.03753662109375,
0.039337158203125,
-0.003246307373046875,
-0.015625,
0.00945281982421875,
-0.0266265869140625,
0.0251617431640625,
0.027862548828125,
0.084716796875,
-0.045440673828125,
0.01386260986328125,
0.040283203125,
-0.0146484375,
0.004581451416015625,
-0.019317626953125,
-0.041839599609375,
-0.056640625,
0.08038330078125,
-0.0231475830078125,
-0.0164337158203125,
0.029205322265625,
0.0037326812744140625,
-0.01091766357421875,
0.036895751953125,
0.0258331298828125,
0.024993896484375,
0.00852203369140625,
-0.0187835693359375,
-0.0287933349609375,
0.0384521484375,
-0.00687408447265625,
0.0014219284057617188,
-0.0279541015625,
-0.03814697265625,
-0.06658935546875,
-0.047821044921875,
-0.005764007568359375,
-0.0156097412109375,
-0.07794189453125,
-0.00673675537109375,
0.03131103515625,
0.0264739990234375,
-0.00720977783203125,
-0.06634521484375,
0.0214080810546875,
0.0019350051879882812,
0.00905609130859375,
-0.03607177734375,
0.01180267333984375,
0.052764892578125,
-0.0241851806640625,
0.0204620361328125,
0.03790283203125,
-0.020904541015625,
-0.0010366439819335938,
0.0399169921875,
0.056365966796875,
0.01074981689453125,
-0.052490234375,
0.0287017822265625,
-0.015167236328125,
-0.0123291015625,
-0.004673004150390625,
0.01354217529296875,
-0.05767822265625,
-0.029571533203125,
0.00720977783203125,
-0.0467529296875,
0.01020050048828125,
0.0061187744140625,
-0.0645751953125,
0.067138671875,
0.03448486328125,
0.027435302734375,
0.01520538330078125,
0.0150299072265625,
-0.03216552734375,
-0.004608154296875,
0.0062103271484375,
0.016326904296875,
-0.034576416015625,
0.0144805908203125,
0.017425537109375,
0.013763427734375,
0.01543426513671875,
0.019775390625,
0.05267333984375,
0.006793975830078125,
-0.03485107421875,
0.0018873214721679688,
0.0775146484375,
0.07952880859375,
0.03125,
0.01184844970703125,
-0.00449371337890625,
-0.0069427490234375,
0.040008544921875,
0.001583099365234375,
0.0186614990234375,
0.0241546630859375,
-0.01467132568359375,
0.03289794921875,
0.01035308837890625,
0.002452850341796875,
0.013458251953125,
0.0171966552734375,
0.0161285400390625,
-0.0081939697265625,
-0.019866943359375,
0.01534271240234375,
-0.00963592529296875,
-0.0019664764404296875,
-0.037506103515625,
0.00614166259765625,
0.0477294921875,
-0.026947021484375,
0.0283966064453125,
-0.0274810791015625,
0.016998291015625,
0.029815673828125,
0.0223846435546875,
0.07763671875,
-0.038238525390625,
-0.0006375312805175781,
0.005886077880859375,
-0.00588226318359375,
0.0114288330078125,
-0.03460693359375,
0.01445770263671875,
-0.043060302734375,
0.022186279296875,
-0.01071929931640625,
-0.00359344482421875,
-0.0218353271484375,
-0.048797607421875,
0.000537872314453125,
-0.00604248046875,
0.022430419921875,
-0.0302276611328125,
-0.00299835205078125,
-0.042083740234375,
-0.0200653076171875,
-0.06512451171875,
0.0031490325927734375,
0.01105499267578125,
0.019927978515625,
-0.0205841064453125,
-0.004486083984375,
0.0084228515625,
-0.005512237548828125,
-0.00635528564453125,
0.01007843017578125,
0.025115966796875,
0.0225067138671875,
-0.0281829833984375,
0.0421142578125,
-0.03753662109375,
0.0028362274169921875,
0.0016880035400390625,
0.017181396484375,
-0.0011539459228515625,
-0.01264190673828125,
0.023590087890625,
-0.001190185546875,
-0.008941650390625,
0.00672149658203125,
-0.0023517608642578125,
0.040069580078125,
0.02191162109375,
0.013092041015625,
0.01470184326171875,
-0.0070648193359375,
-0.0167694091796875,
-0.029449462890625,
0.0141448974609375,
-0.03619384765625,
-0.02880859375,
-0.0172119140625,
-0.02691650390625,
0.0068206787109375,
-0.0077972412109375,
0.01904296875,
-0.003631591796875,
0.030731201171875,
-0.0005202293395996094,
-0.02337646484375,
-0.0076751708984375,
-0.01528167724609375,
0.048004150390625,
0.0242156982421875,
-0.0090179443359375,
-0.03460693359375,
0.037933349609375,
0.043975830078125,
-0.0048828125,
0.022491455078125,
-0.003536224365234375,
0.032440185546875,
-0.00827789306640625,
0.005077362060546875,
0.05108642578125,
-0.024017333984375,
-0.061370849609375,
0.01107025146484375,
0.06756591796875,
-0.02581787109375,
-0.0555419921875,
-0.040924072265625,
-0.0069580078125,
0.049774169921875,
0.0178070068359375,
0.0307769775390625,
-0.00334930419921875,
0.00820159912109375,
-0.045135498046875,
0.049835205078125,
-0.0693359375,
-0.06304931640625,
0.05731201171875,
-0.0367431640625,
-0.019866943359375,
0.020294189453125,
-0.0299530029296875,
-0.01422119140625,
0.038116455078125,
-0.0235137939453125,
-0.01012420654296875,
-0.0079193115234375,
0.0272979736328125,
-0.003749847412109375,
0.0132293701171875,
-0.01224517822265625,
-0.03680419921875,
0.01177978515625,
0.00283050537109375,
0.008026123046875,
0.06964111328125,
0.031524658203125,
-0.004726409912109375,
-0.01453399658203125,
-0.0233154296875,
0.0185394287109375,
-0.01331329345703125,
0.0056610107421875,
0.01776123046875,
-0.00494384765625,
-0.025115966796875,
-0.0290679931640625,
-0.0261077880859375,
-0.00835418701171875,
0.0014162063598632812,
0.03021240234375,
-0.0234375,
-0.01317596435546875,
0.0567626953125,
0.0023593902587890625,
0.04571533203125,
-0.004810333251953125,
-0.0032291412353515625,
-0.0034236907958984375,
0.01540374755859375,
0.00628662109375,
-0.06793212890625,
-0.00650787353515625,
-0.04327392578125,
0.00860595703125,
0.0242156982421875,
0.0034027099609375,
0.007495880126953125,
0.0645751953125,
0.028594970703125,
0.015777587890625,
0.006641387939453125,
-0.033233642578125,
0.0146942138671875,
-0.00027108192443847656,
0.0506591796875,
0.01435089111328125,
0.003570556640625,
-0.0193939208984375,
0.014862060546875,
-0.00433349609375,
-0.0457763671875,
-0.049041748046875,
0.07293701171875,
-0.0162506103515625,
-0.00913238525390625,
0.02496337890625,
-0.01442718505859375,
-0.061431884765625,
-0.0187530517578125,
-0.00024890899658203125,
0.02459716796875,
-0.0106964111328125,
-0.025665283203125,
0.01116943359375,
-0.01140594482421875,
0.00800323486328125,
-0.05352783203125,
-0.006244659423828125,
-0.0697021484375,
0.0112457275390625,
0.021514892578125,
-0.0312042236328125,
-0.011505126953125,
-0.04229736328125,
-0.06817626953125,
0.034515380859375,
0.008392333984375,
-0.039306640625,
-0.043365478515625,
0.0173797607421875,
0.0152435302734375,
0.0271759033203125,
-0.0209808349609375,
-0.0138092041015625,
-0.044342041015625,
0.01523590087890625,
-0.0284271240234375,
0.09375,
0.01328277587890625,
-0.04058837890625,
0.0164337158203125,
-0.01517486572265625,
-0.005764007568359375,
-0.001514434814453125,
-0.016845703125,
0.0196380615234375,
0.0162353515625,
0.042999267578125,
-0.00861358642578125,
-0.003696441650390625,
0.01509857177734375,
-0.041351318359375,
-0.014678955078125,
-0.0389404296875,
-0.0277862548828125,
-0.0199737548828125,
0.0982666015625,
0.04327392578125,
0.0234832763671875,
-0.0183258056640625,
0.04180908203125,
0.007167816162109375,
-0.0247344970703125,
0.012359619140625,
0.00542449951171875,
-0.003582000732421875,
-0.0033664703369140625,
-0.01096343994140625,
0.0014085769653320312,
-0.016693115234375,
-0.0008869171142578125,
-0.027801513671875,
-0.0166778564453125,
-0.00331878662109375,
-0.02392578125,
-0.00372314453125,
-0.0251922607421875,
0.058807373046875,
-0.01091766357421875,
0.039947509765625,
0.0196685791015625,
0.00778961181640625,
0.058441162109375,
0.111328125,
0.039093017578125,
-0.0027179718017578125,
-0.0284576416015625,
0.00849151611328125,
0.031585693359375,
0.00006568431854248047,
-0.005428314208984375,
-0.049102783203125,
-0.0089111328125,
0.01276397705078125,
0.005596160888671875,
0.00644683837890625,
-0.061370849609375,
0.050079345703125,
-0.006496429443359375,
0.0770263671875,
-0.0011281967163085938,
-0.108642578125,
-0.048431396484375,
0.0367431640625,
0.0338134765625,
-0.0297698974609375,
0.06756591796875,
-0.032958984375,
0.025604248046875,
0.0478515625,
0.0259246826171875,
-0.00299835205078125,
-0.0135040283203125,
0.0121612548828125,
0.0177154541015625,
-0.0092620849609375
] |
49b67234bd8423c79707651b6de555e2a05baba9 | Wordpress Stackexchange
Q: How to check if a shortcode is being executed in a widget or post I am creating a feature for my website using a WordPress shortcode. The shortcode is displays an HTML table that contains certain data.
I have enabled the short code for widget/sidebar and it is working fine in the widget.
The only problem is that my designer has created two different styles; one for post and another for widget. Is there any way to know that the code is being executed in sidebar or in post?
eg:
if(is_widget()){
//add stylesheet for widget here
}
else{
//add stylesheet for post here
}
Thank you
A: Using conditional tag in_the_loop inside your shortcode function may serve the purpose.
if( in_the_loop() ) {
//add stylesheet for post/page here...
} else {
//add stylesheet for widget here...
}
| Q: How to check if a shortcode is being executed in a widget or post I am creating a feature for my website using a WordPress shortcode. The shortcode is displays an HTML table that contains certain data.
I have enabled the short code for widget/sidebar and it is working fine in the widget.
The only problem is that my designer has created two different styles; one for post and another for widget. Is there any way to know that the code is being executed in sidebar or in post?
eg:
if(is_widget()){
//add stylesheet for widget here
}
else{
//add stylesheet for post here
}
Thank you
A: Using conditional tag in_the_loop inside your shortcode function may serve the purpose.
if( in_the_loop() ) {
//add stylesheet for post/page here...
} else {
//add stylesheet for widget here...
}
| wordpress | {
"language": "en",
"length": 138,
"provenance": "stackexchange_00019.jsonl.gz:471480",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/250600"
} | [
0.00897216796875,
0.001056671142578125,
-0.0181121826171875,
0.0110321044921875,
-0.002574920654296875,
-0.0235137939453125,
0.01788330078125,
-0.046295166015625,
-0.007732391357421875,
0.015289306640625,
-0.02728271484375,
-0.0004360675811767578,
-0.00010162591934204102,
-0.0168304443359375,
0.005458831787109375,
-0.036224365234375,
0.03167724609375,
0.01406097412109375,
0.031219482421875,
-0.0144805908203125,
-0.0214080810546875,
0.01076507568359375,
0.0237884521484375,
0.0262908935546875,
-0.002765655517578125,
-0.045806884765625,
0.08447265625,
0.0006575584411621094,
0.01276397705078125,
-0.00765228271484375,
0.033294677734375,
-0.01110076904296875,
0.039825439453125,
0.03515625,
-0.058258056640625,
0.056060791015625,
-0.04705810546875,
0.0246429443359375,
-0.005069732666015625,
0.0269927978515625,
0.029815673828125,
-0.02630615234375,
0.061431884765625,
-0.01470184326171875,
0.012115478515625,
0.0197601318359375,
0.020965576171875,
-0.037933349609375,
0.003448486328125,
0.01305389404296875,
0.0369873046875,
-0.0007562637329101562,
0.032073974609375,
-0.019775390625,
-0.023712158203125,
0.0177154541015625,
-0.03094482421875,
-0.01474761962890625,
0.04119873046875,
0.0094757080078125,
-0.026275634765625,
-0.05560302734375,
0.02349853515625,
-0.04510498046875,
0.01361083984375,
-0.0139312744140625,
-0.034332275390625,
0.0276641845703125,
-0.0003972053527832031,
0.01548004150390625,
0.02398681640625,
-0.0281829833984375,
-0.01434326171875,
-0.0117645263671875,
-0.0117645263671875,
-0.00832366943359375,
-0.00595855712890625,
-0.0220184326171875,
-0.0014772415161132812,
0.0133209228515625,
-0.0131378173828125,
0.025177001953125,
-0.038543701171875,
-0.0021114349365234375,
0.005764007568359375,
0.0105438232421875,
-0.0186614990234375,
-0.01025390625,
0.0027599334716796875,
-0.01026153564453125,
-0.01068878173828125,
0.01041412353515625,
0.02081298828125,
-0.02423095703125,
-0.031280517578125,
-0.043365478515625,
0.0108489990234375,
0.093505859375,
-0.039825439453125,
0.03851318359375,
-0.062286376953125,
-0.0137481689453125,
0.013214111328125,
-0.06866455078125,
0.00997161865234375,
0.052490234375,
0.010406494140625,
-0.024749755859375,
0.0279083251953125,
0.00446319580078125,
-0.004367828369140625,
0.024993896484375,
-0.0264892578125,
-0.009490966796875,
-0.020416259765625,
0.016265869140625,
-0.051849365234375,
0.0117034912109375,
-0.00640869140625,
0.0018358230590820312,
0.0294189453125,
0.04608154296875,
0.045318603515625,
-0.037139892578125,
0.0035457611083984375,
0.018707275390625,
-0.0185089111328125,
-0.08636474609375,
0.04351806640625,
-0.0002472400665283203,
-0.04974365234375,
0.005947113037109375,
0.037628173828125,
0.019012451171875,
0.01837158203125,
-0.010528564453125,
0.0411376953125,
0.0005764961242675781,
-0.0102386474609375,
0.01666259765625,
-0.01345062255859375,
-0.041778564453125,
-0.01446533203125,
-0.031402587890625,
0.00862884521484375,
0.044342041015625,
0.03900146484375,
-0.0203704833984375,
-0.0401611328125,
-0.0770263671875,
0.031646728515625,
-0.021636962890625,
0.01190185546875,
0.030609130859375,
0.03515625,
-0.0033779144287109375,
0.035888671875,
-0.0175628662109375,
0.00807952880859375,
-0.01500701904296875,
-0.0033321380615234375,
-0.01294708251953125,
0.007511138916015625,
-0.036376953125,
-0.0560302734375,
0.0252532958984375,
-0.043975830078125,
-0.0049896240234375,
0.020477294921875,
0.037139892578125,
-0.0377197265625,
-0.0235748291015625,
-0.0027446746826171875,
0.01568603515625,
-0.010009765625,
0.0216064453125,
-0.0364990234375,
-0.0199127197265625,
0.05755615234375,
-0.040618896484375,
-0.056793212890625,
-0.0308074951171875,
0.049224853515625,
-0.005718231201171875,
-0.0296478271484375,
-0.0004620552062988281,
0.037841796875,
0.07025146484375,
-0.003353118896484375,
0.046295166015625,
0.0004143714904785156,
-0.0006055831909179688,
-0.0012407302856445312,
0.0017728805541992188,
0.038726806640625,
-0.033966064453125,
-0.0225372314453125,
-0.036590576171875,
0.006702423095703125,
-0.009368896484375,
0.020660400390625,
-0.006855010986328125,
0.01097869873046875,
-0.034027099609375,
-0.046966552734375,
-0.016815185546875,
-0.01282501220703125,
0.0294189453125,
-0.00518035888671875,
-0.0089111328125,
0.0087127685546875,
-0.019012451171875,
-0.004779815673828125,
0.003696441650390625,
-0.0181732177734375,
0.034576416015625,
-0.0179595947265625,
0.048004150390625,
0.01361846923828125,
0.0189361572265625,
-0.004932403564453125,
-0.0196533203125,
0.0038547515869140625,
-0.005580902099609375,
0.03717041015625,
-0.010528564453125,
-0.00201416015625,
-0.0312347412109375,
0.01503753662109375,
0.0305023193359375,
-0.0648193359375,
-0.007076263427734375,
-0.0202484130859375,
-0.0234375,
-0.056488037109375,
-0.018890380859375,
-0.056365966796875,
-0.01061248779296875,
0.0147857666015625,
0.05377197265625,
0.051971435546875,
0.036346435546875,
0.0174102783203125,
0.002246856689453125,
0.054931640625,
-0.043426513671875,
0.00748443603515625,
-0.026275634765625,
0.0305328369140625,
0.08056640625,
-0.034881591796875,
0.01265716552734375,
0.003932952880859375,
-0.041046142578125,
0.0006299018859863281,
0.026092529296875,
-0.01142120361328125,
0.0021495819091796875,
0.0171356201171875,
-0.01535797119140625,
-0.0009398460388183594,
-0.00841522216796875,
-0.01103973388671875,
-0.0236968994140625,
0.061798095703125,
-0.00849151611328125,
0.040130615234375,
0.01490020751953125,
-0.0194244384765625,
0.01105499267578125,
0.004398345947265625,
-0.05914306640625,
-0.00008606910705566406,
0.047882080078125,
0.05877685546875,
0.024261474609375,
-0.0234222412109375,
-0.0452880859375,
0.03204345703125,
0.047271728515625,
-0.042999267578125,
0.022003173828125,
-0.056884765625,
-0.0172576904296875,
-0.045562744140625,
-0.0257110595703125,
0.005153656005859375,
-0.010223388671875,
0.039703369140625,
0.006702423095703125,
0.0135345458984375,
0.044036865234375,
0.0089874267578125,
0.04901123046875,
0.0237579345703125,
-0.01403045654296875,
0.08294677734375,
0.01029205322265625,
0.02862548828125,
-0.003681182861328125,
-0.005298614501953125,
0.0413818359375,
-0.02227783203125,
0.0061798095703125,
-0.0027942657470703125,
0.0310211181640625,
-0.0308837890625,
0.01224517822265625,
-0.0073394775390625,
-0.0026950836181640625,
-0.044281005859375,
0.017486572265625,
0.029022216796875,
0.046417236328125,
0.026397705078125,
-0.02642822265625,
0.032806396484375,
0.034698486328125,
-0.0333251953125,
-0.0811767578125,
0.0017442703247070312,
-0.049407958984375,
0.0068359375,
-0.037109375,
-0.01438140869140625,
-0.010498046875,
-0.0143585205078125,
0.0004584789276123047,
-0.04962158203125,
-0.0027942657470703125,
-0.008209228515625,
-0.037872314453125,
-0.029937744140625,
0.0267791748046875,
-0.0054473876953125,
0.0131683349609375,
0.0022411346435546875,
0.055389404296875,
0.0025653839111328125,
-0.063232421875,
-0.01200103759765625,
-0.01197052001953125,
-0.0278167724609375,
0.006282806396484375,
-0.0200042724609375,
-0.01184844970703125,
-0.0213470458984375,
0.0031986236572265625,
-0.033905029296875,
-0.007625579833984375,
0.01055908203125,
0.0022830963134765625,
0.020050048828125,
-0.0152435302734375,
0.03802490234375,
0.00975799560546875,
-0.0340576171875,
-0.007312774658203125,
0.035919189453125,
-0.045867919921875,
-0.00537872314453125,
-0.0033550262451171875,
-0.048004150390625,
-0.02105712890625,
0.0081787109375,
-0.006103515625,
0.002285003662109375,
-0.015777587890625,
0.0496826171875,
0.021209716796875,
0.016510009765625,
-0.01325225830078125,
0.06976318359375,
0.01971435546875,
0.045562744140625,
-0.049041748046875,
-0.0268402099609375,
-0.047576904296875,
0.00624847412109375,
-0.03472900390625,
-0.016448974609375,
-0.0343017578125,
0.0413818359375,
-0.0143890380859375,
0.030364990234375,
0.0007653236389160156,
-0.00653839111328125,
0.0465087890625,
-0.0027751922607421875,
-0.007793426513671875,
0.005031585693359375,
0.0396728515625,
-0.037261962890625,
0.0096282958984375,
-0.00911712646484375,
-0.008697509765625,
-0.04632568359375,
-0.048736572265625,
-0.07366943359375,
0.01244354248046875,
-0.073486328125,
0.030426025390625,
0.00887298583984375,
-0.0198211669921875,
-0.03302001953125,
-0.011444091796875,
-0.063720703125,
-0.01427459716796875,
0.023284912109375,
-0.02886962890625,
0.039154052734375,
-0.0244598388671875,
0.0021343231201171875,
-0.015533447265625,
-0.0017108917236328125,
-0.040069580078125,
-0.08734130859375,
0.0119476318359375,
-0.05731201171875,
0.027740478515625,
0.0234527587890625,
-0.043792724609375,
-0.01105499267578125,
0.0217437744140625,
-0.0268707275390625,
0.0052947998046875,
0.01340484619140625,
0.03759765625,
0.0043792724609375,
0.03070068359375,
0.01531219482421875,
-0.01053619384765625,
0.0148773193359375,
0.0701904296875,
-0.0108184814453125,
0.053680419921875,
-0.0360107421875,
-0.05828857421875,
0.03814697265625,
-0.0692138671875,
-0.01428985595703125,
-0.0236663818359375,
-0.007259368896484375,
0.030975341796875,
-0.05010986328125,
0.033843994140625,
-0.033172607421875,
-0.0164794921875,
0.0237579345703125,
-0.0379638671875,
-0.000232696533203125,
0.0176849365234375,
0.061492919921875,
0.00885009765625,
-0.0046539306640625,
-0.0225830078125,
-0.01033782958984375,
0.0572509765625,
0.0081939697265625,
-0.0005726814270019531,
0.039794921875,
-0.041839599609375,
-0.0010290145874023438,
0.051666259765625,
-0.0215911865234375,
0.0247344970703125,
0.06640625,
0.0241241455078125,
0.0248260498046875,
-0.032562255859375,
0.020477294921875,
-0.01471710205078125,
0.040435791015625,
-0.013397216796875,
-0.004352569580078125,
0.0323486328125,
0.01421356201171875,
-0.02587890625,
-0.0173797607421875,
-0.0140228271484375,
0.005733489990234375,
-0.01806640625,
0.042327880859375,
0.03546142578125,
0.0219573974609375,
0.0015926361083984375,
-0.010894775390625,
0.047210693359375,
-0.00598907470703125,
0.0208740234375,
0.058074951171875,
-0.013153076171875,
0.035797119140625,
-0.01261138916015625,
-0.0214385986328125,
-0.0130157470703125,
0.0049896240234375,
0.043609619140625,
0.00753021240234375,
-0.025604248046875,
-0.0254669189453125,
-0.005260467529296875,
-0.031951904296875,
-0.0004787445068359375,
0.0245208740234375,
0.052398681640625,
0.01435089111328125,
-0.035186767578125,
0.0003159046173095703,
-0.007476806640625,
-0.01116943359375,
-0.04864501953125,
-0.057861328125,
-0.057952880859375,
-0.0081024169921875,
-0.01113128662109375,
-0.01152801513671875,
-0.027191162109375,
-0.0006809234619140625,
-0.004180908203125,
0.050048828125,
0.0419921875,
-0.005336761474609375,
0.02142333984375,
0.0146636962890625,
0.025115966796875,
-0.05181884765625,
0.004512786865234375,
-0.044891357421875,
-0.0189056396484375,
0.01421356201171875,
0.039642333984375,
-0.034210205078125,
-0.0293731689453125,
0.041839599609375,
0.0019407272338867188,
-0.038330078125,
0.01154327392578125,
0.033935546875,
0.015350341796875,
-0.047882080078125,
-0.0242462158203125,
0.042327880859375,
0.059844970703125,
-0.002483367919921875,
-0.02093505859375,
-0.0201873779296875,
0.035430908203125,
0.01416015625,
0.00608062744140625,
0.029388427734375,
-0.0012197494506835938,
-0.0256805419921875,
-0.0229644775390625,
-0.0217742919921875,
0.0223846435546875,
-0.0232391357421875,
0.00786590576171875,
-0.004474639892578125,
-0.0010805130004882812,
-0.0274505615234375,
-0.0022792816162109375,
-0.0094146728515625,
-0.008880615234375,
0.0004150867462158203,
0.006481170654296875,
0.0775146484375,
0.03887939453125,
-0.0870361328125,
0.01251983642578125,
-0.057159423828125,
0.006519317626953125,
-0.0281219482421875,
-0.0692138671875,
-0.048187255859375,
-0.031585693359375,
-0.003963470458984375,
0.0194244384765625,
-0.01097869873046875,
0.0038280487060546875,
-0.0134735107421875,
0.021942138671875,
-0.004718780517578125,
0.045074462890625,
-0.0167388916015625,
0.0694580078125,
-0.014923095703125,
0.051666259765625,
-0.000835418701171875,
0.00946044921875,
-0.0261383056640625,
-0.0182952880859375,
0.0222625732421875,
-0.01271820068359375,
-0.051910400390625,
-0.01934814453125,
-0.01374053955078125,
-0.01275634765625,
0.022247314453125,
-0.02313232421875,
0.02191162109375,
0.0040740966796875,
0.0151214599609375,
-0.0006728172302246094,
-0.00982666015625,
0.0177154541015625,
0.00669097900390625,
0.02764892578125,
-0.03533935546875,
-0.0360107421875,
-0.0112152099609375,
-0.0217437744140625,
0.0555419921875,
-0.002712249755859375,
0.0252838134765625,
-0.0036163330078125,
-0.05072021484375,
0.09326171875,
0.063720703125,
-0.018951416015625,
0.039886474609375,
0.016357421875,
0.003520965576171875,
0.0170135498046875,
0.0251617431640625,
0.01508331298828125,
0.000431060791015625,
0.060516357421875,
-0.00811767578125,
-0.0157318115234375,
0.0139923095703125,
-0.034027099609375,
0.028228759765625,
0.0509033203125,
0.07733154296875,
-0.06390380859375,
0.00624847412109375,
0.032379150390625,
-0.03314208984375,
0.00640106201171875,
-0.04229736328125,
0.0149383544921875,
-0.00939178466796875,
0.09979248046875,
0.03216552734375,
-0.015777587890625,
0.0531005859375,
-0.013427734375,
0.01380157470703125,
-0.05126953125,
0.0472412109375,
0.012603759765625,
-0.03521728515625,
0.0020904541015625,
0.053375244140625,
-0.022369384765625,
-0.03765869140625,
-0.0141754150390625,
0.00799560546875,
-0.0167999267578125,
-0.05328369140625,
0.0179443359375,
-0.0224456787109375,
0.025848388671875,
0.000347137451171875,
0.005222320556640625,
0.052978515625,
0.04998779296875,
-0.00826263427734375,
0.0293121337890625,
0.0094146728515625,
0.058563232421875,
-0.0159149169921875,
0.0240020751953125,
0.01203155517578125,
0.0306854248046875,
-0.0299530029296875,
0.0173492431640625,
-0.0462646484375,
0.01934814453125,
-0.01568603515625,
-0.007259368896484375,
0.0784912109375,
-0.058502197265625,
-0.00667572021484375,
0.0247955322265625,
0.01318359375,
-0.0117340087890625,
-0.023101806640625,
0.0467529296875,
-0.056243896484375,
-0.011688232421875,
-0.0041656494140625,
-0.02557373046875,
-0.053009033203125,
-0.07672119140625,
-0.06060791015625,
0.06964111328125,
-0.0093841552734375,
0.012176513671875,
0.0029277801513671875,
0.03173828125,
-0.0110015869140625,
-0.0009851455688476562,
-0.049774169921875,
0.044891357421875,
0.01088714599609375,
0.052093505859375,
-0.043304443359375,
-0.0019512176513671875,
0.01222991943359375,
0.0229034423828125,
0.039398193359375,
0.00798797607421875,
0.01458740234375,
0.006603240966796875,
0.0221710205078125,
0.0295867919921875,
-0.0248870849609375,
0.0124969482421875,
-0.0104217529296875,
0.002223968505859375,
-0.003086090087890625,
0.00942230224609375,
0.041229248046875,
-0.010986328125,
-0.04449462890625,
0.0257110595703125,
0.00255584716796875,
-0.0129241943359375,
-0.005466461181640625,
0.018280029296875,
0.0261077880859375,
-0.0159759521484375,
-0.011444091796875,
-0.01137542724609375,
-0.046722412109375,
0.08343505859375,
0.02581787109375,
-0.065185546875,
-0.0362548828125,
-0.045989990234375,
0.04107666015625,
-0.0093841552734375,
0.0361328125,
-0.02716064453125,
0.0214996337890625,
0.00748443603515625,
-0.0022335052490234375,
0.01421356201171875,
0.07366943359375,
-0.06964111328125,
0.03643798828125,
0.0526123046875,
0.03961181640625,
0.0222015380859375,
0.0234222412109375,
-0.005512237548828125,
0.0295562744140625,
-0.0283355712890625,
0.0008921623229980469,
0.0206298828125,
0.01413726806640625,
-0.028900146484375,
-0.024383544921875,
-0.0184783935546875,
-0.00811767578125,
0.025909423828125,
-0.0282745361328125,
-0.018280029296875,
0.00533294677734375,
0.045684814453125,
-0.0082244873046875,
0.0108795166015625,
-0.032073974609375,
-0.038360595703125,
-0.01195526123046875,
-0.006793975830078125,
-0.0066986083984375,
0.054473876953125,
0.007167816162109375,
0.0253143310546875,
-0.08477783203125,
-0.009613037109375,
-0.01861572265625,
0.0003426074981689453,
-0.0188140869140625,
0.036834716796875,
-0.06536865234375,
-0.04034423828125,
0.02313232421875,
0.06219482421875,
0.0142059326171875,
0.0308685302734375,
0.01226806640625,
0.0141754150390625,
0.01502227783203125,
0.000675201416015625,
0.062469482421875,
-0.0044708251953125,
-0.01062774658203125,
-0.037872314453125,
-0.0191497802734375,
0.0034580230712890625,
-0.00887298583984375,
-0.017242431640625,
0.018890380859375,
0.0218658447265625,
-0.04742431640625,
0.0343017578125,
0.0028438568115234375,
0.0167694091796875,
0.06512451171875,
-0.00201416015625,
0.002471923828125,
-0.01042938232421875,
-0.0284271240234375,
-0.00853729248046875,
0.0308837890625,
-0.055389404296875,
-0.0273590087890625,
0.0229339599609375,
-0.032196044921875,
0.018280029296875,
0.0208740234375,
-0.0389404296875,
-0.005336761474609375,
0.035614013671875,
0.0264739990234375,
0.005229949951171875,
-0.006114959716796875,
0.0031185150146484375,
-0.06475830078125,
-0.0352783203125,
-0.03167724609375,
0.04705810546875,
0.041412353515625,
0.027191162109375,
0.019989013671875,
0.039642333984375,
-0.00632476806640625,
0.01152801513671875,
-0.01348114013671875,
-0.03173828125,
0.06707763671875,
-0.0195159912109375,
-0.019287109375,
-0.007801055908203125,
-0.0017719268798828125,
-0.005123138427734375,
0.037384033203125,
-0.0180816650390625,
0.004375457763671875,
-0.057647705078125,
0.022186279296875,
0.005794525146484375,
0.01568603515625,
-0.0291595458984375,
-0.0188751220703125,
-0.0204010009765625,
0.0170440673828125,
0.0111541748046875,
-0.01360321044921875,
-0.0311126708984375,
-0.00930023193359375,
0.01119232177734375,
-0.018157958984375,
0.0241546630859375,
0.01023101806640625,
0.00421142578125,
0.0218048095703125,
-0.01025390625,
-0.005336761474609375,
0.002887725830078125,
-0.0192718505859375,
0.0008749961853027344,
0.0213165283203125,
-0.00493621826171875,
0.0205841064453125,
-0.035858154296875,
0.01485443115234375,
0.05462646484375,
0.050079345703125,
-0.0171661376953125,
0.0237884521484375,
0.035064697265625,
-0.0243988037109375,
0.006320953369140625,
0.03436279296875,
-0.015655517578125,
-0.037384033203125,
0.01084136962890625,
0.013885498046875,
-0.0095977783203125,
0.01385498046875,
-0.031707763671875,
-0.0312347412109375,
0.0184173583984375,
-0.00894927978515625,
-0.00986480712890625,
-0.0292816162109375,
-0.003894805908203125,
0.0208740234375,
-0.016998291015625,
0.04925537109375,
-0.0029315948486328125,
0.01580810546875,
-0.05712890625,
-0.007747650146484375,
-0.019866943359375,
0.0084381103515625,
-0.0114898681640625,
0.032470703125,
0.044891357421875,
-0.035125732421875,
-0.032989501953125,
0.01885986328125,
0.020599365234375,
0.05328369140625,
0.042022705078125,
0.00800323486328125,
0.0340576171875,
0.018341064453125,
-0.0380859375,
-0.0662841796875,
-0.0055084228515625,
0.004978179931640625,
0.0252227783203125,
-0.000537872314453125,
-0.0164947509765625,
-0.00609588623046875,
-0.047515869140625,
-0.08184814453125,
0.01099395751953125,
-0.0010480880737304688,
-0.043426513671875,
-0.053863525390625,
0.0023708343505859375,
-0.00316619873046875,
-0.0255126953125,
-0.02215576171875,
-0.0187530517578125,
-0.0335693359375,
0.035247802734375,
-0.0033740997314453125,
0.02667236328125,
0.019805908203125,
-0.004390716552734375,
-0.061614990234375,
-0.01200103759765625,
-0.04876708984375,
0.006557464599609375,
0.01025390625,
-0.0247955322265625,
0.000056624412536621094,
0.01381683349609375,
-0.045928955078125,
-0.055694580078125,
0.00498199462890625,
0.0291748046875,
0.0266876220703125,
-0.05548095703125,
-0.05413818359375,
-0.016998291015625,
0.08056640625,
0.05328369140625,
0.03790283203125,
-0.037078857421875,
-0.02410888671875,
0.00746917724609375,
-0.011688232421875,
0.01367950439453125,
0.007541656494140625,
-0.020477294921875,
0.00475311279296875,
-0.0178680419921875,
-0.0030422210693359375,
0.0004208087921142578,
-0.0043182373046875,
-0.034423828125,
-0.004547119140625,
-0.016448974609375,
0.0189361572265625,
-0.07220458984375,
-0.0230865478515625,
0.0313720703125,
0.0009360313415527344,
0.051177978515625,
-0.0120391845703125,
0.0282745361328125,
0.047576904296875,
0.05255126953125,
0.01092529296875,
0.058685302734375,
-0.055206298828125,
-0.01363372802734375,
0.020904541015625,
-0.00156402587890625,
-0.00865936279296875,
0.01021575927734375,
-0.00511932373046875,
0.0010595321655273438,
-0.013580322265625,
-0.019287109375,
0.0309295654296875,
0.002552032470703125,
-0.01934814453125,
0.0450439453125,
-0.0124664306640625,
0.09515380859375,
0.0134124755859375,
0.034149169921875,
0.01140594482421875,
-0.01025390625,
0.04364013671875,
-0.027099609375,
-0.0027675628662109375,
0.02191162109375,
0.0160980224609375,
-0.050323486328125,
0.0227203369140625,
-0.004611968994140625,
0.042022705078125,
0.01364898681640625
] |
f6e8fddd16101a15947d39092dd7a75c29755db4 | Wordpress Stackexchange
Q: How to Remove Slug From Database? For example:
*
*mydomain.com/embed automatically redirecting to homepage although I
haven't set redirection.
*I want to add a page in my website name embed and for this page URL
automatically becoming mydomain.com/embed-2.
I checked everything, there is no existing or trash post, page, tags Etc.
How to remove that existing embed slug from the database?
Thanks
A: I don't exactly know about the word embed, but by default WordPress reserves & uses these sort of words for internal use. I tried to create a page slug named embed but it wouldn't work for me either on my localhost or on my live server. Maybe this is reserved for WordPress oEmbed functionality.
| Q: How to Remove Slug From Database? For example:
*
*mydomain.com/embed automatically redirecting to homepage although I
haven't set redirection.
*I want to add a page in my website name embed and for this page URL
automatically becoming mydomain.com/embed-2.
I checked everything, there is no existing or trash post, page, tags Etc.
How to remove that existing embed slug from the database?
Thanks
A: I don't exactly know about the word embed, but by default WordPress reserves & uses these sort of words for internal use. I tried to create a page slug named embed but it wouldn't work for me either on my localhost or on my live server. Maybe this is reserved for WordPress oEmbed functionality.
A: How to find and correct unexpected redirects.
Here's some things you should check:
*
*Check your .htaccess file in the root folder of your WordPress installation. Check for any redirection rules.
*Disable any SEO plugins (or specifically: redirection plugins -- if
you use these) you might have installed. And actually you should probably just disable ALL plugins. Clear browser cache and temporary files, and reload the front-end of your website. See if the problem disappears. Enable plugins 1 by 1 until the problem becomes apparent once again. That will help to narrow down the culprit.
*Check your theme functions.php file to see if there's been any
hard coded redirection added by you or someone else once upon a
time.
*Check the database for old slugs.
*Once your website has been loaded on the front-end. View source.
Check for JavaScript redirects.
*Open up Google Chrome (Developer Tools) Click the Network tab.
Reload your page. Observe the changes.
*Search your entire website (files) for contents "wp_redirect".
Maybe there's been a redirect added to one of the files used by your
theme or a plugin.
*Search your entire website (files & database) for contents "base64".
Maybe there's been a sneaky redirect added to one of the files used by your theme or a plugin or inserted into your database somewhere. This is often a sign of a compromised website.
Here's the query for checking your database for option #4:
SELECT *
FROM `wp_postmeta`
WHERE `meta_key` = '_wp_old_slug'
In the "FROM" line (second line)... Make sure you specify the correct name of your "Post Meta" database table. (Your table prefix may differ -- but the default is wp_)
If you wanted to get extra specific with option #4 you could enter the slug which the page is being redirected to.
SELECT *
FROM `wp_postmeta`
WHERE `meta_key` = '_wp_old_slug'
AND `meta_value` LIKE '%slug-to-search-for%'
Option #4 directly answers your question about locating and removing slugs from the database. However, it really could be any number of things... Hope this helps.
| wordpress | {
"language": "en",
"length": 453,
"provenance": "stackexchange_00019.jsonl.gz:471486",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/250616"
} | [
0.04656982421875,
0.03680419921875,
-0.0215911865234375,
0.008941650390625,
0.04595947265625,
-0.046356201171875,
0.0797119140625,
-0.046417236328125,
-0.0013427734375,
0.0124969482421875,
-0.006175994873046875,
-0.017547607421875,
0.0178985595703125,
-0.0487060546875,
0.02117919921875,
-0.01239776611328125,
0.0265960693359375,
0.01222991943359375,
0.042205810546875,
-0.014190673828125,
-0.015625,
0.00467681884765625,
0.041900634765625,
0.03460693359375,
0.0306243896484375,
-0.082763671875,
0.0977783203125,
-0.0345458984375,
0.0224151611328125,
-0.04071044921875,
0.032196044921875,
0.02099609375,
-0.007232666015625,
0.034332275390625,
-0.01316070556640625,
-0.01904296875,
-0.006008148193359375,
0.034454345703125,
0.02557373046875,
-0.0128936767578125,
0.017913818359375,
-0.01038360595703125,
0.044647216796875,
-0.0006642341613769531,
0.01084136962890625,
-0.0262908935546875,
0.026458740234375,
-0.041778564453125,
-0.01406097412109375,
0.0017528533935546875,
0.00557708740234375,
0.04302978515625,
0.0102996826171875,
-0.0006947517395019531,
0.0155029296875,
0.0313720703125,
0.0073699951171875,
0.0167236328125,
0.0235595703125,
0.0056915283203125,
-0.00855255126953125,
0.034454345703125,
0.00154876708984375,
-0.0122222900390625,
0.00557708740234375,
-0.021759033203125,
-0.00804901123046875,
0.033294677734375,
-0.046234130859375,
-0.0031681060791015625,
0.0260772705078125,
-0.0244293212890625,
0.011932373046875,
-0.01212310791015625,
-0.06341552734375,
0.03057861328125,
-0.00015854835510253906,
0.0112762451171875,
0.026519775390625,
-0.040130615234375,
0.01239013671875,
0.007755279541015625,
-0.01519775390625,
0.015960693359375,
-0.0014505386352539062,
0.03863525390625,
-0.022735595703125,
-0.040435791015625,
0.0007519721984863281,
-0.0042877197265625,
-0.0189971923828125,
0.0207061767578125,
-0.0042877197265625,
0.029510498046875,
-0.024322509765625,
0.007579803466796875,
0.0802001953125,
0.05950927734375,
0.0128631591796875,
-0.0032215118408203125,
0.01181793212890625,
-0.055450439453125,
-0.005950927734375,
-0.0298919677734375,
0.015350341796875,
0.032806396484375,
-0.004871368408203125,
-0.032440185546875,
0.00618743896484375,
-0.0034160614013671875,
-0.015777587890625,
-0.02020263671875,
-0.0416259765625,
-0.0272216796875,
-0.0125732421875,
0.0241546630859375,
-0.047515869140625,
-0.028961181640625,
-0.0133819580078125,
-0.0230712890625,
-0.00572967529296875,
0.0274658203125,
-0.0015478134155273438,
-0.0259246826171875,
0.004154205322265625,
0.00025177001953125,
0.00763702392578125,
-0.0352783203125,
-0.01511383056640625,
-0.0113067626953125,
-0.035614013671875,
0.0159454345703125,
0.08770751953125,
0.050048828125,
0.01558685302734375,
-0.0189361572265625,
-0.00951385498046875,
0.01165008544921875,
0.008209228515625,
0.022613525390625,
-0.0184326171875,
-0.061187744140625,
0.006580352783203125,
0.0181121826171875,
0.0191192626953125,
0.0289154052734375,
-0.00955963134765625,
-0.01267242431640625,
0.0210723876953125,
0.00673675537109375,
-0.0239715576171875,
-0.04327392578125,
0.04132080078125,
-0.01270294189453125,
0.038482666015625,
-0.0269775390625,
0.02264404296875,
-0.029541015625,
0.0147705078125,
-0.0034160614013671875,
-0.019287109375,
-0.019378662109375,
0.0276947021484375,
-0.0254058837890625,
-0.0604248046875,
0.01520538330078125,
-0.0178985595703125,
-0.0148162841796875,
0.0124664306640625,
0.016693115234375,
-0.02685546875,
-0.006988525390625,
-0.0027790069580078125,
0.01300048828125,
0.00768280029296875,
0.0227813720703125,
0.0267333984375,
0.0033721923828125,
0.019134521484375,
0.0838623046875,
0.0308074951171875,
-0.0150146484375,
0.048553466796875,
-0.01416778564453125,
-0.08184814453125,
0.02655029296875,
0.015960693359375,
0.06121826171875,
0.007701873779296875,
0.0093231201171875,
0.0577392578125,
0.0124664306640625,
-0.0059356689453125,
0.033294677734375,
0.009918212890625,
-0.041412353515625,
-0.006748199462890625,
-0.0168609619140625,
-0.00379180908203125,
-0.01221466064453125,
-0.0220794677734375,
0.0311737060546875,
-0.04302978515625,
0.039306640625,
-0.041595458984375,
-0.005413055419921875,
-0.01087188720703125,
0.03375244140625,
0.037017822265625,
0.0209503173828125,
-0.00449371337890625,
-0.00021183490753173828,
-0.027801513671875,
0.007175445556640625,
-0.0528564453125,
0.0165557861328125,
-0.00955963134765625,
0.005214691162109375,
-0.0080108642578125,
0.051239013671875,
-0.033172607421875,
-0.0001264810562133789,
-0.04876708984375,
-0.0282745361328125,
0.053741455078125,
-0.0220184326171875,
-0.019775390625,
-0.044525146484375,
-0.0031795501708984375,
-0.032318115234375,
-0.061737060546875,
0.084228515625,
0.04364013671875,
0.034881591796875,
-0.01000213623046875,
0.0161590576171875,
0.002742767333984375,
-0.07354736328125,
-0.0009202957153320312,
0.040679931640625,
0.0267333984375,
0.02899169921875,
-0.0058441162109375,
0.00928497314453125,
-0.01194000244140625,
-0.06793212890625,
0.0043487548828125,
0.0037593841552734375,
-0.004917144775390625,
0.05377197265625,
0.00016033649444580078,
0.0228118896484375,
-0.006328582763671875,
-0.0263214111328125,
-0.00780487060546875,
0.034942626953125,
-0.041534423828125,
-0.0288543701171875,
0.003215789794921875,
0.01434326171875,
-0.0146331787109375,
-0.0562744140625,
0.007373809814453125,
-0.033416748046875,
-0.01161956787109375,
0.0139923095703125,
0.006671905517578125,
0.019195556640625,
-0.003986358642578125,
0.00005817413330078125,
0.01482391357421875,
-0.01099395751953125,
-0.00031304359436035156,
0.05120849609375,
0.031646728515625,
-0.062408447265625,
-0.035430908203125,
-0.004390716552734375,
-0.00855255126953125,
0.005970001220703125,
-0.028564453125,
0.033203125,
-0.0011472702026367188,
-0.019195556640625,
-0.031890869140625,
-0.036163330078125,
0.0152740478515625,
-0.006916046142578125,
-0.0261077880859375,
-0.0313720703125,
-0.02423095703125,
0.07769775390625,
-0.033233642578125,
0.058074951171875,
0.0284881591796875,
-0.00478363037109375,
0.004375457763671875,
-0.0222015380859375,
0.02215576171875,
-0.015167236328125,
0.0408935546875,
0.06353759765625,
0.0017309188842773438,
0.0080108642578125,
-0.0011625289916992188,
0.0113372802734375,
0.0014715194702148438,
-0.0259857177734375,
-0.0269012451171875,
0.0203094482421875,
-0.074462890625,
-0.0028095245361328125,
0.01505279541015625,
0.010467529296875,
-0.01532745361328125,
-0.0333251953125,
-0.0107269287109375,
-0.0008244514465332031,
-0.05657958984375,
-0.044525146484375,
-0.0226898193359375,
0.0281982421875,
-0.006282806396484375,
0.06243896484375,
0.021820068359375,
-0.0189056396484375,
0.0723876953125,
0.0133209228515625,
0.0230255126953125,
-0.0638427734375,
-0.06427001953125,
-0.07562255859375,
-0.058746337890625,
-0.007244110107421875,
0.0128631591796875,
-0.00004023313522338867,
0.01824951171875,
0.04034423828125,
0.032562255859375,
0.00415802001953125,
0.06512451171875,
-0.033935546875,
-0.017608642578125,
0.0318603515625,
-0.0277557373046875,
-0.00443267822265625,
-0.0005898475646972656,
-0.0010061264038085938,
0.026824951171875,
0.0031585693359375,
0.005828857421875,
-0.009307861328125,
-0.032501220703125,
0.02569580078125,
-0.0179901123046875,
0.015716552734375,
0.058868408203125,
0.006866455078125,
-0.013763427734375,
-0.0308380126953125,
-0.01097869873046875,
0.0025386810302734375,
-0.0181884765625,
-0.0092315673828125,
0.004306793212890625,
-0.00872039794921875,
-0.0260772705078125,
0.0228424072265625,
0.005767822265625,
0.02105712890625,
0.050079345703125,
-0.0008783340454101562,
-0.005344390869140625,
-0.0248870849609375,
-0.0355224609375,
-0.0443115234375,
0.0535888671875,
0.01357269287109375,
0.013458251953125,
0.0290069580078125,
0.01849365234375,
-0.0062713623046875,
0.0361328125,
-0.043548583984375,
-0.04693603515625,
0.033599853515625,
-0.0015649795532226562,
0.0284423828125,
-0.00893402099609375,
-0.0194854736328125,
0.01073455810546875,
0.09405517578125,
-0.0279388427734375,
-0.035400390625,
0.026641845703125,
0.006809234619140625,
0.03509521484375,
0.0389404296875,
-0.024169921875,
-0.04547119140625,
-0.067626953125,
-0.0235443115234375,
-0.0290069580078125,
-0.01409912109375,
-0.01010894775390625,
0.055328369140625,
-0.0170745849609375,
-0.040496826171875,
0.049896240234375,
-0.053985595703125,
0.02191162109375,
-0.01459503173828125,
0.01105499267578125,
-0.039337158203125,
-0.03802490234375,
-0.0233612060546875,
-0.032867431640625,
-0.0042724609375,
0.01210784912109375,
0.0103912353515625,
-0.0093841552734375,
-0.00665283203125,
-0.003818511962890625,
0.0255584716796875,
0.024505615234375,
0.0169677734375,
0.004791259765625,
-0.0205230712890625,
-0.01470184326171875,
-0.006786346435546875,
0.00629425048828125,
-0.023468017578125,
0.00010704994201660156,
-0.0251617431640625,
-0.01491546630859375,
0.03533935546875,
-0.015228271484375,
0.044921875,
-0.0097198486328125,
-0.0101165771484375,
-0.03179931640625,
-0.027374267578125,
0.02490234375,
0.015899658203125,
0.019866943359375,
-0.0033283233642578125,
-0.0200347900390625,
-0.01067352294921875,
0.0311126708984375,
0.04119873046875,
-0.038848876953125,
0.0078277587890625,
0.06689453125,
0.0226593017578125,
-0.034820556640625,
-0.031158447265625,
0.039154052734375,
0.041015625,
0.022735595703125,
0.0263671875,
0.01456451416015625,
-0.0199737548828125,
0.038330078125,
0.0186309814453125,
0.0010509490966796875,
-0.024444580078125,
0.0269927978515625,
-0.0026721954345703125,
-0.03228759765625,
0.025177001953125,
-0.0150909423828125,
0.0295257568359375,
0.043182373046875,
0.004467010498046875,
-0.02777099609375,
-0.037261962890625,
0.038055419921875,
0.0171661376953125,
0.00934600830078125,
-0.054351806640625,
-0.0338134765625,
0.008941650390625,
-0.007541656494140625,
0.0011196136474609375,
0.006328582763671875,
0.00183868408203125,
0.006259918212890625,
0.0077056884765625,
0.005157470703125,
-0.0260772705078125,
-0.04534912109375,
-0.0251007080078125,
0.0197296142578125,
-0.023712158203125,
-0.00750732421875,
0.01885986328125,
-0.0037097930908203125,
0.039337158203125,
0.01169586181640625,
-0.035400390625,
-0.0168914794921875,
-0.01361846923828125,
-0.010101318359375,
-0.0017862319946289062,
0.03973388671875,
-0.01922607421875,
0.021881103515625,
0.0106964111328125,
-0.01357269287109375,
0.0290679931640625,
0.054046630859375,
-0.00666046142578125,
0.01273345947265625,
-0.0198516845703125,
0.005962371826171875,
0.01438140869140625,
0.0194091796875,
0.00934600830078125,
0.0101165771484375,
-0.0233154296875,
0.0238037109375,
-0.006443023681640625,
0.037933349609375,
-0.006946563720703125,
0.0167236328125,
0.0206756591796875,
0.0078125,
0.00833892822265625,
-0.0303802490234375,
0.00638580322265625,
0.00849151611328125,
0.033538818359375,
-0.0008249282836914062,
-0.030914306640625,
0.018829345703125,
-0.0380859375,
-0.01445770263671875,
0.03424072265625,
-0.032684326171875,
-0.04974365234375,
-0.0159454345703125,
0.005100250244140625,
0.0274505615234375,
-0.0164794921875,
-0.01174163818359375,
-0.0202178955078125,
-0.0142974853515625,
0.0035533905029296875,
0.048980712890625,
-0.0253143310546875,
-0.00443267822265625,
-0.017059326171875,
0.019012451171875,
-0.0211181640625,
-0.0552978515625,
-0.0115814208984375,
0.006900787353515625,
-0.01218414306640625,
-0.01436614990234375,
0.042938232421875,
-0.0216217041015625,
0.0416259765625,
-0.005840301513671875,
-0.036376953125,
0.07318115234375,
0.0008082389831542969,
0.04278564453125,
0.01027679443359375,
-0.04248046875,
0.00010192394256591797,
-0.038909912109375,
-0.0014677047729492188,
0.05401611328125,
-0.0173187255859375,
-0.006214141845703125,
-0.04132080078125,
-0.010528564453125,
0.0120391845703125,
0.00665283203125,
0.00811767578125,
-0.039276123046875,
-0.002529144287109375,
0.0201568603515625,
-0.0034084320068359375,
-0.0188140869140625,
0.0233612060546875,
0.01519775390625,
0.03912353515625,
0.01261138916015625,
0.0318603515625,
0.043731689453125,
-0.057586669921875,
0.00785064697265625,
-0.02947998046875,
-0.0286865234375,
0.01453399658203125,
-0.021820068359375,
0.026519775390625,
0.04412841796875,
-0.0010404586791992188,
0.0108184814453125,
0.01171875,
0.0188140869140625,
-0.0276031494140625,
0.004146575927734375,
-0.02874755859375,
0.0090179443359375,
0.0019893646240234375,
-0.032623291015625,
0.0270843505859375,
0.01375579833984375,
0.0302581787109375,
-0.0222625732421875,
-0.046539306640625,
-0.013092041015625,
0.041229248046875,
-0.03533935546875,
0.03778076171875,
0.057525634765625,
0.00757598876953125,
0.040740966796875,
0.009033203125,
0.0100555419921875,
0.0234832763671875,
-0.007266998291015625,
-0.027252197265625,
-0.03399658203125,
0.0085906982421875,
-0.005340576171875,
0.01323699951171875,
0.0276947021484375,
0.00940704345703125,
0.01348876953125,
0.032745361328125,
0.038604736328125,
-0.056884765625,
0.0047760009765625,
-0.00628662109375,
-0.0197296142578125,
0.024200439453125,
-0.007015228271484375,
0.0208892822265625,
0.031158447265625,
0.0018129348754882812,
0.0201416015625,
-0.027587890625,
-0.00603485107421875,
0.019775390625,
-0.021514892578125,
0.01071929931640625,
0.037353515625,
0.00867462158203125,
-0.00467681884765625,
0.0038623809814453125,
-0.01454925537109375,
0.0087890625,
-0.028564453125,
-0.0185699462890625,
0.0533447265625,
-0.039825439453125,
-0.0304718017578125,
0.06451416015625,
-0.02532958984375,
0.0240325927734375,
0.052886962890625,
0.027252197265625,
0.0252227783203125,
0.0310516357421875,
0.01021575927734375,
0.011138916015625,
-0.0113525390625,
-0.05181884765625,
0.0229949951171875,
-0.00830841064453125,
0.00919342041015625,
-0.0024394989013671875,
-0.061920166015625,
-0.006855010986328125,
-0.05731201171875,
0.016357421875,
-0.0117950439453125,
-0.0819091796875,
0.0279541015625,
-0.055999755859375,
0.0088043212890625,
-0.00521087646484375,
0.0254364013671875,
0.0253143310546875,
-0.03131103515625,
-0.00547027587890625,
-0.0552978515625,
0.0056915283203125,
-0.0222015380859375,
-0.006511688232421875,
0.012847900390625,
-0.04388427734375,
-0.1177978515625,
0.11956787109375,
0.00396728515625,
0.07525634765625,
-0.0290679931640625,
0.0462646484375,
-0.0164642333984375,
0.006381988525390625,
-0.026214599609375,
0.05914306640625,
0.035491943359375,
0.0292816162109375,
-0.00936126708984375,
0.00440216064453125,
0.0281829833984375,
-0.0005536079406738281,
0.051666259765625,
-0.01371002197265625,
0.00811767578125,
-0.0028591156005859375,
0.061004638671875,
0.00632476806640625,
-0.0145263671875,
0.0193023681640625,
-0.0296173095703125,
0.01261138916015625,
-0.002429962158203125,
-0.0361328125,
0.007457733154296875,
0.0030975341796875,
-0.049896240234375,
0.0130462646484375,
0.006526947021484375,
0.0035114288330078125,
-0.001705169677734375,
-0.0225677490234375,
-0.0058135986328125,
-0.007602691650390625,
0.007610321044921875,
-0.0244140625,
0.021759033203125,
0.050384521484375,
0.07928466796875,
-0.068115234375,
-0.00015354156494140625,
-0.035491943359375,
0.072021484375,
0.01442718505859375,
-0.006542205810546875,
0.055267333984375,
0.020965576171875,
0.01000213623046875,
-0.01230621337890625,
-0.00293731689453125,
0.0163116455078125,
-0.01358795166015625,
0.0963134765625,
0.055694580078125,
0.03912353515625,
-0.03546142578125,
-0.0244293212890625,
0.06121826171875,
0.118896484375,
-0.052703857421875,
-0.02691650390625,
0.0186004638671875,
-0.002155303955078125,
-0.0035686492919921875,
0.0163116455078125,
0.0298004150390625,
-0.028106689453125,
-0.01331329345703125,
-0.03021240234375,
0.0195465087890625,
0.047027587890625,
-0.0021419525146484375,
-0.01309967041015625,
-0.0046539306640625,
-0.0153656005859375,
0.0282135009765625,
-0.047088623046875,
-0.020294189453125,
0.00980377197265625,
0.0654296875,
0.058349609375,
0.01690673828125,
0.0166015625,
-0.03778076171875,
-0.021575927734375,
0.0474853515625,
-0.00800323486328125,
0.03204345703125,
-0.09649658203125,
-0.07537841796875,
0.041107177734375,
0.0631103515625,
0.050323486328125,
-0.00379180908203125,
0.018646240234375,
-0.01497650146484375,
-0.029754638671875,
0.0012083053588867188,
-0.0169525146484375,
-0.031341552734375,
0.05230712890625,
-0.0662841796875,
0.050750732421875,
0.00048542022705078125,
-0.0067138671875,
-0.036895751953125,
-0.0200958251953125,
0.049072265625,
-0.01605224609375,
0.006072998046875,
-0.0115966796875,
-0.01548004150390625,
0.0367431640625,
-0.04400634765625,
-0.01151275634765625,
-0.00887298583984375,
-0.054046630859375,
-0.00775146484375,
-0.0252532958984375,
-0.0440673828125,
0.02789306640625,
0.04132080078125,
-0.0136871337890625,
0.0106964111328125,
0.027374267578125,
0.0140228271484375,
-0.0195465087890625,
-0.0100860595703125,
0.01160430908203125,
-0.023895263671875,
0.0211639404296875,
0.017608642578125,
-0.00363922119140625,
-0.012939453125,
0.032684326171875,
0.0212860107421875,
-0.0262908935546875,
0.09112548828125,
-0.052398681640625,
-0.01031494140625,
-0.0248870849609375,
-0.0272674560546875,
0.0263214111328125,
0.00689697265625,
-0.04931640625,
0.039306640625,
0.013458251953125,
-0.0157470703125,
-0.08648681640625,
0.047271728515625,
0.0182647705078125,
0.0141143798828125,
0.0506591796875,
0.0017070770263671875,
0.0036163330078125,
-0.0106964111328125,
0.0150299072265625,
-0.0229644775390625,
-0.046966552734375,
-0.023284912109375,
0.017669677734375,
0.01059722900390625,
0.03070068359375,
-0.00848388671875,
0.043365478515625,
-0.00601959228515625,
-0.01105499267578125,
0.0245361328125,
-0.042816162109375,
0.017669677734375,
0.029510498046875,
0.0016651153564453125,
-0.03564453125,
0.0318603515625,
-0.0017261505126953125,
0.0226287841796875,
0.0030574798583984375,
0.046295166015625,
0.045623779296875,
-0.0197601318359375,
-0.02825927734375,
-0.038055419921875,
-0.022735595703125,
-0.003879547119140625,
-0.01364898681640625,
-0.047607421875,
-0.01113128662109375,
0.01053619384765625,
-0.034454345703125,
-0.0173187255859375,
-0.037384033203125,
-0.01303863525390625,
0.0367431640625,
-0.05224609375,
-0.02490234375,
-0.0675048828125,
0.0084991455078125,
0.0235137939453125,
0.0185394287109375,
-0.06744384765625,
0.0343017578125,
-0.005657196044921875,
0.05419921875,
-0.00499725341796875,
-0.0276641845703125,
-0.01561737060546875,
-0.010345458984375,
-0.0104217529296875,
-0.0218963623046875,
-0.041778564453125,
0.020599365234375,
-0.00955963134765625,
-0.003917694091796875,
0.01461029052734375,
-0.0136566162109375,
0.01611328125,
-0.0386962890625,
0.0099639892578125,
0.02191162109375,
-0.0267333984375,
-0.0277862548828125,
0.0221710205078125,
-0.0172882080078125,
-0.014495849609375,
-0.04278564453125,
0.0090484619140625,
-0.05792236328125,
-0.0102081298828125,
-0.004726409912109375,
-0.0260467529296875,
-0.0345458984375,
-0.040283203125,
-0.0172882080078125,
0.08984375,
0.01361083984375,
-0.0160675048828125,
-0.01415252685546875,
0.0253753662109375,
0.0003387928009033203,
-0.0350341796875,
-0.0084991455078125,
-0.00885772705078125,
-0.003505706787109375,
0.0029621124267578125,
0.005641937255859375,
0.0234527587890625,
-0.0131683349609375,
0.009033203125,
0.007701873779296875,
0.04449462890625,
0.038055419921875,
-0.0188140869140625,
0.03961181640625,
-0.018463134765625,
0.049346923828125,
0.07415771484375,
-0.0157318115234375,
0.01007080078125,
-0.0189056396484375,
-0.07940673828125,
-0.038665771484375,
-0.048004150390625,
-0.01157379150390625,
-0.01548004150390625,
0.08416748046875,
0.050262451171875,
0.01049041748046875,
-0.0230712890625,
-0.0601806640625,
-0.01690673828125,
-0.0031604766845703125,
-0.03204345703125,
0.033233642578125,
-0.0894775390625,
-0.0050811767578125,
0.00738525390625,
-0.0113067626953125,
0.001979827880859375,
-0.028472900390625,
-0.026947021484375,
-0.0009975433349609375,
-0.00638580322265625,
-0.0042724609375,
-0.01528167724609375,
0.005779266357421875,
0.038177490234375,
-0.03704833984375,
-0.0146331787109375,
-0.005706787109375,
0.005462646484375,
-0.005687713623046875,
-0.06170654296875,
-0.00467681884765625,
-0.04638671875,
0.034027099609375,
0.042266845703125,
0.016876220703125,
0.01274871826171875,
-0.008148193359375,
-0.0341796875,
-0.0289154052734375,
0.03887939453125,
0.033477783203125,
0.03814697265625,
-0.06231689453125,
0.0457763671875,
0.0206451416015625,
0.029022216796875,
-0.01629638671875,
0.0041961669921875,
-0.0179290771484375,
0.048126220703125,
-0.0236358642578125,
-0.00925445556640625,
0.029083251953125,
-0.0266876220703125,
0.0017566680908203125,
-0.03106689453125,
-0.017547607421875,
-0.042205810546875,
0.0033016204833984375,
-0.037078857421875,
-0.00548553466796875,
0.0208587646484375
] |
2cd4b28b34af2a8bd33f0b037d7e99aa8bea161c | Wordpress Stackexchange
Q: When importing database, it shows error I was importing my website' database on to another server but it is showing this error which I have no idea about:
I tried importing the database multiple times but failed.
I also checked 'Add Drop Table' field that comes when exporting the database file but it didn't do anything.
A: This issue is as a result of your server not supporting the utf8mb4_unicode_520_ci collation type.
To resolve this you should convert the collation for all tables with utf8mb4_unicode_520_ci to utf8_general_ci
If you're exporting through phpmyadmin, you can:
*
*Click the "Export" tab for the database
*Click the "Custom" radio button
*Go the section titled "Format-specific options" and change the
dropdown for "Database system or older MySQL server to maximize
output compatibility with:" from NONE to MYSQL40.
*Scroll to the bottom and click "GO".
OR run the following query on each of the affected tables:
ALTER TABLE myTable CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci
UPDATE:
You should also replace in your sql exported file TYPE=MyISAM with ENGINE=MyISAM
| Q: When importing database, it shows error I was importing my website' database on to another server but it is showing this error which I have no idea about:
I tried importing the database multiple times but failed.
I also checked 'Add Drop Table' field that comes when exporting the database file but it didn't do anything.
A: This issue is as a result of your server not supporting the utf8mb4_unicode_520_ci collation type.
To resolve this you should convert the collation for all tables with utf8mb4_unicode_520_ci to utf8_general_ci
If you're exporting through phpmyadmin, you can:
*
*Click the "Export" tab for the database
*Click the "Custom" radio button
*Go the section titled "Format-specific options" and change the
dropdown for "Database system or older MySQL server to maximize
output compatibility with:" from NONE to MYSQL40.
*Scroll to the bottom and click "GO".
OR run the following query on each of the affected tables:
ALTER TABLE myTable CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci
UPDATE:
You should also replace in your sql exported file TYPE=MyISAM with ENGINE=MyISAM
A: For some, the collation utf8mb4_unicode_520_ci looks strange but WordPress uses this collation when possible. Other collations are the second best.
Note this line:
// _unicode_520_ is a better collation, we should use that when it's available.
Some plugins will create utf8mb4_unicode_520_ci collation tables no matter what.
File: /var/www/html/test100.com/wp-includes/wp-db.php
761: /**
762: * Determines the best charset and collation to use given a charset and collation.
763: *
764: * For example, when able, utf8mb4 should be used instead of utf8.
765: *
766: * @since 4.6.0
767: * @access public
768: *
769: * @param string $charset The character set to check.
770: * @param string $collate The collation to check.
771: * @return array The most appropriate character set and collation to use.
772: */
773: public function determine_charset( $charset, $collate ) {
774: if ( ( $this->use_mysqli && ! ( $this->dbh instanceof mysqli ) ) || empty( $this->dbh ) ) {
775: return compact( 'charset', 'collate' );
776: }
777:
778: if ( 'utf8' === $charset && $this->has_cap( 'utf8mb4' ) ) {
779: $charset = 'utf8mb4';
780: }
781:
782: if ( 'utf8mb4' === $charset && ! $this->has_cap( 'utf8mb4' ) ) {
783: $charset = 'utf8';
784: $collate = str_replace( 'utf8mb4_', 'utf8_', $collate );
785: }
786:
787: if ( 'utf8mb4' === $charset ) {
788: // _general_ is outdated, so we can upgrade it to _unicode_, instead.
789: if ( ! $collate || 'utf8_general_ci' === $collate ) {
790: $collate = 'utf8mb4_unicode_ci';
791: } else {
792: $collate = str_replace( 'utf8_', 'utf8mb4_', $collate );
793: }
794: }
795:
796: // _unicode_520_ is a better collation, we should use that when it's available.
797: if ( $this->has_cap( 'utf8mb4_520' ) && 'utf8mb4_unicode_ci' === $collate ) {
798: $collate = 'utf8mb4_unicode_520_ci';
799: }
800:
801: return compact( 'charset', 'collate' );
802: }
The utf8mb4_unicode_520_ci (Unicode Collation Algorithm 5.2.0, October 2010) collation is an improvement over utf8mb4_unicode_ci (UCA 4.0.0, November 2003).
There is no word on when MySQL will support later UCAs.
The very latest UCA is 9.0.0 http://www.unicode.org/reports/tr10/, but MySQL doesn't support that.
| wordpress | {
"language": "en",
"length": 520,
"provenance": "stackexchange_00019.jsonl.gz:471509",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/250675"
} | [
0.025360107421875,
0.0007467269897460938,
-0.0239715576171875,
0.018951416015625,
0.01288604736328125,
-0.0399169921875,
0.049468994140625,
-0.0322265625,
0.0538330078125,
0.01209259033203125,
-0.05914306640625,
-0.00873565673828125,
-0.04022216796875,
-0.019317626953125,
-0.039398193359375,
-0.040435791015625,
0.01253509521484375,
0.003391265869140625,
0.008270263671875,
0.0010004043579101562,
0.0214996337890625,
0.01358795166015625,
-0.021026611328125,
-0.029266357421875,
0.01049041748046875,
-0.015838623046875,
0.049224853515625,
0.0005970001220703125,
0.00522613525390625,
-0.004230499267578125,
0.02386474609375,
-0.0303802490234375,
0.006214141845703125,
0.0287017822265625,
-0.00646209716796875,
-0.01346588134765625,
0.0311126708984375,
0.0031909942626953125,
-0.0193939208984375,
0.05841064453125,
0.019561767578125,
-0.010894775390625,
0.06072998046875,
-0.0216827392578125,
0.014862060546875,
-0.033355712890625,
0.0386962890625,
-0.040435791015625,
-0.01387786865234375,
-0.0004742145538330078,
0.027679443359375,
0.0289764404296875,
0.039459228515625,
0.030548095703125,
-0.00988006591796875,
-0.0273895263671875,
-0.038299560546875,
0.08428955078125,
0.007904052734375,
0.043060302734375,
0.0020618438720703125,
0.069091796875,
-0.036773681640625,
-0.0255126953125,
-0.03338623046875,
-0.02886962890625,
0.039398193359375,
-0.01042938232421875,
-0.018524169921875,
-0.0183868408203125,
0.046905517578125,
0.03216552734375,
-0.01306915283203125,
-0.0162811279296875,
-0.04595947265625,
0.039520263671875,
0.03411865234375,
0.013763427734375,
0.00316619873046875,
-0.017791748046875,
-0.01457977294921875,
0.01508331298828125,
-0.051300048828125,
-0.043182373046875,
0.0296630859375,
-0.0010862350463867188,
-0.01012420654296875,
-0.0186767578125,
0.0146331787109375,
-0.00765228271484375,
-0.0071868896484375,
-0.00814056396484375,
-0.034423828125,
0.068115234375,
0.017425537109375,
-0.01436614990234375,
-0.006011962890625,
0.031951904296875,
-0.024505615234375,
0.025787353515625,
-0.0154876708984375,
-0.02471923828125,
0.040496826171875,
-0.044952392578125,
0.0210418701171875,
0.0240936279296875,
-0.034027099609375,
-0.08148193359375,
0.02313232421875,
0.0288238525390625,
0.0034618377685546875,
0.0293731689453125,
-0.033203125,
-0.03289794921875,
-0.0143890380859375,
0.053619384765625,
-0.01800537109375,
-0.021820068359375,
-0.006114959716796875,
-0.0093231201171875,
-0.004329681396484375,
0.046600341796875,
-0.0782470703125,
-0.057403564453125,
-0.036376953125,
-0.0802001953125,
0.002079010009765625,
0.037689208984375,
-0.052825927734375,
0.051513671875,
-0.0080108642578125,
-0.0164794921875,
0.04266357421875,
0.063232421875,
-0.00484466552734375,
-0.0251007080078125,
0.029083251953125,
0.032958984375,
-0.0057220458984375,
0.0120849609375,
0.0025501251220703125,
-0.038665771484375,
-0.017333984375,
-0.0014944076538085938,
-0.0299072265625,
0.038055419921875,
0.0178985595703125,
-0.00193023681640625,
-0.00252532958984375,
-0.06414794921875,
-0.0306243896484375,
0.00392913818359375,
0.04449462890625,
-0.0007424354553222656,
-0.036163330078125,
-0.049072265625,
0.0162353515625,
-0.052734375,
-0.0002849102020263672,
-0.06146240234375,
0.0189971923828125,
-0.027618408203125,
0.0111846923828125,
-0.005535125732421875,
-0.03741455078125,
0.0282745361328125,
-0.07244873046875,
-0.01277923583984375,
0.0175018310546875,
-0.01544952392578125,
-0.05462646484375,
0.0150299072265625,
0.06878662109375,
0.0263519287109375,
0.002407073974609375,
0.046417236328125,
-0.0237884521484375,
-0.033355712890625,
0.0158233642578125,
0.0966796875,
0.0311279296875,
-0.00518798828125,
-0.007137298583984375,
0.0230865478515625,
-0.003437042236328125,
-0.00017571449279785156,
0.02691650390625,
0.043365478515625,
-0.00472259521484375,
0.02923583984375,
-0.011810302734375,
0.018341064453125,
-0.02685546875,
0.0301513671875,
0.005321502685546875,
-0.02374267578125,
-0.0126495361328125,
0.002048492431640625,
-0.00722503662109375,
-0.018157958984375,
-0.01329803466796875,
0.0264434814453125,
-0.0230712890625,
0.0147247314453125,
-0.03607177734375,
-0.003116607666015625,
-0.0091400146484375,
0.03167724609375,
0.0162506103515625,
0.031219482421875,
0.01470184326171875,
0.0124053955078125,
-0.037994384765625,
0.036895751953125,
-0.00893402099609375,
0.0167999267578125,
-0.01727294921875,
0.03314208984375,
-0.00868988037109375,
0.051055908203125,
-0.022735595703125,
-0.01473236083984375,
-0.01531982421875,
0.004848480224609375,
-0.036895751953125,
0.0020008087158203125,
-0.0298614501953125,
0.0195465087890625,
-0.0115203857421875,
-0.01142120361328125,
0.0711669921875,
0.015289306640625,
0.0270233154296875,
0.043304443359375,
-0.00908660888671875,
0.0030422210693359375,
-0.0018835067749023438,
-0.06488037109375,
0.0128631591796875,
0.045989990234375,
0.0400390625,
0.00957489013671875,
-0.0220489501953125,
-0.0245208740234375,
-0.0084228515625,
-0.06903076171875,
0.012786865234375,
-0.0204315185546875,
-0.01447296142578125,
-0.0029926300048828125,
-0.0472412109375,
-0.0010280609130859375,
0.030517578125,
-0.035980224609375,
-0.038726806640625,
0.043243408203125,
-0.0499267578125,
-0.007534027099609375,
-0.03656005859375,
0.00039076805114746094,
0.014801025390625,
-0.06689453125,
-0.0271148681640625,
-0.0347900390625,
-0.030914306640625,
0.0304718017578125,
0.0205841064453125,
0.020904541015625,
0.007122039794921875,
0.0049591064453125,
0.009765625,
-0.02423095703125,
-0.00864410400390625,
-0.032958984375,
-0.0037059783935546875,
0.095458984375,
-0.0418701171875,
0.018402099609375,
0.024200439453125,
0.0082550048828125,
-0.022613525390625,
0.007778167724609375,
-0.00911712646484375,
-0.00881195068359375,
-0.005451202392578125,
-0.0115203857421875,
0.0198822021484375,
-0.01480865478515625,
-0.044830322265625,
-0.04052734375,
0.01110076904296875,
0.0210418701171875,
-0.0006546974182128906,
-0.0228118896484375,
0.0063629150390625,
-0.01415252685546875,
0.07623291015625,
-0.0254974365234375,
0.02239990234375,
-0.006702423095703125,
0.022979736328125,
0.041778564453125,
-0.00946807861328125,
-0.009796142578125,
0.0023975372314453125,
-0.032501220703125,
0.031646728515625,
0.00714111328125,
-0.008636474609375,
-0.036163330078125,
-0.04522705078125,
-0.02008056640625,
0.0262603759765625,
-0.0084381103515625,
0.024444580078125,
-0.0175323486328125,
-0.026763916015625,
0.00595855712890625,
-0.059783935546875,
-0.046295166015625,
-0.046600341796875,
0.01274871826171875,
-0.045013427734375,
0.0202178955078125,
0.01088714599609375,
0.023468017578125,
-0.01806640625,
0.0018062591552734375,
0.047271728515625,
-0.046905517578125,
-0.036834716796875,
-0.07232666015625,
-0.07904052734375,
-0.08233642578125,
0.0239715576171875,
0.01073455810546875,
0.004520416259765625,
-0.0283660888671875,
-0.007518768310546875,
-0.0122528076171875,
-0.00580596923828125,
-0.00313568115234375,
-0.01611328125,
-0.06201171875,
-0.0071868896484375,
-0.017547607421875,
-0.0256500244140625,
0.0052490234375,
0.046173095703125,
0.01491546630859375,
-0.0171661376953125,
0.006694793701171875,
-0.00864410400390625,
0.0135345458984375,
0.00913238525390625,
-0.046966552734375,
-0.00040984153747558594,
-0.01427459716796875,
-0.0499267578125,
-0.0662841796875,
-0.03997802734375,
0.028350830078125,
-0.0202484130859375,
0.013824462890625,
-0.0049591064453125,
-0.0289459228515625,
0.01251983642578125,
0.01910400390625,
0.019134521484375,
0.01285552978515625,
-0.0027370452880859375,
0.00803375244140625,
-0.021697998046875,
-0.00916290283203125,
-0.0041046142578125,
-0.0108184814453125,
0.0648193359375,
0.00921630859375,
0.007305145263671875,
0.054046630859375,
0.0164947509765625,
0.0035858154296875,
0.00688934326171875,
-0.0191650390625,
-0.0797119140625,
0.0377197265625,
-0.048858642578125,
-0.0145721435546875,
-0.021942138671875,
-0.01551055908203125,
0.036712646484375,
0.1103515625,
0.0004715919494628906,
-0.0204315185546875,
0.012359619140625,
-0.00142669677734375,
-0.007175445556640625,
0.025543212890625,
-0.035003662109375,
-0.01323699951171875,
0.0197601318359375,
-0.04864501953125,
-0.035980224609375,
-0.038665771484375,
-0.00197601318359375,
-0.03472900390625,
0.0306854248046875,
-0.0175323486328125,
0.006557464599609375,
0.0129241943359375,
0.004161834716796875,
0.052520751953125,
-0.0177459716796875,
0.042449951171875,
-0.013946533203125,
-0.020233154296875,
-0.08465576171875,
-0.0139007568359375,
-0.02777099609375,
0.0494384765625,
-0.01290130615234375,
0.0231475830078125,
-0.025787353515625,
0.047760009765625,
-0.035369873046875,
0.004627227783203125,
-0.00012671947479248047,
0.03863525390625,
-0.0190277099609375,
0.017578125,
0.0135650634765625,
-0.0362548828125,
-0.0129241943359375,
-0.040618896484375,
-0.05975341796875,
-0.0220947265625,
-0.01123809814453125,
0.037689208984375,
0.0040130615234375,
-0.019378662109375,
-0.01047515869140625,
-0.0226898193359375,
-0.01517486572265625,
0.0281219482421875,
0.0016841888427734375,
-0.02508544921875,
-0.031341552734375,
-0.045623779296875,
0.01364898681640625,
0.0005249977111816406,
-0.0183868408203125,
0.0245819091796875,
0.045928955078125,
0.02227783203125,
-0.0135650634765625,
-0.043731689453125,
-0.01444244384765625,
0.0197906494140625,
0.007640838623046875,
0.04632568359375,
0.0197601318359375,
-0.0012807846069335938,
0.05352783203125,
-0.0008282661437988281,
-0.0082244873046875,
-0.028350830078125,
-0.005893707275390625,
0.002719879150390625,
-0.0223388671875,
0.0197296142578125,
-0.0109405517578125,
0.0369873046875,
0.043243408203125,
0.022552490234375,
-0.02154541015625,
0.018646240234375,
0.0175018310546875,
0.0177459716796875,
-0.0333251953125,
-0.0267486572265625,
-0.0266876220703125,
0.032318115234375,
-0.0704345703125,
-0.00925445556640625,
-0.020751953125,
0.0167236328125,
-0.039642333984375,
-0.05096435546875,
-0.006038665771484375,
-0.00783538818359375,
0.046051025390625,
0.0014867782592773438,
0.0311126708984375,
0.015960693359375,
-0.0131683349609375,
-0.046478271484375,
-0.00778961181640625,
0.03192138671875,
0.0220489501953125,
-0.01551055908203125,
-0.0156707763671875,
0.00983428955078125,
-0.00444793701171875,
-0.009246826171875,
0.0271453857421875,
-0.02679443359375,
0.006740570068359375,
0.0013170242309570312,
0.01548004150390625,
0.0880126953125,
-0.002162933349609375,
0.01617431640625,
-0.01959228515625,
-0.00775909423828125,
-0.0167999267578125,
0.03338623046875,
0.02117919921875,
-0.039398193359375,
0.0259857177734375,
-0.0030193328857421875,
-0.022003173828125,
0.002170562744140625,
0.06744384765625,
0.0255889892578125,
-0.050750732421875,
0.01009368896484375,
0.04498291015625,
0.00762176513671875,
-0.06439208984375,
0.028717041015625,
-0.0341796875,
0.051666259765625,
-0.034942626953125,
-0.06475830078125,
0.0887451171875,
-0.034332275390625,
-0.005832672119140625,
0.0609130859375,
0.00847625732421875,
-0.047576904296875,
-0.016693115234375,
-0.006153106689453125,
0.0254974365234375,
-0.0303192138671875,
0.0155487060546875,
0.0022640228271484375,
0.0271148681640625,
0.0379638671875,
0.002643585205078125,
0.0108184814453125,
-0.00390625,
-0.029571533203125,
0.02447509765625,
-0.0714111328125,
-0.025665283203125,
0.006221771240234375,
0.0687255859375,
-0.032470703125,
-0.01031494140625,
-0.0009713172912597656,
-0.0157470703125,
-0.007595062255859375,
-0.0170745849609375,
0.0097198486328125,
-0.03656005859375,
0.00852203369140625,
0.02410888671875,
-0.0015573501586914062,
0.00824737548828125,
0.0179595947265625,
-0.022369384765625,
-0.033172607421875,
0.0156402587890625,
-0.0166778564453125,
-0.04931640625,
-0.035491943359375,
-0.001300811767578125,
-0.00431060791015625,
0.0169219970703125,
-0.005828857421875,
-0.0196075439453125,
0.0390625,
0.0036334991455078125,
-0.0259552001953125,
-0.04705810546875,
0.0689697265625,
0.01454925537109375,
-0.006458282470703125,
-0.007358551025390625,
0.057281494140625,
0.036102294921875,
-0.00334930419921875,
-0.00016355514526367188,
-0.039947509765625,
0.0158538818359375,
-0.01018524169921875,
0.01031494140625,
-0.0146636962890625,
0.0018377304077148438,
0.0005612373352050781,
0.0012102127075195312,
-0.0230712890625,
0.0007567405700683594,
-0.002101898193359375,
0.0628662109375,
0.00807952880859375,
0.01129913330078125,
0.04345703125,
-0.030517578125,
0.00453948974609375,
0.0019435882568359375,
0.0185394287109375,
0.0185394287109375,
-0.038543701171875,
0.0127410888671875,
-0.0072479248046875,
0.004199981689453125,
0.04364013671875,
0.0247802734375,
-0.01849365234375,
0.00994873046875,
0.02880859375,
-0.0020771026611328125,
-0.0193939208984375,
-0.00888824462890625,
-0.035919189453125,
-0.0250701904296875,
-0.04913330078125,
-0.0282745361328125,
0.00908660888671875,
-0.047637939453125,
0.007781982421875,
0.02349853515625,
0.1031494140625,
0.08514404296875,
-0.1104736328125,
0.00510406494140625,
0.0306854248046875,
-0.05584716796875,
-0.03546142578125,
-0.00009083747863769531,
-0.031158447265625,
-0.06866455078125,
0.016448974609375,
-0.0032863616943359375,
-0.0298614501953125,
-0.006435394287109375,
0.010772705078125,
-0.0159149169921875,
-0.018890380859375,
0.01271820068359375,
0.01026153564453125,
0.002376556396484375,
0.002101898193359375,
-0.02117919921875,
0.015533447265625,
0.020233154296875,
0.010955810546875,
-0.04315185546875,
-0.0192718505859375,
0.0005631446838378906,
-0.01136016845703125,
-0.060699462890625,
0.0096588134765625,
-0.00562286376953125,
0.007843017578125,
0.054840087890625,
0.04022216796875,
-0.007144927978515625,
0.00218963623046875,
0.009368896484375,
0.05059814453125,
0.04595947265625,
0.0031833648681640625,
-0.0228424072265625,
0.02630615234375,
-0.022308349609375,
-0.000030338764190673828,
-0.020538330078125,
0.0220489501953125,
-0.006755828857421875,
-0.05877685546875,
0.0055999755859375,
0.039794921875,
-0.0129241943359375,
0.041015625,
0.0013027191162109375,
-0.020599365234375,
0.002704620361328125,
0.051300048828125,
-0.044403076171875,
-0.022369384765625,
0.039093017578125,
-0.016876220703125,
-0.063720703125,
0.001781463623046875,
-0.050079345703125,
0.028076171875,
-0.012451171875,
0.00269317626953125,
0.007602691650390625,
0.00528717041015625,
-0.02392578125,
-0.0206298828125,
-0.043548583984375,
0.0489501953125,
0.035430908203125,
0.0380859375,
-0.06640625,
-0.0070648193359375,
0.0024566650390625,
0.01824951171875,
-0.03094482421875,
-0.0132598876953125,
-0.00717926025390625,
0.0175933837890625,
0.04522705078125,
0.028472900390625,
0.0251617431640625,
0.0165557861328125,
-0.0228729248046875,
-0.00974273681640625,
0.0753173828125,
0.01218414306640625,
0.026031494140625,
0.05609130859375,
-0.0254974365234375,
-0.0124664306640625,
-0.00646209716796875,
-0.017364501953125,
0.0085906982421875,
-0.054168701171875,
0.040496826171875,
-0.02032470703125,
-0.034393310546875,
-0.031707763671875,
0.032928466796875,
-0.00833892822265625,
0.0149383544921875,
-0.07147216796875,
-0.01322174072265625,
-0.014007568359375,
0.038818359375,
0.0041961669921875,
0.01214599609375,
0.023590087890625,
0.0164947509765625,
0.06634521484375,
0.0071868896484375,
0.00626373291015625,
0.024566650390625,
0.00623321533203125,
0.050567626953125,
0.037078857421875,
0.04132080078125,
0.0212860107421875,
0.007114410400390625,
0.0061187744140625,
0.060546875,
-0.033294677734375,
-0.06097412109375,
0.01666259765625,
0.0016422271728515625,
-0.01012420654296875,
0.0164947509765625,
-0.01419830322265625,
-0.021942138671875,
0.0362548828125,
0.03350830078125,
-0.0290069580078125,
-0.01471710205078125,
-0.014190673828125,
0.01320648193359375,
0.0618896484375,
0.02337646484375,
-0.0172882080078125,
-0.058380126953125,
0.059967041015625,
0.032684326171875,
0.04229736328125,
-0.0252838134765625,
0.054412841796875,
0.00914764404296875,
-0.0153656005859375,
0.0106964111328125,
0.0136871337890625,
-0.01380157470703125,
-0.002269744873046875,
-0.0254364013671875,
-0.06341552734375,
-0.0026607513427734375,
0.0374755859375,
-0.03961181640625,
-0.006931304931640625,
0.0234222412109375,
0.05548095703125,
-0.035308837890625,
-0.0295257568359375,
0.02520751953125,
-0.01441192626953125,
-0.0269317626953125,
-0.056671142578125,
0.038848876953125,
0.039093017578125,
0.03204345703125,
0.01096343994140625,
0.044525146484375,
0.0286102294921875,
-0.0197296142578125,
0.0231170654296875,
-0.0037021636962890625,
-0.0192108154296875,
0.036590576171875,
-0.02166748046875,
0.041351318359375,
0.0002791881561279297,
-0.004150390625,
0.0101776123046875,
-0.043731689453125,
0.0389404296875,
-0.01186370849609375,
0.01042938232421875,
0.001361846923828125,
0.05328369140625,
0.04547119140625,
-0.031219482421875,
0.004467010498046875,
0.0300445556640625,
0.007305145263671875,
0.0034008026123046875,
0.0183868408203125,
-0.00321197509765625,
0.01904296875,
0.00754547119140625,
0.0264892578125,
0.029754638671875,
-0.012847900390625,
0.04840087890625,
-0.025177001953125,
0.00634002685546875,
0.0222930908203125,
0.0193328857421875,
-0.00017702579498291016,
0.025115966796875,
-0.0112152099609375,
0.0213623046875,
0.0241546630859375,
-0.033935546875,
-0.06072998046875,
0.0233612060546875,
-0.007343292236328125,
0.006145477294921875,
-0.0027904510498046875,
-0.022918701171875,
0.03955078125,
0.039642333984375,
0.01078033447265625,
-0.00423431396484375,
-0.004787445068359375,
0.049957275390625,
0.0245208740234375,
0.022918701171875,
0.022796630859375,
-0.0253448486328125,
-0.019378662109375,
0.0325927734375,
-0.02386474609375,
0.02947998046875,
0.0080718994140625,
0.07147216796875,
0.0404052734375,
-0.0260009765625,
-0.05126953125,
0.00682830810546875,
-0.005489349365234375,
0.01476287841796875,
0.0049896240234375,
0.06768798828125,
0.00405120849609375,
-0.01415252685546875,
0.0203704833984375,
0.0194244384765625,
0.0163421630859375,
-0.0248260498046875,
0.0074920654296875,
0.0335693359375,
-0.0178070068359375,
0.0284271240234375,
-0.004241943359375,
-0.006420135498046875,
-0.01806640625,
-0.0035858154296875,
0.0020809173583984375,
-0.01300811767578125,
-0.00960540771484375,
-0.005451202392578125,
0.00531768798828125,
0.0283050537109375,
-0.004337310791015625,
-0.03009033203125,
0.0069580078125,
-0.03289794921875,
0.0233917236328125,
-0.01253509521484375,
-0.0112762451171875,
0.0034580230712890625,
0.0270233154296875,
-0.035614013671875,
-0.041046142578125,
-0.04254150390625,
0.0157012939453125,
-0.04803466796875,
0.01061248779296875,
0.0228118896484375,
-0.007373809814453125,
0.002681732177734375,
-0.0045166015625,
0.001049041748046875,
0.0235748291015625,
-0.0256500244140625,
-0.039825439453125,
0.0188446044921875,
-0.0159759521484375,
-0.0226593017578125,
-0.047119140625,
0.0155181884765625,
-0.099609375,
-0.014129638671875,
-0.0364990234375,
0.00820159912109375,
-0.0081634521484375,
-0.044097900390625,
-0.07342529296875,
0.055450439453125,
-0.01129150390625,
-0.01568603515625,
0.0052032470703125,
-0.00954437255859375,
-0.037750244140625,
0.0186309814453125,
0.006866455078125,
-0.019989013671875,
0.035186767578125,
0.048248291015625,
0.00616455078125,
-0.00704193115234375,
0.034149169921875,
-0.042205810546875,
-0.044281005859375,
-0.01227569580078125,
0.0081329345703125,
0.003997802734375,
0.0114288330078125,
-0.0133819580078125,
0.031646728515625,
0.05731201171875,
-0.01364898681640625,
-0.00922393798828125,
-0.0050506591796875,
-0.03826904296875,
-0.0166168212890625,
0.0080108642578125,
-0.036865234375,
-0.01299285888671875,
0.08154296875,
0.0333251953125,
0.0259246826171875,
-0.022216796875,
-0.0237884521484375,
-0.049652099609375,
0.0037631988525390625,
-0.03656005859375,
0.003917694091796875,
-0.061492919921875,
-0.021270751953125,
0.0085906982421875,
-0.0008492469787597656,
0.0899658203125,
-0.0201263427734375,
-0.00873565673828125,
0.01314544677734375,
0.019561767578125,
-0.030609130859375,
-0.06683349609375,
0.0247039794921875,
0.035003662109375,
-0.0404052734375,
-0.0257415771484375,
0.015899658203125,
-0.01617431640625,
-0.00402069091796875,
-0.0014677047729492188,
-0.056182861328125,
-0.06884765625,
0.0287628173828125,
0.0345458984375,
-0.028106689453125,
0.0325927734375,
0.00952911376953125,
-0.01024627685546875,
0.0305023193359375,
0.0126800537109375,
-0.028076171875,
0.00942230224609375,
0.020050048828125,
0.0203704833984375,
-0.0396728515625,
0.022705078125,
-0.0181884765625,
-0.0386962890625,
-0.054351806640625,
0.0311279296875,
-0.0296173095703125,
0.000537872314453125,
-0.01467132568359375,
0.00305938720703125,
0.01198577880859375,
-0.00490570068359375,
0.03985595703125,
-0.030975341796875,
0.0487060546875,
0.0372314453125,
0.00009387731552124023,
0.0274810791015625
] |
2d677a60ca78f0b68f94bba58374ba68ae58f725 | Wordpress Stackexchange
Q: how to update current logged user username I need to keep in sync the username and the email of my users. I don't know if there is a better way so I have tried running this code right after the user updates his profile data:
global $wpdb;
$wpdb->update(
$wpdb->users,
array('user_login' => $email),
array('ID' => $user->ID)
);
but this way the auth cookie becomes invalid and the user is logged out.
I have also tried forcing the creation of the auth cookie right after the update, like this:
wp_clear_auth_cookie();
$user = get_user_by( 'id', $user_id );
if( $user ) {
wp_set_current_user( $user_id, $user->user_login );
wp_set_auth_cookie( $user_id, true );
do_action( 'wp_login', $user->user_login );
}
but with no results.
A: Try hooking in as soon as the user is created or updated.
<?php
function wpse_250785_sync_user_login_with_email($user_id) {
$user = new WP_User($user_id);
if ($user->user_login != $user->user_email) {
$user->user_login = $user->user_email;
wp_update_user($user);
}
}
add_action('user_register', 'wpse_250785_sync_user_login_with_email');
add_action('profile_update', 'wpse_250785_sync_user_login_with_email');
Disclaimer: Untested, but should work ;)
| Q: how to update current logged user username I need to keep in sync the username and the email of my users. I don't know if there is a better way so I have tried running this code right after the user updates his profile data:
global $wpdb;
$wpdb->update(
$wpdb->users,
array('user_login' => $email),
array('ID' => $user->ID)
);
but this way the auth cookie becomes invalid and the user is logged out.
I have also tried forcing the creation of the auth cookie right after the update, like this:
wp_clear_auth_cookie();
$user = get_user_by( 'id', $user_id );
if( $user ) {
wp_set_current_user( $user_id, $user->user_login );
wp_set_auth_cookie( $user_id, true );
do_action( 'wp_login', $user->user_login );
}
but with no results.
A: Try hooking in as soon as the user is created or updated.
<?php
function wpse_250785_sync_user_login_with_email($user_id) {
$user = new WP_User($user_id);
if ($user->user_login != $user->user_email) {
$user->user_login = $user->user_email;
wp_update_user($user);
}
}
add_action('user_register', 'wpse_250785_sync_user_login_with_email');
add_action('profile_update', 'wpse_250785_sync_user_login_with_email');
Disclaimer: Untested, but should work ;)
| wordpress | {
"language": "en",
"length": 158,
"provenance": "stackexchange_00019.jsonl.gz:471538",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/250785"
} | [
0.0455322265625,
0.001895904541015625,
-0.0205230712890625,
-0.0134735107421875,
0.03173828125,
-0.052825927734375,
0.050689697265625,
-0.01317596435546875,
-0.020538330078125,
0.040130615234375,
0.00525665283203125,
-0.01110076904296875,
0.0132293701171875,
-0.0227203369140625,
-0.01020050048828125,
-0.024688720703125,
0.0147705078125,
-0.00994873046875,
0.005886077880859375,
-0.01505279541015625,
0.0080413818359375,
0.00044465065002441406,
-0.005313873291015625,
0.0129241943359375,
-0.007904052734375,
-0.034759521484375,
0.0772705078125,
-0.01541900634765625,
0.008026123046875,
0.003620147705078125,
0.01397705078125,
-0.0170440673828125,
0.009857177734375,
0.058258056640625,
-0.07501220703125,
-0.0211944580078125,
0.01171112060546875,
-0.00281524658203125,
-0.0101318359375,
0.037689208984375,
0.0194244384765625,
0.0118865966796875,
-0.021514892578125,
0.0007357597351074219,
-0.038055419921875,
-0.05609130859375,
0.033203125,
0.0015268325805664062,
0.01910400390625,
0.0455322265625,
0.0267333984375,
0.040130615234375,
0.016632080078125,
0.006641387939453125,
0.0196533203125,
0.0433349609375,
-0.040191650390625,
0.01187896728515625,
0.023834228515625,
-0.0007843971252441406,
-0.007411956787109375,
-0.032318115234375,
0.02447509765625,
-0.0167999267578125,
0.01334381103515625,
-0.0116119384765625,
0.028167724609375,
0.0295562744140625,
-0.0261688232421875,
-0.0093841552734375,
0.018280029296875,
-0.01184844970703125,
-0.0245208740234375,
-0.0012006759643554688,
-0.01214599609375,
0.00530242919921875,
0.007198333740234375,
0.0129852294921875,
0.007106781005859375,
0.04095458984375,
-0.0305328369140625,
-0.00801849365234375,
-0.058502197265625,
0.01090240478515625,
-0.0030364990234375,
0.044281005859375,
-0.03057861328125,
-0.0217742919921875,
0.006755828857421875,
-0.0003476142883300781,
0.00042891502380371094,
0.00820159912109375,
0.006511688232421875,
0.0102691650390625,
-0.0172271728515625,
-0.0258941650390625,
0.020660400390625,
0.052642822265625,
-0.022705078125,
-0.01220703125,
-0.0205535888671875,
-0.0133514404296875,
-0.036285400390625,
-0.014495849609375,
-0.00762176513671875,
0.058197021484375,
0.044769287109375,
0.01029205322265625,
-0.0142364501953125,
-0.0201873779296875,
-0.008270263671875,
-0.00044226646423339844,
-0.041046142578125,
-0.05963134765625,
0.0119171142578125,
0.049560546875,
-0.05926513671875,
0.0253143310546875,
0.00121307373046875,
0.0107421875,
-0.023712158203125,
-0.013763427734375,
-0.035980224609375,
-0.003871917724609375,
0.016510009765625,
-0.0261688232421875,
-0.0115509033203125,
0.046600341796875,
-0.026947021484375,
0.0197601318359375,
-0.05084228515625,
0.02362060546875,
0.1058349609375,
0.037322998046875,
0.0135955810546875,
-0.02203369140625,
0.01306915283203125,
-0.038604736328125,
-0.01763916015625,
0.04595947265625,
-0.0240478515625,
-0.0537109375,
-0.02508544921875,
-0.016998291015625,
0.0302734375,
0.01264190673828125,
0.015228271484375,
0.01479339599609375,
0.0203094482421875,
-0.0090484619140625,
0.012054443359375,
-0.01861572265625,
-0.037384033203125,
0.04150390625,
0.06591796875,
0.0291290283203125,
0.0347900390625,
-0.004550933837890625,
0.0194549560546875,
0.0101470947265625,
0.0269317626953125,
-0.0218048095703125,
-0.00689697265625,
-0.0183563232421875,
-0.060791015625,
0.0290069580078125,
-0.047393798828125,
-0.01322174072265625,
0.033355712890625,
-0.00213623046875,
0.045806884765625,
-0.002384185791015625,
0.049560546875,
0.01568603515625,
-0.00399017333984375,
-0.00817108154296875,
-0.034393310546875,
0.03411865234375,
0.027191162109375,
-0.027557373046875,
-0.016082763671875,
-0.037445068359375,
0.043792724609375,
0.006931304931640625,
-0.001667022705078125,
0.031402587890625,
0.0003905296325683594,
0.01541900634765625,
0.018707275390625,
0.00914764404296875,
-0.029388427734375,
0.026580810546875,
-0.0204925537109375,
-0.0003771781921386719,
-0.0020389556884765625,
-0.027099609375,
0.02911376953125,
-0.00971221923828125,
-0.001415252685546875,
0.01560211181640625,
0.037841796875,
-0.005260467529296875,
-0.005100250244140625,
-0.03179931640625,
-0.0914306640625,
-0.006374359130859375,
-0.030548095703125,
0.0293426513671875,
-0.0007457733154296875,
0.005092620849609375,
0.0198211669921875,
0.00018167495727539062,
-0.00879669189453125,
-0.0236053466796875,
-0.04119873046875,
-0.00148773193359375,
-0.03533935546875,
0.0418701171875,
0.00028061866760253906,
0.08648681640625,
-0.01788330078125,
-0.031158447265625,
-0.0059967041015625,
-0.04400634765625,
0.0027790069580078125,
-0.0292205810546875,
-0.0017347335815429688,
-0.0302581787109375,
-0.01410675048828125,
-0.0224761962890625,
0.017547607421875,
0.05316162109375,
-0.02056884765625,
0.00695037841796875,
-0.037506103515625,
-0.01739501953125,
-0.03387451171875,
-0.03778076171875,
0.0206298828125,
0.043914794921875,
0.029541015625,
-0.022613525390625,
0.01122283935546875,
0.02880859375,
0.024444580078125,
0.0270233154296875,
0.048583984375,
-0.0166473388671875,
0.019134521484375,
0.07757568359375,
-0.0067596435546875,
0.0195770263671875,
-0.00942230224609375,
-0.06585693359375,
0.0101165771484375,
0.0308990478515625,
-0.011138916015625,
0.01224517822265625,
-0.01019287109375,
-0.022796630859375,
-0.01708984375,
-0.0869140625,
-0.0021419525146484375,
-0.04638671875,
0.00937652587890625,
-0.0343017578125,
-0.0049285888671875,
-0.0242462158203125,
-0.01160430908203125,
-0.0248870849609375,
0.0290374755859375,
-0.040863037109375,
0.0148773193359375,
0.003864288330078125,
-0.0225982666015625,
0.0009908676147460938,
-0.01543426513671875,
0.00705718994140625,
0.0195770263671875,
-0.004375457763671875,
-0.016326904296875,
-0.023223876953125,
0.008148193359375,
-0.006114959716796875,
0.0419921875,
-0.020660400390625,
0.01288604736328125,
-0.01739501953125,
0.02178955078125,
-0.038482666015625,
0.0159454345703125,
-0.005397796630859375,
-0.03973388671875,
0.0682373046875,
-0.01812744140625,
-0.050445556640625,
0.01012420654296875,
-0.014617919921875,
0.0294952392578125,
-0.04071044921875,
0.00919342041015625,
0.056884765625,
-0.005062103271484375,
0.00258636474609375,
0.0014591217041015625,
-0.023284912109375,
-0.0156707763671875,
0.0213775634765625,
0.006114959716796875,
-0.054168701171875,
0.034698486328125,
0.07855224609375,
0.0265350341796875,
0.08026123046875,
-0.026397705078125,
-0.05279541015625,
-0.008148193359375,
0.0357666015625,
-0.04437255859375,
-0.047454833984375,
-0.0506591796875,
-0.09173583984375,
0.0213623046875,
-0.024932861328125,
-0.03668212890625,
0.0196075439453125,
0.0034770965576171875,
0.0281982421875,
-0.0046844482421875,
-0.055267333984375,
-0.048736572265625,
-0.0804443359375,
-0.0572509765625,
0.0200042724609375,
0.0011911392211914062,
0.0098419189453125,
-0.00478363037109375,
0.016937255859375,
-0.0058746337890625,
-0.00872802734375,
-0.01849365234375,
0.026031494140625,
-0.0047149658203125,
-0.04241943359375,
-0.017059326171875,
-0.01235198974609375,
0.0284271240234375,
-0.0004949569702148438,
0.01154327392578125,
0.014434814453125,
0.0050201416015625,
-0.01290130615234375,
0.004627227783203125,
-0.03753662109375,
0.035247802734375,
-0.01070404052734375,
-0.0284423828125,
0.01690673828125,
0.049407958984375,
-0.0270538330078125,
0.0187225341796875,
-0.0131072998046875,
-0.020538330078125,
0.0145111083984375,
-0.0101165771484375,
-0.01641845703125,
0.010528564453125,
-0.01219940185546875,
0.0043182373046875,
0.037109375,
-0.002864837646484375,
-0.0005826950073242188,
0.0159454345703125,
-0.010009765625,
-0.0212249755859375,
-0.0170135498046875,
0.0164031982421875,
-0.007076263427734375,
-0.025390625,
-0.01352691650390625,
0.00147247314453125,
-0.032196044921875,
0.00909423828125,
-0.055816650390625,
-0.0582275390625,
0.059906005859375,
-0.0206756591796875,
0.027099609375,
-0.079345703125,
-0.03338623046875,
-0.03472900390625,
0.1063232421875,
0.00749969482421875,
-0.00998687744140625,
0.0269775390625,
0.01690673828125,
-0.0601806640625,
-0.007762908935546875,
-0.060028076171875,
0.0007419586181640625,
0.00804901123046875,
-0.01934814453125,
-0.0260009765625,
0.0017271041870117188,
-0.0030918121337890625,
-0.01788330078125,
0.0095062255859375,
-0.037109375,
0.02142333984375,
0.01419830322265625,
0.00644683837890625,
0.0170135498046875,
-0.015716552734375,
0.00013005733489990234,
-0.0022525787353515625,
-0.006427764892578125,
-0.049957275390625,
0.005374908447265625,
-0.032958984375,
0.0325927734375,
0.029541015625,
-0.01517486572265625,
-0.036651611328125,
0.0005755424499511719,
-0.009490966796875,
-0.014556884765625,
0.00746917724609375,
0.0277252197265625,
-0.0181121826171875,
-0.0162506103515625,
-0.0146636962890625,
-0.0239105224609375,
-0.006381988525390625,
-0.0205230712890625,
-0.0244140625,
0.0185546875,
-0.044281005859375,
0.0198211669921875,
-0.01250457763671875,
-0.0126800537109375,
-0.047760009765625,
-0.003864288330078125,
0.004138946533203125,
0.035980224609375,
-0.011932373046875,
0.01433563232421875,
-0.01493072509765625,
-0.0750732421875,
0.07110595703125,
-0.007190704345703125,
0.00762176513671875,
-0.017242431640625,
0.060943603515625,
0.0113677978515625,
-0.0302276611328125,
0.0217132568359375,
0.0197296142578125,
0.0322265625,
0.0145111083984375,
0.0391845703125,
0.0192718505859375,
-0.0340576171875,
0.03631591796875,
0.03546142578125,
0.0145111083984375,
-0.0177154541015625,
0.019012451171875,
-0.0027561187744140625,
-0.038848876953125,
0.033233642578125,
-0.0139312744140625,
-0.0089569091796875,
-0.011932373046875,
0.00836181640625,
-0.030731201171875,
0.009429931640625,
0.01290130615234375,
0.01910400390625,
0.020050048828125,
0.006328582763671875,
-0.0640869140625,
0.01020050048828125,
-0.0225677490234375,
-0.0097808837890625,
-0.012908935546875,
0.0025386810302734375,
0.003055572509765625,
0.0004191398620605469,
-0.029083251953125,
-0.050628662109375,
-0.091064453125,
0.0252227783203125,
-0.015838623046875,
-0.03070068359375,
0.007434844970703125,
-0.005954742431640625,
-0.03216552734375,
0.11749267578125,
0.0243988037109375,
-0.037750244140625,
0.04229736328125,
-0.04327392578125,
0.0303955078125,
0.0247955322265625,
-0.004482269287109375,
0.07220458984375,
0.01474761962890625,
-0.035888671875,
-0.026580810546875,
-0.037322998046875,
-0.0200347900390625,
-0.0716552734375,
-0.0030498504638671875,
0.00007873773574829102,
-0.0170440673828125,
0.00479888916015625,
0.037017822265625,
0.031280517578125,
0.009796142578125,
-0.0216064453125,
0.046051025390625,
0.0550537109375,
0.0176849365234375,
0.022430419921875,
-0.007602691650390625,
-0.0218353271484375,
0.01007080078125,
-0.00493621826171875,
-0.0113983154296875,
0.0233612060546875,
0.02984619140625,
0.017791748046875,
0.05029296875,
0.01190185546875,
-0.023040771484375,
-0.03564453125,
0.01377105712890625,
0.03125,
-0.0267181396484375,
-0.07025146484375,
-0.0167388916015625,
0.0361328125,
0.038055419921875,
-0.06658935546875,
0.00937652587890625,
-0.0377197265625,
-0.033599853515625,
-0.0227813720703125,
0.02825927734375,
-0.00312042236328125,
-0.05078125,
-0.058013916015625,
0.004482269287109375,
-0.0232391357421875,
-0.00290679931640625,
-0.0178985595703125,
0.03582763671875,
-0.038818359375,
-0.039276123046875,
0.051513671875,
-0.004413604736328125,
0.011993408203125,
-0.040496826171875,
0.006786346435546875,
-0.0286407470703125,
-0.0122833251953125,
0.041046142578125,
0.0093841552734375,
-0.0266571044921875,
0.00293731689453125,
-0.042572021484375,
0.00267791748046875,
0.0188140869140625,
-0.0426025390625,
-0.015655517578125,
-0.0283355712890625,
0.0249481201171875,
0.0192718505859375,
0.0092926025390625,
-0.023162841796875,
-0.046844482421875,
-0.002109527587890625,
0.0362548828125,
0.03277587890625,
-0.030517578125,
0.08270263671875,
-0.01438140869140625,
0.0338134765625,
0.0009975433349609375,
0.0189208984375,
-0.04705810546875,
0.015899658203125,
-0.0233612060546875,
0.017333984375,
0.0226593017578125,
-0.04437255859375,
0.040557861328125,
-0.00009912252426147461,
0.08978271484375,
0.0015430450439453125,
-0.0095367431640625,
-0.032806396484375,
-0.004150390625,
-0.024322509765625,
0.044097900390625,
-0.0141448974609375,
-0.0498046875,
0.03546142578125,
-0.005947113037109375,
-0.00887298583984375,
0.0010013580322265625,
0.0016765594482421875,
-0.01328277587890625,
-0.00884246826171875,
-0.01043701171875,
0.004665374755859375,
-0.02349853515625,
0.0232391357421875,
0.0164642333984375,
0.01517486572265625,
0.029388427734375,
-0.01493072509765625,
0.026947021484375,
0.015106201171875,
-0.0140533447265625,
-0.0362548828125,
0.02203369140625,
0.049835205078125,
0.004238128662109375,
-0.01806640625,
0.035614013671875,
-0.025970458984375,
0.0159149169921875,
0.07171630859375,
0.06671142578125,
-0.0904541015625,
0.00525665283203125,
-0.02044677734375,
-0.0036830902099609375,
0.07080078125,
0.0255126953125,
-0.0379638671875,
-0.0305938720703125,
0.02276611328125,
-0.053497314453125,
-0.0151519775390625,
0.0179901123046875,
0.003936767578125,
0.0015239715576171875,
-0.022491455078125,
0.045562744140625,
0.0176544189453125,
-0.0120849609375,
0.0123748779296875,
-0.00911712646484375,
0.0247802734375,
-0.019866943359375,
-0.00576019287109375,
0.035430908203125,
-0.0321044921875,
-0.0721435546875,
0.0296478271484375,
-0.0009589195251464844,
-0.0089263916015625,
0.032501220703125,
-0.00408935546875,
0.06689453125,
0.0274505615234375,
0.02935791015625,
-0.0200042724609375,
0.005374908447265625,
0.02142333984375,
-0.003864288330078125,
-0.0270843505859375,
-0.0103607177734375,
0.0299835205078125,
-0.022003173828125,
0.01934814453125,
-0.00702667236328125,
-0.00897979736328125,
-0.0146942138671875,
-0.033111572265625,
0.07086181640625,
-0.0244293212890625,
-0.00766754150390625,
0.01178741455078125,
0.03436279296875,
-0.013092041015625,
0.0031566619873046875,
0.002323150634765625,
-0.048736572265625,
-0.057830810546875,
0.00397491455078125,
-0.072509765625,
-0.004974365234375,
-0.002780914306640625,
-0.068115234375,
0.10345458984375,
0.00933837890625,
0.0294342041015625,
-0.004913330078125,
0.03363037109375,
-0.0261688232421875,
0.004425048828125,
-0.0282135009765625,
0.054412841796875,
0.007007598876953125,
0.03887939453125,
0.00012934207916259766,
0.01507568359375,
0.03515625,
-0.01285552978515625,
0.07073974609375,
0.044219970703125,
-0.06634521484375,
-0.018463134765625,
-0.0258941650390625,
-0.0037860870361328125,
-0.0281219482421875,
0.0789794921875,
-0.00791168212890625,
0.0224456787109375,
0.0012540817260742188,
-0.047698974609375,
0.0225982666015625,
-0.04058837890625,
-0.0428466796875,
0.0131683349609375,
0.020904541015625,
0.0193023681640625,
-0.00917816162109375,
0.07757568359375,
-0.031158447265625,
-0.00044989585876464844,
0.0335693359375,
0.0064544677734375,
-0.0014600753784179688,
0.0222015380859375,
-0.0172119140625,
0.0467529296875,
0.043792724609375,
-0.03155517578125,
0.034149169921875,
-0.002838134765625,
-0.0078125,
0.06512451171875,
0.0261688232421875,
0.0075531005859375,
-0.005401611328125,
-0.003467559814453125,
-0.01611328125,
0.01125335693359375,
0.04583740234375,
0.0325927734375,
0.0265350341796875,
-0.0438232421875,
0.0024623870849609375,
0.052978515625,
0.07757568359375,
-0.0487060546875,
-0.021759033203125,
0.01322174072265625,
-0.00010865926742553711,
0.019805908203125,
0.01332855224609375,
0.054351806640625,
-0.038055419921875,
-0.0298919677734375,
-0.050537109375,
0.005645751953125,
0.0287322998046875,
0.00870513916015625,
-0.0037059783935546875,
0.00791168212890625,
-0.045989990234375,
0.0015125274658203125,
-0.04461669921875,
0.033233642578125,
0.028594970703125,
-0.015655517578125,
-0.0118560791015625,
0.01296234130859375,
0.09521484375,
0.0196075439453125,
0.005367279052734375,
0.01148223876953125,
-0.00493621826171875,
-0.00885009765625,
-0.0036773681640625,
-0.042877197265625,
-0.0064697265625,
0.0283355712890625,
0.0001647472381591797,
-0.0196685791015625,
0.01629638671875,
0.0268096923828125,
-0.035369873046875,
-0.032470703125,
-0.00566864013671875,
-0.017303466796875,
0.01873779296875,
-0.0092010498046875,
0.0192413330078125,
0.01025390625,
-0.0013637542724609375,
-0.034637451171875,
0.04132080078125,
0.01861572265625,
-0.01427459716796875,
0.043670654296875,
-0.0055694580078125,
-0.01544952392578125,
0.04547119140625,
0.0085296630859375,
0.048675537109375,
0.0185089111328125,
-0.05224609375,
-0.00670623779296875,
-0.0423583984375,
-0.0126953125,
0.0309295654296875,
0.0338134765625,
-0.007843017578125,
0.01229095458984375,
0.0074920654296875,
-0.00693511962890625,
0.01425933837890625,
-0.00907135009765625,
0.0025348663330078125,
-0.01201629638671875,
0.0245513916015625,
-0.0044403076171875,
-0.01580810546875,
-0.0008544921875,
0.004383087158203125,
0.00789642333984375,
0.0167694091796875,
0.02655029296875,
0.0024662017822265625,
0.00852203369140625,
-0.02215576171875,
0.03387451171875,
-0.04864501953125,
-0.028045654296875,
0.031097412109375,
-0.02099609375,
-0.01190185546875,
0.0084381103515625,
-0.040374755859375,
0.06451416015625,
-0.01080322265625,
0.040557861328125,
0.0552978515625,
-0.03515625,
0.005825042724609375,
0.0154571533203125,
0.00464630126953125,
-0.0241241455078125,
-0.041229248046875,
-0.006740570068359375,
0.03546142578125,
0.010986328125,
0.0220184326171875,
-0.02459716796875,
0.042205810546875,
-0.01045989990234375,
0.0131683349609375,
-0.006671905517578125,
0.000827789306640625,
-0.01470947265625,
0.01097869873046875,
-0.017181396484375,
0.0253753662109375,
-0.03515625,
-0.03338623046875,
-0.00783538818359375,
-0.0012683868408203125,
-0.031524658203125,
-0.02178955078125,
-0.0119476318359375,
0.041748046875,
0.06353759765625,
0.06024169921875,
0.00853729248046875,
0.026153564453125,
0.020660400390625,
-0.01548004150390625,
0.038055419921875,
-0.06292724609375,
-0.04742431640625,
-0.047698974609375,
-0.00335693359375,
0.017425537109375,
-0.031524658203125,
-0.0640869140625,
-0.08392333984375,
0.00228118896484375,
0.0184326171875,
-0.004558563232421875,
-0.046966552734375,
0.0256805419921875,
-0.011566162109375,
0.0418701171875,
-0.03717041015625,
-0.0665283203125,
0.026153564453125,
0.040924072265625,
-0.001964569091796875,
0.0137786865234375,
-0.027557373046875,
-0.0279388427734375,
-0.00623321533203125,
-0.044097900390625,
0.01045989990234375,
0.04180908203125,
-0.06707763671875,
-0.052520751953125,
-0.07135009765625,
-0.0116119384765625,
-0.060455322265625,
-0.031524658203125,
0.005031585693359375,
-0.0012845993041992188,
0.0286712646484375,
-0.027069091796875,
-0.0232696533203125,
-0.006175994873046875,
0.0159759521484375,
-0.00943756103515625,
0.0067291259765625,
0.028778076171875,
-0.0278472900390625,
-0.06060791015625,
0.054290771484375,
-0.013916015625,
-0.032989501953125,
-0.024444580078125,
0.012359619140625,
-0.01611328125,
-0.010894775390625,
-0.00946807861328125,
-0.038238525390625,
-0.00992584228515625,
0.05010986328125,
0.00518798828125,
0.0151214599609375,
0.02288818359375,
0.00954437255859375,
-0.04278564453125,
0.0009975433349609375,
-0.00811004638671875,
-0.007419586181640625,
-0.0109405517578125,
0.02197265625,
0.0217437744140625,
0.051544189453125,
0.0037441253662109375,
0.0283355712890625,
0.00861358642578125,
-0.04681396484375,
-0.0307159423828125,
-0.03369140625,
0.0035991668701171875,
0.01788330078125,
0.0855712890625,
0.03338623046875,
0.004543304443359375,
-0.045684814453125,
-0.033477783203125,
-0.03289794921875,
-0.023284912109375,
-0.0036163330078125,
0.01189422607421875,
-0.045745849609375,
0.0285186767578125,
-0.005771636962890625,
-0.00286102294921875,
-0.040985107421875,
0.0169677734375,
-0.0283050537109375,
-0.0144195556640625,
0.026214599609375,
-0.00287628173828125,
0.0132904052734375,
0.0198974609375,
0.025482177734375,
-0.0265960693359375,
-0.0115814208984375,
0.016021728515625,
-0.01311492919921875,
-0.0018949508666992188,
0.0225067138671875,
0.0477294921875,
0.046234130859375,
-0.0389404296875,
-0.01763916015625,
0.04571533203125,
-0.004528045654296875,
-0.0078582763671875,
-0.032958984375,
-0.036407470703125,
0.020782470703125,
0.0093841552734375,
0.0199737548828125,
-0.01593017578125,
0.025970458984375,
0.025360107421875,
0.048919677734375,
-0.0294647216796875,
-0.05023193359375,
-0.03656005859375,
0.026458740234375,
0.02227783203125,
-0.00785064697265625,
0.056243896484375,
0.0034961700439453125,
0.00600433349609375,
-0.0158233642578125,
0.07098388671875,
-0.045257568359375,
0.046875,
-0.032318115234375,
0.0255889892578125,
0.030914306640625
] |
baf362ea270b8069de920f1e794ca8c2d573ecb4 | Wordpress Stackexchange
Q: Get post terms for multiple posts at once? I know I can get the terms for a single post using wp_get_post_terms, but is there a way (without writing a loop) to get all the terms in use by an array of posts?
A: That would be wp_get_object_terms. You'd need an array of post id's as the input, together with the taxonomy you want to retrieve the terms for (let's say: books). This should work (untested):
$my_query = new wp_query ($args);
$my_posts = $my_query->posts;
$my_post_ids = wp_list_pluck ($my_posts, 'ID');
$my_terms = wp_get_object_terms ($my_post_ids, 'books');
| Q: Get post terms for multiple posts at once? I know I can get the terms for a single post using wp_get_post_terms, but is there a way (without writing a loop) to get all the terms in use by an array of posts?
A: That would be wp_get_object_terms. You'd need an array of post id's as the input, together with the taxonomy you want to retrieve the terms for (let's say: books). This should work (untested):
$my_query = new wp_query ($args);
$my_posts = $my_query->posts;
$my_post_ids = wp_list_pluck ($my_posts, 'ID');
$my_terms = wp_get_object_terms ($my_post_ids, 'books');
| wordpress | {
"language": "en",
"length": 94,
"provenance": "stackexchange_00019.jsonl.gz:471613",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/251034"
} | [
0.057861328125,
-0.0166015625,
-0.0042877197265625,
-0.018218994140625,
-0.00167083740234375,
-0.03271484375,
0.05047607421875,
-0.004535675048828125,
0.00504302978515625,
0.017913818359375,
-0.04779052734375,
0.007007598876953125,
-0.04547119140625,
-0.00237274169921875,
-0.03033447265625,
-0.057586669921875,
0.035797119140625,
-0.035858154296875,
0.0303192138671875,
0.0002980232238769531,
0.0254669189453125,
0.0189056396484375,
0.0419921875,
0.0382080078125,
0.027923583984375,
-0.01189422607421875,
0.039276123046875,
-0.0305633544921875,
0.017669677734375,
-0.0300750732421875,
0.0201263427734375,
0.015838623046875,
0.007266998291015625,
0.00891876220703125,
0.0108184814453125,
-0.03204345703125,
-0.01378631591796875,
0.00167083740234375,
0.00510406494140625,
0.01325225830078125,
0.0198211669921875,
0.00492095947265625,
-0.025482177734375,
0.066162109375,
-0.0335693359375,
-0.0369873046875,
0.002620697021484375,
-0.02618408203125,
0.01215362548828125,
-0.036834716796875,
0.0251617431640625,
-0.01361846923828125,
0.03375244140625,
-0.0175323486328125,
-0.0290679931640625,
-0.01546478271484375,
0.0445556640625,
-0.04376220703125,
0.05731201171875,
-0.08343505859375,
-0.0804443359375,
-0.0556640625,
0.06951904296875,
-0.0009407997131347656,
-0.0230865478515625,
0.04083251953125,
0.002819061279296875,
0.005420684814453125,
-0.040496826171875,
-0.039093017578125,
0.01165008544921875,
-0.046142578125,
0.00836181640625,
-0.019561767578125,
0.00659942626953125,
-0.06488037109375,
-0.0008177757263183594,
-0.07293701171875,
-0.0147857666015625,
0.0212860107421875,
-0.0120391845703125,
-0.0303192138671875,
-0.0740966796875,
0.0261993408203125,
-0.0169830322265625,
0.031524658203125,
-0.00463104248046875,
-0.003673553466796875,
-0.035491943359375,
-0.048858642578125,
-0.021636962890625,
-0.044677734375,
-0.08642578125,
0.01045989990234375,
0.0216217041015625,
-0.038360595703125,
0.0198822021484375,
0.025482177734375,
-0.04656982421875,
-0.017547607421875,
-0.01232147216796875,
-0.02484130859375,
0.005222320556640625,
-0.0098419189453125,
0.02130126953125,
-0.0005793571472167969,
0.0003159046173095703,
0.04107666015625,
0.06915283203125,
0.044403076171875,
0.00582122802734375,
0.053375244140625,
0.012542724609375,
-0.0166473388671875,
-0.0249481201171875,
-0.00604248046875,
-0.0157928466796875,
0.018524169921875,
0.017425537109375,
-0.0094757080078125,
0.016143798828125,
0.0225830078125,
-0.00146484375,
0.019012451171875,
-0.00830078125,
0.01265716552734375,
-0.0149383544921875,
-0.0372314453125,
-0.00867462158203125,
0.01995849609375,
-0.0133056640625,
0.01403045654296875,
0.0232696533203125,
0.02850341796875,
0.001430511474609375,
-0.0207672119140625,
-0.025543212890625,
0.007434844970703125,
0.006916046142578125,
-0.0005583763122558594,
0.0298004150390625,
-0.0205535888671875,
0.0160980224609375,
0.03167724609375,
0.008880615234375,
-0.005741119384765625,
0.033660888671875,
0.0263824462890625,
-0.0123291015625,
-0.00894927978515625,
0.01343536376953125,
0.031890869140625,
0.0140838623046875,
0.0309295654296875,
-0.008056640625,
-0.0208587646484375,
0.045989990234375,
-0.0430908203125,
-0.0029144287109375,
-0.065185546875,
0.0301055908203125,
0.002376556396484375,
0.0083770751953125,
0.0237274169921875,
-0.017913818359375,
0.005657196044921875,
-0.01448822021484375,
-0.01424407958984375,
0.0145111083984375,
-0.02093505859375,
0.0135955810546875,
-0.0286865234375,
0.003116607666015625,
0.003520965576171875,
-0.01081085205078125,
0.0239105224609375,
-0.0355224609375,
-0.01062774658203125,
0.024658203125,
0.00928497314453125,
-0.031768798828125,
-0.041717529296875,
-0.00029921531677246094,
-0.004974365234375,
-0.028045654296875,
0.02569580078125,
0.0007076263427734375,
0.040557861328125,
0.01236724853515625,
0.0192108154296875,
0.0029964447021484375,
0.00220489501953125,
-0.061431884765625,
0.038330078125,
-0.003810882568359375,
-0.005527496337890625,
-0.03326416015625,
0.013427734375,
-0.01178741455078125,
-0.037139892578125,
0.044708251953125,
-0.024993896484375,
-0.004573822021484375,
-0.0018854141235351562,
-0.0592041015625,
-0.017852783203125,
-0.01163482666015625,
0.0048370361328125,
-0.034210205078125,
0.0255126953125,
0.02685546875,
-0.0017118453979492188,
-0.035400390625,
0.0087738037109375,
-0.006908416748046875,
-0.00736236572265625,
-0.036712646484375,
0.0107879638671875,
0.00002777576446533203,
-0.017547607421875,
0.011383056640625,
-0.0256195068359375,
0.032562255859375,
0.05218505859375,
0.05645751953125,
-0.0017862319946289062,
-0.0162200927734375,
-0.0203094482421875,
0.026824951171875,
0.0213165283203125,
-0.055572509765625,
0.01488494873046875,
0.01324462890625,
0.055267333984375,
0.02435302734375,
-0.002513885498046875,
0.058837890625,
-0.04071044921875,
0.0258636474609375,
0.01348114013671875,
0.038818359375,
0.0030670166015625,
-0.0130615234375,
-0.0278472900390625,
0.0312347412109375,
-0.031951904296875,
0.0138702392578125,
-0.021881103515625,
0.025177001953125,
0.06109619140625,
-0.00977325439453125,
0.034027099609375,
0.01275634765625,
0.00024580955505371094,
0.01244354248046875,
0.055084228515625,
-0.0245361328125,
-0.006710052490234375,
-0.0043792724609375,
0.0017061233520507812,
0.00212860107421875,
-0.07012939453125,
-0.020904541015625,
-0.033660888671875,
0.0111541748046875,
0.0232086181640625,
0.0093841552734375,
0.01554107666015625,
-0.03900146484375,
0.0177764892578125,
0.009765625,
-0.01776123046875,
0.01125335693359375,
0.0211944580078125,
-0.0072174072265625,
-0.01335906982421875,
-0.006008148193359375,
-0.0162811279296875,
0.014495849609375,
-0.0018663406372070312,
0.017913818359375,
0.028289794921875,
-0.0211334228515625,
-0.0117950439453125,
0.006328582763671875,
-0.038787841796875,
-0.0125274658203125,
0.02716064453125,
-0.0531005859375,
-0.0128173828125,
0.0110931396484375,
0.046142578125,
-0.0252685546875,
0.0167999267578125,
-0.0167694091796875,
0.0273590087890625,
-0.00984954833984375,
-0.063720703125,
0.056976318359375,
-0.0411376953125,
0.0106048583984375,
0.062469482421875,
0.008575439453125,
0.012420654296875,
0.0121917724609375,
-0.01044464111328125,
0.025146484375,
-0.014251708984375,
-0.01800537109375,
0.01373291015625,
-0.07177734375,
-0.0036144256591796875,
0.00811004638671875,
0.080078125,
-0.027008056640625,
-0.052001953125,
-0.0037708282470703125,
0.0262298583984375,
-0.066162109375,
-0.043182373046875,
0.032745361328125,
-0.077392578125,
-0.015167236328125,
-0.0286865234375,
-0.051849365234375,
-0.005939483642578125,
-0.0027027130126953125,
-0.00963592529296875,
0.020477294921875,
-0.016632080078125,
-0.06866455078125,
-0.01383209228515625,
-0.0738525390625,
0.0266876220703125,
-0.005619049072265625,
0.020263671875,
-0.004146575927734375,
0.0675048828125,
0.01343536376953125,
-0.0157623291015625,
-0.00911712646484375,
0.05010986328125,
-0.0288543701171875,
-0.042022705078125,
-0.0155181884765625,
0.0135345458984375,
-0.0207977294921875,
0.0124053955078125,
-0.0257415771484375,
0.0016946792602539062,
-0.0098419189453125,
-0.00843048095703125,
0.01203155517578125,
0.0272216796875,
0.057647705078125,
-0.037872314453125,
-0.052947998046875,
0.0611572265625,
0.043853759765625,
-0.004650115966796875,
-0.006145477294921875,
0.005420684814453125,
-0.0214080810546875,
-0.038848876953125,
-0.018585205078125,
-0.00115966796875,
-0.016876220703125,
0.007568359375,
-0.0036983489990234375,
-0.01309967041015625,
-0.04522705078125,
0.0005035400390625,
0.04925537109375,
0.0018339157104492188,
0.0089569091796875,
0.01885986328125,
-0.0267333984375,
-0.039093017578125,
0.0224761962890625,
-0.019378662109375,
-0.003940582275390625,
-0.0299835205078125,
0.01226043701171875,
-0.03704833984375,
-0.06427001953125,
0.034515380859375,
-0.06829833984375,
0.01393890380859375,
-0.061187744140625,
-0.0236663818359375,
-0.0166015625,
0.10906982421875,
-0.02777099609375,
-0.01033782958984375,
-0.0330810546875,
0.00894927978515625,
-0.0086669921875,
-0.07147216796875,
-0.0142669677734375,
-0.024627685546875,
-0.030731201171875,
-0.0089263916015625,
-0.0261383056640625,
-0.0172576904296875,
-0.011383056640625,
0.01151275634765625,
-0.0257720947265625,
-0.0224609375,
0.0233612060546875,
-0.06298828125,
0.0240020751953125,
-0.00769805908203125,
-0.004436492919921875,
-0.0191497802734375,
-0.0255584716796875,
-0.032958984375,
-0.06085205078125,
-0.01085662841796875,
0.0293731689453125,
0.0305023193359375,
-0.01139068603515625,
-0.031402587890625,
0.0165557861328125,
0.060546875,
0.004085540771484375,
0.038330078125,
-0.00885772705078125,
0.00794219970703125,
-0.006061553955078125,
-0.0187225341796875,
0.002704620361328125,
-0.0212249755859375,
-0.015899658203125,
-0.017120361328125,
0.021026611328125,
0.03375244140625,
-0.03680419921875,
0.009674072265625,
-0.03228759765625,
-0.0071258544921875,
-0.0154571533203125,
-0.0225677490234375,
-0.0139923095703125,
0.006473541259765625,
-0.0232696533203125,
0.017059326171875,
-0.0254364013671875,
-0.0305023193359375,
0.0367431640625,
0.060455322265625,
-0.0278472900390625,
0.0023956298828125,
0.038726806640625,
0.0156402587890625,
-0.0491943359375,
-0.0941162109375,
-0.0254974365234375,
0.026031494140625,
-0.00862884521484375,
0.0253448486328125,
0.0196533203125,
-0.0277099609375,
0.04547119140625,
-0.0012292861938476562,
-0.0116119384765625,
0.001125335693359375,
0.0118865966796875,
-0.00946807861328125,
-0.02850341796875,
0.01214599609375,
-0.02734375,
0.0247344970703125,
0.005619049072265625,
-0.0278472900390625,
-0.029571533203125,
0.0010471343994140625,
0.0745849609375,
-0.0282135009765625,
0.0506591796875,
-0.044219970703125,
-0.05657958984375,
0.016845703125,
-0.01226806640625,
0.014739990234375,
0.039398193359375,
-0.0136260986328125,
0.03839111328125,
0.016815185546875,
0.006877899169921875,
0.008331298828125,
0.03131103515625,
0.00942230224609375,
0.03387451171875,
-0.007305145263671875,
-0.010467529296875,
-0.01445770263671875,
-0.01105499267578125,
0.050445556640625,
-0.0263519287109375,
-0.07281494140625,
0.04095458984375,
-0.040863037109375,
0.016876220703125,
0.0555419921875,
-0.028289794921875,
0.046295166015625,
0.048614501953125,
-0.007144927978515625,
0.01012420654296875,
-0.039764404296875,
-0.006420135498046875,
-0.038604736328125,
0.01348114013671875,
0.01023101806640625,
-0.00011754035949707031,
0.0123443603515625,
0.07745361328125,
-0.0435791015625,
0.0714111328125,
-0.017303466796875,
0.0203857421875,
-0.0037994384765625,
0.049896240234375,
0.00909423828125,
-0.00986480712890625,
0.003955841064453125,
0.0224456787109375,
0.01416778564453125,
-0.04949951171875,
-0.019073486328125,
0.00893402099609375,
0.05010986328125,
0.0130157470703125,
-0.0036773681640625,
0.0105438232421875,
0.0012941360473632812,
-0.028533935546875,
0.005489349365234375,
0.026031494140625,
-0.01184844970703125,
-0.0063018798828125,
0.021575927734375,
0.01285552978515625,
0.026763916015625,
-0.00891876220703125,
0.016387939453125,
-0.006137847900390625,
0.034332275390625,
-0.05889892578125,
0.012298583984375,
-0.00414276123046875,
0.00826263427734375,
-0.050537109375,
-0.03179931640625,
-0.01554107666015625,
-0.0232696533203125,
-0.0135955810546875,
-0.00473785400390625,
-0.024383544921875,
0.01959228515625,
-0.00274658203125,
0.0309600830078125,
-0.015716552734375,
-0.01166534423828125,
0.0131683349609375,
-0.005367279052734375,
0.062744140625,
0.0244140625,
-0.054962158203125,
0.01300048828125,
-0.07720947265625,
-0.004161834716796875,
-0.0029926300048828125,
-0.056671142578125,
-0.03643798828125,
-0.023834228515625,
-0.01068115234375,
0.01236724853515625,
0.0225982666015625,
0.037933349609375,
0.0158843994140625,
-0.0003662109375,
-0.04681396484375,
-0.024627685546875,
0.0007166862487792969,
0.0035228729248046875,
0.004322052001953125,
0.034332275390625,
0.005657196044921875,
-0.00897216796875,
-0.022064208984375,
-0.0223236083984375,
-0.0262451171875,
-0.10894775390625,
-0.007518768310546875,
0.041900634765625,
-0.050018310546875,
0.052642822265625,
0.00853729248046875,
0.0281829833984375,
-0.003387451171875,
-0.0207672119140625,
0.00724029541015625,
-0.007434844970703125,
0.0119476318359375,
-0.005199432373046875,
-0.0275115966796875,
0.023406982421875,
-0.01708984375,
0.017303466796875,
0.00000852346420288086,
-0.0233001708984375,
0.037567138671875,
-0.0236663818359375,
0.032562255859375,
0.031402587890625,
0.0232391357421875,
-0.0222625732421875,
0.0216217041015625,
0.01270294189453125,
0.0355224609375,
0.00380706787109375,
0.0364990234375,
0.00919342041015625,
0.015228271484375,
0.0028972625732421875,
-0.033843994140625,
0.03271484375,
0.0083160400390625,
0.0085296630859375,
0.0260772705078125,
-0.0293731689453125,
-0.0222320556640625,
-0.038970947265625,
0.013275146484375,
0.0112762451171875,
0.0290069580078125,
0.033111572265625,
-0.0019016265869140625,
-0.006977081298828125,
0.053955078125,
-0.0249176025390625,
-0.01088714599609375,
-0.044921875,
-0.0007004737854003906,
-0.011016845703125,
-0.002532958984375,
0.023773193359375,
0.011871337890625,
-0.0287017822265625,
0.07757568359375,
0.01076507568359375,
-0.0826416015625,
0.0367431640625,
0.04437255859375,
0.0117950439453125,
-0.0305633544921875,
0.00011342763900756836,
0.00494384765625,
-0.00472259521484375,
-0.056060791015625,
0.03955078125,
-0.0273590087890625,
0.0254669189453125,
-0.0178680419921875,
0.00420379638671875,
-0.0137176513671875,
0.036041259765625,
-0.01324462890625,
-0.008636474609375,
0.0328369140625,
-0.0782470703125,
-0.04278564453125,
0.00191497802734375,
0.010772705078125,
0.04376220703125,
-0.0484619140625,
0.03741455078125,
-0.042144775390625,
0.0207061767578125,
-0.0214996337890625,
-0.052398681640625,
0.04119873046875,
-0.030029296875,
0.00336456298828125,
0.0291595458984375,
0.039703369140625,
-0.008270263671875,
-0.0075836181640625,
-0.002277374267578125,
-0.0310211181640625,
-0.0094757080078125,
-0.0086822509765625,
-0.0191497802734375,
-0.0037174224853515625,
-0.03277587890625,
-0.0877685546875,
0.099853515625,
0.005344390869140625,
0.034454345703125,
0.01033782958984375,
0.0250396728515625,
-0.041534423828125,
-0.006771087646484375,
-0.049957275390625,
0.054779052734375,
0.019439697265625,
0.0572509765625,
-0.0567626953125,
-0.0109100341796875,
0.0073394775390625,
0.032989501953125,
0.040496826171875,
-0.003143310546875,
-0.006679534912109375,
-0.0279541015625,
0.051910400390625,
0.047576904296875,
0.011810302734375,
0.01184844970703125,
0.0338134765625,
0.027984619140625,
0.08258056640625,
-0.0164642333984375,
0.05023193359375,
-0.0178375244140625,
0.028411865234375,
0.0467529296875,
0.01126861572265625,
0.00426483154296875,
0.027740478515625,
-0.01128387451171875,
-0.033660888671875,
0.00789642333984375,
0.023773193359375,
-0.0102996826171875,
0.03094482421875,
0.007007598876953125,
0.0230560302734375,
-0.02716064453125,
0.034454345703125,
-0.0265655517578125,
0.049530029296875,
-0.009918212890625,
0.035675048828125,
0.0294647216796875,
0.0098876953125,
0.07281494140625,
0.00222015380859375,
0.0254364013671875,
0.00030231475830078125,
0.0182647705078125,
0.04449462890625,
-0.005474090576171875,
0.017974853515625,
-0.07843017578125,
-0.020599365234375,
0.02337646484375,
0.048858642578125,
-0.03448486328125,
-0.049713134765625,
0.0096588134765625,
0.0015306472778320312,
0.0005450248718261719,
0.00009268522262573242,
-0.00699615478515625,
0.04547119140625,
0.095458984375,
-0.04425048828125,
-0.0021152496337890625,
0.025177001953125,
0.029144287109375,
-0.01068878173828125,
-0.00879669189453125,
-0.0305633544921875,
-0.022003173828125,
-0.0224151611328125,
0.006359100341796875,
-0.00998687744140625,
0.028411865234375,
0.01503753662109375,
0.057159423828125,
-0.0322265625,
0.0024127960205078125,
0.016754150390625,
0.041748046875,
0.0014104843139648438,
-0.025604248046875,
0.008331298828125,
-0.051605224609375,
-0.0171966552734375,
0.00021266937255859375,
0.05120849609375,
0.0170745849609375,
0.049407958984375,
0.04107666015625,
-0.0205841064453125,
-0.0005269050598144531,
0.04931640625,
-0.01067352294921875,
-0.014190673828125,
-0.0273284912109375,
-0.00864410400390625,
0.024871826171875,
-0.00946807861328125,
0.0165252685546875,
0.0019159317016601562,
0.026275634765625,
-0.0024204254150390625,
0.05718994140625,
0.0088348388671875,
0.017791748046875,
0.01727294921875,
-0.00942230224609375,
0.004146575927734375,
0.0187530517578125,
-0.115478515625,
0.0038509368896484375,
-0.07891845703125,
-0.02880859375,
0.02728271484375,
0.02728271484375,
-0.01332855224609375,
0.0250091552734375,
-0.0091705322265625,
-0.01045989990234375,
0.01384735107421875,
0.0091705322265625,
0.006381988525390625,
-0.0006093978881835938,
0.0220794677734375,
-0.0201568603515625,
-0.056793212890625,
-0.01355743408203125,
-0.0096588134765625,
-0.0010356903076171875,
0.0183258056640625,
0.00164794921875,
0.02392578125,
0.01788330078125,
-0.0105438232421875,
0.032501220703125,
-0.056427001953125,
-0.005279541015625,
0.0160369873046875,
-0.0268402099609375,
-0.00930023193359375,
0.004848480224609375,
0.0152435302734375,
0.0458984375,
0.03900146484375,
-0.0211029052734375,
0.01174163818359375,
-0.027862548828125,
0.00555419921875,
-0.0198516845703125,
0.044891357421875,
-0.00923919677734375,
0.01212310791015625,
-0.043060302734375,
-0.0635986328125,
0.06640625,
0.029083251953125,
0.0303497314453125,
-0.016021728515625,
0.027557373046875,
-0.042022705078125,
0.035552978515625,
-0.0018930435180664062,
0.030426025390625,
0.0240631103515625,
0.0258636474609375,
-0.00870513916015625,
0.00566864013671875,
-0.0087738037109375,
-0.0095672607421875,
0.029083251953125,
-0.002567291259765625,
0.010650634765625,
-0.01507568359375,
-0.00562286376953125,
-0.0046844482421875,
0.03753662109375,
-0.01461029052734375,
0.00885772705078125,
0.00814056396484375,
0.0023345947265625,
-0.0421142578125,
-0.036590576171875,
-0.030792236328125,
-0.04107666015625,
-0.00836944580078125,
0.01325225830078125,
-0.023193359375,
-0.032501220703125,
-0.04205322265625,
-0.033599853515625,
0.036590576171875,
-0.012664794921875,
0.040496826171875,
-0.02789306640625,
-0.02972412109375,
-0.0318603515625,
0.004039764404296875,
-0.06903076171875,
0.035400390625,
0.0205230712890625,
0.00217437744140625,
0.0263671875,
-0.0211944580078125,
-0.041748046875,
0.01143646240234375,
0.007396697998046875,
0.006343841552734375,
-0.0299835205078125,
-0.007434844970703125,
0.0421142578125,
0.036773681640625,
0.0712890625,
0.04791259765625,
-0.0075531005859375,
0.004955291748046875,
0.0202484130859375,
-0.038299560546875,
-0.07928466796875,
0.0281524658203125,
-0.055908203125,
-0.01514434814453125,
0.004138946533203125,
0.00711822509765625,
0.0264739990234375,
-0.035980224609375,
-0.0697021484375,
0.02392578125,
-0.0102386474609375,
-0.04583740234375,
-0.076904296875,
-0.0245361328125,
0.01617431640625,
-0.026702880859375,
-0.0299835205078125,
-0.008026123046875,
-0.06414794921875,
0.049591064453125,
0.000484466552734375,
0.01324462890625,
0.0225677490234375,
0.0028362274169921875,
-0.031097412109375,
0.00868988037109375,
-0.00858306884765625,
-0.00676727294921875,
0.02069091796875,
-0.01331329345703125,
0.0310211181640625,
0.04437255859375,
-0.0277557373046875,
-0.0113067626953125,
-0.0123291015625,
-0.03265380859375,
-0.02337646484375,
-0.035308837890625,
-0.0038013458251953125,
-0.0043792724609375,
0.059326171875,
0.033966064453125,
0.0150146484375,
-0.03369140625,
0.02703857421875,
0.0032978057861328125,
-0.046905517578125,
0.03961181640625,
0.022857666015625,
-0.0303192138671875,
0.00705718994140625,
0.0369873046875,
-0.0259857177734375,
-0.008819580078125,
-0.0145263671875,
-0.04437255859375,
-0.00577545166015625,
-0.044891357421875,
-0.025299072265625,
-0.008331298828125,
0.042999267578125,
-0.00628662109375,
-0.0181121826171875,
-0.039031982421875,
-0.027099609375,
-0.00482177734375,
-0.045623779296875,
-0.04852294921875,
0.00943756103515625,
0.0011720657348632812,
0.0119781494140625,
-0.00919342041015625,
0.039276123046875,
-0.033203125,
0.04937744140625,
0.0070037841796875,
-0.0168914794921875,
0.0408935546875,
0.0021877288818359375,
0.0282745361328125,
-0.021728515625,
0.07244873046875,
0.02374267578125,
0.0712890625,
-0.018280029296875,
0.06756591796875,
-0.00896453857421875,
0.045654296875,
-0.007366180419921875,
-0.01427459716796875,
0.027984619140625,
-0.043121337890625,
0.0147247314453125,
0.00391387939453125,
-0.01318359375,
0.0123138427734375,
-0.00586700439453125,
0.0408935546875,
-0.015594482421875,
0.0018033981323242188
] |
fa8f0ae81f7225f36dee2fa856b6db5f0db682e6 | Wordpress Stackexchange
Q: How can I automatically login using a URL? I want to automatically login to WordPress by parsing the username and password fields as parameters into the login URL.
For example, I want to create a link as follows:
www.mysite.com/wp-admin?username=xxxx&pass=xxxxx
Theoretically, if I paste that link into my web browser,
I want to be automatically logged in without having to put data into the form fields however, this does not happen.
Is the a way to do this?
The purpose of this is to use AJAX in a web app to login.
A: Using bellow code in first line of functions.php in your theme or a specific plugin.
<?php
if( isset($_GET['username']) and $_GET['pass'] ) {
$user = get_user_by('login', $_GET['username']);
if ( $user && wp_check_password( $_GET['pass'], $user->data->user_pass, $user->ID) ) {
wp_set_current_user($user->ID, $user->user_login);
wp_set_auth_cookie($user->ID);
do_action('wp_login', $user->user_login);
wp_redirect( admin_url() );
exit;
}
wp_redirect( home_url() );
exit;
}
?>
| Q: How can I automatically login using a URL? I want to automatically login to WordPress by parsing the username and password fields as parameters into the login URL.
For example, I want to create a link as follows:
www.mysite.com/wp-admin?username=xxxx&pass=xxxxx
Theoretically, if I paste that link into my web browser,
I want to be automatically logged in without having to put data into the form fields however, this does not happen.
Is the a way to do this?
The purpose of this is to use AJAX in a web app to login.
A: Using bellow code in first line of functions.php in your theme or a specific plugin.
<?php
if( isset($_GET['username']) and $_GET['pass'] ) {
$user = get_user_by('login', $_GET['username']);
if ( $user && wp_check_password( $_GET['pass'], $user->data->user_pass, $user->ID) ) {
wp_set_current_user($user->ID, $user->user_login);
wp_set_auth_cookie($user->ID);
do_action('wp_login', $user->user_login);
wp_redirect( admin_url() );
exit;
}
wp_redirect( home_url() );
exit;
}
?>
| wordpress | {
"language": "en",
"length": 145,
"provenance": "stackexchange_00019.jsonl.gz:471628",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/251091"
} | [
0.08447265625,
0.0189971923828125,
0.01200103759765625,
-0.0246734619140625,
0.032867431640625,
-0.048583984375,
0.0770263671875,
-0.036590576171875,
-0.0240936279296875,
0.024322509765625,
0.0009441375732421875,
0.00421905517578125,
-0.0112457275390625,
-0.029296875,
0.00545501708984375,
-0.033782958984375,
0.0113677978515625,
-0.0297088623046875,
-0.00476837158203125,
-0.022125244140625,
0.021942138671875,
-0.0167999267578125,
0.036041259765625,
-0.0062408447265625,
0.025909423828125,
0.02044677734375,
0.05853271484375,
-0.016510009765625,
0.037933349609375,
0.016632080078125,
0.027313232421875,
-0.083251953125,
-0.005847930908203125,
0.04669189453125,
-0.0132598876953125,
-0.05596923828125,
-0.0142974853515625,
0.0257720947265625,
0.0135040283203125,
0.0195770263671875,
0.045989990234375,
-0.0194549560546875,
-0.01128387451171875,
0.021209716796875,
-0.009857177734375,
-0.0309295654296875,
0.036834716796875,
-0.01386260986328125,
-0.004058837890625,
-0.006389617919921875,
0.025054931640625,
0.03631591796875,
0.05224609375,
-0.024261474609375,
-0.002716064453125,
0.0272064208984375,
-0.019195556640625,
0.001972198486328125,
0.0577392578125,
-0.0306243896484375,
-0.050933837890625,
-0.07659912109375,
0.040863037109375,
-0.0247802734375,
-0.0085601806640625,
-0.0032749176025390625,
-0.017303466796875,
0.0287933349609375,
-0.0160369873046875,
-0.0251617431640625,
0.0038051605224609375,
-0.01290130615234375,
-0.0139617919921875,
0.0029449462890625,
-0.00986480712890625,
-0.020660400390625,
-0.00931549072265625,
-0.00409698486328125,
0.016845703125,
0.0227508544921875,
-0.005344390869140625,
0.0303497314453125,
-0.01898193359375,
-0.0164337158203125,
0.033935546875,
0.02325439453125,
-0.03118896484375,
-0.033416748046875,
0.0061798095703125,
-0.051116943359375,
-0.0170745849609375,
0.00434112548828125,
-0.0294647216796875,
0.00315093994140625,
-0.0252227783203125,
-0.0355224609375,
0.006092071533203125,
0.007190704345703125,
0.0279998779296875,
0.01434326171875,
-0.0211029052734375,
-0.037017822265625,
0.017608642578125,
-0.01232147216796875,
-0.0255126953125,
0.08447265625,
0.039459228515625,
0.0462646484375,
-0.0224609375,
-0.00439453125,
0.022186279296875,
-0.043426513671875,
-0.03564453125,
-0.034942626953125,
-0.00037169456481933594,
0.042816162109375,
-0.04248046875,
-0.0004429817199707031,
-0.00965118408203125,
0.01169586181640625,
-0.05908203125,
-0.02752685546875,
0.0085296630859375,
0.0257415771484375,
-0.01317596435546875,
-0.01861572265625,
0.0083160400390625,
-0.0031795501708984375,
-0.00937652587890625,
0.0182342529296875,
-0.04217529296875,
0.0295257568359375,
0.07464599609375,
0.00279998779296875,
-0.003208160400390625,
-0.026458740234375,
0.053192138671875,
-0.0110626220703125,
-0.01438140869140625,
0.0230712890625,
0.017852783203125,
-0.04962158203125,
-0.043548583984375,
0.005977630615234375,
0.0174407958984375,
0.0304718017578125,
0.0133514404296875,
-0.0008635520935058594,
-0.0032138824462890625,
-0.0303802490234375,
0.0190582275390625,
-0.035369873046875,
-0.0290679931640625,
0.0285186767578125,
0.0736083984375,
0.0272369384765625,
0.058868408203125,
-0.01322174072265625,
0.0093841552734375,
0.0194549560546875,
0.0199432373046875,
-0.006443023681640625,
0.0089111328125,
0.00432586669921875,
-0.032684326171875,
0.005756378173828125,
-0.039703369140625,
-0.0181121826171875,
0.0255126953125,
-0.0090789794921875,
0.0179595947265625,
-0.0025310516357421875,
0.0506591796875,
0.01535797119140625,
0.005950927734375,
0.006992340087890625,
-0.0201873779296875,
0.059051513671875,
0.028472900390625,
0.018951416015625,
0.0183258056640625,
-0.021240234375,
0.064453125,
0.0048980712890625,
-0.0190277099609375,
0.035369873046875,
-0.0004420280456542969,
0.052459716796875,
0.00472259521484375,
0.0265960693359375,
-0.0216522216796875,
0.0212249755859375,
-0.043853759765625,
0.021270751953125,
-0.0174560546875,
-0.039276123046875,
0.05401611328125,
-0.01042938232421875,
-0.003124237060546875,
0.029541015625,
0.04052734375,
-0.0072174072265625,
-0.01024627685546875,
-0.0140380859375,
-0.04107666015625,
-0.01436614990234375,
-0.0021648406982421875,
0.00817108154296875,
-0.0017671585083007812,
0.016845703125,
-0.0022029876708984375,
-0.0162811279296875,
0.0232086181640625,
-0.0689697265625,
-0.0323486328125,
-0.0177001953125,
-0.0281219482421875,
0.038665771484375,
-0.016876220703125,
0.052093505859375,
-0.0199127197265625,
-0.037445068359375,
-0.0182342529296875,
-0.029510498046875,
0.0261077880859375,
-0.04302978515625,
0.00415802001953125,
-0.036529541015625,
-0.012786865234375,
-0.0207061767578125,
-0.02557373046875,
0.05712890625,
0.00244903564453125,
0.00038695335388183594,
-0.05926513671875,
-0.019287109375,
-0.02978515625,
0.0077972412109375,
0.000995635986328125,
0.044891357421875,
0.0310516357421875,
0.025604248046875,
-0.021392822265625,
-0.00878143310546875,
0.0228271484375,
-0.032867431640625,
0.0190887451171875,
-0.005481719970703125,
-0.019195556640625,
0.028839111328125,
-0.00504302978515625,
0.0137786865234375,
0.014190673828125,
-0.05645751953125,
-0.0311737060546875,
0.0511474609375,
-0.024658203125,
-0.018951416015625,
-0.0254974365234375,
-0.01776123046875,
0.0098724365234375,
-0.06341552734375,
-0.0239410400390625,
-0.036041259765625,
0.009765625,
-0.032073974609375,
-0.013671875,
-0.02447509765625,
-0.026397705078125,
-0.0260009765625,
0.037506103515625,
-0.01025390625,
-0.011871337890625,
-0.00608062744140625,
0.0290374755859375,
-0.082763671875,
-0.01605224609375,
0.00823211669921875,
-0.005748748779296875,
-0.034759521484375,
-0.005817413330078125,
0.007045745849609375,
-0.0141754150390625,
-0.00588226318359375,
0.003223419189453125,
-0.0272064208984375,
0.0242919921875,
0.0312042236328125,
0.052490234375,
-0.0208587646484375,
0.04693603515625,
-0.0304412841796875,
-0.025421142578125,
0.04742431640625,
-0.0078277587890625,
-0.07305908203125,
0.018524169921875,
-0.01398468017578125,
0.03302001953125,
-0.03125,
0.06634521484375,
0.047515869140625,
-0.03692626953125,
0.036407470703125,
-0.0070343017578125,
0.01229095458984375,
-0.004543304443359375,
-0.0164947509765625,
-0.01136016845703125,
-0.019073486328125,
-0.034576416015625,
0.004894256591796875,
0.0250091552734375,
0.043792724609375,
0.00225067138671875,
-0.04962158203125,
-0.00821685791015625,
0.01953125,
-0.06597900390625,
-0.0697021484375,
-0.028839111328125,
-0.096923828125,
0.0153656005859375,
-0.003780364990234375,
-0.031829833984375,
0.0009813308715820312,
0.0416259765625,
0.01404571533203125,
-0.0205535888671875,
-0.026092529296875,
-0.059539794921875,
-0.053985595703125,
-0.053131103515625,
0.020294189453125,
-0.0144805908203125,
-0.00466156005859375,
0.00928497314453125,
0.01519012451171875,
-0.0032863616943359375,
-0.020538330078125,
-0.0036296844482421875,
0.046630859375,
0.00534820556640625,
-0.0261383056640625,
-0.0298309326171875,
-0.01030731201171875,
0.0279388427734375,
-0.01555633544921875,
0.051788330078125,
-0.0006756782531738281,
0.014678955078125,
-0.0025634765625,
0.0025272369384765625,
-0.0287322998046875,
0.02587890625,
-0.0093994140625,
-0.0271453857421875,
-0.01459503173828125,
0.0152740478515625,
-0.053985595703125,
0.045318603515625,
-0.0154876708984375,
-0.0167236328125,
0.0163116455078125,
0.016693115234375,
-0.038909912109375,
0.01910400390625,
-0.04656982421875,
-0.00629425048828125,
0.00867462158203125,
-0.0168304443359375,
0.0038909912109375,
0.00299835205078125,
-0.01220703125,
-0.0050201416015625,
0.00952911376953125,
0.054046630859375,
-0.006561279296875,
-0.00743865966796875,
0.0113067626953125,
0.0150299072265625,
0.01259613037109375,
-0.01409912109375,
-0.02435302734375,
-0.059814453125,
0.055877685546875,
-0.00977325439453125,
-0.01629638671875,
-0.01800537109375,
-0.02056884765625,
0.01242828369140625,
0.09423828125,
-0.017547607421875,
0.00852203369140625,
0.010101318359375,
0.03472900390625,
-0.0858154296875,
-0.05731201171875,
-0.07757568359375,
0.01702880859375,
-0.072998046875,
-0.028045654296875,
-0.038818359375,
-0.0357666015625,
0.00868988037109375,
-0.0305938720703125,
-0.0181427001953125,
-0.051849365234375,
0.009674072265625,
0.03619384765625,
0.016204833984375,
0.00659942626953125,
-0.0034847259521484375,
0.00693511962890625,
0.0211181640625,
-0.0146484375,
-0.042083740234375,
-0.00209808349609375,
-0.01495361328125,
0.0574951171875,
0.04266357421875,
-0.035888671875,
-0.0017957687377929688,
0.0286712646484375,
-0.0017576217651367188,
0.002674102783203125,
0.01248931884765625,
0.00330352783203125,
0.0183868408203125,
0.007198333740234375,
-0.009735107421875,
-0.0067901611328125,
0.00782012939453125,
-0.019256591796875,
-0.036773681640625,
-0.01043701171875,
-0.0399169921875,
0.022369384765625,
-0.0005869865417480469,
-0.0156707763671875,
-0.0301971435546875,
-0.018218994140625,
0.003528594970703125,
0.0157470703125,
-0.02020263671875,
0.01399993896484375,
-0.01641845703125,
-0.055267333984375,
0.063720703125,
0.006679534912109375,
-0.0025119781494140625,
-0.00806427001953125,
0.07342529296875,
-0.003963470458984375,
-0.035125732421875,
0.0029468536376953125,
0.022552490234375,
0.0262908935546875,
-0.01384735107421875,
0.019287109375,
-0.0058746337890625,
-0.02886962890625,
0.034637451171875,
-0.000006973743438720703,
0.0204010009765625,
-0.01174163818359375,
-0.0019550323486328125,
-0.025909423828125,
-0.044525146484375,
0.033843994140625,
-0.024078369140625,
-0.0035858154296875,
0.01617431640625,
0.01438140869140625,
-0.0318603515625,
0.005863189697265625,
0.0238494873046875,
-0.00009584426879882812,
0.005641937255859375,
-0.002544403076171875,
-0.042694091796875,
0.00984954833984375,
0.004970550537109375,
-0.0171966552734375,
0.0213775634765625,
-0.0097198486328125,
0.004596710205078125,
-0.0029125213623046875,
-0.0178680419921875,
0.00888824462890625,
-0.041351318359375,
0.0138092041015625,
0.010955810546875,
-0.0101776123046875,
-0.0066375732421875,
0.0261993408203125,
-0.02923583984375,
0.09844970703125,
0.01396942138671875,
-0.04638671875,
0.01364898681640625,
-0.0276641845703125,
0.03704833984375,
0.01904296875,
-0.0198974609375,
0.040924072265625,
0.0270538330078125,
-0.0301055908203125,
-0.00994873046875,
-0.010223388671875,
-0.0291900634765625,
-0.05340576171875,
-0.002349853515625,
-0.01389312744140625,
0.007793426513671875,
0.0360107421875,
0.0643310546875,
0.00537109375,
0.07049560546875,
-0.035888671875,
0.0038089752197265625,
0.03948974609375,
0.02276611328125,
0.0284576416015625,
0.01314544677734375,
-0.0163726806640625,
0.0022373199462890625,
0.0168304443359375,
-0.038665771484375,
-0.0283203125,
0.043212890625,
0.07208251953125,
-0.00426483154296875,
-0.0099945068359375,
-0.019256591796875,
-0.022369384765625,
-0.0015192031860351562,
0.028045654296875,
-0.00931549072265625,
-0.0433349609375,
-0.0197906494140625,
0.0129852294921875,
0.0287933349609375,
-0.03216552734375,
-0.01302337646484375,
-0.01067352294921875,
-0.047088623046875,
0.01377105712890625,
0.0306854248046875,
0.002590179443359375,
-0.004283905029296875,
-0.024566650390625,
0.00739288330078125,
-0.042938232421875,
-0.032867431640625,
-0.01250457763671875,
0.04266357421875,
-0.038360595703125,
-0.03240966796875,
0.053924560546875,
-0.0030155181884765625,
-0.0186309814453125,
-0.018463134765625,
0.0173492431640625,
0.019287109375,
-0.01300048828125,
0.058563232421875,
-0.01001739501953125,
-0.05230712890625,
-0.0027065277099609375,
-0.031402587890625,
-0.0013828277587890625,
-0.0031490325927734375,
-0.0011320114135742188,
-0.033843994140625,
-0.0156097412109375,
0.00007915496826171875,
0.01399993896484375,
0.0025196075439453125,
0.024322509765625,
-0.0211944580078125,
0.0235595703125,
-0.01104736328125,
0.022979736328125,
-0.005123138427734375,
0.06329345703125,
-0.0296173095703125,
0.035736083984375,
-0.0036983489990234375,
0.036865234375,
-0.01360321044921875,
-0.01232147216796875,
0.012359619140625,
0.002399444580078125,
-0.027069091796875,
-0.03472900390625,
0.008697509765625,
-0.0052337646484375,
0.06903076171875,
-0.0195770263671875,
-0.02276611328125,
0.0010776519775390625,
-0.0011196136474609375,
-0.0223388671875,
0.0312042236328125,
0.039337158203125,
0.003444671630859375,
-0.0171051025390625,
0.00362396240234375,
0.01259613037109375,
-0.0131988525390625,
-0.036376953125,
0.0021514892578125,
0.0171051025390625,
-0.00013124942779541016,
0.028289794921875,
-0.06414794921875,
0.063232421875,
0.0933837890625,
0.0207977294921875,
0.0721435546875,
0.0257568359375,
0.02716064453125,
0.055084228515625,
-0.0009527206420898438,
0.007671356201171875,
-0.0018663406372070312,
0.040069580078125,
0.0035800933837890625,
-0.003143310546875,
0.02166748046875,
-0.0196685791015625,
0.019683837890625,
0.07855224609375,
0.06695556640625,
-0.11224365234375,
0.0191650390625,
-0.00984954833984375,
-0.00036072731018066406,
0.046875,
0.00537872314453125,
-0.00717926025390625,
0.005489349365234375,
0.0107574462890625,
-0.037872314453125,
-0.0262451171875,
-0.0012235641479492188,
0.0092010498046875,
0.004825592041015625,
0.0020389556884765625,
0.043243408203125,
0.0054779052734375,
-0.03924560546875,
-0.020660400390625,
0.0206756591796875,
-0.00394439697265625,
-0.015380859375,
-0.0212860107421875,
0.027679443359375,
-0.030670166015625,
-0.06317138671875,
0.01025390625,
-0.046417236328125,
0.0013856887817382812,
-0.007289886474609375,
0.0035610198974609375,
0.062408447265625,
0.0416259765625,
0.01018524169921875,
-0.004756927490234375,
-0.003818511962890625,
0.020355224609375,
0.04412841796875,
-0.023681640625,
0.00272369384765625,
0.032440185546875,
-0.0445556640625,
0.00862884521484375,
-0.0035800933837890625,
0.00138092041015625,
-0.01306915283203125,
-0.01751708984375,
0.07379150390625,
-0.01552581787109375,
-0.011932373046875,
0.0288238525390625,
0.0017442703247070312,
-0.0173797607421875,
-0.0216522216796875,
0.0252685546875,
-0.050994873046875,
-0.0306854248046875,
-0.01090240478515625,
-0.045013427734375,
0.00284576416015625,
-0.04278564453125,
-0.040069580078125,
0.11627197265625,
0.0029773712158203125,
0.004184722900390625,
-0.013214111328125,
0.061737060546875,
0.003875732421875,
0.060028076171875,
-0.036285400390625,
0.06756591796875,
0.041656494140625,
0.0011186599731445312,
-0.018768310546875,
0.0084686279296875,
0.0069122314453125,
-0.0174713134765625,
0.01540374755859375,
0.0190582275390625,
-0.07489013671875,
-0.036590576171875,
-0.0142822265625,
0.028472900390625,
0.0135040283203125,
0.05615234375,
0.0146636962890625,
0.056671142578125,
0.05352783203125,
-0.0758056640625,
0.021148681640625,
-0.02520751953125,
0.00946044921875,
0.03466796875,
-0.012603759765625,
-0.047088623046875,
-0.0245819091796875,
0.01385498046875,
-0.095458984375,
0.0149993896484375,
0.048797607421875,
0.047149658203125,
0.049957275390625,
0.0048980712890625,
0.05255126953125,
-0.0238494873046875,
0.032073974609375,
-0.028961181640625,
0.054107666015625,
-0.0009613037109375,
-0.0049285888671875,
0.023590087890625,
0.023468017578125,
0.0011434555053710938,
-0.0193939208984375,
0.00040459632873535156,
0.0122222900390625,
-0.0159912109375,
0.07366943359375,
0.0290679931640625,
0.04486083984375,
-0.033111572265625,
-0.024627685546875,
0.0237274169921875,
0.0889892578125,
-0.042572021484375,
-0.04083251953125,
-0.00390625,
0.00013518333435058594,
0.0460205078125,
0.0333251953125,
0.09222412109375,
-0.0179443359375,
-0.01129150390625,
-0.024688720703125,
0.0186309814453125,
0.0533447265625,
-0.030120849609375,
0.00841522216796875,
0.04437255859375,
-0.024871826171875,
0.04388427734375,
-0.004840850830078125,
-0.01213836669921875,
0.01444244384765625,
0.007244110107421875,
-0.014434814453125,
0.027435302734375,
-0.0003039836883544922,
0.004146575927734375,
-0.0110015869140625,
0.01136016845703125,
-0.0088043212890625,
0.00916290283203125,
-0.0193634033203125,
-0.03839111328125,
0.006381988525390625,
0.044525146484375,
-0.0183258056640625,
-0.0277099609375,
0.014404296875,
0.0176849365234375,
-0.04119873046875,
-0.04095458984375,
-0.00704193115234375,
-0.026031494140625,
0.0142364501953125,
-0.00017440319061279297,
-0.01617431640625,
0.0012454986572265625,
-0.024139404296875,
-0.010955810546875,
0.0168609619140625,
0.0160675048828125,
-0.03656005859375,
0.061248779296875,
-0.01641845703125,
-0.00836944580078125,
0.004375457763671875,
-0.05865478515625,
0.04364013671875,
-0.02764892578125,
-0.06884765625,
-0.0113677978515625,
-0.0150909423828125,
-0.05743408203125,
0.034210205078125,
0.04364013671875,
-0.024444580078125,
0.0041351318359375,
-0.0120849609375,
0.01425933837890625,
0.0113525390625,
-0.01451873779296875,
-0.0188140869140625,
-0.0309906005859375,
0.032958984375,
-0.0127716064453125,
-0.03515625,
-0.0023345947265625,
-0.01490020751953125,
0.01316070556640625,
0.0243072509765625,
0.06781005859375,
-0.007457733154296875,
0.0115966796875,
-0.031494140625,
0.00988006591796875,
-0.035552978515625,
-0.026123046875,
0.00801849365234375,
-0.005374908447265625,
-0.01873779296875,
0.01352691650390625,
-0.055419921875,
0.0802001953125,
-0.04095458984375,
0.033843994140625,
0.077392578125,
-0.050994873046875,
-0.004070281982421875,
0.030364990234375,
0.0269317626953125,
-0.03460693359375,
-0.0823974609375,
-0.0672607421875,
0.025665283203125,
0.00153350830078125,
0.0191497802734375,
-0.037567138671875,
0.0565185546875,
-0.04315185546875,
0.0005702972412109375,
-0.0003437995910644531,
-0.051666259765625,
-0.01284027099609375,
0.015625,
-0.041534423828125,
0.0197296142578125,
0.00025177001953125,
-0.0211944580078125,
0.0159149169921875,
0.0022430419921875,
-0.0169677734375,
0.004596710205078125,
-0.0018749237060546875,
0.0037288665771484375,
0.06317138671875,
0.052276611328125,
0.01441192626953125,
0.036224365234375,
0.00800323486328125,
-0.028076171875,
0.0208282470703125,
-0.044769287109375,
-0.03839111328125,
-0.05157470703125,
0.0006990432739257812,
0.020355224609375,
-0.0252227783203125,
-0.040863037109375,
-0.06939697265625,
0.034454345703125,
-0.0032596588134765625,
-0.01529693603515625,
-0.0347900390625,
0.021697998046875,
-0.0291900634765625,
0.052337646484375,
-0.047821044921875,
-0.0210113525390625,
0.009246826171875,
0.033538818359375,
-0.00862884521484375,
0.0209197998046875,
-0.033935546875,
-0.023651123046875,
-0.0096893310546875,
-0.00391387939453125,
0.02545166015625,
0.0008916854858398438,
-0.015869140625,
-0.0287322998046875,
-0.022430419921875,
0.01080322265625,
-0.03460693359375,
-0.015594482421875,
0.0275726318359375,
-0.0036067962646484375,
-0.0099029541015625,
-0.03363037109375,
-0.018280029296875,
0.01032257080078125,
0.0268096923828125,
0.0047454833984375,
0.007518768310546875,
0.0166015625,
-0.040069580078125,
-0.06866455078125,
0.0226593017578125,
0.006137847900390625,
-0.044158935546875,
-0.0161895751953125,
0.01332855224609375,
0.010772705078125,
-0.0457763671875,
-0.0186767578125,
-0.014495849609375,
-0.0276641845703125,
0.00972747802734375,
0.002552032470703125,
-0.006561279296875,
-0.0051422119140625,
0.046661376953125,
-0.03839111328125,
0.047271728515625,
0.0384521484375,
-0.034698486328125,
0.0096893310546875,
-0.0031719207763671875,
0.02752685546875,
0.042205810546875,
-0.019256591796875,
0.032928466796875,
-0.0020275115966796875,
-0.0117950439453125,
-0.0091705322265625,
-0.0196685791015625,
0.0228729248046875,
0.0030193328857421875,
0.01052093505859375,
0.017578125,
-0.02276611328125,
-0.017181396484375,
-0.036590576171875,
-0.0293426513671875,
0.0020809173583984375,
-0.0105438232421875,
0.0029754638671875,
-0.05609130859375,
-0.01367950439453125,
-0.00508880615234375,
-0.006229400634765625,
-0.02313232421875,
-0.01012420654296875,
-0.024139404296875,
0.007289886474609375,
0.0242462158203125,
0.0121917724609375,
0.016937255859375,
0.01861572265625,
0.09405517578125,
-0.0643310546875,
-0.01387786865234375,
0.017303466796875,
0.01216888427734375,
0.0170135498046875,
-0.014495849609375,
0.042572021484375,
0.059539794921875,
-0.042510986328125,
-0.0277557373046875,
0.03717041015625,
0.0192413330078125,
-0.006946563720703125,
-0.036834716796875,
-0.00789642333984375,
0.0286102294921875,
-0.005283355712890625,
0.04083251953125,
-0.01406097412109375,
0.0291900634765625,
0.033355712890625,
0.0153045654296875,
-0.006343841552734375,
-0.047454833984375,
-0.01666259765625,
0.0190582275390625,
-0.006076812744140625,
-0.00872802734375,
0.026153564453125,
-0.041534423828125,
0.0025691986083984375,
0.0272064208984375,
0.0263214111328125,
-0.012908935546875,
0.00899505615234375,
-0.0278778076171875,
0.0175933837890625,
0.01270294189453125
] |
c262a3037bf0119b237878c4007fde3cc0e425d7 | Wordpress Stackexchange
Q: WP REST API: filter by category 1 AND category 2 I have been meddling with REST API and I am stuck with this: How can I filter posts in both cat1 and cat2?
For now, ?categories[]=45&categories[]=50 returns in category ID 45 OR 50 - how can I get posts in 45 AND 50?
Thanks in advance.
A: @Jesse see: WP-API/WP-API#2990
Since WP 4.7, filter has been removed from WP-API.
You need to use this plugin: https://github.com/WP-API/rest-filter
| Q: WP REST API: filter by category 1 AND category 2 I have been meddling with REST API and I am stuck with this: How can I filter posts in both cat1 and cat2?
For now, ?categories[]=45&categories[]=50 returns in category ID 45 OR 50 - how can I get posts in 45 AND 50?
Thanks in advance.
A: @Jesse see: WP-API/WP-API#2990
Since WP 4.7, filter has been removed from WP-API.
You need to use this plugin: https://github.com/WP-API/rest-filter
A: There doesn't seem to be a way to do this in the current version of the API. Without using a plugin, it can be achieved with a custom endpoint or by using the rest query filter function for the specific post type.
Here's a rough filter function that adds a parameter called cat_relation:
add_filter( 'rest_post_query', function( $args, $request ) {
if($request['cat_relation'] == 'AND') {
$args['category__and'] = $request['categories'];
}
return $args;
}, 10, 2);
So an example request URL would be:
http://example.com/wp-json/wp/v2/posts?categories=17,8&cat_relation=AND
A: Multiple categories can be separated by comma like below
http://example.com/wp-json/wp/v2/posts?categories=20,30
hope this helps
A: Install the filter plugin Austin mentioned (https://github.com/WP-API/rest-filter) and try ?filter[categories]=cat_one_slug%2Bcat_two_slug.
I found out that %2B is the code equivalent of the + symbol.
Normally we would use + for the AND operator but unfortunately it gets converted into a space so use %2B instead.
A: Filtering posts based on multiple custom taxonomy terms based on logical "AND", "OR" condition.
Here is what you need to do in the newer versions of Wordpress (v5 and above)
Lets say you have two custom taxonomies: sector and offerings.
Getting all posts that are tagged with taxonomy ID 51 "OR" 52 beloning to the taxonmy term "sector"
"OR"
Getting all posts that are tagged with taxonomy ID 57 "AND" 58 beloning to the taxonomy term "offering"
https://mywordpressbackend.com/wp-json/wp/v2/posts?sector=51+52&offering=57,58&tax_relation=OR
Getting all posts that are tagged with taxonomy ID 51 "OR" 52 beloning to the taxonmy term "sector"
"AND"
Getting all posts that are tagged with taxonomy ID 57 "AND" 58 beloning to the taxonomy term "offering"
https://mywordpressbackend.com/wp-json/wp/v2/posts?sector=51+52&offering=57,58&tax_relation=AND
A: Okay so it's going to say the categories number for each post when you fetch posts.
Then you can just filter by the category number like this:
const wpdata = await fetch(`http://example.com/wp-json/wp/v2/posts`);
const jsonresp = await wpdata.json()
const particularcategoryposts = jsonresp.filter(function(item){
return item.categories == "4";
});
P.S.
By default the WP API only returns 10 posts. Make sure to clarify that you'll need to fetch more than 10 posts if that is the case. 100 Posts is the max.
const wpdata = await fetch(`http://example.com/wp-json/wp/v2/posts/?per_page=100`);
A: For those who are using Rest API v3, It works for me:
http://example.com/wp-json/wc/v3/products/?category=42,43
A: You should be able to access multiple categories by using the following:
http://YOURSITE.DEV/wp-json/wp/v2/posts?categories=45+50
Hope that helps!
Cheers
A: This is what I did, It works fine.
http://example.com/wp-json/wp/v2/articles/?_embed&categories=1,2,3,4&per_page=30
| wordpress | {
"language": "en",
"length": 462,
"provenance": "stackexchange_00019.jsonl.gz:471749",
"question_score": "21",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/251527"
} | [
0.0025615692138671875,
0.0220947265625,
-0.046600341796875,
0.01100921630859375,
0.028045654296875,
-0.046539306640625,
0.045745849609375,
-0.019012451171875,
0.0282135009765625,
0.01032257080078125,
-0.0290069580078125,
-0.0239105224609375,
0.0006732940673828125,
-0.0238800048828125,
-0.0233001708984375,
-0.034210205078125,
0.01016998291015625,
0.0247955322265625,
0.0123291015625,
-0.0224609375,
0.01043701171875,
-0.024810791015625,
-0.00037169456481933594,
0.0814208984375,
0.0012254714965820312,
-0.00994110107421875,
0.0107879638671875,
-0.0269775390625,
0.001857757568359375,
-0.01291656494140625,
-0.006969451904296875,
0.00753021240234375,
-0.00650787353515625,
0.034942626953125,
-0.01334381103515625,
-0.019134521484375,
0.013214111328125,
0.0184173583984375,
0.01517486572265625,
0.0165863037109375,
0.035247802734375,
-0.029510498046875,
0.022705078125,
0.007701873779296875,
0.01328277587890625,
-0.01129913330078125,
0.0216217041015625,
-0.055694580078125,
-0.001369476318359375,
0.0008749961853027344,
0.022430419921875,
0.0318603515625,
0.037750244140625,
-0.048797607421875,
-0.0052947998046875,
-0.016204833984375,
0.040374755859375,
-0.007099151611328125,
0.046142578125,
-0.053314208984375,
-0.05731201171875,
-0.006168365478515625,
0.03289794921875,
-0.0130615234375,
-0.0091400146484375,
-0.007534027099609375,
0.04278564453125,
0.007801055908203125,
-0.0104522705078125,
0.0015172958374023438,
0.028350830078125,
0.010986328125,
-0.009033203125,
-0.0240936279296875,
-0.043914794921875,
-0.0105133056640625,
0.0167083740234375,
-0.0401611328125,
0.008544921875,
-0.006366729736328125,
-0.0024662017822265625,
0.0118865966796875,
-0.0234222412109375,
-0.0012788772583007812,
-0.02972412109375,
-0.0236663818359375,
-0.00943756103515625,
-0.003833770751953125,
-0.01995849609375,
0.0011348724365234375,
-0.00868988037109375,
-0.08892822265625,
-0.060089111328125,
0.07452392578125,
0.03753662109375,
-0.0195465087890625,
0.01605224609375,
-0.00101470947265625,
-0.01096343994140625,
0.0016279220581054688,
0.02142333984375,
-0.050201416015625,
0.010223388671875,
-0.0110626220703125,
0.0447998046875,
0.00710296630859375,
-0.036773681640625,
0.03973388671875,
0.10498046875,
0.04754638671875,
0.01326751708984375,
0.11077880859375,
0.038299560546875,
0.014923095703125,
-0.0232086181640625,
-0.037078857421875,
0.0009365081787109375,
0.006938934326171875,
-0.02398681640625,
-0.038726806640625,
-0.005741119384765625,
0.0144805908203125,
0.030670166015625,
0.0281524658203125,
0.0120391845703125,
0.0280609130859375,
-0.01380157470703125,
-0.03912353515625,
0.0008802413940429688,
0.013946533203125,
0.00616455078125,
0.02032470703125,
-0.0271453857421875,
-0.0059051513671875,
-0.032440185546875,
-0.01079559326171875,
0.053070068359375,
0.0223846435546875,
0.0036106109619140625,
-0.0029926300048828125,
0.00975799560546875,
0.0168304443359375,
-0.0102691650390625,
-0.023284912109375,
0.0248870849609375,
-0.01397705078125,
0.0089111328125,
0.0292205810546875,
0.011871337890625,
0.004207611083984375,
0.0258636474609375,
0.004718780517578125,
0.0225830078125,
0.0191650390625,
0.0004086494445800781,
-0.00032520294189453125,
0.038818359375,
-0.0266265869140625,
-0.0198516845703125,
-0.03515625,
0.0310821533203125,
-0.002765655517578125,
0.040252685546875,
-0.02154541015625,
-0.039642333984375,
0.0089874267578125,
-0.0927734375,
-0.01338958740234375,
0.0200958251953125,
0.01235198974609375,
-0.0355224609375,
-0.0026035308837890625,
-0.00873565673828125,
-0.004459381103515625,
-0.007137298583984375,
0.0156707763671875,
0.00753021240234375,
0.01358795166015625,
0.005542755126953125,
0.042388916015625,
-0.0006961822509765625,
-0.04327392578125,
0.0171051025390625,
0.0142059326171875,
-0.0552978515625,
0.04241943359375,
0.04400634765625,
0.0626220703125,
-0.045440673828125,
0.0141448974609375,
0.0933837890625,
0.058685302734375,
-0.0017137527465820312,
-0.033294677734375,
-0.0101318359375,
-0.0606689453125,
0.0109405517578125,
-0.03302001953125,
-0.006000518798828125,
0.055755615234375,
0.0156402587890625,
0.0019016265869140625,
0.020355224609375,
0.0017299652099609375,
-0.00307464599609375,
0.007476806640625,
-0.008697509765625,
0.019134521484375,
-0.052703857421875,
0.0272216796875,
0.0180816650390625,
-0.0205535888671875,
-0.020538330078125,
0.00023484230041503906,
0.0251007080078125,
-0.025665283203125,
-0.001861572265625,
-0.0087890625,
-0.004619598388671875,
-0.01352691650390625,
-0.006595611572265625,
-0.00653839111328125,
-0.00998687744140625,
0.037872314453125,
0.06201171875,
-0.0121917724609375,
0.014129638671875,
-0.029815673828125,
0.08734130859375,
0.0106048583984375,
-0.006793975830078125,
-0.0121307373046875,
0.0701904296875,
0.042999267578125,
-0.0264892578125,
0.036102294921875,
0.0653076171875,
0.01514434814453125,
-0.0191497802734375,
0.01451873779296875,
0.0176544189453125,
0.014495849609375,
-0.0236053466796875,
0.015655517578125,
0.0418701171875,
-0.043548583984375,
-0.015625,
0.01433563232421875,
0.0115203857421875,
0.03741455078125,
0.0038623809814453125,
-0.0087738037109375,
0.0206146240234375,
-0.0290374755859375,
0.022003173828125,
0.0274658203125,
0.034820556640625,
0.007305145263671875,
-0.00637054443359375,
-0.016632080078125,
0.0211944580078125,
-0.07318115234375,
-0.08624267578125,
-0.007038116455078125,
0.0419921875,
-0.025482177734375,
0.0308074951171875,
0.0275726318359375,
-0.03668212890625,
-0.0178985595703125,
0.031951904296875,
0.04925537109375,
-0.00508880615234375,
0.047698974609375,
0.0207061767578125,
-0.002925872802734375,
-0.0302734375,
-0.0018520355224609375,
0.0132598876953125,
0.01169586181640625,
0.006130218505859375,
0.060699462890625,
0.002925872802734375,
-0.01111602783203125,
-0.03778076171875,
-0.04229736328125,
0.003993988037109375,
0.0016260147094726562,
0.02825927734375,
0.0340576171875,
0.031280517578125,
0.05645751953125,
0.01110076904296875,
0.045806884765625,
0.003040313720703125,
0.01448822021484375,
0.036712646484375,
-0.015350341796875,
0.0145111083984375,
-0.002811431884765625,
0.007312774658203125,
0.04156494140625,
0.0078125,
-0.0071868896484375,
0.00858306884765625,
0.01042938232421875,
0.05023193359375,
-0.00931549072265625,
-0.0069732666015625,
-0.009552001953125,
0.014984130859375,
0.03570556640625,
0.0164794921875,
-0.0206146240234375,
0.0162353515625,
-0.0218353271484375,
-0.0038509368896484375,
-0.004520416259765625,
-0.0843505859375,
-0.054046630859375,
0.0352783203125,
-0.006511688232421875,
0.0135955810546875,
0.0005221366882324219,
-0.0035953521728515625,
-0.0245513916015625,
0.002048492431640625,
-0.020538330078125,
0.0059356689453125,
-0.0142364501953125,
-0.06243896484375,
-0.0211639404296875,
-0.049957275390625,
0.006496429443359375,
-0.0174560546875,
-0.01129913330078125,
0.00714874267578125,
0.08624267578125,
0.023101806640625,
-0.051300048828125,
-0.0024013519287109375,
0.0164794921875,
-0.017730712890625,
0.01322174072265625,
0.01399993896484375,
-0.00334930419921875,
0.0193023681640625,
0.00887298583984375,
0.053741455078125,
0.041961669921875,
-0.04400634765625,
0.00785064697265625,
-0.00453948974609375,
0.0435791015625,
0.00501251220703125,
-0.007232666015625,
0.00736236572265625,
0.01099395751953125,
-0.0255279541015625,
-0.035247802734375,
0.01256561279296875,
-0.033203125,
-0.0197601318359375,
-0.009307861328125,
0.019775390625,
-0.00966644287109375,
-0.048675537109375,
0.0225067138671875,
-0.034332275390625,
-0.0416259765625,
0.01605224609375,
-0.09014892578125,
0.0482177734375,
0.0096588134765625,
-0.003170013427734375,
0.01151275634765625,
0.0087432861328125,
-0.036865234375,
-0.039886474609375,
-0.0287017822265625,
-0.042816162109375,
-0.033477783203125,
-0.005214691162109375,
-0.016448974609375,
-0.0296173095703125,
0.0584716796875,
0.033966064453125,
-0.029449462890625,
0.0155487060546875,
-0.035247802734375,
0.02056884765625,
0.06561279296875,
-0.042938232421875,
-0.039337158203125,
-0.0030364990234375,
0.0301513671875,
-0.019805908203125,
-0.05987548828125,
0.01021575927734375,
-0.031890869140625,
-0.033721923828125,
0.01763916015625,
-0.0082550048828125,
-0.01776123046875,
-0.0144500732421875,
-0.024688720703125,
-0.007904052734375,
-0.0259246826171875,
0.042236328125,
-0.0755615234375,
-0.005023956298828125,
-0.03668212890625,
-0.00970458984375,
-0.06488037109375,
-0.0296783447265625,
-0.005123138427734375,
-0.03973388671875,
-0.0103912353515625,
-0.017059326171875,
0.034149169921875,
0.0249176025390625,
-0.031524658203125,
-0.0025196075439453125,
0.0188446044921875,
-0.01334381103515625,
0.045928955078125,
-0.01934814453125,
0.0099639892578125,
0.01416778564453125,
-0.00829315185546875,
-0.002758026123046875,
-0.016448974609375,
-0.03955078125,
-0.048248291015625,
0.0017614364624023438,
0.00927734375,
-0.01383209228515625,
-0.0010852813720703125,
-0.05255126953125,
0.01357269287109375,
-0.0732421875,
-0.038970947265625,
-0.0491943359375,
-0.029876708984375,
-0.0447998046875,
-0.0032825469970703125,
-0.0204620361328125,
-0.0738525390625,
0.057037353515625,
0.002979278564453125,
-0.019287109375,
0.0013523101806640625,
0.048553466796875,
0.003002166748046875,
-0.037353515625,
-0.07452392578125,
-0.0035839080810546875,
0.0338134765625,
-0.03558349609375,
0.06207275390625,
0.009246826171875,
-0.02520751953125,
0.1033935546875,
-0.006214141845703125,
0.005886077880859375,
-0.03515625,
0.036529541015625,
0.00189208984375,
-0.003963470458984375,
0.01517486572265625,
0.004955291748046875,
0.0259552001953125,
0.00795745849609375,
-0.020965576171875,
0.006744384765625,
0.0002872943878173828,
0.0270233154296875,
-0.00852203369140625,
-0.00862884521484375,
-0.04583740234375,
-0.006473541259765625,
0.01287841796875,
0.0146331787109375,
0.01800537109375,
0.0296478271484375,
-0.0009975433349609375,
0.002681732177734375,
0.0057525634765625,
0.00836181640625,
-0.03411865234375,
0.026123046875,
-0.048736572265625,
0.05487060546875,
-0.06805419921875,
-0.0236053466796875,
-0.034759521484375,
-0.0081939697265625,
0.026458740234375,
-0.033416748046875,
-0.040924072265625,
-0.014373779296875,
-0.016845703125,
-0.01113128662109375,
0.043487548828125,
-0.0234222412109375,
0.01517486572265625,
-0.0005297660827636719,
-0.009246826171875,
0.018218994140625,
-0.03289794921875,
-0.021575927734375,
-0.0290985107421875,
0.021148681640625,
-0.020294189453125,
0.00817108154296875,
0.0116729736328125,
0.049530029296875,
0.006816864013671875,
0.036102294921875,
-0.0269622802734375,
0.02398681640625,
-0.0139007568359375,
0.031341552734375,
0.0253448486328125,
-0.0300750732421875,
0.0345458984375,
-0.0273590087890625,
-0.0038204193115234375,
-0.02508544921875,
-0.022369384765625,
0.034149169921875,
0.007114410400390625,
-0.00467681884765625,
-0.00849151611328125,
0.0180816650390625,
0.030029296875,
-0.021026611328125,
-0.032135009765625,
-0.0205535888671875,
0.0158538818359375,
-0.0330810546875,
-0.003437042236328125,
0.0166778564453125,
0.047149658203125,
-0.0098876953125,
-0.00469970703125,
0.016326904296875,
0.0308990478515625,
0.00921630859375,
-0.0279998779296875,
0.01934814453125,
0.03070068359375,
-0.039520263671875,
-0.042327880859375,
-0.02569580078125,
0.0191192626953125,
0.005527496337890625,
-0.0053558349609375,
-0.028656005859375,
0.03082275390625,
0.004985809326171875,
0.01690673828125,
-0.0101776123046875,
-0.0016279220581054688,
0.00885772705078125,
-0.0029125213623046875,
0.05047607421875,
0.01129150390625,
-0.007152557373046875,
0.0024356842041015625,
-0.0264892578125,
-0.0205230712890625,
0.00862884521484375,
0.00997161865234375,
-0.0175933837890625,
-0.0224761962890625,
0.0199737548828125,
0.0230865478515625,
0.01447296142578125,
-0.018157958984375,
-0.02996826171875,
-0.00228118896484375,
0.020843505859375,
0.00276947021484375,
-0.042449951171875,
0.09149169921875,
0.003993988037109375,
0.0643310546875,
-0.0018320083618164062,
0.036041259765625,
-0.013763427734375,
-0.00688934326171875,
-0.00443267822265625,
-0.1021728515625,
-0.044677734375,
0.02593994140625,
-0.09228515625,
0.07366943359375,
0.040130615234375,
0.004119873046875,
0.002964019775390625,
-0.0014553070068359375,
0.006183624267578125,
-0.0251617431640625,
-0.0257568359375,
-0.02239990234375,
-0.0229644775390625,
0.010406494140625,
0.00025177001953125,
0.0158233642578125,
-0.044189453125,
-0.0290679931640625,
0.03594970703125,
-0.0027637481689453125,
0.03387451171875,
0.02105712890625,
-0.00885009765625,
0.01093292236328125,
0.05181884765625,
0.01428985595703125,
0.038116455078125,
0.019012451171875,
0.0299224853515625,
0.01041412353515625,
-0.0093536376953125,
0.034637451171875,
0.032867431640625,
0.01103973388671875,
-0.01885986328125,
0.004146575927734375,
-0.006862640380859375,
-0.0262603759765625,
-0.00786590576171875,
-0.0214996337890625,
0.00510406494140625,
-0.010528564453125,
0.01439666748046875,
0.01210784912109375,
-0.0279083251953125,
-0.0377197265625,
0.0013275146484375,
-0.0245513916015625,
-0.0245819091796875,
0.006168365478515625,
-0.0219573974609375,
-0.03857421875,
-0.01338958740234375,
0.006664276123046875,
-0.0103302001953125,
0.01531982421875,
-0.0023899078369140625,
0.0218048095703125,
0.007778167724609375,
-0.0001068115234375,
0.0194091796875,
0.041473388671875,
-0.00696563720703125,
0.0099945068359375,
0.04833984375,
-0.046051025390625,
-0.09527587890625,
0.01432037353515625,
0.016998291015625,
-0.0635986328125,
-0.00524139404296875,
-0.034393310546875,
0.038604736328125,
0.0186920166015625,
-0.00010991096496582031,
-0.0204315185546875,
-0.005359649658203125,
-0.03314208984375,
0.01168060302734375,
-0.01104736328125,
-0.0224609375,
0.05218505859375,
-0.0207672119140625,
0.00641632080078125,
-0.00937652587890625,
0.01495361328125,
-0.00537872314453125,
-0.06591796875,
0.04534912109375,
-0.0238189697265625,
-0.00963592529296875,
0.004650115966796875,
0.0192413330078125,
0.01849365234375,
0.0111541748046875,
0.0268707275390625,
-0.0198211669921875,
-0.010040283203125,
0.01552581787109375,
-0.006389617919921875,
-0.01071929931640625,
0.00750732421875,
-0.054595947265625,
0.025848388671875,
-0.006771087646484375,
0.03948974609375,
0.0214385986328125,
-0.0069732666015625,
-0.004695892333984375,
-0.0170440673828125,
-0.0284271240234375,
0.068603515625,
0.031646728515625,
0.0017261505126953125,
-0.0236358642578125,
-0.00720977783203125,
0.00220489501953125,
0.027069091796875,
0.045135498046875,
0.01422119140625,
-0.032073974609375,
-0.043182373046875,
-0.0280914306640625,
0.039642333984375,
-0.01593017578125,
0.03521728515625,
0.01532745361328125,
-0.00424957275390625,
0.0386962890625,
-0.007381439208984375,
0.0300750732421875,
-0.034027099609375,
0.0162811279296875,
0.0259857177734375,
0.0238494873046875,
0.04290771484375,
-0.005245208740234375,
0.052093505859375,
0.0062255859375,
-0.0204315185546875,
0.01477813720703125,
-0.04486083984375,
-0.0328369140625,
0.060394287109375,
0.030853271484375,
-0.04412841796875,
0.00809478759765625,
-0.046600341796875,
0.0484619140625,
0.0125579833984375,
0.0634765625,
0.08697509765625,
0.045745849609375,
0.062164306640625,
0.022216796875,
0.057098388671875,
0.00971221923828125,
-0.036865234375,
0.058319091796875,
0.0245361328125,
0.036651611328125,
-0.0090789794921875,
0.018035888671875,
0.01361083984375,
0.05145263671875,
-0.048980712890625,
-0.06927490234375,
0.01116943359375,
0.0248565673828125,
0.04229736328125,
0.0400390625,
0.0552978515625,
-0.033538818359375,
0.0389404296875,
-0.036834716796875,
0.0260009765625,
0.038055419921875,
0.00391387939453125,
0.01422882080078125,
0.03643798828125,
-0.04595947265625,
0.0247344970703125,
-0.049072265625,
0.00833892822265625,
0.03961181640625,
0.073486328125,
0.005985260009765625,
0.05987548828125,
-0.0394287109375,
-0.0273895263671875,
0.017303466796875,
0.039947509765625,
0.01029205322265625,
-0.026336669921875,
-0.016937255859375,
-0.06878662109375,
0.0213775634765625,
0.011627197265625,
0.028350830078125,
0.009002685546875,
0.043060302734375,
0.035736083984375,
-0.0198516845703125,
-0.01357269287109375,
0.0458984375,
-0.0107269287109375,
-0.003940582275390625,
-0.0634765625,
-0.0130157470703125,
0.006519317626953125,
-0.0188446044921875,
0.0174713134765625,
-0.04339599609375,
0.041107177734375,
0.0107574462890625,
0.0036296844482421875,
0.0100250244140625,
-0.0301971435546875,
0.00830841064453125,
0.019744873046875,
0.00733184814453125,
0.025390625,
-0.07037353515625,
-0.006053924560546875,
-0.040252685546875,
-0.049285888671875,
0.0369873046875,
0.03997802734375,
-0.003940582275390625,
0.006885528564453125,
0.0293121337890625,
-0.06280517578125,
0.0067291259765625,
0.01983642578125,
0.035247802734375,
0.006832122802734375,
-0.026092529296875,
-0.002834320068359375,
-0.04779052734375,
-0.0189056396484375,
-0.0272369384765625,
0.022186279296875,
0.029144287109375,
0.04656982421875,
0.01348876953125,
0.0113983154296875,
-0.036956787109375,
0.04046630859375,
-0.064208984375,
-0.0275115966796875,
0.017181396484375,
0.0191650390625,
0.00417327880859375,
-0.0004096031188964844,
-0.01506805419921875,
-0.00673675537109375,
0.0526123046875,
-0.0294036865234375,
0.034637451171875,
-0.059234619140625,
0.01837158203125,
-0.04107666015625,
0.028839111328125,
-0.01959228515625,
-0.01079559326171875,
-0.041229248046875,
-0.03436279296875,
0.047332763671875,
0.055572509765625,
0.0195159912109375,
-0.044403076171875,
0.005126953125,
-0.0031757354736328125,
0.0002696514129638672,
0.0814208984375,
0.0217132568359375,
0.041748046875,
-0.08782958984375,
0.08282470703125,
0.00039267539978027344,
-0.023773193359375,
0.0220489501953125,
0.018707275390625,
-0.048065185546875,
0.0086517333984375,
0.0687255859375,
-0.04058837890625,
0.00888824462890625,
0.02691650390625,
-0.016571044921875,
0.007232666015625,
-0.01629638671875,
0.0005803108215332031,
-0.0020599365234375,
0.0207061767578125,
-0.01334381103515625,
-0.0291748046875,
-0.00785064697265625,
-0.0005068778991699219,
-0.00417327880859375,
-0.011627197265625,
-0.0175018310546875,
-0.005664825439453125,
0.0156707763671875,
-0.01555633544921875,
0.01303863525390625,
0.01432037353515625,
-0.04766845703125,
-0.0010747909545898438,
-0.003498077392578125,
-0.005924224853515625,
-0.0003974437713623047,
0.013458251953125,
-0.07574462890625,
0.0009303092956542969,
-0.036712646484375,
-0.032470703125,
-0.032623291015625,
-0.023773193359375,
-0.01215362548828125,
-0.00597381591796875,
0.00988006591796875,
-0.01861572265625,
0.0009369850158691406,
0.0286102294921875,
0.01495361328125,
-0.00090789794921875,
0.003734588623046875,
0.02679443359375,
-0.049224853515625,
-0.01361846923828125,
0.033721923828125,
0.0236968994140625,
-0.0288543701171875,
-0.0230865478515625,
0.0229339599609375,
0.0294952392578125,
-0.0235748291015625,
-0.055633544921875,
0.059844970703125,
-0.0280609130859375,
-0.018096923828125,
-0.07135009765625,
-0.02093505859375,
-0.00067138671875,
0.02618408203125,
-0.0184173583984375,
-0.038116455078125,
-0.053802490234375,
0.053009033203125,
0.004383087158203125,
0.0217742919921875,
-0.0125274658203125,
0.01202392578125,
-0.0361328125,
0.035736083984375,
0.0164947509765625,
0.0169525146484375,
-0.0255126953125,
0.00814056396484375,
0.0193939208984375,
0.033538818359375,
-0.03167724609375,
0.06768798828125,
0.007904052734375,
0.0207977294921875,
0.0056610107421875,
-0.02874755859375,
-0.061279296875,
-0.0445556640625,
0.04638671875,
0.04541015625,
0.02154541015625,
-0.00801849365234375,
-0.017730712890625,
-0.04583740234375,
0.0201416015625,
-0.03131103515625,
-0.0181732177734375,
-0.0244598388671875,
-0.00041174888610839844,
-0.0198974609375,
0.02618408203125,
0.03875732421875,
-0.08489990234375,
-0.0022430419921875,
-0.038238525390625,
-0.055419921875,
0.00850677490234375,
0.000820159912109375,
0.027069091796875,
-0.043670654296875,
-0.0029544830322265625,
-0.0290069580078125,
-0.012359619140625,
0.0006136894226074219,
-0.05364990234375,
0.0013761520385742188,
-0.0182037353515625,
-0.0192718505859375,
0.01369476318359375,
0.0070037841796875,
0.00865936279296875,
-0.03204345703125,
0.0208282470703125,
0.01184844970703125,
-0.04852294921875,
0.0081939697265625,
0.0364990234375,
0.016326904296875,
-0.0193939208984375,
-0.03759765625,
0.0355224609375,
-0.01788330078125,
0.0330810546875,
0.01262664794921875,
-0.01049041748046875,
0.056182861328125,
-0.01080322265625,
-0.0556640625,
-0.005970001220703125,
-0.032501220703125,
-0.01271820068359375,
0.016510009765625,
-0.0157012939453125,
-0.057525634765625,
0.00890350341796875,
0.0009417533874511719,
0.0211334228515625,
0.0189971923828125
] |
78e627c5ec19c69025f45d2ff3de6c281a5e983f | Wordpress Stackexchange
Q: Track down where script is being enqueued from I have a WordPress site with an SSL certificate. It all works fine, except that this little insecure shield icon shows up because the header has an enqueued non-https script.
The issue is that I don't know which plugin is enqueuing this script into the header in order to change it into https. Is there any way I could track down where the script is being enqueued from? Any help would be appreciated!
Btw, in case it helps, the unsafe script that is being enqueued is the google maps script (http://maps.google.com/maps/api/js?sensor=false&ver=4.2.10)
A: There is no filter when a script is registered, so it is hard to track that down. Use a full text search in all your theme and plugin files to find the source.
In addition, you can filter the URL before it is printed:
add_filter( 'script_loader_src', function( $url ) {
if ( 0 !== strpos( $url, 'http:' ) )
return $url;
return substr( $url, 5 );
});
This will create an URL without protocol, so the browser will just use the same protocol (here: HTTPS) as your site.
| Q: Track down where script is being enqueued from I have a WordPress site with an SSL certificate. It all works fine, except that this little insecure shield icon shows up because the header has an enqueued non-https script.
The issue is that I don't know which plugin is enqueuing this script into the header in order to change it into https. Is there any way I could track down where the script is being enqueued from? Any help would be appreciated!
Btw, in case it helps, the unsafe script that is being enqueued is the google maps script (http://maps.google.com/maps/api/js?sensor=false&ver=4.2.10)
A: There is no filter when a script is registered, so it is hard to track that down. Use a full text search in all your theme and plugin files to find the source.
In addition, you can filter the URL before it is printed:
add_filter( 'script_loader_src', function( $url ) {
if ( 0 !== strpos( $url, 'http:' ) )
return $url;
return substr( $url, 5 );
});
This will create an URL without protocol, so the browser will just use the same protocol (here: HTTPS) as your site.
A:
The issue is that I don't know which plugin is enqueuing this script into the header in order to change it into https.
The easy way @EmilioVenegas is to remove the plugins, one by one, and check.
You can try to alter the
http://maps.google.com/maps/api/js?sensor=false&ver=4.2.10
to start with
//maps.google.com/maps/api/js...
If not a plugin it may be the theme.
| wordpress | {
"language": "en",
"length": 247,
"provenance": "stackexchange_00019.jsonl.gz:471764",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/251594"
} | [
0.03216552734375,
0.00969696044921875,
-0.017822265625,
0.006175994873046875,
0.0229644775390625,
-0.0516357421875,
0.052337646484375,
-0.0181121826171875,
-0.0311431884765625,
-0.0143280029296875,
0.005901336669921875,
0.000016987323760986328,
-0.073974609375,
-0.042388916015625,
0.0215301513671875,
-0.05877685546875,
0.03802490234375,
-0.0267791748046875,
-0.00843048095703125,
-0.0190277099609375,
0.00923919677734375,
0.0159454345703125,
0.0016231536865234375,
0.052703857421875,
-0.0174407958984375,
-0.00514984130859375,
0.139892578125,
-0.00919342041015625,
0.0007200241088867188,
-0.0220489501953125,
0.018157958984375,
-0.02850341796875,
-0.0083770751953125,
0.06884765625,
-0.05438232421875,
-0.005126953125,
0.0192718505859375,
0.0352783203125,
0.007572174072265625,
0.034637451171875,
-0.004070281982421875,
-0.0011262893676757812,
0.036468505859375,
0.01511383056640625,
-0.004032135009765625,
-0.0189971923828125,
-0.0109710693359375,
-0.0450439453125,
-0.02099609375,
0.043243408203125,
0.00548553466796875,
0.00919342041015625,
0.0129241943359375,
0.0443115234375,
0.0011205673217773438,
0.001750946044921875,
-0.01215362548828125,
-0.0027141571044921875,
-0.0166778564453125,
0.07989501953125,
0.03472900390625,
0.058807373046875,
-0.037811279296875,
-0.039825439453125,
-0.0249176025390625,
-0.0010318756103515625,
-0.00638580322265625,
0.007320404052734375,
-0.012603759765625,
-0.040130615234375,
-0.0003635883331298828,
-0.0024127960205078125,
-0.0045928955078125,
-0.015411376953125,
-0.0408935546875,
0.0272979736328125,
0.004856109619140625,
-0.0038623809814453125,
0.01181793212890625,
-0.0186767578125,
0.038238525390625,
-0.0014619827270507812,
-0.0177001953125,
0.0300445556640625,
-0.0247955322265625,
0.0207366943359375,
-0.0105133056640625,
-0.0200042724609375,
-0.0159454345703125,
0.031768798828125,
-0.0296478271484375,
0.005828857421875,
0.06524658203125,
-0.0161590576171875,
-0.055877685546875,
0.0084686279296875,
0.05548095703125,
0.046844482421875,
0.0264739990234375,
0.017242431640625,
0.0141143798828125,
-0.06072998046875,
0.02728271484375,
-0.042388916015625,
-0.01258087158203125,
0.06744384765625,
0.0217132568359375,
0.019622802734375,
0.00644683837890625,
-0.002727508544921875,
0.0191192626953125,
-0.006916046142578125,
-0.0173797607421875,
0.0027370452880859375,
-0.04742431640625,
0.0068511962890625,
-0.036468505859375,
-0.0310516357421875,
-0.0227813720703125,
0.018798828125,
-0.001556396484375,
0.025177001953125,
-0.006381988525390625,
-0.019989013671875,
-0.022308349609375,
-0.039642333984375,
-0.0120849609375,
-0.003658294677734375,
0.0157928466796875,
0.032012939453125,
-0.039215087890625,
-0.029205322265625,
0.07666015625,
0.0535888671875,
0.03143310546875,
-0.02313232421875,
0.0250244140625,
-0.033660888671875,
-0.05438232421875,
0.0222320556640625,
-0.01123046875,
-0.038421630859375,
-0.0113372802734375,
-0.049713134765625,
0.01165771484375,
-0.01427459716796875,
-0.0019483566284179688,
0.033233642578125,
0.00910186767578125,
-0.0271453857421875,
0.0311431884765625,
-0.01910400390625,
0.04986572265625,
-0.01126861572265625,
0.01236724853515625,
-0.0293426513671875,
0.06085205078125,
-0.04473876953125,
-0.03216552734375,
-0.04766845703125,
-0.0186767578125,
0.004459381103515625,
-0.00678253173828125,
-0.0149383544921875,
-0.011016845703125,
-0.027801513671875,
0.0287933349609375,
0.00946807861328125,
0.0157623291015625,
0.038360595703125,
-0.035400390625,
0.005550384521484375,
-0.0267791748046875,
0.0009851455688476562,
-0.0025348663330078125,
-0.00024199485778808594,
-0.0021114349365234375,
0.041961669921875,
0.0268096923828125,
0.0097808837890625,
0.00820159912109375,
-0.0345458984375,
0.07318115234375,
-0.02313232421875,
-0.06610107421875,
0.046051025390625,
0.00693511962890625,
0.05780029296875,
0.006038665771484375,
-0.016357421875,
0.08013916015625,
0.03570556640625,
-0.032745361328125,
0.002109527587890625,
-0.01214599609375,
-0.024749755859375,
0.01641845703125,
0.00276947021484375,
0.00003594160079956055,
0.00803375244140625,
0.005916595458984375,
0.00397491455078125,
0.00885772705078125,
-0.0035648345947265625,
-0.0035266876220703125,
0.012298583984375,
-0.0106964111328125,
0.0288238525390625,
-0.0270233154296875,
0.020721435546875,
0.01016998291015625,
0.010040283203125,
-0.01035308837890625,
-0.0189971923828125,
0.02093505859375,
0.026885986328125,
-0.006561279296875,
0.04241943359375,
-0.00396728515625,
0.029022216796875,
-0.00971221923828125,
-0.0367431640625,
-0.006740570068359375,
-0.009307861328125,
-0.00925445556640625,
-0.0033721923828125,
-0.02276611328125,
0.00620269775390625,
0.03436279296875,
-0.00318145751953125,
0.0458984375,
0.01343536376953125,
0.01389312744140625,
0.0302886962890625,
-0.0179595947265625,
-0.00800323486328125,
-0.025726318359375,
-0.058013916015625,
0.0142974853515625,
0.048828125,
0.039031982421875,
0.04779052734375,
-0.01861572265625,
-0.03839111328125,
0.037811279296875,
-0.07904052734375,
-0.01360321044921875,
-0.01206207275390625,
-0.01033782958984375,
-0.0005879402160644531,
0.00665283203125,
-0.01102447509765625,
0.03271484375,
-0.01513671875,
0.005336761474609375,
0.04241943359375,
0.00962066650390625,
0.00608062744140625,
-0.0030612945556640625,
0.01314544677734375,
0.00511932373046875,
-0.0006451606750488281,
-0.0161285400390625,
-0.0176544189453125,
0.007053375244140625,
-0.002452850341796875,
0.027069091796875,
0.0279693603515625,
-0.0165557861328125,
-0.03155517578125,
0.0168609619140625,
0.027435302734375,
-0.0196685791015625,
0.0267333984375,
0.0863037109375,
-0.0214385986328125,
-0.0196685791015625,
-0.020782470703125,
-0.0010967254638671875,
0.0225677490234375,
-0.01186370849609375,
-0.01207733154296875,
-0.06884765625,
-0.005764007568359375,
-0.0234222412109375,
-0.040435791015625,
0.01371002197265625,
0.055267333984375,
0.01216888427734375,
0.01435089111328125,
0.0384521484375,
0.0006117820739746094,
-0.01203155517578125,
0.0195159912109375,
0.011749267578125,
-0.03228759765625,
0.07904052734375,
-0.018341064453125,
0.026031494140625,
-0.01119232177734375,
0.08416748046875,
0.051605224609375,
-0.033721923828125,
0.041412353515625,
0.0031871795654296875,
-0.00366973876953125,
-0.018524169921875,
-0.00188446044921875,
-0.01788330078125,
-0.0027179718017578125,
-0.06915283203125,
0.0009493827819824219,
-0.00008636713027954102,
-0.03436279296875,
-0.005260467529296875,
-0.0225830078125,
-0.026611328125,
-0.018524169921875,
-0.1243896484375,
-0.0804443359375,
-0.05291748046875,
-0.011077880859375,
0.03436279296875,
0.00325775146484375,
0.0293426513671875,
-0.005725860595703125,
0.0158233642578125,
0.021453857421875,
-0.01198577880859375,
-0.005573272705078125,
-0.060272216796875,
-0.0242767333984375,
-0.065185546875,
0.0665283203125,
-0.01236724853515625,
0.038330078125,
0.0128936767578125,
-0.0275421142578125,
-0.0038814544677734375,
-0.01287078857421875,
0.03790283203125,
0.037506103515625,
-0.004886627197265625,
-0.015716552734375,
-0.04559326171875,
-0.03955078125,
-0.035888671875,
-0.0038127899169921875,
-0.0303955078125,
-0.039794921875,
0.0660400390625,
0.00859832763671875,
-0.01296234130859375,
-0.03228759765625,
0.004131317138671875,
-0.0248260498046875,
-0.021728515625,
-0.0306549072265625,
-0.007289886474609375,
-0.066650390625,
-0.01837158203125,
0.036651611328125,
0.004001617431640625,
-0.016937255859375,
-0.011383056640625,
-0.04364013671875,
0.00142669677734375,
0.0212554931640625,
0.057159423828125,
0.0107269287109375,
0.01061248779296875,
-0.0019702911376953125,
0.035858154296875,
0.005962371826171875,
0.052642822265625,
-0.05255126953125,
0.0189971923828125,
-0.02203369140625,
0.0283355712890625,
0.005214691162109375,
0.00777435302734375,
0.0035228729248046875,
-0.0204925537109375,
-0.01605224609375,
0.0012483596801757812,
0.007503509521484375,
-0.036407470703125,
0.042266845703125,
-0.0198974609375,
-0.0014772415161132812,
-0.020660400390625,
0.05523681640625,
-0.0185699462890625,
-0.0030460357666015625,
0.03558349609375,
0.01535797119140625,
-0.04730224609375,
0.000048995018005371094,
-0.07623291015625,
-0.01511383056640625,
-0.1024169921875,
0.00943756103515625,
-0.0142974853515625,
-0.039093017578125,
0.01006317138671875,
-0.061370849609375,
-0.0400390625,
-0.0379638671875,
0.040985107421875,
-0.03643798828125,
-0.01323699951171875,
0.01560211181640625,
-0.016571044921875,
-0.024688720703125,
-0.0239410400390625,
-0.01406097412109375,
-0.048553466796875,
-0.01181793212890625,
-0.032257080078125,
0.04425048828125,
0.031646728515625,
-0.034393310546875,
-0.001926422119140625,
0.04132080078125,
0.01120758056640625,
0.00893402099609375,
0.02459716796875,
-0.022613525390625,
0.050140380859375,
0.051361083984375,
0.00977325439453125,
0.006855010986328125,
-0.007476806640625,
0.0239105224609375,
-0.07666015625,
-0.0017728805541992188,
0.02630615234375,
-0.0178375244140625,
0.10009765625,
-0.067626953125,
-0.044677734375,
0.006031036376953125,
0.0164642333984375,
-0.0257568359375,
-0.0010881423950195312,
-0.019134521484375,
0.024078369140625,
-0.008941650390625,
0.02764892578125,
-0.02362060546875,
0.00995635986328125,
0.01079559326171875,
0.044097900390625,
0.00032711029052734375,
-0.01190948486328125,
-0.0084381103515625,
0.034393310546875,
0.003314971923828125,
0.0160064697265625,
0.0865478515625,
0.0406494140625,
0.040557861328125,
-0.001995086669921875,
-0.01102447509765625,
0.02239990234375,
-0.0091552734375,
0.038238525390625,
0.0474853515625,
0.0304718017578125,
-0.011993408203125,
0.0634765625,
-0.058746337890625,
0.005023956298828125,
0.002918243408203125,
0.0264892578125,
0.01226043701171875,
-0.0325927734375,
-0.005401611328125,
-0.0180816650390625,
0.016265869140625,
-0.0210418701171875,
0.01004791259765625,
-0.045074462890625,
0.057373046875,
0.0098876953125,
0.006710052490234375,
0.036102294921875,
0.05755615234375,
0.0239105224609375,
-0.0469970703125,
0.0194549560546875,
-0.044891357421875,
0.07379150390625,
-0.07086181640625,
0.003841400146484375,
-0.042022705078125,
-0.0100250244140625,
0.04937744140625,
0.01096343994140625,
-0.0704345703125,
0.0274505615234375,
0.0016317367553710938,
0.0266265869140625,
0.0202484130859375,
0.005218505859375,
0.007633209228515625,
0.00621795654296875,
0.00455474853515625,
-0.01099395751953125,
-0.00510406494140625,
0.0191497802734375,
-0.018218994140625,
0.03302001953125,
-0.0182342529296875,
0.0129241943359375,
-0.0306854248046875,
0.04254150390625,
0.0133209228515625,
-0.0031185150146484375,
-0.01611328125,
-0.00400543212890625,
-0.00795745849609375,
0.015625,
0.0240478515625,
-0.006805419921875,
0.018646240234375,
-0.0210418701171875,
0.02386474609375,
-0.0305023193359375,
-0.004825592041015625,
-0.003978729248046875,
0.02093505859375,
0.00864410400390625,
0.0011091232299804688,
0.04742431640625,
0.00534820556640625,
-0.022125244140625,
0.05316162109375,
0.0254669189453125,
-0.0227203369140625,
-0.046783447265625,
-0.04425048828125,
0.03204345703125,
0.0141448974609375,
-0.00833892822265625,
-0.0291900634765625,
-0.01062774658203125,
0.009796142578125,
0.005977630615234375,
-0.034454345703125,
0.027740478515625,
0.01861572265625,
0.00807952880859375,
-0.04107666015625,
-0.0232696533203125,
-0.010162353515625,
0.0261383056640625,
-0.020263671875,
0.00616455078125,
0.01611328125,
-0.03582763671875,
0.033477783203125,
0.007678985595703125,
-0.013153076171875,
0.03399658203125,
0.0374755859375,
0.006107330322265625,
-0.0094146728515625,
-0.0186309814453125,
-0.05926513671875,
-0.041473388671875,
-0.0234527587890625,
0.00917816162109375,
0.006885528564453125,
0.00689697265625,
0.0072021484375,
0.0262298583984375,
0.0321044921875,
-0.026763916015625,
-0.035888671875,
0.01202392578125,
0.02215576171875,
0.007289886474609375,
0.0762939453125,
-0.039093017578125,
0.07757568359375,
0.02978515625,
0.016448974609375,
-0.003078460693359375,
0.05224609375,
0.0018491744995117188,
0.003009796142578125,
-0.0134735107421875,
-0.077880859375,
0.0267333984375,
0.0024566650390625,
0.019195556640625,
0.039276123046875,
0.0180816650390625,
0.0165557861328125,
0.0225677490234375,
0.0223236083984375,
0.0223846435546875,
-0.0001512765884399414,
-0.0092010498046875,
0.01678466796875,
-0.02044677734375,
0.10430908203125,
0.004001617431640625,
0.0102996826171875,
-0.014617919921875,
0.0193023681640625,
0.0005559921264648438,
-0.002162933349609375,
-0.0010061264038085938,
-0.0245819091796875,
-0.01708984375,
0.0118865966796875,
0.07330322265625,
0.0227508544921875,
0.060089111328125,
0.028167724609375,
0.028656005859375,
0.034698486328125,
-0.04150390625,
-0.06256103515625,
-0.01312255859375,
-0.0276031494140625,
-0.032806396484375,
-0.0267791748046875,
-0.0088653564453125,
-0.00838470458984375,
0.0193634033203125,
0.00627899169921875,
0.0517578125,
-0.018035888671875,
0.0267181396484375,
0.005950927734375,
-0.034759521484375,
0.003063201904296875,
-0.0037326812744140625,
-0.006870269775390625,
-0.01390838623046875,
0.02362060546875,
0.03533935546875,
-0.0181121826171875,
0.00913238525390625,
0.02862548828125,
-0.0236968994140625,
-0.051513671875,
0.01192474365234375,
0.0120849609375,
-0.0036830902099609375,
0.03924560546875,
-0.00865936279296875,
0.010986328125,
-0.01165008544921875,
0.01058197021484375,
0.0173797607421875,
-0.00971221923828125,
-0.017913818359375,
0.035308837890625,
-0.02496337890625,
0.001861572265625,
-0.0318603515625,
0.026397705078125,
0.07745361328125,
0.035186767578125,
0.02679443359375,
-0.056884765625,
0.037109375,
0.001476287841796875,
0.06085205078125,
-0.0167236328125,
-0.01206207275390625,
0.05865478515625,
-0.021331787109375,
0.006328582763671875,
0.02056884765625,
-0.0037670135498046875,
-0.0110321044921875,
0.006378173828125,
0.04052734375,
-0.0204010009765625,
-0.03338623046875,
0.0181427001953125,
0.0130615234375,
-0.0010004043579101562,
-0.00409698486328125,
0.07977294921875,
-0.031524658203125,
0.01055908203125,
0.01776123046875,
-0.00209808349609375,
-0.051422119140625,
-0.01169586181640625,
-0.03643798828125,
0.060028076171875,
0.005168914794921875,
-0.020965576171875,
0.0035114288330078125,
0.0276336669921875,
-0.0209808349609375,
-0.0023059844970703125,
-0.0014848709106445312,
0.04974365234375,
0.01861572265625,
0.031524658203125,
-0.0084075927734375,
-0.02410888671875,
0.0263671875,
0.0667724609375,
0.039825439453125,
0.005157470703125,
-0.0033779144287109375,
-0.013946533203125,
0.0081024169921875,
0.0411376953125,
-0.01087188720703125,
0.0130767822265625,
0.0256500244140625,
0.045318603515625,
0.04815673828125,
-0.04718017578125,
0.0257568359375,
-0.0595703125,
0.0263824462890625,
0.028717041015625,
0.0171051025390625,
0.023345947265625,
-0.005542755126953125,
-0.022430419921875,
-0.0305938720703125,
0.017486572265625,
0.002048492431640625,
0.05072021484375,
0.006641387939453125,
0.0008196830749511719,
-0.0039043426513671875,
-0.00749969482421875,
-0.01506805419921875,
-0.0061187744140625,
0.0228271484375,
-0.00356292724609375,
-0.003978729248046875,
0.034332275390625,
0.022216796875,
0.0194549560546875,
0.0164947509765625,
0.01244354248046875,
0.0347900390625,
-0.0211029052734375,
0.0174407958984375,
0.024688720703125,
0.01666259765625,
-0.00786590576171875,
0.04876708984375,
0.037567138671875,
0.023345947265625,
-0.0494384765625,
-0.00537872314453125,
0.00023555755615234375,
0.0252838134765625,
0.028778076171875,
-0.019317626953125,
0.0518798828125,
-0.0323486328125,
-0.0183258056640625,
0.01268768310546875,
-0.00016868114471435547,
0.02484130859375,
0.00921630859375,
0.0200347900390625,
0.0254974365234375,
-0.0272674560546875,
0.0194244384765625,
-0.05462646484375,
-0.006084442138671875,
-0.01259613037109375,
0.06732177734375,
0.049224853515625,
0.051177978515625,
-0.002254486083984375,
-0.050018310546875,
-0.023956298828125,
0.007106781005859375,
0.0205535888671875,
0.017425537109375,
-0.01873779296875,
0.000011980533599853516,
0.00457763671875,
0.04559326171875,
0.017486572265625,
-0.01343536376953125,
0.042144775390625,
0.0270843505859375,
-0.05169677734375,
-0.0035076141357421875,
0.041229248046875,
-0.019195556640625,
0.056396484375,
-0.041351318359375,
0.024993896484375,
0.00433349609375,
-0.0210723876953125,
0.01313018798828125,
-0.034637451171875,
0.07696533203125,
-0.003742218017578125,
0.006656646728515625,
0.002590179443359375,
-0.0249786376953125,
-0.0126800537109375,
-0.006378173828125,
0.0022144317626953125,
0.0010747909545898438,
-0.0164031982421875,
-0.0066070556640625,
0.0092315673828125,
-0.025970458984375,
0.017974853515625,
0.03302001953125,
-0.02886962890625,
0.037628173828125,
0.059722900390625,
-0.03411865234375,
0.0271453857421875,
0.0164947509765625,
0.021026611328125,
-0.0042266845703125,
0.02032470703125,
0.003963470458984375,
-0.0013418197631835938,
-0.0112762451171875,
0.039764404296875,
0.0190582275390625,
-0.00469970703125,
0.0167999267578125,
-0.0006885528564453125,
-0.01593017578125,
0.0272369384765625,
-0.0298309326171875,
0.01611328125,
0.019195556640625,
0.0005898475646972656,
-0.035308837890625,
0.00235748291015625,
-0.0036449432373046875,
-0.06427001953125,
0.0189361572265625,
0.02459716796875,
-0.01346588134765625,
0.023529052734375,
0.017578125,
0.01013946533203125,
-0.04022216796875,
-0.00855255126953125,
-0.04522705078125,
-0.05548095703125,
-0.002124786376953125,
0.031646728515625,
-0.025054931640625,
0.016845703125,
0.0138092041015625,
0.035736083984375,
-0.0026340484619140625,
-0.0004119873046875,
0.0004911422729492188,
-0.017333984375,
-0.01806640625,
0.0144500732421875,
-0.0156097412109375,
0.037628173828125,
0.021820068359375,
-0.021697998046875,
0.037384033203125,
0.00628662109375,
0.0166168212890625,
0.005565643310546875,
0.0266265869140625,
-0.0439453125,
0.0013799667358398438,
-0.0028228759765625,
0.00568389892578125,
0.01387786865234375,
0.0036067962646484375,
-0.03240966796875,
-0.0443115234375,
-0.0246429443359375,
-0.00806427001953125,
0.01401519775390625,
-0.0304718017578125,
-0.004436492919921875,
0.0186004638671875,
-0.07098388671875,
0.008087158203125,
-0.0265960693359375,
0.0330810546875,
-0.011627197265625,
-0.017547607421875,
0.00356292724609375,
-0.05218505859375,
0.0171051025390625,
-0.0153656005859375,
0.10589599609375,
-0.0265960693359375,
0.0011577606201171875,
-0.056427001953125,
-0.030364990234375,
-0.00592041015625,
0.079345703125,
0.0006494522094726562,
0.00713348388671875,
0.054779052734375,
-0.014801025390625,
-0.0166473388671875,
-0.008575439453125,
-0.0069122314453125,
0.036041259765625,
-0.07513427734375,
-0.01091766357421875,
0.005023956298828125,
0.0153350830078125,
-0.020172119140625,
-0.03594970703125,
0.0126495361328125,
-0.034820556640625,
-0.012298583984375,
0.01270294189453125,
-0.01282501220703125,
-0.0050201416015625,
-0.035552978515625,
-0.05670166015625,
0.08966064453125,
-0.00389862060546875,
-0.0236663818359375,
-0.058624267578125,
-0.0005097389221191406,
0.0002689361572265625,
0.0203857421875,
-0.0198211669921875,
-0.038726806640625,
-0.040130615234375,
0.0201416015625,
0.0010509490966796875,
0.02032470703125,
0.005832672119140625,
-0.030303955078125,
-0.03521728515625,
0.009033203125,
0.029510498046875,
0.0115814208984375,
-0.037445068359375,
0.024383544921875,
0.01983642578125,
0.037445068359375,
0.0255584716796875,
0.06304931640625,
0.025482177734375,
-0.046539306640625,
-0.0082244873046875,
0.0293426513671875,
-0.0171966552734375,
0.007740020751953125,
0.06463623046875,
0.0390625,
0.01678466796875,
-0.033050537109375,
-0.03985595703125,
-0.0236053466796875,
0.004665374755859375,
-0.017974853515625,
-0.0003304481506347656,
-0.0355224609375,
0.00937652587890625,
-0.0251617431640625,
-0.0016345977783203125,
-0.031707763671875,
-0.01346588134765625,
-0.04119873046875,
-0.0127105712890625,
0.014434814453125,
0.007427215576171875,
0.0158233642578125,
-0.04644775390625,
0.0927734375,
-0.04736328125,
0.01079559326171875,
0.0185394287109375,
0.03662109375,
0.04266357421875,
0.00484466552734375,
0.0172576904296875,
0.0421142578125,
-0.042144775390625,
0.03192138671875,
0.010833740234375,
0.00012373924255371094,
-0.06646728515625,
0.004955291748046875,
-0.01666259765625,
0.0125274658203125,
0.021942138671875,
0.01320648193359375,
-0.04345703125,
-0.0081634521484375,
0.0093231201171875,
0.0011529922485351562,
-0.0081329345703125,
-0.0206146240234375,
-0.0173797607421875,
0.032470703125,
0.0195159912109375,
-0.019805908203125,
0.06439208984375,
-0.059326171875,
0.01125335693359375,
0.032958984375,
-0.00328826904296875,
0.0210113525390625,
-0.01499176025390625,
-0.11187744140625,
-0.013946533203125,
-0.0180206298828125
] |
17c4e7b72f4dcc6244a441dcf5676737b9dbbcab | Wordpress Stackexchange
Q: WP Rest API v2 return posts with specific tag I am trying to get posts from blog: http://christianconcepts.com/ which are tagged "appcontent". I tried this querry:
http://christianconcepts.com/wp-json/wp/v2/posts/?filter[tag]=appcontent
but it I still get unfiltered results. For example, this post: http://christianconcepts.com/pdf-ebook-available/ doesn't have "appcontent" tag but it is still returned.
"REST API - Filter Fields" plugin is installed.
Could someone help me?
A: The filter param was removed in WP4.7, you should be able to access tags via their ID. For example to get the tag with the ID of 7 you could use:
http://YOUSIITE.DEV/wp-json/wp/v2/posts?tags=7
If you would like to add filters back in the WP-API team released their own Filter plugin, I'd recommend that you check that out: https://github.com/WP-API/rest-filter. From what I could see "REST API - Filter Fields" plugin actually restricts the content that is received from the API, it doesn't add Filter back in.
If you are adding the filter back in, remove the forward slash after posts, for example update:
http://christianconcepts.com/wp-json/wp/v2/posts/?filter[tag]=appcontent
to
http://christianconcepts.com/wp-json/wp/v2/posts?filter[tag]=appcontent
Hope that helps!
| Q: WP Rest API v2 return posts with specific tag I am trying to get posts from blog: http://christianconcepts.com/ which are tagged "appcontent". I tried this querry:
http://christianconcepts.com/wp-json/wp/v2/posts/?filter[tag]=appcontent
but it I still get unfiltered results. For example, this post: http://christianconcepts.com/pdf-ebook-available/ doesn't have "appcontent" tag but it is still returned.
"REST API - Filter Fields" plugin is installed.
Could someone help me?
A: The filter param was removed in WP4.7, you should be able to access tags via their ID. For example to get the tag with the ID of 7 you could use:
http://YOUSIITE.DEV/wp-json/wp/v2/posts?tags=7
If you would like to add filters back in the WP-API team released their own Filter plugin, I'd recommend that you check that out: https://github.com/WP-API/rest-filter. From what I could see "REST API - Filter Fields" plugin actually restricts the content that is received from the API, it doesn't add Filter back in.
If you are adding the filter back in, remove the forward slash after posts, for example update:
http://christianconcepts.com/wp-json/wp/v2/posts/?filter[tag]=appcontent
to
http://christianconcepts.com/wp-json/wp/v2/posts?filter[tag]=appcontent
Hope that helps!
| wordpress | {
"language": "en",
"length": 169,
"provenance": "stackexchange_00019.jsonl.gz:471770",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/251608"
} | [
0.007259368896484375,
-0.000029206275939941406,
0.0020236968994140625,
0.029449462890625,
-0.007160186767578125,
-0.040863037109375,
0.06634521484375,
-0.033721923828125,
0.0106353759765625,
0.023345947265625,
0.0038909912109375,
-0.0089874267578125,
-0.0012407302856445312,
-0.0264892578125,
-0.034637451171875,
-0.022369384765625,
0.0093841552734375,
0.00521087646484375,
0.0209197998046875,
-0.026275634765625,
0.0218353271484375,
-0.0276336669921875,
0.015411376953125,
0.051788330078125,
-0.016998291015625,
0.045684814453125,
0.053802490234375,
-0.0156097412109375,
0.009521484375,
0.0019407272338867188,
-0.004024505615234375,
-0.044586181640625,
0.02874755859375,
0.034088134765625,
-0.08551025390625,
-0.0487060546875,
-0.02447509765625,
0.0166015625,
-0.04852294921875,
0.02117919921875,
0.0325927734375,
-0.0232086181640625,
-0.031982421875,
0.034027099609375,
-0.015411376953125,
-0.051513671875,
0.05230712890625,
-0.0232391357421875,
0.019287109375,
0.004657745361328125,
0.007511138916015625,
0.005840301513671875,
0.0138092041015625,
-0.003360748291015625,
-0.021026611328125,
0.0018339157104492188,
0.005428314208984375,
0.004573822021484375,
0.0205230712890625,
-0.022491455078125,
-0.003627777099609375,
0.01019287109375,
0.01474761962890625,
0.01678466796875,
0.0287628173828125,
0.003116607666015625,
0.05377197265625,
0.00858306884765625,
-0.0156097412109375,
0.041168212890625,
0.007747650146484375,
-0.029815673828125,
0.0049591064453125,
-0.00884246826171875,
-0.01898193359375,
-0.0196380615234375,
-0.01123809814453125,
-0.03643798828125,
0.035247802734375,
0.0008568763732910156,
0.005496978759765625,
-0.0182952880859375,
-0.023193359375,
0.0166473388671875,
-0.022308349609375,
0.0108184814453125,
-0.007686614990234375,
-0.0016660690307617188,
-0.036468505859375,
0.02398681640625,
-0.0328369140625,
-0.06927490234375,
-0.0196075439453125,
0.045166015625,
0.01148223876953125,
0.01264190673828125,
-0.004764556884765625,
0.0176544189453125,
-0.0152130126953125,
0.0240936279296875,
0.0006299018859863281,
-0.037750244140625,
0.04754638671875,
-0.03619384765625,
0.018585205078125,
0.003753662109375,
-0.0160980224609375,
0.06829833984375,
0.07867431640625,
0.033477783203125,
0.002651214599609375,
0.042755126953125,
0.0275421142578125,
-0.011077880859375,
-0.04345703125,
-0.0206756591796875,
-0.004665374755859375,
-0.0165557861328125,
0.01007843017578125,
-0.03692626953125,
-0.0364990234375,
0.0081939697265625,
-0.042816162109375,
0.043243408203125,
0.02203369140625,
0.019317626953125,
0.028106689453125,
0.01171875,
-0.0096588134765625,
0.018035888671875,
0.023040771484375,
0.034698486328125,
-0.022369384765625,
-0.0186004638671875,
-0.051544189453125,
-0.00864410400390625,
0.0210723876953125,
-0.0228424072265625,
-0.01605224609375,
0.0067291259765625,
0.0164642333984375,
-0.003887176513671875,
-0.004764556884765625,
-0.0144500732421875,
0.061431884765625,
-0.018524169921875,
0.016448974609375,
0.0253143310546875,
0.01849365234375,
0.04241943359375,
0.0176849365234375,
0.023956298828125,
0.036346435546875,
0.012939453125,
0.0084991455078125,
-0.04278564453125,
0.0721435546875,
-0.052093505859375,
0.005374908447265625,
-0.07550048828125,
0.034332275390625,
-0.02459716796875,
-0.01110076904296875,
-0.00799560546875,
-0.0465087890625,
0.03717041015625,
-0.0330810546875,
-0.01067352294921875,
0.0187835693359375,
0.06683349609375,
-0.0345458984375,
0.00026679039001464844,
0.006317138671875,
0.0039825439453125,
-0.01424407958984375,
-0.00897979736328125,
0.03179931640625,
0.0244293212890625,
0.02886962890625,
0.0389404296875,
0.0217132568359375,
-0.01183319091796875,
0.09332275390625,
-0.00878143310546875,
-0.07342529296875,
0.054656982421875,
0.04498291015625,
0.10748291015625,
-0.028717041015625,
0.0328369140625,
0.06610107421875,
0.033721923828125,
-0.004619598388671875,
0.036773681640625,
-0.01000213623046875,
-0.06573486328125,
-0.002346038818359375,
0.0005841255187988281,
-0.0202178955078125,
-0.0010128021240234375,
0.012847900390625,
0.0149383544921875,
0.01678466796875,
0.01427459716796875,
0.004810333251953125,
0.00885772705078125,
-0.00951385498046875,
0.02239990234375,
-0.017669677734375,
0.020233154296875,
0.028076171875,
-0.00927734375,
-0.041656494140625,
0.06939697265625,
0.00931549072265625,
-0.02667236328125,
-0.011505126953125,
-0.018280029296875,
-0.004138946533203125,
-0.006565093994140625,
-0.0009522438049316406,
0.027099609375,
-0.017791748046875,
0.01000213623046875,
0.07403564453125,
-0.0013895034790039062,
0.00946044921875,
-0.0270233154296875,
0.1014404296875,
0.004589080810546875,
0.03399658203125,
0.004978179931640625,
0.059356689453125,
0.0173492431640625,
-0.0379638671875,
-0.0029850006103515625,
0.0310516357421875,
-0.0223388671875,
0.0070648193359375,
0.05084228515625,
0.0128173828125,
0.05145263671875,
0.0021305084228515625,
0.02166748046875,
0.047760009765625,
-0.0299072265625,
0.0023899078369140625,
0.0025424957275390625,
0.01470947265625,
0.0106353759765625,
0.0023212432861328125,
-0.0257110595703125,
0.0280609130859375,
-0.0260162353515625,
0.0206451416015625,
0.0240631103515625,
-0.00914764404296875,
0.0035114288330078125,
-0.002361297607421875,
-0.0139007568359375,
0.0147552490234375,
-0.03839111328125,
-0.039520263671875,
-0.0180511474609375,
0.031341552734375,
-0.010467529296875,
0.05023193359375,
0.050994873046875,
-0.03363037109375,
-0.03521728515625,
0.025604248046875,
0.10784912109375,
-0.006473541259765625,
0.03729248046875,
0.04400634765625,
0.01483917236328125,
-0.055908203125,
-0.0036144256591796875,
0.0269012451171875,
0.0229644775390625,
0.01219940185546875,
0.050140380859375,
-0.010162353515625,
-0.0140228271484375,
-0.01499176025390625,
-0.0233001708984375,
-0.0161285400390625,
0.02197265625,
-0.006198883056640625,
0.0214996337890625,
0.0209197998046875,
0.051971435546875,
0.01224517822265625,
0.023101806640625,
-0.004894256591796875,
0.01556396484375,
0.0215606689453125,
-0.043975830078125,
0.0305633544921875,
-0.037261962890625,
0.031585693359375,
0.04461669921875,
-0.0009179115295410156,
-0.01364898681640625,
0.01255035400390625,
0.0201873779296875,
0.00942230224609375,
0.00826263427734375,
-0.00899505615234375,
0.01349639892578125,
-0.02569580078125,
0.037750244140625,
0.00699615478515625,
0.01290130615234375,
-0.016510009765625,
-0.05157470703125,
-0.021575927734375,
-0.00800323486328125,
-0.09808349609375,
-0.0736083984375,
0.04071044921875,
-0.0251312255859375,
0.01190185546875,
-0.0244598388671875,
-0.033203125,
-0.0156402587890625,
-0.006885528564453125,
-0.01505279541015625,
-0.00141143798828125,
0.00530242919921875,
-0.0657958984375,
-0.023834228515625,
-0.078369140625,
0.01031494140625,
-0.0181121826171875,
0.0170440673828125,
0.0076904296875,
0.04345703125,
0.014892578125,
-0.02374267578125,
0.034759521484375,
0.007762908935546875,
-0.00786590576171875,
-0.001415252685546875,
0.0012187957763671875,
-0.00012087821960449219,
0.002407073974609375,
0.018218994140625,
0.0234222412109375,
0.02587890625,
-0.040618896484375,
-0.00405120849609375,
-0.01053619384765625,
-0.004024505615234375,
0.0013666152954101562,
-0.01067352294921875,
0.012603759765625,
-0.00907135009765625,
-0.01338958740234375,
-0.0499267578125,
0.0189666748046875,
-0.03460693359375,
-0.0180511474609375,
0.0189971923828125,
0.0046844482421875,
-0.002414703369140625,
-0.040557861328125,
0.03607177734375,
0.00800323486328125,
-0.0163421630859375,
0.037628173828125,
-0.061431884765625,
0.0479736328125,
-0.0003559589385986328,
0.008880615234375,
-0.0250244140625,
0.05560302734375,
-0.0163116455078125,
-0.04034423828125,
0.0079193115234375,
-0.036102294921875,
-0.0118408203125,
-0.039337158203125,
-0.0216827392578125,
-0.00820159912109375,
0.0379638671875,
0.00473785400390625,
0.003322601318359375,
-0.01129150390625,
-0.02886962890625,
-0.0251922607421875,
0.0340576171875,
-0.0241241455078125,
-0.026336669921875,
0.01212310791015625,
0.0220489501953125,
0.01078033447265625,
-0.04534912109375,
0.0113677978515625,
-0.03338623046875,
-0.02081298828125,
0.003101348876953125,
-0.01922607421875,
-0.01296234130859375,
0.01458740234375,
-0.03515625,
0.0374755859375,
-0.025360107421875,
0.037200927734375,
-0.06982421875,
0.021270751953125,
-0.0184783935546875,
-0.00699615478515625,
-0.01387786865234375,
-0.0374755859375,
-0.0232391357421875,
-0.0780029296875,
-0.020904541015625,
0.0189208984375,
0.035247802734375,
-0.0005092620849609375,
-0.027008056640625,
-0.01078033447265625,
0.038177490234375,
0.0167388916015625,
0.05126953125,
-0.01209259033203125,
-0.01561737060546875,
-0.01477813720703125,
-0.0013418197631835938,
0.0085296630859375,
-0.018646240234375,
-0.047698974609375,
-0.0174102783203125,
-0.005687713623046875,
0.00646209716796875,
0.01141357421875,
0.00749969482421875,
0.02655029296875,
0.0006737709045410156,
-0.053497314453125,
-0.038177490234375,
-0.026458740234375,
-0.0001494884490966797,
-0.00960540771484375,
-0.00928497314453125,
-0.03955078125,
-0.0372314453125,
0.01617431640625,
0.0214080810546875,
-0.0139312744140625,
0.004940032958984375,
0.06640625,
0.015838623046875,
-0.023345947265625,
-0.037353515625,
0.025115966796875,
0.032257080078125,
-0.005954742431640625,
0.079833984375,
0.0096282958984375,
-0.0215606689453125,
0.11614990234375,
-0.013519287109375,
0.0029144287109375,
-0.0108795166015625,
0.048980712890625,
-0.002044677734375,
-0.007755279541015625,
0.0212554931640625,
0.02301025390625,
-0.0136566162109375,
0.00485992431640625,
-0.0007510185241699219,
-0.02960205078125,
0.03472900390625,
0.0297088623046875,
-0.0426025390625,
0.041046142578125,
0.009674072265625,
-0.052093505859375,
0.0292510986328125,
0.01259613037109375,
-0.0008683204650878906,
-0.01023101806640625,
-0.00377655029296875,
0.00231170654296875,
-0.027313232421875,
-0.00940704345703125,
-0.03680419921875,
0.0136260986328125,
-0.03802490234375,
0.045684814453125,
-0.050018310546875,
-0.0312347412109375,
-0.02679443359375,
-0.0149993896484375,
0.03369140625,
-0.0128326416015625,
-0.047576904296875,
0.0265350341796875,
-0.035064697265625,
-0.00675201416015625,
0.0279083251953125,
-0.0216522216796875,
0.007171630859375,
0.0377197265625,
0.0010623931884765625,
0.005855560302734375,
-0.0209808349609375,
0.019622802734375,
-0.0277099609375,
0.014251708984375,
0.0010585784912109375,
0.00257110595703125,
0.0008625984191894531,
0.06475830078125,
-0.0007581710815429688,
0.0411376953125,
-0.0238189697265625,
0.032623291015625,
-0.02642822265625,
0.034912109375,
0.0253753662109375,
-0.0207977294921875,
0.021209716796875,
-0.0179443359375,
-0.0081939697265625,
-0.0246124267578125,
-0.017486572265625,
0.0181121826171875,
0.0309600830078125,
-0.0006918907165527344,
-0.00991058349609375,
0.02362060546875,
-0.002964019775390625,
-0.033172607421875,
-0.0245208740234375,
-0.005786895751953125,
0.0281829833984375,
-0.029754638671875,
0.0021152496337890625,
0.033203125,
0.0567626953125,
-0.007537841796875,
0.0013551712036132812,
0.0028533935546875,
0.0216522216796875,
0.0010843276977539062,
-0.045074462890625,
0.03094482421875,
0.0244903564453125,
-0.0008063316345214844,
-0.050811767578125,
-0.039520263671875,
0.0208740234375,
0.0269775390625,
-0.0164642333984375,
-0.0131683349609375,
0.0220794677734375,
-0.0391845703125,
0.04266357421875,
-0.0250091552734375,
0.0019741058349609375,
-0.031585693359375,
0.012939453125,
0.036651611328125,
0.0411376953125,
-0.035247802734375,
-0.0017375946044921875,
-0.0266265869140625,
-0.0360107421875,
0.029052734375,
0.045196533203125,
-0.041534423828125,
-0.0050201416015625,
0.01849365234375,
0.045562744140625,
-0.01009368896484375,
-0.0382080078125,
-0.0194244384765625,
-0.024139404296875,
0.00957489013671875,
0.045379638671875,
-0.01116943359375,
0.1016845703125,
-0.03619384765625,
0.064453125,
0.01654052734375,
0.0537109375,
-0.01291656494140625,
-0.01171875,
-0.00968170166015625,
-0.11334228515625,
-0.006916046142578125,
0.01328277587890625,
-0.04632568359375,
0.0916748046875,
0.0192718505859375,
0.0211181640625,
0.0198211669921875,
-0.0184173583984375,
0.00786590576171875,
-0.0081024169921875,
0.01447296142578125,
-0.035919189453125,
-0.03485107421875,
0.068115234375,
-0.004180908203125,
-0.024139404296875,
-0.04278564453125,
0.004947662353515625,
-0.014862060546875,
0.0233306884765625,
-0.02978515625,
-0.00930023193359375,
0.0063018798828125,
0.02130126953125,
0.0726318359375,
0.0211334228515625,
0.045501708984375,
0.0278167724609375,
0.0281524658203125,
0.027313232421875,
-0.0178070068359375,
-0.01458740234375,
-0.00826263427734375,
0.0036754608154296875,
-0.005977630615234375,
-0.002292633056640625,
0.032623291015625,
-0.01354217529296875,
0.005840301513671875,
-0.0281829833984375,
0.005859375,
0.004901885986328125,
0.0034503936767578125,
-0.00855255126953125,
-0.0290985107421875,
0.0003523826599121094,
0.011932373046875,
-0.0196685791015625,
-0.0283966064453125,
0.0176544189453125,
-0.0272369384765625,
-0.0214996337890625,
-0.00226593017578125,
0.00939178466796875,
-0.0226287841796875,
-0.0105133056640625,
0.0163116455078125,
0.0164794921875,
0.025848388671875,
0.0026092529296875,
-0.035400390625,
0.01441192626953125,
0.01154327392578125,
0.016082763671875,
-0.007221221923828125,
-0.040679931640625,
-0.06292724609375,
-0.0308380126953125,
0.00004553794860839844,
-0.059112548828125,
-0.0013828277587890625,
-0.022064208984375,
0.044097900390625,
0.04083251953125,
-0.00896453857421875,
-0.008331298828125,
0.016387939453125,
-0.03643798828125,
-0.016204833984375,
-0.03839111328125,
-0.0073394775390625,
0.036529541015625,
0.005596160888671875,
0.0203704833984375,
0.0232086181640625,
-0.042877197265625,
-0.006122589111328125,
-0.031280517578125,
0.0382080078125,
0.0022144317626953125,
-0.021331787109375,
0.0259552001953125,
-0.007724761962890625,
-0.01354217529296875,
0.01184844970703125,
0.019744873046875,
-0.029998779296875,
-0.0217742919921875,
0.01309967041015625,
-0.03424072265625,
-0.0063018798828125,
0.018524169921875,
-0.06597900390625,
0.0894775390625,
0.03509521484375,
-0.001941680908203125,
0.00429534912109375,
0.04034423828125,
-0.07086181640625,
-0.01174163818359375,
-0.0254974365234375,
0.01678466796875,
-0.0004968643188476562,
0.0082550048828125,
-0.033538818359375,
0.0040130615234375,
-0.0154876708984375,
0.030242919921875,
0.08154296875,
0.0217437744140625,
-0.08526611328125,
-0.038818359375,
0.00457000732421875,
-0.0020275115966796875,
-0.0221710205078125,
0.09002685546875,
0.02435302734375,
0.006954193115234375,
0.0239715576171875,
-0.035919189453125,
0.0189056396484375,
-0.05218505859375,
0.03594970703125,
0.03411865234375,
-0.0018491744995117188,
0.00783538818359375,
-0.016357421875,
0.03851318359375,
0.01015472412109375,
-0.025054931640625,
0.0130157470703125,
-0.06292724609375,
-0.00554656982421875,
0.0294952392578125,
0.043853759765625,
-0.055694580078125,
-0.035675048828125,
-0.032501220703125,
0.040374755859375,
0.0253448486328125,
0.054290771484375,
0.051849365234375,
0.0357666015625,
0.01209259033203125,
0.005352020263671875,
0.050445556640625,
0.01151275634765625,
-0.0518798828125,
0.03857421875,
0.004833221435546875,
0.0218658447265625,
-0.030364990234375,
0.02508544921875,
0.0205535888671875,
0.02850341796875,
-0.04083251953125,
-0.05517578125,
-0.0016069412231445312,
-0.0034351348876953125,
0.045806884765625,
0.01258087158203125,
0.03814697265625,
-0.03515625,
-0.0128021240234375,
-0.00839996337890625,
0.03363037109375,
0.02874755859375,
0.01110076904296875,
0.038970947265625,
0.060516357421875,
-0.08111572265625,
0.04864501953125,
-0.0706787109375,
0.041900634765625,
0.01013946533203125,
0.062744140625,
0.0250091552734375,
0.050140380859375,
0.006549835205078125,
-0.015869140625,
-0.0017795562744140625,
0.0207366943359375,
0.01007080078125,
-0.0069427490234375,
-0.0106201171875,
-0.043853759765625,
0.02685546875,
0.025604248046875,
0.0209808349609375,
0.011505126953125,
0.0283050537109375,
-0.0033473968505859375,
-0.034576416015625,
0.00027108192443847656,
0.0005421638488769531,
-0.0280914306640625,
0.0168304443359375,
-0.06732177734375,
-0.007556915283203125,
-0.024658203125,
-0.032806396484375,
0.047027587890625,
-0.053497314453125,
0.0230865478515625,
0.00843048095703125,
0.015716552734375,
0.0091552734375,
-0.0157318115234375,
0.01904296875,
0.01004791259765625,
0.0193939208984375,
0.02496337890625,
-0.068359375,
0.00746917724609375,
-0.060882568359375,
-0.0499267578125,
0.021240234375,
0.021087646484375,
-0.0201263427734375,
0.024566650390625,
0.051910400390625,
-0.043212890625,
0.0257720947265625,
0.004299163818359375,
0.044952392578125,
0.0545654296875,
-0.0009102821350097656,
0.02734375,
-0.057159423828125,
-0.0201416015625,
-0.005146026611328125,
0.0027027130126953125,
0.0032634735107421875,
0.070556640625,
-0.001613616943359375,
-0.0033016204833984375,
-0.07086181640625,
0.0203094482421875,
-0.05755615234375,
-0.054229736328125,
0.01049041748046875,
0.022491455078125,
0.01239013671875,
0.01120758056640625,
-0.0274810791015625,
0.0036525726318359375,
0.0301971435546875,
-0.01171875,
0.035736083984375,
-0.055389404296875,
0.006748199462890625,
-0.03466796875,
0.0216522216796875,
-0.026519775390625,
-0.0240325927734375,
-0.04473876953125,
-0.009918212890625,
0.019744873046875,
0.0276641845703125,
0.006412506103515625,
0.0101165771484375,
0.0282745361328125,
0.02337646484375,
0.0172882080078125,
0.0277557373046875,
0.043243408203125,
0.040313720703125,
-0.06817626953125,
0.056976318359375,
0.040863037109375,
-0.01543426513671875,
0.0224609375,
0.017547607421875,
-0.0357666015625,
0.00885772705078125,
-0.001201629638671875,
-0.056732177734375,
-0.004421234130859375,
0.0077362060546875,
-0.0024433135986328125,
0.00746917724609375,
-0.031829833984375,
-0.01331329345703125,
-0.0172271728515625,
0.0236358642578125,
-0.03228759765625,
-0.0330810546875,
-0.00885009765625,
-0.0113372802734375,
-0.009368896484375,
-0.05657958984375,
-0.053680419921875,
-0.01235198974609375,
0.039886474609375,
0.01763916015625,
-0.050994873046875,
0.031402587890625,
-0.020782470703125,
0.00986480712890625,
0.007053375244140625,
0.018798828125,
-0.01371002197265625,
-0.0208892822265625,
-0.0394287109375,
0.00710296630859375,
-0.037811279296875,
0.0020599365234375,
0.0171051025390625,
-0.00110626220703125,
0.01525115966796875,
-0.0248870849609375,
-0.00482940673828125,
-0.0167236328125,
0.032989501953125,
0.0245819091796875,
0.0064697265625,
0.007434844970703125,
-0.024627685546875,
0.0282135009765625,
-0.032073974609375,
-0.05889892578125,
0.030792236328125,
-0.062744140625,
-0.0498046875,
-0.0128326416015625,
-0.0197906494140625,
-0.012542724609375,
-0.054718017578125,
-0.0736083984375,
0.03021240234375,
-0.00244903564453125,
-0.0338134765625,
-0.08099365234375,
-0.007274627685546875,
0.01349639892578125,
0.0218353271484375,
-0.034393310546875,
-0.01401519775390625,
-0.06341552734375,
0.04461669921875,
-0.0022487640380859375,
0.058197021484375,
0.001209259033203125,
-0.0133209228515625,
-0.00884246826171875,
-0.009124755859375,
-0.024200439453125,
0.0164031982421875,
0.00788116455078125,
0.00732421875,
0.02557373046875,
0.038238525390625,
-0.034271240234375,
0.0292205810546875,
-0.0210418701171875,
-0.0010929107666015625,
-0.0098724365234375,
-0.044677734375,
-0.04254150390625,
-0.027862548828125,
0.0439453125,
0.0452880859375,
0.01438140869140625,
-0.0227813720703125,
-0.0020599365234375,
0.01061248779296875,
-0.00415802001953125,
0.0031948089599609375,
0.0015859603881835938,
-0.00913238525390625,
0.0004127025604248047,
-0.033966064453125,
0.014373779296875,
0.01342010498046875,
-0.06256103515625,
-0.0144805908203125,
-0.02252197265625,
-0.03424072265625,
0.0092315673828125,
-0.01535797119140625,
-0.026885986328125,
-0.0015401840209960938,
0.0021820068359375,
0.0051727294921875,
-0.008453369140625,
0.031951904296875,
-0.0097808837890625,
0.03045654296875,
-0.0024814605712890625,
-0.039031982421875,
0.0465087890625,
0.0298004150390625,
0.0360107421875,
-0.0303497314453125,
0.02508544921875,
-0.0091400146484375,
-0.017486572265625,
0.0094146728515625,
0.0157012939453125,
0.006542205810546875,
0.0026073455810546875,
-0.0546875,
-0.01433563232421875,
0.0408935546875,
-0.0184326171875,
0.0308380126953125,
-0.014129638671875,
0.025115966796875,
-0.0053558349609375,
-0.01105499267578125,
0.035247802734375,
-0.0184478759765625,
-0.0177001953125,
-0.0164031982421875,
-0.040618896484375,
-0.08709716796875,
0.0174102783203125,
0.0034332275390625,
-0.006641387939453125,
0.0269927978515625
] |
bb3a1766dc4f4c51bd8b8548b81fa128a60b09d9 | Wordpress Stackexchange
Q: Custom templates not showing up in template dropdown I've got some problems with templates in Wordpress (multisite). I've created a file in the root of my child-theme folder (template-test.php)
<?php
/**
* Template Name: Test template
*
*/
?>
<?php get_header(); ?>
<?php get_footer(); ?>
This template is not showing up in the templates dropdown when creating a new page, or editing an existing page. The only thing in the dropdown is the 'default template'.
What I've tried so far:
- Disabling and enabling my theme
- Flush permalinks
- Check permissions of my files
- Check if style.css is in the root of the template folder (it is)
I've tried the same file on another Wordpress installation, and there it works fine.
A: Make sure you have index.php in your main theme. Main theme must have index.php. I have same issue, and this was the case.
Checked by:
function testate(){
global $wp_themes;
$tema = wp_get_theme();
echo '<pre>';
print_r($tema);
die;
}
add_action('init', 'testate' );
| Q: Custom templates not showing up in template dropdown I've got some problems with templates in Wordpress (multisite). I've created a file in the root of my child-theme folder (template-test.php)
<?php
/**
* Template Name: Test template
*
*/
?>
<?php get_header(); ?>
<?php get_footer(); ?>
This template is not showing up in the templates dropdown when creating a new page, or editing an existing page. The only thing in the dropdown is the 'default template'.
What I've tried so far:
- Disabling and enabling my theme
- Flush permalinks
- Check permissions of my files
- Check if style.css is in the root of the template folder (it is)
I've tried the same file on another Wordpress installation, and there it works fine.
A: Make sure you have index.php in your main theme. Main theme must have index.php. I have same issue, and this was the case.
Checked by:
function testate(){
global $wp_themes;
$tema = wp_get_theme();
echo '<pre>';
print_r($tema);
die;
}
add_action('init', 'testate' );
A: Just in Wordpress 4.9 there's this bug: https://core.trac.wordpress.org/ticket/42573 causing the template files to only be rescanned once every hour.
To fix (until they release a new WP version with this changed), download the patch on that bug ticket and make the changes from the patch to wp-includes/class-wp-theme.php.
Hope this saves someone the 2 hours I wasted on this..
A: There's a bug in Wordpress 4.9.
I found this temporary plugin super straightforward. I plan on uninstalling it once they fix the bug, but it works great in the meantime!
Plugin: https://github.com/connorlacombe/WP-Clear-File-Cache
A: I also had this problem with a site on WordPress Multisite and was able to fix it by following these steps:
*
*Go to http://example.com/wp-admin/network/themes.php (replace example.com with your URL).
*Click the "Edit" link under the theme that's causing you issues.
*In the right sidebar click the name of the template file that's not showing up. For example, it might say "Events Page Template (template_events.php)".
*Don't make any edits to the file and click the blue "Update File" button.
*Refresh the page's edit screen where you're trying to set the template and it should now display in the dropdown.
If this doesn't do the trick for you I'd suggest checking out http://vanseodesign.com/wordpress/wp-page-templates-dropdown/. There are some other possible solutions in there.
Good luck.
A: Templates can be deactivated by unsetting them from the wp_themes global variable before the template dropdown is loaded.
Run this code on the page to see what templates show up:
global $wp_themes;
$tema = wp_get_themes();
print_r($tema["child-theme folder name"]["Template Files"]);
If your template does not show up, the parent theme might have unset it from the array.
It might show up, if you run this code in front-end, as the parent theme might only unset it during the load of the admin editor page.
Download the parent theme and search the files for $wp_themes and wp_get_themes(); to find the location of that code.
Hopefully they've given you a way to prevent it using a filter, if not you might have to re-add the files in the child theme.
This could be helpful: http://www.wpexplorer.com/wordpress-page-templates-plugin/
A: Have you accidentally moved or removed the style.css file from the theme root?
If so, it could be this - recreate the themes style.css to re-enable the template dropdown.
A: Fix page template not showing in dropdown menu
please activate below plugin to fix (instead of changing wordpress core files)
Below is link for download
https://drive.google.com/file/d/1ycHQGdc_vQtvtfBaznJp1KRsEbcoRwxB/view?usp=sharing
| wordpress | {
"language": "en",
"length": 570,
"provenance": "stackexchange_00019.jsonl.gz:471808",
"question_score": "30",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/251776"
} | [
-0.0026760101318359375,
-0.0157012939453125,
0.0112457275390625,
0.011688232421875,
-0.0216217041015625,
-0.01319122314453125,
0.017791748046875,
-0.04437255859375,
-0.020782470703125,
0.031463623046875,
-0.052642822265625,
0.023223876953125,
-0.0168304443359375,
0.00417327880859375,
-0.0160064697265625,
-0.042205810546875,
0.037200927734375,
-0.0130462646484375,
0.033935546875,
0.0024471282958984375,
0.00881195068359375,
0.028839111328125,
0.004230499267578125,
0.0518798828125,
0.0179443359375,
-0.03387451171875,
0.06396484375,
-0.0123291015625,
0.00827789306640625,
-0.0246734619140625,
0.02288818359375,
0.020355224609375,
0.034820556640625,
-0.008453369140625,
-0.0034923553466796875,
0.003932952880859375,
0.006855010986328125,
-0.0085906982421875,
-0.0054473876953125,
0.024932861328125,
-0.0001304149627685547,
-0.0084381103515625,
0.0267791748046875,
0.0077362060546875,
0.0055389404296875,
-0.03851318359375,
0.01435089111328125,
-0.04693603515625,
-0.01580810546875,
-0.0182037353515625,
0.01096343994140625,
0.014923095703125,
0.03753662109375,
-0.063232421875,
-0.00824737548828125,
-0.02874755859375,
-0.02978515625,
0.0689697265625,
0.0267791748046875,
0.00390625,
-0.038909912109375,
0.01690673828125,
-0.006580352783203125,
-0.032073974609375,
0.0182037353515625,
-0.0010881423950195312,
0.00336456298828125,
0.035308837890625,
-0.01390838623046875,
-0.0084991455078125,
-0.0109710693359375,
-0.01776123046875,
0.042022705078125,
-0.04644775390625,
-0.0174713134765625,
-0.0081787109375,
0.00324249267578125,
-0.0225372314453125,
0.037200927734375,
-0.046966552734375,
0.005794525146484375,
-0.03643798828125,
0.0009198188781738281,
-0.034393310546875,
0.0197906494140625,
0.0014390945434570312,
0.0032863616943359375,
-0.0016384124755859375,
-0.02362060546875,
0.0082550048828125,
-0.017425537109375,
-0.042724609375,
-0.0207672119140625,
0.041839599609375,
0.004924774169921875,
0.00446319580078125,
0.0213165283203125,
0.07513427734375,
-0.005062103271484375,
0.0206298828125,
-0.0355224609375,
-0.011474609375,
0.01373291015625,
-0.045989990234375,
-0.006587982177734375,
0.0200653076171875,
0.006694793701171875,
0.039642333984375,
0.039520263671875,
0.04443359375,
0.00787353515625,
0.017364501953125,
0.0099334716796875,
-0.018310546875,
-0.0445556640625,
-0.0149383544921875,
-0.01092529296875,
-0.0184326171875,
0.0205535888671875,
-0.039306640625,
0.0104522705078125,
0.024749755859375,
0.028106689453125,
-0.040283203125,
-0.01398468017578125,
-0.02685546875,
-0.0196685791015625,
-0.056488037109375,
-0.02386474609375,
0.0171051025390625,
-0.031829833984375,
0.01515960693359375,
0.044189453125,
0.033355712890625,
0.00021791458129882812,
-0.016754150390625,
0.00536346435546875,
0.0240936279296875,
0.0216522216796875,
-0.0092315673828125,
0.016876220703125,
-0.0135345458984375,
0.0027141571044921875,
0.0103607177734375,
-0.027984619140625,
0.041046142578125,
0.035736083984375,
0.0043487548828125,
-0.027801513671875,
-0.0628662109375,
0.0010881423950195312,
-0.02166748046875,
0.06671142578125,
-0.0103912353515625,
-0.01438140869140625,
-0.037109375,
0.0237274169921875,
-0.037689208984375,
-0.03363037109375,
-0.034820556640625,
-0.021881103515625,
-0.00450897216796875,
0.0244903564453125,
-0.041412353515625,
-0.0386962890625,
0.004993438720703125,
-0.016357421875,
-0.00177001953125,
0.0210418701171875,
0.00925445556640625,
-0.00835418701171875,
-0.01407623291015625,
0.035736083984375,
0.0194091796875,
-0.0007753372192382812,
0.031341552734375,
-0.0004897117614746094,
0.036224365234375,
0.006134033203125,
0.0275726318359375,
0.00943756103515625,
-0.034454345703125,
0.0606689453125,
-0.0222625732421875,
-0.0787353515625,
0.017547607421875,
-0.003063201904296875,
0.05413818359375,
0.037078857421875,
0.011383056640625,
0.03839111328125,
0.003627777099609375,
-0.0138092041015625,
0.0298004150390625,
0.027496337890625,
-0.008880615234375,
-0.0794677734375,
-0.0078887939453125,
-0.0176239013671875,
-0.0295257568359375,
-0.031951904296875,
-0.002597808837890625,
0.024871826171875,
0.01531219482421875,
-0.00507354736328125,
0.021881103515625,
-0.017669677734375,
0.02777099609375,
-0.01169586181640625,
0.0123138427734375,
0.02301025390625,
0.00852203369140625,
-0.03179931640625,
-0.036468505859375,
-0.036376953125,
0.01142120361328125,
-0.0163116455078125,
0.017333984375,
0.0076751708984375,
-0.00485992431640625,
0.0267333984375,
-0.025177001953125,
0.01348876953125,
0.01910400390625,
0.0089111328125,
0.0252227783203125,
-0.0555419921875,
0.0185699462890625,
-0.0293731689453125,
0.041351318359375,
-0.07232666015625,
0.038909912109375,
-0.01194000244140625,
0.005641937255859375,
-0.07049560546875,
-0.032867431640625,
-0.047637939453125,
0.0061187744140625,
-0.0010690689086914062,
0.04412841796875,
0.017913818359375,
0.07672119140625,
0.013702392578125,
0.039794921875,
0.09063720703125,
-0.004398345947265625,
0.0115966796875,
0.005603790283203125,
0.0115814208984375,
-0.0081634521484375,
0.053009033203125,
-0.0283355712890625,
0.0149078369140625,
-0.040252685546875,
0.0498046875,
-0.006778717041015625,
-0.022674560546875,
-0.0196380615234375,
0.002025604248046875,
0.01161956787109375,
0.0263214111328125,
0.0259552001953125,
-0.01166534423828125,
0.0212554931640625,
0.044769287109375,
0.0081024169921875,
0.006809234619140625,
-0.007205963134765625,
-0.04486083984375,
0.03375244140625,
0.0252685546875,
-0.0606689453125,
0.01271820068359375,
0.0267181396484375,
0.020111083984375,
0.0141448974609375,
-0.028228759765625,
-0.0236968994140625,
0.04119873046875,
0.01389312744140625,
-0.00200653076171875,
0.057525634765625,
-0.0295562744140625,
-0.0098419189453125,
-0.020050048828125,
-0.07513427734375,
-0.016754150390625,
0.0322265625,
0.045379638671875,
0.01447296142578125,
0.01751708984375,
0.05078125,
-0.02191162109375,
0.066650390625,
0.0179290771484375,
-0.0179595947265625,
0.0648193359375,
-0.0227508544921875,
0.031982421875,
-0.0131072998046875,
0.0295867919921875,
0.0545654296875,
-0.0181427001953125,
0.0223846435546875,
0.003467559814453125,
0.01548004150390625,
0.0188446044921875,
0.012237548828125,
-0.0022373199462890625,
-0.0355224609375,
0.0029315948486328125,
0.00524139404296875,
0.017425537109375,
0.037109375,
-0.0168304443359375,
-0.032562255859375,
-0.0115509033203125,
0.0178375244140625,
-0.0229339599609375,
-0.01824951171875,
0.01233673095703125,
-0.02130126953125,
-0.0145721435546875,
-0.03680419921875,
-0.0123443603515625,
-0.004787445068359375,
-0.06427001953125,
-0.0011072158813476562,
0.00635528564453125,
-0.06878662109375,
-0.05230712890625,
-0.0859375,
-0.06939697265625,
-0.03875732421875,
0.01082611083984375,
-0.00650787353515625,
-0.00482177734375,
0.0938720703125,
0.002956390380859375,
-0.059814453125,
-0.01494598388671875,
-0.0145111083984375,
-0.0066986083984375,
0.016876220703125,
0.0540771484375,
-0.03363037109375,
0.0002841949462890625,
0.0138702392578125,
-0.00012254714965820312,
0.04364013671875,
-0.05340576171875,
-0.00846099853515625,
-0.0169219970703125,
-0.065185546875,
-0.0231475830078125,
0.03472900390625,
0.033447265625,
-0.04302978515625,
0.01251983642578125,
-0.06585693359375,
-0.067138671875,
-0.00939178466796875,
-0.040191650390625,
0.08673095703125,
0.038482666015625,
-0.0045928955078125,
-0.026580810546875,
0.06842041015625,
0.00963592529296875,
-0.00850677490234375,
0.0511474609375,
-0.034423828125,
-0.004360198974609375,
-0.00618743896484375,
-0.007755279541015625,
-0.038482666015625,
0.00829315185546875,
-0.027008056640625,
0.0182037353515625,
0.00614166259765625,
0.0000021457672119140625,
-0.016510009765625,
0.01064300537109375,
-0.0399169921875,
-0.079345703125,
0.047454833984375,
-0.0164337158203125,
-0.0019350051879882812,
-0.044342041015625,
-0.041168212890625,
0.0157318115234375,
0.10784912109375,
-0.0224609375,
-0.02178955078125,
0.00795745849609375,
0.00762939453125,
-0.004730224609375,
0.006870269775390625,
-0.0252838134765625,
-0.010986328125,
-0.070556640625,
0.01511383056640625,
0.0029354095458984375,
-0.037384033203125,
-0.013885498046875,
-0.0023441314697265625,
-0.054229736328125,
-0.0303802490234375,
0.0192108154296875,
0.006626129150390625,
0.02313232421875,
-0.00528717041015625,
0.006900787353515625,
-0.02301025390625,
0.018585205078125,
-0.03741455078125,
-0.056488037109375,
-0.0229949951171875,
-0.0048980712890625,
0.033538818359375,
0.003345489501953125,
-0.001567840576171875,
-0.040313720703125,
0.02777099609375,
0.0221099853515625,
0.036865234375,
0.01204681396484375,
-0.0005698204040527344,
-0.00534820556640625,
-0.01517486572265625,
0.038482666015625,
-0.039703369140625,
-0.0147705078125,
-0.0215301513671875,
-0.032684326171875,
0.01529693603515625,
-0.0070037841796875,
0.0072784423828125,
0.02301025390625,
-0.01580810546875,
-0.01221466064453125,
-0.0214996337890625,
-0.0013055801391601562,
-0.0011358261108398438,
0.007740020751953125,
-0.01385498046875,
-0.007236480712890625,
0.0011529922485351562,
0.00963592529296875,
-0.0236358642578125,
-0.01432037353515625,
0.019927978515625,
0.050933837890625,
0.0323486328125,
-0.029754638671875,
-0.02984619140625,
0.004322052001953125,
0.032440185546875,
0.032073974609375,
0.02728271484375,
-0.00035881996154785156,
-0.01546478271484375,
0.051727294921875,
0.0072021484375,
0.007366180419921875,
-0.00936126708984375,
0.076904296875,
-0.0056304931640625,
-0.042755126953125,
0.044464111328125,
-0.0002684593200683594,
-0.038665771484375,
0.0188446044921875,
0.0020198822021484375,
-0.036590576171875,
0.0217742919921875,
0.047607421875,
-0.006084442138671875,
-0.00235748291015625,
-0.051116943359375,
-0.027374267578125,
0.005035400390625,
-0.05279541015625,
0.058380126953125,
0.0257720947265625,
-0.0014591217041015625,
0.0238037109375,
0.00908660888671875,
0.018463134765625,
0.0177459716796875,
0.01280975341796875,
-0.0146942138671875,
0.032135009765625,
0.01654052734375,
0.0006284713745117188,
0.0115509033203125,
-0.01959228515625,
0.0892333984375,
0.006893157958984375,
-0.0275115966796875,
-0.0058441162109375,
-0.0205535888671875,
0.0175323486328125,
0.0023746490478515625,
0.00554656982421875,
0.007801055908203125,
0.015655517578125,
0.00334930419921875,
0.01250457763671875,
-0.002529144287109375,
0.007022857666015625,
-0.01849365234375,
-0.0085601806640625,
0.0087432861328125,
-0.0221099853515625,
0.01181793212890625,
0.019073486328125,
-0.002681732177734375,
-0.006999969482421875,
-0.005535125732421875,
-0.037933349609375,
-0.0243377685546875,
0.03497314453125,
0.036376953125,
-0.041717529296875,
0.016876220703125,
0.0018148422241210938,
0.042877197265625,
-0.048736572265625,
-0.05010986328125,
0.0072784423828125,
0.06536865234375,
-0.0234222412109375,
-0.007442474365234375,
0.033782958984375,
0.00725555419921875,
-0.00807952880859375,
0.02227783203125,
-0.0119171142578125,
-0.041168212890625,
-0.01282501220703125,
0.052734375,
0.0294647216796875,
-0.0130615234375,
-0.0284271240234375,
0.00682830810546875,
-0.0709228515625,
-0.01678466796875,
0.03082275390625,
-0.0290374755859375,
-0.0104827880859375,
-0.0253753662109375,
-0.017486572265625,
0.01024627685546875,
0.01139068603515625,
-0.09320068359375,
-0.05767822265625,
-0.01255035400390625,
-0.01151275634765625,
0.037353515625,
-0.055328369140625,
-0.0040740966796875,
-0.00815582275390625,
0.0218658447265625,
-0.041168212890625,
0.03057861328125,
0.0294189453125,
0.037017822265625,
-0.0396728515625,
0.02264404296875,
-0.035369873046875,
-0.0271453857421875,
-0.04046630859375,
-0.050140380859375,
-0.059173583984375,
-0.01451873779296875,
0.0007085800170898438,
0.00930023193359375,
0.0103912353515625,
-0.006412506103515625,
-0.039215087890625,
0.0299072265625,
0.0323486328125,
0.055450439453125,
-0.01357269287109375,
0.0738525390625,
-0.007152557373046875,
0.0531005859375,
0.0173187255859375,
0.028961181640625,
-0.0103759765625,
-0.01546478271484375,
0.00574493408203125,
-0.0105438232421875,
-0.011260986328125,
-0.01526641845703125,
-0.03448486328125,
0.02630615234375,
0.1092529296875,
0.006969451904296875,
0.01155853271484375,
-0.016845703125,
0.01218414306640625,
-0.0112152099609375,
0.04339599609375,
-0.00792694091796875,
-0.037139892578125,
0.0304412841796875,
-0.035186767578125,
-0.002643585205078125,
0.025665283203125,
-0.0234832763671875,
0.034637451171875,
-0.00931549072265625,
-0.0024509429931640625,
0.0095672607421875,
-0.047088623046875,
0.06597900390625,
0.05029296875,
0.0151214599609375,
0.034881591796875,
-0.00634765625,
0.01166534423828125,
-0.0278778076171875,
0.027099609375,
-0.0217437744140625,
-0.0633544921875,
0.022918701171875,
0.0015153884887695312,
-0.026397705078125,
0.018341064453125,
-0.0181121826171875,
-0.019195556640625,
0.06158447265625,
0.0433349609375,
-0.06591796875,
-0.01303863525390625,
-0.0011682510375976562,
0.0040435791015625,
0.0010404586791992188,
-0.025543212890625,
-0.023773193359375,
-0.020263671875,
0.022552490234375,
0.0250244140625,
-0.0246124267578125,
0.0177764892578125,
0.042724609375,
-0.0116119384765625,
0.0004069805145263672,
0.0487060546875,
0.0199127197265625,
-0.020263671875,
0.01468658447265625,
0.00019860267639160156,
0.033477783203125,
0.0013866424560546875,
0.0389404296875,
-0.05206298828125,
0.0074462890625,
0.01183319091796875,
0.005596160888671875,
-0.021392822265625,
-0.0036945343017578125,
0.0217132568359375,
-0.003948211669921875,
0.0178985595703125,
0.037200927734375,
-0.023193359375,
0.0304718017578125,
0.00191497802734375,
0.0203704833984375,
0.0192718505859375,
-0.005443572998046875,
0.016265869140625,
-0.00363922119140625,
-0.035491943359375,
0.01148223876953125,
-0.0225830078125,
-0.002597808837890625,
0.0053253173828125,
0.036834716796875,
0.068603515625,
-0.0413818359375,
-0.0218353271484375,
0.036773681640625,
-0.01751708984375,
-0.02154541015625,
-0.00484466552734375,
0.009979248046875,
-0.055023193359375,
-0.0161590576171875,
0.0105133056640625,
-0.0131378173828125,
-0.01393890380859375,
0.0235748291015625,
-0.05999755859375,
0.0859375,
-0.01520538330078125,
0.035919189453125,
0.0266265869140625,
0.04071044921875,
-0.03851318359375,
0.00650787353515625,
-0.011260986328125,
0.029693603515625,
0.0206756591796875,
0.042510986328125,
-0.033782958984375,
-0.0097808837890625,
0.012908935546875,
0.059173583984375,
0.0186309814453125,
-0.0176239013671875,
0.011016845703125,
0.00278472900390625,
0.0718994140625,
0.0643310546875,
0.01561737060546875,
-0.009765625,
0.002193450927734375,
0.002017974853515625,
-0.0210113525390625,
-0.00377655029296875,
0.010040283203125,
-0.0239105224609375,
-0.039581298828125,
0.0239105224609375,
-0.00492095947265625,
0.005157470703125,
0.0194549560546875,
-0.0273590087890625,
-0.01861572265625,
0.00022077560424804688,
0.01212310791015625,
-0.0166473388671875,
-0.039794921875,
0.039886474609375,
0.0188140869140625,
-0.046966552734375,
-0.0207366943359375,
-0.034454345703125,
0.04339599609375,
0.028594970703125,
-0.0021038055419921875,
-0.03253173828125,
0.0015707015991210938,
-0.0699462890625,
-0.02276611328125,
-0.01190948486328125,
0.036468505859375,
-0.04290771484375,
0.0111846923828125,
0.000012874603271484375,
0.015380859375,
-0.0151519775390625,
0.019134521484375,
0.0209503173828125,
0.00981903076171875,
-0.02606201171875,
-0.0206756591796875,
0.01491546630859375,
0.01788330078125,
-0.022705078125,
0.0057830810546875,
-0.01250457763671875,
0.046844482421875,
0.044158935546875,
-0.0164642333984375,
-0.0225830078125,
-0.0189056396484375,
0.019744873046875,
-0.022125244140625,
-0.0295257568359375,
0.0390625,
-0.022308349609375,
-0.03302001953125,
0.01947021484375,
-0.0024261474609375,
0.046112060546875,
0.0102691650390625,
0.06085205078125,
-0.0301361083984375,
-0.025115966796875,
-0.019744873046875,
0.0027904510498046875,
-0.01187896728515625,
0.013580322265625,
-0.0264892578125,
0.002071380615234375,
-0.0080413818359375,
0.033477783203125,
0.006351470947265625,
0.012939453125,
0.038848876953125,
0.0169677734375,
-0.036224365234375,
-0.018280029296875,
0.00821685791015625,
-0.0316162109375,
-0.015838623046875,
-0.0143890380859375,
-0.001728057861328125,
0.0156097412109375,
-0.01251983642578125,
0.006683349609375,
0.0213470458984375,
0.03924560546875,
-0.057098388671875,
0.04156494140625,
-0.01812744140625,
-0.0176544189453125,
-0.004695892333984375,
-0.021514892578125,
0.0180206298828125,
-0.0299835205078125,
-0.06268310546875,
-0.01261138916015625,
-0.003665924072265625,
-0.05816650390625,
0.0194244384765625,
0.053497314453125,
-0.01467132568359375,
0.00011104345321655273,
0.0247650146484375,
-0.00862884521484375,
-0.0114898681640625,
0.0085906982421875,
0.00959014892578125,
-0.026458740234375,
0.021087646484375,
-0.0008502006530761719,
-0.06390380859375,
-0.04571533203125,
-0.02587890625,
0.053863525390625,
-0.0283050537109375,
0.109619140625,
-0.04571533203125,
0.01465606689453125,
-0.00576019287109375,
0.0236053466796875,
-0.0277862548828125,
-0.024078369140625,
0.0682373046875,
-0.0008149147033691406,
-0.01244354248046875,
-0.020965576171875,
-0.048309326171875,
0.0401611328125,
0.0289764404296875,
-0.005092620849609375,
0.0170440673828125,
0.0193023681640625,
0.0113677978515625,
-0.00852203369140625,
0.02899169921875,
-0.004665374755859375,
-0.045928955078125,
-0.0404052734375,
0.0276336669921875,
0.0250701904296875,
0.047454833984375,
-0.040008544921875,
0.0418701171875,
-0.00397491455078125,
-0.021026611328125,
0.00994873046875,
-0.031280517578125,
-0.0008416175842285156,
0.03436279296875,
0.002056121826171875,
-0.04083251953125,
0.03131103515625,
-0.0033092498779296875,
0.00984954833984375,
0.008697509765625,
0.05224609375,
0.033721923828125,
0.00044608116149902344,
0.052764892578125,
-0.01080322265625,
0.027099609375,
-0.060394287109375,
-0.0027408599853515625,
0.046356201171875,
0.0258941650390625,
0.034393310546875,
-0.0186767578125,
-0.0232086181640625,
-0.0266265869140625,
0.00830078125,
0.034820556640625,
-0.00652313232421875,
0.01035308837890625,
-0.06292724609375,
0.0229034423828125,
0.04901123046875,
0.00836944580078125,
-0.05194091796875,
0.0174713134765625,
-0.041717529296875,
0.0701904296875,
0.0133514404296875,
-0.0174713134765625,
0.03143310546875,
0.05230712890625,
-0.010040283203125,
0.044586181640625,
0.01305389404296875,
-0.043975830078125,
0.045257568359375,
-0.006618499755859375,
0.0163116455078125,
0.00939178466796875,
0.025543212890625,
-0.0050506591796875,
-0.0087738037109375,
0.050933837890625,
-0.0302276611328125,
-0.022369384765625,
0.0285491943359375,
-0.030517578125,
-0.02606201171875,
-0.0154876708984375,
0.010894775390625,
-0.04632568359375,
-0.009918212890625,
-0.0650634765625,
0.02679443359375,
0.03033447265625,
-0.05157470703125,
-0.11669921875,
0.03228759765625,
-0.038360595703125,
-0.042327880859375,
-0.03253173828125,
0.011383056640625,
-0.01334381103515625,
0.0128021240234375,
0.00028204917907714844,
-0.0474853515625,
0.00994873046875,
0.037994384765625,
-0.0030879974365234375,
0.0125579833984375,
0.033172607421875,
0.0027313232421875,
-0.0435791015625,
-0.009765625,
-0.01568603515625,
-0.034576416015625,
0.0210723876953125,
-0.048309326171875,
0.044158935546875,
0.020233154296875,
-0.031585693359375,
-0.0535888671875,
0.0279693603515625,
-0.0200958251953125,
0.02117919921875,
-0.0012712478637695312,
-0.055419921875,
-0.0214996337890625,
0.048126220703125,
0.020416259765625,
0.0192718505859375,
-0.0073699951171875,
-0.01139068603515625,
-0.0170745849609375,
-0.0772705078125,
-0.007396697998046875,
0.04095458984375,
-0.060028076171875,
0.0160980224609375,
-0.0008807182312011719,
-0.0283660888671875,
0.00418853759765625,
-0.01100921630859375,
-0.05426025390625,
0.0119171142578125,
-0.00424957275390625,
0.02593994140625,
-0.079833984375,
-0.0071258544921875,
0.07489013671875,
-0.034271240234375,
-0.00714874267578125,
-0.007568359375,
0.01453399658203125,
0.0299224853515625,
-0.0179595947265625,
0.0088348388671875,
0.0182037353515625,
-0.04925537109375,
0.01436614990234375,
-0.0027484893798828125,
0.03472900390625,
-0.0408935546875,
-0.02484130859375,
-0.0062713623046875,
0.01285552978515625,
-0.030120849609375,
-0.0192413330078125,
0.014892578125,
0.07080078125,
-0.0179595947265625,
0.11346435546875,
-0.00015032291412353516,
0.08123779296875,
-0.0034961700439453125,
0.04034423828125,
0.00060272216796875,
-0.0005350112915039062,
-0.0096282958984375,
-0.006221771240234375,
0.0022068023681640625,
-0.0236663818359375,
-0.017333984375,
-0.038299560546875,
0.0104217529296875,
-0.0015821456909179688,
-0.0193023681640625,
0.022705078125
] |
5756f71517b9d90de154c8b186fb9537e59c8be4 | Wordpress Stackexchange
Q: Prevent Wordpress from generating medium_large 768px size of image uploads? I prevent WordPress from generating thumbnail, medium, and large image sizes for images I upload to the Media Library, by setting their dimensions to 0 from the dashboard: Settings -> Media panel.
I have also gotten rid of all instances of add_image_size and set_post_thumbnail_size from the functions.php file of my theme.
However, when I upload new images, WordPress is still generating a 768px width version (called 'medium_large') from my original full size image. I believe it has something to do with this update.
Is there is any way to prevent this from happening?
A: Remove image size the same way wordpress core code does it:
add_filter('intermediate_image_sizes', function($sizes) {
return array_diff($sizes, ['medium_large']);
});
Keep in mind that medium_large is generally a good size to have in srcset, only remove it if you have understanding how srcset works, if you have similar sizes there already.
| Q: Prevent Wordpress from generating medium_large 768px size of image uploads? I prevent WordPress from generating thumbnail, medium, and large image sizes for images I upload to the Media Library, by setting their dimensions to 0 from the dashboard: Settings -> Media panel.
I have also gotten rid of all instances of add_image_size and set_post_thumbnail_size from the functions.php file of my theme.
However, when I upload new images, WordPress is still generating a 768px width version (called 'medium_large') from my original full size image. I believe it has something to do with this update.
Is there is any way to prevent this from happening?
A: Remove image size the same way wordpress core code does it:
add_filter('intermediate_image_sizes', function($sizes) {
return array_diff($sizes, ['medium_large']);
});
Keep in mind that medium_large is generally a good size to have in srcset, only remove it if you have understanding how srcset works, if you have similar sizes there already.
A: this will work
function paulund_remove_default_image_sizes( $sizes) {
unset( $sizes['medium_large']);
return $sizes;
}
add_filter('intermediate_image_sizes_advanced','paulund_remove_default_image_sizes');
https://developer.wordpress.org/reference/hooks/intermediate_image_sizes_advanced/
A: To remove the medium_large image size you can try to remove it with the intermediate_image_sizes filter:
add_filter( 'intermediate_image_sizes', function( $sizes )
{
return array_filter( $sizes, function( $val )
{
return 'medium_large' !== $val; // Filter out 'medium_large'
} );
} );
Not sure if you're trying to remove all the intermediate sizes, but then you could try out:
add_filter( 'intermediate_image_sizes', '__return_empty_array', 999 );
where __return_empty_array()` is a built-in core function.
We should note that it's not possible to remove it with
remove_image_size( 'medium_large' );
because it's not added with add_image_size() and therefore not part of the $_wp_additional_image_sizes global array or wp_get_additional_image_sizes();
| wordpress | {
"language": "en",
"length": 271,
"provenance": "stackexchange_00019.jsonl.gz:471812",
"question_score": "16",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/251789"
} | [
0.019989013671875,
-0.02288818359375,
0.0022487640380859375,
0.041595458984375,
-0.00858306884765625,
-0.04010009765625,
0.07403564453125,
-0.03472900390625,
-0.01065826416015625,
0.0308074951171875,
0.00263214111328125,
-0.0023212432861328125,
0.0081787109375,
-0.02508544921875,
-0.003108978271484375,
-0.020965576171875,
0.035552978515625,
0.00417327880859375,
0.046600341796875,
0.0013780593872070312,
0.008636474609375,
0.033538818359375,
0.016754150390625,
0.06756591796875,
-0.027191162109375,
0.0188446044921875,
0.055755615234375,
-0.0220184326171875,
-0.0306243896484375,
-0.0408935546875,
-0.0036945343017578125,
0.041748046875,
0.0267486572265625,
0.0137939453125,
-0.022979736328125,
0.0188446044921875,
0.0020656585693359375,
0.0040435791015625,
0.0059814453125,
0.00048089027404785156,
0.01354217529296875,
-0.0036487579345703125,
0.053619384765625,
-0.0625,
0.00931549072265625,
0.0182952880859375,
0.0011396408081054688,
-0.04547119140625,
-0.026153564453125,
0.003307342529296875,
0.0160675048828125,
0.01119232177734375,
0.034912109375,
0.0172882080078125,
-0.01314544677734375,
-0.0187835693359375,
-0.0391845703125,
0.03167724609375,
0.0174560546875,
0.005916595458984375,
-0.0034351348876953125,
0.00827789306640625,
0.0027217864990234375,
-0.000028192996978759766,
-0.0178070068359375,
0.01934814453125,
-0.03851318359375,
-0.00704193115234375,
-0.051116943359375,
-0.0301055908203125,
0.0235443115234375,
-0.0645751953125,
0.0106201171875,
-0.044891357421875,
-0.00788116455078125,
0.027679443359375,
0.0302734375,
-0.00994110107421875,
-0.01125335693359375,
-0.0282745361328125,
0.049530029296875,
-0.01428985595703125,
-0.0121917724609375,
0.0183258056640625,
0.0293731689453125,
0.045989990234375,
0.00870513916015625,
-0.034210205078125,
-0.0002391338348388672,
0.00507354736328125,
-0.019012451171875,
-0.041595458984375,
-0.004154205322265625,
0.051605224609375,
0.00585174560546875,
-0.0172271728515625,
0.028106689453125,
0.007251739501953125,
0.001964569091796875,
-0.008453369140625,
0.0340576171875,
-0.060699462890625,
0.047149658203125,
-0.036346435546875,
0.01560211181640625,
0.015350341796875,
-0.033660888671875,
0.008880615234375,
0.05084228515625,
0.04852294921875,
0.003688812255859375,
-0.00403594970703125,
-0.039093017578125,
-0.0136871337890625,
-0.00913238525390625,
0.0283660888671875,
-0.03729248046875,
0.00620269775390625,
-0.00403594970703125,
0.0223236083984375,
-0.0139923095703125,
0.006465911865234375,
0.0269622802734375,
-0.037689208984375,
0.0596923828125,
0.03582763671875,
-0.0301666259765625,
-0.0271453857421875,
-0.03857421875,
0.0477294921875,
-0.0264892578125,
0.0013446807861328125,
0.062103271484375,
0.0205535888671875,
0.003238677978515625,
-0.0257415771484375,
0.0175323486328125,
-0.065673828125,
-0.0377197265625,
0.0654296875,
-0.06298828125,
-0.043670654296875,
0.01428985595703125,
-0.0531005859375,
-0.00492095947265625,
0.0199127197265625,
-0.0023746490478515625,
0.019012451171875,
-0.007404327392578125,
-0.0557861328125,
0.032989501953125,
-0.048370361328125,
0.0693359375,
0.00536346435546875,
-0.0244598388671875,
-0.046051025390625,
0.07708740234375,
-0.047821044921875,
-0.041015625,
-0.07708740234375,
-0.006038665771484375,
-0.0009737014770507812,
0.016448974609375,
-0.0166015625,
-0.0290069580078125,
-0.0039005279541015625,
-0.031524658203125,
0.00036525726318359375,
0.029449462890625,
0.0297698974609375,
0.0132293701171875,
-0.01180267333984375,
0.01092529296875,
0.00843048095703125,
-0.00940704345703125,
-0.0005383491516113281,
0.0457763671875,
-0.00519561767578125,
0.00011080503463745117,
0.06597900390625,
0.021331787109375,
0.00033783912658691406,
0.0667724609375,
-0.0303802490234375,
-0.0164031982421875,
-0.01026153564453125,
-0.00485992431640625,
-0.004482269287109375,
0.038726806640625,
0.00551605224609375,
0.0198211669921875,
-0.00708770751953125,
-0.036651611328125,
0.0094146728515625,
0.0011453628540039062,
0.006015777587890625,
-0.0244598388671875,
0.00408935546875,
-0.0113983154296875,
-0.0061492919921875,
0.08258056640625,
0.017547607421875,
-0.0080718994140625,
-0.034332275390625,
-0.0689697265625,
0.004436492919921875,
-0.0210113525390625,
0.0257720947265625,
-0.028564453125,
0.0200042724609375,
0.0188140869140625,
-0.0135345458984375,
-0.033782958984375,
0.05682373046875,
0.0161285400390625,
-0.003101348876953125,
-0.029510498046875,
0.032196044921875,
-0.00887298583984375,
0.029388427734375,
-0.048675537109375,
-0.01409149169921875,
-0.018829345703125,
-0.025299072265625,
0.0214996337890625,
0.019561767578125,
-0.01324462890625,
0.007038116455078125,
0.0175018310546875,
0.01351165771484375,
-0.005035400390625,
0.03668212890625,
0.006275177001953125,
0.0193939208984375,
-0.0247344970703125,
-0.0401611328125,
-0.034637451171875,
-0.08935546875,
0.02313232421875,
0.07244873046875,
0.041595458984375,
0.0272369384765625,
0.037933349609375,
0.05181884765625,
0.046661376953125,
-0.010650634765625,
0.041046142578125,
-0.020355224609375,
0.012115478515625,
0.006256103515625,
-0.005069732666015625,
-0.049713134765625,
0.01453399658203125,
-0.08905029296875,
0.01678466796875,
0.0226287841796875,
-0.03302001953125,
-0.06915283203125,
-0.0010519027709960938,
0.062042236328125,
0.00249481201171875,
0.022796630859375,
0.016357421875,
-0.0054473876953125,
-0.02740478515625,
0.005779266357421875,
-0.02752685546875,
-0.016448974609375,
-0.0252227783203125,
0.0333251953125,
0.039947509765625,
-0.051544189453125,
-0.0023899078369140625,
-0.017852783203125,
0.0244903564453125,
0.01248931884765625,
-0.06231689453125,
0.0203399658203125,
0.04217529296875,
0.0048828125,
-0.020782470703125,
-0.0126953125,
-0.068115234375,
-0.0097198486328125,
-0.0007214546203613281,
-0.051483154296875,
0.002094268798828125,
0.01230621337890625,
-0.0231475830078125,
-0.042236328125,
-0.0176239013671875,
0.03900146484375,
-0.00917816162109375,
0.051727294921875,
-0.003414154052734375,
-0.019866943359375,
-0.0043487548828125,
-0.031463623046875,
0.057830810546875,
-0.0667724609375,
0.09197998046875,
0.060394287109375,
-0.08172607421875,
0.0638427734375,
-0.01340484619140625,
0.0240325927734375,
-0.005832672119140625,
0.003879547119140625,
-0.0226593017578125,
-0.0010347366333007812,
-0.0743408203125,
-0.04766845703125,
-0.005157470703125,
-0.017669677734375,
0.003871917724609375,
-0.02154541015625,
0.016326904296875,
-0.0113067626953125,
0.01468658447265625,
0.0264892578125,
-0.01248931884765625,
-0.06170654296875,
-0.0379638671875,
-0.017547607421875,
-0.038665771484375,
0.0145263671875,
-0.0028133392333984375,
-0.009002685546875,
0.0105133056640625,
-0.00444793701171875,
-0.0159759521484375,
0.0033016204833984375,
-0.0234832763671875,
0.0153045654296875,
-0.0030918121337890625,
-0.0019683837890625,
-0.00115966796875,
0.044830322265625,
0.0007081031799316406,
-0.049224853515625,
0.005031585693359375,
0.004688262939453125,
-0.020050048828125,
-0.0030612945556640625,
-0.032257080078125,
0.006378173828125,
-0.017333984375,
0.0038204193115234375,
0.04364013671875,
0.0115966796875,
-0.013641357421875,
0.006114959716796875,
-0.045166015625,
-0.07073974609375,
-0.04034423828125,
0.0865478515625,
0.058074951171875,
-0.064453125,
0.0278778076171875,
-0.0648193359375,
-0.02410888671875,
-0.028045654296875,
-0.061248779296875,
0.046051025390625,
0.041168212890625,
-0.0082244873046875,
-0.0033435821533203125,
0.0270233154296875,
0.026092529296875,
0.0196380615234375,
0.0203704833984375,
-0.0272064208984375,
0.06787109375,
-0.00746917724609375,
0.016326904296875,
-0.041717529296875,
0.024749755859375,
-0.0167236328125,
0.033782958984375,
0.005344390869140625,
-0.0040740966796875,
-0.034881591796875,
0.0014009475708007812,
-0.05975341796875,
-0.01288604736328125,
0.0299835205078125,
-0.0185089111328125,
0.035858154296875,
-0.0221405029296875,
-0.0145263671875,
-0.00737762451171875,
0.0618896484375,
-0.0751953125,
-0.0092010498046875,
-0.01390838623046875,
0.017181396484375,
-0.0253753662109375,
-0.060302734375,
-0.048309326171875,
-0.002166748046875,
-0.056304931640625,
0.0033817291259765625,
0.0269927978515625,
-0.049560546875,
-0.00762939453125,
-0.00824737548828125,
-0.0450439453125,
-0.0162811279296875,
0.020477294921875,
0.0278778076171875,
-0.0027027130126953125,
0.00994873046875,
-0.00447845458984375,
-0.005390167236328125,
0.00007301568984985352,
0.0040435791015625,
-0.11651611328125,
-0.016448974609375,
-0.0274658203125,
0.07965087890625,
-0.0219268798828125,
0.05804443359375,
-0.04248046875,
0.0509033203125,
-0.014129638671875,
-0.007259368896484375,
-0.00728607177734375,
0.0115966796875,
0.046112060546875,
0.0268402099609375,
-0.0127716064453125,
-0.0019025802612304688,
-0.0198211669921875,
-0.047637939453125,
-0.0343017578125,
-0.0283355712890625,
-0.01522064208984375,
-0.01113128662109375,
-0.0014314651489257812,
0.00455474853515625,
-0.04974365234375,
-0.058502197265625,
-0.0162353515625,
0.01520538330078125,
0.021820068359375,
0.00006663799285888672,
-0.08331298828125,
-0.054901123046875,
0.033599853515625,
0.04144287109375,
-0.0023899078369140625,
0.0053863525390625,
0.070556640625,
0.0161285400390625,
-0.022216796875,
-0.07574462890625,
-0.024810791015625,
0.0189666748046875,
0.0205841064453125,
-0.00228118896484375,
-0.006923675537109375,
-0.0120697021484375,
0.01204681396484375,
0.012359619140625,
-0.01216888427734375,
-0.0249176025390625,
0.08056640625,
-0.003631591796875,
-0.0242767333984375,
0.0175628662109375,
-0.0235443115234375,
0.007068634033203125,
-0.0022983551025390625,
0.018951416015625,
-0.00791168212890625,
-0.0079193115234375,
0.02374267578125,
0.0352783203125,
-0.031707763671875,
-0.03472900390625,
-0.045928955078125,
0.01800537109375,
-0.0236663818359375,
0.0203857421875,
-0.0089111328125,
0.003231048583984375,
0.0052947998046875,
0.0184478759765625,
-0.0199737548828125,
-0.0201873779296875,
-0.01293182373046875,
0.009307861328125,
0.04132080078125,
-0.035491943359375,
-0.00933074951171875,
-0.01120758056640625,
0.007495880126953125,
-0.036224365234375,
0.023284912109375,
-0.031585693359375,
-0.004894256591796875,
0.0073699951171875,
0.0172119140625,
-0.01316070556640625,
-0.005126953125,
0.048431396484375,
0.02581787109375,
0.0111541748046875,
-0.027374267578125,
-0.033203125,
0.0060272216796875,
-0.045562744140625,
0.00702667236328125,
0.0235137939453125,
-0.02734375,
0.044189453125,
-0.021270751953125,
0.00688934326171875,
-0.00514984130859375,
0.00626373291015625,
0.0218505859375,
0.0136566162109375,
0.033111572265625,
0.02154541015625,
0.01323699951171875,
-0.01241302490234375,
0.0100555419921875,
0.025726318359375,
-0.05078125,
-0.00007349252700805664,
0.052276611328125,
0.040679931640625,
0.00958251953125,
-0.03289794921875,
0.00641632080078125,
0.02301025390625,
0.0005278587341308594,
0.0159454345703125,
-0.04241943359375,
-0.0657958984375,
-0.026031494140625,
0.00885772705078125,
0.058319091796875,
-0.0443115234375,
-0.035125732421875,
0.04071044921875,
-0.0010461807250976562,
0.018768310546875,
0.025390625,
-0.06280517578125,
0.036468505859375,
0.059356689453125,
-0.07122802734375,
-0.0372314453125,
0.002559661865234375,
-0.0030574798583984375,
0.0018930435180664062,
0.0052032470703125,
-0.021392822265625,
-0.01013946533203125,
-0.037750244140625,
0.0010576248168945312,
0.0020771026611328125,
-0.00376129150390625,
-0.038238525390625,
0.027191162109375,
0.0286865234375,
0.01027679443359375,
-0.01097869873046875,
-0.04498291015625,
-0.01885986328125,
-0.029815673828125,
0.035247802734375,
0.0098724365234375,
-0.002765655517578125,
0.000324249267578125,
-0.0278167724609375,
0.022003173828125,
-0.046112060546875,
-0.021392822265625,
-0.01093292236328125,
-0.0030002593994140625,
-0.0093841552734375,
0.012115478515625,
-0.012908935546875,
-0.00027441978454589844,
0.040130615234375,
0.01047515869140625,
0.00008887052536010742,
-0.011566162109375,
-0.01433563232421875,
-0.01544189453125,
-0.016265869140625,
-0.0173492431640625,
-0.00736236572265625,
0.034820556640625,
-0.03131103515625,
-0.00496673583984375,
0.0298309326171875,
0.008758544921875,
0.0177154541015625,
-0.014862060546875,
-0.0015459060668945312,
-0.03936767578125,
0.049285888671875,
-0.05194091796875,
0.02178955078125,
-0.01459503173828125,
-0.0297393798828125,
0.033966064453125,
0.0014982223510742188,
0.0007338523864746094,
0.042938232421875,
-0.0352783203125,
0.034759521484375,
0.02838134765625,
0.0033416748046875,
0.041473388671875,
0.0848388671875,
-0.01047515869140625,
0.041656494140625,
0.04925537109375,
0.00846099853515625,
0.03936767578125,
0.0114593505859375,
-0.003662109375,
-0.0308685302734375,
0.04248046875,
0.0093536376953125,
-0.0011577606201171875,
0.0268707275390625,
-0.018310546875,
0.04150390625,
0.0182647705078125,
0.08758544921875,
-0.020416259765625,
0.014556884765625,
0.039215087890625,
-0.02252197265625,
0.052337646484375,
-0.03094482421875,
0.0012693405151367188,
0.00579833984375,
0.032806396484375,
-0.0239715576171875,
-0.04168701171875,
0.0010232925415039062,
-0.01549530029296875,
-0.013763427734375,
-0.009674072265625,
0.020477294921875,
0.014312744140625,
-0.056396484375,
-0.0120086669921875,
0.04547119140625,
-0.0180816650390625,
-0.0247039794921875,
0.0129852294921875,
-0.01555633544921875,
-0.00649261474609375,
-0.06805419921875,
-0.033905029296875,
-0.008270263671875,
-0.017974853515625,
0.01081085205078125,
0.018280029296875,
-0.0159759521484375,
0.049835205078125,
-0.0250244140625,
0.0295257568359375,
0.0204620361328125,
-0.06036376953125,
0.0274810791015625,
-0.02789306640625,
0.0254669189453125,
-0.011016845703125,
-0.061248779296875,
-0.0005559921264648438,
-0.039459228515625,
-0.01837158203125,
0.00745391845703125,
-0.006053924560546875,
0.047607421875,
-0.049896240234375,
-0.0004000663757324219,
0.0232086181640625,
0.01263427734375,
0.005390167236328125,
-0.0246124267578125,
0.0209197998046875,
-0.0689697265625,
-0.005901336669921875,
-0.0036983489990234375,
0.005401611328125,
-0.00504302978515625,
-0.004032135009765625,
-0.0313720703125,
0.01096343994140625,
-0.0220184326171875,
-0.0082550048828125,
0.021820068359375,
-0.0007104873657226562,
0.0033168792724609375,
-0.004512786865234375,
-0.012542724609375,
0.01605224609375,
-0.044891357421875,
-0.026153564453125,
-0.0404052734375,
0.0270843505859375,
-0.0440673828125,
-0.0029811859130859375,
0.039459228515625,
0.008056640625,
-0.03680419921875,
-0.0231781005859375,
0.0753173828125,
0.058502197265625,
0.03204345703125,
0.0297393798828125,
-0.03814697265625,
-0.035675048828125,
-0.007335662841796875,
-0.005092620849609375,
0.0225982666015625,
0.01373291015625,
-0.048614501953125,
0.0120391845703125,
0.0037078857421875,
0.0003485679626464844,
-0.005657196044921875,
0.04705810546875,
-0.005878448486328125,
0.00389862060546875,
0.014434814453125,
0.00252532958984375,
0.03192138671875,
0.04443359375,
0.059356689453125,
-0.01097869873046875,
-0.0100860595703125,
-0.017974853515625,
0.060546875,
-0.009735107421875,
0.007099151611328125,
0.03778076171875,
0.0207061767578125,
0.0540771484375,
0.01171112060546875,
0.0006265640258789062,
0.0262298583984375,
0.0171661376953125,
-0.021575927734375,
0.003597259521484375,
0.0102386474609375,
-0.03302001953125,
0.00206756591796875,
0.05364990234375,
0.004749298095703125,
-0.0175323486328125,
-0.035919189453125,
-0.002262115478515625,
-0.00800323486328125,
-0.0048828125,
-0.0303802490234375,
-0.0277252197265625,
-0.0528564453125,
-0.0010709762573242188,
-0.0240020751953125,
-0.0017404556274414062,
0.026092529296875,
0.042877197265625,
-0.01317596435546875,
-0.01202392578125,
-0.0301666259765625,
0.00231170654296875,
-0.032684326171875,
0.0063934326171875,
0.01042938232421875,
0.05657958984375,
0.011016845703125,
0.04425048828125,
-0.005573272705078125,
-0.007160186767578125,
-0.039031982421875,
0.037384033203125,
0.0022430419921875,
0.039794921875,
-0.0499267578125,
0.0008215904235839844,
0.02520751953125,
0.036468505859375,
-0.013641357421875,
0.04852294921875,
0.061920166015625,
0.059722900390625,
-0.047149658203125,
-0.0206451416015625,
0.0526123046875,
-0.0185089111328125,
-0.01444244384765625,
-0.047149658203125,
-0.0031757354736328125,
0.01479339599609375,
-0.0199737548828125,
0.0155792236328125,
-0.037261962890625,
0.05364990234375,
-0.00539398193359375,
-0.0013637542724609375,
0.0012683868408203125,
-0.02410888671875,
0.0053558349609375,
-0.005828857421875,
0.0269927978515625,
0.0023059844970703125,
-0.01788330078125,
-0.004642486572265625,
-0.00933074951171875,
-0.030487060546875,
0.0270233154296875,
0.0228729248046875,
-0.05072021484375,
0.04998779296875,
-0.0113525390625,
-0.0129241943359375,
-0.00372314453125,
-0.0164794921875,
0.0284271240234375,
-0.0413818359375,
-0.01195526123046875,
-0.005950927734375,
-0.05859375,
-0.024749755859375,
-0.0285186767578125,
0.01129913330078125,
0.0165863037109375,
0.0999755859375,
-0.014373779296875,
0.02117919921875,
0.0027103424072265625,
-0.024688720703125,
0.01322174072265625,
-0.01525115966796875,
0.0220489501953125,
0.002532958984375,
-0.01702880859375,
-0.01995849609375,
0.002437591552734375,
-0.0106964111328125,
0.017669677734375,
-0.037872314453125,
-0.026763916015625,
-0.0411376953125,
0.027679443359375,
0.04248046875,
0.03143310546875,
-0.024322509765625,
-0.01329803466796875,
-0.0312347412109375,
0.003269195556640625,
0.0156402587890625,
-0.0232086181640625,
-0.029296875,
0.00788116455078125,
0.004184722900390625,
-0.036590576171875,
0.05853271484375,
-0.037506103515625,
0.0716552734375,
0.0382080078125,
-0.031158447265625,
-0.046661376953125,
-0.0275421142578125,
-0.019989013671875,
-0.052337646484375,
0.030731201171875,
0.0152740478515625,
-0.03875732421875,
-0.0230255126953125,
0.036468505859375,
0.0211181640625,
0.0291748046875,
-0.022308349609375,
-0.01235198974609375,
0.043121337890625,
-0.007049560546875,
-0.03985595703125,
0.0031757354736328125,
-0.01499176025390625,
0.0194549560546875,
-0.01332855224609375,
0.02081298828125,
0.024688720703125,
-0.005222320556640625,
-0.0190582275390625,
0.0160675048828125,
0.033294677734375,
0.00982666015625,
-0.06158447265625,
0.035552978515625,
-0.0404052734375,
0.03997802734375,
-0.0003056526184082031,
-0.00235748291015625,
-0.01983642578125,
-0.003757476806640625,
-0.0294342041015625,
-0.08001708984375,
-0.034881591796875,
0.07183837890625,
-0.039520263671875,
0.029571533203125,
0.042236328125,
-0.026580810546875,
0.00363922119140625,
0.040557861328125,
0.03363037109375,
0.09832763671875,
-0.040496826171875,
-0.035858154296875,
0.0236663818359375,
-0.009735107421875,
0.0247650146484375,
-0.034820556640625,
-0.024658203125,
-0.047454833984375,
0.01416015625,
-0.019287109375,
-0.005306243896484375,
0.005279541015625,
-0.0309600830078125,
-0.051055908203125,
0.01514434814453125,
-0.0142974853515625,
-0.0372314453125,
0.0005526542663574219,
0.003345489501953125,
-0.024078369140625,
0.013214111328125,
0.01546478271484375,
-0.00988006591796875,
0.01113128662109375,
0.0279693603515625,
0.0220184326171875,
-0.03704833984375,
0.02874755859375,
0.0034503936767578125,
-0.0150299072265625,
0.037078857421875,
0.0506591796875,
-0.01287078857421875,
-0.0284576416015625,
0.02001953125,
0.01165008544921875,
0.03900146484375,
-0.0057373046875,
0.042816162109375,
0.016357421875,
-0.023193359375,
-0.0238037109375,
-0.0256195068359375,
-0.00763702392578125,
-0.0167694091796875,
0.047882080078125,
0.06915283203125,
0.00878143310546875,
-0.028289794921875,
0.004730224609375,
0.02227783203125,
0.004756927490234375,
0.004314422607421875,
0.0032062530517578125,
-0.04876708984375,
-0.037261962890625,
0.0004074573516845703,
-0.0189361572265625,
-0.00684356689453125,
-0.00948333740234375,
-0.03643798828125,
-0.0027561187744140625,
-0.01129913330078125,
0.00726318359375,
-0.038360595703125,
0.0101470947265625,
0.016143798828125,
-0.0183258056640625,
0.0014619827270507812,
-0.034271240234375,
0.0176849365234375,
-0.012908935546875,
-0.047943115234375,
-0.047698974609375,
0.0254364013671875,
0.0092620849609375,
0.032257080078125,
0.005855560302734375,
-0.0250701904296875,
-0.00710296630859375,
0.048583984375,
-0.01035308837890625,
-0.00853729248046875,
0.0026378631591796875,
0.01059722900390625,
0.0224151611328125,
-0.0204315185546875,
-0.0035858154296875,
-0.0208587646484375,
-0.01271820068359375,
-0.03558349609375,
-0.0098876953125,
-0.00421142578125,
0.006072998046875,
-0.01198577880859375,
0.066162109375,
-0.03228759765625,
0.00699615478515625,
-0.007659912109375,
-0.048736572265625,
-0.0021877288818359375,
-0.018768310546875,
-0.01861572265625,
-0.042938232421875,
-0.003414154052734375
] |
3d03a5d837ac8f22b4587cde714bca570a0626c7 | Wordpress Stackexchange
Q: When importing - failed to import: Invalid post type, feedback I am attempting to import a site using XML generated by WordPress.com
All the posts and media seem to import, but the comments fail with errors
Failed to import “Sarah Toon - 2015-10-10 08:29:30”: Invalid post type feedback
Failed to import “Kylie - 2015-10-10 08:34:50”: Invalid post type feedback
Failed to import “Sophie Ward - 2015-10-10 08:36:22”: Invalid post type feedback
Reading other posts, here on WordPress.SE none of them have an accepted answer. The closest I could find is Custom post types not imported properly but that is about posts, not comments.
Can someone get me started on solving this please?
A: The issue is you're trying to import posts with a post type of feedback, but there is no such post type registered on your install of WordPress.
Quick-and-easy fix is to register one:
add_action( 'init', function () {
register_post_type( 'feedback', [
'public' => true,
'labels' => [
'singular_name' => 'Feedback',
'name' => 'Feedback',
]
]);
});
Place it in your theme's functions.php, or in a MU plugin (eg. wp-content/mu-plugins/feedback.php).
| Q: When importing - failed to import: Invalid post type, feedback I am attempting to import a site using XML generated by WordPress.com
All the posts and media seem to import, but the comments fail with errors
Failed to import “Sarah Toon - 2015-10-10 08:29:30”: Invalid post type feedback
Failed to import “Kylie - 2015-10-10 08:34:50”: Invalid post type feedback
Failed to import “Sophie Ward - 2015-10-10 08:36:22”: Invalid post type feedback
Reading other posts, here on WordPress.SE none of them have an accepted answer. The closest I could find is Custom post types not imported properly but that is about posts, not comments.
Can someone get me started on solving this please?
A: The issue is you're trying to import posts with a post type of feedback, but there is no such post type registered on your install of WordPress.
Quick-and-easy fix is to register one:
add_action( 'init', function () {
register_post_type( 'feedback', [
'public' => true,
'labels' => [
'singular_name' => 'Feedback',
'name' => 'Feedback',
]
]);
});
Place it in your theme's functions.php, or in a MU plugin (eg. wp-content/mu-plugins/feedback.php).
A: The Jetpack plugin creates a custom post type of feedback when active.
You may need to just install that plugin first (as I did).
Cheers!
A: I was migrating a website from wordpress.com and I had same problem.
I've solved first installing the Jetpack plugin, then activating the Contact Form module in this url [yoursite.com]/wp-admin/admin.php?page=jetpack_modules and finally doing the import.
Hope that helps to someone!
| wordpress | {
"language": "en",
"length": 249,
"provenance": "stackexchange_00019.jsonl.gz:471886",
"question_score": "8",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/252071"
} | [
-0.00795745849609375,
-0.026611328125,
0.001316070556640625,
0.020538330078125,
-0.02392578125,
-0.01047515869140625,
0.03631591796875,
-0.036895751953125,
0.02197265625,
0.004741668701171875,
-0.051910400390625,
0.0016698837280273438,
-0.0421142578125,
-0.019989013671875,
-0.0240936279296875,
-0.0499267578125,
0.00733184814453125,
-0.009063720703125,
0.002513885498046875,
-0.0333251953125,
0.012939453125,
-0.0278472900390625,
0.025054931640625,
-0.021881103515625,
0.0171966552734375,
0.01551055908203125,
0.02606201171875,
-0.00921630859375,
0.0134429931640625,
-0.00841522216796875,
0.018310546875,
-0.039703369140625,
0.019317626953125,
0.0282440185546875,
-0.042205810546875,
-0.03753662109375,
-0.00464630126953125,
0.00893402099609375,
-0.01306915283203125,
0.023223876953125,
0.01073455810546875,
0.0035552978515625,
0.0240325927734375,
0.0100860595703125,
-0.01442718505859375,
-0.0384521484375,
0.0274810791015625,
-0.032867431640625,
0.003253936767578125,
0.0182952880859375,
0.000701904296875,
-0.012908935546875,
0.02349853515625,
0.00665283203125,
-0.033111572265625,
-0.04083251953125,
-0.061920166015625,
0.04241943359375,
-0.0195770263671875,
0.045989990234375,
0.042816162109375,
0.0307769775390625,
-0.0228729248046875,
0.012786865234375,
-0.00577545166015625,
-0.037322998046875,
0.0238494873046875,
0.02099609375,
-0.0269317626953125,
0.006359100341796875,
0.056854248046875,
0.007724761962890625,
0.0145111083984375,
0.027313232421875,
-0.0242919921875,
-0.06390380859375,
0.043487548828125,
-0.02862548828125,
0.00923919677734375,
0.0272979736328125,
0.007579803466796875,
0.042205810546875,
-0.017578125,
-0.0277862548828125,
-0.005489349365234375,
-0.017059326171875,
-0.0079498291015625,
-0.00237274169921875,
-0.017181396484375,
-0.007755279541015625,
-0.00923919677734375,
-0.035064697265625,
-0.075439453125,
0.05145263671875,
0.035980224609375,
-0.0199127197265625,
0.0184478759765625,
0.04864501953125,
0.01456451416015625,
0.022125244140625,
-0.00783538818359375,
-0.039031982421875,
0.024627685546875,
-0.048065185546875,
0.0163726806640625,
0.01177215576171875,
-0.04913330078125,
-0.0489501953125,
0.07073974609375,
0.057525634765625,
0.0175018310546875,
0.052093505859375,
-0.024688720703125,
-0.01096343994140625,
-0.033447265625,
0.02935791015625,
-0.0164031982421875,
0.0011425018310546875,
-0.004589080810546875,
0.025848388671875,
0.003650665283203125,
0.026702880859375,
-0.06256103515625,
-0.03729248046875,
0.02471923828125,
-0.0200958251953125,
-0.014434814453125,
0.046142578125,
-0.05828857421875,
0.0206298828125,
-0.017974853515625,
0.034698486328125,
0.06304931640625,
-0.001415252685546875,
-0.021636962890625,
-0.015869140625,
0.0117034912109375,
0.0264892578125,
-0.0297698974609375,
0.01091766357421875,
0.021942138671875,
-0.04547119140625,
-0.050506591796875,
0.006763458251953125,
0.0187530517578125,
0.03802490234375,
0.023040771484375,
-0.00510406494140625,
-0.0295867919921875,
-0.049591064453125,
0.039154052734375,
-0.027099609375,
0.0343017578125,
-0.00040602684020996094,
0.01158905029296875,
-0.10162353515625,
0.048309326171875,
-0.086181640625,
0.047149658203125,
-0.07647705078125,
0.042144775390625,
0.003692626953125,
0.0088653564453125,
0.00437164306640625,
-0.03070068359375,
-0.007602691650390625,
-0.0472412109375,
-0.0109710693359375,
0.0156707763671875,
0.058013916015625,
-0.05584716796875,
0.005290985107421875,
0.0281982421875,
-0.0007233619689941406,
-0.01461029052734375,
0.019256591796875,
0.00975799560546875,
0.006069183349609375,
0.01140594482421875,
0.056243896484375,
0.0012025833129882812,
-0.0257110595703125,
0.041473388671875,
-0.01291656494140625,
-0.0241546630859375,
-0.0129547119140625,
0.06072998046875,
0.0166778564453125,
-0.031036376953125,
0.02593994140625,
0.07720947265625,
0.056884765625,
0.002056121826171875,
-0.03253173828125,
-0.016143798828125,
-0.03369140625,
0.00722503662109375,
-0.0205230712890625,
-0.02105712890625,
0.06378173828125,
-0.009124755859375,
-0.001895904541015625,
0.006893157958984375,
0.003894805908203125,
-0.056243896484375,
0.00948333740234375,
-0.0269622802734375,
0.036102294921875,
-0.031463623046875,
-0.00400543212890625,
0.03216552734375,
-0.01374053955078125,
-0.0345458984375,
0.006561279296875,
-0.00902557373046875,
0.005279541015625,
-0.035064697265625,
0.0192718505859375,
-0.0138397216796875,
0.030029296875,
-0.041229248046875,
-0.01209259033203125,
-0.03900146484375,
-0.0162506103515625,
-0.01458740234375,
0.030120849609375,
-0.0235443115234375,
0.028900146484375,
-0.0015411376953125,
0.0298919677734375,
0.03143310546875,
-0.0031566619873046875,
0.00382232666015625,
0.023834228515625,
0.01224517822265625,
0.01049041748046875,
0.008453369140625,
-0.08953857421875,
0.0238494873046875,
0.04736328125,
0.021087646484375,
-0.0016679763793945312,
0.037933349609375,
0.0782470703125,
0.047119140625,
-0.0184478759765625,
0.022735595703125,
0.0218353271484375,
-0.004230499267578125,
0.0029144287109375,
-0.01290130615234375,
-0.0026416778564453125,
0.0279541015625,
-0.0208892822265625,
0.00852203369140625,
0.0227813720703125,
-0.011016845703125,
-0.00911712646484375,
-0.0175323486328125,
-0.01239013671875,
0.0162811279296875,
-0.03533935546875,
-0.0400390625,
-0.0098876953125,
0.04632568359375,
-0.019927978515625,
0.056915283203125,
0.0362548828125,
0.00408172607421875,
-0.0243072509765625,
0.0008630752563476562,
0.00013589859008789062,
0.007709503173828125,
0.032806396484375,
0.01001739501953125,
0.07470703125,
-0.02978515625,
-0.0220947265625,
0.02093505859375,
0.0413818359375,
-0.0079345703125,
0.01251983642578125,
0.0005788803100585938,
-0.009918212890625,
-0.01329803466796875,
-0.046356201171875,
0.0225372314453125,
-0.0025691986083984375,
-0.0281829833984375,
-0.041656494140625,
-0.0180511474609375,
0.03802490234375,
-0.0106048583984375,
0.01470184326171875,
0.045806884765625,
-0.0173797607421875,
0.0694580078125,
-0.06610107421875,
0.052520751953125,
-0.03668212890625,
0.052703857421875,
0.054351806640625,
-0.0135498046875,
0.00011265277862548828,
-0.00852203369140625,
-0.000576019287109375,
-0.0006351470947265625,
0.048187255859375,
0.00933837890625,
-0.067626953125,
-0.00803375244140625,
-0.019989013671875,
0.02777099609375,
0.0185394287109375,
0.0265045166015625,
-0.0142059326171875,
0.000244140625,
0.042083740234375,
-0.02020263671875,
-0.0206146240234375,
0.0290374755859375,
-0.03399658203125,
0.0036983489990234375,
-0.01218414306640625,
-0.01273345947265625,
-0.0161285400390625,
-0.0167694091796875,
-0.004863739013671875,
0.0251617431640625,
-0.03167724609375,
-0.07122802734375,
-0.0626220703125,
-0.10980224609375,
-0.0264434814453125,
0.006870269775390625,
0.031646728515625,
0.023956298828125,
0.04461669921875,
0.030517578125,
-0.040313720703125,
0.03912353515625,
0.048248291015625,
-0.021697998046875,
0.004726409912109375,
0.00507354736328125,
0.0031719207763671875,
0.0255279541015625,
0.002079010009765625,
0.0308685302734375,
0.055511474609375,
-0.0565185546875,
-0.005069732666015625,
-0.011871337890625,
0.01800537109375,
-0.01093292236328125,
0.04376220703125,
0.023468017578125,
0.008209228515625,
0.0184783935546875,
-0.03564453125,
-0.0103607177734375,
0.0242767333984375,
-0.0023059844970703125,
0.0113067626953125,
-0.031982421875,
-0.01953125,
0.0014820098876953125,
0.037628173828125,
-0.0216827392578125,
-0.00652313232421875,
0.06683349609375,
-0.0229949951171875,
-0.005847930908203125,
-0.03717041015625,
-0.045257568359375,
-0.0496826171875,
0.0291595458984375,
0.00551605224609375,
0.0257110595703125,
0.0196533203125,
0.015716552734375,
-0.006771087646484375,
0.006610870361328125,
-0.05487060546875,
-0.0164642333984375,
0.004543304443359375,
-0.069091796875,
0.0198974609375,
-0.036590576171875,
0.007358551025390625,
-0.013916015625,
0.049041748046875,
-0.0246429443359375,
-0.0020122528076171875,
-0.006801605224609375,
-0.0172882080078125,
-0.0130157470703125,
0.0107421875,
-0.05096435546875,
0.00463104248046875,
0.0128936767578125,
-0.006381988525390625,
-0.019775390625,
-0.004970550537109375,
0.002933502197265625,
-0.0166015625,
0.040618896484375,
-0.0216522216796875,
0.032257080078125,
-0.01146697998046875,
0.04296875,
0.00820159912109375,
0.0182342529296875,
0.006435394287109375,
-0.01537322998046875,
-0.030975341796875,
-0.097412109375,
-0.004360198974609375,
-0.03167724609375,
0.07525634765625,
-0.0027599334716796875,
0.038116455078125,
-0.052398681640625,
0.0240936279296875,
-0.018218994140625,
0.025177001953125,
-0.01959228515625,
0.0026187896728515625,
-0.006816864013671875,
0.039794921875,
0.0013380050659179688,
0.0028591156005859375,
-0.026123046875,
-0.00034165382385253906,
-0.0019283294677734375,
0.044281005859375,
0.0038051605224609375,
-0.011749267578125,
0.0160980224609375,
-0.01078033447265625,
0.0209503173828125,
-0.005115509033203125,
-0.021697998046875,
0.0201568603515625,
0.0037631988525390625,
-0.0233612060546875,
-0.0186309814453125,
-0.005405426025390625,
0.0243072509765625,
-0.03350830078125,
-0.0002512931823730469,
0.0208740234375,
0.0692138671875,
0.01091766357421875,
0.00949859619140625,
-0.030548095703125,
-0.0151824951171875,
0.007755279541015625,
-0.0022678375244140625,
-0.01397705078125,
-0.0009245872497558594,
0.0107269287109375,
-0.040435791015625,
-0.031463623046875,
0.0081024169921875,
-0.02783203125,
0.055908203125,
-0.04168701171875,
-0.042236328125,
0.041168212890625,
-0.04864501953125,
0.0217437744140625,
0.0298004150390625,
0.002719879150390625,
-0.021728515625,
-0.0130615234375,
0.037445068359375,
-0.0169219970703125,
0.028472900390625,
-0.00592803955078125,
-0.036224365234375,
0.0372314453125,
-0.04931640625,
-0.0244140625,
-0.020111083984375,
0.0148468017578125,
-0.04400634765625,
-0.060028076171875,
-0.01227569580078125,
0.025115966796875,
0.017333984375,
0.021331787109375,
0.0175933837890625,
0.05230712890625,
-0.00888824462890625,
-0.00998687744140625,
0.004344940185546875,
0.001220703125,
0.00591278076171875,
-0.0226593017578125,
-0.08599853515625,
0.0226898193359375,
0.032196044921875,
-0.0035228729248046875,
0.036865234375,
0.01513671875,
0.023651123046875,
-0.00433349609375,
-0.00919342041015625,
0.038970947265625,
0.00968170166015625,
-0.019134521484375,
0.01953125,
0.01128387451171875,
-0.0108795166015625,
0.01279449462890625,
0.0249481201171875,
-0.03253173828125,
0.01113128662109375,
0.00997161865234375,
0.006282806396484375,
0.0204925537109375,
0.06329345703125,
0.020233154296875,
-0.03668212890625,
-0.036865234375,
0.08197021484375,
-0.0095672607421875,
-0.022979736328125,
0.0200042724609375,
-0.0035076141357421875,
0.028472900390625,
0.0062255859375,
-0.017425537109375,
0.03985595703125,
-0.0144805908203125,
0.01229095458984375,
0.036773681640625,
-0.005657196044921875,
-0.0582275390625,
-0.001758575439453125,
0.03106689453125,
0.0301971435546875,
-0.041900634765625,
-0.01107025146484375,
-0.036773681640625,
-0.030853271484375,
-0.0355224609375,
0.02740478515625,
-0.0732421875,
0.0114898681640625,
0.0269927978515625,
0.0000661611557006836,
-0.007221221923828125,
0.028533935546875,
-0.0643310546875,
-0.0043487548828125,
-0.0193023681640625,
0.00424957275390625,
0.0557861328125,
-0.0070953369140625,
-0.04833984375,
-0.0025424957275390625,
0.030029296875,
-0.0360107421875,
-0.0088958740234375,
0.04833984375,
-0.000022351741790771484,
0.035858154296875,
-0.027984619140625,
-0.034088134765625,
-0.0555419921875,
-0.031829833984375,
-0.0147705078125,
-0.043670654296875,
-0.0035877227783203125,
-0.0202484130859375,
0.01776123046875,
-0.041839599609375,
-0.02593994140625,
0.006183624267578125,
0.0306243896484375,
0.00572967529296875,
0.0477294921875,
-0.017974853515625,
0.026092529296875,
-0.0047454833984375,
0.02117919921875,
-0.00684356689453125,
0.0269775390625,
0.0279083251953125,
-0.0165863037109375,
-0.00458526611328125,
-0.027008056640625,
0.0023250579833984375,
-0.02838134765625,
0.022430419921875,
0.013946533203125,
0.0292816162109375,
-0.0015630722045898438,
0.01470947265625,
-0.0257110595703125,
-0.005706787109375,
-0.0132293701171875,
0.0665283203125,
-0.01525115966796875,
0.0222625732421875,
0.047149658203125,
-0.0193634033203125,
0.0032444000244140625,
0.013671875,
0.00626373291015625,
-0.007144927978515625,
-0.003597259521484375,
-0.0199127197265625,
-0.00852203369140625,
-0.00870513916015625,
0.0163726806640625,
0.0200653076171875,
-0.005008697509765625,
0.00307464599609375,
0.0099639892578125,
0.0060882568359375,
-0.0281829833984375,
0.0467529296875,
-0.01502227783203125,
-0.0175323486328125,
0.0159454345703125,
-0.0026645660400390625,
-0.031982421875,
-0.03448486328125,
-0.0213775634765625,
0.0084228515625,
0.03533935546875,
0.047607421875,
-0.08477783203125,
0.023193359375,
0.0239410400390625,
0.00215911865234375,
0.0001558065414428711,
-0.03179931640625,
-0.0109710693359375,
-0.046966552734375,
0.026031494140625,
0.051513671875,
-0.0199737548828125,
-0.0015163421630859375,
0.0157012939453125,
-0.0013294219970703125,
-0.0217742919921875,
0.042236328125,
0.00013554096221923828,
-0.0164642333984375,
-0.032806396484375,
0.01212310791015625,
-0.007801055908203125,
0.016845703125,
0.04345703125,
-0.05267333984375,
0.003376007080078125,
-0.04913330078125,
-0.0322265625,
-0.031280517578125,
-0.04119873046875,
-0.010711669921875,
-0.00402069091796875,
0.045654296875,
0.01354217529296875,
0.01003265380859375,
-0.05029296875,
0.004131317138671875,
-0.031494140625,
0.00821685791015625,
-0.025299072265625,
0.00511932373046875,
0.07159423828125,
-0.009002685546875,
0.0267333984375,
0.0225830078125,
-0.0286407470703125,
0.00616455078125,
-0.007587432861328125,
-0.0135955810546875,
-0.0009503364562988281,
-0.01413726806640625,
0.0216217041015625,
-0.034423828125,
0.004840850830078125,
-0.0029659271240234375,
0.0721435546875,
-0.03955078125,
-0.0201263427734375,
0.0270538330078125,
-0.0275115966796875,
-0.07373046875,
-0.012176513671875,
-0.08087158203125,
0.06256103515625,
0.05859375,
0.027923583984375,
0.006114959716796875,
0.00795745849609375,
-0.06719970703125,
-0.041839599609375,
-0.0260467529296875,
0.0484619140625,
0.01169586181640625,
-0.0008902549743652344,
-0.0299530029296875,
-0.01157379150390625,
-0.015838623046875,
0.0278472900390625,
-0.0233612060546875,
-0.0203704833984375,
-0.03656005859375,
0.0115203857421875,
0.06494140625,
0.0450439453125,
0.05633544921875,
0.0263824462890625,
0.005306243896484375,
0.0178375244140625,
0.06134033203125,
-0.0237579345703125,
0.0293121337890625,
0.0212554931640625,
0.00592041015625,
0.0211334228515625,
0.00908660888671875,
-0.0153656005859375,
-0.0211181640625,
-0.027191162109375,
-0.0186767578125,
-0.005603790283203125,
-0.01070404052734375,
0.01342010498046875,
0.05352783203125,
0.0002067089080810547,
0.0233917236328125,
0.022247314453125,
-0.035552978515625,
0.0059051513671875,
0.03240966796875,
0.0033702850341796875,
0.03851318359375,
0.0302276611328125,
0.0267333984375,
0.06500244140625,
-0.037017822265625,
0.0030879974365234375,
-0.02215576171875,
0.002689361572265625,
0.01323699951171875,
0.0250091552734375,
0.009765625,
-0.0076751708984375,
0.041015625,
0.048187255859375,
0.0214385986328125,
-0.044189453125,
-0.07373046875,
0.0032215118408203125,
0.0343017578125,
0.03204345703125,
0.05615234375,
0.0667724609375,
-0.001087188720703125,
0.07452392578125,
-0.0150604248046875,
-0.0200653076171875,
-0.0107879638671875,
0.0278778076171875,
0.0016736984252929688,
0.03961181640625,
-0.009490966796875,
-0.033538818359375,
-0.0204010009765625,
0.01806640625,
0.0200347900390625,
0.0294647216796875,
-0.00839996337890625,
0.045196533203125,
-0.041961669921875,
0.00836181640625,
0.022735595703125,
-0.0306396484375,
0.01235198974609375,
-0.0296783447265625,
0.0240020751953125,
-0.00981903076171875,
0.007801055908203125,
0.0175628662109375,
-0.022735595703125,
0.03326416015625,
0.00897979736328125,
-0.00942230224609375,
-0.02996826171875,
-0.00788116455078125,
-0.004253387451171875,
-0.044525146484375,
-0.06951904296875,
-0.048004150390625,
-0.0230560302734375,
0.0269622802734375,
0.01605224609375,
0.049896240234375,
-0.0191192626953125,
0.010009765625,
-0.00815582275390625,
0.035552978515625,
-0.00762939453125,
-0.023529052734375,
0.0770263671875,
0.0136871337890625,
0.0953369140625,
0.023834228515625,
-0.06842041015625,
-0.02081298828125,
-0.03424072265625,
0.0089569091796875,
0.002994537353515625,
0.0322265625,
0.0131378173828125,
0.00827789306640625,
0.0212249755859375,
-0.0199127197265625,
0.043731689453125,
-0.0290679931640625,
0.0304412841796875,
0.079833984375,
0.0101318359375,
0.03179931640625,
-0.03497314453125,
-0.0406494140625,
-0.017303466796875,
0.055389404296875,
-0.02020263671875,
0.07366943359375,
-0.022125244140625,
0.01030731201171875,
-0.0279998779296875,
0.0205230712890625,
-0.0328369140625,
-0.0124053955078125,
-0.034759521484375,
-0.0045166015625,
0.0311279296875,
0.01486968994140625,
-0.0382080078125,
0.045623779296875,
-0.00804901123046875,
0.0038127899169921875,
-0.00516510009765625,
-0.01104736328125,
0.007640838623046875,
0.04083251953125,
0.0225677490234375,
-0.0157470703125,
-0.034820556640625,
-0.034393310546875,
0.01454925537109375,
0.02593994140625,
0.03564453125,
-0.0209503173828125,
0.005619049072265625,
0.00858306884765625,
-0.00098419189453125,
0.00605010986328125,
0.00007700920104980469,
-0.005889892578125,
0.018035888671875,
-0.0199127197265625,
0.01041412353515625,
0.0246734619140625,
-0.01012420654296875,
0.01428985595703125,
0.02899169921875,
0.0426025390625,
0.002681732177734375,
-0.024261474609375,
0.0243072509765625,
-0.006664276123046875,
0.0180816650390625,
-0.0518798828125,
-0.01483917236328125,
0.041534423828125,
0.005229949951171875,
0.0040130615234375,
-0.0028839111328125,
-0.0088348388671875,
-0.0509033203125,
0.0032367706298828125,
0.007686614990234375,
-0.0328369140625,
-0.00594329833984375,
0.005764007568359375,
-0.0255279541015625,
0.0056915283203125,
-0.0200042724609375,
0.001354217529296875,
0.004123687744140625,
-0.0205230712890625,
0.007732391357421875,
-0.044036865234375,
-0.043487548828125,
0.010955810546875,
0.0232391357421875,
0.000339508056640625,
0.00528717041015625,
-0.0352783203125,
-0.0070648193359375,
-0.011962890625,
0.04376220703125,
0.0689697265625,
-0.04425048828125,
-0.02520751953125,
0.02294921875,
0.0228424072265625,
0.065185546875,
0.01068115234375,
-0.023223876953125,
0.0217742919921875,
-0.0006995201110839844,
0.00958251953125,
-0.0968017578125,
-0.01065826416015625,
-0.09881591796875,
0.02923583984375,
-0.0246429443359375,
0.033660888671875,
0.045318603515625,
-0.021209716796875,
-0.07159423828125,
0.059051513671875,
-0.032806396484375,
-0.0218658447265625,
-0.03485107421875,
-0.02777099609375,
0.0008420944213867188,
0.0166473388671875,
0.011383056640625,
-0.06011962890625,
-0.04736328125,
0.046173095703125,
-0.026123046875,
0.0223236083984375,
0.0125732421875,
-0.034332275390625,
0.02447509765625,
0.00537109375,
0.041046142578125,
-0.03851318359375,
-0.0269622802734375,
0.002658843994140625,
-0.000339508056640625,
0.037353515625,
-0.0300750732421875,
-0.0292205810546875,
-0.0019664764404296875,
0.01397705078125,
0.0035686492919921875,
0.023284912109375,
-0.059539794921875,
-0.005157470703125,
0.057861328125,
0.05291748046875,
0.02337646484375,
-0.0173187255859375,
0.0377197265625,
-0.0209503173828125,
-0.040863037109375,
-0.052337646484375,
0.0203704833984375,
-0.07757568359375,
-0.05499267578125,
-0.0131683349609375,
0.0147857666015625,
0.004940032958984375,
-0.0516357421875,
-0.0127105712890625,
-0.027099609375,
-0.0218505859375,
-0.001705169677734375,
0.0009775161743164062,
0.0151214599609375,
0.0338134765625,
-0.02001953125,
0.0181732177734375,
-0.0016279220581054688,
-0.01015472412109375,
0.0220489501953125,
0.0138397216796875,
-0.0018072128295898438,
-0.0040740966796875,
-0.043792724609375,
-0.006587982177734375,
-0.0030841827392578125,
0.026641845703125,
-0.0204315185546875,
-0.019561767578125,
0.0221710205078125,
-0.0247344970703125,
-0.037506103515625,
-0.047607421875,
0.0421142578125,
-0.0021209716796875,
-0.055145263671875,
0.083251953125,
0.01194000244140625,
-0.0128021240234375,
-0.0260162353515625,
0.045623779296875,
0.019195556640625,
-0.045684814453125,
0.029327392578125,
-0.03265380859375,
0.01953125,
-0.0003826618194580078,
0.0069427490234375,
0.00258636474609375,
0.010772705078125,
0.0190277099609375,
-0.0265045166015625,
0.0033664703369140625
] |
4f78895855859758ecd6b79598a65a016a99e54f | Wordpress Stackexchange
Q: Show all parents and children in custom post type in right order I would like to show all posts from a custom post type on one page with the ordering exactly like in the backend. I get the right ordering with wp_list_pages, but of course without the content.
*
*parent
1.1-> sibling
1.2-> sibling
*parent
2.2-> sibling...
etc.
But I cant figure out how to set the order correctly with orderby.
Here is my code
$args = array(
'depth' => '0',
'post_type' => 'manual_documentation',
'post_stauts' => 'publish',
'orderby' => 'parent menu_order',
'posts_per_page' => 10
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
echo '<h1>';
the_title();
echo '</h1>';
echo '<div class="entry-content">';
the_content();
echo '</div>';
endwhile;
The result:
*
*Parent
*Parent
Sibling
Sibling
Sibling
Does anybody know how to solve this problem?
Thanks!
| Q: Show all parents and children in custom post type in right order I would like to show all posts from a custom post type on one page with the ordering exactly like in the backend. I get the right ordering with wp_list_pages, but of course without the content.
*
*parent
1.1-> sibling
1.2-> sibling
*parent
2.2-> sibling...
etc.
But I cant figure out how to set the order correctly with orderby.
Here is my code
$args = array(
'depth' => '0',
'post_type' => 'manual_documentation',
'post_stauts' => 'publish',
'orderby' => 'parent menu_order',
'posts_per_page' => 10
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
echo '<h1>';
the_title();
echo '</h1>';
echo '<div class="entry-content">';
the_content();
echo '</div>';
endwhile;
The result:
*
*Parent
*Parent
Sibling
Sibling
Sibling
Does anybody know how to solve this problem?
Thanks!
| wordpress | {
"language": "en",
"length": 137,
"provenance": "stackexchange_00019.jsonl.gz:471894",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/252103"
} | [
0.059356689453125,
-0.0081634521484375,
0.007534027099609375,
-0.0285797119140625,
-0.00891876220703125,
-0.0235443115234375,
0.008148193359375,
-0.0166473388671875,
0.00038361549377441406,
0.0109405517578125,
0.0025386810302734375,
-0.03790283203125,
-0.043609619140625,
-0.05657958984375,
-0.03021240234375,
-0.059478759765625,
0.0577392578125,
-0.03350830078125,
0.03485107421875,
-0.006893157958984375,
0.005130767822265625,
0.02325439453125,
0.05908203125,
0.0316162109375,
0.025390625,
-0.04583740234375,
0.02142333984375,
-0.0185699462890625,
0.01441192626953125,
-0.00592803955078125,
0.01503753662109375,
-0.00621795654296875,
0.02337646484375,
-0.02911376953125,
0.0391845703125,
-0.019195556640625,
0.036865234375,
-0.0166473388671875,
0.0026988983154296875,
0.031463623046875,
-0.0034084320068359375,
0.012451171875,
0.033355712890625,
0.02783203125,
-0.0245819091796875,
-0.0214996337890625,
0.01280975341796875,
-0.006656646728515625,
0.037353515625,
-0.025787353515625,
0.0142364501953125,
-0.00643157958984375,
0.033050537109375,
-0.020050048828125,
-0.0258026123046875,
-0.004413604736328125,
0.0200347900390625,
-0.0228118896484375,
0.0143280029296875,
-0.031280517578125,
-0.0259857177734375,
0.027557373046875,
0.032012939453125,
0.034942626953125,
-0.0015163421630859375,
0.0182647705078125,
0.0279388427734375,
-0.0014772415161132812,
-0.0579833984375,
-0.024078369140625,
0.041717529296875,
-0.04052734375,
0.00836944580078125,
-0.0273284912109375,
0.002117156982421875,
-0.0225677490234375,
-0.036865234375,
-0.05218505859375,
0.0279388427734375,
0.0128631591796875,
-0.014129638671875,
0.0165557861328125,
-0.09228515625,
-0.02008056640625,
-0.003299713134765625,
-0.0116729736328125,
-0.0205078125,
-0.00524139404296875,
-0.040008544921875,
-0.028778076171875,
-0.031097412109375,
-0.0361328125,
-0.0262451171875,
0.017791748046875,
0.0028247833251953125,
-0.017242431640625,
0.052276611328125,
0.04766845703125,
-0.0270843505859375,
-0.0234375,
-0.00357818603515625,
-0.0323486328125,
0.0265350341796875,
-0.0302581787109375,
0.02178955078125,
-0.054412841796875,
-0.036529541015625,
-0.01131439208984375,
0.08203125,
0.07379150390625,
-0.0223846435546875,
0.0797119140625,
-0.0027217864990234375,
-0.0201568603515625,
-0.011260986328125,
0.0263519287109375,
-0.021392822265625,
0.032806396484375,
-0.001964569091796875,
0.0296478271484375,
0.006988525390625,
0.037811279296875,
-0.0035400390625,
-0.01690673828125,
0.003231048583984375,
0.0214385986328125,
0.0015630722045898438,
-0.050689697265625,
0.008209228515625,
0.009124755859375,
-0.039093017578125,
0.0018215179443359375,
0.0689697265625,
0.0523681640625,
0.0321044921875,
-0.01763916015625,
-0.0158233642578125,
-0.0181121826171875,
-0.004558563232421875,
0.0058441162109375,
0.003421783447265625,
-0.0163421630859375,
0.044403076171875,
0.00984954833984375,
-0.017913818359375,
0.0222015380859375,
0.0176239013671875,
0.005489349365234375,
-0.007904052734375,
-0.0150299072265625,
-0.0267333984375,
-0.0143280029296875,
0.04736328125,
-0.0283660888671875,
-0.019683837890625,
-0.029937744140625,
-0.0124969482421875,
-0.01464080810546875,
-0.0101165771484375,
-0.022125244140625,
-0.0196075439453125,
0.0188751220703125,
0.04443359375,
-0.031768798828125,
-0.035736083984375,
-0.0042877197265625,
-0.041595458984375,
-0.015716552734375,
0.016143798828125,
-0.048126220703125,
0.0290985107421875,
-0.0340576171875,
-0.019012451171875,
0.0115509033203125,
0.02081298828125,
0.04296875,
-0.023406982421875,
-0.02532958984375,
0.022491455078125,
0.0259552001953125,
-0.00684356689453125,
-0.0260009765625,
-0.033111572265625,
0.030731201171875,
-0.04901123046875,
0.040008544921875,
0.0008940696716308594,
0.0265960693359375,
0.0157012939453125,
-0.0009937286376953125,
0.0258941650390625,
0.048309326171875,
-0.065185546875,
0.07635498046875,
0.004222869873046875,
-0.01375579833984375,
-0.04949951171875,
-0.0038547515869140625,
-0.01436614990234375,
-0.018768310546875,
-0.054229736328125,
-0.008331298828125,
-0.0071258544921875,
-0.0018177032470703125,
-0.01180267333984375,
-0.006481170654296875,
-0.007053375244140625,
0.03204345703125,
0.034912109375,
0.03668212890625,
0.0013456344604492188,
0.02471923828125,
-0.0136260986328125,
-0.07525634765625,
-0.047393798828125,
0.01531982421875,
0.01401519775390625,
0.025665283203125,
-0.016937255859375,
-0.00020229816436767578,
-0.031585693359375,
-0.037322998046875,
-0.037384033203125,
0.0572509765625,
0.086181640625,
-0.0083770751953125,
-0.0132598876953125,
-0.0246734619140625,
0.0426025390625,
0.0240478515625,
-0.0792236328125,
0.018951416015625,
-0.0087432861328125,
-0.01934814453125,
-0.061004638671875,
-0.00637054443359375,
-0.01236724853515625,
-0.01177215576171875,
0.0002751350402832031,
0.057586669921875,
0.0235137939453125,
0.01071929931640625,
0.0104522705078125,
0.03778076171875,
0.030120849609375,
-0.05615234375,
-0.0095062255859375,
0.00937652587890625,
0.00890350341796875,
0.0631103515625,
-0.00287628173828125,
0.026336669921875,
0.01351165771484375,
-0.0088043212890625,
0.043975830078125,
0.0193939208984375,
0.0304718017578125,
0.049530029296875,
-0.00917816162109375,
0.00994110107421875,
-0.0021762847900390625,
-0.0227203369140625,
-0.0241241455078125,
-0.01105499267578125,
0.01384735107421875,
0.0101318359375,
0.0300140380859375,
0.0172119140625,
-0.040435791015625,
0.002407073974609375,
0.01910400390625,
0.030120849609375,
0.00615692138671875,
0.01280975341796875,
-0.019195556640625,
-0.046112060546875,
-0.0195770263671875,
0.0124359130859375,
-0.01216888427734375,
-0.02557373046875,
0.01529693603515625,
0.022613525390625,
-0.004852294921875,
0.0034427642822265625,
0.0022983551025390625,
-0.061614990234375,
0.0084228515625,
0.0677490234375,
-0.01033782958984375,
0.01406097412109375,
0.0145721435546875,
0.0633544921875,
0.0037212371826171875,
0.01532745361328125,
0.00693511962890625,
0.0216827392578125,
0.0124664306640625,
-0.0755615234375,
0.064208984375,
-0.04290771484375,
0.038360595703125,
0.07342529296875,
0.001617431640625,
0.015899658203125,
-0.01763916015625,
0.018341064453125,
-0.001678466796875,
0.00464630126953125,
-0.00971221923828125,
-0.05218505859375,
0.017578125,
0.03472900390625,
0.0309906005859375,
0.06719970703125,
0.0089874267578125,
-0.01554107666015625,
0.030242919921875,
0.0533447265625,
-0.019256591796875,
-0.055023193359375,
0.0018815994262695312,
-0.03167724609375,
-0.003505706787109375,
-0.0232391357421875,
-0.00904083251953125,
-0.006328582763671875,
-0.0136871337890625,
-0.00812530517578125,
-0.0120697021484375,
-0.007022857666015625,
-0.052978515625,
-0.0311431884765625,
-0.042236328125,
0.0173797607421875,
-0.0017080307006835938,
0.0037975311279296875,
0.0199432373046875,
0.0738525390625,
0.034423828125,
-0.0806884765625,
0.0229949951171875,
0.041656494140625,
-0.04656982421875,
0.03851318359375,
-0.00769805908203125,
-0.0211944580078125,
0.039459228515625,
-0.00463104248046875,
-0.017974853515625,
0.01336669921875,
-0.002292633056640625,
-0.01471710205078125,
-0.00437164306640625,
0.0322265625,
0.0304107666015625,
-0.01441192626953125,
0.0018892288208007812,
0.05364990234375,
0.0184173583984375,
-0.0174102783203125,
-0.0183868408203125,
-0.023284912109375,
-0.0266265869140625,
-0.0204925537109375,
0.00887298583984375,
0.00881195068359375,
-0.052520751953125,
0.036895751953125,
-0.0016574859619140625,
0.00316619873046875,
0.0223236083984375,
-0.0227203369140625,
0.022705078125,
0.008392333984375,
0.0178070068359375,
-0.0225830078125,
0.048919677734375,
0.0037860870361328125,
-0.0233612060546875,
0.017669677734375,
0.02789306640625,
-0.01041412353515625,
0.0233306884765625,
-0.04669189453125,
-0.073486328125,
0.05364990234375,
-0.0272216796875,
-0.004638671875,
-0.03924560546875,
-0.038330078125,
0.0142822265625,
0.11572265625,
-0.06524658203125,
0.00148773193359375,
-0.0240325927734375,
0.00679779052734375,
-0.023681640625,
-0.04620361328125,
-0.05206298828125,
-0.004146575927734375,
-0.0273895263671875,
0.02581787109375,
0.013427734375,
-0.0034847259521484375,
-0.025482177734375,
-0.018218994140625,
-0.0361328125,
-0.00937652587890625,
0.04541015625,
-0.0188140869140625,
-0.00536346435546875,
0.0122528076171875,
-0.0109100341796875,
-0.0091552734375,
-0.0390625,
0.0087432861328125,
-0.07861328125,
-0.020904541015625,
-0.005451202392578125,
0.06488037109375,
0.011993408203125,
-0.017669677734375,
0.004405975341796875,
0.0721435546875,
0.045196533203125,
0.019378662109375,
0.01849365234375,
-0.01270294189453125,
-0.00641632080078125,
-0.047698974609375,
0.0123443603515625,
-0.061004638671875,
-0.048980712890625,
-0.02862548828125,
0.00815582275390625,
0.0171356201171875,
-0.00299072265625,
-0.0140228271484375,
0.003963470458984375,
0.00875091552734375,
-0.029449462890625,
-0.040771484375,
-0.059967041015625,
0.0084228515625,
-0.01226043701171875,
-0.02978515625,
-0.052642822265625,
-0.0831298828125,
0.0027637481689453125,
0.0027370452880859375,
-0.0322265625,
0.0019044876098632812,
0.0445556640625,
0.0269775390625,
-0.015167236328125,
-0.034027099609375,
-0.0169525146484375,
0.013916015625,
0.00391387939453125,
0.044830322265625,
0.00774383544921875,
-0.0031280517578125,
0.0362548828125,
-0.0080108642578125,
0.020233154296875,
0.0232696533203125,
0.030548095703125,
-0.002094268798828125,
-0.0272674560546875,
0.042724609375,
0.006015777587890625,
-0.03485107421875,
0.007320404052734375,
-0.01152801513671875,
-0.0234222412109375,
-0.01279449462890625,
0.053192138671875,
-0.0179443359375,
0.0215911865234375,
-0.03948974609375,
0.003078460693359375,
0.0122833251953125,
0.042083740234375,
-0.0032787322998046875,
0.010711669921875,
0.003124237060546875,
-0.02001953125,
-0.01084136962890625,
0.01351165771484375,
0.0163726806640625,
0.047821044921875,
0.0020961761474609375,
0.042022705078125,
-0.003688812255859375,
0.00341796875,
-0.00598907470703125,
-0.012725830078125,
0.05999755859375,
0.0196990966796875,
-0.024169921875,
-0.01390838623046875,
-0.0082244873046875,
0.046112060546875,
-0.024658203125,
0.0213470458984375,
0.01316070556640625,
0.0089263916015625,
0.018798828125,
-0.010589599609375,
-0.008087158203125,
0.042816162109375,
-0.01393890380859375,
0.00665283203125,
0.029571533203125,
-0.0214080810546875,
-0.031768798828125,
0.056732177734375,
0.015777587890625,
-0.00360870361328125,
-0.014984130859375,
-0.00884246826171875,
-0.00792694091796875,
0.0238494873046875,
0.0257110595703125,
0.01413726806640625,
-0.0010652542114257812,
-0.003597259521484375,
0.020599365234375,
-0.0250244140625,
-0.0220947265625,
0.027374267578125,
0.0272369384765625,
0.03082275390625,
0.00506591796875,
-0.003185272216796875,
0.022491455078125,
-0.03912353515625,
0.033935546875,
0.043609619140625,
0.0020275115966796875,
-0.042938232421875,
-0.0186004638671875,
0.017578125,
0.046630859375,
-0.02471923828125,
0.0157470703125,
-0.0498046875,
-0.00478363037109375,
-0.0221405029296875,
-0.032073974609375,
0.0179443359375,
0.0243988037109375,
-0.02142333984375,
-0.045501708984375,
0.00907135009765625,
-0.039459228515625,
-0.01030731201171875,
-0.00836944580078125,
-0.00213623046875,
-0.004932403564453125,
-0.0176239013671875,
0.048126220703125,
-0.037872314453125,
-0.0016927719116210938,
-0.04107666015625,
0.01910400390625,
0.054534912109375,
0.041900634765625,
-0.0183258056640625,
-0.01073455810546875,
-0.037689208984375,
-0.018524169921875,
-0.032623291015625,
-0.06488037109375,
-0.0217437744140625,
-0.00701141357421875,
0.0004253387451171875,
0.00881195068359375,
-0.002643585205078125,
-0.0174407958984375,
-0.025543212890625,
0.0118865966796875,
0.0034332275390625,
0.0020198822021484375,
-0.00943756103515625,
0.11273193359375,
-0.058349609375,
0.09222412109375,
-0.00007665157318115234,
0.032440185546875,
-0.0293426513671875,
0.0034008026123046875,
0.0316162109375,
-0.026123046875,
-0.04296875,
-0.0206451416015625,
-0.0233001708984375,
-0.00988006591796875,
0.0210113525390625,
-0.0116119384765625,
0.030914306640625,
-0.01143646240234375,
-0.0025043487548828125,
0.004001617431640625,
-0.0018606185913085938,
-0.00848388671875,
0.0247039794921875,
0.044708251953125,
0.018035888671875,
0.00787353515625,
0.0162353515625,
-0.03631591796875,
0.01245880126953125,
0.031951904296875,
0.019561767578125,
-0.045135498046875,
-0.05560302734375,
0.03460693359375,
0.05047607421875,
0.021942138671875,
0.04864501953125,
0.0109710693359375,
0.032501220703125,
0.03240966796875,
-0.015960693359375,
0.0205535888671875,
0.006259918212890625,
0.04656982421875,
-0.01316070556640625,
-0.0109100341796875,
0.02001953125,
-0.0284271240234375,
-0.0115966796875,
-0.01934814453125,
0.0182647705078125,
-0.01187896728515625,
0.004608154296875,
-0.002040863037109375,
-0.016876220703125,
0.0272369384765625,
0.0005049705505371094,
-0.00777435302734375,
0.0157470703125,
0.0193939208984375,
-0.01509857177734375,
-0.02734375,
0.006359100341796875,
-0.005157470703125,
0.02301025390625,
-0.02490234375,
0.0572509765625,
0.0017595291137695312,
0.006320953369140625,
-0.0141448974609375,
-0.02117919921875,
0.035064697265625,
-0.02288818359375,
0.0045166015625,
-0.04132080078125,
0.00033545494079589844,
-0.04620361328125,
-0.00794219970703125,
-0.05096435546875,
0.0193023681640625,
0.05657958984375,
-0.01139068603515625,
-0.043426513671875,
0.0450439453125,
-0.046234130859375,
0.054931640625,
0.004283905029296875,
-0.06842041015625,
-0.049102783203125,
-0.01000213623046875,
0.00795745849609375,
-0.008148193359375,
-0.044769287109375,
0.01812744140625,
-0.05511474609375,
-0.008941650390625,
-0.0107879638671875,
-0.01358795166015625,
0.04052734375,
-0.037261962890625,
0.00598907470703125,
0.036956787109375,
0.031158447265625,
-0.018463134765625,
0.0257415771484375,
0.037628173828125,
-0.04345703125,
-0.025482177734375,
0.03662109375,
0.0019407272338867188,
-0.01419830322265625,
0.0214385986328125,
-0.054107666015625,
0.09307861328125,
-0.02581787109375,
0.040924072265625,
0.0225982666015625,
0.028472900390625,
-0.0158233642578125,
0.0019588470458984375,
-0.0433349609375,
0.07354736328125,
0.043701171875,
0.05926513671875,
-0.06536865234375,
-0.024749755859375,
0.019805908203125,
0.06317138671875,
0.020111083984375,
-0.00339508056640625,
-0.0699462890625,
0.0027866363525390625,
0.052276611328125,
0.0504150390625,
0.0247344970703125,
0.053985595703125,
0.01515960693359375,
0.019134521484375,
0.034759521484375,
0.0006132125854492188,
0.042327880859375,
-0.0058135986328125,
-0.0306396484375,
0.034027099609375,
0.0198822021484375,
0.0341796875,
-0.0301971435546875,
-0.016876220703125,
-0.052459716796875,
-0.0200653076171875,
0.043243408203125,
-0.004302978515625,
0.01534271240234375,
0.0242767333984375,
0.0572509765625,
-0.07452392578125,
-0.040740966796875,
-0.0198822021484375,
0.03851318359375,
0.005832672119140625,
0.03143310546875,
-0.0204925537109375,
0.02337646484375,
-0.021392822265625,
-0.020294189453125,
0.0108184814453125,
0.036102294921875,
-0.0684814453125,
0.017791748046875,
0.0305633544921875,
0.033233642578125,
-0.0239105224609375,
-0.0174102783203125,
0.068359375,
0.043548583984375,
-0.0189971923828125,
-0.03948974609375,
0.041259765625,
0.0142974853515625,
-0.0267333984375,
0.0040130615234375,
-0.01354217529296875,
-0.014190673828125,
0.0443115234375,
-0.02569580078125,
-0.0469970703125,
-0.010528564453125,
0.061431884765625,
-0.006145477294921875,
-0.027984619140625,
0.010498046875,
-0.06024169921875,
-0.020721435546875,
0.00537109375,
0.0367431640625,
0.0263214111328125,
-0.0036029815673828125,
0.039520263671875,
-0.0284271240234375,
-0.00659942626953125,
-0.0020275115966796875,
-0.0175018310546875,
-0.01050567626953125,
0.0181427001953125,
-0.0160980224609375,
0.00891876220703125,
0.002918243408203125,
0.0265350341796875,
0.03729248046875,
0.0184173583984375,
0.05072021484375,
0.0260772705078125,
-0.04052734375,
-0.003765106201171875,
0.06976318359375,
-0.0164642333984375,
-0.04473876953125,
-0.0158843994140625,
-0.0328369140625,
0.0174102783203125,
-0.0008325576782226562,
0.0196685791015625,
0.01256561279296875,
0.0224151611328125,
0.02630615234375,
0.04058837890625,
0.0083160400390625,
-0.0122833251953125,
0.028167724609375,
0.01268768310546875,
0.07843017578125,
0.0523681640625,
-0.08062744140625,
-0.03857421875,
-0.035858154296875,
-0.0169219970703125,
0.05841064453125,
0.053497314453125,
0.035675048828125,
-0.0241546630859375,
0.0322265625,
-0.037445068359375,
-0.0322265625,
0.03173828125,
0.042816162109375,
0.0257110595703125,
-0.020111083984375,
0.02764892578125,
-0.0555419921875,
-0.0277252197265625,
-0.00791168212890625,
0.0165557861328125,
0.02178955078125,
0.039398193359375,
0.0228729248046875,
0.0163116455078125,
-0.0024242401123046875,
0.0360107421875,
-0.041290283203125,
-0.0268707275390625,
0.0675048828125,
-0.0212249755859375,
-0.0007328987121582031,
-0.016143798828125,
-0.01273345947265625,
0.0099334716796875,
0.028778076171875,
-0.02899169921875,
0.01605224609375,
-0.02056884765625,
0.0167083740234375,
-0.0362548828125,
-0.00019407272338867188,
-0.036651611328125,
-0.00672149658203125,
-0.025299072265625,
-0.034576416015625,
0.0253753662109375,
0.013519287109375,
0.01013946533203125,
0.031768798828125,
0.022369384765625,
-0.063232421875,
0.038330078125,
-0.06683349609375,
0.07781982421875,
0.03607177734375,
0.03692626953125,
-0.041107177734375,
0.0254364013671875,
-0.00313568115234375,
-0.00013816356658935547,
0.035369873046875,
0.01666259765625,
0.0406494140625,
-0.040618896484375,
-0.0016078948974609375,
0.03204345703125,
0.034576416015625,
-0.020294189453125,
-0.0008373260498046875,
0.031829833984375,
-0.039459228515625,
-0.0226898193359375,
0.010650634765625,
-0.0206146240234375,
-0.041900634765625,
0.0062255859375,
0.0037994384765625,
0.00437164306640625,
-0.0144500732421875,
-0.00647735595703125,
0.0015821456909179688,
0.035400390625,
-0.016876220703125,
0.004302978515625,
-0.00493621826171875,
-0.0400390625,
0.010284423828125,
0.0036525726318359375,
-0.01515960693359375,
-0.0033130645751953125,
0.0076904296875,
-0.01177978515625,
0.01165771484375,
-0.0274200439453125,
-0.00022864341735839844,
-0.010223388671875,
0.0248565673828125,
0.019317626953125,
-0.032928466796875,
0.0042572021484375,
0.01739501953125,
0.033599853515625,
0.0576171875,
0.047882080078125,
-0.01275634765625,
-0.0293731689453125,
0.0330810546875,
-0.031524658203125,
-0.0227203369140625,
0.05364990234375,
-0.03271484375,
-0.052337646484375,
-0.032623291015625,
0.050323486328125,
0.07708740234375,
-0.0103759765625,
-0.048309326171875,
0.0860595703125,
-0.03399658203125,
-0.025238037109375,
-0.0312042236328125,
0.01187896728515625,
-0.005634307861328125,
0.033111572265625,
0.0231475830078125,
-0.039703369140625,
-0.01381683349609375,
0.007213592529296875,
-0.020294189453125,
0.04547119140625,
-0.0225677490234375,
-0.0112762451171875,
-0.0643310546875,
-0.016143798828125,
-0.02606201171875,
-0.0261688232421875,
-0.01079559326171875,
0.0111083984375,
0.0132293701171875,
0.043670654296875,
-0.0255279541015625,
0.0010061264038085938,
0.005054473876953125,
0.01203155517578125,
0.0148162841796875,
0.004810333251953125,
-0.01531982421875,
-0.0222015380859375,
-0.006381988525390625,
0.0204010009765625,
-0.0006265640258789062,
-0.0037097930908203125,
-0.018280029296875,
-0.04339599609375,
-0.039093017578125,
-0.00345611572265625,
0.0265350341796875,
-0.0670166015625,
-0.00878143310546875,
0.0299224853515625,
-0.011962890625,
-0.016754150390625,
0.0150909423828125,
-0.0252838134765625,
-0.0211334228515625,
-0.0187530517578125,
-0.0176544189453125,
-0.032012939453125,
0.01438140869140625,
0.02337646484375,
-0.03875732421875,
-0.0280609130859375,
-0.0193634033203125,
-0.0038204193115234375,
-0.017181396484375,
-0.0241546630859375,
-0.0166778564453125,
0.01129913330078125,
-0.020477294921875,
0.00159454345703125,
-0.0021915435791015625,
0.042388916015625,
-0.01617431640625,
0.005275726318359375,
-0.03936767578125,
0.005176544189453125,
0.0116729736328125,
-0.0338134765625,
-0.004489898681640625,
0.058502197265625,
0.03253173828125,
0.044219970703125,
0.0079193115234375,
0.040771484375,
0.00440216064453125,
0.030853271484375,
0.00414276123046875,
-0.0202178955078125,
0.02532958984375,
-0.03338623046875,
0.0038909912109375,
-0.052886962890625,
-0.002716064453125,
-0.0208587646484375,
-0.002838134765625,
0.02008056640625,
-0.04632568359375,
0.024505615234375
] |
2b911545ace564482ff508c25066878aac78951e | Wordpress Stackexchange
Q: SVG files not uploading since most recent WP update I have a snippet in my functions PHP file that allows me to upload SVG files. Since upgrading to the latest version of WP today, I can no longer upload svgs. I also tried a second code snippet from CSS tricks website and that doesn't work either.
Does anyone know a) what may have caused this with the last update and b) Does anyone know a work around.
Here is the code I normally use:
function svg_mime_types( $mimes ) {
mimes['svg'] = 'image/svg+xml';
return $mimes;}
add_filter( 'upload_mimes', 'svg_mime_types' );
Many thanks
Paul.
A: Seems like this might be related to this ticket https://core.trac.wordpress.org/ticket/39552, looks like something that got broken in 4.7.1
| Q: SVG files not uploading since most recent WP update I have a snippet in my functions PHP file that allows me to upload SVG files. Since upgrading to the latest version of WP today, I can no longer upload svgs. I also tried a second code snippet from CSS tricks website and that doesn't work either.
Does anyone know a) what may have caused this with the last update and b) Does anyone know a work around.
Here is the code I normally use:
function svg_mime_types( $mimes ) {
mimes['svg'] = 'image/svg+xml';
return $mimes;}
add_filter( 'upload_mimes', 'svg_mime_types' );
Many thanks
Paul.
A: Seems like this might be related to this ticket https://core.trac.wordpress.org/ticket/39552, looks like something that got broken in 4.7.1
A: Nobody seems to have just worked with what is and that's too bad so here's how I handled...
History / Background
I created a SVG uploader in 2015 based upon a CSS-Tricks article looking at what was. I Also got grid working for image preview, and used a few other fixes. Simple plugin (IMO file-type plugins should be simple)
Solution
There were a few changes for 4.7. The real PITA was that for image/ mime types WP is now using GD on the images. To bypass this I set the svg extension to use application/svg+xml so GD wouldn't mess with the file.
Update: as of 4.7.2 some bright spark broke that too in some cases
Then later via hook we hotwire it back to image/svg+xml. It is the same used in other answers, but we firstly lock it down to our specific case to eliminate effects (is it an SVG file); we can rely on reading $data['ext'] (should be cheaper than the function to get file info as only one comparison and one array / hash access).
Update: as of 4.7.2 $data['ext'] is not always set, so we now if it's length is < 1 extract (potentially unsafe) extension from the filename using
strtolower(end(explode('.', $filename))). The reason I'm really fighting using FileInfo is that essentially relying on a PHP extension is too opaque and won't always work for everyone (especially not those compiling without or without access to enable extensions if it's not there). I'd like something that works in-lieu of an extension. It's no longer a matter of having the correct information so for those trusting the output of FileInfo and having the extension (I believe it's default in 5.6+) it should work. Also because this is a plugin, it's not modifying core you can turn off this code or unregister the hook.
https://github.com/Lewiscowles1986/WordPressSVGPlugin
See
*
*https://github.com/Lewiscowles1986/WordPressSVGPlugin/blob/master/wp-content/plugins/lc-wp-svg/index.php#L38
*https://github.com/Lewiscowles1986/WordPressSVGPlugin/blob/master/wp-content/plugins/lc-wp-svg/index.php#L74
*https://github.com/Lewiscowles1986/WordPressSVGPlugin/blob/master/wp-content/plugins/lc-wp-svg/index.php#L23
*https://github.com/Lewiscowles1986/WordPressSVGPlugin/blob/master/wp-content/plugins/lc-wp-svg/index.php#L79
Other workarounds
Allowing unfiltered uploads is a horrible solution because as others have said linking to this thread people could upload php files via media uploader (that's bad and if you do it, you should stop and think!)
Forcing every file through any function without checks (Ironically if you have image/ in the mime type you can't just have a simple ext check). This has the potential to create far wider reaching effects to solve a relatively niche problem and introduces more work overall (caveat my plugin also introduces more work for admin users to get admin media UI to work)
If we left the mime as application/svg+xml and simply filtered the mime types the image would upload but would AFAIK require fixes to be used as a featured image etc. There is more work to be done on ensuring universal SVG experience so I chose to pick battles carefully.
Hope this helps.
A: In WordPress 4.7.1 a change was introduced that checks for the real mime type of an uploaded file. This breaks uploading file types like SVG or DOCX. There already exist tickets for this issue in WordPress Core, where you can read more about this:
*
*Some Non-image files fail to upload after 4.7.1 (https://core.trac.wordpress.org/ticket/39550)
*SVG upload support broken in 4.7.1 (https://core.trac.wordpress.org/ticket/39552)
A temporary and recommended workaround (for the time until this issue is fixed) is the following plugin:
Disable Real MIME Check
If you don’t want to use that plugin, here’s the same functionality:
add_filter( 'wp_check_filetype_and_ext', function($data, $file, $filename, $mimes) {
global $wp_version;
if ( '4.7.2' !== $wp_version ) {
return $data;
}
$filetype = wp_check_filetype( $filename, $mimes );
return [
'ext' => $filetype['ext'],
'type' => $filetype['type'],
'proper_filename' => $data['proper_filename']
];
}, 10, 4 );
Notice that this snipped has a version check included to disable the fix as soon as WordPress is updated.
Edit
The issue was initially set to be fixed in 4.7.2. But since 4.7.2 was an urgent security release, the fix didn’t make it into that version. It’s now supposed to be fixed in 4.7.3.
| wordpress | {
"language": "en",
"length": 776,
"provenance": "stackexchange_00019.jsonl.gz:471909",
"question_score": "17",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/252143"
} | [
0.054229736328125,
-0.041015625,
0.0228729248046875,
-0.0013284683227539062,
-0.007450103759765625,
-0.029266357421875,
0.0841064453125,
-0.0061492919921875,
0.04827880859375,
0.01336669921875,
-0.038421630859375,
0.0097503662109375,
-0.035369873046875,
-0.007843017578125,
-0.04132080078125,
-0.018890380859375,
0.06732177734375,
-0.053863525390625,
0.01297760009765625,
-0.0030002593994140625,
-0.013031005859375,
0.0517578125,
0.02728271484375,
0.08782958984375,
-0.04541015625,
-0.005847930908203125,
0.061370849609375,
-0.0321044921875,
-0.0426025390625,
-0.06756591796875,
-0.0263214111328125,
0.07421875,
0.00846099853515625,
0.061065673828125,
-0.06378173828125,
0.052764892578125,
0.0199127197265625,
0.0194091796875,
0.0183563232421875,
0.03912353515625,
0.0134429931640625,
-0.01003265380859375,
0.050323486328125,
0.01548004150390625,
0.01493072509765625,
-0.03350830078125,
0.0182342529296875,
-0.05126953125,
-0.023529052734375,
0.05169677734375,
0.016632080078125,
-0.005779266357421875,
0.00997161865234375,
0.03961181640625,
0.007724761962890625,
-0.0283966064453125,
-0.0178985595703125,
0.07086181640625,
0.0259246826171875,
0.0034961700439453125,
-0.033721923828125,
0.0308685302734375,
-0.0005788803100585938,
-0.02490234375,
-0.0296478271484375,
0.0224761962890625,
0.041839599609375,
-0.0197601318359375,
-0.038970947265625,
-0.046661376953125,
0.0279388427734375,
-0.0236663818359375,
0.01361846923828125,
-0.01983642578125,
0.0267486572265625,
-0.034423828125,
0.016143798828125,
-0.01446533203125,
-0.0035552978515625,
0.0265350341796875,
0.0180206298828125,
-0.032012939453125,
-0.05340576171875,
0.01036834716796875,
0.0099639892578125,
0.0173797607421875,
0.0094757080078125,
-0.0132293701171875,
-0.019683837890625,
0.00803375244140625,
-0.0189666748046875,
-0.0238800048828125,
-0.018218994140625,
0.033203125,
0.00693511962890625,
-0.0031032562255859375,
0.00231170654296875,
-0.0034122467041015625,
-0.018280029296875,
0.0132293701171875,
0.021209716796875,
-0.046051025390625,
0.0650634765625,
-0.02667236328125,
0.01013946533203125,
0.02825927734375,
-0.001964569091796875,
-0.02850341796875,
0.0088958740234375,
0.021270751953125,
-0.005290985107421875,
-0.01070404052734375,
0.030303955078125,
-0.041290283203125,
0.01247406005859375,
-0.004512786865234375,
0.00032067298889160156,
0.0181121826171875,
0.020263671875,
-0.0309295654296875,
-0.000499725341796875,
0.03704833984375,
-0.03326416015625,
-0.02752685546875,
0.021148681640625,
0.004940032958984375,
-0.003421783447265625,
-0.0038166046142578125,
0.0289306640625,
0.04473876953125,
-0.047149658203125,
0.004871368408203125,
0.032440185546875,
-0.01033782958984375,
-0.006381988525390625,
-0.03369140625,
0.017608642578125,
-0.02490234375,
-0.0147552490234375,
0.037506103515625,
0.00957489013671875,
-0.08123779296875,
-0.0306243896484375,
0.026519775390625,
-0.0018873214721679688,
0.01300811767578125,
0.00726318359375,
0.0198211669921875,
0.005779266357421875,
-0.03155517578125,
0.032928466796875,
-0.0258026123046875,
0.046661376953125,
0.0084991455078125,
-0.0031070709228515625,
-0.0791015625,
0.0390625,
-0.07611083984375,
0.0255889892578125,
-0.0855712890625,
-0.01776123046875,
-0.00946044921875,
0.044586181640625,
0.006816864013671875,
0.0112152099609375,
0.00960540771484375,
-0.0306854248046875,
-0.005474090576171875,
0.0313720703125,
0.044586181640625,
-0.00809478759765625,
-0.027587890625,
0.03680419921875,
0.022674560546875,
-0.0204315185546875,
0.020904541015625,
0.0296630859375,
0.018157958984375,
0.0189361572265625,
0.037506103515625,
-0.013397216796875,
-0.03057861328125,
0.07659912109375,
-0.042816162109375,
-0.025787353515625,
-0.01139068603515625,
0.022125244140625,
0.010833740234375,
-0.005329132080078125,
-0.0001634359359741211,
0.058074951171875,
0.0283050537109375,
-0.0175628662109375,
0.03521728515625,
0.00881195068359375,
-0.03973388671875,
-0.047332763671875,
-0.029876708984375,
-0.01837158203125,
-0.005950927734375,
0.005672454833984375,
-0.0028781890869140625,
0.004474639892578125,
-0.0040130615234375,
0.0289764404296875,
-0.0218505859375,
0.0171051025390625,
-0.005458831787109375,
-0.0215911865234375,
0.00887298583984375,
0.023345947265625,
-0.018310546875,
-0.036163330078125,
0.0362548828125,
-0.00222015380859375,
-0.0031299591064453125,
-0.01509857177734375,
0.0218048095703125,
-0.00940704345703125,
0.035125732421875,
-0.032562255859375,
-0.0129852294921875,
-0.0196990966796875,
0.0035552978515625,
-0.00598907470703125,
0.022369384765625,
-0.0172576904296875,
0.0196990966796875,
0.0310211181640625,
0.02435302734375,
0.0287017822265625,
-0.0260772705078125,
-0.0118408203125,
0.0127410888671875,
-0.0316162109375,
-0.015777587890625,
-0.0293731689453125,
-0.03656005859375,
0.01299285888671875,
0.03961181640625,
0.03997802734375,
0.0034503936767578125,
0.00952911376953125,
0.01045989990234375,
0.056671142578125,
-0.01325225830078125,
0.0162353515625,
-0.0236663818359375,
-0.0377197265625,
-0.03961181640625,
0.0399169921875,
0.0017919540405273438,
0.0286102294921875,
-0.0184783935546875,
0.01073455810546875,
0.030792236328125,
0.024932861328125,
0.00559234619140625,
-0.02386474609375,
0.031890869140625,
0.00978851318359375,
0.01316070556640625,
-0.050567626953125,
0.00505828857421875,
0.034088134765625,
0.0134735107421875,
0.029449462890625,
0.0240631103515625,
-0.033538818359375,
0.01508331298828125,
0.01491546630859375,
-0.005931854248046875,
0.002471923828125,
0.062255859375,
0.06585693359375,
0.04962158203125,
-0.037567138671875,
-0.04681396484375,
0.044403076171875,
0.06439208984375,
-0.04315185546875,
-0.0328369140625,
0.027923583984375,
0.001438140869140625,
-0.0062103271484375,
-0.03570556640625,
0.05987548828125,
-0.027587890625,
-0.03839111328125,
-0.017608642578125,
0.006877899169921875,
0.04095458984375,
-0.006866455078125,
0.01239013671875,
0.0191650390625,
0.00982666015625,
0.04376220703125,
-0.0228729248046875,
0.039642333984375,
-0.0321044921875,
0.0284271240234375,
0.0562744140625,
-0.029022216796875,
0.022491455078125,
0.0009350776672363281,
0.00829315185546875,
0.0005645751953125,
0.005054473876953125,
-0.01503753662109375,
-0.023468017578125,
-0.03314208984375,
-0.0033626556396484375,
0.0170745849609375,
-0.0159149169921875,
0.01448822021484375,
-0.01537322998046875,
-0.0224609375,
0.004642486572265625,
-0.0748291015625,
-0.04461669921875,
0.0005283355712890625,
-0.056915283203125,
0.00499725341796875,
-0.004360198974609375,
-0.0186920166015625,
-0.004573822021484375,
0.00588226318359375,
-0.0096435546875,
-0.00965118408203125,
0.0089111328125,
-0.07733154296875,
-0.039459228515625,
-0.07989501953125,
-0.01090240478515625,
-0.0127105712890625,
0.039276123046875,
0.015380859375,
0.003894805908203125,
-0.006092071533203125,
-0.0305023193359375,
0.025665283203125,
-0.0113525390625,
0.00681304931640625,
0.00832366943359375,
0.0300140380859375,
-0.0282135009765625,
0.0128021240234375,
-0.017547607421875,
0.036407470703125,
0.04937744140625,
-0.05224609375,
0.00006943941116333008,
-0.02825927734375,
-0.033843994140625,
-0.02813720703125,
0.07086181640625,
0.044952392578125,
-0.0472412109375,
0.0010881423950195312,
-0.050018310546875,
0.0184478759765625,
0.011566162109375,
0.01806640625,
0.013031005859375,
-0.052978515625,
-0.0281524658203125,
0.002246856689453125,
0.048583984375,
-0.004756927490234375,
0.029296875,
-0.0003483295440673828,
-0.0025348663330078125,
0.025726318359375,
-0.019256591796875,
-0.02398681640625,
-0.015838623046875,
0.0045013427734375,
-0.04217529296875,
0.06890869140625,
0.003932952880859375,
-0.012481689453125,
-0.006351470947265625,
-0.0084075927734375,
-0.038360595703125,
-0.04779052734375,
0.04119873046875,
-0.057098388671875,
-0.00799560546875,
-0.05902099609375,
-0.007556915283203125,
-0.042633056640625,
0.054107666015625,
0.003177642822265625,
-0.0212860107421875,
-0.028778076171875,
0.01611328125,
-0.062042236328125,
-0.040435791015625,
-0.0082550048828125,
0.017578125,
0.01071929931640625,
-0.0263824462890625,
-0.007633209228515625,
-0.03265380859375,
0.004207611083984375,
-0.037139892578125,
0.00438690185546875,
-0.0157318115234375,
0.0190887451171875,
0.0101165771484375,
-0.0162353515625,
0.0269317626953125,
-0.010101318359375,
-0.01480865478515625,
0.0020904541015625,
-0.0160064697265625,
-0.1319580078125,
-0.0079345703125,
-0.043212890625,
0.05218505859375,
-0.03216552734375,
0.04315185546875,
-0.041259765625,
0.05352783203125,
0.0110015869140625,
-0.0262451171875,
-0.0011739730834960938,
-0.0025386810302734375,
-0.0171051025390625,
0.005962371826171875,
-0.0243072509765625,
-0.0162353515625,
-0.01898193359375,
-0.0088348388671875,
-0.02734375,
-0.003265380859375,
-0.01111602783203125,
-0.03912353515625,
0.03277587890625,
-0.03375244140625,
-0.0009899139404296875,
-0.03082275390625,
-0.05029296875,
0.012298583984375,
-0.01488494873046875,
-0.01343536376953125,
-0.05816650390625,
-0.03668212890625,
0.08734130859375,
0.0200042724609375,
0.0010614395141601562,
-0.0164794921875,
0.07220458984375,
-0.0009112358093261719,
-0.04827880859375,
-0.066650390625,
-0.0004246234893798828,
0.034332275390625,
-0.006378173828125,
0.02520751953125,
0.0179595947265625,
-0.016632080078125,
0.0193023681640625,
0.005092620849609375,
0.0176239013671875,
-0.043701171875,
0.0218048095703125,
0.00867462158203125,
0.01363372802734375,
-0.01361083984375,
0.0125579833984375,
0.0225677490234375,
0.033782958984375,
0.00762176513671875,
-0.040557861328125,
0.00554656982421875,
0.049560546875,
0.0052490234375,
-0.01983642578125,
-0.047332763671875,
-0.049560546875,
0.002044677734375,
-0.0260772705078125,
0.050872802734375,
0.033721923828125,
-0.02191162109375,
0.06427001953125,
0.06280517578125,
0.005207061767578125,
-0.022552490234375,
-0.01169586181640625,
-0.017181396484375,
0.03326416015625,
-0.01453399658203125,
-0.005054473876953125,
-0.01220703125,
0.00015985965728759766,
0.02764892578125,
0.04345703125,
-0.00907135009765625,
-0.023223876953125,
0.00658416748046875,
-0.05133056640625,
-0.059722900390625,
0.01267242431640625,
-0.005977630615234375,
0.032073974609375,
0.00495147705078125,
0.004058837890625,
0.028900146484375,
0.023651123046875,
-0.013458251953125,
0.03448486328125,
0.03179931640625,
-0.035491943359375,
-0.033111572265625,
0.0140380859375,
0.035552978515625,
-0.0435791015625,
-0.0084075927734375,
-0.00724029541015625,
0.03350830078125,
0.00783538818359375,
0.031585693359375,
-0.020050048828125,
0.00980377197265625,
-0.03271484375,
0.0265960693359375,
-0.0150909423828125,
0.016021728515625,
-0.01078033447265625,
0.031707763671875,
-0.045318603515625,
-0.038177490234375,
0.0455322265625,
-0.036956787109375,
0.0082550048828125,
-0.0333251953125,
-0.0185394287109375,
-0.034820556640625,
0.03546142578125,
0.0487060546875,
-0.0262298583984375,
-0.034271240234375,
-0.01412200927734375,
-0.0173797607421875,
-0.049072265625,
-0.014434814453125,
0.0201873779296875,
-0.011444091796875,
-0.008209228515625,
-0.0191650390625,
-0.016387939453125,
-0.0274658203125,
-0.0035552978515625,
-0.08551025390625,
-0.01092529296875,
-0.0111541748046875,
-0.025848388671875,
0.0221405029296875,
-0.00732421875,
-0.0228118896484375,
-0.01507568359375,
0.0035114288330078125,
-0.010986328125,
0.01213836669921875,
0.027069091796875,
-0.01425933837890625,
-0.0294647216796875,
-0.01387786865234375,
-0.039398193359375,
-0.0227813720703125,
0.0283203125,
0.01456451416015625,
-0.02557373046875,
-0.0156707763671875,
0.0020427703857421875,
0.0218505859375,
0.0014677047729492188,
0.003627777099609375,
-0.029754638671875,
0.038421630859375,
0.0292510986328125,
0.06646728515625,
0.0192718505859375,
0.004974365234375,
-0.01277923583984375,
0.01308441162109375,
-0.005397796630859375,
-0.0011548995971679688,
-0.01021575927734375,
-0.03216552734375,
0.021636962890625,
-0.031646728515625,
-0.048858642578125,
-0.0273895263671875,
-0.03265380859375,
0.0162506103515625,
0.0634765625,
-0.01316070556640625,
0.013641357421875,
-0.0311126708984375,
0.0054931640625,
-0.0157318115234375,
0.00994873046875,
-0.0372314453125,
-0.036712646484375,
0.0180511474609375,
0.0007548332214355469,
-0.0022792816162109375,
-0.01540374755859375,
-0.0428466796875,
0.04962158203125,
0.0232696533203125,
0.01934814453125,
-0.0214996337890625,
0.02703857421875,
-0.0024585723876953125,
-0.006458282470703125,
-0.0220794677734375,
0.0114898681640625,
-0.0064849853515625,
0.025543212890625,
0.01515960693359375,
0.02777099609375,
0.006092071533203125,
0.0095062255859375,
0.0187225341796875,
-0.0145721435546875,
-0.0005931854248046875,
-0.019927978515625,
-0.01001739501953125,
-0.0026988983154296875,
0.01629638671875,
0.036346435546875,
-0.0185699462890625,
0.00795745849609375,
0.0142974853515625,
-0.0218963623046875,
0.0149383544921875,
-0.00531768798828125,
-0.0242767333984375,
-0.052947998046875,
0.0772705078125,
-0.036285400390625,
-0.015869140625,
0.041717529296875,
-0.0074920654296875,
-0.00670623779296875,
0.01152801513671875,
0.036468505859375,
0.0191802978515625,
-0.007648468017578125,
-0.036651611328125,
0.00876617431640625,
-0.0220794677734375,
-0.00971221923828125,
0.0116119384765625,
-0.0190582275390625,
-0.020538330078125,
-0.034515380859375,
-0.00505828857421875,
-0.018829345703125,
-0.0063934326171875,
0.007541656494140625,
-0.01849365234375,
0.07525634765625,
0.049530029296875,
0.01084136962890625,
-0.039794921875,
0.036285400390625,
0.0013217926025390625,
0.0731201171875,
-0.0035762786865234375,
0.01702880859375,
0.0224761962890625,
-0.021453857421875,
-0.0023021697998046875,
0.01123809814453125,
0.0126190185546875,
0.01280975341796875,
0.04803466796875,
0.060028076171875,
-0.037750244140625,
-0.01419830322265625,
0.04766845703125,
-0.016448974609375,
-0.0188751220703125,
0.0170745849609375,
-0.0006346702575683594,
-0.0189971923828125,
-0.0166778564453125,
0.010284423828125,
-0.034515380859375,
0.01175689697265625,
0.03118896484375,
-0.07220458984375,
0.09002685546875,
0.01136016845703125,
0.04473876953125,
0.0193023681640625,
0.0178680419921875,
-0.03790283203125,
-0.01617431640625,
-0.03692626953125,
0.0291290283203125,
-0.0160980224609375,
0.015533447265625,
-0.022552490234375,
0.028839111328125,
-0.01641845703125,
-0.0123443603515625,
0.046783447265625,
-0.0123138427734375,
-0.04052734375,
0.0214691162109375,
0.1339111328125,
0.07720947265625,
0.046051025390625,
0.019805908203125,
-0.0012502670288085938,
-0.046295166015625,
0.005641937255859375,
0.01056671142578125,
0.0215911865234375,
0.0040283203125,
-0.0120697021484375,
0.01116180419921875,
0.00252532958984375,
-0.01229095458984375,
-0.007732391357421875,
-0.03460693359375,
-0.04656982421875,
0.00621795654296875,
0.00557708740234375,
0.035491943359375,
-0.01226043701171875,
0.020721435546875,
-0.051361083984375,
0.0011548995971679688,
-0.00616455078125,
-0.0188140869140625,
0.00891876220703125,
-0.033966064453125,
-0.0231170654296875,
0.037872314453125,
0.028961181640625,
-0.04156494140625,
-0.0293426513671875,
-0.0112152099609375,
-0.0037250518798828125,
-0.0129241943359375,
0.027008056640625,
0.0115203857421875,
0.0325927734375,
-0.002788543701171875,
0.0273895263671875,
0.02587890625,
0.028717041015625,
-0.032470703125,
-0.00977325439453125,
0.0099945068359375,
-0.0286407470703125,
-0.00885772705078125,
-0.031494140625,
0.01018524169921875,
-0.0604248046875,
-0.07354736328125,
-0.0229644775390625,
0.0036983489990234375,
0.0085296630859375,
0.031524658203125,
0.007747650146484375,
0.033782958984375,
-0.041290283203125,
-0.01166534423828125,
-0.048431396484375,
0.032958984375,
0.0277252197265625,
0.06414794921875,
-0.007015228271484375,
0.07513427734375,
-0.02984619140625,
-0.0172576904296875,
0.0243988037109375,
0.01132965087890625,
-0.00756072998046875,
-0.0469970703125,
0.014068603515625,
-0.04779052734375,
0.01177215576171875,
0.01641845703125,
0.0219573974609375,
0.0164642333984375,
0.046478271484375,
-0.006771087646484375,
-0.05291748046875,
-0.0017309188842773438,
0.01641845703125,
-0.0309906005859375,
-0.042694091796875,
-0.043426513671875,
-0.0006384849548339844,
0.01708984375,
0.014617919921875,
0.033294677734375,
0.001979827880859375,
0.04095458984375,
-0.06317138671875,
0.03656005859375,
-0.005550384521484375,
-0.034942626953125,
0.03619384765625,
-0.0247344970703125,
0.046875,
-0.043609619140625,
-0.01190185546875,
0.004856109619140625,
-0.0166015625,
0.0163421630859375,
-0.021270751953125,
0.00855255126953125,
0.003887176513671875,
0.032806396484375,
-0.03240966796875,
-0.042388916015625,
0.0155181884765625,
0.035858154296875,
0.0003006458282470703,
0.03582763671875,
0.01324462890625,
-0.008331298828125,
-0.054443359375,
-0.02557373046875,
-0.0294189453125,
0.03985595703125,
0.0186614990234375,
0.0771484375,
-0.0300445556640625,
0.0206146240234375,
0.034759521484375,
0.01049041748046875,
-0.0129547119140625,
0.001373291015625,
0.052093505859375,
-0.02825927734375,
-0.02069091796875,
-0.0210418701171875,
-0.0307769775390625,
0.0518798828125,
0.006641387939453125,
-0.0233154296875,
0.02081298828125,
0.0014019012451171875,
0.002414703369140625,
0.046478271484375,
-0.015411376953125,
-0.045623779296875,
-0.040313720703125,
-0.0679931640625,
-0.0182037353515625,
0.0191497802734375,
-0.001956939697265625,
-0.01287078857421875,
0.0307769775390625,
-0.0126190185546875,
-0.061553955078125,
0.049072265625,
-0.07562255859375,
0.068603515625,
0.03729248046875,
0.0106658935546875,
-0.062164306640625,
-0.0406494140625,
-0.024627685546875,
-0.0229949951171875,
-0.0230865478515625,
0.031341552734375,
-0.030364990234375,
-0.025634765625,
0.0244140625,
0.021942138671875,
0.0200042724609375,
-0.046478271484375,
-0.0095977783203125,
0.045654296875,
0.00379180908203125,
-0.01038360595703125,
-0.00927734375,
0.00858306884765625,
-0.026702880859375,
-0.004669189453125,
0.038055419921875,
0.01093292236328125,
0.02459716796875,
0.00656890869140625,
0.0165557861328125,
0.0261077880859375,
-0.00836181640625,
-0.0469970703125,
0.0285797119140625,
-0.0306243896484375,
0.057220458984375,
-0.0284423828125,
0.0300750732421875,
0.00858306884765625,
0.0433349609375,
-0.04327392578125,
0.01220703125,
-0.0037746429443359375,
0.0111083984375,
0.0107269287109375,
-0.0031528472900390625,
-0.0135498046875,
0.0002739429473876953,
0.030487060546875,
-0.002685546875,
0.00701904296875,
0.051910400390625,
0.004638671875,
-0.0416259765625,
-0.047515869140625,
0.0135955810546875,
0.0042572021484375,
0.018341064453125,
0.020782470703125,
-0.0027103424072265625,
-0.050140380859375,
-0.07183837890625,
0.04827880859375,
0.018829345703125,
-0.047576904296875,
-0.12274169921875,
-0.005157470703125,
-0.039276123046875,
-0.0465087890625,
0.007457733154296875,
-0.004779815673828125,
-0.0200653076171875,
0.0252685546875,
-0.001003265380859375,
0.004100799560546875,
0.022308349609375,
0.030517578125,
-0.0110321044921875,
0.05413818359375,
-0.00597381591796875,
-9.5367431640625e-7,
-0.0073699951171875,
0.01351165771484375,
0.0030803680419921875,
-0.005832672119140625,
0.0032367706298828125,
-0.00763702392578125,
0.02874755859375,
0.031768798828125,
-0.0293121337890625,
-0.0005354881286621094,
0.01702880859375,
-0.00502777099609375,
-0.0026397705078125,
0.0002911090850830078,
-0.054290771484375,
-0.01953125,
0.054168701171875,
0.050018310546875,
0.02215576171875,
0.0000718832015991211,
0.0257720947265625,
-0.0200958251953125,
0.01280975341796875,
-0.004154205322265625,
-0.0249481201171875,
-0.01297760009765625,
-0.0207061767578125,
-0.00220489501953125,
0.007717132568359375,
-0.00005549192428588867,
-0.0111541748046875,
-0.01812744140625,
-0.0239105224609375,
0.002315521240234375,
-0.00467681884765625,
-0.0211944580078125,
0.00634765625,
0.055999755859375,
-0.01090240478515625,
0.0628662109375,
-0.03387451171875,
0.01861572265625,
0.0631103515625,
0.0167083740234375,
0.0640869140625,
-0.0018358230590820312,
-0.01739501953125,
0.0169525146484375,
0.041778564453125,
-0.0249786376953125,
-0.007343292236328125,
-0.066650390625,
-0.0016984939575195312,
0.0081024169921875,
-0.001735687255859375,
-0.00380706787109375,
0.01332855224609375,
0.01261138916015625,
-0.01262664794921875,
0.00994110107421875,
0.0234832763671875,
-0.0131378173828125,
-0.0265350341796875,
0.06866455078125,
-0.041168212890625,
-0.035186767578125,
-0.04034423828125,
-0.0157623291015625,
0.0142059326171875,
0.037994384765625,
0.0253143310546875,
0.0051727294921875,
0.005672454833984375,
-0.10028076171875,
0.015777587890625,
-0.004245758056640625
] |
aae3c95aff721c6fce071b3d778181b0b0d00cdf | Wordpress Stackexchange
Q: Cant upload SVG files after updating Wordpress 4.7.1 I updated Wordpress to 4.7.1 and cant upload SVG anymore.
I had a function in my functions.php file
function cc_mime_types($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'cc_mime_types');
but it also dont help now.
A: Per the thread below, a temporary solution would be to add this code to your wp-config file:
define( 'ALLOW_UNFILTERED_UPLOADS', true );
https://wordpress.org/support/topic/wp-4-7-1-kills-svg/page/3/
| Q: Cant upload SVG files after updating Wordpress 4.7.1 I updated Wordpress to 4.7.1 and cant upload SVG anymore.
I had a function in my functions.php file
function cc_mime_types($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'cc_mime_types');
but it also dont help now.
A: Per the thread below, a temporary solution would be to add this code to your wp-config file:
define( 'ALLOW_UNFILTERED_UPLOADS', true );
https://wordpress.org/support/topic/wp-4-7-1-kills-svg/page/3/
A: If you're the only one who has the ability to upload files to WordPress, no.
But if you allow users to register and comment on your blog, yes..
It is a temporary fix to allow you to upload files. Feel free to remove the code after you upload the SVG files.
| wordpress | {
"language": "en",
"length": 119,
"provenance": "stackexchange_00019.jsonl.gz:471931",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/252253"
} | [
0.053314208984375,
-0.0259552001953125,
0.0274810791015625,
-0.01529693603515625,
0.00814056396484375,
-0.017669677734375,
0.0850830078125,
-0.00754547119140625,
0.048675537109375,
0.01544189453125,
-0.0216217041015625,
0.0084228515625,
-0.035125732421875,
-0.011199951171875,
-0.03985595703125,
-0.021026611328125,
0.06182861328125,
-0.05255126953125,
0.0108642578125,
-0.01062774658203125,
0.0011882781982421875,
0.033477783203125,
0.032806396484375,
0.07781982421875,
-0.043975830078125,
-0.00659942626953125,
0.08941650390625,
-0.027130126953125,
-0.04901123046875,
-0.0653076171875,
-0.0240936279296875,
0.07318115234375,
0.01401519775390625,
0.0513916015625,
-0.0682373046875,
0.04412841796875,
0.006816864013671875,
0.0178070068359375,
0.01371002197265625,
0.0283966064453125,
0.0294036865234375,
-0.02362060546875,
0.0491943359375,
0.042266845703125,
0.019073486328125,
-0.0262451171875,
0.0222015380859375,
-0.0723876953125,
-0.0080413818359375,
0.065673828125,
-0.00998687744140625,
0.006076812744140625,
-0.0157623291015625,
0.06353759765625,
0.00524139404296875,
-0.035247802734375,
0.003398895263671875,
0.05645751953125,
0.02923583984375,
0.0178375244140625,
-0.0290985107421875,
0.03424072265625,
-0.0051727294921875,
-0.038818359375,
-0.01471710205078125,
0.0307159423828125,
0.0283203125,
-0.03155517578125,
-0.042236328125,
-0.0223236083984375,
0.03173828125,
-0.036163330078125,
0.0191802978515625,
-0.0124969482421875,
0.059326171875,
-0.0296630859375,
-0.00550079345703125,
0.00548553466796875,
0.00708770751953125,
0.039581298828125,
0.0282440185546875,
-0.04541015625,
-0.059326171875,
0.004314422607421875,
0.00839996337890625,
0.0193328857421875,
0.0161895751953125,
-0.01068115234375,
-0.024566650390625,
0.010894775390625,
-0.0184783935546875,
-0.04248046875,
-0.005615234375,
0.035675048828125,
0.004833221435546875,
-0.0023555755615234375,
0.006290435791015625,
-0.01383209228515625,
-0.020172119140625,
0.0127105712890625,
0.0184173583984375,
-0.0435791015625,
0.060882568359375,
-0.0284576416015625,
0.0010194778442382812,
0.01513671875,
0.00287628173828125,
0.0214080810546875,
0.026824951171875,
0.032501220703125,
-0.0016489028930664062,
-0.00565338134765625,
0.01459503173828125,
-0.023345947265625,
-0.0036449432373046875,
0.00965118408203125,
-0.0033416748046875,
0.0150146484375,
0.00815582275390625,
-0.002658843994140625,
0.00011134147644042969,
0.03704833984375,
-0.033538818359375,
-0.051300048828125,
0.0311737060546875,
-0.0010433197021484375,
-0.0140228271484375,
-0.004276275634765625,
0.0144500732421875,
0.026214599609375,
-0.0301361083984375,
0.0119781494140625,
0.0207977294921875,
0.01739501953125,
-0.0011539459228515625,
-0.019866943359375,
0.027984619140625,
-0.03045654296875,
-0.00673675537109375,
0.034881591796875,
0.0301971435546875,
-0.08258056640625,
-0.040313720703125,
0.0433349609375,
0.00858306884765625,
0.0259857177734375,
0.01018524169921875,
0.007762908935546875,
0.0021228790283203125,
-0.02587890625,
0.013397216796875,
-0.00705718994140625,
0.05706787109375,
-0.004192352294921875,
-0.0030765533447265625,
-0.0880126953125,
0.02642822265625,
-0.0633544921875,
0.0247650146484375,
-0.084228515625,
-0.0207672119140625,
0.0004949569702148438,
0.053497314453125,
0.0355224609375,
0.038909912109375,
0.0164642333984375,
-0.0142822265625,
-0.002689361572265625,
0.0282440185546875,
0.026275634765625,
-0.011871337890625,
-0.00795745849609375,
0.04241943359375,
0.012847900390625,
-0.0150299072265625,
0.0207366943359375,
0.0477294921875,
0.007625579833984375,
0.01441192626953125,
0.05462646484375,
-0.00211334228515625,
-0.0189056396484375,
0.075927734375,
-0.044097900390625,
-0.01904296875,
0.006168365478515625,
0.00579071044921875,
-0.0008044242858886719,
0.00890350341796875,
-0.01073455810546875,
0.04791259765625,
0.03558349609375,
-0.021759033203125,
0.026092529296875,
0.00981903076171875,
-0.044036865234375,
-0.02972412109375,
-0.026641845703125,
-0.01528167724609375,
-0.0019550323486328125,
0.040679931640625,
0.0034694671630859375,
0.0161895751953125,
-0.0190277099609375,
0.02423095703125,
-0.023162841796875,
0.0230255126953125,
-0.0026874542236328125,
-0.0265045166015625,
0.0178070068359375,
0.0284271240234375,
-0.01273345947265625,
-0.039031982421875,
0.042083740234375,
0.010040283203125,
0.0026569366455078125,
-0.0203094482421875,
0.0286102294921875,
-0.01329803466796875,
0.037628173828125,
-0.038848876953125,
-0.0177764892578125,
-0.005939483642578125,
0.0014066696166992188,
-0.0015325546264648438,
0.0146636962890625,
-0.005725860595703125,
0.017852783203125,
0.034027099609375,
0.0290069580078125,
0.0108489990234375,
-0.0208587646484375,
-0.0276031494140625,
0.0016164779663085938,
-0.026275634765625,
-0.017364501953125,
-0.0273895263671875,
-0.049407958984375,
0.0204315185546875,
0.04095458984375,
0.051361083984375,
-0.00408172607421875,
0.0033206939697265625,
-0.005527496337890625,
0.053253173828125,
-0.0240325927734375,
0.0162811279296875,
-0.0245513916015625,
-0.049407958984375,
-0.033355712890625,
0.030853271484375,
0.0117950439453125,
0.02392578125,
-0.0141143798828125,
-0.0033855438232421875,
0.0293731689453125,
0.0205841064453125,
0.0007638931274414062,
-0.0265045166015625,
0.0240478515625,
0.01505279541015625,
0.0174713134765625,
-0.0577392578125,
0.015777587890625,
0.037567138671875,
0.009918212890625,
0.0283966064453125,
0.028106689453125,
-0.0416259765625,
0.01093292236328125,
0.033355712890625,
0.01396942138671875,
0.0106201171875,
0.04229736328125,
0.06463623046875,
0.057342529296875,
-0.029815673828125,
-0.038055419921875,
0.0477294921875,
0.05413818359375,
-0.0171356201171875,
-0.0124053955078125,
0.0302886962890625,
0.0016689300537109375,
-0.0226593017578125,
-0.0222320556640625,
0.06207275390625,
0.005214691162109375,
-0.039794921875,
-0.0265045166015625,
0.00788116455078125,
0.04388427734375,
0.00846099853515625,
0.007801055908203125,
0.018280029296875,
0.0123443603515625,
0.0489501953125,
0.00589752197265625,
0.0217437744140625,
-0.0200042724609375,
0.053863525390625,
0.052947998046875,
-0.053375244140625,
0.051300048828125,
0.00249481201171875,
0.00803375244140625,
0.00923919677734375,
0.0269622802734375,
0.007205963134765625,
-0.0172271728515625,
-0.0279388427734375,
-0.00396728515625,
0.005939483642578125,
-0.031341552734375,
0.009857177734375,
-0.013031005859375,
-0.0193328857421875,
-0.0113372802734375,
-0.06475830078125,
-0.04083251953125,
0.00885009765625,
-0.036590576171875,
-0.01512908935546875,
0.0035724639892578125,
-0.01560211181640625,
0.00010770559310913086,
0.017486572265625,
-0.01361846923828125,
-0.0120086669921875,
0.0113525390625,
-0.0697021484375,
-0.0384521484375,
-0.06781005859375,
-0.015106201171875,
-0.01451873779296875,
0.035980224609375,
0.0195770263671875,
-0.005382537841796875,
0.000209808349609375,
-0.0164337158203125,
0.04547119140625,
0.0111846923828125,
0.0036525726318359375,
0.00836181640625,
0.00942230224609375,
-0.00839996337890625,
0.01111602783203125,
-0.009368896484375,
0.032440185546875,
0.051422119140625,
-0.04644775390625,
-0.002086639404296875,
-0.01413726806640625,
-0.0447998046875,
-0.025665283203125,
0.06256103515625,
0.03082275390625,
-0.04937744140625,
0.005069732666015625,
-0.05792236328125,
0.0006012916564941406,
0.0231781005859375,
0.0147857666015625,
-0.0033435821533203125,
-0.054779052734375,
-0.0237274169921875,
-0.00463104248046875,
0.059173583984375,
-0.01139068603515625,
0.01378631591796875,
0.003498077392578125,
-0.0019683837890625,
0.02362060546875,
-0.0209503173828125,
-0.033050537109375,
-0.0205078125,
0.0208740234375,
-0.03936767578125,
0.07586669921875,
0.0218963623046875,
-0.020294189453125,
-0.00824737548828125,
-0.00506591796875,
-0.033172607421875,
-0.0322265625,
0.04925537109375,
-0.05462646484375,
-0.003070831298828125,
-0.0521240234375,
-0.02264404296875,
-0.037200927734375,
0.056671142578125,
0.015106201171875,
-0.0065765380859375,
-0.020751953125,
-0.001255035400390625,
-0.039337158203125,
-0.031585693359375,
-0.0343017578125,
0.01360321044921875,
0.0049591064453125,
-0.0193939208984375,
-0.0113525390625,
-0.023193359375,
-0.007160186767578125,
-0.0258026123046875,
0.003704071044921875,
-0.018890380859375,
0.00724029541015625,
-0.00518035888671875,
-0.023681640625,
0.0211639404296875,
-0.0285186767578125,
-0.01168060302734375,
0.00872039794921875,
-0.021759033203125,
-0.1431884765625,
-0.0109405517578125,
-0.03765869140625,
0.08404541015625,
-0.032989501953125,
0.048614501953125,
-0.042388916015625,
0.06427001953125,
0.0159912109375,
-0.0325927734375,
-0.0030574798583984375,
-0.00714111328125,
-0.038116455078125,
-0.004291534423828125,
-0.030517578125,
-0.0255584716796875,
-0.0177459716796875,
-0.014739990234375,
-0.02947998046875,
-0.022308349609375,
-0.01523590087890625,
-0.036590576171875,
0.021270751953125,
-0.0258331298828125,
-0.01532745361328125,
-0.05035400390625,
-0.031280517578125,
0.01140594482421875,
-0.005550384521484375,
-0.00231170654296875,
-0.0693359375,
-0.04656982421875,
0.07342529296875,
0.012115478515625,
0.0006914138793945312,
-0.0180206298828125,
0.056640625,
-0.0032215118408203125,
-0.044219970703125,
-0.031707763671875,
-0.00800323486328125,
0.02386474609375,
0.0033473968505859375,
0.01739501953125,
0.007183074951171875,
-0.01146697998046875,
0.0168609619140625,
-0.001804351806640625,
-0.01366424560546875,
-0.02728271484375,
0.0543212890625,
0.00829315185546875,
0.0010700225830078125,
-0.0130615234375,
-0.01052093505859375,
0.02685546875,
0.03558349609375,
0.01806640625,
-0.050933837890625,
-0.003681182861328125,
0.046875,
0.02606201171875,
-0.03363037109375,
-0.046875,
-0.08416748046875,
0.0269317626953125,
-0.0211944580078125,
0.049713134765625,
-0.0017499923706054688,
-0.006824493408203125,
0.07574462890625,
0.050811767578125,
-0.01457977294921875,
-0.0009031295776367188,
-0.01496124267578125,
-0.004985809326171875,
0.006755828857421875,
0.02313232421875,
-0.0271759033203125,
0.000005543231964111328,
-0.00389862060546875,
0.01306915283203125,
0.03778076171875,
-0.01482391357421875,
-0.01947021484375,
0.0159454345703125,
-0.032806396484375,
-0.054595947265625,
0.01111602783203125,
-0.01239776611328125,
0.0301513671875,
0.01160430908203125,
0.0018014907836914062,
0.01467132568359375,
0.0294342041015625,
-0.00921630859375,
0.03350830078125,
0.0243377685546875,
-0.03167724609375,
-0.0262603759765625,
0.006008148193359375,
0.04010009765625,
-0.045135498046875,
-0.01123046875,
0.005279541015625,
0.05487060546875,
-0.00260162353515625,
0.035888671875,
-0.02386474609375,
-0.01380157470703125,
-0.023040771484375,
0.0166015625,
-0.0360107421875,
0.01111602783203125,
-0.0226593017578125,
0.037353515625,
-0.02899169921875,
-0.041656494140625,
0.06658935546875,
-0.0227203369140625,
0.0013475418090820312,
-0.027099609375,
-0.018035888671875,
-0.0384521484375,
0.035980224609375,
0.041748046875,
-0.0284881591796875,
-0.0325927734375,
-0.005992889404296875,
-0.0140533447265625,
-0.039337158203125,
-0.0247650146484375,
0.01430511474609375,
-0.01203155517578125,
-0.01837158203125,
-0.0122222900390625,
-0.007598876953125,
-0.0345458984375,
-0.004955291748046875,
-0.095703125,
-0.006481170654296875,
-0.010894775390625,
-0.016082763671875,
0.0201263427734375,
-0.00899505615234375,
-0.0308990478515625,
-0.01297760009765625,
0.01079559326171875,
-0.000919342041015625,
0.014312744140625,
0.01126861572265625,
-0.0253143310546875,
-0.0165252685546875,
-0.02490234375,
-0.04766845703125,
-0.03643798828125,
0.029876708984375,
0.0273895263671875,
-0.021575927734375,
0.00911712646484375,
-0.01300811767578125,
0.0262603759765625,
-0.0109405517578125,
0.0195770263671875,
-0.010528564453125,
0.043365478515625,
0.0106201171875,
0.07513427734375,
0.026702880859375,
-0.001110076904296875,
-0.0156097412109375,
-0.00763702392578125,
-0.01233673095703125,
-0.0161285400390625,
-0.025543212890625,
-0.01806640625,
0.0216827392578125,
-0.0299072265625,
-0.05755615234375,
-0.0201263427734375,
-0.041839599609375,
0.006221771240234375,
0.044525146484375,
-0.01300811767578125,
0.0215911865234375,
-0.0352783203125,
0.00382232666015625,
-0.015899658203125,
0.0197296142578125,
-0.048431396484375,
-0.0155487060546875,
0.0260467529296875,
0.00174713134765625,
0.033203125,
-0.0157318115234375,
-0.0584716796875,
0.052947998046875,
0.0142364501953125,
0.032440185546875,
-0.003139495849609375,
0.0153350830078125,
0.00926971435546875,
-0.00377655029296875,
-0.0258026123046875,
0.01174163818359375,
-0.0002536773681640625,
0.0267486572265625,
0.033782958984375,
0.0075531005859375,
-0.0107421875,
0.011383056640625,
-0.0035533905029296875,
-0.0246734619140625,
-0.0004169940948486328,
-0.0276947021484375,
-0.001857757568359375,
0.0028743743896484375,
-0.0009927749633789062,
0.03704833984375,
-0.001575469970703125,
0.01464080810546875,
0.01953125,
-0.0098419189453125,
0.0224151611328125,
0.0017108917236328125,
-0.0150299072265625,
-0.0352783203125,
0.05926513671875,
-0.037811279296875,
-0.01023101806640625,
0.031463623046875,
-0.0014543533325195312,
-0.0154266357421875,
0.030426025390625,
0.04010009765625,
0.0244598388671875,
0.0182647705078125,
-0.05438232421875,
-0.004116058349609375,
-0.01476287841796875,
-0.0019054412841796875,
0.021331787109375,
-0.0220947265625,
-0.015655517578125,
-0.0272979736328125,
0.004505157470703125,
-0.01392364501953125,
-0.0132293701171875,
0.01062774658203125,
-0.00627899169921875,
0.0670166015625,
0.040435791015625,
0.0205230712890625,
-0.05743408203125,
0.0309906005859375,
-0.00031304359436035156,
0.063720703125,
-0.002071380615234375,
0.00218963623046875,
0.031402587890625,
-0.0192718505859375,
-0.01009368896484375,
0.0013570785522460938,
0.0201873779296875,
0.007228851318359375,
0.051361083984375,
0.0478515625,
-0.027435302734375,
-0.01473236083984375,
0.055389404296875,
-0.0159759521484375,
-0.032257080078125,
0.017730712890625,
-0.00768280029296875,
-0.0291290283203125,
-0.0301055908203125,
0.0103759765625,
-0.040435791015625,
0.0194549560546875,
0.03790283203125,
-0.07733154296875,
0.07928466796875,
-0.01212310791015625,
0.04547119140625,
0.0159149169921875,
0.0125732421875,
-0.0263214111328125,
-0.015289306640625,
-0.01523590087890625,
0.01953125,
-0.013519287109375,
0.00823974609375,
0.001865386962890625,
0.021575927734375,
-0.007099151611328125,
0.00994110107421875,
0.03985595703125,
-0.011322021484375,
-0.035491943359375,
0.0202484130859375,
0.11883544921875,
0.0682373046875,
0.044677734375,
0.02105712890625,
-0.032623291015625,
-0.050628662109375,
0.00344085693359375,
0.0030994415283203125,
0.01849365234375,
0.01067352294921875,
-0.0391845703125,
-0.010040283203125,
0.006870269775390625,
0.00914764404296875,
-0.0161590576171875,
-0.0012950897216796875,
-0.012359619140625,
-0.01004791259765625,
-0.006839752197265625,
0.050048828125,
-0.019622802734375,
0.0027618408203125,
-0.0665283203125,
-0.022979736328125,
-0.00640106201171875,
-0.0229034423828125,
0.0068817138671875,
-0.035980224609375,
-0.01910400390625,
0.03497314453125,
0.02532958984375,
-0.0178680419921875,
-0.0311279296875,
-0.01132965087890625,
0.005603790283203125,
-0.0190582275390625,
0.0204925537109375,
0.020111083984375,
0.045501708984375,
0.0168609619140625,
0.04022216796875,
0.018707275390625,
0.006824493408203125,
-0.028045654296875,
-0.021697998046875,
0.01496124267578125,
-0.0240631103515625,
-0.0087738037109375,
-0.03131103515625,
0.0013456344604492188,
-0.0673828125,
-0.0589599609375,
-0.0350341796875,
0.01497650146484375,
0.0253753662109375,
0.0305023193359375,
0.0079803466796875,
0.04315185546875,
-0.055999755859375,
0.00563812255859375,
-0.06109619140625,
0.0150909423828125,
0.03118896484375,
0.05487060546875,
0.0141754150390625,
0.06390380859375,
0.01448822021484375,
-0.0209197998046875,
0.0197296142578125,
0.0170745849609375,
-0.004108428955078125,
-0.03265380859375,
0.007236480712890625,
-0.05413818359375,
0.0281982421875,
0.0196685791015625,
0.02618408203125,
0.00963592529296875,
0.05047607421875,
0.01031494140625,
-0.03973388671875,
-0.006732940673828125,
0.01483917236328125,
-0.0211181640625,
-0.03839111328125,
-0.04791259765625,
0.01031494140625,
0.0182037353515625,
0.0117034912109375,
0.032470703125,
0.0037517547607421875,
0.04498291015625,
-0.047119140625,
0.037139892578125,
-0.005977630615234375,
-0.032806396484375,
0.03045654296875,
-0.0126953125,
0.036712646484375,
-0.03253173828125,
-0.0017518997192382812,
0.01708984375,
-0.023956298828125,
0.00048232078552246094,
-0.028167724609375,
0.007404327392578125,
-0.00978851318359375,
0.033843994140625,
-0.040313720703125,
-0.049407958984375,
0.005580902099609375,
0.06439208984375,
-0.0258026123046875,
0.043792724609375,
0.017059326171875,
-0.0211639404296875,
-0.06976318359375,
-0.0230255126953125,
-0.022552490234375,
0.035186767578125,
0.0020732879638671875,
0.06756591796875,
-0.0206756591796875,
0.00885009765625,
0.00975799560546875,
0.0224761962890625,
-0.0178375244140625,
-0.01338958740234375,
0.05853271484375,
-0.011138916015625,
-0.01284027099609375,
-0.01739501953125,
-0.00817108154296875,
0.057373046875,
0.0045928955078125,
-0.0230865478515625,
0.02130126953125,
-0.00013017654418945312,
0.005794525146484375,
0.03900146484375,
0.0054779052734375,
-0.037811279296875,
-0.0208587646484375,
-0.05535888671875,
-0.0161590576171875,
0.022308349609375,
-0.0113067626953125,
-0.019683837890625,
0.037261962890625,
0.0027294158935546875,
-0.03375244140625,
0.046142578125,
-0.05865478515625,
0.07373046875,
0.0367431640625,
-0.00971221923828125,
-0.040435791015625,
-0.0211029052734375,
-0.023193359375,
0.004848480224609375,
-0.032928466796875,
0.0367431640625,
-0.0308074951171875,
-0.053436279296875,
0.036590576171875,
-0.007354736328125,
0.0224761962890625,
-0.04498291015625,
-0.009429931640625,
0.01332855224609375,
0.0294342041015625,
-0.00043892860412597656,
-0.01294708251953125,
0.0111846923828125,
-0.02447509765625,
-0.0183868408203125,
0.024871826171875,
0.009552001953125,
0.005794525146484375,
0.01235198974609375,
0.02227783203125,
0.04351806640625,
0.00557708740234375,
-0.05352783203125,
0.05450439453125,
-0.05517578125,
0.034027099609375,
0.002979278564453125,
0.0296173095703125,
-0.01235198974609375,
0.00860595703125,
-0.032684326171875,
-0.002376556396484375,
-0.010284423828125,
0.041595458984375,
0.02337646484375,
-0.0160980224609375,
-0.020172119140625,
0.01052093505859375,
-0.005344390869140625,
0.003887176513671875,
-0.00606536865234375,
0.0538330078125,
-0.00313568115234375,
-0.039215087890625,
-0.057037353515625,
0.00885009765625,
0.001308441162109375,
0.007312774658203125,
0.0253143310546875,
-0.0212860107421875,
-0.0614013671875,
-0.044708251953125,
0.0322265625,
0.01209259033203125,
-0.045013427734375,
-0.131103515625,
0.007236480712890625,
-0.03729248046875,
-0.05096435546875,
0.01050567626953125,
0.0029926300048828125,
-0.020843505859375,
0.0289459228515625,
0.007205963134765625,
-0.00494384765625,
0.0244293212890625,
0.0273590087890625,
-0.0217132568359375,
0.0174560546875,
-0.00039887428283691406,
-0.0126495361328125,
-0.003681182861328125,
0.006679534912109375,
0.0114288330078125,
-0.04205322265625,
-0.01263427734375,
-0.0018873214721679688,
0.0231170654296875,
0.031890869140625,
-0.0130462646484375,
-0.0074615478515625,
0.0184783935546875,
-0.0173797607421875,
0.013641357421875,
-0.0177764892578125,
-0.059661865234375,
-0.02386474609375,
0.061004638671875,
0.031341552734375,
0.022705078125,
-0.0088653564453125,
0.031585693359375,
-0.0299530029296875,
0.0134124755859375,
0.005535125732421875,
-0.02239990234375,
-0.00127410888671875,
-0.0063323974609375,
0.006000518798828125,
0.0251312255859375,
0.0178070068359375,
-0.022308349609375,
0.00014901161193847656,
-0.03753662109375,
-0.00069427490234375,
0.001743316650390625,
-0.041839599609375,
0.0211944580078125,
0.05352783203125,
-0.01148223876953125,
0.0679931640625,
-0.037384033203125,
0.01096343994140625,
0.07366943359375,
0.00989532470703125,
0.0587158203125,
0.00814056396484375,
-0.0191650390625,
0.011505126953125,
0.039825439453125,
-0.017333984375,
-0.0006418228149414062,
-0.059112548828125,
-0.004795074462890625,
0.0097503662109375,
0.0005435943603515625,
0.007640838623046875,
-0.018035888671875,
0.0201568603515625,
-0.00476837158203125,
0.021087646484375,
0.0347900390625,
-0.04107666015625,
-0.0221099853515625,
0.0570068359375,
-0.027130126953125,
-0.042266845703125,
-0.0254669189453125,
-0.03350830078125,
0.0111083984375,
0.046142578125,
0.0273590087890625,
0.0034008026123046875,
0.009552001953125,
-0.09979248046875,
0.01244354248046875,
-0.004058837890625
] |
98aaad9b9d2a6193e4988749ed012e36cd425247 | Wordpress Stackexchange
Q: if post id matches these id's then do this I'm still a noob with php but I'm trying to display a different layout for my Wordpress webpage for a single post id.
I thought it would have been simple but I've tried a quiet few variations of the code below. Including is_singular and without the $post etc. and I've ran out of inspiration. What can I do? What do I need to look for? Can anyone help me out?
<?php
if (is_single ($post = '2578')) {
get_template_part('partials/content', 'challenge');
}
elseif (is_single ($post = '')) {
get_template_part('partials/challenge/content', 'challenge-2');
get_template_part('partials/challenge/content', 'categories');
get_template_part('partials/challenge/content', 'snake-checklist');
get_template_part('partials/challenge/content', 'timeline');
}?>
A: The function get_the_ID() will work regardless of post type (if it's a page, post, or custom post).
You could use that function to perform your conditional check.
if ( get_the_ID() === 2578) {
get_template_part('partials/content', 'challenge');
}
else{
// Add other template calls, or additional conditions, is_single, is_archive, etc.
}?>
Noting that this function won't work on archives since they don't have ID's.
| Q: if post id matches these id's then do this I'm still a noob with php but I'm trying to display a different layout for my Wordpress webpage for a single post id.
I thought it would have been simple but I've tried a quiet few variations of the code below. Including is_singular and without the $post etc. and I've ran out of inspiration. What can I do? What do I need to look for? Can anyone help me out?
<?php
if (is_single ($post = '2578')) {
get_template_part('partials/content', 'challenge');
}
elseif (is_single ($post = '')) {
get_template_part('partials/challenge/content', 'challenge-2');
get_template_part('partials/challenge/content', 'categories');
get_template_part('partials/challenge/content', 'snake-checklist');
get_template_part('partials/challenge/content', 'timeline');
}?>
A: The function get_the_ID() will work regardless of post type (if it's a page, post, or custom post).
You could use that function to perform your conditional check.
if ( get_the_ID() === 2578) {
get_template_part('partials/content', 'challenge');
}
else{
// Add other template calls, or additional conditions, is_single, is_archive, etc.
}?>
Noting that this function won't work on archives since they don't have ID's.
A: This looks almost correct. Let's have a look at is_single():
Works for any post type, except attachments and pages...
So if the given ID isn't that of a page or attachment post type then you can use the function as so:
if( is_single( 2578 ) ) {
/* ... */
} else {
/* ... */
}
Otherwise, if the ID is a page post type you can use is_page()
if( is_page( 2578 ) ) {
/* ... */
}
Should the ID be that of an attachment page you may use is_attachment()
if( is_attachment( 2578 ) ) {
/* ... */
}
Finally, if you're unsure of the post type you could check against the global $post object, assuming it is correct:
global $post;
if( is_object( $post ) && 2578 == $post->ID ) {
/* ... */
}
A: <?php if( $post->ID == 21) { ?>
<?php include('file_1.php'); ?>
<?php } else { ?>
<?php include('file_2.php'); ?>
<?php } ?>
| wordpress | {
"language": "en",
"length": 330,
"provenance": "stackexchange_00019.jsonl.gz:471941",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/252277"
} | [
0.04254150390625,
0.0009822845458984375,
-0.004688262939453125,
-0.03277587890625,
0.0242767333984375,
-0.0228271484375,
0.02716064453125,
-0.0191497802734375,
0.0011920928955078125,
0.020355224609375,
-0.028076171875,
-0.0200958251953125,
-0.030364990234375,
-0.0249786376953125,
-0.0196533203125,
-0.032196044921875,
0.033935546875,
-0.030059814453125,
0.01439666748046875,
-0.01275634765625,
0.00876617431640625,
-0.00847625732421875,
-0.0186614990234375,
0.040069580078125,
0.01959228515625,
-0.02362060546875,
0.04779052734375,
0.003116607666015625,
0.0006361007690429688,
-0.0142364501953125,
0.01019287109375,
0.025543212890625,
0.0323486328125,
-0.031280517578125,
0.025054931640625,
0.03704833984375,
0.03082275390625,
-0.01349639892578125,
0.016815185546875,
0.01177215576171875,
0.03485107421875,
-0.0203094482421875,
-0.01137542724609375,
0.007232666015625,
0.006916046142578125,
-0.0350341796875,
0.025115966796875,
-0.06304931640625,
0.020050048828125,
0.0176544189453125,
0.01273345947265625,
-0.007442474365234375,
-0.005863189697265625,
0.022186279296875,
-0.00926971435546875,
-0.01861572265625,
-0.0015106201171875,
-0.050048828125,
0.057525634765625,
-0.00579071044921875,
-0.03179931640625,
-0.053131103515625,
0.029144287109375,
-0.057281494140625,
-0.01169586181640625,
0.01084136962890625,
-0.00466156005859375,
0.0199432373046875,
-0.0531005859375,
-0.050201416015625,
0.010406494140625,
-0.02984619140625,
0.019439697265625,
-0.03155517578125,
-0.01250457763671875,
-0.0243682861328125,
0.0207061767578125,
-0.018890380859375,
-0.0126190185546875,
-0.0175018310546875,
-0.00707244873046875,
-0.00011718273162841797,
-0.0428466796875,
0.00592803955078125,
0.021942138671875,
0.054595947265625,
-0.0185394287109375,
-0.03729248046875,
-0.032989501953125,
-0.0229949951171875,
-0.025634765625,
-0.04400634765625,
-0.004779815673828125,
-0.0211181640625,
-0.0130157470703125,
-0.0491943359375,
0.032440185546875,
0.08538818359375,
-0.027923583984375,
-0.0137939453125,
0.032318115234375,
-0.053192138671875,
0.0172576904296875,
-0.059173583984375,
0.0081939697265625,
0.036712646484375,
0.025177001953125,
0.0262298583984375,
0.041839599609375,
0.004741668701171875,
-0.002979278564453125,
0.044708251953125,
-0.01715087890625,
0.0082855224609375,
-0.031585693359375,
-0.00844573974609375,
-0.059783935546875,
-0.010498046875,
-0.0125274658203125,
-0.0011281967163085938,
0.047210693359375,
0.038330078125,
0.0543212890625,
-0.0105438232421875,
-0.0156097412109375,
0.0171966552734375,
-0.05621337890625,
-0.0675048828125,
-0.006481170654296875,
0.03143310546875,
-0.032012939453125,
-0.0037021636962890625,
0.054107666015625,
0.025390625,
-0.003528594970703125,
-0.0299835205078125,
-0.01154327392578125,
0.007965087890625,
-0.0107269287109375,
0.0194549560546875,
-0.019866943359375,
-0.01395416259765625,
0.04254150390625,
-0.005344390869140625,
-0.01995849609375,
0.01549530029296875,
0.039154052734375,
0.01105499267578125,
-0.029327392578125,
-0.0648193359375,
0.007419586181640625,
0.03363037109375,
0.0274658203125,
0.000029802322387695312,
-0.0029544830322265625,
-0.03271484375,
-0.01404571533203125,
-0.024993896484375,
0.01511383056640625,
-0.016815185546875,
0.04425048828125,
0.010223388671875,
0.0029468536376953125,
-0.035491943359375,
-0.042999267578125,
-0.0394287109375,
-0.05218505859375,
-0.0011606216430664062,
0.0191802978515625,
0.05267333984375,
-0.034088134765625,
-0.006683349609375,
0.0196990966796875,
0.0267333984375,
-0.0074005126953125,
0.033935546875,
0.016815185546875,
-0.031829833984375,
0.0013341903686523438,
0.06787109375,
-0.022735595703125,
-0.035186767578125,
-0.007541656494140625,
-0.0262298583984375,
-0.05499267578125,
0.07666015625,
0.007785797119140625,
0.0284423828125,
0.0066680908203125,
0.0027484893798828125,
0.05511474609375,
0.0489501953125,
-0.03802490234375,
-0.00004595518112182617,
0.0179595947265625,
0.0033092498779296875,
-0.006565093994140625,
0.0046234130859375,
0.00640106201171875,
-0.02789306640625,
0.0364990234375,
-0.0136260986328125,
0.0032444000244140625,
0.008880615234375,
-0.04833984375,
-0.018310546875,
-0.021087646484375,
0.00028252601623535156,
-0.034423828125,
0.0049896240234375,
0.0306854248046875,
-0.02178955078125,
-0.0275421142578125,
0.0292205810546875,
-0.015228271484375,
0.004459381103515625,
-0.024871826171875,
-0.0158233642578125,
-0.03887939453125,
-0.0014801025390625,
-0.03924560546875,
-0.022186279296875,
-0.050262451171875,
0.041961669921875,
0.087158203125,
0.01120758056640625,
-0.0233612060546875,
-0.01457977294921875,
0.036041259765625,
0.035003662109375,
-0.07763671875,
0.0186614990234375,
0.01224517822265625,
0.03350830078125,
-0.018646240234375,
-0.0075225830078125,
0.0070953369140625,
-0.025634765625,
0.017608642578125,
0.037628173828125,
0.0489501953125,
0.00901031494140625,
-0.003204345703125,
-0.02264404296875,
0.0472412109375,
-0.04461669921875,
0.005390167236328125,
-0.021148681640625,
0.0175323486328125,
0.0406494140625,
0.009674072265625,
0.0167999267578125,
0.0147857666015625,
-0.0163726806640625,
0.0294952392578125,
0.0281219482421875,
-0.042205810546875,
0.004901885986328125,
-0.022216796875,
0.020843505859375,
-0.0225982666015625,
0.0176544189453125,
0.04449462890625,
-0.03173828125,
0.05255126953125,
0.0004813671112060547,
0.053680419921875,
0.03570556640625,
-0.0017747879028320312,
-0.01702880859375,
-0.01378631591796875,
-0.0011110305786132812,
0.00959014892578125,
0.04962158203125,
0.0286865234375,
0.04931640625,
-0.0284881591796875,
-0.0372314453125,
0.02374267578125,
0.042999267578125,
-0.0009984970092773438,
0.0595703125,
0.0006880760192871094,
-0.0125274658203125,
-0.027496337890625,
-0.0306854248046875,
-0.017608642578125,
-0.0039215087890625,
-0.006439208984375,
-0.0048370361328125,
0.020538330078125,
0.0380859375,
-0.0177001953125,
0.040985107421875,
-0.01204681396484375,
-0.0010519027709960938,
0.05267333984375,
-0.0157623291015625,
0.0289459228515625,
-0.024322509765625,
0.042236328125,
0.0260009765625,
-0.035308837890625,
0.01171112060546875,
-0.00556182861328125,
-0.0005030632019042969,
0.01317596435546875,
-0.01910400390625,
-0.0195465087890625,
-0.01480865478515625,
-0.0171661376953125,
0.0203399658203125,
0.0173797607421875,
0.06982421875,
0.0010738372802734375,
-0.0265045166015625,
0.03106689453125,
0.041229248046875,
-0.039154052734375,
-0.10626220703125,
0.045623779296875,
-0.054779052734375,
-0.031280517578125,
-0.0290985107421875,
-0.04229736328125,
-0.00921630859375,
-0.0159149169921875,
-0.01401519775390625,
0.0038204193115234375,
-0.003002166748046875,
-0.08758544921875,
-0.031646728515625,
-0.06829833984375,
0.053955078125,
-0.0221099853515625,
0.042694091796875,
-0.0008864402770996094,
0.04443359375,
0.00414276123046875,
-0.0758056640625,
-0.01129913330078125,
0.046051025390625,
-0.036773681640625,
-0.002197265625,
-0.0367431640625,
-0.00875091552734375,
-0.0008611679077148438,
0.0005764961242675781,
-0.031707763671875,
-0.01346588134765625,
0.03228759765625,
-0.0230865478515625,
-0.0153656005859375,
0.032958984375,
0.043914794921875,
0.00543975830078125,
0.006610870361328125,
0.05694580078125,
0.0787353515625,
-0.0042266845703125,
-0.0511474609375,
-0.0258026123046875,
-0.07110595703125,
0.058013916015625,
0.07769775390625,
-0.0025424957275390625,
0.00673675537109375,
-0.0028095245361328125,
0.0016984939575195312,
-0.002384185791015625,
-0.0205841064453125,
-0.0117645263671875,
0.058624267578125,
0.00821685791015625,
0.020843505859375,
0.0189056396484375,
-0.0280609130859375,
-0.041748046875,
-0.0030765533447265625,
-0.0333251953125,
0.005680084228515625,
0.0019702911376953125,
-0.0265045166015625,
-0.01953125,
-0.01800537109375,
0.0229949951171875,
-0.001941680908203125,
0.03533935546875,
-0.047821044921875,
-0.038818359375,
-0.03399658203125,
0.061248779296875,
-0.0703125,
-0.01324462890625,
-0.02978515625,
-0.00595855712890625,
0.01468658447265625,
-0.05743408203125,
-0.018585205078125,
-0.0144805908203125,
-0.0169830322265625,
-0.002223968505859375,
-0.0185546875,
-0.023651123046875,
-0.022186279296875,
-0.01090240478515625,
-0.013519287109375,
-0.0017042160034179688,
0.03094482421875,
-0.0255889892578125,
-0.00455474853515625,
0.050537109375,
-0.01264190673828125,
0.0310516357421875,
-0.021240234375,
-0.016693115234375,
-0.04534912109375,
-0.020751953125,
0.01959228515625,
0.031463623046875,
0.0008716583251953125,
-0.0045318603515625,
-0.0049896240234375,
0.04779052734375,
-0.020172119140625,
0.0215606689453125,
-0.0184326171875,
0.0271148681640625,
-0.029998779296875,
-0.0021648406982421875,
-0.01195526123046875,
-0.0167083740234375,
-0.0443115234375,
-0.0200653076171875,
-0.01300811767578125,
0.00792694091796875,
-0.022003173828125,
-0.049530029296875,
0.00792694091796875,
-0.0030765533447265625,
-0.060272216796875,
-0.017791748046875,
0.0259552001953125,
0.0014429092407226562,
0.0235595703125,
-0.00531768798828125,
-0.00946044921875,
-0.06719970703125,
0.051025390625,
0.0186309814453125,
-0.048858642578125,
0.0004248619079589844,
0.035430908203125,
0.0247955322265625,
-0.050140380859375,
-0.0308380126953125,
0.02801513671875,
0.06536865234375,
-0.01496124267578125,
0.0662841796875,
0.07568359375,
-0.042510986328125,
0.0631103515625,
0.0452880859375,
-0.0316162109375,
0.0180206298828125,
0.08245849609375,
0.0160675048828125,
0.0101470947265625,
-0.0149078369140625,
-0.020843505859375,
-0.006633758544921875,
0.0229644775390625,
-0.031951904296875,
-0.00009006261825561523,
-0.01116180419921875,
0.038299560546875,
-0.0178985595703125,
0.0274505615234375,
-0.044586181640625,
-0.03875732421875,
0.003711700439453125,
0.04827880859375,
0.01096343994140625,
0.00016295909881591797,
0.017822265625,
0.0218048095703125,
0.0147552490234375,
-0.0093231201171875,
0.0162506103515625,
0.0222930908203125,
0.00406646728515625,
0.01018524169921875,
0.049285888671875,
-0.00928497314453125,
-0.0196380615234375,
-0.0067291259765625,
0.038360595703125,
-0.006855010986328125,
-0.059478759765625,
0.0147857666015625,
0.004665374755859375,
0.0224609375,
0.0260772705078125,
-0.0224151611328125,
0.03668212890625,
0.0023860931396484375,
-0.035736083984375,
-0.00347900390625,
-0.03375244140625,
-0.037017822265625,
-0.050506591796875,
0.002285003662109375,
0.0180816650390625,
-0.0157318115234375,
0.01139068603515625,
0.0018024444580078125,
0.042236328125,
-0.0128631591796875,
-0.036895751953125,
0.032623291015625,
0.023590087890625,
0.019561767578125,
0.0226287841796875,
-0.0228729248046875,
-0.015625,
0.0063934326171875,
0.0007114410400390625,
-0.055511474609375,
-0.01337432861328125,
-0.003673553466796875,
0.06231689453125,
-0.00708770751953125,
-0.0210418701171875,
0.0302734375,
-0.0192108154296875,
0.0217742919921875,
0.0232391357421875,
0.019073486328125,
-0.022369384765625,
0.00699615478515625,
0.036651611328125,
0.004589080810546875,
-0.0160369873046875,
-0.0169677734375,
0.0273895263671875,
-0.044464111328125,
0.0191192626953125,
0.03668212890625,
-0.0225372314453125,
-0.0026226043701171875,
-0.011138916015625,
-0.0210113525390625,
-0.049560546875,
0.005558013916015625,
0.00849151611328125,
0.033966064453125,
-0.0247955322265625,
-0.01520538330078125,
0.0185089111328125,
-0.01580810546875,
0.0268707275390625,
-0.01178741455078125,
-0.039459228515625,
0.0018634796142578125,
0.012542724609375,
0.052490234375,
0.02764892578125,
-0.0058746337890625,
0.00920867919921875,
-0.07391357421875,
-0.00557708740234375,
0.006206512451171875,
-0.039886474609375,
-0.005664825439453125,
-0.0247039794921875,
-0.030792236328125,
0.03057861328125,
-0.0222015380859375,
0.0265350341796875,
0.017852783203125,
0.01270294189453125,
-0.036468505859375,
0.081787109375,
0.00327301025390625,
0.07781982421875,
-0.0033588409423828125,
0.039825439453125,
0.018707275390625,
0.022308349609375,
-0.06256103515625,
0.005718231201171875,
-0.0173187255859375,
-0.018157958984375,
0.0247802734375,
0.00252532958984375,
0.05487060546875,
0.0181121826171875,
0.02581787109375,
0.00937652587890625,
-0.007083892822265625,
-0.0025959014892578125,
0.0127716064453125,
-0.0309295654296875,
0.004314422607421875,
-0.0163421630859375,
-0.031219482421875,
-0.0073089599609375,
-0.052886962890625,
-0.028533935546875,
0.054443359375,
0.004245758056640625,
0.031646728515625,
-0.01068878173828125,
0.0008764266967773438,
0.036712646484375,
-0.018890380859375,
0.05157470703125,
0.047332763671875,
0.0164031982421875,
0.040130615234375,
-0.007053375244140625,
0.0191802978515625,
-0.00684356689453125,
-0.0118408203125,
0.0025157928466796875,
-0.0192108154296875,
0.020111083984375,
-0.01091766357421875,
0.032379150390625,
0.0283203125,
-0.012664794921875,
0.019134521484375,
0.01474761962890625,
0.0188751220703125,
-0.03631591796875,
-0.00829315185546875,
-0.0299835205078125,
-0.033355712890625,
0.01515960693359375,
-0.0154876708984375,
-0.0071563720703125,
-0.004840850830078125,
0.039337158203125,
0.07684326171875,
-0.0194091796875,
0.035797119140625,
0.0187530517578125,
-0.021240234375,
-0.0141143798828125,
0.041717529296875,
-0.002735137939453125,
-0.038665771484375,
0.00463104248046875,
0.0110015869140625,
0.005298614501953125,
-0.032012939453125,
0.03131103515625,
-0.0122222900390625,
-0.0022182464599609375,
-0.03887939453125,
0.01690673828125,
-0.004474639892578125,
-0.006298065185546875,
-0.0021381378173828125,
0.01357269287109375,
0.004016876220703125,
0.023956298828125,
-0.01140594482421875,
-0.003200531005859375,
0.0014514923095703125,
-0.023956298828125,
-0.023345947265625,
-0.0054931640625,
0.01128387451171875,
0.046783447265625,
-0.0268402099609375,
0.02490234375,
-0.0171356201171875,
-0.00921630859375,
-0.0013418197631835938,
-0.012481689453125,
0.07305908203125,
-0.073974609375,
-0.00313568115234375,
0.01003265380859375,
0.0209808349609375,
0.0090789794921875,
0.006000518798828125,
0.016143798828125,
-0.08135986328125,
-0.0577392578125,
0.0208892822265625,
-0.0570068359375,
-0.0274200439453125,
-0.006290435791015625,
-0.059814453125,
0.1016845703125,
0.025604248046875,
0.0194091796875,
-0.01300811767578125,
0.043548583984375,
-0.03338623046875,
0.01239776611328125,
-0.030670166015625,
0.032440185546875,
0.005092620849609375,
0.0009021759033203125,
-0.042938232421875,
-0.01224517822265625,
-0.019866943359375,
0.0273895263671875,
0.05596923828125,
0.00971221923828125,
-0.02520751953125,
-0.006916046142578125,
0.043182373046875,
0.041717529296875,
-0.00296783447265625,
0.0235443115234375,
-0.0010747909545898438,
0.04791259765625,
0.0294189453125,
-0.06829833984375,
0.03179931640625,
-0.032073974609375,
-0.0034160614013671875,
0.024932861328125,
0.048248291015625,
0.0240478515625,
0.0244903564453125,
0.022186279296875,
-0.0306396484375,
0.0026702880859375,
0.040008544921875,
-0.01446533203125,
0.00817108154296875,
0.0036945343017578125,
0.031982421875,
-0.07781982421875,
0.02764892578125,
-0.041717529296875,
0.048858642578125,
-0.003849029541015625,
0.01468658447265625,
0.009735107421875,
0.0169677734375,
0.0322265625,
-0.0030536651611328125,
-0.00012421607971191406,
0.0010900497436523438,
0.021881103515625,
0.0240325927734375,
0.019317626953125,
0.005664825439453125,
-0.0283660888671875,
0.047698974609375,
0.0257415771484375,
0.030853271484375,
-0.0377197265625,
0.0004992485046386719,
0.013824462890625,
0.01061248779296875,
0.0013113021850585938,
-0.00812530517578125,
0.0212860107421875,
0.04638671875,
0.05535888671875,
-0.04266357421875,
-0.0173492431640625,
0.0439453125,
-0.013519287109375,
-0.011444091796875,
-0.01788330078125,
0.01448822021484375,
-0.00885772705078125,
-0.059051513671875,
0.0284576416015625,
0.0501708984375,
0.06304931640625,
-0.00428009033203125,
0.07763671875,
-0.01335906982421875,
-0.0193328857421875,
0.00981903076171875,
0.006229400634765625,
0.00800323486328125,
-0.02239990234375,
-0.01959228515625,
-0.036346435546875,
0.0051116943359375,
0.029937744140625,
0.00418853759765625,
0.0225830078125,
0.007282257080078125,
-0.0025463104248046875,
-0.0279693603515625,
-0.006015777587890625,
0.045745849609375,
-0.0269012451171875,
0.032012939453125,
-0.0265960693359375,
0.008636474609375,
0.01140594482421875,
-0.01551055908203125,
-0.0234832763671875,
-0.0350341796875,
0.07330322265625,
0.005573272705078125,
0.025238037109375,
0.00859832763671875,
0.00916290283203125,
0.0286407470703125,
0.01306915283203125,
0.01605224609375,
0.03839111328125,
-0.06451416015625,
-0.0015459060668945312,
-0.014190673828125,
-0.08251953125,
0.0254974365234375,
0.035675048828125,
-0.040435791015625,
0.023651123046875,
0.00894927978515625,
0.01010894775390625,
-0.0145111083984375,
-0.0182037353515625,
0.0200958251953125,
-0.0011472702026367188,
0.0167694091796875,
0.019561767578125,
-0.02593994140625,
-0.0244293212890625,
-0.004436492919921875,
0.0198822021484375,
0.0161285400390625,
0.05224609375,
-0.0018329620361328125,
0.0142059326171875,
-0.035308837890625,
0.026641845703125,
-0.0677490234375,
-0.0276336669921875,
0.0311737060546875,
-0.03857421875,
-0.006061553955078125,
0.00727081298828125,
-0.00862884521484375,
0.018585205078125,
0.029754638671875,
-0.005199432373046875,
0.034912109375,
-0.054229736328125,
0.01462554931640625,
-0.0290374755859375,
0.0226898193359375,
-0.00905609130859375,
-0.0231475830078125,
-0.0197296142578125,
0.0161895751953125,
0.04669189453125,
0.04388427734375,
-0.03521728515625,
0.035888671875,
-0.017669677734375,
-0.06634521484375,
0.021881103515625,
-0.05816650390625,
0.01067352294921875,
0.03204345703125,
0.01708984375,
-0.035369873046875,
0.00844573974609375,
-0.01708984375,
0.009124755859375,
0.0169830322265625,
0.03436279296875,
0.004100799560546875,
-0.012420654296875,
0.04815673828125,
0.015380859375,
0.0438232421875,
-0.0176239013671875,
-0.005504608154296875,
0.0643310546875,
-0.0013284683227539062,
-0.0140228271484375,
-0.0095672607421875,
-0.0014677047729492188,
0.0325927734375,
-0.018402099609375,
-0.0232696533203125,
0.041107177734375,
-0.021026611328125,
0.06298828125,
-0.021392822265625,
0.0094451904296875,
-0.036224365234375,
0.038238525390625,
-0.041961669921875,
-0.026275634765625,
0.01019287109375,
-0.036651611328125,
0.0426025390625,
-0.007678985595703125,
0.026702880859375,
-0.0457763671875,
0.030975341796875,
-0.021697998046875,
-0.031768798828125,
0.01003265380859375,
0.02001953125,
0.0528564453125,
-0.021270751953125,
-0.051971435546875,
0.0028057098388671875,
0.01461029052734375,
0.029205322265625,
-0.0126495361328125,
-0.018341064453125,
0.032928466796875,
-0.023895263671875,
-0.018157958984375,
-0.0008006095886230469,
0.01430511474609375,
-0.037109375,
-0.0240631103515625,
-0.01080322265625,
0.021148681640625,
0.031524658203125,
-0.036956787109375,
-0.07965087890625,
0.03570556640625,
-0.031494140625,
-0.026885986328125,
-0.031982421875,
0.019500732421875,
0.0180511474609375,
-0.0207672119140625,
-0.018096923828125,
-0.00380706787109375,
-0.0263214111328125,
0.025360107421875,
0.01357269287109375,
0.027130126953125,
0.0316162109375,
-0.008026123046875,
-0.0601806640625,
-0.01541900634765625,
-0.03326416015625,
0.0217742919921875,
-0.00833892822265625,
-0.00917816162109375,
-0.003986358642578125,
-0.01146697998046875,
-0.073974609375,
-0.044677734375,
0.0034885406494140625,
0.06341552734375,
-0.013702392578125,
-0.032989501953125,
-0.052978515625,
-0.0013599395751953125,
0.075439453125,
0.103271484375,
0.018707275390625,
-0.041259765625,
-0.0010852813720703125,
-0.00971221923828125,
-0.0706787109375,
-0.000286102294921875,
0.040771484375,
-0.045623779296875,
0.011932373046875,
-0.01210784912109375,
-0.040191650390625,
0.001300811767578125,
-0.0038547515869140625,
-0.061737060546875,
0.01003265380859375,
-0.04998779296875,
-0.0246429443359375,
-0.05169677734375,
0.01171875,
0.026153564453125,
-0.0239715576171875,
-0.02154541015625,
-0.0235595703125,
0.0076446533203125,
-0.0194854736328125,
-0.040130615234375,
0.0242767333984375,
0.03985595703125,
-0.0263671875,
0.004528045654296875,
0.042724609375,
-0.0005950927734375,
-0.0004267692565917969,
0.006591796875,
0.0021343231201171875,
-0.00807952880859375,
0.005218505859375,
-0.032196044921875,
-0.0017175674438476562,
-0.02392578125,
-0.041748046875,
0.0845947265625,
0.00218963623046875,
0.09722900390625,
0.0160980224609375,
0.0286865234375,
0.0031108856201171875,
-0.0086669921875,
0.015838623046875,
-0.005535125732421875,
-0.0207061767578125,
0.0171356201171875,
-0.025482177734375,
-0.07562255859375,
0.035064697265625,
-0.003932952880859375,
0.0281219482421875,
0.019805908203125
] |
3f6f03f1587999b14110649beb6b2115072780f3 | Wordpress Stackexchange
Q: "Password Strength Unknown" Registration Issue I encountered a strange bug when users are trying to enter a new password that states "Password Strength Unknown" regardless of the amount of characters (capitalized etc.) that are entered into the input field.
Direct link to site: https://www.uncvrd.co/wp-login.php?action=rp
Screenshot:
What other information can I provide to help solve this issue?
A: Found out the issue, for some reason beautifying the code before save messed with formatting. By downloading a fresh wp-login.php I was able to resolve this
| Q: "Password Strength Unknown" Registration Issue I encountered a strange bug when users are trying to enter a new password that states "Password Strength Unknown" regardless of the amount of characters (capitalized etc.) that are entered into the input field.
Direct link to site: https://www.uncvrd.co/wp-login.php?action=rp
Screenshot:
What other information can I provide to help solve this issue?
A: Found out the issue, for some reason beautifying the code before save messed with formatting. By downloading a fresh wp-login.php I was able to resolve this
A: If using an SSL when setting up your site it is very common to see this issue.
I found using
$_SERVER['HTTPS'] = true;
At the top of wp-config.php fixes this problem.
| wordpress | {
"language": "en",
"length": 116,
"provenance": "stackexchange_00019.jsonl.gz:472015",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/252543"
} | [
0.00031685829162597656,
-0.01401519775390625,
0.0016422271728515625,
0.05682373046875,
-0.0251617431640625,
-0.025177001953125,
0.052093505859375,
-0.0443115234375,
0.00553131103515625,
0.00821685791015625,
0.026702880859375,
-0.0009503364562988281,
-0.044708251953125,
-0.0318603515625,
-0.00670623779296875,
-0.01309967041015625,
-0.006595611572265625,
0.037078857421875,
-0.0018463134765625,
-0.0268707275390625,
-0.01019287109375,
-0.04095458984375,
-0.036285400390625,
-0.0138397216796875,
0.027862548828125,
-0.00988006591796875,
0.091796875,
-0.01090240478515625,
0.029388427734375,
-0.004428863525390625,
0.0177459716796875,
-0.03619384765625,
0.0017633438110351562,
-0.003498077392578125,
0.02984619140625,
-0.00856781005859375,
0.03045654296875,
0.007495880126953125,
0.01715087890625,
0.026275634765625,
0.00846099853515625,
-0.0137939453125,
0.040557861328125,
-0.026092529296875,
0.005645751953125,
-0.014984130859375,
0.033477783203125,
-0.031829833984375,
0.0330810546875,
0.035675048828125,
-0.017669677734375,
0.009429931640625,
-0.00998687744140625,
-0.036102294921875,
-0.01187896728515625,
-0.035675048828125,
-0.02496337890625,
0.0206298828125,
0.034759521484375,
0.06927490234375,
-0.0165863037109375,
0.0018682479858398438,
-0.0162506103515625,
-0.0948486328125,
-0.038299560546875,
0.01274871826171875,
-0.0140228271484375,
0.0102996826171875,
0.024749755859375,
-0.057159423828125,
-0.030181884765625,
0.0167388916015625,
-0.004001617431640625,
0.01288604736328125,
0.01282501220703125,
-0.00785064697265625,
-0.005153656005859375,
0.012451171875,
0.029632568359375,
0.02984619140625,
-0.005115509033203125,
-0.007778167724609375,
-0.031982421875,
-0.029388427734375,
0.01238250732421875,
-0.011810302734375,
0.00033736228942871094,
-0.001972198486328125,
-0.00714874267578125,
-0.014129638671875,
-0.009307861328125,
-0.024566650390625,
-0.006450653076171875,
0.0307769775390625,
-0.021148681640625,
-0.0086517333984375,
0.0308990478515625,
0.029052734375,
0.0271453857421875,
0.0282745361328125,
-0.010955810546875,
-0.058380126953125,
0.0183868408203125,
-0.0312042236328125,
-0.020538330078125,
0.04718017578125,
0.03582763671875,
0.00170135498046875,
-0.0037593841552734375,
-0.00946807861328125,
-0.0178070068359375,
-0.0257110595703125,
-0.000904083251953125,
-0.038177490234375,
0.0148468017578125,
0.03515625,
-0.0007982254028320312,
0.033172607421875,
0.00920867919921875,
0.01245880126953125,
-0.0123138427734375,
0.00931549072265625,
0.01201629638671875,
-0.0124053955078125,
-0.019775390625,
-0.0219268798828125,
-0.007598876953125,
-0.01215362548828125,
0.00701141357421875,
0.013458251953125,
-0.042572021484375,
0.018035888671875,
0.07568359375,
0.01319122314453125,
-0.0024929046630859375,
-0.0222625732421875,
-0.0257415771484375,
0.01239013671875,
-0.01561737060546875,
0.04156494140625,
-0.044036865234375,
-0.0633544921875,
0.0193634033203125,
-0.0152435302734375,
0.0153656005859375,
0.03466796875,
0.0165252685546875,
0.00013136863708496094,
0.024688720703125,
-0.05023193359375,
0.0286102294921875,
-0.04949951171875,
0.01425933837890625,
0.0367431640625,
-0.01177978515625,
0.0242767333984375,
0.01198577880859375,
-0.0181884765625,
-0.0301666259765625,
-0.00890350341796875,
0.07379150390625,
-0.01338958740234375,
-0.042816162109375,
0.004924774169921875,
-0.03363037109375,
0.01403045654296875,
-0.034820556640625,
-0.00350189208984375,
0.01971435546875,
-0.007080078125,
0.01065826416015625,
0.0130615234375,
0.01983642578125,
-0.01922607421875,
-0.0200042724609375,
-0.011199951171875,
-0.0168914794921875,
0.0511474609375,
0.0117645263671875,
0.033935546875,
0.0288543701171875,
-0.03741455078125,
0.07379150390625,
0.00743865966796875,
-0.0261993408203125,
-0.0271453857421875,
0.00464630126953125,
0.01140594482421875,
0.03851318359375,
0.0188751220703125,
0.0174102783203125,
-0.004390716552734375,
-0.024017333984375,
0.02294921875,
-0.03680419921875,
-0.0203094482421875,
0.0051422119140625,
0.024078369140625,
-0.0267333984375,
0.018707275390625,
0.048370361328125,
-0.019012451171875,
0.0023403167724609375,
-0.04241943359375,
-0.053863525390625,
-0.0267181396484375,
-0.005687713623046875,
0.01125335693359375,
-0.045379638671875,
0.0129852294921875,
0.019927978515625,
-0.0222015380859375,
-0.010345458984375,
-0.0161895751953125,
0.0018711090087890625,
0.0064239501953125,
-0.0215911865234375,
0.0293121337890625,
-0.00363922119140625,
0.03765869140625,
-0.0133056640625,
-0.02178955078125,
-0.0231170654296875,
-0.02423095703125,
-0.016998291015625,
0.0016660690307617188,
-0.030914306640625,
-0.01178741455078125,
-0.0148468017578125,
-0.0196075439453125,
0.0618896484375,
0.054595947265625,
0.00789642333984375,
0.0157623291015625,
-0.058074951171875,
-0.0303192138671875,
-0.0242919921875,
-0.0240478515625,
0.0193634033203125,
0.0623779296875,
0.03515625,
0.0404052734375,
-0.00984954833984375,
-0.0011444091796875,
0.06207275390625,
-0.03826904296875,
0.004241943359375,
0.002410888671875,
-0.0278167724609375,
0.0479736328125,
-0.004245758056640625,
0.0555419921875,
-0.0018186569213867188,
0.027496337890625,
-0.02294921875,
0.036529541015625,
-0.00647735595703125,
0.0106048583984375,
-0.02008056640625,
0.01080322265625,
-0.005329132080078125,
-0.043182373046875,
-0.0107269287109375,
-0.032958984375,
0.00335693359375,
-0.006916046142578125,
0.0014562606811523438,
-0.00598907470703125,
-0.0011653900146484375,
0.0015878677368164062,
0.019287109375,
-0.041534423828125,
-0.006137847900390625,
0.0006756782531738281,
0.0394287109375,
0.037017822265625,
-0.03240966796875,
-0.0010881423950195312,
0.00589752197265625,
-0.007732391357421875,
-0.03765869140625,
-0.026214599609375,
-0.019927978515625,
-0.01358795166015625,
0.0003345012664794922,
-0.044464111328125,
0.0262603759765625,
-0.006206512451171875,
-0.0306243896484375,
0.00557708740234375,
0.027252197265625,
0.046722412109375,
0.00501251220703125,
0.0122528076171875,
-0.031341552734375,
0.01291656494140625,
-0.03778076171875,
-0.032501220703125,
0.041595458984375,
-0.04241943359375,
0.0011911392211914062,
0.06610107421875,
-0.012359619140625,
0.004436492919921875,
0.005886077880859375,
-0.004077911376953125,
-0.0176849365234375,
0.026519775390625,
0.0115966796875,
-0.01180267333984375,
-0.03033447265625,
0.0205535888671875,
0.02825927734375,
0.034637451171875,
0.0193939208984375,
-0.0242767333984375,
0.007686614990234375,
0.033447265625,
-0.03887939453125,
-0.04840087890625,
-0.103271484375,
-0.0460205078125,
-0.0005869865417480469,
0.015472412109375,
-0.01715087890625,
0.031768798828125,
0.02490234375,
0.02490234375,
0.036773681640625,
-0.0296783447265625,
-0.059112548828125,
-0.052276611328125,
-0.09234619140625,
-0.063720703125,
0.002254486083984375,
0.005889892578125,
-0.0192413330078125,
0.034454345703125,
-0.0163116455078125,
-0.0189056396484375,
-0.052215576171875,
0.006404876708984375,
0.0126800537109375,
-0.04010009765625,
-0.043212890625,
0.02215576171875,
-0.018951416015625,
0.01934814453125,
-0.0643310546875,
-0.0401611328125,
0.0435791015625,
-0.0233154296875,
0.00463104248046875,
-0.061981201171875,
0.0189361572265625,
0.052032470703125,
-0.0204315185546875,
-0.0391845703125,
0.024993896484375,
-0.06964111328125,
0.02813720703125,
0.0133056640625,
0.00347137451171875,
0.016204833984375,
-0.0184478759765625,
-0.04400634765625,
0.01039886474609375,
0.00021326541900634766,
-0.043975830078125,
0.0160980224609375,
-0.01194000244140625,
-0.043426513671875,
0.032623291015625,
-0.0187835693359375,
-0.04376220703125,
0.00177764892578125,
0.0108489990234375,
-0.0330810546875,
0.0197601318359375,
-0.0148468017578125,
0.0014448165893554688,
-0.01045989990234375,
-0.0015869140625,
-0.031463623046875,
-0.07373046875,
0.04913330078125,
-0.03680419921875,
0.0159454345703125,
-0.08013916015625,
-0.03533935546875,
-0.030059814453125,
0.11328125,
-0.021881103515625,
-0.0223541259765625,
-0.005016326904296875,
0.036712646484375,
-0.07672119140625,
-0.040374755859375,
-0.025421142578125,
-0.0025882720947265625,
0.0153350830078125,
-0.0170440673828125,
-0.011322021484375,
-0.0147552490234375,
0.0021991729736328125,
-0.060638427734375,
0.0201873779296875,
-0.0128173828125,
0.028076171875,
-0.003093719482421875,
0.048187255859375,
-0.03338623046875,
0.026702880859375,
-0.0253753662109375,
-0.005603790283203125,
-0.029998779296875,
-0.08673095703125,
-0.028076171875,
0.047821044921875,
0.05224609375,
-0.024505615234375,
-0.043365478515625,
-0.01555633544921875,
0.0635986328125,
0.0273895263671875,
0.0215911865234375,
0.00453948974609375,
-0.031646728515625,
0.029296875,
0.0499267578125,
0.0211334228515625,
0.0216217041015625,
-0.0088348388671875,
-0.027862548828125,
-0.04754638671875,
-0.0243377685546875,
-0.0225677490234375,
-0.0286712646484375,
0.0200653076171875,
-0.0294647216796875,
-0.00746917724609375,
-0.01177215576171875,
-0.007076263427734375,
0.052032470703125,
-0.019195556640625,
0.0217132568359375,
-0.0287017822265625,
-0.03131103515625,
0.07220458984375,
0.002960205078125,
-0.0009264945983886719,
-0.0020599365234375,
0.06329345703125,
-0.0031681060791015625,
-0.035430908203125,
-0.031280517578125,
0.01056671142578125,
0.0113067626953125,
0.048797607421875,
0.00484466552734375,
-0.006717681884765625,
-0.0018825531005859375,
-0.0172119140625,
0.003383636474609375,
-0.025787353515625,
0.026336669921875,
0.0239410400390625,
0.01062774658203125,
-0.038604736328125,
0.0152740478515625,
0.004337310791015625,
-0.005687713623046875,
0.028350830078125,
0.0165557861328125,
0.017669677734375,
0.01552581787109375,
-0.0325927734375,
-0.02142333984375,
-0.0106353759765625,
0.03192138671875,
-0.06280517578125,
0.03179931640625,
-0.0200653076171875,
-0.03515625,
-0.02301025390625,
0.0163421630859375,
-0.025909423828125,
-0.03643798828125,
-0.019561767578125,
-0.06402587890625,
-0.0220184326171875,
-0.0164337158203125,
0.0202178955078125,
-0.07720947265625,
-0.006740570068359375,
-0.04083251953125,
-0.03533935546875,
0.086669921875,
-0.0245361328125,
-0.10321044921875,
0.05902099609375,
-0.038726806640625,
0.047943115234375,
0.059783935546875,
0.0175018310546875,
-0.0030841827392578125,
-0.0184173583984375,
-0.0096893310546875,
-0.0001920461654663086,
0.04638671875,
-0.052215576171875,
-0.0134429931640625,
0.006992340087890625,
0.0033664703369140625,
-0.0177764892578125,
0.009613037109375,
0.01206207275390625,
0.00864410400390625,
0.0045623779296875,
-0.00901031494140625,
-0.007030487060546875,
-0.006984710693359375,
0.02001953125,
0.0276031494140625,
0.00392913818359375,
0.00376129150390625,
-0.001399993896484375,
0.02642822265625,
-0.0283966064453125,
-0.0452880859375,
0.023590087890625,
0.02716064453125,
-0.01221466064453125,
0.0177459716796875,
0.0125274658203125,
0.0225067138671875,
-0.0153961181640625,
0.00627899169921875,
-0.022613525390625,
-0.0697021484375,
-0.00795745849609375,
0.049957275390625,
0.033599853515625,
-0.0275726318359375,
0.0222625732421875,
-0.036529541015625,
-0.0159912109375,
-0.01126861572265625,
0.019256591796875,
0.0214080810546875,
-0.051025390625,
-0.06365966796875,
-0.004085540771484375,
-0.010101318359375,
-0.0361328125,
0.0091400146484375,
-0.005565643310546875,
-0.0062713623046875,
0.0011873245239257812,
0.013214111328125,
-0.00653076171875,
0.00969696044921875,
-0.017608642578125,
-0.006114959716796875,
0.021453857421875,
0.02362060546875,
-0.007373809814453125,
-0.04022216796875,
-0.0031871795654296875,
-0.036590576171875,
0.003314971923828125,
-0.0301055908203125,
0.01194000244140625,
0.0028438568115234375,
-0.032928466796875,
-0.006664276123046875,
-0.0103607177734375,
0.01146697998046875,
0.002758026123046875,
0.007297515869140625,
-0.057708740234375,
0.0220184326171875,
0.0264739990234375,
0.00927734375,
-0.034423828125,
-0.02386474609375,
0.056884765625,
-0.023040771484375,
-0.000009000301361083984,
-0.014678955078125,
0.04833984375,
-0.01206207275390625,
0.01543426513671875,
-0.0276947021484375,
-0.003070831298828125,
-0.0275726318359375,
0.045196533203125,
-0.004253387451171875,
-0.008270263671875,
-0.01015472412109375,
-0.0192718505859375,
-0.0229644775390625,
-0.00954437255859375,
-0.009735107421875,
0.10498046875,
0.007110595703125,
-0.01409149169921875,
0.0107269287109375,
-0.0200347900390625,
0.037994384765625,
-0.0081329345703125,
-0.019256591796875,
0.024200439453125,
-0.0260467529296875,
0.01558685302734375,
0.051116943359375,
-0.0159759521484375,
0.0244293212890625,
-0.00911712646484375,
-0.01055145263671875,
0.010528564453125,
0.0007157325744628906,
0.015045166015625,
-0.02734375,
-0.041015625,
-0.03558349609375,
0.028839111328125,
-0.00656890869140625,
-0.0171661376953125,
-0.0018072128295898438,
0.005046844482421875,
-0.0092315673828125,
0.00461578369140625,
0.0797119140625,
0.0762939453125,
-0.072265625,
-0.00473785400390625,
0.01100921630859375,
-0.02288818359375,
0.01078033447265625,
0.039459228515625,
0.01273345947265625,
0.0062103271484375,
-0.02227783203125,
-0.043487548828125,
-0.002044677734375,
-0.00841522216796875,
-0.031768798828125,
-0.01299285888671875,
-0.02435302734375,
0.0631103515625,
0.03973388671875,
-0.047882080078125,
0.037017822265625,
0.028717041015625,
0.0203399658203125,
0.00498199462890625,
-0.016021728515625,
0.00908660888671875,
-0.04425048828125,
-0.055023193359375,
-0.019775390625,
-0.030487060546875,
-0.033966064453125,
-0.034454345703125,
-0.0094451904296875,
0.052825927734375,
0.0361328125,
-0.022247314453125,
-0.0085296630859375,
0.0101318359375,
0.0303955078125,
0.061187744140625,
-0.033233642578125,
-0.007053375244140625,
0.005970001220703125,
0.0158538818359375,
-0.00551605224609375,
0.03106689453125,
-0.042022705078125,
-0.01422882080078125,
-0.07489013671875,
0.0557861328125,
0.0136566162109375,
-0.0203857421875,
0.0081634521484375,
-0.01532745361328125,
-0.0037479400634765625,
-0.007564544677734375,
0.0012331008911132812,
-0.0139617919921875,
0.0302581787109375,
-0.006656646728515625,
0.00873565673828125,
0.01348876953125,
-0.0174102783203125,
-0.044464111328125,
0.02813720703125,
-0.0207672119140625,
0.0213623046875,
0.0153656005859375,
-0.0027484893798828125,
-0.0086669921875,
-0.018096923828125,
-0.048675537109375,
0.062225341796875,
-0.03265380859375,
0.05694580078125,
-0.01161956787109375,
0.02008056640625,
0.0259246826171875,
-0.031951904296875,
0.0059356689453125,
-0.01641845703125,
0.0275421142578125,
0.00949859619140625,
0.0692138671875,
0.04034423828125,
0.0009598731994628906,
-0.004367828369140625,
0.019195556640625,
-0.016815185546875,
0.04608154296875,
-0.03521728515625,
0.0138092041015625,
-0.031951904296875,
0.039306640625,
0.027862548828125,
0.0036773681640625,
-0.005138397216796875,
0.01324462890625,
0.0396728515625,
-0.06982421875,
0.017913818359375,
0.03851318359375,
0.03033447265625,
0.021881103515625,
0.01122283935546875,
0.05426025390625,
-0.061126708984375,
0.006946563720703125,
-0.0225982666015625,
0.057952880859375,
0.0099639892578125,
0.01142120361328125,
0.00957489013671875,
0.0217437744140625,
0.01123809814453125,
-0.0303802490234375,
-0.00482177734375,
0.018218994140625,
-0.038299560546875,
0.05206298828125,
0.01055908203125,
0.0184478759765625,
-0.03759765625,
0.0262298583984375,
0.059539794921875,
0.0802001953125,
-0.0599365234375,
-0.0250396728515625,
0.0112762451171875,
0.0411376953125,
0.0295257568359375,
0.034271240234375,
0.07696533203125,
0.007472991943359375,
0.0283050537109375,
0.0013399124145507812,
-0.015533447265625,
0.01422882080078125,
0.005367279052734375,
0.0109100341796875,
0.0450439453125,
0.002788543701171875,
-0.022125244140625,
-0.0279388427734375,
0.0146331787109375,
0.005420684814453125,
0.05438232421875,
-0.0081787109375,
0.05712890625,
-0.03985595703125,
-0.0150909423828125,
-0.0131378173828125,
0.01451873779296875,
0.0228424072265625,
-0.0107421875,
-0.0101318359375,
0.00455474853515625,
0.00786590576171875,
0.0194091796875,
-0.012969970703125,
-0.0016126632690429688,
0.001476287841796875,
0.014801025390625,
-0.01202392578125,
-0.0210723876953125,
0.029327392578125,
-0.023681640625,
-0.0233154296875,
-0.034393310546875,
-0.00650787353515625,
0.020843505859375,
0.00403594970703125,
0.0085601806640625,
0.01471710205078125,
0.0276336669921875,
0.04522705078125,
-0.01403045654296875,
0.0277862548828125,
-0.0005373954772949219,
-0.007320404052734375,
0.0306396484375,
-0.0299224853515625,
0.08880615234375,
-0.0455322265625,
-0.00817108154296875,
-0.0268096923828125,
-0.044281005859375,
0.0202178955078125,
0.0291748046875,
-0.0244598388671875,
0.03076171875,
-0.001453399658203125,
-0.04510498046875,
0.0020198822021484375,
0.040557861328125,
0.00685882568359375,
0.0012378692626953125,
0.00787353515625,
-0.0238800048828125,
-0.047637939453125,
-0.0125732421875,
0.007213592529296875,
0.00896453857421875,
-0.022308349609375,
0.0870361328125,
0.00010693073272705078,
-0.0177459716796875,
0.034637451171875,
0.012908935546875,
-0.016357421875,
0.0253753662109375,
-0.0218658447265625,
-0.0126190185546875,
0.020050048828125,
-0.00212860107421875,
-0.07281494140625,
0.096923828125,
-0.0347900390625,
0.07928466796875,
0.0706787109375,
-0.03118896484375,
-0.00397491455078125,
0.061187744140625,
0.0199127197265625,
-0.0223388671875,
-0.03369140625,
-0.023834228515625,
0.01212310791015625,
0.0028667449951171875,
0.01554107666015625,
-0.019989013671875,
0.0297698974609375,
-0.08319091796875,
-0.0299530029296875,
0.0018825531005859375,
-0.049041748046875,
-0.061798095703125,
-0.005889892578125,
0.0009732246398925781,
0.0017709732055664062,
-0.031890869140625,
-0.0236053466796875,
-0.0064697265625,
0.007678985595703125,
-0.02154541015625,
-0.01338958740234375,
0.00905609130859375,
0.0171966552734375,
0.050079345703125,
0.0660400390625,
0.0010805130004882812,
0.0253143310546875,
0.00302886962890625,
-0.0013561248779296875,
0.0227813720703125,
-0.047119140625,
-0.009429931640625,
-0.053314208984375,
-0.0011320114135742188,
0.023651123046875,
-0.00009006261825561523,
-0.0021457672119140625,
0.04022216796875,
-0.0021305084228515625,
0.0272216796875,
-0.01306915283203125,
-0.01123046875,
0.006999969482421875,
-0.045684814453125,
0.0160369873046875,
-0.01203155517578125,
-0.004993438720703125,
0.0321044921875,
0.04620361328125,
-0.0645751953125,
-0.0070037841796875,
0.0017299652099609375,
-0.006511688232421875,
-0.00954437255859375,
0.01910400390625,
0.042083740234375,
-0.0124664306640625,
-0.0226593017578125,
-0.0095672607421875,
-0.0050811767578125,
0.035552978515625,
-0.0219573974609375,
-0.0042877197265625,
0.051483154296875,
-0.0182647705078125,
-0.0158233642578125,
-0.060760498046875,
-0.0130462646484375,
-0.03778076171875,
0.002529144287109375,
-0.0154266357421875,
-0.0009446144104003906,
-0.0005254745483398438,
-0.05419921875,
-0.1270751953125,
-0.007781982421875,
-0.0059967041015625,
-0.057159423828125,
-0.0126495361328125,
-0.017913818359375,
-0.01459503173828125,
0.0263671875,
0.00186920166015625,
-0.01267242431640625,
-0.00830841064453125,
0.03192138671875,
0.00013744831085205078,
-0.01385498046875,
0.01739501953125,
-0.0017194747924804688,
0.003398895263671875,
0.035980224609375,
0.054962158203125,
-0.0257110595703125,
0.0271148681640625,
0.0010461807250976562,
-0.0201568603515625,
0.0286407470703125,
-0.04559326171875,
-0.09051513671875,
-0.04571533203125,
-0.004909515380859375,
0.0230255126953125,
-0.02850341796875,
-0.002567291259765625,
-0.013580322265625,
0.01320648193359375,
-0.004741668701171875,
0.004024505615234375,
-0.0113525390625,
0.006305694580078125,
-0.03485107421875,
0.015716552734375,
-0.025634765625,
-0.01497650146484375,
-0.058624267578125,
-0.029296875,
-0.0000826716423034668,
-0.0008029937744140625,
0.0033779144287109375,
-0.025787353515625,
-0.0006132125854492188,
-0.02471923828125,
-0.01092529296875,
-0.0038928985595703125,
0.017486572265625,
-0.056365966796875,
0.060791015625,
-0.03253173828125,
-0.0216217041015625,
0.00728607177734375,
0.04351806640625,
0.01444244384765625,
-0.00037932395935058594,
-0.00482940673828125,
-0.0182342529296875,
-0.0361328125,
0.0194091796875,
-0.006938934326171875,
0.032867431640625,
-0.038848876953125,
-0.020904541015625,
0.035003662109375,
0.005420684814453125,
-0.0246734619140625,
0.0152130126953125,
0.0309295654296875,
0.0029277801513671875,
-0.035888671875,
-0.022735595703125,
-0.006397247314453125,
-0.09454345703125,
-0.05487060546875,
0.040740966796875,
0.0241241455078125,
-0.031036376953125,
0.04205322265625,
-0.01311492919921875,
0.02020263671875,
0.05303955078125,
0.060394287109375,
-0.0010061264038085938,
0.03265380859375,
0.053985595703125,
0.057403564453125,
0.009796142578125
] |
ffa6fd410a431d6308b34aba48b1dd42c2433870 | Wordpress Stackexchange
Q: Disable Visible Edit Shortcuts in the Customizer Is there a way to disable the edit shortcut buttons that was added in WordPress 4.7?
I noticed they have a class customize-partial-edit-shortcut-button and I can add display:none in css but trying to find a solution in php.
A: The simplest way to disable edit shortcuts without unwanted side effects is to no-op override the JS function that generates them in the first place. You can do this from PHP as follows:
add_action( 'wp_enqueue_scripts', function () {
$js = 'wp.customize.selectiveRefresh.Partial.prototype.createEditShortcutForPlacement = function() {};';
wp_add_inline_script( 'customize-selective-refresh', $js );
} );
This will work for any theme.
| Q: Disable Visible Edit Shortcuts in the Customizer Is there a way to disable the edit shortcut buttons that was added in WordPress 4.7?
I noticed they have a class customize-partial-edit-shortcut-button and I can add display:none in css but trying to find a solution in php.
A: The simplest way to disable edit shortcuts without unwanted side effects is to no-op override the JS function that generates them in the first place. You can do this from PHP as follows:
add_action( 'wp_enqueue_scripts', function () {
$js = 'wp.customize.selectiveRefresh.Partial.prototype.createEditShortcutForPlacement = function() {};';
wp_add_inline_script( 'customize-selective-refresh', $js );
} );
This will work for any theme.
A: This featured is enabled by just adding theme support feature. Here is the code
add_theme_support( 'customize-selective-refresh-widgets' )
You can find this in functions.php file and remove this line of code to disable the feature or you can add a hook to deactivate it like the code below and place that code at the end of functions.php file.
remove_theme_support( 'customize-selective-refresh-widgets' );
This will deactivate the front end edit shortcut support for your theme.
update:
To remove this support from twenty seventeen theme you have to remove that function which is making live edit support and partial refresh section. And for other theme you have to find out that function inside functions.php file. In this case here is the code solution.
remove_action('customize_register', 'twentyseventeen_customize_register' );
place this code at the end of functions.php file and you are done.
| wordpress | {
"language": "en",
"length": 239,
"provenance": "stackexchange_00019.jsonl.gz:472085",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/252799"
} | [
0.0599365234375,
-0.02777099609375,
0.0364990234375,
-0.01116943359375,
-0.005382537841796875,
-0.0255889892578125,
0.0594482421875,
-0.015838623046875,
-0.0012617111206054688,
0.0175933837890625,
0.047088623046875,
-0.0325927734375,
0.006916046142578125,
-0.06280517578125,
0.0008511543273925781,
-0.009368896484375,
0.036041259765625,
-0.0256500244140625,
0.0035858154296875,
-0.0300750732421875,
0.01739501953125,
-0.0297698974609375,
0.0239715576171875,
0.047760009765625,
0.006977081298828125,
0.0224609375,
0.05419921875,
0.0138397216796875,
-0.027099609375,
-0.00923919677734375,
0.01255035400390625,
-0.007762908935546875,
0.02166748046875,
0.048248291015625,
-0.05145263671875,
0.009765625,
-0.007080078125,
0.018341064453125,
0.01064300537109375,
0.00440216064453125,
0.03985595703125,
-0.0262298583984375,
-0.04461669921875,
0.01041412353515625,
-0.0462646484375,
-0.0016527175903320312,
0.0217437744140625,
-0.006511688232421875,
0.0124053955078125,
0.04449462890625,
0.00408172607421875,
0.022796630859375,
0.00832366943359375,
-0.0086517333984375,
-0.015594482421875,
-0.049407958984375,
-0.01300048828125,
0.0165863037109375,
0.024139404296875,
0.068603515625,
-0.00475311279296875,
-0.0009202957153320312,
-0.0159759521484375,
-0.08544921875,
0.01983642578125,
0.01166534423828125,
-0.005794525146484375,
0.018280029296875,
-0.042724609375,
0.027252197265625,
0.0227508544921875,
-0.0675048828125,
0.0245819091796875,
-0.01654052734375,
0.01291656494140625,
0.0228271484375,
-0.021942138671875,
0.01406097412109375,
0.035614013671875,
-0.00962066650390625,
0.05474853515625,
-0.0182037353515625,
-0.018218994140625,
-0.0114593505859375,
0.0343017578125,
0.0291900634765625,
0.01116943359375,
-0.03009033203125,
0.0118408203125,
-0.0167083740234375,
-0.0008153915405273438,
-0.0012331008911132812,
-0.0118560791015625,
0.029937744140625,
-0.0091552734375,
-0.02398681640625,
0.03216552734375,
-0.0137939453125,
-0.0050811767578125,
-0.01558685302734375,
0.036376953125,
-0.051605224609375,
0.03472900390625,
-0.005313873291015625,
-0.0290985107421875,
-0.0133514404296875,
0.0162811279296875,
0.035491943359375,
0.025543212890625,
0.038055419921875,
-0.0049591064453125,
-0.0026416778564453125,
0.009307861328125,
0.02197265625,
-0.031829833984375,
-0.0175018310546875,
-0.041534423828125,
0.01023101806640625,
-0.022430419921875,
0.003414154052734375,
-0.0108795166015625,
0.021148681640625,
-0.024017333984375,
-0.018798828125,
-0.027923583984375,
-0.0382080078125,
-0.00586700439453125,
0.01050567626953125,
0.045135498046875,
-0.00867462158203125,
-0.053070068359375,
-0.006549835205078125,
0.107666015625,
0.0860595703125,
0.07269287109375,
-0.014892578125,
0.004878997802734375,
-0.004375457763671875,
0.007904052734375,
0.0161285400390625,
-0.01497650146484375,
-0.00628662109375,
0.037353515625,
-0.00937652587890625,
0.0079193115234375,
0.0325927734375,
0.0261688232421875,
-0.0019855499267578125,
0.0170745849609375,
-0.035675048828125,
-0.0274505615234375,
0.010833740234375,
0.044219970703125,
0.018157958984375,
-0.0312347412109375,
-0.017791748046875,
0.044525146484375,
-0.03363037109375,
-0.0266265869140625,
-0.06378173828125,
0.001148223876953125,
0.0232086181640625,
0.0309295654296875,
-0.018829345703125,
-0.0210113525390625,
-0.0270233154296875,
-0.027130126953125,
-0.00028514862060546875,
0.0229644775390625,
0.01383209228515625,
0.0198516845703125,
0.0014657974243164062,
0.01044464111328125,
0.0212249755859375,
0.0021762847900390625,
0.01503753662109375,
0.0230560302734375,
0.0023174285888671875,
0.007053375244140625,
0.02825927734375,
-0.005329132080078125,
-0.0257720947265625,
0.053131103515625,
-0.02532958984375,
-0.076416015625,
0.07220458984375,
-0.019622802734375,
0.07916259765625,
0.037384033203125,
0.002101898193359375,
0.0380859375,
-0.0014810562133789062,
0.007266998291015625,
-0.000005424022674560547,
0.015716552734375,
-0.033172607421875,
-0.0251007080078125,
-0.01161956787109375,
-0.013153076171875,
0.00638580322265625,
-0.006160736083984375,
0.00257110595703125,
0.0025177001953125,
-0.00487518310546875,
-0.09130859375,
0.0223388671875,
-0.04852294921875,
0.0418701171875,
-0.0086669921875,
-0.011199951171875,
0.0209197998046875,
-0.01525115966796875,
-0.0140228271484375,
0.00830841064453125,
-0.0177459716796875,
0.00951385498046875,
-0.030364990234375,
0.07086181640625,
0.00019025802612304688,
0.037353515625,
0.0325927734375,
-0.07257080078125,
0.045501708984375,
-0.004974365234375,
0.01265716552734375,
-0.0242462158203125,
-0.00931549072265625,
-0.01172637939453125,
0.031402587890625,
-0.0092620849609375,
0.036102294921875,
0.0181884765625,
-0.01165771484375,
0.01401519775390625,
-0.0292816162109375,
-0.01023101806640625,
-0.018463134765625,
-0.0484619140625,
0.005706787109375,
0.052642822265625,
0.0413818359375,
-0.00237274169921875,
-0.0232696533203125,
-0.0092620849609375,
0.01361846923828125,
-0.004711151123046875,
0.0241851806640625,
-0.0226287841796875,
0.002254486083984375,
0.00945281982421875,
0.0032367706298828125,
-0.010345458984375,
0.0275726318359375,
0.042449951171875,
0.00759124755859375,
0.01056671142578125,
-0.0241851806640625,
-0.00939178466796875,
0.040374755859375,
-0.0189361572265625,
0.01184844970703125,
-0.00005036592483520508,
0.000732421875,
-0.016326904296875,
0.053192138671875,
0.013458251953125,
0.062744140625,
0.0537109375,
-0.01898193359375,
0.017181396484375,
0.002063751220703125,
-0.000469207763671875,
0.0033359527587890625,
0.0037593841552734375,
0.054412841796875,
-0.0212860107421875,
-0.013458251953125,
-0.0175323486328125,
0.0230712890625,
0.003040313720703125,
-0.0143280029296875,
-0.00567626953125,
0.00882720947265625,
-0.00012105703353881836,
0.0235137939453125,
-0.0509033203125,
0.01476287841796875,
-0.01441192626953125,
0.009185791015625,
-0.02618408203125,
-0.0043182373046875,
0.04876708984375,
-0.006626129150390625,
0.03240966796875,
0.0265655517578125,
-0.0169830322265625,
0.0062255859375,
-0.021453857421875,
0.030364990234375,
-0.0230560302734375,
0.0200347900390625,
0.057769775390625,
-0.022430419921875,
0.013397216796875,
0.0223236083984375,
-0.034942626953125,
0.0157928466796875,
0.021209716796875,
0.00926971435546875,
0.0285186767578125,
-0.07379150390625,
0.0214996337890625,
0.00919342041015625,
0.0282440185546875,
-0.04046630859375,
-0.055694580078125,
-0.0088653564453125,
0.00917816162109375,
-0.05596923828125,
-0.028076171875,
-0.00525665283203125,
-0.031494140625,
-0.046112060546875,
0.037628173828125,
-0.022003173828125,
-0.0001513957977294922,
0.071044921875,
-0.0032863616943359375,
-0.0216827392578125,
-0.005245208740234375,
0.047760009765625,
0.0003268718719482422,
0.017669677734375,
-0.0228118896484375,
0.01556396484375,
-0.0184783935546875,
0.0074462890625,
0.034149169921875,
0.006366729736328125,
0.007904052734375,
0.040618896484375,
-0.03277587890625,
-0.01284027099609375,
-0.00891876220703125,
0.00791168212890625,
0.0037593841552734375,
-0.0041351318359375,
0.01110076904296875,
-0.004375457763671875,
0.02178955078125,
-0.021759033203125,
-0.026153564453125,
-0.01197052001953125,
0.01293182373046875,
-0.00830078125,
0.09783935546875,
0.03143310546875,
-0.0078277587890625,
0.052093505859375,
-0.0282440185546875,
-0.0325927734375,
-0.0235137939453125,
-0.05450439453125,
-0.002597808837890625,
0.02276611328125,
0.0016889572143554688,
-0.0174713134765625,
0.021331787109375,
0.058746337890625,
0.035064697265625,
0.00205230712890625,
0.0316162109375,
0.02032470703125,
0.002101898193359375,
0.03851318359375,
-0.0584716796875,
0.037445068359375,
-0.0118408203125,
0.07928466796875,
0.027618408203125,
-0.0197906494140625,
-0.0341796875,
-0.00978851318359375,
-0.057952880859375,
-0.01003265380859375,
0.02642822265625,
-0.05230712890625,
-0.0177764892578125,
-0.03192138671875,
0.00632476806640625,
-0.013397216796875,
0.0297088623046875,
-0.04010009765625,
-0.004184722900390625,
-0.0283355712890625,
-0.002490997314453125,
-0.004642486572265625,
-0.046142578125,
-0.030853271484375,
0.002101898193359375,
-0.0989990234375,
0.042938232421875,
0.00719451904296875,
-0.02264404296875,
-0.046783447265625,
-0.0121307373046875,
-0.07208251953125,
-0.0380859375,
0.03680419921875,
-0.016143798828125,
0.027374267578125,
0.0295867919921875,
0.013153076171875,
0.005290985107421875,
-0.021881103515625,
-0.0283203125,
-0.0845947265625,
0.0012445449829101562,
-0.0283966064453125,
0.0253448486328125,
-0.00778961181640625,
0.008575439453125,
-0.0465087890625,
0.0194244384765625,
0.0280303955078125,
-0.003498077392578125,
0.035003662109375,
0.01131439208984375,
-0.033447265625,
0.0296478271484375,
0.0430908203125,
-0.03448486328125,
0.007022857666015625,
0.003459930419921875,
-0.059356689453125,
-0.0111083984375,
-0.035919189453125,
-0.0234832763671875,
0.0168609619140625,
-0.05487060546875,
-0.0296173095703125,
-0.036956787109375,
-0.055877685546875,
0.056671142578125,
-0.0308380126953125,
0.01343536376953125,
-0.06744384765625,
-0.0989990234375,
0.040985107421875,
-0.03387451171875,
0.0026035308837890625,
-0.0200347900390625,
0.036376953125,
0.012054443359375,
-0.01861572265625,
0.04632568359375,
0.00994110107421875,
0.0386962890625,
-0.0004649162292480469,
-0.0005631446838378906,
0.01520538330078125,
-0.0333251953125,
0.01050567626953125,
-0.00203704833984375,
-0.01702880859375,
-0.019287109375,
0.053955078125,
-0.022705078125,
-0.01552581787109375,
0.0000050067901611328125,
-0.047027587890625,
0.03057861328125,
0.021087646484375,
0.019775390625,
-0.016082763671875,
0.01026153564453125,
0.0069580078125,
0.0249786376953125,
-0.03619384765625,
-0.0003666877746582031,
-0.01812744140625,
0.0022754669189453125,
0.013671875,
0.03857421875,
-0.0009150505065917969,
0.0222625732421875,
0.0261383056640625,
0.035858154296875,
-0.00841522216796875,
0.02130126953125,
0.005992889404296875,
-0.0203094482421875,
0.03350830078125,
-0.0099639892578125,
-0.02105712890625,
0.00986480712890625,
0.00487518310546875,
0.045806884765625,
-0.007640838623046875,
-0.06256103515625,
-0.03729248046875,
0.00634765625,
0.01336669921875,
-0.00011807680130004883,
-0.01171112060546875,
0.00920867919921875,
0.0233154296875,
0.0237884521484375,
0.02197265625,
-0.00838470458984375,
0.0155792236328125,
-0.00911712646484375,
0.0210723876953125,
0.0287017822265625,
-0.02984619140625,
-0.00572967529296875,
-0.00040221214294433594,
-0.0024471282958984375,
-0.0278778076171875,
0.0157928466796875,
0.018157958984375,
0.037628173828125,
-0.008514404296875,
-0.0029964447021484375,
0.03656005859375,
0.0016422271728515625,
-0.03875732421875,
0.03790283203125,
-0.05755615234375,
-0.061920166015625,
0.041473388671875,
0.054290771484375,
-0.015228271484375,
-0.006946563720703125,
0.00403594970703125,
0.01361083984375,
-0.03778076171875,
0.03857421875,
0.02691650390625,
-0.04559326171875,
-0.0172271728515625,
0.0277862548828125,
0.00848388671875,
0.01168060302734375,
0.007171630859375,
-0.0338134765625,
-0.01788330078125,
-0.047332763671875,
0.0283966064453125,
-0.0665283203125,
-0.0198516845703125,
-0.003147125244140625,
-0.0184783935546875,
-0.0015840530395507812,
-0.00635528564453125,
-0.06341552734375,
-0.0491943359375,
0.00516510009765625,
-0.0012598037719726562,
0.038238525390625,
-0.0270538330078125,
-0.008514404296875,
-0.02520751953125,
0.0269927978515625,
-0.020263671875,
0.0197906494140625,
0.01263427734375,
-0.0239105224609375,
-0.0294036865234375,
-0.01041412353515625,
-0.072509765625,
-0.0305023193359375,
-0.060211181640625,
-0.053253173828125,
-0.059539794921875,
0.01251983642578125,
-0.009765625,
0.01322174072265625,
-0.0229339599609375,
-0.020111083984375,
-0.030120849609375,
0.0452880859375,
0.02874755859375,
0.0657958984375,
0.001560211181640625,
0.0236053466796875,
-0.0008554458618164062,
0.0098724365234375,
0.0295257568359375,
0.0299530029296875,
0.0067138671875,
-0.034271240234375,
0.043060302734375,
0.00650787353515625,
-0.0762939453125,
-0.042816162109375,
0.0035457611083984375,
0.007152557373046875,
0.036285400390625,
-0.040771484375,
0.0400390625,
-0.0239715576171875,
0.00400543212890625,
-0.0274658203125,
0.021087646484375,
-0.056427001953125,
0.0272216796875,
0.0082855224609375,
-0.023101806640625,
0.035888671875,
-0.001216888427734375,
-0.032562255859375,
0.05029296875,
-0.01279449462890625,
0.041168212890625,
0.006317138671875,
-0.037078857421875,
0.032806396484375,
0.062164306640625,
-0.02783203125,
0.052032470703125,
0.00745391845703125,
-0.0003905296325683594,
0.0721435546875,
-0.01282501220703125,
0.0059661865234375,
-0.0017299652099609375,
0.0246429443359375,
-0.0106048583984375,
0.00098419189453125,
0.0155029296875,
-0.00530242919921875,
0.03167724609375,
0.09051513671875,
0.09521484375,
-0.12744140625,
0.01300811767578125,
0.0289306640625,
0.00301361083984375,
0.0177459716796875,
0.0069122314453125,
-0.01525115966796875,
-0.044281005859375,
0.041778564453125,
-0.0606689453125,
-0.022308349609375,
0.01053619384765625,
-0.0297393798828125,
-0.014129638671875,
0.0132293701171875,
0.0203094482421875,
0.0206146240234375,
0.027587890625,
-0.0220184326171875,
-0.00445556640625,
0.018524169921875,
-0.0257720947265625,
-0.00629425048828125,
0.0292510986328125,
-0.067138671875,
-0.09637451171875,
-0.00885772705078125,
0.004852294921875,
-0.045074462890625,
0.034698486328125,
-0.03302001953125,
-0.02215576171875,
0.03253173828125,
-0.040496826171875,
0.040771484375,
-0.008575439453125,
-0.0340576171875,
0.025360107421875,
-0.0234222412109375,
-0.01503753662109375,
0.0323486328125,
-0.036102294921875,
0.00830841064453125,
0.017669677734375,
0.00623321533203125,
-0.005527496337890625,
0.03460693359375,
0.140625,
-0.048248291015625,
-0.03814697265625,
0.02716064453125,
-0.0179901123046875,
-0.03045654296875,
-0.02703857421875,
-0.02459716796875,
-0.05511474609375,
-0.01552581787109375,
-0.043182373046875,
-0.044342041015625,
0.007099151611328125,
-0.041748046875,
-0.04803466796875,
0.0860595703125,
-0.036102294921875,
0.05413818359375,
0.0231781005859375,
0.0187835693359375,
0.0018472671508789062,
0.01319122314453125,
0.02392578125,
0.031768798828125,
0.0211181640625,
0.01507568359375,
0.03460693359375,
-0.003696441650390625,
0.03607177734375,
0.03204345703125,
0.05426025390625,
0.00890350341796875,
-0.009521484375,
-0.0013723373413085938,
0.042205810546875,
0.0224609375,
-0.013092041015625,
0.0189666748046875,
-0.0171661376953125,
-0.0213623046875,
0.03875732421875,
0.006122589111328125,
0.0241241455078125,
0.0372314453125,
-0.0285797119140625,
0.0202178955078125,
0.0213470458984375,
0.03326416015625,
0.0179901123046875,
0.048980712890625,
0.0194549560546875,
-0.01068878173828125,
0.00812530517578125,
0.001522064208984375,
-0.0207366943359375,
0.0193328857421875,
-0.0159912109375,
-0.06201171875,
-0.04937744140625,
-0.0267333984375,
0.01204681396484375,
0.00016009807586669922,
0.00336456298828125,
-0.02423095703125,
0.013946533203125,
-0.043487548828125,
-0.02728271484375,
-0.01091766357421875,
0.04339599609375,
-0.0626220703125,
0.01708984375,
0.0174102783203125,
0.0279388427734375,
-0.0135650634765625,
0.0080718994140625,
0.00907135009765625,
0.01253509521484375,
-0.0120391845703125,
-0.03717041015625,
0.020263671875,
0.020843505859375,
-0.010772705078125,
0.008544921875,
0.018096923828125,
-0.02459716796875,
0.036651611328125,
0.0027599334716796875,
0.007228851318359375,
0.0262451171875,
0.004726409912109375,
0.0250244140625,
0.07562255859375,
-0.044403076171875,
0.0018701553344726562,
-0.00789642333984375,
-0.06439208984375,
-0.0022335052490234375,
0.016693115234375,
0.0595703125,
0.00345611572265625,
0.03814697265625,
-0.0149383544921875,
-0.042633056640625,
0.026824951171875,
-0.01059722900390625,
0.03759765625,
-0.039215087890625,
0.0030384063720703125,
-0.0185089111328125,
0.032470703125,
0.06219482421875,
0.038360595703125,
0.0537109375,
0.01464080810546875,
-0.007251739501953125,
0.0231170654296875,
0.032257080078125,
-0.01971435546875,
-0.021484375,
-0.0182037353515625,
0.0241241455078125,
0.03778076171875,
0.023162841796875,
0.0007696151733398438,
0.039520263671875,
0.0430908203125,
-0.00914764404296875,
0.007778167724609375,
0.0086212158203125,
-0.0224151611328125,
0.00457763671875,
0.0095367431640625,
-0.0015115737915039062,
0.0321044921875,
-0.0131683349609375,
0.006916046142578125,
-0.0262908935546875,
-0.06768798828125,
0.019989013671875,
0.03582763671875,
-0.0498046875,
0.044921875,
-0.0218505859375,
-0.00823211669921875,
-0.0288238525390625,
0.017242431640625,
-0.0078125,
-0.01104736328125,
0.0092926025390625,
-0.0203094482421875,
-0.08758544921875,
-0.03375244140625,
-0.05108642578125,
0.03546142578125,
-0.0184326171875,
0.0911865234375,
-0.025909423828125,
0.01412200927734375,
0.0103912353515625,
0.0286865234375,
-0.0214385986328125,
-0.021514892578125,
0.03173828125,
-0.0235748291015625,
0.003414154052734375,
-0.000835418701171875,
0.004863739013671875,
0.050018310546875,
-0.01436614990234375,
-0.0227813720703125,
0.0227203369140625,
-0.0175933837890625,
0.005268096923828125,
0.01364898681640625,
0.024810791015625,
-0.025482177734375,
-0.0233001708984375,
-0.031585693359375,
-0.017822265625,
-0.004261016845703125,
0.00043010711669921875,
0.0120697021484375,
-0.024688720703125,
0.03814697265625,
0.0017795562744140625,
0.01358795166015625,
0.05987548828125,
0.022216796875,
0.02105712890625,
-0.01715087890625,
0.0257568359375,
0.0023899078369140625,
-0.0135955810546875,
0.005954742431640625,
0.0333251953125,
-0.0718994140625,
0.03375244140625,
-0.0528564453125,
0.0161285400390625,
0.0186767578125,
0.044036865234375,
-0.01678466796875,
0.0101318359375,
0.01143646240234375,
0.021575927734375,
-0.015411376953125,
0.00809478759765625,
-0.00370025634765625,
-0.03143310546875,
0.003093719482421875,
0.0211944580078125,
-0.018341064453125,
-0.0197296142578125,
-0.02081298828125,
0.0023288726806640625,
0.0217742919921875,
0.005039215087890625,
-0.06622314453125,
0.047332763671875,
-0.031829833984375,
0.039031982421875,
-0.0228729248046875,
0.0181121826171875,
-0.02264404296875,
-0.01971435546875,
-0.004131317138671875,
-0.01091766357421875,
-0.017852783203125,
0.06787109375,
0.030242919921875,
-0.0015316009521484375,
0.0228118896484375,
0.0026721954345703125,
-0.0277099609375,
-0.0037517547607421875,
-0.0031719207763671875,
0.0498046875,
-0.053802490234375,
-0.045806884765625,
-0.0198822021484375,
0.0093536376953125,
0.0122528076171875,
-0.005970001220703125,
-0.0072174072265625,
-0.0196380615234375,
-0.005336761474609375,
-0.0202484130859375,
0.0021076202392578125,
0.015594482421875,
-0.04833984375,
-0.09136962890625,
-0.01544952392578125,
-0.0024814605712890625,
-0.0413818359375,
-0.01068878173828125,
0.0108642578125,
-0.01346588134765625,
0.046142578125,
0.0145263671875,
-0.0257415771484375,
0.01158905029296875,
0.01181793212890625,
-0.0079803466796875,
0.033477783203125,
-0.0135345458984375,
0.035888671875,
-0.021331787109375,
0.0214385986328125,
-0.0104827880859375,
-0.05328369140625,
-0.01285552978515625,
0.009307861328125,
0.00521087646484375,
0.0211334228515625,
-0.044921875,
-0.021331787109375,
-0.0010519027709960938,
0.0263214111328125,
0.004734039306640625,
-0.037567138671875,
-0.0694580078125,
-0.033477783203125,
0.065185546875,
0.07794189453125,
0.03192138671875,
-0.032012939453125,
0.025543212890625,
-0.0015211105346679688,
-0.01210784912109375,
0.01003265380859375,
0.018035888671875,
-0.0221099853515625,
-0.00157928466796875,
0.024658203125,
0.01158905029296875,
-0.0171661376953125,
-0.0231170654296875,
-0.023223876953125,
-0.03582763671875,
-0.03961181640625,
0.0107421875,
-0.053741455078125,
0.0616455078125,
0.00292205810546875,
-0.0252838134765625,
0.00806427001953125,
-0.019073486328125,
-0.019439697265625,
0.01099395751953125,
-0.0207061767578125,
-0.0209503173828125,
-0.00665283203125,
-0.0233306884765625,
0.046875,
-0.020294189453125,
0.0280914306640625,
-0.05780029296875,
0.00530242919921875,
0.0163726806640625,
-0.00002205371856689453,
-0.01593017578125,
-0.018707275390625,
-0.01503753662109375,
0.0384521484375,
-0.0260162353515625,
0.042816162109375,
-0.002567291259765625,
0.0287933349609375,
-0.00820159912109375,
0.0194244384765625,
-0.01299285888671875,
-0.001583099365234375,
-0.00444793701171875,
-0.01244354248046875,
0.0061187744140625,
0.03948974609375,
-0.0138397216796875,
-0.0166015625,
0.0131378173828125,
-0.026214599609375,
-0.0031337738037109375,
0.0060272216796875
] |
fea59c6beb1a7e63ee16cdd6e0274ec4c9c83f4c | Wordpress Stackexchange
Q: How to manually link posts to each other in Wordpress I have two language versions for each of my pages using Polylang plugin. There's a language switcher on every page. But somehow I created two posts not connected to each other (first two in the list). How can I interconnect them so language switcher works properly?
A: I'll use as example two pages: Hello (en) and Bonjour (fr).
*
*Click "Edit" in page Hello (doesn't really matter which one)
*At the right sidebar there will be the language of the current page (English) and a list of flags of other languages with a plus symbol (to create another page) and a text input beside it:
*In this text input, start typing the page title of the translated page (on our example, Bonjour). The input will suggest the other page, just click on it and save, it will link each other.
Source
| Q: How to manually link posts to each other in Wordpress I have two language versions for each of my pages using Polylang plugin. There's a language switcher on every page. But somehow I created two posts not connected to each other (first two in the list). How can I interconnect them so language switcher works properly?
A: I'll use as example two pages: Hello (en) and Bonjour (fr).
*
*Click "Edit" in page Hello (doesn't really matter which one)
*At the right sidebar there will be the language of the current page (English) and a list of flags of other languages with a plus symbol (to create another page) and a text input beside it:
*In this text input, start typing the page title of the translated page (on our example, Bonjour). The input will suggest the other page, just click on it and save, it will link each other.
Source
A: pll_save_term_translations
Defines which terms are translations of each other
Usage:
pll_save_term_translations($arr);
‘$arr’ => (required) associative array of translations with language code as key and term id as value
https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/
A: You have to set the language for all existing categories and post tags, otherwise they won’t be displayed in the autocomplete input field.
Source
| wordpress | {
"language": "en",
"length": 207,
"provenance": "stackexchange_00019.jsonl.gz:472152",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/253025"
} | [
0.017333984375,
-0.007781982421875,
0.02972412109375,
0.032684326171875,
-0.0237884521484375,
-0.019622802734375,
0.04168701171875,
-0.055267333984375,
-0.011688232421875,
0.01763916015625,
0.016998291015625,
0.005176544189453125,
-0.0005331039428710938,
-0.04083251953125,
0.035186767578125,
-0.016510009765625,
0.0308380126953125,
0.01354217529296875,
0.0242919921875,
0.00048732757568359375,
-0.005680084228515625,
0.0046539306640625,
0.032196044921875,
0.00469970703125,
0.041412353515625,
-0.01202392578125,
0.0255889892578125,
-0.0068359375,
0.00638580322265625,
-0.0126495361328125,
0.033782958984375,
-0.0037078857421875,
0.017852783203125,
0.017120361328125,
-0.0643310546875,
-0.10797119140625,
0.018585205078125,
-0.02313232421875,
-0.05462646484375,
0.057159423828125,
0.01462554931640625,
0.00421905517578125,
-0.0042724609375,
0.042755126953125,
-0.019927978515625,
-0.051544189453125,
0.026702880859375,
-0.0372314453125,
0.022735595703125,
0.0049896240234375,
-0.0154876708984375,
0.0060577392578125,
-0.01558685302734375,
0.04876708984375,
0.00017178058624267578,
0.0067291259765625,
-0.0067901611328125,
0.0022640228271484375,
0.0081329345703125,
0.05572509765625,
-0.005229949951171875,
0.0229339599609375,
-0.0202789306640625,
-0.042694091796875,
-0.03765869140625,
0.009429931640625,
-0.025909423828125,
-0.0157012939453125,
-0.0133819580078125,
-0.044677734375,
0.0205078125,
-0.0226593017578125,
0.0049591064453125,
-0.0303955078125,
0.003475189208984375,
0.0305023193359375,
-0.04180908203125,
-0.01873779296875,
0.04034423828125,
-0.007534027099609375,
0.0102386474609375,
0.004032135009765625,
0.004482269287109375,
-0.0272369384765625,
-0.005092620849609375,
-0.032684326171875,
-0.0176239013671875,
0.00045037269592285156,
-0.06732177734375,
-0.049468994140625,
-0.042205810546875,
-0.0240020751953125,
-0.0948486328125,
0.0020008087158203125,
-0.01404571533203125,
-0.00885009765625,
-0.003643035888671875,
0.032379150390625,
-0.01495361328125,
0.033416748046875,
-0.01450347900390625,
-0.0269927978515625,
0.03802490234375,
-0.043182373046875,
0.0194091796875,
0.0037212371826171875,
-0.00426483154296875,
-0.027557373046875,
0.049560546875,
0.023590087890625,
-0.00432586669921875,
0.10601806640625,
0.014923095703125,
-0.016937255859375,
0.01290130615234375,
-0.003719329833984375,
-0.01258087158203125,
0.0322265625,
0.01114654541015625,
-0.003719329833984375,
-0.0299835205078125,
-0.006847381591796875,
-0.0684814453125,
0.05633544921875,
0.028045654296875,
0.00537109375,
0.022003173828125,
0.056976318359375,
0.01271820068359375,
0.0251312255859375,
-0.041534423828125,
0.0015115737915039062,
0.10223388671875,
0.029327392578125,
0.01335906982421875,
-0.0273590087890625,
0.015045166015625,
0.0031147003173828125,
0.01275634765625,
-0.01515960693359375,
0.0222930908203125,
-0.0187530517578125,
-0.0131072998046875,
0.03350830078125,
-0.052703857421875,
-0.006656646728515625,
0.01250457763671875,
0.0347900390625,
-0.0268096923828125,
-0.030975341796875,
-0.00011622905731201172,
-0.041229248046875,
0.015838623046875,
-0.02276611328125,
0.0286407470703125,
-0.048492431640625,
0.031524658203125,
-0.0460205078125,
0.058685302734375,
-0.01433563232421875,
0.002399444580078125,
0.0028820037841796875,
0.035919189453125,
-0.021209716796875,
-0.029083251953125,
-0.0119476318359375,
-0.048431396484375,
-0.007381439208984375,
0.0263824462890625,
-0.03216552734375,
0.027862548828125,
0.0078125,
-0.00589752197265625,
-0.033172607421875,
0.003261566162109375,
-0.00901031494140625,
-0.042816162109375,
0.025848388671875,
0.0158538818359375,
0.0202789306640625,
0.02667236328125,
-0.01392364501953125,
0.042449951171875,
0.03424072265625,
-0.04852294921875,
0.015411376953125,
0.03448486328125,
0.090576171875,
0.001918792724609375,
0.050567626953125,
0.041107177734375,
-0.0122528076171875,
-0.035369873046875,
0.0166778564453125,
-0.0229949951171875,
-0.012481689453125,
0.037139892578125,
0.0269622802734375,
0.0037937164306640625,
-0.019012451171875,
-0.0242156982421875,
0.0093994140625,
-0.04339599609375,
0.040557861328125,
-0.04620361328125,
-0.00618743896484375,
-0.01427459716796875,
0.0167236328125,
0.01247406005859375,
0.007350921630859375,
-0.003963470458984375,
-0.0159759521484375,
0.0293426513671875,
-0.0843505859375,
-0.03167724609375,
0.029541015625,
-0.0269927978515625,
-0.024139404296875,
0.01605224609375,
-0.027984619140625,
0.0606689453125,
-0.0118408203125,
0.01490020751953125,
0.0299224853515625,
0.00899505615234375,
-0.0165557861328125,
-0.026214599609375,
-0.01396942138671875,
-0.042388916015625,
0.00751495361328125,
-0.06573486328125,
0.0601806640625,
0.00420379638671875,
-0.01100921630859375,
-0.026580810546875,
0.01119232177734375,
0.00958251953125,
0.01214599609375,
-0.0036144256591796875,
0.02532958984375,
0.00666046142578125,
0.026641845703125,
-0.0145111083984375,
0.038421630859375,
0.00745391845703125,
-0.05670166015625,
-0.0018825531005859375,
0.03094482421875,
-0.0013818740844726562,
0.044921875,
0.006328582763671875,
0.0186614990234375,
0.0006265640258789062,
-0.03564453125,
0.002414703369140625,
0.0379638671875,
-0.0230865478515625,
-0.07867431640625,
0.02069091796875,
-0.020416259765625,
0.0279083251953125,
-0.05487060546875,
-0.050079345703125,
-0.01030731201171875,
0.035736083984375,
-0.06591796875,
0.0036983489990234375,
-0.0159759521484375,
0.0003516674041748047,
-0.0277099609375,
0.032135009765625,
-0.0259246826171875,
0.00024819374084472656,
-0.007328033447265625,
0.0244293212890625,
-0.020751953125,
0.005031585693359375,
-0.00473785400390625,
-0.00554656982421875,
-0.012603759765625,
-0.017303466796875,
0.034912109375,
-0.0261688232421875,
-0.030487060546875,
-0.007602691650390625,
-0.023284912109375,
-0.01500701904296875,
-0.038665771484375,
-0.0218048095703125,
-0.019134521484375,
-0.00899505615234375,
0.0291900634765625,
-0.0200347900390625,
0.047698974609375,
-0.0025310516357421875,
-0.0128936767578125,
0.0771484375,
-0.061553955078125,
0.03350830078125,
-0.032196044921875,
0.09307861328125,
0.0765380859375,
-0.0015382766723632812,
0.0028820037841796875,
-0.01043701171875,
0.018157958984375,
-0.0020465850830078125,
-0.0015287399291992188,
-0.018646240234375,
0.0031719207763671875,
-0.06646728515625,
-0.0164794921875,
0.007595062255859375,
-0.004642486572265625,
-0.034210205078125,
-0.03955078125,
-0.0295867919921875,
-0.00693511962890625,
-0.10626220703125,
-0.056396484375,
0.028106689453125,
-0.025665283203125,
0.0234222412109375,
0.044830322265625,
-0.00534820556640625,
-0.048248291015625,
0.07684326171875,
0.005123138427734375,
-0.004428863525390625,
-0.0018444061279296875,
-0.06396484375,
-0.0452880859375,
-0.053863525390625,
0.00487518310546875,
-0.0230560302734375,
0.0037136077880859375,
0.01490020751953125,
-0.0494384765625,
-0.016815185546875,
-0.031951904296875,
0.0050201416015625,
0.061614990234375,
-0.0205230712890625,
-0.014739990234375,
-0.00409698486328125,
-0.00018835067749023438,
0.07098388671875,
0.01406097412109375,
0.0261077880859375,
0.041900634765625,
-0.0352783203125,
-0.03515625,
0.03515625,
0.032684326171875,
0.054473876953125,
-0.07379150390625,
-0.06939697265625,
0.07135009765625,
0.0021877288818359375,
-0.00994110107421875,
0.0102386474609375,
-0.029510498046875,
-0.039306640625,
-0.005123138427734375,
0.031890869140625,
-0.0080108642578125,
-0.034912109375,
-0.013214111328125,
-0.03424072265625,
-0.025054931640625,
0.022369384765625,
-0.037567138671875,
0.016204833984375,
-0.00897216796875,
-0.01548004150390625,
0.0091705322265625,
0.005489349365234375,
-0.012725830078125,
0.0255126953125,
0.00013709068298339844,
0.013946533203125,
-0.0259552001953125,
0.046112060546875,
-0.026611328125,
-0.008331298828125,
0.0313720703125,
0.00031375885009765625,
0.00389862060546875,
0.0191192626953125,
-0.0205230712890625,
0.015594482421875,
0.03900146484375,
-0.08447265625,
-0.003810882568359375,
0.00812530517578125,
0.0295562744140625,
-0.031707763671875,
-0.07318115234375,
-0.03570556640625,
-0.01482391357421875,
0.008026123046875,
-0.0250244140625,
-0.0011377334594726562,
-0.011077880859375,
-0.03997802734375,
0.07269287109375,
-0.0221405029296875,
0.0095977783203125,
0.026458740234375,
0.006198883056640625,
-0.0300445556640625,
0.0242767333984375,
-0.043914794921875,
0.0085906982421875,
-0.0430908203125,
0.0159759521484375,
-0.051239013671875,
-0.01503753662109375,
0.0286712646484375,
0.039825439453125,
0.006618499755859375,
-0.043548583984375,
-0.0283355712890625,
0.0275115966796875,
-0.011444091796875,
0.047332763671875,
-0.0249481201171875,
0.004390716552734375,
0.04522705078125,
0.024139404296875,
0.0001480579376220703,
0.01154327392578125,
0.00922393798828125,
0.0134735107421875,
-0.032562255859375,
0.051025390625,
-0.019744873046875,
0.01451873779296875,
-0.01273345947265625,
-0.04742431640625,
-0.08184814453125,
-0.0227508544921875,
-0.0147247314453125,
-0.016693115234375,
-0.0017709732055664062,
-0.0207366943359375,
-0.023681640625,
-0.0638427734375,
0.01433563232421875,
-0.00260162353515625,
-0.0411376953125,
0.0160064697265625,
0.015777587890625,
0.0209197998046875,
-0.0177001953125,
-0.07379150390625,
0.05078125,
0.057037353515625,
0.0231475830078125,
0.047515869140625,
0.06207275390625,
-0.025054931640625,
0.0281829833984375,
0.055145263671875,
-0.01242828369140625,
0.044952392578125,
0.0031642913818359375,
0.01617431640625,
-0.03961181640625,
0.0123138427734375,
0.003513336181640625,
-0.0230560302734375,
0.03375244140625,
0.0005698204040527344,
-0.0205535888671875,
0.015289306640625,
0.0304107666015625,
-0.015411376953125,
-0.001827239990234375,
-0.03887939453125,
-0.00841522216796875,
0.00855255126953125,
-0.020782470703125,
0.022125244140625,
0.0112762451171875,
0.0033893585205078125,
-0.00757598876953125,
0.01776123046875,
-0.013458251953125,
0.05169677734375,
0.02813720703125,
0.039398193359375,
0.0196685791015625,
0.035858154296875,
-0.0037841796875,
-0.0121917724609375,
-0.006927490234375,
0.059112548828125,
0.0112762451171875,
-0.02777099609375,
-0.01100921630859375,
-0.00461578369140625,
0.018951416015625,
0.004543304443359375,
0.0599365234375,
0.0257568359375,
-0.00469970703125,
0.0125885009765625,
-0.0029506683349609375,
0.06298828125,
-0.00850677490234375,
-0.021942138671875,
-0.0190582275390625,
-0.015655517578125,
-0.00011515617370605469,
-0.01346588134765625,
0.07354736328125,
-0.042205810546875,
0.0390625,
-0.018768310546875,
-0.031890869140625,
-0.0093994140625,
0.0472412109375,
0.0330810546875,
-0.0272979736328125,
-0.0029296875,
0.0241241455078125,
0.0193023681640625,
-0.041168212890625,
-0.034210205078125,
0.048583984375,
0.058868408203125,
0.012451171875,
0.005565643310546875,
-0.022064208984375,
-0.005641937255859375,
-0.02044677734375,
0.043426513671875,
0.059967041015625,
-0.03558349609375,
-0.007503509521484375,
0.034759521484375,
0.015350341796875,
0.004535675048828125,
-0.00975799560546875,
-0.0027980804443359375,
-0.0178070068359375,
0.0281829833984375,
-0.0161285400390625,
0.0080718994140625,
0.0218353271484375,
0.0091705322265625,
0.04486083984375,
-0.024383544921875,
-0.0178680419921875,
-0.035247802734375,
0.036102294921875,
-0.031280517578125,
-0.0033702850341796875,
0.04290771484375,
0.0062103271484375,
0.007080078125,
-0.004215240478515625,
-0.0309600830078125,
0.0190277099609375,
0.00688934326171875,
0.05181884765625,
-0.0220489501953125,
-0.041717529296875,
-0.0039520263671875,
-0.0304412841796875,
-0.03155517578125,
-0.046722412109375,
-0.033172607421875,
-0.083984375,
-0.01230621337890625,
0.00023448467254638672,
0.0248260498046875,
-0.0169525146484375,
-0.007381439208984375,
0.00841522216796875,
0.00705718994140625,
-0.0090789794921875,
0.02008056640625,
-0.0015821456909179688,
0.05230712890625,
-0.004116058349609375,
0.0926513671875,
0.033294677734375,
0.030029296875,
-0.0302276611328125,
-0.042724609375,
-0.007343292236328125,
-0.0291748046875,
0.00396728515625,
0.0247955322265625,
-0.0233306884765625,
-0.003429412841796875,
0.0203857421875,
0.0032958984375,
-0.018951416015625,
-0.0130462646484375,
0.00420379638671875,
-0.0201263427734375,
0.02288818359375,
-0.003231048583984375,
-0.025115966796875,
0.03662109375,
-0.0240631103515625,
0.0272674560546875,
-0.0101165771484375,
0.0086669921875,
0.0057373046875,
-0.0142059326171875,
-0.006927490234375,
0.03082275390625,
-0.01148223876953125,
0.00926971435546875,
0.02630615234375,
0.0169525146484375,
0.042724609375,
0.01003265380859375,
0.025848388671875,
0.006313323974609375,
0.033233642578125,
-0.0060272216796875,
-0.01187896728515625,
0.000690460205078125,
-0.020233154296875,
-0.0196533203125,
-0.034820556640625,
-0.021759033203125,
0.005695343017578125,
0.04229736328125,
0.034912109375,
-0.058807373046875,
-0.00007283687591552734,
-0.00608062744140625,
-0.0478515625,
-0.0248565673828125,
0.01399993896484375,
-0.004058837890625,
-0.01502227783203125,
0.0105438232421875,
-0.032867431640625,
-0.0108795166015625,
0.0005774497985839844,
-0.01477813720703125,
-0.01213836669921875,
0.006866455078125,
0.016693115234375,
0.0184478759765625,
-0.005168914794921875,
-0.0135040283203125,
0.0176239013671875,
-0.004474639892578125,
-0.03662109375,
-0.032012939453125,
-0.004154205322265625,
-0.034393310546875,
-0.052734375,
-0.00962066650390625,
-0.035888671875,
0.029571533203125,
-0.0274658203125,
-0.01007843017578125,
0.0496826171875,
0.047698974609375,
-0.021575927734375,
-0.007221221923828125,
0.01451873779296875,
0.04315185546875,
0.01739501953125,
-0.0031948089599609375,
0.0374755859375,
0.0260467529296875,
-0.0168914794921875,
0.0012645721435546875,
-0.01493072509765625,
-0.0177764892578125,
-0.0162811279296875,
0.006473541259765625,
0.0906982421875,
-0.023834228515625,
-0.01352691650390625,
0.0295562744140625,
0.0037174224853515625,
-0.03125,
-0.021392822265625,
-0.0296630859375,
-0.066162109375,
-0.05706787109375,
-0.03289794921875,
-0.0838623046875,
-0.01519012451171875,
-0.056640625,
-0.0655517578125,
0.09307861328125,
-0.0204620361328125,
0.02813720703125,
-0.00112152099609375,
0.039703369140625,
-0.0016164779663085938,
0.0193939208984375,
-0.04034423828125,
0.05682373046875,
0.0092315673828125,
0.0240478515625,
-0.06365966796875,
-0.0012655258178710938,
-0.01128387451171875,
0.038116455078125,
0.047821044921875,
0.006282806396484375,
0.014617919921875,
-0.01210784912109375,
0.01366424560546875,
0.025421142578125,
-0.027099609375,
0.009674072265625,
-0.0011358261108398438,
0.028076171875,
0.017059326171875,
-0.048126220703125,
0.019378662109375,
-0.0255279541015625,
-0.0257110595703125,
0.023956298828125,
-0.007343292236328125,
-0.03997802734375,
-0.004932403564453125,
0.0087738037109375,
-0.0732421875,
0.01219940185546875,
0.018768310546875,
0.019287109375,
0.03778076171875,
-0.0011186599731445312,
0.025482177734375,
-0.001972198486328125,
-0.009185791015625,
-0.01230621337890625,
0.0355224609375,
-0.00875091552734375,
0.043853759765625,
0.022552490234375,
0.02044677734375,
0.0174560546875,
-0.0188140869140625,
0.0159149169921875,
-0.01593017578125,
-0.0196075439453125,
0.056793212890625,
0.0283050537109375,
0.04290771484375,
-0.04193115234375,
-0.050262451171875,
0.0046234130859375,
0.07452392578125,
-0.0254974365234375,
-0.041412353515625,
0.016998291015625,
0.0078125,
-0.003631591796875,
0.0084991455078125,
0.0034332275390625,
0.01251220703125,
0.05023193359375,
0.0099029541015625,
-0.002902984619140625,
-0.01222991943359375,
0.0031604766845703125,
0.0020542144775390625,
0.014862060546875,
-0.00406646728515625,
0.016510009765625,
-0.0582275390625,
0.025909423828125,
0.02886962890625,
0.06134033203125,
-0.003993988037109375,
0.095947265625,
0.0033054351806640625,
-0.018829345703125,
-0.005626678466796875,
0.03839111328125,
-0.0184478759765625,
0.0250701904296875,
-0.029754638671875,
-0.055572509765625,
-0.040283203125,
0.03411865234375,
0.0065460205078125,
-0.01346588134765625,
0.048919677734375,
0.054229736328125,
-0.034698486328125,
-0.0240478515625,
0.01444244384765625,
-0.01508331298828125,
0.00627899169921875,
-0.0270233154296875,
0.028472900390625,
0.00528717041015625,
-0.00940704345703125,
-0.027435302734375,
0.05230712890625,
0.004299163818359375,
-0.0151824951171875,
0.047149658203125,
-0.0033473968505859375,
-0.03533935546875,
-0.0012617111206054688,
0.0052337646484375,
0.09234619140625,
0.01081085205078125,
-0.090087890625,
-0.0211181640625,
-0.004283905029296875,
-0.06268310546875,
0.036224365234375,
0.0509033203125,
-0.0304412841796875,
-0.0024871826171875,
0.00919342041015625,
0.0039043426513671875,
0.01255035400390625,
-0.0015106201171875,
-0.002899169921875,
0.04925537109375,
0.042877197265625,
0.02337646484375,
-0.0144195556640625,
-0.0012331008911132812,
-0.0158843994140625,
0.042022705078125,
0.0261688232421875,
-0.014495849609375,
0.032257080078125,
0.054779052734375,
-0.027618408203125,
0.0251922607421875,
-0.01824951171875,
-0.01611328125,
0.03759765625,
0.01129913330078125,
-0.00011020898818969727,
-0.01611328125,
0.0029125213623046875,
0.0255889892578125,
0.0323486328125,
-0.03131103515625,
-0.0003247261047363281,
-0.00696563720703125,
0.003795623779296875,
0.0067291259765625,
0.015655517578125,
-0.028900146484375,
-0.0216217041015625,
-0.06695556640625,
-0.0157928466796875,
0.050384521484375,
0.042816162109375,
-0.019500732421875,
0.03680419921875,
-0.0293731689453125,
-0.0131683349609375,
0.00789642333984375,
-0.04296875,
-0.052154541015625,
0.00830841064453125,
0.035614013671875,
-0.0313720703125,
0.00960540771484375,
-0.0087432861328125,
-0.01137542724609375,
0.0216217041015625,
0.0252685546875,
0.0113677978515625,
-0.028167724609375,
-0.00347137451171875,
0.038818359375,
0.02081298828125,
-0.0200347900390625,
0.0106658935546875,
0.048187255859375,
-0.0270538330078125,
-0.002857208251953125,
0.038482666015625,
-0.006519317626953125,
-0.0229034423828125,
0.0036029815673828125,
0.0093536376953125,
0.01044464111328125,
-0.0095672607421875,
-0.026763916015625,
-0.028656005859375,
0.00334930419921875,
-0.008941650390625,
-0.0094451904296875,
-0.0229034423828125,
-0.0034770965576171875,
0.0181121826171875,
-0.031951904296875,
-0.0068511962890625,
0.00827789306640625,
0.041046142578125,
-0.051422119140625,
0.00439453125,
-0.01953125,
-0.0192718505859375,
-0.0157470703125,
0.0012502670288085938,
0.00879669189453125,
0.0064849853515625,
0.03045654296875,
0.01326751708984375,
0.0240478515625,
0.046051025390625,
-0.0006031990051269531,
-0.0012102127075195312,
0.0220947265625,
-0.0055084228515625,
-0.038665771484375,
-0.0465087890625,
0.042724609375,
-0.07305908203125,
-0.0243072509765625,
-0.00562286376953125,
-0.004550933837890625,
0.006244659423828125,
-0.0345458984375,
-0.0709228515625,
0.0555419921875,
-0.0034637451171875,
-0.0282745361328125,
-0.099365234375,
0.0226593017578125,
0.01385498046875,
-0.01134490966796875,
-0.0416259765625,
-0.0330810546875,
-0.04095458984375,
0.04827880859375,
-0.0165863037109375,
0.047149658203125,
0.009521484375,
-0.006519317626953125,
0.02215576171875,
0.0249786376953125,
0.0418701171875,
-0.02294921875,
0.040008544921875,
-0.0109405517578125,
0.007198333740234375,
0.02471923828125,
-0.058380126953125,
-0.0248565673828125,
-0.038970947265625,
0.0096588134765625,
0.019927978515625,
-0.0352783203125,
-0.02447509765625,
-0.055450439453125,
-0.001956939697265625,
0.0142669677734375,
0.008514404296875,
0.01340484619140625,
0.061370849609375,
-0.0024814605712890625,
-0.012847900390625,
0.00963592529296875,
-0.02117919921875,
0.016876220703125,
0.00901031494140625,
-0.032135009765625,
0.01386260986328125,
0.0025577545166015625,
-0.021026611328125,
-0.017242431640625,
-0.038787841796875,
-0.00453948974609375,
0.0247039794921875,
-0.042083740234375,
0.029693603515625,
0.05731201171875,
-0.03662109375,
0.015167236328125,
0.0001939535140991211,
-0.012176513671875,
0.036376953125,
-0.00010156631469726562,
0.0079498291015625,
0.007171630859375,
-0.00618743896484375,
-0.0065155029296875,
0.021881103515625,
-0.014404296875,
0.0182342529296875,
-0.021575927734375,
-0.02996826171875,
0.03680419921875,
0.005756378173828125,
0.055450439453125,
-0.01288604736328125,
-0.003971099853515625,
0.02105712890625,
0.01282501220703125,
0.0252227783203125,
0.00033164024353027344,
0.0037384033203125,
0.0266571044921875,
-0.044952392578125,
-0.0172576904296875,
-0.03924560546875,
-0.05303955078125,
0.00859832763671875,
-0.01119232177734375,
0.006511688232421875,
-0.02020263671875,
0.01464080810546875,
0.0208282470703125,
-0.00933074951171875,
0.0160980224609375
] |
3b014e65a422d28c0941c3f24dd9559513c57107 | Wordpress Stackexchange
Q: How do I clone or duplicate a post with the WordPress Command Line Interface WP-CLI? I know that I can clone or duplicate a post with several plugins. The one I use most often is https://wordpress.org/plugins/duplicate-post/. However I am using the WP-CLI more and more lately and I would like to be able to duplicate or clone a post from the command line.
Any suggestions would be appreciated.
A: Cloning a post via wp-cli is little trickier. It needs two steps:
*
*Create a file where save the information of post. Suppose, following command create a file named file.txt from hello post (id 1). In this case file.txt which save on root directory.
wp post get 1 > file.txt
*Create new post from this file. In our scenario file.txt saved all information of hello post. Following command create a post named duplicate
wp post create ./file.txt --post_title="duplicate"
| Q: How do I clone or duplicate a post with the WordPress Command Line Interface WP-CLI? I know that I can clone or duplicate a post with several plugins. The one I use most often is https://wordpress.org/plugins/duplicate-post/. However I am using the WP-CLI more and more lately and I would like to be able to duplicate or clone a post from the command line.
Any suggestions would be appreciated.
A: Cloning a post via wp-cli is little trickier. It needs two steps:
*
*Create a file where save the information of post. Suppose, following command create a file named file.txt from hello post (id 1). In this case file.txt which save on root directory.
wp post get 1 > file.txt
*Create new post from this file. In our scenario file.txt saved all information of hello post. Following command create a post named duplicate
wp post create ./file.txt --post_title="duplicate"
A: This can now be done via WP-CLI using $ wp post create --from-post=1. It even dupes the meta data.
A: Thanks a lot for your answer and @Mrinal and confirming it would work with a pipe @tfrangio.
I was interested too in copying the meta values from one post to the other, so after creating the post with the duplicate with the pipe:
wp post get 6815 --field=content | wp post create - --post_title="Title of dup" --post_status='draft'
After I get the ID of the new post, I passed the meta_keys which I was interested...
assuming 14 is the source post_ID and 21 the target post_ID, I want to copy tie_hide_related and tie_sidebar_pos:
for meta_key in tie_hide_related tie_sidebar_pos ; \
do wp post meta get 14 $meta_key | \
xargs wp post meta update 21 $meta_key \
; done
xargs is needed to pass the value returned by post-meta-get to wp post-meta update, even if the documentation says it reads from stdin, without xargs some single values are read as an one item list, thus changing the behaviour of the value
Then, to copy the terms of a taxonomy, let's say category:
for cat_id in `wp post term list 14 category --format=ids` ; \
do wp post term add 21 category $cat_id --by=id ; done
This last step could be repeated for several taxonomies.
| wordpress | {
"language": "en",
"length": 372,
"provenance": "stackexchange_00019.jsonl.gz:472214",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/253234"
} | [
0.021148681640625,
-0.0174102783203125,
0.0006031990051269531,
-0.0160064697265625,
0.002368927001953125,
-0.01285552978515625,
0.0423583984375,
-0.01540374755859375,
-0.03564453125,
0.02655029296875,
-0.002056121826171875,
0.03216552734375,
0.01061248779296875,
-0.0158843994140625,
0.0213623046875,
-0.0195770263671875,
0.03240966796875,
0.0197906494140625,
0.03277587890625,
-0.02020263671875,
0.0164794921875,
0.00445556640625,
0.0169677734375,
0.088134765625,
0.0257720947265625,
-0.01331329345703125,
0.06781005859375,
-0.0098419189453125,
0.0151214599609375,
-0.0091705322265625,
0.03155517578125,
-0.022430419921875,
0.036407470703125,
-0.0196685791015625,
-0.01235198974609375,
0.0126190185546875,
-0.0095977783203125,
-0.0063934326171875,
-0.01197052001953125,
0.0241851806640625,
0.0133514404296875,
0.0038089752197265625,
0.051300048828125,
-0.00341033935546875,
0.00861358642578125,
0.0097503662109375,
-0.0209197998046875,
-0.043975830078125,
0.00449371337890625,
0.06146240234375,
-0.01517486572265625,
-0.01355743408203125,
-0.0164642333984375,
0.045440673828125,
0.004985809326171875,
-0.022247314453125,
-0.01200103759765625,
0.0185394287109375,
0.047271728515625,
-0.038604736328125,
-0.04083251953125,
-0.032135009765625,
0.038970947265625,
0.0159759521484375,
0.0161285400390625,
-0.02215576171875,
0.0204925537109375,
0.0238037109375,
-0.044342041015625,
0.017974853515625,
0.057708740234375,
-0.0282440185546875,
0.011322021484375,
-0.029876708984375,
0.0163726806640625,
0.0123138427734375,
-0.03118896484375,
-0.02392578125,
0.0219268798828125,
0.00711822509765625,
0.0222320556640625,
0.0276336669921875,
0.018768310546875,
-0.043060302734375,
0.007694244384765625,
-0.0310516357421875,
-0.017913818359375,
-0.0135345458984375,
-0.0284881591796875,
-0.049530029296875,
-0.024932861328125,
-0.061859130859375,
-0.0194549560546875,
-0.0115203857421875,
-0.037109375,
-0.030731201171875,
-0.01605224609375,
0.0053253173828125,
0.0012788772583007812,
0.041778564453125,
-0.029815673828125,
-0.021209716796875,
0.0288848876953125,
-0.0249481201171875,
-0.00034308433532714844,
0.0341796875,
0.007404327392578125,
-0.01218414306640625,
0.00927734375,
0.00974273681640625,
-0.0287628173828125,
0.028594970703125,
0.011383056640625,
-0.052001953125,
-0.01441192626953125,
0.050323486328125,
0.00714874267578125,
0.0270843505859375,
0.0253448486328125,
0.0264434814453125,
-0.01654052734375,
0.01354217529296875,
0.00811004638671875,
0.0009746551513671875,
0.042236328125,
0.04205322265625,
0.0021266937255859375,
-0.031890869140625,
0.002899169921875,
-0.003070831298828125,
-0.01065826416015625,
0.0088348388671875,
0.05755615234375,
0.040618896484375,
-0.001495361328125,
-0.006038665771484375,
-0.0086212158203125,
-0.0267486572265625,
-0.00460052490234375,
0.0216522216796875,
-0.011260986328125,
-0.038177490234375,
0.01433563232421875,
-0.0006213188171386719,
0.048126220703125,
0.044769287109375,
-0.0036144256591796875,
-0.027313232421875,
0.01751708984375,
-0.00641632080078125,
-0.052581787109375,
-0.00148773193359375,
-0.005245208740234375,
0.0012311935424804688,
0.03985595703125,
-0.054962158203125,
-0.0114288330078125,
-0.027618408203125,
0.0863037109375,
-0.00971221923828125,
0.04193115234375,
0.03033447265625,
0.03680419921875,
0.040435791015625,
0.00531005859375,
-0.041046142578125,
-0.047332763671875,
-0.01186370849609375,
0.0259246826171875,
0.0194244384765625,
-0.00699615478515625,
-0.041778564453125,
0.0159912109375,
-0.031890869140625,
-0.034088134765625,
0.01160430908203125,
-0.01003265380859375,
-0.043487548828125,
0.0274505615234375,
0.04876708984375,
0.005191802978515625,
0.005924224853515625,
0.0178070068359375,
0.0147552490234375,
-0.036376953125,
-0.018096923828125,
0.00238037109375,
0.058441162109375,
0.05731201171875,
0.0335693359375,
0.0096435546875,
-0.0703125,
-0.0238037109375,
0.006221771240234375,
-0.06268310546875,
-0.0176849365234375,
0.002166748046875,
0.015960693359375,
-0.038909912109375,
0.043060302734375,
-0.006847381591796875,
-0.00757598876953125,
-0.018768310546875,
0.0286712646484375,
-0.07305908203125,
0.00873565673828125,
-0.0308990478515625,
0.0186920166015625,
-0.0357666015625,
-0.01513671875,
0.0231781005859375,
-0.01181793212890625,
0.020050048828125,
-0.0831298828125,
-0.04736328125,
-0.010498046875,
-0.02386474609375,
0.00627899169921875,
-0.027923583984375,
0.02099609375,
-0.051483154296875,
-0.00982666015625,
-0.054351806640625,
-0.0041656494140625,
0.01641845703125,
0.0101470947265625,
-0.033172607421875,
-0.002994537353515625,
-0.0145416259765625,
0.004848480224609375,
-0.0255584716796875,
0.032623291015625,
0.01849365234375,
0.01432037353515625,
-0.01837158203125,
-0.0024852752685546875,
0.01491546630859375,
-0.0303802490234375,
0.00905609130859375,
0.0458984375,
0.0325927734375,
0.0179290771484375,
0.01532745361328125,
0.03369140625,
0.04791259765625,
-0.006130218505859375,
0.01763916015625,
-0.005619049072265625,
0.033203125,
0.0675048828125,
0.0213470458984375,
-0.024444580078125,
0.0066680908203125,
-0.049896240234375,
0.009246826171875,
0.023162841796875,
0.0079803466796875,
0.04144287109375,
-0.037506103515625,
0.0146636962890625,
-0.0171966552734375,
-0.031524658203125,
-0.006237030029296875,
-0.021484375,
-0.018768310546875,
-0.005496978759765625,
0.006824493408203125,
0.0014257431030273438,
-0.0176544189453125,
-0.00118255615234375,
0.029388427734375,
0.00756072998046875,
0.020843505859375,
0.0101318359375,
-0.0229644775390625,
0.07806396484375,
-0.032989501953125,
-0.013153076171875,
0.0623779296875,
0.032867431640625,
-0.0021038055419921875,
0.0518798828125,
-0.01267242431640625,
-0.0175628662109375,
-0.00884246826171875,
-0.0291595458984375,
-0.0011463165283203125,
0.0077667236328125,
-0.0107421875,
-0.008453369140625,
0.003238677978515625,
0.03436279296875,
-0.0003719329833984375,
0.02032470703125,
0.016082763671875,
-0.0021724700927734375,
0.03131103515625,
-0.045440673828125,
0.03399658203125,
-0.0032978057861328125,
0.0628662109375,
0.06207275390625,
0.015777587890625,
0.01274871826171875,
0.0026950836181640625,
0.031158447265625,
0.00994110107421875,
-0.0008330345153808594,
-0.0300140380859375,
-0.00916290283203125,
-0.048309326171875,
-0.0109405517578125,
0.035186767578125,
0.0775146484375,
-0.007434844970703125,
-0.0286712646484375,
0.004962921142578125,
0.041778564453125,
-0.08154296875,
-0.1129150390625,
-0.026947021484375,
-0.051849365234375,
0.0275421142578125,
-0.00881195068359375,
-0.01531982421875,
-0.029693603515625,
0.03240966796875,
0.021453857421875,
0.06634521484375,
-0.0273590087890625,
-0.0186004638671875,
-0.0163116455078125,
-0.05413818359375,
-0.09375,
0.006504058837890625,
-0.02789306640625,
0.01250457763671875,
0.0447998046875,
0.01149749755859375,
-0.0279998779296875,
0.0171356201171875,
0.07379150390625,
-0.01207733154296875,
-0.01546478271484375,
0.0183868408203125,
-0.0183868408203125,
0.0164337158203125,
0.005626678466796875,
0.011383056640625,
0.038970947265625,
-0.021209716796875,
-0.01071929931640625,
0.012359619140625,
-0.0299072265625,
0.0007843971252441406,
0.01119232177734375,
-0.022216796875,
0.00719451904296875,
0.0252685546875,
-0.03192138671875,
-0.01413726806640625,
-0.0174560546875,
-0.0262908935546875,
-0.00677490234375,
-0.0097808837890625,
0.0157623291015625,
-0.0258331298828125,
0.04931640625,
0.002490997314453125,
0.0167388916015625,
0.01331329345703125,
0.000797271728515625,
0.03546142578125,
-0.00791168212890625,
-0.019561767578125,
-0.033721923828125,
-0.026092529296875,
-0.047515869140625,
-0.0048675537109375,
-0.03424072265625,
-0.022796630859375,
-0.02239990234375,
0.01094818115234375,
0.004383087158203125,
-0.05908203125,
0.03472900390625,
-0.01358795166015625,
0.0163116455078125,
-0.01548004150390625,
-0.0234832763671875,
0.0197601318359375,
0.0950927734375,
-0.01155853271484375,
-0.041534423828125,
0.0007152557373046875,
0.01328277587890625,
0.00885772705078125,
-0.0233001708984375,
0.018035888671875,
-0.040802001953125,
-0.035064697265625,
0.0292205810546875,
0.01222991943359375,
-0.006038665771484375,
-0.0182952880859375,
-0.035736083984375,
-0.037506103515625,
-0.02593994140625,
0.0418701171875,
-0.039276123046875,
0.04205322265625,
-0.0149993896484375,
0.026458740234375,
-0.0164794921875,
-0.029083251953125,
-0.0296173095703125,
-0.03326416015625,
0.006076812744140625,
-0.022125244140625,
0.004604339599609375,
-0.020599365234375,
0.06317138671875,
-0.0277252197265625,
0.0013256072998046875,
0.0018434524536132812,
0.052764892578125,
-0.0136871337890625,
0.00782012939453125,
0.009735107421875,
-0.032012939453125,
-0.0006461143493652344,
-0.0291748046875,
-0.0257720947265625,
-0.0362548828125,
0.0095672607421875,
-0.00461578369140625,
-0.027862548828125,
0.017547607421875,
-0.0285491943359375,
0.006317138671875,
-0.034149169921875,
-0.04046630859375,
-0.0190277099609375,
-0.030242919921875,
-0.0204315185546875,
-0.0084228515625,
-0.0206756591796875,
-0.0030517578125,
0.029571533203125,
-0.00412750244140625,
-0.0247039794921875,
0.00682830810546875,
0.04498291015625,
0.004795074462890625,
-0.01309967041015625,
-0.0616455078125,
-0.01444244384765625,
-0.0005645751953125,
-0.016815185546875,
0.044403076171875,
0.0310821533203125,
0.033294677734375,
-0.024444580078125,
-0.04302978515625,
-0.024139404296875,
0.004268646240234375,
0.017181396484375,
0.0175323486328125,
-0.00019478797912597656,
-0.020233154296875,
-0.007686614990234375,
0.035675048828125,
0.03009033203125,
-0.0071563720703125,
-0.0014085769653320312,
0.006103515625,
0.047760009765625,
-0.0123138427734375,
-0.03582763671875,
-0.059234619140625,
-0.0755615234375,
0.0280609130859375,
-0.0916748046875,
-0.002117156982421875,
0.01336669921875,
-0.0038127899169921875,
0.046875,
-0.003139495849609375,
-0.00473785400390625,
0.00917816162109375,
0.059295654296875,
0.0033626556396484375,
0.033050537109375,
0.01971435546875,
-0.01543426513671875,
-0.04669189453125,
-0.001918792724609375,
0.037750244140625,
0.033843994140625,
-0.027130126953125,
-0.00787353515625,
-0.014617919921875,
-0.0308990478515625,
-0.0156402587890625,
-0.0252838134765625,
0.021881103515625,
-0.0018444061279296875,
-0.041015625,
0.0014810562133789062,
-0.00827789306640625,
-0.05987548828125,
-0.039093017578125,
0.0011682510375976562,
0.00787353515625,
-0.01125335693359375,
0.06854248046875,
-0.0318603515625,
0.003612518310546875,
0.014556884765625,
-0.0306396484375,
0.0467529296875,
0.059783935546875,
0.010711669921875,
0.01824951171875,
-0.0153961181640625,
-0.029205322265625,
0.003063201904296875,
-0.023101806640625,
-0.0443115234375,
0.006011962890625,
0.058868408203125,
0.059173583984375,
0.0335693359375,
-0.0259552001953125,
-0.0147857666015625,
-0.0333251953125,
0.00010573863983154297,
-0.025421142578125,
0.0380859375,
0.03125,
0.0166168212890625,
-0.01296234130859375,
-0.0164794921875,
0.020751953125,
-0.00576019287109375,
-0.020843505859375,
-0.050872802734375,
-0.00848388671875,
0.0110626220703125,
-0.01129913330078125,
-0.0228118896484375,
-0.02923583984375,
0.008575439453125,
-0.047271728515625,
-0.0303802490234375,
0.0265045166015625,
0.0308380126953125,
-0.031707763671875,
-0.039276123046875,
0.07281494140625,
0.0136566162109375,
0.005756378173828125,
-0.0014286041259765625,
-0.0169677734375,
0.0178375244140625,
-0.0008111000061035156,
0.05621337890625,
-0.004169464111328125,
-0.0007829666137695312,
0.0008645057678222656,
-0.0120697021484375,
-0.02978515625,
-0.0090484619140625,
-0.021209716796875,
-0.0401611328125,
-0.005771636962890625,
-0.00461578369140625,
-0.004337310791015625,
-0.003604888916015625,
0.0051727294921875,
-0.0271759033203125,
0.02923583984375,
0.01358795166015625,
-0.0109100341796875,
-0.00848388671875,
0.01062774658203125,
-0.00484466552734375,
0.005496978759765625,
-0.0148773193359375,
0.0152740478515625,
0.0179901123046875,
-0.01519775390625,
-0.0305023193359375,
-0.03204345703125,
0.033172607421875,
0.0089263916015625,
0.05548095703125,
0.0369873046875,
0.024169921875,
0.0160369873046875,
0.00836181640625,
0.010040283203125,
0.01514434814453125,
-0.0216827392578125,
-0.039031982421875,
-0.006572723388671875,
-0.01476287841796875,
0.0014190673828125,
-0.0460205078125,
0.01287841796875,
0.0178985595703125,
0.05609130859375,
-0.022674560546875,
-0.054534912109375,
-0.01477813720703125,
0.043182373046875,
-0.0268402099609375,
0.043792724609375,
0.0926513671875,
0.004138946533203125,
0.052947998046875,
0.039581298828125,
0.020172119140625,
0.04193115234375,
0.01540374755859375,
-0.019622802734375,
-0.0127105712890625,
0.055999755859375,
0.00916290283203125,
-0.0509033203125,
0.0196685791015625,
-0.05450439453125,
-0.009613037109375,
-0.0168914794921875,
0.036895751953125,
0.0118865966796875,
0.0039215087890625,
0.0181884765625,
-0.0132598876953125,
0.0016088485717773438,
0.0207672119140625,
-0.00032973289489746094,
-0.0179901123046875,
0.0269927978515625,
0.01654052734375,
0.00948333740234375,
0.0238494873046875,
0.006412506103515625,
-0.022979736328125,
-0.01212310791015625,
-0.0220184326171875,
0.0167388916015625,
-0.040924072265625,
0.049530029296875,
0.042694091796875,
0.0275115966796875,
-0.0258941650390625,
-0.0084991455078125,
-0.02783203125,
-0.01450347900390625,
-0.047332763671875,
0.0066680908203125,
-0.0506591796875,
0.0291595458984375,
0.0117034912109375,
0.039306640625,
0.0443115234375,
0.0428466796875,
0.0162200927734375,
-0.02716064453125,
0.0024623870849609375,
0.004314422607421875,
-0.01175689697265625,
-0.01837158203125,
0.041351318359375,
0.03387451171875,
-0.07080078125,
0.0262908935546875,
-0.036102294921875,
-0.00921630859375,
-0.0226898193359375,
0.0074005126953125,
0.11419677734375,
-0.037384033203125,
-0.0242462158203125,
0.0460205078125,
-0.007171630859375,
-0.03173828125,
-0.043365478515625,
0.028167724609375,
-0.0816650390625,
-0.027252197265625,
-0.00868988037109375,
-0.0097198486328125,
-0.00848388671875,
-0.025787353515625,
-0.0748291015625,
0.11968994140625,
0.03619384765625,
0.026580810546875,
-0.012176513671875,
0.048858642578125,
-0.0306854248046875,
0.0240936279296875,
-0.03070068359375,
0.0482177734375,
-0.013702392578125,
0.048095703125,
-0.065185546875,
-0.01480865478515625,
0.0078582763671875,
0.059906005859375,
0.056610107421875,
0.01374053955078125,
0.0013065338134765625,
0.0107269287109375,
0.058746337890625,
0.0103912353515625,
-0.0153656005859375,
0.04754638671875,
0.00548553466796875,
0.0560302734375,
0.046661376953125,
-0.09417724609375,
0.00372314453125,
0.00643157958984375,
0.0279998779296875,
0.03631591796875,
0.0218353271484375,
0.0188751220703125,
-0.007404327392578125,
0.0246429443359375,
-0.0311126708984375,
0.003955841064453125,
0.022186279296875,
0.0236663818359375,
-0.0013942718505859375,
0.01067352294921875,
0.0187530517578125,
-0.0017852783203125,
0.00670623779296875,
-0.0284271240234375,
0.03680419921875,
0.03173828125,
0.0305023193359375,
0.0190582275390625,
0.01319122314453125,
0.0576171875,
-0.01495361328125,
0.01113128662109375,
0.01113128662109375,
-0.0186767578125,
0.0038471221923828125,
0.03033447265625,
0.0253753662109375,
0.0033435821533203125,
0.04150390625,
0.03759765625,
0.0153350830078125,
-0.049835205078125,
-0.04522705078125,
0.01222991943359375,
0.04449462890625,
0.0158843994140625,
-0.0208587646484375,
-0.0177764892578125,
-0.033782958984375,
0.063720703125,
-0.04010009765625,
-0.0125579833984375,
0.047698974609375,
-0.005046844482421875,
0.006603240966796875,
0.01236724853515625,
-0.004058837890625,
-0.0073394775390625,
-0.019378662109375,
-0.0076751708984375,
0.0062255859375,
0.03948974609375,
0.0298309326171875,
0.022064208984375,
0.0037078857421875,
-0.0088043212890625,
0.0159912109375,
-0.00618743896484375,
0.0014066696166992188,
-0.014739990234375,
0.0052947998046875,
-0.0345458984375,
0.0242462158203125,
0.0259552001953125,
-0.00676727294921875,
0.060028076171875,
0.0673828125,
0.043304443359375,
-0.03558349609375,
-0.01983642578125,
0.04937744140625,
-0.03289794921875,
0.0175628662109375,
-0.006351470947265625,
-0.031982421875,
-0.0264739990234375,
-0.0458984375,
-0.0309600830078125,
0.03045654296875,
-0.01441192626953125,
-0.031585693359375,
0.080322265625,
-0.01136016845703125,
0.0233612060546875,
0.027984619140625,
-0.019439697265625,
0.03955078125,
-0.007717132568359375,
-0.036224365234375,
0.0031909942626953125,
-0.0335693359375,
-0.0723876953125,
0.02325439453125,
0.042327880859375,
-0.0292816162109375,
0.017547607421875,
0.0241546630859375,
-0.01096343994140625,
0.006359100341796875,
-0.0011548995971679688,
0.02838134765625,
-0.00762939453125,
0.01146697998046875,
0.012298583984375,
-0.052764892578125,
-0.037261962890625,
-0.0582275390625,
0.0498046875,
0.064208984375,
0.028564453125,
0.0195770263671875,
0.0716552734375,
-0.045318603515625,
0.055328369140625,
-0.066650390625,
-0.0374755859375,
0.03839111328125,
0.0153045654296875,
0.006275177001953125,
-0.0027790069580078125,
0.0023345947265625,
0.0235748291015625,
0.01171875,
-0.01389312744140625,
-0.0021533966064453125,
-0.044891357421875,
0.0274658203125,
0.0296783447265625,
0.023681640625,
-0.008880615234375,
0.006717681884765625,
-0.002658843994140625,
-0.024383544921875,
0.04376220703125,
0.03399658203125,
-0.0010156631469726562,
0.04150390625,
0.0219268798828125,
-0.0225982666015625,
0.014892578125,
-0.03277587890625,
0.002933502197265625,
0.022186279296875,
0.032135009765625,
-0.0225372314453125,
-0.00171661376953125,
-0.02886962890625,
-0.0171051025390625,
0.004673004150390625,
0.01418304443359375,
-0.01477813720703125,
-0.04168701171875,
-0.0221099853515625,
-0.0016031265258789062,
0.0169677734375,
-0.0072784423828125,
0.0011034011840820312,
-0.016265869140625,
-0.00868988037109375,
-0.0133514404296875,
-0.027008056640625,
-0.028533935546875,
-0.0380859375,
0.00665283203125,
0.0208282470703125,
-0.0181732177734375,
-0.03302001953125,
-0.0257415771484375,
-0.030853271484375,
0.014404296875,
-0.007659912109375,
0.0183258056640625,
0.0247039794921875,
-0.0287933349609375,
-0.086669921875,
0.007534027099609375,
-0.00992584228515625,
-0.007053375244140625,
0.006763458251953125,
0.009033203125,
-0.03814697265625,
-0.026519775390625,
0.060089111328125,
0.00278472900390625,
0.02886962890625,
0.0614013671875,
-0.034637451171875,
-0.062347412109375,
-0.01451873779296875,
0.0150299072265625,
0.02142333984375,
0.004741668701171875,
0.00922393798828125,
0.0167236328125,
0.023162841796875,
-0.05645751953125,
-0.061981201171875,
0.0347900390625,
-0.044921875,
-0.01025390625,
-0.0693359375,
0.03082275390625,
0.01451873779296875,
-0.0345458984375,
-0.06884765625,
0.0018167495727539062,
-0.0239715576171875,
-0.0205078125,
-0.041015625,
-0.0281982421875,
0.00418853759765625,
0.0242919921875,
-0.0180511474609375,
0.01299285888671875,
-0.059326171875,
0.0254669189453125,
-0.03131103515625,
0.06695556640625,
-0.01983642578125,
-0.024139404296875,
0.05108642578125,
0.0246734619140625,
0.033782958984375,
-0.0164947509765625,
-0.0202789306640625,
0.025115966796875,
-0.0013589859008789062,
0.06768798828125,
0.001117706298828125,
-0.007160186767578125,
-0.0035552978515625,
-0.040191650390625,
-0.0020275115966796875,
0.033294677734375,
-0.041900634765625,
0.01007080078125,
0.0540771484375,
0.1058349609375,
0.0280303955078125,
-0.056121826171875,
-0.057647705078125,
-0.011016845703125,
0.003864288330078125,
0.00606536865234375,
0.018096923828125,
-0.0679931640625,
0.004291534423828125,
0.0305023193359375,
0.01409149169921875,
0.011077880859375,
-0.0228729248046875,
-0.0063018798828125,
-0.027923583984375,
-0.0262603759765625,
0.0017642974853515625,
-0.0653076171875,
0.001194000244140625,
0.07012939453125,
-0.05615234375,
-0.005527496337890625,
0.0088958740234375,
0.00867462158203125,
0.0421142578125,
0.00093841552734375,
-0.01849365234375,
-0.002346038818359375,
-0.0227203369140625,
0.0274810791015625,
-0.0189666748046875,
0.0218658447265625,
-0.039947509765625,
0.01517486572265625,
-0.0076904296875,
0.017791748046875,
-0.0045013427734375,
0.0154571533203125,
0.0308685302734375,
0.006549835205078125,
-0.004810333251953125,
0.05584716796875,
-0.00009888410568237305,
-0.0335693359375,
-0.03167724609375,
0.037200927734375,
-0.031982421875,
-0.004608154296875,
-0.0185546875,
-0.0021076202392578125,
-0.0036716461181640625,
0.043609619140625,
-0.01727294921875,
-0.01430511474609375,
0.0190277099609375,
0.061737060546875,
0.0154571533203125,
-0.004940032958984375
] |
14799b69f40b0849c82f53fa1d54b1f97e94b3ee | Wordpress Stackexchange
Q: WordPress Migration: Getting 404 Errors: Only Home Page works I just migrated my ecommerce website (www.getfitkart.com) from shared hosting to Linode. Now only the home page is working but the other pages are not getting served. I am getting the following error on all other pages like say, http://www.getfitkart.com/privacy-policy/
Not Found
The requested URL /privacy-policy/ was not found on this server.
My .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Any help will be greatly appreciated.
A: I found the solution here:
https://www.digitalocean.com/community/questions/wordpress-permalinks-not-working-on-ubuntu-14-04
The thing is that we need to allow the override all option in httpd.conf (location: /etc/httpd/conf/httpd.conf) for your specific hosting directory.
| Q: WordPress Migration: Getting 404 Errors: Only Home Page works I just migrated my ecommerce website (www.getfitkart.com) from shared hosting to Linode. Now only the home page is working but the other pages are not getting served. I am getting the following error on all other pages like say, http://www.getfitkart.com/privacy-policy/
Not Found
The requested URL /privacy-policy/ was not found on this server.
My .htaccess file:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Any help will be greatly appreciated.
A: I found the solution here:
https://www.digitalocean.com/community/questions/wordpress-permalinks-not-working-on-ubuntu-14-04
The thing is that we need to allow the override all option in httpd.conf (location: /etc/httpd/conf/httpd.conf) for your specific hosting directory.
A: Sometimes on a new server it's just the rewrite module missing from Apache config.
sudo a2enmod rewrite
sudo service apache2 restart
A: Solved this problem on Linux Mint 19 / PHP Version 7.2.19-0ubuntu0.18.04.1 by changing:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
to:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
in /etc/apache2/apache2.conf.
Hope this helps!
A: Go to settings->permalinks and click on save button to rewrite flush. And then empty your browser cache. It'll work hopefully.
A: Dear friend after moving site : go to your phone admin
Then choose your database.
Click on wp-option
Change raw 25 to 500
Change site url : http://www.yourwebsite.com
search -- path : change path of your upload
Save it
Login your site: www.yoursitename.com/wp-admin
Go to settings
Then go to Permalink
Do not change anything
Just Save it.
Now try your all page.
| wordpress | {
"language": "en",
"length": 268,
"provenance": "stackexchange_00019.jsonl.gz:472219",
"question_score": "16",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/253245"
} | [
0.026092529296875,
-0.0024623870849609375,
0.0016012191772460938,
-0.0191802978515625,
-0.017730712890625,
-0.0200653076171875,
0.0004291534423828125,
-0.0428466796875,
-0.015533447265625,
0.00644683837890625,
0.0012683868408203125,
0.0153045654296875,
0.003528594970703125,
-0.042144775390625,
0.028289794921875,
-0.007434844970703125,
0.00888824462890625,
0.0167236328125,
0.038909912109375,
-0.0004589557647705078,
-0.00896453857421875,
0.01454925537109375,
0.0201416015625,
-0.035614013671875,
-0.0159759521484375,
-0.023040771484375,
0.037689208984375,
-0.0177001953125,
-0.019805908203125,
-0.0246734619140625,
-0.00359344482421875,
0.037261962890625,
0.0182952880859375,
0.004619598388671875,
-0.031494140625,
-0.041656494140625,
-0.024627685546875,
-0.0002751350402832031,
-0.036529541015625,
0.0430908203125,
0.02349853515625,
-0.0210723876953125,
0.06732177734375,
0.052276611328125,
0.01013946533203125,
-0.0084686279296875,
0.0059661865234375,
-0.07470703125,
0.01076507568359375,
0.016082763671875,
-0.0016803741455078125,
0.06414794921875,
-0.0013275146484375,
0.036956787109375,
-0.005382537841796875,
-0.00864410400390625,
0.006397247314453125,
-0.0457763671875,
0.0125579833984375,
-0.031494140625,
-0.0180206298828125,
-0.009918212890625,
0.0283050537109375,
0.0022983551025390625,
-0.026092529296875,
0.0249786376953125,
-0.0096893310546875,
0.011688232421875,
-0.0484619140625,
-0.03857421875,
0.00495147705078125,
-0.03985595703125,
0.00728607177734375,
-0.007404327392578125,
-0.024139404296875,
-0.0238189697265625,
0.01003265380859375,
-0.0312042236328125,
0.03460693359375,
0.005245208740234375,
0.002483367919921875,
-0.040435791015625,
-0.036956787109375,
-0.03948974609375,
0.0213165283203125,
-0.0017976760864257812,
0.006343841552734375,
-0.01019287109375,
0.010711669921875,
-0.004791259765625,
-0.0018396377563476562,
-0.0302581787109375,
-0.0150909423828125,
0.04473876953125,
0.004932403564453125,
-0.00029397010803222656,
0.01058197021484375,
0.0265655517578125,
-0.015380859375,
0.0234375,
-0.01181793212890625,
-0.03436279296875,
0.0384521484375,
-0.03271484375,
0.0034465789794921875,
-0.00008809566497802734,
0.0203857421875,
0.0484619140625,
0.0258636474609375,
0.01068878173828125,
-0.02587890625,
0.0428466796875,
-0.023162841796875,
-0.021087646484375,
-0.004123687744140625,
0.036041259765625,
-0.0262908935546875,
0.0008459091186523438,
-0.02142333984375,
0.006565093994140625,
-0.006397247314453125,
0.0345458984375,
-0.037384033203125,
-0.0496826171875,
0.0165863037109375,
-0.0295257568359375,
-0.00475311279296875,
-0.004589080810546875,
0.0172119140625,
0.01091766357421875,
0.005382537841796875,
0.0218048095703125,
-0.01091766357421875,
-0.01108551025390625,
-0.037353515625,
0.003421783447265625,
0.049163818359375,
0.018798828125,
0.0001405477523803711,
0.0166778564453125,
0.01459503173828125,
-0.05084228515625,
-0.045318603515625,
-0.0013484954833984375,
-0.0036296844482421875,
-0.0011968612670898438,
0.02911376953125,
0.0247344970703125,
-0.0026454925537109375,
-0.0254669189453125,
-0.0191650390625,
0.0268402099609375,
0.06494140625,
-0.009674072265625,
-0.0237579345703125,
-0.0241851806640625,
0.027130126953125,
-0.032318115234375,
-0.033721923828125,
-0.046844482421875,
0.034271240234375,
0.0131378173828125,
0.016082763671875,
-0.038543701171875,
-0.05059814453125,
-0.0404052734375,
-0.0723876953125,
-0.01605224609375,
0.0166015625,
0.037261962890625,
-0.035064697265625,
0.0005593299865722656,
-0.00628662109375,
-0.01276397705078125,
-0.0225372314453125,
0.00008863210678100586,
0.0223846435546875,
0.00371551513671875,
-0.00342559814453125,
0.05633544921875,
0.01531219482421875,
-0.00865936279296875,
0.03521728515625,
-0.0088348388671875,
-0.034210205078125,
0.0294036865234375,
0.029388427734375,
0.06939697265625,
-0.039276123046875,
0.020538330078125,
0.06390380859375,
0.048431396484375,
0.01047515869140625,
0.038726806640625,
-0.0083465576171875,
-0.045989990234375,
-0.01476287841796875,
0.003528594970703125,
-0.0210723876953125,
-0.0224609375,
-0.0352783203125,
0.01261138916015625,
0.00296783447265625,
0.0232391357421875,
0.006885528564453125,
0.022186279296875,
-0.02392578125,
0.031402587890625,
-0.0296783447265625,
0.0190887451171875,
0.043243408203125,
0.04437255859375,
-0.05316162109375,
-0.01727294921875,
0.004390716552734375,
0.0582275390625,
-0.0213623046875,
0.021392822265625,
-0.02716064453125,
0.0479736328125,
-0.0069580078125,
-0.06658935546875,
-0.0164642333984375,
0.0416259765625,
0.002834320068359375,
-0.01192474365234375,
-0.00441741943359375,
-0.00897216796875,
0.00934600830078125,
-0.0005178451538085938,
-0.003513336181640625,
0.0099029541015625,
-0.041107177734375,
-0.0015268325805664062,
-0.052032470703125,
-0.0173187255859375,
-0.06927490234375,
-0.02130126953125,
0.00542449951171875,
0.044036865234375,
0.0313720703125,
0.008941650390625,
0.0026302337646484375,
-0.0060577392578125,
0.0413818359375,
-0.07080078125,
-0.0202178955078125,
0.013519287109375,
-0.00775146484375,
-0.00839996337890625,
0.050537109375,
-0.01517486572265625,
0.015167236328125,
-0.08465576171875,
0.015655517578125,
0.0272216796875,
-0.0223388671875,
-0.0011262893676757812,
-0.024169921875,
-0.0130462646484375,
0.021759033203125,
-0.042236328125,
-0.036163330078125,
-0.0064544677734375,
-0.0183258056640625,
0.004924774169921875,
-0.0015268325805664062,
0.00490570068359375,
-0.0193023681640625,
-0.0221710205078125,
0.0273895263671875,
0.007843017578125,
0.0019063949584960938,
0.042633056640625,
0.0293121337890625,
0.01513671875,
-0.051666259765625,
-0.01314544677734375,
0.04583740234375,
0.034881591796875,
0.0219573974609375,
0.0408935546875,
0.0237579345703125,
-0.0021190643310546875,
0.0106658935546875,
-0.0254669189453125,
0.0106658935546875,
0.0197906494140625,
0.006519317626953125,
-0.020294189453125,
0.023590087890625,
0.00847625732421875,
-0.047210693359375,
0.0638427734375,
-0.00867462158203125,
-0.044677734375,
0.0606689453125,
-0.04351806640625,
0.0265655517578125,
-0.029998779296875,
0.05279541015625,
0.038299560546875,
-0.0108184814453125,
-0.00799560546875,
0.00750732421875,
-0.01560211181640625,
0.0229339599609375,
0.0002613067626953125,
-0.00873565673828125,
0.004970550537109375,
-0.039215087890625,
0.0008034706115722656,
0.0291748046875,
0.0013017654418945312,
0.01290130615234375,
-0.0208740234375,
-0.007537841796875,
0.0192413330078125,
-0.05145263671875,
-0.039154052734375,
-0.053863525390625,
-0.00324249267578125,
-0.01145172119140625,
0.0227203369140625,
0.0059814453125,
0.01036834716796875,
0.0157623291015625,
0.0174102783203125,
0.025970458984375,
-0.02362060546875,
-0.061676025390625,
-0.048797607421875,
-0.08984375,
-0.01202392578125,
0.0007548332214355469,
0.02587890625,
-0.00814056396484375,
0.022613525390625,
-0.00829315185546875,
-0.043060302734375,
-0.0279388427734375,
0.026214599609375,
-0.022552490234375,
-0.03094482421875,
0.02294921875,
-0.044097900390625,
-0.004528045654296875,
0.01025390625,
0.05865478515625,
0.0082855224609375,
-0.0196380615234375,
-0.0030612945556640625,
-0.0266876220703125,
-0.0369873046875,
-0.0478515625,
0.0171966552734375,
0.043975830078125,
-0.07049560546875,
-0.02783203125,
-0.08123779296875,
-0.055908203125,
0.00537872314453125,
-0.045501708984375,
0.0206298828125,
0.028717041015625,
-0.027923583984375,
-0.0001958608627319336,
-0.0025196075439453125,
0.01439666748046875,
0.0032367706298828125,
0.0279388427734375,
-0.00798797607421875,
-0.0185699462890625,
-0.011505126953125,
-0.02056884765625,
-0.0295562744140625,
0.04583740234375,
-0.0142669677734375,
0.015960693359375,
0.0251007080078125,
-0.0147857666015625,
-0.0144195556640625,
0.0212860107421875,
-0.00666046142578125,
-0.061431884765625,
0.0156402587890625,
-0.0352783203125,
0.014892578125,
-0.01346588134765625,
-0.01149749755859375,
0.016693115234375,
0.0997314453125,
0.007549285888671875,
-0.038604736328125,
0.039031982421875,
0.02130126953125,
-0.01148223876953125,
0.0280914306640625,
-0.0176544189453125,
-0.0251007080078125,
-0.0132598876953125,
-0.02923583984375,
-0.042572021484375,
-0.033355712890625,
0.0226898193359375,
-0.09259033203125,
0.0107421875,
-0.0487060546875,
0.036285400390625,
0.0183258056640625,
-0.0027675628662109375,
0.0262451171875,
-0.0038280487060546875,
-0.0028781890869140625,
-0.0182342529296875,
0.0039215087890625,
-0.045074462890625,
-0.02813720703125,
0.052825927734375,
0.050262451171875,
-0.00907135009765625,
-0.0261383056640625,
-0.0041961669921875,
0.050323486328125,
0.004947662353515625,
0.0123291015625,
-0.038360595703125,
-0.01062774658203125,
0.00377655029296875,
-0.016693115234375,
-0.04180908203125,
0.0089111328125,
0.037017822265625,
-0.00917816162109375,
-0.06414794921875,
-0.02288818359375,
-0.045867919921875,
0.037811279296875,
0.007663726806640625,
-0.046173095703125,
-0.057373046875,
-0.04437255859375,
-0.001995086669921875,
0.0135650634765625,
0.0171051025390625,
-0.00677490234375,
-0.0362548828125,
-0.05181884765625,
0.046295166015625,
-0.04473876953125,
-0.0059967041015625,
-0.0038909912109375,
0.056365966796875,
0.0097503662109375,
-0.016632080078125,
0.06060791015625,
0.00576019287109375,
0.01654052734375,
0.01430511474609375,
0.0684814453125,
0.00394439697265625,
0.004085540771484375,
0.0574951171875,
-0.0117340087890625,
-0.0280609130859375,
0.0239410400390625,
-0.002170562744140625,
0.0138092041015625,
-0.0628662109375,
0.0196380615234375,
0.021575927734375,
0.00919342041015625,
0.004825592041015625,
0.0012531280517578125,
0.0231475830078125,
-0.005306243896484375,
-0.042327880859375,
0.0033588409423828125,
-0.01029205322265625,
0.029541015625,
-0.03924560546875,
0.0150299072265625,
-0.06439208984375,
0.057586669921875,
0.0146026611328125,
-0.0002340078353881836,
0.0308990478515625,
0.031646728515625,
-0.0206146240234375,
-0.02459716796875,
0.01422882080078125,
-0.003025054931640625,
0.017791748046875,
0.0198211669921875,
-0.01511383056640625,
-0.034820556640625,
-0.0025272369384765625,
0.0183258056640625,
0.00533294677734375,
-0.032867431640625,
-0.009307861328125,
-0.01409912109375,
-0.049224853515625,
0.0229949951171875,
0.0016155242919921875,
0.0161590576171875,
0.0009331703186035156,
-0.04278564453125,
-0.01389312744140625,
0.0022830963134765625,
-0.0231475830078125,
-0.044464111328125,
0.0213623046875,
-0.0202178955078125,
-0.00013518333435058594,
0.0362548828125,
0.00994110107421875,
-0.00540924072265625,
0.0247802734375,
-0.01461029052734375,
-0.018798828125,
-0.016510009765625,
0.06915283203125,
-0.00708770751953125,
-0.045989990234375,
0.01529693603515625,
0.06634521484375,
0.04876708984375,
-0.05401611328125,
-0.03240966796875,
0.03436279296875,
0.08233642578125,
-0.0249176025390625,
-0.02056884765625,
-0.00606536865234375,
-0.0380859375,
-0.01329803466796875,
0.044921875,
-0.0212860107421875,
-0.060211181640625,
-0.033233642578125,
-0.0195465087890625,
0.015960693359375,
-0.037139892578125,
-0.038177490234375,
-0.002529144287109375,
-0.057098388671875,
0.0020046234130859375,
0.0267333984375,
-0.041473388671875,
0.0264129638671875,
0.024688720703125,
0.0313720703125,
-0.0304718017578125,
-0.023040771484375,
-0.0035915374755859375,
0.008087158203125,
-0.0255279541015625,
-0.007274627685546875,
0.0211639404296875,
0.00026702880859375,
0.0220184326171875,
-0.01284027099609375,
-0.0112457275390625,
0.04901123046875,
0.017364501953125,
0.01198577880859375,
-0.017913818359375,
-0.0272369384765625,
-0.0118560791015625,
-0.020843505859375,
-0.009735107421875,
0.046539306640625,
0.01342010498046875,
-0.039093017578125,
-0.02728271484375,
0.0153350830078125,
0.003704071044921875,
0.01212310791015625,
-0.0303497314453125,
-0.04840087890625,
0.0148773193359375,
0.061187744140625,
0.022674560546875,
-0.044158935546875,
0.07220458984375,
0.03887939453125,
0.032562255859375,
0.0036067962646484375,
0.03668212890625,
-0.0007214546203613281,
-0.00940704345703125,
0.01483917236328125,
-0.037017822265625,
-0.027252197265625,
-0.04779052734375,
-0.029296875,
0.055694580078125,
0.09686279296875,
-0.003658294677734375,
0.0296783447265625,
-0.01763916015625,
0.0123748779296875,
-0.028656005859375,
0.0008649826049804688,
-0.038543701171875,
0.03790283203125,
-0.01073455810546875,
0.01277923583984375,
0.0430908203125,
-0.01184844970703125,
-0.018707275390625,
0.0032482147216796875,
0.0164031982421875,
0.031005859375,
0.00396728515625,
-0.02880859375,
0.040191650390625,
0.09735107421875,
0.02874755859375,
0.0657958984375,
0.01184844970703125,
0.021270751953125,
0.033843994140625,
0.001323699951171875,
0.0038051605224609375,
-0.0025310516357421875,
0.013916015625,
-0.0137786865234375,
0.00972747802734375,
0.01006317138671875,
-0.004276275634765625,
0.010467529296875,
0.08673095703125,
0.0628662109375,
-0.0946044921875,
-0.00494384765625,
0.013824462890625,
-0.0160675048828125,
-0.004558563232421875,
0.0308380126953125,
-0.0192108154296875,
-0.0284576416015625,
-0.044403076171875,
-0.0061798095703125,
-0.0141448974609375,
-0.02618408203125,
0.0231781005859375,
-0.0103912353515625,
0.006999969482421875,
0.0404052734375,
0.0004851818084716797,
-0.0296173095703125,
-0.033447265625,
-0.0014972686767578125,
-0.027496337890625,
0.0030574798583984375,
-0.0197906494140625,
0.0198822021484375,
-0.04779052734375,
-0.06890869140625,
-0.01178741455078125,
-0.01666259765625,
-0.0135955810546875,
-0.0085906982421875,
0.01013946533203125,
-0.00600433349609375,
0.0146942138671875,
-0.0087127685546875,
-0.000713348388671875,
0.0016803741455078125,
-0.0382080078125,
0.01049041748046875,
-0.0108795166015625,
0.0009751319885253906,
-0.007549285888671875,
-0.024444580078125,
0.0016412734985351562,
-0.02618408203125,
-0.0091705322265625,
-0.004062652587890625,
-0.0592041015625,
-0.0018672943115234375,
-0.0108642578125,
-0.0029144287109375,
0.0011339187622070312,
0.0277862548828125,
0.02764892578125,
0.00867462158203125,
0.0281829833984375,
-0.0347900390625,
-0.0126953125,
0.019866943359375,
-0.0207977294921875,
-0.047698974609375,
-0.01377105712890625,
-0.019989013671875,
0.05621337890625,
-0.0294647216796875,
0.004215240478515625,
0.0418701171875,
0.0217742919921875,
-0.0254669189453125,
0.023681640625,
0.01018524169921875,
0.059539794921875,
-0.01300811767578125,
-0.01003265380859375,
-0.01386260986328125,
0.00017642974853515625,
0.0008177757263183594,
0.033905029296875,
0.025848388671875,
0.0147552490234375,
-0.08734130859375,
-0.0025577545166015625,
0.039642333984375,
-0.006786346435546875,
0.00775146484375,
0.09295654296875,
-0.058258056640625,
-0.015167236328125,
-0.018585205078125,
-0.060638427734375,
0.01136016845703125,
-0.0251617431640625,
-0.044525146484375,
-0.02490234375,
-0.00965118408203125,
-0.0198974609375,
-0.01617431640625,
-0.0243682861328125,
-0.030029296875,
0.0043182373046875,
0.0142669677734375,
-0.0236358642578125,
0.0261993408203125,
0.00812530517578125,
0.021942138671875,
-0.03472900390625,
-0.00008696317672729492,
-0.02734375,
0.043548583984375,
0.00836944580078125,
0.02001953125,
0.0066680908203125,
0.0121307373046875,
0.036346435546875,
0.0108489990234375,
0.0077362060546875,
0.041473388671875,
-0.012542724609375,
0.050262451171875,
0.045257568359375,
0.039581298828125,
0.00890350341796875,
0.029327392578125,
0.024169921875,
0.0592041015625,
-0.04443359375,
-0.05780029296875,
-0.0036106109619140625,
-0.0094757080078125,
0.03863525390625,
0.01030731201171875,
0.04937744140625,
-0.033966064453125,
-0.004398345947265625,
-0.006687164306640625,
-0.0172576904296875,
0.00527191162109375,
0.0028553009033203125,
0.01436614990234375,
0.042236328125,
0.013214111328125,
-0.011016845703125,
-0.03570556640625,
-0.0013904571533203125,
0.01348114013671875,
0.047943115234375,
0.030975341796875,
0.035247802734375,
-0.023284912109375,
-0.0232391357421875,
-0.0205841064453125,
0.042449951171875,
-0.0204620361328125,
0.0184783935546875,
-0.052215576171875,
-0.051055908203125,
-0.02001953125,
0.04449462890625,
0.018646240234375,
0.0404052734375,
-0.0020656585693359375,
0.0185699462890625,
0.044403076171875,
0.0054473876953125,
0.026092529296875,
-0.0266265869140625,
0.0289154052734375,
-0.0193328857421875,
0.0021610260009765625,
-0.0163726806640625,
-0.029693603515625,
-0.034027099609375,
0.015380859375,
0.00852203369140625,
0.016693115234375,
0.0120697021484375,
0.00568389892578125,
-0.024810791015625,
0.0179595947265625,
0.00037360191345214844,
0.057891845703125,
0.024444580078125,
-0.00583648681640625,
-0.005237579345703125,
-0.03387451171875,
0.01494598388671875,
0.007160186767578125,
0.02215576171875,
0.00274658203125,
0.02239990234375,
0.0218963623046875,
-0.0162353515625,
-0.009124755859375,
0.0230712890625,
0.0213623046875,
-0.002323150634765625,
0.016143798828125,
0.005596160888671875,
-0.0161590576171875,
0.00032019615173339844,
-0.02490234375,
0.0305633544921875,
0.0034961700439453125,
0.1602783203125,
-0.059967041015625,
0.0110321044921875,
-0.0171356201171875,
0.01180267333984375,
0.007053375244140625,
-0.0274505615234375,
0.0382080078125,
0.055267333984375,
0.0062255859375,
-0.0345458984375,
-0.09381103515625,
0.016204833984375,
-0.0088043212890625,
-0.0355224609375,
0.032440185546875,
-0.00800323486328125,
0.0087127685546875,
-0.00994873046875,
0.002216339111328125,
-0.047332763671875,
-0.0731201171875,
-0.09893798828125,
-0.006542205810546875,
0.004932403564453125,
0.00865936279296875,
-0.01366424560546875,
0.07586669921875,
0.01369476318359375,
0.0009937286376953125,
0.01486968994140625,
-0.0662841796875,
0.0249481201171875,
0.02569580078125,
-0.0019855499267578125,
-0.023834228515625,
-0.01346588134765625,
-0.012969970703125,
0.0073394775390625,
0.00027871131896972656,
0.0242919921875,
-0.000054836273193359375,
0.01067352294921875,
-0.003795623779296875,
0.01904296875,
-0.01117706298828125,
-0.04736328125,
-0.0141143798828125,
0.051513671875,
-0.04339599609375,
0.0419921875,
-0.036041259765625,
-0.01617431640625,
-0.021270751953125,
-0.03692626953125,
0.009735107421875,
-0.0297698974609375,
-0.046630859375,
-0.039093017578125,
0.015228271484375,
-0.006580352783203125,
-0.01082611083984375,
-0.027618408203125,
0.033905029296875,
-0.0428466796875,
0.05596923828125,
-0.050506591796875,
0.00307464599609375,
-0.0150604248046875,
0.0113067626953125,
-0.0283355712890625,
0.018341064453125,
-0.042755126953125,
-0.0104217529296875,
-0.00885772705078125,
-0.002941131591796875,
0.059814453125,
-0.0029888153076171875,
-0.00945281982421875,
-0.0538330078125,
-0.0267333984375,
-0.002330780029296875,
-0.0675048828125,
-0.0293731689453125,
-0.006381988525390625,
-0.023651123046875,
-0.008575439453125,
0.0005216598510742188,
0.0170745849609375,
-0.04327392578125,
-0.036041259765625,
-0.04632568359375,
-0.0243682861328125,
-0.037261962890625,
-0.056549072265625,
-0.06536865234375,
0.04833984375,
-0.012542724609375,
-0.0263671875,
-0.0751953125,
-0.048980712890625,
-0.0072479248046875,
0.08819580078125,
-0.0277862548828125,
0.0033359527587890625,
-0.0738525390625,
0.06591796875,
0.0109405517578125,
0.0258026123046875,
0.00894927978515625,
0.0115814208984375,
0.0173797607421875,
0.054443359375,
0.04718017578125,
0.01287078857421875,
-0.0014476776123046875,
-0.0193634033203125,
0.050872802734375,
0.066650390625,
0.007663726806640625,
0.003082275390625,
0.01800537109375,
-0.0845947265625,
0.006267547607421875,
-0.01959228515625,
-0.0122833251953125,
-0.029083251953125,
0.041046142578125,
-0.007480621337890625,
0.01233673095703125,
0.004840850830078125,
-0.043548583984375,
-0.041229248046875,
-0.01629638671875,
-0.01422882080078125,
0.023345947265625,
-0.06353759765625,
0.0190887451171875,
0.006908416748046875,
-0.009063720703125,
-0.005428314208984375,
-0.04034423828125,
-0.038360595703125,
0.00777435302734375,
-0.00585174560546875,
-0.0186309814453125,
0.0221710205078125,
-0.006328582763671875,
0.074951171875,
-0.05615234375,
-0.0222320556640625,
0.03289794921875,
0.01561737060546875,
0.01395416259765625,
0.00027489662170410156,
0.0416259765625,
0.0185699462890625,
0.00943756103515625,
0.005279541015625,
0.0428466796875,
0.007480621337890625,
-0.004596710205078125,
-0.045684814453125,
0.0194244384765625,
0.01477813720703125,
0.01153564453125,
0.0224761962890625,
-0.012420654296875,
-0.018829345703125,
-0.03302001953125,
0.05169677734375,
0.004413604736328125,
0.0328369140625,
0.0025043487548828125,
0.046539306640625,
-0.01381683349609375,
-0.016510009765625,
0.00211334228515625,
-0.048248291015625,
-0.000057220458984375,
-0.0015974044799804688,
-0.02813720703125,
-0.050262451171875,
0.023529052734375,
0.007389068603515625,
-0.01352691650390625,
0.023651123046875
] |
b3f1347cff8f8151169614b9a896cbdaabfb7d93 | Wordpress Stackexchange
Q: Why are user address fields required I am trying to figure out a plugin or something to change the address, city, state, and country fields so they are NOT required fields. Please point me in the correct direction.
If the only solution is to directly modify PHP I will need a detail explanation because I am not familiar with the PHP or the framework.
A: Thank you for this post. I had same issue caused by Event Manager Pro. The resolution for me was to go to the Forms Editor in Event Manager Pro and change a few "common" fields to not required.
| Q: Why are user address fields required I am trying to figure out a plugin or something to change the address, city, state, and country fields so they are NOT required fields. Please point me in the correct direction.
If the only solution is to directly modify PHP I will need a detail explanation because I am not familiar with the PHP or the framework.
A: Thank you for this post. I had same issue caused by Event Manager Pro. The resolution for me was to go to the Forms Editor in Event Manager Pro and change a few "common" fields to not required.
| wordpress | {
"language": "en",
"length": 104,
"provenance": "stackexchange_00019.jsonl.gz:472238",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/253324"
} | [
0.0736083984375,
-0.00925445556640625,
0.02471923828125,
-0.06280517578125,
-0.01369476318359375,
-0.01654052734375,
-0.0163116455078125,
-0.017822265625,
0.01055908203125,
0.02166748046875,
-0.0245513916015625,
-0.0031757354736328125,
0.009033203125,
-0.0247039794921875,
-0.01288604736328125,
-0.0160369873046875,
-0.005100250244140625,
0.00824737548828125,
-0.032745361328125,
-0.041229248046875,
0.00991058349609375,
-0.03448486328125,
-0.05621337890625,
0.038604736328125,
0.051605224609375,
-0.028289794921875,
0.037139892578125,
-0.0152130126953125,
0.0272674560546875,
-0.005771636962890625,
0.0244293212890625,
-0.0164337158203125,
0.023529052734375,
0.01044464111328125,
-0.01209259033203125,
-0.0005669593811035156,
0.00640869140625,
-0.00908660888671875,
-0.0037822723388671875,
0.0247802734375,
0.03631591796875,
-0.0279541015625,
-0.004352569580078125,
0.047637939453125,
-0.0152435302734375,
-0.04180908203125,
0.06494140625,
-0.0169219970703125,
0.0272674560546875,
-0.01263427734375,
-0.0231170654296875,
0.0174713134765625,
-0.0181732177734375,
-0.020721435546875,
0.0019130706787109375,
0.002872467041015625,
0.00018084049224853516,
0.0289459228515625,
0.041839599609375,
-0.0001609325408935547,
-0.0268096923828125,
-0.00295257568359375,
0.0219879150390625,
-0.019775390625,
-0.008209228515625,
-0.039154052734375,
-0.043792724609375,
0.032745361328125,
-0.0703125,
-0.01953125,
0.058624267578125,
-0.04168701171875,
-0.020965576171875,
0.020599365234375,
0.00395965576171875,
-0.00945281982421875,
0.00982666015625,
-0.023101806640625,
0.00630950927734375,
0.0611572265625,
-0.0029449462890625,
-0.00789642333984375,
-0.00891876220703125,
-0.0071563720703125,
-0.00774383544921875,
0.0066375732421875,
-0.0207366943359375,
-0.0171356201171875,
-0.060333251953125,
-0.05389404296875,
-0.0210723876953125,
-0.044158935546875,
-0.1148681640625,
0.0101470947265625,
0.0161895751953125,
-0.020904541015625,
0.0283050537109375,
0.0386962890625,
-0.0119171142578125,
-0.0176849365234375,
0.016448974609375,
-0.0234375,
-0.022247314453125,
0.005901336669921875,
-0.00951385498046875,
0.052947998046875,
-0.0313720703125,
-0.022186279296875,
0.0091552734375,
0.046844482421875,
0.03082275390625,
-0.036376953125,
0.0003998279571533203,
0.00209808349609375,
-0.0379638671875,
-0.01520538330078125,
-0.0268707275390625,
-0.039398193359375,
-0.0286102294921875,
0.006439208984375,
0.012176513671875,
-0.0112152099609375,
0.0172119140625,
-0.03643798828125,
0.037200927734375,
-0.019989013671875,
-0.07379150390625,
0.040191650390625,
0.020965576171875,
0.0210418701171875,
-0.0557861328125,
-0.00299835205078125,
0.06964111328125,
0.033843994140625,
0.0193023681640625,
-0.03350830078125,
0.013214111328125,
-0.006397247314453125,
-0.004589080810546875,
0.0396728515625,
-0.063720703125,
-0.044708251953125,
0.0282440185546875,
-0.03533935546875,
0.02008056640625,
0.025482177734375,
0.035186767578125,
0.020355224609375,
-0.0299530029296875,
-0.0307159423828125,
0.01242828369140625,
-0.01364898681640625,
-0.0193023681640625,
0.0447998046875,
0.03179931640625,
0.039581298828125,
0.059051513671875,
-0.018585205078125,
-0.00562286376953125,
-0.00982666015625,
0.032562255859375,
0.00417327880859375,
0.0126953125,
-0.060882568359375,
-0.05145263671875,
-0.033843994140625,
-0.0716552734375,
-0.0032825469970703125,
0.031280517578125,
-0.038238525390625,
0.060760498046875,
0.01922607421875,
0.0200347900390625,
0.036773681640625,
0.038848876953125,
0.0215301513671875,
0.005950927734375,
-0.01788330078125,
0.02154541015625,
0.043701171875,
-0.0246124267578125,
-0.02532958984375,
0.044464111328125,
-0.0213623046875,
-0.0810546875,
0.08294677734375,
-0.00362396240234375,
0.06024169921875,
0.0171661376953125,
-0.005039215087890625,
0.07647705078125,
0.043731689453125,
0.00829315185546875,
-0.0247802734375,
-0.0311431884765625,
-0.01788330078125,
0.052520751953125,
0.030120849609375,
0.004425048828125,
0.0032806396484375,
0.0038700103759765625,
-0.040252685546875,
0.0244140625,
0.005695343017578125,
0.04541015625,
-0.059234619140625,
0.0213165283203125,
-0.01392364501953125,
-0.032958984375,
0.0360107421875,
0.0183868408203125,
0.01451873779296875,
-0.03515625,
-0.0221405029296875,
0.0007457733154296875,
-0.007556915283203125,
0.00400543212890625,
-0.004932403564453125,
-0.0182952880859375,
-0.005954742431640625,
-0.021087646484375,
-0.032440185546875,
-0.04058837890625,
0.01531982421875,
-0.00815582275390625,
-0.02130126953125,
-0.0023517608642578125,
-0.0137176513671875,
0.0183563232421875,
-0.01377105712890625,
0.0672607421875,
0.0284271240234375,
-0.005828857421875,
-0.0057220458984375,
-0.04022216796875,
0.004154205322265625,
0.005458831787109375,
-0.008087158203125,
0.01262664794921875,
0.04107666015625,
0.007762908935546875,
-0.0062255859375,
-0.0159912109375,
0.046905517578125,
0.01081085205078125,
0.0224609375,
0.0276336669921875,
0.003200531005859375,
0.0180206298828125,
0.04119873046875,
-0.03704833984375,
-0.00933837890625,
0.032867431640625,
-0.0293426513671875,
0.0089569091796875,
0.0386962890625,
-0.022735595703125,
-0.039215087890625,
-0.0157012939453125,
0.0225830078125,
0.01139068603515625,
0.0018892288208007812,
-0.014068603515625,
-0.003570556640625,
0.0158538818359375,
-0.03387451171875,
0.0007910728454589844,
-0.0106658935546875,
0.00012946128845214844,
-0.0088348388671875,
0.0111083984375,
-0.042755126953125,
0.0107574462890625,
-0.0012025833129882812,
-0.0257568359375,
0.03155517578125,
-0.01119232177734375,
-0.00969696044921875,
0.005401611328125,
-0.0138092041015625,
-0.017608642578125,
-0.037109375,
0.004970550537109375,
0.003360748291015625,
0.039337158203125,
-0.006591796875,
0.0304107666015625,
0.002079010009765625,
0.042572021484375,
-0.03125,
0.0272979736328125,
-0.060882568359375,
-0.058837890625,
0.051666259765625,
-0.0149993896484375,
-0.0938720703125,
0.00806427001953125,
-0.017120361328125,
0.014312744140625,
-0.0274505615234375,
-0.000408172607421875,
0.042022705078125,
0.02337646484375,
-0.04119873046875,
0.026947021484375,
-0.0266265869140625,
0.0191802978515625,
0.0152435302734375,
0.0004715919494628906,
0.027435302734375,
-0.069580078125,
0.0110931396484375,
0.033050537109375,
-0.0206451416015625,
0.01255035400390625,
-0.0157623291015625,
-0.034942626953125,
0.01080322265625,
-0.07659912109375,
-0.04364013671875,
-0.078857421875,
0.027587890625,
-0.0298309326171875,
0.046142578125,
0.0145416259765625,
0.0193023681640625,
0.03094482421875,
0.01031494140625,
0.0333251953125,
-0.0159454345703125,
-0.05413818359375,
-0.04144287109375,
-0.06597900390625,
-0.027557373046875,
-0.0071563720703125,
0.002071380615234375,
-0.00830841064453125,
0.0972900390625,
-0.0206451416015625,
-0.07916259765625,
-0.07110595703125,
-0.032958984375,
-0.0057373046875,
0.002285003662109375,
-0.050567626953125,
-0.00342559814453125,
0.053741455078125,
0.01346588134765625,
-0.01197052001953125,
-0.0161895751953125,
0.032379150390625,
-0.045013427734375,
0.013641357421875,
-0.00865936279296875,
0.003597259521484375,
0.0170745849609375,
-0.0100555419921875,
-0.0275115966796875,
-0.01265716552734375,
-0.0499267578125,
0.01953125,
0.0199127197265625,
-0.0178680419921875,
-0.0287628173828125,
-0.0075225830078125,
-0.02740478515625,
-0.0067596435546875,
-0.0082244873046875,
0.0228729248046875,
-0.0036563873291015625,
-0.042755126953125,
0.0202178955078125,
-0.00930023193359375,
-0.01377105712890625,
0.0154571533203125,
0.010772705078125,
0.0149688720703125,
-0.035125732421875,
-0.01363372802734375,
-0.0236968994140625,
-0.03466796875,
-0.0208892822265625,
0.0196380615234375,
-0.0037841796875,
-0.10308837890625,
0.03662109375,
-0.061553955078125,
-0.014892578125,
-0.03363037109375,
-0.004940032958984375,
0.01226806640625,
0.0987548828125,
-0.01800537109375,
-0.0278167724609375,
0.0167083740234375,
-0.01009368896484375,
-0.00910186767578125,
0.01605224609375,
-0.037017822265625,
-0.0240936279296875,
0.0162353515625,
0.00739288330078125,
0.00174713134765625,
0.0161590576171875,
-0.01140594482421875,
0.00732421875,
0.03375244140625,
-0.01099395751953125,
0.0240325927734375,
0.01505279541015625,
-0.0174407958984375,
-0.00537109375,
-0.0222625732421875,
-0.0178985595703125,
-0.004573822021484375,
-0.0013132095336914062,
-0.07080078125,
-0.004131317138671875,
-0.041412353515625,
0.0361328125,
0.0164947509765625,
-0.00862884521484375,
-0.02764892578125,
0.02374267578125,
0.00872039794921875,
-0.0293426513671875,
0.0377197265625,
0.0117340087890625,
-0.029998779296875,
-0.0005483627319335938,
0.008270263671875,
-0.021026611328125,
-0.0146331787109375,
0.00009238719940185547,
-0.0203704833984375,
0.0247344970703125,
-0.0170745849609375,
0.00872039794921875,
0.028778076171875,
-0.025390625,
0.00585174560546875,
-0.0012102127075195312,
-0.01806640625,
0.0012645721435546875,
-0.052520751953125,
0.0283355712890625,
0.0088958740234375,
0.024566650390625,
0.0247039794921875,
-0.017852783203125,
-0.00937652587890625,
0.037994384765625,
0.03948974609375,
-0.00553131103515625,
-0.007537841796875,
-0.09051513671875,
-0.03466796875,
0.035736083984375,
0.05096435546875,
-0.027130126953125,
-0.007678985595703125,
-0.03265380859375,
0.0169830322265625,
0.0105743408203125,
0.023040771484375,
-0.016998291015625,
0.032958984375,
-0.0094146728515625,
-0.03521728515625,
0.04351806640625,
-0.005664825439453125,
-0.00888824462890625,
0.007053375244140625,
0.0311279296875,
-0.0156402587890625,
0.0035724639892578125,
0.01181793212890625,
0.00899505615234375,
-0.00724029541015625,
-0.0150146484375,
-0.0214996337890625,
0.0087890625,
0.0218658447265625,
-0.027099609375,
0.00440216064453125,
-0.006557464599609375,
-0.035980224609375,
-0.0557861328125,
0.0005326271057128906,
-0.00981903076171875,
-0.0302734375,
0.008880615234375,
0.0112152099609375,
0.032318115234375,
0.019256591796875,
-0.015472412109375,
-0.0172576904296875,
0.088134765625,
-0.0093994140625,
-0.06256103515625,
0.01178741455078125,
-0.04632568359375,
0.0093536376953125,
0.03155517578125,
0.0268096923828125,
0.01031494140625,
0.0187835693359375,
0.032012939453125,
0.012603759765625,
0.0296630859375,
0.03515625,
-0.00844573974609375,
0.004718780517578125,
0.0017271041870117188,
-0.009185791015625,
-0.0022258758544921875,
0.0286865234375,
-0.00893402099609375,
0.003170013427734375,
-0.0068817138671875,
0.0428466796875,
0.044952392578125,
0.005397796630859375,
0.00630950927734375,
0.0223236083984375,
-0.0164794921875,
-0.00769805908203125,
0.0116729736328125,
-0.048614501953125,
0.00383758544921875,
0.011962890625,
0.048980712890625,
-0.01279449462890625,
-0.0211029052734375,
0.0160369873046875,
-0.0235137939453125,
0.016510009765625,
0.0278167724609375,
-0.0232696533203125,
-0.05596923828125,
-0.01141357421875,
0.034423828125,
0.0364990234375,
-0.05450439453125,
-0.00032973289489746094,
-0.035675048828125,
-0.039703369140625,
-0.0289764404296875,
0.0201568603515625,
-0.06170654296875,
-0.00482177734375,
0.00823211669921875,
0.0142059326171875,
-0.01421356201171875,
-0.027862548828125,
0.0028839111328125,
-0.01404571533203125,
-0.0167388916015625,
0.0264892578125,
0.02813720703125,
-0.0302276611328125,
0.00821685791015625,
-0.037750244140625,
0.023468017578125,
-0.0232086181640625,
0.029541015625,
-0.029144287109375,
-0.021392822265625,
-0.0302886962890625,
-0.024505615234375,
-0.059783935546875,
-0.02197265625,
-0.07720947265625,
-0.00852203369140625,
-0.040863037109375,
0.04925537109375,
0.062469482421875,
0.042144775390625,
-0.004657745361328125,
-0.048431396484375,
-0.00539398193359375,
0.01305389404296875,
0.0288238525390625,
0.08270263671875,
-0.0211944580078125,
0.04193115234375,
0.01336669921875,
0.022186279296875,
-0.004909515380859375,
-0.0196380615234375,
-0.04241943359375,
-0.0013942718505859375,
-0.0015192031860351562,
-0.035552978515625,
-0.02587890625,
0.0161285400390625,
-0.040618896484375,
0.0192413330078125,
0.036376953125,
-0.01233673095703125,
0.007537841796875,
-0.01238250732421875,
0.00272369384765625,
-0.0279693603515625,
0.052947998046875,
-0.05596923828125,
0.00811767578125,
-0.02587890625,
-0.037261962890625,
0.000400543212890625,
0.023406982421875,
-0.0022754669189453125,
0.03704833984375,
-0.00847625732421875,
0.03131103515625,
0.005764007568359375,
-0.006916046142578125,
0.016265869140625,
-0.006954193115234375,
-0.044586181640625,
-0.0186767578125,
0.020751953125,
-0.00823211669921875,
0.0146331787109375,
0.00789642333984375,
-0.0479736328125,
0.011474609375,
0.042083740234375,
0.0015583038330078125,
-0.0372314453125,
0.02301025390625,
-0.0260162353515625,
0.048248291015625,
0.045196533203125,
0.08563232421875,
-0.10333251953125,
0.05120849609375,
0.0204925537109375,
0.017730712890625,
0.07452392578125,
0.020111083984375,
-0.01605224609375,
-0.01172637939453125,
-0.0081634521484375,
0.0233001708984375,
-0.0316162109375,
-0.0019626617431640625,
0.0306396484375,
-0.013824462890625,
-0.0018863677978515625,
0.056121826171875,
0.01538848876953125,
0.003978729248046875,
-0.013092041015625,
-0.0104522705078125,
0.007770538330078125,
-0.0085296630859375,
-0.0009908676147460938,
0.0251617431640625,
-0.045623779296875,
-0.0616455078125,
-0.004573822021484375,
0.018035888671875,
-0.047607421875,
0.011199951171875,
0.0014410018920898438,
0.08154296875,
0.03314208984375,
0.0287933349609375,
-0.050628662109375,
0.0167083740234375,
0.00335693359375,
-0.021820068359375,
-0.03399658203125,
-0.0008645057678222656,
0.00968170166015625,
-0.0233612060546875,
0.0250396728515625,
-0.00711822509765625,
-0.0223541259765625,
-0.01538848876953125,
-0.04986572265625,
0.0203704833984375,
0.01512908935546875,
-0.029296875,
-0.0050201416015625,
0.0019063949584960938,
0.019500732421875,
-0.01467132568359375,
-0.0127716064453125,
-0.0187530517578125,
0.0234375,
-0.01422119140625,
-0.018218994140625,
0.0109100341796875,
-0.02130126953125,
-0.08209228515625,
0.0731201171875,
0.02227783203125,
0.05511474609375,
-0.0023651123046875,
0.0147552490234375,
-0.0300140380859375,
-0.01163482666015625,
-0.026458740234375,
0.032379150390625,
0.02764892578125,
-0.00164031982421875,
0.0019378662109375,
-0.01174163818359375,
-0.0032501220703125,
0.0221405029296875,
0.037628173828125,
0.01033782958984375,
-0.0171966552734375,
-0.015106201171875,
0.017974853515625,
0.0303955078125,
-0.01099395751953125,
0.02392578125,
-0.0009822845458984375,
0.033782958984375,
0.0770263671875,
-0.0308990478515625,
0.04901123046875,
-0.01244354248046875,
-0.0097198486328125,
0.005847930908203125,
-0.0012369155883789062,
-0.004459381103515625,
-0.003574371337890625,
0.0259552001953125,
0.01192474365234375,
-0.0207977294921875,
-0.01751708984375,
0.00962066650390625,
0.0018253326416015625,
0.06591796875,
0.055999755859375,
-0.014129638671875,
0.00969696044921875,
-0.0286865234375,
0.0606689453125,
0.01812744140625,
0.0478515625,
0.016510009765625,
0.0190887451171875,
0.0162506103515625,
0.006885528564453125,
0.03179931640625,
0.035430908203125,
-0.037445068359375,
0.032196044921875,
0.03277587890625,
0.014801025390625,
-0.029754638671875,
0.0257110595703125,
0.064208984375,
0.05169677734375,
-0.040435791015625,
-0.027069091796875,
0.0106353759765625,
0.004245758056640625,
0.02850341796875,
-0.0022735595703125,
0.044281005859375,
-0.0074005126953125,
0.006244659423828125,
-0.0172882080078125,
0.01131439208984375,
0.01247406005859375,
0.01302337646484375,
0.01255035400390625,
0.01390838623046875,
-0.02618408203125,
0.012054443359375,
-0.0108489990234375,
0.009521484375,
0.027435302734375,
-0.016632080078125,
-0.0191650390625,
-0.00487518310546875,
0.056915283203125,
0.0176849365234375,
0.0025844573974609375,
-0.0325927734375,
0.0259246826171875,
-0.01215362548828125,
0.0168304443359375,
0.034393310546875,
-0.008514404296875,
0.0063629150390625,
0.004486083984375,
0.005535125732421875,
0.04583740234375,
0.04364013671875,
-0.033050537109375,
-0.0167999267578125,
0.035491943359375,
-0.0224761962890625,
-0.0187530517578125,
-0.0518798828125,
0.01178741455078125,
0.045745849609375,
0.0166778564453125,
0.035888671875,
-0.03936767578125,
0.07073974609375,
0.002567291259765625,
0.007686614990234375,
0.005214691162109375,
-0.02789306640625,
0.030059814453125,
-0.0119476318359375,
0.050567626953125,
0.036529541015625,
-0.06964111328125,
-0.0173797607421875,
-0.039337158203125,
0.0021915435791015625,
0.021759033203125,
0.0234375,
-0.0168609619140625,
0.055450439453125,
0.00237274169921875,
0.0033855438232421875,
-0.004962921142578125,
-0.00931549072265625,
0.0098419189453125,
0.01312255859375,
0.015625,
0.00762939453125,
-0.01297760009765625,
-0.02703857421875,
-0.0260467529296875,
0.04205322265625,
-0.00839996337890625,
0.07208251953125,
-0.040740966796875,
0.0239410400390625,
-0.01351165771484375,
0.006107330322265625,
0.0036163330078125,
-0.019195556640625,
0.003772735595703125,
0.02325439453125,
0.0263214111328125,
-0.0218505859375,
-0.004375457763671875,
0.03546142578125,
0.03070068359375,
-0.02935791015625,
0.0361328125,
-0.004070281982421875,
-0.004405975341796875,
-0.039337158203125,
0.013946533203125,
-0.0302886962890625,
-0.05987548828125,
-0.029449462890625,
0.0260467529296875,
-0.004726409912109375,
0.040374755859375,
-0.01552581787109375,
0.050506591796875,
-0.025390625,
-0.0267333984375,
0.01505279541015625,
-0.05938720703125,
-0.0165252685546875,
0.0036678314208984375,
0.014862060546875,
0.035614013671875,
0.027313232421875,
-0.02740478515625,
0.0828857421875,
-0.0206298828125,
0.04931640625,
0.025299072265625,
0.03839111328125,
-0.0067138671875,
-0.0445556640625,
0.0156402587890625,
-0.00789642333984375,
-0.0220489501953125,
-0.025726318359375,
0.01366424560546875,
-0.06005859375,
-0.040740966796875,
-0.0275421142578125,
-0.046417236328125,
0.0174102783203125,
0.03155517578125,
-0.0207061767578125,
-0.0164794921875,
-0.059906005859375,
0.0218658447265625,
-0.0018396377563476562,
-0.022735595703125,
-0.0199737548828125,
-0.003704071044921875,
0.0076904296875,
0.047760009765625,
-0.0443115234375,
0.004627227783203125,
0.009246826171875,
0.0450439453125,
-0.036834716796875,
0.02777099609375,
-0.01715087890625,
-0.0263824462890625,
0.0008692741394042969,
0.034515380859375,
0.04437255859375,
-0.02569580078125,
-0.0171051025390625,
0.025634765625,
0.042083740234375,
0.08502197265625,
0.032745361328125,
-0.047607421875,
-0.0009918212890625,
-0.007343292236328125,
0.025177001953125,
-0.0386962890625,
0.01308441162109375,
-0.0740966796875,
-0.0310516357421875,
-0.0263824462890625,
-0.00675201416015625,
-0.0133056640625,
-0.05084228515625,
-0.08258056640625,
0.08917236328125,
-0.027435302734375,
-0.0219268798828125,
-0.040679931640625,
-0.034515380859375,
0.006130218505859375,
0.018341064453125,
-0.0163116455078125,
0.0009045600891113281,
-0.061431884765625,
0.034088134765625,
0.02850341796875,
-0.01995849609375,
0.032073974609375,
0.0038852691650390625,
-0.057037353515625,
0.0100555419921875,
0.017333984375,
0.020294189453125,
0.046844482421875,
-0.0225982666015625,
0.0252532958984375,
0.039459228515625,
-0.046112060546875,
-0.018585205078125,
-0.035003662109375,
-0.00443267822265625,
0.003971099853515625,
-0.0239105224609375,
-0.033294677734375,
-0.0037384033203125,
0.06353759765625,
0.056396484375,
0.02288818359375,
-0.0325927734375,
0.004947662353515625,
0.00875091552734375,
0.014984130859375,
0.0016536712646484375,
0.004436492919921875,
-0.05535888671875,
-0.0259552001953125,
0.00522613525390625,
-0.0341796875,
-0.012237548828125,
0.007572174072265625,
-0.05731201171875,
-0.0076751708984375,
-0.012481689453125,
-0.0218048095703125,
0.00036978721618652344,
0.006137847900390625,
0.005519866943359375,
-0.0251922607421875,
-0.026947021484375,
0.0027484893798828125,
-0.0035839080810546875,
-0.0252685546875,
-0.004924774169921875,
-0.023590087890625,
-0.057037353515625,
-0.0181121826171875,
0.066650390625,
-0.037200927734375,
0.087158203125,
-0.0819091796875,
-0.02081298828125,
-0.01082611083984375,
0.026275634765625,
0.01165771484375,
0.04736328125,
-0.0261077880859375,
0.022247314453125,
0.0218048095703125,
0.00850677490234375,
-0.01666259765625,
-0.053985595703125,
-0.04925537109375,
0.01641845703125,
0.0060272216796875,
0.0092010498046875,
0.04974365234375,
0.0030498504638671875,
0.007282257080078125,
0.030792236328125,
0.00897979736328125,
0.004459381103515625,
-0.01006317138671875,
-0.003993988037109375,
-0.00276947021484375,
-0.0150604248046875
] |
98a31b02734da93510297f4aec190de16f81ecaf | Wordpress Stackexchange
Q: How to receive HTTP POST in WP? How do I listen for and receive a third party HTTP POST in Wordpress so I can process the data in the post inside Wordpress?
Not looking for the answer with code but rather the method by which Wordpress would receive that HTTP POST.
A: Easy! You have a couple of options to do so.
The easiest one, but less safe, is to create a brand new PHP file in the root folder of WordPress. Let's say we will call it get_post.php and add WordPress functionality to it.
Like so:
<?php
require_once('wp-load.php'); // add wordpress functionality
$post = $_POST;
if ( $something ) // security check
update_post_meta( $post['post_id'], 'post_data', $post );
?>
The API link will be yourdomain.com/get_posts.php
Another option is to create a brand new page template inside of your template directory. And create a page using that template within your WordPress dashboard.
<?php
/* Template Name: Api Template */
if ( ! defined( ‘ABSPATH’ ) ) {
exit;
}
$post = $_POST;
update_post_meta( $post['post_id'], 'post_data', $post );
?>
The API link will be: yourdomain.com/newly-created-page-permalink.
| Q: How to receive HTTP POST in WP? How do I listen for and receive a third party HTTP POST in Wordpress so I can process the data in the post inside Wordpress?
Not looking for the answer with code but rather the method by which Wordpress would receive that HTTP POST.
A: Easy! You have a couple of options to do so.
The easiest one, but less safe, is to create a brand new PHP file in the root folder of WordPress. Let's say we will call it get_post.php and add WordPress functionality to it.
Like so:
<?php
require_once('wp-load.php'); // add wordpress functionality
$post = $_POST;
if ( $something ) // security check
update_post_meta( $post['post_id'], 'post_data', $post );
?>
The API link will be yourdomain.com/get_posts.php
Another option is to create a brand new page template inside of your template directory. And create a page using that template within your WordPress dashboard.
<?php
/* Template Name: Api Template */
if ( ! defined( ‘ABSPATH’ ) ) {
exit;
}
$post = $_POST;
update_post_meta( $post['post_id'], 'post_data', $post );
?>
The API link will be: yourdomain.com/newly-created-page-permalink.
A: Since 4.4 and above wordpress has an official end point for "API" type of access - wp-json, which you can extend by defining you own extension point and handler with register_rest_route, never tried to send a non json payload that way, but I assume it should be possible, or your front end can easily encode it as json.
The advantage over other answers here is that it lets wordpress know that the request is an API request and not a front end one.
(in older versions you could have used rewrite rules... but it is too messy to even mention)
A: You should start by making a new page template starting from a template you already have in the theme (edit a template, change the name of the template on the top of the page, save as a different PHP file).
Then add the PHP code to process the HTTP post to the new file.
The last step is to go to the dashboard and create a new page using the new template.
A: I would like to give an example to @Mark Kaplun's answer.
You can register an endpoint to process your http post requests using register_rest_route like this:-
/** first create a function for processing your request*/
function process_my_request(WP_REST_Request $request){
$request_body = $request->get_body_params();
if(update_post_meta( $request_body['post_id'], 'post_data', $request_body )){
$response = new WP_REST_Response(array('message'=>'Successful'));
$response->set_status(200);
return $response;
}
else{
return new WP_Error('invalid_request', 'Something went wrong', array('status'=>403));
}
}
/** then create a register route callback function */
function register_my_route(){
register_rest_route('myplugin/v1', '/myroute', array(
'methods'=>'POST',
'callback'=>'process_my_request'
));
}
add_action('rest_api_init', 'register_my_route');
Once you have done that, now you can post your requests to the following path
site_url('wp-json/myplugin/v1/myroute');
| wordpress | {
"language": "en",
"length": 459,
"provenance": "stackexchange_00019.jsonl.gz:472285",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/253486"
} | [
0.07171630859375,
-0.01354217529296875,
0.00920867919921875,
-0.020751953125,
-0.0032329559326171875,
-0.0318603515625,
0.050811767578125,
-0.0250396728515625,
0.003368377685546875,
-0.0033435821533203125,
-0.0258941650390625,
0.0221099853515625,
-0.032318115234375,
-0.018341064453125,
0.01593017578125,
-0.033935546875,
0.056549072265625,
-0.01141357421875,
0.06365966796875,
0.0201263427734375,
0.01219940185546875,
0.04962158203125,
0.042999267578125,
0.00720977783203125,
0.029876708984375,
0.0136871337890625,
0.018951416015625,
-0.0189056396484375,
0.00012028217315673828,
-0.0193939208984375,
0.00533294677734375,
-0.00954437255859375,
0.0207977294921875,
0.0233154296875,
-0.035980224609375,
-0.009185791015625,
-0.004241943359375,
0.004055023193359375,
-0.004734039306640625,
0.036712646484375,
0.01116180419921875,
-0.0116424560546875,
0.0158538818359375,
0.0167083740234375,
0.00249481201171875,
-0.00667572021484375,
-0.0096282958984375,
-0.062255859375,
-0.01381683349609375,
0.039337158203125,
0.00853729248046875,
0.00220489501953125,
0.0022029876708984375,
0.06158447265625,
-0.01378631591796875,
-0.007389068603515625,
0.004962921142578125,
0.00702667236328125,
0.0435791015625,
-0.034515380859375,
-0.0567626953125,
-0.0256500244140625,
0.025909423828125,
-0.0143890380859375,
-0.0187835693359375,
-0.01409149169921875,
0.0253448486328125,
0.017730712890625,
-0.008697509765625,
-0.004955291748046875,
0.0081939697265625,
0.015777587890625,
-0.00988006591796875,
-0.03363037109375,
0.015838623046875,
0.0034503936767578125,
0.0185394287109375,
0.0022907257080078125,
-0.0211944580078125,
0.0273895263671875,
0.0199737548828125,
0.022857666015625,
0.01177978515625,
-0.035614013671875,
0.0033245086669921875,
-0.0079345703125,
-0.00975799560546875,
-0.011993408203125,
-0.0216217041015625,
-0.0152740478515625,
-0.03424072265625,
-0.050201416015625,
0.0239715576171875,
-0.0006160736083984375,
-0.037689208984375,
-0.007678985595703125,
-0.012603759765625,
-0.0186004638671875,
0.0016260147094726562,
0.02557373046875,
-0.0116119384765625,
-0.043670654296875,
0.07464599609375,
-0.0316162109375,
-0.006099700927734375,
0.0126495361328125,
0.047607421875,
-0.0029811859130859375,
0.0283050537109375,
-0.00981903076171875,
-0.0142059326171875,
0.0889892578125,
0.0006237030029296875,
0.021240234375,
-0.0723876953125,
0.020660400390625,
-0.01055908203125,
-0.054229736328125,
-0.01788330078125,
-0.0087432861328125,
-0.025054931640625,
0.00841522216796875,
-0.0011959075927734375,
0.004055023193359375,
0.0396728515625,
0.032196044921875,
0.000705718994140625,
-0.0184173583984375,
-0.007434844970703125,
0.01192474365234375,
0.008636474609375,
0.0200042724609375,
0.017333984375,
0.0307159423828125,
-0.0036296844482421875,
-0.003887176513671875,
0.005279541015625,
-0.00899505615234375,
0.003017425537109375,
0.008758544921875,
0.00539398193359375,
-0.05364990234375,
-0.035675048828125,
0.0086212158203125,
0.0176544189453125,
0.006885528564453125,
0.01044464111328125,
0.0159912109375,
0.0191497802734375,
0.0090789794921875,
-0.015106201171875,
-0.006252288818359375,
-0.00792694091796875,
0.019561767578125,
0.033050537109375,
-0.014404296875,
0.039581298828125,
-0.027679443359375,
0.0201416015625,
-0.038604736328125,
0.0268096923828125,
-0.0111236572265625,
0.01180267333984375,
-0.002655029296875,
-0.036346435546875,
0.00860595703125,
-0.04022216796875,
-0.015472412109375,
0.023345947265625,
0.030059814453125,
0.0292205810546875,
-0.0168914794921875,
-0.007358551025390625,
-0.0290985107421875,
-0.02154541015625,
-0.0239715576171875,
0.006938934326171875,
0.007053375244140625,
0.039886474609375,
-0.0021228790283203125,
-0.0182342529296875,
-0.0217132568359375,
0.0675048828125,
-0.02423095703125,
-0.026397705078125,
0.0770263671875,
0.0278472900390625,
0.09906005859375,
-0.06390380859375,
0.042816162109375,
0.03173828125,
0.054595947265625,
-0.0295257568359375,
0.032257080078125,
-0.03106689453125,
-0.049957275390625,
0.00202178955078125,
-0.0003590583801269531,
-0.0330810546875,
0.0253753662109375,
-0.056610107421875,
0.021759033203125,
-0.009002685546875,
0.03973388671875,
0.0012187957763671875,
0.02587890625,
-0.03265380859375,
0.0305633544921875,
0.0268707275390625,
0.0153045654296875,
-0.0003032684326171875,
-0.01000213623046875,
-0.004222869873046875,
-0.02899169921875,
-0.0321044921875,
0.0219879150390625,
-0.0287933349609375,
0.02349853515625,
-0.023345947265625,
0.0290985107421875,
-0.0198822021484375,
-0.045074462890625,
-0.0240325927734375,
0.00035500526428222656,
0.0404052734375,
-0.0281524658203125,
-0.002532958984375,
-0.0261688232421875,
0.0252227783203125,
0.0090789794921875,
-0.0241546630859375,
0.01483154296875,
0.0058441162109375,
0.0119171142578125,
-0.004688262939453125,
0.007610321044921875,
0.0006842613220214844,
-0.038238525390625,
0.009979248046875,
0.0455322265625,
0.026458740234375,
0.0219268798828125,
0.00519561767578125,
0.021575927734375,
0.01519775390625,
-0.048675537109375,
0.013519287109375,
-0.006702423095703125,
0.0230255126953125,
0.040802001953125,
-0.02734375,
-0.015411376953125,
0.01192474365234375,
-0.08453369140625,
-0.0035877227783203125,
0.045806884765625,
0.00399017333984375,
0.01016998291015625,
-0.035308837890625,
0.004505157470703125,
-0.00585174560546875,
-0.0296478271484375,
-0.02166748046875,
-0.026885986328125,
-0.0010004043579101562,
0.0007638931274414062,
0.0340576171875,
0.042694091796875,
-0.005138397216796875,
-0.030670166015625,
0.00897216796875,
0.016326904296875,
-0.00905609130859375,
0.01296234130859375,
0.015228271484375,
0.022796630859375,
-0.0265350341796875,
-0.0038852691650390625,
0.0142364501953125,
0.018463134765625,
-0.0191497802734375,
0.0333251953125,
0.0027103424072265625,
-0.020904541015625,
-0.0249786376953125,
-0.0089874267578125,
-0.0036029815673828125,
-0.03497314453125,
0.04779052734375,
0.02691650390625,
0.04058837890625,
0.0281829833984375,
-0.002716064453125,
0.049774169921875,
0.01512908935546875,
-0.0173187255859375,
0.007411956787109375,
-0.026611328125,
0.0147247314453125,
-0.0202484130859375,
0.0287322998046875,
0.048126220703125,
0.006916046142578125,
-0.00911712646484375,
-0.01242828369140625,
-0.024444580078125,
-0.0428466796875,
0.03594970703125,
-0.00757598876953125,
-0.0648193359375,
-0.01385498046875,
0.0063018798828125,
-0.004619598388671875,
0.01119232177734375,
-0.0168609619140625,
-0.039031982421875,
-0.0249786376953125,
-0.0002999305725097656,
-0.1156005859375,
-0.0802001953125,
0.059844970703125,
-0.078369140625,
-0.0202789306640625,
-0.036956787109375,
-0.060699462890625,
-0.01654052734375,
-0.004924774169921875,
-0.0189208984375,
0.0095367431640625,
0.00380706787109375,
-0.06732177734375,
-0.00980377197265625,
-0.06585693359375,
0.0270233154296875,
-0.024810791015625,
-0.006328582763671875,
0.00804901123046875,
0.00502777099609375,
-0.0007781982421875,
-0.0174560546875,
0.0038604736328125,
0.041656494140625,
-0.019989013671875,
-0.0435791015625,
-0.02081298828125,
-0.007221221923828125,
0.019195556640625,
-0.0103759765625,
0.054229736328125,
0.036590576171875,
-0.03399658203125,
-0.0038204193115234375,
-0.01053619384765625,
-0.020751953125,
0.0062408447265625,
-0.01044464111328125,
0.01116943359375,
-0.0118865966796875,
-0.0022335052490234375,
-0.05126953125,
-0.00304412841796875,
-0.015289306640625,
-0.04144287109375,
-0.058013916015625,
0.0154571533203125,
-0.0006890296936035156,
-0.0201416015625,
-0.02679443359375,
-0.001964569091796875,
0.0007271766662597656,
0.039886474609375,
-0.0179901123046875,
0.0665283203125,
-0.020660400390625,
-0.037994384765625,
-0.044677734375,
0.0056304931640625,
-0.0271148681640625,
-0.00997161865234375,
-0.017578125,
-0.0262908935546875,
-0.03887939453125,
0.00846099853515625,
-0.0540771484375,
-0.053070068359375,
0.055572509765625,
-0.01215362548828125,
0.005619049072265625,
-0.02703857421875,
-0.0289764404296875,
0.01364898681640625,
0.09326171875,
0.01538848876953125,
-0.01032257080078125,
0.0037708282470703125,
0.0014715194702148438,
-0.01117706298828125,
-0.012603759765625,
-0.033447265625,
-0.00078582763671875,
0.0202484130859375,
-0.0267333984375,
-0.0233154296875,
-0.00787353515625,
-0.0001004934310913086,
0.04705810546875,
0.02447509765625,
-0.0007596015930175781,
0.041046142578125,
-0.046295166015625,
0.01354217529296875,
0.007061004638671875,
0.0159454345703125,
-0.02972412109375,
-0.027252197265625,
-0.01291656494140625,
-0.0299835205078125,
-0.00829315185546875,
0.020172119140625,
0.0303802490234375,
0.0247650146484375,
-0.046295166015625,
-0.00475311279296875,
0.017547607421875,
0.00843048095703125,
0.041748046875,
-0.0312347412109375,
-0.0084381103515625,
0.007747650146484375,
-0.00679779052734375,
0.01152801513671875,
-0.01229095458984375,
-0.00531005859375,
-0.007610321044921875,
-0.0125579833984375,
0.01345062255859375,
-0.02386474609375,
0.0026035308837890625,
-0.006542205810546875,
-0.00704193115234375,
-0.0677490234375,
-0.0230560302734375,
0.00806427001953125,
0.0257568359375,
-0.0196990966796875,
0.01294708251953125,
-0.02203369140625,
-0.076171875,
0.04949951171875,
-0.00705718994140625,
0.00231170654296875,
-0.0040283203125,
0.0650634765625,
0.0117645263671875,
-0.0212860107421875,
-0.0226898193359375,
0.004978179931640625,
0.03106689453125,
-0.00443267822265625,
0.049224853515625,
0.03192138671875,
-0.0280914306640625,
0.054290771484375,
0.0168609619140625,
0.0177001953125,
0.001682281494140625,
0.00856781005859375,
0.03662109375,
0.0078582763671875,
-0.0004930496215820312,
0.059234619140625,
-0.03082275390625,
0.00919342041015625,
-0.0126190185546875,
-0.0189056396484375,
0.0026454925537109375,
0.0237274169921875,
-0.03564453125,
0.057525634765625,
-0.0012617111206054688,
-0.04638671875,
0.029022216796875,
-0.0166473388671875,
-0.006702423095703125,
-0.008209228515625,
0.01293182373046875,
0.007427215576171875,
-0.00919342041015625,
0.007808685302734375,
-0.043914794921875,
0.007080078125,
-0.0186614990234375,
0.0394287109375,
-0.02618408203125,
-0.0008053779602050781,
-0.0401611328125,
-0.0167083740234375,
0.0377197265625,
-0.00493621826171875,
-0.05633544921875,
-0.015533447265625,
-0.021697998046875,
0.0487060546875,
0.01763916015625,
-0.042022705078125,
0.06451416015625,
0.042388916015625,
-0.0240020751953125,
-0.0294189453125,
-0.04779052734375,
-0.0292816162109375,
-0.0748291015625,
-0.01548004150390625,
0.005695343017578125,
-0.004695892333984375,
-0.0170135498046875,
0.072265625,
0.01383209228515625,
0.023101806640625,
-0.027252197265625,
0.041107177734375,
0.035858154296875,
0.036224365234375,
0.00794219970703125,
-0.004825592041015625,
0.0016508102416992188,
0.0131072998046875,
0.002445220947265625,
-0.056304931640625,
-0.046661376953125,
0.0187530517578125,
0.06561279296875,
0.006992340087890625,
-0.00916290283203125,
0.00839996337890625,
0.0012378692626953125,
-0.020172119140625,
-0.006389617919921875,
-0.015380859375,
-0.0260162353515625,
-0.00952911376953125,
0.035430908203125,
0.0173187255859375,
0.01171875,
0.014373779296875,
0.0099945068359375,
0.0297393798828125,
0.0184173583984375,
-0.05194091796875,
0.00684356689453125,
0.00858306884765625,
0.0182342529296875,
0.036346435546875,
-0.02630615234375,
-0.0086669921875,
0.0086212158203125,
0.031005859375,
-0.044830322265625,
-0.01715087890625,
0.038360595703125,
-0.0108184814453125,
-0.0145721435546875,
-0.0092926025390625,
0.005641937255859375,
-0.02105712890625,
0.010986328125,
0.032318115234375,
0.0011463165283203125,
-0.01727294921875,
-0.02850341796875,
-0.0176849365234375,
-0.0260772705078125,
0.029449462890625,
0.0087432861328125,
-0.04730224609375,
-0.01117706298828125,
0.01499176025390625,
0.0225677490234375,
0.00724029541015625,
-0.01641845703125,
0.0066986083984375,
-0.002532958984375,
0.00009715557098388672,
0.00067138671875,
-0.016510009765625,
0.11590576171875,
-0.0112762451171875,
0.09027099609375,
0.0182647705078125,
0.0380859375,
-0.0711669921875,
-0.005519866943359375,
0.0083770751953125,
-0.085693359375,
-0.03619384765625,
-0.006069183349609375,
-0.03314208984375,
0.0504150390625,
-0.002346038818359375,
0.002994537353515625,
-0.02301025390625,
-0.0026035308837890625,
0.01493072509765625,
-0.01508331298828125,
0.01395416259765625,
-0.0032329559326171875,
-0.06756591796875,
0.04083251953125,
0.0116729736328125,
0.01922607421875,
-0.018035888671875,
-0.0163421630859375,
0.0024871826171875,
0.0355224609375,
0.0067901611328125,
-0.012237548828125,
-0.04071044921875,
0.0689697265625,
0.10357666015625,
0.030426025390625,
0.0694580078125,
0.0216522216796875,
0.023895263671875,
0.02239990234375,
0.02880859375,
0.02301025390625,
-0.046905517578125,
0.015960693359375,
-0.006526947021484375,
0.000759124755859375,
0.01506805419921875,
-0.0194549560546875,
0.004261016845703125,
0.013763427734375,
0.0709228515625,
-0.0252838134765625,
0.00362396240234375,
0.019866943359375,
-0.045684814453125,
-0.007640838623046875,
-0.0137786865234375,
-0.028594970703125,
-0.051666259765625,
0.06121826171875,
-0.018707275390625,
-0.0026531219482421875,
0.030364990234375,
-0.0074462890625,
0.0275726318359375,
-0.0009102821350097656,
0.0799560546875,
0.013153076171875,
-0.01406097412109375,
-0.0279998779296875,
0.0153045654296875,
0.01306915283203125,
-0.0098114013671875,
0.00135040283203125,
-0.00862884521484375,
-0.0287933349609375,
-0.039459228515625,
-0.00933074951171875,
-0.0145721435546875,
0.0012788772583007812,
0.01149749755859375,
0.018096923828125,
0.01235198974609375,
0.06787109375,
-0.0233612060546875,
0.02581787109375,
0.03497314453125,
0.0092620849609375,
0.001590728759765625,
-0.07598876953125,
-0.0005331039428710938,
0.0518798828125,
-0.05157470703125,
0.0187530517578125,
0.0192413330078125,
-0.032867431640625,
0.002201080322265625,
0.00206756591796875,
0.0550537109375,
-0.033843994140625,
-0.0289764404296875,
0.026763916015625,
-0.02398681640625,
-0.0160369873046875,
-0.032012939453125,
-0.0037689208984375,
-0.051361083984375,
-0.002101898193359375,
-0.0153961181640625,
-0.019805908203125,
0.016265869140625,
-0.03143310546875,
-0.06512451171875,
0.1263427734375,
0.0328369140625,
-0.0066070556640625,
0.0017681121826171875,
0.073486328125,
-0.07177734375,
0.0310211181640625,
-0.0328369140625,
0.050506591796875,
-0.0052032470703125,
0.03729248046875,
-0.0625,
-0.0219573974609375,
0.00533294677734375,
0.0482177734375,
0.064208984375,
0.0056304931640625,
-0.0084991455078125,
-0.032379150390625,
-0.001232147216796875,
0.01280975341796875,
-0.030914306640625,
0.0276336669921875,
0.024932861328125,
0.07415771484375,
0.05621337890625,
-0.06646728515625,
0.028594970703125,
-0.0251007080078125,
-0.0006542205810546875,
0.0280303955078125,
0.015838623046875,
0.01535797119140625,
0.0133209228515625,
0.0029506683349609375,
0.004177093505859375,
0.002300262451171875,
0.01070404052734375,
-0.00258636474609375,
0.017486572265625,
0.005786895751953125,
0.00196075439453125,
-0.017364501953125,
0.00251007080078125,
-0.0268402099609375,
0.01464080810546875,
0.002410888671875,
0.017486572265625,
-0.0123291015625,
0.01534271240234375,
0.023712158203125,
-0.005329132080078125,
0.0010786056518554688,
0.0450439453125,
-0.023956298828125,
0.099365234375,
0.040924072265625,
0.037811279296875,
-0.033050537109375,
-0.023590087890625,
0.019134521484375,
0.10858154296875,
-0.056488037109375,
-0.00737762451171875,
0.010528564453125,
0.030364990234375,
0.0257568359375,
0.0015096664428710938,
0.0814208984375,
0.00021088123321533203,
-0.00186920166015625,
-0.024322509765625,
0.004474639892578125,
0.005702972412109375,
0.032806396484375,
-0.0030879974365234375,
0.01560211181640625,
-0.0596923828125,
0.005947113037109375,
-0.018951416015625,
-0.0279693603515625,
0.0015239715576171875,
0.05780029296875,
0.0254669189453125,
0.042205810546875,
-0.0565185546875,
-0.01152801513671875,
0.0145111083984375,
-0.042816162109375,
-0.002353668212890625,
-0.01099395751953125,
-0.007137298583984375,
-0.022705078125,
0.036865234375,
0.033599853515625,
0.0210418701171875,
0.04052734375,
0.036712646484375,
0.005031585693359375,
-0.0194854736328125,
-0.0007905960083007812,
0.04949951171875,
-0.036285400390625,
0.01406097412109375,
-0.0227813720703125,
-0.0435791015625,
-0.01102447509765625,
-0.033477783203125,
0.00989532470703125,
-0.0287322998046875,
0.02276611328125,
-0.052703857421875,
0.02569580078125,
-0.01885986328125,
-0.035614013671875,
0.05181884765625,
-0.024627685546875,
0.058349609375,
-0.04547119140625,
-0.041748046875,
0.0013551712036132812,
0.0200042724609375,
-0.061920166015625,
0.005626678466796875,
0.04022216796875,
-0.037261962890625,
0.0245819091796875,
-0.012298583984375,
0.00539398193359375,
0.01105499267578125,
-0.0218048095703125,
0.008819580078125,
0.0194854736328125,
0.0176849365234375,
0.01708984375,
-0.032745361328125,
-0.032806396484375,
-0.0280914306640625,
0.059906005859375,
-0.0156707763671875,
0.0592041015625,
-0.03717041015625,
0.0255279541015625,
-0.0576171875,
0.03155517578125,
-0.047393798828125,
-0.05084228515625,
0.0168914794921875,
0.035888671875,
0.0008382797241210938,
0.007244110107421875,
-0.056640625,
0.0018949508666992188,
0.01271820068359375,
-0.0084991455078125,
0.033966064453125,
-0.05224609375,
0.014068603515625,
-0.0019426345825195312,
0.034881591796875,
-0.025238037109375,
-0.044891357421875,
-0.066162109375,
-0.004241943359375,
0.0182952880859375,
0.03778076171875,
0.0005083084106445312,
0.07183837890625,
0.0230865478515625,
0.038055419921875,
0.019378662109375,
-0.023345947265625,
0.0183868408203125,
0.023162841796875,
-0.044097900390625,
0.026153564453125,
-0.003772735595703125,
-0.0252838134765625,
0.0254974365234375,
-0.01611328125,
0.01461029052734375,
-0.00257110595703125,
-0.0019855499267578125,
0.0029048919677734375,
-0.030609130859375,
0.012115478515625,
-0.0031261444091796875,
-0.0126495361328125,
-0.0157623291015625,
0.004756927490234375,
0.0136566162109375,
0.0192413330078125,
0.0025310516357421875,
-0.028564453125,
-0.020355224609375,
0.0025997161865234375,
-0.0270843505859375,
-0.01529693603515625,
-0.033294677734375,
0.007793426513671875,
0.0277862548828125,
-0.0015840530395507812,
-0.04150390625,
-0.01488494873046875,
-0.01678466796875,
0.070068359375,
-0.01308441162109375,
0.02099609375,
-0.016082763671875,
0.04241943359375,
-0.036041259765625,
-0.037109375,
-0.0249786376953125,
0.0137939453125,
-0.032623291015625,
0.00826263427734375,
0.0247344970703125,
-0.0223236083984375,
-0.029296875,
-0.006786346435546875,
0.01256561279296875,
0.035125732421875,
0.0194854736328125,
0.0110015869140625,
0.0004630088806152344,
0.0193328857421875,
-0.01318359375,
-0.080322265625,
-0.00902557373046875,
-0.041595458984375,
0.0186920166015625,
-0.0185394287109375,
0.03277587890625,
0.040008544921875,
-0.01131439208984375,
-0.029876708984375,
0.026458740234375,
-0.00794219970703125,
-0.0177154541015625,
-0.05743408203125,
-0.026580810546875,
0.008056640625,
0.00739288330078125,
-0.0154266357421875,
-0.042236328125,
-0.0703125,
0.0447998046875,
0.01318359375,
0.00307464599609375,
0.02642822265625,
-0.01245880126953125,
-0.0254669189453125,
0.022125244140625,
0.0235595703125,
-0.0129241943359375,
-0.004405975341796875,
-0.019439697265625,
0.03985595703125,
0.033660888671875,
-0.037628173828125,
0.03350830078125,
0.006290435791015625,
0.016571044921875,
-0.0092010498046875,
-0.04266357421875,
-0.029876708984375,
-0.014862060546875,
0.11273193359375,
0.022430419921875,
0.0306243896484375,
-0.040069580078125,
0.016998291015625,
-0.050506591796875,
-0.037078857421875,
-0.006069183349609375,
0.0252838134765625,
-0.058807373046875,
0.0179901123046875,
0.03204345703125,
0.0013532638549804688,
-0.0019330978393554688,
-0.02276611328125,
-0.0018606185913085938,
-0.01372528076171875,
-0.007213592529296875,
-0.0149078369140625,
0.006561279296875,
-0.09735107421875,
0.1033935546875,
-0.045928955078125,
-0.0190277099609375,
0.0237274169921875,
0.062347412109375,
0.024810791015625,
0.0010557174682617188,
0.01934814453125,
0.0478515625,
-0.017730712890625,
0.011688232421875,
0.036773681640625,
-0.01134490966796875,
-0.01739501953125,
-0.0118255615234375,
-0.031768798828125,
0.029998779296875,
0.0190582275390625,
0.02484130859375,
-0.029449462890625,
0.01020050048828125,
0.01535797119140625,
0.06988525390625,
-0.0046539306640625,
-0.042938232421875,
-0.01837158203125,
0.033447265625,
-0.04034423828125,
-0.0139312744140625,
-0.0016841888427734375,
-0.056976318359375,
0.004119873046875,
-0.0024890899658203125,
-0.01071929931640625,
-0.038818359375,
0.004730224609375,
-0.0205230712890625,
0.004222869873046875,
0.01561737060546875
] |
db6cd89788422edf4f172ebbe3aaa113fbb5643d | Wordpress Stackexchange
Q: Advanced Custom Fields into functions.php I'm trying to include a few custom fields I've created in my functions.php file so they're native to the theme I'm working on. However they're not showing up on the edit screens of the posts I've set them to.
I've included the acf plugin in my theme by using this code in my functions.php: include_once('advanced-custom-fields/acf.php');
I also exported the fields to php and copy and pasted the code in the functions.php of my theme. Can anyone tell me what I'm doing wrong?
A: Check that ACF included in your theme, if not than include acf. Try to use following code:
if( !class_exists('Acf') )
include_once get_stylesheet_directory_uri() . '/advanced-custom-fields/acf.php' );
| Q: Advanced Custom Fields into functions.php I'm trying to include a few custom fields I've created in my functions.php file so they're native to the theme I'm working on. However they're not showing up on the edit screens of the posts I've set them to.
I've included the acf plugin in my theme by using this code in my functions.php: include_once('advanced-custom-fields/acf.php');
I also exported the fields to php and copy and pasted the code in the functions.php of my theme. Can anyone tell me what I'm doing wrong?
A: Check that ACF included in your theme, if not than include acf. Try to use following code:
if( !class_exists('Acf') )
include_once get_stylesheet_directory_uri() . '/advanced-custom-fields/acf.php' );
A: Have you added the custom field into a post?
In my experience, using the custom field in functions.php, plugins, templates, or whatever doesn't put the field as an option in any post. Adding the field manually into any post WILL make it available to any post after that.
And you don't need ACF (Advanced Custom Fields plugin) to use custom fields, unless you want all the fancy options they supply. All you have to do is create a custom field, then start accessing it via appropriate calls to postmeta.
| wordpress | {
"language": "en",
"length": 204,
"provenance": "stackexchange_00019.jsonl.gz:472297",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/253515"
} | [
0.0635986328125,
0.00002950429916381836,
0.0084991455078125,
-0.039825439453125,
0.00586700439453125,
-0.0221405029296875,
0.005466461181640625,
-0.02618408203125,
-0.01800537109375,
0.0030975341796875,
-0.0186920166015625,
0.0338134765625,
-0.050048828125,
-0.030487060546875,
0.0177764892578125,
-0.0279083251953125,
0.0277099609375,
-0.00008630752563476562,
0.0234222412109375,
-0.00588226318359375,
0.017852783203125,
0.0208282470703125,
0.016632080078125,
0.041900634765625,
0.0230560302734375,
-0.04400634765625,
0.0439453125,
0.012603759765625,
0.0307159423828125,
0.01386260986328125,
0.031280517578125,
-0.036285400390625,
0.0019369125366210938,
0.034759521484375,
-0.02264404296875,
-0.032440185546875,
0.04559326171875,
-0.019805908203125,
-0.01078033447265625,
0.061798095703125,
0.0247802734375,
-0.0021419525146484375,
-0.01264190673828125,
0.07318115234375,
-0.01189422607421875,
-0.07830810546875,
0.03765869140625,
-0.049163818359375,
-0.0016241073608398438,
0.0028896331787109375,
0.0204010009765625,
-0.0192108154296875,
0.024200439453125,
0.0008168220520019531,
-0.02069091796875,
-0.027984619140625,
-0.0236053466796875,
0.05364990234375,
0.035675048828125,
-0.0038967132568359375,
-0.046661376953125,
-0.00412750244140625,
0.0186309814453125,
-0.029754638671875,
-0.007015228271484375,
0.0115203857421875,
-0.0022563934326171875,
0.01258087158203125,
-0.04962158203125,
-0.01132965087890625,
0.04205322265625,
-0.04901123046875,
0.011505126953125,
-0.00665283203125,
0.002223968505859375,
-0.0237884521484375,
0.025054931640625,
0.004360198974609375,
0.01006317138671875,
0.01207733154296875,
-0.02630615234375,
0.01206207275390625,
-0.040618896484375,
-0.01126861572265625,
-0.0338134765625,
-0.0080108642578125,
-0.0236968994140625,
-0.00763702392578125,
-0.00821685791015625,
0.0009093284606933594,
-0.013885498046875,
-0.0046844482421875,
-0.040374755859375,
0.03118896484375,
0.00641632080078125,
-0.01348114013671875,
0.039215087890625,
0.040130615234375,
0.02215576171875,
0.04290771484375,
0.0234832763671875,
-0.0574951171875,
0.06695556640625,
-0.039093017578125,
0.004367828369140625,
0.06781005859375,
-0.023162841796875,
-0.00933837890625,
0.01312255859375,
0.021392822265625,
0.035369873046875,
-0.06427001953125,
0.0148773193359375,
-0.0218505859375,
-0.0253448486328125,
-0.01470184326171875,
-0.003082275390625,
-0.018310546875,
-0.0000635981559753418,
-0.031982421875,
0.0028324127197265625,
0.0209197998046875,
-0.019622802734375,
-0.039764404296875,
-0.01837158203125,
-0.05010986328125,
-0.038360595703125,
0.02154541015625,
0.00858306884765625,
0.0367431640625,
-0.038360595703125,
-0.01123809814453125,
0.0528564453125,
0.030548095703125,
0.01145172119140625,
-0.020843505859375,
0.00701141357421875,
-0.0207366943359375,
-0.007537841796875,
0.005367279052734375,
0.0298309326171875,
-0.0189666748046875,
-0.00551605224609375,
0.0018796920776367188,
-0.03436279296875,
-0.006916046142578125,
0.0142669677734375,
0.034698486328125,
-0.041595458984375,
-0.0635986328125,
0.047515869140625,
-0.0266571044921875,
0.035491943359375,
0.0260467529296875,
0.01241302490234375,
0.0196533203125,
0.035614013671875,
-0.01406097412109375,
-0.0305023193359375,
-0.002307891845703125,
0.027191162109375,
-0.035858154296875,
-0.04888916015625,
-0.0280609130859375,
-0.047088623046875,
0.021820068359375,
-0.01812744140625,
0.0018148422241210938,
0.030487060546875,
-0.03997802734375,
0.0294647216796875,
-0.0313720703125,
0.0283050537109375,
0.03875732421875,
0.0212860107421875,
0.0521240234375,
0.0016193389892578125,
0.035003662109375,
0.0185546875,
0.050018310546875,
0.0172576904296875,
-0.031524658203125,
0.043121337890625,
-0.01318359375,
-0.052490234375,
0.036041259765625,
-0.00589752197265625,
0.0458984375,
0.027252197265625,
0.00405120849609375,
0.002712249755859375,
0.0062408447265625,
0.0184783935546875,
-0.00658416748046875,
0.0040435791015625,
-0.0200347900390625,
-0.019927978515625,
-0.0017461776733398438,
-0.028839111328125,
0.00424957275390625,
-0.04473876953125,
-0.0257110595703125,
0.022705078125,
0.023956298828125,
0.005954742431640625,
-0.00342559814453125,
-0.0144195556640625,
0.0254058837890625,
0.0150299072265625,
0.0028476715087890625,
0.0028057098388671875,
0.01097869873046875,
-0.01116180419921875,
-0.02886962890625,
-0.022674560546875,
0.042205810546875,
0.019500732421875,
0.029815673828125,
0.008636474609375,
0.007354736328125,
0.0017786026000976562,
-0.019989013671875,
-0.0189971923828125,
0.01552581787109375,
0.003993988037109375,
0.007373809814453125,
-0.0233001708984375,
-0.01393890380859375,
-0.00928497314453125,
-0.00185394287109375,
0.00733184814453125,
0.047149658203125,
0.01555633544921875,
0.0099029541015625,
-0.046142578125,
-0.00858306884765625,
-0.0455322265625,
-0.016845703125,
-0.01219940185546875,
0.046112060546875,
0.0540771484375,
0.00417327880859375,
0.0012826919555664062,
-0.00914764404296875,
0.09588623046875,
0.004878997802734375,
0.0170440673828125,
-0.0300750732421875,
0.0194854736328125,
0.0216522216796875,
-0.008819580078125,
-0.005031585693359375,
0.0214385986328125,
-0.0721435546875,
0.019989013671875,
0.041107177734375,
-0.04266357421875,
-0.03955078125,
0.007595062255859375,
0.0016021728515625,
0.0046234130859375,
-0.0634765625,
-0.01200103759765625,
-0.0297698974609375,
0.04388427734375,
0.035736083984375,
0.0396728515625,
0.02685546875,
-0.0477294921875,
0.0242919921875,
0.0214385986328125,
0.03741455078125,
-0.0084686279296875,
-0.0052642822265625,
-0.025390625,
-0.0051727294921875,
-0.0302734375,
0.0232391357421875,
-0.0200653076171875,
-0.019927978515625,
-0.011993408203125,
0.0188751220703125,
-0.0246124267578125,
-0.00958251953125,
0.0018339157104492188,
-0.01251220703125,
0.00817108154296875,
0.01338958740234375,
0.01500701904296875,
-0.0131378173828125,
0.00589752197265625,
0.031341552734375,
-0.0240478515625,
0.03948974609375,
0.0229644775390625,
-0.022979736328125,
-0.00012791156768798828,
-0.046783447265625,
0.047393798828125,
-0.0352783203125,
0.004894256591796875,
0.0631103515625,
0.005855560302734375,
-0.00540924072265625,
-0.0047607421875,
-0.0015773773193359375,
0.01212310791015625,
0.0160064697265625,
0.00565338134765625,
-0.057220458984375,
0.0016880035400390625,
-0.0229034423828125,
0.041839599609375,
0.08990478515625,
-0.02099609375,
-0.07513427734375,
0.007251739501953125,
0.0421142578125,
-0.0955810546875,
-0.0911865234375,
-0.0155487060546875,
-0.03369140625,
-0.00846099853515625,
-0.0159912109375,
-0.02459716796875,
0.01654052734375,
-0.0031986236572265625,
0.0123443603515625,
-0.0213775634765625,
-0.037872314453125,
-0.0213165283203125,
-0.08294677734375,
-0.0849609375,
-0.044281005859375,
0.01335906982421875,
0.01294708251953125,
-0.0106201171875,
0.0882568359375,
-0.005645751953125,
-0.053253173828125,
-0.024078369140625,
-0.028594970703125,
0.00039768218994140625,
0.01059722900390625,
0.0384521484375,
-0.05316162109375,
0.05291748046875,
-0.0095062255859375,
0.04498291015625,
0.0528564453125,
-0.03369140625,
-0.0278167724609375,
-0.034759521484375,
0.0001310110092163086,
-0.03424072265625,
0.0694580078125,
0.0631103515625,
-0.038116455078125,
0.007556915283203125,
-0.049285888671875,
0.016204833984375,
0.02044677734375,
0.0133056640625,
0.0247955322265625,
-0.0292205810546875,
-0.034881591796875,
-0.0020313262939453125,
0.03216552734375,
0.01523590087890625,
0.00518798828125,
-0.00980377197265625,
-0.0009541511535644531,
-0.022003173828125,
-0.00021076202392578125,
0.017974853515625,
0.005550384521484375,
0.02325439453125,
0.005321502685546875,
0.035430908203125,
0.016815185546875,
0.035400390625,
-0.007541656494140625,
0.036651611328125,
-0.07647705078125,
-0.056365966796875,
0.028076171875,
-0.062469482421875,
-0.03594970703125,
-0.0257110595703125,
0.016265869140625,
0.01430511474609375,
0.048828125,
-0.047698974609375,
-0.01483154296875,
-0.004589080810546875,
0.01873779296875,
-0.029022216796875,
-0.044921875,
-0.003055572509765625,
-0.0117645263671875,
-0.0650634765625,
0.007114410400390625,
0.006984710693359375,
-0.0275421142578125,
-0.0163421630859375,
0.06500244140625,
-0.047882080078125,
-0.0234375,
0.0298309326171875,
-0.007694244384765625,
0.028076171875,
0.00730133056640625,
0.00765228271484375,
-0.00908660888671875,
0.0017042160034179688,
-0.019775390625,
-0.10614013671875,
-0.00893402099609375,
-0.0430908203125,
0.055267333984375,
0.0135650634765625,
-0.005756378173828125,
-0.0249481201171875,
0.0298614501953125,
-0.0008335113525390625,
-0.018218994140625,
0.010894775390625,
0.005596160888671875,
0.0164794921875,
-0.009124755859375,
-0.0018930435180664062,
-0.0281219482421875,
0.007732391357421875,
0.0123138427734375,
-0.0509033203125,
0.0294952392578125,
-0.01441192626953125,
-0.0313720703125,
0.041015625,
-0.0645751953125,
0.01097869873046875,
0.0129547119140625,
-0.046600341796875,
0.00366973876953125,
-0.023712158203125,
-0.0163726806640625,
0.01387786865234375,
-0.023529052734375,
0.009429931640625,
-0.02557373046875,
-0.01377105712890625,
0.03350830078125,
0.05242919921875,
0.0194854736328125,
0.006359100341796875,
-0.0701904296875,
0.0020542144775390625,
0.043121337890625,
-0.0206298828125,
0.03436279296875,
0.02435302734375,
-0.0312347412109375,
0.064453125,
0.01226043701171875,
0.020477294921875,
-0.060882568359375,
0.049896240234375,
-0.01035308837890625,
-0.00865936279296875,
0.0080413818359375,
-0.0052490234375,
0.0278472900390625,
-0.0118865966796875,
-0.007904052734375,
-0.0389404296875,
0.0364990234375,
0.04595947265625,
-0.03594970703125,
0.050750732421875,
-0.01332855224609375,
-0.034423828125,
0.0088348388671875,
-0.00830078125,
0.0472412109375,
0.0257568359375,
-0.00557708740234375,
0.041351318359375,
-0.0004620552062988281,
0.0207061767578125,
0.01221466064453125,
0.007381439208984375,
-0.021697998046875,
0.019287109375,
0.05938720703125,
0.006717681884765625,
0.0168914794921875,
-0.01201629638671875,
0.07904052734375,
-0.006061553955078125,
-0.056732177734375,
-0.015533447265625,
-0.0229644775390625,
-0.00864410400390625,
0.0173797607421875,
0.002689361572265625,
0.01395416259765625,
0.05511474609375,
0.0007381439208984375,
0.01580810546875,
0.0196533203125,
0.03045654296875,
-0.0193023681640625,
0.01499176025390625,
0.0300140380859375,
-0.030731201171875,
-0.0002760887145996094,
0.0418701171875,
0.023651123046875,
-0.0021762847900390625,
-0.0181884765625,
0.0189208984375,
0.0073394775390625,
0.044921875,
0.03204345703125,
-0.041900634765625,
-0.00128936767578125,
0.0018634796142578125,
-0.00807952880859375,
-0.0284271240234375,
-0.0131072998046875,
-0.037933349609375,
0.0179443359375,
-0.004024505615234375,
-0.003231048583984375,
0.0628662109375,
0.0143585205078125,
-0.02423095703125,
0.019927978515625,
0.01198577880859375,
-0.058837890625,
0.01293182373046875,
0.025726318359375,
-0.000762939453125,
-0.001125335693359375,
-0.02392578125,
0.04425048828125,
-0.028656005859375,
0.0445556640625,
-0.00923919677734375,
0.00841522216796875,
-0.0099945068359375,
-0.016357421875,
-0.027923583984375,
-0.013275146484375,
0.004085540771484375,
-0.0308074951171875,
-0.041961669921875,
-0.002323150634765625,
-0.004718780517578125,
0.027923583984375,
-0.0264739990234375,
0.004543304443359375,
-0.015380859375,
-0.0007777214050292969,
0.006671905517578125,
-0.0220489501953125,
0.08038330078125,
0.0308837890625,
-0.039642333984375,
0.0139007568359375,
-0.031280517578125,
-0.019134521484375,
-0.022247314453125,
-0.0287017822265625,
-0.044647216796875,
-0.0318603515625,
0.0182037353515625,
0.0171661376953125,
-0.0160980224609375,
-0.057525634765625,
-0.003448486328125,
0.005100250244140625,
0.0210113525390625,
0.0083465576171875,
0.0211944580078125,
0.035308837890625,
0.002964019775390625,
0.06842041015625,
0.04229736328125,
0.027435302734375,
-0.035552978515625,
-0.038360595703125,
-0.01226806640625,
-0.04364013671875,
-0.007694244384765625,
0.009552001953125,
-0.0124969482421875,
0.03411865234375,
0.04364013671875,
0.01296234130859375,
-0.0005526542663574219,
-0.0217742919921875,
0.00446319580078125,
-0.027496337890625,
0.052032470703125,
-0.0286407470703125,
-0.031280517578125,
0.033538818359375,
-0.020477294921875,
-0.003993988037109375,
0.0016031265258789062,
-0.036376953125,
0.05010986328125,
0.01552581787109375,
0.037017822265625,
-0.0005254745483398438,
-0.0494384765625,
0.072265625,
0.018951416015625,
-0.0106201171875,
0.01074981689453125,
0.00018835067749023438,
-0.005573272705078125,
-0.02783203125,
0.02008056640625,
-0.035614013671875,
-0.040191650390625,
0.01593017578125,
0.00662994384765625,
-0.018341064453125,
0.01456451416015625,
-0.0159454345703125,
0.020660400390625,
0.0675048828125,
0.0574951171875,
-0.0992431640625,
0.0237274169921875,
0.004024505615234375,
0.002777099609375,
0.0660400390625,
0.0007619857788085938,
-0.0064697265625,
-0.01499176025390625,
0.00624847412109375,
0.010589599609375,
-0.0056915283203125,
0.013763427734375,
0.016937255859375,
-0.000025331974029541016,
-0.0078582763671875,
0.01551055908203125,
0.0102691650390625,
-0.01200103759765625,
0.0005826950073242188,
0.000232696533203125,
0.011932373046875,
-0.00888824462890625,
0.0049591064453125,
0.0147705078125,
-0.049591064453125,
-0.0484619140625,
0.003589630126953125,
-0.0087738037109375,
-0.01047515869140625,
0.0199432373046875,
0.00604248046875,
0.03350830078125,
0.04791259765625,
-0.01091766357421875,
0.026763916015625,
0.00452423095703125,
0.04339599609375,
0.01611328125,
-0.04937744140625,
0.0294342041015625,
0.03558349609375,
-0.06329345703125,
0.024139404296875,
0.01373291015625,
-0.045928955078125,
-0.0177154541015625,
0.032135009765625,
0.10260009765625,
-0.00525665283203125,
-0.0469970703125,
0.021087646484375,
0.0160369873046875,
-0.00737762451171875,
-0.00086212158203125,
0.04522705078125,
-0.043731689453125,
0.000640869140625,
0.017120361328125,
0.00858306884765625,
-0.02923583984375,
-0.0026226043701171875,
-0.07257080078125,
0.09600830078125,
0.00628662109375,
0.035491943359375,
0.01200103759765625,
0.030364990234375,
-0.0443115234375,
-0.0038509368896484375,
-0.0195465087890625,
0.0306854248046875,
0.0174102783203125,
0.01568603515625,
-0.05865478515625,
-0.0247650146484375,
-0.0187530517578125,
0.0679931640625,
0.0328369140625,
0.01316070556640625,
0.004993438720703125,
0.0106048583984375,
0.02606201171875,
0.027557373046875,
-0.0171356201171875,
0.0013294219970703125,
0.00377655029296875,
0.0012111663818359375,
-0.00035834312438964844,
0.00417327880859375,
0.0217742919921875,
-0.027801513671875,
-0.03485107421875,
0.03057861328125,
0.007450103759765625,
0.001201629638671875,
-0.0020904541015625,
-0.0264129638671875,
-0.021881103515625,
-0.006298065185546875,
0.009490966796875,
-0.0048828125,
-0.0093994140625,
0.022705078125,
0.027313232421875,
-0.00222015380859375,
0.00719451904296875,
-0.0101776123046875,
0.042022705078125,
0.0308990478515625,
0.042877197265625,
0.049591064453125,
0.0343017578125,
0.0220947265625,
-0.03936767578125,
0.0157012939453125,
-0.007732391357421875,
-0.022735595703125,
0.0199432373046875,
0.016693115234375,
0.008392333984375,
-0.030853271484375,
-0.005279541015625,
0.0479736328125,
0.038299560546875,
-0.037384033203125,
-0.03314208984375,
0.011993408203125,
0.02264404296875,
0.027069091796875,
0.01172637939453125,
0.033355712890625,
0.0185089111328125,
0.0565185546875,
-0.016510009765625,
0.0025615692138671875,
0.021453857421875,
0.01215362548828125,
-0.0030040740966796875,
-0.00211334228515625,
-0.02606201171875,
0.016693115234375,
-0.0496826171875,
0.0033550262451171875,
0.01197052001953125,
0.04156494140625,
0.029083251953125,
0.04150390625,
0.035003662109375,
-0.0250244140625,
-0.023040771484375,
0.033782958984375,
0.0009598731994628906,
0.02703857421875,
-0.0406494140625,
-0.0255126953125,
0.01041412353515625,
0.02740478515625,
-0.0172119140625,
0.016448974609375,
0.02777099609375,
0.00348663330078125,
-0.0400390625,
-0.01540374755859375,
-0.0050811767578125,
-0.041412353515625,
-0.046142578125,
-0.0372314453125,
0.0157928466796875,
0.05157470703125,
0.025787353515625,
0.0390625,
-0.021087646484375,
0.06341552734375,
-0.0250396728515625,
0.00922393798828125,
0.0080108642578125,
-0.03857421875,
0.0017251968383789062,
0.005401611328125,
0.04339599609375,
0.006656646728515625,
-0.0489501953125,
0.00034332275390625,
-0.0435791015625,
-0.0841064453125,
0.0343017578125,
0.062103271484375,
0.003864288330078125,
-0.024169921875,
0.048431396484375,
-0.002811431884765625,
-0.01337432861328125,
0.0081024169921875,
0.019378662109375,
-0.005428314208984375,
0.0230712890625,
0.0249481201171875,
-0.0233917236328125,
-0.033355712890625,
0.004344940185546875,
0.0655517578125,
0.02056884765625,
0.0626220703125,
-0.037567138671875,
0.0264434814453125,
0.01934814453125,
0.005908966064453125,
0.0013322830200195312,
0.009735107421875,
0.03558349609375,
-0.0017213821411132812,
-0.00732421875,
-0.01568603515625,
-0.0255584716796875,
0.024871826171875,
0.01050567626953125,
-0.0401611328125,
0.01204681396484375,
0.0123138427734375,
0.006107330322265625,
-0.00798797607421875,
0.0294647216796875,
-0.03265380859375,
-0.038238525390625,
-0.05474853515625,
-0.00969696044921875,
0.00836944580078125,
-0.013824462890625,
-0.0157623291015625,
0.0161590576171875,
0.06787109375,
-0.0124969482421875,
0.01776123046875,
-0.0166778564453125,
0.05267333984375,
0.039581298828125,
0.033935546875,
-0.02490234375,
-0.001720428466796875,
-0.020751953125,
0.030029296875,
-0.012939453125,
0.051971435546875,
0.0018596649169921875,
-0.0290679931640625,
0.00555419921875,
0.033782958984375,
0.0301666259765625,
-0.031707763671875,
0.01383209228515625,
0.02593994140625,
-0.01230621337890625,
0.03143310546875,
-0.063720703125,
-0.039825439453125,
-0.061126708984375,
0.023040771484375,
0.040283203125,
-0.0144500732421875,
-0.0201263427734375,
-0.06597900390625,
0.0279998779296875,
0.045135498046875,
-0.0229339599609375,
-0.04461669921875,
0.01200103759765625,
-0.054412841796875,
0.08868408203125,
-0.0296630859375,
-0.0089569091796875,
0.0284576416015625,
0.08453369140625,
-0.010345458984375,
0.01354217529296875,
0.0190582275390625,
-0.02197265625,
0.0228118896484375,
0.04095458984375,
0.06805419921875,
-0.0265655517578125,
-0.0162506103515625,
0.0341796875,
0.01105499267578125,
0.073486328125,
-0.032379150390625,
-0.0258026123046875,
-0.0022182464599609375,
-0.004924774169921875,
-0.01346588134765625,
-0.03558349609375,
0.03997802734375,
-0.051910400390625,
-0.027618408203125,
-0.04949951171875,
0.027496337890625,
0.04425048828125,
-0.0343017578125,
-0.06927490234375,
0.007587432861328125,
-0.012359619140625,
-0.0287017822265625,
-0.06988525390625,
-0.01751708984375,
0.00484466552734375,
0.026153564453125,
-0.01372528076171875,
-0.03948974609375,
-0.04779052734375,
0.0587158203125,
0.007122039794921875,
0.0208282470703125,
-0.00177001953125,
0.004039764404296875,
-0.0528564453125,
0.0188140869140625,
0.005504608154296875,
0.0057220458984375,
0.03387451171875,
-0.046539306640625,
0.05010986328125,
0.030364990234375,
-0.04498291015625,
-0.047088623046875,
0.007068634033203125,
0.00847625732421875,
-0.00015306472778320312,
-0.08197021484375,
-0.0295867919921875,
-0.057586669921875,
0.0662841796875,
-0.0323486328125,
0.00907135009765625,
0.01158905029296875,
-0.00800323486328125,
-0.0010747909545898438,
-0.0278778076171875,
-0.002292633056640625,
0.0088958740234375,
-0.035369873046875,
0.0056610107421875,
-0.014434814453125,
-0.0116119384765625,
-0.016571044921875,
0.015960693359375,
-0.01959228515625,
0.00800323486328125,
0.0345458984375,
-0.01160430908203125,
-0.0177764892578125,
-0.0160980224609375,
0.05792236328125,
-0.0406494140625,
-0.0035800933837890625,
0.0181884765625,
-0.0001308917999267578,
0.0211181640625,
0.03564453125,
-0.00864410400390625,
-0.05059814453125,
0.00659942626953125,
0.0255279541015625,
-0.01457977294921875,
0.042083740234375,
-0.0132293701171875,
-0.035491943359375,
0.007488250732421875,
0.0159912109375,
-0.029815673828125,
0.004810333251953125,
0.016998291015625,
0.052825927734375,
-0.02081298828125,
0.0706787109375,
-0.00978851318359375,
0.0212554931640625,
-0.0234832763671875,
0.025146484375,
-0.0185546875,
0.01226043701171875,
0.00516510009765625,
-0.01149749755859375,
0.00579833984375,
0.0122528076171875,
-0.038604736328125,
-0.0052642822265625,
-0.0291290283203125,
0.035919189453125,
-0.0168914794921875,
-0.0073394775390625
] |
2536e7f8269b44dfbbfade16871b36f596284849 | Wordpress Stackexchange
Q: Change default URL path (/blog/) of blog posts I've tried to research prior questions on this topic but I believe that there was a better solution within the WordPress admin. How does one change the default URL path for blog posts?
It was previously */blog/title-of-post (but now the /blog/ part is gone).
A: You can create any structure you want for this on the permalinks settings page in the dashboard.
To set it to your example of /blog/title-of-post
Simply navigate to Settings -> Permalink.
Select the "Custom Structure" radio button and enter blog/%postname%/ into the text field there, then hit the save changes button.
| Q: Change default URL path (/blog/) of blog posts I've tried to research prior questions on this topic but I believe that there was a better solution within the WordPress admin. How does one change the default URL path for blog posts?
It was previously */blog/title-of-post (but now the /blog/ part is gone).
A: You can create any structure you want for this on the permalinks settings page in the dashboard.
To set it to your example of /blog/title-of-post
Simply navigate to Settings -> Permalink.
Select the "Custom Structure" radio button and enter blog/%postname%/ into the text field there, then hit the save changes button.
| wordpress | {
"language": "en",
"length": 105,
"provenance": "stackexchange_00019.jsonl.gz:472306",
"question_score": "9",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/253538"
} | [
0.02569580078125,
-0.04022216796875,
0.05145263671875,
0.032073974609375,
-0.05548095703125,
-0.006561279296875,
0.0550537109375,
-0.04498291015625,
-0.013397216796875,
0.0002658367156982422,
-0.01270294189453125,
0.01235198974609375,
-0.0299224853515625,
-0.04107666015625,
0.026214599609375,
-0.0396728515625,
0.038330078125,
-0.00021088123321533203,
0.03369140625,
-0.0160369873046875,
0.026611328125,
-0.00243377685546875,
0.046295166015625,
0.057159423828125,
0.01074981689453125,
0.0236358642578125,
0.0545654296875,
-0.051300048828125,
-0.01009368896484375,
-0.048980712890625,
0.021026611328125,
0.0165863037109375,
0.01531219482421875,
-0.0043182373046875,
0.00354766845703125,
-0.0274810791015625,
0.0037841796875,
0.01050567626953125,
-0.007129669189453125,
0.0209197998046875,
0.0130615234375,
-0.01148223876953125,
0.00463104248046875,
0.02520751953125,
0.0034313201904296875,
-0.054840087890625,
0.0291900634765625,
-0.05078125,
0.0185394287109375,
-0.0024127960205078125,
-0.015838623046875,
0.04730224609375,
-0.0067138671875,
-0.007595062255859375,
-0.026031494140625,
-0.05670166015625,
0.06475830078125,
-0.040374755859375,
0.037017822265625,
-0.060791015625,
-0.035247802734375,
0.007091522216796875,
0.0350341796875,
0.04296875,
-0.001834869384765625,
-0.01352691650390625,
0.033355712890625,
0.0540771484375,
-0.04449462890625,
-0.01458740234375,
0.0231475830078125,
-0.01702880859375,
-0.020477294921875,
-0.053375244140625,
-0.016845703125,
0.048980712890625,
-0.01520538330078125,
-0.034393310546875,
0.007358551025390625,
0.01284027099609375,
0.0252838134765625,
-0.0328369140625,
0.041473388671875,
-0.0546875,
0.031829833984375,
-0.04364013671875,
-0.0009584426879882812,
-0.0009188652038574219,
-0.03558349609375,
-0.03167724609375,
-0.0267486572265625,
0.0046539306640625,
-0.05316162109375,
0.00310516357421875,
-0.0236053466796875,
0.00989532470703125,
0.0012655258178710938,
-0.0005278587341308594,
-0.01419830322265625,
0.0008935928344726562,
-0.0189361572265625,
-0.0029659271240234375,
-0.003002166748046875,
-0.0191802978515625,
-0.005245208740234375,
0.0288543701171875,
0.01416778564453125,
0.035003662109375,
0.031097412109375,
0.019866943359375,
-0.01861572265625,
0.01010894775390625,
-0.017547607421875,
0.01409149169921875,
-0.038360595703125,
0.009063720703125,
-0.052764892578125,
-0.004852294921875,
-0.030242919921875,
0.0340576171875,
0.00920867919921875,
0.0240020751953125,
-0.006053924560546875,
0.0036182403564453125,
0.0010976791381835938,
-0.01439666748046875,
-0.0220489501953125,
-0.00885772705078125,
-0.055908203125,
0.031494140625,
-0.0085601806640625,
0.014984130859375,
0.07464599609375,
0.056915283203125,
0.008819580078125,
-0.03167724609375,
0.0038471221923828125,
-0.017852783203125,
-0.0211029052734375,
0.006744384765625,
-0.003688812255859375,
-0.0399169921875,
-0.00873565673828125,
-0.01361083984375,
0.034515380859375,
0.040557861328125,
0.028961181640625,
0.016510009765625,
0.0015783309936523438,
-0.01355743408203125,
-0.040069580078125,
0.03997802734375,
0.025390625,
0.0166168212890625,
0.0146026611328125,
-0.041900634765625,
0.045806884765625,
-0.046356201171875,
0.0343017578125,
-0.032806396484375,
0.025787353515625,
0.0242156982421875,
0.03387451171875,
-0.00446319580078125,
-0.0249786376953125,
-0.037261962890625,
-0.0411376953125,
-0.0128173828125,
0.016204833984375,
-0.0113067626953125,
-0.003971099853515625,
0.018218994140625,
-0.024444580078125,
-0.00337982177734375,
0.02056884765625,
-0.005001068115234375,
-0.0202178955078125,
-0.0143280029296875,
-0.01517486572265625,
0.08099365234375,
0.0278778076171875,
-0.0241546630859375,
-0.0511474609375,
0.03179931640625,
-0.039886474609375,
0.037139892578125,
-0.003940582275390625,
0.042205810546875,
0.00531005859375,
0.0125885009765625,
0.0158843994140625,
0.00934600830078125,
-0.040252685546875,
0.02008056640625,
-0.001888275146484375,
-0.006072998046875,
-0.0109405517578125,
-0.0022106170654296875,
-0.01207733154296875,
-0.01299285888671875,
-0.00971221923828125,
0.02630615234375,
-0.022216796875,
0.072265625,
0.04559326171875,
0.002437591552734375,
0.00024628639221191406,
0.006191253662109375,
0.0283660888671875,
0.0150146484375,
-0.004833221435546875,
-0.00716400146484375,
0.02130126953125,
-0.10833740234375,
-0.047119140625,
0.046051025390625,
0.0165863037109375,
-0.02105712890625,
-0.0231475830078125,
-0.0198822021484375,
-0.02227783203125,
0.004093170166015625,
-0.051116943359375,
0.04718017578125,
0.06317138671875,
-0.039825439453125,
-0.0153961181640625,
-0.05120849609375,
0.0030670166015625,
-0.0038204193115234375,
-0.09967041015625,
0.06451416015625,
-0.0014019012451171875,
-0.009063720703125,
-0.022552490234375,
0.0011415481567382812,
0.024078369140625,
-0.0225677490234375,
0.0239105224609375,
0.04461669921875,
0.0162811279296875,
0.01174163818359375,
-0.0105438232421875,
0.03216552734375,
0.01459503173828125,
-0.0111541748046875,
0.0172576904296875,
0.01490020751953125,
0.009368896484375,
0.042449951171875,
-0.0220947265625,
-0.0016298294067382812,
0.0272369384765625,
-0.0306549072265625,
-0.0018186569213867188,
0.048004150390625,
0.01092529296875,
-0.0321044921875,
0.0045928955078125,
-0.00525665283203125,
0.0307464599609375,
0.0196533203125,
-0.061248779296875,
0.0311126708984375,
0.017486572265625,
0.03662109375,
0.045318603515625,
0.058624267578125,
-0.0235443115234375,
0.01580810546875,
-0.0143280029296875,
0.00830841064453125,
-0.0002257823944091797,
0.053497314453125,
0.0487060546875,
-0.003978729248046875,
-0.009857177734375,
-0.024261474609375,
-0.01071929931640625,
0.033905029296875,
-0.0111541748046875,
0.0303802490234375,
-0.0243072509765625,
-0.015716552734375,
-0.01120758056640625,
-0.054168701171875,
-0.00893402099609375,
0.0089874267578125,
0.01465606689453125,
-0.0171356201171875,
0.0284423828125,
-0.01953125,
-0.0183868408203125,
0.0179290771484375,
0.000263214111328125,
-0.05230712890625,
0.004795074462890625,
-0.068359375,
0.04742431640625,
-0.053314208984375,
0.0555419921875,
0.0689697265625,
-0.00986480712890625,
0.020050048828125,
0.01309967041015625,
0.0433349609375,
0.030364990234375,
0.0155181884765625,
-0.0018711090087890625,
0.0224609375,
-0.0596923828125,
-0.034027099609375,
0.00763702392578125,
0.007965087890625,
-0.0239410400390625,
-0.029510498046875,
-0.01141357421875,
-0.01473236083984375,
-0.0738525390625,
-0.057281494140625,
-0.01236724853515625,
-0.059967041015625,
0.0003292560577392578,
-0.0154876708984375,
-0.02801513671875,
-0.0019311904907226562,
0.01384735107421875,
0.0135650634765625,
0.029998779296875,
-0.0211029052734375,
-0.08721923828125,
-0.050048828125,
-0.0972900390625,
-0.0268707275390625,
-0.0202789306640625,
0.002849578857421875,
0.0165557861328125,
0.01194000244140625,
-0.00005716085433959961,
-0.03997802734375,
0.0158233642578125,
0.02325439453125,
-0.00980377197265625,
-0.003627777099609375,
0.0142059326171875,
-0.0281524658203125,
-0.0059661865234375,
-0.01213836669921875,
0.0767822265625,
0.052032470703125,
-0.045745849609375,
0.0279388427734375,
-0.03924560546875,
-0.0158843994140625,
-0.00424957275390625,
-0.0173187255859375,
0.034088134765625,
-0.0180206298828125,
-0.015655517578125,
-0.052947998046875,
-0.04132080078125,
-0.007335662841796875,
-0.06378173828125,
0.004486083984375,
0.0269012451171875,
0.00830078125,
-0.0191192626953125,
0.029266357421875,
-0.00994110107421875,
-0.0025463104248046875,
0.0224151611328125,
-0.022796630859375,
0.023895263671875,
-0.01340484619140625,
0.003261566162109375,
-0.012237548828125,
0.057403564453125,
-0.009918212890625,
-0.023406982421875,
0.013092041015625,
0.01070404052734375,
0.00881195068359375,
-0.0186309814453125,
-0.03668212890625,
-0.0292510986328125,
0.0187530517578125,
-0.094482421875,
0.01078033447265625,
-0.02593994140625,
0.001312255859375,
-0.01282501220703125,
0.05975341796875,
-0.03436279296875,
-0.00611114501953125,
0.006282806396484375,
0.0052490234375,
-0.0303192138671875,
-0.035003662109375,
-0.06207275390625,
-0.00510406494140625,
-0.056304931640625,
0.0069580078125,
-0.01088714599609375,
-0.01959228515625,
-0.01381683349609375,
0.0178070068359375,
-0.01351165771484375,
-0.0302581787109375,
0.0321044921875,
-0.007656097412109375,
0.0060577392578125,
0.015228271484375,
0.00027823448181152344,
0.0160980224609375,
-0.03399658203125,
-0.0034275054931640625,
-0.050567626953125,
-0.031768798828125,
0.0186004638671875,
0.039642333984375,
0.0024204254150390625,
-0.0426025390625,
0.004573822021484375,
0.05706787109375,
-0.0038166046142578125,
0.0097808837890625,
0.00359344482421875,
-0.0034770965576171875,
-0.0101776123046875,
0.0030002593994140625,
-0.0116119384765625,
-0.0283050537109375,
0.005130767822265625,
-0.018707275390625,
-0.07537841796875,
-0.002498626708984375,
0.0189056396484375,
0.044281005859375,
0.0509033203125,
-0.03460693359375,
-0.07696533203125,
-0.032623291015625,
-0.0014333724975585938,
0.031219482421875,
-0.0040740966796875,
0.000896453857421875,
-0.045745849609375,
-0.08709716796875,
0.07171630859375,
-0.00543212890625,
0.01470184326171875,
-0.0187225341796875,
0.07244873046875,
-0.000041484832763671875,
-0.0187530517578125,
-0.0112457275390625,
0.0276336669921875,
0.039154052734375,
0.0178985595703125,
0.044036865234375,
0.00942230224609375,
0.01219940185546875,
0.0205230712890625,
-0.01434326171875,
-0.01340484619140625,
0.00939178466796875,
0.024749755859375,
-0.01065826416015625,
-0.0207977294921875,
0.0142059326171875,
-0.0224151611328125,
0.01531219482421875,
0.0201263427734375,
0.0005817413330078125,
0.0065765380859375,
-0.0180206298828125,
0.01282501220703125,
-0.0115203857421875,
0.005748748779296875,
-0.0245208740234375,
-0.031219482421875,
0.03607177734375,
0.01629638671875,
-0.0172576904296875,
-0.006439208984375,
0.001407623291015625,
-0.00400543212890625,
-0.031982421875,
-0.0077362060546875,
0.0179595947265625,
-0.004009246826171875,
0.041839599609375,
0.0185546875,
0.0030345916748046875,
-0.0013647079467773438,
-0.005725860595703125,
-0.01145172119140625,
0.0538330078125,
0.0169525146484375,
-0.0162353515625,
0.00894927978515625,
-0.01128387451171875,
0.042266845703125,
0.01470184326171875,
-0.01456451416015625,
0.04937744140625,
0.026031494140625,
-0.01120758056640625,
-0.0138397216796875,
-0.052398681640625,
0.004650115966796875,
-0.05657958984375,
0.07122802734375,
0.0330810546875,
0.00855255126953125,
0.03265380859375,
0.055023193359375,
0.02423095703125,
0.0296630859375,
-0.035736083984375,
-0.0008568763732910156,
0.0118255615234375,
0.0213623046875,
0.00118255615234375,
0.0330810546875,
-0.0289154052734375,
0.01654052734375,
0.02947998046875,
-0.0247802734375,
-0.00669097900390625,
-0.00020503997802734375,
0.0307464599609375,
-0.010345458984375,
-0.0226287841796875,
0.023223876953125,
-0.03778076171875,
0.0084686279296875,
-0.0011920928955078125,
-0.0235595703125,
-0.04046630859375,
0.00537872314453125,
-0.00476837158203125,
0.01324462890625,
-0.03863525390625,
-0.0160369873046875,
0.006038665771484375,
-0.038421630859375,
0.0269317626953125,
-0.02032470703125,
0.01300811767578125,
-0.002536773681640625,
-0.0227203369140625,
0.01038360595703125,
-0.003040313720703125,
-0.0006165504455566406,
0.0027713775634765625,
-0.00858306884765625,
-0.0186614990234375,
-0.0126495361328125,
0.045257568359375,
-0.0113983154296875,
0.060302734375,
-0.035491943359375,
-0.038543701171875,
0.030181884765625,
0.00803375244140625,
0.0360107421875,
0.004974365234375,
-0.065673828125,
0.00826263427734375,
-0.046661376953125,
-0.0113525390625,
-0.020111083984375,
-0.0009198188781738281,
-0.05743408203125,
-0.01076507568359375,
0.0297393798828125,
0.009521484375,
0.02069091796875,
0.00720977783203125,
-0.0087890625,
0.030487060546875,
0.01349639892578125,
0.02838134765625,
-0.005397796630859375,
0.053436279296875,
-0.0035037994384765625,
0.0289154052734375,
0.00444793701171875,
0.016510009765625,
-0.0372314453125,
-0.025421142578125,
0.01062774658203125,
-0.02593994140625,
-0.0302581787109375,
-0.0036525726318359375,
-0.02850341796875,
0.031646728515625,
0.06402587890625,
-0.0012083053588867188,
0.00981903076171875,
0.006755828857421875,
0.0079345703125,
-0.019317626953125,
-0.01415252685546875,
-0.01396942138671875,
0.0258941650390625,
-0.024993896484375,
0.05126953125,
0.08673095703125,
-0.044921875,
-0.00788116455078125,
-0.045074462890625,
0.007015228271484375,
-0.0199737548828125,
0.00011605024337768555,
-0.06707763671875,
0.046234130859375,
0.0811767578125,
0.005168914794921875,
0.04327392578125,
0.0252838134765625,
0.01078033447265625,
0.0176239013671875,
0.0004930496215820312,
-0.00572967529296875,
-0.0123748779296875,
0.0295257568359375,
-0.0009641647338867188,
0.010345458984375,
0.031829833984375,
-0.0159454345703125,
0.025909423828125,
0.0390625,
0.04779052734375,
-0.09051513671875,
0.0322265625,
0.00672149658203125,
0.0217437744140625,
0.085205078125,
0.0121307373046875,
-0.01617431640625,
0.01297760009765625,
-0.01953125,
-0.035064697265625,
-0.033538818359375,
-0.01074981689453125,
0.012542724609375,
-0.006237030029296875,
0.0037403106689453125,
0.0303192138671875,
0.00432586669921875,
-0.04669189453125,
-0.03411865234375,
0.04425048828125,
-0.03619384765625,
-0.029510498046875,
-0.01290130615234375,
0.0299530029296875,
-0.005840301513671875,
-0.05755615234375,
0.03814697265625,
-0.0362548828125,
0.006526947021484375,
-0.01068878173828125,
-0.01303863525390625,
0.0220947265625,
0.036163330078125,
-0.027801513671875,
0.01641845703125,
0.00482177734375,
-0.009918212890625,
0.035491943359375,
0.007068634033203125,
0.01020050048828125,
0.011322021484375,
-0.0148773193359375,
0.00450897216796875,
-0.028411865234375,
-0.006465911865234375,
-0.008331298828125,
-0.034027099609375,
0.08343505859375,
-0.032989501953125,
-0.022857666015625,
0.0176849365234375,
-0.02587890625,
-0.0020580291748046875,
-0.01134490966796875,
-0.033294677734375,
-0.01983642578125,
0.040924072265625,
-0.046539306640625,
0.00026917457580566406,
0.0117950439453125,
-0.06463623046875,
-0.05181884765625,
0.08929443359375,
-0.0159912109375,
0.040313720703125,
0.009490966796875,
0.0264892578125,
0.003040313720703125,
0.0270843505859375,
-0.01190948486328125,
0.042694091796875,
-0.0004451274871826172,
0.01277923583984375,
-0.004154205322265625,
-0.0023250579833984375,
0.007358551025390625,
0.038299560546875,
0.03631591796875,
0.01470947265625,
-0.0269927978515625,
-0.046112060546875,
-0.0025882720947265625,
0.045989990234375,
0.005527496337890625,
0.015655517578125,
-0.0201873779296875,
0.033355712890625,
0.01142120361328125,
-0.0297088623046875,
0.00595855712890625,
0.0095672607421875,
-0.05511474609375,
0.01296234130859375,
0.032501220703125,
0.035858154296875,
0.034637451171875,
-0.02691650390625,
-0.006801605224609375,
0.01145172119140625,
0.02838134765625,
-0.043914794921875,
0.00360870361328125,
0.04779052734375,
0.07135009765625,
-0.04962158203125,
-0.01934814453125,
-0.0233306884765625,
0.06689453125,
0.0120086669921875,
-0.00841522216796875,
0.0203094482421875,
0.0101776123046875,
0.004230499267578125,
-0.04046630859375,
-0.0135040283203125,
0.0110931396484375,
-0.01477813720703125,
0.06121826171875,
0.043212890625,
0.01873779296875,
-0.0216522216796875,
0.02886962890625,
0.046112060546875,
0.06561279296875,
-0.0699462890625,
0.0240478515625,
0.01090240478515625,
-0.003173828125,
-0.013458251953125,
-0.075927734375,
-0.031036376953125,
-0.0204620361328125,
-0.0280914306640625,
-0.021697998046875,
-0.00022411346435546875,
0.028350830078125,
0.010772705078125,
-0.01131439208984375,
-0.041839599609375,
-0.0059814453125,
0.028900146484375,
-0.0006384849548339844,
-0.0181427001953125,
-0.00920867919921875,
0.0330810546875,
0.020965576171875,
0.002471923828125,
-0.04119873046875,
-0.00588226318359375,
0.02056884765625,
0.0458984375,
0.007015228271484375,
-0.0255889892578125,
-0.0262603759765625,
-0.05975341796875,
0.0203857421875,
0.03179931640625,
0.049560546875,
0.056640625,
0.0635986328125,
-0.0007085800170898438,
-0.017120361328125,
0.01441192626953125,
-0.005275726318359375,
-0.026611328125,
0.058349609375,
-0.044189453125,
0.03472900390625,
-0.0255889892578125,
-0.0218505859375,
-0.031890869140625,
0.0173492431640625,
0.0195465087890625,
-0.0217437744140625,
0.046844482421875,
0.01125335693359375,
-0.007965087890625,
0.033721923828125,
-0.00391387939453125,
0.04095458984375,
0.005329132080078125,
-0.03814697265625,
0.0003306865692138672,
-0.01197052001953125,
-0.0882568359375,
0.0421142578125,
0.047210693359375,
-0.005702972412109375,
-0.0246429443359375,
-0.01024627685546875,
0.03643798828125,
0.007663726806640625,
-0.043914794921875,
0.0029239654541015625,
0.0313720703125,
0.0148162841796875,
0.0272216796875,
-0.07177734375,
-0.051361083984375,
-0.0596923828125,
0.03466796875,
0.0301666259765625,
0.08477783203125,
-0.0156707763671875,
0.04144287109375,
-0.025146484375,
0.018646240234375,
-0.0413818359375,
-0.00214385986328125,
-0.019744873046875,
-0.0209503173828125,
0.0029926300048828125,
0.01220703125,
-0.0307769775390625,
0.035858154296875,
0.0269622802734375,
-0.018707275390625,
0.048187255859375,
-0.050262451171875,
0.0036525726318359375,
-0.042999267578125,
0.0265045166015625,
-0.03155517578125,
-0.069091796875,
-0.051055908203125,
0.00859832763671875,
0.00290679931640625,
0.0157470703125,
-0.03826904296875,
0.0635986328125,
-0.016387939453125,
0.0043487548828125,
0.01519775390625,
-0.05035400390625,
0.0238037109375,
0.04833984375,
-0.02593994140625,
-0.028717041015625,
0.0249786376953125,
-0.01763916015625,
0.031158447265625,
0.00591278076171875,
0.032928466796875,
0.033203125,
-0.0249176025390625,
-0.040496826171875,
-0.042144775390625,
0.018157958984375,
-0.00980377197265625,
0.0190887451171875,
-0.043853759765625,
0.02490234375,
-0.0055389404296875,
0.0216827392578125,
-0.0024738311767578125,
-0.002696990966796875,
-0.019805908203125,
-0.0011911392211914062,
-0.01018524169921875,
-0.01500701904296875,
0.0078125,
-0.0080718994140625,
0.022064208984375,
-0.01245880126953125,
-0.01012420654296875,
0.0184478759765625,
-0.039093017578125,
0.00928497314453125,
-0.027587890625,
-0.0208892822265625,
0.0203399658203125,
0.039764404296875,
-0.03472900390625,
-0.00531005859375,
-0.030426025390625,
-0.026824951171875,
-0.046112060546875,
0.03289794921875,
0.046722412109375,
-0.0108795166015625,
0.0017309188842773438,
0.0097808837890625,
0.006786346435546875,
0.07568359375,
-0.0384521484375,
-0.0231170654296875,
0.0160980224609375,
0.0036907196044921875,
-0.0203704833984375,
-0.091552734375,
-0.0038604736328125,
-0.061798095703125,
-0.004486083984375,
-0.00565338134765625,
-0.020233154296875,
0.0026111602783203125,
-0.033294677734375,
-0.05023193359375,
0.04779052734375,
-0.0096282958984375,
-0.02764892578125,
-0.0283050537109375,
0.00955963134765625,
-0.0201416015625,
0.0309906005859375,
0.0025119781494140625,
-0.01207733154296875,
-0.00725555419921875,
0.012786865234375,
0.018951416015625,
0.0791015625,
-0.01120758056640625,
0.031402587890625,
0.033416748046875,
0.05120849609375,
0.0271453857421875,
0.005832672119140625,
0.06048583984375,
-0.03277587890625,
0.03399658203125,
0.05322265625,
-0.056365966796875,
0.00952911376953125,
-0.03875732421875,
-0.01322174072265625,
-0.0167236328125,
-0.035400390625,
-0.009796142578125,
-0.003509521484375,
0.054595947265625,
0.049163818359375,
0.008514404296875,
-0.036041259765625,
-0.00965118408203125,
-0.049957275390625,
-0.03558349609375,
-0.0250701904296875,
0.0198211669921875,
-0.047943115234375,
0.015380859375,
0.0174407958984375,
-0.01300048828125,
-0.04827880859375,
-0.0148468017578125,
-0.043548583984375,
-0.01148223876953125,
-0.00826263427734375,
0.00809478759765625,
-0.005321502685546875,
-0.00887298583984375,
0.05828857421875,
-0.012664794921875,
0.043609619140625,
-0.006855010986328125,
0.0257568359375,
0.052093505859375,
-0.0013608932495117188,
-0.0124664306640625,
0.0117034912109375,
0.0037975311279296875,
0.019134521484375,
0.0290374755859375,
0.00568389892578125,
-0.0146331787109375,
-0.002513885498046875,
-0.0080718994140625,
0.0233154296875,
-0.00841522216796875,
0.0175628662109375,
0.04290771484375,
0.008575439453125,
-0.00513458251953125,
0.044342041015625,
0.0019683837890625,
0.003387451171875,
0.007228851318359375,
0.03826904296875,
-0.0615234375,
0.0005130767822265625,
-0.03143310546875,
-0.03338623046875,
-0.01495361328125,
0.02001953125,
-0.0163421630859375,
-0.044189453125,
0.021881103515625,
-0.0051422119140625,
0.00785064697265625,
0.014251708984375
] |
0ad99af21dba3a77484f718f1600fc3c692f18de | Wordpress Stackexchange
Q: Wordpress so slow to load on MAMP My sites are so slow running on my local machine, with MAMP on Mac.
Any ideas of how to determine where the slow down is?
It's slower than making changes on my host!
Paul
A: Go to wp-config.php, find the line below:
define('DB_HOST', 'localhost:8889');
And change it to:
define('DB_HOST', '127.0.0.1:8889');
Works like a charm!
| Q: Wordpress so slow to load on MAMP My sites are so slow running on my local machine, with MAMP on Mac.
Any ideas of how to determine where the slow down is?
It's slower than making changes on my host!
Paul
A: Go to wp-config.php, find the line below:
define('DB_HOST', 'localhost:8889');
And change it to:
define('DB_HOST', '127.0.0.1:8889');
Works like a charm!
A: If it's a Database problem you need to change it at wp-config.php.
You can choose :
define( 'DB_HOST', '127.0.0.1:3306' );
(notice 3306 is your port number for DB make sure to change it as needed, but 3306 is a default for major softwares you also better change MAMP port to this, I've seen doing that making it faster too.)
or even better drop the TCP/IP completely.
define( 'DB_HOST', 'localhost:/Applications/MAMP/tmp/mysql/mysql.sock' );
Needless to say this option is more performant.
| wordpress | {
"language": "en",
"length": 141,
"provenance": "stackexchange_00019.jsonl.gz:472360",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/253735"
} | [
-0.007373809814453125,
-0.0020542144775390625,
-0.007640838623046875,
0.023956298828125,
-0.0123138427734375,
-0.03485107421875,
0.044647216796875,
-0.0161895751953125,
0.029266357421875,
-0.00626373291015625,
-0.0257110595703125,
-0.0092010498046875,
0.023681640625,
-0.042083740234375,
0.01708984375,
-0.018524169921875,
0.021392822265625,
0.007740020751953125,
0.012908935546875,
-0.0245513916015625,
-0.01007080078125,
0.006805419921875,
0.0015354156494140625,
0.0543212890625,
0.01061248779296875,
-0.026519775390625,
0.04376220703125,
0.022979736328125,
0.01102447509765625,
0.00852203369140625,
0.029937744140625,
-0.0267486572265625,
-0.006862640380859375,
0.0308685302734375,
-0.02001953125,
-0.03558349609375,
-0.01457977294921875,
0.01354217529296875,
0.0023975372314453125,
0.00948333740234375,
0.0246124267578125,
-0.01335906982421875,
0.021697998046875,
0.03057861328125,
-0.022918701171875,
-0.0213623046875,
0.032928466796875,
-0.027374267578125,
0.0081634521484375,
-0.06060791015625,
0.018951416015625,
0.035858154296875,
0.0400390625,
-0.0226287841796875,
-0.005039215087890625,
0.043121337890625,
0.0171661376953125,
0.060638427734375,
0.028594970703125,
-0.060089111328125,
-0.056640625,
0.0416259765625,
0.021759033203125,
0.00746917724609375,
-0.044464111328125,
-0.00695037841796875,
0.016693115234375,
0.015777587890625,
-0.006298065185546875,
-0.044219970703125,
0.0091552734375,
0.00548553466796875,
-0.003692626953125,
-0.027252197265625,
-0.028778076171875,
-0.006870269775390625,
0.0421142578125,
-0.02227783203125,
0.00292205810546875,
-0.0026264190673828125,
-0.032745361328125,
-0.06463623046875,
-0.04522705078125,
-0.0263519287109375,
0.0251617431640625,
0.0151214599609375,
-0.00926971435546875,
-0.0004315376281738281,
-0.0191650390625,
-0.0202789306640625,
-0.0274505615234375,
-0.038787841796875,
0.007354736328125,
0.0018911361694335938,
-0.03778076171875,
-0.0064849853515625,
-0.0242462158203125,
-0.032196044921875,
-0.005157470703125,
-0.0301971435546875,
0.0186004638671875,
-0.01526641845703125,
-0.02545166015625,
0.016448974609375,
0.00746917724609375,
0.015777587890625,
-0.027069091796875,
0.0275115966796875,
0.056396484375,
0.041412353515625,
0.0022487640380859375,
0.029144287109375,
-0.019378662109375,
0.022064208984375,
-0.0650634765625,
0.0003066062927246094,
-0.03741455078125,
-0.01247406005859375,
-0.026336669921875,
0.017425537109375,
-0.0171051025390625,
0.006378173828125,
-0.021636962890625,
0.050506591796875,
-0.00923919677734375,
-0.001773834228515625,
0.0135650634765625,
-0.01387786865234375,
-0.055023193359375,
0.032745361328125,
0.0018768310546875,
-0.0065155029296875,
-0.0108489990234375,
0.0411376953125,
-0.0150299072265625,
-0.0198516845703125,
0.034698486328125,
-0.032684326171875,
-0.022552490234375,
0.06268310546875,
-0.05596923828125,
-0.0684814453125,
-0.024444580078125,
-0.032501220703125,
0.033172607421875,
-0.014373779296875,
-0.0013380050659179688,
0.035491943359375,
0.0019073486328125,
0.0094757080078125,
0.04315185546875,
-0.0164337158203125,
0.007678985595703125,
0.0279998779296875,
0.0657958984375,
0.01248931884765625,
0.07159423828125,
-0.024658203125,
-0.02947998046875,
-0.0036525726318359375,
0.01081085205078125,
0.0223236083984375,
0.0191802978515625,
-0.032562255859375,
-0.022308349609375,
-0.03814697265625,
-0.046173095703125,
0.01352691650390625,
0.0281982421875,
-0.0521240234375,
0.042755126953125,
-0.00809478759765625,
0.048004150390625,
0.01123809814453125,
0.01580810546875,
0.02947998046875,
0.0141143798828125,
0.0207366943359375,
0.026123046875,
-0.004108428955078125,
-0.0112762451171875,
-0.0219268798828125,
0.0703125,
-0.01434326171875,
-0.02587890625,
0.0286102294921875,
0.0090179443359375,
0.060150146484375,
-0.0016756057739257812,
0.01546478271484375,
-0.0158538818359375,
0.01511383056640625,
-0.05224609375,
0.0433349609375,
-0.001590728759765625,
-0.034027099609375,
-0.003429412841796875,
0.004863739013671875,
-0.0016698837280273438,
-0.037017822265625,
0.03802490234375,
-0.02203369140625,
0.002162933349609375,
-0.03143310546875,
-0.0985107421875,
-0.0258941650390625,
-0.035614013671875,
0.0208740234375,
0.08563232421875,
0.01120758056640625,
-0.0296173095703125,
0.0279693603515625,
0.0004096031188964844,
-0.057098388671875,
-0.088623046875,
0.0352783203125,
-0.065673828125,
0.00687408447265625,
-0.01392364501953125,
0.024749755859375,
-0.0279388427734375,
-0.0185699462890625,
-0.017181396484375,
-0.01788330078125,
-0.022125244140625,
0.0604248046875,
-0.058349609375,
0.033355712890625,
-0.0447998046875,
0.03802490234375,
-0.0152740478515625,
0.0244903564453125,
0.01500701904296875,
-0.0063018798828125,
-0.0228118896484375,
0.01537322998046875,
-0.01534271240234375,
-0.0714111328125,
-0.01276397705078125,
0.054229736328125,
0.0272979736328125,
0.01326751708984375,
-0.004482269287109375,
0.004276275634765625,
0.0290069580078125,
-0.048553466796875,
0.00611114501953125,
0.01444244384765625,
-0.007686614990234375,
-0.043792724609375,
-0.033721923828125,
-0.0276947021484375,
0.06695556640625,
-0.049591064453125,
0.0189971923828125,
0.054473876953125,
-0.01094818115234375,
-0.0031185150146484375,
-0.0107879638671875,
0.002223968505859375,
0.0027790069580078125,
0.0166015625,
-0.0140533447265625,
0.01395416259765625,
-0.0249176025390625,
0.021697998046875,
0.034454345703125,
0.0306396484375,
-0.003520965576171875,
-0.006023406982421875,
0.01190948486328125,
-0.031280517578125,
0.00885009765625,
-0.01222991943359375,
-0.018768310546875,
-0.027740478515625,
-0.035186767578125,
0.039154052734375,
0.007549285888671875,
-0.045074462890625,
-0.022247314453125,
-0.0247039794921875,
-0.0029850006103515625,
0.006343841552734375,
0.007221221923828125,
-0.051422119140625,
0.03631591796875,
0.034759521484375,
-0.00489044189453125,
0.0161590576171875,
0.0293426513671875,
0.035400390625,
-0.018707275390625,
0.036285400390625,
0.0163726806640625,
-0.01442718505859375,
0.07330322265625,
-0.01271820068359375,
-0.006595611572265625,
0.0158843994140625,
0.0634765625,
0.04888916015625,
-0.004047393798828125,
0.01168060302734375,
0.00760650634765625,
-0.0066070556640625,
0.031829833984375,
-0.02197265625,
-0.03173828125,
0.0255279541015625,
-0.11334228515625,
-0.0297393798828125,
0.0193634033203125,
0.0237579345703125,
-0.0216217041015625,
-0.05364990234375,
-0.01111602783203125,
0.00708770751953125,
-0.1239013671875,
-0.1239013671875,
-0.0243377685546875,
-0.0197296142578125,
-0.027740478515625,
0.01058197021484375,
-0.01031494140625,
0.0092315673828125,
0.014068603515625,
0.0050811767578125,
-0.0008473396301269531,
-0.03839111328125,
-0.058746337890625,
-0.0675048828125,
-0.0748291015625,
-0.01088714599609375,
-0.0008902549743652344,
0.01488494873046875,
0.006031036376953125,
0.097412109375,
0.01071929931640625,
-0.065185546875,
0.004276275634765625,
-0.04473876953125,
-0.0301971435546875,
0.039093017578125,
-0.005596160888671875,
-0.0193939208984375,
0.0130767822265625,
0.006084442138671875,
-0.005939483642578125,
0.005352020263671875,
-0.00861358642578125,
-0.026641845703125,
0.00740814208984375,
0.0251617431640625,
0.0070953369140625,
0.0032482147216796875,
-0.00537109375,
0.005321502685546875,
-0.0233154296875,
-0.050201416015625,
-0.034149169921875,
-0.0106201171875,
-0.06561279296875,
-0.0220184326171875,
0.046966552734375,
-0.00557708740234375,
-0.034027099609375,
-0.0228271484375,
0.0296478271484375,
-0.00644683837890625,
0.01287841796875,
-0.0299072265625,
0.0496826171875,
0.0163421630859375,
0.0186920166015625,
-0.0419921875,
0.0382080078125,
-0.0257110595703125,
0.019927978515625,
0.017730712890625,
-0.005512237548828125,
-0.024932861328125,
0.01251220703125,
-0.060302734375,
-0.006626129150390625,
0.032135009765625,
-0.00913238525390625,
0.033599853515625,
-0.033599853515625,
-0.03125,
-0.0240478515625,
0.0694580078125,
-0.01230621337890625,
-0.00128936767578125,
0.01031494140625,
0.035858154296875,
-0.057769775390625,
-0.043731689453125,
-0.059051513671875,
0.003108978271484375,
0.001155853271484375,
-0.0106201171875,
-0.0183563232421875,
-0.01055908203125,
-0.0016231536865234375,
-0.0243682861328125,
0.0214080810546875,
-0.033477783203125,
0.0274505615234375,
-0.070556640625,
0.006427764892578125,
-0.01995849609375,
0.00264739990234375,
-0.0640869140625,
-0.01009368896484375,
-0.0491943359375,
-0.0894775390625,
-0.011260986328125,
-0.0294342041015625,
0.060089111328125,
-0.0006918907165527344,
0.00960540771484375,
-0.0308990478515625,
0.026885986328125,
-0.033538818359375,
0.02313232421875,
-0.0199432373046875,
0.01554107666015625,
0.0010585784912109375,
0.0279693603515625,
-0.0022754669189453125,
0.006954193115234375,
-0.00562286376953125,
-0.025299072265625,
-0.041168212890625,
-0.0158233642578125,
-0.01311492919921875,
0.039306640625,
0.004802703857421875,
-0.01727294921875,
-0.0194244384765625,
-0.006130218505859375,
-0.0010356903076171875,
0.03485107421875,
-0.05316162109375,
0.036041259765625,
-0.008392333984375,
-0.038055419921875,
0.08685302734375,
-0.0223846435546875,
0.0218048095703125,
-0.0179595947265625,
0.09228515625,
-0.001873016357421875,
-0.027008056640625,
0.012451171875,
-0.0133056640625,
0.0184783935546875,
0.0022907257080078125,
0.042510986328125,
0.01094818115234375,
-0.0088958740234375,
0.050750732421875,
-0.00782012939453125,
0.00885772705078125,
0.019439697265625,
-0.00021708011627197266,
0.0014247894287109375,
-0.03179931640625,
0.0301055908203125,
-0.005420684814453125,
0.0034942626953125,
0.06597900390625,
-0.00039124488830566406,
-0.01470184326171875,
0.0160980224609375,
0.041107177734375,
-0.011322021484375,
-0.05023193359375,
-0.06292724609375,
-0.0489501953125,
0.0185089111328125,
-0.0272369384765625,
0.017669677734375,
0.01511383056640625,
-0.004817962646484375,
0.059295654296875,
0.045562744140625,
-0.005779266357421875,
0.005939483642578125,
0.0165557861328125,
-0.013916015625,
-0.0036983489990234375,
0.060699462890625,
-0.01259613037109375,
-0.0174560546875,
-0.011962890625,
0.0478515625,
-0.0186767578125,
-0.045989990234375,
-0.0159149169921875,
-0.0092620849609375,
0.034027099609375,
0.0330810546875,
-0.0276641845703125,
-0.007434844970703125,
-0.0184783935546875,
-0.00040984153747558594,
0.0297698974609375,
-0.0137481689453125,
-0.04443359375,
-0.009246826171875,
-0.0207977294921875,
-0.050506591796875,
-0.0025653839111328125,
0.022491455078125,
0.0018568038940429688,
-0.052581787109375,
0.0156402587890625,
0.00504302978515625,
0.0211029052734375,
0.0033817291259765625,
0.021942138671875,
-0.00409698486328125,
0.01247406005859375,
0.0010280609130859375,
0.00970458984375,
0.0283660888671875,
0.01078033447265625,
0.001277923583984375,
0.0298919677734375,
-0.0037059783935546875,
-0.01506805419921875,
0.005168914794921875,
0.0108489990234375,
-0.0130462646484375,
-0.0027828216552734375,
0.0270233154296875,
-0.05047607421875,
-0.043487548828125,
-0.0234375,
0.0008473396301269531,
0.051361083984375,
-0.041961669921875,
-0.0038700103759765625,
-0.029205322265625,
-0.0036716461181640625,
0.038818359375,
-0.017242431640625,
-0.01169586181640625,
0.0163421630859375,
0.00669097900390625,
0.0333251953125,
-0.0496826171875,
-0.05224609375,
0.022003173828125,
0.055999755859375,
-0.01259613037109375,
-0.0043792724609375,
0.0166015625,
0.0009212493896484375,
0.01172637939453125,
-0.0445556640625,
0.01543426513671875,
-0.049560546875,
0.01338958740234375,
0.0008063316345214844,
-0.016571044921875,
-0.005645751953125,
-0.033782958984375,
-0.0264434814453125,
-0.040374755859375,
-0.03302001953125,
-0.019287109375,
-0.047576904296875,
0.0194549560546875,
-0.004787445068359375,
-0.012786865234375,
-0.019927978515625,
-0.006488800048828125,
-0.04559326171875,
0.044097900390625,
0.043975830078125,
-0.028533935546875,
-0.030731201171875,
0.04754638671875,
0.01082611083984375,
0.040802001953125,
0.0015811920166015625,
0.0006723403930664062,
-0.03509521484375,
-0.01189422607421875,
0.03680419921875,
-0.03814697265625,
-0.06243896484375,
-0.0258636474609375,
-0.068115234375,
0.002689361572265625,
0.047943115234375,
-0.0299072265625,
0.0008649826049804688,
-0.006687164306640625,
0.00177001953125,
-0.0175933837890625,
0.01715087890625,
0.0261993408203125,
0.059417724609375,
-0.04888916015625,
0.008453369140625,
0.0191650390625,
-0.002849578857421875,
-0.01214599609375,
0.01023101806640625,
0.0020046234130859375,
-0.0016727447509765625,
-0.006557464599609375,
0.0006570816040039062,
0.01224517822265625,
0.035003662109375,
0.0221710205078125,
0.053192138671875,
0.030548095703125,
0.027008056640625,
0.0095062255859375,
0.014801025390625,
0.00537872314453125,
-0.0361328125,
0.028656005859375,
-0.00400543212890625,
-0.028533935546875,
-0.006626129150390625,
-0.032379150390625,
0.0213775634765625,
0.007282257080078125,
0.040618896484375,
-0.0218048095703125,
0.0184783935546875,
-0.0017299652099609375,
-0.03399658203125,
0.0014753341674804688,
-0.0279083251953125,
-0.023956298828125,
-0.07122802734375,
0.049041748046875,
0.031494140625,
-0.0052642822265625,
0.01140594482421875,
0.005962371826171875,
0.0025119781494140625,
-0.0243072509765625,
0.06640625,
0.0230712890625,
-0.029998779296875,
-0.001834869384765625,
0.01224517822265625,
0.00360107421875,
-0.017669677734375,
0.0035800933837890625,
-0.0031528472900390625,
-0.04156494140625,
-0.07110595703125,
-0.0265350341796875,
-0.01151275634765625,
-0.0081329345703125,
0.046234130859375,
0.0234222412109375,
0.00969696044921875,
0.0286407470703125,
0.0096588134765625,
0.0024051666259765625,
0.0004749298095703125,
-0.0205841064453125,
0.00029206275939941406,
-0.012725830078125,
-0.024658203125,
-0.00705718994140625,
-0.026336669921875,
-0.01105499267578125,
-0.03436279296875,
0.01503753662109375,
-0.0224456787109375,
-0.0173797607421875,
0.0693359375,
-0.0016946792602539062,
-0.0241546630859375,
0.01464080810546875,
0.0216064453125,
-0.01093292236328125,
-0.035430908203125,
0.016815185546875,
-0.0223541259765625,
0.033294677734375,
-0.030517578125,
0.015350341796875,
-0.03228759765625,
-0.06170654296875,
-0.0212860107421875,
0.0017137527465820312,
-0.003978729248046875,
-0.0266571044921875,
0.0004737377166748047,
0.01898193359375,
-0.019378662109375,
-0.0013885498046875,
-0.053009033203125,
0.07354736328125,
0.019256591796875,
0.0302886962890625,
-0.02587890625,
0.021820068359375,
0.01605224609375,
-0.052093505859375,
-0.01247406005859375,
-0.007720947265625,
-0.0197906494140625,
-0.040771484375,
0.006015777587890625,
0.0635986328125,
0.025665283203125,
0.00844573974609375,
-0.059326171875,
0.0138092041015625,
0.010467529296875,
-0.0238037109375,
0.027008056640625,
0.0285491943359375,
-0.0806884765625,
-0.0257720947265625,
0.013458251953125,
0.01435089111328125,
-0.0251007080078125,
-0.01024627685546875,
-0.028656005859375,
-0.00817108154296875,
0.0274810791015625,
0.014312744140625,
0.0216217041015625,
0.0504150390625,
0.0382080078125,
-0.028411865234375,
-0.037567138671875,
-0.03411865234375,
0.05194091796875,
-0.0051422119140625,
-0.0323486328125,
-0.03363037109375,
-0.01079559326171875,
0.0171356201171875,
-0.0226593017578125,
-0.045654296875,
0.037811279296875,
-0.00839996337890625,
0.017425537109375,
0.06243896484375,
0.046417236328125,
0.000008165836334228516,
-0.051513671875,
0.040008544921875,
0.057769775390625,
-0.01654052734375,
-0.053924560546875,
-0.0025501251220703125,
-0.01061248779296875,
0.014801025390625,
0.01055908203125,
0.0281524658203125,
0.01149749755859375,
0.0239105224609375,
-0.004058837890625,
-0.017730712890625,
0.011016845703125,
-0.0189056396484375,
0.01229095458984375,
0.06024169921875,
0.01219940185546875,
-0.00582122802734375,
0.008056640625,
0.01351165771484375,
0.009552001953125,
-0.01126861572265625,
-0.02655029296875,
0.02972412109375,
-0.008270263671875,
0.027130126953125,
-0.025360107421875,
0.0484619140625,
-0.0002779960632324219,
0.02777099609375,
-0.0880126953125,
-0.07269287109375,
0.056488037109375,
0.07293701171875,
0.025543212890625,
0.0189361572265625,
0.07244873046875,
0.08770751953125,
0.00283050537109375,
-0.006641387939453125,
0.0770263671875,
0.0022563934326171875,
-0.0249481201171875,
-0.03753662109375,
-0.005035400390625,
0.0219268798828125,
0.0072174072265625,
0.006732940673828125,
0.0261993408203125,
0.0225372314453125,
-0.016387939453125,
0.034942626953125,
0.005123138427734375,
0.01163482666015625,
0.036102294921875,
0.018951416015625,
-0.0062255859375,
0.0489501953125,
-0.024383544921875,
-0.01067352294921875,
0.028045654296875,
-0.006168365478515625,
-0.009002685546875,
0.0231781005859375,
0.005992889404296875,
0.01239776611328125,
0.01114654541015625,
-0.00804901123046875,
0.0268402099609375,
0.004993438720703125,
-0.0103607177734375,
0.02020263671875,
0.034759521484375,
-0.002323150634765625,
-0.05279541015625,
-0.0207977294921875,
-0.03546142578125,
0.03057861328125,
0.00560760498046875,
0.1290283203125,
-0.035919189453125,
0.0173187255859375,
0.016143798828125,
-0.040191650390625,
0.042999267578125,
0.0147552490234375,
-0.040069580078125,
0.011474609375,
0.0168914794921875,
-0.0217742919921875,
-0.003997802734375,
0.00043654441833496094,
0.006732940673828125,
-0.037384033203125,
0.0029277801513671875,
-0.07769775390625,
0.040985107421875,
0.0053863525390625,
-0.01007080078125,
-0.034088134765625,
-0.024688720703125,
0.0130157470703125,
0.000545501708984375,
-0.006679534912109375,
-0.0304718017578125,
0.00873565673828125,
0.0200042724609375,
0.0138702392578125,
-0.009246826171875,
0.0298309326171875,
-0.02215576171875,
0.02923583984375,
0.02764892578125,
-0.01511383056640625,
-0.0248870849609375,
0.00039887428283691406,
-0.014556884765625,
0.00011843442916870117,
-0.00031185150146484375,
0.02655029296875,
0.01398468017578125,
-0.045257568359375,
0.005954742431640625,
0.007511138916015625,
-0.0139007568359375,
-0.051910400390625,
-0.01031494140625,
0.044281005859375,
-0.01284027099609375,
-0.02288818359375,
0.0005402565002441406,
-0.005405426025390625,
0.01519012451171875,
-0.0306396484375,
-0.00395965576171875,
0.0010128021240234375,
-0.049713134765625,
0.005931854248046875,
-0.0092926025390625,
0.00911712646484375,
-0.00640106201171875,
0.0267181396484375,
0.0124053955078125,
-0.03466796875,
-0.03900146484375,
0.00592803955078125,
-0.0188751220703125,
-0.0016660690307617188,
0.01517486572265625,
-0.004558563232421875,
-0.047698974609375,
-0.0265045166015625,
0.048583984375,
-0.01568603515625,
0.004604339599609375,
0.022979736328125,
0.0141143798828125,
-0.0217742919921875,
0.01129150390625,
-0.01424407958984375,
0.0540771484375,
-0.04937744140625,
-0.00769805908203125,
0.046173095703125,
-0.018798828125,
-0.028472900390625,
-0.04669189453125,
-0.003047943115234375,
-0.032806396484375,
0.006801605224609375,
-0.06878662109375,
0.027618408203125,
0.0144500732421875,
-0.031707763671875,
-0.0248870849609375,
-0.0050048828125,
0.0014791488647460938,
-0.0190582275390625,
-0.056060791015625,
0.0003764629364013672,
-0.014862060546875,
0.0254669189453125,
-0.021453857421875,
-0.003017425537109375,
-0.01064300537109375,
0.061279296875,
0.0189056396484375,
0.01180267333984375,
0.02813720703125,
0.035247802734375,
-0.006267547607421875,
0.060302734375,
0.0258331298828125,
-0.0149688720703125,
-0.022979736328125,
0.03973388671875,
0.0101470947265625,
0.0780029296875,
0.004627227783203125,
0.0184478759765625,
0.002201080322265625,
-0.047576904296875,
-0.01715087890625,
-0.019500732421875,
0.0025920867919921875,
0.003818511962890625,
0.051727294921875,
0.0460205078125,
0.01261138916015625,
-0.04302978515625,
0.00830078125,
-0.00766754150390625,
-0.014739990234375,
-0.032867431640625,
0.0241851806640625,
-0.0755615234375,
-0.034881591796875,
0.0042877197265625,
-0.0004851818084716797,
0.036376953125,
0.00897216796875,
0.0226593017578125,
0.01546478271484375,
0.0780029296875,
-0.00905609130859375,
-0.0341796875,
0.00734710693359375,
0.08062744140625,
-0.047821044921875,
-0.008087158203125,
0.03436279296875,
0.0031986236572265625,
0.03082275390625,
0.0230255126953125,
0.004360198974609375,
-0.03399658203125,
0.00913238525390625,
0.0237884521484375,
0.00726318359375,
-0.006439208984375,
-0.005859375,
-0.031982421875,
-0.01534271240234375,
-0.012908935546875,
0.0013971328735351562,
-0.0061798095703125,
-0.01290130615234375,
-0.0201873779296875,
-0.006610870361328125,
0.069091796875,
-0.0014600753784179688,
0.0235137939453125,
-0.0249786376953125,
0.03387451171875,
-0.04913330078125,
0.020355224609375,
-0.0311279296875,
0.00518035888671875,
0.0254058837890625,
-0.002899169921875,
-0.022796630859375,
0.016204833984375,
-0.024139404296875,
-0.034149169921875,
-0.034332275390625,
-0.0005030632019042969
] |
99ff10d8dad5243478577c1f91be486b4075757f | Wordpress Stackexchange
Q: alt, title tags not showing I have added alt tags, title and description on all the images on my website but none are showing when I check them in the inspect element tool in chrome or firefox.
Here's a screenshot:
And here's the screenshot of inspect element of the same image:
A: I found a script, try if this works for you. Add this in your theme's functions.php file
function isa_add_img_title( $attr, $attachment = null ) {
$img_title = trim( strip_tags( $attachment->post_title ) );
$attr['title'] = $img_title;
$attr['alt'] = $img_title;
return $attr;
}
add_filter( 'wp_get_attachment_image_attributes','isa_add_img_title', 10, 2 );
| Q: alt, title tags not showing I have added alt tags, title and description on all the images on my website but none are showing when I check them in the inspect element tool in chrome or firefox.
Here's a screenshot:
And here's the screenshot of inspect element of the same image:
A: I found a script, try if this works for you. Add this in your theme's functions.php file
function isa_add_img_title( $attr, $attachment = null ) {
$img_title = trim( strip_tags( $attachment->post_title ) );
$attr['title'] = $img_title;
$attr['alt'] = $img_title;
return $attr;
}
add_filter( 'wp_get_attachment_image_attributes','isa_add_img_title', 10, 2 );
A: It actually depends upon how the image is shown in the template. If it is shown using a function like the_post_thumbnail() which returns complete html string to show image with alt then there should be no problem but if image is shown by only fetching URL then it depends how it is displayed .
For example, below is snippet which is fetching image directly on a WP image attachment page:
//fetching attachment image src url
$attachment_size = apply_filters( 'abc_attachment_size', array( 960, 960 ));
$image_attributes = wp_get_attachment_image_src( $post->ID, $attachment_size);
if( $image_attributes ) {
?>
<img src="<?php echo $image_attributes[0]; ?>" width="<?php echo $image_attributes[1]; ?>" height="<?php echo $image_attributes[2]; ?>">
<?php } ?>
In above code, we are displaying image from data we fetched individually, here since alt is not used , it will not show alt. Similarly in your case, I am assuming its because theme has no alt specified, its not being shown there.
Also, I tried downloading your theme file but was reported as malicious by browser so I left it.
A: To make the alt tag appear with that image, you have to modify the theme. The code which outputs the image is located in mediatraining/inc/modules/trainers/shortcode.php. On line 13 the image is loaded form the options:
$img = mbtheme_get_option( 'lead-trainer-image' );
$img_url = $img[ 'url' ];
On line 27 it is used then:
<img src="<?php echo esc_url( $img_url ); ?>" />
So to be abnle to have the alt tag here you could try something like this on line 27:
<img src="<?php echo esc_url( $img_url ); ?>" alt="<?php echo esc_attr( $img['alt'] ); ?>" />
This is not tested and I am not sure about the $img['alt'] part, because I don't know what is exactly saved there. Alternatively try $img['title'] or try dumping $img to see if the alt text can be found in there.
A: It appears that (as of version 4.7) the alt attribute is no longer automatically displayed. There are plugins that restore this functionality (eg. https://wordpress.org/plugins/auto-image-alt/). If you have SEO in mind these are useful only to some extent because the attribute is added by JavaScript.
| wordpress | {
"language": "en",
"length": 449,
"provenance": "stackexchange_00019.jsonl.gz:472362",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/253743"
} | [
0.0302886962890625,
0.01171875,
0.0377197265625,
0.043975830078125,
-0.003101348876953125,
-0.0257415771484375,
0.070068359375,
-0.081298828125,
-0.00759124755859375,
0.049468994140625,
-0.04876708984375,
0.02008056640625,
-0.002407073974609375,
0.0010766983032226562,
-0.0295257568359375,
-0.03973388671875,
0.01715087890625,
-0.00926971435546875,
0.04864501953125,
0.0289459228515625,
0.0116729736328125,
0.045166015625,
0.020111083984375,
-0.0303802490234375,
0.003032684326171875,
-0.0097503662109375,
0.123291015625,
-0.0390625,
0.0164031982421875,
-0.0276336669921875,
0.02215576171875,
-0.01316070556640625,
0.0452880859375,
-0.024444580078125,
0.0025424957275390625,
0.058013916015625,
0.040191650390625,
-0.0249786376953125,
-0.00021159648895263672,
0.0241851806640625,
0.019683837890625,
-0.007144927978515625,
0.0736083984375,
0.01416015625,
0.032684326171875,
-0.0302886962890625,
0.030120849609375,
-0.05841064453125,
0.013214111328125,
-0.01337432861328125,
0.031768798828125,
0.01175689697265625,
0.038055419921875,
-0.0198974609375,
-0.02166748046875,
0.0089569091796875,
-0.03326416015625,
0.0299530029296875,
0.0284576416015625,
0.007526397705078125,
-0.017120361328125,
-0.01319122314453125,
-0.0011615753173828125,
-0.0291900634765625,
0.00794219970703125,
0.02362060546875,
0.08197021484375,
0.011749267578125,
-0.0509033203125,
-0.01751708984375,
0.0283966064453125,
-0.038360595703125,
0.0024356842041015625,
-0.03411865234375,
0.0084991455078125,
0.0180206298828125,
-0.041595458984375,
-0.043426513671875,
0.0208587646484375,
-0.003509521484375,
0.047210693359375,
-0.0218658447265625,
0.011260986328125,
0.0306396484375,
0.03143310546875,
0.0594482421875,
0.010101318359375,
-0.039459228515625,
-0.007396697998046875,
0.00632476806640625,
-0.01318359375,
-0.0255889892578125,
-0.043670654296875,
0.041961669921875,
0.031494140625,
-0.031982421875,
0.0205841064453125,
0.05645751953125,
-0.015838623046875,
0.0263214111328125,
-0.006664276123046875,
-0.0380859375,
0.041656494140625,
-0.053985595703125,
-0.01079559326171875,
-0.04547119140625,
-0.0249786376953125,
-0.0152130126953125,
0.016204833984375,
0.055328369140625,
-0.037261962890625,
0.0024662017822265625,
-0.0078887939453125,
-0.0004801750183105469,
-0.030609130859375,
0.01654052734375,
-0.023406982421875,
0.0133514404296875,
-0.00617218017578125,
0.035400390625,
0.0235748291015625,
0.0460205078125,
-0.0250091552734375,
-0.0214691162109375,
0.01030731201171875,
0.0034198760986328125,
-0.012939453125,
-0.01270294189453125,
-0.0166168212890625,
-0.0114288330078125,
-0.0120391845703125,
0.03558349609375,
0.037322998046875,
0.01122283935546875,
-0.001773834228515625,
0.00008112192153930664,
-0.02313232421875,
-0.03271484375,
-0.0203399658203125,
-0.021331787109375,
0.01503753662109375,
0.005390167236328125,
0.040679931640625,
-0.0194854736328125,
0.01409912109375,
0.0293731689453125,
-0.00318145751953125,
0.0074462890625,
0.01140594482421875,
-0.048126220703125,
0.0418701171875,
-0.06939697265625,
0.028411865234375,
0.013397216796875,
-0.031829833984375,
-0.0084075927734375,
0.038848876953125,
-0.031097412109375,
-0.00975799560546875,
-0.051483154296875,
0.0165252685546875,
0.0016603469848632812,
0.00952911376953125,
-0.015899658203125,
-0.0233154296875,
-0.0139007568359375,
-0.0203704833984375,
0.00250244140625,
0.0157012939453125,
0.01187896728515625,
-0.01482391357421875,
0.00415802001953125,
0.031524658203125,
0.00423431396484375,
-0.0136566162109375,
0.02099609375,
0.01421356201171875,
-0.01041412353515625,
0.031982421875,
0.036712646484375,
-0.012481689453125,
-0.0251007080078125,
0.0526123046875,
-0.03564453125,
-0.053436279296875,
-0.034393310546875,
-0.006683349609375,
0.01311492919921875,
0.04205322265625,
0.01129913330078125,
0.032012939453125,
-0.005767822265625,
-0.03033447265625,
0.0281829833984375,
0.0340576171875,
-0.0115203857421875,
-0.038116455078125,
-0.0164031982421875,
-0.01134490966796875,
-0.0364990234375,
-0.0128021240234375,
-0.01348876953125,
-0.00023925304412841797,
-0.0016698837280273438,
0.0178070068359375,
-0.044342041015625,
0.0179290771484375,
0.01690673828125,
0.0024623870849609375,
0.01465606689453125,
0.01535797119140625,
-0.040496826171875,
-0.0166473388671875,
0.032806396484375,
0.005268096923828125,
-0.01358795166015625,
-0.00043702125549316406,
0.012939453125,
-0.00989532470703125,
-0.00833892822265625,
0.0013570785522460938,
-0.01233673095703125,
0.006504058837890625,
0.05712890625,
0.058258056640625,
0.022552490234375,
-0.0205078125,
-0.0009064674377441406,
0.0372314453125,
0.045867919921875,
-0.06634521484375,
-0.0034961700439453125,
0.02008056640625,
0.043609619140625,
-0.031585693359375,
-0.0217132568359375,
-0.0516357421875,
-0.054931640625,
-0.0008454322814941406,
0.0631103515625,
0.02557373046875,
0.02874755859375,
-0.004299163818359375,
0.00577545166015625,
0.057525634765625,
-0.00212860107421875,
0.0251922607421875,
-0.0310211181640625,
0.0171661376953125,
-0.0076751708984375,
-0.0014371871948242188,
-0.026519775390625,
0.05487060546875,
-0.00787353515625,
0.0115966796875,
0.046722412109375,
-0.0311431884765625,
-0.01065826416015625,
-0.015716552734375,
-0.007640838623046875,
0.01433563232421875,
-0.0166473388671875,
0.0037631988525390625,
-0.01192474365234375,
0.029266357421875,
0.0584716796875,
0.0362548828125,
0.03607177734375,
-0.0626220703125,
0.06500244140625,
0.0066375732421875,
0.01412200927734375,
0.009796142578125,
0.03997802734375,
0.00982666015625,
0.018768310546875,
-0.0203094482421875,
-0.0138397216796875,
-0.0004630088806152344,
0.0323486328125,
0.0016851425170898438,
0.0258941650390625,
0.04241943359375,
-0.0162506103515625,
-0.00014090538024902344,
-0.0274200439453125,
0.01154327392578125,
-0.02001953125,
0.01470947265625,
0.00043892860412597656,
-0.0047149658203125,
0.043975830078125,
0.004741668701171875,
0.0247344970703125,
0.0211334228515625,
0.002620697021484375,
0.00788116455078125,
-0.0927734375,
0.080078125,
-0.06146240234375,
0.07879638671875,
0.0853271484375,
-0.04034423828125,
0.04766845703125,
-0.005283355712890625,
0.02032470703125,
-0.0077972412109375,
-0.01378631591796875,
-0.0272674560546875,
0.003337860107421875,
-0.06640625,
-0.0107269287109375,
0.0188140869140625,
0.044403076171875,
-0.03851318359375,
-0.05950927734375,
-0.03704833984375,
0.0010175704956054688,
-0.10015869140625,
-0.06591796875,
0.0124053955078125,
-0.041839599609375,
-0.044036865234375,
0.010223388671875,
-0.029632568359375,
0.009613037109375,
0.0205535888671875,
-0.0184173583984375,
-0.044921875,
-0.04156494140625,
-0.01143646240234375,
-0.06640625,
-0.052642822265625,
-0.009246826171875,
0.006988525390625,
0.0200042724609375,
0.0157470703125,
0.0157623291015625,
0.01325225830078125,
-0.01458740234375,
0.0262908935546875,
0.033355712890625,
0.007965087890625,
0.004405975341796875,
0.0203857421875,
-0.03619384765625,
0.0006403923034667969,
0.007450103759765625,
-0.0245513916015625,
0.0027217864990234375,
-0.005641937255859375,
-0.0228424072265625,
-0.0212554931640625,
-0.019927978515625,
-0.0099334716796875,
-0.006679534912109375,
0.022003173828125,
-0.008819580078125,
-0.00312042236328125,
-0.043304443359375,
-0.01396942138671875,
-0.0305328369140625,
-0.048248291015625,
-0.0017042160034179688,
0.0171356201171875,
0.006504058837890625,
-0.0200958251953125,
0.005771636962890625,
-0.0025119781494140625,
0.0191192626953125,
0.023529052734375,
0.0107574462890625,
-0.00949859619140625,
-0.019775390625,
-0.0254974365234375,
-0.032012939453125,
0.0258331298828125,
-0.004337310791015625,
-0.022796630859375,
-0.01128387451171875,
0.0295867919921875,
-0.02471923828125,
0.016265869140625,
-0.04925537109375,
-0.019622802734375,
0.043182373046875,
-0.006290435791015625,
0.04266357421875,
-0.040618896484375,
-0.04736328125,
-0.0269622802734375,
0.0765380859375,
-0.0274505615234375,
-0.032073974609375,
-0.000606536865234375,
0.0176544189453125,
-0.006549835205078125,
-0.0014295578002929688,
-0.00373077392578125,
-0.01381683349609375,
-0.1209716796875,
0.036651611328125,
0.01457977294921875,
-0.0306243896484375,
-0.018524169921875,
-0.0269317626953125,
-0.056915283203125,
-0.047576904296875,
0.0137176513671875,
0.04669189453125,
-0.013336181640625,
-0.01229095458984375,
-0.0177459716796875,
-0.006633758544921875,
0.001800537109375,
-0.0014257431030273438,
-0.04327392578125,
-0.006061553955078125,
-0.0070037841796875,
0.020294189453125,
-0.0467529296875,
0.05908203125,
-0.039398193359375,
0.0264434814453125,
0.004413604736328125,
-0.0164794921875,
0.0244140625,
0.0007185935974121094,
0.0262603759765625,
0.0074920654296875,
0.0011129379272460938,
-0.0214385986328125,
-0.01047515869140625,
-0.009613037109375,
-0.047698974609375,
0.004669189453125,
0.005645751953125,
0.0189971923828125,
0.04241943359375,
-0.03363037109375,
0.004413604736328125,
-0.0156707763671875,
0.0303192138671875,
0.01459503173828125,
0.023834228515625,
-0.0211639404296875,
-0.0213470458984375,
0.01404571533203125,
0.00605010986328125,
-0.00391387939453125,
-0.0193939208984375,
0.021453857421875,
0.0491943359375,
0.0235748291015625,
0.0036754608154296875,
-0.049468994140625,
0.01446533203125,
0.03662109375,
0.01023101806640625,
0.02520751953125,
-0.006175994873046875,
-0.0287322998046875,
0.05474853515625,
-0.00444793701171875,
0.0301971435546875,
-0.049163818359375,
0.03564453125,
-0.0253753662109375,
-0.039794921875,
0.0391845703125,
-0.003925323486328125,
0.01995849609375,
-0.009063720703125,
0.002376556396484375,
-0.0237884521484375,
0.014739990234375,
0.0265960693359375,
-0.00638580322265625,
0.032470703125,
-0.00946807861328125,
-0.007404327392578125,
-0.01300811767578125,
0.04205322265625,
0.035247802734375,
0.03466796875,
0.00649261474609375,
-0.00325775146484375,
0.0164031982421875,
0.00775146484375,
-0.0537109375,
-0.02239990234375,
-0.048309326171875,
0.0204010009765625,
-0.03240966796875,
-0.0037631988525390625,
-0.01245880126953125,
-0.025054931640625,
0.083251953125,
0.0036487579345703125,
-0.051422119140625,
0.0218353271484375,
-0.031005859375,
0.0214080810546875,
0.022125244140625,
0.036895751953125,
-0.0007753372192382812,
0.003448486328125,
0.02886962890625,
0.010467529296875,
0.02197265625,
0.03399658203125,
-0.0032062530517578125,
-0.00562286376953125,
0.0221405029296875,
-0.033477783203125,
0.0282440185546875,
0.01274871826171875,
-0.043792724609375,
0.025543212890625,
0.0101470947265625,
-0.031982421875,
-0.0037097930908203125,
0.055572509765625,
0.044921875,
-0.060882568359375,
-0.0270233154296875,
0.055511474609375,
0.04168701171875,
-0.042816162109375,
-0.02227783203125,
0.046722412109375,
0.04534912109375,
-0.028564453125,
-0.03997802734375,
0.0120086669921875,
-0.0198974609375,
-0.039306640625,
0.032806396484375,
-0.00804901123046875,
-0.06280517578125,
-0.0287017822265625,
0.01313018798828125,
0.03936767578125,
0.0007786750793457031,
-0.036773681640625,
0.010162353515625,
-0.01486968994140625,
0.01044464111328125,
0.039398193359375,
-0.06524658203125,
0.05181884765625,
0.051177978515625,
-0.02984619140625,
-0.0303955078125,
-0.0273895263671875,
0.0135650634765625,
-0.00804901123046875,
-0.007762908935546875,
-0.0185699462890625,
0.0276031494140625,
-0.030609130859375,
0.028839111328125,
-0.021881103515625,
0.00379180908203125,
-0.003566741943359375,
0.0181121826171875,
0.04425048828125,
0.022491455078125,
-0.034332275390625,
-0.01317596435546875,
-0.0384521484375,
-0.0140533447265625,
-0.0014705657958984375,
-0.0176544189453125,
-0.03936767578125,
-0.01519012451171875,
0.0059814453125,
0.0228729248046875,
-0.018341064453125,
-0.016021728515625,
-0.01020050048828125,
0.041717529296875,
0.0242462158203125,
0.0960693359375,
-0.01605224609375,
0.01922607421875,
0.00835418701171875,
0.053863525390625,
-0.01268768310546875,
0.013641357421875,
0.018798828125,
-0.045318603515625,
-0.002414703369140625,
-0.034881591796875,
-0.00734710693359375,
0.006336212158203125,
-0.001964569091796875,
0.0146026611328125,
0.01611328125,
0.016326904296875,
-0.01442718505859375,
-0.01690673828125,
0.0142059326171875,
-0.006221771240234375,
0.041107177734375,
-0.006923675537109375,
-0.06475830078125,
0.061004638671875,
-0.0087127685546875,
0.026641845703125,
-0.0185699462890625,
-0.00492095947265625,
0.00443267822265625,
-0.010711669921875,
-0.005924224853515625,
0.0235748291015625,
-0.0302276611328125,
0.03173828125,
0.0621337890625,
-0.0006971359252929688,
0.025238037109375,
0.0163421630859375,
-0.0019283294677734375,
0.0011777877807617188,
0.0079345703125,
0.04736328125,
-0.05975341796875,
0.06243896484375,
0.0118560791015625,
-0.0082244873046875,
0.06256103515625,
-0.038543701171875,
0.006069183349609375,
0.023468017578125,
0.041046142578125,
-0.011993408203125,
-0.004184722900390625,
0.0168609619140625,
-0.029876708984375,
0.0007805824279785156,
-0.00009775161743164062,
-0.0071868896484375,
-0.02764892578125,
0.030670166015625,
-0.00801849365234375,
-0.014984130859375,
0.00437164306640625,
0.006717681884765625,
0.020233154296875,
-0.009735107421875,
0.030609130859375,
0.00012993812561035156,
-0.080810546875,
-0.0194549560546875,
0.07037353515625,
-0.0276641845703125,
-0.00923919677734375,
0.0035724639892578125,
0.04132080078125,
-0.036163330078125,
-0.0625,
0.0271453857421875,
-0.00910186767578125,
-0.0206146240234375,
0.00893402099609375,
0.03668212890625,
0.0249176025390625,
0.0400390625,
0.004467010498046875,
-0.003997802734375,
0.01280975341796875,
-0.0238800048828125,
0.007244110107421875,
-0.0291900634765625,
-0.00469207763671875,
0.0296173095703125,
-0.026580810546875,
0.01461029052734375,
0.001598358154296875,
0.007228851318359375,
-0.0140228271484375,
-0.028778076171875,
0.04229736328125,
0.01143646240234375,
-0.0309295654296875,
0.0279388427734375,
0.01476287841796875,
-0.01210784912109375,
0.0289306640625,
-0.006870269775390625,
-0.023895263671875,
-0.016387939453125,
0.007602691650390625,
-0.050140380859375,
0.0186004638671875,
0.0258331298828125,
-0.07855224609375,
0.10394287109375,
0.010162353515625,
0.055450439453125,
0.003936767578125,
0.024627685546875,
-0.0237274169921875,
-0.00595855712890625,
-0.035797119140625,
0.0302581787109375,
-0.051788330078125,
0.0272216796875,
-0.055450439453125,
0.00357818603515625,
0.00623321533203125,
0.0251922607421875,
0.0242767333984375,
-0.003429412841796875,
-0.0274810791015625,
-0.01351165771484375,
0.041717529296875,
0.0491943359375,
0.00321197509765625,
0.031646728515625,
-0.01186370849609375,
-0.01171112060546875,
0.02044677734375,
-0.000008046627044677734,
0.0291595458984375,
-0.003505706787109375,
-0.029449462890625,
0.0247039794921875,
0.027008056640625,
0.0203399658203125,
0.0298919677734375,
-0.0290679931640625,
-0.052978515625,
0.0304412841796875,
0.036956787109375,
-0.0001964569091796875,
-0.01520538330078125,
0.0194091796875,
0.006366729736328125,
-0.0545654296875,
-0.08599853515625,
-0.00438690185546875,
0.02203369140625,
0.033599853515625,
0.0144805908203125,
0.026214599609375,
0.0186309814453125,
-0.036041259765625,
0.007965087890625,
0.02239990234375,
0.0098876953125,
-0.0020008087158203125,
0.009765625,
-0.0218505859375,
0.0226593017578125,
-0.0689697265625,
-0.042938232421875,
0.05517578125,
0.0457763671875,
-0.004207611083984375,
-0.00861358642578125,
0.010467529296875,
-0.003826141357421875,
-0.01031494140625,
-0.036102294921875,
-0.0083770751953125,
-0.0023746490478515625,
0.03546142578125,
0.01172637939453125,
-0.007904052734375,
0.01059722900390625,
0.04412841796875,
0.0064544677734375,
0.017059326171875,
-0.03369140625,
-0.008056640625,
-0.046051025390625,
0.0013265609741210938,
0.00037670135498046875,
0.047210693359375,
0.0287017822265625,
0.048583984375,
0.00975799560546875,
-0.0137481689453125,
-0.0156402587890625,
0.0770263671875,
-0.00807952880859375,
0.008514404296875,
-0.05426025390625,
-0.0712890625,
-0.01102447509765625,
0.03094482421875,
0.01776123046875,
-0.017486572265625,
0.024322509765625,
0.01192474365234375,
-0.052001953125,
-0.01190185546875,
0.009033203125,
-0.01395416259765625,
-0.0198211669921875,
-0.007083892822265625,
0.0692138671875,
0.09375,
0.032257080078125,
0.0251922607421875,
0.04315185546875,
0.08575439453125,
-0.0621337890625,
0.041839599609375,
-0.0151519775390625,
-0.044464111328125,
0.00846099853515625,
-0.022796630859375,
0.05462646484375,
-0.0217132568359375,
-0.051300048828125,
-0.004474639892578125,
-0.01236724853515625,
-0.04022216796875,
0.01151275634765625,
0.0231781005859375,
-0.01497650146484375,
0.02337646484375,
-0.0120086669921875,
-0.02362060546875,
0.01641845703125,
0.0103607177734375,
0.006221771240234375,
0.06280517578125,
0.0109100341796875,
0.0127105712890625,
-0.020538330078125,
-0.004123687744140625,
-0.0172882080078125,
0.0267791748046875,
0.025360107421875,
0.037567138671875,
-0.022247314453125,
0.0394287109375,
0.00036263465881347656,
0.0209197998046875,
-0.049224853515625,
-0.0271453857421875,
0.058929443359375,
-0.0259857177734375,
-0.00860595703125,
-0.00891876220703125,
-0.057647705078125,
0.042694091796875,
0.01059722900390625,
0.0266571044921875,
0.04608154296875,
-0.032562255859375,
0.005664825439453125,
0.0012674331665039062,
0.039520263671875,
-0.0145721435546875,
-0.0382080078125,
-0.072021484375,
-0.023345947265625,
0.04010009765625,
0.051910400390625,
0.00609588623046875,
0.02313232421875,
0.05078125,
-0.0058441162109375,
0.0292816162109375,
-0.0231781005859375,
0.03704833984375,
0.033660888671875,
0.0184326171875,
-0.01036834716796875,
0.005893707275390625,
-0.0010900497436523438,
0.01338958740234375,
0.0283050537109375,
0.006755828857421875,
0.01061248779296875,
0.02447509765625,
0.0032062530517578125,
-0.0028972625732421875,
0.02044677734375,
-0.025177001953125,
0.01000213623046875,
-0.0006136894226074219,
-0.0006456375122070312,
0.005802154541015625,
-0.00044417381286621094,
-0.0269012451171875,
-0.053741455078125,
0.00951385498046875,
0.034393310546875,
-0.01494598388671875,
0.0109405517578125,
-0.0682373046875,
-0.0174713134765625,
0.01739501953125,
-0.034149169921875,
0.044097900390625,
-0.03173828125,
-0.043212890625,
0.0170135498046875,
-0.032379150390625,
-0.0198211669921875,
0.011383056640625,
0.047027587890625,
-0.0421142578125,
-0.040802001953125,
-0.035186767578125,
-0.00559234619140625,
-0.054534912109375,
0.03167724609375,
0.031524658203125,
-0.0233154296875,
0.0102386474609375,
0.00208282470703125,
0.030303955078125,
0.06512451171875,
0.0015268325805664062,
-0.0295867919921875,
-0.036834716796875,
0.0225830078125,
-0.017608642578125,
-0.0254974365234375,
0.038360595703125,
-0.0345458984375,
-0.0543212890625,
-0.0694580078125,
0.028533935546875,
0.0286102294921875,
-0.02801513671875,
-0.0394287109375,
0.039825439453125,
-0.0171051025390625,
-0.0171966552734375,
-0.035888671875,
0.036041259765625,
-0.01007843017578125,
0.0391845703125,
0.0106964111328125,
-0.00925445556640625,
0.0159454345703125,
-0.00018870830535888672,
0.0069427490234375,
0.0131072998046875,
0.0124664306640625,
-0.0115509033203125,
0.009307861328125,
0.0262603759765625,
0.02215576171875,
-0.029449462890625,
0.04266357421875,
-0.04791259765625,
0.027313232421875,
0.012908935546875,
-0.0877685546875,
-0.053009033203125,
-0.034698486328125,
0.041107177734375,
-0.003631591796875,
0.01039886474609375,
-0.010589599609375,
-0.002399444580078125,
0.02386474609375,
0.031951904296875,
0.005390167236328125,
-0.0109100341796875,
0.04730224609375,
0.0169219970703125,
-0.0523681640625,
0.008544921875,
0.015350341796875,
-0.033233642578125,
-0.019622802734375,
0.006710052490234375,
0.0010786056518554688,
-0.01473236083984375,
-0.0164642333984375,
-0.0268707275390625,
-0.0209197998046875,
-0.021392822265625,
0.008148193359375,
-0.053558349609375,
0.03521728515625,
0.0899658203125,
-0.060211181640625,
0.002166748046875,
-0.0224151611328125,
0.00746917724609375,
0.043487548828125,
-0.07781982421875,
0.00937652587890625,
-0.003162384033203125,
0.005886077880859375,
0.0179901123046875,
0.024169921875,
0.00859832763671875,
-0.0072784423828125,
-0.0128173828125,
0.015167236328125,
0.02764892578125,
-0.01531219482421875,
0.01488494873046875,
0.01433563232421875,
0.034698486328125,
-0.01971435546875,
0.033538818359375,
-0.016998291015625,
0.04217529296875,
-0.007904052734375,
0.018707275390625,
-0.06494140625,
0.0172271728515625,
-0.036956787109375,
-0.023193359375,
0.0217437744140625,
-0.0001691579818725586,
-0.0039825439453125,
-0.004421234130859375,
-0.02752685546875,
-0.0460205078125,
-0.00939178466796875,
0.004764556884765625
] |
49ce14ae8ee36ccd554e06759bb638dc9354c24d | Wordpress Stackexchange
Q: How to set default visible columns in posts list, for all users Is there a way to set default visible columns in posts list, for all users?
A: Since the question was about columns and not meta boxes and I needed this solution, Ioannis’ reply got me on the right track.
The filter hook in question is default_hidden_columns.
This is the solution I ended up with to set my ad_shortcode column to be hidden by default. You should know that this is just the default. As soon as the page was visited, the default is no longer be used. Look for a meta key that includes columnshidden in wp_usermeta and remove it when testing.
add_filter( 'default_hidden_columns', 'hide_ad_list_columns', 10, 2 );
function hide_ad_list_columns( $hidden, $screen ) {
// "edit-advanced_ads" needs to be adjusted to your own screen ID, this one is for my "advanced_ads" post type
if( isset( $screen->id ) && 'edit-advanced_ads' === $screen->id ){
$hidden[] = 'ad_shortcode';
}
return $hidden;
}
| Q: How to set default visible columns in posts list, for all users Is there a way to set default visible columns in posts list, for all users?
A: Since the question was about columns and not meta boxes and I needed this solution, Ioannis’ reply got me on the right track.
The filter hook in question is default_hidden_columns.
This is the solution I ended up with to set my ad_shortcode column to be hidden by default. You should know that this is just the default. As soon as the page was visited, the default is no longer be used. Look for a meta key that includes columnshidden in wp_usermeta and remove it when testing.
add_filter( 'default_hidden_columns', 'hide_ad_list_columns', 10, 2 );
function hide_ad_list_columns( $hidden, $screen ) {
// "edit-advanced_ads" needs to be adjusted to your own screen ID, this one is for my "advanced_ads" post type
if( isset( $screen->id ) && 'edit-advanced_ads' === $screen->id ){
$hidden[] = 'ad_shortcode';
}
return $hidden;
}
A: To change the defaults, you simply need to hook into the default_hidden_meta_boxes filter and supply your own PHP array listing the meta boxes you’d like hidden by default. In the example below, I hide the author meta box and the revisions meta box. This way, they’re hidden for users unless they’ve decided to enable them in Screen Options.
<?php
/**
* vpm_default_hidden_meta_boxes
*/
function vpm_default_hidden_meta_boxes( $hidden, $screen ) {
// Grab the current post type
$post_type = $screen->post_type;
// If we're on a 'post'...
if ( $post_type == 'post' ) {
// Define which meta boxes we wish to hide
$hidden = array(
'authordiv',
'revisionsdiv',
);
// Pass our new defaults onto WordPress
return $hidden;
}
// If we are not on a 'post', pass the
// original defaults, as defined by WordPress
return $hidden;
}
add_action( 'default_hidden_meta_boxes', 'vpm_default_hidden_meta_boxes', 10, 2 );
Also take a look at
How to set default screen options?
and
https://www.vanpattenmedia.com/2014/code-snippet-hide-post-meta-boxes-wordpress
| wordpress | {
"language": "en",
"length": 318,
"provenance": "stackexchange_00019.jsonl.gz:472406",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/253905"
} | [
0.034912109375,
0.002960205078125,
0.0202484130859375,
0.01444244384765625,
0.00521087646484375,
-0.006679534912109375,
0.052490234375,
-0.049652099609375,
0.0068359375,
-0.012054443359375,
-0.0604248046875,
-0.033203125,
-0.0343017578125,
-0.01465606689453125,
-0.016876220703125,
-0.07171630859375,
0.0297698974609375,
0.00772857666015625,
0.01824951171875,
-0.0010137557983398438,
0.0002865791320800781,
0.01202392578125,
0.01323699951171875,
0.06829833984375,
0.0106658935546875,
-0.029327392578125,
0.0294189453125,
0.0077667236328125,
0.0278472900390625,
0.005397796630859375,
0.01541900634765625,
-0.022064208984375,
0.0126495361328125,
0.0028591156005859375,
0.01244354248046875,
0.034088134765625,
-0.028076171875,
0.031890869140625,
0.0296630859375,
-0.0105743408203125,
0.0275421142578125,
-0.025360107421875,
-0.01392364501953125,
-0.03369140625,
-0.018646240234375,
0.007610321044921875,
0.0097198486328125,
-0.01122283935546875,
0.020965576171875,
0.00547027587890625,
0.0204925537109375,
0.06805419921875,
0.0296630859375,
-0.0108642578125,
0.0050506591796875,
0.0195465087890625,
-0.0072479248046875,
0.01065826416015625,
0.0638427734375,
-0.0029277801513671875,
-0.05010986328125,
-0.058074951171875,
0.0253753662109375,
-0.07818603515625,
-0.005954742431640625,
-0.005115509033203125,
-0.036590576171875,
0.0192718505859375,
-0.040069580078125,
0.01336669921875,
0.041229248046875,
-0.055389404296875,
0.017974853515625,
-0.00803375244140625,
-0.035064697265625,
0.035308837890625,
0.00592803955078125,
0.0350341796875,
0.032867431640625,
-0.034027099609375,
0.011138916015625,
-0.0296783447265625,
-0.0040435791015625,
-0.01554107666015625,
-0.011199951171875,
-0.007099151611328125,
-0.003719329833984375,
0.00415802001953125,
-0.003574371337890625,
-0.028106689453125,
0.0054931640625,
-0.0290985107421875,
-0.05133056640625,
0.03472900390625,
0.0216217041015625,
-0.052032470703125,
0.049957275390625,
0.09759521484375,
-0.02874755859375,
-0.006038665771484375,
-0.020660400390625,
-0.0286712646484375,
-0.010040283203125,
-0.041412353515625,
-0.038970947265625,
-0.0104217529296875,
-0.0007157325744628906,
0.032958984375,
-0.013336181640625,
0.050689697265625,
-0.01470947265625,
-0.060272216796875,
-0.0148162841796875,
0.0726318359375,
-0.046783447265625,
-0.048553466796875,
-0.0826416015625,
0.0036945343017578125,
-0.0697021484375,
0.0185699462890625,
-0.01372528076171875,
0.007236480712890625,
0.0009288787841796875,
-0.05059814453125,
0.00623321533203125,
-0.021728515625,
-0.04779052734375,
0.016143798828125,
-0.005672454833984375,
0.03961181640625,
-0.053985595703125,
-0.0175628662109375,
0.08013916015625,
0.054931640625,
0.03857421875,
-0.0303955078125,
-0.0191497802734375,
-0.013427734375,
-0.004146575927734375,
0.0213623046875,
-0.018798828125,
-0.05206298828125,
0.0069122314453125,
-0.00133514404296875,
-0.011810302734375,
0.0231781005859375,
0.031707763671875,
-0.0025348663330078125,
-0.0237274169921875,
-0.0263824462890625,
-0.0587158203125,
0.01265716552734375,
0.04754638671875,
0.018463134765625,
-0.036712646484375,
0.037841796875,
0.032989501953125,
-0.0056610107421875,
-0.08660888671875,
-0.033294677734375,
0.00611114501953125,
0.0012340545654296875,
0.01177978515625,
-0.023040771484375,
-0.06317138671875,
0.01446533203125,
-0.00283050537109375,
-0.011962890625,
0.02215576171875,
-0.02606201171875,
0.0003795623779296875,
-0.0067596435546875,
0.0028133392333984375,
-0.0008139610290527344,
0.005817413330078125,
0.021759033203125,
-0.03912353515625,
0.031005859375,
0.06842041015625,
-0.035247802734375,
-0.026336669921875,
-0.034088134765625,
0.061676025390625,
0.00765228271484375,
-0.042205810546875,
0.06689453125,
-0.0061798095703125,
0.043853759765625,
0.00897216796875,
0.0016727447509765625,
0.0217132568359375,
0.03179931640625,
-0.03887939453125,
-0.05816650390625,
0.0261688232421875,
0.005535125732421875,
0.0018310546875,
-0.0269317626953125,
0.020294189453125,
0.026611328125,
0.00853729248046875,
-0.0041961669921875,
0.0235443115234375,
0.007083892822265625,
0.0041046142578125,
-0.00507354736328125,
-0.0124664306640625,
0.0287322998046875,
-0.02899169921875,
-0.0281829833984375,
0.0202178955078125,
-0.0291290283203125,
-0.00601959228515625,
0.003826141357421875,
-0.01537322998046875,
0.02801513671875,
-0.0086822509765625,
0.018798828125,
-0.01267242431640625,
-0.0154571533203125,
-0.006671905517578125,
-0.045196533203125,
-0.01611328125,
0.0167999267578125,
0.033233642578125,
-0.0272674560546875,
0.00555419921875,
-0.0284576416015625,
0.05914306640625,
-0.0164031982421875,
0.03814697265625,
0.010223388671875,
-0.0308074951171875,
-0.002048492431640625,
-0.029022216796875,
-0.006450653076171875,
-0.0031528472900390625,
-0.007312774658203125,
0.03338623046875,
0.0227813720703125,
0.02154541015625,
-0.01407623291015625,
-0.04437255859375,
-0.003986358642578125,
0.04229736328125,
0.00386810302734375,
0.0008034706115722656,
0.0187530517578125,
-0.00732421875,
-0.014923095703125,
0.01079559326171875,
0.0014123916625976562,
0.03607177734375,
-0.01727294921875,
0.039031982421875,
0.0257568359375,
0.008453369140625,
0.0217132568359375,
0.015228271484375,
-0.0364990234375,
0.01146697998046875,
-0.02886962890625,
-0.026123046875,
-0.0075225830078125,
0.06707763671875,
-0.0096282958984375,
0.049102783203125,
0.026214599609375,
-0.029876708984375,
0.002574920654296875,
0.00890350341796875,
0.00676727294921875,
-0.0033473968505859375,
0.026336669921875,
0.025543212890625,
0.0179443359375,
-0.00909423828125,
-0.0256195068359375,
-0.01128387451171875,
0.0134124755859375,
0.0122833251953125,
0.034637451171875,
-0.0239410400390625,
-0.007427215576171875,
0.01085662841796875,
0.01377105712890625,
-0.003658294677734375,
0.02703857421875,
0.0163421630859375,
-0.01329803466796875,
0.01210784912109375,
0.030181884765625,
0.00612640380859375,
0.03912353515625,
-0.005336761474609375,
-0.0190582275390625,
-0.0185089111328125,
-0.04931640625,
0.06414794921875,
-0.069580078125,
-0.0311279296875,
0.05743408203125,
-0.0172882080078125,
0.027862548828125,
-0.006954193115234375,
0.05078125,
-0.00989532470703125,
0.003208160400390625,
-0.015960693359375,
-0.030426025390625,
0.00446319580078125,
0.01312255859375,
0.0133514404296875,
0.063232421875,
-0.05181884765625,
-0.0653076171875,
-0.051788330078125,
0.0160064697265625,
-0.0640869140625,
-0.0181427001953125,
0.0550537109375,
-0.0582275390625,
-0.0008091926574707031,
-0.0360107421875,
-0.038787841796875,
-0.01454925537109375,
-0.004161834716796875,
-0.0003352165222167969,
0.00016951560974121094,
-0.0169677734375,
-0.02520751953125,
0.015289306640625,
-0.005664825439453125,
0.042449951171875,
-0.00846099853515625,
-0.003070831298828125,
-0.004764556884765625,
0.0595703125,
-0.0005846023559570312,
-0.02142333984375,
0.002109527587890625,
-0.04058837890625,
0.002193450927734375,
0.020111083984375,
0.020416259765625,
-0.0272369384765625,
-0.0126495361328125,
0.00757598876953125,
-0.0021839141845703125,
0.015045166015625,
-0.024444580078125,
-0.015411376953125,
-0.007587432861328125,
-0.009674072265625,
0.0102691650390625,
0.0233154296875,
-0.00926971435546875,
0.0004749298095703125,
0.0361328125,
-0.0265960693359375,
-0.0041961669921875,
-0.005367279052734375,
-0.0272979736328125,
0.0065155029296875,
0.003681182861328125,
0.002872467041015625,
-0.01441192626953125,
0.03033447265625,
0.020751953125,
-0.010986328125,
0.04193115234375,
-0.0299224853515625,
-0.0238800048828125,
0.0134429931640625,
0.0301361083984375,
-0.035308837890625,
0.01381683349609375,
-0.0216064453125,
0.00225830078125,
-0.005077362060546875,
0.026123046875,
0.01480865478515625,
0.040985107421875,
0.0220794677734375,
-0.043426513671875,
0.031341552734375,
-0.033843994140625,
-0.02349853515625,
-0.0235137939453125,
0.0179290771484375,
-0.0027618408203125,
0.0309906005859375,
-0.03448486328125,
-0.0176239013671875,
0.036224365234375,
0.012115478515625,
-0.04071044921875,
-0.0169830322265625,
-0.065185546875,
-0.0096588134765625,
-0.1005859375,
0.0293426513671875,
0.0028705596923828125,
-0.0345458984375,
-0.0212249755859375,
-0.01910400390625,
-0.0625,
-0.0438232421875,
0.046966552734375,
0.0221099853515625,
0.0032749176025390625,
0.0303955078125,
-0.0180511474609375,
0.0085296630859375,
-0.032440185546875,
0.0102386474609375,
-0.09063720703125,
-0.01947021484375,
0.00562286376953125,
0.05126953125,
-0.01038360595703125,
0.0007104873657226562,
-0.0322265625,
0.033966064453125,
0.005462646484375,
0.04290771484375,
-0.0222930908203125,
-0.0010662078857421875,
0.0098876953125,
-0.0186767578125,
-0.0098876953125,
-0.0193023681640625,
0.0092315673828125,
-0.038726806640625,
-0.028167724609375,
0.01107025146484375,
-0.05084228515625,
0.042755126953125,
-0.030853271484375,
-0.01390838623046875,
0.01285552978515625,
-0.05023193359375,
-0.019989013671875,
0.06353759765625,
-0.0201873779296875,
0.0233917236328125,
-0.08563232421875,
-0.03253173828125,
0.0091094970703125,
-0.001514434814453125,
-0.00907135009765625,
0.004131317138671875,
0.033355712890625,
0.01531982421875,
-0.008758544921875,
0.01416015625,
0.01318359375,
0.0175933837890625,
0.0026798248291015625,
0.053497314453125,
0.03338623046875,
-0.00272369384765625,
0.0203399658203125,
0.0014200210571289062,
-0.0004754066467285156,
-0.0287017822265625,
0.0601806640625,
-0.01702880859375,
-0.003993988037109375,
0.0083465576171875,
-0.032684326171875,
0.0117950439453125,
0.0237884521484375,
0.0225982666015625,
-0.00838470458984375,
-0.0189666748046875,
0.0164794921875,
0.034820556640625,
-0.03369140625,
-0.03411865234375,
-0.0020313262939453125,
-0.004604339599609375,
-0.005779266357421875,
0.0369873046875,
0.0237274169921875,
0.01428985595703125,
0.00007468461990356445,
0.02154541015625,
0.0108489990234375,
-0.0047454833984375,
-0.0238494873046875,
-0.0218353271484375,
0.040283203125,
-0.03875732421875,
-0.0007581710815429688,
0.0189056396484375,
-0.00560760498046875,
0.0355224609375,
-0.038482666015625,
-0.08514404296875,
-0.00543212890625,
0.0003237724304199219,
0.02655029296875,
0.045654296875,
0.015655517578125,
0.041656494140625,
0.039459228515625,
-0.00983428955078125,
-0.015777587890625,
-0.033111572265625,
0.0533447265625,
-0.056121826171875,
0.031890869140625,
0.00986480712890625,
0.01267242431640625,
0.01416778564453125,
0.062255859375,
0.0244598388671875,
0.0220184326171875,
-0.0347900390625,
0.0399169921875,
0.0313720703125,
0.021331787109375,
0.01212310791015625,
-0.017425537109375,
-0.0165863037109375,
0.02362060546875,
-0.0286102294921875,
-0.0257110595703125,
0.0222320556640625,
0.04595947265625,
0.041473388671875,
0.008148193359375,
-0.031585693359375,
-0.007110595703125,
-0.044830322265625,
-0.0033168792724609375,
0.039520263671875,
-0.0256805419921875,
-0.06982421875,
-0.0477294921875,
-0.01410675048828125,
0.032379150390625,
-0.038970947265625,
-0.0018339157104492188,
-0.011322021484375,
-0.04168701171875,
0.0036411285400390625,
-0.01023101806640625,
-0.0084228515625,
-0.01194000244140625,
-0.0183258056640625,
0.004184722900390625,
-0.0035610198974609375,
-0.005855560302734375,
-0.033355712890625,
-0.0168609619140625,
-0.015380859375,
-0.00725555419921875,
0.055877685546875,
-0.0323486328125,
0.074462890625,
-0.0009036064147949219,
-0.04656982421875,
0.031036376953125,
0.026580810546875,
0.0278167724609375,
0.0224151611328125,
-0.025421142578125,
-0.009613037109375,
-0.03997802734375,
-0.007244110107421875,
-0.0106658935546875,
-0.03594970703125,
-0.0174102783203125,
-0.0027523040771484375,
0.031524658203125,
0.036895751953125,
-0.00921630859375,
-0.06475830078125,
-0.043121337890625,
-0.03179931640625,
0.03765869140625,
0.050506591796875,
-0.01552581787109375,
0.039398193359375,
0.0310821533203125,
0.0215301513671875,
0.029541015625,
0.043060302734375,
0.004467010498046875,
-0.03753662109375,
0.0037364959716796875,
-0.03204345703125,
-0.038116455078125,
0.0350341796875,
-0.03765869140625,
-0.00969696044921875,
0.0001926422119140625,
-0.009979248046875,
0.00934600830078125,
-0.007110595703125,
-0.006439208984375,
-0.0238037109375,
0.031890869140625,
0.00327301025390625,
0.03814697265625,
-0.00876617431640625,
0.01556396484375,
0.02264404296875,
-0.0335693359375,
-0.0703125,
0.0792236328125,
-0.01137542724609375,
0.07275390625,
-0.0254364013671875,
-0.028656005859375,
0.08087158203125,
0.08026123046875,
-0.038482666015625,
0.019927978515625,
0.032440185546875,
-0.032501220703125,
0.01995849609375,
-0.03765869140625,
0.01084136962890625,
0.045318603515625,
0.048614501953125,
-0.01004791259765625,
0.0037250518798828125,
0.0362548828125,
-0.0179901123046875,
0.023162841796875,
0.053558349609375,
0.0714111328125,
-0.09130859375,
0.01424407958984375,
0.0228271484375,
-0.0189971923828125,
0.01776123046875,
0.0185546875,
-0.01580810546875,
-0.029083251953125,
0.00366973876953125,
-0.0284576416015625,
-0.018096923828125,
0.005199432373046875,
0.005035400390625,
-0.0095672607421875,
-0.0237579345703125,
0.00923919677734375,
0.001552581787109375,
0.0401611328125,
-0.0311737060546875,
-0.015716552734375,
0.012237548828125,
-0.01421356201171875,
-0.01251220703125,
0.0015850067138671875,
-0.04522705078125,
-0.0858154296875,
-0.03753662109375,
-0.025177001953125,
-0.0174102783203125,
0.0285186767578125,
-0.00902557373046875,
-0.0219268798828125,
0.0267181396484375,
-0.036773681640625,
0.036346435546875,
0.005313873291015625,
-0.0526123046875,
-0.027984619140625,
-0.037872314453125,
0.007297515869140625,
0.02838134765625,
-0.03973388671875,
0.022003173828125,
-0.01568603515625,
-0.0180511474609375,
-0.017059326171875,
-0.035003662109375,
0.08343505859375,
-0.05926513671875,
-0.011138916015625,
-0.01511383056640625,
0.01287078857421875,
0.01505279541015625,
-0.01271820068359375,
0.02227783203125,
-0.00476837158203125,
0.0182342529296875,
-0.0226287841796875,
-0.01910400390625,
-0.03857421875,
-0.042572021484375,
-0.059783935546875,
0.0009255409240722656,
-0.001773834228515625,
0.035980224609375,
0.0037078857421875,
-0.03326416015625,
0.006420135498046875,
-0.030731201171875,
-0.0159759521484375,
0.03631591796875,
0.004077911376953125,
0.0775146484375,
-0.00927734375,
-0.0123291015625,
0.05938720703125,
0.054443359375,
0.018524169921875,
0.00507354736328125,
-0.0220947265625,
-0.016876220703125,
0.03179931640625,
0.046844482421875,
0.0113372802734375,
0.00909423828125,
-0.0178070068359375,
0.006343841552734375,
0.0013828277587890625,
-0.018463134765625,
0.01953125,
-0.021240234375,
-0.050567626953125,
-0.0002703666687011719,
0.04107666015625,
0.0543212890625,
0.0154266357421875,
0.036376953125,
-0.015716552734375,
0.01093292236328125,
0.037841796875,
-0.03460693359375,
-0.02813720703125,
0.03167724609375,
0.066162109375,
-0.038604736328125,
-0.07501220703125,
-0.002521514892578125,
0.03912353515625,
0.07366943359375,
0.05523681640625,
0.061676025390625,
0.0322265625,
0.0740966796875,
-0.02130126953125,
0.04986572265625,
-0.0100555419921875,
-0.0406494140625,
0.0152130126953125,
0.011383056640625,
0.00048732757568359375,
-0.016143798828125,
0.0413818359375,
0.034515380859375,
0.015625,
-0.03753662109375,
-0.03167724609375,
0.020050048828125,
0.0245513916015625,
-0.006397247314453125,
-0.0011281967163085938,
0.0000979304313659668,
-0.0222320556640625,
0.06512451171875,
-0.074951171875,
-0.0191497802734375,
0.00992584228515625,
0.04913330078125,
-0.0271453857421875,
-0.0312347412109375,
-0.01184844970703125,
-0.04510498046875,
-0.046722412109375,
-0.0141143798828125,
0.03240966796875,
0.03192138671875,
0.0137939453125,
0.0380859375,
0.033905029296875,
-0.0121612548828125,
-0.045013427734375,
0.008758544921875,
0.02197265625,
0.0404052734375,
-0.06463623046875,
-0.00662994384765625,
0.031463623046875,
0.05291748046875,
0.0166015625,
0.034088134765625,
0.059417724609375,
0.0003287792205810547,
-0.06329345703125,
-0.00177001953125,
-0.0138702392578125,
-0.042755126953125,
0.0035686492919921875,
-0.0146484375,
0.0274658203125,
0.034637451171875,
0.00002378225326538086,
-0.0141448974609375,
0.0132904052734375,
0.05657958984375,
0.006206512451171875,
0.01248931884765625,
0.0131378173828125,
-0.031890869140625,
0.01212310791015625,
0.0272064208984375,
0.07110595703125,
0.041656494140625,
-0.04864501953125,
0.005542755126953125,
-0.048858642578125,
-0.04962158203125,
0.0159759521484375,
0.025390625,
-0.011993408203125,
0.021484375,
0.035888671875,
-0.01271820068359375,
-0.0012998580932617188,
-0.00643157958984375,
0.038055419921875,
0.0005593299865722656,
0.0017061233520507812,
0.0040740966796875,
-0.011627197265625,
-0.01279449462890625,
-0.0189971923828125,
0.03887939453125,
0.01203155517578125,
0.0809326171875,
-0.032135009765625,
0.0203704833984375,
-0.022796630859375,
0.0007672309875488281,
-0.0277099609375,
-0.0450439453125,
0.06103515625,
-0.0006146430969238281,
-0.00843048095703125,
-0.0014944076538085938,
0.002628326416015625,
0.0010709762573242188,
0.038421630859375,
-0.058685302734375,
0.023590087890625,
-0.0300445556640625,
0.0111083984375,
-0.04278564453125,
0.0149993896484375,
-0.0249481201171875,
-0.042449951171875,
-0.054534912109375,
0.0194549560546875,
0.0014505386352539062,
-0.0195159912109375,
-0.051239013671875,
0.03558349609375,
-0.005001068115234375,
-0.00792694091796875,
0.004596710205078125,
-0.0031528472900390625,
0.01468658447265625,
0.0250244140625,
-0.0323486328125,
0.048583984375,
0.039520263671875,
-0.00714111328125,
0.0285186767578125,
0.0279541015625,
-0.019378662109375,
0.034820556640625,
-0.0230255126953125,
0.0328369140625,
0.04803466796875,
0.042205810546875,
-0.03253173828125,
0.0151519775390625,
0.04052734375,
-0.015350341796875,
0.01528167724609375,
0.0504150390625,
-0.01354217529296875,
0.005214691162109375,
-0.005733489990234375,
0.00489044189453125,
0.00949859619140625,
-0.037567138671875,
-0.07135009765625,
-0.0057373046875,
-0.0036373138427734375,
-0.003391265869140625,
-0.04132080078125,
0.034698486328125,
-0.0110015869140625,
0.0100860595703125,
-0.032501220703125,
0.033966064453125,
-0.008270263671875,
-0.006015777587890625,
-0.03143310546875,
0.01125335693359375,
-0.006893157958984375,
0.00656890869140625,
0.0224151611328125,
0.0192718505859375,
0.00818634033203125,
-0.004680633544921875,
0.0190277099609375,
0.0214080810546875,
0.01496124267578125,
0.057952880859375,
-0.0148468017578125,
-0.035736083984375,
-0.029388427734375,
0.0400390625,
0.00884246826171875,
-0.08062744140625,
-0.010101318359375,
-0.0452880859375,
0.01079559326171875,
0.01253509521484375,
-0.01006317138671875,
0.0196533203125,
-0.039276123046875,
-0.05169677734375,
0.08233642578125,
-0.007648468017578125,
-0.0215911865234375,
-0.0210418701171875,
0.0220184326171875,
-0.0048675537109375,
0.0135955810546875,
0.0103302001953125,
-0.01163482666015625,
-0.006927490234375,
0.00827789306640625,
-0.017120361328125,
-0.0037937164306640625,
0.0160980224609375,
-0.0151824951171875,
-0.037933349609375,
-0.01398468017578125,
-0.0206146240234375,
-0.058135986328125,
0.0301971435546875,
-0.03424072265625,
0.03155517578125,
0.01342010498046875,
-0.042510986328125,
-0.0220489501953125,
0.0007562637329101562,
-0.01290130615234375,
-0.0003814697265625,
-0.0171966552734375,
-0.058258056640625,
-0.0186309814453125,
0.05804443359375,
0.03265380859375,
0.0172576904296875,
-0.00727081298828125,
-0.0280609130859375,
-0.0299224853515625,
-0.005390167236328125,
-0.0268096923828125,
0.01483154296875,
-0.07696533203125,
-0.0244598388671875,
0.001979827880859375,
-0.0121307373046875,
-0.0022907257080078125,
-0.002948760986328125,
-0.014678955078125,
0.007472991943359375,
0.036651611328125,
-0.00473785400390625,
-0.00994110107421875,
0.0220489501953125,
-0.0211639404296875,
-0.016845703125,
-0.0278472900390625,
-0.0262298583984375,
0.0032520294189453125,
-0.0418701171875,
-0.0215606689453125,
-0.052398681640625,
-0.053619384765625,
-0.02349853515625,
0.042938232421875,
-0.038299560546875,
0.034027099609375,
-0.048828125,
0.0026874542236328125,
0.01157379150390625,
0.0080413818359375,
-0.006534576416015625,
0.0094757080078125,
0.0171051025390625,
0.019439697265625,
-0.005615234375,
-0.025848388671875,
-0.034912109375,
0.070068359375,
-0.0090484619140625,
0.033355712890625,
-0.004543304443359375,
0.02215576171875,
0.043914794921875,
-0.0104827880859375,
-0.00872039794921875,
0.0268402099609375,
-0.0305023193359375,
-0.0272979736328125,
-0.0081024169921875,
-0.01241302490234375,
0.00948333740234375,
-0.0011501312255859375
] |
ebad8a8f6c8df63849c63a97f78b7664cfd9237f | Wordpress Stackexchange
Q: Is wp_read_audio_metadata() function deprecated? I am trying to use the function wp_read_audio_metadata() to read the metadata for an mp3 file uploaded to a post using acf's file field.
Below is my code:
<?php
$audio_file = get_field('archive_audio_file');
$audio_file_id = $audio_file['id'];
$audio_file_path = get_attached_file( $audio_file_id);
var_dump(wp_read_audio_metadata($audio_file_path));
?>
When using that code I receive this error on the front end:
Fatal error: Call to undefined function wp_read_audio_metadata()
Am I using the code incorrectly? or this function is deprecated? because I couldn't find it in wp-includes/media.php
A: wp_read_audio_metadata() is not deprecated. It's located in /wp-admin/includes/media.php, which is not loaded on the front end, hence the error your're getting.
You are using the function correctly. You can make wp_read_audio_metadata() available by including wp-admin/includes/media.php before calling the function, e.g.:
require_once( ABSPATH . 'wp-admin/includes/media.php' );
$audio_file_path = get_attached_file( 1821 ); // example attachment ID
var_dump( wp_read_audio_metadata( $audio_file_path ) );
| Q: Is wp_read_audio_metadata() function deprecated? I am trying to use the function wp_read_audio_metadata() to read the metadata for an mp3 file uploaded to a post using acf's file field.
Below is my code:
<?php
$audio_file = get_field('archive_audio_file');
$audio_file_id = $audio_file['id'];
$audio_file_path = get_attached_file( $audio_file_id);
var_dump(wp_read_audio_metadata($audio_file_path));
?>
When using that code I receive this error on the front end:
Fatal error: Call to undefined function wp_read_audio_metadata()
Am I using the code incorrectly? or this function is deprecated? because I couldn't find it in wp-includes/media.php
A: wp_read_audio_metadata() is not deprecated. It's located in /wp-admin/includes/media.php, which is not loaded on the front end, hence the error your're getting.
You are using the function correctly. You can make wp_read_audio_metadata() available by including wp-admin/includes/media.php before calling the function, e.g.:
require_once( ABSPATH . 'wp-admin/includes/media.php' );
$audio_file_path = get_attached_file( 1821 ); // example attachment ID
var_dump( wp_read_audio_metadata( $audio_file_path ) );
| wordpress | {
"language": "en",
"length": 143,
"provenance": "stackexchange_00019.jsonl.gz:472472",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/254148"
} | [
0.0305023193359375,
-0.024810791015625,
-0.017608642578125,
-0.08160400390625,
-0.0006117820739746094,
-0.01457977294921875,
-0.0142364501953125,
0.0159759521484375,
0.040557861328125,
0.0310821533203125,
-0.02520751953125,
-0.01018524169921875,
0.000553131103515625,
-0.0016107559204101562,
-0.04071044921875,
-0.0201873779296875,
0.043182373046875,
0.0031757354736328125,
0.05902099609375,
0.021636962890625,
-0.0033626556396484375,
0.04876708984375,
0.0208587646484375,
-0.01239013671875,
-0.011566162109375,
0.00914764404296875,
0.0256500244140625,
-0.0225677490234375,
-0.01025390625,
-0.01544952392578125,
0.005336761474609375,
0.007701873779296875,
0.031097412109375,
0.013946533203125,
-0.034210205078125,
-0.00591278076171875,
0.000774383544921875,
0.01561737060546875,
-0.0130157470703125,
0.0096893310546875,
0.0152587890625,
0.002834320068359375,
-0.0528564453125,
0.047515869140625,
-0.022705078125,
-0.0572509765625,
-0.0155029296875,
-0.056671142578125,
-0.0017175674438476562,
0.02288818359375,
0.01410675048828125,
0.0004744529724121094,
0.01861572265625,
-0.014556884765625,
0.00154876708984375,
0.0067901611328125,
-0.001216888427734375,
0.01131439208984375,
0.01183319091796875,
-0.0003314018249511719,
-0.0129547119140625,
0.01751708984375,
0.01678466796875,
-0.00983428955078125,
0.022430419921875,
0.01033782958984375,
0.043182373046875,
0.018951416015625,
-0.07904052734375,
-0.0150146484375,
0.03271484375,
-0.0450439453125,
-0.016448974609375,
-0.01317596435546875,
0.01416015625,
-0.0015401840209960938,
0.01141357421875,
-0.0005650520324707031,
-0.00844573974609375,
0.037811279296875,
-0.00774383544921875,
-0.034637451171875,
-0.049346923828125,
0.00966644287109375,
0.0006232261657714844,
0.030303955078125,
-0.0011816024780273438,
-0.006755828857421875,
-0.01727294921875,
0.01751708984375,
-0.01495361328125,
0.0465087890625,
0.0250701904296875,
-0.01236724853515625,
-0.04766845703125,
0.006542205810546875,
0.02679443359375,
0.05755615234375,
0.00273895263671875,
0.01010894775390625,
0.0042877197265625,
-0.03778076171875,
-0.00794219970703125,
-0.02850341796875,
0.020843505859375,
0.033111572265625,
-0.03759765625,
-0.0941162109375,
-0.0038909912109375,
0.034515380859375,
-0.0124664306640625,
-0.031951904296875,
-0.031219482421875,
-0.06427001953125,
0.0025730133056640625,
0.082275390625,
-0.0085601806640625,
0.00089263916015625,
0.0215301513671875,
0.01439666748046875,
0.0156402587890625,
0.012176513671875,
-0.0035400390625,
-0.015960693359375,
-0.01055145263671875,
-0.032318115234375,
-0.038238525390625,
0.034027099609375,
0.0000928044319152832,
0.06268310546875,
0.00472259521484375,
-0.01399993896484375,
-0.04638671875,
-0.0089874267578125,
-0.032928466796875,
-0.0163726806640625,
0.0293426513671875,
0.0284271240234375,
0.03521728515625,
-0.0069427490234375,
0.01142120361328125,
-0.025238037109375,
0.01113128662109375,
0.035186767578125,
0.02001953125,
-0.01311492919921875,
0.031158447265625,
0.027618408203125,
-0.0197601318359375,
-0.01444244384765625,
0.0153350830078125,
0.0269317626953125,
0.025146484375,
0.0243988037109375,
0.0074310302734375,
-0.01068115234375,
0.0634765625,
-0.042938232421875,
-0.01264190673828125,
-0.06390380859375,
0.023681640625,
-0.0267181396484375,
-0.0282135009765625,
-0.01360321044921875,
-0.01451873779296875,
0.0198516845703125,
-0.03839111328125,
0.01336669921875,
0.02996826171875,
0.0274505615234375,
0.0621337890625,
-0.0300140380859375,
0.0160675048828125,
0.0216064453125,
0.00783538818359375,
0.01480865478515625,
0.01476287841796875,
0.0165863037109375,
0.02459716796875,
-0.012542724609375,
-0.04315185546875,
-0.040435791015625,
0.08050537109375,
-0.053009033203125,
-0.042694091796875,
0.006870269775390625,
-0.0016536712646484375,
0.0263671875,
0.02886962890625,
0.01226806640625,
0.00789642333984375,
0.007404327392578125,
0.0095672607421875,
0.0185394287109375,
-0.0076446533203125,
-0.057464599609375,
-0.015594482421875,
-0.0088348388671875,
-0.0188751220703125,
0.0088043212890625,
-0.0260772705078125,
0.00817108154296875,
-0.0188446044921875,
0.0207061767578125,
-0.06097412109375,
0.0171661376953125,
-0.032928466796875,
0.02813720703125,
-0.055908203125,
0.00759124755859375,
0.040252685546875,
0.0082855224609375,
-0.040130615234375,
0.020172119140625,
0.022735595703125,
0.024322509765625,
-0.057037353515625,
0.039276123046875,
-0.057464599609375,
0.0753173828125,
-0.0826416015625,
-0.045989990234375,
-0.04559326171875,
0.00662994384765625,
0.0259857177734375,
0.03125,
-0.0054779052734375,
0.01349639892578125,
0.07159423828125,
0.00745391845703125,
0.05816650390625,
-0.0009245872497558594,
0.022064208984375,
-0.00125885009765625,
-0.014251708984375,
-0.00273895263671875,
-0.003978729248046875,
-0.08880615234375,
0.00452423095703125,
0.058349609375,
0.04327392578125,
-0.007843017578125,
-0.0165252685546875,
-0.017242431640625,
0.0452880859375,
-0.03228759765625,
-0.003078460693359375,
-0.0292510986328125,
-0.0298309326171875,
-0.007534027099609375,
-0.01496124267578125,
0.023040771484375,
0.02630615234375,
-0.0264892578125,
-0.01139068603515625,
0.05914306640625,
-0.006717681884765625,
-0.041778564453125,
-0.01517486572265625,
0.0300445556640625,
0.0000023245811462402344,
-0.040252685546875,
-0.014862060546875,
-0.009490966796875,
0.01369476318359375,
0.0245819091796875,
0.02789306640625,
0.02105712890625,
-0.016571044921875,
0.020965576171875,
0.011199951171875,
-0.0028972625732421875,
0.009674072265625,
0.067626953125,
0.011199951171875,
0.0135955810546875,
0.005863189697265625,
-0.0242156982421875,
-0.035858154296875,
0.0274658203125,
-0.007755279541015625,
0.043670654296875,
-0.03277587890625,
-0.0142974853515625,
-0.02947998046875,
-0.040008544921875,
-0.01351165771484375,
0.0160980224609375,
-0.00382232666015625,
0.00382232666015625,
-0.0008401870727539062,
0.0679931640625,
0.0232696533203125,
0.0305023193359375,
0.005298614501953125,
0.0191192626953125,
-0.036376953125,
0.003406524658203125,
-0.01239776611328125,
0.00800323486328125,
0.0308990478515625,
0.06243896484375,
0.04205322265625,
-0.022064208984375,
-0.006328582763671875,
-0.0153350830078125,
-0.0107879638671875,
0.0257110595703125,
-0.004138946533203125,
-0.041168212890625,
-0.0167236328125,
0.0194244384765625,
0.005596160888671875,
-0.01488494873046875,
-0.0202178955078125,
-0.055267333984375,
-0.0275115966796875,
-0.0256500244140625,
-0.12060546875,
-0.040863037109375,
0.0545654296875,
-0.07183837890625,
0.0019502639770507812,
0.0028858184814453125,
-0.060699462890625,
-0.035491943359375,
0.050384521484375,
0.00400543212890625,
0.0226287841796875,
0.00004881620407104492,
-0.046783447265625,
-0.03753662109375,
-0.06683349609375,
-0.06744384765625,
-0.02288818359375,
-0.0177764892578125,
0.01137542724609375,
0.006793975830078125,
0.006282806396484375,
-0.0001819133758544922,
0.03143310546875,
0.006984710693359375,
0.005939483642578125,
-0.0048675537109375,
0.003570556640625,
-0.0231475830078125,
0.0044708251953125,
-0.008544921875,
0.050933837890625,
0.01213836669921875,
-0.0166778564453125,
-0.01163482666015625,
-0.0154876708984375,
0.033966064453125,
0.0242919921875,
0.04327392578125,
0.017486572265625,
0.04583740234375,
0.040069580078125,
-0.004421234130859375,
0.0132598876953125,
0.003055572509765625,
0.0001722574234008789,
0.046478271484375,
-0.00453948974609375,
-0.029083251953125,
0.0259857177734375,
0.005420684814453125,
-0.034942626953125,
0.0010509490966796875,
0.00444793701171875,
-0.034454345703125,
0.01180267333984375,
-0.0287017822265625,
-0.030242919921875,
0.0142974853515625,
0.055023193359375,
0.00559234619140625,
-0.0136260986328125,
0.0211181640625,
0.03106689453125,
0.041168212890625,
-0.059051513671875,
-0.0146636962890625,
0.00458526611328125,
0.03338623046875,
-0.029876708984375,
0.00628662109375,
-0.018768310546875,
-0.0116119384765625,
-0.027740478515625,
0.023712158203125,
0.014251708984375,
-0.00768280029296875,
0.016571044921875,
0.0025196075439453125,
-0.0288848876953125,
-0.004108428955078125,
-0.050323486328125,
0.006988525390625,
0.01262664794921875,
-0.035980224609375,
-0.0244293212890625,
-0.0135498046875,
0.01462554931640625,
-0.0130767822265625,
0.03350830078125,
-0.0238037109375,
0.037261962890625,
-0.05126953125,
0.019683837890625,
0.06109619140625,
0.007114410400390625,
0.0290985107421875,
-0.025665283203125,
-0.045654296875,
-0.09783935546875,
-0.007678985595703125,
-0.01280975341796875,
0.0714111328125,
-0.00836181640625,
0.0126190185546875,
-0.027099609375,
0.049468994140625,
0.038177490234375,
-0.0011491775512695312,
0.023529052734375,
-0.01522064208984375,
0.01251220703125,
-0.004726409912109375,
0.02880859375,
-0.032501220703125,
0.001232147216796875,
-0.04742431640625,
-0.04962158203125,
-0.016021728515625,
-0.04638671875,
0.024627685546875,
-0.02227783203125,
0.00006908178329467773,
-0.027587890625,
-0.023162841796875,
-0.01078033447265625,
0.017333984375,
-0.007965087890625,
0.0012502670288085938,
-0.0458984375,
-0.036285400390625,
0.024017333984375,
0.0199127197265625,
-0.0189971923828125,
0.0130615234375,
0.048004150390625,
0.0142669677734375,
-0.02655029296875,
-0.062286376953125,
0.01294708251953125,
0.028289794921875,
-0.04376220703125,
0.0273590087890625,
-0.0008301734924316406,
-0.0270538330078125,
0.057891845703125,
-0.01526641845703125,
0.047882080078125,
-0.034912109375,
-0.0170745849609375,
-0.005092620849609375,
-0.0120697021484375,
0.0297088623046875,
0.0130462646484375,
0.0212554931640625,
0.032867431640625,
-0.0272216796875,
0.007328033447265625,
-0.0264129638671875,
0.020111083984375,
-0.01506805419921875,
0.0255584716796875,
-0.020538330078125,
-0.09381103515625,
0.0251007080078125,
-0.0469970703125,
0.04644775390625,
0.02490234375,
-0.007122039794921875,
0.091796875,
0.028778076171875,
0.02130126953125,
0.00325775146484375,
0.04461669921875,
-0.01812744140625,
0.040069580078125,
0.029296875,
-0.002109527587890625,
-0.0411376953125,
-0.021942138671875,
0.006923675537109375,
-0.0191192626953125,
-0.0478515625,
0.01367950439453125,
-0.0178985595703125,
0.035888671875,
0.0126190185546875,
-0.00872039794921875,
0.031494140625,
0.032958984375,
-0.01476287841796875,
0.00029587745666503906,
-0.0255279541015625,
0.0073089599609375,
-0.0289154052734375,
0.0303955078125,
0.0111083984375,
0.002811431884765625,
-0.002361297607421875,
0.09063720703125,
0.0024471282958984375,
0.04022216796875,
-0.031494140625,
-0.0008311271667480469,
0.0015249252319335938,
0.0677490234375,
0.01116943359375,
-0.046722412109375,
-0.0038013458251953125,
0.05340576171875,
0.0188751220703125,
-0.0491943359375,
0.0004870891571044922,
0.029388427734375,
0.047149658203125,
-0.046142578125,
-0.053924560546875,
0.0292510986328125,
-0.037139892578125,
-0.006435394287109375,
0.03399658203125,
-0.042388916015625,
-0.0706787109375,
-0.004425048828125,
0.043121337890625,
0.0472412109375,
-0.040252685546875,
-0.0206146240234375,
0.0338134765625,
-0.004917144775390625,
0.038787841796875,
-0.02435302734375,
-0.037841796875,
0.0283966064453125,
0.0416259765625,
0.0416259765625,
-0.019287109375,
-0.031890869140625,
-0.031890869140625,
-0.004177093505859375,
-0.0411376953125,
-0.003337860107421875,
0.0731201171875,
-0.0029582977294921875,
-0.01222991943359375,
0.0003368854522705078,
-0.0211639404296875,
-0.00214385986328125,
0.008056640625,
0.0447998046875,
-0.0070648193359375,
-0.0182952880859375,
-0.015777587890625,
-0.0263671875,
-0.0340576171875,
-0.0094146728515625,
-0.023101806640625,
-0.03326416015625,
0.005069732666015625,
-0.00579833984375,
0.0211029052734375,
0.036956787109375,
0.0694580078125,
0.042144775390625,
0.0211029052734375,
-0.04998779296875,
0.05462646484375,
-0.01409149169921875,
0.0181427001953125,
0.019195556640625,
0.001560211181640625,
-0.0004172325134277344,
-0.00736236572265625,
-0.007091522216796875,
-0.001964569091796875,
0.009490966796875,
0.03167724609375,
-0.018218994140625,
-0.023529052734375,
-0.01364898681640625,
-0.051361083984375,
0.053009033203125,
-0.00704193115234375,
0.0180206298828125,
-0.01751708984375,
-0.0109100341796875,
-0.0291595458984375,
0.0361328125,
-0.02532958984375,
0.0242156982421875,
-0.0181732177734375,
-0.017822265625,
0.0352783203125,
-0.019134521484375,
-0.035003662109375,
0.057159423828125,
-0.0221710205078125,
0.053924560546875,
0.025482177734375,
-0.006938934326171875,
0.0250244140625,
0.046875,
0.00324249267578125,
0.0148773193359375,
0.002079010009765625,
-0.00878143310546875,
-0.0181427001953125,
0.03179931640625,
0.0156707763671875,
-0.045013427734375,
0.0582275390625,
0.01971435546875,
0.0221099853515625,
0.05877685546875,
-0.0126190185546875,
-0.03594970703125,
-0.04156494140625,
-0.0280609130859375,
0.05877685546875,
-0.019927978515625,
-0.006107330322265625,
-0.03717041015625,
-0.00983428955078125,
-0.01371002197265625,
-0.025726318359375,
-0.035919189453125,
0.053070068359375,
-0.01206207275390625,
-0.012481689453125,
0.0165863037109375,
0.0020885467529296875,
0.00614166259765625,
-0.01399993896484375,
0.01373291015625,
0.018341064453125,
0.0181732177734375,
-0.00797271728515625,
0.00806427001953125,
0.0181884765625,
0.01641845703125,
0.01385498046875,
-0.045806884765625,
-0.02655029296875,
-0.0212860107421875,
-0.01313018798828125,
-0.0178070068359375,
-0.01983642578125,
-0.000453948974609375,
0.03759765625,
0.061309814453125,
0.0169677734375,
0.0311126708984375,
-0.0278778076171875,
0.00496673583984375,
0.019989013671875,
-0.0304412841796875,
-0.060699462890625,
0.0218048095703125,
0.06982421875,
-0.055450439453125,
0.038818359375,
0.0169830322265625,
-0.02862548828125,
0.0008931159973144531,
0.0361328125,
0.09552001953125,
-0.0261077880859375,
-0.021392822265625,
0.052093505859375,
0.0161285400390625,
-0.0321044921875,
0.0294647216796875,
0.06524658203125,
-0.029632568359375,
-0.0287017822265625,
0.0305633544921875,
-0.028533935546875,
-0.048431396484375,
0.030242919921875,
-0.049468994140625,
0.093505859375,
0.0352783203125,
0.0072479248046875,
0.0167083740234375,
0.0252838134765625,
-0.0452880859375,
0.0061798095703125,
-0.0307464599609375,
0.01262664794921875,
0.0372314453125,
-0.0111846923828125,
0.0007038116455078125,
-0.006488800048828125,
-0.0150146484375,
0.0254669189453125,
0.027862548828125,
0.01123046875,
0.001476287841796875,
-0.01983642578125,
-0.021514892578125,
-0.0019969940185546875,
-0.0272674560546875,
0.028656005859375,
0.021148681640625,
-0.031829833984375,
0.028076171875,
-0.0289306640625,
0.016998291015625,
-0.0467529296875,
0.036376953125,
0.0091552734375,
0.0209808349609375,
0.047210693359375,
-0.038604736328125,
0.01078033447265625,
-0.01207733154296875,
-0.033721923828125,
0.0283966064453125,
-0.0579833984375,
0.0144500732421875,
0.004787445068359375,
-0.006046295166015625,
-0.020843505859375,
0.014801025390625,
-0.0263214111328125,
0.03533935546875,
-0.0281982421875,
-0.0161285400390625,
0.018341064453125,
0.0202484130859375,
-0.00994873046875,
-0.0153961181640625,
-0.0247039794921875,
-0.02142333984375,
0.01448822021484375,
0.0587158203125,
0.005161285400390625,
0.0282745361328125,
0.004638671875,
0.0670166015625,
0.0014171600341796875,
0.0263824462890625,
-0.049102783203125,
-0.00666046142578125,
0.023223876953125,
-0.007381439208984375,
-0.0304107666015625,
-0.0037784576416015625,
0.0070648193359375,
0.02496337890625,
0.0136871337890625,
-0.0406494140625,
0.022674560546875,
0.0193023681640625,
0.03192138671875,
0.004852294921875,
0.01416778564453125,
-0.05853271484375,
-0.0137176513671875,
-0.020751953125,
-0.0019931793212890625,
0.01285552978515625,
0.04022216796875,
-0.0012798309326171875,
0.02520751953125,
-0.01160430908203125,
-0.009735107421875,
0.0014801025390625,
0.0250244140625,
-0.0203094482421875,
-0.005977630615234375,
-0.0394287109375,
-0.0992431640625,
0.040130615234375,
0.0445556640625,
0.046722412109375,
0.03424072265625,
0.00675201416015625,
-0.0496826171875,
-0.04742431640625,
0.0230560302734375,
0.04376220703125,
-0.043701171875,
-0.0158843994140625,
-0.04241943359375,
0.0002257823944091797,
0.0328369140625,
0.0113525390625,
0.01143646240234375,
-0.0164337158203125,
0.03985595703125,
-0.005054473876953125,
0.0046539306640625,
0.002193450927734375,
0.0020389556884765625,
0.000713348388671875,
-0.0279541015625,
-0.0302276611328125,
0.00970458984375,
-0.06939697265625,
-0.00450897216796875,
-0.04937744140625,
-0.023406982421875,
0.03216552734375,
0.0273895263671875,
-0.0293121337890625,
0.04547119140625,
-0.00946044921875,
0.038818359375,
0.0172882080078125,
-0.049224853515625,
-0.0015506744384765625,
-0.017913818359375,
0.0280303955078125,
-0.002353668212890625,
0.0024852752685546875,
-0.0208892822265625,
-0.006732940673828125,
0.051483154296875,
0.024322509765625,
0.0771484375,
-0.040863037109375,
0.0218963623046875,
-0.0052642822265625,
0.0300445556640625,
-0.031402587890625,
0.00962066650390625,
-0.009674072265625,
0.0260162353515625,
0.023468017578125,
-0.0220794677734375,
0.0102081298828125,
0.052947998046875,
0.0206146240234375,
-0.0236663818359375,
0.0030612945556640625,
0.021820068359375,
-0.00006747245788574219,
-0.006374359130859375,
0.015228271484375,
-0.03173828125,
-0.055450439453125,
-0.0460205078125,
0.0270233154296875,
0.0016536712646484375,
0.0225067138671875,
-0.01267242431640625,
0.005420684814453125,
0.0277862548828125,
0.0204010009765625,
0.004512786865234375,
0.03668212890625,
0.008056640625,
0.0194244384765625,
-0.037506103515625,
0.0245361328125,
-0.033660888671875,
-0.03411865234375,
0.05767822265625,
-0.01291656494140625,
0.033660888671875,
-0.00913238525390625,
0.0657958984375,
0.0206756591796875,
0.017059326171875,
0.0277557373046875,
-0.035400390625,
-0.00595855712890625,
0.0112152099609375,
0.0103302001953125,
0.02392578125,
-0.060791015625,
-0.031951904296875,
-0.0924072265625,
0.010528564453125,
0.02838134765625,
-0.0440673828125,
0.01488494873046875,
-0.0257110595703125,
0.01477813720703125,
0.0118408203125,
0.006267547607421875,
-0.0390625,
0.03265380859375,
-0.007282257080078125,
0.00945281982421875,
-0.0037288665771484375,
0.0194854736328125,
-0.02972412109375,
0.0138702392578125,
-0.07000732421875,
-0.08514404296875,
-0.0577392578125,
0.05126953125,
-0.08599853515625,
0.03814697265625,
0.041778564453125,
-0.043548583984375,
-0.0269927978515625,
0.025238037109375,
0.0419921875,
0.06353759765625,
-0.00638580322265625,
-0.0357666015625,
-0.02801513671875,
0.006565093994140625,
0.010772705078125,
-0.007320404052734375,
0.0044097900390625,
-0.0300750732421875,
-0.023681640625,
-0.00940704345703125,
0.008514404296875,
0.01018524169921875,
-0.03973388671875,
-0.069580078125,
0.01273345947265625,
0.00754547119140625,
-0.037811279296875,
-0.050628662109375,
0.01617431640625,
-0.01163482666015625,
0.040557861328125,
-0.01409912109375,
-0.00457763671875,
0.005367279052734375,
0.042266845703125,
0.037261962890625,
-0.017791748046875,
0.03936767578125,
0.0126495361328125,
-0.022125244140625,
0.032135009765625,
0.029510498046875,
0.0116424560546875,
-0.0164337158203125,
-0.01480865478515625,
0.003021240234375,
0.004863739013671875,
-0.0379638671875,
-0.07086181640625,
0.006191253662109375,
0.0278167724609375,
-0.017547607421875,
0.037994384765625,
-0.045745849609375,
0.00608062744140625,
0.059661865234375,
0.0858154296875,
0.020477294921875,
-0.0236053466796875,
-0.006473541259765625,
-0.0125732421875,
-0.036041259765625,
-0.0240631103515625,
0.0189666748046875,
-0.06158447265625,
-0.018157958984375,
-0.0025157928466796875,
-0.01922607421875,
0.00475311279296875,
0.0062408447265625,
-0.04119873046875,
0.009521484375,
0.01018524169921875,
-0.004703521728515625,
-0.0357666015625,
-0.03387451171875,
0.044342041015625,
-0.0308380126953125,
-0.0116119384765625,
0.037200927734375,
0.00531005859375,
0.0189208984375,
0.06048583984375,
0.0170440673828125,
0.0151519775390625,
-0.007617950439453125,
-0.0163726806640625,
0.0281219482421875,
-0.01490020751953125,
0.0220947265625,
-0.01505279541015625,
-0.0005764961242675781,
0.0045928955078125,
0.0070037841796875,
0.0011491775512695312,
0.00772857666015625,
0.005237579345703125,
-0.011260986328125,
0.01552581787109375,
-0.032623291015625,
0.002079010009765625,
-0.0220947265625,
0.007358551025390625,
-0.0243682861328125,
0.0255584716796875,
0.0208892822265625,
0.01922607421875,
0.0086669921875,
0.0214996337890625,
-0.0083160400390625,
-0.02069091796875,
-0.014923095703125,
-0.0302886962890625,
-0.0091705322265625,
-0.0113525390625
] |
5b0c9028653561b263169dfe5f785103d296fe7d | Wordpress Stackexchange
Q: WordPress 4.7 - Custom Video Header – Stop Autoplay I am using WordPress’ latest custom video header feature. Anybody has an idea how to stop autoplay? Checked filters but did not find a way to disable autoplay.
/wp-includes/js/wp-custom-header.js has the default settings. However not getting any clue how I may override it without editing core files
A: I don't think there is a need to override any core files. You can just use javascript to stop autoplaying the video.
I tested the following code on Twenty Seventeen theme and it works fine.
For example:
$( document ).ready( function() {
$( document ).on( 'wp-custom-header-video-loaded', function() {
$("#wp-custom-header-video").attr('autoplay',false);
});
});
This does the trick.
| Q: WordPress 4.7 - Custom Video Header – Stop Autoplay I am using WordPress’ latest custom video header feature. Anybody has an idea how to stop autoplay? Checked filters but did not find a way to disable autoplay.
/wp-includes/js/wp-custom-header.js has the default settings. However not getting any clue how I may override it without editing core files
A: I don't think there is a need to override any core files. You can just use javascript to stop autoplaying the video.
I tested the following code on Twenty Seventeen theme and it works fine.
For example:
$( document ).ready( function() {
$( document ).on( 'wp-custom-header-video-loaded', function() {
$("#wp-custom-header-video").attr('autoplay',false);
});
});
This does the trick.
| wordpress | {
"language": "en",
"length": 113,
"provenance": "stackexchange_00019.jsonl.gz:472497",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/254234"
} | [
0.06561279296875,
0.0096893310546875,
0.021728515625,
-0.0213470458984375,
0.0343017578125,
-0.011962890625,
0.06488037109375,
-0.040313720703125,
-0.00797271728515625,
-0.004467010498046875,
-0.01983642578125,
0.006378173828125,
-0.01102447509765625,
-0.01178741455078125,
0.0188446044921875,
-0.03717041015625,
0.0506591796875,
-0.0294342041015625,
0.037567138671875,
-0.0011873245239257812,
0.003673553466796875,
0.0199737548828125,
0.035614013671875,
0.01016998291015625,
-0.007656097412109375,
0.0205230712890625,
0.053955078125,
-0.00724029541015625,
-0.01261138916015625,
-0.0211029052734375,
0.004863739013671875,
0.00998687744140625,
-0.01202392578125,
0.0770263671875,
-0.07904052734375,
-0.0157318115234375,
-0.0159912109375,
0.042633056640625,
0.0233154296875,
0.0033969879150390625,
-0.00820159912109375,
0.0034618377685546875,
-0.0203094482421875,
0.0283966064453125,
-0.027679443359375,
-0.02447509765625,
-0.02386474609375,
-0.055572509765625,
0.0283660888671875,
0.004611968994140625,
-0.0215911865234375,
0.0154876708984375,
-0.017791748046875,
0.0124053955078125,
-0.0128021240234375,
-0.025360107421875,
-0.0290374755859375,
0.037841796875,
0.0232086181640625,
-0.0099334716796875,
0.0009741783142089844,
-0.0026912689208984375,
0.0096588134765625,
0.003932952880859375,
-0.005771636962890625,
-0.01392364501953125,
-0.036712646484375,
0.01079559326171875,
-0.02581787109375,
-0.009857177734375,
0.0283966064453125,
-0.0213470458984375,
0.0172119140625,
0.0005974769592285156,
-0.0266876220703125,
-0.031280517578125,
0.011688232421875,
-0.0218048095703125,
0.023590087890625,
-0.02105712890625,
0.0234222412109375,
0.008087158203125,
-0.002178192138671875,
-0.0232086181640625,
0.025054931640625,
0.007274627685546875,
-0.0158538818359375,
-0.0089111328125,
0.0051116943359375,
-0.010467529296875,
-0.0186920166015625,
-0.01483154296875,
0.012939453125,
0.005672454833984375,
-0.03179931640625,
-0.0109710693359375,
0.00490570068359375,
0.0267486572265625,
-0.042236328125,
-0.00899505615234375,
-0.018218994140625,
-0.014617919921875,
0.023193359375,
-0.031341552734375,
0.00006300210952758789,
0.024078369140625,
-0.00713348388671875,
-0.0135650634765625,
0.031494140625,
0.0225677490234375,
-0.0077667236328125,
0.0198974609375,
0.028350830078125,
-0.017791748046875,
-0.043548583984375,
0.0118408203125,
0.01160430908203125,
-0.0161285400390625,
0.01171112060546875,
-0.0016021728515625,
0.0167999267578125,
0.0185089111328125,
0.011444091796875,
-0.036163330078125,
0.01139068603515625,
0.013214111328125,
-0.0220489501953125,
-0.035003662109375,
0.0170135498046875,
-0.01287841796875,
-0.0404052734375,
-0.00508880615234375,
0.0679931640625,
0.07373046875,
0.0556640625,
-0.01384735107421875,
0.02459716796875,
0.03521728515625,
-0.0013141632080078125,
0.0231781005859375,
-0.0007100105285644531,
-0.05194091796875,
-0.0435791015625,
-0.01552581787109375,
0.02496337890625,
-0.034423828125,
0.00482940673828125,
0.057037353515625,
0.0193023681640625,
0.0198974609375,
0.0189361572265625,
0.0169830322265625,
0.041656494140625,
0.01012420654296875,
0.02435302734375,
-0.01904296875,
0.043701171875,
-0.0135650634765625,
-0.017333984375,
-0.031402587890625,
-0.0003345012664794922,
-0.023773193359375,
-0.00960540771484375,
-0.0013551712036132812,
-0.042083740234375,
0.044830322265625,
-0.0225067138671875,
-0.00643157958984375,
0.0206756591796875,
0.0092315673828125,
0.00257110595703125,
0.0254364013671875,
0.01154327392578125,
0.02545166015625,
0.021087646484375,
0.015869140625,
0.04730224609375,
0.004886627197265625,
0.0012235641479492188,
0.031280517578125,
-0.019134521484375,
-0.040740966796875,
0.06884765625,
-0.05029296875,
-0.05010986328125,
0.05670166015625,
0.01910400390625,
0.0765380859375,
0.01116180419921875,
0.0093231201171875,
0.0209808349609375,
0.0031337738037109375,
-0.046478271484375,
0.0416259765625,
0.0212554931640625,
-0.04638671875,
0.0009393692016601562,
-0.0265655517578125,
0.002567291259765625,
0.0033130645751953125,
0.045928955078125,
-0.0088958740234375,
0.015777587890625,
-0.04486083984375,
-0.06939697265625,
-0.0260162353515625,
-0.0212554931640625,
0.0445556640625,
0.0282440185546875,
0.038665771484375,
-0.00885772705078125,
-0.0196075439453125,
0.01023101806640625,
-0.01236724853515625,
-0.0279693603515625,
-0.0382080078125,
-0.007686614990234375,
0.06951904296875,
-0.0110626220703125,
0.05712890625,
-0.0189208984375,
-0.035369873046875,
0.0090179443359375,
0.0012454986572265625,
0.031341552734375,
-0.02734375,
-0.0161895751953125,
-0.03173828125,
0.034210205078125,
-0.0234527587890625,
0.022308349609375,
0.051849365234375,
-0.01508331298828125,
0.0022869110107421875,
-0.0306243896484375,
-0.0213165283203125,
-0.053314208984375,
-0.0906982421875,
0.002239227294921875,
0.07586669921875,
0.037109375,
-0.00024437904357910156,
-0.02178955078125,
-0.01306915283203125,
0.0229949951171875,
-0.045196533203125,
0.002712249755859375,
-0.00775909423828125,
0.020721435546875,
-0.0254364013671875,
-0.00902557373046875,
-0.05712890625,
0.06085205078125,
-0.07342529296875,
0.021759033203125,
0.05517578125,
-0.01082611083984375,
-0.01024627685546875,
0.00624847412109375,
-0.00311279296875,
-0.00506591796875,
-0.01219940185546875,
-0.0102081298828125,
-0.003326416015625,
0.0716552734375,
-0.0265655517578125,
0.044342041015625,
0.0284423828125,
-0.01364898681640625,
-0.0056610107421875,
0.0124969482421875,
-0.00567626953125,
-0.01319122314453125,
0.03631591796875,
0.088623046875,
-0.0295867919921875,
-0.0188751220703125,
-0.029876708984375,
-0.018890380859375,
0.0016813278198242188,
-0.0066986083984375,
-0.00000286102294921875,
-0.040313720703125,
-0.00518798828125,
0.01462554931640625,
-0.054779052734375,
-0.0026264190673828125,
0.035797119140625,
-0.0262603759765625,
-0.01953125,
-0.01513671875,
0.071533203125,
-0.014556884765625,
0.051971435546875,
0.0264892578125,
0.0082550048828125,
0.025054931640625,
-0.0274505615234375,
0.044677734375,
-0.040618896484375,
0.05419921875,
0.0560302734375,
-0.063232421875,
0.052764892578125,
0.002017974853515625,
0.01512908935546875,
0.0008096694946289062,
0.0120391845703125,
-0.00815582275390625,
0.0159454345703125,
-0.08245849609375,
-0.036956787109375,
0.0231170654296875,
0.0841064453125,
-0.0235443115234375,
-0.052978515625,
0.00980377197265625,
0.02587890625,
-0.03094482421875,
-0.059234619140625,
0.07598876953125,
-0.031829833984375,
0.01131439208984375,
-0.0108184814453125,
0.00044989585876464844,
-0.039642333984375,
0.0138702392578125,
-0.0214691162109375,
-0.027252197265625,
-0.0027866363525390625,
-0.006378173828125,
-0.03521728515625,
-0.02691650390625,
-0.03900146484375,
-0.004474639892578125,
0.001461029052734375,
0.016082763671875,
0.01128387451171875,
0.006931304931640625,
-0.0022029876708984375,
0.034912109375,
-0.025146484375,
-0.0015878677368164062,
-0.0018787384033203125,
-0.004241943359375,
-0.00579833984375,
0.0247802734375,
0.0180206298828125,
-0.05511474609375,
-0.00550079345703125,
0.0252532958984375,
-0.058685302734375,
-0.0299072265625,
-0.06500244140625,
-0.0270538330078125,
0.077392578125,
0.0418701171875,
-0.0282440185546875,
0.0491943359375,
-0.044952392578125,
-0.05706787109375,
0.024078369140625,
-0.039825439453125,
-0.0077972412109375,
0.029693603515625,
-0.03289794921875,
-0.021331787109375,
0.023834228515625,
-0.01247406005859375,
-0.0062255859375,
-0.058929443359375,
-0.0209503173828125,
0.060546875,
0.01702880859375,
0.0416259765625,
0.039947509765625,
0.044342041015625,
-0.00409698486328125,
0.032623291015625,
0.01209259033203125,
0.017791748046875,
-0.003345489501953125,
-0.00860595703125,
-0.058502197265625,
-0.015045166015625,
0.0467529296875,
0.00909423828125,
-0.018524169921875,
0.018310546875,
-0.0275421142578125,
0.034881591796875,
0.04913330078125,
0.0021915435791015625,
-0.00836944580078125,
0.0282440185546875,
-0.001461029052734375,
-0.01508331298828125,
0.0168304443359375,
-0.0775146484375,
-0.003734588623046875,
-0.04864501953125,
-0.004001617431640625,
-0.0087738037109375,
-0.0302581787109375,
-0.039794921875,
0.04742431640625,
-0.04791259765625,
-0.01299285888671875,
0.01837158203125,
-0.0171661376953125,
-0.007785797119140625,
0.0161285400390625,
-0.026702880859375,
-0.00030231475830078125,
0.0033397674560546875,
-0.02923583984375,
-0.06036376953125,
-0.0090179443359375,
-0.045013427734375,
0.03753662109375,
0.018829345703125,
-0.01087188720703125,
-0.0201263427734375,
0.019256591796875,
0.04632568359375,
0.0167999267578125,
0.02789306640625,
-0.046356201171875,
0.0296478271484375,
0.05316162109375,
0.06591796875,
-0.00463104248046875,
-0.01395416259765625,
0.00962066650390625,
-0.03045654296875,
0.07220458984375,
-0.004596710205078125,
0.04022216796875,
0.00881195068359375,
-0.023162841796875,
-0.03375244140625,
-0.04864501953125,
-0.045257568359375,
-0.0005779266357421875,
-0.0150299072265625,
-0.0106201171875,
-0.059722900390625,
-0.04559326171875,
0.025909423828125,
0.005985260009765625,
0.01226043701171875,
0.0019245147705078125,
0.01617431640625,
0.0158233642578125,
-0.027496337890625,
0.02923583984375,
0.045623779296875,
0.0364990234375,
-0.052764892578125,
0.038543701171875,
-0.02569580078125,
-0.033538818359375,
0.11029052734375,
-0.046051025390625,
0.01219940185546875,
0.03790283203125,
0.0215606689453125,
0.008880615234375,
-0.031494140625,
0.0231475830078125,
0.0024566650390625,
-0.05108642578125,
-0.00817108154296875,
0.01345062255859375,
0.0057373046875,
0.006275177001953125,
-0.0006041526794433594,
0.03765869140625,
-0.055877685546875,
-0.0267181396484375,
-0.0262603759765625,
0.0197906494140625,
-0.041168212890625,
0.0478515625,
0.01094818115234375,
0.004848480224609375,
0.0254669189453125,
0.0101165771484375,
0.003185272216796875,
-0.0277557373046875,
0.007190704345703125,
-0.04180908203125,
0.0201873779296875,
0.01055908203125,
-0.0109710693359375,
-0.01548004150390625,
0.0116424560546875,
0.0183258056640625,
0.01194000244140625,
-0.0186309814453125,
-0.0611572265625,
0.007694244384765625,
-0.00684356689453125,
-0.011962890625,
-0.0037174224853515625,
0.045166015625,
0.03997802734375,
-0.0031299591064453125,
-0.01238250732421875,
-0.041534423828125,
0.0439453125,
-0.0439453125,
0.022918701171875,
0.036376953125,
-0.0276641845703125,
-0.0280303955078125,
0.0246429443359375,
0.032928466796875,
-0.0189361572265625,
-0.0008521080017089844,
0.04083251953125,
0.0498046875,
0.0069580078125,
0.003604888916015625,
0.0239105224609375,
-0.020294189453125,
-0.007472991943359375,
0.00128173828125,
-0.051116943359375,
-0.059112548828125,
0.0027828216552734375,
0.044464111328125,
-0.037994384765625,
0.0013360977172851562,
0.0239105224609375,
-0.00576019287109375,
-0.016204833984375,
0.005550384521484375,
0.012939453125,
-0.005645751953125,
-0.0015716552734375,
0.03076171875,
-0.0008854866027832031,
0.0144500732421875,
-0.01009368896484375,
-0.0350341796875,
-0.0250701904296875,
-0.019256591796875,
0.02996826171875,
-0.046783447265625,
-0.0017795562744140625,
0.0116729736328125,
-0.0004749298095703125,
-0.037750244140625,
0.0023975372314453125,
-0.05218505859375,
0.0154571533203125,
-0.02545166015625,
-0.0206451416015625,
0.0204315185546875,
-0.030853271484375,
0.0259857177734375,
-0.0183868408203125,
-0.0032100677490234375,
-0.014129638671875,
0.0411376953125,
-0.004467010498046875,
-0.01468658447265625,
-0.09075927734375,
0.0129241943359375,
-0.06268310546875,
-0.01244354248046875,
-0.06134033203125,
-0.0682373046875,
-0.05035400390625,
0.006160736083984375,
-0.01323699951171875,
-0.006015777587890625,
0.018157958984375,
0.038238525390625,
-0.0203094482421875,
0.049713134765625,
0.00492095947265625,
0.01568603515625,
-0.0176239013671875,
0.00817108154296875,
0.043487548828125,
-0.00751495361328125,
0.029693603515625,
0.02093505859375,
0.0262908935546875,
-0.036285400390625,
0.0012102127075195312,
-0.0120697021484375,
-0.05072021484375,
0.0159454345703125,
-0.0355224609375,
0.01270294189453125,
0.060882568359375,
-0.022613525390625,
0.028228759765625,
-0.0215606689453125,
0.0038127899169921875,
-0.01195526123046875,
-0.00445556640625,
-0.034698486328125,
0.0093231201171875,
0.004547119140625,
0.0247650146484375,
0.061370849609375,
-0.035003662109375,
-0.055023193359375,
0.040924072265625,
0.003978729248046875,
0.04364013671875,
-0.005035400390625,
-0.0248565673828125,
0.04168701171875,
0.031402587890625,
-0.0207977294921875,
0.0364990234375,
0.0009698867797851562,
0.0159454345703125,
0.028564453125,
0.0465087890625,
0.00827789306640625,
-0.09033203125,
0.043731689453125,
0.0214385986328125,
-0.0220794677734375,
0.025421142578125,
-0.020294189453125,
0.0066070556640625,
-0.0228118896484375,
0.021240234375,
0.003997802734375,
0.01538848876953125,
0.0016508102416992188,
-0.00992584228515625,
0.010589599609375,
-0.0430908203125,
-0.007843017578125,
-0.00843048095703125,
0.045684814453125,
0.007396697998046875,
-0.03790283203125,
-0.0093536376953125,
-0.0032367706298828125,
-0.01354217529296875,
0.0174560546875,
0.0011491775512695312,
0.0027008056640625,
-0.039276123046875,
-0.01922607421875,
0.0238189697265625,
-0.0504150390625,
-0.0034809112548828125,
0.0153656005859375,
-0.0026683807373046875,
-0.0193328857421875,
-0.0234832763671875,
0.0236053466796875,
-0.0196685791015625,
-0.01385498046875,
0.0625,
0.0302734375,
-0.0135955810546875,
0.060699462890625,
-0.021148681640625,
0.058746337890625,
0.01215362548828125,
-0.010894775390625,
-0.028106689453125,
-0.03558349609375,
0.0239410400390625,
0.051788330078125,
-0.07220458984375,
0.03729248046875,
-0.0195770263671875,
-0.0215606689453125,
-0.00675201416015625,
-0.0300140380859375,
0.09033203125,
-0.03570556640625,
-0.019500732421875,
0.033172607421875,
-0.00429534912109375,
-0.026641845703125,
0.00397491455078125,
0.030242919921875,
-0.07098388671875,
-0.017730712890625,
0.0146026611328125,
-0.026031494140625,
-0.014984130859375,
0.0211944580078125,
-0.0155487060546875,
0.063232421875,
-0.01244354248046875,
-0.0116729736328125,
0.0022830963134765625,
0.035919189453125,
0.011444091796875,
0.046112060546875,
-0.006378173828125,
0.034393310546875,
0.01708984375,
-0.007137298583984375,
-0.022003173828125,
0.003681182861328125,
-0.017791748046875,
0.0178070068359375,
-0.0360107421875,
-0.01355743408203125,
0.03955078125,
0.00696563720703125,
0.037811279296875,
0.045074462890625,
0.00814056396484375,
-0.023651123046875,
-0.031768798828125,
0.0111236572265625,
-0.0020198822021484375,
-0.0323486328125,
0.018402099609375,
-0.0225372314453125,
-0.050537109375,
-0.0188140869140625,
0.031585693359375,
0.0279388427734375,
-0.038787841796875,
0.01364898681640625,
-0.0183563232421875,
-0.03411865234375,
0.01302337646484375,
0.00370025634765625,
-0.007747650146484375,
0.026123046875,
0.049591064453125,
-0.10894775390625,
-0.006420135498046875,
-0.0489501953125,
0.06866455078125,
0.0004150867462158203,
-0.0272064208984375,
0.042205810546875,
0.0213470458984375,
-0.052276611328125,
-0.01424407958984375,
-0.009307861328125,
-0.006572723388671875,
-0.01207733154296875,
0.0214080810546875,
0.018463134765625,
0.04425048828125,
-0.011260986328125,
-0.01378631591796875,
-0.021453857421875,
0.00981903076171875,
-0.0085906982421875,
-0.028533935546875,
0.0231170654296875,
0.00791168212890625,
-0.0015583038330078125,
-0.034088134765625,
-0.0257720947265625,
-0.04736328125,
-0.0311126708984375,
-0.040008544921875,
0.03045654296875,
0.04364013671875,
0.0007576942443847656,
0.00899505615234375,
0.03790283203125,
-0.0506591796875,
0.0166778564453125,
-0.07012939453125,
-0.01546478271484375,
0.027374267578125,
0.0518798828125,
0.055328369140625,
0.039459228515625,
0.042236328125,
-0.037353515625,
-0.0215301513671875,
0.074951171875,
0.006244659423828125,
0.01303863525390625,
-0.0672607421875,
-0.070556640625,
0.019683837890625,
0.044464111328125,
0.00716400146484375,
-0.01082611083984375,
0.052825927734375,
0.020721435546875,
-0.069091796875,
-0.015899658203125,
0.0304107666015625,
-0.0299530029296875,
-0.0132598876953125,
-0.0650634765625,
0.01214599609375,
0.01263427734375,
0.00836944580078125,
0.0023670196533203125,
-0.0186767578125,
0.04736328125,
-0.0170745849609375,
0.006137847900390625,
0.00783538818359375,
-0.036834716796875,
-0.0251617431640625,
-0.004726409912109375,
-0.0171661376953125,
0.0019779205322265625,
-0.01126861572265625,
0.004100799560546875,
-0.02685546875,
-0.04364013671875,
0.00925445556640625,
0.02471923828125,
-0.029876708984375,
0.03411865234375,
-0.019256591796875,
0.034332275390625,
-0.048309326171875,
-0.0144195556640625,
-0.0023136138916015625,
-0.0269622802734375,
0.0282440185546875,
0.015716552734375,
-0.055572509765625,
-0.031005859375,
-0.031890869140625,
0.0294036865234375,
0.0226593017578125,
0.032196044921875,
0.00753021240234375,
0.0264129638671875,
-0.0012769699096679688,
-0.018585205078125,
0.0149383544921875,
-0.008758544921875,
0.004364013671875,
0.0049591064453125,
-0.0034694671630859375,
-0.0213165283203125,
-0.09844970703125,
0.052703857421875,
0.01690673828125,
0.0012674331665039062,
0.11199951171875,
-0.005832672119140625,
-0.0144805908203125,
-0.0714111328125,
0.02374267578125,
-0.0458984375,
-0.046661376953125,
-0.06439208984375,
-0.02099609375,
0.0126190185546875,
-0.0221099853515625,
-0.004547119140625,
0.039459228515625,
-0.007396697998046875,
0.0186309814453125,
0.0166778564453125,
-0.0129852294921875,
0.023590087890625,
0.027374267578125,
-0.045684814453125,
-0.00164031982421875,
0.0286102294921875,
-0.01201629638671875,
0.02801513671875,
0.00555419921875,
-0.00595855712890625,
0.03125,
-0.1104736328125,
-0.036468505859375,
0.012908935546875,
0.040679931640625,
-0.008819580078125,
0.006702423095703125,
-0.040496826171875,
-0.007556915283203125,
0.00946044921875,
-0.004016876220703125,
0.0010824203491210938,
-0.04071044921875,
-0.0122833251953125,
0.02685546875,
-0.04290771484375,
0.0264739990234375,
-0.03082275390625,
0.0081939697265625,
0.0182037353515625,
0.01204681396484375,
-0.07000732421875,
0.0239105224609375,
0.004077911376953125,
0.040496826171875,
-0.01149749755859375,
0.02838134765625,
-0.0269317626953125,
-0.01093292236328125,
-0.00921630859375,
-0.034576416015625,
-0.032318115234375,
0.07073974609375,
-0.015106201171875,
-0.033935546875,
0.0125732421875,
0.01248931884765625,
-0.054962158203125,
-0.019561767578125,
-0.034027099609375,
0.0279388427734375,
-0.01169586181640625,
-0.004962921142578125,
-0.0194549560546875,
0.0211181640625,
-0.00923919677734375,
-0.036956787109375,
-0.00922393798828125,
-0.0177764892578125,
-0.015655517578125,
-0.007595062255859375,
-0.0078582763671875,
-0.005657196044921875,
-0.036224365234375,
-0.01409149169921875,
0.01312255859375,
0.017913818359375,
-0.01654052734375,
-0.04840087890625,
0.02349853515625,
-0.006008148193359375,
-0.02252197265625,
-0.0175933837890625,
-0.0255889892578125,
0.004177093505859375,
0.0380859375,
0.0006914138793945312,
0.0340576171875,
-0.01384735107421875,
0.04425048828125,
-0.03521728515625,
0.02838134765625,
-0.0017614364624023438,
-0.019622802734375,
-0.0162811279296875,
0.003635406494140625,
-0.0150146484375,
0.0019435882568359375,
-0.04864501953125,
-0.031158447265625,
-0.017181396484375,
0.0289459228515625,
0.0071868896484375,
-0.027069091796875,
-0.0242462158203125,
-0.037628173828125,
-0.01093292236328125,
0.04400634765625,
-0.0003218650817871094,
-0.0031890869140625,
0.004238128662109375,
-0.0240936279296875,
0.036865234375,
0.000759124755859375,
-0.01568603515625,
-0.023956298828125,
-0.003086090087890625,
0.0316162109375,
-0.023040771484375,
-0.0182647705078125,
-0.0294189453125,
-0.040771484375,
-0.0172119140625,
-0.0304718017578125,
0.00594329833984375,
-0.0138702392578125,
0.01666259765625,
0.045654296875,
-0.0557861328125,
-0.046875,
0.02178955078125,
-0.00432586669921875,
-0.0101470947265625,
-0.028472900390625,
0.036956787109375,
0.01064300537109375,
-0.0302886962890625,
0.0088348388671875,
0.0070953369140625,
0.028411865234375,
-0.0260772705078125,
-0.05029296875,
-0.0228271484375,
0.00708770751953125,
-0.01047515869140625,
0.00637054443359375,
0.00310516357421875,
0.005870819091796875,
0.01482391357421875,
0.01873779296875,
0.0015516281127929688,
-0.00907135009765625,
0.0081329345703125,
0.0040130615234375,
0.004364013671875,
-0.005588531494140625,
0.0298614501953125,
-0.027679443359375,
0.005084991455078125,
0.010284423828125,
-0.0012912750244140625,
-0.01212310791015625,
0.0029926300048828125,
-0.0797119140625,
-0.0076751708984375,
0.0017194747924804688
] |
5803f4299b78c3ffc612732d6991c0420704b41d | Wordpress Stackexchange
Q: How to edit wordpress RSS feed to show post title only Hi everyone can someone help me on how to edit WordPress rss feed to show only title of the post, i use android application that display notification as rss feed that's why i want to show only a title of the post. OR another way if you guys can show me how to edit that rss feed to show both title and post description the one i add in yoast description box i will very very much appreciate.
Thank you all for you time and effort.
A: Your answer lies in the codex:
https://codex.wordpress.org/Customizing_Feeds
Google also gave me this https://konstantin.blog/2011/wordpress-posts-without-titles-in-rss-feeds/ – the comments of the blog is most informative.
| Q: How to edit wordpress RSS feed to show post title only Hi everyone can someone help me on how to edit WordPress rss feed to show only title of the post, i use android application that display notification as rss feed that's why i want to show only a title of the post. OR another way if you guys can show me how to edit that rss feed to show both title and post description the one i add in yoast description box i will very very much appreciate.
Thank you all for you time and effort.
A: Your answer lies in the codex:
https://codex.wordpress.org/Customizing_Feeds
Google also gave me this https://konstantin.blog/2011/wordpress-posts-without-titles-in-rss-feeds/ – the comments of the blog is most informative.
| wordpress | {
"language": "en",
"length": 121,
"provenance": "stackexchange_00019.jsonl.gz:472545",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/254384"
} | [
0.0194549560546875,
-0.0023822784423828125,
0.004180908203125,
0.0623779296875,
-0.01392364501953125,
-0.041839599609375,
0.06671142578125,
-0.069580078125,
-0.01381683349609375,
0.012054443359375,
-0.033782958984375,
0.007843017578125,
-0.03619384765625,
-0.01971435546875,
-0.0105133056640625,
-0.0489501953125,
0.032623291015625,
-0.0491943359375,
0.01464080810546875,
-0.0103607177734375,
0.01250457763671875,
0.004856109619140625,
0.05731201171875,
0.01047515869140625,
-0.01058197021484375,
-0.03564453125,
0.09100341796875,
-0.03497314453125,
0.0138397216796875,
-0.0265045166015625,
0.019073486328125,
0.00989532470703125,
0.03240966796875,
-0.00412750244140625,
-0.007122039794921875,
-0.01044464111328125,
-0.0133056640625,
-0.0016431808471679688,
-0.0142822265625,
0.031646728515625,
0.022552490234375,
-0.0222930908203125,
0.01407623291015625,
-0.01538848876953125,
0.01232147216796875,
0.017913818359375,
0.0123748779296875,
-0.0292205810546875,
-0.0004487037658691406,
-0.054107666015625,
0.003551483154296875,
0.0665283203125,
0.0297698974609375,
-0.019927978515625,
-0.00815582275390625,
0.004596710205078125,
-0.0015001296997070312,
0.0220794677734375,
0.040008544921875,
-0.048248291015625,
-0.0243377685546875,
-0.020599365234375,
0.024658203125,
0.019775390625,
0.00016176700592041016,
0.010711669921875,
0.076416015625,
-0.0031108856201171875,
-0.03704833984375,
-0.0086212158203125,
0.045562744140625,
-0.0165557861328125,
0.004634857177734375,
-0.0172576904296875,
-0.0301666259765625,
-0.004604339599609375,
0.0112152099609375,
-0.0250244140625,
0.01165008544921875,
-0.006561279296875,
0.032501220703125,
-0.026031494140625,
0.0023746490478515625,
-0.040985107421875,
0.032684326171875,
-0.0239715576171875,
0.0104827880859375,
-0.01236724853515625,
-0.010101318359375,
-0.003688812255859375,
-0.01461029052734375,
-0.017303466796875,
-0.059417724609375,
0.04400634765625,
0.0214691162109375,
-0.010955810546875,
-0.0134124755859375,
0.0118255615234375,
-0.02618408203125,
-0.0033092498779296875,
-0.00923919677734375,
-0.012115478515625,
-0.01244354248046875,
-0.0272369384765625,
-0.00022459030151367188,
0.0170745849609375,
0.0030765533447265625,
-0.0004925727844238281,
0.023193359375,
0.0265655517578125,
-0.0131378173828125,
0.01084136962890625,
0.005619049072265625,
0.00884246826171875,
-0.023834228515625,
-0.00449371337890625,
-0.039459228515625,
0.020050048828125,
-0.019378662109375,
0.02545166015625,
-0.0006575584411621094,
0.01141357421875,
-0.01641845703125,
0.00391387939453125,
-0.00379180908203125,
-0.0024280548095703125,
-0.0231170654296875,
0.005794525146484375,
-0.023773193359375,
-0.0012731552124023438,
-0.01201629638671875,
0.031829833984375,
0.07373046875,
0.0721435546875,
0.0068206787109375,
-0.01461029052734375,
-0.0181121826171875,
-0.0248260498046875,
-0.03045654296875,
0.0113983154296875,
-0.005405426025390625,
-0.019775390625,
0.037689208984375,
-0.0311431884765625,
0.0034637451171875,
0.0304718017578125,
0.01067352294921875,
0.00995635986328125,
0.0283355712890625,
-0.019317626953125,
-0.040557861328125,
0.021636962890625,
-0.0130462646484375,
0.041748046875,
0.00588226318359375,
-0.00681304931640625,
0.047637939453125,
-0.032928466796875,
0.033782958984375,
-0.038116455078125,
0.00421142578125,
-0.01485443115234375,
0.00496673583984375,
-0.004146575927734375,
-0.037384033203125,
0.0272979736328125,
-0.01216888427734375,
0.0010023117065429688,
0.00971221923828125,
-0.0255126953125,
0.032012939453125,
-0.01273345947265625,
0.008026123046875,
-0.019134521484375,
0.0036792755126953125,
-0.00905609130859375,
-0.0070037841796875,
-0.0269622802734375,
0.0279998779296875,
0.00902557373046875,
-0.0007944107055664062,
-0.00991058349609375,
0.0241241455078125,
0.003753662109375,
-0.035064697265625,
0.013519287109375,
0.00437164306640625,
0.04168701171875,
0.0289459228515625,
0.0261993408203125,
0.014892578125,
0.0001995563507080078,
0.008087158203125,
-0.006710052490234375,
-0.01140594482421875,
-0.046417236328125,
-0.01116943359375,
-0.026702880859375,
-0.024993896484375,
0.054534912109375,
-0.00205230712890625,
0.01531219482421875,
-0.021392822265625,
0.01461029052734375,
-0.043212890625,
0.0008344650268554688,
-0.021514892578125,
0.0233306884765625,
-0.0235443115234375,
0.0257568359375,
0.0162353515625,
-0.00121307373046875,
0.0011463165283203125,
-0.10137939453125,
-0.046173095703125,
-0.033111572265625,
-0.006275177001953125,
-0.0107879638671875,
-0.00902557373046875,
-0.016937255859375,
0.004085540771484375,
0.0038127899169921875,
-0.0012369155883789062,
0.04449462890625,
0.0787353515625,
-0.05621337890625,
0.013885498046875,
-0.06268310546875,
0.09112548828125,
-0.01091766357421875,
-0.030303955078125,
0.0248565673828125,
-0.0091094970703125,
0.0085601806640625,
-0.0276031494140625,
-0.0015993118286132812,
-0.006256103515625,
-0.0186614990234375,
0.0128631591796875,
0.039764404296875,
0.0265655517578125,
-0.0097503662109375,
0.0084686279296875,
0.039215087890625,
0.04876708984375,
-0.01334381103515625,
0.0095367431640625,
0.01393890380859375,
0.0302734375,
0.038970947265625,
-0.01045989990234375,
-0.0253448486328125,
0.0281982421875,
-0.061737060546875,
0.0087738037109375,
0.042724609375,
-0.00421142578125,
-0.018280029296875,
0.0026950836181640625,
-0.007213592529296875,
-0.00550079345703125,
0.015960693359375,
-0.007781982421875,
0.01395416259765625,
0.0447998046875,
0.03509521484375,
0.063720703125,
0.06939697265625,
-0.04547119140625,
0.0233154296875,
0.00800323486328125,
0.056396484375,
0.01520538330078125,
0.05279541015625,
0.00720977783203125,
-0.01241302490234375,
-0.01300048828125,
-0.0273284912109375,
0.0025730133056640625,
0.01187896728515625,
0.004425048828125,
0.002063751220703125,
0.00641632080078125,
-0.012725830078125,
0.0198974609375,
-0.03790283203125,
0.0113983154296875,
0.005126953125,
0.01593017578125,
0.0260009765625,
0.024261474609375,
0.037261962890625,
-0.010528564453125,
0.0305328369140625,
0.033599853515625,
-0.004840850830078125,
0.01123809814453125,
-0.06304931640625,
0.038177490234375,
-0.0243072509765625,
0.06201171875,
0.06817626953125,
0.0011110305786132812,
0.0111846923828125,
0.0066375732421875,
-0.0007510185241699219,
-0.004924774169921875,
-0.00797271728515625,
-0.0223846435546875,
0.04119873046875,
-0.12646484375,
-0.0090484619140625,
-0.004734039306640625,
0.056915283203125,
-0.0224609375,
-0.04443359375,
-0.003643035888671875,
0.027618408203125,
-0.01204681396484375,
-0.001911163330078125,
0.0269622802734375,
-0.04779052734375,
-0.0223846435546875,
0.0066070556640625,
-0.041717529296875,
-0.01445770263671875,
0.044281005859375,
-0.0031337738037109375,
-0.00312042236328125,
-0.0200958251953125,
-0.032623291015625,
-0.0160369873046875,
-0.050537109375,
0.0135040283203125,
-0.00026988983154296875,
0.00858306884765625,
0.000017702579498291016,
0.00047588348388671875,
0.0276336669921875,
-0.004116058349609375,
0.047637939453125,
0.08282470703125,
-0.0267486572265625,
-0.01389312744140625,
0.0303192138671875,
-0.0288543701171875,
-0.01168060302734375,
0.01751708984375,
0.01021575927734375,
0.0237274169921875,
-0.0219268798828125,
-0.01198577880859375,
-0.0078277587890625,
-0.018707275390625,
-0.00775909423828125,
0.0086212158203125,
0.0201263427734375,
0.027191162109375,
0.00566864013671875,
-0.0207366943359375,
-0.05828857421875,
-0.01070404052734375,
-0.08453369140625,
-0.00859832763671875,
0.0682373046875,
0.0111541748046875,
-0.057342529296875,
0.0203857421875,
-0.01110076904296875,
0.01416015625,
0.0290985107421875,
-0.01177215576171875,
0.0009870529174804688,
-0.013671875,
-0.029144287109375,
-0.0094451904296875,
0.00830078125,
-0.0187530517578125,
0.0171661376953125,
-0.0013523101806640625,
0.01242828369140625,
-0.02880859375,
0.038299560546875,
-0.065673828125,
0.00463104248046875,
0.005062103271484375,
-0.0863037109375,
0.0130462646484375,
-0.0200958251953125,
-0.00365447998046875,
-0.0004360675811767578,
0.043121337890625,
-0.0161895751953125,
-0.03466796875,
-0.0017614364624023438,
0.0288238525390625,
-0.0183868408203125,
-0.06683349609375,
0.00890350341796875,
-0.0246734619140625,
-0.067626953125,
0.034027099609375,
-0.021881103515625,
0.00606536865234375,
-0.006298065185546875,
-0.0092315673828125,
-0.010711669921875,
-0.031463623046875,
0.01195526123046875,
-0.0194549560546875,
-0.002918243408203125,
-0.009735107421875,
-0.0426025390625,
-0.012786865234375,
-0.0240325927734375,
-0.0287017822265625,
-0.039093017578125,
-0.0218353271484375,
0.0301513671875,
0.0175323486328125,
-0.03106689453125,
0.01021575927734375,
-0.0217437744140625,
0.032684326171875,
-0.005214691162109375,
0.0362548828125,
-0.005298614501953125,
-0.0207366943359375,
0.0167236328125,
0.03143310546875,
0.016387939453125,
-0.0156707763671875,
-0.008331298828125,
-0.00676727294921875,
-0.0203094482421875,
0.0158843994140625,
-0.018218994140625,
0.00147247314453125,
0.00397491455078125,
-0.0219268798828125,
-0.087646484375,
-0.07177734375,
0.02374267578125,
0.032196044921875,
0.029632568359375,
0.0211944580078125,
-0.0859375,
-0.0826416015625,
0.04638671875,
-0.004924774169921875,
-0.009857177734375,
0.005962371826171875,
0.06903076171875,
0.004909515380859375,
-0.01450347900390625,
-0.050628662109375,
-0.027069091796875,
0.0223236083984375,
-0.01947021484375,
0.0670166015625,
-0.00005733966827392578,
-0.01004791259765625,
0.0948486328125,
-0.0306243896484375,
0.0088043212890625,
-0.0006875991821289062,
0.04901123046875,
-0.0260162353515625,
-0.05255126953125,
0.047454833984375,
-0.030670166015625,
-0.01541900634765625,
-0.004444122314453125,
0.009979248046875,
-0.01251983642578125,
0.04376220703125,
0.01000213623046875,
-0.0071868896484375,
0.0175933837890625,
0.0204010009765625,
-0.004718780517578125,
0.005268096923828125,
0.02459716796875,
-0.0158233642578125,
0.0168914794921875,
-0.007648468017578125,
-0.053497314453125,
-0.044952392578125,
-0.006439208984375,
-0.0362548828125,
-0.00774383544921875,
-0.0355224609375,
0.0013437271118164062,
-0.0161590576171875,
-0.0268096923828125,
-0.0189056396484375,
-0.00621795654296875,
0.005847930908203125,
0.004512786865234375,
-0.0521240234375,
-0.01190185546875,
0.0173797607421875,
0.06744384765625,
0.017425537109375,
0.0379638671875,
0.0312042236328125,
0.032958984375,
0.0472412109375,
-0.017608642578125,
0.019683837890625,
0.030487060546875,
-0.01042938232421875,
0.05328369140625,
0.0203094482421875,
-0.0032596588134765625,
0.0293121337890625,
0.07305908203125,
0.0016498565673828125,
0.0546875,
-0.01450347900390625,
0.0178375244140625,
0.0340576171875,
0.00048232078552246094,
0.009674072265625,
0.0178680419921875,
-0.02978515625,
0.0019445419311523438,
0.01403045654296875,
-0.01494598388671875,
-0.0268402099609375,
0.043975830078125,
0.00926971435546875,
0.0216064453125,
-0.0009708404541015625,
-0.0008192062377929688,
0.0069427490234375,
-0.0167999267578125,
0.060638427734375,
0.0297698974609375,
-0.0498046875,
-0.042694091796875,
-0.02056884765625,
0.038818359375,
0.0017347335815429688,
-0.004436492919921875,
-0.01102447509765625,
0.0024242401123046875,
0.01157379150390625,
0.03631591796875,
-0.037109375,
0.006622314453125,
0.00582122802734375,
-0.031890869140625,
-0.0215301513671875,
-0.0048370361328125,
0.00589752197265625,
-0.0247650146484375,
-0.01438140869140625,
-0.005451202392578125,
0.016326904296875,
-0.0013580322265625,
0.037811279296875,
-0.04083251953125,
-0.0052490234375,
-0.007030487060546875,
-0.00907135009765625,
0.056549072265625,
0.029541015625,
-0.07733154296875,
-0.0068817138671875,
-0.04705810546875,
-0.01904296875,
-0.06146240234375,
-0.043548583984375,
-0.0650634765625,
-0.001842498779296875,
-0.0132598876953125,
-0.005702972412109375,
-0.0084991455078125,
0.0160980224609375,
-0.0186920166015625,
0.07928466796875,
0.025848388671875,
0.058685302734375,
-0.01094818115234375,
0.044769287109375,
-0.00991058349609375,
0.053466796875,
-0.003749847412109375,
0.0022449493408203125,
-0.01378631591796875,
-0.039947509765625,
0.0258941650390625,
-0.02105712890625,
-0.058319091796875,
-0.0131683349609375,
-0.01390838623046875,
-0.0004096031188964844,
0.0149688720703125,
-0.01294708251953125,
0.009033203125,
-0.00931549072265625,
0.0146026611328125,
-0.0184326171875,
0.0069732666015625,
-0.0283203125,
-0.0294036865234375,
0.0272216796875,
-0.006626129150390625,
0.012786865234375,
-0.01070404052734375,
0.0274505615234375,
-0.0217742919921875,
-0.0104827880859375,
-0.0261383056640625,
-0.00609588623046875,
-0.026763916015625,
0.049530029296875,
0.0693359375,
-0.024383544921875,
0.021087646484375,
0.04071044921875,
-0.010101318359375,
-0.0018415451049804688,
-0.01403045654296875,
-0.0240936279296875,
0.01004791259765625,
0.030548095703125,
-0.00527191162109375,
-0.0018815994262695312,
0.018463134765625,
-0.0137939453125,
0.0033664703369140625,
0.0615234375,
0.058807373046875,
-0.04290771484375,
-0.0126495361328125,
0.0264129638671875,
-0.00995635986328125,
0.0157470703125,
0.0174713134765625,
-0.0126190185546875,
-0.025909423828125,
0.021636962890625,
-0.037750244140625,
-0.01428985595703125,
0.02606201171875,
0.0177154541015625,
0.01123046875,
0.003631591796875,
0.07818603515625,
0.01448822021484375,
-0.059417724609375,
-0.052978515625,
0.04083251953125,
-0.0194091796875,
-0.03497314453125,
-0.0225677490234375,
0.030670166015625,
-0.048828125,
-0.1026611328125,
0.01178741455078125,
0.0011272430419921875,
-0.004726409912109375,
0.00554656982421875,
0.03106689453125,
-0.01509857177734375,
0.025054931640625,
-0.0172882080078125,
0.01422119140625,
0.006687164306640625,
-0.048126220703125,
-0.058258056640625,
-0.048980712890625,
-0.003932952880859375,
0.06951904296875,
-0.05413818359375,
0.03631591796875,
-0.0143585205078125,
-0.0079498291015625,
-0.0088348388671875,
-0.0390625,
0.061065673828125,
0.0074615478515625,
-0.041259765625,
-0.01065826416015625,
0.0028533935546875,
0.0274505615234375,
-0.002307891845703125,
0.025634765625,
-0.04547119140625,
0.0112457275390625,
0.0029239654541015625,
0.0013799667358398438,
-0.0214996337890625,
-0.006824493408203125,
-0.07635498046875,
0.12139892578125,
0.0174102783203125,
0.0288238525390625,
0.0160980224609375,
0.03924560546875,
-0.05364990234375,
0.00820159912109375,
-0.02569580078125,
0.06396484375,
0.0154266357421875,
0.0181121826171875,
-0.0198211669921875,
0.0081787109375,
0.016265869140625,
0.0141754150390625,
0.039459228515625,
0.0035495758056640625,
0.003265380859375,
-0.039794921875,
0.01355743408203125,
0.064453125,
-0.003154754638671875,
0.0024509429931640625,
-0.022247314453125,
0.01523590087890625,
-0.0029926300048828125,
0.0018167495727539062,
0.0204010009765625,
0.0157470703125,
-0.058563232421875,
0.0207061767578125,
0.0340576171875,
0.029571533203125,
0.0491943359375,
0.00264739990234375,
-0.01194000244140625,
0.01580810546875,
0.0209503173828125,
-0.0306396484375,
-0.015533447265625,
0.050628662109375,
0.046600341796875,
-0.062225341796875,
-0.00548553466796875,
-0.044830322265625,
0.057464599609375,
0.0181732177734375,
0.046783447265625,
0.04571533203125,
0.00933837890625,
0.046234130859375,
0.008514404296875,
0.042938232421875,
0.0162506103515625,
-0.0019502639770507812,
0.01337432861328125,
0.0023250579833984375,
0.00870513916015625,
-0.043365478515625,
-0.0029296875,
0.04632568359375,
0.021697998046875,
-0.0299072265625,
0.0123443603515625,
0.017822265625,
0.0027008056640625,
-0.02587890625,
-0.053497314453125,
-0.0143280029296875,
0.0198516845703125,
0.025970458984375,
-0.04705810546875,
0.00875091552734375,
0.051025390625,
0.055145263671875,
0.0118865966796875,
0.01358795166015625,
-0.07684326171875,
-0.030303955078125,
-0.01232147216796875,
0.0176239013671875,
0.0092620849609375,
0.0162811279296875,
-0.0154571533203125,
0.053375244140625,
-0.009674072265625,
0.0042724609375,
0.001857757568359375,
0.035400390625,
-0.00952911376953125,
-0.0155487060546875,
-0.0160064697265625,
-0.049041748046875,
0.00980377197265625,
0.030517578125,
0.047088623046875,
-0.01070404052734375,
0.049407958984375,
0.0107421875,
-0.048126220703125,
-0.00420379638671875,
-0.018798828125,
-0.0281524658203125,
-0.03173828125,
0.0025615692138671875,
-0.00103759765625,
0.035247802734375,
-0.01227569580078125,
0.0225372314453125,
0.07061767578125,
0.01302337646484375,
-0.0277557373046875,
0.00818634033203125,
0.01468658447265625,
-0.01441192626953125,
0.000335693359375,
-0.00893402099609375,
-0.0141143798828125,
0.0006189346313476562,
-0.0849609375,
0.0008673667907714844,
-0.036834716796875,
-0.05126953125,
0.0112457275390625,
0.035125732421875,
-0.015533447265625,
-0.00585174560546875,
-0.026336669921875,
0.0220184326171875,
0.004451751708984375,
-0.03314208984375,
0.0089111328125,
0.02557373046875,
-0.0011043548583984375,
0.015472412109375,
-0.040069580078125,
-0.0278167724609375,
-0.03692626953125,
0.04705810546875,
0.043548583984375,
0.02789306640625,
-0.01474761962890625,
0.03839111328125,
-0.040618896484375,
0.029754638671875,
-0.04852294921875,
-0.0364990234375,
0.0016374588012695312,
0.009429931640625,
0.0188140869140625,
-0.01235198974609375,
-0.033477783203125,
0.0235443115234375,
0.0254669189453125,
-0.004520416259765625,
0.0565185546875,
-0.058624267578125,
0.00736236572265625,
-0.05218505859375,
0.007732391357421875,
-0.0211181640625,
0.0034732818603515625,
0.008209228515625,
-0.01013946533203125,
0.0262451171875,
0.0170745849609375,
0.01412200927734375,
0.02679443359375,
-0.0136871337890625,
-0.03729248046875,
0.00992584228515625,
-0.038818359375,
-0.00801849365234375,
0.031982421875,
0.0186920166015625,
0.006221771240234375,
0.0247039794921875,
-0.00931549072265625,
0.0238189697265625,
0.0198516845703125,
0.007465362548828125,
0.006618499755859375,
0.0118865966796875,
-0.025848388671875,
-0.035980224609375,
0.016387939453125,
-0.0089111328125,
0.00826263427734375,
-0.037445068359375,
0.004283905029296875,
-0.0298919677734375,
0.009429931640625,
-0.016693115234375,
-0.02587890625,
-0.03717041015625,
0.00018405914306640625,
-0.029296875,
-0.0626220703125,
-0.052276611328125,
-0.0205841064453125,
-0.0021915435791015625,
-0.04876708984375,
0.02593994140625,
0.0196380615234375,
-0.06719970703125,
-0.005817413330078125,
-0.06683349609375,
-0.064697265625,
0.0304412841796875,
0.06866455078125,
0.01033782958984375,
-0.03778076171875,
-0.01143646240234375,
0.016143798828125,
-0.0224609375,
0.006984710693359375,
0.00846099853515625,
-0.0112152099609375,
0.018402099609375,
-0.0234832763671875,
0.0280914306640625,
0.028228759765625,
0.0445556640625,
-0.0194091796875,
-0.0272674560546875,
0.004474639892578125,
-0.01468658447265625,
-0.015625,
0.055877685546875,
-0.07525634765625,
-0.061920166015625,
0.00034046173095703125,
-0.0218963623046875,
-0.01091766357421875,
-0.04388427734375,
-0.050537109375,
0.0780029296875,
-0.005039215087890625,
-0.0350341796875,
-0.019317626953125,
0.0218048095703125,
-0.001255035400390625,
-0.009429931640625,
-0.01354217529296875,
0.007183074951171875,
0.00860595703125,
0.01206207275390625,
0.01206207275390625,
0.037689208984375,
0.0261077880859375,
0.017333984375,
0.005413055419921875,
0.037261962890625,
0.009033203125,
-0.017181396484375,
-0.0175628662109375,
-0.007740020751953125,
0.00405120849609375,
0.0009145736694335938,
-0.07049560546875,
0.00829315185546875,
-0.0095977783203125,
0.07440185546875,
0.0013256072998046875,
-0.0203094482421875,
-0.09002685546875,
-0.0305633544921875,
0.09368896484375,
0.09765625,
0.032257080078125,
-0.0498046875,
0.003910064697265625,
-0.03167724609375,
-0.042755126953125,
-0.0009112358093261719,
0.01751708984375,
-0.0284423828125,
0.00702667236328125,
0.006679534912109375,
-0.0242767333984375,
-0.023040771484375,
-0.0168304443359375,
-0.0706787109375,
-0.009521484375,
-0.09027099609375,
-0.001750946044921875,
-0.049530029296875,
0.015899658203125,
0.0299530029296875,
-0.035919189453125,
-0.0009765625,
-0.00833892822265625,
0.0023517608642578125,
-0.0026340484619140625,
-0.0233306884765625,
-0.02166748046875,
-0.051605224609375,
0.015838623046875,
0.047119140625,
-0.011627197265625,
0.0274200439453125,
-0.035308837890625,
-0.032196044921875,
-0.043609619140625,
0.01309967041015625,
0.0274200439453125,
0.015167236328125,
-0.005733489990234375,
-0.004772186279296875,
0.0144195556640625,
0.0513916015625,
-0.003200531005859375,
-0.0026721954345703125,
-0.01009368896484375,
0.047637939453125,
-0.020904541015625,
-0.01129150390625,
-0.010467529296875,
-0.01352691650390625,
0.00458526611328125,
0.0208740234375,
0.0197906494140625,
-0.047576904296875,
0.02435302734375,
-0.057952880859375,
0.019195556640625,
0.0186614990234375
] |
78e8d2e8eeddabf4ca8163ad6423f85fb814a803 | Wordpress Stackexchange
Q: Display subpages under parent page as a list within a loop I'm looking to make a page template, which, if the page is a parent of children pages, then display them as an ordered list.
I would preferably like to do this as a loop.
Any ideas, holler.
Thanks.
A: First set your arguments(settings)
$args = array(
'post_parent' => get_the_ID(),
'post_type' => 'page',
'numberposts' => -1,
'post_status' => 'publish'
);
$children = get_children( $args, $output );
then you can use something like this
<?php if (!empty($children)):?>
<ul class="row">
<?php foreach($children as $dest){
$permalink = get_permalink($dest->ID);
echo "<li class='col-sm-4'><a href='{$permalink}'>" . $dest->post_title . "</li>";
}?>
</ul>
<?php endif;?>
For more info
https://codex.wordpress.org/Function_Reference/get_children
| Q: Display subpages under parent page as a list within a loop I'm looking to make a page template, which, if the page is a parent of children pages, then display them as an ordered list.
I would preferably like to do this as a loop.
Any ideas, holler.
Thanks.
A: First set your arguments(settings)
$args = array(
'post_parent' => get_the_ID(),
'post_type' => 'page',
'numberposts' => -1,
'post_status' => 'publish'
);
$children = get_children( $args, $output );
then you can use something like this
<?php if (!empty($children)):?>
<ul class="row">
<?php foreach($children as $dest){
$permalink = get_permalink($dest->ID);
echo "<li class='col-sm-4'><a href='{$permalink}'>" . $dest->post_title . "</li>";
}?>
</ul>
<?php endif;?>
For more info
https://codex.wordpress.org/Function_Reference/get_children
| wordpress | {
"language": "en",
"length": 112,
"provenance": "stackexchange_00019.jsonl.gz:472604",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/254608"
} | [
0.033660888671875,
0.007495880126953125,
-0.00792694091796875,
-0.015777587890625,
0.002552032470703125,
-0.02557373046875,
0.026153564453125,
-0.0252685546875,
0.003978729248046875,
-0.00565338134765625,
-0.035369873046875,
-0.003902435302734375,
-0.07098388671875,
-0.022216796875,
-0.006381988525390625,
-0.06756591796875,
0.04827880859375,
-0.04791259765625,
0.031341552734375,
0.001972198486328125,
-0.0030269622802734375,
0.0158538818359375,
0.0548095703125,
0.0300445556640625,
0.01531982421875,
-0.049530029296875,
0.041229248046875,
-0.003704071044921875,
0.0126800537109375,
-0.0277099609375,
0.002933502197265625,
0.01291656494140625,
0.0246124267578125,
-0.01800537109375,
0.035186767578125,
-0.0121307373046875,
0.005950927734375,
-0.0202178955078125,
0.0137939453125,
0.0230255126953125,
-0.0006780624389648438,
0.0223541259765625,
0.03228759765625,
0.032440185546875,
-0.033935546875,
0.00225830078125,
-0.0168304443359375,
-0.0093994140625,
0.021728515625,
-0.00926971435546875,
0.0236968994140625,
-0.006755828857421875,
0.025146484375,
0.0160369873046875,
-0.01837158203125,
0.01346588134765625,
0.02056884765625,
-0.0248260498046875,
0.048431396484375,
-0.0285797119140625,
-0.0401611328125,
-0.00951385498046875,
0.03399658203125,
-0.00737762451171875,
-0.003475189208984375,
-0.00818634033203125,
-0.033538818359375,
0.0256195068359375,
-0.0091552734375,
-0.0081939697265625,
0.0254364013671875,
-0.0247955322265625,
0.0017938613891601562,
-0.037078857421875,
-0.0016813278198242188,
-0.0153656005859375,
-0.013763427734375,
-0.043121337890625,
-0.0016298294067382812,
0.006900787353515625,
-0.0180816650390625,
0.037750244140625,
-0.0784912109375,
0.007762908935546875,
-0.004413604736328125,
0.0171661376953125,
-0.027740478515625,
-0.01271820068359375,
-0.042236328125,
-0.0076446533203125,
-0.0264739990234375,
0.010528564453125,
0.0096893310546875,
-0.0153045654296875,
-0.034912109375,
-0.004856109619140625,
0.047454833984375,
0.07843017578125,
-0.03826904296875,
-0.0151824951171875,
-0.0221099853515625,
-0.025787353515625,
0.007488250732421875,
-0.047576904296875,
0.005420684814453125,
0.0158538818359375,
0.0037479400634765625,
0.0297088623046875,
0.06646728515625,
0.040802001953125,
0.01898193359375,
0.06561279296875,
-0.0040435791015625,
-0.0335693359375,
-0.0010385513305664062,
0.029052734375,
-0.029541015625,
0.0030765533447265625,
0.00234222412109375,
-0.01024627685546875,
-0.004009246826171875,
0.026092529296875,
-0.01806640625,
-0.022125244140625,
0.0257568359375,
0.0280303955078125,
0.0098876953125,
-0.056182861328125,
0.044403076171875,
-0.006988525390625,
-0.05517578125,
0.0135040283203125,
0.056304931640625,
0.022369384765625,
0.0186767578125,
-0.00821685791015625,
-0.0144805908203125,
-0.035552978515625,
0.017303466796875,
-0.01155853271484375,
0.002788543701171875,
-0.0263824462890625,
0.024566650390625,
0.0145111083984375,
-0.00629425048828125,
0.035675048828125,
0.0004277229309082031,
0.005451202392578125,
0.00937652587890625,
-0.041229248046875,
0.0157470703125,
-0.059295654296875,
0.033721923828125,
-0.01995849609375,
-0.009063720703125,
-0.0538330078125,
-0.03350830078125,
-0.01079559326171875,
0.0186309814453125,
-0.020111083984375,
-0.033477783203125,
0.006381988525390625,
0.04425048828125,
-0.07867431640625,
-0.05810546875,
0.0022525787353515625,
-0.0538330078125,
-0.013397216796875,
0.02264404296875,
-0.033233642578125,
0.041961669921875,
-0.0494384765625,
-0.018768310546875,
-0.0015163421630859375,
0.01276397705078125,
0.037200927734375,
-0.031646728515625,
-0.004978179931640625,
0.03289794921875,
0.01235198974609375,
-0.0071868896484375,
-0.0180206298828125,
0.000019609928131103516,
0.016998291015625,
-0.058380126953125,
0.023681640625,
-0.014984130859375,
0.0185546875,
0.01361083984375,
-0.0013513565063476562,
0.01678466796875,
0.031494140625,
-0.05926513671875,
0.076904296875,
0.01274871826171875,
-0.03118896484375,
-0.022918701171875,
0.0047149658203125,
-0.001972198486328125,
-0.05999755859375,
-0.022857666015625,
-0.0254364013671875,
0.007480621337890625,
0.006378173828125,
-0.0145111083984375,
-0.00887298583984375,
-0.00763702392578125,
0.0117340087890625,
0.0291290283203125,
0.031402587890625,
0.004230499267578125,
0.00627899169921875,
-0.0075836181640625,
-0.049957275390625,
-0.034027099609375,
0.0308837890625,
0.01447296142578125,
-0.020721435546875,
0.0125274658203125,
-0.03533935546875,
0.0167388916015625,
0.00415802001953125,
0.002101898193359375,
0.036376953125,
0.0887451171875,
-0.0360107421875,
-0.005138397216796875,
-0.052459716796875,
0.01552581787109375,
0.0152587890625,
-0.09906005859375,
0.04364013671875,
0.033203125,
0.033477783203125,
-0.048004150390625,
0.002777099609375,
-0.0321044921875,
0.003482818603515625,
-0.024078369140625,
0.0279998779296875,
0.02386474609375,
0.040008544921875,
0.006046295166015625,
0.01279449462890625,
0.095703125,
-0.034698486328125,
-0.01531219482421875,
-0.000568389892578125,
-0.014068603515625,
0.0272674560546875,
0.0030956268310546875,
0.029449462890625,
0.0084686279296875,
0.004016876220703125,
0.007282257080078125,
0.0281524658203125,
0.0043487548828125,
0.0284881591796875,
-0.0216827392578125,
-0.017059326171875,
0.018463134765625,
0.003055572509765625,
-0.032958984375,
-0.000054717063903808594,
0.01253509521484375,
-0.0007014274597167969,
0.032989501953125,
0.004917144775390625,
-0.00047397613525390625,
-0.0219879150390625,
0.00907135009765625,
0.000362396240234375,
0.01055908203125,
-0.00799560546875,
-0.055084228515625,
-0.0295562744140625,
-0.0098114013671875,
0.0069427490234375,
-0.00991058349609375,
-0.03387451171875,
0.00952911376953125,
0.05828857421875,
0.0343017578125,
0.00019657611846923828,
-0.036468505859375,
-0.0287933349609375,
0.021270751953125,
0.052947998046875,
-0.016448974609375,
0.0208892822265625,
0.0212249755859375,
0.06964111328125,
-0.0134124755859375,
0.0250091552734375,
-0.0233612060546875,
0.0195159912109375,
0.0496826171875,
-0.032135009765625,
0.035247802734375,
-0.0330810546875,
0.039794921875,
0.051849365234375,
-0.0391845703125,
0.0176544189453125,
-0.00562286376953125,
0.0027256011962890625,
0.004390716552734375,
0.00615692138671875,
-0.004398345947265625,
-0.037689208984375,
0.00923919677734375,
0.0295562744140625,
0.02972412109375,
0.05328369140625,
0.0061187744140625,
-0.026763916015625,
0.0052032470703125,
0.025848388671875,
-0.053863525390625,
-0.0872802734375,
0.0188446044921875,
-0.057647705078125,
-0.0272369384765625,
-0.003936767578125,
-0.0343017578125,
-0.00556182861328125,
0.0135498046875,
-0.002429962158203125,
-0.007503509521484375,
-0.03009033203125,
-0.06341552734375,
-0.048004150390625,
-0.0718994140625,
0.042877197265625,
0.0016450881958007812,
0.02239990234375,
-0.004810333251953125,
0.054962158203125,
0.01285552978515625,
-0.064697265625,
-0.0236663818359375,
0.057769775390625,
0.0025768280029296875,
-0.007122039794921875,
-0.00640869140625,
-0.0193939208984375,
-0.002475738525390625,
0.01088714599609375,
-0.0125579833984375,
-0.0027713775634765625,
0.0114288330078125,
-0.00641632080078125,
-0.0263671875,
0.00452423095703125,
0.001895904541015625,
-0.045623779296875,
0.03509521484375,
0.057037353515625,
-0.006618499755859375,
-0.00940704345703125,
-0.044708251953125,
-0.0216522216796875,
-0.05291748046875,
0.0233001708984375,
0.033538818359375,
0.01233673095703125,
-0.01476287841796875,
0.020538330078125,
-0.0020618438720703125,
-0.00704193115234375,
0.0253753662109375,
-0.008880615234375,
0.0030956268310546875,
-0.005176544189453125,
-0.0049591064453125,
-0.0207977294921875,
0.05072021484375,
0.0093536376953125,
-0.0141754150390625,
0.006244659423828125,
0.0129547119140625,
-0.0211334228515625,
0.039398193359375,
-0.043792724609375,
-0.06854248046875,
0.056365966796875,
0.00384521484375,
0.0021381378173828125,
-0.0384521484375,
-0.0343017578125,
0.00527191162109375,
0.09906005859375,
-0.03460693359375,
-0.019622802734375,
-0.037567138671875,
-0.001140594482421875,
-0.01385498046875,
-0.015716552734375,
-0.018463134765625,
0.00281524658203125,
-0.0679931640625,
0.0127410888671875,
-0.025482177734375,
-0.00408172607421875,
-0.0185546875,
0.018646240234375,
-0.0283050537109375,
-0.0439453125,
0.02691650390625,
0.024169921875,
-0.038726806640625,
0.0157928466796875,
-0.0288543701171875,
-0.002593994140625,
-0.0234527587890625,
0.0057220458984375,
-0.06591796875,
-0.034912109375,
0.032012939453125,
0.048248291015625,
0.0164642333984375,
-0.082275390625,
0.0011844635009765625,
0.067138671875,
0.016815185546875,
0.055908203125,
0.00897216796875,
0.007740020751953125,
-0.01386260986328125,
-0.02947998046875,
0.0263824462890625,
-0.043548583984375,
-0.022918701171875,
-0.018798828125,
0.0267333984375,
-0.0023403167724609375,
-0.0312347412109375,
-0.0113983154296875,
-0.0088653564453125,
0.006458282470703125,
-0.0294952392578125,
-0.02972412109375,
-0.0212860107421875,
0.0121612548828125,
-0.0101470947265625,
0.0057220458984375,
-0.028106689453125,
-0.053375244140625,
-0.005992889404296875,
0.047698974609375,
-0.03228759765625,
0.016510009765625,
0.028656005859375,
0.03814697265625,
-0.026458740234375,
-0.050048828125,
-0.01517486572265625,
0.00983428955078125,
-0.04913330078125,
0.048095703125,
0.01537322998046875,
0.004421234130859375,
0.0361328125,
-0.031585693359375,
0.0175628662109375,
0.0235595703125,
0.00942230224609375,
0.00887298583984375,
-0.031005859375,
0.035064697265625,
0.0147857666015625,
-0.033905029296875,
0.0267333984375,
-0.0203704833984375,
-0.0087738037109375,
-0.0211334228515625,
0.0421142578125,
0.01036834716796875,
0.0028076171875,
-0.04486083984375,
-0.034942626953125,
0.0038623809814453125,
-0.0015001296997070312,
0.01406097412109375,
0.023040771484375,
-0.00719451904296875,
0.0299072265625,
0.0160369873046875,
0.005435943603515625,
0.006389617919921875,
0.041107177734375,
0.007843017578125,
0.05426025390625,
-0.02655029296875,
-0.0008287429809570312,
-0.015411376953125,
-0.0018892288208007812,
0.042572021484375,
0.02239990234375,
-0.006526947021484375,
-0.005817413330078125,
-0.01568603515625,
-0.0032596588134765625,
-0.016571044921875,
0.04217529296875,
0.0189056396484375,
0.020050048828125,
0.0128936767578125,
-0.0030536651611328125,
0.031585693359375,
0.031982421875,
-0.020904541015625,
-0.03216552734375,
0.01009368896484375,
-0.0196533203125,
-0.039337158203125,
0.06939697265625,
-0.00952911376953125,
0.01309967041015625,
-0.01416015625,
-0.0323486328125,
0.01477813720703125,
0.007686614990234375,
0.0308837890625,
-0.0032901763916015625,
-0.0099334716796875,
-0.00376129150390625,
0.058013916015625,
-0.0194854736328125,
-0.0053253173828125,
0.0390625,
0.057403564453125,
0.0304107666015625,
-0.0112762451171875,
-0.0182952880859375,
-0.040863037109375,
-0.043182373046875,
0.04779052734375,
0.0160064697265625,
-0.0186004638671875,
-0.044158935546875,
-0.00449371337890625,
0.035430908203125,
0.044708251953125,
-0.0255889892578125,
-0.005687713623046875,
-0.032501220703125,
0.0024261474609375,
-0.03057861328125,
-0.02935791015625,
0.0235595703125,
0.0259246826171875,
-0.048004150390625,
0.00864410400390625,
0.034515380859375,
-0.06390380859375,
-0.058837890625,
-0.01045989990234375,
-0.022705078125,
0.01210784912109375,
-0.012786865234375,
0.055694580078125,
-0.033172607421875,
-0.020294189453125,
-0.027496337890625,
-0.00029969215393066406,
0.0628662109375,
0.046722412109375,
-0.07275390625,
0.0009145736694335938,
-0.0345458984375,
0.0015935897827148438,
-0.034637451171875,
-0.044403076171875,
-0.0494384765625,
-0.009918212890625,
-0.0078277587890625,
0.01467132568359375,
-0.0208740234375,
-0.021636962890625,
-0.0306854248046875,
0.0008192062377929688,
0.0112457275390625,
0.0002512931823730469,
-0.00015091896057128906,
0.0919189453125,
-0.055999755859375,
0.037841796875,
-0.0012035369873046875,
0.0260009765625,
-0.033966064453125,
0.0188446044921875,
0.01345062255859375,
-0.010498046875,
-0.01242828369140625,
-0.0030517578125,
-0.0172882080078125,
-0.0167083740234375,
0.034332275390625,
0.00434112548828125,
0.0074310302734375,
-0.025390625,
0.0018243789672851562,
-0.00981903076171875,
0.02178955078125,
-0.0257720947265625,
-0.02899169921875,
0.0526123046875,
0.0118560791015625,
-0.02130126953125,
0.0059661865234375,
-0.01922607421875,
-0.0013132095336914062,
0.033660888671875,
-0.00275421142578125,
-0.047515869140625,
-0.0167388916015625,
0.04681396484375,
0.05731201171875,
0.000713348388671875,
0.04400634765625,
0.037689208984375,
0.0251922607421875,
0.0020275115966796875,
0.04400634765625,
0.047149658203125,
-0.01348876953125,
0.082763671875,
0.00716400146484375,
-0.00811004638671875,
0.0419921875,
-0.0543212890625,
-0.044952392578125,
0.0179290771484375,
0.0071563720703125,
-0.026397705078125,
-0.01020050048828125,
-0.01023101806640625,
0.00981903076171875,
0.005523681640625,
-0.00827789306640625,
0.0102691650390625,
-0.01505279541015625,
0.064697265625,
-0.00860595703125,
-0.0020465850830078125,
0.0249786376953125,
-0.03985595703125,
-0.0005631446838378906,
-0.042266845703125,
0.06427001953125,
0.01464080810546875,
0.025726318359375,
-0.0111083984375,
-0.044952392578125,
0.037811279296875,
-0.024993896484375,
0.0208587646484375,
-0.040863037109375,
0.01065826416015625,
-0.0171051025390625,
0.0000037550926208496094,
-0.0227203369140625,
0.01904296875,
0.019775390625,
0.01024627685546875,
-0.0531005859375,
0.0577392578125,
-0.04205322265625,
0.032806396484375,
0.0269012451171875,
-0.0592041015625,
0.0124969482421875,
0.0097198486328125,
-0.0139923095703125,
-0.038299560546875,
-0.06280517578125,
-0.01025390625,
-0.0693359375,
0.0433349609375,
-0.0032024383544921875,
0.009368896484375,
0.0574951171875,
-0.0299072265625,
-0.0190277099609375,
0.027923583984375,
0.015625,
-0.02203369140625,
-0.007511138916015625,
0.0423583984375,
-0.0506591796875,
-0.0261688232421875,
0.0207061767578125,
-0.0098876953125,
-0.0295562744140625,
-0.022430419921875,
-0.057861328125,
0.11346435546875,
-0.050048828125,
0.0498046875,
0.02581787109375,
0.0516357421875,
-0.02325439453125,
0.01690673828125,
-0.0238037109375,
0.03570556640625,
0.0478515625,
0.050506591796875,
-0.02911376953125,
-0.03887939453125,
0.0206298828125,
0.0792236328125,
-0.0010061264038085938,
-0.005512237548828125,
-0.045562744140625,
-0.014404296875,
0.0218658447265625,
0.020416259765625,
0.0101165771484375,
0.061767578125,
-0.007114410400390625,
0.045440673828125,
0.02264404296875,
-0.051177978515625,
0.0211639404296875,
-0.0028514862060546875,
-0.019134521484375,
0.017822265625,
0.01401519775390625,
0.01018524169921875,
0.003170013427734375,
0.007965087890625,
-0.046234130859375,
0.000980377197265625,
0.02764892578125,
-0.0272064208984375,
0.042938232421875,
0.022216796875,
0.018096923828125,
-0.032012939453125,
-0.027313232421875,
-0.00829315185546875,
0.038818359375,
-0.0131683349609375,
0.004364013671875,
-0.01398468017578125,
0.0157623291015625,
0.02056884765625,
0.0254669189453125,
0.007030487060546875,
0.0687255859375,
-0.03131103515625,
0.0218505859375,
0.034576416015625,
0.0215301513671875,
-0.036865234375,
-0.005779266357421875,
0.048736572265625,
0.036529541015625,
-0.032623291015625,
-0.0667724609375,
0.02520751953125,
0.01058197021484375,
-0.00974273681640625,
0.0263214111328125,
0.00336456298828125,
-0.0038127899169921875,
0.07611083984375,
-0.0153656005859375,
-0.0640869140625,
-0.0184783935546875,
0.035247802734375,
-0.0048828125,
-0.0302276611328125,
0.044677734375,
-0.06488037109375,
-0.0237274169921875,
-0.005443572998046875,
0.0204315185546875,
0.050689697265625,
0.0242919921875,
0.0290069580078125,
-0.041168212890625,
-0.0160675048828125,
0.0107574462890625,
-0.029266357421875,
-0.00598907470703125,
-0.003536224365234375,
0.0226898193359375,
0.034271240234375,
-0.0205535888671875,
0.0109405517578125,
0.03570556640625,
-0.009979248046875,
0.03790283203125,
0.0082550048828125,
-0.0616455078125,
-0.004428863525390625,
0.023193359375,
-0.03436279296875,
-0.01323699951171875,
-0.0142974853515625,
-0.01806640625,
0.0142059326171875,
-0.01425933837890625,
-0.009979248046875,
0.024810791015625,
0.019439697265625,
-0.0178985595703125,
0.055938720703125,
-0.01346588134765625,
0.010498046875,
0.0299530029296875,
-0.00867462158203125,
0.03240966796875,
0.00836944580078125,
-0.10400390625,
-0.02215576171875,
-0.02215576171875,
-0.050140380859375,
0.06378173828125,
0.0601806640625,
-0.0092315673828125,
-0.0158233642578125,
0.037628173828125,
-0.00868988037109375,
-0.003787994384765625,
0.0025997161865234375,
0.0213165283203125,
0.01337432861328125,
0.005664825439453125,
0.01251983642578125,
-0.0219573974609375,
-0.0014696121215820312,
-0.03167724609375,
0.03521728515625,
0.031768798828125,
0.07574462890625,
-0.0227508544921875,
0.036956787109375,
-0.006221771240234375,
0.0008416175842285156,
-0.0127410888671875,
-0.03924560546875,
0.10479736328125,
-0.0253143310546875,
-0.034698486328125,
-0.0152740478515625,
0.00750732421875,
0.023712158203125,
0.025360107421875,
-0.0258941650390625,
-0.0211181640625,
-0.01399993896484375,
0.01776123046875,
0.01165771484375,
0.01010894775390625,
-0.0216217041015625,
-0.02972412109375,
-0.01180267333984375,
-0.00213623046875,
0.022796630859375,
0.055267333984375,
0.01378631591796875,
0.027374267578125,
0.0014429092407226562,
-0.036834716796875,
0.038299560546875,
-0.042633056640625,
0.0491943359375,
0.0182037353515625,
0.00855255126953125,
-0.04949951171875,
0.0217437744140625,
-0.00804901123046875,
0.03021240234375,
-0.007770538330078125,
0.058441162109375,
0.0218048095703125,
-0.0113677978515625,
0.01593017578125,
0.0229949951171875,
0.0012664794921875,
-0.047760009765625,
-0.011871337890625,
0.056365966796875,
-0.031585693359375,
-0.012725830078125,
-0.0187225341796875,
-0.03570556640625,
-0.06597900390625,
0.0330810546875,
0.0207977294921875,
-0.01239013671875,
-0.0160369873046875,
-0.04815673828125,
0.004474639892578125,
0.029449462890625,
0.0132293701171875,
-0.02496337890625,
0.03466796875,
-0.0304412841796875,
-0.00916290283203125,
-0.0016155242919921875,
0.01198577880859375,
-0.0135650634765625,
-0.0156707763671875,
-0.01535797119140625,
0.0380859375,
-0.037994384765625,
-0.007144927978515625,
0.007251739501953125,
0.006885528564453125,
0.0022411346435546875,
-0.0198974609375,
0.0113067626953125,
0.0257110595703125,
0.0347900390625,
0.066162109375,
0.06512451171875,
-0.014984130859375,
-0.004955291748046875,
0.031402587890625,
-0.023162841796875,
-0.0232391357421875,
0.0372314453125,
-0.0237579345703125,
-0.007305145263671875,
0.008636474609375,
0.031707763671875,
0.0673828125,
-0.01172637939453125,
-0.054412841796875,
0.08575439453125,
-0.0307159423828125,
-0.029754638671875,
0.00824737548828125,
0.015167236328125,
-0.0208587646484375,
-0.0008611679077148438,
0.018035888671875,
-0.0120086669921875,
0.017791748046875,
0.00960540771484375,
0.0023651123046875,
0.01108551025390625,
0.0157928466796875,
0.028228759765625,
-0.038055419921875,
0.01432037353515625,
-0.01056671142578125,
-0.02911376953125,
-0.0245819091796875,
0.0225372314453125,
0.005336761474609375,
0.0253143310546875,
-0.0266571044921875,
0.0031757354736328125,
0.01056671142578125,
0.02447509765625,
0.01039886474609375,
-0.0190887451171875,
-0.0303192138671875,
-0.0201263427734375,
0.04925537109375,
0.02545166015625,
0.02069091796875,
-0.00968170166015625,
-0.0161590576171875,
-0.05230712890625,
-0.0413818359375,
0.0135650634765625,
0.0223388671875,
-0.064208984375,
0.0171356201171875,
0.03863525390625,
-0.0192108154296875,
-0.0157012939453125,
-0.0068817138671875,
-0.042266845703125,
-0.0198516845703125,
-0.03369140625,
-0.0093841552734375,
0.00173187255859375,
0.01340484619140625,
0.0433349609375,
-0.033935546875,
-0.0222625732421875,
-0.01287841796875,
0.0006461143493652344,
-0.0019273757934570312,
-0.01419830322265625,
-0.032470703125,
0.03375244140625,
-0.04931640625,
0.00127410888671875,
-0.005962371826171875,
0.046051025390625,
-0.0438232421875,
0.027435302734375,
-0.035400390625,
0.00402069091796875,
0.001720428466796875,
-0.0259552001953125,
-0.018798828125,
0.056610107421875,
0.018798828125,
0.08160400390625,
0.007476806640625,
0.09625244140625,
-0.0049896240234375,
0.060455322265625,
0.01210784912109375,
-0.0165557861328125,
0.01873779296875,
-0.03814697265625,
0.00316619873046875,
-0.02423095703125,
-0.029205322265625,
-0.020050048828125,
-0.003620147705078125,
-0.00789642333984375,
-0.0361328125,
0.01126861572265625
] |
6c0d0611dfdc1fea1515ad5ffb8b1b9c91524151 | Wordpress Stackexchange
Q: Fatal error: Call to undefined function dbDelta() I want to create a table during the activation of the plugin, so I used the code as follows:
class Database
{
private $db_version = '1.0', $table_prefix;
public function __construct()
{
global $wpdb;
$this->table_prefix = $wpdb->prefix;
register_activation_hook( PLUGIN_INDEX_FILE, array($this, 'dbSetup') );
}
public function dbSetup()
{
$countriesSQL = "CREATE TABLE $this->table_prefix . countries (
id int(11) UNSIGNED NOT NULL,
country_code varchar(2) NOT NULL DEFAULT '',
country_name varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (id)
) $charset_collate;";
dbDelta( $countriesSQL );
}
}
But during the activation of plugin, it throws the fatal error as,
Fatal error: Call to undefined function dbDelta() in
wp-content/plugins/myPlugin/libraries/Database.class.php on line 26
In some forums, some are suggesting to use,
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
before the function call.
It is working. But I just wanted to know, if it is this the right approach? How to use the dbDelta in the correct manner to make it work?
A: You answered your own question. You need to include the upgrade.php file which contains that function. Otherwise won't be loaded on your plugin update and the function won't exist.
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
| Q: Fatal error: Call to undefined function dbDelta() I want to create a table during the activation of the plugin, so I used the code as follows:
class Database
{
private $db_version = '1.0', $table_prefix;
public function __construct()
{
global $wpdb;
$this->table_prefix = $wpdb->prefix;
register_activation_hook( PLUGIN_INDEX_FILE, array($this, 'dbSetup') );
}
public function dbSetup()
{
$countriesSQL = "CREATE TABLE $this->table_prefix . countries (
id int(11) UNSIGNED NOT NULL,
country_code varchar(2) NOT NULL DEFAULT '',
country_name varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (id)
) $charset_collate;";
dbDelta( $countriesSQL );
}
}
But during the activation of plugin, it throws the fatal error as,
Fatal error: Call to undefined function dbDelta() in
wp-content/plugins/myPlugin/libraries/Database.class.php on line 26
In some forums, some are suggesting to use,
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
before the function call.
It is working. But I just wanted to know, if it is this the right approach? How to use the dbDelta in the correct manner to make it work?
A: You answered your own question. You need to include the upgrade.php file which contains that function. Otherwise won't be loaded on your plugin update and the function won't exist.
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
| wordpress | {
"language": "en",
"length": 190,
"provenance": "stackexchange_00019.jsonl.gz:472626",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/254675"
} | [
0.0467529296875,
0.01517486572265625,
-0.037445068359375,
-0.07513427734375,
0.045379638671875,
-0.0258941650390625,
-0.0239105224609375,
-0.00864410400390625,
0.0085296630859375,
0.01503753662109375,
-0.05206298828125,
-0.015289306640625,
-0.018798828125,
0.0014429092407226562,
-0.026458740234375,
-0.04583740234375,
0.03265380859375,
0.008026123046875,
0.042694091796875,
-0.002300262451171875,
0.03338623046875,
0.0232086181640625,
-0.0018482208251953125,
0.0750732421875,
0.0018157958984375,
-0.035797119140625,
0.0780029296875,
-0.01983642578125,
0.00403594970703125,
-0.02337646484375,
0.0129547119140625,
-0.006069183349609375,
-0.0198974609375,
0.01116180419921875,
0.01181793212890625,
-0.0518798828125,
0.02374267578125,
-0.0003674030303955078,
-0.00028443336486816406,
0.044189453125,
0.0269317626953125,
-0.01108551025390625,
0.0280303955078125,
0.041473388671875,
-0.002262115478515625,
-0.056488037109375,
0.050018310546875,
-0.030517578125,
0.002819061279296875,
0.0178680419921875,
-0.004238128662109375,
0.037200927734375,
0.0032176971435546875,
0.004383087158203125,
-0.0003521442413330078,
-0.00928497314453125,
-0.0290069580078125,
0.03192138671875,
0.00426483154296875,
0.11553955078125,
0.015869140625,
0.03900146484375,
-0.040008544921875,
-0.0692138671875,
0.00408172607421875,
0.00592803955078125,
0.022491455078125,
0.011322021484375,
-0.0254974365234375,
-0.0010986328125,
0.01250457763671875,
-0.0212249755859375,
-0.0059661865234375,
0.019775390625,
-0.00292205810546875,
-0.0238037109375,
0.01026153564453125,
-0.0224456787109375,
0.01035308837890625,
0.044708251953125,
0.0236968994140625,
-0.0030040740966796875,
-0.003658294677734375,
-0.0418701171875,
0.0176544189453125,
-0.01806640625,
-0.0022754669189453125,
-0.015960693359375,
-0.03271484375,
0.0036163330078125,
-0.027587890625,
-0.006793975830078125,
-0.032562255859375,
-0.00611114501953125,
-0.0059814453125,
-0.0263671875,
0.048583984375,
0.0865478515625,
-0.002811431884765625,
0.034820556640625,
0.00001049041748046875,
-0.057891845703125,
0.026092529296875,
-0.055511474609375,
0.00970458984375,
0.037933349609375,
-0.043121337890625,
-0.04803466796875,
0.003093719482421875,
0.03253173828125,
0.004779815673828125,
-0.04302978515625,
-0.0093231201171875,
-0.045562744140625,
0.0022716522216796875,
0.005405426025390625,
-0.0258941650390625,
0.02191162109375,
0.016815185546875,
-0.0044097900390625,
-0.01153564453125,
-0.006500244140625,
-0.057647705078125,
0.01180267333984375,
-0.0168304443359375,
-0.04913330078125,
-0.0025615692138671875,
0.064208984375,
-0.0282135009765625,
-0.0084075927734375,
-0.01666259765625,
0.026763916015625,
0.051544189453125,
0.0211029052734375,
-0.0034923553466796875,
-0.0029430389404296875,
0.06451416015625,
-0.006927490234375,
0.0052032470703125,
0.03363037109375,
-0.01155853271484375,
-0.05059814453125,
-0.03973388671875,
-0.0018243789672851562,
-0.035247802734375,
-0.00949859619140625,
0.044769287109375,
0.0295562744140625,
-0.036834716796875,
-0.0574951171875,
-0.004314422607421875,
0.03387451171875,
0.01026153564453125,
0.0032253265380859375,
-0.018829345703125,
-0.00740814208984375,
-0.01280975341796875,
0.005725860595703125,
-0.005901336669921875,
0.0079193115234375,
0.01155853271484375,
-0.03778076171875,
-0.01593017578125,
-0.031005859375,
-0.056976318359375,
0.04766845703125,
-0.049560546875,
-0.0023479461669921875,
0.041107177734375,
-0.00008761882781982422,
0.0236663818359375,
-0.0233001708984375,
0.0218505859375,
-0.00001055002212524414,
0.00051116943359375,
0.022674560546875,
-0.0278472900390625,
-0.05059814453125,
0.07012939453125,
-0.007602691650390625,
-0.0277099609375,
0.006805419921875,
0.049102783203125,
0.0015249252319335938,
-0.052093505859375,
0.04638671875,
-0.0029087066650390625,
0.059356689453125,
0.0150909423828125,
0.01702880859375,
0.0005769729614257812,
0.011810302734375,
-0.0650634765625,
0.03814697265625,
-0.0278167724609375,
-0.01457977294921875,
-0.036651611328125,
-0.0031070709228515625,
-0.034759521484375,
0.030517578125,
-0.0380859375,
0.01031494140625,
-0.020599365234375,
0.0202178955078125,
-0.06707763671875,
0.0302734375,
-0.03515625,
0.04974365234375,
0.0160369873046875,
0.04559326171875,
0.01336669921875,
0.0256500244140625,
-0.032196044921875,
-0.007740020751953125,
-0.01959228515625,
-0.005718231201171875,
-0.056610107421875,
0.05975341796875,
-0.00710296630859375,
0.0694580078125,
-0.01416015625,
-0.049774169921875,
0.01336669921875,
-0.04754638671875,
0.00267791748046875,
-0.0066070556640625,
-0.008758544921875,
-0.0059356689453125,
0.0252838134765625,
-0.0018310546875,
0.054931640625,
0.0198822021484375,
0.005290985107421875,
-0.007598876953125,
-0.041229248046875,
-0.0090179443359375,
-0.0144805908203125,
-0.059051513671875,
0.01324462890625,
0.0546875,
0.0240478515625,
-0.00933074951171875,
-0.0200653076171875,
0.0169525146484375,
0.022247314453125,
-0.0168914794921875,
0.01137542724609375,
-0.005702972412109375,
0.00415802001953125,
0.0526123046875,
-0.0064849853515625,
0.01141357421875,
-0.006412506103515625,
0.01251220703125,
-0.0212554931640625,
0.0206756591796875,
-0.022674560546875,
-0.040679931640625,
0.01560211181640625,
-0.02215576171875,
0.012969970703125,
-0.07421875,
-0.0235137939453125,
-0.03546142578125,
0.016204833984375,
-0.01009368896484375,
0.0343017578125,
0.0220489501953125,
-0.01076507568359375,
-0.0174407958984375,
0.01496124267578125,
0.0213623046875,
-0.00943756103515625,
0.0004024505615234375,
-0.042572021484375,
0.004245758056640625,
-0.0526123046875,
0.022705078125,
0.015594482421875,
-0.0078582763671875,
-0.00705718994140625,
0.028411865234375,
-0.0011196136474609375,
-0.027313232421875,
0.014312744140625,
-0.00247955322265625,
-0.002735137939453125,
-0.04766845703125,
-0.059661865234375,
-0.0261993408203125,
0.031341552734375,
-0.024810791015625,
-0.037353515625,
-0.0307769775390625,
-0.021331787109375,
-0.032928466796875,
0.09356689453125,
0.0172576904296875,
-0.02386474609375,
0.0149993896484375,
0.06707763671875,
0.036651611328125,
-0.00078582763671875,
-0.040130615234375,
0.0174102783203125,
0.01247406005859375,
0.01444244384765625,
0.032623291015625,
0.01727294921875,
-0.0129547119140625,
0.0117340087890625,
0.05230712890625,
0.03472900390625,
0.04302978515625,
0.02008056640625,
-0.034027099609375,
0.00109100341796875,
0.047271728515625,
-0.0748291015625,
-0.065673828125,
-0.04876708984375,
0.0128021240234375,
0.0102386474609375,
-0.0083160400390625,
-0.00235748291015625,
0.02197265625,
-0.03277587890625,
0.01013946533203125,
0.00926971435546875,
0.00450897216796875,
-0.040985107421875,
-0.0435791015625,
-0.06793212890625,
-0.031982421875,
-0.00514984130859375,
0.006195068359375,
-0.0122528076171875,
0.0190277099609375,
-0.028350830078125,
-0.0038299560546875,
-0.021636962890625,
-0.0028324127197265625,
0.0013151168823242188,
-0.0396728515625,
0.032989501953125,
-0.01557159423828125,
0.006359100341796875,
0.019866943359375,
0.031341552734375,
0.0226287841796875,
-0.0347900390625,
-0.036590576171875,
0.039093017578125,
0.04052734375,
0.0377197265625,
0.031463623046875,
-0.04229736328125,
-0.00328826904296875,
0.01229095458984375,
-0.05029296875,
0.0210113525390625,
0.004878997802734375,
-0.0119781494140625,
-0.04315185546875,
0.01091766357421875,
-0.0225830078125,
-0.01453399658203125,
-0.0181121826171875,
0.03704833984375,
0.0241546630859375,
0.0173492431640625,
0.029022216796875,
-0.03857421875,
-0.014617919921875,
-0.0132598876953125,
-0.039306640625,
0.062469482421875,
-0.015777587890625,
-0.035003662109375,
0.01739501953125,
-0.031951904296875,
0.023834228515625,
-0.07635498046875,
-0.006862640380859375,
-0.0309600830078125,
0.0254974365234375,
-0.029510498046875,
-0.0163726806640625,
-0.0009937286376953125,
-0.0035114288330078125,
0.00308990478515625,
0.029449462890625,
0.002368927001953125,
-0.019317626953125,
0.015625,
0.001750946044921875,
-0.0791015625,
0.006359100341796875,
-0.054229736328125,
0.0124969482421875,
-0.0139923095703125,
-0.0253448486328125,
-0.0131988525390625,
-0.034210205078125,
0.0307159423828125,
-0.029052734375,
0.0132293701171875,
-0.0276947021484375,
0.040252685546875,
-0.0322265625,
-0.0144195556640625,
0.07354736328125,
-0.009490966796875,
0.03436279296875,
-0.0290679931640625,
0.0024166107177734375,
-0.07000732421875,
-0.0091552734375,
-0.0391845703125,
0.0199737548828125,
0.00331878662109375,
0.0011224746704101562,
-0.036865234375,
0.0118408203125,
0.0307159423828125,
-0.0006060600280761719,
-0.00012129545211791992,
-0.0235748291015625,
-0.01031494140625,
-0.01512908935546875,
0.0031070709228515625,
-0.0198822021484375,
0.0145416259765625,
-0.0262298583984375,
0.00429534912109375,
0.0295257568359375,
-0.044036865234375,
0.04119873046875,
-0.04278564453125,
-0.01000213623046875,
-0.0487060546875,
-0.016143798828125,
0.0269775390625,
0.010498046875,
-0.045257568359375,
0.0509033203125,
0.00896453857421875,
-0.024200439453125,
0.0445556640625,
-0.0228271484375,
-0.01532745361328125,
0.01495361328125,
0.07147216796875,
0.01049041748046875,
-0.01020050048828125,
-0.04669189453125,
0.001171112060546875,
0.057952880859375,
0.057281494140625,
0.0164031982421875,
0.0005645751953125,
-0.05712890625,
0.111572265625,
0.05523681640625,
-0.015045166015625,
0.016815185546875,
0.0176239013671875,
0.021148681640625,
-0.02935791015625,
-0.004123687744140625,
-0.0060882568359375,
0.0011997222900390625,
0.0268096923828125,
-0.001544952392578125,
0.01209259033203125,
0.01485443115234375,
0.013916015625,
0.0090789794921875,
-0.035003662109375,
-0.02850341796875,
-0.033233642578125,
0.028045654296875,
-0.00878143310546875,
0.0092620849609375,
-0.0165863037109375,
0.007801055908203125,
-0.010162353515625,
-0.0248565673828125,
0.019378662109375,
0.0251007080078125,
0.0654296875,
-0.0311279296875,
0.046539306640625,
0.036529541015625,
-0.004970550537109375,
-0.03106689453125,
-0.0181884765625,
0.06787109375,
0.026031494140625,
-0.02410888671875,
0.032470703125,
-0.01427459716796875,
0.025665283203125,
-0.0020904541015625,
0.006805419921875,
0.0242767333984375,
0.00514984130859375,
-0.0013685226440429688,
-0.00986480712890625,
-0.0083465576171875,
-0.002452850341796875,
-0.01436614990234375,
-0.004543304443359375,
0.019195556640625,
-0.034912109375,
-0.018768310546875,
0.01178741455078125,
-0.00554656982421875,
-0.023712158203125,
0.0018434524536132812,
0.02130126953125,
-0.01245880126953125,
0.0689697265625,
0.0003447532653808594,
-0.039581298828125,
0.00479888916015625,
0.04150390625,
-0.0132598876953125,
-0.040283203125,
0.009521484375,
0.009918212890625,
0.05487060546875,
-0.0220947265625,
-0.039764404296875,
0.0201568603515625,
-0.04559326171875,
-0.0172119140625,
0.047637939453125,
-0.0047454833984375,
-0.0618896484375,
-0.03106689453125,
0.022003173828125,
0.051116943359375,
-0.0000641942024230957,
-0.0109710693359375,
-0.018310546875,
-0.017120361328125,
0.032135009765625,
-0.0374755859375,
-0.0056610107421875,
0.0177459716796875,
0.0204315185546875,
0.043487548828125,
-0.041412353515625,
-0.06243896484375,
0.06011962890625,
0.0350341796875,
-0.0128936767578125,
-0.00376129150390625,
0.00234222412109375,
-0.0377197265625,
0.0278472900390625,
-0.0218505859375,
-0.00890350341796875,
-0.0155029296875,
0.024871826171875,
0.0494384765625,
0.0222930908203125,
0.0158233642578125,
-0.02178955078125,
-0.0243988037109375,
-0.027435302734375,
-0.0217437744140625,
-0.0083160400390625,
-0.0205841064453125,
0.0034656524658203125,
0.00970458984375,
-0.0034427642822265625,
-0.0024814605712890625,
-0.0086822509765625,
-0.01158905029296875,
0.045379638671875,
0.0350341796875,
0.00994873046875,
-0.01551055908203125,
0.0482177734375,
0.0032634735107421875,
0.04241943359375,
0.0155029296875,
0.0136566162109375,
-0.0131683349609375,
-0.0279541015625,
0.0131072998046875,
-0.0295867919921875,
-0.0166778564453125,
-0.00537872314453125,
-0.032806396484375,
-0.0287628173828125,
0.01033782958984375,
-0.0149383544921875,
0.034515380859375,
0.01678466796875,
0.0023441314697265625,
-0.004299163818359375,
-0.005229949951171875,
0.0092315673828125,
0.032073974609375,
0.032958984375,
-0.05926513671875,
0.0116119384765625,
0.004642486572265625,
0.045989990234375,
0.0174713134765625,
-0.07427978515625,
0.00971221923828125,
0.049163818359375,
-0.04779052734375,
0.05517578125,
0.035980224609375,
-0.01715087890625,
0.0163116455078125,
0.004795074462890625,
-0.00461578369140625,
-0.00824737548828125,
0.0003120899200439453,
-0.007335662841796875,
-0.0223846435546875,
0.036346435546875,
0.00103759765625,
0.0022602081298828125,
0.04803466796875,
-0.01367950439453125,
-0.0085296630859375,
0.00617218017578125,
0.0345458984375,
-0.024658203125,
0.00518798828125,
0.0179595947265625,
-0.0290679931640625,
0.004009246826171875,
-0.0004949569702148438,
-0.0247955322265625,
-0.0079803466796875,
-0.0014638900756835938,
-0.011688232421875,
-0.050537109375,
-0.0209197998046875,
0.02630615234375,
-0.003833770751953125,
0.006378173828125,
0.0036106109619140625,
0.016754150390625,
0.0215606689453125,
0.01519775390625,
-0.00783538818359375,
0.052764892578125,
0.00615692138671875,
0.053009033203125,
-0.0035457611083984375,
-0.00693511962890625,
-0.017303466796875,
0.0160980224609375,
0.041259765625,
-0.054443359375,
-0.0228729248046875,
-0.01442718505859375,
0.0537109375,
0.040679931640625,
-0.01546478271484375,
0.00970458984375,
0.0036163330078125,
0.052154541015625,
0.04290771484375,
-0.041107177734375,
0.0189361572265625,
0.0278167724609375,
-0.02734375,
0.0131683349609375,
0.006221771240234375,
-0.0271453857421875,
0.006130218505859375,
-0.0184173583984375,
-0.00870513916015625,
0.01357269287109375,
-0.01953125,
0.0372314453125,
-0.0251312255859375,
-0.0017290115356445312,
0.00634765625,
0.030792236328125,
-0.03448486328125,
-0.0178375244140625,
0.026214599609375,
-0.033203125,
-0.04071044921875,
0.0033664703369140625,
-0.02899169921875,
0.0809326171875,
-0.0302734375,
-0.00977325439453125,
0.0318603515625,
0.03955078125,
-0.0240631103515625,
0.017730712890625,
-0.029052734375,
0.0259552001953125,
-0.0228271484375,
0.005245208740234375,
-0.015228271484375,
0.0240631103515625,
-0.005649566650390625,
-0.019317626953125,
0.0028839111328125,
-0.006290435791015625,
0.00908660888671875,
-0.010345458984375,
-0.00382232666015625,
-0.0305023193359375,
-0.042327880859375,
0.029571533203125,
-0.01230621337890625,
0.0322265625,
0.01041412353515625,
-0.0238800048828125,
0.0220184326171875,
-0.01334381103515625,
-0.045257568359375,
0.0187835693359375,
0.017303466796875,
0.0182647705078125,
0.003849029541015625,
0.0142974853515625,
-0.00522613525390625,
-0.009002685546875,
0.00848388671875,
-0.032257080078125,
0.0116119384765625,
0.046844482421875,
0.0244293212890625,
0.0014886856079101562,
0.01194000244140625,
-0.036163330078125,
0.047882080078125,
-0.0164642333984375,
-0.00730133056640625,
0.0286407470703125,
0.018157958984375,
-0.021240234375,
-0.002674102783203125,
-0.0098114013671875,
0.013702392578125,
0.01068115234375,
0.07806396484375,
0.036865234375,
0.0295867919921875,
-0.01396942138671875,
0.02728271484375,
-0.00019347667694091797,
0.06854248046875,
-0.050262451171875,
-0.019805908203125,
0.0063018798828125,
0.01922607421875,
0.007411956787109375,
0.0191650390625,
0.031646728515625,
0.0660400390625,
0.0751953125,
0.01445770263671875,
-0.0161590576171875,
-0.0020771026611328125,
-0.0124053955078125,
0.01061248779296875,
0.00485992431640625,
0.0236358642578125,
0.01544952392578125,
-0.0025691986083984375,
-0.0198822021484375,
0.0194244384765625,
0.019195556640625,
-0.01322174072265625,
0.02056884765625,
-0.0118255615234375,
0.00861358642578125,
-0.032745361328125,
0.037017822265625,
0.0081939697265625,
0.042938232421875,
-0.04473876953125,
-0.03521728515625,
-0.00891876220703125,
0.057159423828125,
0.005519866943359375,
0.026214599609375,
0.034912109375,
0.0211639404296875,
-0.004436492919921875,
-0.0031890869140625,
0.035125732421875,
-0.020416259765625,
-0.0004930496215820312,
-0.0200042724609375,
0.037841796875,
0.0247650146484375,
0.0186920166015625,
-0.0167694091796875,
0.055694580078125,
-0.0035076141357421875,
-0.041595458984375,
0.03302001953125,
0.0062103271484375,
-0.0157470703125,
0.043243408203125,
0.0138702392578125,
0.042510986328125,
-0.0070648193359375,
-0.0305938720703125,
0.0036640167236328125,
-0.0210113525390625,
-0.0504150390625,
0.0297088623046875,
0.04119873046875,
-0.00585174560546875,
-0.00600433349609375,
-0.0197601318359375,
0.0478515625,
-0.0019311904907226562,
-0.035919189453125,
-0.01457977294921875,
0.028472900390625,
0.057220458984375,
0.0288848876953125,
0.034393310546875,
0.0011930465698242188,
0.013092041015625,
0.038177490234375,
-0.006183624267578125,
0.12005615234375,
-0.072021484375,
0.0156097412109375,
-0.02056884765625,
0.0167694091796875,
-0.0311737060546875,
-0.004058837890625,
-0.0118408203125,
0.01325225830078125,
0.01003265380859375,
-0.0109710693359375,
0.0007810592651367188,
0.006870269775390625,
0.04888916015625,
-0.0224609375,
-0.030303955078125,
0.03607177734375,
0.0296478271484375,
-0.003932952880859375,
0.030364990234375,
-0.002979278564453125,
-0.0227813720703125,
-0.00562286376953125,
-0.0142822265625,
0.040283203125,
0.07391357421875,
0.032928466796875,
-0.01424407958984375,
-0.0249176025390625,
-0.030914306640625,
0.0003933906555175781,
0.007495880126953125,
-0.0191650390625,
0.0100555419921875,
-0.0015697479248046875,
-0.0266876220703125,
-0.017425537109375,
-0.0306854248046875,
-0.0003333091735839844,
-0.00791168212890625,
0.0213623046875,
-0.0125579833984375,
-0.0285797119140625,
0.068359375,
0.03155517578125,
0.0423583984375,
-0.01654052734375,
0.003559112548828125,
0.0396728515625,
-0.0025768280029296875,
0.00202178955078125,
-0.035736083984375,
-0.031646728515625,
-0.031280517578125,
-0.01161956787109375,
0.0237274169921875,
-0.0037708282470703125,
-0.0272064208984375,
-0.06500244140625,
0.0382080078125,
0.03985595703125,
-0.001071929931640625,
-0.09576416015625,
0.044158935546875,
-0.01262664794921875,
0.10693359375,
-0.04718017578125,
-0.0013446807861328125,
-0.0094146728515625,
0.04168701171875,
-0.02838134765625,
-0.034027099609375,
-0.022491455078125,
0.0300445556640625,
-0.04229736328125,
0.030975341796875,
0.03125,
-0.03277587890625,
-0.0171661376953125,
0.0386962890625,
0.0379638671875,
0.0826416015625,
0.01520538330078125,
-0.01383209228515625,
0.059722900390625,
-0.0418701171875,
-0.036041259765625,
-0.11602783203125,
0.00513458251953125,
-0.1490478515625,
0.01531982421875,
-0.0282135009765625,
0.033233642578125,
0.04150390625,
-0.041717529296875,
-0.07257080078125,
0.03662109375,
-0.0338134765625,
-0.0341796875,
-0.0259857177734375,
-0.031585693359375,
-0.007785797119140625,
0.0384521484375,
-0.01007080078125,
0.0004112720489501953,
-0.05224609375,
0.0343017578125,
0.0006957054138183594,
-0.0123748779296875,
0.060272216796875,
-0.0095367431640625,
-0.049072265625,
-0.0244140625,
-0.0294952392578125,
-0.01465606689453125,
-0.005718231201171875,
-0.01532745361328125,
0.03253173828125,
0.047882080078125,
-0.00518035888671875,
-0.0504150390625,
0.022796630859375,
-0.048980712890625,
0.01026153564453125,
-0.06695556640625,
0.00330352783203125,
-0.0243072509765625,
0.04718017578125,
-0.013885498046875,
0.0157623291015625,
-0.0241546630859375,
-0.0290069580078125,
-0.03363037109375,
-0.033477783203125,
-0.0241851806640625,
0.019866943359375,
-0.08294677734375,
-0.0012683868408203125,
0.0218963623046875,
0.0003037452697753906,
-0.0017156600952148438,
0.0236968994140625,
-0.006946563720703125,
-0.00037932395935058594,
0.062744140625,
-0.00910186767578125,
-0.0134735107421875,
-0.0158538818359375,
0.0181732177734375,
-0.02117919921875,
-0.050628662109375,
0.0259857177734375,
0.0078277587890625,
-0.04083251953125,
0.011688232421875,
-0.03546142578125,
-0.00020432472229003906,
0.01507568359375,
0.022705078125,
-0.0019283294677734375,
-0.004878997802734375,
-0.0056915283203125,
0.00971221923828125,
0.0024852752685546875,
0.0033473968505859375,
-0.0022716522216796875,
0.004985809326171875,
-0.00910186767578125,
0.05743408203125,
-0.006977081298828125,
0.04437255859375,
-0.011932373046875,
0.026397705078125,
-0.0282745361328125,
0.042205810546875,
-0.0020389556884765625,
-0.01177215576171875,
0.01418304443359375,
0.003353118896484375,
-0.0027942657470703125,
0.014068603515625,
0.0037708282470703125,
-0.036834716796875,
0.0367431640625,
-0.0241546630859375,
0.0107574462890625,
0.0229339599609375
] |
9f00acc6d885001c7be1506f8753a40368241192 | Wordpress Stackexchange
Q: wp core update not working anymore I have a strange issue. Trying to update core wp version from 4.7 to 4.7.2 but wp keeps saying I am already up to date. But when I run
wp core version
Then I see 4.7 and not 4.7.2
Any ideas on how to troubleshoot ?
A: What is inside your version.php file?
File: /wp-includes/version.php
1: <?php
2: /**
3: * The WordPress version string
4: *
5: * @global string $wp_version
6: */
7: $wp_version = '4.7.1';
You can play with that number and test.
You can try to install the latest version of WP Cli and test.
You may update to WP-CLI version: 1.1.0 if the older version had problems. (I found out you used the 1.0 version of WP-CLI before).
| Q: wp core update not working anymore I have a strange issue. Trying to update core wp version from 4.7 to 4.7.2 but wp keeps saying I am already up to date. But when I run
wp core version
Then I see 4.7 and not 4.7.2
Any ideas on how to troubleshoot ?
A: What is inside your version.php file?
File: /wp-includes/version.php
1: <?php
2: /**
3: * The WordPress version string
4: *
5: * @global string $wp_version
6: */
7: $wp_version = '4.7.1';
You can play with that number and test.
You can try to install the latest version of WP Cli and test.
You may update to WP-CLI version: 1.1.0 if the older version had problems. (I found out you used the 1.0 version of WP-CLI before).
| wordpress | {
"language": "en",
"length": 130,
"provenance": "stackexchange_00019.jsonl.gz:472660",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/254805"
} | [
-0.0116424560546875,
-0.01885986328125,
-0.03790283203125,
0.00038552284240722656,
0.006317138671875,
-0.0302276611328125,
0.04736328125,
0.0029277801513671875,
0.06634521484375,
0.01551055908203125,
-0.034271240234375,
0.00014102458953857422,
-0.00959014892578125,
-0.0035114288330078125,
-0.05072021484375,
-0.021453857421875,
0.0552978515625,
-0.04498291015625,
0.0075531005859375,
-0.0163116455078125,
0.00811767578125,
0.0215911865234375,
0.009124755859375,
0.0654296875,
-0.0117950439453125,
-0.0303955078125,
0.05035400390625,
-0.0011501312255859375,
-0.022979736328125,
-0.0274505615234375,
0.00787353515625,
0.035552978515625,
0.0186614990234375,
0.042266845703125,
-0.0672607421875,
-0.055328369140625,
-0.01313018798828125,
0.0084228515625,
-0.029144287109375,
0.037261962890625,
-0.0165557861328125,
-0.0013275146484375,
0.0706787109375,
0.0224761962890625,
0.01195526123046875,
-0.0198974609375,
-0.009185791015625,
-0.043731689453125,
0.02142333984375,
0.0020809173583984375,
-0.030364990234375,
0.05517578125,
-0.00511932373046875,
0.0209503173828125,
-0.003742218017578125,
-0.02813720703125,
0.0087127685546875,
0.054046630859375,
0.036773681640625,
-0.0228271484375,
-0.0457763671875,
0.0200653076171875,
0.021240234375,
-0.01190185546875,
0.0079498291015625,
-0.01357269287109375,
0.047821044921875,
-0.01409149169921875,
-0.056884765625,
0.007556915283203125,
0.059112548828125,
-0.0108795166015625,
0.00601959228515625,
-0.0192718505859375,
0.04931640625,
-0.0255279541015625,
-0.003429412841796875,
-0.040008544921875,
0.016204833984375,
0.045562744140625,
0.041473388671875,
0.00830078125,
-0.031768798828125,
-0.00856781005859375,
0.0206298828125,
0.0284423828125,
0.0084075927734375,
-0.032196044921875,
-0.0107879638671875,
0.0091552734375,
-0.0177764892578125,
-0.058441162109375,
0.01074981689453125,
0.033721923828125,
0.00970458984375,
-0.01300048828125,
-0.00044155120849609375,
0.03253173828125,
-0.04827880859375,
0.000017821788787841797,
-0.0055694580078125,
-0.0136566162109375,
0.019256591796875,
-0.0361328125,
-0.01276397705078125,
0.0231475830078125,
0.0345458984375,
0.0821533203125,
0.0401611328125,
0.026947021484375,
0.00624847412109375,
0.023834228515625,
0.0035552978515625,
-0.042327880859375,
-0.00904083251953125,
0.00800323486328125,
-0.029449462890625,
0.032562255859375,
0.01806640625,
0.01377105712890625,
0.006702423095703125,
0.037628173828125,
-0.0302276611328125,
-0.0283203125,
-0.0047760009765625,
-0.004810333251953125,
0.016510009765625,
-0.03851318359375,
-0.0015459060668945312,
-0.005413055419921875,
-0.0293731689453125,
0.0198211669921875,
0.048004150390625,
0.036102294921875,
0.0116729736328125,
-0.0170745849609375,
0.0001672506332397461,
-0.031402587890625,
-0.0046234130859375,
0.00823211669921875,
0.00704193115234375,
-0.0308837890625,
-0.00370025634765625,
-0.00864410400390625,
0.0626220703125,
0.01479339599609375,
0.00681304931640625,
0.0216522216796875,
0.02618408203125,
-0.00249481201171875,
0.036102294921875,
-0.019317626953125,
0.0214996337890625,
0.00579833984375,
0.019195556640625,
-0.0513916015625,
0.09027099609375,
-0.078125,
-0.006130218505859375,
-0.07171630859375,
-0.03070068359375,
0.0014514923095703125,
0.027801513671875,
-0.01479339599609375,
0.0167999267578125,
0.01519775390625,
-0.046661376953125,
0.01140594482421875,
0.018280029296875,
-0.01020050048828125,
0.0195465087890625,
-0.00799560546875,
0.01898193359375,
-0.00034236907958984375,
-0.0010738372802734375,
0.024749755859375,
0.01076507568359375,
-0.0212860107421875,
0.0384521484375,
0.02398681640625,
-0.03070068359375,
-0.0234832763671875,
0.060882568359375,
-0.04779052734375,
-0.0252227783203125,
-0.05706787109375,
0.0011129379272460938,
0.0031414031982421875,
0.049530029296875,
0.01015472412109375,
0.020904541015625,
-0.0251312255859375,
0.0104217529296875,
0.06866455078125,
-0.01482391357421875,
-0.00927734375,
-0.04693603515625,
0.06427001953125,
-0.040924072265625,
-0.07708740234375,
0.043548583984375,
0.01409912109375,
-0.00986480712890625,
-0.039337158203125,
-0.09783935546875,
-0.01456451416015625,
-0.0273895263671875,
0.036956787109375,
0.017730712890625,
-0.0005316734313964844,
0.04144287109375,
0.032379150390625,
-0.02105712890625,
-0.04571533203125,
-0.07745361328125,
-0.00836181640625,
-0.04791259765625,
0.0095062255859375,
-0.005855560302734375,
0.043975830078125,
-0.011322021484375,
-0.012481689453125,
-0.0032138824462890625,
-0.020050048828125,
0.034393310546875,
-0.01200103759765625,
-0.00439453125,
-0.01448822021484375,
0.049560546875,
0.01323699951171875,
0.00030994415283203125,
-0.005420684814453125,
0.01284027099609375,
0.0290679931640625,
-0.0277862548828125,
-0.01523590087890625,
-0.031829833984375,
-0.040283203125,
0.021087646484375,
0.047943115234375,
0.04205322265625,
-0.0026378631591796875,
-0.0004143714904785156,
-0.03155517578125,
0.061126708984375,
-0.033233642578125,
0.00490570068359375,
-0.0194244384765625,
-0.0167388916015625,
0.012451171875,
0.0258026123046875,
0.0053558349609375,
0.01316070556640625,
-0.006732940673828125,
-0.010162353515625,
0.036163330078125,
0.006313323974609375,
0.006626129150390625,
-0.03302001953125,
0.0030994415283203125,
0.01032257080078125,
-0.0750732421875,
-0.0574951171875,
-0.01953125,
0.0215606689453125,
-0.0137176513671875,
0.0513916015625,
0.049072265625,
0.0064544677734375,
-0.047637939453125,
0.00563812255859375,
0.02630615234375,
0.0179290771484375,
0.0298309326171875,
-0.050811767578125,
0.026763916015625,
-0.0060272216796875,
0.00888824462890625,
-0.012542724609375,
0.0176544189453125,
0.0004963874816894531,
0.0126190185546875,
0.014068603515625,
-0.004024505615234375,
-0.00311279296875,
0.0003504753112792969,
0.033294677734375,
0.0207672119140625,
-0.02490234375,
-0.03302001953125,
0.010345458984375,
0.0229339599609375,
-0.0209503173828125,
0.03948974609375,
0.016510009765625,
-0.0242919921875,
0.02386474609375,
-0.0016088485717773438,
0.02349853515625,
-0.00939178466796875,
0.01129150390625,
0.059356689453125,
0.0006418228149414062,
0.02978515625,
0.003940582275390625,
0.022247314453125,
0.041351318359375,
-0.0328369140625,
-0.01534271240234375,
0.048828125,
-0.057281494140625,
0.0259857177734375,
0.03302001953125,
0.07110595703125,
-0.007610321044921875,
-0.04864501953125,
-0.008270263671875,
0.02874755859375,
-0.08831787109375,
-0.11126708984375,
-0.057464599609375,
-0.005950927734375,
-0.0213165283203125,
0.006107330322265625,
0.01198577880859375,
0.00750732421875,
0.010040283203125,
0.0075531005859375,
-0.023284912109375,
0.011993408203125,
-0.042510986328125,
-0.049102783203125,
-0.0787353515625,
-0.04595947265625,
-0.01538848876953125,
0.035675048828125,
-0.0023441314697265625,
0.053741455078125,
-0.0018205642700195312,
-0.051544189453125,
-0.0118255615234375,
0.022064208984375,
-0.0247039794921875,
-0.01885986328125,
-0.034698486328125,
0.0260162353515625,
0.01444244384765625,
-0.00019800662994384766,
0.0345458984375,
0.01531219482421875,
-0.0153350830078125,
-0.01116943359375,
-0.0104217529296875,
-0.06768798828125,
-0.00698089599609375,
0.032958984375,
0.004734039306640625,
-0.0263214111328125,
0.0369873046875,
-0.045989990234375,
-0.0155487060546875,
0.015716552734375,
-0.0183258056640625,
0.012054443359375,
-0.0001500844955444336,
-0.02490234375,
-0.0093841552734375,
0.0311279296875,
-0.039886474609375,
-0.00011640787124633789,
0.0428466796875,
-0.015045166015625,
0.058074951171875,
-0.033477783203125,
-0.066162109375,
-0.049346923828125,
0.0282745361328125,
-0.027618408203125,
0.010528564453125,
0.00746917724609375,
-0.0052490234375,
-0.0168609619140625,
0.0020084381103515625,
-0.036651611328125,
-0.028472900390625,
0.05322265625,
-0.01451873779296875,
0.0167083740234375,
-0.02484130859375,
-0.04217529296875,
0.00860595703125,
0.077880859375,
-0.01288604736328125,
-0.027496337890625,
0.037994384765625,
0.0230865478515625,
-0.04559326171875,
-0.0023193359375,
-0.0428466796875,
-0.01959228515625,
0.00759124755859375,
-0.0172271728515625,
-0.016204833984375,
-0.0119476318359375,
-0.024383544921875,
0.013885498046875,
0.0012788772583007812,
-0.0177154541015625,
0.0163116455078125,
-0.049713134765625,
0.007640838623046875,
0.00007975101470947266,
-0.031463623046875,
-0.0182037353515625,
-0.0167388916015625,
-0.0300445556640625,
-0.12841796875,
-0.011810302734375,
0.0061798095703125,
0.051971435546875,
-0.03070068359375,
0.006561279296875,
-0.0350341796875,
0.04345703125,
0.01092529296875,
0.0208740234375,
-0.023406982421875,
-0.01398468017578125,
0.0008139610290527344,
0.0244140625,
0.006824493408203125,
0.01390838623046875,
-0.0186767578125,
-0.028045654296875,
-0.0303955078125,
-0.0015716552734375,
-0.020294189453125,
0.011871337890625,
-0.0029754638671875,
-0.00933837890625,
0.033905029296875,
-0.038665771484375,
-0.054443359375,
0.004772186279296875,
-0.03173828125,
0.0008745193481445312,
-0.047821044921875,
-0.008453369140625,
0.0858154296875,
0.015899658203125,
-0.0024089813232421875,
-0.01375579833984375,
0.07562255859375,
-0.01091766357421875,
-0.05267333984375,
-0.042816162109375,
-0.03106689453125,
0.01470947265625,
0.0026454925537109375,
0.0247039794921875,
0.0006666183471679688,
-0.0016527175903320312,
0.03656005859375,
-0.0025768280029296875,
0.0113983154296875,
0.0175323486328125,
-0.004993438720703125,
0.024749755859375,
-0.0029239654541015625,
-0.00015175342559814453,
0.02423095703125,
-0.019287109375,
0.0289459228515625,
0.0135040283203125,
-0.03326416015625,
-0.012054443359375,
0.03497314453125,
0.03759765625,
-0.04376220703125,
-0.054595947265625,
-0.09991455078125,
0.037322998046875,
-0.06182861328125,
0.0293731689453125,
-0.0204315185546875,
0.00566864013671875,
0.045654296875,
0.0167236328125,
-0.0174102783203125,
-0.0335693359375,
-0.0036029815673828125,
-0.01873779296875,
0.00569915771484375,
0.0024547576904296875,
-0.042266845703125,
-0.0239410400390625,
-0.02093505859375,
0.1068115234375,
0.0086822509765625,
-0.07330322265625,
0.044219970703125,
-0.0077362060546875,
0.0170745849609375,
0.04327392578125,
0.006359100341796875,
0.0300750732421875,
0.0129241943359375,
0.002765655517578125,
-0.0230560302734375,
-0.05938720703125,
0.01145172119140625,
-0.03662109375,
-0.0003380775451660156,
0.01708984375,
-0.02337646484375,
0.01373291015625,
0.0213623046875,
0.02386474609375,
0.0040283203125,
-0.0165863037109375,
0.022308349609375,
0.053314208984375,
0.01120758056640625,
0.01751708984375,
-0.0296630859375,
0.0238494873046875,
-0.0274810791015625,
0.02203369140625,
-0.0217742919921875,
-0.02703857421875,
0.01506805419921875,
0.01873779296875,
0.0247039794921875,
0.018768310546875,
0.00279998779296875,
0.01523590087890625,
0.0187530517578125,
0.007720947265625,
0.0006861686706542969,
-0.024261474609375,
0.007244110107421875,
0.0328369140625,
0.0228729248046875,
-0.023529052734375,
-0.0007987022399902344,
-0.00856781005859375,
-0.0301666259765625,
-0.02581787109375,
0.0116729736328125,
-0.024658203125,
-0.018707275390625,
-0.0042877197265625,
0.0285186767578125,
-0.02166748046875,
-0.01861572265625,
0.01071929931640625,
0.01427459716796875,
-0.033111572265625,
-0.0151824951171875,
0.035736083984375,
-0.01505279541015625,
-0.01343536376953125,
-0.0080413818359375,
-0.00518035888671875,
-0.0015850067138671875,
0.01392364501953125,
0.0302886962890625,
-0.004337310791015625,
-0.030609130859375,
-0.00803375244140625,
-0.060455322265625,
-0.032623291015625,
-0.007843017578125,
-0.038482666015625,
-0.040130615234375,
0.01303863525390625,
0.018707275390625,
0.0077056884765625,
-0.01448822021484375,
-0.0268096923828125,
-0.049652099609375,
0.0574951171875,
0.052886962890625,
0.056793212890625,
-0.01416015625,
0.0673828125,
0.005123138427734375,
0.04705810546875,
0.0166473388671875,
0.03704833984375,
-0.0289154052734375,
-0.0103912353515625,
0.044830322265625,
-0.0183258056640625,
-0.041229248046875,
-0.048797607421875,
0.021331787109375,
-0.04351806640625,
-0.03009033203125,
-0.023162841796875,
0.010345458984375,
-0.052978515625,
-0.012725830078125,
-0.0250701904296875,
0.07659912109375,
-0.03460693359375,
-0.01277923583984375,
0.03216552734375,
-0.041748046875,
-0.00699615478515625,
-0.01934814453125,
0.004405975341796875,
0.0084991455078125,
-0.0263214111328125,
-0.0162506103515625,
0.042205810546875,
-0.0302581787109375,
0.040283203125,
0.0726318359375,
-0.0171966552734375,
0.055999755859375,
0.0117645263671875,
0.007236480712890625,
0.042938232421875,
-0.00783538818359375,
-0.014373779296875,
0.019378662109375,
0.039154052734375,
-0.0019464492797851562,
0.00205230712890625,
0.00887298583984375,
-0.01184844970703125,
0.026153564453125,
0.01094818115234375,
0.06298828125,
-0.0158233642578125,
0.0175323486328125,
0.0217132568359375,
-0.035614013671875,
0.057342529296875,
-0.0102996826171875,
-0.022430419921875,
-0.036895751953125,
0.049407958984375,
-0.01318359375,
-0.01326751708984375,
0.02105712890625,
0.01369476318359375,
-0.0241241455078125,
-0.0287628173828125,
0.0357666015625,
0.04083251953125,
-0.043212890625,
0.060150146484375,
0.0258636474609375,
0.0058746337890625,
0.020660400390625,
-0.00046324729919433594,
-0.0202789306640625,
-0.04229736328125,
-0.05096435546875,
-0.03729248046875,
-0.032745361328125,
-0.0550537109375,
0.02484130859375,
0.0212249755859375,
-0.00441741943359375,
0.02239990234375,
0.007404327392578125,
-0.004886627197265625,
0.0018320083618164062,
-0.0047607421875,
-0.01953125,
-0.0172271728515625,
0.03521728515625,
0.00836181640625,
-0.03546142578125,
0.0216827392578125,
-0.032989501953125,
-0.020965576171875,
-0.01320648193359375,
-0.004192352294921875,
0.12310791015625,
-0.03717041015625,
-0.0290679931640625,
0.0027332305908203125,
-0.0308380126953125,
-0.0028591156005859375,
0.032135009765625,
-0.0104522705078125,
-0.0489501953125,
-0.016326904296875,
0.0179443359375,
-0.0013828277587890625,
0.0149383544921875,
0.06573486328125,
-0.00255584716796875,
0.08001708984375,
-0.02960205078125,
-0.0253143310546875,
0.0188140869140625,
0.045562744140625,
-0.0216217041015625,
0.0367431640625,
-0.01131439208984375,
0.017669677734375,
-0.01030731201171875,
0.028564453125,
0.005832672119140625,
0.016845703125,
0.004444122314453125,
0.0195159912109375,
-0.007686614990234375,
0.009124755859375,
-0.0499267578125,
-0.0018672943115234375,
0.032257080078125,
0.04229736328125,
0.044097900390625,
0.0299530029296875,
-0.0302734375,
-0.053558349609375,
-0.004703521728515625,
0.032806396484375,
0.0430908203125,
-0.002635955810546875,
-0.050750732421875,
0.005046844482421875,
0.0296173095703125,
0.048553466796875,
-0.0269317626953125,
0.0673828125,
0.0142669677734375,
-0.0221405029296875,
0.008392333984375,
0.006580352783203125,
-0.01259613037109375,
-0.0008835792541503906,
-0.03900146484375,
-0.0033283233642578125,
0.033905029296875,
-0.03704833984375,
0.010528564453125,
-0.0203399658203125,
-0.0002460479736328125,
0.007171630859375,
0.01041412353515625,
0.0216522216796875,
-0.01445770263671875,
-0.006626129150390625,
0.03656005859375,
-0.0129852294921875,
0.053924560546875,
0.0257568359375,
0.041412353515625,
-0.006290435791015625,
0.04443359375,
0.0236663818359375,
0.048553466796875,
-0.06341552734375,
-0.01349639892578125,
0.0252227783203125,
-0.0117950439453125,
-0.0236053466796875,
-0.046234130859375,
-0.03717041015625,
0.0016813278198242188,
0.0089874267578125,
-0.0241546630859375,
-0.01561737060546875,
0.0160369873046875,
0.01183319091796875,
0.0215301513671875,
0.0260467529296875,
-0.006885528564453125,
-0.00980377197265625,
-0.05108642578125,
0.0139007568359375,
0.03875732421875,
0.049224853515625,
0.005420684814453125,
0.0673828125,
0.0243988037109375,
-0.02032470703125,
0.02178955078125,
0.062347412109375,
-0.00908660888671875,
-0.03729248046875,
0.0170440673828125,
-0.07745361328125,
0.0039215087890625,
0.005725860595703125,
0.00457763671875,
-0.006805419921875,
0.0206451416015625,
0.047637939453125,
-0.0166015625,
-0.014862060546875,
0.069580078125,
-0.0050048828125,
-0.058807373046875,
-0.04400634765625,
0.01149749755859375,
0.0217742919921875,
0.0201416015625,
0.03369140625,
0.03387451171875,
0.01531219482421875,
0.0205535888671875,
0.0177001953125,
0.01506805419921875,
0.010467529296875,
0.03863525390625,
0.031982421875,
0.021575927734375,
0.0537109375,
0.031494140625,
0.0149383544921875,
-0.00176239013671875,
-0.0251922607421875,
-0.0145416259765625,
0.0079345703125,
-0.0119171142578125,
0.02313232421875,
-0.055816650390625,
-0.0014238357543945312,
0.0037250518798828125,
0.0167694091796875,
-0.022125244140625,
0.0142669677734375,
0.024139404296875,
-0.017791748046875,
-0.0467529296875,
-0.0245819091796875,
-0.0030040740966796875,
0.042755126953125,
0.01239776611328125,
0.0723876953125,
-0.030487060546875,
0.007480621337890625,
-0.011962890625,
0.03485107421875,
-0.04669189453125,
-0.020721435546875,
0.01739501953125,
-0.0002658367156982422,
0.01294708251953125,
0.0016431808471679688,
-0.07781982421875,
0.0175323486328125,
0.0211029052734375,
-0.007450103759765625,
0.0157623291015625,
-0.028411865234375,
0.01520538330078125,
0.0009446144104003906,
-0.0312042236328125,
-0.035186767578125,
0.0100860595703125,
0.039093017578125,
-0.0178985595703125,
-0.0037937164306640625,
-0.041168212890625,
0.0240020751953125,
0.005916595458984375,
0.041839599609375,
-0.025665283203125,
0.0178375244140625,
0.002155303955078125,
0.038970947265625,
0.03253173828125,
0.030853271484375,
-0.0010347366333007812,
-0.029571533203125,
-0.0307159423828125,
0.00518035888671875,
-0.0177001953125,
0.022735595703125,
-0.031585693359375,
0.0124664306640625,
0.0186309814453125,
0.0242767333984375,
0.054412841796875,
-0.03363037109375,
0.0203704833984375,
0.004077911376953125,
0.0250701904296875,
0.03131103515625,
-0.0482177734375,
-0.004535675048828125,
-0.05047607421875,
-0.01047515869140625,
0.0149688720703125,
-0.0216217041015625,
-0.000010371208190917969,
0.020843505859375,
-0.0139617919921875,
0.043670654296875,
0.0057830810546875,
-0.023895263671875,
0.006191253662109375,
-0.030914306640625,
0.01277923583984375,
0.01038360595703125,
-0.01204681396484375,
-0.0121307373046875,
0.0214691162109375,
0.00923919677734375,
-0.00041413307189941406,
-0.0284881591796875,
0.0310821533203125,
0.0203857421875,
-0.002574920654296875,
0.0147247314453125,
0.0006928443908691406,
-0.0254058837890625,
0.01332855224609375,
-0.0007915496826171875,
0.04437255859375,
-0.0028820037841796875,
-0.00943756103515625,
-0.01229095458984375,
-0.0148162841796875,
-0.027191162109375,
-0.0228118896484375,
0.022796630859375,
-0.06884765625,
-0.0528564453125,
-0.057708740234375,
0.04443359375,
0.030181884765625,
-0.0345458984375,
-0.08648681640625,
-0.03778076171875,
-0.0201568603515625,
-0.035430908203125,
-0.048919677734375,
-0.03704833984375,
-0.01385498046875,
0.025421142578125,
-0.02911376953125,
-0.0070648193359375,
-0.024169921875,
0.06573486328125,
-0.005229949951171875,
0.0377197265625,
0.0035877227783203125,
-0.01169586181640625,
0.0108184814453125,
0.02337646484375,
0.0311126708984375,
-0.00644683837890625,
-0.012969970703125,
0.0122833251953125,
0.00835418701171875,
0.021728515625,
-0.018524169921875,
-0.00469207763671875,
0.0108184814453125,
-0.005847930908203125,
0.0181884765625,
-0.035736083984375,
-0.0731201171875,
-0.033172607421875,
0.0259552001953125,
0.048553466796875,
0.023712158203125,
-0.015655517578125,
0.005802154541015625,
-0.0205841064453125,
-0.039703369140625,
0.0019102096557617188,
0.0083160400390625,
-0.019622802734375,
0.01727294921875,
-0.0168304443359375,
-0.01479339599609375,
0.01279449462890625,
-0.010284423828125,
-0.0094757080078125,
-0.02178955078125,
-0.0159759521484375,
-0.0182952880859375,
-0.011932373046875,
-0.03314208984375,
0.047027587890625,
-0.00955963134765625,
0.0618896484375,
-0.0263671875,
0.03863525390625,
0.06689453125,
0.0228729248046875,
-0.00002962350845336914,
0.0322265625,
-0.01519775390625,
-0.0232696533203125,
0.01531219482421875,
-0.016876220703125,
0.016448974609375,
-0.0168304443359375,
0.0303497314453125,
0.030426025390625,
-0.0192108154296875,
0.034210205078125,
0.00701141357421875,
0.03411865234375,
-0.032623291015625,
0.05474853515625,
0.0157318115234375,
0.0181121826171875,
-0.023681640625,
0.066162109375,
-0.0164947509765625,
-0.045379638671875,
-0.0198516845703125,
-0.016510009765625,
0.0103607177734375,
0.042083740234375,
0.0360107421875,
-0.0238037109375,
0.002620697021484375,
0.021636962890625,
0.034393310546875,
-0.00376129150390625
] |
23c3bc76aa45fb6d760668d1961f4a4b4f7c0941 | Wordpress Stackexchange
Q: Multiple Single Post templates I have a custom post type called funerals and a page the lists all the posts part of that custom post type. To display a single page I create a file called single-funerals.php and that all works well. But, now I need to have another single post page that only displays a video for a funeral. How would I set that up and link to it from the main page that lists all the posts?
A: As I answered here, since WordPress 4.7 Post-Type-Templates are enabled in the WordPress core.
That means that you can create multiple templates for the single post-type view. You create these templates like you would create a normal page template. But you need to add a little more code to these templates:
/*
Template Name: Funerals Video Template
Template Post Type: post, funerals
*/
So you will need to copy your single-funerals.php file, rename it, add some code like the above to the top of the file.
After this, you should see a template select box on the post and funerals edit-screen. (because I specified these 2 post-types with Template Post Type: post, funerals)
Read more about post-type-templates here.
| Q: Multiple Single Post templates I have a custom post type called funerals and a page the lists all the posts part of that custom post type. To display a single page I create a file called single-funerals.php and that all works well. But, now I need to have another single post page that only displays a video for a funeral. How would I set that up and link to it from the main page that lists all the posts?
A: As I answered here, since WordPress 4.7 Post-Type-Templates are enabled in the WordPress core.
That means that you can create multiple templates for the single post-type view. You create these templates like you would create a normal page template. But you need to add a little more code to these templates:
/*
Template Name: Funerals Video Template
Template Post Type: post, funerals
*/
So you will need to copy your single-funerals.php file, rename it, add some code like the above to the top of the file.
After this, you should see a template select box on the post and funerals edit-screen. (because I specified these 2 post-types with Template Post Type: post, funerals)
Read more about post-type-templates here.
A: You could turn the single-funerals.php code into a 'page template', then use that template when you create the page.
Read about page templates here: https://developer.wordpress.org/themes/template-files-section/page-templates/
A: you can create Post Type Templates It's default WordPress directories file.
For More information:
https://codex.wordpress.org/Post_Type_Templates
https://developer.wordpress.org/themes/template-files-section/custom-post-type-template-files/
single-{post_type}.php create this file where your single.php file
single-{post_type}.php
| wordpress | {
"language": "en",
"length": 251,
"provenance": "stackexchange_00019.jsonl.gz:472673",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/254845"
} | [
0.0860595703125,
-0.0211181640625,
0.0277252197265625,
-0.0587158203125,
0.0024242401123046875,
-0.0037097930908203125,
0.045013427734375,
-0.01172637939453125,
-0.03076171875,
0.0271148681640625,
0.00490570068359375,
0.0101470947265625,
-0.01242828369140625,
-0.03387451171875,
0.0151519775390625,
-0.0126190185546875,
0.032989501953125,
-0.02301025390625,
0.0246124267578125,
-0.026397705078125,
0.022491455078125,
-0.0217437744140625,
0.0186767578125,
0.035003662109375,
-0.012481689453125,
0.015838623046875,
0.052642822265625,
-0.03240966796875,
-0.014434814453125,
-0.0279693603515625,
-0.002079010009765625,
0.03167724609375,
0.044097900390625,
-0.00844573974609375,
-0.03057861328125,
-0.006763458251953125,
-0.029052734375,
0.0103912353515625,
-0.00974273681640625,
0.003208160400390625,
-0.03460693359375,
0.0249481201171875,
0.035858154296875,
0.0196990966796875,
0.004589080810546875,
-0.031890869140625,
-0.0164337158203125,
-0.07421875,
0.0252685546875,
-0.01045989990234375,
-0.016845703125,
-0.05889892578125,
0.00684356689453125,
-0.0005831718444824219,
-0.03558349609375,
-0.052825927734375,
-0.0010423660278320312,
-0.036102294921875,
0.04278564453125,
-0.005828857421875,
-0.03509521484375,
-0.03546142578125,
0.02618408203125,
-0.039306640625,
-0.022674560546875,
0.0159149169921875,
-0.00899505615234375,
-0.001903533935546875,
-0.037506103515625,
-0.0203094482421875,
0.01245880126953125,
-0.01904296875,
0.0290069580078125,
-0.0223541259765625,
0.026641845703125,
0.0069732666015625,
-0.00173187255859375,
0.006908416748046875,
0.01357269287109375,
0.00011235475540161133,
0.0321044921875,
0.026214599609375,
-0.00974273681640625,
-0.0712890625,
0.031890869140625,
-0.0472412109375,
0.005481719970703125,
-0.0008907318115234375,
-0.0301513671875,
-0.019744873046875,
-0.02655029296875,
-0.055694580078125,
-0.00728607177734375,
0.005218505859375,
-0.01203155517578125,
-0.01641845703125,
0.0009188652038574219,
0.0248870849609375,
-0.0164794921875,
0.005626678466796875,
0.0049896240234375,
-0.031982421875,
0.0243072509765625,
-0.0257110595703125,
0.006099700927734375,
0.0129241943359375,
-0.001461029052734375,
-0.0029811859130859375,
0.04736328125,
0.02862548828125,
-0.0003247261047363281,
0.0479736328125,
0.0004935264587402344,
-0.017791748046875,
-0.0294189453125,
-0.00351715087890625,
-0.00490570068359375,
-0.006565093994140625,
0.00667572021484375,
-0.0142822265625,
0.005573272705078125,
0.031494140625,
0.04345703125,
-0.04510498046875,
-0.0309600830078125,
-0.01396942138671875,
0.002979278564453125,
-0.08294677734375,
0.0416259765625,
-0.013580322265625,
-0.0223388671875,
0.00450897216796875,
0.032257080078125,
0.0295562744140625,
0.0184783935546875,
-0.007259368896484375,
0.0016384124755859375,
0.0188446044921875,
-0.01983642578125,
0.0238494873046875,
-0.0006852149963378906,
-0.0350341796875,
-0.007381439208984375,
-0.00765228271484375,
0.00791168212890625,
0.0159454345703125,
0.0267486572265625,
-0.00020575523376464844,
0.0021820068359375,
-0.000629425048828125,
-0.036468505859375,
0.02825927734375,
0.0089874267578125,
-0.004680633544921875,
-0.0019969940185546875,
-0.060089111328125,
-0.04864501953125,
-0.020538330078125,
0.058074951171875,
-0.01427459716796875,
0.0188140869140625,
0.016510009765625,
0.038238525390625,
-0.0217437744140625,
-0.0113983154296875,
-0.01474761962890625,
-0.06060791015625,
-0.005214691162109375,
0.0191497802734375,
-0.00724029541015625,
-0.01128387451171875,
-0.0149993896484375,
0.008636474609375,
-0.01018524169921875,
-0.012359619140625,
0.013641357421875,
-0.03985595703125,
0.0032196044921875,
0.0212860107421875,
0.01331329345703125,
0.00528717041015625,
-0.0276336669921875,
0.0202484130859375,
0.0230255126953125,
-0.08026123046875,
0.056793212890625,
0.0197601318359375,
0.06610107421875,
0.004741668701171875,
0.00844573974609375,
0.06573486328125,
0.042633056640625,
-0.00031065940856933594,
0.037750244140625,
0.00565338134765625,
-0.03375244140625,
-0.02972412109375,
-0.0006418228149414062,
-0.016510009765625,
-0.02032470703125,
0.0031681060791015625,
-0.0013065338134765625,
0.04327392578125,
0.00717926025390625,
0.0137176513671875,
0.01184844970703125,
-0.01425933837890625,
0.0251617431640625,
-0.043182373046875,
0.0195465087890625,
0.036102294921875,
-0.001857757568359375,
-0.01739501953125,
-0.03271484375,
0.008697509765625,
-0.0178985595703125,
0.007740020751953125,
0.01525115966796875,
-0.031585693359375,
0.007114410400390625,
-0.032012939453125,
-0.0305328369140625,
-0.0213470458984375,
0.054107666015625,
0.061370849609375,
0.00799560546875,
-0.029144287109375,
-0.0220794677734375,
-0.01207733154296875,
0.027557373046875,
-0.08868408203125,
0.049530029296875,
-0.021728515625,
-0.018096923828125,
-0.043975830078125,
-0.00897979736328125,
-0.011810302734375,
0.004978179931640625,
0.00472259521484375,
0.043975830078125,
0.020843505859375,
0.007289886474609375,
0.00038695335388183594,
0.04229736328125,
0.031524658203125,
-0.0361328125,
-0.0022296905517578125,
0.01137542724609375,
0.00865936279296875,
-0.00543975830078125,
-0.0128173828125,
-0.00608062744140625,
0.03582763671875,
-0.0989990234375,
0.012786865234375,
0.037750244140625,
-0.0224151611328125,
-0.0205841064453125,
0.0173187255859375,
0.005008697509765625,
0.002643585205078125,
0.018829345703125,
0.0043487548828125,
0.00377655029296875,
0.07855224609375,
0.0224761962890625,
0.0638427734375,
0.0212249755859375,
-0.044097900390625,
0.034515380859375,
0.00989532470703125,
-0.01030731201171875,
-0.0011920928955078125,
-0.0024890899658203125,
0.0259246826171875,
0.0304718017578125,
-0.0213623046875,
-0.00658416748046875,
-0.00424957275390625,
0.0006303787231445312,
-0.0243072509765625,
0.01369476318359375,
-0.0650634765625,
-0.01201629638671875,
-0.0184326171875,
-0.06854248046875,
-0.006591796875,
0.0275421142578125,
0.032073974609375,
-0.0159912109375,
0.0030193328857421875,
0.048004150390625,
-0.010223388671875,
0.06939697265625,
0.0198211669921875,
-0.02606201171875,
0.038909912109375,
-0.0618896484375,
0.0684814453125,
-0.053436279296875,
0.038787841796875,
0.055694580078125,
-0.06182861328125,
0.06048583984375,
-0.011993408203125,
0.0269317626953125,
0.01474761962890625,
-0.00038552284240722656,
-0.0277252197265625,
-0.07501220703125,
0.030853271484375,
-0.0111083984375,
0.00589752197265625,
0.02557373046875,
-0.004730224609375,
-0.0227508544921875,
0.0025348663330078125,
0.027069091796875,
0.0059356689453125,
-0.0019130706787109375,
0.0455322265625,
-0.044403076171875,
0.005847930908203125,
-0.011749267578125,
-0.02032470703125,
-0.0399169921875,
0.024871826171875,
0.0033740997314453125,
0.0035037994384765625,
0.011444091796875,
-0.0202789306640625,
0.00734710693359375,
-0.0260467529296875,
0.00174713134765625,
0.00568389892578125,
0.0016307830810546875,
0.014373779296875,
0.062408447265625,
0.033233642578125,
-0.034454345703125,
0.048095703125,
0.054107666015625,
-0.039703369140625,
-0.004253387451171875,
0.03253173828125,
0.0153961181640625,
0.0153350830078125,
0.023529052734375,
-0.02410888671875,
0.055389404296875,
-0.060028076171875,
-0.042083740234375,
-0.0187530517578125,
-0.0208740234375,
0.004497528076171875,
0.01548004150390625,
0.0180206298828125,
0.0257568359375,
0.040374755859375,
-0.021728515625,
-0.0869140625,
-0.020782470703125,
-0.07763671875,
0.0221710205078125,
0.0714111328125,
0.007110595703125,
-0.0501708984375,
0.0390625,
-0.0292205810546875,
0.009552001953125,
-0.0226898193359375,
-0.0180816650390625,
0.0546875,
-0.0020008087158203125,
0.001888275146484375,
0.0194244384765625,
-0.047119140625,
-0.046844482421875,
0.011199951171875,
-0.039642333984375,
-0.0209808349609375,
-0.026336669921875,
0.0201568603515625,
-0.01386260986328125,
-0.0570068359375,
0.0582275390625,
-0.01904296875,
0.0015153884887695312,
-0.0633544921875,
-0.05267333984375,
-0.020416259765625,
0.08984375,
-0.0599365234375,
-0.00983428955078125,
0.0208282470703125,
0.007465362548828125,
0.02557373046875,
-0.04376220703125,
-0.02838134765625,
-0.033416748046875,
-0.049224853515625,
0.01522064208984375,
0.0017671585083007812,
-0.02685546875,
-0.01302337646484375,
-0.006168365478515625,
-0.051605224609375,
-0.026123046875,
0.0268402099609375,
-0.027435302734375,
0.010772705078125,
0.0237884521484375,
-0.032470703125,
0.0196380615234375,
-0.038787841796875,
-0.02349853515625,
-0.04864501953125,
-0.0239105224609375,
0.02423095703125,
0.034942626953125,
0.00974273681640625,
-0.044586181640625,
0.0117034912109375,
0.0450439453125,
0.0032405853271484375,
0.036041259765625,
-0.019073486328125,
0.00018537044525146484,
-0.00699615478515625,
-0.0211334228515625,
0.0011425018310546875,
-0.01418304443359375,
-0.005184173583984375,
-0.01500701904296875,
-0.0150909423828125,
0.04156494140625,
-0.0251617431640625,
0.0270233154296875,
-0.0184478759765625,
-0.0035991668701171875,
-0.04400634765625,
-0.0069732666015625,
0.02447509765625,
0.022125244140625,
0.01393890380859375,
-0.0044097900390625,
-0.0117034912109375,
-0.041717529296875,
0.006988525390625,
0.00699615478515625,
-0.027313232421875,
0.0228424072265625,
0.020111083984375,
0.01541900634765625,
-0.024627685546875,
-0.0716552734375,
0.033111572265625,
0.05218505859375,
0.01068878173828125,
0.0124053955078125,
0.0180206298828125,
-0.0286102294921875,
0.008148193359375,
0.023895263671875,
-0.03692626953125,
0.023712158203125,
0.041748046875,
-0.01503753662109375,
-0.048583984375,
0.026214599609375,
-0.04742431640625,
0.00862884521484375,
0.01476287841796875,
0.0139312744140625,
-0.0298614501953125,
0.00824737548828125,
0.038848876953125,
0.01381683349609375,
-0.0212249755859375,
-0.05126953125,
-0.0413818359375,
0.0042266845703125,
-0.004116058349609375,
0.0278472900390625,
0.0450439453125,
-0.00011390447616577148,
0.055328369140625,
0.005847930908203125,
-0.0010776519775390625,
0.028900146484375,
0.02301025390625,
0.0250091552734375,
0.00595855712890625,
0.07379150390625,
0.0024051666259765625,
-0.01279449462890625,
-0.00232696533203125,
0.0192413330078125,
0.0217132568359375,
-0.034149169921875,
-0.024810791015625,
0.01593017578125,
-0.00395965576171875,
-0.0138092041015625,
-0.02520751953125,
0.0165557861328125,
0.02734375,
0.0010957717895507812,
0.00927734375,
-0.0233154296875,
0.010223388671875,
-0.0266571044921875,
0.023101806640625,
0.0251922607421875,
-0.004314422607421875,
0.011871337890625,
0.041961669921875,
0.033660888671875,
0.00887298583984375,
-0.034942626953125,
0.036346435546875,
0.043212890625,
0.0303955078125,
0.022216796875,
-0.019195556640625,
-0.042816162109375,
0.0293426513671875,
-0.017333984375,
-0.035430908203125,
-0.047515869140625,
0.01145172119140625,
0.043304443359375,
-0.027069091796875,
0.003986358642578125,
0.01971435546875,
0.0204620361328125,
-0.0220489501953125,
0.0003528594970703125,
0.0278778076171875,
0.0023040771484375,
-0.00969696044921875,
0.037384033203125,
0.0140838623046875,
0.032470703125,
-0.0280914306640625,
-0.01000213623046875,
-0.042572021484375,
-0.002414703369140625,
-0.00394439697265625,
-0.049652099609375,
0.0092926025390625,
0.0199432373046875,
0.01171112060546875,
-0.0137481689453125,
-0.00893402099609375,
-0.06982421875,
-0.00994873046875,
-0.0158538818359375,
0.0013055801391601562,
0.026824951171875,
-0.007843017578125,
0.004608154296875,
-0.010955810546875,
-0.0248260498046875,
0.0198211669921875,
0.00934600830078125,
0.042724609375,
0.0005230903625488281,
-0.04681396484375,
0.007625579833984375,
-0.044586181640625,
-0.0224151611328125,
-0.0241241455078125,
-0.03265380859375,
-0.061431884765625,
0.011260986328125,
-0.030853271484375,
0.019622802734375,
-0.0056304931640625,
0.01303863525390625,
-0.00194549560546875,
0.0003299713134765625,
-0.045013427734375,
-0.004261016845703125,
0.01416778564453125,
0.05621337890625,
-0.01153564453125,
0.07781982421875,
0.021881103515625,
0.01403045654296875,
-0.046630859375,
-0.01282501220703125,
0.0167388916015625,
-0.058502197265625,
-0.050018310546875,
0.00739288330078125,
-0.03582763671875,
0.06243896484375,
0.049530029296875,
0.0007882118225097656,
-0.005435943603515625,
-0.031982421875,
-0.003101348876953125,
-0.0184326171875,
0.04443359375,
-0.004459381103515625,
-0.0272674560546875,
0.042510986328125,
0.01383209228515625,
0.072998046875,
-0.0010728836059570312,
-0.04962158203125,
0.032196044921875,
0.01276397705078125,
0.048065185546875,
0.01360321044921875,
0.0020580291748046875,
0.0167694091796875,
0.043121337890625,
-0.02093505859375,
0.024200439453125,
0.00882720947265625,
-0.008392333984375,
0.024993896484375,
-0.00952911376953125,
-0.01079559326171875,
-0.005519866943359375,
0.020263671875,
-0.0145416259765625,
-0.00307464599609375,
0.0055084228515625,
-0.0124359130859375,
0.0143585205078125,
0.009124755859375,
0.01485443115234375,
-0.03070068359375,
0.0118560791015625,
-0.0184326171875,
-0.0247344970703125,
0.0235443115234375,
-0.012176513671875,
0.00946044921875,
-0.01306915283203125,
0.024078369140625,
0.04656982421875,
-0.00870513916015625,
0.01309967041015625,
-0.00270843505859375,
0.00424957275390625,
0.0106658935546875,
0.05126953125,
0.004360198974609375,
-0.0277557373046875,
-0.012969970703125,
-0.0134429931640625,
0.00882720947265625,
-0.0010175704956054688,
0.0181121826171875,
-0.01415252685546875,
-0.009490966796875,
0.0278778076171875,
0.042724609375,
-0.03533935546875,
0.007465362548828125,
0.010009765625,
0.03607177734375,
-0.01073455810546875,
0.019927978515625,
-0.0022754669189453125,
-0.00571441650390625,
-0.003620147705078125,
-0.02056884765625,
-0.052490234375,
-0.039093017578125,
-0.0164947509765625,
0.02899169921875,
-0.03192138671875,
0.0296783447265625,
-0.0111083984375,
-0.0192718505859375,
-0.018157958984375,
-0.003871917724609375,
0.050537109375,
-0.0002455711364746094,
-0.0211639404296875,
0.03814697265625,
0.02923583984375,
-0.03057861328125,
0.03887939453125,
0.01493072509765625,
-0.055206298828125,
-0.064208984375,
0.0360107421875,
-0.08355712890625,
-0.0195465087890625,
0.053436279296875,
-0.05712890625,
0.125244140625,
0.00644683837890625,
0.015869140625,
0.00750732421875,
0.0579833984375,
-0.0377197265625,
0.040802001953125,
0.0017385482788085938,
0.0175018310546875,
-0.026214599609375,
0.03961181640625,
-0.0216522216796875,
-0.001293182373046875,
0.00473785400390625,
0.039398193359375,
0.061981201171875,
0.023040771484375,
-0.00905609130859375,
0.01097869873046875,
0.06695556640625,
0.01702880859375,
-0.0185699462890625,
0.0280914306640625,
-0.0307464599609375,
-0.0132293701171875,
-0.01316070556640625,
0.0176544189453125,
0.0287017822265625,
0.00608062744140625,
-0.073486328125,
0.01076507568359375,
0.018463134765625,
0.032562255859375,
0.0110015869140625,
-0.04144287109375,
0.00763702392578125,
-0.0017032623291015625,
-0.0012969970703125,
-0.0187530517578125,
-0.007083892822265625,
0.015899658203125,
0.040069580078125,
-0.055908203125,
0.0693359375,
-0.047332763671875,
0.064453125,
-0.0018796920776367188,
-0.0204620361328125,
0.028167724609375,
0.006977081298828125,
-0.0068359375,
-0.0249481201171875,
-0.017791748046875,
-0.00540924072265625,
0.0199127197265625,
0.053802490234375,
-0.00783538818359375,
0.016326904296875,
-0.0709228515625,
-0.0068206787109375,
0.0218505859375,
0.055023193359375,
-0.035980224609375,
-0.06439208984375,
0.013031005859375,
0.020904541015625,
0.0034694671630859375,
0.00982666015625,
0.007762908935546875,
-0.0203857421875,
0.0355224609375,
-0.03973388671875,
-0.00661468505859375,
0.02508544921875,
0.005687713623046875,
-0.0175628662109375,
-0.017120361328125,
-0.004123687744140625,
0.0028514862060546875,
-0.040618896484375,
0.01456451416015625,
0.042999267578125,
0.051422119140625,
0.003162384033203125,
0.04632568359375,
0.0198211669921875,
-0.021514892578125,
0.0029754638671875,
0.0112762451171875,
-0.0031070709228515625,
-0.0205535888671875,
-0.01319122314453125,
-0.0282135009765625,
0.002536773681640625,
0.02435302734375,
0.0452880859375,
0.016326904296875,
0.0206146240234375,
0.0141143798828125,
0.0124969482421875,
-0.001766204833984375,
0.031829833984375,
-0.008697509765625,
0.0198516845703125,
-0.0257110595703125,
-0.0286865234375,
-0.035064697265625,
-0.047760009765625,
0.00424957275390625,
0.00244140625,
-0.0037250518798828125,
0.00909423828125,
-0.004383087158203125,
0.00925445556640625,
-0.04534912109375,
0.027618408203125,
0.015380859375,
0.049896240234375,
0.0318603515625,
-0.0849609375,
-0.0276031494140625,
0.01244354248046875,
-0.07537841796875,
0.053436279296875,
0.0684814453125,
-0.034881591796875,
-0.007396697998046875,
0.030609130859375,
-0.0087890625,
-0.0225982666015625,
0.0024814605712890625,
0.0458984375,
-0.0135955810546875,
-0.0086822509765625,
0.031646728515625,
-0.1156005859375,
-0.0916748046875,
-0.04937744140625,
0.06390380859375,
0.011962890625,
0.10687255859375,
-0.0212554931640625,
0.0306396484375,
-0.003238677978515625,
0.06085205078125,
-0.05560302734375,
-0.0113983154296875,
0.0164337158203125,
-0.0038604736328125,
0.0202789306640625,
-0.004825592041015625,
-0.00860595703125,
0.0145111083984375,
0.05108642578125,
-0.03070068359375,
0.017181396484375,
-0.00817108154296875,
0.0034885406494140625,
-0.034637451171875,
0.0738525390625,
-0.0171966552734375,
0.0125885009765625,
-0.03924560546875,
-0.0648193359375,
0.06817626953125,
0.0184478759765625,
0.033905029296875,
0.06536865234375,
0.016510009765625,
-0.046844482421875,
0.0285186767578125,
-0.08831787109375,
0.032135009765625,
0.018707275390625,
0.058380126953125,
-0.042816162109375,
0.02032470703125,
-0.0215301513671875,
0.01342010498046875,
0.0022869110107421875,
0.044158935546875,
0.00946044921875,
-0.033538818359375,
0.036102294921875,
-0.035614013671875,
0.0176849365234375,
-0.00861358642578125,
-0.0115966796875,
0.01261138916015625,
0.00984954833984375,
-0.0109405517578125,
0.01241302490234375,
-0.00719451904296875,
-0.028961181640625,
-0.00031256675720214844,
-0.005359649658203125,
0.00592041015625,
-0.0245208740234375,
-0.001556396484375,
-0.029876708984375,
0.034759521484375,
0.005535125732421875,
-0.0101165771484375,
-0.0084686279296875,
-0.018035888671875,
-0.00408172607421875,
0.004764556884765625,
-0.006290435791015625,
0.0196990966796875,
0.045318603515625,
-0.0094146728515625,
0.004421234130859375,
-0.00670623779296875,
-0.0011434555053710938,
0.00415802001953125,
-0.018402099609375,
0.003551483154296875,
0.00921630859375,
-0.0026092529296875,
0.01800537109375,
-0.0193328857421875,
0.054840087890625,
-0.04864501953125,
-0.0099639892578125,
0.0042724609375,
0.0003921985626220703,
-0.02276611328125,
-0.02813720703125,
0.01255035400390625,
-0.03515625,
-0.01387786865234375,
0.045135498046875,
-0.0089263916015625,
0.0302734375,
-0.036041259765625,
-0.09710693359375,
0.09423828125,
-0.02423095703125,
-0.037628173828125,
-0.034332275390625,
-0.007572174072265625,
-0.010955810546875,
0.01029205322265625,
-0.0204925537109375,
-0.0013437271118164062,
-0.01026153564453125,
0.050323486328125,
0.00797271728515625,
0.01568603515625,
0.06011962890625,
0.006336212158203125,
-0.00678253173828125,
-0.005916595458984375,
-0.01462554931640625,
-0.020599365234375,
-0.0197601318359375,
0.00667572021484375,
0.004932403564453125,
-0.00580596923828125,
-0.05413818359375,
-0.0232696533203125,
0.0162506103515625,
0.0416259765625,
0.019134521484375,
-0.0213623046875,
-0.051361083984375,
-0.0292205810546875,
0.024658203125,
0.042510986328125,
0.02606201171875,
-0.01187896728515625,
0.0109100341796875,
-0.04852294921875,
-0.080810546875,
0.0154571533203125,
0.0281982421875,
-0.035736083984375,
0.026214599609375,
0.0191497802734375,
-0.01568603515625,
0.00804901123046875,
-0.002960205078125,
-0.034393310546875,
-0.007274627685546875,
-0.038360595703125,
-0.01348876953125,
-0.036224365234375,
0.037933349609375,
0.07763671875,
-0.046661376953125,
0.004833221435546875,
-0.0108489990234375,
-0.00019180774688720703,
0.03948974609375,
-0.0645751953125,
-0.000301361083984375,
0.00415802001953125,
-0.03045654296875,
0.0157318115234375,
-0.0005664825439453125,
0.054840087890625,
-0.03375244140625,
-0.00966644287109375,
-0.0114593505859375,
0.0009465217590332031,
0.00568389892578125,
-0.00311279296875,
-0.0016002655029296875,
0.01483917236328125,
-0.003185272216796875,
0.050323486328125,
-0.0321044921875,
0.047576904296875,
-0.0214080810546875,
0.0187225341796875,
-0.01922607421875,
0.0269775390625,
0.003330230712890625,
0.00829315185546875,
-0.0017805099487304688,
-0.0227203369140625,
-0.021240234375,
-0.054351806640625,
0.0205841064453125,
0.00732421875,
-0.01410675048828125,
0.0263214111328125
] |
818d716bc83b94f31e5aa1f604693044d4721074 | Wordpress Stackexchange
Q: Exclude drafts in all() view of edit.php The all view shows all posts including drafts in wp-admin/edit.php.
How can I exclude the posts with the draft status in the all view?
A: The show_in_admin_all_list parameter in the register_post_status() function, determines if a given post status is included in the All post table view.
Probably the shortest version is:
add_action( 'init', function() use ( &$wp_post_statuses )
{
$wp_post_statuses['draft']->show_in_admin_all_list = false;
}, 1 );
but let's avoid modifying the globals directly like this and override the default draft status with:
add_action( 'init', function()
{
register_post_status( 'draft',
[
'label' => _x( 'Draft', 'post status' ),
'protected' => true,
'_builtin' => true,
'label_count' => _n_noop( 'Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>' ),
'show_in_admin_all_list' => false, // <-- we override this setting
]
);
}, 1 );
where we use the priority 1, since the default draft status is registered at priority 0.
To avoid repeating the default settings and support possible settings changes in the future, we could use the get_post_status_object() instead:
add_action( 'init', function()
{
$a = get_object_vars( get_post_status_object( 'draft' ) );
$a['show_in_admin_all_list'] = false; // <-- we override this setting
register_post_status( 'draft', $a );
}, 1 );
| Q: Exclude drafts in all() view of edit.php The all view shows all posts including drafts in wp-admin/edit.php.
How can I exclude the posts with the draft status in the all view?
A: The show_in_admin_all_list parameter in the register_post_status() function, determines if a given post status is included in the All post table view.
Probably the shortest version is:
add_action( 'init', function() use ( &$wp_post_statuses )
{
$wp_post_statuses['draft']->show_in_admin_all_list = false;
}, 1 );
but let's avoid modifying the globals directly like this and override the default draft status with:
add_action( 'init', function()
{
register_post_status( 'draft',
[
'label' => _x( 'Draft', 'post status' ),
'protected' => true,
'_builtin' => true,
'label_count' => _n_noop( 'Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>' ),
'show_in_admin_all_list' => false, // <-- we override this setting
]
);
}, 1 );
where we use the priority 1, since the default draft status is registered at priority 0.
To avoid repeating the default settings and support possible settings changes in the future, we could use the get_post_status_object() instead:
add_action( 'init', function()
{
$a = get_object_vars( get_post_status_object( 'draft' ) );
$a['show_in_admin_all_list'] = false; // <-- we override this setting
register_post_status( 'draft', $a );
}, 1 );
A: The code below will remove draft posts from the admin area under the All listing for the post post type.
The query argument all_posts with a value of 1 is added to the menu link to ensure that we're only applying this modification when necessary (The All link under the admin post filters (All, Mine, Published, Sticky, Scheduled, Drafts)) will add this query parameter for us, but this is not the case when clicking admin menu, so we need to add it ourselves.
Place the code below into your theme's functions.php or within a plugin.
// Add a query argument to the Posts admin menu.
// This is used to ensure that we only apply our special filtering when needed.
add_action( 'admin_menu', 'wpse255311_admin_menu', PHP_INT_MAX );
function wpse255311_admin_menu() {
global $menu, $submenu;
$parent = 'edit.php';
foreach( $submenu[ $parent ] as $key => $value ){
if ( $value['2'] === 'edit.php' ) {
$submenu[ $parent ][ $key ]['2'] = 'edit.php?all_posts=1';
break;
}
}
}
// Hide draft posts from All listing in admin.
add_filter( 'pre_get_posts', 'wpse255311_pre_get_posts' );
function wpse255311_pre_get_posts( $wp_query ) {
$screen = get_current_screen();
// Ensure the the all_posts argument is set and == to 1
if ( ! isset( $_GET['all_posts'] ) || $_GET['all_posts'] != 1 ) {
return;
}
// Bail if we're not on the edit-post screen.
if ( 'edit-post' !== $screen->id ) {
return;
}
// Bail if we're not in the admin area.
if ( ! is_admin() ) {
return;
}
// Ensure we're dealing with the main query and the 'post' post type
// Only include certain post statuses.
if ( $wp_query->is_main_query() && $wp_query->query['post_type'] === 'post' ) {
$wp_query->query_vars['post_status'] = array (
'publish',
'private',
'future'
);
}
}
| wordpress | {
"language": "en",
"length": 478,
"provenance": "stackexchange_00019.jsonl.gz:472795",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/255311"
} | [
0.09307861328125,
-0.00952911376953125,
0.0318603515625,
-0.05169677734375,
0.0106048583984375,
-0.02764892578125,
0.0458984375,
-0.0292205810546875,
0.034210205078125,
0.0168304443359375,
-0.04742431640625,
-0.0034084320068359375,
-0.05078125,
0.002559661865234375,
-0.044464111328125,
-0.036651611328125,
0.03387451171875,
-0.0239715576171875,
0.0157928466796875,
-0.0160675048828125,
-0.003940582275390625,
-0.00576019287109375,
0.0369873046875,
0.031829833984375,
0.0155487060546875,
0.00031447410583496094,
0.011871337890625,
-0.01416778564453125,
-0.005191802978515625,
-0.0303497314453125,
0.00609588623046875,
0.022735595703125,
0.0298919677734375,
-0.01496124267578125,
0.01003265380859375,
0.020416259765625,
0.0217132568359375,
-0.00508880615234375,
0.017303466796875,
0.003223419189453125,
0.033447265625,
-0.036468505859375,
-0.01337432861328125,
-0.0008296966552734375,
-0.042205810546875,
0.00927734375,
0.0159454345703125,
0.0225677490234375,
0.017486572265625,
-0.036712646484375,
0.01166534423828125,
0.01021575927734375,
0.02520751953125,
0.01479339599609375,
-0.037017822265625,
-0.0276641845703125,
-0.003814697265625,
0.0181121826171875,
0.03021240234375,
0.028076171875,
-0.011077880859375,
0.0157012939453125,
-0.0029850006103515625,
-0.053466796875,
-0.042449951171875,
0.0143890380859375,
-0.007442474365234375,
0.00699615478515625,
-0.06640625,
-0.03204345703125,
0.040557861328125,
-0.04327392578125,
0.0217437744140625,
-0.02947998046875,
-0.04486083984375,
0.00862884521484375,
-0.004436492919921875,
-0.00896453857421875,
0.0198974609375,
-0.050567626953125,
0.0093231201171875,
-0.0077972412109375,
-0.053131103515625,
0.00012826919555664062,
0.00849151611328125,
0.03485107421875,
-0.01471710205078125,
-0.0224609375,
-0.017822265625,
-0.01198577880859375,
-0.0152587890625,
-0.0129547119140625,
-0.0242767333984375,
-0.0014286041259765625,
0.00777435302734375,
-0.032958984375,
0.04449462890625,
0.07110595703125,
-0.002704620361328125,
-0.005596160888671875,
-0.026275634765625,
-0.0286102294921875,
-0.025787353515625,
-0.0279388427734375,
0.0127410888671875,
0.0760498046875,
-0.01207733154296875,
0.0106048583984375,
0.0294036865234375,
0.00653839111328125,
0.036468505859375,
-0.019317626953125,
-0.0137176513671875,
0.023712158203125,
-0.052215576171875,
-0.04595947265625,
-0.07684326171875,
-0.0012836456298828125,
-0.01168060302734375,
-0.0178985595703125,
0.00147247314453125,
0.025146484375,
-0.01375579833984375,
-0.016143798828125,
-0.0015926361083984375,
-0.0265045166015625,
-0.024169921875,
-0.01219940185546875,
-0.00865936279296875,
0.018768310546875,
-0.026580810546875,
0.0172882080078125,
0.04132080078125,
0.0030345916748046875,
-0.005168914794921875,
-0.0104827880859375,
0.035369873046875,
0.020050048828125,
-0.0179290771484375,
0.0276641845703125,
-0.01163482666015625,
-0.0196533203125,
-0.0006160736083984375,
-0.0016641616821289062,
-0.058502197265625,
0.043670654296875,
0.0295867919921875,
-0.0258331298828125,
-0.02166748046875,
-0.058258056640625,
-0.08746337890625,
0.0159454345703125,
0.025390625,
0.0200347900390625,
0.01222991943359375,
0.012542724609375,
0.045654296875,
-0.0159759521484375,
-0.04644775390625,
-0.01116943359375,
0.056121826171875,
-0.00473785400390625,
-0.02044677734375,
-0.01084136962890625,
-0.062744140625,
0.011810302734375,
-0.022247314453125,
-0.017059326171875,
0.0229034423828125,
-0.006618499755859375,
0.032928466796875,
-0.00885772705078125,
0.054595947265625,
0.005832672119140625,
-0.01995849609375,
0.0137786865234375,
0.003360748291015625,
0.007396697998046875,
-0.000055730342864990234,
0.01715087890625,
-0.0295257568359375,
-0.05078125,
0.007572174072265625,
-0.01020050048828125,
-0.07659912109375,
0.0228424072265625,
0.0020904541015625,
0.0165863037109375,
0.027984619140625,
-0.008453369140625,
0.06878662109375,
0.02978515625,
-0.005218505859375,
-0.01497650146484375,
-0.018310546875,
-0.021881103515625,
-0.02410888671875,
-0.007663726806640625,
-0.015838623046875,
0.0330810546875,
0.0091705322265625,
-0.042327880859375,
0.037872314453125,
-0.014678955078125,
0.0015239715576171875,
-0.0192718505859375,
0.002010345458984375,
0.018096923828125,
-0.021942138671875,
0.01788330078125,
0.03887939453125,
0.010986328125,
-0.052978515625,
0.050048828125,
-0.0055389404296875,
-0.004913330078125,
-0.006999969482421875,
0.0164794921875,
-0.0011835098266601562,
0.018310546875,
0.005245208740234375,
-0.018646240234375,
-0.004398345947265625,
-0.004711151123046875,
0.04486083984375,
-0.027191162109375,
0.0021915435791015625,
-0.034271240234375,
0.069580078125,
-0.00911712646484375,
0.01212310791015625,
0.033111572265625,
0.00801849365234375,
0.04937744140625,
-0.03179931640625,
-0.034393310546875,
-0.0328369140625,
-0.07489013671875,
0.0246429443359375,
0.063232421875,
0.007904052734375,
0.038116455078125,
-0.03216552734375,
0.0144195556640625,
0.0791015625,
-0.019287109375,
-0.00952911376953125,
0.027252197265625,
0.00015163421630859375,
0.04913330078125,
-0.005756378173828125,
0.0225677490234375,
0.007602691650390625,
-0.034820556640625,
0.01953125,
0.0430908203125,
-0.021026611328125,
-0.0391845703125,
0.0155792236328125,
-0.015228271484375,
0.032867431640625,
-0.0231170654296875,
-0.043670654296875,
0.0079345703125,
0.02386474609375,
0.0036296844482421875,
0.032928466796875,
0.0299530029296875,
-0.024505615234375,
0.00714111328125,
0.00992584228515625,
-0.023040771484375,
-0.0093994140625,
0.032318115234375,
0.034759521484375,
-0.0194854736328125,
-0.04498291015625,
0.0034656524658203125,
0.003269195556640625,
0.0078887939453125,
-0.0260162353515625,
0.01151275634765625,
0.025299072265625,
-0.009002685546875,
0.0004878044128417969,
-0.060546875,
0.0287322998046875,
-0.01004791259765625,
-0.005840301513671875,
-0.0016603469848632812,
0.01343536376953125,
0.03875732421875,
0.026336669921875,
-0.0037479400634765625,
0.037689208984375,
-0.0086822509765625,
-0.01045989990234375,
-0.046905517578125,
0.038238525390625,
-0.023040771484375,
0.040802001953125,
0.0843505859375,
0.0338134765625,
-0.0186004638671875,
-0.00563812255859375,
-0.036590576171875,
-0.0092620849609375,
0.01079559326171875,
-0.0135040283203125,
-0.040008544921875,
-0.050018310546875,
-0.00598907470703125,
0.03143310546875,
-0.0012254714965820312,
0.032135009765625,
-0.00019550323486328125,
0.0113372802734375,
0.035125732421875,
0.0011453628540039062,
0.01413726806640625,
-0.0194854736328125,
-0.043792724609375,
-0.011322021484375,
-0.0251617431640625,
-0.016448974609375,
0.00574493408203125,
-0.029632568359375,
0.01248931884765625,
-0.03594970703125,
0.0060577392578125,
-0.00045943260192871094,
-0.0240325927734375,
-0.0216064453125,
-0.007068634033203125,
-0.003559112548828125,
0.00511932373046875,
0.0237884521484375,
0.134765625,
0.05096435546875,
-0.073486328125,
0.045135498046875,
0.041595458984375,
-0.04608154296875,
0.07196044921875,
0.004535675048828125,
-0.01439666748046875,
0.0011243820190429688,
0.0019235610961914062,
0.037750244140625,
0.020294189453125,
-0.0271759033203125,
-0.0016527175903320312,
-0.01666259765625,
-0.0246124267578125,
0.0003466606140136719,
0.0139923095703125,
0.0120697021484375,
-0.027557373046875,
0.0188446044921875,
-0.041015625,
0.004543304443359375,
-0.00444793701171875,
-0.0175018310546875,
-0.0153350830078125,
-0.01064300537109375,
0.0005736351013183594,
0.019683837890625,
-0.0212860107421875,
0.013427734375,
0.032867431640625,
0.0364990234375,
0.01323699951171875,
-0.06549072265625,
-0.0227813720703125,
-0.041961669921875,
-0.018890380859375,
0.037567138671875,
-0.005214691162109375,
-0.0057525634765625,
-0.003452301025390625,
0.00972747802734375,
-0.01302337646484375,
-0.0172119140625,
-0.0496826171875,
-0.045654296875,
0.0005741119384765625,
-0.07470703125,
0.00505828857421875,
-0.053985595703125,
0.0223541259765625,
-0.02191162109375,
0.05780029296875,
-0.01412200927734375,
-0.0158538818359375,
-0.032470703125,
0.0239410400390625,
-0.0211181640625,
-0.090576171875,
0.025543212890625,
0.00728607177734375,
-0.021697998046875,
0.0242919921875,
-0.0135955810546875,
0.01300811767578125,
-0.0312347412109375,
0.005832672119140625,
-0.0022563934326171875,
-0.02685546875,
0.0215301513671875,
-0.012054443359375,
-0.0006804466247558594,
-0.0073394775390625,
-0.01042938232421875,
-0.027923583984375,
0.007251739501953125,
-0.03289794921875,
-0.07293701171875,
-0.01328277587890625,
-0.00991058349609375,
0.0389404296875,
0.003978729248046875,
0.00406646728515625,
-0.0109405517578125,
0.039794921875,
-0.01035308837890625,
0.028961181640625,
-0.050018310546875,
-0.009796142578125,
-0.0274200439453125,
0.034149169921875,
-0.023956298828125,
0.01171112060546875,
-0.020751953125,
-0.0238189697265625,
-0.036712646484375,
-0.0384521484375,
-0.03564453125,
0.006526947021484375,
0.00093841552734375,
-0.0286712646484375,
-0.062103271484375,
-0.045135498046875,
-0.049774169921875,
0.005687713623046875,
-0.034393310546875,
-0.0023651123046875,
-0.0604248046875,
-0.064697265625,
0.0228729248046875,
-0.0012388229370117188,
-0.055206298828125,
-0.0033893585205078125,
0.04058837890625,
0.036224365234375,
-0.0197601318359375,
0.01148223876953125,
-0.044036865234375,
0.031707763671875,
-0.03228759765625,
0.04974365234375,
0.0679931640625,
-0.00949859619140625,
0.0252838134765625,
0.01061248779296875,
-0.050506591796875,
0.04681396484375,
-0.028289794921875,
0.021087646484375,
-0.03533935546875,
-0.0274200439453125,
-0.01303863525390625,
0.07568359375,
-0.0003902912139892578,
0.0001322031021118164,
-0.01434326171875,
0.0275726318359375,
0.03826904296875,
-0.02691650390625,
0.0291900634765625,
-0.01519012451171875,
-0.0118255615234375,
0.012420654296875,
-0.02264404296875,
0.0021533966064453125,
0.03045654296875,
0.00406646728515625,
-0.006435394287109375,
0.01001739501953125,
0.00867462158203125,
0.03216552734375,
0.00843048095703125,
-0.004589080810546875,
0.0054931640625,
0.058990478515625,
-0.01409149169921875,
0.0146636962890625,
-0.018585205078125,
0.044952392578125,
-0.0267791748046875,
-0.08612060546875,
0.038482666015625,
-0.00661468505859375,
0.051483154296875,
0.04669189453125,
0.01026153564453125,
0.0262451171875,
0.037933349609375,
0.0160369873046875,
-0.0158538818359375,
0.006259918212890625,
0.0460205078125,
-0.0224609375,
0.055328369140625,
0.019134521484375,
-0.0115814208984375,
0.002841949462890625,
0.058868408203125,
0.0004258155822753906,
0.032318115234375,
-0.00829315185546875,
0.03436279296875,
-0.0036773681640625,
0.0284423828125,
0.01165008544921875,
0.011871337890625,
0.0296478271484375,
-0.00943756103515625,
0.0006742477416992188,
-0.020843505859375,
0.007312774658203125,
0.007762908935546875,
0.0221405029296875,
0.019134521484375,
-0.00669097900390625,
0.0202789306640625,
-0.02130126953125,
-0.033111572265625,
0.0797119140625,
0.04376220703125,
-0.058349609375,
-0.028533935546875,
0.0236663818359375,
0.024444580078125,
-0.0192108154296875,
-0.002101898193359375,
0.00679779052734375,
-0.0091552734375,
-0.0013227462768554688,
-0.03717041015625,
-0.04443359375,
-0.01296234130859375,
0.01934814453125,
0.00008064508438110352,
-0.0299224853515625,
-0.02032470703125,
-0.038330078125,
-0.0007300376892089844,
-0.0164794921875,
0.01546478271484375,
0.052215576171875,
-0.039642333984375,
0.0215301513671875,
-0.0209503173828125,
0.00318145751953125,
-0.035400390625,
0.02740478515625,
0.012603759765625,
0.0004858970642089844,
0.0312042236328125,
-0.0030231475830078125,
-0.045562744140625,
-0.047119140625,
-0.026336669921875,
-0.0263519287109375,
-0.02960205078125,
-0.027587890625,
0.0003254413604736328,
0.00377655029296875,
-0.0204925537109375,
-0.035003662109375,
0.008148193359375,
0.0194854736328125,
0.030426025390625,
0.04547119140625,
0.0276031494140625,
0.07244873046875,
-0.057952880859375,
0.0704345703125,
0.02117919921875,
0.03228759765625,
-0.040740966796875,
-0.030731201171875,
0.01416015625,
-0.06475830078125,
-0.018768310546875,
0.0222320556640625,
-0.04620361328125,
0.01515960693359375,
0.0093231201171875,
-0.00789642333984375,
0.00039577484130859375,
0.0176544189453125,
0.0286102294921875,
-0.027130126953125,
-0.019134521484375,
0.01128387451171875,
-0.0185699462890625,
0.0190582275390625,
-0.014312744140625,
0.00390625,
-0.0355224609375,
0.0147857666015625,
0.006641387939453125,
-0.028289794921875,
0.0054931640625,
0.006317138671875,
-0.038330078125,
0.0360107421875,
0.032989501953125,
0.0233612060546875,
0.026824951171875,
-0.004795074462890625,
0.0306243896484375,
0.00490570068359375,
-0.01538848876953125,
-0.036834716796875,
-0.042755126953125,
0.0469970703125,
0.0250091552734375,
0.0087127685546875,
0.0867919921875,
-0.00690460205078125,
0.00981903076171875,
0.0721435546875,
0.072509765625,
-0.10400390625,
0.0207061767578125,
0.031341552734375,
0.01068878173828125,
0.00925445556640625,
-0.01031494140625,
-0.022705078125,
-0.040618896484375,
0.02044677734375,
-0.0069427490234375,
-0.036590576171875,
-0.011260986328125,
0.005153656005859375,
-0.0100250244140625,
0.0012531280517578125,
-0.0023517608642578125,
0.0016632080078125,
-0.019256591796875,
-0.005870819091796875,
0.0214080810546875,
-0.0195770263671875,
-0.01361083984375,
0.01387786865234375,
-0.01036834716796875,
-0.01959228515625,
-0.04681396484375,
0.004322052001953125,
0.001628875732421875,
-0.017913818359375,
0.05279541015625,
0.0022258758544921875,
0.00724029541015625,
0.06939697265625,
-0.040130615234375,
0.0545654296875,
0.0279388427734375,
-0.039154052734375,
-0.03936767578125,
0.0023822784423828125,
-0.005229949951171875,
0.020111083984375,
0.007671356201171875,
0.01690673828125,
-0.024993896484375,
0.005954742431640625,
0.008575439453125,
-0.006336212158203125,
0.07720947265625,
-0.07232666015625,
-0.0121307373046875,
0.0007033348083496094,
-0.032196044921875,
0.0264739990234375,
0.0008592605590820312,
0.0013532638549804688,
-0.046661376953125,
-0.035308837890625,
-0.0102081298828125,
-0.0821533203125,
-0.0167388916015625,
-0.037628173828125,
-0.08416748046875,
0.0999755859375,
-0.01436614990234375,
0.055938720703125,
0.005157470703125,
0.02410888671875,
-0.02032470703125,
-0.002193450927734375,
-0.06231689453125,
0.05987548828125,
0.0189971923828125,
0.062286376953125,
-0.056060791015625,
0.008026123046875,
0.016937255859375,
0.01502227783203125,
0.06463623046875,
0.0169219970703125,
-0.0224609375,
0.01084136962890625,
0.0826416015625,
0.048095703125,
0.00823211669921875,
0.01513671875,
0.01104736328125,
0.00563812255859375,
0.0252227783203125,
-0.044158935546875,
0.01983642578125,
-0.0372314453125,
0.0214080810546875,
0.02984619140625,
0.0246429443359375,
0.027130126953125,
-0.0029239654541015625,
0.0162353515625,
-0.08184814453125,
0.0250091552734375,
0.047821044921875,
0.0174560546875,
0.006649017333984375,
-0.005268096923828125,
0.01413726806640625,
-0.06817626953125,
-0.03216552734375,
-0.00818634033203125,
0.023895263671875,
0.0169219970703125,
0.029571533203125,
0.02691650390625,
0.00843048095703125,
0.01483917236328125,
0.0199432373046875,
0.017730712890625,
0.0081329345703125,
-0.00977325439453125,
-0.033782958984375,
0.01032257080078125,
0.00855255126953125,
-0.00909423828125,
0.059783935546875,
0.04791259765625,
-0.031280517578125,
-0.026275634765625,
-0.004543304443359375,
0.0271759033203125,
0.01552581787109375,
-0.033203125,
-0.01166534423828125,
-0.01016998291015625,
-0.042755126953125,
-0.0032482147216796875,
-0.041412353515625,
-0.01422119140625,
0.0211029052734375,
0.035400390625,
-0.022247314453125,
-0.06610107421875,
0.0206756591796875,
-0.023651123046875,
-0.0477294921875,
-0.0205535888671875,
0.0207672119140625,
0.049774169921875,
0.01568603515625,
0.0242767333984375,
0.008514404296875,
-0.020599365234375,
-0.029937744140625,
0.021820068359375,
0.0005326271057128906,
0.00968170166015625,
-0.050567626953125,
-0.006633758544921875,
0.01085662841796875,
0.036163330078125,
0.03448486328125,
-0.004413604736328125,
0.06756591796875,
0.045440673828125,
-0.0479736328125,
0.0026264190673828125,
0.03619384765625,
-0.0224456787109375,
-0.014984130859375,
-0.054901123046875,
0.0099639892578125,
0.020416259765625,
0.0183868408203125,
0.0270233154296875,
0.007434844970703125,
0.03192138671875,
-0.0190277099609375,
0.01195526123046875,
0.0006089210510253906,
-0.0465087890625,
0.0164337158203125,
0.00727081298828125,
0.04840087890625,
-0.0024261474609375,
-0.045654296875,
-0.010498046875,
-0.028594970703125,
-0.026641845703125,
0.0213623046875,
0.0221405029296875,
-0.043243408203125,
0.056976318359375,
0.031646728515625,
0.028533935546875,
-0.0289154052734375,
-0.01207733154296875,
0.01593017578125,
-0.01788330078125,
0.0228118896484375,
0.01739501953125,
-0.00017070770263671875,
0.00782012939453125,
0.0107574462890625,
0.0179290771484375,
0.0205841064453125,
0.02862548828125,
-0.00787353515625,
0.00927734375,
0.039215087890625,
0.0219879150390625,
-0.00608062744140625,
-0.0011949539184570312,
0.00927734375,
-0.052001953125,
0.0088043212890625,
0.0090484619140625,
-0.019317626953125,
-0.00836944580078125,
0.0411376953125,
-0.057281494140625,
0.0168914794921875,
0.0043792724609375,
0.010467529296875,
-0.055206298828125,
0.0286102294921875,
-0.0268096923828125,
-0.024383544921875,
-0.026519775390625,
-0.01776123046875,
0.006015777587890625,
-0.010589599609375,
0.00921630859375,
0.034149169921875,
-0.0203094482421875,
-0.042236328125,
0.0133514404296875,
-0.041900634765625,
-0.003192901611328125,
0.0251922607421875,
0.003101348876953125,
0.04931640625,
0.015899658203125,
-0.00640869140625,
0.0171966552734375,
0.03875732421875,
-0.046051025390625,
0.0131072998046875,
-0.007755279541015625,
-0.031982421875,
0.0157928466796875,
0.0201568603515625,
-0.031341552734375,
0.0228118896484375,
0.013336181640625,
0.00003999471664428711,
-0.0081634521484375,
-0.0179901123046875,
-0.01153564453125,
-0.0245361328125,
-0.0325927734375,
-0.00272369384765625,
-0.0193939208984375,
-0.08416748046875,
-0.0164947509765625,
0.0220489501953125,
-0.0025482177734375,
-0.023773193359375,
-0.0199127197265625,
0.0155181884765625,
-0.027923583984375,
0.0290985107421875,
-0.035064697265625,
0.0438232421875,
-0.01103973388671875,
0.0421142578125,
-0.0234527587890625,
-0.031585693359375,
-0.021026611328125,
0.05157470703125,
-0.0325927734375,
-0.02642822265625,
0.021087646484375,
-0.00008362531661987305,
-0.048980712890625,
-0.06622314453125,
-0.0305023193359375,
-0.0240020751953125,
-0.01349639892578125,
-0.0390625,
-0.01149749755859375,
0.020538330078125,
0.00316619873046875,
-0.05804443359375,
-0.017669677734375,
-0.03448486328125,
0.0130157470703125,
-0.01279449462890625,
0.01468658447265625,
0.0213470458984375,
-0.034912109375,
-0.0963134765625,
0.00511932373046875,
-0.0196380615234375,
-0.044952392578125,
-0.0306549072265625,
-0.0015516281127929688,
-0.0100555419921875,
0.01824951171875,
-0.006244659423828125,
-0.024169921875,
-0.01354217529296875,
0.026824951171875,
0.004283905029296875,
0.045501708984375,
0.007282257080078125,
-0.006778717041015625,
-0.05181884765625,
-0.0112762451171875,
-0.0165557861328125,
0.005550384521484375,
-0.00490570068359375,
0.006900787353515625,
0.0276947021484375,
0.06829833984375,
-0.0014696121215820312,
-0.005443572998046875,
-0.0070037841796875,
-0.047088623046875,
0.041015625,
-0.02264404296875,
-0.098876953125,
-0.0692138671875,
0.0745849609375,
0.0189056396484375,
0.045867919921875,
0.01715087890625,
0.005039215087890625,
-0.0355224609375,
-0.0225982666015625,
-0.03448486328125,
0.01995849609375,
-0.07025146484375,
-0.0196685791015625,
0.0025482177734375,
-0.0054473876953125,
0.007640838623046875,
-0.0194091796875,
-0.04168701171875,
-0.01363372802734375,
-0.028533935546875,
-0.005138397216796875,
-0.059967041015625,
0.00902557373046875,
-0.056060791015625,
0.002178192138671875,
-0.04119873046875,
0.0042266845703125,
-0.0010137557983398438,
-0.062286376953125,
0.05340576171875,
-0.026763916015625,
-0.04052734375,
0.00885772705078125,
0.0325927734375,
-0.00591278076171875,
0.01056671142578125,
-0.01265716552734375,
-0.004398345947265625,
-0.0577392578125,
-0.02691650390625,
0.0204315185546875,
-0.040802001953125,
-0.00702667236328125,
-0.0179290771484375,
0.0278778076171875,
0.06103515625,
-0.011138916015625,
0.06011962890625,
0.007228851318359375,
0.0120697021484375,
0.0008096694946289062,
0.003406524658203125,
0.0374755859375,
-0.00858306884765625,
0.0111541748046875,
-0.00861358642578125,
0.0164642333984375,
-0.03448486328125,
0.034637451171875,
-0.0262908935546875,
-0.0030918121337890625,
0.026641845703125
] |
eb5dcd573ffd113cfe310c1dd77ad5a7d8d83051 | Wordpress Stackexchange
Q: Wordpress database error with latest WP - "WP_termmeta doesn't exist" I've just upgraded to 4.7.2, and now I see this message:
WordPress database error: [Table 'myusername.wp_termmeta' doesn't exist]
SELECT term_id, meta_key, meta_value FROM wp_termmeta WHERE term_id IN
(2,3,4,5,6,7,8,9,10,11,12,13,1,14,15) ORDER BY meta_id ASC
What's the correct solution to this issue? I upgraded the database while upgrading. Lots of googling suggests strange things like upgrading to some beta releases, which I cannot do in production -- that might be worse.
Welcome any pointers!
A: You are missing a table. You can add it using this sql
CREATE TABLE `wp_termmeta` (
`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`meta_value` longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`meta_id`),
KEY `term_id` (`term_id`),
KEY `meta_key` (`meta_key`(191))
) ENGINE=InnoDB AUTO_INCREMENT=3255 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
| Q: Wordpress database error with latest WP - "WP_termmeta doesn't exist" I've just upgraded to 4.7.2, and now I see this message:
WordPress database error: [Table 'myusername.wp_termmeta' doesn't exist]
SELECT term_id, meta_key, meta_value FROM wp_termmeta WHERE term_id IN
(2,3,4,5,6,7,8,9,10,11,12,13,1,14,15) ORDER BY meta_id ASC
What's the correct solution to this issue? I upgraded the database while upgrading. Lots of googling suggests strange things like upgrading to some beta releases, which I cannot do in production -- that might be worse.
Welcome any pointers!
A: You are missing a table. You can add it using this sql
CREATE TABLE `wp_termmeta` (
`meta_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`term_id` bigint(20) unsigned NOT NULL DEFAULT '0',
`meta_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`meta_value` longtext COLLATE utf8mb4_unicode_ci,
PRIMARY KEY (`meta_id`),
KEY `term_id` (`term_id`),
KEY `meta_key` (`meta_key`(191))
) ENGINE=InnoDB AUTO_INCREMENT=3255 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
| wordpress | {
"language": "en",
"length": 137,
"provenance": "stackexchange_00019.jsonl.gz:472801",
"question_score": "6",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/255325"
} | [
0.00672149658203125,
-0.023345947265625,
-0.0200958251953125,
0.0178985595703125,
-0.0021419525146484375,
-0.031829833984375,
0.04925537109375,
-0.01515960693359375,
0.0576171875,
0.03973388671875,
-0.0109710693359375,
-0.056884765625,
0.034149169921875,
-0.01261138916015625,
-0.06463623046875,
-0.0178070068359375,
0.02618408203125,
-0.03570556640625,
0.01369476318359375,
0.004962921142578125,
0.0197601318359375,
0.023834228515625,
0.005001068115234375,
-0.02679443359375,
0.0242767333984375,
-0.056854248046875,
0.061279296875,
-0.045989990234375,
0.019989013671875,
-0.0291900634765625,
0.027679443359375,
0.03643798828125,
0.005046844482421875,
-0.0230560302734375,
0.0285491943359375,
-0.053009033203125,
0.00116729736328125,
0.003658294677734375,
0.003139495849609375,
-0.0022258758544921875,
0.01629638671875,
-0.0223846435546875,
-0.01461029052734375,
0.0233612060546875,
-0.01739501953125,
-0.050689697265625,
0.036224365234375,
-0.032440185546875,
-0.0321044921875,
-0.025604248046875,
-0.000020444393157958984,
0.047393798828125,
0.02069091796875,
0.036773681640625,
0.0115966796875,
-0.0221710205078125,
-0.003177642822265625,
0.005481719970703125,
0.00586700439453125,
0.035003662109375,
0.0112152099609375,
0.04205322265625,
-0.013092041015625,
-0.00925445556640625,
-0.00621795654296875,
0.01508331298828125,
0.05328369140625,
0.004852294921875,
-0.0223846435546875,
-0.0034999847412109375,
0.01264190673828125,
-0.01250457763671875,
0.015655517578125,
-0.006839752197265625,
0.009857177734375,
0.0173187255859375,
0.02569580078125,
0.0389404296875,
-0.005260467529296875,
0.0200042724609375,
0.005596160888671875,
0.003856658935546875,
-0.061920166015625,
-0.01387786865234375,
0.00714111328125,
-0.0014972686767578125,
-0.01258087158203125,
-0.00811767578125,
-0.0035305023193359375,
-0.03179931640625,
0.0028896331787109375,
-0.094970703125,
-0.016448974609375,
0.033843994140625,
0.0025730133056640625,
-0.03643798828125,
0.02032470703125,
0.08123779296875,
-0.036468505859375,
0.00795745849609375,
0.004360198974609375,
-0.0380859375,
0.035308837890625,
-0.040313720703125,
0.00817108154296875,
0.02264404296875,
-0.06317138671875,
-0.00007635354995727539,
0.037322998046875,
0.040191650390625,
0.022552490234375,
-0.059783935546875,
0.0023784637451171875,
-0.029144287109375,
-0.004192352294921875,
0.01338958740234375,
-0.0144805908203125,
0.01043701171875,
0.007419586181640625,
0.00495147705078125,
-0.0245208740234375,
0.0168914794921875,
-0.033935546875,
-0.03448486328125,
-0.0189361572265625,
-0.047515869140625,
-0.01200103759765625,
0.029022216796875,
-0.09405517578125,
0.015380859375,
-0.0283203125,
0.030303955078125,
0.0794677734375,
0.049346923828125,
-0.0100555419921875,
-0.0118408203125,
0.0302886962890625,
-0.0411376953125,
-0.0460205078125,
0.04931640625,
0.00556182861328125,
-0.028961181640625,
0.01444244384765625,
-0.022247314453125,
-0.03204345703125,
0.016937255859375,
0.034576416015625,
0.0124969482421875,
-0.040771484375,
-0.054412841796875,
-0.0195159912109375,
-0.00007200241088867188,
0.041229248046875,
0.01019287109375,
-0.0235137939453125,
-0.01166534423828125,
0.0308837890625,
-0.031890869140625,
-0.044586181640625,
-0.038299560546875,
0.025909423828125,
-0.0247650146484375,
-0.02801513671875,
-0.00021719932556152344,
-0.033843994140625,
0.01258087158203125,
-0.007476806640625,
-0.00647735595703125,
0.03460693359375,
0.024261474609375,
0.01263427734375,
0.00679779052734375,
0.06591796875,
0.0191802978515625,
-0.005191802978515625,
0.0108184814453125,
0.00047278404235839844,
-0.035186767578125,
0.048126220703125,
0.03863525390625,
-0.005828857421875,
-0.007183074951171875,
0.025238037109375,
-0.005870819091796875,
-0.051605224609375,
0.0235748291015625,
0.002384185791015625,
0.049957275390625,
0.0263824462890625,
0.0003578662872314453,
0.03509521484375,
0.004276275634765625,
-0.0159759521484375,
0.04803466796875,
0.002368927001953125,
-0.0304107666015625,
-0.0222015380859375,
0.01117706298828125,
-0.0226593017578125,
-0.054290771484375,
0.039031982421875,
0.0309600830078125,
-0.0089111328125,
-0.0148162841796875,
-0.11456298828125,
0.0133056640625,
-0.0273284912109375,
0.052886962890625,
0.00885009765625,
0.00936126708984375,
0.00624847412109375,
-0.035736083984375,
-0.0109405517578125,
0.036041259765625,
-0.020111083984375,
-0.007503509521484375,
-0.0635986328125,
0.0086822509765625,
-0.008636474609375,
0.06622314453125,
-0.0185546875,
-0.0276031494140625,
-0.0247344970703125,
-0.024810791015625,
0.0005331039428710938,
0.01064300537109375,
-0.0150604248046875,
0.005672454833984375,
0.04443359375,
0.01329803466796875,
0.0257415771484375,
-0.0018062591552734375,
-0.004695892333984375,
0.01146697998046875,
-0.028228759765625,
-0.01528167724609375,
-0.029205322265625,
-0.055389404296875,
0.0174407958984375,
0.0484619140625,
0.045501708984375,
-0.0323486328125,
-0.03515625,
-0.04632568359375,
0.0078277587890625,
-0.076171875,
0.0034008026123046875,
-0.011749267578125,
-0.006866455078125,
0.01143646240234375,
0.00411224365234375,
0.006984710693359375,
0.01556396484375,
-0.024139404296875,
-0.025360107421875,
0.03338623046875,
-0.052978515625,
-0.00589752197265625,
0.0234527587890625,
-0.0259246826171875,
-0.007106781005859375,
-0.058502197265625,
-0.0012578964233398438,
-0.0308685302734375,
0.054412841796875,
0.01654052734375,
0.065673828125,
0.046356201171875,
-0.0203094482421875,
0.007579803466796875,
-0.003803253173828125,
-0.013885498046875,
0.006900787353515625,
0.005870819091796875,
0.003910064697265625,
0.08892822265625,
-0.05682373046875,
-0.00007528066635131836,
0.061004638671875,
0.0182037353515625,
-0.006229400634765625,
0.036834716796875,
-0.0328369140625,
-0.01023101806640625,
-0.016845703125,
-0.0218963623046875,
0.0005474090576171875,
0.01517486572265625,
-0.044219970703125,
-0.029998779296875,
0.0158233642578125,
0.020904541015625,
-0.025177001953125,
0.0019254684448242188,
-0.00528717041015625,
-0.01007080078125,
0.0203857421875,
0.0071258544921875,
0.02001953125,
-0.032379150390625,
-0.0049896240234375,
0.0178985595703125,
-0.05352783203125,
0.021331787109375,
0.0004100799560546875,
-0.04266357421875,
-0.004306793212890625,
0.0162811279296875,
-0.01605224609375,
-0.027740478515625,
-0.059173583984375,
-0.0185394287109375,
0.0284576416015625,
0.06756591796875,
0.0031871795654296875,
-0.03692626953125,
0.005626678466796875,
0.042327880859375,
-0.03338623046875,
-0.07281494140625,
-0.0238800048828125,
0.0233917236328125,
-0.0162200927734375,
-0.00959014892578125,
0.018585205078125,
0.0137481689453125,
-0.005252838134765625,
-0.0047607421875,
-0.00007963180541992188,
-0.03955078125,
-0.087890625,
-0.0679931640625,
-0.06524658203125,
-0.01093292236328125,
-0.01287078857421875,
0.0035037994384765625,
-0.01273345947265625,
0.0146942138671875,
-0.0234222412109375,
-0.02105712890625,
-0.017181396484375,
0.00047707557678222656,
0.00522613525390625,
-0.02960205078125,
-0.0157623291015625,
-0.0061492919921875,
0.0151519775390625,
0.0060577392578125,
0.01500701904296875,
0.02740478515625,
-0.0213470458984375,
-0.0111083984375,
0.0109710693359375,
-0.0260009765625,
0.007213592529296875,
-0.007015228271484375,
-0.0200347900390625,
0.0010919570922851562,
0.031494140625,
-0.0260772705078125,
-0.0313720703125,
-0.01013946533203125,
-0.0372314453125,
0.037994384765625,
-0.00975799560546875,
0.0155181884765625,
0.0165863037109375,
0.024566650390625,
-0.00911712646484375,
0.0265045166015625,
0.0203399658203125,
-0.01322174072265625,
0.006862640380859375,
-0.0231170654296875,
-0.0484619140625,
-0.0306243896484375,
0.033538818359375,
-0.044952392578125,
0.0303955078125,
0.01125335693359375,
-0.02545166015625,
0.0003619194030761719,
-0.038421630859375,
-0.01125335693359375,
-0.031768798828125,
0.05029296875,
-0.025482177734375,
0.03082275390625,
-0.052459716796875,
-0.0233306884765625,
-0.042816162109375,
0.06414794921875,
0.0390625,
-0.020751953125,
0.01372528076171875,
0.0090179443359375,
-0.052032470703125,
0.02410888671875,
-0.0174102783203125,
0.007175445556640625,
-0.01342010498046875,
-0.028411865234375,
0.008575439453125,
-0.03216552734375,
-0.0196685791015625,
0.0267181396484375,
-0.0202178955078125,
-0.0174560546875,
0.036956787109375,
-0.035797119140625,
0.016632080078125,
0.0472412109375,
-0.0029735565185546875,
0.01110076904296875,
-0.021148681640625,
-0.035064697265625,
-0.08966064453125,
-0.0230560302734375,
-0.04583740234375,
0.0693359375,
0.02752685546875,
-0.0081939697265625,
-0.0168914794921875,
0.041473388671875,
0.0227813720703125,
-0.01302337646484375,
0.0024013519287109375,
-0.00937652587890625,
-0.047515869140625,
0.00420379638671875,
0.004169464111328125,
-0.03857421875,
-0.0161895751953125,
-0.033111572265625,
-0.0254974365234375,
-0.01282501220703125,
-0.0286712646484375,
0.024627685546875,
-0.03131103515625,
-0.0167236328125,
-0.0004241466522216797,
-0.0261993408203125,
-0.0179595947265625,
0.03533935546875,
-0.0152740478515625,
0.00940704345703125,
-0.05645751953125,
-0.04205322265625,
0.06365966796875,
-0.02545166015625,
0.00333404541015625,
0.001071929931640625,
0.059539794921875,
0.00048041343688964844,
-0.03729248046875,
-0.01024627685546875,
0.020538330078125,
0.025146484375,
-0.00505828857421875,
0.0171661376953125,
-0.004299163818359375,
-0.0080718994140625,
0.037872314453125,
0.005725860595703125,
-0.0270233154296875,
0.0166473388671875,
0.039093017578125,
0.0024585723876953125,
-0.0000941157341003418,
-0.025177001953125,
-0.0180511474609375,
0.01161956787109375,
0.01708984375,
0.0165557861328125,
-0.03192138671875,
-0.00983428955078125,
0.039794921875,
0.0360107421875,
-0.029693603515625,
-0.06097412109375,
-0.03887939453125,
0.03009033203125,
-0.0640869140625,
-0.009857177734375,
-0.051483154296875,
0.029296875,
-0.01522064208984375,
0.01041412353515625,
-0.0123138427734375,
-0.0159912109375,
-0.00887298583984375,
0.003910064697265625,
0.0018568038940429688,
0.0182647705078125,
-0.01203155517578125,
-0.030181884765625,
-0.01355743408203125,
0.09796142578125,
0.004528045654296875,
-0.04730224609375,
0.010528564453125,
-0.01174163818359375,
0.012847900390625,
0.027496337890625,
0.0040435791015625,
0.01413726806640625,
-0.005008697509765625,
0.0032367706298828125,
-0.00618743896484375,
-0.0408935546875,
0.036773681640625,
-0.0157470703125,
-0.01079559326171875,
-0.01354217529296875,
-0.006206512451171875,
-0.0256195068359375,
0.09100341796875,
-0.046905517578125,
0.05926513671875,
-0.00823211669921875,
0.02276611328125,
-0.00798797607421875,
0.09405517578125,
0.0274200439453125,
-0.066650390625,
-0.00130462646484375,
0.07611083984375,
-0.023529052734375,
-0.047119140625,
-0.0372314453125,
-0.007411956787109375,
0.041595458984375,
-0.0085906982421875,
0.00693511962890625,
0.03369140625,
-0.0030803680419921875,
-0.004016876220703125,
0.01320648193359375,
-0.043701171875,
-0.0767822265625,
-0.00907135009765625,
-0.0002720355987548828,
-0.0010976791381835938,
-0.039031982421875,
-0.01381683349609375,
0.0157623291015625,
-0.02154541015625,
0.06915283203125,
-0.0241851806640625,
0.044830322265625,
-0.0079345703125,
-0.023895263671875,
0.0211029052734375,
-0.0162506103515625,
-0.060577392578125,
0.0176849365234375,
-0.0269012451171875,
0.007373809814453125,
-0.00392913818359375,
0.0178070068359375,
-0.0073699951171875,
-0.0024089813232421875,
-0.0020751953125,
-0.01395416259765625,
0.00647735595703125,
0.037078857421875,
-0.0165557861328125,
-0.049407958984375,
0.010284423828125,
-0.0257110595703125,
-0.033355712890625,
-0.04083251953125,
0.049713134765625,
0.002838134765625,
-0.01364898681640625,
-0.02154541015625,
-0.01546478271484375,
0.0109100341796875,
-0.0259552001953125,
-0.00006121397018432617,
-0.050537109375,
0.02496337890625,
0.034515380859375,
0.00611114501953125,
-0.032806396484375,
0.048187255859375,
0.002857208251953125,
0.033660888671875,
0.0227508544921875,
0.051849365234375,
0.022064208984375,
-0.034393310546875,
0.0244140625,
-0.02874755859375,
-0.0296783447265625,
-0.014892578125,
-0.004329681396484375,
-0.0186004638671875,
0.00676727294921875,
-0.0193634033203125,
0.040802001953125,
-0.0183868408203125,
-0.00873565673828125,
-0.00921630859375,
0.01380157470703125,
-0.01009368896484375,
0.01398468017578125,
0.056884765625,
-0.034942626953125,
0.0271148681640625,
-0.0200958251953125,
0.013580322265625,
0.01512908935546875,
-0.04937744140625,
0.011077880859375,
0.05169677734375,
-0.05072021484375,
0.031402587890625,
0.033935546875,
-0.005077362060546875,
0.0413818359375,
-0.0287933349609375,
0.0007185935974121094,
0.04449462890625,
0.01654052734375,
-0.050384521484375,
-0.021331787109375,
0.04071044921875,
0.020355224609375,
-0.006847381591796875,
0.05511474609375,
-0.0060272216796875,
-0.00893402099609375,
0.0221405029296875,
0.043487548828125,
-0.03912353515625,
0.01085662841796875,
0.0267791748046875,
0.00036454200744628906,
-0.0144195556640625,
0.007381439208984375,
-0.0029430389404296875,
-0.032989501953125,
0.00024402141571044922,
0.018768310546875,
0.000850677490234375,
0.00875091552734375,
0.018096923828125,
-0.0225830078125,
0.00677490234375,
-0.0120697021484375,
0.02490234375,
0.029876708984375,
0.007061004638671875,
-0.0139923095703125,
0.0298614501953125,
-0.0015535354614257812,
0.0088348388671875,
0.01389312744140625,
-0.0027751922607421875,
-0.040283203125,
0.032806396484375,
-0.02801513671875,
-0.009429931640625,
-0.0038738250732421875,
0.0122528076171875,
0.0023479461669921875,
0.01071929931640625,
-0.001247406005859375,
-0.0036907196044921875,
-0.004878997802734375,
0.0193939208984375,
0.0112457275390625,
-0.04400634765625,
-0.0177154541015625,
0.018524169921875,
-0.0240936279296875,
0.0194549560546875,
0.01245880126953125,
-0.0200958251953125,
0.0009927749633789062,
-0.044769287109375,
0.0594482421875,
-0.056121826171875,
0.01116180419921875,
0.022064208984375,
-0.008941650390625,
-0.007305145263671875,
0.00872039794921875,
0.03173828125,
-0.04150390625,
-0.01202392578125,
0.0219268798828125,
-0.00647735595703125,
-0.0031337738037109375,
0.0386962890625,
-0.0323486328125,
0.0733642578125,
-0.012939453125,
-0.0150146484375,
-0.004718780517578125,
0.039276123046875,
-0.006969451904296875,
0.03497314453125,
-0.0038204193115234375,
0.046295166015625,
-0.035003662109375,
0.0382080078125,
-0.00044155120849609375,
0.017120361328125,
0.03167724609375,
0.0146026611328125,
0.071533203125,
0.0264739990234375,
-0.08428955078125,
-0.013641357421875,
0.0305328369140625,
0.026153564453125,
0.00968170166015625,
0.06414794921875,
-0.01100921630859375,
-0.009979248046875,
0.0458984375,
0.01493072509765625,
0.025115966796875,
0.0313720703125,
-0.041107177734375,
0.01189422607421875,
0.0016603469848632812,
0.00046443939208984375,
-0.0199737548828125,
0.042877197265625,
0.03570556640625,
-0.035186767578125,
-0.0264739990234375,
-0.053314208984375,
0.0008950233459472656,
0.0299072265625,
0.0226898193359375,
-0.059112548828125,
0.004817962646484375,
-0.04681396484375,
0.042236328125,
-0.0081024169921875,
-0.03564453125,
0.0238494873046875,
0.0180206298828125,
0.0208282470703125,
-0.03582763671875,
-0.0225677490234375,
0.0169525146484375,
-0.01128387451171875,
0.08575439453125,
0.02685546875,
0.033782958984375,
-0.0198516845703125,
0.037628173828125,
0.017578125,
0.09002685546875,
-0.07135009765625,
-0.037994384765625,
0.0088653564453125,
-0.0012845993041992188,
-0.017822265625,
0.011444091796875,
-0.0182647705078125,
0.02532958984375,
0.055450439453125,
-0.0399169921875,
0.01276397705078125,
0.0244140625,
0.010589599609375,
-0.0096435546875,
0.0259552001953125,
-0.0265045166015625,
-0.011962890625,
-0.06182861328125,
0.0164794921875,
0.046630859375,
0.041595458984375,
-0.00524139404296875,
0.0439453125,
0.029022216796875,
0.001056671142578125,
-0.02752685546875,
0.0281829833984375,
0.006046295166015625,
0.02252197265625,
-0.05792236328125,
-0.047393798828125,
0.03948974609375,
0.04168701171875,
-0.018798828125,
0.00521087646484375,
0.044525146484375,
0.032073974609375,
-0.029205322265625,
-0.0305938720703125,
0.016143798828125,
-0.0258026123046875,
-0.05694580078125,
0.0007567405700683594,
0.024383544921875,
0.0428466796875,
0.036041259765625,
-0.016204833984375,
0.1051025390625,
-0.0250091552734375,
0.0026683807373046875,
0.038909912109375,
0.0084686279296875,
0.0135498046875,
0.013519287109375,
0.0106658935546875,
-0.01096343994140625,
0.02618408203125,
-0.0253143310546875,
0.005886077880859375,
-0.0081939697265625,
-0.0240478515625,
-0.02862548828125,
0.0203399658203125,
-0.0102081298828125,
0.0063323974609375,
-0.017791748046875,
-0.021270751953125,
-0.00634765625,
0.027130126953125,
-0.01117706298828125,
0.0203399658203125,
0.0277099609375,
-0.006870269775390625,
-0.024871826171875,
0.0161895751953125,
0.02947998046875,
-0.02764892578125,
0.0013027191162109375,
0.0743408203125,
-0.0166473388671875,
-0.00928497314453125,
-0.043609619140625,
-0.0015554428100585938,
-0.0200042724609375,
-0.024200439453125,
0.01282501220703125,
0.0017099380493164062,
-0.01129150390625,
-0.0032367706298828125,
-0.059722900390625,
0.0193328857421875,
0.0246124267578125,
0.00951385498046875,
0.031402587890625,
-0.0179443359375,
0.02264404296875,
0.007080078125,
0.0233612060546875,
-0.0202789306640625,
-0.041778564453125,
-0.031463623046875,
0.006683349609375,
0.033355712890625,
0.0291748046875,
-0.023193359375,
-0.0194091796875,
0.006378173828125,
-0.045013427734375,
0.03900146484375,
0.0009241104125976562,
0.044158935546875,
0.03460693359375,
-0.0000476837158203125,
0.01551055908203125,
-0.00872802734375,
-0.01446533203125,
0.0036869049072265625,
0.007568359375,
-0.0019330978393554688,
-0.0099639892578125,
-0.004108428955078125,
0.04229736328125,
0.037567138671875,
0.02142333984375,
-0.035552978515625,
0.00934600830078125,
0.04998779296875,
-0.01224517822265625,
0.04388427734375,
-0.0219573974609375,
0.0038509368896484375,
-0.028228759765625,
-0.0243682861328125,
0.01537322998046875,
-0.0189361572265625,
-0.019073486328125,
-0.0136871337890625,
0.04156494140625,
0.0382080078125,
0.01050567626953125,
-0.049957275390625,
0.06536865234375,
-0.040252685546875,
0.023223876953125,
0.010498046875,
-0.0484619140625,
0.01019287109375,
0.019012451171875,
0.00811004638671875,
-0.0194244384765625,
-0.026824951171875,
0.02044677734375,
0.0074920654296875,
-0.00396728515625,
-0.0027313232421875,
0.0011339187622070312,
-0.020172119140625,
-0.00449371337890625,
0.00177764892578125,
0.029754638671875,
0.01300048828125,
-0.035247802734375,
-0.0015211105346679688,
-0.009979248046875,
-0.024871826171875,
-0.08953857421875,
0.0178375244140625,
-0.1387939453125,
-0.0233917236328125,
-0.01033782958984375,
0.040008544921875,
0.04144287109375,
-0.044342041015625,
-0.11175537109375,
0.0019817352294921875,
-0.0186004638671875,
-0.043060302734375,
-0.06475830078125,
-0.0335693359375,
-0.0196533203125,
0.0672607421875,
-0.00957489013671875,
-0.0250244140625,
-0.0233612060546875,
0.091064453125,
-0.0009589195251464844,
-0.01221466064453125,
0.0112457275390625,
-0.005535125732421875,
-0.058502197265625,
0.0114288330078125,
0.0175933837890625,
-0.00795745849609375,
-0.017822265625,
0.03302001953125,
-0.00754547119140625,
0.04498291015625,
-0.00972747802734375,
-0.04364013671875,
-0.0261383056640625,
-0.060516357421875,
-0.02838134765625,
-0.037628173828125,
-0.018707275390625,
-0.00946807861328125,
0.07763671875,
0.05029296875,
0.02105712890625,
-0.04266357421875,
-0.005321502685546875,
-0.08319091796875,
0.01323699951171875,
-0.0288848876953125,
-0.01241302490234375,
-0.04522705078125,
-0.0030002593994140625,
0.016571044921875,
0.00136566162109375,
0.023712158203125,
-0.00791168212890625,
-0.00994873046875,
-0.007289886474609375,
0.0026111602783203125,
-0.00667572021484375,
-0.0297393798828125,
0.01287841796875,
0.042327880859375,
-0.039093017578125,
-0.026519775390625,
0.0017671585083007812,
0.015899658203125,
0.00205230712890625,
-0.0289154052734375,
0.0248870849609375,
-0.0273895263671875,
0.0290069580078125,
0.027313232421875,
0.0298004150390625,
-0.0289306640625,
0.01062774658203125,
-0.044097900390625,
0.01027679443359375,
0.01959228515625,
-0.00501251220703125,
0.032135009765625,
-0.0186767578125,
0.06341552734375,
-0.003108978271484375,
0.0439453125,
-0.004093170166015625,
-0.0155029296875,
0.002277374267578125,
0.0156402587890625,
-0.0150299072265625,
-0.011566162109375,
0.018463134765625,
-0.01308441162109375,
0.00966644287109375,
0.0102996826171875,
0.05072021484375,
-0.039276123046875,
0.0240020751953125,
-0.027496337890625,
0.0204010009765625,
0.0240325927734375
] |
4c0950d64e268a553dae8a60d6fc7b05ad3ab476 | Wordpress Stackexchange
Q: How to add featured image for category (without a plugin)? I'm finding plugins that add the option for featured images for categories, but not how to code it yourself.
A: I had missed that you can easily add fields to taxonomy terms with Advanced Custom Fields: https://www.advancedcustomfields.com/resources/get-values-from-a-taxonomy-term/
| Q: How to add featured image for category (without a plugin)? I'm finding plugins that add the option for featured images for categories, but not how to code it yourself.
A: I had missed that you can easily add fields to taxonomy terms with Advanced Custom Fields: https://www.advancedcustomfields.com/resources/get-values-from-a-taxonomy-term/
A: There are already some solutions out there for adding custom fields to taxonomy. See: Add custom field to Category
You will see a 2016 update near the bottom that should help you.
With this you can simply copy an image url once you have uploaded it to your Media Library but I am assuming you want an Upload Media Modal (popup window) utilizing wp.media right? You will have to do that with javascript. This post explains several methods in which to instantiate a media uploader modal: https://mikejolley.com/2012/12/21/using-the-new-wordpress-3-5-media-uploader-in-plugins/
A: Not everything needs a plugin.
If you want to add a simple field to add IMG URL use add_term_meta(), the update_term_meta() and get_term_meta() WP functions.
function addTitleFieldToCat(){
$cat_title = get_term_meta($_POST['tag_ID'], '_pagetitle', true);
?>
<tr class="form-field">
<th scope="row" valign="top"><label for="cat_page_title"><?php _e('Category Page Title'); ?></label></th>
<td>
<input type="text" name="cat_title" id="cat_title" value="<?php echo $cat_title ?>"><br />
<span class="description"><?php _e('Title for the Category '); ?></span>
</td>
</tr>
<?php
}
add_action ( 'edit_category_form_fields', 'addTitleFieldToCat');
function saveCategoryFields() {
if ( isset( $_POST['cat_title'] ) ) {
update_term_meta($_POST['tag_ID'], '_pagetitle', $_POST['cat_title']);
}
}
add_action ( 'edited_category', 'saveCategoryFields');
src: Luke Simmons answer from: Add custom field to Category
A: <?php
add_action ( 'category_edit_form_fields', 'addTitleFieldToCat', 10, 2 );
function addTitleFieldToCat( $tag, $taxonomy ) {
$cat_title = get_term_meta( $tag->term_id, '_pagetitle', true );
?>
<tr class="form-field">
<th scope="row" valign="top"><label for="cat_page_title"><?php _e('Category Page Title'); ?></label></th>
<td>
<input type="text" name="cat_title" id="cat_page_title" value="<?php echo $cat_title ?>"><br />
<p class="description"><?php _e('Title for the category'); ?></p>
</td>
</tr>
<?php
}
add_action ( 'edited_category', 'saveCategoryFields' );
function saveCategoryFields() {
if ( isset( $_POST['cat_title'] ) ) {
update_term_meta( $_POST['tag_ID'], '_pagetitle', $_POST['cat_title'] );
}
}
Code modifications suggested by user @talk-nerdy-to-me - https://wordpress.stackexchange.com/users/122776/talk-nerdy-to-me
| wordpress | {
"language": "en",
"length": 319,
"provenance": "stackexchange_00019.jsonl.gz:472862",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/255559"
} | [
0.07391357421875,
0.008941650390625,
0.0018606185913085938,
-0.049224853515625,
0.040924072265625,
-0.0276031494140625,
0.0379638671875,
-0.0233612060546875,
0.0159912109375,
-0.00556182861328125,
-0.024993896484375,
0.0105743408203125,
-0.04986572265625,
-0.02593994140625,
-0.005504608154296875,
-0.0300140380859375,
0.0275421142578125,
0.0010385513305664062,
0.05267333984375,
0.006381988525390625,
0.01345062255859375,
0.03131103515625,
0.0195770263671875,
0.015716552734375,
0.0282135009765625,
-0.0004954338073730469,
0.013397216796875,
-0.0294647216796875,
0.0301971435546875,
0.00925445556640625,
0.0226593017578125,
-0.0241851806640625,
-0.001598358154296875,
0.017242431640625,
0.03350830078125,
0.0335693359375,
0.00585174560546875,
0.01111602783203125,
0.0234222412109375,
0.0124359130859375,
0.0258636474609375,
-0.0027217864990234375,
0.042755126953125,
0.05841064453125,
0.010284423828125,
-0.036041259765625,
0.017791748046875,
-0.059326171875,
0.016387939453125,
-0.06524658203125,
0.008453369140625,
0.021148681640625,
0.030487060546875,
-0.06585693359375,
-0.024200439453125,
-0.00412750244140625,
-0.012176513671875,
0.00801849365234375,
0.04229736328125,
-0.034759521484375,
-0.033599853515625,
-0.036041259765625,
0.039581298828125,
-0.00339508056640625,
0.024627685546875,
0.00045943260192871094,
-0.0033416748046875,
0.02099609375,
-0.029571533203125,
0.017791748046875,
0.039215087890625,
-0.047332763671875,
0.0169677734375,
0.0062103271484375,
-0.0156707763671875,
-0.05108642578125,
0.03472900390625,
-0.0151824951171875,
0.020538330078125,
-0.0029449462890625,
0.01189422607421875,
-0.01055908203125,
0.04351806640625,
-0.0017642974853515625,
-0.0189971923828125,
0.0029087066650390625,
-0.004833221435546875,
-0.003948211669921875,
-0.027587890625,
-0.0270843505859375,
-0.00872802734375,
-0.046478271484375,
-0.08453369140625,
0.051788330078125,
0.034027099609375,
-0.0177001953125,
0.03363037109375,
0.044830322265625,
-0.01111602783203125,
0.0418701171875,
-0.014923095703125,
-0.033782958984375,
0.05340576171875,
-0.043121337890625,
0.004032135009765625,
0.0283050537109375,
-0.0075225830078125,
-0.028106689453125,
0.011322021484375,
0.008941650390625,
-0.00818634033203125,
0.0190582275390625,
0.0249176025390625,
-0.023590087890625,
-0.001155853271484375,
0.01270294189453125,
-0.00001424551010131836,
0.0384521484375,
0.0155181884765625,
0.0237579345703125,
0.0188140869140625,
0.02703857421875,
0.018798828125,
-0.0265655517578125,
-0.003978729248046875,
-0.0029392242431640625,
-0.0290679931640625,
-0.0452880859375,
0.004241943359375,
0.006084442138671875,
-0.03851318359375,
0.045074462890625,
0.077392578125,
-0.0004107952117919922,
-0.00954437255859375,
-0.00555419921875,
0.0045928955078125,
-0.0224761962890625,
0.0124969482421875,
0.00011432170867919922,
-0.00884246826171875,
-0.0035762786865234375,
0.043670654296875,
-0.016082763671875,
0.048797607421875,
-0.0233306884765625,
-0.007022857666015625,
0.04376220703125,
0.030029296875,
-0.0214996337890625,
0.0810546875,
-0.044952392578125,
0.01052093505859375,
0.0207977294921875,
0.029388427734375,
0.02490234375,
0.0438232421875,
-0.0025787353515625,
-0.016387939453125,
-0.0022983551025390625,
0.025146484375,
-0.0009665489196777344,
0.00510406494140625,
0.002948760986328125,
-0.0070648193359375,
0.004726409912109375,
-0.037445068359375,
0.0112457275390625,
0.0226898193359375,
-0.0289306640625,
0.036468505859375,
-0.007076263427734375,
0.0026454925537109375,
0.022674560546875,
0.00836944580078125,
0.036712646484375,
-0.0022125244140625,
0.01629638671875,
0.00753021240234375,
0.036346435546875,
0.01387786865234375,
-0.029937744140625,
0.0164642333984375,
-0.0066986083984375,
-0.0350341796875,
0.025665283203125,
-0.0021572113037109375,
0.050506591796875,
0.0193328857421875,
0.02130126953125,
-0.006526947021484375,
-0.0096282958984375,
-0.044677734375,
-0.00501251220703125,
0.028564453125,
0.01107025146484375,
-0.0212554931640625,
0.00044536590576171875,
0.0112152099609375,
-0.034912109375,
-0.03948974609375,
-0.010894775390625,
0.00362396240234375,
0.0296478271484375,
0.0330810546875,
-0.0198211669921875,
0.01580810546875,
0.0009164810180664062,
-0.00047397613525390625,
0.0195465087890625,
-0.0022907257080078125,
0.0032901763916015625,
0.0244140625,
-0.0804443359375,
-0.0287322998046875,
-0.004177093505859375,
-0.0029773712158203125,
-0.0039520263671875,
0.01546478271484375,
0.00836181640625,
0.0180816650390625,
0.00445556640625,
-0.006160736083984375,
0.011932373046875,
0.005401611328125,
0.029937744140625,
-0.033447265625,
0.0011615753173828125,
-0.020294189453125,
0.0230255126953125,
-0.057861328125,
0.029876708984375,
0.0071563720703125,
-0.0106658935546875,
-0.040985107421875,
-0.0011053085327148438,
-0.002994537353515625,
-0.07232666015625,
0.0005207061767578125,
0.04705810546875,
0.0245513916015625,
-0.0215301513671875,
-0.0301513671875,
-0.009674072265625,
0.0633544921875,
0.03094482421875,
0.0215911865234375,
-0.0127410888671875,
0.00605010986328125,
0.01282501220703125,
0.023193359375,
-0.0164337158203125,
0.0229644775390625,
-0.0352783203125,
0.039398193359375,
0.01140594482421875,
-0.0251007080078125,
-0.047821044921875,
-0.0027217864990234375,
0.0093231201171875,
0.0291290283203125,
0.0137176513671875,
-0.04119873046875,
0.0199127197265625,
0.036834716796875,
0.022003173828125,
0.033538818359375,
0.0291595458984375,
-0.035858154296875,
0.0173187255859375,
0.006847381591796875,
-0.0149688720703125,
0.0012083053588867188,
0.0304107666015625,
-0.0163116455078125,
0.025146484375,
-0.0229339599609375,
0.0012874603271484375,
-0.006237030029296875,
-0.0002772808074951172,
-0.01116180419921875,
-0.0002562999725341797,
0.0037059783935546875,
-0.011383056640625,
0.0134429931640625,
-0.036590576171875,
0.016571044921875,
0.01110076904296875,
-0.047271728515625,
-0.0300445556640625,
0.00873565673828125,
0.01190185546875,
-0.025604248046875,
-0.00428009033203125,
-0.02069091796875,
-0.0126953125,
-0.0655517578125,
-0.03692626953125,
0.040191650390625,
-0.05377197265625,
0.016876220703125,
0.05633544921875,
-0.0245819091796875,
0.01727294921875,
0.0094757080078125,
-0.02520751953125,
0.0104827880859375,
0.0182647705078125,
0.0167083740234375,
-0.01446533203125,
-0.0428466796875,
0.00959014892578125,
0.03729248046875,
0.034698486328125,
-0.0038242340087890625,
-0.033905029296875,
-0.0151824951171875,
0.0204925537109375,
-0.055450439453125,
-0.054595947265625,
-0.01532745361328125,
-0.021881103515625,
-0.03424072265625,
0.015777587890625,
-0.0266265869140625,
0.013946533203125,
0.0295867919921875,
-0.003131866455078125,
-0.0237274169921875,
-0.037017822265625,
-0.0043487548828125,
-0.07489013671875,
-0.05706787109375,
-0.06103515625,
0.0013818740844726562,
-0.002544403076171875,
0.0017652511596679688,
0.07952880859375,
0.00250244140625,
-0.037200927734375,
0.004451751708984375,
-0.0172271728515625,
0.0016193389892578125,
0.016204833984375,
0.006988525390625,
-0.00641632080078125,
-0.00820159912109375,
0.027069091796875,
0.00711822509765625,
0.028656005859375,
-0.03509521484375,
-0.0098724365234375,
-0.050537109375,
-0.00647735595703125,
-0.033660888671875,
0.00568389892578125,
0.0682373046875,
-0.005573272705078125,
-0.0026302337646484375,
-0.036712646484375,
0.02008056640625,
-0.00478363037109375,
-0.0011434555053710938,
0.003459930419921875,
-0.0307464599609375,
-0.00846099853515625,
-0.0182037353515625,
0.0293426513671875,
-0.0268707275390625,
-0.0235443115234375,
-0.04107666015625,
-0.039154052734375,
0.02783203125,
-0.0025043487548828125,
-0.0016889572143554688,
0.0333251953125,
-0.04815673828125,
-0.04388427734375,
0.041015625,
-0.03851318359375,
0.02801513671875,
-0.0199127197265625,
0.0694580078125,
-0.0263824462890625,
-0.058837890625,
0.0193634033203125,
-0.060546875,
0.00672149658203125,
-0.038970947265625,
-0.006687164306640625,
-0.010009765625,
0.085205078125,
-0.031768798828125,
-0.01751708984375,
0.0057830810546875,
-0.002777099609375,
-0.011199951171875,
0.0168609619140625,
-0.051422119140625,
-0.0230865478515625,
-0.07257080078125,
-0.0078582763671875,
0.01201629638671875,
-0.048797607421875,
-0.0101470947265625,
0.0400390625,
-0.06475830078125,
-0.01171875,
0.031524658203125,
-0.047882080078125,
0.003505706787109375,
0.0180816650390625,
-0.006694793701171875,
-0.012420654296875,
-0.032623291015625,
-0.0286712646484375,
-0.07208251953125,
-0.00045680999755859375,
-0.01904296875,
0.0323486328125,
-0.0187835693359375,
0.045989990234375,
-0.0292510986328125,
0.04107666015625,
-0.003047943115234375,
-0.00982666015625,
0.01403045654296875,
0.0171356201171875,
-0.0159454345703125,
-0.0093536376953125,
0.00882720947265625,
-0.03643798828125,
-0.0180816650390625,
-0.040252685546875,
-0.0178985595703125,
-0.00583648681640625,
-0.003864288330078125,
0.0189971923828125,
0.004917144775390625,
-0.014129638671875,
0.0015010833740234375,
0.0069427490234375,
-0.01666259765625,
0.004360198974609375,
-0.015167236328125,
-0.0204620361328125,
-0.00489044189453125,
-0.0004146099090576172,
0.0207366943359375,
0.0015869140625,
0.0132293701171875,
0.029541015625,
0.08062744140625,
0.0017576217651367188,
-0.0123443603515625,
-0.10382080078125,
0.036346435546875,
0.0355224609375,
0.033966064453125,
0.0242462158203125,
0.0020542144775390625,
-0.03521728515625,
0.051177978515625,
0.0149993896484375,
0.0235443115234375,
-0.06683349609375,
0.046905517578125,
-0.0130615234375,
-0.0131378173828125,
0.0171356201171875,
-0.0092926025390625,
0.0535888671875,
0.01505279541015625,
-0.0087890625,
-0.02398681640625,
-0.041656494140625,
0.0202484130859375,
-0.00492095947265625,
0.047515869140625,
-0.00814056396484375,
-0.00817108154296875,
-0.006153106689453125,
0.045074462890625,
0.04656982421875,
0.043182373046875,
-0.01593017578125,
-0.004901885986328125,
-0.00896453857421875,
-0.01313018798828125,
-0.0177001953125,
-0.0523681640625,
0.004505157470703125,
0.004917144775390625,
-0.00855255126953125,
0.000010311603546142578,
0.013397216796875,
0.00077056884765625,
0.0211334228515625,
-0.02679443359375,
-0.04058837890625,
-0.055908203125,
-0.00394439697265625,
0.03692626953125,
0.037628173828125,
0.00457000732421875,
0.03143310546875,
0.0235443115234375,
0.01273345947265625,
-0.01018524169921875,
-0.0206756591796875,
0.0105133056640625,
-0.02728271484375,
0.0129852294921875,
0.012847900390625,
-0.0131988525390625,
0.0288543701171875,
0.03399658203125,
-0.04058837890625,
0.0280609130859375,
0.005290985107421875,
0.00811767578125,
0.0394287109375,
-0.007595062255859375,
0.0118255615234375,
0.018310546875,
-0.01195526123046875,
-0.024627685546875,
0.0250244140625,
-0.028228759765625,
0.0097808837890625,
-0.0242462158203125,
0.027557373046875,
-0.03839111328125,
-0.041656494140625,
0.0675048828125,
-0.0169219970703125,
-0.023712158203125,
-0.0208282470703125,
-0.05279541015625,
-0.021728515625,
-0.0210723876953125,
-0.0031337738037109375,
0.0285797119140625,
0.00864410400390625,
-0.02557373046875,
0.004451751708984375,
-0.024444580078125,
0.042205810546875,
-0.004180908203125,
0.0085601806640625,
0.0026073455810546875,
-0.006504058837890625,
-0.068603515625,
-0.021942138671875,
-0.005573272705078125,
-0.006168365478515625,
-0.01226043701171875,
-0.0102081298828125,
-0.027984619140625,
0.032470703125,
-0.027313232421875,
0.03411865234375,
-0.0008287429809570312,
-0.024169921875,
0.031768798828125,
0.00740814208984375,
0.0269622802734375,
0.01078033447265625,
-0.0292816162109375,
-0.01458740234375,
-0.044708251953125,
-0.0167236328125,
0.00865936279296875,
-0.01275634765625,
-0.01523590087890625,
-0.011444091796875,
0.022064208984375,
0.02362060546875,
-0.0206756591796875,
-0.049285888671875,
-0.0012607574462890625,
0.01451873779296875,
0.032470703125,
0.0364990234375,
0.0224456787109375,
-0.037841796875,
0.002956390380859375,
0.0310211181640625,
0.00855255126953125,
-0.0394287109375,
-0.0094757080078125,
-0.043426513671875,
-0.055633544921875,
-0.068603515625,
0.0290679931640625,
0.044921875,
-0.009979248046875,
0.05352783203125,
0.036865234375,
0.040679931640625,
0.01523590087890625,
-0.0230255126953125,
-0.0007338523864746094,
-0.0244598388671875,
0.020355224609375,
-0.03118896484375,
-0.011016845703125,
0.030303955078125,
-0.025909423828125,
0.026275634765625,
-0.0210418701171875,
-0.007015228271484375,
0.026641845703125,
-0.03033447265625,
0.020477294921875,
0.02484130859375,
-0.01247406005859375,
0.034698486328125,
0.01171875,
-0.0042266845703125,
-0.003993988037109375,
0.00995635986328125,
-0.002689361572265625,
-0.058441162109375,
0.037811279296875,
-0.05438232421875,
-0.051971435546875,
0.032958984375,
0.023406982421875,
-0.0193328857421875,
0.049072265625,
-0.0189666748046875,
0.00865936279296875,
0.00641632080078125,
0.046966552734375,
-0.04168701171875,
0.02593994140625,
0.0038776397705078125,
-0.00998687744140625,
0.04443359375,
0.038818359375,
0.002460479736328125,
0.0257415771484375,
-0.0294036865234375,
-0.018463134765625,
-0.0137481689453125,
-0.01055145263671875,
0.0228118896484375,
-0.0157928466796875,
0.0112457275390625,
0.0135955810546875,
0.032989501953125,
-0.03509521484375,
-0.0036563873291015625,
0.0308837890625,
-0.00911712646484375,
-0.003154754638671875,
0.024200439453125,
-0.00681304931640625,
0.00844573974609375,
0.000980377197265625,
0.06536865234375,
-0.01203155517578125,
0.0178680419921875,
0.03973388671875,
-0.00920867919921875,
0.0219879150390625,
0.032257080078125,
0.01242828369140625,
-0.004730224609375,
0.005367279052734375,
-0.0396728515625,
0.07647705078125,
-0.0096588134765625,
-0.006984710693359375,
-0.0012197494506835938,
-0.0203094482421875,
-0.02252197265625,
-0.0054473876953125,
0.001651763916015625,
-0.0267333984375,
-0.039703369140625,
0.077392578125,
-0.03826904296875,
-0.010162353515625,
0.0092620849609375,
0.04229736328125,
0.0025348663330078125,
-0.00841522216796875,
0.0008482933044433594,
-0.005413055419921875,
0.0345458984375,
-0.008819580078125,
0.0164794921875,
0.033111572265625,
-0.0038394927978515625,
-0.058624267578125,
0.0843505859375,
-0.01031494140625,
0.00041556358337402344,
0.004795074462890625,
0.045135498046875,
-0.023681640625,
-0.001155853271484375,
-0.0058746337890625,
0.056060791015625,
-0.03564453125,
0.0011119842529296875,
-0.039642333984375,
0.01525115966796875,
0.00001913309097290039,
0.0302886962890625,
0.09112548828125,
0.019500732421875,
-0.00489044189453125,
-0.0085601806640625,
0.059539794921875,
0.041351318359375,
-0.01320648193359375,
0.0164794921875,
0.0025997161865234375,
-0.0272674560546875,
0.021026611328125,
0.0192413330078125,
0.033660888671875,
0.002216339111328125,
-0.0202484130859375,
0.0197601318359375,
0.01561737060546875,
0.035888671875,
-0.007015228271484375,
0.0216522216796875,
-0.010894775390625,
0.0006155967712402344,
0.025665283203125,
-0.025146484375,
0.01300048828125,
0.020050048828125,
-0.0211334228515625,
0.0360107421875,
0.051361083984375,
-0.008819580078125,
0.039154052734375,
-0.0268402099609375,
0.0582275390625,
0.03814697265625,
0.02532958984375,
0.04327392578125,
-0.0256195068359375,
0.042510986328125,
0.01094818115234375,
-0.044586181640625,
0.027099609375,
-0.00904083251953125,
0.01399993896484375,
-0.0626220703125,
-0.01029205322265625,
0.0251617431640625,
0.03948974609375,
-0.0298004150390625,
-0.039642333984375,
0.0035800933837890625,
0.0193634033203125,
0.018585205078125,
0.005054473876953125,
0.006778717041015625,
-0.037017822265625,
0.0304718017578125,
-0.08056640625,
0.01325225830078125,
0.04986572265625,
0.044647216796875,
-0.01178741455078125,
-0.02777099609375,
-0.05426025390625,
-0.02459716796875,
-0.04022216796875,
0.0232696533203125,
-0.01422882080078125,
0.032501220703125,
0.019073486328125,
0.04107666015625,
-0.01354217529296875,
-0.0107269287109375,
-0.02783203125,
0.05877685546875,
0.0291900634765625,
0.0249176025390625,
-0.015228271484375,
-0.02264404296875,
0.0128631591796875,
0.01263427734375,
-0.003551483154296875,
-0.00977325439453125,
0.028045654296875,
0.057830810546875,
-0.013641357421875,
-0.0200042724609375,
0.03948974609375,
-0.0157623291015625,
0.00862884521484375,
-0.0555419921875,
0.07049560546875,
0.0732421875,
0.0167694091796875,
0.0328369140625,
-0.051971435546875,
0.11834716796875,
-0.042724609375,
-0.002330780029296875,
-0.0021724700927734375,
-0.047149658203125,
0.0618896484375,
-0.0229949951171875,
0.0498046875,
-0.01556396484375,
-0.11444091796875,
-0.021453857421875,
-0.041046142578125,
-0.08526611328125,
0.06451416015625,
0.06060791015625,
-0.05413818359375,
0.0125732421875,
0.0028171539306640625,
-0.01142120361328125,
0.0078125,
-0.0254974365234375,
0.01181793212890625,
-0.046844482421875,
-0.005489349365234375,
-0.0261993408203125,
-0.00847625732421875,
-0.0162506103515625,
-0.00037026405334472656,
0.050262451171875,
0.035797119140625,
0.022552490234375,
-0.01390838623046875,
0.03631591796875,
-0.0282745361328125,
-0.0020236968994140625,
-0.0165252685546875,
0.0007271766662597656,
0.0078582763671875,
0.00867462158203125,
-0.0181732177734375,
-0.011474609375,
-0.0234222412109375,
0.025115966796875,
0.02130126953125,
-0.01311492919921875,
-0.0090484619140625,
-0.0002682209014892578,
0.002552032470703125,
0.0204315185546875,
0.039398193359375,
-0.028717041015625,
-0.0269927978515625,
-0.07568359375,
-0.05340576171875,
0.03076171875,
-0.0148468017578125,
0.018829345703125,
0.0231781005859375,
0.004993438720703125,
0.01367950439453125,
0.0110321044921875,
0.0070037841796875,
0.026947021484375,
0.03662109375,
-0.041595458984375,
0.00406646728515625,
0.0175018310546875,
-0.01541900634765625,
0.0260772705078125,
-0.005615234375,
0.042724609375,
0.004795074462890625,
-0.047607421875,
0.038543701171875,
-0.006183624267578125,
0.036041259765625,
-0.0198974609375,
-0.00611114501953125,
-0.005313873291015625,
0.00914764404296875,
-0.00981903076171875,
-0.01377105712890625,
-0.02105712890625,
-0.0809326171875,
-0.0148468017578125,
0.01352691650390625,
-0.055511474609375,
-0.026458740234375,
-0.054779052734375,
0.01287078857421875,
0.040191650390625,
-0.0120086669921875,
-0.04541015625,
0.015960693359375,
-0.0289459228515625,
0.041900634765625,
-0.007152557373046875,
-0.06494140625,
0.03472900390625,
0.0738525390625,
-0.0367431640625,
-0.024169921875,
-0.025634765625,
-0.035980224609375,
-0.05712890625,
0.03936767578125,
0.03125,
-0.04620361328125,
0.036712646484375,
0.0736083984375,
0.0523681640625,
0.1270751953125,
0.028076171875,
-0.01247406005859375,
0.01495361328125,
-0.0196533203125,
-0.032318115234375,
-0.0117340087890625,
0.03857421875,
-0.0306854248046875,
-0.07135009765625,
-0.07476806640625,
0.0173492431640625,
-0.00719451904296875,
-0.04937744140625,
-0.1240234375,
0.033233642578125,
-0.04901123046875,
-0.045379638671875,
-0.04534912109375,
0.0017347335815429688,
-0.0177459716796875,
0.0176239013671875,
-0.01381683349609375,
-0.004741668701171875,
-0.01398468017578125,
0.042236328125,
0.02618408203125,
-0.02093505859375,
0.053070068359375,
0.01163482666015625,
-0.051025390625,
0.00359344482421875,
0.0067291259765625,
0.0216827392578125,
0.039520263671875,
-0.0237274169921875,
0.0181427001953125,
0.0160369873046875,
-0.0716552734375,
-0.0572509765625,
-0.040740966796875,
0.01302337646484375,
-0.018524169921875,
-0.0670166015625,
-0.00028967857360839844,
-0.0186004638671875,
0.05743408203125,
-0.023345947265625,
-0.0017213821411132812,
-0.002490997314453125,
-0.02880859375,
-0.06817626953125,
0.0238037109375,
-0.0180206298828125,
-0.007476806640625,
-0.05853271484375,
0.007778167724609375,
0.035247802734375,
-0.0308837890625,
-0.021240234375,
0.010498046875,
-0.053466796875,
0.01462554931640625,
0.018280029296875,
0.0074615478515625,
-0.0296173095703125,
0.0494384765625,
0.01309967041015625,
-0.026763916015625,
0.0115509033203125,
-0.00716400146484375,
-0.0279998779296875,
0.0119781494140625,
-0.0049591064453125,
-0.00897216796875,
-0.0252227783203125,
0.020111083984375,
0.02984619140625,
0.01134490966796875,
0.0029811859130859375,
-0.00203704833984375,
0.0009722709655761719,
-0.0115814208984375,
0.03924560546875,
0.00850677490234375,
0.047454833984375,
-0.03509521484375,
0.05926513671875,
0.0205535888671875,
0.0389404296875,
-0.007129669189453125,
-0.06036376953125,
-0.0222625732421875,
0.0249786376953125,
-0.033782958984375,
-0.006145477294921875,
0.00003910064697265625,
-0.051513671875,
0.0029811859130859375,
0.03228759765625,
-0.027984619140625,
0.003070831298828125,
0.00032401084899902344,
-0.007537841796875,
-0.0163726806640625,
0.0094451904296875
] |
a1a57846e3cc92a64aef0dbeb7551403821b4501 | Wordpress Stackexchange
Q: opening links in new tab using - add_filter( 'the_content', 'make_clickable'); The following code in function.php, works fine for making the links - clickable,
add_filter( 'the_content', 'make_clickable', 12 );
But can I make the links to open in new tab?
A: I am not sure if there's a native function for this, but a little regex might help the case:
function open_links_in_new_tab($content){
$pattern = '/<a(.*?)?href=[\'"]?[\'"]?(.*?)?>/i';
$content = preg_replace_callback($pattern, function($m){
$tpl = array_shift($m);
$hrf = isset($m[1]) ? $m[1] : null;
if ( preg_match('/target=[\'"]?(.*?)[\'"]?/i', $tpl) ) {
return $tpl;
}
if ( trim($hrf) && 0 === strpos($hrf, '#') ) {
return $tpl; // anchor links
}
return preg_replace_callback('/href=/i', function($m2){
return sprintf('target="_blank" %s', array_shift($m2));
}, $tpl);
}, $content);
return $content;
}
add_filter('the_content', 'open_links_in_new_tab', 999);
The patterns might need a little improvements. Hope that helps!
| Q: opening links in new tab using - add_filter( 'the_content', 'make_clickable'); The following code in function.php, works fine for making the links - clickable,
add_filter( 'the_content', 'make_clickable', 12 );
But can I make the links to open in new tab?
A: I am not sure if there's a native function for this, but a little regex might help the case:
function open_links_in_new_tab($content){
$pattern = '/<a(.*?)?href=[\'"]?[\'"]?(.*?)?>/i';
$content = preg_replace_callback($pattern, function($m){
$tpl = array_shift($m);
$hrf = isset($m[1]) ? $m[1] : null;
if ( preg_match('/target=[\'"]?(.*?)[\'"]?/i', $tpl) ) {
return $tpl;
}
if ( trim($hrf) && 0 === strpos($hrf, '#') ) {
return $tpl; // anchor links
}
return preg_replace_callback('/href=/i', function($m2){
return sprintf('target="_blank" %s', array_shift($m2));
}, $tpl);
}, $content);
return $content;
}
add_filter('the_content', 'open_links_in_new_tab', 999);
The patterns might need a little improvements. Hope that helps!
| wordpress | {
"language": "en",
"length": 131,
"provenance": "stackexchange_00019.jsonl.gz:472885",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/255645"
} | [
0.0657958984375,
-0.05059814453125,
0.054779052734375,
-0.01555633544921875,
-0.0027065277099609375,
-0.039215087890625,
0.074951171875,
-0.023345947265625,
0.0021953582763671875,
0.0054473876953125,
-0.0064697265625,
-0.0283355712890625,
-0.0233917236328125,
-0.046478271484375,
0.003986358642578125,
-0.039154052734375,
0.033843994140625,
-0.0294036865234375,
0.002323150634765625,
-0.0128173828125,
0.00818634033203125,
-0.0079498291015625,
0.0188140869140625,
0.0606689453125,
0.036285400390625,
-0.004108428955078125,
0.01338958740234375,
-0.008758544921875,
0.01103973388671875,
-0.0153656005859375,
0.01032257080078125,
-0.01007843017578125,
0.0303955078125,
0.036102294921875,
-0.0367431640625,
0.0034008026123046875,
0.024139404296875,
0.01000213623046875,
0.01043701171875,
0.03656005859375,
0.0159759521484375,
-0.010009765625,
-0.015838623046875,
0.013580322265625,
-0.02069091796875,
-0.0269927978515625,
0.044952392578125,
-0.00860595703125,
-0.004184722900390625,
0.00408935546875,
0.029296875,
0.00893402099609375,
0.025726318359375,
-0.038360595703125,
0.0211181640625,
0.058868408203125,
-0.01116943359375,
-0.0095977783203125,
0.0108642578125,
0.04302978515625,
0.00783538818359375,
0.01198577880859375,
-0.01335906982421875,
-0.03375244140625,
-0.006938934326171875,
0.0012598037719726562,
0.0264739990234375,
0.0143585205078125,
-0.02581787109375,
-0.0192413330078125,
0.0213470458984375,
-0.0052642822265625,
-0.0205841064453125,
-0.00962066650390625,
0.03369140625,
0.0216522216796875,
0.017822265625,
0.0286712646484375,
-0.0274658203125,
0.04498291015625,
0.03326416015625,
-0.00817108154296875,
0.00142669677734375,
-0.030059814453125,
0.04840087890625,
-0.0006704330444335938,
-0.00493621826171875,
-0.024139404296875,
-0.048431396484375,
-0.0005435943603515625,
-0.037567138671875,
0.0297393798828125,
-0.01517486572265625,
-0.049041748046875,
-0.048919677734375,
-0.0030536651611328125,
0.0026264190673828125,
0.02227783203125,
-0.01172637939453125,
0.00044345855712890625,
0.0299530029296875,
-0.05328369140625,
0.049041748046875,
-0.03497314453125,
0.00799560546875,
0.0650634765625,
0.02288818359375,
-0.045501708984375,
0.0003952980041503906,
-0.01183319091796875,
0.001556396484375,
0.00861358642578125,
0.01428985595703125,
0.009796142578125,
-0.0186614990234375,
-0.007610321044921875,
-0.032989501953125,
0.0286102294921875,
0.006610870361328125,
0.026275634765625,
0.01325225830078125,
0.005184173583984375,
-0.0205078125,
0.01568603515625,
0.0107421875,
-0.008270263671875,
-0.019775390625,
0.0011882781982421875,
-0.00656890869140625,
0.00872802734375,
-0.01105499267578125,
0.0083160400390625,
0.016357421875,
0.038543701171875,
0.018768310546875,
-0.0194854736328125,
0.017333984375,
-0.018463134765625,
-0.012725830078125,
0.0191650390625,
0.03509521484375,
-0.047943115234375,
-0.0249481201171875,
0.0156707763671875,
0.038299560546875,
0.0015287399291992188,
0.02630615234375,
0.0221405029296875,
0.01739501953125,
-0.038482666015625,
0.06121826171875,
-0.03900146484375,
0.059844970703125,
-0.0305328369140625,
-0.03631591796875,
-0.034271240234375,
0.0128021240234375,
-0.02825927734375,
-0.0168609619140625,
-0.04400634765625,
0.021148681640625,
0.006023406982421875,
0.0153350830078125,
-0.053924560546875,
-0.055023193359375,
-0.03033447265625,
-0.09051513671875,
-0.0179901123046875,
0.0238189697265625,
0.050872802734375,
0.00975799560546875,
-0.0096435546875,
0.02685546875,
0.020355224609375,
-0.0009431838989257812,
0.00815582275390625,
-0.006511688232421875,
0.021514892578125,
0.01441192626953125,
0.057220458984375,
0.0306396484375,
-0.018798828125,
0.07501220703125,
-0.014923095703125,
-0.048370361328125,
0.05560302734375,
0.003292083740234375,
0.07513427734375,
-0.0007162094116210938,
0.005126953125,
0.001617431640625,
0.01114654541015625,
-0.00728607177734375,
-0.0179443359375,
0.002269744873046875,
-0.0124359130859375,
-0.0008907318115234375,
0.005374908447265625,
-0.02813720703125,
0.0177764892578125,
0.033966064453125,
0.023590087890625,
-0.021728515625,
0.0160064697265625,
-0.061187744140625,
0.0028209686279296875,
-0.0174407958984375,
0.0029163360595703125,
-0.0426025390625,
-0.00945281982421875,
0.0174713134765625,
-0.02813720703125,
0.00481414794921875,
-0.049407958984375,
-0.01381683349609375,
0.0227813720703125,
-0.00162506103515625,
0.01070404052734375,
0.0060272216796875,
0.0140380859375,
0.01555633544921875,
-0.004428863525390625,
0.019622802734375,
0.01690673828125,
0.0245208740234375,
-0.03558349609375,
-0.0159149169921875,
-0.031280517578125,
-0.051055908203125,
-0.0041351318359375,
-0.0662841796875,
0.07470703125,
0.0670166015625,
0.029998779296875,
-0.04278564453125,
0.0192718505859375,
-0.0006642341613769531,
-0.022552490234375,
-0.0305938720703125,
0.0426025390625,
0.047210693359375,
-0.0031070709228515625,
-0.01529693603515625,
-0.04071044921875,
0.07183837890625,
0.0255126953125,
0.042236328125,
-0.051361083984375,
-0.0219879150390625,
0.0215301513671875,
-0.0567626953125,
0.0079345703125,
0.03363037109375,
0.002513885498046875,
-0.015594482421875,
0.04150390625,
0.0018177032470703125,
0.00913238525390625,
-0.04339599609375,
0.01617431640625,
-0.002422332763671875,
0.00040841102600097656,
-0.0162811279296875,
-0.0023555755615234375,
0.00780487060546875,
0.021392822265625,
0.0311126708984375,
0.0253753662109375,
-0.0265655517578125,
0.005603790283203125,
0.00951385498046875,
0.019378662109375,
-0.0137786865234375,
0.05572509765625,
0.0138092041015625,
-0.0767822265625,
0.0183258056640625,
-0.01300048828125,
-0.0413818359375,
-0.00037169456481933594,
-0.02947998046875,
0.0223846435546875,
0.0241851806640625,
-0.0227203369140625,
0.0022296905517578125,
-0.00623321533203125,
0.01251220703125,
-0.071044921875,
0.01788330078125,
0.00603485107421875,
0.031341552734375,
0.0090179443359375,
-0.019989013671875,
0.03228759765625,
0.019805908203125,
-0.03125,
0.03338623046875,
-0.0011539459228515625,
0.01922607421875,
-0.02008056640625,
0.03582763671875,
0.0408935546875,
-0.0404052734375,
0.025665283203125,
-0.005634307861328125,
0.0323486328125,
0.02545166015625,
-0.0063018798828125,
-0.019378662109375,
-0.007503509521484375,
-0.02801513671875,
-0.010223388671875,
0.006805419921875,
0.016387939453125,
-0.04156494140625,
-0.061981201171875,
-0.03778076171875,
-0.03094482421875,
-0.07989501953125,
-0.037261962890625,
-0.0113525390625,
-0.0592041015625,
0.005847930908203125,
-0.0035858154296875,
-0.03997802734375,
-0.0122833251953125,
0.0223236083984375,
0.00104522705078125,
0.04229736328125,
-0.0098724365234375,
-0.07415771484375,
-0.0121917724609375,
-0.06671142578125,
0.037506103515625,
-0.014862060546875,
0.0037631988525390625,
0.0197296142578125,
-0.0165557861328125,
0.01514434814453125,
0.016632080078125,
0.05047607421875,
0.01503753662109375,
-0.00891876220703125,
-0.0251312255859375,
-0.027252197265625,
0.0296783447265625,
-0.0161285400390625,
-0.004505157470703125,
0.044769287109375,
0.0343017578125,
-0.0318603515625,
0.014556884765625,
-0.0110626220703125,
0.0196380615234375,
0.036468505859375,
-0.01459503173828125,
-0.00794219970703125,
0.03448486328125,
0.040313720703125,
-0.0253753662109375,
0.02728271484375,
0.01300811767578125,
-0.00179290771484375,
-0.052154541015625,
-0.0117034912109375,
-0.0307159423828125,
0.00005716085433959961,
-0.023284912109375,
0.0291595458984375,
0.0218658447265625,
0.02911376953125,
0.00859832763671875,
0.00397491455078125,
-0.015899658203125,
-0.0086212158203125,
-0.04339599609375,
0.05084228515625,
0.019287109375,
-0.0460205078125,
0.0090484619140625,
0.0278778076171875,
0.0030307769775390625,
0.009185791015625,
-0.031890869140625,
-0.050048828125,
0.025726318359375,
-0.031768798828125,
0.01544952392578125,
-0.0380859375,
-0.006923675537109375,
-0.0035400390625,
0.071044921875,
-0.04364013671875,
-0.00897216796875,
-0.027191162109375,
0.006175994873046875,
0.01314544677734375,
-0.072021484375,
-0.006076812744140625,
-0.0030879974365234375,
-0.0831298828125,
0.01666259765625,
0.01549530029296875,
-0.035369873046875,
-0.039703369140625,
0.0716552734375,
-0.0562744140625,
-0.00992584228515625,
0.030120849609375,
0.06964111328125,
-0.05255126953125,
0.04034423828125,
-0.034423828125,
0.00814056396484375,
-0.026458740234375,
0.061248779296875,
-0.07586669921875,
0.0018911361694335938,
-0.023712158203125,
0.03863525390625,
0.047027587890625,
-0.05792236328125,
-0.0377197265625,
0.031524658203125,
0.03521728515625,
0.0193328857421875,
0.0187225341796875,
-0.01381683349609375,
0.020233154296875,
0.0008597373962402344,
0.0300750732421875,
-0.0304107666015625,
0.0201263427734375,
0.006587982177734375,
-0.0291748046875,
0.07684326171875,
-0.00864410400390625,
0.0809326171875,
0.00925445556640625,
-0.024749755859375,
-0.04296875,
-0.0237579345703125,
0.00009632110595703125,
0.016448974609375,
-0.0213165283203125,
-0.0193328857421875,
0.0007076263427734375,
-0.041259765625,
0.03045654296875,
0.0165252685546875,
-0.06640625,
-0.01195526123046875,
-0.003803253173828125,
0.045440673828125,
-0.038177490234375,
0.02783203125,
0.036865234375,
0.0296173095703125,
0.053436279296875,
-0.00124359130859375,
-0.056060791015625,
-0.0455322265625,
0.0740966796875,
-0.003932952880859375,
0.022430419921875,
-0.024169921875,
0.044708251953125,
0.0122528076171875,
-0.00003403425216674805,
0.005519866943359375,
0.0158538818359375,
0.005218505859375,
0.0108642578125,
-0.0186767578125,
0.00579833984375,
-0.0038433074951171875,
0.0262451171875,
-0.0025882720947265625,
0.01007080078125,
-0.034149169921875,
-0.0155792236328125,
0.00206756591796875,
0.04730224609375,
0.060791015625,
0.0143280029296875,
0.01065826416015625,
0.031524658203125,
0.0298614501953125,
0.0152740478515625,
-0.00728607177734375,
0.0230865478515625,
-0.029144287109375,
0.061767578125,
-0.045867919921875,
-0.00738525390625,
-0.0087127685546875,
-0.00208282470703125,
0.0312042236328125,
0.0193939208984375,
-0.03619384765625,
-0.023773193359375,
0.0012655258178710938,
-0.017120361328125,
0.0046539306640625,
-0.00481414794921875,
-0.0070037841796875,
0.01348114013671875,
-0.0285797119140625,
-0.0010700225830078125,
0.03558349609375,
-0.01262664794921875,
-0.0186767578125,
0.012908935546875,
0.01004791259765625,
-0.0085601806640625,
0.01323699951171875,
0.0626220703125,
-0.0215301513671875,
0.044158935546875,
-0.022674560546875,
-0.0005679130554199219,
0.052886962890625,
-0.0244598388671875,
0.0046844482421875,
0.03924560546875,
-0.0106201171875,
-0.018951416015625,
0.057647705078125,
-0.032958984375,
0.00423431396484375,
0.058319091796875,
0.0369873046875,
-0.0008015632629394531,
-0.02203369140625,
0.007488250732421875,
-0.0122222900390625,
0.007472991943359375,
0.001743316650390625,
-0.0187225341796875,
-0.036041259765625,
-0.0048370361328125,
0.025177001953125,
-0.004825592041015625,
-0.014312744140625,
0.01416778564453125,
0.012481689453125,
0.022552490234375,
0.01486968994140625,
-0.034759521484375,
0.000637054443359375,
-0.0131072998046875,
-0.007602691650390625,
0.03741455078125,
-0.05029296875,
0.007228851318359375,
-0.038909912109375,
0.037689208984375,
-0.07275390625,
-0.019378662109375,
0.09674072265625,
-0.030792236328125,
0.056427001953125,
-0.046630859375,
0.0084686279296875,
-0.054962158203125,
0.004428863525390625,
0.043548583984375,
0.0340576171875,
-0.041839599609375,
0.0223388671875,
-0.0697021484375,
0.0072784423828125,
-0.0189971923828125,
-0.05267333984375,
-0.01739501953125,
-0.0257110595703125,
0.0479736328125,
0.01061248779296875,
0.0186767578125,
-0.036834716796875,
0.016510009765625,
0.010650634765625,
0.02679443359375,
0.01898193359375,
-0.00030159950256347656,
0.024322509765625,
0.05218505859375,
0.004962921142578125,
0.052032470703125,
0.027740478515625,
-0.0212249755859375,
-0.030426025390625,
-0.03253173828125,
-0.0406494140625,
0.0011463165283203125,
0.00954437255859375,
0.0240020751953125,
0.038482666015625,
0.03179931640625,
0.00865936279296875,
-0.00421142578125,
-0.0182037353515625,
0.009063720703125,
-0.038330078125,
0.041534423828125,
-0.024932861328125,
0.0011005401611328125,
-0.03363037109375,
-0.01161956787109375,
0.056640625,
0.0124664306640625,
0.02685546875,
-0.00627899169921875,
-0.0294189453125,
0.0216522216796875,
0.00489044189453125,
-0.03167724609375,
0.043243408203125,
0.07440185546875,
-0.0172882080078125,
0.045135498046875,
0.0153045654296875,
0.0025959014892578125,
0.0469970703125,
-0.015472412109375,
0.07843017578125,
0.028656005859375,
0.08477783203125,
-0.0137939453125,
-0.0028533935546875,
0.05511474609375,
-0.046142578125,
-0.002681732177734375,
0.0360107421875,
0.0229644775390625,
-0.06695556640625,
0.00824737548828125,
-0.009002685546875,
-0.004375457763671875,
0.01488494873046875,
0.0321044921875,
-0.003631591796875,
0.0292205810546875,
0.00029659271240234375,
-0.047882080078125,
-0.01212310791015625,
0.006359100341796875,
0.008514404296875,
0.0190582275390625,
0.006793975830078125,
0.004489898681640625,
0.00020432472229003906,
-0.046112060546875,
-0.0247039794921875,
0.018585205078125,
0.0296630859375,
-0.03411865234375,
0.02947998046875,
0.0006537437438964844,
0.0181121826171875,
-0.036956787109375,
0.023773193359375,
-0.011016845703125,
0.0200042724609375,
0.01349639892578125,
-0.0033092498779296875,
0.0003414154052734375,
0.0138702392578125,
-0.0168304443359375,
0.019287109375,
-0.02166748046875,
0.041717529296875,
0.049163818359375,
0.031402587890625,
0.031768798828125,
-0.00608062744140625,
-0.0029201507568359375,
-0.00897216796875,
-0.03509521484375,
0.006359100341796875,
0.01087188720703125,
0.0285797119140625,
0.07415771484375,
0.004489898681640625,
-0.050201416015625,
0.032928466796875,
-0.05462646484375,
-0.0316162109375,
0.00390625,
-0.01238250732421875,
-0.056060791015625,
-0.018463134765625,
-0.0174713134765625,
-0.0266571044921875,
0.0316162109375,
-0.039794921875,
-0.0670166015625,
0.08258056640625,
-0.0064849853515625,
0.031768798828125,
-0.00894927978515625,
0.033203125,
-0.0146636962890625,
0.0030803680419921875,
-0.037841796875,
0.077392578125,
0.068603515625,
0.00974273681640625,
-0.03521728515625,
-0.018157958984375,
-0.00012350082397460938,
0.0261077880859375,
-0.01450347900390625,
-0.01702880859375,
-0.0155792236328125,
0.0017347335815429688,
0.045196533203125,
0.039642333984375,
0.02178955078125,
-0.0022525787353515625,
-0.0218505859375,
0.00994110107421875,
0.06536865234375,
-0.049774169921875,
0.019775390625,
0.0209197998046875,
-0.00885009765625,
-0.0007314682006835938,
0.00899505615234375,
0.007801055908203125,
0.01486968994140625,
-0.015625,
-0.03912353515625,
0.01303863525390625,
0.0193939208984375,
-0.0267181396484375,
0.005771636962890625,
0.0335693359375,
0.01385498046875,
-0.05615234375,
-0.0200042724609375,
-0.0282135009765625,
0.034454345703125,
-0.01267242431640625,
0.004344940185546875,
-0.0018291473388671875,
0.0087890625,
0.027587890625,
-0.0499267578125,
-0.030548095703125,
-0.00832366943359375,
0.01690673828125,
0.036468505859375,
0.0221405029296875,
0.044769287109375,
-0.04425048828125,
-0.04022216796875,
0.0252227783203125,
0.0748291015625,
-0.0170440673828125,
-0.054046630859375,
0.002353668212890625,
0.003459930419921875,
0.0124359130859375,
0.052093505859375,
0.0770263671875,
-0.0027828216552734375,
0.00738525390625,
-0.01580810546875,
0.01126861572265625,
0.0182037353515625,
-0.01416015625,
0.006946563720703125,
0.016021728515625,
-0.006229400634765625,
0.036529541015625,
-0.04595947265625,
0.002513885498046875,
0.014923095703125,
0.0282135009765625,
0.007076263427734375,
0.046844482421875,
0.02264404296875,
-0.01451873779296875,
0.025054931640625,
-0.009735107421875,
-0.02728271484375,
-0.01306915283203125,
0.010040283203125,
-0.032135009765625,
-0.00612640380859375,
0.0193328857421875,
0.040283203125,
0.01453399658203125,
0.0244903564453125,
0.0005736351013183594,
0.0181427001953125,
0.027374267578125,
0.05078125,
-0.013397216796875,
0.032623291015625,
-0.047119140625,
0.0180816650390625,
-0.0024547576904296875,
0.0011234283447265625,
-0.01512908935546875,
0.005771636962890625,
0.0243988037109375,
-0.0175933837890625,
0.08270263671875,
-0.0212554931640625,
0.00589752197265625,
-0.008087158203125,
-0.044097900390625,
0.0499267578125,
-0.00891876220703125,
-0.050262451171875,
0.0146331787109375,
-0.003360748291015625,
-0.0609130859375,
0.00757598876953125,
0.034515380859375,
-0.0079498291015625,
0.00836944580078125,
-0.0164031982421875,
0.03125,
-0.0028171539306640625,
-0.02264404296875,
-0.02398681640625,
0.00714111328125,
0.03778076171875,
-0.00821685791015625,
-0.02679443359375,
0.001651763916015625,
0.0179443359375,
0.0300750732421875,
-0.057708740234375,
0.0941162109375,
-0.035308837890625,
-0.005817413330078125,
-0.0184326171875,
0.040496826171875,
-0.065673828125,
-0.0413818359375,
0.0445556640625,
-0.00505828857421875,
0.0086669921875,
0.00850677490234375,
-0.0222015380859375,
0.0223541259765625,
0.01103973388671875,
0.01043701171875,
0.027313232421875,
-0.04473876953125,
0.0291900634765625,
0.01910400390625,
0.0245819091796875,
-0.0270843505859375,
-0.018341064453125,
-0.0499267578125,
-0.033477783203125,
0.0428466796875,
0.0361328125,
0.00041031837463378906,
0.044219970703125,
0.01015472412109375,
0.0008273124694824219,
-0.011627197265625,
-0.0143585205078125,
-0.000843048095703125,
0.032562255859375,
-0.0136260986328125,
-0.0213775634765625,
0.0125579833984375,
-0.0276947021484375,
-0.006023406982421875,
0.0167083740234375,
0.016754150390625,
-0.00408935546875,
-0.036102294921875,
0.02972412109375,
0.056884765625,
0.0386962890625,
-0.0582275390625,
0.016265869140625,
0.069580078125,
-0.0081939697265625,
0.03521728515625,
0.02734375,
-0.00197601318359375,
-0.0316162109375,
-0.0166473388671875,
-0.0238800048828125,
-0.0174713134765625,
-0.058807373046875,
0.01442718505859375,
0.0020236968994140625,
0.038848876953125,
0.0216064453125,
-0.07012939453125,
-0.002605438232421875,
0.0030040740966796875,
0.08856201171875,
-0.0171966552734375,
0.036285400390625,
-0.01212310791015625,
0.036163330078125,
-0.04522705078125,
-0.04937744140625,
-0.0134429931640625,
0.04022216796875,
-0.03607177734375,
0.0035648345947265625,
0.03875732421875,
-0.0253753662109375,
-0.018218994140625,
-0.016082763671875,
0.0016202926635742188,
0.03399658203125,
-0.00428009033203125,
-0.0249786376953125,
0.017059326171875,
-0.01678466796875,
-0.0119781494140625,
-0.00820159912109375,
0.017578125,
-0.049072265625,
-0.027069091796875,
0.029632568359375,
-0.0171661376953125,
-0.004138946533203125,
-0.031646728515625,
-0.09796142578125,
0.02935791015625,
0.0010919570922851562,
-0.037933349609375,
-0.07470703125,
-0.0029010772705078125,
0.01085662841796875,
0.000698089599609375,
-0.033935546875,
-0.0322265625,
-0.05694580078125,
0.03936767578125,
-0.01727294921875,
0.0170440673828125,
0.01120758056640625,
-0.03759765625,
0.002223968505859375,
0.01294708251953125,
0.034881591796875,
-0.015716552734375,
0.00847625732421875,
-0.007472991943359375,
0.03289794921875,
0.039276123046875,
-0.01010894775390625,
-0.0165557861328125,
0.0103302001953125,
-0.037353515625,
0.00670623779296875,
-0.061126708984375,
-0.01904296875,
-0.01338958740234375,
0.0443115234375,
-0.00473785400390625,
0.004913330078125,
-0.03485107421875,
0.024322509765625,
0.02252197265625,
-0.022918701171875,
-0.0131072998046875,
0.00916290283203125,
-0.037078857421875,
-0.0262451171875,
-0.0251007080078125,
0.0298309326171875,
0.0089263916015625,
-0.0260772705078125,
0.008026123046875,
-0.0504150390625,
-0.007663726806640625,
0.0080413818359375,
-0.024505615234375,
0.006282806396484375,
0.117431640625,
-0.07781982421875,
-0.019439697265625,
0.0197601318359375,
-0.002231597900390625,
0.031524658203125,
-0.046539306640625,
0.024169921875,
-0.0024738311767578125,
-0.0199432373046875,
0.01007080078125,
0.03045654296875,
-0.00896453857421875,
0.0102081298828125,
-0.06378173828125,
-0.0179443359375,
0.026611328125,
-0.01206207275390625,
0.01222991943359375,
0.00965118408203125,
0.0206756591796875,
-0.0098724365234375,
0.076171875,
-0.0214385986328125,
0.012908935546875,
-0.0117645263671875,
0.012603759765625,
-0.006847381591796875,
-0.00553131103515625,
0.01690673828125,
-0.00798797607421875,
0.004390716552734375,
-0.00421905517578125,
-0.0369873046875,
-0.01313018798828125,
0.000043451786041259766,
0.00955963134765625,
-0.0316162109375,
0.013946533203125
] |
f69027b51108872aef2d0dd5150c4924ab801791 | Wordpress Stackexchange
Q: Custom post type permalink is doesn't show in admin I have problem with custom post type - permalink is doesn't show:
Post type is published, but I can't it show on website.
I tried change permalink structure to ?p=123, but it still doesn't work. I tried change 'rewrite' attribute in code to false, but no difference.
Some ideas where can be problem?
Here is my code for custom post types:
$args_team = array(
'labels' => sk_post_type_labels( __('Tým', 'sk'), __('Tým', 'sk') ),
'public' => true,
'has_archive' => true,
'exclude_from_search' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => 10,
'rewrite' => array( 'slug' => 'team' ),
'supports' => array('title','editor','thumbnail','page-attributes')
);
Thanks for any ideas.
A: I set the following to true to display the permalinks in the admin section.
'publicly_queryable' => true,
| Q: Custom post type permalink is doesn't show in admin I have problem with custom post type - permalink is doesn't show:
Post type is published, but I can't it show on website.
I tried change permalink structure to ?p=123, but it still doesn't work. I tried change 'rewrite' attribute in code to false, but no difference.
Some ideas where can be problem?
Here is my code for custom post types:
$args_team = array(
'labels' => sk_post_type_labels( __('Tým', 'sk'), __('Tým', 'sk') ),
'public' => true,
'has_archive' => true,
'exclude_from_search' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => 10,
'rewrite' => array( 'slug' => 'team' ),
'supports' => array('title','editor','thumbnail','page-attributes')
);
Thanks for any ideas.
A: I set the following to true to display the permalinks in the admin section.
'publicly_queryable' => true,
A: Try removing exclude from search and set your permalinks to Post name.
you should be able to access with: mysite.com/team/new-team-member
| wordpress | {
"language": "en",
"length": 163,
"provenance": "stackexchange_00019.jsonl.gz:472924",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/255771"
} | [
0.06549072265625,
-0.0015230178833007812,
0.031829833984375,
-0.009613037109375,
-0.005077362060546875,
-0.013763427734375,
0.034942626953125,
-0.0567626953125,
-0.021759033203125,
0.007518768310546875,
0.01157379150390625,
0.01031494140625,
-0.0465087890625,
-0.0438232421875,
0.02874755859375,
-0.0283355712890625,
0.02447509765625,
0.01480865478515625,
0.04150390625,
-0.004985809326171875,
0.0110321044921875,
0.0016031265258789062,
0.0193634033203125,
-0.005886077880859375,
0.0224456787109375,
0.00595855712890625,
0.04547119140625,
-0.05145263671875,
0.029205322265625,
-0.016082763671875,
0.01486968994140625,
-0.0189361572265625,
0.00323486328125,
0.0081939697265625,
0.035980224609375,
-0.0027313232421875,
0.0190582275390625,
0.00920867919921875,
0.033599853515625,
0.00994873046875,
0.0156402587890625,
-0.0179595947265625,
0.0154571533203125,
0.041900634765625,
-0.00021314620971679688,
-0.0123748779296875,
-0.0144195556640625,
-0.07916259765625,
-0.007091522216796875,
-0.01087188720703125,
-0.02655029296875,
-0.0015592575073242188,
-0.0010709762573242188,
-0.0236053466796875,
-0.0105133056640625,
-0.0081024169921875,
-0.01003265380859375,
-0.039337158203125,
0.035797119140625,
0.0038299560546875,
-0.01120758056640625,
-0.03759765625,
0.0247650146484375,
-0.0174560546875,
-0.031402587890625,
0.0016336441040039062,
0.030242919921875,
0.01430511474609375,
-0.04302978515625,
-0.056976318359375,
0.0229339599609375,
-0.0036296844482421875,
0.00569915771484375,
-0.0156097412109375,
-0.04132080078125,
-0.0369873046875,
0.0197296142578125,
-0.046478271484375,
-0.01346588134765625,
0.0007081031799316406,
0.028076171875,
0.03253173828125,
-0.03857421875,
0.007415771484375,
-0.00452423095703125,
0.018341064453125,
-0.01142120361328125,
-0.033233642578125,
0.0016870498657226562,
0.00905609130859375,
-0.00521087646484375,
-0.0245513916015625,
-0.0033512115478515625,
0.0435791015625,
0.00962066650390625,
-0.0279998779296875,
0.04217529296875,
0.0594482421875,
0.00093841552734375,
0.00949859619140625,
0.0032749176025390625,
-0.043426513671875,
0.0214080810546875,
-0.05279541015625,
0.008514404296875,
-0.01392364501953125,
-0.020965576171875,
0.035919189453125,
0.06512451171875,
0.036834716796875,
-0.005428314208984375,
0.0059814453125,
-0.005901336669921875,
-0.0023174285888671875,
-0.026123046875,
0.0168914794921875,
-0.0294952392578125,
-0.0152740478515625,
-0.0144805908203125,
0.037384033203125,
0.01506805419921875,
0.055999755859375,
0.0016908645629882812,
-0.00965118408203125,
0.00231170654296875,
0.0127105712890625,
0.003963470458984375,
-0.06451416015625,
-0.0003399848937988281,
0.0582275390625,
-0.03704833984375,
-0.01461029052734375,
0.050018310546875,
0.042816162109375,
0.022796630859375,
-0.041717529296875,
0.00687408447265625,
-0.039215087890625,
-0.019927978515625,
0.023101806640625,
-0.00865936279296875,
-0.009765625,
0.033935546875,
-0.041778564453125,
-0.024139404296875,
0.0531005859375,
0.01129150390625,
-0.003795623779296875,
-0.007122039794921875,
-0.038055419921875,
-0.031768798828125,
-0.04913330078125,
0.051971435546875,
0.0077056884765625,
-0.04901123046875,
-0.0272216796875,
0.031982421875,
-0.0352783203125,
-0.030670166015625,
-0.061614990234375,
0.063720703125,
0.0083465576171875,
-0.0048065185546875,
0.0247344970703125,
-0.0101318359375,
0.0018129348754882812,
-0.058013916015625,
-0.00769805908203125,
0.021697998046875,
-0.0066680908203125,
0.0278472900390625,
0.004123687744140625,
0.004360198974609375,
-0.0012054443359375,
0.004520416259765625,
-0.023834228515625,
0.01409912109375,
0.0139007568359375,
0.0306243896484375,
0.01535797119140625,
-0.0269012451171875,
-0.0352783203125,
0.06787109375,
-0.049835205078125,
-0.062347412109375,
0.043182373046875,
0.044647216796875,
0.056610107421875,
-0.033416748046875,
0.01377105712890625,
0.0723876953125,
0.06298828125,
-0.01763916015625,
0.0240936279296875,
0.0002551078796386719,
-0.01641845703125,
-0.039794921875,
-0.00518798828125,
-0.03851318359375,
0.012542724609375,
-0.045196533203125,
0.0195159912109375,
-0.0166168212890625,
0.026153564453125,
-0.024932861328125,
0.0205230712890625,
-0.0173187255859375,
0.0275115966796875,
0.0311279296875,
0.041473388671875,
0.0099639892578125,
0.01361846923828125,
-0.03521728515625,
-0.0292510986328125,
-0.0112152099609375,
0.038238525390625,
-0.00983428955078125,
-0.0017728805541992188,
-0.05810546875,
0.013519287109375,
-0.033843994140625,
-0.0655517578125,
-0.048065185546875,
0.06884765625,
0.0535888671875,
0.01593017578125,
-0.01885986328125,
-0.0139312744140625,
0.044677734375,
0.0223236083984375,
-0.033050537109375,
0.0142364501953125,
0.01224517822265625,
0.00565338134765625,
-0.01367950439453125,
0.0095367431640625,
0.0082244873046875,
-0.05279541015625,
0.00975799560546875,
0.047821044921875,
0.024444580078125,
0.01458740234375,
-0.01366424560546875,
-0.0011014938354492188,
0.05242919921875,
0.0098114013671875,
0.030364990234375,
-0.0195465087890625,
-0.00896453857421875,
-0.00266265869140625,
-0.002086639404296875,
-0.00368499755859375,
0.0345458984375,
-0.0293731689453125,
0.002368927001953125,
0.041290283203125,
0.01334381103515625,
0.021209716796875,
0.00351715087890625,
0.01739501953125,
-0.005725860595703125,
0.00008988380432128906,
-0.0157928466796875,
-0.0096893310546875,
0.0029087066650390625,
0.02398681640625,
0.04339599609375,
0.042510986328125,
-0.0272979736328125,
0.0011463165283203125,
0.003154754638671875,
0.039215087890625,
-0.006366729736328125,
0.02178955078125,
0.0772705078125,
-0.01416015625,
-0.036285400390625,
-0.0136566162109375,
0.033905029296875,
0.01467132568359375,
-0.01337432861328125,
0.01297760009765625,
-0.03839111328125,
-0.004913330078125,
-0.0021152496337890625,
-0.0244598388671875,
-0.00545501708984375,
0.01953125,
0.0179443359375,
-0.0090789794921875,
0.01611328125,
0.00859832763671875,
-0.0277252197265625,
0.034332275390625,
0.0004630088806152344,
-0.034912109375,
-0.00670623779296875,
-0.09271240234375,
0.07891845703125,
-0.062744140625,
0.060791015625,
0.08563232421875,
-0.01491546630859375,
0.040252685546875,
0.0212860107421875,
-0.0207366943359375,
-0.0143585205078125,
0.06011962890625,
0.01201629638671875,
-0.024932861328125,
-0.038299560546875,
0.0005335807800292969,
0.012908935546875,
0.01348114013671875,
0.002498626708984375,
-0.03338623046875,
0.00408172607421875,
0.0274200439453125,
-0.03668212890625,
-0.046966552734375,
-0.0011806488037109375,
-0.03436279296875,
-0.0037784576416015625,
-0.024932861328125,
-0.00943756103515625,
0.0029926300048828125,
-0.0239715576171875,
-0.0027599334716796875,
-0.002300262451171875,
-0.0224609375,
-0.06805419921875,
-0.051300048828125,
-0.06683349609375,
-0.0034313201904296875,
-0.0007119178771972656,
0.0085296630859375,
0.00827789306640625,
0.0740966796875,
0.024078369140625,
-0.046142578125,
0.038055419921875,
0.0161285400390625,
-0.036590576171875,
0.02099609375,
0.00424957275390625,
-0.003376007080078125,
0.0270233154296875,
0.0017147064208984375,
0.05584716796875,
0.044219970703125,
-0.051788330078125,
-0.01477813720703125,
-0.020294189453125,
-0.053436279296875,
0.02520751953125,
-0.0197296142578125,
-0.0007505416870117188,
0.006183624267578125,
0.0280303955078125,
-0.046875,
-0.0614013671875,
0.005451202392578125,
-0.05413818359375,
0.002368927001953125,
-0.0010442733764648438,
0.0104522705078125,
-0.0203399658203125,
0.049835205078125,
-0.00609588623046875,
0.03302001953125,
0.025238037109375,
-0.041412353515625,
0.0057220458984375,
0.0092926025390625,
0.0016050338745117188,
-0.025115966796875,
0.0244293212890625,
-0.006938934326171875,
0.0217742919921875,
0.0146331787109375,
0.0092926025390625,
-0.01239013671875,
0.052154541015625,
-0.02142333984375,
-0.08087158203125,
0.0648193359375,
-0.0775146484375,
-0.041839599609375,
-0.060302734375,
-0.0233154296875,
-0.0075531005859375,
0.087158203125,
0.0106048583984375,
-0.0043182373046875,
-0.032135009765625,
-0.00934600830078125,
-0.010955810546875,
-0.041778564453125,
-0.026702880859375,
0.009918212890625,
-0.048553466796875,
-0.005962371826171875,
-0.0195770263671875,
-0.0268707275390625,
-0.025909423828125,
-0.0017671585083007812,
-0.035430908203125,
-0.03094482421875,
0.0249481201171875,
0.006893157958984375,
-0.0086669921875,
0.035003662109375,
-0.01776123046875,
0.01116180419921875,
-0.016326904296875,
-0.016082763671875,
-0.08538818359375,
-0.01346588134765625,
-0.0011739730834960938,
0.04962158203125,
-0.005603790283203125,
-0.0249481201171875,
-0.06610107421875,
0.02362060546875,
0.0243072509765625,
0.037200927734375,
-0.00418853759765625,
-0.035247802734375,
0.00357818603515625,
0.032196044921875,
0.01114654541015625,
0.007045745849609375,
0.026458740234375,
0.0265960693359375,
-0.046539306640625,
0.01276397705078125,
-0.0188751220703125,
-0.026763916015625,
0.056243896484375,
-0.06890869140625,
-0.0210418701171875,
-0.0134735107421875,
-0.04229736328125,
0.01178741455078125,
-0.01800537109375,
-0.01152801513671875,
-0.0267181396484375,
-0.03533935546875,
0.0626220703125,
-0.040924072265625,
0.0234375,
-0.001033782958984375,
0.06878662109375,
-0.0113372802734375,
-0.018463134765625,
-0.045318603515625,
0.005443572998046875,
0.0170135498046875,
-0.002685546875,
0.031036376953125,
0.007808685302734375,
0.006175994873046875,
0.0005769729614257812,
-0.026641845703125,
-0.0256500244140625,
0.006496429443359375,
0.0277099609375,
0.01149749755859375,
-0.008636474609375,
0.0039215087890625,
-0.02764892578125,
0.034027099609375,
0.029754638671875,
0.0007443428039550781,
-0.0266265869140625,
-0.0268096923828125,
0.054168701171875,
-0.003726959228515625,
0.0131072998046875,
-0.04217529296875,
-0.0105438232421875,
0.020721435546875,
-0.006076812744140625,
0.041717529296875,
-0.006725311279296875,
0.0104217529296875,
-0.0027561187744140625,
-0.023681640625,
-0.0026950836181640625,
0.014678955078125,
-0.00028634071350097656,
0.003910064697265625,
0.0213775634765625,
0.01483154296875,
-0.013031005859375,
-0.0045928955078125,
-0.00720977783203125,
0.06292724609375,
0.00493621826171875,
-0.022125244140625,
-0.03729248046875,
-0.027252197265625,
0.01314544677734375,
0.0011320114135742188,
0.00896453857421875,
0.0269927978515625,
0.074951171875,
0.0192413330078125,
0.016815185546875,
0.02093505859375,
0.06536865234375,
-0.0184173583984375,
0.0400390625,
0.0089111328125,
0.0031871795654296875,
0.0030384063720703125,
0.05462646484375,
0.0217437744140625,
0.03253173828125,
-0.0118408203125,
0.0015211105346679688,
0.03826904296875,
0.02008056640625,
0.0169677734375,
-0.0096435546875,
-0.0027637481689453125,
-0.005390167236328125,
0.01548004150390625,
-0.041107177734375,
-0.017425537109375,
0.01038360595703125,
0.043548583984375,
0.0163726806640625,
-0.006259918212890625,
0.03173828125,
0.006603240966796875,
-0.033538818359375,
0.013153076171875,
0.01416778564453125,
-0.03131103515625,
-0.016265869140625,
0.01317596435546875,
0.01384735107421875,
0.01275634765625,
-0.031585693359375,
0.008056640625,
-0.05828857421875,
-0.01181793212890625,
0.026611328125,
-0.03033447265625,
0.014190673828125,
0.0068206787109375,
0.0073089599609375,
-0.02728271484375,
0.004913330078125,
0.00667572021484375,
0.018707275390625,
-0.0277862548828125,
-0.01192474365234375,
0.0161895751953125,
0.00595855712890625,
0.043304443359375,
-0.0247802734375,
-0.0240325927734375,
0.02886962890625,
-0.01061248779296875,
0.061981201171875,
0.02374267578125,
-0.056854248046875,
0.0031032562255859375,
-0.0208740234375,
0.005767822265625,
0.0108489990234375,
-0.0120849609375,
-0.015655517578125,
-0.0206451416015625,
0.02984619140625,
0.0066986083984375,
-0.012969970703125,
-0.0472412109375,
-0.031524658203125,
0.04644775390625,
0.05242919921875,
0.052459716796875,
-0.02801513671875,
0.086181640625,
-0.034271240234375,
0.051544189453125,
-0.019622802734375,
0.00787353515625,
-0.0218963623046875,
0.009918212890625,
-0.00450897216796875,
-0.059661865234375,
-0.020263671875,
0.020599365234375,
-0.029693603515625,
0.005504608154296875,
0.00421905517578125,
-0.0015897750854492188,
0.01161956787109375,
0.0181884765625,
0.007022857666015625,
-0.0272674560546875,
0.001209259033203125,
-0.01523590087890625,
0.0282440185546875,
-0.0160675048828125,
0.002197265625,
0.038177490234375,
0.0276641845703125,
-0.030548095703125,
0.004871368408203125,
0.0040435791015625,
0.012176513671875,
0.0078887939453125,
-0.04534912109375,
0.043243408203125,
0.050994873046875,
0.024261474609375,
0.065185546875,
0.0016317367553710938,
0.02862548828125,
0.0289764404296875,
-0.041412353515625,
-0.00007039308547973633,
0.011474609375,
0.026458740234375,
-0.0084228515625,
0.0238037109375,
0.04254150390625,
0.00887298583984375,
-0.0008325576782226562,
0.05291748046875,
0.053436279296875,
-0.0765380859375,
0.00037741661071777344,
0.01546478271484375,
0.0011730194091796875,
0.0092926025390625,
0.0233612060546875,
-0.000415802001953125,
0.00323486328125,
-0.0194854736328125,
-0.007045745849609375,
-0.0201263427734375,
-0.0134429931640625,
0.012176513671875,
-0.004489898681640625,
-0.00734710693359375,
0.01236724853515625,
-0.01320648193359375,
0.003398895263671875,
-0.046722412109375,
-0.006443023681640625,
-0.01812744140625,
0.0242767333984375,
0.0020885467529296875,
-0.044219970703125,
-0.00792694091796875,
-0.0212860107421875,
-0.01345062255859375,
-0.07379150390625,
0.018310546875,
0.07037353515625,
0.00797271728515625,
-0.0031414031982421875,
0.0189361572265625,
-0.016143798828125,
0.03485107421875,
-0.0240936279296875,
-0.0164947509765625,
0.00853729248046875,
-0.022613525390625,
0.006290435791015625,
0.04412841796875,
-0.041259765625,
0.0273895263671875,
-0.020721435546875,
-0.0035724639892578125,
-0.0054779052734375,
0.00191497802734375,
0.10113525390625,
-0.05340576171875,
-0.01910400390625,
0.00836944580078125,
0.0172882080078125,
0.00540924072265625,
0.00470733642578125,
-0.01079559326171875,
-0.040130615234375,
0.00553131103515625,
-0.00815582275390625,
-0.0015802383422851562,
-0.0108489990234375,
-0.0037441253662109375,
-0.029022216796875,
0.07635498046875,
-0.01849365234375,
0.0135955810546875,
0.0347900390625,
0.0279998779296875,
0.00640869140625,
0.035186767578125,
-0.022003173828125,
0.01849365234375,
-0.0032215118408203125,
0.028076171875,
-0.042236328125,
-0.01171875,
-0.0045013427734375,
0.042144775390625,
0.07421875,
0.0192718505859375,
-0.069580078125,
-0.0007386207580566406,
0.0693359375,
0.03607177734375,
0.0034275054931640625,
0.051239013671875,
0.0101470947265625,
0.055633544921875,
0.03656005859375,
-0.0220184326171875,
0.036376953125,
-0.0024127960205078125,
-0.04669189453125,
0.02001953125,
0.006076812744140625,
0.0186309814453125,
0.00907135009765625,
-0.060760498046875,
-0.01375579833984375,
-0.0026607513427734375,
0.029022216796875,
-0.0628662109375,
0.012969970703125,
-0.0074005126953125,
0.024444580078125,
-0.06866455078125,
-0.052886962890625,
-0.007541656494140625,
0.032196044921875,
0.008148193359375,
0.00904083251953125,
-0.020111083984375,
0.0030364990234375,
0.028167724609375,
-0.035797119140625,
-0.00783538818359375,
0.042327880859375,
-0.0249786376953125,
0.056884765625,
0.015869140625,
0.03192138671875,
-0.02850341796875,
-0.0125732421875,
0.0316162109375,
0.0675048828125,
-0.03387451171875,
-0.07147216796875,
0.0185699462890625,
0.01416778564453125,
-0.016265869140625,
0.02911376953125,
-0.023193359375,
0.04180908203125,
0.08343505859375,
-0.0204925537109375,
-0.00850677490234375,
-0.004215240478515625,
0.0496826171875,
-0.01052093505859375,
-0.0469970703125,
-0.021026611328125,
-0.0252227783203125,
-0.07635498046875,
0.0033740997314453125,
0.020111083984375,
0.1025390625,
0.06842041015625,
0.054534912109375,
-0.0156402587890625,
-0.06689453125,
-0.0025386810302734375,
-0.00021350383758544922,
-0.035064697265625,
0.027618408203125,
-0.057647705078125,
-0.038787841796875,
0.021942138671875,
0.06396484375,
0.031829833984375,
-0.0101165771484375,
0.00948333740234375,
-0.01476287841796875,
0.0119476318359375,
0.0093994140625,
0.029266357421875,
0.0040283203125,
-0.004993438720703125,
-0.027008056640625,
0.014373779296875,
-0.0077667236328125,
-0.00110626220703125,
-0.01323699951171875,
0.0281829833984375,
0.0104827880859375,
-0.0096893310546875,
0.02447509765625,
0.004306793212890625,
-0.0185546875,
0.0304412841796875,
-0.01338958740234375,
0.05462646484375,
0.00457763671875,
-0.03546142578125,
-0.006866455078125,
0.0024280548095703125,
-0.0404052734375,
0.007732391357421875,
0.036773681640625,
0.0097198486328125,
-0.01953125,
0.0460205078125,
0.018280029296875,
0.0011377334594726562,
-0.03173828125,
0.026031494140625,
-0.0192413330078125,
0.01107025146484375,
0.02606201171875,
-0.046875,
-0.029571533203125,
-0.0155487060546875,
0.043609619140625,
-0.040557861328125,
0.1192626953125,
-0.053924560546875,
0.007232666015625,
-0.060943603515625,
0.0341796875,
-0.07952880859375,
-0.052734375,
0.0283660888671875,
-0.0201416015625,
-0.0009083747863769531,
0.02142333984375,
-0.03369140625,
0.00921630859375,
0.029052734375,
-0.064208984375,
0.0011615753173828125,
-0.002361297607421875,
0.0129852294921875,
-0.0276336669921875,
-0.00798797607421875,
-0.03021240234375,
-0.028472900390625,
-0.028594970703125,
0.0030841827392578125,
0.013427734375,
-0.0104827880859375,
-0.043792724609375,
0.036163330078125,
0.018768310546875,
-0.0556640625,
0.0267791748046875,
-0.07440185546875,
0.060455322265625,
0.047515869140625,
0.04034423828125,
0.007289886474609375,
-0.0186004638671875,
-0.0276641845703125,
0.01224517822265625,
0.00433349609375,
0.01123809814453125,
-0.0018701553344726562,
-0.005107879638671875,
-0.00495147705078125,
-0.040863037109375,
-0.0142364501953125,
-0.06329345703125,
-0.0140380859375,
-0.005176544189453125,
0.01302337646484375,
0.03466796875,
0.0196990966796875,
-0.0225067138671875,
-0.0204010009765625,
0.0222930908203125,
0.0247955322265625,
0.004421234130859375,
-0.01067352294921875,
-0.0748291015625,
0.0135498046875,
0.0335693359375,
0.004871368408203125,
-0.052093505859375,
0.03082275390625,
-0.050628662109375,
0.039947509765625,
-0.00988006591796875,
0.004085540771484375,
0.02899169921875,
0.063232421875,
-0.03961181640625,
0.028839111328125,
-0.01107025146484375,
-0.05364990234375,
-0.00778961181640625,
0.0195465087890625,
0.030029296875,
-0.015594482421875,
-0.0316162109375,
-0.01055908203125,
-0.01548004150390625,
0.0533447265625,
0.036651611328125,
-0.007366180419921875,
-0.015716552734375,
0.0258636474609375,
-0.0479736328125,
-0.0689697265625,
0.040374755859375,
-0.06298828125,
-0.032379150390625,
-0.03204345703125,
0.033843994140625,
0.035400390625,
-0.0162353515625,
-0.0276031494140625,
0.033782958984375,
-0.00726318359375,
-0.0029296875,
-0.03515625,
-0.006206512451171875,
-0.006641387939453125,
0.0161895751953125,
-0.0036907196044921875,
-0.0186920166015625,
-0.0394287109375,
0.0260009765625,
-0.012115478515625,
0.029022216796875,
0.0132598876953125,
-0.0176239013671875,
-0.0090484619140625,
-0.0102081298828125,
0.006145477294921875,
-0.0191497802734375,
0.007312774658203125,
-0.00962066650390625,
0.0247344970703125,
0.0306396484375,
-0.037811279296875,
-0.01377105712890625,
-0.00008231401443481445,
0.0284423828125,
0.00873565673828125,
-0.038116455078125,
-0.01715087890625,
-0.02166748046875,
0.045074462890625,
-0.01390838623046875,
0.0194091796875,
-0.01036834716796875,
0.00502777099609375,
-0.056182861328125,
-0.072998046875,
-0.0145263671875,
0.03662109375,
-0.06365966796875,
0.0255584716796875,
0.0188751220703125,
0.009918212890625,
-0.019561767578125,
-0.01708984375,
0.00011116266250610352,
-0.01432037353515625,
0.0238494873046875,
0.00940704345703125,
-0.00965118408203125,
0.05718994140625,
0.0154571533203125,
-0.0214691162109375,
-0.0200653076171875,
-0.0083160400390625,
-0.024078369140625,
-0.0023097991943359375,
-0.0275115966796875,
-0.01297760009765625,
0.0084228515625,
0.0010080337524414062,
0.00821685791015625,
0.0199127197265625,
0.0219573974609375,
0.005908966064453125,
-0.000047326087951660156,
0.00482177734375,
0.01168060302734375,
-0.02593994140625,
-0.0179443359375,
-0.03057861328125,
0.07000732421875,
-0.0016603469848632812,
0.08770751953125,
-0.003025054931640625,
0.02825927734375,
-0.0242462158203125,
0.047760009765625,
-0.0199127197265625,
0.0095672607421875,
-0.00652313232421875,
-0.00930023193359375,
0.01334381103515625,
0.0040283203125,
-0.0169525146484375,
-0.0262451171875,
0.003757476806640625,
-0.0120391845703125,
-0.01438140869140625,
0.0148773193359375
] |
530c2b26c14debda4f61842a98a1395f165d2887 | Wordpress Stackexchange
Q: How can I load a page template from a plugin? I want to add page templates to a theme directly from the plugin. The idea is that the template would show up in the dropdown under Page Attributes, and all the code would need to be in the plugin.
Any tips on how to achieve that ?
A: This is a combination of the above answer and the above comments which ended up working for me.
The function to add the plugin to the list of available templates:
function wpse255804_add_page_template ($templates) {
$templates['my-custom-template.php'] = 'My Template';
return $templates;
}
add_filter ('theme_page_templates', 'wpse255804_add_page_template');
The function to point the template to the appropriate directory within the plugin:
function wpse255804_redirect_page_template ($template) {
$post = get_post();
$page_template = get_post_meta( $post->ID, '_wp_page_template', true );
if ('my-custom-template.php' == basename ($page_template))
$template = WP_PLUGIN_DIR . '/mypluginname/my-custom-template.php';
return $template;
}
add_filter ('page_template', 'wpse255804_redirect_page_template');
| Q: How can I load a page template from a plugin? I want to add page templates to a theme directly from the plugin. The idea is that the template would show up in the dropdown under Page Attributes, and all the code would need to be in the plugin.
Any tips on how to achieve that ?
A: This is a combination of the above answer and the above comments which ended up working for me.
The function to add the plugin to the list of available templates:
function wpse255804_add_page_template ($templates) {
$templates['my-custom-template.php'] = 'My Template';
return $templates;
}
add_filter ('theme_page_templates', 'wpse255804_add_page_template');
The function to point the template to the appropriate directory within the plugin:
function wpse255804_redirect_page_template ($template) {
$post = get_post();
$page_template = get_post_meta( $post->ID, '_wp_page_template', true );
if ('my-custom-template.php' == basename ($page_template))
$template = WP_PLUGIN_DIR . '/mypluginname/my-custom-template.php';
return $template;
}
add_filter ('page_template', 'wpse255804_redirect_page_template');
A: You can use the theme_page_templates filter to add templates to the dropdown list of page templates like this:
function wpse255804_add_page_template ($templates) {
$templates['my-custom-template.php'] = 'My Template';
return $templates;
}
add_filter ('theme_page_templates', 'wpse255804_add_page_template');
Now WP will be searching for my-custom-template.php in the theme directory, so you will have to redirect that to your plugin directory by using the page_template filter like this:
function wpse255804_redirect_page_template ($template) {
if ('my-custom-template.php' == basename ($template))
$template = WP_PLUGIN_DIR . '/mypluginname/my-custom-template.php';
return $template;
}
add_filter ('page_template', 'wpse255804_redirect_page_template');
Read more about this here: Add custom template page programmatically
A: Thanks for the help. I changed the code a little to work with the current WordPress version. Also changed it to support more than one custom template.
I bet there is a better way of doing this but it worked for me.
/**
* Load Template with Plugin
*/
function yourname_add_page_template ($templates) {
$templates['page-one.php'] = 'title here One';
$templates['page-two.php'] = 'title here Two';
$templates['page-three.php'] = 'title here Three';
return $templates;
}
add_filter ('theme_page_templates', 'yourname_add_page_template');
function yourname_redirect_page_template ($template) {
$post = get_post();
$page_template = get_post_meta( $post->ID, '_wp_page_template', true );
if ('page-one.php' == basename ($page_template)) {
$template = WP_PLUGIN_DIR . '/pluginname/templates/page-one.php';
return $template;
}
elseif ('page-two.php' == basename ($page_template)) {
$template = WP_PLUGIN_DIR . '/pluginname/templates/page-two.php';
return $template;
}
elseif ('page-three.php' == basename ($page_template)) {
$template = WP_PLUGIN_DIR . '/pluginname/templates/page-three.php';
return $template;
}
}
add_filter ('page_template', 'yourname_redirect_page_template');
A: From the codex:
<?php
$templates = get_page_templates();
foreach ( $templates as $template_name => $template_filename ) {
echo "$template_name ($template_filename)<br />";
}
?>
You get then use the current templates and programmatically add them to whatever you wish.
A: The below code snippet is very well thought out, it will try to look for a template in the plugin and if it can't find it there it will try to get it from the theme.
define( 'MY_PLUGIN_DIR', plugin_dir_path( __FILE __ ) );
define( 'MY_PLUGIN_TEMPLATE_DIR', MY_PLUGIN_DIR . '/templates/' );
add_filter( 'template_include', 'ibenic_include_from_plugin', 99 );
function ibenic_include_from_plugin( $template ) {
$new_template = '';
$provided_template_array = explode( '/', $template );
// This will give us archive.php
$new_template = end( $provided_template_array );
// Define single and archive template for custom post type 'portfolio'
if( is_singular('portfolio') ) {
$new_template = 'single-portfolio.php';
}
if( is_post_type_archive( 'portfolio' ) ) {
$new_template = 'archive-portfolio.php';
}
$plugin_template = MY_PLUGIN_TEMPLATE_DIR . $new_template;
if( file_exists( $plugin_template ) ) {
return $plugin_template;
}
return $template;
}
Source: https://www.ibenic.com/include-or-override-wordpress-templates/
A: Here's an update for 2022: Below this code will add a template to the page template list and register it within your plugin files
// ------------register page template to page template lists------------
function register_custom_template_list ($templates) {
// ------------register template display name to file name------------
$templates['my-template.php'] = 'My Template Name';
// ------------return page template list with new addition------------
return $templates;
}
// ------------hook page template to page template lists------------
add_filter('theme_page_templates', 'register_custom_template_list');
// ------------register page template to file------------
function render_custom_template_archive ($template) {
// ------------get currently edited page attributes------------
$post = get_post();
$page_template = get_post_meta( $post->ID, '_wp_page_template', true );
// ------------check if selected template is for custom template------------
if (basename ($page_template) == 'my-template.php'){
// ------------register page template file to page------------
$template = dirname(__DIR__).'/path_to/my-template.php';
// ------------render custom template content template------------
return $template;
} else {
// ------------return selected template if custom template is not selected------------
return $template;
}
}
// ------------hook page template to file------------
add_filter('page_template', 'render_custom_template_archive');
A: Now that WordPress supports using what was traditionally referred to as Page Templates with other post types, it seems like an updated example that works for posts and custom post types as well as pages might be helpful.
/*
Plugin Name: Example Plugin Templates
Plugin URI:
Description: Load page(or post type) templates from a plugin
Version: 0.1
Requires at least: 6.0
Requires PHP: 7
Author: t31os
Author URI:
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
namespace t31os\Plugin;
if( !defined('ABSPATH') )
exit;
class Plugin_Templates {
private $types;
private $args;
private $folder;
private $templates = [
'template-name-1.php' => 'Plugin Template 1'
,'template-name-2.php' => 'Plugin Template 2'
,'template-name-3.php' => 'Plugin Template 3'
];
public function __construct() {
// Hook late so plugins/themes have time to register post types
add_action( 'init', [$this, 'on_init'], 5000 );
}
public function on_init() {
// Filter hooks, because why not!
$this->args = apply_filters( 'my_plugin_template_type_args', [ 'public' => true ] );
$this->folder = apply_filters( 'my_plugin_template_directory', __DIR__ . '/templates/' );
$this->templates = apply_filters( 'my_plugin_template_file_list', $this->templates );
// Set the post types
$this->types = get_post_types( $this->args );
// We don't use page templates with attachments
unset( $this->types['attachment'] );
// Add custom files to template list
add_filter( 'theme_templates', [$this,'add_plugin_templates'], 1000, 4 );
// If page is one of the types
if( isset( $this->types['page'] ) )
add_filter( 'page_template', [$this,'set_plugin_page_template'], 1000, 3 );
// And deal with other post types
add_filter( 'single_template', [$this,'set_plugin_type_template'], 1000, 3 );
}
public function add_plugin_templates( $post_templates, $obj, $post, $post_type ) {
if( !isset( $this->types[$post_type] ) )
return $post_templates;
foreach( $this->templates as $file => $name )
$post_templates[$file] = $name;
return $post_templates;
}
private function is_plugin_template( $file ) {
return (bool) isset( $this->templates[$file] ) && file_exists( $this->folder . $file );
}
public function set_plugin_page_template( $template, $type, $templates ) {
if( !isset( $templates[0] ) )
return $template;
if( $this->is_plugin_template( $templates[0] ) )
return $this->folder . $templates[0];
return $template;
}
public function set_plugin_type_template( $template, $type, $templates ) {
if( !isset( $templates[0] ) || 'single' !== $type )
return $template;
if( $this->is_plugin_template( $templates[0] ) )
return $this->folder . $templates[0];
return $template;
}
// Simple function for debugging / checking values
private function pre( $s ) {
printf( '<pre>%s</pre>', print_r( $s, true ) );
}
}
new Plugin_Templates;
I tried not to be too abstract and keep the logic fairly simple, any problems, add a comment.
A: <?php load_template( $_template_file, $require_once ) ?>
That is from the very 1st google search results for "load template from plugin". Please make an effort to find the answers yourself before asking here.
| wordpress | {
"language": "en",
"length": 1110,
"provenance": "stackexchange_00019.jsonl.gz:472933",
"question_score": "12",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/255804"
} | [
0.04443359375,
-0.00807952880859375,
0.01312255859375,
-0.058837890625,
0.011932373046875,
-0.00534820556640625,
0.0150604248046875,
-0.0110321044921875,
-0.0261688232421875,
0.0016393661499023438,
-0.00405120849609375,
0.005161285400390625,
-0.041015625,
-0.034027099609375,
0.0106964111328125,
-0.041229248046875,
0.035736083984375,
-0.03240966796875,
0.03076171875,
-0.0117645263671875,
0.0202484130859375,
0.01279449462890625,
0.0197296142578125,
0.06610107421875,
0.006938934326171875,
-0.003265380859375,
0.08056640625,
-0.0036716461181640625,
-0.0004048347473144531,
-0.0261688232421875,
0.0137939453125,
-0.0004570484161376953,
0.039825439453125,
0.0093841552734375,
-0.049530029296875,
-0.0406494140625,
0.00029778480529785156,
-0.01088714599609375,
-0.032958984375,
0.02593994140625,
0.01763916015625,
-0.006031036376953125,
-0.006343841552734375,
0.0172882080078125,
-0.0307159423828125,
-0.0307464599609375,
0.04217529296875,
-0.01145172119140625,
-0.019683837890625,
0.0297698974609375,
0.0347900390625,
-0.025604248046875,
0.040496826171875,
-0.0102386474609375,
0.005359649658203125,
-0.0020847320556640625,
-0.033355712890625,
0.01551055908203125,
0.0135040283203125,
0.01824951171875,
-0.01183319091796875,
-0.00042057037353515625,
0.0028514862060546875,
-0.01068115234375,
0.00823211669921875,
0.008209228515625,
-0.01113128662109375,
0.034912109375,
-0.034393310546875,
0.004497528076171875,
-0.005657196044921875,
-0.042022705078125,
-0.01235198974609375,
-0.0213165283203125,
-0.028656005859375,
-0.0217437744140625,
0.043212890625,
-0.027557373046875,
-0.0026645660400390625,
0.00601959228515625,
-0.00274658203125,
-0.010986328125,
0.017059326171875,
-0.035736083984375,
0.003047943115234375,
0.0015325546264648438,
-0.0196990966796875,
-0.004390716552734375,
-0.023101806640625,
-0.004489898681640625,
-0.0218963623046875,
0.0021381378173828125,
0.01032257080078125,
-0.0028057098388671875,
-0.029205322265625,
0.002201080322265625,
-0.004917144775390625,
0.053436279296875,
-0.0138702392578125,
0.04400634765625,
-0.018341064453125,
-0.03277587890625,
0.06573486328125,
-0.0556640625,
-0.00818634033203125,
0.0198822021484375,
-0.0008907318115234375,
0.01271820068359375,
0.0224151611328125,
0.0254058837890625,
0.00922393798828125,
-0.02374267578125,
-0.0156707763671875,
-0.0276947021484375,
-0.0232391357421875,
0.0274810791015625,
-0.02850341796875,
-0.03204345703125,
0.00372314453125,
-0.0165557861328125,
0.002719879150390625,
-0.002597808837890625,
0.039459228515625,
-0.01303863525390625,
-0.00850677490234375,
-0.01442718505859375,
-0.028350830078125,
-0.061004638671875,
-0.007049560546875,
-0.01454925537109375,
-0.01197052001953125,
0.028411865234375,
0.040069580078125,
0.0265655517578125,
-0.012054443359375,
-0.008880615234375,
0.0245208740234375,
-0.02374267578125,
-0.0009236335754394531,
-0.025665283203125,
0.003856658935546875,
0.002964019775390625,
-0.0220184326171875,
-0.030364990234375,
-0.0002073049545288086,
-0.00594329833984375,
0.0100250244140625,
0.03826904296875,
0.007740020751953125,
-0.0231781005859375,
0.0207977294921875,
-0.00966644287109375,
0.01290130615234375,
0.00574493408203125,
0.03961181640625,
-0.031585693359375,
-0.006061553955078125,
-0.021575927734375,
0.0249176025390625,
-0.00832366943359375,
-0.00008571147918701172,
0.0179595947265625,
-0.007358551025390625,
-0.04974365234375,
-0.048583984375,
-0.0416259765625,
-0.0025081634521484375,
0.0014495849609375,
0.0166473388671875,
0.0270233154296875,
0.014190673828125,
-0.018280029296875,
0.007556915283203125,
0.0135345458984375,
-0.002277374267578125,
0.018402099609375,
-0.0021572113037109375,
0.0298309326171875,
0.011962890625,
0.039276123046875,
0.0025482177734375,
-0.03399658203125,
0.053314208984375,
-0.0142669677734375,
-0.0732421875,
0.038665771484375,
-0.0025615692138671875,
0.04083251953125,
0.022430419921875,
0.000988006591796875,
0.03118896484375,
0.0188140869140625,
-0.036376953125,
0.0137481689453125,
0.0013761520385742188,
-0.0299530029296875,
0.004398345947265625,
-0.0027923583984375,
-0.003009796142578125,
0.00833892822265625,
-0.007537841796875,
-0.003734588623046875,
0.0025768280029296875,
0.03167724609375,
-0.0169677734375,
0.003387451171875,
-0.01552581787109375,
0.0133056640625,
0.035797119140625,
0.00670623779296875,
-0.006671905517578125,
-0.0194549560546875,
0.0036640167236328125,
-0.0309295654296875,
-0.050567626953125,
0.0212860107421875,
0.004528045654296875,
0.0036869049072265625,
0.024322509765625,
-0.0006117820739746094,
0.049774169921875,
-0.0253448486328125,
0.0033416748046875,
0.018768310546875,
0.0271453857421875,
0.01055145263671875,
-0.046600341796875,
-0.007080078125,
-0.05767822265625,
0.01922607421875,
-0.098388671875,
0.07891845703125,
-0.0010395050048828125,
0.0208892822265625,
-0.01256561279296875,
0.0028934478759765625,
-0.0091705322265625,
-0.03167724609375,
0.004283905029296875,
0.027191162109375,
0.02227783203125,
0.055633544921875,
-0.00151824951171875,
0.0406494140625,
0.053436279296875,
-0.038421630859375,
-0.00804901123046875,
0.02581787109375,
0.06280517578125,
0.04998779296875,
0.00244140625,
-0.0352783203125,
0.01129150390625,
-0.045257568359375,
0.035308837890625,
0.00616455078125,
-0.01190185546875,
0.01435089111328125,
-0.007198333740234375,
-0.000029027462005615234,
-0.01251983642578125,
0.003749847412109375,
0.00357818603515625,
-0.0053558349609375,
0.042449951171875,
-0.00440216064453125,
-0.000046193599700927734,
-0.0159149169921875,
-0.04840087890625,
0.00980377197265625,
0.038848876953125,
-0.0215911865234375,
0.0023517608642578125,
-0.007415771484375,
0.0015745162963867188,
-0.0003733634948730469,
-0.0628662109375,
0.024383544921875,
0.023468017578125,
-0.0128631591796875,
0.002536773681640625,
0.05560302734375,
-0.03289794921875,
-0.0135345458984375,
-0.0374755859375,
-0.058441162109375,
-0.0023345947265625,
0.0560302734375,
0.0318603515625,
0.015869140625,
0.0243072509765625,
0.03448486328125,
-0.0211639404296875,
0.048614501953125,
0.01322174072265625,
-0.018768310546875,
0.054901123046875,
-0.041778564453125,
0.051361083984375,
-0.0231781005859375,
0.04248046875,
0.054534912109375,
-0.02325439453125,
0.01837158203125,
0.0079803466796875,
0.002899169921875,
0.034423828125,
-0.004291534423828125,
-0.01363372802734375,
-0.0465087890625,
0.0150299072265625,
0.004871368408203125,
0.01194000244140625,
0.035430908203125,
-0.02423095703125,
-0.0550537109375,
-0.022125244140625,
0.0062713623046875,
-0.0660400390625,
-0.0257110595703125,
0.0369873046875,
-0.05609130859375,
-0.0140838623046875,
-0.03271484375,
-0.033782958984375,
-0.01288604736328125,
-0.0155487060546875,
-0.0022106170654296875,
-0.0034999847412109375,
-0.043792724609375,
-0.059112548828125,
-0.08355712890625,
-0.0787353515625,
-0.046142578125,
0.0016965866088867188,
-0.01343536376953125,
0.0015802383422851562,
0.064453125,
0.007110595703125,
-0.06353759765625,
0.001117706298828125,
0.004947662353515625,
-0.01708984375,
0.007045745849609375,
-0.000335693359375,
-0.00768280029296875,
0.04669189453125,
0.0045166015625,
-0.0243377685546875,
0.042938232421875,
-0.0193939208984375,
-0.020660400390625,
-0.04449462890625,
-0.033416748046875,
-0.032470703125,
-0.01544189453125,
0.050628662109375,
-0.039703369140625,
-0.031707763671875,
-0.05670166015625,
-0.042327880859375,
-0.018768310546875,
-0.06396484375,
0.04345703125,
0.046722412109375,
0.006504058837890625,
0.001392364501953125,
0.01441192626953125,
0.00661468505859375,
0.032012939453125,
0.03521728515625,
-0.01224517822265625,
0.01274871826171875,
-0.00799560546875,
0.0014667510986328125,
-0.0282745361328125,
0.0284881591796875,
-0.012725830078125,
0.0008783340454101562,
0.01641845703125,
0.000030338764190673828,
0.0015277862548828125,
-0.007610321044921875,
-0.03094482421875,
-0.0958251953125,
0.06976318359375,
0.01202392578125,
-0.01143646240234375,
-0.034576416015625,
-0.045745849609375,
0.023956298828125,
0.125,
-0.042633056640625,
-0.018096923828125,
-0.0151519775390625,
0.00205230712890625,
0.022491455078125,
-0.02044677734375,
0.0021877288818359375,
-0.03216552734375,
-0.08819580078125,
0.01134490966796875,
-0.022857666015625,
-0.018890380859375,
0.0040740966796875,
0.009307861328125,
-0.032958984375,
-0.043670654296875,
0.0211029052734375,
-0.025970458984375,
0.01116180419921875,
0.029632568359375,
-0.03125,
0.0010404586791992188,
-0.0021648406982421875,
-0.036102294921875,
-0.07220458984375,
-0.006473541259765625,
-0.0084991455078125,
0.05108642578125,
0.021087646484375,
-0.0277252197265625,
-0.03192138671875,
0.0238800048828125,
0.026092529296875,
0.0215911865234375,
0.00038051605224609375,
0.008880615234375,
-0.006000518798828125,
-0.048248291015625,
0.00983428955078125,
-0.042327880859375,
0.00008988380432128906,
-0.00772857666015625,
-0.0204010009765625,
0.022674560546875,
-0.03271484375,
0.006134033203125,
0.01358795166015625,
-0.037109375,
-0.00795745849609375,
-0.0087127685546875,
0.00785064697265625,
0.01061248779296875,
-0.005382537841796875,
-0.0113372802734375,
0.00780487060546875,
-0.0240478515625,
0.041290283203125,
0.0195159912109375,
-0.01428985595703125,
0.01190948486328125,
0.059783935546875,
0.026947021484375,
-0.0394287109375,
-0.041961669921875,
0.02783203125,
0.0225067138671875,
0.014862060546875,
0.05859375,
0.0185089111328125,
-0.01094818115234375,
0.053314208984375,
0.0004858970642089844,
0.00286865234375,
-0.0274810791015625,
0.05755615234375,
-0.0202178955078125,
-0.049896240234375,
0.052093505859375,
-0.0259857177734375,
0.0010242462158203125,
0.045440673828125,
-0.01316070556640625,
-0.046356201171875,
0.0043487548828125,
0.050384521484375,
-0.0243377685546875,
0.03765869140625,
-0.034820556640625,
-0.0269317626953125,
0.0012674331665039062,
0.01270294189453125,
0.0177001953125,
0.040679931640625,
-0.017364501953125,
0.0157470703125,
-0.01401519775390625,
0.0010194778442382812,
0.05352783203125,
0.0223541259765625,
0.01007080078125,
0.0292816162109375,
0.0278472900390625,
-0.011749267578125,
0.0166015625,
0.0021724700927734375,
0.0274505615234375,
-0.00846099853515625,
-0.0151214599609375,
-0.0579833984375,
-0.01383209228515625,
0.01319122314453125,
-0.005908966064453125,
-0.0013723373413085938,
0.0693359375,
0.0430908203125,
-0.04534912109375,
-0.01494598388671875,
-0.0264739990234375,
-0.001544952392578125,
-0.0855712890625,
-0.0006542205810546875,
0.0105133056640625,
-0.0205535888671875,
0.006053924560546875,
0.047637939453125,
0.0027446746826171875,
0.00714874267578125,
-0.002628326416015625,
0.0155487060546875,
0.003078460693359375,
0.0239105224609375,
0.021575927734375,
-0.0063934326171875,
-0.004638671875,
-0.003925323486328125,
-0.00482940673828125,
-0.034881591796875,
-0.00751495361328125,
-0.01317596435546875,
0.04168701171875,
-0.049041748046875,
-0.035247802734375,
0.0626220703125,
-0.0276336669921875,
0.005626678466796875,
0.022186279296875,
-0.0004916191101074219,
-0.04638671875,
-0.0267181396484375,
0.015228271484375,
0.041412353515625,
-0.0185089111328125,
-0.005130767822265625,
0.025909423828125,
-0.0100555419921875,
0.0249481201171875,
0.0267333984375,
-0.01187896728515625,
-0.01666259765625,
-0.02960205078125,
-0.025360107421875,
-0.010711669921875,
0.0077362060546875,
-0.07171630859375,
-0.0213165283203125,
-0.0203704833984375,
-0.0116424560546875,
0.03887939453125,
-0.04449462890625,
0.037109375,
0.0005879402160644531,
-0.01134490966796875,
-0.0077667236328125,
0.0281982421875,
0.032257080078125,
0.0260009765625,
-0.058013916015625,
-0.012359619140625,
-0.04119873046875,
-0.0240936279296875,
-0.033935546875,
-0.029327392578125,
-0.05267333984375,
0.0131988525390625,
-0.004901885986328125,
0.0234527587890625,
-0.002201080322265625,
-0.0009140968322753906,
-0.00894927978515625,
0.004810333251953125,
-0.0120391845703125,
0.0312042236328125,
0.0218658447265625,
0.09490966796875,
-0.0307464599609375,
0.05938720703125,
0.0216217041015625,
0.033843994140625,
-0.0274810791015625,
-0.01910400390625,
0.010009765625,
-0.03411865234375,
-0.01226043701171875,
-0.0155181884765625,
-0.04144287109375,
0.043121337890625,
0.0811767578125,
0.0112457275390625,
-0.004421234130859375,
-0.0255279541015625,
-0.0023956298828125,
-0.0099334716796875,
0.03778076171875,
0.004398345947265625,
-0.033477783203125,
0.049285888671875,
-0.0146636962890625,
-0.0258941650390625,
0.01079559326171875,
0.003177642822265625,
0.01390838623046875,
0.0156402587890625,
0.0022602081298828125,
-0.034698486328125,
-0.0753173828125,
0.10247802734375,
0.060943603515625,
0.0229644775390625,
0.042449951171875,
-0.00662994384765625,
0.0092010498046875,
-0.0218048095703125,
0.04345703125,
-0.010955810546875,
-0.0275421142578125,
0.058197021484375,
0.01397705078125,
-0.047607421875,
0.0275726318359375,
-0.03472900390625,
0.0158843994140625,
0.040924072265625,
0.030975341796875,
-0.07769775390625,
0.01448822021484375,
-0.000946044921875,
0.01556396484375,
0.041351318359375,
-0.01261138916015625,
-0.00876617431640625,
-0.0196075439453125,
0.03387451171875,
0.011932373046875,
-0.01242828369140625,
0.018768310546875,
0.0295257568359375,
-0.028106689453125,
-0.01525115966796875,
0.035430908203125,
0.01206207275390625,
-0.0202789306640625,
0.03326416015625,
-0.01020050048828125,
0.007843017578125,
-0.004962921142578125,
0.030059814453125,
-0.0072479248046875,
0.0023975372314453125,
-0.0018863677978515625,
0.06317138671875,
-0.032806396484375,
0.003154754638671875,
0.0712890625,
0.00797271728515625,
0.0246429443359375,
0.056610107421875,
0.0019140243530273438,
0.03204345703125,
0.0270233154296875,
-0.0007238388061523438,
0.01334381103515625,
-0.03369140625,
-0.00997161865234375,
-0.00804901123046875,
-0.040802001953125,
0.00725555419921875,
-0.010223388671875,
-0.0298919677734375,
-0.0186309814453125,
0.0120697021484375,
0.114990234375,
0.0142974853515625,
-0.053070068359375,
0.01934814453125,
0.00487518310546875,
-0.035369873046875,
-0.0001430511474609375,
0.02337646484375,
-0.019317626953125,
-0.0012617111206054688,
0.01056671142578125,
-0.01177215576171875,
-0.0257568359375,
-0.003314971923828125,
-0.09320068359375,
0.1231689453125,
0.0083770751953125,
0.057769775390625,
0.01233673095703125,
0.03564453125,
-0.055450439453125,
-0.00540924072265625,
-0.005702972412109375,
0.0479736328125,
0.030059814453125,
0.031585693359375,
-0.00714874267578125,
-0.0023059844970703125,
0.012939453125,
0.05621337890625,
0.0455322265625,
0.0110931396484375,
-0.0149993896484375,
0.0124664306640625,
0.057708740234375,
0.0022525787353515625,
-0.0106658935546875,
0.03521728515625,
-0.0007519721984863281,
0.01103973388671875,
-0.002895355224609375,
-0.051361083984375,
0.0179595947265625,
-0.0400390625,
-0.00612640380859375,
0.0114288330078125,
0.0017299652099609375,
-0.0011053085327148438,
-0.01366424560546875,
-0.035675048828125,
-0.032318115234375,
-0.00516510009765625,
0.00830078125,
-0.001922607421875,
0.0047607421875,
-0.0012617111206054688,
-0.01373291015625,
-0.02777099609375,
-0.039276123046875,
-0.01390838623046875,
0.0181427001953125,
-0.0049591064453125,
0.00847625732421875,
-0.0031108856201171875,
0.0127105712890625,
-0.01175689697265625,
-0.03369140625,
-0.0038661956787109375,
0.024658203125,
-0.0273284912109375,
0.07672119140625,
-0.00972747802734375,
0.0038661956787109375,
-0.065185546875,
0.0280914306640625,
0.01021575927734375,
0.053131103515625,
-0.052459716796875,
-0.0277557373046875,
0.00626373291015625,
0.004230499267578125,
-0.004150390625,
-0.004978179931640625,
0.01212310791015625,
-0.006439208984375,
0.01129150390625,
-0.0225372314453125,
-0.0289306640625,
0.007061004638671875,
-0.0007109642028808594,
-0.01552581787109375,
-0.035400390625,
0.039459228515625,
0.0107574462890625,
-0.0312347412109375,
0.0200347900390625,
0.031341552734375,
0.049774169921875,
-0.0158843994140625,
0.054534912109375,
-0.0168609619140625,
-0.0167236328125,
-0.0061492919921875,
0.02081298828125,
-0.0113677978515625,
0.0056304931640625,
-0.005634307861328125,
-0.026580810546875,
-0.01004791259765625,
0.02423095703125,
0.004207611083984375,
-0.013427734375,
-0.0035228729248046875,
-0.0209197998046875,
-0.01306915283203125,
-0.0159759521484375,
-0.02886962890625,
-0.033782958984375,
0.0209197998046875,
-0.030029296875,
0.007293701171875,
-0.0153961181640625,
-0.0406494140625,
0.01019287109375,
-0.0226898193359375,
0.037933349609375,
-0.0188140869140625,
0.042694091796875,
-0.0095977783203125,
-0.022979736328125,
0.0589599609375,
-0.026092529296875,
0.07611083984375,
0.00893402099609375,
-0.08978271484375,
-0.005237579345703125,
-0.058074951171875,
-0.038604736328125,
0.043304443359375,
0.0609130859375,
-0.028106689453125,
0.031646728515625,
0.017486572265625,
-0.00010371208190917969,
0.020538330078125,
-0.034454345703125,
0.0287017822265625,
0.0128326416015625,
0.0159454345703125,
0.01381683349609375,
-0.04791259765625,
-0.03076171875,
-0.032135009765625,
0.049652099609375,
0.0086822509765625,
0.09906005859375,
-0.049774169921875,
0.02081298828125,
0.0003693103790283203,
0.01085662841796875,
-0.00904083251953125,
-0.01297760009765625,
0.06488037109375,
0.0216827392578125,
-0.0181884765625,
-0.0265655517578125,
-0.046142578125,
0.0254364013671875,
0.02471923828125,
-0.00827789306640625,
-0.0084075927734375,
0.019256591796875,
0.01511383056640625,
0.0174102783203125,
0.050201416015625,
-0.007904052734375,
-0.027252197265625,
-0.05108642578125,
-0.010009765625,
0.037628173828125,
0.054656982421875,
-0.002933502197265625,
0.059173583984375,
-0.017242431640625,
-0.0279388427734375,
0.0157623291015625,
-0.053466796875,
0.007843017578125,
0.026092529296875,
-0.0009050369262695312,
-0.04620361328125,
0.02801513671875,
-0.012298583984375,
0.006198883056640625,
-0.0028743743896484375,
0.0706787109375,
0.00942230224609375,
-0.0312347412109375,
0.012939453125,
-0.050567626953125,
0.0024433135986328125,
-0.043701171875,
-0.0159759521484375,
0.0022068023681640625,
0.0183258056640625,
-0.01849365234375,
-0.06463623046875,
-0.034912109375,
-0.061676025390625,
0.00968170166015625,
0.03302001953125,
-0.018341064453125,
-0.023162841796875,
-0.055511474609375,
-0.0005011558532714844,
0.02496337890625,
-0.0020503997802734375,
-0.0421142578125,
-0.007656097412109375,
-0.0245819091796875,
0.05572509765625,
-0.0067596435546875,
-0.00670623779296875,
0.0279693603515625,
0.0482177734375,
-0.01666259765625,
0.026824951171875,
-0.0024013519287109375,
-0.01885986328125,
0.0117340087890625,
-0.0022296905517578125,
0.040679931640625,
-0.0037746429443359375,
-0.0078582763671875,
0.03448486328125,
-0.027496337890625,
0.10113525390625,
-0.053131103515625,
-0.010223388671875,
0.07208251953125,
-0.030975341796875,
-0.01058197021484375,
-0.050933837890625,
-0.022918701171875,
-0.01528167724609375,
0.02783203125,
-0.0126190185546875,
-0.00614166259765625,
-0.001323699951171875,
-0.05596923828125,
-0.0809326171875,
0.0462646484375,
-0.012054443359375,
-0.03619384765625,
-0.039886474609375,
0.044952392578125,
0.00768280029296875,
-0.02606201171875,
-0.00569915771484375,
-0.03729248046875,
0.0008521080017089844,
0.02947998046875,
0.01325225830078125,
0.007602691650390625,
0.0404052734375,
0.0022144317626953125,
-0.048309326171875,
-0.006809234619140625,
-0.01470947265625,
-0.025726318359375,
-0.003490447998046875,
-0.036895751953125,
0.0323486328125,
0.029571533203125,
-0.0291748046875,
-0.037445068359375,
0.021820068359375,
0.0015468597412109375,
-0.01421356201171875,
-0.03680419921875,
0.016510009765625,
0.01214599609375,
0.06903076171875,
-0.0082855224609375,
0.0155181884765625,
-0.0325927734375,
-0.0078582763671875,
-0.022308349609375,
-0.0660400390625,
0.0105743408203125,
0.045806884765625,
-0.0615234375,
0.00563812255859375,
0.0273590087890625,
-0.015625,
0.0191497802734375,
-0.01407623291015625,
-0.0158843994140625,
-0.001148223876953125,
-0.004009246826171875,
0.005496978759765625,
-0.04254150390625,
0.00606536865234375,
0.08001708984375,
-0.04827880859375,
0.0038967132568359375,
-0.0015668869018554688,
0.0230712890625,
0.012939453125,
-0.0626220703125,
-0.00762939453125,
0.059539794921875,
-0.054595947265625,
-0.0101776123046875,
0.0091094970703125,
0.0201416015625,
-0.0226593017578125,
0.01227569580078125,
-0.0025920867919921875,
0.04345703125,
-0.0190582275390625,
0.0287933349609375,
-0.0194244384765625,
0.064208984375,
-0.0167694091796875,
0.1075439453125,
-0.00897216796875,
0.006473541259765625,
-0.01030731201171875,
0.021820068359375,
-0.0171966552734375,
-0.005580902099609375,
-0.00047850608825683594,
-0.01641845703125,
-0.0072784423828125,
0.004673004150390625,
-0.00902557373046875,
-0.0239105224609375,
0.0286407470703125,
-0.045684814453125,
0.00160980224609375,
0.010650634765625
] |
40b4c574415d57093ba5a2648eb1c4cd56b75e1d | Wordpress Stackexchange
Q: Export navigation menu I want to export all navigation menu's from one site and import the menu's in another site.
I have tried to export the tables:
*
*wp_posts
*wp_postmeta
*wp_terms
*wp_termmeta
*wp_term_relationships
And import them in another database. This does not seem to work.
Can someone point me in the right direction?
A: WordPress has an Import/Export tool, but it doesn't works with nav menus only, the "All Content" option will export the menus too, but with everything else that is in your site (including posts/pages in the trash) you can try this plugin so the Menu option shows in the Export page.
| Q: Export navigation menu I want to export all navigation menu's from one site and import the menu's in another site.
I have tried to export the tables:
*
*wp_posts
*wp_postmeta
*wp_terms
*wp_termmeta
*wp_term_relationships
And import them in another database. This does not seem to work.
Can someone point me in the right direction?
A: WordPress has an Import/Export tool, but it doesn't works with nav menus only, the "All Content" option will export the menus too, but with everything else that is in your site (including posts/pages in the trash) you can try this plugin so the Menu option shows in the Export page.
A: You can use the tool from this site, https://caskispace.com/wp-export-file-parser/
It's not perfect but it does the job and can save a lot of time and effort. If it wasn't able to get the URL for a particular menu item it says so so you can update manually. As for the menu structure and everything it works really well.
| wordpress | {
"language": "en",
"length": 164,
"provenance": "stackexchange_00019.jsonl.gz:472970",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/255939"
} | [
0.03802490234375,
-0.01287841796875,
0.043731689453125,
0.06597900390625,
0.001644134521484375,
-0.047393798828125,
0.121337890625,
-0.06939697265625,
0.02459716796875,
0.01519775390625,
-0.0256195068359375,
-0.004573822021484375,
-0.046295166015625,
-0.0137939453125,
-0.0399169921875,
-0.047637939453125,
0.022186279296875,
-0.00104522705078125,
0.0137176513671875,
-0.004329681396484375,
-0.0019550323486328125,
0.01016998291015625,
0.00521087646484375,
0.0077056884765625,
0.050384521484375,
-0.002716064453125,
-0.052734375,
0.0010986328125,
0.0128631591796875,
0.0083160400390625,
0.0206756591796875,
-0.01541900634765625,
-0.01071929931640625,
0.007659912109375,
0.02740478515625,
-0.040557861328125,
-0.0230712890625,
0.023040771484375,
0.0174560546875,
-0.00818634033203125,
0.003810882568359375,
-0.005096435546875,
0.0287933349609375,
0.0072784423828125,
-0.00672149658203125,
-0.0311279296875,
0.01312255859375,
-0.05859375,
-0.00853729248046875,
-0.0135040283203125,
0.0139007568359375,
-0.00044989585876464844,
0.038421630859375,
0.022918701171875,
-0.025543212890625,
-0.043365478515625,
-0.0208282470703125,
-0.0104827880859375,
0.040740966796875,
0.027130126953125,
-0.0164642333984375,
-0.02508544921875,
0.00788116455078125,
-0.03662109375,
-0.0018558502197265625,
0.0170745849609375,
0.0198516845703125,
-0.004241943359375,
-0.06549072265625,
-0.0020961761474609375,
0.038970947265625,
-0.0477294921875,
-0.0018558502197265625,
0.0172576904296875,
-0.03131103515625,
-0.027252197265625,
0.03387451171875,
-0.0032978057861328125,
0.01213836669921875,
0.025299072265625,
-0.0271148681640625,
0.02203369140625,
-0.0927734375,
-0.05438232421875,
0.031524658203125,
-0.0273590087890625,
-0.01221466064453125,
-0.0015840530395507812,
-0.00585174560546875,
-0.0131378173828125,
0.005504608154296875,
0.01239776611328125,
-0.0716552734375,
0.052337646484375,
0.0267791748046875,
-0.033050537109375,
-0.0031280517578125,
0.02374267578125,
0.003284454345703125,
0.049041748046875,
0.01068115234375,
-0.0423583984375,
0.06719970703125,
-0.048980712890625,
0.01169586181640625,
0.03240966796875,
-0.004085540771484375,
-0.0224151611328125,
0.043975830078125,
0.02203369140625,
-0.01183319091796875,
0.056243896484375,
0.0190582275390625,
-0.00914764404296875,
-0.0014638900756835938,
-0.0081329345703125,
-0.00634002685546875,
0.02740478515625,
-0.00031113624572753906,
0.01399993896484375,
-0.0234222412109375,
0.001995086669921875,
-0.06591796875,
0.03204345703125,
-0.036376953125,
-0.033935546875,
0.0223541259765625,
0.037109375,
-0.0224609375,
0.04632568359375,
-0.01373291015625,
-0.0136566162109375,
0.0260009765625,
0.032073974609375,
-0.00530242919921875,
-0.0189971923828125,
-0.0026493072509765625,
-0.03082275390625,
-0.0213470458984375,
0.021575927734375,
0.004669189453125,
-0.0166778564453125,
-0.0185394287109375,
-0.011444091796875,
-0.0207672119140625,
-0.01690673828125,
0.0173797607421875,
0.033294677734375,
-0.009857177734375,
-0.02410888671875,
-0.0086669921875,
0.028594970703125,
0.0268096923828125,
-0.006114959716796875,
-0.0007596015930175781,
-0.06719970703125,
0.008392333984375,
-0.045562744140625,
0.03167724609375,
-0.050140380859375,
-0.03131103515625,
-0.00904083251953125,
0.052154541015625,
-0.036376953125,
-0.0279693603515625,
-0.002658843994140625,
-0.056427001953125,
-0.01019287109375,
0.0276336669921875,
0.04443359375,
-0.04150390625,
-0.048858642578125,
0.0078582763671875,
0.0189666748046875,
-0.0196990966796875,
0.058135986328125,
-0.0204620361328125,
-0.0701904296875,
0.038482666015625,
0.04840087890625,
-0.004852294921875,
-0.005218505859375,
-0.007068634033203125,
0.013885498046875,
-0.036224365234375,
-0.00022494792938232422,
0.01190185546875,
0.052032470703125,
0.027557373046875,
0.0259857177734375,
0.00804901123046875,
-0.02862548828125,
-0.0191650390625,
-0.0225830078125,
-0.016754150390625,
0.0094146728515625,
0.01190185546875,
0.025909423828125,
-0.0137481689453125,
0.01369476318359375,
-0.0236053466796875,
0.0123291015625,
-0.01873779296875,
0.0059814453125,
-0.05059814453125,
-0.00836181640625,
-0.01519012451171875,
0.03448486328125,
0.0175933837890625,
0.0238494873046875,
0.0130767822265625,
0.0231170654296875,
-0.0245208740234375,
-0.0212554931640625,
-0.027740478515625,
0.022430419921875,
-0.0068206787109375,
-0.0165863037109375,
-0.0133514404296875,
-0.0255889892578125,
-0.0123291015625,
0.00572967529296875,
-0.03192138671875,
0.035552978515625,
-0.00832366943359375,
-0.01230621337890625,
-0.0279998779296875,
-0.0156707763671875,
-0.0270843505859375,
-0.0247039794921875,
0.020111083984375,
0.06329345703125,
0.0303497314453125,
0.05413818359375,
-0.0031185150146484375,
0.0067138671875,
0.0263519287109375,
-0.0209503173828125,
0.0142059326171875,
0.0223541259765625,
0.038787841796875,
0.0208282470703125,
-0.02386474609375,
-0.0308380126953125,
0.055267333984375,
-0.05706787109375,
-0.0026721954345703125,
-0.00791168212890625,
-0.018585205078125,
0.01229095458984375,
0.01506805419921875,
0.0198516845703125,
0.007289886474609375,
-0.0020294189453125,
0.0005602836608886719,
0.041778564453125,
-0.035064697265625,
-0.007678985595703125,
-0.0034923553466796875,
-0.01464080810546875,
0.01065826416015625,
-0.0014219284057617188,
0.010528564453125,
-0.0105743408203125,
-0.0088653564453125,
0.016021728515625,
0.01108551025390625,
0.0028514862060546875,
-0.023834228515625,
0.002841949462890625,
0.033447265625,
0.0171661376953125,
0.011383056640625,
0.0301513671875,
0.02349853515625,
0.06451416015625,
-0.022308349609375,
-0.03094482421875,
0.00917816162109375,
0.04736328125,
-0.0063629150390625,
0.01165008544921875,
0.05938720703125,
-0.0123291015625,
0.0057220458984375,
-0.037872314453125,
0.04058837890625,
-0.041900634765625,
-0.04998779296875,
-0.006755828857421875,
0.0321044921875,
0.0146942138671875,
-0.010589599609375,
-0.0189971923828125,
-0.017852783203125,
0.0081024169921875,
0.0806884765625,
-0.01474761962890625,
0.00679779052734375,
0.004741668701171875,
0.0650634765625,
0.039764404296875,
0.01070404052734375,
-0.0029621124267578125,
-0.018585205078125,
0.016510009765625,
0.0340576171875,
-0.021514892578125,
-0.035400390625,
-0.0458984375,
-0.0281829833984375,
-0.0259552001953125,
-0.005031585693359375,
-0.0148162841796875,
-0.032867431640625,
-0.043426513671875,
-0.048553466796875,
-0.038238525390625,
-0.09747314453125,
-0.045440673828125,
-0.033172607421875,
-0.0260467529296875,
0.046142578125,
0.008148193359375,
0.00652313232421875,
-0.0281829833984375,
0.04364013671875,
0.0295562744140625,
0.05865478515625,
-0.041839599609375,
-0.05792236328125,
-0.0245361328125,
-0.082275390625,
-0.0166015625,
0.01000213623046875,
0.0110015869140625,
0.004180908203125,
0.003253936767578125,
-0.01273345947265625,
-0.04351806640625,
-0.0265350341796875,
0.0518798828125,
-0.0119781494140625,
-0.037139892578125,
-0.00847625732421875,
0.0095062255859375,
-0.034210205078125,
0.00457000732421875,
0.050933837890625,
0.01654052734375,
-0.031463623046875,
-0.003570556640625,
-0.00817108154296875,
0.01727294921875,
0.013214111328125,
-0.0316162109375,
-0.00036406517028808594,
0.035247802734375,
-0.0012998580932617188,
-0.015899658203125,
-0.026123046875,
-0.002758026123046875,
-0.04010009765625,
0.01666259765625,
0.007144927978515625,
-0.006649017333984375,
0.0005555152893066406,
0.00528717041015625,
0.033782958984375,
0.031341552734375,
0.0113983154296875,
0.0263671875,
-0.051971435546875,
-0.024627685546875,
-0.0180206298828125,
-0.01148223876953125,
0.030120849609375,
-0.019439697265625,
0.03326416015625,
0.019439697265625,
0.00551605224609375,
0.0019359588623046875,
-0.0078582763671875,
-0.0061492919921875,
-0.06524658203125,
0.04083251953125,
-0.036468505859375,
-0.000046372413635253906,
-0.0286102294921875,
-0.0186767578125,
0.00540924072265625,
0.09649658203125,
-0.03857421875,
-0.0162353515625,
-0.007762908935546875,
0.006946563720703125,
0.02667236328125,
-0.025390625,
-0.01549530029296875,
-0.0274200439453125,
-0.0528564453125,
-0.00140380859375,
-0.0170440673828125,
-0.028564453125,
0.01497650146484375,
-0.0670166015625,
-0.01021575927734375,
-0.057159423828125,
0.034912109375,
0.010650634765625,
-0.0003604888916015625,
-0.004100799560546875,
-0.0157012939453125,
-0.035888671875,
-0.01739501953125,
0.00913238525390625,
-0.07550048828125,
-0.0012216567993164062,
-0.04022216796875,
0.060760498046875,
0.0175933837890625,
-0.000560760498046875,
-0.012664794921875,
0.040985107421875,
-0.0112762451171875,
0.034576416015625,
-0.0172271728515625,
0.0177001953125,
-0.010101318359375,
-0.01529693603515625,
0.00029921531677246094,
-0.035247802734375,
-0.027679443359375,
-0.051788330078125,
-0.060577392578125,
-0.00980377197265625,
-0.0007381439208984375,
0.0419921875,
0.008880615234375,
-0.0073089599609375,
-0.043975830078125,
-0.01490020751953125,
-0.01197052001953125,
-0.006725311279296875,
0.0167388916015625,
-0.039642333984375,
0.001842498779296875,
-0.05303955078125,
-0.0124969482421875,
-0.0004296302795410156,
-0.034423828125,
0.02508544921875,
0.00006377696990966797,
0.01568603515625,
-0.0009860992431640625,
-0.0489501953125,
-0.005100250244140625,
0.0194244384765625,
-0.005802154541015625,
0.044952392578125,
0.02117919921875,
-0.00466156005859375,
0.0394287109375,
-0.00157928466796875,
0.0237274169921875,
-0.06378173828125,
0.032073974609375,
0.0032672882080078125,
0.026580810546875,
-0.006397247314453125,
0.006893157958984375,
0.039825439453125,
0.045928955078125,
0.01300048828125,
-0.04229736328125,
-0.044189453125,
0.06878662109375,
0.043121337890625,
-0.05517578125,
-0.091552734375,
0.0148468017578125,
-0.01617431640625,
0.005950927734375,
0.05328369140625,
0.03948974609375,
-0.00293731689453125,
0.006549835205078125,
0.0243988037109375,
0.004795074462890625,
0.007221221923828125,
0.008758544921875,
-0.00731658935546875,
0.0262603759765625,
0.016082763671875,
-0.00455474853515625,
-0.0084381103515625,
-0.0137939453125,
0.049072265625,
0.022430419921875,
-0.0509033203125,
-0.025299072265625,
0.00441741943359375,
0.04425048828125,
-0.0150909423828125,
0.007244110107421875,
0.0266876220703125,
0.004497528076171875,
-0.022613525390625,
-0.01910400390625,
-0.018157958984375,
-0.01505279541015625,
-0.046966552734375,
0.00426483154296875,
-0.0018720626831054688,
-0.00183868408203125,
0.027923583984375,
0.03814697265625,
-0.07232666015625,
0.05975341796875,
0.005649566650390625,
-0.00556182861328125,
-0.015716552734375,
0.05255126953125,
0.0224456787109375,
-0.034454345703125,
0.0260162353515625,
0.00736236572265625,
0.0212249755859375,
-0.043304443359375,
0.0206146240234375,
0.0118255615234375,
0.04022216796875,
0.0299072265625,
-0.0220184326171875,
0.007030487060546875,
-0.025970458984375,
-0.0012464523315429688,
0.06390380859375,
-0.02642822265625,
-0.075439453125,
-0.034423828125,
-0.0016279220581054688,
0.033111572265625,
-0.046722412109375,
-0.0006985664367675781,
-0.0034332275390625,
0.005340576171875,
-0.0235443115234375,
0.0177459716796875,
-0.048797607421875,
-0.015533447265625,
0.004924774169921875,
-0.016815185546875,
-0.0238037109375,
0.03424072265625,
-0.055694580078125,
0.0023956298828125,
-0.033050537109375,
-0.0217437744140625,
0.06195068359375,
0.01265716552734375,
0.0020275115966796875,
-0.02716064453125,
-0.01448822021484375,
-0.0369873046875,
-0.01439666748046875,
0.05712890625,
0.00614166259765625,
0.002468109130859375,
-0.0252838134765625,
-0.005828857421875,
-0.01239013671875,
0.046905517578125,
-0.01375579833984375,
-0.0183258056640625,
-0.044097900390625,
0.015899658203125,
0.00577545166015625,
0.040130615234375,
0.0128631591796875,
-0.01003265380859375,
-0.0104522705078125,
0.0064239501953125,
-0.0350341796875,
-0.0159149169921875,
0.10504150390625,
-0.0282745361328125,
0.057342529296875,
0.00179290771484375,
0.048980712890625,
-0.047393798828125,
0.00811004638671875,
-0.0032901763916015625,
-0.0171051025390625,
-0.0203399658203125,
-0.005550384521484375,
0.014984130859375,
0.034423828125,
0.037811279296875,
-0.00441741943359375,
0.031951904296875,
-0.03790283203125,
0.00940704345703125,
-0.0252227783203125,
0.017547607421875,
-0.05859375,
-0.0308837890625,
0.053924560546875,
-0.00441741943359375,
0.04302978515625,
-0.01305389404296875,
-0.004894256591796875,
0.0214385986328125,
-0.0184478759765625,
0.0215911865234375,
0.00202178955078125,
-0.0208740234375,
0.020904541015625,
0.046112060546875,
-0.014739990234375,
0.0294647216796875,
-0.0027751922607421875,
0.00350189208984375,
0.031707763671875,
-0.0163726806640625,
0.0311737060546875,
0.048431396484375,
-0.002593994140625,
-0.04742431640625,
0.0092926025390625,
-0.044189453125,
-0.021331787109375,
0.010955810546875,
0.04425048828125,
0.0528564453125,
-0.07427978515625,
0.011962890625,
0.0345458984375,
-0.0071868896484375,
-0.0027294158935546875,
0.00809478759765625,
-0.0250244140625,
-0.05963134765625,
-0.0206146240234375,
0.043304443359375,
-0.010498046875,
-0.01110076904296875,
0.03155517578125,
-0.00493621826171875,
-0.01062774658203125,
0.03192138671875,
0.003986358642578125,
-0.0285491943359375,
-0.0125732421875,
0.0119781494140625,
-0.00942230224609375,
-0.05047607421875,
0.0124359130859375,
0.01227569580078125,
0.0168914794921875,
-0.0124359130859375,
0.10223388671875,
-0.03582763671875,
0.057281494140625,
-0.0225677490234375,
0.007610321044921875,
0.0118560791015625,
0.0301666259765625,
-0.026641845703125,
0.02197265625,
-0.0014696121215820312,
0.0361328125,
0.01357269287109375,
0.003772735595703125,
0.01142120361328125,
0.0063018798828125,
0.005401611328125,
0.00391387939453125,
-0.006107330322265625,
-0.0218048095703125,
-0.02734375,
-0.04644775390625,
0.09698486328125,
-0.04962158203125,
-0.01416778564453125,
-0.00489044189453125,
0.0095672607421875,
0.0082550048828125,
0.0036029815673828125,
0.06585693359375,
-0.033599853515625,
0.0024871826171875,
0.0224151611328125,
0.01556396484375,
-0.046295166015625,
-0.001781463623046875,
-0.054718017578125,
0.08770751953125,
-0.00023877620697021484,
0.00363922119140625,
-0.0008559226989746094,
0.041229248046875,
-0.0121307373046875,
0.02923583984375,
-0.035003662109375,
0.082763671875,
0.0704345703125,
0.00298309326171875,
-0.028717041015625,
-0.023223876953125,
-0.0017805099487304688,
0.0259552001953125,
-0.03448486328125,
-0.0065765380859375,
-0.032135009765625,
0.00577545166015625,
0.041900634765625,
0.032073974609375,
0.03448486328125,
0.030853271484375,
-0.0121002197265625,
-0.047943115234375,
0.042449951171875,
-0.0169830322265625,
0.016204833984375,
-0.004711151123046875,
0.0183868408203125,
-0.0209808349609375,
-0.00409698486328125,
-0.004245758056640625,
-0.0138397216796875,
-0.04205322265625,
0.013031005859375,
-0.004848480224609375,
-0.043243408203125,
0.0307464599609375,
0.0169677734375,
-0.029449462890625,
-0.0191802978515625,
-0.049346923828125,
0.031890869140625,
-0.02386474609375,
0.0243988037109375,
-0.0085296630859375,
0.00864410400390625,
0.0294036865234375,
0.0279693603515625,
0.032257080078125,
-0.01551055908203125,
-0.0008287429809570312,
0.00354766845703125,
-0.0119476318359375,
0.0440673828125,
0.01534271240234375,
0.04571533203125,
-0.038330078125,
-0.06549072265625,
0.0207977294921875,
0.074951171875,
-0.0118255615234375,
-0.0694580078125,
0.0204010009765625,
0.0183258056640625,
-0.002777099609375,
0.0504150390625,
0.034698486328125,
-0.0248565673828125,
0.0640869140625,
-0.0015430450439453125,
0.006622314453125,
0.017242431640625,
-0.005138397216796875,
0.0099945068359375,
0.0560302734375,
-0.0026187896728515625,
0.014892578125,
-0.04571533203125,
0.0391845703125,
0.034942626953125,
0.0372314453125,
-0.025115966796875,
0.052581787109375,
-0.0186614990234375,
-0.0005035400390625,
-0.0121307373046875,
0.0247344970703125,
-0.00913238525390625,
0.0172882080078125,
-0.04168701171875,
-0.038482666015625,
-0.004180908203125,
0.03668212890625,
0.0030002593994140625,
0.036163330078125,
0.072021484375,
0.06298828125,
-0.04412841796875,
-0.0269012451171875,
0.0439453125,
-0.0257415771484375,
-0.035491943359375,
-0.0265655517578125,
0.042724609375,
0.04754638671875,
0.032196044921875,
-0.005672454833984375,
0.057373046875,
0.032440185546875,
-0.031829833984375,
0.081787109375,
-0.015228271484375,
-0.0009074211120605469,
0.0006170272827148438,
0.01021575927734375,
0.055145263671875,
0.020172119140625,
-0.10516357421875,
-0.03759765625,
-0.027923583984375,
0.041961669921875,
0.00620269775390625,
0.0171356201171875,
0.00783538818359375,
0.027679443359375,
0.04248046875,
-0.021087646484375,
0.0021953582763671875,
0.01180267333984375,
0.0147705078125,
0.050506591796875,
0.0278778076171875,
0.032135009765625,
-0.05194091796875,
-0.02337646484375,
-0.05938720703125,
0.0278472900390625,
0.06719970703125,
0.006740570068359375,
0.0396728515625,
0.048980712890625,
0.02099609375,
0.021484375,
-0.01433563232421875,
-0.0168914794921875,
0.009918212890625,
-0.01788330078125,
0.02313232421875,
-0.009185791015625,
-0.07379150390625,
-0.0174560546875,
0.043121337890625,
-0.0187530517578125,
0.00592041015625,
0.00028824806213378906,
0.0220794677734375,
-0.03790283203125,
0.0017833709716796875,
-0.0203399658203125,
0.02423095703125,
0.0290679931640625,
-0.0300445556640625,
0.0275421142578125,
0.017852783203125,
0.0504150390625,
0.017425537109375,
0.03900146484375,
-0.048431396484375,
0.0224456787109375,
-0.034820556640625,
0.0340576171875,
0.032470703125,
0.045166015625,
0.0016946792602539062,
0.03289794921875,
-0.009307861328125,
-0.007598876953125,
0.0274505615234375,
0.0094757080078125,
0.0227203369140625,
-0.029449462890625,
0.0215301513671875,
0.0233154296875,
0.0322265625,
-0.01422119140625,
0.017608642578125,
0.0149383544921875,
-0.004177093505859375,
0.0019445419311523438,
-0.0227508544921875,
-0.03369140625,
-0.048095703125,
-0.00005418062210083008,
0.0245361328125,
-0.039581298828125,
-0.025634765625,
-0.07861328125,
-0.00748443603515625,
0.030029296875,
0.00615692138671875,
-0.029296875,
0.0212860107421875,
-0.0211944580078125,
0.01885986328125,
-0.004596710205078125,
-0.00862884521484375,
-0.0247344970703125,
-0.036865234375,
0.00293731689453125,
-0.021514892578125,
-0.034942626953125,
0.063720703125,
-0.002979278564453125,
0.0186614990234375,
0.0303497314453125,
-0.0266265869140625,
0.01971435546875,
0.0040283203125,
0.0220184326171875,
0.051300048828125,
0.024078369140625,
-0.041412353515625,
-0.044342041015625,
-0.002094268798828125,
0.021697998046875,
0.0175323486328125,
0.023468017578125,
-0.03411865234375,
-0.023162841796875,
-0.0091705322265625,
-0.003063201904296875,
-0.001529693603515625,
-0.05291748046875,
-0.07501220703125,
0.018829345703125,
0.0044403076171875,
-0.040802001953125,
-0.00693511962890625,
0.002376556396484375,
-0.00995635986328125,
-0.021514892578125,
-0.0154876708984375,
0.0116424560546875,
0.0112457275390625,
0.046142578125,
0.0029315948486328125,
0.06402587890625,
-0.036163330078125,
-0.00323486328125,
-0.029815673828125,
0.027496337890625,
0.0123443603515625,
0.027557373046875,
-0.0007786750793457031,
0.003452301025390625,
0.01203155517578125,
0.0538330078125,
-0.0214385986328125,
-0.056396484375,
-0.01971435546875,
-0.04296875,
0.0018672943115234375,
0.045654296875,
-0.052947998046875,
0.014312744140625,
0.057861328125,
0.0767822265625,
0.0254364013671875,
-0.0361328125,
-0.0012178421020507812,
-0.0224151611328125,
0.0000034570693969726562,
-0.0272369384765625,
-0.0067596435546875,
-0.036712646484375,
-0.0159759521484375,
-0.0116119384765625,
-0.011199951171875,
0.011260986328125,
-0.0025348663330078125,
-0.0004684925079345703,
-0.0062408447265625,
0.03350830078125,
-0.00936126708984375,
-0.02362060546875,
-0.0028781890869140625,
0.02227783203125,
-0.02301025390625,
-0.0205230712890625,
-0.0005054473876953125,
0.00333404541015625,
-0.0135955810546875,
0.005008697509765625,
-0.038970947265625,
-0.00927734375,
-0.022369384765625,
0.0019044876098632812,
-0.02239990234375,
0.03375244140625,
-0.02362060546875,
0.00820159912109375,
0.0093994140625,
0.033477783203125,
0.005767822265625,
0.048736572265625,
-0.042022705078125,
0.046966552734375,
-0.003818511962890625,
-0.0021114349365234375,
-0.0184173583984375,
0.0236358642578125,
-0.01776123046875,
0.046630859375,
-0.037322998046875,
-0.0052490234375,
0.0130157470703125,
-0.037841796875,
-0.004405975341796875,
0.0033111572265625,
-0.0257568359375,
-0.051849365234375,
0.018524169921875,
0.0279388427734375,
-0.00415802001953125,
0.0231170654296875
] |
acea662b937d32edfddbe727b93578426368310a | Wordpress Stackexchange
Q: wp_customize_support_script - do I need it? I've noticed a random JavaScript function at the end of the source code of my WordPress website.
<script type="text/javascript">
(function() {
var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
request = true;
b[c] = b[c].replace( rcs, ' ' );
// The customizer requires postMessage and CORS (if the site is cross domain)
b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
}());
</script>
A quick google search lead me to the article below, but I didn't find it very informative.
https://developer.wordpress.org/reference/functions/wp_customize_support_script/
Does anyone know what exactly this script does, and if it is required?
A: Yes, it is needed. For reference, the function's description is:
Prints a script to check whether or not the Customizer is supported, and apply either the no-customize-support or customize-support class to the body.
The class names that the function toggles on the body element control whether or not the Customize link in the admin bar is displayed.
| Q: wp_customize_support_script - do I need it? I've noticed a random JavaScript function at the end of the source code of my WordPress website.
<script type="text/javascript">
(function() {
var request, b = document.body, c = 'className', cs = 'customize-support', rcs = new RegExp('(^|\\s+)(no-)?'+cs+'(\\s+|$)');
request = true;
b[c] = b[c].replace( rcs, ' ' );
// The customizer requires postMessage and CORS (if the site is cross domain)
b[c] += ( window.postMessage && request ? ' ' : ' no-' ) + cs;
}());
</script>
A quick google search lead me to the article below, but I didn't find it very informative.
https://developer.wordpress.org/reference/functions/wp_customize_support_script/
Does anyone know what exactly this script does, and if it is required?
A: Yes, it is needed. For reference, the function's description is:
Prints a script to check whether or not the Customizer is supported, and apply either the no-customize-support or customize-support class to the body.
The class names that the function toggles on the body element control whether or not the Customize link in the admin bar is displayed.
A: I had the same problem and finally found the fix.
In my case tag was missing the ">" at the end.
<body <?php body_class(); ?>>
instead of:
<body <?php body_class(); ?>
Maybe this will help anyone else.
| wordpress | {
"language": "en",
"length": 210,
"provenance": "stackexchange_00019.jsonl.gz:472987",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256009"
} | [
0.0250091552734375,
-0.0104522705078125,
0.001247406005859375,
-0.0631103515625,
-0.0073699951171875,
-0.005603790283203125,
-0.0433349609375,
-0.01222991943359375,
-0.051727294921875,
0.00039124488830566406,
0.015167236328125,
0.014495849609375,
-0.02349853515625,
-0.038970947265625,
0.055450439453125,
-0.044891357421875,
0.06072998046875,
-0.0164337158203125,
0.01953125,
-0.019012451171875,
-0.0014591217041015625,
0.0305023193359375,
0.0170135498046875,
0.139892578125,
0.0193023681640625,
-0.043243408203125,
0.06256103515625,
-0.019134521484375,
0.01213836669921875,
-0.00951385498046875,
0.0113677978515625,
0.003108978271484375,
0.05035400390625,
0.0221099853515625,
-0.03839111328125,
0.03656005859375,
-0.003910064697265625,
0.01568603515625,
0.00003707408905029297,
0.02410888671875,
0.0025501251220703125,
0.00553131103515625,
0.013153076171875,
0.00323486328125,
-0.01412200927734375,
-0.0305328369140625,
0.00750732421875,
-0.018280029296875,
0.0091400146484375,
0.01551055908203125,
-0.00901031494140625,
0.01385498046875,
-0.0013713836669921875,
-0.009033203125,
-0.007106781005859375,
-0.010101318359375,
-0.040008544921875,
-0.01812744140625,
0.017333984375,
0.05560302734375,
0.01113128662109375,
0.0018482208251953125,
-0.005298614501953125,
-0.019134521484375,
-0.0255279541015625,
0.02685546875,
-0.049041748046875,
-0.01049041748046875,
-0.01137542724609375,
-0.01837158203125,
0.01255035400390625,
-0.05657958984375,
0.01096343994140625,
0.00241851806640625,
0.002079010009765625,
-0.0218658447265625,
-0.038726806640625,
-0.0212860107421875,
0.036376953125,
0.003932952880859375,
0.038482666015625,
0.0219573974609375,
0.0262603759765625,
-0.00543212890625,
-0.01142120361328125,
0.004665374755859375,
-0.01003265380859375,
-0.026824951171875,
-0.0226593017578125,
-0.026214599609375,
-0.0211334228515625,
-0.0494384765625,
-0.04803466796875,
0.0289459228515625,
0.00557708740234375,
-0.02276611328125,
0.025146484375,
0.060394287109375,
-0.005462646484375,
0.016632080078125,
0.014739990234375,
-0.041656494140625,
0.03924560546875,
-0.051605224609375,
0.0034809112548828125,
0.037445068359375,
0.00284576416015625,
0.01385498046875,
0.0268096923828125,
0.01141357421875,
-0.0012426376342773438,
-0.0205230712890625,
0.0285491943359375,
0.02032470703125,
-0.0382080078125,
-0.055328369140625,
-0.0305023193359375,
0.008392333984375,
-0.0102081298828125,
-0.0222015380859375,
0.04034423828125,
0.0546875,
0.00881195068359375,
-0.04779052734375,
0.009796142578125,
-0.006072998046875,
-0.04180908203125,
-0.032257080078125,
-0.0048980712890625,
-0.01480865478515625,
-0.036346435546875,
0.0300445556640625,
0.096435546875,
0.024322509765625,
0.01849365234375,
-0.0193328857421875,
0.059600830078125,
-0.006855010986328125,
0.0180206298828125,
-0.0013446807861328125,
0.01190185546875,
-0.0136566162109375,
-0.013519287109375,
-0.01043701171875,
-0.002197265625,
0.0021514892578125,
0.0100250244140625,
0.03302001953125,
0.0145721435546875,
-0.05133056640625,
0.039947509765625,
0.01375579833984375,
0.032745361328125,
0.02447509765625,
-0.042938232421875,
-0.022125244140625,
0.017608642578125,
-0.0207672119140625,
-0.016326904296875,
-0.05731201171875,
-0.02484130859375,
-0.004787445068359375,
0.017059326171875,
-0.033172607421875,
-0.031707763671875,
-0.0057525634765625,
-0.0236663818359375,
-0.0007271766662597656,
0.03192138671875,
0.04998779296875,
0.016143798828125,
-0.03753662109375,
0.03857421875,
0.043487548828125,
-0.007007598876953125,
0.0255279541015625,
0.0018453598022460938,
0.05694580078125,
0.037353515625,
-0.0198974609375,
-0.004428863525390625,
-0.026702880859375,
0.11639404296875,
-0.0306549072265625,
-0.047760009765625,
0.03369140625,
0.0196685791015625,
0.09698486328125,
0.0017976760864257812,
0.024749755859375,
0.044189453125,
-0.0141143798828125,
-0.00853729248046875,
0.01486968994140625,
-0.02923583984375,
-0.03668212890625,
0.0162506103515625,
0.00635528564453125,
-0.0175933837890625,
0.0158538818359375,
0.003719329833984375,
-0.00839996337890625,
0.0084381103515625,
0.007843017578125,
-0.01309967041015625,
0.021636962890625,
-0.0203704833984375,
0.0321044921875,
-0.00354766845703125,
0.01416015625,
-0.0002582073211669922,
0.0193939208984375,
-0.03839111328125,
0.028411865234375,
0.00672149658203125,
0.0146331787109375,
-0.0101776123046875,
0.076904296875,
-0.030731201171875,
0.0433349609375,
-0.03265380859375,
-0.06732177734375,
-0.01508331298828125,
0.029937744140625,
0.0212554931640625,
0.0088348388671875,
-0.01093292236328125,
-0.003574371337890625,
0.04193115234375,
0.022186279296875,
0.022216796875,
0.01552581787109375,
0.048370361328125,
0.06634521484375,
-0.0178985595703125,
-0.0276336669921875,
-0.0119781494140625,
-0.076171875,
0.013885498046875,
0.047821044921875,
0.03167724609375,
-0.01268768310546875,
-0.0479736328125,
-0.031585693359375,
0.0275726318359375,
0.00893402099609375,
0.0210418701171875,
-0.03076171875,
-0.0003070831298828125,
0.01708984375,
0.0123138427734375,
-0.036895751953125,
0.0035037994384765625,
-0.045013427734375,
0.0256805419921875,
0.01244354248046875,
-0.042633056640625,
-0.031280517578125,
-0.023712158203125,
0.004421234130859375,
0.0228118896484375,
0.0296478271484375,
0.0011072158813476562,
0.017181396484375,
0.0278472900390625,
-0.00920867919921875,
0.040557861328125,
0.0291290283203125,
-0.022369384765625,
-0.00923919677734375,
0.0161285400390625,
0.02606201171875,
0.00315093994140625,
0.022125244140625,
0.0716552734375,
0.0011043548583984375,
-0.0302581787109375,
-0.044708251953125,
0.037200927734375,
0.02496337890625,
-0.01509857177734375,
0.02191162109375,
-0.048309326171875,
-0.0220184326171875,
0.00969696044921875,
-0.04327392578125,
-0.0148162841796875,
-0.005863189697265625,
0.05072021484375,
0.0214691162109375,
0.034637451171875,
0.0239715576171875,
-0.01177978515625,
0.039947509765625,
0.043487548828125,
-0.03985595703125,
0.0185089111328125,
0.02203369140625,
0.00583648681640625,
0.0001150369644165039,
0.05450439453125,
0.049407958984375,
-0.0189056396484375,
0.03448486328125,
-0.01250457763671875,
0.0260772705078125,
0.014923095703125,
0.0127410888671875,
0.00806427001953125,
-0.057861328125,
0.03924560546875,
0.0156402587890625,
0.031463623046875,
0.035064697265625,
-0.0089263916015625,
-0.0440673828125,
-0.020538330078125,
0.01457977294921875,
-0.09844970703125,
-0.076171875,
0.0380859375,
-0.022705078125,
-0.041046142578125,
0.003936767578125,
-0.03424072265625,
-0.010650634765625,
0.01010894775390625,
-0.01727294921875,
-0.01171875,
-0.042144775390625,
-0.03704833984375,
-0.074462890625,
-0.04217529296875,
-0.047027587890625,
-0.0008625984191894531,
-0.035125732421875,
-0.0034046173095703125,
0.039154052734375,
-0.00838470458984375,
-0.038238525390625,
-0.006328582763671875,
0.033050537109375,
0.0038356781005859375,
-0.0081329345703125,
0.0081024169921875,
-0.057159423828125,
0.005157470703125,
-0.0192108154296875,
0.0083160400390625,
0.016204833984375,
0.003047943115234375,
-0.00394439697265625,
-0.01512908935546875,
-0.007633209228515625,
-0.01535797119140625,
0.043243408203125,
0.030487060546875,
-0.005535125732421875,
0.015228271484375,
-0.052581787109375,
-0.022674560546875,
0.01033782958984375,
-0.0293121337890625,
0.01312255859375,
0.0287017822265625,
-0.032196044921875,
-0.00011426210403442383,
0.0237274169921875,
0.042266845703125,
0.01331329345703125,
-0.018402099609375,
0.00827789306640625,
0.03424072265625,
0.013946533203125,
0.0362548828125,
-0.0005016326904296875,
0.050079345703125,
-0.016387939453125,
0.033905029296875,
0.0292816162109375,
-0.0263824462890625,
-0.01335906982421875,
-0.0343017578125,
-0.0455322265625,
-0.03460693359375,
0.047119140625,
0.0172271728515625,
0.04766845703125,
-0.0186309814453125,
-0.0335693359375,
0.01094818115234375,
0.10418701171875,
-0.007526397705078125,
0.0003528594970703125,
-0.034149169921875,
-0.004177093505859375,
-0.031494140625,
-0.022735595703125,
-0.0244598388671875,
0.00911712646484375,
-0.0916748046875,
-0.01611328125,
-0.01163482666015625,
-0.039215087890625,
-0.00360107421875,
0.00652313232421875,
-0.032073974609375,
-0.0416259765625,
0.0136871337890625,
-0.030426025390625,
0.0185699462890625,
-0.006694793701171875,
0.030517578125,
-0.03216552734375,
0.03887939453125,
-0.05694580078125,
-0.044342041015625,
-0.0026073455810546875,
-0.037811279296875,
0.0294952392578125,
0.0362548828125,
-0.00966644287109375,
-0.0093841552734375,
0.0215911865234375,
0.014739990234375,
-0.01708984375,
0.019317626953125,
-0.0202178955078125,
-0.0188140869140625,
0.054351806640625,
0.0162353515625,
-0.0078125,
0.0258941650390625,
0.0286712646484375,
-0.07696533203125,
-0.0014133453369140625,
-0.02117919921875,
-0.033355712890625,
0.06207275390625,
-0.05950927734375,
-0.01488494873046875,
-0.00740814208984375,
-0.000270843505859375,
0.00389862060546875,
-0.0167236328125,
0.0160675048828125,
0.0022373199462890625,
-0.01224517822265625,
0.0280303955078125,
-0.02679443359375,
-0.0157470703125,
0.00818634033203125,
0.04241943359375,
0.0206298828125,
-0.00579833984375,
-0.0223846435546875,
0.00559234619140625,
0.0177154541015625,
0.0105133056640625,
0.08074951171875,
0.0231170654296875,
-0.00887298583984375,
0.055023193359375,
0.00016033649444580078,
0.023468017578125,
-0.0192413330078125,
0.051849365234375,
-0.0024814605712890625,
-0.0216522216796875,
0.039642333984375,
0.0011835098266601562,
-0.05126953125,
-0.0269775390625,
-0.0012464523315429688,
0.0249176025390625,
0.04473876953125,
-0.021148681640625,
-0.0207672119140625,
-0.007160186767578125,
0.0180511474609375,
0.00655364990234375,
0.001956939697265625,
0.00768280029296875,
0.04632568359375,
0.01788330078125,
0.0015840530395507812,
-0.0218963623046875,
0.004302978515625,
0.026397705078125,
0.0011434555053710938,
-0.0201263427734375,
-0.004974365234375,
0.0423583984375,
0.0093841552734375,
0.02203369140625,
0.0164031982421875,
0.0049285888671875,
0.065673828125,
-0.0230255126953125,
-0.0289764404296875,
-0.059173583984375,
0.01519012451171875,
-0.0286102294921875,
0.0242919921875,
0.00475311279296875,
0.04937744140625,
0.037078857421875,
-0.0183258056640625,
-0.0264739990234375,
0.012359619140625,
-0.0049896240234375,
-0.046295166015625,
0.09442138671875,
0.032135009765625,
-0.0038299560546875,
-0.0232391357421875,
0.02752685546875,
0.042205810546875,
-0.0187225341796875,
-0.0139923095703125,
0.006298065185546875,
0.0102386474609375,
0.031585693359375,
0.0316162109375,
-0.0245208740234375,
-0.006221771240234375,
0.004360198974609375,
0.001377105712890625,
-0.048736572265625,
-0.034576416015625,
0.051055908203125,
0.0474853515625,
-0.01495361328125,
-0.01800537109375,
-0.0008759498596191406,
0.0201263427734375,
-0.053466796875,
0.050018310546875,
0.055816650390625,
-0.0054779052734375,
-0.03863525390625,
-0.01004791259765625,
0.035125732421875,
0.056121826171875,
-0.003116607666015625,
-0.000002205371856689453,
-0.0005006790161132812,
-0.0125732421875,
-0.04498291015625,
-0.056488037109375,
0.0015096664428710938,
0.030029296875,
-0.016326904296875,
0.01296234130859375,
0.011505126953125,
-0.0367431640625,
-0.04998779296875,
-0.0285186767578125,
-0.00408172607421875,
0.07476806640625,
-0.0080108642578125,
0.02960205078125,
-0.04541015625,
0.0024013519287109375,
-0.03143310546875,
0.02734375,
-0.0152435302734375,
-0.030853271484375,
-0.037139892578125,
0.002658843994140625,
-0.0623779296875,
-0.031585693359375,
-0.07916259765625,
-0.042266845703125,
-0.0545654296875,
0.0146484375,
0.0207061767578125,
0.003387451171875,
0.011749267578125,
0.0026760101318359375,
-0.025054931640625,
0.05364990234375,
0.031829833984375,
0.07757568359375,
-0.05023193359375,
0.06060791015625,
0.01251983642578125,
-0.0088348388671875,
-0.006977081298828125,
0.04058837890625,
0.03497314453125,
-0.0036754608154296875,
0.0158233642578125,
-0.01361846923828125,
-0.0163116455078125,
-0.0447998046875,
-0.0180816650390625,
0.031890869140625,
0.0828857421875,
-0.00736236572265625,
0.018157958984375,
0.00334930419921875,
0.004547119140625,
-0.022552490234375,
-0.01280975341796875,
-0.013763427734375,
0.0204010009765625,
-0.0013942718505859375,
0.00952911376953125,
0.024658203125,
-0.037200927734375,
-0.0253448486328125,
0.0153961181640625,
0.01015472412109375,
0.010498046875,
-0.0099029541015625,
-0.054901123046875,
0.039520263671875,
0.039642333984375,
-0.0191802978515625,
0.016265869140625,
-0.0232696533203125,
-0.0221099853515625,
0.019500732421875,
-0.0174713134765625,
-0.02484130859375,
0.00237274169921875,
0.01467132568359375,
-0.0096282958984375,
0.01422882080078125,
0.0294036865234375,
0.0098114013671875,
0.044586181640625,
0.04620361328125,
0.09716796875,
-0.090576171875,
0.036865234375,
0.03558349609375,
-0.0087127685546875,
0.041900634765625,
0.004360198974609375,
-0.03082275390625,
-0.01605224609375,
0.0257568359375,
-0.0106353759765625,
-0.031280517578125,
0.0194854736328125,
0.01702880859375,
-0.00453948974609375,
-0.0020847320556640625,
0.031585693359375,
-0.006755828857421875,
0.03179931640625,
-0.041229248046875,
-0.032562255859375,
-0.00244140625,
0.03887939453125,
0.02252197265625,
-0.006381988525390625,
-0.04937744140625,
-0.0155792236328125,
-0.001251220703125,
0.01418304443359375,
-0.045684814453125,
-0.0247802734375,
0.001544952392578125,
0.0154266357421875,
0.03570556640625,
-0.0261993408203125,
0.0235443115234375,
-0.00975799560546875,
0.03009033203125,
-0.0045013427734375,
-0.034088134765625,
0.029510498046875,
0.03863525390625,
-0.058319091796875,
0.031280517578125,
0.0021419525146484375,
-0.033935546875,
-0.0224456787109375,
-0.0249176025390625,
0.05133056640625,
-0.020111083984375,
-0.00920867919921875,
0.02386474609375,
0.048828125,
-0.01413726806640625,
-0.0273284912109375,
0.041595458984375,
-0.07305908203125,
-0.0274658203125,
-0.012786865234375,
-0.042388916015625,
-0.01284027099609375,
-0.03546142578125,
-0.02862548828125,
0.08624267578125,
0.0198822021484375,
0.0133056640625,
0.0225372314453125,
0.030303955078125,
-0.0204925537109375,
0.013946533203125,
-0.0004856586456298828,
0.03375244140625,
-0.00208282470703125,
0.01904296875,
0.004909515380859375,
0.0203704833984375,
0.0318603515625,
0.00548553466796875,
-0.0325927734375,
-0.01080322265625,
-0.0009450912475585938,
0.02410888671875,
0.0287322998046875,
0.03106689453125,
0.021575927734375,
0.0079498291015625,
-0.0222015380859375,
-0.004302978515625,
0.031402587890625,
-0.0380859375,
-0.0025844573974609375,
0.0172119140625,
-0.0286865234375,
0.0072021484375,
0.035888671875,
0.0648193359375,
-0.004302978515625,
0.01012420654296875,
-0.051422119140625,
-0.000186920166015625,
0.044586181640625,
0.0219268798828125,
-0.03851318359375,
0.02313232421875,
-0.039459228515625,
-0.046783447265625,
-0.018096923828125,
-0.040802001953125,
0.006107330322265625,
-0.03192138671875,
0.0212860107421875,
-0.025146484375,
0.0153350830078125,
-0.0357666015625,
-0.0166015625,
-0.01142120361328125,
0.0361328125,
-0.04400634765625,
-0.002048492431640625,
-0.01219940185546875,
0.0302886962890625,
-0.0380859375,
-0.019866943359375,
0.002208709716796875,
0.004245758056640625,
-0.002193450927734375,
0.01062774658203125,
0.01273345947265625,
0.0170745849609375,
-0.012725830078125,
-0.03466796875,
0.01380157470703125,
0.002246856689453125,
0.00501251220703125,
-0.0238037109375,
0.017303466796875,
0.054443359375,
-0.0031890869140625,
0.0128631591796875,
0.040557861328125,
-0.06719970703125,
0.022186279296875,
-0.02740478515625,
0.0069122314453125,
0.0107269287109375,
0.04693603515625,
0.01690673828125,
0.0411376953125,
-0.0015134811401367188,
-0.0251617431640625,
-0.03533935546875,
-0.01580810546875,
0.0250396728515625,
0.02899169921875,
-0.00911712646484375,
0.04620361328125,
0.0079193115234375,
0.034698486328125,
0.0253143310546875,
-0.01708984375,
0.0021076202392578125,
0.0103302001953125,
0.01194000244140625,
0.01023101806640625,
0.04754638671875,
0.0011110305786132812,
0.02789306640625,
-0.02984619140625,
0.0292205810546875,
0.0435791015625,
0.0028667449951171875,
0.01351165771484375,
-0.0261993408203125,
0.08282470703125,
0.01494598388671875,
-0.0228729248046875,
0.015777587890625,
-0.04022216796875,
0.05859375,
0.01433563232421875,
0.1153564453125,
0.0465087890625,
-0.0131988525390625,
-0.006557464599609375,
-0.0279388427734375,
-0.0276641845703125,
0.031494140625,
0.0413818359375,
-0.006317138671875,
0.01258087158203125,
0.0207061767578125,
-0.0209197998046875,
0.00047588348388671875,
0.03131103515625,
-0.02081298828125,
0.0010356903076171875,
0.039642333984375,
-0.0024051666259765625,
-0.052703857421875,
-0.04736328125,
-0.042999267578125,
0.052764892578125,
-0.0018787384033203125,
0.008148193359375,
0.005664825439453125,
0.037139892578125,
0.0014190673828125,
0.0111541748046875,
-0.02777099609375,
-0.00788116455078125,
0.026153564453125,
-0.0007882118225097656,
-0.007251739501953125,
-0.01313018798828125,
-0.036529541015625,
0.070068359375,
0.00673675537109375,
-0.0162811279296875,
0.0615234375,
0.016357421875,
-0.0268402099609375,
-0.0205535888671875,
-0.033935546875,
-0.05316162109375,
-0.0694580078125,
-0.037933349609375,
0.0287017822265625,
-0.0161590576171875,
-0.046478271484375,
-0.0212249755859375,
0.00582122802734375,
0.0251007080078125,
-0.00725555419921875,
0.004161834716796875,
0.00749969482421875,
0.005550384521484375,
0.03143310546875,
0.0141754150390625,
-0.0190277099609375,
0.00960540771484375,
-0.0014095306396484375,
0.00980377197265625,
0.026763916015625,
-0.00753021240234375,
0.0244140625,
0.0279083251953125,
0.04736328125,
0.0648193359375,
0.0643310546875,
-0.004673004150390625,
0.004505157470703125,
0.052459716796875,
-0.0186309814453125,
-0.0007262229919433594,
-0.00978851318359375,
-0.035064697265625,
-0.05767822265625,
0.01335906982421875,
0.024139404296875,
-0.0165252685546875,
-0.01058197021484375,
-0.0323486328125,
0.01806640625,
0.0279541015625,
-0.00873565673828125,
-0.0491943359375,
0.04010009765625,
-0.059600830078125,
0.030609130859375,
-0.01006317138671875,
0.07037353515625,
0.0018739700317382812,
0.041412353515625,
-0.022491455078125,
-0.0184478759765625,
0.0067138671875,
0.052947998046875,
0.0247344970703125,
0.012359619140625,
0.032135009765625,
-0.0196990966796875,
-0.0180816650390625,
0.0242156982421875,
0.0258331298828125,
0.06329345703125,
-0.021240234375,
-0.01450347900390625,
0.00994873046875,
0.01538848876953125,
-0.02484130859375,
-0.040313720703125,
0.007625579833984375,
-0.019561767578125,
0.0037136077880859375,
0.0003209114074707031,
-0.0098114013671875,
-0.0022640228271484375,
-0.041412353515625,
-0.0810546875,
0.03314208984375,
-0.007480621337890625,
-0.0400390625,
-0.026947021484375,
-0.0250396728515625,
0.00021028518676757812,
0.019989013671875,
-0.02703857421875,
-0.0234527587890625,
-0.047119140625,
-0.0024929046630859375,
0.007778167724609375,
-0.0028018951416015625,
0.01568603515625,
-0.0019350051879882812,
-0.0489501953125,
0.01538848876953125,
0.0109405517578125,
-0.0009746551513671875,
0.009185791015625,
0.00583648681640625,
0.0166778564453125,
0.0299224853515625,
-0.039306640625,
-0.0399169921875,
-0.022705078125,
0.014892578125,
0.01788330078125,
0.0162200927734375,
-0.01617431640625,
-0.039703369140625,
0.0234222412109375,
-0.0105438232421875,
0.00887298583984375,
0.0269927978515625,
0.00978851318359375,
-0.05029296875,
-0.0255889892578125,
-0.01111602783203125,
0.00659942626953125,
-0.041229248046875,
0.00644683837890625,
0.041748046875,
-0.0299224853515625,
0.0120086669921875,
0.002643585205078125,
-0.044525146484375,
0.0182342529296875,
0.00978851318359375,
-0.01134490966796875,
-0.0360107421875,
0.00873565673828125,
0.04815673828125,
-0.03619384765625,
0.007556915283203125,
0.0124359130859375,
0.01129913330078125,
0.0428466796875,
0.032012939453125,
-0.0263519287109375,
-0.01372528076171875,
-0.017791748046875,
0.022125244140625,
-0.0038585662841796875,
0.056365966796875,
-0.0306854248046875,
-0.01221466064453125,
0.021148681640625,
0.001247406005859375,
-0.0084228515625,
-0.013916015625,
-0.0215301513671875,
0.0290374755859375,
-0.031219482421875,
0.01360321044921875,
-0.0203094482421875,
-0.0139617919921875,
-0.0257568359375,
0.042572021484375,
0.03436279296875,
-0.021270751953125,
0.0836181640625,
-0.058624267578125,
0.005031585693359375,
-0.0254058837890625,
0.03753662109375,
-0.038726806640625,
0.03216552734375,
-0.00667572021484375,
0.0005054473876953125,
0.035919189453125
] |
fdd20940c8f749fb5e673f1492229d9aebc8d4f9 | Wordpress Stackexchange
Q: How to remove a empty in wp caption shortcode? I recently added a caption to my image in WordPress and now there is an empty <p></p> tag after <img> tag. It broke my style.
Can anyone tell how to remove it?
Thanks for the help.
A: It is not a good practice to override the WordPress native functionality. Instead you can hide the empty elements using CSS
p:empty {
display: none;
}
This will the empty elements.
| Q: How to remove a empty in wp caption shortcode? I recently added a caption to my image in WordPress and now there is an empty <p></p> tag after <img> tag. It broke my style.
Can anyone tell how to remove it?
Thanks for the help.
A: It is not a good practice to override the WordPress native functionality. Instead you can hide the empty elements using CSS
p:empty {
display: none;
}
This will the empty elements.
A: Removing wpautop:
This is most likely from wpautop. To fix that, first write the following CODE in your theme's functions.php file:
remove_filter( 'the_content', 'wpautop' );
remove_filter( 'the_excerpt', 'wpautop' );
If it doesn't solve the issue, that may mean <p></p> got into your database or you have empty newline inside your [caption][/caption] Shortcode. Go to the post & edit out the <p></p> or empty new line from WordPress editor's Text mode.
That should solve your problem.
Alternative CSS Solution:
You may use CSS CODE to hide <p></p> as this answer suggested. However, with that method, it'll still be in your HTML & there's no point in creating it and then hiding it entirely with CSS. It's better to remove it in that case with the above CODE.
However, if you want to keep wpautop for some reason (may be you are using it for formatting somewhere else in the site), then you may target only the <p></p> tags within the captions with the following CSS:
.wp-caption > p:empty {
display: none;
}
This will keep the formatting of wpautop elsewhere in your site and at the same time solve the display problem for the captions.
A: You can also remove this using str_replace to replace the p tags with the_content filter:
function wpse256087_content_filter($content) {
$content = str_replace( '<p></p>', '', $content );
return $content;
}
add_filter( 'the_content', 'wpse256087_content_filter' );
A: You can do this on the do_shortcode_tag hook.
function remove_empty_wp_caption_text($output, $tag) {
if ($tag === 'caption') {
$output = str_replace('<p class="wp-caption-text"> </p>', '', $output);
}
return $output;
}
add_filter('do_shortcode_tag', 'remove_empty_wp_caption_text', 10, 2);
What's nice about this approach is that the function won't be ran unless the [caption] shortcode is called.
| wordpress | {
"language": "en",
"length": 357,
"provenance": "stackexchange_00019.jsonl.gz:473009",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256087"
} | [
0.034210205078125,
0.0102081298828125,
0.0171051025390625,
0.0228424072265625,
0.0015897750854492188,
-0.036529541015625,
0.056243896484375,
-0.0625,
-0.0078125,
0.02447509765625,
-0.04193115234375,
0.0092926025390625,
-0.0183258056640625,
-0.01287078857421875,
-0.007740020751953125,
-0.045013427734375,
-0.0090789794921875,
0.0268707275390625,
0.011077880859375,
-0.007457733154296875,
-0.0052947998046875,
0.0017862319946289062,
-0.0252838134765625,
-0.014617919921875,
-0.0214691162109375,
-0.008758544921875,
0.093994140625,
-0.030792236328125,
-0.032318115234375,
-0.040771484375,
0.0029277801513671875,
0.04571533203125,
0.0177764892578125,
0.060577392578125,
-0.07537841796875,
0.04052734375,
-0.037384033203125,
0.03704833984375,
0.0038166046142578125,
-0.0034923553466796875,
0.0212249755859375,
-0.0025634765625,
0.044219970703125,
-0.05987548828125,
0.0029659271240234375,
0.035308837890625,
-0.016754150390625,
-0.027740478515625,
0.006015777587890625,
-0.0291595458984375,
0.058837890625,
0.00783538818359375,
0.0771484375,
-0.049407958984375,
-0.052032470703125,
-0.026092529296875,
-0.02191162109375,
0.006046295166015625,
0.037872314453125,
0.038818359375,
-0.0200958251953125,
-0.01020050048828125,
-0.00897216796875,
-0.055755615234375,
0.0167388916015625,
0.007678985595703125,
-0.0096435546875,
0.0290069580078125,
-0.0281829833984375,
0.006198883056640625,
0.0066375732421875,
-0.03240966796875,
0.00829315185546875,
-0.046295166015625,
-0.005970001220703125,
0.041168212890625,
-0.017120361328125,
0.0022563934326171875,
0.01317596435546875,
0.0009870529174804688,
0.018402099609375,
-0.019287109375,
-0.01288604736328125,
0.0214996337890625,
-0.010406494140625,
0.02294921875,
0.00588226318359375,
-0.01493072509765625,
-0.0261993408203125,
-0.004425048828125,
-0.0221405029296875,
0.0106353759765625,
-0.024200439453125,
-0.00843048095703125,
-0.0222320556640625,
-0.010498046875,
0.009765625,
0.0309295654296875,
0.0117950439453125,
0.01377105712890625,
0.005222320556640625,
-0.046478271484375,
0.025970458984375,
-0.036407470703125,
0.00891876220703125,
-0.00933074951171875,
-0.0143890380859375,
-0.00323486328125,
0.051239013671875,
0.043212890625,
-0.01447296142578125,
0.0143280029296875,
-0.0296173095703125,
0.00800323486328125,
-0.054107666015625,
0.033050537109375,
-0.027557373046875,
-0.0137481689453125,
-0.02301025390625,
0.0272216796875,
0.0022487640380859375,
0.005916595458984375,
-0.0081634521484375,
-0.0033130645751953125,
0.027313232421875,
0.00331878662109375,
-0.01508331298828125,
-0.006160736083984375,
0.0201568603515625,
-0.00543212890625,
-0.05816650390625,
0.01142120361328125,
0.08135986328125,
0.033233642578125,
0.028350830078125,
-0.01898193359375,
-0.0184173583984375,
-0.042510986328125,
0.006305694580078125,
-0.0033397674560546875,
0.0183258056640625,
-0.023040771484375,
0.02783203125,
0.004718780517578125,
0.020843505859375,
0.045135498046875,
-0.0015726089477539062,
-0.005126953125,
-0.0009469985961914062,
-0.0540771484375,
0.07159423828125,
-0.09283447265625,
0.027740478515625,
0.01605224609375,
0.0291290283203125,
-0.0156097412109375,
0.06475830078125,
-0.04339599609375,
-0.013458251953125,
-0.031219482421875,
0.0693359375,
0.0117034912109375,
0.027099609375,
0.03662109375,
-0.025726318359375,
-0.01407623291015625,
-0.042999267578125,
-0.01482391357421875,
0.033721923828125,
0.044525146484375,
-0.0050811767578125,
-0.013702392578125,
0.00768280029296875,
0.03265380859375,
-0.002674102783203125,
0.0264434814453125,
-0.00780487060546875,
-0.0195159912109375,
0.0157318115234375,
0.049560546875,
-0.0032863616943359375,
-0.02105712890625,
0.03338623046875,
-0.0181427001953125,
-0.050628662109375,
-0.014251708984375,
0.0297393798828125,
0.07501220703125,
-0.002132415771484375,
0.0367431640625,
0.052276611328125,
-0.0203704833984375,
-0.02777099609375,
-0.0140533447265625,
0.037322998046875,
-0.028350830078125,
-0.01485443115234375,
-0.04681396484375,
0.0229644775390625,
-0.01113128662109375,
0.002166748046875,
0.011749267578125,
-0.036895751953125,
0.0188446044921875,
-0.0355224609375,
-0.01470947265625,
-0.018646240234375,
0.0088958740234375,
-0.060211181640625,
-0.0027561187744140625,
0.0278167724609375,
-0.0372314453125,
-0.01483917236328125,
0.006671905517578125,
0.00446319580078125,
-0.00787353515625,
0.0028018951416015625,
0.023406982421875,
0.0147857666015625,
-0.003932952880859375,
0.0250396728515625,
-0.02496337890625,
0.00893402099609375,
0.0154571533203125,
0.05303955078125,
-0.016021728515625,
-0.034637451171875,
-0.052947998046875,
0.0022029876708984375,
-0.027740478515625,
-0.052703857421875,
0.07635498046875,
-0.0140228271484375,
0.022705078125,
-0.03961181640625,
-0.0179901123046875,
-0.00424957275390625,
-0.004077911376953125,
0.019195556640625,
0.0240478515625,
0.049346923828125,
0.054656982421875,
0.0268096923828125,
0.022186279296875,
0.09796142578125,
-0.01027679443359375,
0.0150146484375,
-0.025634765625,
-0.0088043212890625,
-0.0226898193359375,
0.00859832763671875,
-0.024505615234375,
0.0279998779296875,
-0.049652099609375,
0.0178680419921875,
0.033355712890625,
-0.005828857421875,
-0.01129913330078125,
-0.00748443603515625,
0.023162841796875,
-0.0087432861328125,
-0.031524658203125,
-0.01535797119140625,
-0.021514892578125,
0.01194000244140625,
0.0257110595703125,
0.037567138671875,
0.04095458984375,
-0.0328369140625,
0.00738525390625,
0.0271453857421875,
0.0267486572265625,
-0.006313323974609375,
0.041107177734375,
0.01485443115234375,
0.0325927734375,
-0.01250457763671875,
-0.023834228515625,
0.0113067626953125,
0.03619384765625,
-0.015380859375,
-0.003665924072265625,
-0.0202178955078125,
-0.00635528564453125,
0.02606201171875,
-0.0517578125,
0.008880615234375,
0.0112762451171875,
-0.01183319091796875,
-0.02545166015625,
-0.00457000732421875,
0.00948333740234375,
-0.0016727447509765625,
0.01702880859375,
0.0487060546875,
-0.0143585205078125,
-0.008331298828125,
-0.052764892578125,
0.0526123046875,
-0.049896240234375,
0.01983642578125,
0.0775146484375,
-0.01224517822265625,
0.021240234375,
0.0049896240234375,
0.000047206878662109375,
0.004150390625,
0.0008215904235839844,
0.00878143310546875,
0.0212249755859375,
-0.0341796875,
0.03961181640625,
0.015289306640625,
0.00962066650390625,
-0.052886962890625,
-0.0290985107421875,
-0.033782958984375,
0.00460052490234375,
-0.049346923828125,
-0.0121612548828125,
0.02947998046875,
-0.06622314453125,
-0.026519775390625,
0.006343841552734375,
-0.04022216796875,
-0.0079498291015625,
0.046722412109375,
-0.00931549072265625,
-0.007274627685546875,
-0.0445556640625,
-0.040679931640625,
-0.0665283203125,
-0.0606689453125,
0.0006160736083984375,
-0.005157470703125,
0.0025177001953125,
-0.00016868114471435547,
0.096435546875,
0.0078277587890625,
-0.0277557373046875,
0.0011234283447265625,
-0.0223388671875,
-0.0028934478759765625,
0.0177154541015625,
-0.005046844482421875,
-0.00595855712890625,
-0.006160736083984375,
-0.0009832382202148438,
-0.01462554931640625,
0.01026153564453125,
-0.01477813720703125,
0.002384185791015625,
-0.042938232421875,
-0.040496826171875,
-0.004581451416015625,
0.0127105712890625,
0.031219482421875,
-0.00754547119140625,
0.0231170654296875,
-0.054168701171875,
-0.055206298828125,
-0.03594970703125,
-0.08819580078125,
-0.0178680419921875,
0.048614501953125,
0.02667236328125,
-0.038330078125,
0.01065826416015625,
0.0232391357421875,
0.02545166015625,
0.0183258056640625,
0.0007834434509277344,
0.038116455078125,
-0.0087127685546875,
0.00713348388671875,
-0.0567626953125,
0.02081298828125,
-0.01593017578125,
0.027923583984375,
0.01282501220703125,
0.00983428955078125,
0.00740814208984375,
-0.03131103515625,
-0.0226287841796875,
-0.019989013671875,
0.046478271484375,
0.0479736328125,
0.039794921875,
-0.016326904296875,
-0.038604736328125,
-0.0138702392578125,
0.061676025390625,
-0.026336669921875,
-0.026763916015625,
0.007343292236328125,
0.006763458251953125,
-0.0036468505859375,
0.01174163818359375,
-0.0226593017578125,
-0.017913818359375,
-0.0345458984375,
0.023162841796875,
-0.004364013671875,
0.0031375885009765625,
-0.037872314453125,
0.004528045654296875,
-0.0391845703125,
-0.02178955078125,
0.048828125,
-0.0258331298828125,
0.0265960693359375,
-0.0115509033203125,
-0.01047515869140625,
-0.0177154541015625,
-0.042022705078125,
-0.020233154296875,
-0.039886474609375,
0.004512786865234375,
-0.0269622802734375,
0.0148773193359375,
-0.033050537109375,
0.0692138671875,
-0.03326416015625,
0.0192108154296875,
0.00493621826171875,
-0.00269317626953125,
0.00794219970703125,
0.0220947265625,
-0.0301361083984375,
-0.0176544189453125,
0.003093719482421875,
-0.04443359375,
-0.00783538818359375,
0.00921630859375,
0.01123809814453125,
0.0333251953125,
-0.0374755859375,
-0.044281005859375,
-0.0167999267578125,
-0.01145172119140625,
0.033355712890625,
-0.006153106689453125,
-0.005130767822265625,
0.036834716796875,
-0.0183868408203125,
0.00272369384765625,
-0.019989013671875,
0.0216827392578125,
0.048675537109375,
0.0394287109375,
0.01531219482421875,
-0.0084991455078125,
0.042388916015625,
0.0140838623046875,
-0.040374755859375,
-0.01515960693359375,
0.0243682861328125,
0.039154052734375,
0.0595703125,
0.0229339599609375,
-0.0089569091796875,
-0.024688720703125,
0.022918701171875,
0.0181427001953125,
-0.005695343017578125,
-0.0306243896484375,
0.0655517578125,
-0.0026073455810546875,
-0.01070404052734375,
0.0022830963134765625,
-0.021514892578125,
0.03204345703125,
0.05914306640625,
0.00814056396484375,
0.0210418701171875,
0.023223876953125,
-0.03369140625,
-0.0233917236328125,
-0.03546142578125,
0.03302001953125,
-0.032989501953125,
0.007656097412109375,
0.029388427734375,
0.0029754638671875,
-0.0237579345703125,
0.0125579833984375,
-0.0179290771484375,
0.02532958984375,
0.040496826171875,
-0.07965087890625,
-0.03887939453125,
-0.0955810546875,
0.05303955078125,
-0.0880126953125,
-0.0009641647338867188,
0.0169677734375,
-0.00624847412109375,
0.037261962890625,
0.027557373046875,
-0.0281524658203125,
-0.0038776397705078125,
0.00254058837890625,
-0.01346588134765625,
-0.033294677734375,
0.004703521728515625,
0.02740478515625,
-0.00931549072265625,
0.0104827880859375,
0.0097503662109375,
-0.0260467529296875,
-0.0180816650390625,
-0.043701171875,
-0.0118408203125,
-0.002414703369140625,
-0.0187225341796875,
0.02642822265625,
-0.027191162109375,
0.015411376953125,
-0.030975341796875,
-0.01143646240234375,
-0.030181884765625,
-0.012237548828125,
0.05535888671875,
0.0310821533203125,
-0.05230712890625,
-0.01474761962890625,
0.060272216796875,
0.0177001953125,
-0.07354736328125,
-0.05889892578125,
0.05718994140625,
0.08160400390625,
-0.040252685546875,
-0.04730224609375,
0.00818634033203125,
0.0005984306335449219,
-0.01654052734375,
0.051727294921875,
0.0237579345703125,
-0.042022705078125,
-0.03033447265625,
0.0156402587890625,
0.0309600830078125,
0.00922393798828125,
-0.01806640625,
-0.024444580078125,
-0.00946044921875,
-0.00402069091796875,
0.0355224609375,
-0.055999755859375,
0.0230560302734375,
0.01316070556640625,
0.036407470703125,
-0.0152130126953125,
-0.051116943359375,
0.0286712646484375,
0.024932861328125,
-0.017974853515625,
-0.015625,
0.0309906005859375,
-0.0755615234375,
-0.007114410400390625,
0.0010232925415039062,
0.03472900390625,
-0.04669189453125,
0.045928955078125,
-0.0166015625,
0.0031566619873046875,
-0.01151275634765625,
-0.01084136962890625,
-0.0287933349609375,
-0.0164947509765625,
-0.0217742919921875,
-0.0180511474609375,
-0.02899169921875,
-0.00453948974609375,
0.006153106689453125,
0.0357666015625,
-0.01546478271484375,
-0.01523590087890625,
0.00579071044921875,
0.016937255859375,
0.01032257080078125,
0.0736083984375,
-0.0276641845703125,
0.0426025390625,
0.0241241455078125,
0.037078857421875,
0.0131988525390625,
0.034820556640625,
0.045166015625,
-0.048828125,
0.0265655517578125,
-0.058135986328125,
-0.051788330078125,
-0.0137481689453125,
-0.00487518310546875,
0.0274505615234375,
-0.0274200439453125,
-0.00930023193359375,
0.01554107666015625,
0.0051422119140625,
0.006786346435546875,
-0.025238037109375,
0.039794921875,
0.0063934326171875,
0.019805908203125,
0.0265655517578125,
0.0006127357482910156,
0.056365966796875,
0.01355743408203125,
0.00844573974609375,
0.0017023086547851562,
-0.0292205810546875,
0.033111572265625,
-0.017181396484375,
0.03466796875,
-0.033660888671875,
-0.006328582763671875,
-0.05828857421875,
0.013671875,
0.0237884521484375,
0.0017833709716796875,
0.04779052734375,
0.0142364501953125,
-0.03131103515625,
-0.011260986328125,
0.061798095703125,
0.01473236083984375,
-0.016357421875,
0.066162109375,
-0.027557373046875,
-0.005542755126953125,
0.0269775390625,
0.04034423828125,
-0.0128936767578125,
-0.0281829833984375,
-0.003993988037109375,
-0.036224365234375,
0.0234375,
-0.0196380615234375,
0.005542755126953125,
-0.035369873046875,
0.042633056640625,
-0.0107879638671875,
-0.01519775390625,
-0.002437591552734375,
-0.020263671875,
0.004131317138671875,
-0.007617950439453125,
0.039306640625,
0.0186767578125,
-0.0806884765625,
0.0284576416015625,
0.069580078125,
0.0014104843139648438,
-0.0301513671875,
0.00978851318359375,
0.020904541015625,
-0.041656494140625,
-0.0828857421875,
-0.006084442138671875,
0.0125579833984375,
-0.02337646484375,
0.01074981689453125,
-0.015594482421875,
-0.0243988037109375,
0.033172607421875,
-0.046051025390625,
0.04217529296875,
-0.00408935546875,
-0.049163818359375,
0.00974273681640625,
-0.050201416015625,
-0.0267333984375,
0.0182647705078125,
-0.0732421875,
0.0222015380859375,
-0.0204620361328125,
-0.0029754638671875,
-0.0252227783203125,
-0.048797607421875,
0.052337646484375,
-0.0182342529296875,
-0.0221710205078125,
0.0181427001953125,
0.02325439453125,
-0.00540924072265625,
-0.00018978118896484375,
0.00676727294921875,
-0.037567138671875,
-0.00870513916015625,
-0.0022792816162109375,
-0.0171051025390625,
0.0225372314453125,
0.0035419464111328125,
-0.07769775390625,
0.1016845703125,
-0.0000035762786865234375,
0.030303955078125,
-0.002445220947265625,
0.04296875,
-0.0237579345703125,
0.030303955078125,
-0.020477294921875,
0.028656005859375,
-0.0155181884765625,
0.0306396484375,
-0.0467529296875,
-0.0172271728515625,
0.00493621826171875,
0.039031982421875,
0.005634307861328125,
-0.0120086669921875,
0.032135009765625,
0.0199127197265625,
0.08355712890625,
0.017303466796875,
0.004230499267578125,
0.0068817138671875,
0.00936126708984375,
0.0113067626953125,
0.008575439453125,
-0.037872314453125,
0.040008544921875,
-0.0816650390625,
0.0114898681640625,
0.0259857177734375,
0.0229339599609375,
0.0215606689453125,
0.024261474609375,
0.0130157470703125,
-0.043304443359375,
0.0232086181640625,
0.043701171875,
-0.004474639892578125,
0.009368896484375,
0.04425048828125,
0.03387451171875,
-0.0784912109375,
-0.048553466796875,
-0.01910400390625,
0.038970947265625,
-0.006008148193359375,
0.07427978515625,
0.03448486328125,
0.03692626953125,
0.06719970703125,
-0.00628662109375,
0.04669189453125,
0.035308837890625,
-0.044403076171875,
0.02105712890625,
-0.003139495849609375,
0.004932403564453125,
-0.028289794921875,
0.039764404296875,
0.024200439453125,
0.011505126953125,
-0.031463623046875,
-0.0170440673828125,
0.00543212890625,
0.0012807846069335938,
-0.0024204254150390625,
-0.033538818359375,
-0.005413055419921875,
-0.045013427734375,
-0.01183319091796875,
-0.0248870849609375,
0.0182037353515625,
0.0147247314453125,
0.040283203125,
0.003971099853515625,
0.045196533203125,
-0.09283447265625,
-0.006175994873046875,
0.006317138671875,
-0.01316070556640625,
0.022613525390625,
0.0220184326171875,
-0.0009093284606933594,
0.0116119384765625,
-0.006256103515625,
0.0071258544921875,
-0.0020656585693359375,
-0.0089111328125,
0.022003173828125,
0.01074981689453125,
-0.0113372802734375,
0.000484466552734375,
0.01224517822265625,
0.0184326171875,
0.0268707275390625,
0.0220489501953125,
0.05963134765625,
0.048492431640625,
-0.0204010009765625,
-0.010345458984375,
0.00856781005859375,
-0.0182952880859375,
0.00484466552734375,
-0.01473236083984375,
0.03314208984375,
0.03179931640625,
0.00774383544921875,
-0.0204620361328125,
0.032958984375,
0.050567626953125,
-0.0162200927734375,
0.0206451416015625,
-0.0088348388671875,
-0.020965576171875,
0.0038890838623046875,
-0.02471923828125,
0.01702880859375,
0.0026149749755859375,
-0.02532958984375,
-0.006805419921875,
-0.037628173828125,
-0.01483154296875,
0.03350830078125,
0.0284271240234375,
-0.009735107421875,
0.039642333984375,
0.0155029296875,
-0.00601959228515625,
-0.01123809814453125,
-0.0032501220703125,
0.0177154541015625,
-0.0330810546875,
0.017822265625,
0.00020885467529296875,
-0.06414794921875,
-0.0380859375,
-0.0205078125,
0.0264739990234375,
0.01275634765625,
0.0318603515625,
0.005859375,
0.0261993408203125,
-0.001953125,
0.02044677734375,
-0.03887939453125,
-0.0003192424774169922,
0.01514434814453125,
0.0030193328857421875,
0.01410675048828125,
-0.0007572174072265625,
-0.042205810546875,
0.0555419921875,
-0.00730133056640625,
0.0181732177734375,
0.06842041015625,
-0.0570068359375,
0.00007802248001098633,
0.00557708740234375,
0.03485107421875,
-0.0193939208984375,
-0.02178955078125,
-0.041168212890625,
-0.00478363037109375,
0.0070343017578125,
-0.01068878173828125,
-0.027862548828125,
0.01348114013671875,
0.0030040740966796875,
-0.036041259765625,
0.0555419921875,
-0.0538330078125,
0.0885009765625,
0.042388916015625,
-0.0078582763671875,
0.01284027099609375,
-0.010589599609375,
-0.0301971435546875,
0.0226593017578125,
0.0006742477416992188,
-0.003520965576171875,
0.00807952880859375,
-0.035980224609375,
-0.0009665489196777344,
-0.01462554931640625,
0.01849365234375,
-0.0206146240234375,
-0.01349639892578125,
-0.006870269775390625,
0.0034961700439453125,
-0.01496124267578125,
0.0310516357421875,
-0.03924560546875,
-0.0648193359375,
0.0006017684936523438,
0.0015058517456054688,
-0.03411865234375,
-0.051025390625,
-0.07257080078125,
-0.043853759765625,
0.01971435546875,
0.053375244140625,
-0.049530029296875,
0.0120086669921875,
0.0455322265625,
-0.044677734375,
0.044830322265625,
-0.024200439453125,
0.0024318695068359375,
0.0221405029296875,
-0.057220458984375,
-0.07354736328125,
-0.041961669921875,
0.01910400390625,
-0.070556640625,
0.0214385986328125,
0.0290374755859375,
-0.01776123046875,
-0.00868988037109375,
0.0162506103515625,
0.02215576171875,
0.070068359375,
-0.01454925537109375,
-0.017852783203125,
-0.0187530517578125,
0.019561767578125,
0.0012035369873046875,
-0.0205841064453125,
0.00884246826171875,
-0.0136566162109375,
-0.026275634765625,
-0.042816162109375,
0.01312255859375,
0.0060272216796875,
-0.042816162109375,
-0.10052490234375,
0.048126220703125,
-0.0294036865234375,
-0.030303955078125,
0.0003066062927246094,
0.02032470703125,
-0.03271484375,
0.011749267578125,
0.010589599609375,
-0.02655029296875,
0.03961181640625,
0.0166473388671875,
-0.00214385986328125,
0.050994873046875,
0.01812744140625,
-0.00921630859375,
0.0234222412109375,
0.00827789306640625,
-0.01265716552734375,
0.00421142578125,
0.03607177734375,
-0.00005626678466796875,
-0.00445556640625,
0.0293426513671875,
-0.060546875,
-0.05462646484375,
-0.04974365234375,
-0.01360321044921875,
-0.01202392578125,
-0.056396484375,
0.0106048583984375,
-0.03765869140625,
0.0182037353515625,
-0.004222869873046875,
-0.006114959716796875,
0.011749267578125,
0.0074005126953125,
0.01200103759765625,
0.003734588623046875,
-0.0298614501953125,
-0.0004780292510986328,
-0.047760009765625,
-0.03729248046875,
-0.0232391357421875,
0.0030078887939453125,
0.014892578125,
-0.01458740234375,
-0.0265045166015625,
-0.021148681640625,
-0.061126708984375,
-0.03204345703125,
-0.053680419921875,
0.0054473876953125,
-0.0022602081298828125,
-0.0135345458984375,
-0.00606536865234375,
-0.0226898193359375,
0.01287841796875,
-0.006114959716796875,
-0.0123138427734375,
0.0052642822265625,
0.0023403167724609375,
-0.0150299072265625,
0.03851318359375,
0.0130462646484375,
-0.025665283203125,
-0.030426025390625,
0.0005350112915039062,
-0.021087646484375,
0.00957489013671875,
0.0148468017578125,
0.0300750732421875,
-0.002605438232421875,
-0.005702972412109375,
0.0189056396484375,
-0.04058837890625,
-0.034698486328125,
0.0296783447265625,
-0.0232086181640625,
0.01366424560546875,
-0.0161285400390625,
-0.008209228515625,
0.044769287109375,
-0.037139892578125,
-0.0012187957763671875,
0.016754150390625,
-0.0277252197265625,
-0.0577392578125,
0.0309600830078125,
0.0039215087890625,
0.0198974609375,
0.0241851806640625
] |
c6f12016ba49560a7187f37f7b2aa82530a40b27 | Wordpress Stackexchange
Q: How to override WooCommerce template files? I was trying to customize the shop page (adding widget area to the page). Is there any way or plugin to help me do so? I created a
page-shop.php however no changes were seen.
A: The WooCommerce template files are different from the WordPress Template files look at this to see how it works and the template file for shop pages is archive-product.php
Usually, all themes provide a separate sidebar area for the shop page, did you check if your theme is compatible with WooCommerce? If yes then you should have a sidebar available under Appearance->Widgets with name similar to 'Shop Sidebar'
How to override a template?
To override the shop page,
copy: wp-content/plugins/woocommerce/templates/archive-product.php to wp-content/themes/your_theme_name/woocommerce/archive-product.php
and then make the necessary changes to the template in your themes folder.
What happens is WooCommerce checks for the archive-product.php file in theme directory first and if it finds a file in woocommerce/ directory then it will use that file instead of the default one.
So now you have to edit the file inside your_theme_folder/woocommerce to make any changes.
| Q: How to override WooCommerce template files? I was trying to customize the shop page (adding widget area to the page). Is there any way or plugin to help me do so? I created a
page-shop.php however no changes were seen.
A: The WooCommerce template files are different from the WordPress Template files look at this to see how it works and the template file for shop pages is archive-product.php
Usually, all themes provide a separate sidebar area for the shop page, did you check if your theme is compatible with WooCommerce? If yes then you should have a sidebar available under Appearance->Widgets with name similar to 'Shop Sidebar'
How to override a template?
To override the shop page,
copy: wp-content/plugins/woocommerce/templates/archive-product.php to wp-content/themes/your_theme_name/woocommerce/archive-product.php
and then make the necessary changes to the template in your themes folder.
What happens is WooCommerce checks for the archive-product.php file in theme directory first and if it finds a file in woocommerce/ directory then it will use that file instead of the default one.
So now you have to edit the file inside your_theme_folder/woocommerce to make any changes.
A: If you are using custom WooCommerce template overrides in your theme you need to declare WooCommerce support using the add_theme_support function. WooCommerce template overrides are only enabled on themes that declare WooCommerce support. If you do not declare WooCommerce support in your theme, WooCommerce will assume the theme is not designed for WooCommerce compatibility and will use shortcode-based unsupported theme rendering to display the shop.
Declaring WooCommerce support is straightforward and involves adding one function in your theme's functions.php file.
function mytheme_add_woocommerce_support() {
add_theme_support( 'woocommerce' );
}
add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );
Now override the template file
copy: wp-content/plugins/woocommerce/templates/archive-product.php
to wp-content/themes/your_theme_name/woocommerce/archive-product.php
A: Please note if you trying to override woocommerce shop page such way as suggested above
To override the shop page,
copy: wp-content/plugins/woocommerce/templates/archive-product.php
to wp-content/themes/your_theme_name/woocommerce/archive-product.php
You also have impact on category shop pages.
If you want have only impact on shop page separately it will be better create new template in:
wp-content/themes/your_theme_name/archive-product.php
| wordpress | {
"language": "en",
"length": 336,
"provenance": "stackexchange_00019.jsonl.gz:473010",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256088"
} | [
0.029937744140625,
-0.0269012451171875,
-0.00510406494140625,
-0.00017559528350830078,
-0.0245513916015625,
-0.04107666015625,
0.050018310546875,
-0.0124053955078125,
-0.01432037353515625,
0.0301513671875,
-0.0389404296875,
-0.01373291015625,
0.0180206298828125,
0.00284576416015625,
0.0027713775634765625,
-0.0306854248046875,
0.0162811279296875,
0.019866943359375,
0.046478271484375,
0.0078277587890625,
-0.00234222412109375,
0.03350830078125,
0.004913330078125,
0.0228118896484375,
0.01151275634765625,
-0.020721435546875,
0.13037109375,
-0.03302001953125,
0.05609130859375,
-0.0020275115966796875,
0.038330078125,
-0.06231689453125,
0.0369873046875,
0.0003154277801513672,
-0.033233642578125,
-0.0211944580078125,
-0.0272216796875,
0.004688262939453125,
-0.0183868408203125,
0.0047760009765625,
0.0443115234375,
-0.031646728515625,
0.016204833984375,
-0.0029811859130859375,
0.0032978057861328125,
-0.0304412841796875,
0.027069091796875,
-0.048431396484375,
0.042999267578125,
-0.015838623046875,
-0.0179443359375,
0.0294036865234375,
-0.0037288665771484375,
-0.0184478759765625,
-0.0186004638671875,
-0.01235198974609375,
-0.050262451171875,
0.0036144256591796875,
0.036468505859375,
0.0033283233642578125,
0.003875732421875,
-0.034637451171875,
0.025299072265625,
-0.013946533203125,
0.0095977783203125,
-0.00543975830078125,
0.00848388671875,
0.0230560302734375,
-0.030120849609375,
0.025054931640625,
0.034576416015625,
-0.03106689453125,
0.01541900634765625,
0.01393890380859375,
-0.047027587890625,
-0.0290069580078125,
0.036468505859375,
0.00391387939453125,
0.0227203369140625,
-0.01849365234375,
0.0191650390625,
0.018951416015625,
0.01837158203125,
-0.0638427734375,
0.034393310546875,
-0.0335693359375,
-0.00603485107421875,
-0.00830841064453125,
-0.01300811767578125,
-0.0034236907958984375,
-0.010498046875,
-0.0182342529296875,
-0.0190887451171875,
0.0161590576171875,
-0.0052490234375,
-0.022186279296875,
0.00897216796875,
0.01544952392578125,
-0.01380157470703125,
0.039306640625,
0.0225982666015625,
-0.05157470703125,
0.0802001953125,
-0.044677734375,
-0.0221710205078125,
0.0176239013671875,
0.0276641845703125,
0.0618896484375,
0.01155853271484375,
0.0286407470703125,
-0.002353668212890625,
0.007755279541015625,
-0.02471923828125,
-0.053192138671875,
0.007465362548828125,
0.03436279296875,
-0.0406494140625,
0.01027679443359375,
0.0234527587890625,
-0.018890380859375,
0.00664520263671875,
0.0276031494140625,
0.042633056640625,
-0.0322265625,
-0.011932373046875,
-0.00878143310546875,
-0.01404571533203125,
-0.0714111328125,
0.003368377685546875,
0.0168609619140625,
-0.0234527587890625,
-0.01290130615234375,
-0.01554107666015625,
0.06915283203125,
0.03466796875,
-0.01265716552734375,
0.05426025390625,
0.0270538330078125,
0.00568389892578125,
0.0162811279296875,
-0.01538848876953125,
-0.00478363037109375,
-0.0104827880859375,
-0.012451171875,
0.0302886962890625,
-0.00003439188003540039,
0.01021575927734375,
0.0219879150390625,
0.00974273681640625,
0.045135498046875,
0.005908966064453125,
-0.026885986328125,
0.0035247802734375,
0.037445068359375,
0.041046142578125,
0.01343536376953125,
0.051300048828125,
-0.009918212890625,
-0.0240631103515625,
-0.04010009765625,
-0.0494384765625,
-0.0189361572265625,
0.03057861328125,
-0.045989990234375,
-0.05133056640625,
0.043487548828125,
-0.01381683349609375,
-0.01190185546875,
0.02996826171875,
0.034210205078125,
0.0167388916015625,
-0.0183868408203125,
0.0158538818359375,
0.025543212890625,
-0.006221771240234375,
0.020233154296875,
-0.021759033203125,
0.041961669921875,
0.0212249755859375,
0.0267181396484375,
0.0049591064453125,
-0.0225372314453125,
0.0623779296875,
-0.0008955001831054688,
-0.03973388671875,
-0.023895263671875,
0.034637451171875,
0.02532958984375,
-0.006103515625,
0.0289306640625,
0.062347412109375,
-0.0007843971252441406,
-0.05987548828125,
0.059295654296875,
-0.00428009033203125,
-0.034027099609375,
0.01197052001953125,
0.0052947998046875,
-0.006511688232421875,
-0.025970458984375,
0.015594482421875,
0.02459716796875,
0.0168914794921875,
0.02374267578125,
-0.0017948150634765625,
0.045623779296875,
-0.0253448486328125,
0.0311279296875,
-0.0295867919921875,
0.055755615234375,
0.0259552001953125,
0.02972412109375,
-0.0455322265625,
-0.00437164306640625,
0.0201416015625,
-0.033538818359375,
-0.0205841064453125,
0.08648681640625,
0.002597808837890625,
0.07269287109375,
0.01178741455078125,
-0.0511474609375,
0.0243988037109375,
0.007598876953125,
0.026092529296875,
0.027801513671875,
-0.021240234375,
-0.0026531219482421875,
0.00634002685546875,
0.052581787109375,
-0.08099365234375,
0.002681732177734375,
-0.00543212890625,
-0.01488494873046875,
-0.044677734375,
-0.002223968505859375,
-0.0309906005859375,
-0.044281005859375,
-0.01398468017578125,
0.04718017578125,
0.030059814453125,
0.031951904296875,
-0.0098876953125,
0.013275146484375,
0.07623291015625,
-0.007415771484375,
0.00769805908203125,
0.0001513957977294922,
0.03741455078125,
0.038055419921875,
-0.02093505859375,
-0.0139007568359375,
0.0253448486328125,
-0.0634765625,
0.032745361328125,
0.029449462890625,
-0.0389404296875,
-0.04132080078125,
-0.0015201568603515625,
0.040496826171875,
-0.007778167724609375,
-0.003948211669921875,
0.0168304443359375,
-0.01207733154296875,
0.056488037109375,
0.03509521484375,
0.040985107421875,
0.020904541015625,
-0.037750244140625,
0.0273895263671875,
0.004558563232421875,
-0.058563232421875,
0.018524169921875,
0.0218505859375,
-0.036651611328125,
0.00412750244140625,
-0.041778564453125,
0.008331298828125,
0.017120361328125,
-0.0109405517578125,
0.0022068023681640625,
0.033935546875,
-0.011199951171875,
-0.00905609130859375,
0.005222320556640625,
-0.04937744140625,
-0.0008172988891601562,
0.034393310546875,
0.00392913818359375,
0.003444671630859375,
0.0250244140625,
-0.00844573974609375,
-0.04437255859375,
0.043121337890625,
-0.03521728515625,
-0.034881591796875,
0.03765869140625,
-0.02716064453125,
0.051239013671875,
-0.044281005859375,
0.047119140625,
0.0526123046875,
-0.057586669921875,
0.04638671875,
0.0162353515625,
-0.0249176025390625,
0.0282135009765625,
0.007354736328125,
-0.0114288330078125,
-0.01369476318359375,
-0.05902099609375,
0.0030364990234375,
0.0230712890625,
0.0177459716796875,
0.0267333984375,
-0.0108184814453125,
0.012054443359375,
0.03680419921875,
-0.01540374755859375,
-0.03863525390625,
0.027740478515625,
-0.05078125,
0.0171661376953125,
-0.019866943359375,
-0.018157958984375,
-0.020538330078125,
-0.00902557373046875,
0.006000518798828125,
-0.0184173583984375,
-0.039764404296875,
0.011932373046875,
-0.047119140625,
-0.0379638671875,
-0.03338623046875,
0.0183258056640625,
-0.001102447509765625,
-0.004108428955078125,
-0.0018796920776367188,
-0.01456451416015625,
-0.036102294921875,
0.00254058837890625,
0.0263214111328125,
0.01506805419921875,
0.00452423095703125,
0.036590576171875,
-0.0380859375,
-0.016326904296875,
0.01422882080078125,
0.021026611328125,
0.019012451171875,
-0.031982421875,
-0.01629638671875,
0.007793426513671875,
-0.0258026123046875,
-0.009796142578125,
0.034820556640625,
0.0179901123046875,
-0.0325927734375,
-0.01256561279296875,
-0.06646728515625,
-0.08154296875,
-0.0090179443359375,
-0.0704345703125,
0.07830810546875,
0.036163330078125,
0.01483917236328125,
-0.00649261474609375,
0.0552978515625,
0.015533447265625,
-0.0178985595703125,
0.01299285888671875,
-0.052642822265625,
0.0209197998046875,
0.0240478515625,
0.0272674560546875,
-0.0239105224609375,
0.03131103515625,
-0.0123291015625,
0.007171630859375,
0.0219879150390625,
-0.0039825439453125,
-0.005260467529296875,
0.01091766357421875,
-0.01531982421875,
-0.06683349609375,
0.03753662109375,
-0.069091796875,
0.0031147003173828125,
-0.04736328125,
-0.014984130859375,
0.0024662017822265625,
0.1070556640625,
0.005336761474609375,
-0.020233154296875,
0.0216217041015625,
0.022857666015625,
-0.0379638671875,
0.013031005859375,
-0.032623291015625,
-0.0165252685546875,
-0.07061767578125,
0.01296234130859375,
-0.0131988525390625,
-0.027374267578125,
0.0243988037109375,
-0.03277587890625,
-0.01739501953125,
-0.05035400390625,
0.015838623046875,
0.0079345703125,
0.006984710693359375,
0.03753662109375,
-0.027587890625,
0.017303466796875,
0.0011873245239257812,
-0.03436279296875,
-0.037689208984375,
-0.00848388671875,
-0.00878143310546875,
0.046844482421875,
0.016265869140625,
-0.0006775856018066406,
-0.034942626953125,
0.01849365234375,
-0.0169677734375,
0.027069091796875,
0.00504302978515625,
0.03167724609375,
-0.01349639892578125,
-0.0268707275390625,
0.009674072265625,
-0.03350830078125,
0.0127105712890625,
0.0091400146484375,
-0.0298309326171875,
0.0169219970703125,
-0.0149383544921875,
-0.002895355224609375,
0.0404052734375,
-0.03863525390625,
-0.10186767578125,
-0.05548095703125,
0.00502777099609375,
-0.00798797607421875,
-0.0069122314453125,
-0.0029144287109375,
-0.049407958984375,
-0.0560302734375,
0.0260772705078125,
-0.020538330078125,
-0.01329803466796875,
0.025390625,
0.0648193359375,
0.0098419189453125,
-0.002437591552734375,
-0.03363037109375,
0.0279388427734375,
0.0164794921875,
0.0286407470703125,
0.003021240234375,
-0.0318603515625,
-0.0028171539306640625,
0.005077362060546875,
0.00357818603515625,
-0.030609130859375,
-0.003696441650390625,
0.079833984375,
-0.0152587890625,
-0.0400390625,
0.020965576171875,
-0.07037353515625,
0.00958251953125,
-0.0096893310546875,
-0.0021114349365234375,
-0.003437042236328125,
0.020416259765625,
0.0120086669921875,
0.0116119384765625,
-0.00905609130859375,
-0.0180511474609375,
-0.033966064453125,
-0.006008148193359375,
0.0231781005859375,
0.0099029541015625,
0.0165252685546875,
-0.01024627685546875,
0.0050811767578125,
0.00396728515625,
0.00078582763671875,
-0.012420654296875,
-0.0224456787109375,
-0.0146331787109375,
-0.01165771484375,
0.028961181640625,
-0.01776123046875,
0.005771636962890625,
-0.0013818740844726562,
0.0281524658203125,
0.0231170654296875,
0.004009246826171875,
-0.0289306640625,
-0.0197296142578125,
-0.031951904296875,
-0.0219573974609375,
-0.032623291015625,
0.03289794921875,
0.00644683837890625,
-0.03973388671875,
-0.0023441314697265625,
-0.05609130859375,
-0.0192413330078125,
-0.0614013671875,
0.01181793212890625,
0.01849365234375,
-0.01071929931640625,
0.033660888671875,
0.00675201416015625,
0.05181884765625,
-0.01415252685546875,
-0.0265350341796875,
0.0128021240234375,
0.00728607177734375,
0.04217529296875,
0.0276336669921875,
-0.0484619140625,
0.0177001953125,
-0.0173492431640625,
0.003879547119140625,
-0.0172576904296875,
-0.03265380859375,
0.01076507568359375,
0.021392822265625,
-0.02642822265625,
-0.005649566650390625,
0.0049285888671875,
-0.029449462890625,
0.0081787109375,
-0.017425537109375,
-0.04315185546875,
-0.0228271484375,
0.00690460205078125,
-0.0113067626953125,
-0.004177093505859375,
-0.03143310546875,
-0.016998291015625,
0.01418304443359375,
-0.053619384765625,
-0.009368896484375,
0.043487548828125,
-0.040283203125,
-0.0004589557647705078,
0.006763458251953125,
-0.00592803955078125,
0.01273345947265625,
0.0237579345703125,
-0.1136474609375,
-0.032623291015625,
-0.01751708984375,
-0.00024700164794921875,
0.0260162353515625,
-0.025177001953125,
0.047698974609375,
-0.0260772705078125,
-0.0292816162109375,
-0.0238037109375,
0.03076171875,
0.03424072265625,
0.0355224609375,
-0.0335693359375,
-0.019073486328125,
-0.0310211181640625,
-0.041015625,
-0.079345703125,
-0.0258636474609375,
-0.057220458984375,
0.0401611328125,
-0.01235198974609375,
0.005855560302734375,
-0.020843505859375,
-0.01039886474609375,
-0.002201080322265625,
0.03472900390625,
0.0078125,
0.0318603515625,
-0.0364990234375,
0.07171630859375,
0.0030517578125,
0.03814697265625,
-0.0275726318359375,
-0.003665924072265625,
-0.0399169921875,
0.0088958740234375,
-0.007381439208984375,
0.004425048828125,
-0.03485107421875,
-0.00949859619140625,
-0.0521240234375,
0.050750732421875,
0.12176513671875,
-0.0032806396484375,
0.022613525390625,
-0.03448486328125,
-0.006641387939453125,
-0.0304412841796875,
0.048858642578125,
-0.05902099609375,
0.0006861686706542969,
0.00208282470703125,
-0.027984619140625,
0.0276031494140625,
0.01186370849609375,
-0.03460693359375,
0.057281494140625,
-0.0267333984375,
0.050201416015625,
0.0230865478515625,
-0.0775146484375,
0.09381103515625,
0.0297393798828125,
-0.0213470458984375,
0.0238037109375,
-0.03857421875,
-0.007167816162109375,
0.002285003662109375,
0.040618896484375,
-0.01715087890625,
0.0055999755859375,
0.0501708984375,
-0.0019741058349609375,
-0.025146484375,
0.01149749755859375,
-0.02056884765625,
0.0308685302734375,
0.07720947265625,
0.0693359375,
-0.11834716796875,
0.0105133056640625,
0.0054168701171875,
0.0034160614013671875,
0.033935546875,
0.00861358642578125,
-0.006725311279296875,
-0.0201416015625,
0.06268310546875,
-0.00321197509765625,
0.0010786056518554688,
0.0309600830078125,
-0.017120361328125,
-0.0027065277099609375,
0.0233154296875,
0.052459716796875,
0.0183258056640625,
-0.0259246826171875,
-0.016693115234375,
0.015777587890625,
0.01010894775390625,
0.0000966191291809082,
0.009521484375,
-0.0056610107421875,
0.002880096435546875,
0.0020503997802734375,
0.03570556640625,
-0.03662109375,
0.02874755859375,
0.03912353515625,
0.0056304931640625,
0.00791168212890625,
0.037841796875,
-0.0166473388671875,
0.024566650390625,
-0.0199127197265625,
0.0124359130859375,
-0.00412750244140625,
-0.02996826171875,
-0.0185699462890625,
0.0198974609375,
-0.0675048828125,
0.00525665283203125,
-0.05169677734375,
0.0216827392578125,
0.0002961158752441406,
0.0291595458984375,
0.049957275390625,
-0.025970458984375,
-0.01348114013671875,
0.04425048828125,
0.0219268798828125,
-0.016632080078125,
0.006412506103515625,
0.041259765625,
-0.0430908203125,
0.0006928443908691406,
0.0369873046875,
0.0088348388671875,
-0.03277587890625,
0.044891357421875,
-0.052825927734375,
0.0869140625,
0.0015974044799804688,
0.0009083747863769531,
0.034698486328125,
0.037078857421875,
-0.05487060546875,
-0.00913238525390625,
-0.025146484375,
0.00824737548828125,
0.019927978515625,
0.050140380859375,
0.01212310791015625,
0.0038604736328125,
0.0216064453125,
0.0252838134765625,
0.036865234375,
-0.0007548332214355469,
-0.0109710693359375,
0.0016145706176757812,
0.08245849609375,
0.041473388671875,
0.0036296844482421875,
0.0251312255859375,
-0.01788330078125,
-0.0462646484375,
-0.0216522216796875,
-0.0438232421875,
0.0067291259765625,
-0.048828125,
0.0087890625,
-0.00484466552734375,
-0.01203155517578125,
-0.0169219970703125,
-0.0239105224609375,
0.0257568359375,
-0.0017595291137695312,
-0.0309295654296875,
0.006053924560546875,
-0.04412841796875,
-0.02056884765625,
0.002910614013671875,
-0.023040771484375,
0.0170745849609375,
0.01605224609375,
-0.02001953125,
0.031585693359375,
0.004367828369140625,
0.0364990234375,
-0.0129241943359375,
0.00923919677734375,
0.0418701171875,
-0.01140594482421875,
0.00876617431640625,
0.038787841796875,
-0.0276641845703125,
0.008392333984375,
0.03668212890625,
0.0186767578125,
0.0213470458984375,
0.058685302734375,
0.03466796875,
-0.004547119140625,
-0.0196380615234375,
-0.0066680908203125,
-0.0030765533447265625,
-0.0306243896484375,
-0.00244903564453125,
-0.0380859375,
-0.018157958984375,
-0.04998779296875,
-0.048492431640625,
-0.034027099609375,
-0.002941131591796875,
0.035858154296875,
0.0149688720703125,
-0.01079559326171875,
-0.0207061767578125,
-0.0207366943359375,
-0.00971221923828125,
-0.0338134765625,
0.0201873779296875,
-0.0195159912109375,
0.037322998046875,
0.0010662078857421875,
0.05712890625,
-0.040008544921875,
-0.023712158203125,
0.01129913330078125,
0.0036640167236328125,
-0.041717529296875,
-0.004650115966796875,
-0.0430908203125,
-0.041412353515625,
-0.0147247314453125,
0.045013427734375,
-0.018402099609375,
0.00948333740234375,
0.015350341796875,
0.0234222412109375,
0.01221466064453125,
-0.026580810546875,
0.02557373046875,
-0.0167388916015625,
0.02435302734375,
-0.016326904296875,
0.01302337646484375,
-0.003063201904296875,
-0.01898193359375,
-0.0227813720703125,
0.045989990234375,
0.0154876708984375,
-0.032745361328125,
0.03424072265625,
-0.01462554931640625,
-0.0271759033203125,
0.040557861328125,
-0.0084991455078125,
0.076171875,
-0.0038013458251953125,
-0.07086181640625,
-0.0152740478515625,
-0.043212890625,
-0.033416748046875,
0.01392364501953125,
0.03094482421875,
-0.04010009765625,
0.045654296875,
0.01454925537109375,
-0.0149993896484375,
0.01190185546875,
0.0008921623229980469,
0.00901031494140625,
-0.03533935546875,
0.0199432373046875,
-0.01351165771484375,
-0.0377197265625,
-0.01495361328125,
-0.032440185546875,
0.0361328125,
0.041290283203125,
0.035247802734375,
0.00982666015625,
0.044189453125,
-0.00745391845703125,
0.0023651123046875,
-0.016876220703125,
-0.03448486328125,
0.04998779296875,
-0.033843994140625,
-0.036102294921875,
0.0068359375,
-0.0137481689453125,
-0.007678985595703125,
0.0438232421875,
-0.0494384765625,
-0.012481689453125,
-0.024749755859375,
0.026031494140625,
-0.0123748779296875,
0.0110626220703125,
-0.01812744140625,
-0.0305633544921875,
-0.00896453857421875,
0.0229949951171875,
0.0029125213623046875,
-0.0153045654296875,
-0.016021728515625,
0.014617919921875,
-0.0025768280029296875,
-0.0133819580078125,
0.0146484375,
-0.006259918212890625,
0.037353515625,
0.039703369140625,
-0.039886474609375,
-0.03839111328125,
-0.00411224365234375,
-0.00836181640625,
-0.00555419921875,
0.01399993896484375,
0.0169525146484375,
-0.00482177734375,
-0.0450439453125,
-0.00939178466796875,
0.0243072509765625,
0.002227783203125,
-0.01157379150390625,
0.00792694091796875,
0.029998779296875,
-0.036346435546875,
-0.005718231201171875,
-0.01129150390625,
-0.01445770263671875,
-0.0290069580078125,
-0.00829315185546875,
0.0244140625,
-0.0012044906616210938,
0.03289794921875,
-0.0229034423828125,
0.009185791015625,
0.0283660888671875,
0.0084381103515625,
-0.052093505859375,
0.01239013671875,
-0.006755828857421875,
0.032012939453125,
0.007213592529296875,
-0.038726806640625,
0.0003027915954589844,
-0.0121612548828125,
-0.042724609375,
-0.0069580078125,
-0.07305908203125,
-0.0254364013671875,
-0.060028076171875,
-0.0119171142578125,
0.037811279296875,
-0.0083465576171875,
-0.01434326171875,
-0.0072021484375,
-0.003696441650390625,
0.036956787109375,
-0.035797119140625,
-0.0279998779296875,
0.0369873046875,
-0.0012922286987304688,
0.01318359375,
-0.04888916015625,
-0.02716064453125,
-0.035919189453125,
0.0439453125,
-0.0016651153564453125,
-0.01593017578125,
0.007724761962890625,
-0.045928955078125,
-0.0302886962890625,
0.02471923828125,
0.0112457275390625,
-0.0211181640625,
-0.03472900390625,
0.0226287841796875,
-0.021240234375,
0.0200347900390625,
-0.0302734375,
0.00937652587890625,
0.0120391845703125,
0.038330078125,
0.015533447265625,
0.031097412109375,
0.0047149658203125,
0.0272216796875,
-0.024932861328125,
0.035919189453125,
0.01099395751953125,
0.031524658203125,
0.0014429092407226562,
-0.0411376953125,
0.0289154052734375,
0.016754150390625,
-0.040771484375,
-0.043914794921875,
0.0266265869140625,
0.0318603515625,
0.0308074951171875,
0.02301025390625,
-0.052276611328125,
-0.03546142578125,
0.0289306640625,
0.04925537109375,
0.0197906494140625,
0.0095062255859375,
-0.022979736328125,
-0.001995086669921875,
-0.0052947998046875,
0.005687713623046875,
0.0163726806640625,
-0.057037353515625,
0.004100799560546875,
0.027496337890625,
-0.053558349609375,
0.01812744140625,
0.0275115966796875,
-0.0738525390625,
0.0279541015625,
-0.00738525390625,
-0.01213836669921875,
-0.062347412109375,
0.006256103515625,
0.056365966796875,
-0.02886962890625,
0.0172576904296875,
-0.0085906982421875,
0.0231781005859375,
0.037353515625,
-0.05035400390625,
-0.023284912109375,
0.0419921875,
-0.06976318359375,
-0.01132965087890625,
-0.026763916015625,
0.043914794921875,
-0.047454833984375,
0.0293731689453125,
-0.010406494140625,
0.023529052734375,
-0.01515960693359375,
-0.0048065185546875,
0.01056671142578125,
0.05926513671875,
0.0019168853759765625,
0.10333251953125,
0.0169525146484375,
-0.00782012939453125,
-0.0036067962646484375,
0.045440673828125,
-0.005527496337890625,
-0.0075225830078125,
0.002483367919921875,
-0.056304931640625,
-0.0101165771484375,
-0.0162200927734375,
-0.00751495361328125,
-0.05560302734375,
0.005641937255859375,
-0.0209808349609375,
-0.0054779052734375,
0.0174407958984375
] |
1cc1da0ac487d10dbcaa888c4510ddf7ded527c5 | Wordpress Stackexchange
Q: How to fix ob_end_flush() error? At the bottom of my WP-admin pages I get this:
ob_end_flush(): failed to send buffer of zlib output compression (1) in C:\Users\anticaking\Desktop\Website\wordpress\wp-includes\functions.php on line 3718.
Line 3718:
function wp_ob_end_flush_all() {
$levels = ob_get_level();
for ($i=0; $i<$levels; $i++)
ob_end_flush();
}
I've removed all plug-ins and swapped themes and still get the error so I cannot pinpoint what is causing it. What is it and how do I fix this?
A: I also had this issue with wordpress and couldn't properly resolve it. Ended up with this filthy hack to prevent the error from showing:
// Get the current error reporting level
$e_level = error_reporting();
// Turn off error reporting
error_reporting(0);
ob_start();
echo 'This is a horrible hack';
$buffer_contents = ob_get_clean();
ob_end_flush();
// Reset error reporting level to previous
error_reporting($e_level);
Everything does seem to work as expected, however I'm not proud of it!
| Q: How to fix ob_end_flush() error? At the bottom of my WP-admin pages I get this:
ob_end_flush(): failed to send buffer of zlib output compression (1) in C:\Users\anticaking\Desktop\Website\wordpress\wp-includes\functions.php on line 3718.
Line 3718:
function wp_ob_end_flush_all() {
$levels = ob_get_level();
for ($i=0; $i<$levels; $i++)
ob_end_flush();
}
I've removed all plug-ins and swapped themes and still get the error so I cannot pinpoint what is causing it. What is it and how do I fix this?
A: I also had this issue with wordpress and couldn't properly resolve it. Ended up with this filthy hack to prevent the error from showing:
// Get the current error reporting level
$e_level = error_reporting();
// Turn off error reporting
error_reporting(0);
ob_start();
echo 'This is a horrible hack';
$buffer_contents = ob_get_clean();
ob_end_flush();
// Reset error reporting level to previous
error_reporting($e_level);
Everything does seem to work as expected, however I'm not proud of it!
A: bool ob_end_flush ( void )
This function will send the contents of the topmost output buffer (if any) and turn this output buffer off. If you want to further process the buffer's contents you have to call ob_get_contents() before ob_end_flush() as the buffer contents are discarded after ob_end_flush() is called.
for more: http://php.net/manual/en/function.ob-end-flush.php
Try this,
put this into, functions.php file.
remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
A: I wouldn't recommend disabling the wp_ob_end_flush_all() function entirely, there's a good reason it's there. Instead, try replacing it with the following:
/**
* Proper ob_end_flush() for all levels
*
* This replaces the WordPress `wp_ob_end_flush_all()` function
* with a replacement that doesn't cause PHP notices.
*/
remove_action( 'shutdown', 'wp_ob_end_flush_all', 1 );
add_action( 'shutdown', function() {
while ( @ob_end_flush() );
} );
I have a write-up with more details on what's going on, and why this is the best approach to fix it: Quick Fix for WordPress ob_end_flush() Error
A: I tried a brute-force approach which worked (I'm not satisfied with it, but hope this can help someone):
In the last line of the functions.php in the /wp-content/themes/<theme_directory>, add the following line:
ob_get_clean();
| wordpress | {
"language": "en",
"length": 336,
"provenance": "stackexchange_00019.jsonl.gz:473027",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256149"
} | [
0.0341796875,
-0.0261993408203125,
0.003398895263671875,
-0.054046630859375,
-0.02105712890625,
-0.007282257080078125,
-0.002574920654296875,
-0.014434814453125,
0.0623779296875,
0.032470703125,
0.032501220703125,
-0.07049560546875,
0.009002685546875,
-0.036651611328125,
-0.07330322265625,
0.004001617431640625,
0.043487548828125,
-0.0291900634765625,
0.0323486328125,
-0.0006318092346191406,
-0.004180908203125,
0.03277587890625,
0.030670166015625,
-0.0221710205078125,
-0.048797607421875,
0.0306243896484375,
0.07867431640625,
-0.01146697998046875,
-0.040496826171875,
-0.0462646484375,
-0.001220703125,
0.03778076171875,
-0.0031070709228515625,
0.05621337890625,
-0.04547119140625,
-0.0338134765625,
-0.03759765625,
0.0367431640625,
0.00492095947265625,
0.00853729248046875,
0.017303466796875,
-0.0137786865234375,
-0.01183319091796875,
0.01209259033203125,
-0.045166015625,
0.0350341796875,
-0.03955078125,
-0.0219573974609375,
-0.000021636486053466797,
0.03515625,
-0.0029125213623046875,
0.00048065185546875,
0.00807952880859375,
0.003948211669921875,
-0.016632080078125,
-0.033172607421875,
0.009735107421875,
0.04888916015625,
0.01519012451171875,
0.0156707763671875,
-0.025177001953125,
0.047576904296875,
-0.01580810546875,
-0.040130615234375,
-0.010009765625,
-0.0219573974609375,
0.0274200439453125,
0.00377655029296875,
-0.00885772705078125,
-0.01125335693359375,
0.03173828125,
0.00907135009765625,
-0.0306396484375,
0.00952911376953125,
0.01427459716796875,
-0.01523590087890625,
-0.01030731201171875,
-0.00620269775390625,
0.00923919677734375,
0.0579833984375,
-0.01268768310546875,
0.00739288330078125,
-0.036407470703125,
-0.005710601806640625,
-0.00795745849609375,
0.020538330078125,
-0.0299835205078125,
-0.00010377168655395508,
0.01239013671875,
-0.01702880859375,
-0.004856109619140625,
0.005542755126953125,
0.028076171875,
-0.00795745849609375,
-0.032196044921875,
-0.035552978515625,
-0.004467010498046875,
0.00763702392578125,
-0.0251007080078125,
0.0019483566284179688,
-0.01267242431640625,
-0.018463134765625,
0.0019283294677734375,
-0.0281829833984375,
0.0347900390625,
0.004550933837890625,
-0.0301361083984375,
-0.08050537109375,
0.042266845703125,
0.0291748046875,
-0.00054931640625,
0.039459228515625,
-0.0200958251953125,
-0.06646728515625,
0.0175933837890625,
0.037322998046875,
-0.034027099609375,
0.0264129638671875,
0.01340484619140625,
0.0048675537109375,
0.03143310546875,
0.0347900390625,
-0.046234130859375,
-0.00860595703125,
-0.019195556640625,
-0.03436279296875,
-0.002590179443359375,
-0.0102996826171875,
0.02679443359375,
0.01218414306640625,
-0.0284576416015625,
-0.0023345947265625,
0.0430908203125,
0.0216827392578125,
0.0211334228515625,
-0.01397705078125,
0.061309814453125,
-0.0249176025390625,
0.00782012939453125,
0.020751953125,
-0.00022685527801513672,
-0.034698486328125,
-0.01157379150390625,
-0.0038967132568359375,
-0.005950927734375,
0.01947021484375,
0.0307769775390625,
0.01503753662109375,
-0.0012655258178710938,
-0.052825927734375,
-0.0031719207763671875,
0.0101165771484375,
0.04302978515625,
-0.01043701171875,
-0.023529052734375,
-0.04412841796875,
0.0182952880859375,
-0.030975341796875,
-0.006801605224609375,
-0.0626220703125,
-0.007106781005859375,
-0.0195770263671875,
0.006267547607421875,
0.0006361007690429688,
0.005931854248046875,
0.005443572998046875,
-0.020477294921875,
0.01081085205078125,
0.0249786376953125,
-0.043243408203125,
0.04156494140625,
0.005126953125,
0.00870513916015625,
-0.006900787353515625,
0.003368377685546875,
-0.0099334716796875,
0.011199951171875,
-0.00411224365234375,
0.0294189453125,
-0.020965576171875,
-0.047332763671875,
-0.038726806640625,
0.045257568359375,
-0.03509521484375,
-0.027923583984375,
-0.00791168212890625,
0.031463623046875,
0.0290374755859375,
-0.0045928955078125,
-0.0005488395690917969,
0.066162109375,
0.0280303955078125,
-0.0003933906555175781,
0.005893707275390625,
-0.00836944580078125,
-0.0306396484375,
-0.0225372314453125,
-0.00505828857421875,
-0.0204315185546875,
0.0133056640625,
-0.0169219970703125,
0.003925323486328125,
-0.02130126953125,
-0.0224456787109375,
-0.11376953125,
0.0178680419921875,
-0.0499267578125,
0.0579833984375,
0.036895751953125,
0.027252197265625,
-0.00833892822265625,
0.004413604736328125,
-0.0157318115234375,
-0.0081787109375,
-0.035552978515625,
0.022796630859375,
-0.0249176025390625,
0.0450439453125,
0.00797271728515625,
0.072265625,
-0.004543304443359375,
-0.036529541015625,
-0.01503753662109375,
-0.045440673828125,
0.045654296875,
0.0223846435546875,
-0.025390625,
0.008514404296875,
0.05419921875,
-0.00972747802734375,
0.049041748046875,
0.04180908203125,
0.0219573974609375,
0.043060302734375,
-0.0203399658203125,
-0.0302734375,
-0.03192138671875,
-0.0888671875,
0.0181121826171875,
0.07000732421875,
0.0450439453125,
0.025787353515625,
-0.01396942138671875,
-0.0253143310546875,
0.055389404296875,
-0.059112548828125,
-0.004322052001953125,
-0.01259613037109375,
0.008209228515625,
0.00548553466796875,
-0.0300140380859375,
-0.0313720703125,
0.026153564453125,
-0.05853271484375,
0.010498046875,
0.0316162109375,
-0.02899169921875,
-0.02520751953125,
0.01308441162109375,
-0.01495361328125,
0.02642822265625,
-0.04425048828125,
-0.0197906494140625,
0.0049591064453125,
0.00984954833984375,
0.01319122314453125,
0.021087646484375,
0.0260772705078125,
0.009033203125,
0.0124969482421875,
0.0072479248046875,
-0.047332763671875,
0.006683349609375,
0.0258026123046875,
-0.037017822265625,
-0.0124359130859375,
-0.0191650390625,
0.00478363037109375,
0.0020008087158203125,
-0.003520965576171875,
0.01287078857421875,
0.006526947021484375,
0.001316070556640625,
-0.0018129348754882812,
0.00101470947265625,
-0.0078582763671875,
0.0212860107421875,
0.039154052734375,
-0.024932861328125,
-0.02008056640625,
0.002986907958984375,
0.02923583984375,
-0.0307159423828125,
0.055328369140625,
-0.047454833984375,
-0.01166534423828125,
0.055755615234375,
-0.03302001953125,
0.01261138916015625,
-0.0019969940185546875,
0.09100341796875,
0.07086181640625,
-0.0051727294921875,
0.00470733642578125,
0.005100250244140625,
-0.0161285400390625,
0.018829345703125,
0.01427459716796875,
-0.016571044921875,
-0.028656005859375,
-0.050018310546875,
-0.0287322998046875,
0.04437255859375,
0.05059814453125,
0.043609619140625,
-0.0025157928466796875,
0.0172576904296875,
0.067138671875,
-0.0101318359375,
-0.05194091796875,
-0.03741455078125,
-0.01025390625,
-0.0153656005859375,
0.026123046875,
0.004421234130859375,
0.0015077590942382812,
0.04559326171875,
0.00820159912109375,
-0.01080322265625,
-0.004688262939453125,
-0.039337158203125,
-0.045867919921875,
-0.05584716796875,
-0.0163116455078125,
0.0023746490478515625,
0.021636962890625,
0.0005946159362792969,
0.02166748046875,
-0.013702392578125,
-0.053924560546875,
-0.0192718505859375,
-0.0144805908203125,
-0.0302886962890625,
-0.014862060546875,
-0.0088958740234375,
-0.0243377685546875,
-0.021484375,
-0.0020961761474609375,
-0.03973388671875,
-0.0274505615234375,
0.0215301513671875,
-0.0227508544921875,
-0.03680419921875,
-0.07244873046875,
-0.01751708984375,
0.0216522216796875,
0.02447509765625,
-0.06695556640625,
0.002323150634765625,
-0.0706787109375,
-0.026153564453125,
0.034515380859375,
-0.0271759033203125,
0.01186370849609375,
0.0107879638671875,
-0.031646728515625,
0.00992584228515625,
-0.0121917724609375,
-0.013031005859375,
-0.0015382766723632812,
0.0012493133544921875,
-0.041412353515625,
0.0304107666015625,
-0.009674072265625,
-0.0002579689025878906,
-0.0056610107421875,
0.043212890625,
-0.00604248046875,
-0.004119873046875,
0.0228271484375,
0.0017871856689453125,
0.0008130073547363281,
-0.03662109375,
-0.044952392578125,
-0.033966064453125,
0.0340576171875,
-0.03125,
0.0264892578125,
-0.0543212890625,
-0.0203399658203125,
-0.0272674560546875,
0.0758056640625,
0.009490966796875,
-0.0287628173828125,
0.002834320068359375,
-0.0036106109619140625,
0.004428863525390625,
0.0419921875,
-0.01007080078125,
-0.0187530517578125,
0.0166473388671875,
0.00711822509765625,
0.0037326812744140625,
-0.026885986328125,
-0.013427734375,
-0.007175445556640625,
0.014556884765625,
-0.004573822021484375,
0.035003662109375,
-0.02490234375,
-0.002552032470703125,
0.00804901123046875,
-0.0042877197265625,
-0.037506103515625,
-0.0205535888671875,
0.0008897781372070312,
-0.12042236328125,
-0.0168304443359375,
-0.0706787109375,
0.079833984375,
0.048095703125,
-0.023406982421875,
-0.019500732421875,
0.06475830078125,
0.03662109375,
0.0338134765625,
-0.00292205810546875,
-0.01161956787109375,
0.0003936290740966797,
-0.0289764404296875,
0.01335906982421875,
-0.0231781005859375,
0.02020263671875,
0.00980377197265625,
-0.03155517578125,
-0.0090789794921875,
-0.040771484375,
-0.0305328369140625,
0.00797271728515625,
-0.052520751953125,
-0.033050537109375,
-0.0232391357421875,
0.0106658935546875,
0.0206298828125,
-0.0081634521484375,
0.017547607421875,
-0.0251617431640625,
-0.01702880859375,
-0.01108551025390625,
0.042449951171875,
-0.020416259765625,
0.0242767333984375,
0.0014553070068359375,
0.01806640625,
-0.0209808349609375,
-0.0304107666015625,
-0.0036334991455078125,
0.0102386474609375,
-0.00846099853515625,
0.002368927001953125,
0.0038547515869140625,
-0.00690460205078125,
-0.0026149749755859375,
-0.0209808349609375,
0.0086669921875,
-0.0328369140625,
0.03240966796875,
0.0035228729248046875,
-0.01294708251953125,
0.01255035400390625,
0.00043892860412597656,
-0.003631591796875,
-0.0024471282958984375,
-0.0008816719055175781,
0.0171051025390625,
-0.0282745361328125,
0.002933502197265625,
0.039031982421875,
-0.03961181640625,
-0.0133209228515625,
-0.06951904296875,
0.01318359375,
-0.0780029296875,
0.040313720703125,
0.013427734375,
0.00907135009765625,
0.0810546875,
0.056976318359375,
0.00269317626953125,
0.028411865234375,
0.0296630859375,
-0.0066070556640625,
0.024932861328125,
0.03302001953125,
-0.00463104248046875,
-0.01482391357421875,
0.005695343017578125,
0.044677734375,
0.0214996337890625,
-0.0482177734375,
0.01132965087890625,
0.006519317626953125,
0.004039764404296875,
0.01039886474609375,
0.0186309814453125,
0.04095458984375,
0.01024627685546875,
-0.024261474609375,
-0.0280914306640625,
-0.0204925537109375,
-0.00118255615234375,
-0.049591064453125,
-0.00691986083984375,
-0.004241943359375,
-0.0132904052734375,
-0.01065826416015625,
0.0533447265625,
-0.004314422607421875,
0.0191802978515625,
-0.01511383056640625,
-0.0095367431640625,
-0.007488250732421875,
0.07244873046875,
0.012359619140625,
-0.008026123046875,
-0.0087738037109375,
0.05487060546875,
0.032745361328125,
-0.034942626953125,
-0.0074462890625,
-0.005954742431640625,
0.043121337890625,
-0.025482177734375,
-0.0104522705078125,
0.041473388671875,
-0.020751953125,
-0.008514404296875,
0.08343505859375,
0.011627197265625,
-0.05908203125,
-0.047119140625,
-0.022979736328125,
0.06396484375,
-0.036163330078125,
0.0027523040771484375,
0.033050537109375,
0.0163726806640625,
0.032379150390625,
0.00539398193359375,
-0.017730712890625,
-0.0008444786071777344,
0.00437164306640625,
0.035308837890625,
-0.0109100341796875,
0.004180908203125,
-0.02490234375,
0.035186767578125,
-0.0538330078125,
-0.0197296142578125,
0.085693359375,
-0.054107666015625,
-0.0273895263671875,
0.0185546875,
0.03582763671875,
-0.025177001953125,
0.034515380859375,
0.0146026611328125,
0.0165863037109375,
-0.045166015625,
0.034027099609375,
-0.0452880859375,
-0.00897979736328125,
-0.00914764404296875,
-0.05206298828125,
-0.0592041015625,
-0.03839111328125,
0.0057220458984375,
0.0274658203125,
-0.007793426513671875,
-0.02764892578125,
0.00843048095703125,
-0.0015516281127929688,
-0.0007596015930175781,
0.03253173828125,
-0.020355224609375,
0.04425048828125,
-0.01617431640625,
0.036773681640625,
-0.00785064697265625,
0.0175018310546875,
0.0128326416015625,
-0.00650787353515625,
0.0102081298828125,
0.00994110107421875,
0.0207977294921875,
-0.01300048828125,
0.0033473968505859375,
-0.046112060546875,
0.039031982421875,
0.0017986297607421875,
-0.0026721954345703125,
0.01331329345703125,
0.012451171875,
-0.024658203125,
0.0277557373046875,
-0.01044464111328125,
-0.024566650390625,
0.0249176025390625,
-0.0136260986328125,
0.01039886474609375,
0.00634765625,
-0.00807952880859375,
0.01021575927734375,
-0.011474609375,
0.00621795654296875,
-0.0038852691650390625,
-0.032318115234375,
0.0142822265625,
0.0306549072265625,
0.0167388916015625,
0.0439453125,
-0.006603240966796875,
0.03570556640625,
0.027618408203125,
0.060089111328125,
0.0231781005859375,
-0.03692626953125,
0.02703857421875,
0.001110076904296875,
-0.0014276504516601562,
-0.022430419921875,
-0.0151519775390625,
0.054473876953125,
0.052734375,
0.086669921875,
-0.06243896484375,
0.005519866943359375,
0.006961822509765625,
-0.0626220703125,
0.0255279541015625,
-0.0251312255859375,
0.0164947509765625,
-0.033905029296875,
0.054901123046875,
0.0137176513671875,
-0.0066986083984375,
0.02459716796875,
-0.041961669921875,
-0.0140533447265625,
-0.033172607421875,
0.016357421875,
0.0007586479187011719,
-0.0159454345703125,
0.01068115234375,
0.0172882080078125,
-0.0002751350402832031,
0.037078857421875,
0.0204620361328125,
-0.0726318359375,
-0.0085296630859375,
0.0034313201904296875,
-0.0225372314453125,
-0.055877685546875,
-0.0143585205078125,
0.0126190185546875,
-0.0216522216796875,
-0.02130126953125,
0.028472900390625,
-0.03680419921875,
0.0196075439453125,
0.0026111602783203125,
-0.07440185546875,
0.03326416015625,
0.012176513671875,
0.001171112060546875,
0.027313232421875,
-0.08245849609375,
-0.01200103759765625,
-0.06793212890625,
0.054534912109375,
-0.018402099609375,
-0.002826690673828125,
0.07720947265625,
0.0022182464599609375,
-0.0185546875,
0.005916595458984375,
0.048004150390625,
-0.01016998291015625,
-0.006748199462890625,
0.098388671875,
-0.040496826171875,
0.00908660888671875,
0.0162506103515625,
0.0144500732421875,
-0.042877197265625,
-0.0002472400665283203,
-0.06573486328125,
0.074462890625,
0.0207672119140625,
0.016387939453125,
-0.0016193389892578125,
0.0280914306640625,
-0.03912353515625,
-0.01555633544921875,
-0.054046630859375,
0.080322265625,
0.0265350341796875,
0.01100921630859375,
-0.07177734375,
-0.01036834716796875,
-0.0214996337890625,
0.0026721954345703125,
-0.035736083984375,
0.0027751922607421875,
-0.02593994140625,
-0.0200958251953125,
0.010101318359375,
0.0295562744140625,
0.0291748046875,
0.0247650146484375,
0.03448486328125,
0.0126953125,
0.01433563232421875,
-0.0200958251953125,
0.049835205078125,
-0.09130859375,
0.01155853271484375,
0.0248260498046875,
-0.007381439208984375,
-0.022979736328125,
-0.00873565673828125,
-0.04425048828125,
-0.0772705078125,
0.004405975341796875,
0.0237884521484375,
-0.0047607421875,
0.0245819091796875,
-0.01247406005859375,
0.0245208740234375,
-0.040252685546875,
-0.003734588623046875,
-0.0135955810546875,
0.04107666015625,
0.01439666748046875,
0.020172119140625,
0.03338623046875,
0.0134735107421875,
0.0748291015625,
-0.0595703125,
-0.0121612548828125,
-0.0283660888671875,
0.00533294677734375,
-0.01242828369140625,
0.01029205322265625,
0.0256195068359375,
-0.0150604248046875,
0.015289306640625,
0.0273895263671875,
0.00501251220703125,
-0.014129638671875,
-0.045257568359375,
-0.003582000732421875,
-0.0033359527587890625,
0.035125732421875,
0.0132904052734375,
0.041961669921875,
0.02984619140625,
0.03228759765625,
0.016357421875,
-0.02850341796875,
-0.01233673095703125,
0.00905609130859375,
-0.0032787322998046875,
0.030242919921875,
0.024017333984375,
-0.021728515625,
0.00762176513671875,
0.0014486312866210938,
0.01354217529296875,
0.037078857421875,
-0.0123748779296875,
0.00909423828125,
-0.04791259765625,
-0.002841949462890625,
-0.0380859375,
-0.0013151168823242188,
-0.0144500732421875,
0.04754638671875,
-0.048614501953125,
0.01122283935546875,
0.0175933837890625,
0.040863037109375,
-0.037017822265625,
0.03668212890625,
0.0157012939453125,
-0.015625,
-0.051300048828125,
-0.01812744140625,
0.01071929931640625,
-0.045867919921875,
-0.02471923828125,
-0.0352783203125,
0.0092926025390625,
0.0014219284057617188,
0.0123138427734375,
-0.004184722900390625,
0.029998779296875,
0.01293182373046875,
-0.00687408447265625,
-0.0028858184814453125,
0.0008578300476074219,
-0.033050537109375,
0.0028934478759765625,
-0.00958251953125,
0.023651123046875,
0.01303863525390625,
-0.054168701171875,
-0.0276336669921875,
-0.04156494140625,
0.0242767333984375,
0.01013946533203125,
0.02752685546875,
0.04339599609375,
-0.0189666748046875,
-0.0011339187622070312,
-0.01007080078125,
0.0555419921875,
-0.0247344970703125,
0.004459381103515625,
0.04278564453125,
0.0214080810546875,
0.00933837890625,
-0.037841796875,
-0.047576904296875,
-0.00957489013671875,
0.053314208984375,
0.0241851806640625,
0.03826904296875,
-0.00405120849609375,
0.04595947265625,
0.0263519287109375,
-0.0086517333984375,
0.0250244140625,
0.032958984375,
-0.06939697265625,
-0.02008056640625,
0.0340576171875,
-0.002407073974609375,
-0.06060791015625,
0.0291900634765625,
0.0103302001953125,
-0.0211181640625,
0.039398193359375,
-0.055206298828125,
0.01230621337890625,
-0.0207977294921875,
0.032440185546875,
-0.00870513916015625,
-0.0174102783203125,
0.039154052734375,
0.052276611328125,
-0.007198333740234375,
0.015533447265625,
-0.01499176025390625,
0.0016651153564453125,
0.007633209228515625,
-0.019073486328125,
0.0267333984375,
-0.02947998046875,
0.049072265625,
0.032073974609375,
-0.05120849609375,
-0.0143280029296875,
-0.0236053466796875,
-0.014251708984375,
0.02740478515625,
-0.0015859603881835938,
0.035491943359375,
-0.019073486328125,
0.06683349609375,
-0.0177459716796875,
-0.0029811859130859375,
-0.01898193359375,
-0.037200927734375,
-0.0177001953125,
0.0214996337890625,
-0.00894927978515625,
-0.033843994140625,
0.0400390625,
-0.0109405517578125,
0.00960540771484375,
-0.0117645263671875,
-0.0164031982421875,
0.01369476318359375,
-0.023468017578125,
0.0147857666015625,
0.011016845703125,
0.0411376953125,
0.01360321044921875,
-0.06353759765625,
0.023681640625,
-0.016326904296875,
0.0521240234375,
0.00553131103515625,
-0.0248565673828125,
-0.0038776397705078125,
0.015625,
-0.03668212890625,
-0.08935546875,
-0.055267333984375,
0.059478759765625,
-0.08123779296875,
-0.00429534912109375,
0.030303955078125,
-0.01546478271484375,
-0.007793426513671875,
-0.027679443359375,
-0.00196075439453125,
0.030792236328125,
0.0002543926239013672,
-0.025238037109375,
0.005901336669921875,
0.0027790069580078125,
-0.01800537109375,
-0.030548095703125,
0.0235748291015625,
-0.07940673828125,
-0.0266265869140625,
0.002593994140625,
-0.03399658203125,
-0.0175323486328125,
-0.032440185546875,
0.00484466552734375,
-0.03656005859375,
0.05517578125,
-0.0211029052734375,
-0.0302581787109375,
0.004993438720703125,
-0.0014171600341796875,
-0.002864837646484375,
0.011993408203125,
-0.046051025390625,
-0.0433349609375,
0.0037212371826171875,
0.025634765625,
-0.0268096923828125,
0.046234130859375,
0.0209808349609375,
-0.05279541015625,
0.01349639892578125,
0.0108795166015625,
-0.015960693359375,
-0.0303802490234375,
0.00971221923828125,
0.032867431640625,
0.07110595703125,
0.0284881591796875,
0.03863525390625,
0.03289794921875,
-0.08636474609375,
-0.01019287109375,
-0.009552001953125,
-0.003734588623046875,
0.015960693359375,
0.059173583984375,
0.032012939453125,
0.01117706298828125,
-0.055816650390625,
-0.01476287841796875,
0.0008411407470703125,
-0.0180511474609375,
0.004673004150390625,
0.03436279296875,
-0.07000732421875,
-0.004947662353515625,
0.01171875,
0.01393890380859375,
-0.033050537109375,
-0.0268096923828125,
0.01525115966796875,
-0.020294189453125,
0.033050537109375,
0.003582000732421875,
0.06689453125,
-0.06597900390625,
-0.0038738250732421875,
-0.00553131103515625,
-0.0027008056640625,
-0.0010700225830078125,
0.044036865234375,
-0.0299072265625,
0.0133056640625,
-0.008636474609375,
-0.0013093948364257812,
-0.0294189453125,
0.0123748779296875,
-0.0217132568359375,
0.0687255859375,
-0.0262908935546875,
-0.00568389892578125,
0.0109405517578125,
-0.01076507568359375,
-0.0300140380859375,
-0.0160980224609375,
0.041656494140625,
0.02740478515625,
-0.0279388427734375,
0.06396484375,
-0.031402587890625,
-0.0047149658203125,
-0.007343292236328125,
0.0186004638671875,
-0.014678955078125,
-0.00034689903259277344,
0.0362548828125,
-0.038482666015625,
0.0273284912109375,
0.0305023193359375,
0.040557861328125,
-0.0164794921875,
0.00981903076171875,
0.033905029296875,
0.0249481201171875,
0.004154205322265625
] |
07357e0aae2a8962a7df7486ab8d7a56d9a67b9e | Wordpress Stackexchange
Q: Redirect to login when on private page, and when logged in to specific page I´m using a plugin called "private content login redirect".
The plugin is actually only containing this piece of code:
add_action('template_redirect', 'private_content_redirect_to_login', 9);
function private_content_redirect_to_login() {
global $wp_query,$wpdb;
if (is_404()) {
$private = $wpdb->get_row($wp_query->request);
$location = wp_login_url($_SERVER["REQUEST_URI"]);
if( 'private' == $private->post_status ) {
wp_safe_redirect($location);
exit;
}
}
}
What it does is this: When a non-logged in user is viewing a private page, it redirects them to the log-in page. After they log in, they are taken back to the private page they just visited and can read it.
I would like it to redirect them to log-in page, but when they have logged in, they should be taken to a specific page (ex http://www.testsite.com/start) instead of the private page they visited.
A: from your code you need to change one for redirect user to specific page after login.
Your code :
$location = wp_login_url($_SERVER["REQUEST_URI"]);
Change it as
$location = wp_login_url (i.e. http://www.testsite.com/start); // pass url of page where you want to redirect user after login
Hope this will help you.
| Q: Redirect to login when on private page, and when logged in to specific page I´m using a plugin called "private content login redirect".
The plugin is actually only containing this piece of code:
add_action('template_redirect', 'private_content_redirect_to_login', 9);
function private_content_redirect_to_login() {
global $wp_query,$wpdb;
if (is_404()) {
$private = $wpdb->get_row($wp_query->request);
$location = wp_login_url($_SERVER["REQUEST_URI"]);
if( 'private' == $private->post_status ) {
wp_safe_redirect($location);
exit;
}
}
}
What it does is this: When a non-logged in user is viewing a private page, it redirects them to the log-in page. After they log in, they are taken back to the private page they just visited and can read it.
I would like it to redirect them to log-in page, but when they have logged in, they should be taken to a specific page (ex http://www.testsite.com/start) instead of the private page they visited.
A: from your code you need to change one for redirect user to specific page after login.
Your code :
$location = wp_login_url($_SERVER["REQUEST_URI"]);
Change it as
$location = wp_login_url (i.e. http://www.testsite.com/start); // pass url of page where you want to redirect user after login
Hope this will help you.
| wordpress | {
"language": "en",
"length": 185,
"provenance": "stackexchange_00019.jsonl.gz:473089",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256350"
} | [
0.07196044921875,
-0.00791168212890625,
0.016387939453125,
-0.01265716552734375,
0.0204315185546875,
-0.04547119140625,
0.039886474609375,
-0.0243377685546875,
-0.02410888671875,
0.0215911865234375,
0.01116943359375,
0.015472412109375,
-0.044219970703125,
-0.038299560546875,
0.0129852294921875,
-0.017913818359375,
0.008636474609375,
-0.00531768798828125,
0.024749755859375,
-0.0194549560546875,
0.0126190185546875,
0.0013513565063476562,
0.04425048828125,
-0.0159912109375,
0.0087432861328125,
-0.01541900634765625,
0.09002685546875,
-0.0222320556640625,
0.0286102294921875,
-0.01221466064453125,
0.01064300537109375,
-0.0343017578125,
0.0447998046875,
0.021881103515625,
-0.0406494140625,
-0.029144287109375,
-0.041259765625,
0.0201263427734375,
-0.0155487060546875,
0.0132293701171875,
0.034942626953125,
-0.0173492431640625,
-0.045928955078125,
0.04241943359375,
-0.046875,
-0.0153350830078125,
0.01708984375,
0.0099945068359375,
0.0281829833984375,
-0.004596710205078125,
0.0283355712890625,
0.0021343231201171875,
0.019500732421875,
0.0021915435791015625,
-0.01485443115234375,
0.032989501953125,
-0.01690673828125,
0.012542724609375,
0.035736083984375,
0.006282806396484375,
-0.019134521484375,
-0.018524169921875,
0.007129669189453125,
-0.03515625,
-0.01947021484375,
-0.0029754638671875,
-0.060638427734375,
0.018646240234375,
-0.04180908203125,
-0.0240936279296875,
0.011199951171875,
-0.043060302734375,
0.00035572052001953125,
-0.0003070831298828125,
-0.0562744140625,
0.006855010986328125,
0.028289794921875,
0.0016260147094726562,
0.0182952880859375,
0.00243377685546875,
-0.0173187255859375,
-0.01049041748046875,
-0.01439666748046875,
-0.014801025390625,
0.0184173583984375,
0.0252532958984375,
-0.0292816162109375,
-0.0200958251953125,
-0.035003662109375,
0.016998291015625,
-0.0362548828125,
0.0274505615234375,
0.019378662109375,
-0.0290679931640625,
-0.04266357421875,
-0.014068603515625,
0.02130126953125,
0.030670166015625,
0.0120849609375,
-0.00897979736328125,
0.00797271728515625,
-0.03680419921875,
-0.012298583984375,
-0.0157012939453125,
-0.00634765625,
0.052215576171875,
0.0271759033203125,
-0.007724761962890625,
0.0021800994873046875,
0.007572174072265625,
0.0170745849609375,
0.0133514404296875,
-0.034912109375,
-0.042266845703125,
-0.00998687744140625,
0.0576171875,
-0.039520263671875,
0.0006899833679199219,
0.007770538330078125,
0.036041259765625,
-0.034759521484375,
-0.01053619384765625,
0.004177093505859375,
-0.02349853515625,
-0.007625579833984375,
-0.044708251953125,
0.0018625259399414062,
0.0006427764892578125,
-0.040069580078125,
0.0275115966796875,
-0.0036869049072265625,
0.0186920166015625,
0.04095458984375,
0.006710052490234375,
-0.02001953125,
-0.0151824951171875,
0.0517578125,
-0.038421630859375,
-0.0021991729736328125,
0.0167388916015625,
-0.00009912252426147461,
-0.02764892578125,
-0.0002803802490234375,
-0.0175018310546875,
0.041900634765625,
0.0301666259765625,
0.05047607421875,
0.0015354156494140625,
-0.037109375,
-0.03997802734375,
0.0309906005859375,
0.01190185546875,
0.0017652511596679688,
0.01215362548828125,
0.0230255126953125,
0.0154571533203125,
0.006008148193359375,
0.0027141571044921875,
-0.018524169921875,
0.01177215576171875,
0.07147216796875,
0.01123809814453125,
-0.00968170166015625,
0.01085662841796875,
-0.034210205078125,
-0.03741455078125,
-0.050994873046875,
-0.013153076171875,
0.03192138671875,
0.0306396484375,
0.0280609130859375,
-0.04443359375,
-0.03369140625,
0.0267333984375,
0.00830078125,
0.03021240234375,
-0.0170440673828125,
0.06829833984375,
0.0070037841796875,
0.02398681640625,
0.0186004638671875,
-0.0380859375,
0.052490234375,
0.004947662353515625,
-0.01519012451171875,
0.0621337890625,
-0.001903533935546875,
0.039398193359375,
-0.013763427734375,
0.00591278076171875,
-0.01422882080078125,
0.0494384765625,
-0.052215576171875,
0.0491943359375,
-0.004669189453125,
-0.033447265625,
-0.02447509765625,
-0.01219940185546875,
-0.0220489501953125,
0.006923675537109375,
0.032073974609375,
0.018829345703125,
-0.024078369140625,
0.0102996826171875,
-0.0031986236572265625,
-0.00962066650390625,
0.011962890625,
-0.001708984375,
0.01004791259765625,
0.0175628662109375,
-0.003070831298828125,
0.003665924072265625,
0.01398468017578125,
-0.06890869140625,
-0.03033447265625,
0.01995849609375,
-0.0257568359375,
0.048065185546875,
0.0124359130859375,
0.051727294921875,
-0.0024547576904296875,
-0.0307159423828125,
-0.002262115478515625,
-0.06793212890625,
0.047088623046875,
0.0011243820190429688,
-0.00305938720703125,
-0.013031005859375,
0.03375244140625,
-0.0013475418090820312,
-0.01202392578125,
0.03253173828125,
0.0445556640625,
0.0160980224609375,
-0.047607421875,
-0.003627777099609375,
-0.0289459228515625,
-0.037384033203125,
-0.007427215576171875,
0.049468994140625,
0.040069580078125,
0.04754638671875,
-0.00891876220703125,
-0.031097412109375,
0.027862548828125,
-0.07073974609375,
0.00829315185546875,
-0.0318603515625,
0.00818634033203125,
0.039520263671875,
-0.044647216796875,
-0.0207061767578125,
0.0277252197265625,
-0.043182373046875,
-0.01318359375,
0.046661376953125,
-0.019317626953125,
-0.003566741943359375,
-0.0013437271118164062,
-0.0007958412170410156,
0.0008397102355957031,
-0.022125244140625,
-0.00565338134765625,
-0.007476806640625,
-0.0091552734375,
-0.0234375,
-0.0188446044921875,
-0.0257110595703125,
-0.0166168212890625,
-0.03411865234375,
0.020294189453125,
-0.050262451171875,
-0.0066375732421875,
0.02783203125,
0.0274658203125,
-0.032196044921875,
-0.0295867919921875,
-0.004901885986328125,
0.025115966796875,
-0.0025730133056640625,
-0.01331329345703125,
0.0283203125,
-0.0654296875,
-0.013519287109375,
0.0005116462707519531,
-0.026397705078125,
-0.0287628173828125,
0.0084991455078125,
0.042144775390625,
-0.0277862548828125,
0.00357818603515625,
0.0144195556640625,
-0.03375244140625,
0.07757568359375,
0.0135498046875,
-0.06695556640625,
0.05718994140625,
-0.05029296875,
0.0299072265625,
-0.04608154296875,
0.09332275390625,
0.049560546875,
-0.03863525390625,
0.0302886962890625,
0.00806427001953125,
0.0168914794921875,
0.034332275390625,
-0.010101318359375,
-0.0190582275390625,
-0.0183868408203125,
-0.0297393798828125,
0.00445556640625,
0.0196533203125,
-0.00238037109375,
0.005523681640625,
-0.03302001953125,
0.0016374588012695312,
-0.012451171875,
-0.059906005859375,
-0.050506591796875,
-0.06646728515625,
-0.0985107421875,
-0.00922393798828125,
-0.00972747802734375,
-0.043975830078125,
0.0341796875,
0.0045928955078125,
0.0254364013671875,
0.0027866363525390625,
0.004367828369140625,
-0.05352783203125,
0.0018548965454101562,
-0.047210693359375,
0.0501708984375,
-0.0171966552734375,
0.012939453125,
0.01149749755859375,
-0.0152130126953125,
-0.0137939453125,
-0.02099609375,
-0.0239105224609375,
0.047821044921875,
0.006679534912109375,
-0.06488037109375,
-0.03631591796875,
-0.015228271484375,
-0.007221221923828125,
0.000018596649169921875,
0.03192138671875,
-0.021820068359375,
0.016937255859375,
-0.00323486328125,
0.0212860107421875,
-0.02557373046875,
0.029754638671875,
-0.022186279296875,
-0.053192138671875,
-0.00396728515625,
0.0017576217651367188,
-0.046417236328125,
0.0008196830749511719,
-0.0268096923828125,
-0.05584716796875,
-0.015838623046875,
0.06695556640625,
-0.005046844482421875,
-0.0230560302734375,
-0.04296875,
0.01548004150390625,
0.031585693359375,
0.0032501220703125,
0.0159759521484375,
-0.0013370513916015625,
-0.0232086181640625,
-0.023651123046875,
-0.00966644287109375,
0.042449951171875,
-0.01123046875,
-0.0298004150390625,
0.005199432373046875,
0.0175628662109375,
0.0008101463317871094,
-0.0159759521484375,
-0.036865234375,
-0.040130615234375,
0.035430908203125,
-0.0162811279296875,
0.0188446044921875,
-0.037139892578125,
-0.0158233642578125,
-0.038604736328125,
0.0740966796875,
-0.043914794921875,
0.01445770263671875,
-0.005252838134765625,
-0.00777435302734375,
-0.01488494873046875,
-0.031707763671875,
-0.105712890625,
0.00600433349609375,
-0.0711669921875,
0.0057373046875,
0.024322509765625,
-0.051666259765625,
-0.003337860107421875,
-0.048187255859375,
-0.04656982421875,
-0.0308380126953125,
0.0236053466796875,
0.0546875,
0.031036376953125,
0.01300811767578125,
0.022125244140625,
0.01203155517578125,
0.0136260986328125,
0.0017728805541992188,
-0.037322998046875,
-0.00859832763671875,
-0.005855560302734375,
0.044891357421875,
0.0416259765625,
-0.0255584716796875,
-0.006855010986328125,
0.040618896484375,
-0.0033855438232421875,
0.0023212432861328125,
-0.007228851318359375,
-0.01171112060546875,
0.01236724853515625,
0.038787841796875,
-0.0120391845703125,
0.023529052734375,
0.0225982666015625,
0.0138092041015625,
-0.0274505615234375,
-0.0263671875,
-0.04833984375,
-0.056427001953125,
0.03656005859375,
-0.0570068359375,
-0.0599365234375,
-0.0209197998046875,
0.0219573974609375,
-0.002277374267578125,
-0.012451171875,
0.004581451416015625,
0.0004737377166748047,
-0.032379150390625,
0.01340484619140625,
-0.0165863037109375,
-0.0328369140625,
0.002414703369140625,
-0.0016832351684570312,
0.0206146240234375,
-0.01448822021484375,
0.043182373046875,
0.025726318359375,
0.01522064208984375,
-0.01404571533203125,
0.0572509765625,
0.0036869049072265625,
-0.0032482147216796875,
0.08038330078125,
-0.033203125,
0.0240478515625,
-0.0157012939453125,
0.039703369140625,
-0.0194854736328125,
-0.05316162109375,
0.053924560546875,
-0.044891357421875,
-0.0114898681640625,
0.033966064453125,
0.00830078125,
0.004665374755859375,
-0.00096893310546875,
-0.00582122802734375,
-0.0180206298828125,
0.00020956993103027344,
0.0035190582275390625,
-0.007354736328125,
-0.00586700439453125,
0.032012939453125,
0.0034160614013671875,
0.05010986328125,
-0.01363372802734375,
-0.0117034912109375,
0.01374053955078125,
-0.0250244140625,
0.003177642822265625,
-0.024261474609375,
0.0182342529296875,
-0.0085296630859375,
0.03265380859375,
-0.0340576171875,
0.003345489501953125,
-0.01202392578125,
0.047698974609375,
0.0101318359375,
-0.04248046875,
0.001392364501953125,
-0.0267791748046875,
0.01085662841796875,
0.00400543212890625,
-0.00777435302734375,
0.06439208984375,
-0.03924560546875,
-0.031524658203125,
-0.0006566047668457031,
-0.041778564453125,
-0.06256103515625,
-0.060699462890625,
0.068115234375,
-0.00894927978515625,
0.025543212890625,
0.013763427734375,
0.09649658203125,
0.0143280029296875,
0.0645751953125,
-0.0260467529296875,
0.036956787109375,
0.054595947265625,
0.000827789306640625,
0.009124755859375,
0.004123687744140625,
-0.0026950836181640625,
-0.01727294921875,
0.022491455078125,
-0.039825439453125,
-0.0304412841796875,
0.01088714599609375,
0.040008544921875,
-0.0186614990234375,
-0.003787994384765625,
0.045562744140625,
0.015106201171875,
0.00691986083984375,
0.044891357421875,
0.0081024169921875,
-0.0537109375,
-0.011932373046875,
0.027191162109375,
0.0260009765625,
-0.0262603759765625,
-0.00356292724609375,
-0.0357666015625,
-0.053680419921875,
-0.01812744140625,
-0.0067138671875,
-0.0280914306640625,
-0.01259613037109375,
-0.019378662109375,
-0.013824462890625,
-0.045562744140625,
-0.02239990234375,
0.0038204193115234375,
0.01486968994140625,
-0.01222991943359375,
-0.01300048828125,
-0.0025882720947265625,
-0.0308074951171875,
0.0206146240234375,
-0.0117340087890625,
-0.0107421875,
-0.04071044921875,
0.00186920166015625,
0.041046142578125,
0.0299835205078125,
-0.0256195068359375,
-0.003108978271484375,
-0.02020263671875,
0.0010633468627929688,
0.01934814453125,
-0.020477294921875,
-0.0018157958984375,
-0.023162841796875,
0.0247955322265625,
0.0192108154296875,
-0.0006656646728515625,
-0.03271484375,
-0.0262603759765625,
-0.01451873779296875,
0.03350830078125,
0.0098876953125,
-0.003589630126953125,
0.0802001953125,
-0.054412841796875,
0.057586669921875,
0.00963592529296875,
0.0665283203125,
0.0121612548828125,
-0.034881591796875,
0.00830841064453125,
-0.0092010498046875,
-0.023681640625,
-0.02301025390625,
0.0109710693359375,
0.01340484619140625,
0.058563232421875,
-0.00856781005859375,
-0.001461029052734375,
0.005596160888671875,
-0.0008692741394042969,
-0.01515960693359375,
0.0692138671875,
0.02630615234375,
0.0243682861328125,
0.0255279541015625,
0.0248870849609375,
0.0125732421875,
-0.014923095703125,
-0.02471923828125,
-0.00820159912109375,
0.023773193359375,
0.0008039474487304688,
-0.03155517578125,
-0.09344482421875,
0.06195068359375,
0.076416015625,
0.0439453125,
0.07281494140625,
-0.01342010498046875,
0.0352783203125,
0.072998046875,
-0.061676025390625,
-0.0031681060791015625,
0.02532958984375,
0.044525146484375,
-0.021759033203125,
-0.00138092041015625,
0.050506591796875,
-0.0255279541015625,
0.0160675048828125,
0.06298828125,
0.0419921875,
-0.11676025390625,
0.0282135009765625,
0.00818634033203125,
-0.00604248046875,
0.0199432373046875,
-0.01328277587890625,
-0.0026836395263671875,
-0.002788543701171875,
0.03375244140625,
0.01513671875,
-0.024627685546875,
0.00809478759765625,
0.020843505859375,
-0.0186767578125,
-0.0005140304565429688,
0.00855255126953125,
0.00788116455078125,
-0.09417724609375,
0.037078857421875,
0.0513916015625,
0.0001271963119506836,
-0.0308685302734375,
0.0052490234375,
0.0179443359375,
-0.0164337158203125,
-0.045867919921875,
0.03057861328125,
-0.003505706787109375,
-0.0031909942626953125,
0.0277099609375,
-0.0032978057861328125,
0.04803466796875,
0.05206298828125,
-0.0009069442749023438,
0.0194854736328125,
0.00907135009765625,
-0.0023365020751953125,
0.059356689453125,
0.006931304931640625,
-0.0029888153076171875,
-0.0246734619140625,
-0.03619384765625,
0.0013751983642578125,
-0.03411865234375,
0.0084075927734375,
-0.016754150390625,
-0.0350341796875,
0.05169677734375,
-0.042877197265625,
-0.0013170242309570312,
0.01192474365234375,
0.0298919677734375,
0.016204833984375,
-0.004962921142578125,
0.0226287841796875,
-0.059844970703125,
-0.035888671875,
-0.004985809326171875,
-0.038299560546875,
0.01220703125,
-0.0234527587890625,
-0.03076171875,
0.072021484375,
0.023040771484375,
0.01152801513671875,
0.02984619140625,
0.035919189453125,
-0.0455322265625,
0.00865936279296875,
-0.009185791015625,
0.060821533203125,
0.03607177734375,
-0.006565093994140625,
-0.01064300537109375,
-0.007762908935546875,
0.01175689697265625,
0.0136566162109375,
0.0494384765625,
0.02630615234375,
-0.09967041015625,
-0.0013217926025390625,
0.0310211181640625,
0.0225677490234375,
0.00792694091796875,
0.07733154296875,
0.0034389495849609375,
0.00814056396484375,
0.02191162109375,
-0.07244873046875,
0.01306915283203125,
-0.020172119140625,
-0.0001214146614074707,
-0.0029697418212890625,
0.005397796630859375,
-0.0288848876953125,
-0.040130615234375,
0.032012939453125,
-0.09808349609375,
0.0016460418701171875,
0.04437255859375,
0.05718994140625,
-0.018951416015625,
0.02960205078125,
0.018951416015625,
-0.006694793701171875,
0.0250701904296875,
-0.033538818359375,
0.037017822265625,
0.0152740478515625,
0.03265380859375,
-0.002346038818359375,
0.0294036865234375,
0.0228729248046875,
-0.03363037109375,
-0.000003993511199951172,
0.00800323486328125,
-0.027008056640625,
0.068115234375,
0.0428466796875,
0.0194091796875,
-0.0215911865234375,
0.010955810546875,
0.0389404296875,
0.071044921875,
-0.052764892578125,
-0.0141143798828125,
-0.0004558563232421875,
0.003765106201171875,
0.016204833984375,
-0.0168304443359375,
0.043548583984375,
-0.0088043212890625,
-0.0232086181640625,
-0.007598876953125,
-0.0114898681640625,
0.00994110107421875,
-0.00534820556640625,
0.005275726318359375,
-0.01226806640625,
0.008270263671875,
0.01137542724609375,
0.022674560546875,
-0.039215087890625,
0.031707763671875,
-0.0175933837890625,
-0.023529052734375,
-0.00817108154296875,
0.05792236328125,
0.0131683349609375,
-0.0318603515625,
-0.01032257080078125,
-0.002925872802734375,
0.035736083984375,
-0.036773681640625,
-0.0022487640380859375,
0.01035308837890625,
0.0567626953125,
0.01861572265625,
0.0010995864868164062,
0.015960693359375,
0.0281982421875,
-0.0008869171142578125,
-0.00016224384307861328,
0.0207672119140625,
-0.0102081298828125,
0.0562744140625,
-0.0040740966796875,
0.00655364990234375,
-0.004062652587890625,
-0.0243072509765625,
-0.048126220703125,
0.005626678466796875,
0.0294189453125,
0.00867462158203125,
0.0263214111328125,
0.004009246826171875,
-0.017486572265625,
-0.0226898193359375,
-0.03143310546875,
0.042694091796875,
0.009521484375,
-0.05535888671875,
0.00429534912109375,
-0.0181732177734375,
-0.0379638671875,
0.0178985595703125,
0.0333251953125,
-0.0012788772583007812,
0.01346588134765625,
0.032745361328125,
0.00852203369140625,
0.0261383056640625,
-0.025604248046875,
0.004917144775390625,
-0.015594482421875,
0.02593994140625,
0.01023101806640625,
-0.060638427734375,
-0.02117919921875,
-0.050048828125,
0.019622802734375,
0.01108551025390625,
0.06475830078125,
-0.0113983154296875,
0.04443359375,
-0.05816650390625,
0.01044464111328125,
-0.049713134765625,
-0.056182861328125,
0.03594970703125,
0.00949859619140625,
-0.0204315185546875,
0.01385498046875,
-0.04522705078125,
0.059173583984375,
-0.0203704833984375,
0.0208740234375,
0.041259765625,
-0.0259552001953125,
0.0055999755859375,
0.0384521484375,
0.00608062744140625,
-0.0352783203125,
-0.04827880859375,
-0.023956298828125,
0.00799560546875,
0.010223388671875,
0.00724029541015625,
-0.016143798828125,
0.056915283203125,
-0.046905517578125,
-0.0179901123046875,
-0.0024585723876953125,
-0.0631103515625,
-0.019683837890625,
0.0267791748046875,
-0.01381683349609375,
0.0016336441040039062,
0.0292816162109375,
-0.0158233642578125,
0.0248260498046875,
0.0006489753723144531,
0.0206146240234375,
0.01230621337890625,
0.00664520263671875,
-0.0005178451538085938,
-0.004001617431640625,
0.00472259521484375,
-0.01776123046875,
-0.0048980712890625,
0.00753021240234375,
-0.01534271240234375,
-0.02398681640625,
-0.0231475830078125,
-0.037078857421875,
-0.0457763671875,
0.017120361328125,
0.0020599365234375,
0.00811004638671875,
-0.0266876220703125,
-0.01355743408203125,
0.02838134765625,
0.019012451171875,
-0.00740814208984375,
-0.048675537109375,
0.005893707275390625,
-0.0208892822265625,
0.07293701171875,
-0.047088623046875,
0.021270751953125,
0.008575439453125,
0.01062774658203125,
-0.06201171875,
0.03717041015625,
-0.020416259765625,
-0.02923583984375,
-0.0091094970703125,
-0.003528594970703125,
0.06842041015625,
-0.007396697998046875,
-0.028106689453125,
-0.048675537109375,
-0.05133056640625,
0.0161895751953125,
-0.0662841796875,
-0.0292510986328125,
0.00594329833984375,
0.00937652587890625,
0.0099945068359375,
-0.0162353515625,
-0.021331787109375,
0.0306243896484375,
0.00909423828125,
0.03948974609375,
-0.056610107421875,
-0.0355224609375,
-0.043609619140625,
-0.059478759765625,
0.062347412109375,
0.003696441650390625,
-0.0251922607421875,
-0.0648193359375,
0.0428466796875,
0.002780914306640625,
-0.011810302734375,
-0.01360321044921875,
-0.01348876953125,
-0.0125579833984375,
0.0158843994140625,
0.01568603515625,
0.0263824462890625,
0.00800323486328125,
0.0287628173828125,
-0.017608642578125,
0.0333251953125,
0.0301361083984375,
-0.009765625,
-0.0209808349609375,
-0.009246826171875,
0.035675048828125,
0.039703369140625,
0.0006709098815917969,
0.036224365234375,
0.048004150390625,
0.0079803466796875,
-0.0103607177734375,
-0.031646728515625,
0.01320648193359375,
0.008087158203125,
0.0281982421875,
0.014007568359375,
0.0010166168212890625,
-0.0325927734375,
-0.062164306640625,
-0.04510498046875,
-0.005092620849609375,
-0.038818359375,
0.0129852294921875,
-0.0762939453125,
-0.01380157470703125,
-0.01149749755859375,
-0.01751708984375,
-0.0252227783203125,
0.005687713623046875,
-0.035003662109375,
-0.00666046142578125,
0.037628173828125,
-0.0008912086486816406,
0.0025310516357421875,
-0.03265380859375,
0.06317138671875,
-0.0341796875,
-0.0054931640625,
-0.00627899169921875,
0.036224365234375,
-0.0020236968994140625,
-0.0226898193359375,
0.047119140625,
0.03167724609375,
-0.0271148681640625,
-0.0179901123046875,
0.03643798828125,
-0.00463104248046875,
-0.02667236328125,
-0.05267333984375,
-0.034332275390625,
-0.0033283233642578125,
-0.004917144775390625,
-0.005878448486328125,
0.02960205078125,
-0.004589080810546875,
0.0207366943359375,
0.042572021484375,
-0.01267242431640625,
0.007568359375,
-0.006114959716796875,
0.033782958984375,
0.009368896484375,
-0.015228271484375,
0.05133056640625,
-0.01751708984375,
0.005458831787109375,
-0.0130615234375,
0.046966552734375,
-0.024322509765625,
0.034210205078125,
-0.0308837890625,
0.01074981689453125,
0.013885498046875
] |
cd16418e6f9fa0062b95f7218a4aab2ceec78767 | Wordpress Stackexchange
Q: Hook after image is uploaded and image sizes generated I'd like to compress images once they're uploaded to media library. Is there any hook that fires once the image is uploaded and the image sizes generated?
A: Use the wp_generate_attachment_metadata filter for this, it's fired in the wp_generate_attachment_metadata function.
| Q: Hook after image is uploaded and image sizes generated I'd like to compress images once they're uploaded to media library. Is there any hook that fires once the image is uploaded and the image sizes generated?
A: Use the wp_generate_attachment_metadata filter for this, it's fired in the wp_generate_attachment_metadata function.
A:
Is there any hook that fires once the image is uploaded and the image sizes generated?
wp_handle_upload fires after the image is uploaded. After the follow-up question, I discovered that images would not be sized at this point.
add_filter( 'wp_handle_upload' 'wpse_256351_upload', 10, 2 );
function wpse_256351_upload( $upload, $context ) {
//* Do something interesting
return $upload;
}
Added:
Images are resized on line 135 of image.php. There are no hooks in method to resize the images.
At the end of the wp_generate_attachment_metadata() function, wp_generate_attachment_metadata fires. This is after the image sizes are generated.
wp_read_image_metadata is another option. It fires before wp_generate_attachment_metadata but after image sizes are generated.
| wordpress | {
"language": "en",
"length": 158,
"provenance": "stackexchange_00019.jsonl.gz:473090",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256351"
} | [
-0.01214599609375,
-0.0234222412109375,
-0.038360595703125,
0.01203155517578125,
-0.0171356201171875,
-0.034515380859375,
0.037506103515625,
0.00519561767578125,
0.01287841796875,
0.01520538330078125,
0.0108489990234375,
0.001117706298828125,
0.0016565322875976562,
-0.029083251953125,
-0.0165252685546875,
-0.003391265869140625,
0.045257568359375,
-0.02606201171875,
0.025665283203125,
0.005138397216796875,
-0.00965118408203125,
0.026458740234375,
0.0234527587890625,
0.06304931640625,
-0.0228118896484375,
0.017059326171875,
0.0460205078125,
-0.01154327392578125,
-0.0290374755859375,
-0.02081298828125,
-0.0032329559326171875,
0.0026721954345703125,
0.01325225830078125,
0.03253173828125,
-0.0265655517578125,
0.06982421875,
0.0177154541015625,
0.01515960693359375,
0.0128021240234375,
0.0195465087890625,
0.02740478515625,
-0.0137481689453125,
0.051788330078125,
0.004825592041015625,
0.0111083984375,
0.0005145072937011719,
0.00927734375,
-0.05364990234375,
0.050872802734375,
0.01336669921875,
0.004138946533203125,
0.037109375,
0.0023326873779296875,
0.01525115966796875,
-0.0171966552734375,
-0.006824493408203125,
-0.051422119140625,
0.05487060546875,
0.0236053466796875,
0.014739990234375,
-0.023406982421875,
-0.0018815994262695312,
0.007328033447265625,
-0.033966064453125,
0.0018100738525390625,
0.0178375244140625,
-0.021942138671875,
0.0015592575073242188,
-0.02508544921875,
-0.002681732177734375,
0.005645751953125,
-0.057586669921875,
-0.0229644775390625,
-0.007965087890625,
0.012542724609375,
-0.005645751953125,
0.028289794921875,
-0.007709503173828125,
-0.0018415451049804688,
0.034332275390625,
0.034912109375,
0.00208282470703125,
0.0173797607421875,
-0.004436492919921875,
0.0191192626953125,
0.01073455810546875,
-0.007328033447265625,
-0.018341064453125,
-0.0078125,
0.01509857177734375,
-0.017669677734375,
0.00875091552734375,
0.01959228515625,
-0.0175628662109375,
-0.0298309326171875,
-0.00533294677734375,
0.0020236968994140625,
0.0009622573852539062,
-0.00806427001953125,
0.002838134765625,
0.018768310546875,
-0.040924072265625,
0.0186004638671875,
-0.020965576171875,
0.0127105712890625,
0.005474090576171875,
-0.01332855224609375,
-0.049652099609375,
0.022308349609375,
0.02398681640625,
-0.0310211181640625,
0.02325439453125,
-0.006710052490234375,
-0.0290069580078125,
0.0205230712890625,
0.0205841064453125,
-0.028594970703125,
0.0501708984375,
-0.004364013671875,
0.025634765625,
0.00572967529296875,
-0.007259368896484375,
0.0836181640625,
-0.0372314453125,
0.0287322998046875,
0.01355743408203125,
-0.03656005859375,
-0.055419921875,
0.004253387451171875,
0.038787841796875,
0.0176544189453125,
-0.004276275634765625,
-0.0289764404296875,
-0.01148223876953125,
-0.041595458984375,
-0.0139923095703125,
-0.0012388229370117188,
-0.044769287109375,
-0.0190582275390625,
0.0157012939453125,
-0.033843994140625,
-0.01004791259765625,
0.03680419921875,
-0.0292205810546875,
0.01251983642578125,
-0.00289154052734375,
-0.00537109375,
0.0179443359375,
0.0186004638671875,
-0.035736083984375,
0.04083251953125,
-0.03350830078125,
0.047515869140625,
0.01160430908203125,
-0.01220703125,
-0.039337158203125,
0.052886962890625,
-0.047088623046875,
-0.014007568359375,
-0.0794677734375,
0.01543426513671875,
-0.01513671875,
-0.0005092620849609375,
-0.02099609375,
-0.037200927734375,
0.0257110595703125,
-0.05023193359375,
0.00594329833984375,
0.0304107666015625,
0.0238189697265625,
0.0305633544921875,
-0.0022106170654296875,
0.022125244140625,
-0.00302886962890625,
-0.0189361572265625,
0.0004317760467529297,
0.0235595703125,
-0.0141143798828125,
0.027374267578125,
0.0194854736328125,
-0.0175933837890625,
-0.01413726806640625,
0.0633544921875,
-0.043426513671875,
-0.034637451171875,
-0.003391265869140625,
0.01549530029296875,
0.035858154296875,
0.0184478759765625,
0.0271453857421875,
0.010955810546875,
0.0198516845703125,
-0.07550048828125,
0.0206451416015625,
-0.0230712890625,
0.019744873046875,
-0.004974365234375,
0.0259246826171875,
-0.0156707763671875,
-0.005046844482421875,
0.01491546630859375,
0.027008056640625,
-0.0068359375,
-0.0002796649932861328,
-0.0679931640625,
0.033172607421875,
-0.040191650390625,
0.0406494140625,
-0.0265350341796875,
0.01522064208984375,
0.00576019287109375,
-0.0292510986328125,
0.001956939697265625,
0.01116943359375,
0.01337432861328125,
-0.014678955078125,
0.0014066696166992188,
0.0038433074951171875,
0.004207611083984375,
0.03631591796875,
-0.032196044921875,
0.0006756782531738281,
-0.040069580078125,
-0.01285552978515625,
0.042388916015625,
0.0303192138671875,
-0.0180816650390625,
0.002536773681640625,
0.010986328125,
0.027740478515625,
-0.0156097412109375,
0.024688720703125,
-0.0033473968505859375,
0.03924560546875,
0.002788543701171875,
-0.011688232421875,
-0.0235595703125,
-0.10516357421875,
0.025909423828125,
0.0489501953125,
0.021636962890625,
0.046173095703125,
0.01556396484375,
0.040191650390625,
0.0703125,
0.043121337890625,
0.056640625,
-0.020782470703125,
0.022552490234375,
0.034271240234375,
-0.0194854736328125,
-0.0056610107421875,
0.01068115234375,
-0.0870361328125,
0.033935546875,
0.0230712890625,
-0.028106689453125,
-0.033660888671875,
0.0036716461181640625,
0.00390625,
0.022064208984375,
0.020477294921875,
-0.004947662353515625,
0.009246826171875,
-0.0299224853515625,
0.033203125,
-0.00438690185546875,
-0.01221466064453125,
-0.040618896484375,
0.031524658203125,
0.040283203125,
-0.0213470458984375,
0.001483917236328125,
0.0175933837890625,
0.00695037841796875,
0.0172576904296875,
-0.0229949951171875,
-0.00971221923828125,
-0.004627227783203125,
0.00011163949966430664,
-0.0222320556640625,
-0.01141357421875,
-0.038909912109375,
-0.01268768310546875,
0.00011205673217773438,
-0.051666259765625,
0.00374603271484375,
-0.0168304443359375,
-0.00954437255859375,
-0.006683349609375,
-0.01068878173828125,
0.067138671875,
0.01189422607421875,
0.051513671875,
0.0006017684936523438,
-0.001819610595703125,
-0.03564453125,
-0.04150390625,
0.03680419921875,
-0.06036376953125,
0.042236328125,
0.07049560546875,
-0.0452880859375,
0.0265960693359375,
-0.022186279296875,
0.0096893310546875,
0.017486572265625,
-0.0222015380859375,
-0.036041259765625,
-0.053314208984375,
-0.0026340484619140625,
-0.00960540771484375,
0.00982666015625,
-0.00911712646484375,
-0.0079498291015625,
-0.022857666015625,
-0.0277862548828125,
-0.00859832763671875,
-0.05499267578125,
-0.009796142578125,
-0.018829345703125,
-0.02996826171875,
0.024505615234375,
-0.01059722900390625,
0.005481719970703125,
-0.0186920166015625,
0.0042877197265625,
0.00409698486328125,
-0.04473876953125,
-0.01325225830078125,
0.00684356689453125,
-0.0130615234375,
-0.021087646484375,
0.067626953125,
0.012939453125,
0.031707763671875,
0.004009246826171875,
0.035003662109375,
-0.01424407958984375,
-0.045745849609375,
-0.004474639892578125,
-0.039215087890625,
-0.0032329559326171875,
-0.00251007080078125,
-0.00826263427734375,
-0.0026149749755859375,
-0.0037975311279296875,
-0.0032062530517578125,
0.045867919921875,
0.033447265625,
-0.03350830078125,
0.00455474853515625,
-0.0294036865234375,
-0.04425048828125,
-0.0239105224609375,
0.06964111328125,
0.038604736328125,
-0.0838623046875,
0.0107574462890625,
-0.0794677734375,
0.034820556640625,
-0.0198211669921875,
-0.007091522216796875,
0.0274200439453125,
-0.00244903564453125,
-0.026519775390625,
0.00029397010803222656,
0.00238037109375,
-0.01523590087890625,
-0.00833892822265625,
-0.004817962646484375,
-0.03131103515625,
0.054840087890625,
-0.0174560546875,
-0.012237548828125,
-0.0014772415161132812,
0.01861572265625,
0.007904052734375,
0.026397705078125,
0.01056671142578125,
0.0406494140625,
-0.003330230712890625,
0.016021728515625,
-0.06524658203125,
-0.00206756591796875,
0.030670166015625,
0.0193634033203125,
0.06201171875,
-0.01654052734375,
-0.027984619140625,
-0.0151214599609375,
0.06610107421875,
-0.037628173828125,
-0.007427215576171875,
-0.0007076263427734375,
0.00732421875,
-0.01629638671875,
-0.0030059814453125,
-0.06439208984375,
-0.0005893707275390625,
-0.07269287109375,
0.0276947021484375,
0.025970458984375,
-0.030364990234375,
-0.0196380615234375,
0.0292205810546875,
-0.06793212890625,
-0.026214599609375,
0.02093505859375,
-0.0078277587890625,
-0.00505828857421875,
0.00022423267364501953,
-0.00423431396484375,
-0.022064208984375,
0.003330230712890625,
-0.021148681640625,
-0.11456298828125,
-0.008026123046875,
-0.0498046875,
0.07806396484375,
0.01068115234375,
0.0212860107421875,
-0.0322265625,
0.046905517578125,
0.02691650390625,
0.0116424560546875,
-0.00658416748046875,
-0.007564544677734375,
-0.01058197021484375,
-0.033966064453125,
-0.01171112060546875,
-0.0219573974609375,
-0.0289154052734375,
-0.04669189453125,
-0.0241546630859375,
-0.0133209228515625,
-0.022796630859375,
-0.01024627685546875,
-0.016571044921875,
0.004852294921875,
-0.07940673828125,
-0.0294647216796875,
-0.01318359375,
0.0062713623046875,
-0.00736236572265625,
0.00862884521484375,
-0.042388916015625,
-0.078125,
0.00887298583984375,
0.00835418701171875,
0.01137542724609375,
0.0126495361328125,
0.09295654296875,
0.0174560546875,
0.0018634796142578125,
-0.05352783203125,
-0.03533935546875,
0.041351318359375,
0.007137298583984375,
0.0296478271484375,
0.052490234375,
-0.0167999267578125,
-0.0159912109375,
0.046875,
0.00917816162109375,
-0.042877197265625,
0.0987548828125,
-0.0178680419921875,
0.002735137939453125,
0.00698089599609375,
-0.03558349609375,
0.0167388916015625,
0.0147552490234375,
0.004360198974609375,
0.007160186767578125,
0.0074005126953125,
0.005649566650390625,
0.002685546875,
-0.01308441162109375,
-0.0164947509765625,
-0.06646728515625,
0.029571533203125,
0.01535797119140625,
-0.0025348663330078125,
-0.0300140380859375,
0.030914306640625,
-0.0005464553833007812,
0.00682830810546875,
0.034759521484375,
-0.01296234130859375,
-0.0284881591796875,
-0.041717529296875,
0.06591796875,
-0.04364013671875,
0.006694793701171875,
0.01515960693359375,
0.016754150390625,
-0.040191650390625,
-0.00098419189453125,
-0.00917816162109375,
-0.0660400390625,
-0.006565093994140625,
-0.0092926025390625,
-0.005367279052734375,
-0.0121307373046875,
0.040252685546875,
0.0109100341796875,
-0.0082855224609375,
-0.0069580078125,
-0.040679931640625,
0.0012912750244140625,
-0.053863525390625,
0.01392364501953125,
0.017608642578125,
-0.0267486572265625,
0.059112548828125,
-0.0217437744140625,
-0.01837158203125,
0.005252838134765625,
-0.005092620849609375,
0.022491455078125,
0.0276336669921875,
0.005344390869140625,
0.027923583984375,
0.01403045654296875,
-0.02142333984375,
-0.005161285400390625,
0.0131988525390625,
-0.0219879150390625,
0.0162353515625,
0.00955963134765625,
0.00341033935546875,
-0.015289306640625,
-0.00469970703125,
0.0382080078125,
-0.00882720947265625,
-0.01001739501953125,
0.03155517578125,
-0.0266571044921875,
-0.07177734375,
-0.0168609619140625,
0.0247039794921875,
0.023590087890625,
-0.031524658203125,
-0.03472900390625,
0.0134429931640625,
0.0096282958984375,
0.055328369140625,
-0.03662109375,
-0.02215576171875,
0.05426025390625,
0.052001953125,
-0.031585693359375,
-0.01253509521484375,
0.003864288330078125,
0.00244140625,
-0.013336181640625,
-0.00897979736328125,
-0.0067138671875,
0.037567138671875,
-0.0038299560546875,
-0.007625579833984375,
-0.048065185546875,
0.040130615234375,
-0.07470703125,
0.0001531839370727539,
0.02996826171875,
-0.0018110275268554688,
0.004146575927734375,
-0.0189971923828125,
-0.01375579833984375,
-0.0223541259765625,
0.06500244140625,
0.0025348663330078125,
-0.0097503662109375,
-0.042327880859375,
0.016754150390625,
0.0281524658203125,
0.0030384063720703125,
-0.0250701904296875,
0.0119781494140625,
-0.019439697265625,
-0.0032939910888671875,
-0.0164642333984375,
0.01800537109375,
0.015228271484375,
-0.012908935546875,
0.0152435302734375,
-0.003261566162109375,
-0.0160675048828125,
-0.033477783203125,
-0.0030460357666015625,
-0.0526123046875,
-0.040191650390625,
0.0364990234375,
0.06048583984375,
0.01137542724609375,
0.01415252685546875,
0.0011310577392578125,
0.0280914306640625,
0.008087158203125,
-0.0140838623046875,
-0.012176513671875,
-0.022918701171875,
0.06732177734375,
0.007701873779296875,
0.0158843994140625,
0.033843994140625,
-0.0237884521484375,
0.027984619140625,
-0.0148162841796875,
-0.01467132568359375,
0.04669189453125,
-0.0321044921875,
0.0169525146484375,
0.041534423828125,
0.0190582275390625,
-0.01348114013671875,
0.0182952880859375,
-0.019775390625,
0.0011663436889648438,
0.020172119140625,
-0.00830841064453125,
0.0079803466796875,
0.00007706880569458008,
0.0261383056640625,
-0.0159149169921875,
0.05120849609375,
-0.0009622573852539062,
0.0183563232421875,
0.064453125,
-0.0223388671875,
0.00737762451171875,
0.00701141357421875,
0.054901123046875,
-0.013214111328125,
-0.0084075927734375,
0.0200347900390625,
-0.0220489501953125,
0.00031828880310058594,
-0.01030731201171875,
-0.004718780517578125,
-0.0106353759765625,
0.0297698974609375,
0.0138702392578125,
-0.0228729248046875,
0.0101470947265625,
0.004184722900390625,
-0.0017843246459960938,
-0.01049041748046875,
0.0198974609375,
0.0117950439453125,
-0.053253173828125,
-0.0028285980224609375,
0.0447998046875,
-0.007389068603515625,
-0.0049896240234375,
0.05316162109375,
-0.03485107421875,
0.0012731552124023438,
0.00421142578125,
0.024200439453125,
0.0010852813720703125,
-0.01145172119140625,
-0.02789306640625,
0.002170562744140625,
0.037109375,
-0.00745391845703125,
0.0181732177734375,
-0.0501708984375,
-0.012542724609375,
-0.035858154296875,
-0.0257568359375,
-0.01739501953125,
0.0289154052734375,
0.03717041015625,
-0.0160980224609375,
0.0254669189453125,
-0.00891876220703125,
-0.017852783203125,
-0.01070404052734375,
-0.0052947998046875,
0.05548095703125,
-0.036102294921875,
0.0045166015625,
0.046966552734375,
0.0533447265625,
-0.0170440673828125,
-0.004467010498046875,
0.047088623046875,
-0.034820556640625,
-0.01497650146484375,
-0.0015430450439453125,
-0.03253173828125,
-0.0151519775390625,
-0.02996826171875,
-0.04827880859375,
0.0943603515625,
-0.0111083984375,
0.0199737548828125,
0.0030345916748046875,
0.031585693359375,
0.005611419677734375,
0.0257110595703125,
-0.047576904296875,
0.054229736328125,
-0.020660400390625,
0.041473388671875,
-0.0692138671875,
-0.004184722900390625,
-0.007717132568359375,
0.021636962890625,
0.01092529296875,
0.004974365234375,
0.00261688232421875,
-0.03399658203125,
-0.0006318092346191406,
0.0217742919921875,
-0.01375579833984375,
0.0087127685546875,
-0.019683837890625,
-0.0120086669921875,
0.01995849609375,
-0.0202789306640625,
0.034576416015625,
-0.039825439453125,
-0.017303466796875,
0.0046844482421875,
0.0095672607421875,
0.0121917724609375,
0.0160064697265625,
0.037933349609375,
-0.03240966796875,
0.00948333740234375,
0.03546142578125,
-0.0268402099609375,
0.034027099609375,
0.0233612060546875,
0.033538818359375,
-0.007080078125,
-0.018280029296875,
-0.01119232177734375,
0.041473388671875,
-0.006748199462890625,
0.0022144317626953125,
0.024932861328125,
0.017730712890625,
0.037261962890625,
0.00012350082397460938,
-0.00832366943359375,
0.03399658203125,
0.006343841552734375,
0.035430908203125,
-0.022796630859375,
0.00638580322265625,
-0.060577392578125,
0.009002685546875,
0.00506591796875,
0.04290771484375,
-0.0299835205078125,
-0.044891357421875,
0.006282806396484375,
0.00518035888671875,
-0.004039764404296875,
0.014923095703125,
0.0111541748046875,
-0.03900146484375,
0.00666046142578125,
-0.005859375,
-0.0201263427734375,
-0.0013914108276367188,
0.07574462890625,
0.006900787353515625,
0.01499176025390625,
-0.0457763671875,
-0.0667724609375,
-0.03704833984375,
0.0020198822021484375,
0.0394287109375,
0.06591796875,
-0.0098419189453125,
0.06622314453125,
-0.039276123046875,
-0.0176544189453125,
-0.0201263427734375,
0.02691650390625,
-0.01041412353515625,
0.05517578125,
-0.051055908203125,
-0.00853729248046875,
-0.000568389892578125,
0.039825439453125,
0.0213623046875,
0.0291748046875,
0.04852294921875,
0.0299530029296875,
-0.06707763671875,
-0.002338409423828125,
0.0670166015625,
-0.040740966796875,
0.04248046875,
-0.037445068359375,
0.048187255859375,
0.0282135009765625,
-0.0178985595703125,
-0.021942138671875,
-0.04193115234375,
0.10028076171875,
-0.04852294921875,
0.034149169921875,
-0.0150604248046875,
-0.07000732421875,
0.0236968994140625,
-0.0196533203125,
0.1016845703125,
-0.0272216796875,
-0.09002685546875,
0.00865936279296875,
-0.04046630859375,
-0.069091796875,
0.0024566650390625,
0.02142333984375,
-0.059112548828125,
0.043426513671875,
0.0169219970703125,
-0.058258056640625,
0.0229644775390625,
0.0284881591796875,
-0.0054931640625,
-0.034423828125,
-0.0013790130615234375,
-0.039825439453125,
-0.0482177734375,
-0.009063720703125,
-0.0384521484375,
0.0279693603515625,
-0.0021152496337890625,
0.07098388671875,
-0.0186614990234375,
0.0240020751953125,
0.0235595703125,
-0.0243988037109375,
0.0296783447265625,
0.01470184326171875,
0.00650787353515625,
0.0033588409423828125,
-0.018096923828125,
-0.02325439453125,
0.01461029052734375,
0.005062103271484375,
0.00501251220703125,
-0.01446533203125,
-0.04718017578125,
-0.034454345703125,
0.036712646484375,
0.07672119140625,
0.035797119140625,
-0.0188446044921875,
-0.026275634765625,
-0.0179595947265625,
0.0259552001953125,
0.02947998046875,
0.025665283203125,
-0.00995635986328125,
0.00787353515625,
-0.0330810546875,
-0.006855010986328125,
0.0035152435302734375,
0.01068878173828125,
0.002685546875,
0.0276031494140625,
-0.092041015625,
-0.0242767333984375,
-0.00713348388671875,
-0.01104736328125,
-0.0297393798828125,
0.0223388671875,
0.03790283203125,
-0.01473236083984375,
0.01427459716796875,
0.00627899169921875,
0.0018377304077148438,
0.0164947509765625,
-0.04473876953125,
-0.004364013671875,
0.01224517822265625,
0.000804901123046875,
-0.010101318359375,
-0.01212310791015625,
-0.029937744140625,
-0.044708251953125,
-0.0270233154296875,
0.01348114013671875,
-0.044097900390625,
-0.0711669921875,
-0.0765380859375,
-0.0283355712890625,
0.05670166015625,
0.0178985595703125,
-0.0433349609375,
0.00986480712890625,
-0.01049041748046875,
0.0164794921875,
0.019317626953125,
0.004302978515625,
-0.03125,
-0.003143310546875,
-0.0291900634765625,
-0.08941650390625,
-0.054901123046875,
0.08514404296875,
-0.056304931640625,
0.037017822265625,
0.0350341796875,
-0.054412841796875,
-0.00849151611328125,
0.04473876953125,
0.035400390625,
0.09527587890625,
0.026519775390625,
-0.064208984375,
-0.043487548828125,
0.024322509765625,
0.061981201171875,
0.0038318634033203125,
-0.0128326416015625,
-0.01068878173828125,
0.00830078125,
-0.00659942626953125,
-0.0049285888671875,
0.0097198486328125,
-0.0411376953125,
-0.1072998046875,
0.07598876953125,
-0.0212554931640625,
-0.03741455078125,
-0.0121002197265625,
0.0222625732421875,
0.0097808837890625,
-0.044158935546875,
-0.0136871337890625,
0.0078887939453125,
-0.016845703125,
0.01934814453125,
-0.012298583984375,
-0.03912353515625,
0.047271728515625,
-0.0292205810546875,
-0.037567138671875,
-0.01268768310546875,
0.00481414794921875,
-0.035430908203125,
-0.0127716064453125,
0.0083160400390625,
0.01715087890625,
0.02703857421875,
-0.0222015380859375,
-0.00878143310546875,
0.01145172119140625,
-0.0229034423828125,
-0.044158935546875,
-0.01824951171875,
0.007587432861328125,
0.03228759765625,
0.07440185546875,
0.0638427734375,
0.0100860595703125,
-0.05438232421875,
0.036956787109375,
-0.0005474090576171875,
-0.038482666015625,
-0.03509521484375,
0.0128631591796875,
-0.06512451171875,
-0.049346923828125,
0.001708984375,
-0.011444091796875,
-0.035064697265625,
-0.0222320556640625,
-0.0355224609375,
-0.0157318115234375,
-0.0007748603820800781,
0.02532958984375,
-0.0024318695068359375,
-0.052703857421875,
0.0282745361328125,
-0.01274871826171875,
0.042266845703125,
-0.009124755859375,
0.047576904296875,
0.0262908935546875,
0.046966552734375,
0.0020751953125,
0.0224456787109375,
-0.017730712890625,
0.0009417533874511719,
0.019989013671875,
-0.01062774658203125,
-0.006473541259765625,
-0.0012874603271484375,
-0.0009131431579589844,
0.0163726806640625,
0.00736236572265625,
0.02301025390625,
0.002620697021484375,
0.01226043701171875,
-0.01312255859375,
0.03125,
-0.061737060546875,
0.005290985107421875,
-0.0207672119140625,
-0.01035308837890625,
-0.02789306640625,
0.0435791015625,
0.045257568359375,
-0.018280029296875,
0.003997802734375,
0.005046844482421875,
-0.02490234375,
-0.021484375,
0.00909423828125,
-0.00836181640625,
-0.025115966796875,
0.021026611328125
] |
e02612fbb60620394aec54d6abd05da5090e092d | Wordpress Stackexchange
Q: Should nonce be sanitized? The general guideline is that we should sanitize all user input before using them.
Now my questions is whether this applies to nonce or not.
Which one is correct?
wp_verify_nonce( sanitize_text_field( $_GET['some_nonce'] ), 'some_nonce' );
or
wp_verify_nonce( _GET['some_nonce'], 'some_nonce' );
A: Sanitizing is required when you are inserting user input into Database or outputting it in HTML etc. Here, you are simply doing a String comparison.
wp_verify_nonce function checks $nonce value like this:
if ( hash_equals( $expected, $nonce ) ) {
return 1;
}
For this you don't need sanitizing. So the following is fine:
wp_verify_nonce( $_GET['some_nonce'], 'some_nonce' );
| Q: Should nonce be sanitized? The general guideline is that we should sanitize all user input before using them.
Now my questions is whether this applies to nonce or not.
Which one is correct?
wp_verify_nonce( sanitize_text_field( $_GET['some_nonce'] ), 'some_nonce' );
or
wp_verify_nonce( _GET['some_nonce'], 'some_nonce' );
A: Sanitizing is required when you are inserting user input into Database or outputting it in HTML etc. Here, you are simply doing a String comparison.
wp_verify_nonce function checks $nonce value like this:
if ( hash_equals( $expected, $nonce ) ) {
return 1;
}
For this you don't need sanitizing. So the following is fine:
wp_verify_nonce( $_GET['some_nonce'], 'some_nonce' );
| wordpress | {
"language": "en",
"length": 104,
"provenance": "stackexchange_00019.jsonl.gz:473140",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256513"
} | [
0.06707763671875,
0.02911376953125,
-0.023040771484375,
-0.043243408203125,
0.049560546875,
-0.040924072265625,
0.043548583984375,
-0.00525665283203125,
0.0037136077880859375,
0.039337158203125,
-0.00942230224609375,
0.0024662017822265625,
-0.0154266357421875,
-0.01277923583984375,
-0.051513671875,
-0.033782958984375,
-0.0096435546875,
-0.0304718017578125,
-0.01168060302734375,
-0.004390716552734375,
0.007480621337890625,
-0.01348114013671875,
-0.0012178421020507812,
-0.13134765625,
0.0406494140625,
-0.105712890625,
0.12078857421875,
-0.00778961181640625,
0.04840087890625,
-0.0172576904296875,
0.035491943359375,
-0.031585693359375,
0.0188751220703125,
0.05181884765625,
-0.06005859375,
0.0270843505859375,
0.00597381591796875,
0.0228729248046875,
-0.00492095947265625,
0.03863525390625,
0.0194854736328125,
0.00023365020751953125,
-0.00232696533203125,
0.0204620361328125,
-0.0307769775390625,
-0.02484130859375,
0.0360107421875,
0.0033206939697265625,
0.0013332366943359375,
-0.006839752197265625,
0.01401519775390625,
-0.0025234222412109375,
0.036346435546875,
-0.0308074951171875,
-0.016021728515625,
0.00655364990234375,
-0.06976318359375,
-0.006866455078125,
0.0030651092529296875,
0.0794677734375,
0.05078125,
-0.00997161865234375,
-0.0243988037109375,
-0.0304412841796875,
0.00804901123046875,
-0.0255126953125,
-0.0002460479736328125,
0.022247314453125,
-0.08111572265625,
0.00884246826171875,
0.072998046875,
-0.044891357421875,
0.00910186767578125,
-0.0345458984375,
0.0472412109375,
0.018951416015625,
-0.0195770263671875,
0.007442474365234375,
0.0012636184692382812,
0.0278167724609375,
-0.011688232421875,
-0.038970947265625,
-0.0523681640625,
0.019561767578125,
-0.0139312744140625,
0.01837158203125,
-0.004810333251953125,
-0.0035305023193359375,
-0.008209228515625,
-0.017791748046875,
-0.019805908203125,
0.006946563720703125,
0.0159912109375,
-0.02984619140625,
-0.037872314453125,
-0.021697998046875,
0.00006467103958129883,
-0.00881195068359375,
-0.0118865966796875,
-0.01401519775390625,
0.044586181640625,
-0.041717529296875,
0.01496124267578125,
-0.00777435302734375,
0.004734039306640625,
0.051544189453125,
0.00514984130859375,
-0.0211944580078125,
-0.004627227783203125,
0.003314971923828125,
-0.00420379638671875,
0.007366180419921875,
-0.011627197265625,
-0.06805419921875,
-0.0081329345703125,
0.048980712890625,
0.0013456344604492188,
-0.002483367919921875,
0.0225067138671875,
-0.038177490234375,
0.0007596015930175781,
-0.01061248779296875,
0.028778076171875,
0.00954437255859375,
-0.01641845703125,
-0.035919189453125,
-0.0396728515625,
0.0023212432861328125,
-0.00640869140625,
0.04150390625,
-0.02606201171875,
0.01910400390625,
0.043975830078125,
-0.0075531005859375,
-0.01288604736328125,
-0.031707763671875,
0.01229095458984375,
0.004940032958984375,
0.0095977783203125,
0.019989013671875,
0.0014133453369140625,
-0.0428466796875,
0.019927978515625,
0.01953125,
0.04730224609375,
0.02740478515625,
0.0243072509765625,
-0.009796142578125,
-0.0087127685546875,
-0.018585205078125,
0.023406982421875,
-0.042236328125,
0.04022216796875,
-0.032989501953125,
-0.011138916015625,
-0.030975341796875,
-0.002330780029296875,
-0.02197265625,
-0.019195556640625,
-0.02764892578125,
0.0255279541015625,
-0.007843017578125,
-0.01224517822265625,
-0.0066070556640625,
-0.0002465248107910156,
-0.02630615234375,
-0.0301666259765625,
0.00699615478515625,
0.005283355712890625,
-0.0440673828125,
0.0106353759765625,
-0.022918701171875,
-0.00839996337890625,
-0.034423828125,
-0.007617950439453125,
0.017791748046875,
0.00959014892578125,
0.058868408203125,
0.021514892578125,
0.03076171875,
0.007778167724609375,
-0.036651611328125,
0.087890625,
-0.033660888671875,
-0.041290283203125,
0.0085296630859375,
0.0115203857421875,
0.0526123046875,
0.0285186767578125,
0.0183868408203125,
0.0242919921875,
-0.0034465789794921875,
-0.0272979736328125,
0.0156707763671875,
0.0027637481689453125,
-0.043182373046875,
-0.0155029296875,
-0.0296173095703125,
-0.007335662841796875,
0.02764892578125,
0.0163726806640625,
-0.03057861328125,
0.036346435546875,
-0.03607177734375,
-0.045654296875,
-0.01026153564453125,
-0.019989013671875,
0.0235443115234375,
-0.0318603515625,
0.024932861328125,
0.02471923828125,
-0.0123748779296875,
-0.06390380859375,
0.08575439453125,
0.018951416015625,
-0.003017425537109375,
-0.017059326171875,
0.056488037109375,
-0.00008767843246459961,
0.0233001708984375,
0.036041259765625,
-0.06256103515625,
0.03863525390625,
0.0229949951171875,
0.00948333740234375,
0.00518798828125,
-0.0109710693359375,
0.0086517333984375,
0.01451873779296875,
0.0202789306640625,
0.0411376953125,
0.01129150390625,
0.07177734375,
0.0281219482421875,
-0.0276336669921875,
-0.002857208251953125,
0.0006933212280273438,
-0.07318115234375,
-0.0197906494140625,
0.07171630859375,
0.039276123046875,
0.027587890625,
-0.00901031494140625,
-0.035614013671875,
0.033447265625,
-0.03387451171875,
0.025390625,
-0.037139892578125,
-0.0146484375,
0.0248870849609375,
-0.000576019287109375,
0.01409912109375,
0.01381683349609375,
-0.0782470703125,
-0.0120391845703125,
0.055206298828125,
-0.04095458984375,
-0.03216552734375,
0.021209716796875,
0.0015773773193359375,
0.0088348388671875,
0.005462646484375,
0.0318603515625,
-0.00457763671875,
-0.0007534027099609375,
-0.04534912109375,
-0.043121337890625,
-0.050933837890625,
-0.003368377685546875,
0.006137847900390625,
0.03607177734375,
-0.08526611328125,
-0.00690460205078125,
0.047760009765625,
0.04119873046875,
0.002788543701171875,
-0.025115966796875,
-0.0241241455078125,
0.0094451904296875,
0.02734375,
-0.0008730888366699219,
0.033447265625,
0.0257568359375,
-0.00762939453125,
-0.0085906982421875,
0.0087738037109375,
0.0290374755859375,
0.0098724365234375,
0.0007634162902832031,
-0.0089111328125,
0.021514892578125,
0.0078582763671875,
-0.0300140380859375,
0.03619384765625,
0.006389617919921875,
-0.0262908935546875,
-0.040985107421875,
-0.032470703125,
0.0285186767578125,
-0.033660888671875,
-0.01145172119140625,
0.05975341796875,
0.0224609375,
-0.01047515869140625,
0.01947021484375,
0.01438140869140625,
0.052459716796875,
-0.0030460357666015625,
-0.021087646484375,
-0.01287078857421875,
-0.08575439453125,
-0.1094970703125,
-0.0036258697509765625,
0.0066375732421875,
-0.02655029296875,
-0.05084228515625,
-0.0165863037109375,
0.01104736328125,
-0.09124755859375,
-0.035552978515625,
-0.0256500244140625,
0.0248565673828125,
-0.024566650390625,
-0.02142333984375,
0.0151824951171875,
0.0250701904296875,
-0.041961669921875,
0.0022735595703125,
0.019195556640625,
0.016998291015625,
-0.0458984375,
0.0036907196044921875,
-0.0287017822265625,
0.0124359130859375,
-0.0174407958984375,
-0.0068359375,
0.0038433074951171875,
0.0347900390625,
0.00047016143798828125,
-0.028564453125,
-0.0014553070068359375,
0.00910186767578125,
-0.0038013458251953125,
-0.022705078125,
-0.039520263671875,
-0.00033736228942871094,
0.0200958251953125,
-0.01216888427734375,
-0.042510986328125,
-0.0010175704956054688,
0.04107666015625,
-0.006214141845703125,
0.034759521484375,
-0.0167083740234375,
0.023651123046875,
0.027862548828125,
-0.046966552734375,
-0.01153564453125,
0.0216827392578125,
-0.050933837890625,
0.03143310546875,
0.01174163818359375,
0.025146484375,
0.004795074462890625,
-0.0546875,
-0.022216796875,
0.0208740234375,
0.026275634765625,
0.00902557373046875,
0.037841796875,
0.003692626953125,
0.0107269287109375,
0.0096282958984375,
-0.00994873046875,
-0.023712158203125,
-0.0202484130859375,
-0.016815185546875,
-0.035552978515625,
0.0033111572265625,
-0.0322265625,
-0.007175445556640625,
-0.022247314453125,
0.0182037353515625,
-0.01593017578125,
-0.01190948486328125,
0.0633544921875,
0.053009033203125,
0.0169830322265625,
-0.0012311935424804688,
-0.04241943359375,
-0.0171356201171875,
0.06280517578125,
-0.0270538330078125,
-0.0380859375,
0.00844573974609375,
0.04742431640625,
-0.04437255859375,
-0.0531005859375,
0.01751708984375,
-0.0226287841796875,
-0.06011962890625,
-0.02752685546875,
-0.026031494140625,
-0.02935791015625,
0.024322509765625,
-0.04071044921875,
-0.00026297569274902344,
-0.049102783203125,
0.0012054443359375,
-0.0146026611328125,
0.0118408203125,
0.000965118408203125,
0.01401519775390625,
-0.0301513671875,
0.012451171875,
-0.04815673828125,
-0.0462646484375,
-0.01166534423828125,
0.01033782958984375,
0.03546142578125,
0.0067596435546875,
-0.02569580078125,
0.01169586181640625,
0.039306640625,
-0.032012939453125,
-0.027618408203125,
0.005023956298828125,
0.0328369140625,
-0.0521240234375,
0.0484619140625,
0.0112457275390625,
0.00055694580078125,
0.0026798248291015625,
-0.0017566680908203125,
-0.0195159912109375,
-0.0367431640625,
-0.02691650390625,
-0.03265380859375,
0.0228118896484375,
-0.04022216796875,
-0.041412353515625,
-0.0230255126953125,
-0.0080108642578125,
-0.005634307861328125,
-0.02349853515625,
0.0030612945556640625,
-0.0125579833984375,
-0.039031982421875,
0.031982421875,
0.007328033447265625,
0.0165252685546875,
-0.0118255615234375,
0.0765380859375,
0.01294708251953125,
-0.0244140625,
-0.010162353515625,
-0.00701141357421875,
-0.0000661611557006836,
-0.03961181640625,
0.050048828125,
0.0253143310546875,
0.015625,
-0.004962921142578125,
-0.031524658203125,
-0.0091094970703125,
0.045379638671875,
0.00881195068359375,
0.008026123046875,
-0.045989990234375,
0.0266265869140625,
-0.004734039306640625,
-0.0232086181640625,
0.03955078125,
0.008697509765625,
0.02838134765625,
0.029083251953125,
-0.040863037109375,
-0.027069091796875,
-0.026031494140625,
0.03973388671875,
-0.047210693359375,
0.0123443603515625,
-0.025054931640625,
-0.0117340087890625,
0.00788116455078125,
-0.0017566680908203125,
-0.0034427642822265625,
-0.0200958251953125,
0.002399444580078125,
-0.02667236328125,
-0.0208587646484375,
-0.0018301010131835938,
0.0266571044921875,
-0.0182952880859375,
0.0013484954833984375,
-0.00814056396484375,
0.0002675056457519531,
0.048583984375,
-0.04150390625,
-0.053863525390625,
-0.043609619140625,
-0.0174560546875,
0.0011472702026367188,
0.0550537109375,
0.04541015625,
0.026611328125,
-0.0736083984375,
-0.0063323974609375,
0.00823974609375,
-0.02130126953125,
-0.038909912109375,
-0.0247802734375,
-0.0224761962890625,
-0.01568603515625,
-0.0061798095703125,
-0.00989532470703125,
0.0384521484375,
-0.0251922607421875,
0.036102294921875,
-0.01087188720703125,
0.0187225341796875,
0.058746337890625,
-0.018035888671875,
0.03424072265625,
-0.008331298828125,
-0.044769287109375,
-0.00485992431640625,
-0.0173492431640625,
-0.0233917236328125,
-0.06256103515625,
0.029327392578125,
0.0168304443359375,
-0.04736328125,
0.04443359375,
0.00899505615234375,
0.040985107421875,
-0.01451873779296875,
-0.00390625,
0.015777587890625,
-0.022247314453125,
-0.01189422607421875,
0.006561279296875,
0.00878143310546875,
0.0224151611328125,
-0.00637054443359375,
0.01049041748046875,
-0.05377197265625,
-0.01378631591796875,
0.0081024169921875,
-0.00861358642578125,
-0.0215606689453125,
-0.024322509765625,
0.03717041015625,
-0.037017822265625,
-0.048126220703125,
0.0311737060546875,
0.043243408203125,
-0.0259857177734375,
-0.0254364013671875,
0.06787109375,
0.0225677490234375,
0.0224151611328125,
-0.047271728515625,
-0.002201080322265625,
-0.0034770965576171875,
-0.005584716796875,
0.006641387939453125,
-0.036651611328125,
-0.00817108154296875,
-0.0224151611328125,
-0.033050537109375,
-0.025054931640625,
0.00701904296875,
0.016265869140625,
-0.0190887451171875,
0.0036144256591796875,
-0.0322265625,
0.0504150390625,
-0.0294647216796875,
-0.01464080810546875,
0.008819580078125,
-0.01447296142578125,
-0.0357666015625,
0.04595947265625,
-0.044586181640625,
0.0247802734375,
-0.018951416015625,
-0.01303863525390625,
-0.035858154296875,
-0.01360321044921875,
0.02557373046875,
0.0246734619140625,
-0.015899658203125,
-0.00223541259765625,
0.0056915283203125,
0.0000635981559753418,
0.044769287109375,
-0.0100555419921875,
0.0171356201171875,
-0.003948211669921875,
0.055511474609375,
-0.0013933181762695312,
0.0197906494140625,
-0.0020599365234375,
-0.0209503173828125,
-0.042938232421875,
-0.0166168212890625,
0.060791015625,
-0.01239013671875,
-0.034393310546875,
-0.0008015632629394531,
-0.02801513671875,
-0.00392913818359375,
0.042999267578125,
-0.03240966796875,
0.0140228271484375,
0.007297515869140625,
0.0258636474609375,
0.023834228515625,
-0.0233306884765625,
0.0046234130859375,
0.0194091796875,
-0.004085540771484375,
-0.01029205322265625,
0.00044608116149902344,
-0.034912109375,
0.004283905029296875,
0.01251220703125,
-0.005260467529296875,
0.00627899169921875,
-0.0101776123046875,
0.01363372802734375,
0.0283660888671875,
0.0712890625,
0.10333251953125,
-0.08709716796875,
0.011199951171875,
0.029998779296875,
-0.026214599609375,
0.006317138671875,
0.0023555755615234375,
0.02593994140625,
0.0038204193115234375,
0.06011962890625,
-0.033599853515625,
-0.0017690658569335938,
0.03753662109375,
-0.035186767578125,
-0.006374359130859375,
-0.0233917236328125,
0.0731201171875,
0.0089111328125,
-0.0231475830078125,
0.005443572998046875,
-0.00406646728515625,
-0.005924224853515625,
0.006580352783203125,
-0.004253387451171875,
0.00028014183044433594,
-0.045745849609375,
-0.047332763671875,
-0.0087890625,
-0.021575927734375,
-0.01715087890625,
-0.01253509521484375,
0.0010433197021484375,
0.0509033203125,
0.045074462890625,
-0.00479888916015625,
-0.03265380859375,
0.035247802734375,
-0.00830078125,
-0.0204925537109375,
-0.032684326171875,
-0.014404296875,
0.041107177734375,
-0.004474639892578125,
0.01523590087890625,
-0.001438140869140625,
0.0014514923095703125,
-0.017669677734375,
-0.00417327880859375,
0.05615234375,
-0.0151824951171875,
-0.0173187255859375,
0.03594970703125,
0.0016298294067382812,
-0.00788116455078125,
0.007381439208984375,
0.0138092041015625,
-0.035186767578125,
-0.018646240234375,
0.0030956268310546875,
-0.037017822265625,
0.01209259033203125,
0.003459930419921875,
-0.0838623046875,
0.08929443359375,
0.038482666015625,
0.03369140625,
-0.00937652587890625,
0.02447509765625,
-0.042266845703125,
-0.01152801513671875,
-0.033721923828125,
0.052978515625,
-0.0288848876953125,
0.05059814453125,
-0.0670166015625,
-0.0165252685546875,
0.01462554931640625,
0.046844482421875,
-0.01374053955078125,
0.001667022705078125,
0.00033211708068847656,
-0.0138092041015625,
0.0051727294921875,
-0.014007568359375,
-0.03912353515625,
0.0300140380859375,
0.01074981689453125,
0.00571441650390625,
0.037353515625,
-0.0139312744140625,
0.01190948486328125,
-0.00290679931640625,
-0.0024013519287109375,
0.052764892578125,
0.006343841552734375,
-0.004962921142578125,
0.0006690025329589844,
0.036590576171875,
-0.04571533203125,
0.0108642578125,
0.0325927734375,
-0.005126953125,
0.00751495361328125,
0.01308441162109375,
0.009674072265625,
-0.032989501953125,
0.0263214111328125,
-0.025909423828125,
0.04339599609375,
-0.01522064208984375,
0.0372314453125,
0.044403076171875,
0.0009737014770507812,
0.07769775390625,
0.064208984375,
0.0333251953125,
0.0292816162109375,
0.037261962890625,
0.028961181640625,
0.0504150390625,
0.039154052734375,
0.01049041748046875,
-0.007598876953125,
0.033477783203125,
0.040008544921875,
-0.0220489501953125,
-0.0022296905517578125,
0.007686614990234375,
0.0260162353515625,
0.004108428955078125,
-0.042938232421875,
0.0087127685546875,
-0.0311126708984375,
0.00725555419921875,
0.01343536376953125,
0.011993408203125,
0.059844970703125,
-0.0074615478515625,
0.030029296875,
0.053558349609375,
-0.05322265625,
0.035858154296875,
-0.056793212890625,
0.007049560546875,
0.01395416259765625,
0.016876220703125,
0.00720977783203125,
0.0266876220703125,
0.08245849609375,
0.002178192138671875,
0.00004756450653076172,
0.022247314453125,
0.016815185546875,
-0.019073486328125,
0.0023651123046875,
-0.0276947021484375,
0.0164642333984375,
0.009002685546875,
-0.0070953369140625,
0.0304412841796875,
0.041473388671875,
0.0224151611328125,
-0.050445556640625,
-0.00460052490234375,
0.048614501953125,
-0.0267486572265625,
0.01061248779296875,
-0.0068359375,
-0.0067138671875,
0.01453399658203125,
-0.0187530517578125,
0.005870819091796875,
-0.006320953369140625,
0.0258941650390625,
0.030029296875,
0.0093536376953125,
0.0140838623046875,
-0.00640869140625,
-0.016876220703125,
-0.003932952880859375,
-0.01171875,
0.05126953125,
-0.020416259765625,
-0.01027679443359375,
-0.0016889572143554688,
-0.01523590087890625,
-0.004726409912109375,
0.025360107421875,
0.005390167236328125,
0.0113525390625,
0.0875244140625,
-0.036102294921875,
-0.0006866455078125,
0.046142578125,
0.0178680419921875,
-0.0297088623046875,
0.02886962890625,
0.0003147125244140625,
-0.01336669921875,
-0.0001735687255859375,
0.01104736328125,
0.0129852294921875,
-0.0201416015625,
0.0312042236328125,
-0.006748199462890625,
0.011260986328125,
-0.0283355712890625,
0.03680419921875,
-0.06695556640625,
-0.0128021240234375,
0.017791748046875,
-0.0193634033203125,
-0.00677490234375,
0.00957489013671875,
-0.0115509033203125,
0.0748291015625,
-0.021087646484375,
-0.0206146240234375,
0.06610107421875,
-0.02545166015625,
-0.01538848876953125,
-0.030975341796875,
0.0019893646240234375,
-0.0231170654296875,
-0.057281494140625,
-0.0253753662109375,
0.03680419921875,
-0.0038852691650390625,
0.0347900390625,
-0.0474853515625,
0.059295654296875,
-0.00917816162109375,
0.0161285400390625,
0.012298583984375,
-0.057403564453125,
-0.01169586181640625,
-0.00006085634231567383,
0.007110595703125,
0.02716064453125,
-0.034942626953125,
-0.033233642578125,
-0.021270751953125,
0.0131683349609375,
-0.05828857421875,
-0.00913238525390625,
0.01019287109375,
-0.0222015380859375,
-0.0188446044921875,
0.034423828125,
0.035125732421875,
0.01390838623046875,
-0.053131103515625,
0.005764007568359375,
-0.0153961181640625,
-0.03729248046875,
0.001987457275390625,
-0.0126495361328125,
-0.0268402099609375,
0.00894927978515625,
0.000022292137145996094,
-0.025482177734375,
0.0482177734375,
0.0272979736328125,
0.036651611328125,
-0.0286712646484375,
-0.014892578125,
0.001514434814453125,
-0.05218505859375,
0.06854248046875,
-0.0172882080078125,
0.0443115234375,
-0.033538818359375,
-0.028594970703125,
-0.054534912109375,
-0.045928955078125,
-0.040679931640625,
0.06787109375,
-0.01361846923828125,
0.02288818359375,
0.0281524658203125,
-0.01739501953125,
-0.04595947265625,
0.02532958984375,
0.01425933837890625,
0.0537109375,
0.025634765625,
-0.01934814453125,
0.025848388671875,
0.00565338134765625,
-0.0098114013671875,
-0.08636474609375,
-0.0068359375,
-0.0784912109375,
0.057769775390625,
-0.035919189453125,
0.0182952880859375,
0.028839111328125,
-0.038665771484375,
-0.097412109375,
0.07733154296875,
-0.037139892578125,
-0.032562255859375,
-0.024993896484375,
-0.0272064208984375,
0.027191162109375,
-0.003086090087890625,
-0.0083770751953125,
-0.00213623046875,
-0.0643310546875,
0.00966644287109375,
0.0222320556640625,
0.01219940185546875,
0.0194854736328125,
0.05810546875,
-0.0173797607421875,
0.031646728515625,
-0.0008711814880371094,
-0.0269012451171875,
-0.017333984375,
-0.0063629150390625,
0.0145111083984375,
0.036407470703125,
-0.0255889892578125,
-0.021514892578125,
0.016998291015625,
0.00386810302734375,
-0.0034809112548828125,
0.036407470703125,
-0.00785064697265625,
0.017120361328125,
0.06085205078125,
0.028900146484375,
0.00678253173828125,
-0.0362548828125,
-0.01995849609375,
-0.0159149169921875,
0.0164337158203125,
-0.0264129638671875,
-0.0011396408081054688,
-0.05584716796875,
-0.0274505615234375,
-0.0070648193359375,
-0.00653076171875,
-0.0174560546875,
0.00893402099609375,
-0.005100250244140625,
-0.01058197021484375,
0.023284912109375,
-0.025421142578125,
0.0198516845703125,
-0.0645751953125,
0.04376220703125,
-0.0307464599609375,
-0.0305938720703125,
0.019012451171875,
0.043426513671875,
0.004123687744140625,
0.01279449462890625,
0.008941650390625,
0.0027446746826171875,
0.00878143310546875,
-0.0020961761474609375,
0.0204010009765625,
0.031707763671875,
-0.002872467041015625,
-0.0180511474609375,
-0.0074310302734375,
0.01280975341796875,
0.007663726806640625,
0.03955078125,
0.012420654296875,
-0.0196685791015625,
-0.0010509490966796875,
-0.0249786376953125,
-0.032440185546875,
-0.01396942138671875,
-0.0180816650390625,
0.0300140380859375,
0.0347900390625,
-0.00952911376953125,
0.10577392578125,
-0.045562744140625,
0.0286102294921875,
0.0049896240234375,
0.0186614990234375,
-0.00519561767578125,
0.006053924560546875,
-0.0008950233459472656,
0.007663726806640625,
0.0022602081298828125
] |
61f8649d6403d0b65768ba09c2a8bb6e70d545ef | Wordpress Stackexchange
Q: Wordpress generating 404 on .mp4 file in theme folder I am trying to load a full width video on my homepage. My situation is almost exactly like:
Video Background - (php & css) - generating 404 error on page load - Wordpress Theme File Structure Help
However, I do have the path to my video set as:
<source src="/wp-content/themes/uf2016/assets/videos/videobg.mp4" type="video/mp4">
This is a stuck I have been on for a while and have tried various ways to call in the video but all result in a 404. What am I missing that is causing wordpress to not see this file?
Console output error
Console output error when using get_template_directory_uri()
A: Using get_template_directory_uri() or get_stylesheet_directory_uri() you can retrieve the url to your themes folder, and after that you just need to specify the path starting from there. Your code should look like this:
<source src="<?php echo get_template_directory_uri() . '/assets/videos/videobg.mp4'; ?>" type="video/mp4">
| Q: Wordpress generating 404 on .mp4 file in theme folder I am trying to load a full width video on my homepage. My situation is almost exactly like:
Video Background - (php & css) - generating 404 error on page load - Wordpress Theme File Structure Help
However, I do have the path to my video set as:
<source src="/wp-content/themes/uf2016/assets/videos/videobg.mp4" type="video/mp4">
This is a stuck I have been on for a while and have tried various ways to call in the video but all result in a 404. What am I missing that is causing wordpress to not see this file?
Console output error
Console output error when using get_template_directory_uri()
A: Using get_template_directory_uri() or get_stylesheet_directory_uri() you can retrieve the url to your themes folder, and after that you just need to specify the path starting from there. Your code should look like this:
<source src="<?php echo get_template_directory_uri() . '/assets/videos/videobg.mp4'; ?>" type="video/mp4">
A: You're using the wrong method to call the http path to your mp4 file, to resolve this consider using one of the following wp functions :
get_theme_file_uri('assets/videos/videobg.mp4');
Or this :
trailingslashit( get_template_directory_uri() ).'assets/videos/videobg.mp4';
So your final code should look like the following snippet :
<source src="<?php echo get_theme_file_uri('assets/videos/videobg.mp4') ?>" type="video/mp4">
A: Upload your video in WordPress Media Library and copy video URL from them. You can check video URL from Attachment details.
Refer this : https://wordpress.org/support/article/media-library-screen/
| wordpress | {
"language": "en",
"length": 228,
"provenance": "stackexchange_00019.jsonl.gz:473165",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256580"
} | [
0.0147247314453125,
-0.0300445556640625,
0.0040740966796875,
-0.028350830078125,
-0.0226287841796875,
0.00783538818359375,
0.01507568359375,
-0.01273345947265625,
-0.00152587890625,
0.0225982666015625,
-0.003307342529296875,
0.005268096923828125,
-0.005878448486328125,
-0.016082763671875,
-0.0185546875,
-0.026763916015625,
0.032470703125,
-0.006198883056640625,
0.03619384765625,
-0.00994873046875,
0.00021696090698242188,
0.00875091552734375,
0.048248291015625,
0.017578125,
-0.007778167724609375,
-0.0010623931884765625,
0.07684326171875,
-0.0278167724609375,
-0.0256500244140625,
-0.0433349609375,
0.0021610260009765625,
0.0509033203125,
0.025299072265625,
0.015045166015625,
-0.0135498046875,
-0.00887298583984375,
0.012054443359375,
-0.0005664825439453125,
-0.0003814697265625,
0.0100555419921875,
-0.0027179718017578125,
0.022613525390625,
0.048553466796875,
0.034149169921875,
-0.0092620849609375,
-0.04571533203125,
-0.003330230712890625,
-0.0540771484375,
0.00937652587890625,
0.053497314453125,
-0.01363372802734375,
0.01995849609375,
-0.0183258056640625,
0.032196044921875,
0.0121917724609375,
-0.004474639892578125,
-0.004398345947265625,
0.0139007568359375,
0.00347900390625,
-0.01468658447265625,
-0.003154754638671875,
0.036651611328125,
0.00859832763671875,
0.005157470703125,
-0.0273590087890625,
0.0010519027709960938,
-0.034759521484375,
-0.006359100341796875,
-0.023223876953125,
-0.00997161865234375,
0.0262451171875,
-0.0182647705078125,
-0.01007843017578125,
-0.025054931640625,
0.0114898681640625,
-0.0121917724609375,
0.0106964111328125,
-0.0172576904296875,
0.01190185546875,
0.01325225830078125,
0.0310821533203125,
-0.023284912109375,
-0.0030269622802734375,
-0.03662109375,
0.0440673828125,
0.00412750244140625,
0.001728057861328125,
-0.01053619384765625,
0.0240936279296875,
-0.0309295654296875,
-0.0016183853149414062,
-0.0218658447265625,
0.01593017578125,
-0.02276611328125,
-0.0179290771484375,
-0.053466796875,
-0.0182342529296875,
0.009521484375,
-0.0251922607421875,
0.0139923095703125,
-0.0108642578125,
-0.0228271484375,
0.02874755859375,
-0.044219970703125,
0.00284576416015625,
0.0179443359375,
0.004215240478515625,
-0.0129241943359375,
0.01739501953125,
0.0253143310546875,
-0.01861572265625,
0.044189453125,
0.00010275840759277344,
-0.038818359375,
-0.043701171875,
0.0196075439453125,
0.01128387451171875,
-0.0286407470703125,
0.0109100341796875,
-0.018829345703125,
0.00485992431640625,
0.0247039794921875,
0.026214599609375,
-0.025848388671875,
-0.004283905029296875,
-0.00211334228515625,
-0.0072174072265625,
-0.052337646484375,
0.044708251953125,
0.03955078125,
-0.0185394287109375,
-0.01404571533203125,
0.01148223876953125,
-0.01519012451171875,
-0.019805908203125,
-0.030731201171875,
-0.020172119140625,
-0.0181121826171875,
-0.03363037109375,
0.02142333984375,
-0.019134521484375,
-0.022857666015625,
0.02557373046875,
-0.030029296875,
0.023406982421875,
-0.0012826919555664062,
0.0101776123046875,
0.0338134765625,
0.0229949951171875,
-0.01439666748046875,
0.01161956787109375,
0.002689361572265625,
0.037933349609375,
0.030731201171875,
0.007648468017578125,
-0.021240234375,
0.0787353515625,
-0.0543212890625,
-0.020111083984375,
-0.07647705078125,
0.043304443359375,
0.00902557373046875,
-0.01001739501953125,
-0.0219879150390625,
-0.0243682861328125,
-0.041473388671875,
-0.045257568359375,
-0.00897979736328125,
0.0244140625,
0.056243896484375,
-0.0130615234375,
-0.01416778564453125,
-0.003276824951171875,
0.0230560302734375,
-0.01169586181640625,
0.004974365234375,
0.0205230712890625,
-0.0318603515625,
0.0143890380859375,
0.058746337890625,
0.0145263671875,
-0.007266998291015625,
0.0225067138671875,
-0.004184722900390625,
-0.042724609375,
0.042694091796875,
0.0017795562744140625,
0.005352020263671875,
-0.0093994140625,
0.002986907958984375,
0.045928955078125,
0.059478759765625,
-0.0352783203125,
0.039337158203125,
-0.01232147216796875,
-0.0062103271484375,
-0.0136566162109375,
0.016693115234375,
-0.0164642333984375,
-0.004360198974609375,
0.053497314453125,
0.00823974609375,
0.0200347900390625,
-0.03662109375,
-0.0196380615234375,
-0.0030765533447265625,
0.00022351741790771484,
0.028106689453125,
-0.017120361328125,
0.0305328369140625,
0.01065826416015625,
0.0275421142578125,
-0.0188446044921875,
-0.040679931640625,
-0.008880615234375,
0.0238494873046875,
0.02294921875,
0.050018310546875,
-0.006107330322265625,
0.0606689453125,
-0.04339599609375,
-0.0229339599609375,
-0.0250091552734375,
0.0125885009765625,
0.011077880859375,
0.009368896484375,
-0.01241302490234375,
0.00504302978515625,
0.0362548828125,
0.011810302734375,
0.01287841796875,
-0.0009899139404296875,
0.0005559921264648438,
0.006717681884765625,
-0.06524658203125,
-0.00930023193359375,
-0.049407958984375,
-0.0005345344543457031,
0.011322021484375,
0.06011962890625,
0.03790283203125,
0.0289459228515625,
-0.016876220703125,
-0.0291595458984375,
0.0675048828125,
-0.054901123046875,
-0.00751495361328125,
-0.0088348388671875,
0.0029239654541015625,
-0.008270263671875,
-0.0174102783203125,
-0.035400390625,
0.03741455078125,
-0.067138671875,
-0.03167724609375,
0.03997802734375,
0.0082550048828125,
0.019256591796875,
-0.03094482421875,
0.0298309326171875,
-0.006008148193359375,
0.02984619140625,
0.00008547306060791016,
0.0020198822021484375,
-0.006526947021484375,
0.020843505859375,
-0.00336456298828125,
-0.0011835098266601562,
-0.016082763671875,
0.028900146484375,
0.0266265869140625,
-0.0262298583984375,
0.00710296630859375,
0.04962158203125,
0.04571533203125,
-0.01058197021484375,
-0.0016412734985351562,
-0.0367431640625,
-0.003875732421875,
0.0186309814453125,
-0.0238494873046875,
0.02239990234375,
-0.05621337890625,
-0.02044677734375,
-0.002285003662109375,
-0.05413818359375,
-0.0230712890625,
-0.00997161865234375,
-0.0016794204711914062,
0.019805908203125,
0.02642822265625,
0.054656982421875,
-0.0006666183471679688,
0.03924560546875,
-0.00994110107421875,
0.007213592529296875,
0.073974609375,
-0.03717041015625,
0.03558349609375,
-0.00861358642578125,
0.04473876953125,
0.054840087890625,
-0.017547607421875,
0.0011949539184570312,
0.01148223876953125,
0.043121337890625,
0.059814453125,
-0.00818634033203125,
-0.0175323486328125,
-0.0125885009765625,
-0.0196685791015625,
-0.03302001953125,
0.031707763671875,
-0.00914764404296875,
0.0198211669921875,
-0.0184173583984375,
-0.005245208740234375,
0.0178985595703125,
-0.0833740234375,
-0.09381103515625,
0.037445068359375,
-0.060028076171875,
0.04248046875,
-0.0063934326171875,
-0.0240478515625,
-0.035888671875,
0.029876708984375,
0.0077667236328125,
0.003543853759765625,
-0.0272979736328125,
-0.05023193359375,
-0.030792236328125,
-0.053192138671875,
-0.00260162353515625,
0.004146575927734375,
-0.006961822509765625,
0.0167999267578125,
-0.0101470947265625,
0.01361846923828125,
-0.034820556640625,
0.0228729248046875,
0.07196044921875,
0.0045166015625,
-0.006168365478515625,
0.0499267578125,
0.00334930419921875,
-0.0107574462890625,
0.017547607421875,
-0.041229248046875,
0.0438232421875,
-0.035125732421875,
-0.0206756591796875,
-0.01195526123046875,
-0.083740234375,
-0.046417236328125,
0.07568359375,
0.03070068359375,
-0.0960693359375,
0.0166015625,
-0.09759521484375,
-0.03265380859375,
-0.021514892578125,
-0.061859130859375,
0.051239013671875,
0.053741455078125,
-0.0087127685546875,
-0.03350830078125,
0.01171875,
0.00760650634765625,
-0.0093841552734375,
0.02783203125,
-0.027099609375,
0.05596923828125,
-0.003368377685546875,
0.001956939697265625,
-0.0308074951171875,
0.0219268798828125,
0.0006060600280761719,
0.0194549560546875,
0.00878143310546875,
0.0211029052734375,
-0.01262664794921875,
-0.00841522216796875,
-0.0682373046875,
-0.0250396728515625,
0.039581298828125,
0.0099945068359375,
0.0284881591796875,
-0.0283203125,
-0.03424072265625,
-0.024261474609375,
0.0562744140625,
-0.04052734375,
-0.028106689453125,
0.01116943359375,
0.0194244384765625,
-0.01006317138671875,
-0.050445556640625,
-0.02655029296875,
-0.01483154296875,
-0.033294677734375,
0.00661468505859375,
-0.006866455078125,
-0.0169677734375,
-0.0107574462890625,
-0.034698486328125,
-0.02593994140625,
-0.041839599609375,
0.04351806640625,
-0.005084991455078125,
0.0277862548828125,
0.01983642578125,
0.003810882568359375,
0.018463134765625,
-0.035858154296875,
-0.01105499267578125,
-0.0826416015625,
-0.0308074951171875,
0.01496124267578125,
0.08599853515625,
0.0024204254150390625,
-0.016082763671875,
-0.0303497314453125,
0.0601806640625,
-0.0004296302795410156,
-0.0007581710815429688,
0.0209503173828125,
-0.0081634521484375,
0.030487060546875,
0.03265380859375,
0.03173828125,
0.0025119781494140625,
-0.00569915771484375,
-0.0215301513671875,
-0.0377197265625,
0.020477294921875,
-0.025665283203125,
0.0149078369140625,
0.00528717041015625,
-0.0102081298828125,
-0.02044677734375,
-0.033355712890625,
-0.0198974609375,
-0.0016307830810546875,
0.0078582763671875,
-0.01471710205078125,
-0.026611328125,
-0.023529052734375,
0.03448486328125,
-0.008087158203125,
-0.016326904296875,
0.0019006729125976562,
0.04241943359375,
0.0168609619140625,
-0.027252197265625,
-0.01409149169921875,
0.01457977294921875,
0.042510986328125,
-0.0005903244018554688,
0.04290771484375,
0.0250244140625,
-0.0377197265625,
0.058837890625,
0.017303466796875,
-0.0177154541015625,
0.07330322265625,
0.0279388427734375,
0.0171966552734375,
-0.05389404296875,
0.0428466796875,
0.00030493736267089844,
-0.0557861328125,
0.036407470703125,
-0.006023406982421875,
0.00783538818359375,
-0.0043487548828125,
0.0195465087890625,
0.009521484375,
-0.040985107421875,
-0.055023193359375,
-0.07220458984375,
0.023712158203125,
-0.057220458984375,
0.055572509765625,
0.0183868408203125,
0.004364013671875,
0.0640869140625,
0.0543212890625,
-0.01224517822265625,
0.0347900390625,
0.02740478515625,
-0.002658843994140625,
0.0242462158203125,
0.024169921875,
-0.0298004150390625,
0.007686614990234375,
0.010986328125,
-0.0177001953125,
0.0194854736328125,
-0.00997161865234375,
-0.05438232421875,
0.029327392578125,
-0.0164642333984375,
-0.00319671630859375,
-0.058990478515625,
0.0491943359375,
0.060882568359375,
-0.04443359375,
-0.0214385986328125,
-0.0694580078125,
-0.0072479248046875,
-0.0693359375,
0.06298828125,
0.02069091796875,
0.006473541259765625,
0.006504058837890625,
0.062286376953125,
0.0465087890625,
0.0028018951416015625,
-0.0206146240234375,
-0.00598907470703125,
-0.052703857421875,
0.05499267578125,
0.0186004638671875,
-0.0217132568359375,
-0.004474639892578125,
0.0509033203125,
0.004016876220703125,
-0.05303955078125,
0.0111236572265625,
-0.00658416748046875,
0.05230712890625,
-0.0787353515625,
-0.08221435546875,
0.0836181640625,
-0.04571533203125,
-0.0016765594482421875,
-0.005168914794921875,
-0.07080078125,
-0.01129913330078125,
-0.0283203125,
-0.01355743408203125,
0.044189453125,
-0.0292510986328125,
-0.02685546875,
0.048004150390625,
-0.00397491455078125,
0.0295257568359375,
0.0609130859375,
-0.04486083984375,
0.03521728515625,
0.03607177734375,
0.043243408203125,
-0.01392364501953125,
-0.006359100341796875,
-0.051605224609375,
0.00920867919921875,
-0.036376953125,
-0.006866455078125,
0.059844970703125,
-0.042938232421875,
-0.004451751708984375,
0.00548553466796875,
0.028045654296875,
0.0272369384765625,
0.0261077880859375,
0.02294921875,
0.0007977485656738281,
-0.050689697265625,
0.0189361572265625,
-0.0297393798828125,
0.00347137451171875,
0.007404327392578125,
-0.04669189453125,
-0.04315185546875,
-0.044525146484375,
-0.053070068359375,
-0.01543426513671875,
0.0033740997314453125,
0.052520751953125,
-0.0303497314453125,
0.04571533203125,
-0.007083892822265625,
-0.0106201171875,
-0.02886962890625,
0.022003173828125,
0.01666259765625,
0.005992889404296875,
-0.018096923828125,
-0.004100799560546875,
0.020172119140625,
0.0042266845703125,
-0.00785064697265625,
-0.00887298583984375,
-0.0105743408203125,
0.003143310546875,
0.0036067962646484375,
0.01548004150390625,
0.078125,
-0.002384185791015625,
0.0077056884765625,
-0.01238250732421875,
0.0032482147216796875,
-0.036529541015625,
0.07000732421875,
-0.0012416839599609375,
0.0362548828125,
0.003513336181640625,
-0.00949859619140625,
0.01383209228515625,
-0.0202484130859375,
-0.03118896484375,
0.0230712890625,
-0.008087158203125,
0.004283905029296875,
0.02728271484375,
-0.003940582275390625,
0.0635986328125,
0.0736083984375,
0.0029201507568359375,
0.059051513671875,
0.005016326904296875,
0.01053619384765625,
0.00860595703125,
0.05340576171875,
-0.0158538818359375,
-0.037750244140625,
0.03338623046875,
0.0213470458984375,
-0.02294921875,
-0.010223388671875,
-0.0276031494140625,
0.0287017822265625,
-0.01276397705078125,
0.0308837890625,
-0.01178741455078125,
0.01416015625,
0.0006928443908691406,
-0.04541015625,
0.02777099609375,
-0.01390838623046875,
-0.00787353515625,
-0.0198211669921875,
0.041015625,
0.00868988037109375,
-0.007843017578125,
0.00565338134765625,
-0.00006723403930664062,
0.00026035308837890625,
0.003932952880859375,
0.0283660888671875,
-0.006107330322265625,
-0.06915283203125,
-0.00603485107421875,
0.0516357421875,
-0.027496337890625,
-0.0107879638671875,
0.0221710205078125,
-0.017059326171875,
0.0018978118896484375,
-0.0042877197265625,
0.022064208984375,
-0.019317626953125,
0.0008683204650878906,
0.0096282958984375,
0.01239776611328125,
-0.0086517333984375,
0.01229095458984375,
-0.0200958251953125,
0.007411956787109375,
-0.00893402099609375,
-0.0261077880859375,
0.041290283203125,
-0.002368927001953125,
-0.005062103271484375,
0.0181884765625,
-0.0302886962890625,
-0.01329803466796875,
-0.0173187255859375,
0.0260162353515625,
0.0034027099609375,
-0.041351318359375,
0.04498291015625,
-0.03460693359375,
-0.010498046875,
0.0256805419921875,
0.0025272369384765625,
0.003993988037109375,
0.01421356201171875,
0.0345458984375,
-0.0633544921875,
-0.0187835693359375,
0.048828125,
-0.0025005340576171875,
-0.006591796875,
0.033966064453125,
-0.0145111083984375,
0.046966552734375,
-0.053070068359375,
0.0156707763671875,
0.04205322265625,
0.016448974609375,
-0.00485992431640625,
0.010009765625,
-0.008026123046875,
0.056854248046875,
0.016998291015625,
0.00855255126953125,
-0.034698486328125,
-0.024810791015625,
-0.0026397705078125,
0.0595703125,
0.049102783203125,
-0.005016326904296875,
-0.0007691383361816406,
-0.00621795654296875,
0.0728759765625,
0.04803466796875,
0.0322265625,
0.0110931396484375,
-0.002780914306640625,
-0.00921630859375,
0.031280517578125,
0.001438140869140625,
0.047271728515625,
-0.027984619140625,
-0.0262603759765625,
-0.0088043212890625,
0.0152435302734375,
-0.003917694091796875,
-0.003940582275390625,
-0.01409912109375,
-0.018524169921875,
0.0019092559814453125,
0.0150604248046875,
-0.0303955078125,
-0.0294952392578125,
0.05364990234375,
0.0294342041015625,
-0.077880859375,
-0.0194854736328125,
-0.052886962890625,
0.05938720703125,
-0.0018110275268554688,
-0.04827880859375,
-0.005523681640625,
0.004962921142578125,
0.0237274169921875,
-0.06256103515625,
-0.056060791015625,
0.00801849365234375,
-0.00006461143493652344,
0.01380157470703125,
0.052734375,
0.0222320556640625,
0.01514434814453125,
-0.002101898193359375,
0.020843505859375,
0.0266265869140625,
-0.02520751953125,
-0.029388427734375,
0.0162506103515625,
0.02044677734375,
0.002574920654296875,
-0.002681732177734375,
0.00368499755859375,
-0.01056671142578125,
0.01873779296875,
-0.039520263671875,
0.007076263427734375,
0.018218994140625,
0.0227203369140625,
-0.00629425048828125,
-0.033843994140625,
0.0012426376342773438,
0.01236724853515625,
-0.066162109375,
0.0362548828125,
0.01788330078125,
0.04766845703125,
0.0310821533203125,
0.0138092041015625,
0.017425537109375,
-0.01629638671875,
-0.005176544189453125,
0.058746337890625,
-0.015411376953125,
0.002490997314453125,
-0.03887939453125,
-0.051422119140625,
0.0242767333984375,
0.04046630859375,
-0.004009246826171875,
0.012359619140625,
-0.0018510818481445312,
-0.0009822845458984375,
-0.007274627685546875,
-0.01419830322265625,
0.00792694091796875,
-0.0264129638671875,
0.0251922607421875,
-0.036956787109375,
0.0181884765625,
-0.01605224609375,
-0.007648468017578125,
-0.013916015625,
0.0175018310546875,
0.01470947265625,
-0.0023517608642578125,
0.00965118408203125,
0.0113067626953125,
-0.00876617431640625,
0.0081634521484375,
0.000017821788787841797,
0.0023097991943359375,
0.017364501953125,
-0.038726806640625,
0.004108428955078125,
-0.0251312255859375,
-0.068359375,
0.007549285888671875,
0.03997802734375,
-0.0214385986328125,
0.01395416259765625,
-0.003711700439453125,
-0.01043701171875,
-0.0255889892578125,
-0.0017719268798828125,
0.0352783203125,
-0.0027713775634765625,
0.006320953369140625,
0.0194244384765625,
-0.06591796875,
-0.05303955078125,
-0.04193115234375,
0.059234619140625,
-0.0012874603271484375,
0.1693115234375,
-0.07037353515625,
0.018707275390625,
0.016387939453125,
-0.0093994140625,
0.03045654296875,
-0.002902984619140625,
0.016265869140625,
0.0138397216796875,
-0.007579803466796875,
-0.0343017578125,
-0.04705810546875,
0.037109375,
0.021148681640625,
-0.003345489501953125,
0.04388427734375,
-0.007701873779296875,
0.006412506103515625,
-0.01155853271484375,
-0.01088714599609375,
-0.04010009765625,
-0.0709228515625,
-0.046875,
0.03228759765625,
-0.013946533203125,
0.0018625259399414062,
-0.0279541015625,
0.05072021484375,
0.021728515625,
-0.0004131793975830078,
0.04937744140625,
-0.034881591796875,
0.07794189453125,
0.027801513671875,
-0.058319091796875,
-0.0298004150390625,
0.00543212890625,
-0.01161956787109375,
0.01641845703125,
-0.00911712646484375,
0.04559326171875,
-0.002376556396484375,
-0.037384033203125,
0.00634765625,
-0.02020263671875,
0.0277862548828125,
-0.0253143310546875,
-0.0114288330078125,
-0.0025348663330078125,
0.012664794921875,
0.0202484130859375,
-0.022796630859375,
-0.0172119140625,
-0.0118255615234375,
-0.006999969482421875,
0.0160980224609375,
0.00484466552734375,
-0.0005588531494140625,
0.0305328369140625,
0.002040863037109375,
0.0170135498046875,
0.0198211669921875,
-0.05120849609375,
0.0211639404296875,
-0.006519317626953125,
0.01265716552734375,
0.01275634765625,
0.05230712890625,
-0.0127410888671875,
0.048309326171875,
-0.043548583984375,
-0.0163421630859375,
-0.0061798095703125,
0.00830078125,
-0.02044677734375,
0.0113525390625,
0.059051513671875,
-0.009033203125,
-0.0224761962890625,
0.026275634765625,
-0.007808685302734375,
0.07891845703125,
-0.07830810546875,
-0.0267791748046875,
-0.0205230712890625,
0.0236968994140625,
-0.015960693359375,
-0.0212860107421875,
-0.005168914794921875,
-0.0243072509765625,
0.0179901123046875,
0.0185394287109375,
-0.0399169921875,
-0.02069091796875,
-0.054840087890625,
-0.048095703125,
0.049713134765625,
0.019073486328125,
-0.031768798828125,
-0.046905517578125,
0.0433349609375,
-0.0075836181640625,
-0.00360870361328125,
-0.00473785400390625,
-0.0181884765625,
0.0264892578125,
0.0290374755859375,
0.024658203125,
0.0006861686706542969,
0.033233642578125,
0.01947021484375,
-0.06268310546875,
0.004451751708984375,
-0.01361846923828125,
-0.003490447998046875,
-0.01021575927734375,
0.01543426513671875,
-0.005634307861328125,
0.026580810546875,
-0.0216064453125,
-0.00478363037109375,
0.0006222724914550781,
-0.023895263671875,
-0.004741668701171875,
-0.002101898193359375,
-0.03326416015625,
-0.0262603759765625,
0.0369873046875,
0.047576904296875,
0.012451171875,
-0.007411956787109375,
-0.0631103515625,
-0.0274810791015625,
-0.0264434814453125,
-0.005596160888671875,
0.04193115234375,
-0.0909423828125,
0.0111846923828125,
0.0144805908203125,
-0.01160430908203125,
-0.0150299072265625,
-0.0162200927734375,
-0.037017822265625,
-0.00879669189453125,
-0.0264739990234375,
-0.00798797607421875,
-0.0170135498046875,
-0.0224609375,
0.06378173828125,
-0.03961181640625,
0.0203857421875,
-0.0186309814453125,
0.03704833984375,
0.0408935546875,
-0.040924072265625,
0.021575927734375,
0.00373077392578125,
-0.0218505859375,
0.0025482177734375,
0.0256500244140625,
0.02001953125,
0.004241943359375,
-0.0478515625,
0.020721435546875,
0.00257110595703125,
-0.0298919677734375,
-0.0009031295776367188,
0.0200042724609375,
0.013671875,
-0.040740966796875,
0.0753173828125,
-0.007659912109375,
0.01496124267578125,
-0.01080322265625,
0.04052734375,
0.0171966552734375,
-0.019683837890625,
0.035675048828125,
-0.000054717063903808594,
-0.001934051513671875,
0.0208892822265625,
-0.05865478515625,
-0.035980224609375,
-0.00870513916015625,
-0.0767822265625,
-0.0028972625732421875,
0.0019969940185546875
] |
7b5faf8b82518749774e217c699043a1c8b09d2a | Wordpress Stackexchange
Q: Change logo url link I'm trying to change the logo url of the site to "mywebsite.com/side2", but it is not working, can anyone tell me where is the error in the code below?
add_filter( 'login_headerurl', 'custom_loginlogo_url' );
function custom_loginlogo_url($url) {
return home_url( 'side2' );
}
A: The login_headerurl filter is for changing the logo url of login page, according to the Codex.
To change the logo URL of your homepage, you will have to look into your theme's header.php file. You logo and it's link are included there. Depending on your theme, they way that your URL is generated may be different.
Access your header.php file from Appearance > Edit in the admin panel, and search for the line containing the logo. There, you can change it to whatever you want.
| Q: Change logo url link I'm trying to change the logo url of the site to "mywebsite.com/side2", but it is not working, can anyone tell me where is the error in the code below?
add_filter( 'login_headerurl', 'custom_loginlogo_url' );
function custom_loginlogo_url($url) {
return home_url( 'side2' );
}
A: The login_headerurl filter is for changing the logo url of login page, according to the Codex.
To change the logo URL of your homepage, you will have to look into your theme's header.php file. You logo and it's link are included there. Depending on your theme, they way that your URL is generated may be different.
Access your header.php file from Appearance > Edit in the admin panel, and search for the line containing the logo. There, you can change it to whatever you want.
A: If the theme author is using bloginfo('url') to output the url, then you can do the following.
bloginfo('url') is a wrapper for echo get_bloginfo('url') which is a wrapper for home_url() which in turn is a wrapper for get_home_url(). The code for that function is available here.
As can be seen, there is a filter available at the end of the function that you can use to change the value of the home url.
Edited so that the filters only fire for the home_url and custom_logo filters are both called.
add_filter( 'home_url', 'wpse_106269_home_url', 10, 4 );
function wpse_106269_home_url( $url, $path, $orig_scheme, $blog_id ) {
add_filter( 'custom_logo', 'wpse_106269_custom_logo', 10, 2 );
}
function wpse_106269_custom_logo( $html, $blog_id ) {
//* Remove the filter
remove_filter( 'custom_logo', 'wpse_106269_custom_logo', 10, 2 );
//* Use str_replace() to change link
return str_replace( $old_url, $new_url, $html );
}
A: You can Use this function to change the Logo url in Wordpress.
Simple add this code in function.php file
//changing the url on the logo to redirect them
function mb_login_url() { return home_url(); }
add_filter( 'login_headerurl', 'mb_login_url' );
// changing the alt text on the logo to show your site name
function mb_login_title() { return get_option( 'blogname' ); }
add_filter( 'login_headertitle', 'mb_login_title' );
To change the Logo in Admin side login page
function my_login_logo_one() {
?>
<style type="text/css">
body.login div#login h1 a {
background-image: url(http://sitetitle.com/logo-1.png);
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'my_login_logo_one' );
A: In case anyone else if facing the same issue, I created the plugin SMNTCS Custom Logo Link a while ago, which works with all themes that have 100.000+ active installations. If the theme that you're using is not among those themes, simply create an issue on https://github.com/nielslange/smntcs-custom-logo-link/issues and I'm happy to extend the plugin.
A: The easiest way is to add this jQuery code
jQuery(document).ready(function($){
$("a.logo-class").attr("href", "https://google.com");
});
A: I ended up taking the following Javascript-based approach which worked for my purposes. I am using the theme from https://theme.co/x. I installed the Insert Headers and Footers plugin and then added the following Javascript (Footer section):
<script>
document.getElementsByClassName('x-brand')[0].setAttribute("href", "https://example.com");
</script>
You will need to change the 'x-brand' to point to the class of the logo href element specific for the given theme you are using.
A: You can use the get_page_by_path as follows:
add_filter( 'login_headerurl', 'custom_loginlogo_url' );
function custom_loginlogo_url($url) {
return get_page_by_path( 'side2' );
}
| wordpress | {
"language": "en",
"length": 521,
"provenance": "stackexchange_00019.jsonl.gz:473196",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256717"
} | [
0.037811279296875,
0.009033203125,
0.0158843994140625,
0.0079803466796875,
0.005352020263671875,
-0.0300140380859375,
0.0677490234375,
-0.042083740234375,
-0.0274200439453125,
0.034881591796875,
0.03582763671875,
-0.0107269287109375,
-0.0233612060546875,
-0.045654296875,
-0.002315521240234375,
-0.03179931640625,
0.035980224609375,
-0.0002739429473876953,
0.04473876953125,
-0.004177093505859375,
0.016357421875,
0.0207977294921875,
0.0174407958984375,
0.021148681640625,
0.02154541015625,
-0.031158447265625,
0.07574462890625,
-0.0341796875,
0.0287017822265625,
-0.0069732666015625,
0.0270233154296875,
-0.031982421875,
0.0120697021484375,
0.0299224853515625,
-0.00905609130859375,
0.0118408203125,
0.033447265625,
0.0034809112548828125,
-0.000873565673828125,
0.0282745361328125,
0.046051025390625,
-0.029693603515625,
-0.017578125,
0.00719451904296875,
-0.01702880859375,
-0.0211639404296875,
0.040863037109375,
-0.03338623046875,
0.00457763671875,
0.0223388671875,
0.018402099609375,
0.04632568359375,
0.01412200927734375,
0.0257415771484375,
-0.0028324127197265625,
0.006061553955078125,
-0.005916595458984375,
0.0086212158203125,
0.00881195068359375,
-0.0215301513671875,
-0.000732421875,
0.01873779296875,
0.02001953125,
0.038421630859375,
-0.0160675048828125,
0.00623321533203125,
0.0013666152954101562,
0.0105438232421875,
-0.0096893310546875,
-0.03106689453125,
0.0026149749755859375,
-0.011077880859375,
-0.006412506103515625,
-0.0153656005859375,
-0.0308074951171875,
-0.0010862350463867188,
-0.0157470703125,
-0.0234832763671875,
0.024932861328125,
-0.0153045654296875,
0.006366729736328125,
-0.034820556640625,
-0.052337646484375,
0.0102081298828125,
-0.008209228515625,
0.0233612060546875,
-0.0107879638671875,
-0.0194091796875,
-0.0035533905029296875,
0.031463623046875,
-0.002506256103515625,
-0.005512237548828125,
0.00811767578125,
0.0209197998046875,
0.005542755126953125,
-0.03680419921875,
0.0170745849609375,
0.00016605854034423828,
-0.0028629302978515625,
0.01020050048828125,
-0.007904052734375,
-0.054901123046875,
0.0489501953125,
-0.027801513671875,
-0.005756378173828125,
0.020477294921875,
0.0196380615234375,
0.043792724609375,
0.03143310546875,
0.0178375244140625,
-0.00609588623046875,
0.0223846435546875,
-0.037200927734375,
-0.0304718017578125,
-0.0112762451171875,
0.038299560546875,
-0.036773681640625,
-0.0231475830078125,
-0.00431060791015625,
0.0005755424499511719,
0.007965087890625,
0.04644775390625,
0.03564453125,
0.0070648193359375,
-0.0204620361328125,
-0.010345458984375,
0.0052337646484375,
-0.07379150390625,
0.0174407958984375,
-0.0046844482421875,
-0.05029296875,
0.0241241455078125,
0.092529296875,
0.033294677734375,
0.038726806640625,
-0.032257080078125,
0.0250701904296875,
-0.00640106201171875,
-0.01364898681640625,
0.01788330078125,
0.0180511474609375,
-0.028228759765625,
-0.035247802734375,
-0.0094757080078125,
0.038055419921875,
0.0213775634765625,
0.0102691650390625,
0.0167083740234375,
0.0189208984375,
-0.0011415481567382812,
0.00696563720703125,
-0.01123046875,
-0.01261138916015625,
0.021484375,
0.05889892578125,
-0.00946807861328125,
0.0672607421875,
-0.041351318359375,
0.036468505859375,
-0.0153045654296875,
0.0007953643798828125,
0.00555419921875,
0.0302734375,
0.0225677490234375,
0.005893707275390625,
-0.01177215576171875,
-0.0062255859375,
-0.004810333251953125,
0.0153961181640625,
-0.00494384765625,
-0.0018939971923828125,
0.017333984375,
-0.002895355224609375,
0.021728515625,
0.0149078369140625,
0.01136016845703125,
-0.034210205078125,
0.054351806640625,
0.00457763671875,
0.06475830078125,
0.04119873046875,
-0.0276031494140625,
0.032562255859375,
0.02032470703125,
-0.03759765625,
0.03155517578125,
0.006710052490234375,
0.026641845703125,
-0.0038471221923828125,
0.0152587890625,
0.01224517822265625,
0.0322265625,
-0.061431884765625,
0.02996826171875,
-0.032379150390625,
-0.008544921875,
0.00717926025390625,
0.0070648193359375,
-0.01044464111328125,
0.0242156982421875,
-0.015777587890625,
0.02532958984375,
-0.01885986328125,
0.007602691650390625,
-0.01605224609375,
0.007965087890625,
-0.01491546630859375,
0.03228759765625,
0.0279541015625,
0.048095703125,
-0.00554656982421875,
0.0306396484375,
-0.016143798828125,
-0.051910400390625,
-0.027374267578125,
0.0176239013671875,
0.00978851318359375,
0.031341552734375,
-0.00643157958984375,
0.026947021484375,
-0.0184326171875,
0.004871368408203125,
-0.0233154296875,
-0.0032367706298828125,
0.0246734619140625,
-0.036895751953125,
-0.006938934326171875,
-0.03436279296875,
-0.00792694091796875,
0.013397216796875,
-0.07513427734375,
0.038055419921875,
0.034149169921875,
0.03302001953125,
-0.024658203125,
0.002979278564453125,
0.03533935546875,
-0.031829833984375,
0.002521514892578125,
0.03338623046875,
0.03765869140625,
0.0033092498779296875,
-0.0029773712158203125,
0.01125335693359375,
0.0328369140625,
-0.00983428955078125,
0.0272216796875,
-0.0087432861328125,
-0.01357269287109375,
-0.0089111328125,
0.03155517578125,
-0.021331787109375,
0.02996826171875,
-0.044921875,
0.0266571044921875,
0.003902435302734375,
0.00566864013671875,
-0.0297088623046875,
-0.00865936279296875,
0.015228271484375,
0.014007568359375,
-0.01146697998046875,
-0.052764892578125,
0.006702423095703125,
-0.0274200439453125,
0.03192138671875,
0.004993438720703125,
0.0165252685546875,
-0.0296630859375,
0.01061248779296875,
0.021484375,
0.0177459716796875,
-0.0244293212890625,
0.0242919921875,
0.04388427734375,
-0.01995849609375,
-0.024505615234375,
0.0019178390502929688,
-0.0290374755859375,
-0.01134490966796875,
-0.0194549560546875,
-0.0002446174621582031,
-0.0298004150390625,
-0.00399017333984375,
-0.0009326934814453125,
-0.044586181640625,
0.01041412353515625,
0.0290069580078125,
0.04998779296875,
-0.007358551025390625,
0.05194091796875,
-0.041168212890625,
-0.01308441162109375,
0.02752685546875,
-0.020172119140625,
-0.0662841796875,
0.043792724609375,
-0.0513916015625,
0.043853759765625,
-0.0252838134765625,
0.05889892578125,
0.05908203125,
-0.005252838134765625,
-0.00640869140625,
0.01491546630859375,
0.005298614501953125,
0.00949859619140625,
0.01178741455078125,
0.0190277099609375,
-0.000029385089874267578,
-0.020843505859375,
0.0220947265625,
0.005207061767578125,
-0.0254058837890625,
-0.004085540771484375,
-0.027435302734375,
-0.0196380615234375,
-0.01171112060546875,
-0.0723876953125,
-0.050506591796875,
-0.06787109375,
-0.0212554931640625,
-0.014892578125,
0.0186614990234375,
0.008026123046875,
0.035675048828125,
0.00312042236328125,
0.022613525390625,
0.032012939453125,
-0.02642822265625,
-0.05517578125,
-0.0323486328125,
-0.07080078125,
-0.040374755859375,
0.002300262451171875,
-0.0046234130859375,
0.00930023193359375,
-0.00147247314453125,
0.00611114501953125,
-0.021270751953125,
0.027923583984375,
0.0704345703125,
-0.01067352294921875,
-0.0304718017578125,
-0.02069091796875,
-0.0181121826171875,
-0.01229095458984375,
-0.019744873046875,
0.06378173828125,
0.01354217529296875,
-0.00814056396484375,
0.0306396484375,
-0.0171661376953125,
-0.044891357421875,
-0.0006136894226074219,
-0.00445556640625,
0.006195068359375,
-0.03692626953125,
0.0009984970092773438,
-0.064453125,
-0.03851318359375,
-0.012054443359375,
-0.041412353515625,
0.053497314453125,
0.04278564453125,
-0.018218994140625,
-0.00847625732421875,
0.026458740234375,
0.003444671630859375,
-0.020660400390625,
-0.0054473876953125,
-0.04107666015625,
0.038543701171875,
0.004001617431640625,
0.0297088623046875,
0.000858306884765625,
0.039215087890625,
0.0026302337646484375,
-0.017608642578125,
0.0055084228515625,
0.042144775390625,
-0.005672454833984375,
0.0259857177734375,
-0.06103515625,
-0.058502197265625,
0.060943603515625,
-0.007457733154296875,
-0.0084381103515625,
-0.0196990966796875,
-0.04180908203125,
-0.0087127685546875,
0.09063720703125,
-0.03143310546875,
-0.017364501953125,
0.01169586181640625,
0.023040771484375,
-0.013336181640625,
-0.0284881591796875,
-0.0316162109375,
-0.00936126708984375,
-0.12890625,
0.01158905029296875,
-0.020904541015625,
-0.0285186767578125,
-0.0172576904296875,
0.0106353759765625,
-0.060455322265625,
-0.05340576171875,
0.01244354248046875,
0.062103271484375,
-0.0283660888671875,
0.01715087890625,
-0.0552978515625,
0.02825927734375,
-0.01551055908203125,
0.017486572265625,
-0.0159454345703125,
-0.01166534423828125,
-0.00206756591796875,
0.04620361328125,
0.050628662109375,
-0.071044921875,
0.02471923828125,
0.050750732421875,
0.00823211669921875,
0.01407623291015625,
0.0034580230712890625,
-0.014373779296875,
0.02984619140625,
0.02880859375,
-0.0196990966796875,
0.01026153564453125,
0.0010852813720703125,
-0.005779266357421875,
-0.0701904296875,
0.0347900390625,
0.011627197265625,
0.059539794921875,
0.052398681640625,
-0.0291900634765625,
-0.044464111328125,
-0.05029296875,
0.0374755859375,
-0.0003204345703125,
0.039031982421875,
-0.01360321044921875,
-0.03460693359375,
-0.01367950439453125,
0.037994384765625,
0.026123046875,
-0.006946563720703125,
0.0008358955383300781,
0.0304718017578125,
0.0143280029296875,
-0.044769287109375,
0.004222869873046875,
0.0243988037109375,
0.0234832763671875,
-0.001453399658203125,
0.027679443359375,
-0.01519775390625,
-0.0277557373046875,
0.053466796875,
-0.02166748046875,
0.0009045600891113281,
0.0377197265625,
0.02435302734375,
0.01190185546875,
-0.0247039794921875,
0.0328369140625,
0.01947021484375,
-0.056671142578125,
0.004596710205078125,
-0.01117706298828125,
0.007419586181640625,
-0.012420654296875,
-0.006328582763671875,
-0.00551605224609375,
-0.0009484291076660156,
-0.01371002197265625,
-0.004695892333984375,
0.01424407958984375,
0.0236358642578125,
0.036163330078125,
0.01204681396484375,
0.0030918121337890625,
-0.01070404052734375,
0.0009775161743164062,
-0.00662994384765625,
-0.0230560302734375,
-0.013763427734375,
-0.0389404296875,
0.03143310546875,
-0.05487060546875,
-0.036590576171875,
0.0008654594421386719,
-0.00930023193359375,
0.09100341796875,
0.052947998046875,
0.004131317138671875,
0.0016040802001953125,
-0.019287109375,
-0.050323486328125,
-0.020355224609375,
0.0177459716796875,
0.0146331787109375,
-0.0535888671875,
-0.010589599609375,
-0.003108978271484375,
-0.0283050537109375,
-0.0401611328125,
-0.03375244140625,
0.06817626953125,
0.0155029296875,
-0.00235748291015625,
0.0181884765625,
0.0219573974609375,
0.0221405029296875,
0.00518798828125,
-0.017974853515625,
-0.0096893310546875,
0.02020263671875,
0.01407623291015625,
0.009246826171875,
0.0230255126953125,
0.0077056884765625,
-0.0312042236328125,
0.053924560546875,
-0.01187896728515625,
0.021514892578125,
-0.0178070068359375,
0.047698974609375,
-0.01849365234375,
-0.021636962890625,
0.0303497314453125,
-0.0654296875,
0.01061248779296875,
0.032073974609375,
-0.03851318359375,
-0.0777587890625,
-0.0097808837890625,
0.0165863037109375,
0.0177764892578125,
-0.074462890625,
-0.028106689453125,
-0.026763916015625,
-0.05224609375,
0.00695037841796875,
-0.0164947509765625,
-0.0170745849609375,
0.0201416015625,
-0.0002281665802001953,
-0.045257568359375,
-0.05767822265625,
-0.0270538330078125,
0.0047760009765625,
0.0145263671875,
-0.004108428955078125,
-0.003620147705078125,
-0.01367950439453125,
-0.0343017578125,
0.03753662109375,
0.01329803466796875,
-0.042388916015625,
0.04180908203125,
0.0223846435546875,
0.048095703125,
0.0264739990234375,
-0.05413818359375,
0.00926971435546875,
-0.01087188720703125,
0.0182647705078125,
0.0224456787109375,
-0.036163330078125,
-0.01532745361328125,
-0.0423583984375,
0.00568389892578125,
0.045318603515625,
-0.007266998291015625,
-0.006366729736328125,
-0.003177642822265625,
-0.0166778564453125,
-0.0197601318359375,
0.046112060546875,
-0.03900146484375,
0.06463623046875,
0.025726318359375,
0.0280303955078125,
0.0103302001953125,
0.02716064453125,
-0.0154266357421875,
-0.0011692047119140625,
-0.0026378631591796875,
-0.0186767578125,
-0.008056640625,
-0.02764892578125,
0.01212310791015625,
0.050537109375,
0.06915283203125,
0.00704193115234375,
-0.0041656494140625,
-0.004726409912109375,
-0.014556884765625,
-0.0194854736328125,
0.03814697265625,
-0.006145477294921875,
0.0130615234375,
0.01277923583984375,
0.0089111328125,
0.040283203125,
0.0069732666015625,
-0.032867431640625,
0.0169830322265625,
0.0101318359375,
0.040374755859375,
0.01430511474609375,
-0.057891845703125,
0.041412353515625,
0.13134765625,
0.0175933837890625,
0.07244873046875,
0.02178955078125,
0.007099151611328125,
0.05499267578125,
0.002552032470703125,
0.0157928466796875,
0.0094451904296875,
0.005970001220703125,
-0.0285186767578125,
-0.02490234375,
-0.0177764892578125,
-0.0218963623046875,
0.04571533203125,
0.017333984375,
0.0611572265625,
-0.061065673828125,
0.03643798828125,
-0.00838470458984375,
0.016845703125,
0.10809326171875,
0.0302886962890625,
-0.00737762451171875,
0.04132080078125,
0.011016845703125,
-0.052642822265625,
-0.01470947265625,
0.0220489501953125,
0.019287109375,
0.00017976760864257812,
0.0020885467529296875,
0.041839599609375,
-0.0206756591796875,
-0.07989501953125,
-0.034423828125,
0.046905517578125,
-0.040985107421875,
-0.0292205810546875,
0.002147674560546875,
0.01337432861328125,
-0.013336181640625,
-0.0458984375,
0.0271148681640625,
-0.0163116455078125,
0.0089111328125,
0.0236968994140625,
0.00035309791564941406,
0.045562744140625,
0.01546478271484375,
0.006053924560546875,
-0.0029506683349609375,
-0.0287628173828125,
-0.0254364013671875,
0.10675048828125,
0.0211944580078125,
-0.0022106170654296875,
-0.00336456298828125,
-0.015716552734375,
-0.02642822265625,
-0.02899169921875,
0.021575927734375,
-0.024322509765625,
-0.0716552734375,
0.08148193359375,
-0.004520416259765625,
-0.0253448486328125,
0.00659942626953125,
0.0196533203125,
-0.01141357421875,
-0.038330078125,
0.0311737060546875,
-0.09771728515625,
-0.05523681640625,
0.0001537799835205078,
-0.06494140625,
-0.019683837890625,
-0.042327880859375,
-0.04376220703125,
0.0760498046875,
-0.04290771484375,
0.0484619140625,
0.0157470703125,
0.0141754150390625,
0.005565643310546875,
0.01029205322265625,
-0.017669677734375,
0.03515625,
0.0252227783203125,
0.00995635986328125,
0.006130218505859375,
0.01183319091796875,
0.01461029052734375,
0.00476837158203125,
0.047882080078125,
0.0081939697265625,
-0.0267486572265625,
-0.042694091796875,
0.01434326171875,
0.04315185546875,
0.02093505859375,
0.0209503173828125,
-0.0265960693359375,
0.0229644775390625,
0.00791168212890625,
-0.024749755859375,
0.0167083740234375,
0.0013113021850585938,
-0.050628662109375,
0.002567291259765625,
-0.002857208251953125,
-0.028717041015625,
-0.0034389495849609375,
0.0158843994140625,
-0.078369140625,
0.00487518310546875,
0.049072265625,
0.006679534912109375,
-0.027008056640625,
0.048095703125,
0.0184326171875,
0.0264434814453125,
-0.00865936279296875,
-0.0144805908203125,
0.044586181640625,
0.01410675048828125,
-0.0094451904296875,
0.021453857421875,
0.0097198486328125,
0.00543975830078125,
-0.027740478515625,
-0.01557159423828125,
0.0078887939453125,
-0.002529144287109375,
0.06658935546875,
0.04412841796875,
0.03155517578125,
-0.0247955322265625,
0.03369140625,
0.0341796875,
0.07916259765625,
-0.0587158203125,
-0.0084686279296875,
0.005382537841796875,
-0.0099639892578125,
0.038238525390625,
-0.01461029052734375,
0.06646728515625,
-0.059906005859375,
-0.07122802734375,
-0.0197296142578125,
0.04180908203125,
0.07537841796875,
-0.00571441650390625,
0.010986328125,
0.0124359130859375,
-0.061187744140625,
0.07269287109375,
-0.0220489501953125,
0.010498046875,
-0.03314208984375,
0.0228271484375,
0.048736572265625,
-0.00982666015625,
-0.014984130859375,
-0.0064239501953125,
-0.0186614990234375,
0.06158447265625,
-0.036712646484375,
0.032958984375,
-0.03619384765625,
-0.06768798828125,
-0.0211181640625,
0.0279998779296875,
0.00811004638671875,
0.0091094970703125,
0.010986328125,
-0.00653076171875,
-0.018218994140625,
-0.00830078125,
0.0367431640625,
-0.0277862548828125,
0.0543212890625,
-0.04864501953125,
0.036590576171875,
0.0014190673828125,
-0.00612640380859375,
-0.0144805908203125,
-0.0172271728515625,
0.044677734375,
-0.017486572265625,
0.04052734375,
0.00022351741790771484,
-0.0211181640625,
0.00426483154296875,
-0.0007882118225097656,
0.054168701171875,
0.0026187896728515625,
-0.0224151611328125,
-0.0070953369140625,
-0.0232696533203125,
-0.05224609375,
0.02703857421875,
0.0504150390625,
0.007251739501953125,
0.0018472671508789062,
-0.0095672607421875,
0.020355224609375,
-0.015228271484375,
-0.022705078125,
-0.01084136962890625,
-0.0194549560546875,
0.021087646484375,
-0.0023059844970703125,
-0.0496826171875,
-0.017791748046875,
-0.031463623046875,
0.026947021484375,
0.024566650390625,
0.0687255859375,
-0.00902557373046875,
0.0323486328125,
-0.01091766357421875,
0.006969451904296875,
-0.0310821533203125,
-0.002407073974609375,
-0.028106689453125,
-0.00762939453125,
0.0068359375,
0.0018825531005859375,
-0.07073974609375,
0.0531005859375,
-0.003322601318359375,
0.005222320556640625,
0.0853271484375,
-0.03997802734375,
-0.008148193359375,
-0.03082275390625,
0.0014600753784179688,
-0.0355224609375,
-0.07183837890625,
-0.040283203125,
0.02618408203125,
-0.0134429931640625,
0.0014133453369140625,
-0.0423583984375,
0.05029296875,
-0.03668212890625,
-0.0135650634765625,
0.016326904296875,
-0.04827880859375,
0.019287109375,
0.032928466796875,
-0.041900634765625,
-0.0038089752197265625,
-0.0033626556396484375,
-0.0284271240234375,
0.007678985595703125,
0.00460052490234375,
0.01508331298828125,
0.0026607513427734375,
-0.01146697998046875,
0.039794921875,
0.0225982666015625,
0.018157958984375,
-0.0302276611328125,
0.005184173583984375,
0.0574951171875,
-0.007122039794921875,
0.018096923828125,
-0.004352569580078125,
-0.01535797119140625,
-0.0255584716796875,
-0.01312255859375,
0.00571441650390625,
0.01131439208984375,
0.00353240966796875,
0.00235748291015625,
-0.0021648406982421875,
0.031341552734375,
0.0035991668701171875,
-0.048065185546875,
-0.006511688232421875,
-0.0215911865234375,
0.038055419921875,
-0.0061798095703125,
0.0020427703857421875,
0.01334381103515625,
0.02685546875,
-0.042388916015625,
-0.0296630859375,
-0.0285186767578125,
0.01247406005859375,
-0.033966064453125,
0.00281524658203125,
0.048126220703125,
-0.00738525390625,
-0.001728057861328125,
-0.0258941650390625,
-0.0179443359375,
0.031219482421875,
-0.061553955078125,
-0.0338134765625,
-0.0143585205078125,
-0.00008314847946166992,
-0.004306793212890625,
-0.00469970703125,
0.016510009765625,
-0.011016845703125,
-0.022918701171875,
-0.016876220703125,
-0.03045654296875,
-0.035736083984375,
-0.05792236328125,
-0.05718994140625,
0.01416015625,
0.00664520263671875,
-0.0361328125,
-0.08453369140625,
0.0294189453125,
0.002483367919921875,
0.0213470458984375,
-0.0222320556640625,
-0.039764404296875,
-0.032196044921875,
0.03204345703125,
0.004486083984375,
0.0633544921875,
-0.03912353515625,
0.032867431640625,
0.0171966552734375,
0.053131103515625,
0.059051513671875,
0.0209503173828125,
0.0144805908203125,
0.004817962646484375,
0.0115814208984375,
0.01255035400390625,
-0.0355224609375,
0.0153350830078125,
-0.00899505615234375,
-0.0323486328125,
-0.01180267333984375,
-0.06048583984375,
0.02886962890625,
-0.00714874267578125,
0.03411865234375,
-0.02593994140625,
-0.0016031265258789062,
-0.00719451904296875,
-0.0232391357421875,
-0.01114654541015625,
-0.0089111328125,
-0.00847625732421875,
0.0096893310546875,
-0.059173583984375,
-0.005340576171875,
0.01137542724609375,
-0.003360748291015625,
-0.003993988037109375,
-0.0119171142578125,
-0.0214080810546875,
-0.0074920654296875,
0.0122222900390625,
0.0160980224609375,
-0.0242156982421875,
0.054595947265625,
0.05633544921875,
-0.04351806640625,
0.026336669921875,
-0.027130126953125,
-0.0016183853149414062,
0.035675048828125,
-0.0811767578125,
0.03857421875,
0.01491546630859375,
-0.0246429443359375,
-0.0019521713256835938,
0.04058837890625,
0.0023899078369140625,
0.0036296844482421875,
-0.04443359375,
-0.023834228515625,
0.0019435882568359375,
-0.0020904541015625,
-0.0209197998046875,
-0.009552001953125,
0.010467529296875,
0.004962921142578125,
0.08123779296875,
0.00193023681640625,
-0.0279083251953125,
0.0066070556640625,
-0.00202178955078125,
-0.0170440673828125,
-0.00876617431640625,
0.01300811767578125,
-0.050628662109375,
-0.00775146484375,
0.008575439453125,
0.00888824462890625,
-0.02880859375,
0.003772735595703125,
-0.04559326171875,
0.00907135009765625,
0.005451202392578125
] |
faa7bc4869473e42f6e14cee9444fcee577c37ae | Wordpress Stackexchange
Q: Trying to run WordPress on localhost? I have installed XAMPP server and bitnami WordPress on my Ubuntu machine. I want to run a WordPress on my localhost but the following error occurs:
Object not found!
The requested URL was not found on this server. If you entered the URL
manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404 localhost Apache/2.4.25 (Unix) OpenSSL/1.0.2j PHP/5.6.30
mod_perl/2.0.8-dev Perl/v5.16.3
A: WWW server don't give You what Your browser is asking for. It could be caused by inproper web files privilages or there are no files in web subdirectory where server expects them.
| Q: Trying to run WordPress on localhost? I have installed XAMPP server and bitnami WordPress on my Ubuntu machine. I want to run a WordPress on my localhost but the following error occurs:
Object not found!
The requested URL was not found on this server. If you entered the URL
manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404 localhost Apache/2.4.25 (Unix) OpenSSL/1.0.2j PHP/5.6.30
mod_perl/2.0.8-dev Perl/v5.16.3
A: WWW server don't give You what Your browser is asking for. It could be caused by inproper web files privilages or there are no files in web subdirectory where server expects them.
| wordpress | {
"language": "en",
"length": 112,
"provenance": "stackexchange_00019.jsonl.gz:473235",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256839"
} | [
0.03485107421875,
-0.0095062255859375,
0.031982421875,
-0.021209716796875,
-0.0165863037109375,
0.0022487640380859375,
0.01837158203125,
-0.0217437744140625,
0.01166534423828125,
0.005168914794921875,
-0.03302001953125,
-0.00582122802734375,
0.022552490234375,
-0.035400390625,
0.0229339599609375,
-0.01873779296875,
0.006282806396484375,
0.01389312744140625,
0.00432586669921875,
-0.02471923828125,
0.0223236083984375,
-0.00685882568359375,
-0.0209197998046875,
-0.0006222724914550781,
0.01190185546875,
-0.035186767578125,
0.08868408203125,
-0.03271484375,
0.0022792816162109375,
-0.0305328369140625,
0.018035888671875,
0.02484130859375,
0.0014514923095703125,
0.0389404296875,
-0.0167083740234375,
-0.045379638671875,
-0.016387939453125,
0.0290679931640625,
0.0001742839813232422,
0.004734039306640625,
0.00897216796875,
-0.01009368896484375,
0.06024169921875,
0.043426513671875,
0.026763916015625,
-0.058929443359375,
0.0282440185546875,
-0.078857421875,
-0.0046539306640625,
-0.006134033203125,
-0.01061248779296875,
0.03399658203125,
-0.003170013427734375,
-0.0146484375,
0.011932373046875,
0.0084075927734375,
0.0467529296875,
-0.009063720703125,
0.00872039794921875,
-0.0750732421875,
-0.051055908203125,
0.02410888671875,
0.03631591796875,
0.0517578125,
0.00588226318359375,
-0.00481414794921875,
-0.00510406494140625,
0.0186309814453125,
-0.0294342041015625,
0.01953125,
0.037353515625,
-0.031097412109375,
0.006549835205078125,
-0.01033782958984375,
0.0134735107421875,
-0.05181884765625,
0.0004875659942626953,
-0.0279693603515625,
0.0220947265625,
0.01494598388671875,
0.0290985107421875,
-0.0482177734375,
-0.054962158203125,
-0.0007138252258300781,
0.0340576171875,
0.0589599609375,
0.0014123916625976562,
-0.026702880859375,
-0.0059051513671875,
-0.00408172607421875,
-0.0156097412109375,
-0.03662109375,
-0.0296630859375,
0.034515380859375,
0.0018701553344726562,
-0.01568603515625,
-0.01139068603515625,
-0.00925445556640625,
-0.00487518310546875,
0.0276641845703125,
-0.0037288665771484375,
-0.019287109375,
0.035980224609375,
-0.027252197265625,
0.012786865234375,
0.04644775390625,
-0.00020551681518554688,
0.035247802734375,
0.031463623046875,
0.011749267578125,
0.004852294921875,
-0.00603485107421875,
-0.0006818771362304688,
-0.01385498046875,
-0.01519012451171875,
0.01264190673828125,
-0.005207061767578125,
-0.01201629638671875,
-0.02197265625,
-0.0260772705078125,
-0.0111236572265625,
0.01465606689453125,
-0.005645751953125,
0.0243377685546875,
-0.01166534423828125,
0.0010204315185546875,
0.0017099380493164062,
-0.01241302490234375,
0.0233154296875,
0.029449462890625,
-0.004852294921875,
0.007965087890625,
-0.00466156005859375,
-0.00199127197265625,
-0.03363037109375,
-0.01206207275390625,
0.0472412109375,
0.02880859375,
0.00620269775390625,
0.0148468017578125,
-0.0203094482421875,
-0.01287841796875,
0.00724029541015625,
0.005268096923828125,
0.00859832763671875,
-0.0033321380615234375,
0.0290985107421875,
0.02032470703125,
-0.0233306884765625,
-0.032440185546875,
0.00765228271484375,
0.02105712890625,
0.01399993896484375,
0.0265350341796875,
0.025115966796875,
0.00024700164794921875,
0.056793212890625,
-0.03790283203125,
-0.029998779296875,
-0.0279998779296875,
0.01512908935546875,
0.00818634033203125,
0.04364013671875,
-0.03216552734375,
-0.032562255859375,
-0.022308349609375,
-0.056488037109375,
-0.0035190582275390625,
0.01103973388671875,
-0.00787353515625,
-0.0268096923828125,
-0.009857177734375,
0.04364013671875,
-0.01258087158203125,
-0.0277557373046875,
0.01039886474609375,
0.01325225830078125,
0.0011653900146484375,
0.0143280029296875,
0.0611572265625,
0.042449951171875,
-0.0022258758544921875,
0.047576904296875,
0.004669189453125,
-0.026397705078125,
0.0282745361328125,
-0.004909515380859375,
0.0390625,
0.00766754150390625,
0.0127716064453125,
0.004192352294921875,
0.02569580078125,
0.00582122802734375,
0.053955078125,
-0.039093017578125,
-0.045166015625,
0.033050537109375,
0.037261962890625,
-0.03607177734375,
-0.055450439453125,
-0.02032470703125,
0.032440185546875,
-0.0225677490234375,
0.01259613037109375,
-0.032806396484375,
-0.0049591064453125,
-0.006195068359375,
0.0272369384765625,
0.013763427734375,
0.0084686279296875,
-0.00333404541015625,
-0.0172576904296875,
0.0183258056640625,
-0.06573486328125,
-0.050384521484375,
0.017364501953125,
-0.0391845703125,
0.0173492431640625,
-0.0186920166015625,
0.042999267578125,
-0.032440185546875,
-0.05322265625,
-0.02154541015625,
-0.0204010009765625,
0.005809783935546875,
0.01715087890625,
-0.01617431640625,
0.0135040283203125,
0.01175689697265625,
0.027191162109375,
-0.01413726806640625,
-0.0008039474487304688,
-0.0192413330078125,
-0.00955963134765625,
-0.0377197265625,
0.0028934478759765625,
-0.03924560546875,
-0.0151519775390625,
-0.006931304931640625,
0.03424072265625,
0.021331787109375,
-0.0343017578125,
-0.00643157958984375,
0.01335906982421875,
0.00196075439453125,
-0.047271728515625,
0.01461029052734375,
0.006099700927734375,
-0.023651123046875,
-0.043914794921875,
-0.00946807861328125,
-0.0198974609375,
0.053131103515625,
-0.04510498046875,
0.0033321380615234375,
0.03125,
-0.0030956268310546875,
0.00612640380859375,
-0.018768310546875,
0.00594329833984375,
0.01334381103515625,
0.004062652587890625,
-0.031707763671875,
0.023284912109375,
-0.0517578125,
0.0135498046875,
-0.007411956787109375,
0.015045166015625,
0.0033855438232421875,
-0.01367950439453125,
0.00989532470703125,
-0.02911376953125,
0.00751495361328125,
0.0193023681640625,
-0.00946807861328125,
0.0194549560546875,
-0.056060791015625,
0.01067352294921875,
0.018035888671875,
0.01480865478515625,
-0.014801025390625,
-0.02569580078125,
-0.020721435546875,
0.00199127197265625,
0.01222991943359375,
-0.070068359375,
0.029754638671875,
0.028289794921875,
0.024871826171875,
-0.0098114013671875,
0.0216827392578125,
0.01387786865234375,
-0.02777099609375,
0.053741455078125,
0.0004589557647705078,
-0.031402587890625,
0.08966064453125,
-0.009552001953125,
-0.00018084049224853516,
0.0089569091796875,
0.040863037109375,
0.03155517578125,
-0.0005536079406738281,
-0.0189056396484375,
0.0159149169921875,
0.005306243896484375,
0.040374755859375,
0.0061492919921875,
0.0019083023071289062,
0.018890380859375,
-0.079345703125,
-0.037811279296875,
0.0182037353515625,
-0.02447509765625,
0.0188446044921875,
-0.0286407470703125,
-0.008087158203125,
-0.017425537109375,
-0.1258544921875,
-0.1378173828125,
-0.039794921875,
-0.008514404296875,
-0.0261383056640625,
0.01702880859375,
-0.01433563232421875,
0.0143280029296875,
0.030517578125,
0.01146697998046875,
0.04443359375,
-0.05926513671875,
-0.0616455078125,
-0.0908203125,
-0.0987548828125,
-0.0570068359375,
-0.00243377685546875,
-0.01483917236328125,
0.00981903076171875,
0.027069091796875,
0.0146942138671875,
-0.048492431640625,
0.007568359375,
0.000335693359375,
-0.0199737548828125,
-0.015838623046875,
0.0006885528564453125,
-0.005466461181640625,
-0.003265380859375,
0.00757598876953125,
0.08636474609375,
0.019073486328125,
-0.035614013671875,
-0.0248870849609375,
-0.0238494873046875,
-0.00943756103515625,
-0.0258941650390625,
-0.0212554931640625,
0.036773681640625,
-0.0570068359375,
-0.033782958984375,
-0.0797119140625,
-0.007549285888671875,
-0.0015516281127929688,
-0.03656005859375,
0.006519317626953125,
0.02679443359375,
-0.02349853515625,
-0.02838134765625,
-0.007534027099609375,
0.007904052734375,
0.015655517578125,
-0.0008082389831542969,
-0.0185699462890625,
0.023193359375,
0.002849578857421875,
0.00508880615234375,
-0.0206298828125,
0.0643310546875,
-0.014068603515625,
-0.03546142578125,
0.00572967529296875,
-0.0291290283203125,
-0.0277862548828125,
-0.0230712890625,
-0.05670166015625,
-0.0172119140625,
0.045074462890625,
0.0277099609375,
0.006565093994140625,
0.00562286376953125,
-0.0301971435546875,
0.01454925537109375,
0.0687255859375,
-0.02069091796875,
-0.0075531005859375,
-0.02593994140625,
0.0176544189453125,
-0.0499267578125,
-0.0284881591796875,
-0.03594970703125,
0.01806640625,
-0.032745361328125,
-0.002960205078125,
-0.007175445556640625,
-0.01442718505859375,
-0.00782012939453125,
-0.00438690185546875,
-0.01300048828125,
-0.02294921875,
0.033294677734375,
-0.0231170654296875,
0.034942626953125,
-0.0291290283203125,
0.01486968994140625,
-0.04608154296875,
-0.0238189697265625,
-0.021942138671875,
-0.089111328125,
-0.04345703125,
-0.003894805908203125,
0.08514404296875,
0.0112152099609375,
-0.004360198974609375,
-0.01126861572265625,
0.0704345703125,
-0.01308441162109375,
0.050018310546875,
-0.03924560546875,
-0.0185699462890625,
0.02728271484375,
0.00858306884765625,
-0.007732391357421875,
0.0157623291015625,
0.004344940185546875,
-0.035247802734375,
-0.0638427734375,
-0.0184326171875,
-0.01438140869140625,
0.04559326171875,
0.005161285400390625,
-0.0290374755859375,
0.0308685302734375,
-0.0153961181640625,
0.0015268325805664062,
0.0709228515625,
-0.020172119140625,
0.035247802734375,
-0.044586181640625,
-0.004993438720703125,
0.03594970703125,
-0.01056671142578125,
-0.00897216796875,
0.00876617431640625,
0.047271728515625,
0.0091705322265625,
-0.01128387451171875,
-0.0173187255859375,
0.0255584716796875,
0.017181396484375,
0.04925537109375,
0.01038360595703125,
-0.0227203369140625,
0.005786895751953125,
-0.00608062744140625,
0.00505828857421875,
-0.0188446044921875,
0.0260772705078125,
0.0171966552734375,
0.01416015625,
-0.006526947021484375,
-0.01544952392578125,
0.01396942138671875,
-0.0071258544921875,
0.01177215576171875,
0.030670166015625,
-0.0119171142578125,
0.0501708984375,
-0.0022335052490234375,
0.007663726806640625,
-0.04608154296875,
-0.0025157928466796875,
-0.032623291015625,
0.019744873046875,
-0.062347412109375,
0.044403076171875,
0.0159454345703125,
-0.0020580291748046875,
0.01409912109375,
0.0034465789794921875,
-0.029388427734375,
0.00434112548828125,
0.0095977783203125,
0.0225067138671875,
0.01605224609375,
0.0155181884765625,
-0.01068878173828125,
-0.01739501953125,
-0.0176239013671875,
0.07720947265625,
0.00554656982421875,
-0.06005859375,
0.005863189697265625,
-0.0119171142578125,
-0.0264129638671875,
0.009674072265625,
0.0074005126953125,
-0.007122039794921875,
-0.0205078125,
0.035858154296875,
0.0074615478515625,
0.01027679443359375,
-0.013153076171875,
-0.004764556884765625,
-0.009765625,
-0.0283966064453125,
0.00464630126953125,
0.01552581787109375,
0.0191192626953125,
-0.01441192626953125,
0.0010833740234375,
-0.0026645660400390625,
-0.0194091796875,
0.00490570068359375,
0.033294677734375,
0.04229736328125,
-0.0537109375,
0.002201080322265625,
0.0106048583984375,
0.020965576171875,
-0.035003662109375,
-0.018341064453125,
0.0250701904296875,
0.04693603515625,
-0.0152587890625,
-0.024688720703125,
0.0202484130859375,
-0.0195465087890625,
-0.01020050048828125,
-0.008392333984375,
-0.04541015625,
-0.02349853515625,
-0.00943756103515625,
-0.0238800048828125,
0.0078277587890625,
-0.020721435546875,
-0.0212554931640625,
-0.0066680908203125,
-0.01290130615234375,
0.024627685546875,
-0.0026149749755859375,
-0.059600830078125,
0.039794921875,
0.048095703125,
0.044677734375,
-0.0310516357421875,
-0.051116943359375,
0.0210723876953125,
0.0190887451171875,
-0.0209808349609375,
0.003528594970703125,
0.0303802490234375,
0.0008487701416015625,
0.0335693359375,
-0.057464599609375,
0.00019752979278564453,
-0.0273895263671875,
0.0016508102416992188,
0.01348876953125,
-0.006427764892578125,
-0.063720703125,
-0.00115966796875,
-0.0263214111328125,
-0.0182342529296875,
0.059326171875,
0.0213470458984375,
-0.041168212890625,
-0.01030731201171875,
0.032379150390625,
0.007442474365234375,
0.005458831787109375,
-0.00531768798828125,
-0.0386962890625,
0.034454345703125,
0.038909912109375,
0.00909423828125,
-0.039398193359375,
0.08642578125,
-0.02288818359375,
0.033843994140625,
-0.00959014892578125,
0.047210693359375,
0.0006551742553710938,
-0.016815185546875,
0.044677734375,
-0.050323486328125,
-0.048919677734375,
-0.017730712890625,
-0.07537841796875,
0.000009119510650634766,
0.038055419921875,
-0.0146484375,
-0.018035888671875,
-0.0249176025390625,
-0.01140594482421875,
-0.0325927734375,
0.038543701171875,
0.0024547576904296875,
0.026885986328125,
-0.04681396484375,
-0.045196533203125,
0.03369140625,
0.03289794921875,
0.01702880859375,
-0.004795074462890625,
-0.038238525390625,
0.01364898681640625,
0.03460693359375,
-0.004795074462890625,
0.0438232421875,
0.115478515625,
0.0269012451171875,
0.08465576171875,
0.032684326171875,
0.024749755859375,
0.00804901123046875,
0.0220947265625,
-0.03009033203125,
-0.05224609375,
0.0136260986328125,
0.0153350830078125,
-0.028289794921875,
0.0122528076171875,
-0.022918701171875,
-0.0020503997802734375,
0.035400390625,
0.056854248046875,
-0.038726806640625,
0.0006880760192871094,
0.01290130615234375,
-0.0270538330078125,
-0.031585693359375,
-0.031829833984375,
0.0374755859375,
0.00888824462890625,
0.0170135498046875,
0.059600830078125,
-0.0266876220703125,
0.0031147003173828125,
0.0022945404052734375,
-0.00042557716369628906,
-0.01395416259765625,
0.0285186767578125,
-0.0029773712158203125,
-0.03277587890625,
-0.024627685546875,
0.044158935546875,
-0.042205810546875,
0.0352783203125,
0.022125244140625,
-0.011199951171875,
-0.01480865478515625,
-0.0211029052734375,
-0.01523590087890625,
-0.02166748046875,
-0.039520263671875,
0.03662109375,
0.01448822021484375,
-0.023773193359375,
0.030426025390625,
-0.017669677734375,
0.038238525390625,
0.004268646240234375,
-0.020416259765625,
0.01062774658203125,
-0.00795745849609375,
-0.00926971435546875,
0.032684326171875,
-0.07818603515625,
0.0014400482177734375,
-0.038482666015625,
0.046844482421875,
0.019744873046875,
-0.0230560302734375,
0.030975341796875,
-0.032012939453125,
-0.01168060302734375,
0.0251007080078125,
-0.049224853515625,
0.0149078369140625,
-0.017059326171875,
0.011383056640625,
-0.040130615234375,
-0.0020389556884765625,
-0.017059326171875,
-0.0110626220703125,
0.003925323486328125,
-0.037139892578125,
-0.037689208984375,
0.0186004638671875,
-0.034454345703125,
0.0172576904296875,
0.01641845703125,
0.00714874267578125,
-0.00785064697265625,
0.007564544677734375,
0.006488800048828125,
0.01024627685546875,
-0.0239105224609375,
0.010833740234375,
-0.032684326171875,
-0.00919342041015625,
0.01476287841796875,
0.038116455078125,
0.051605224609375,
0.0160369873046875,
-0.056610107421875,
-0.00809478759765625,
0.03106689453125,
0.01349639892578125,
-0.00769805908203125,
0.048187255859375,
0.006298065185546875,
-0.0022449493408203125,
-0.0118865966796875,
-0.00931549072265625,
0.01021575927734375,
-0.005016326904296875,
-0.027923583984375,
0.0355224609375,
0.0111083984375,
0.0113677978515625,
-0.006328582763671875,
-0.038299560546875,
-0.008392333984375,
0.0010223388671875,
-0.0006718635559082031,
-0.021697998046875,
-0.00714874267578125,
0.040435791015625,
0.007312774658203125,
-0.031524658203125,
-0.0738525390625,
-0.0186920166015625,
0.0298614501953125,
0.007801055908203125,
-0.0101470947265625,
-0.023590087890625,
0.01378631591796875,
-0.00537109375,
-0.006893157958984375,
-0.01389312744140625,
0.04827880859375,
-0.0209808349609375,
0.0214996337890625,
0.05999755859375,
0.038299560546875,
0.00748443603515625,
0.0233001708984375,
0.06927490234375,
0.056854248046875,
-0.045745849609375,
-0.034515380859375,
0.004886627197265625,
0.02044677734375,
0.0174560546875,
0.006771087646484375,
0.03173828125,
0.00894927978515625,
0.058441162109375,
-0.01195526123046875,
0.01160430908203125,
0.0035495758056640625,
-0.00205230712890625,
0.0000820159912109375,
0.0102691650390625,
-0.00322723388671875,
0.0234375,
0.0017747879028320312,
-0.0128173828125,
0.0043792724609375,
0.01165771484375,
0.00691986083984375,
0.0297393798828125,
-0.0173492431640625,
0.006473541259765625,
0.0009484291076660156,
-0.0019054412841796875,
-0.021240234375,
-0.006786346435546875,
-0.043548583984375,
-0.0712890625,
0.044952392578125,
0.0657958984375,
0.0244903564453125,
0.06439208984375,
0.046234130859375,
0.0183868408203125,
-0.0182037353515625,
0.0180206298828125,
0.0894775390625,
-0.0238189697265625,
-0.00933837890625,
-0.0050201416015625,
-0.0174102783203125,
-0.0202484130859375,
-0.0275726318359375,
-0.00963592529296875,
0.047576904296875,
-0.02655029296875,
-0.017578125,
0.050018310546875,
-0.006435394287109375,
-0.005008697509765625,
0.03814697265625,
0.0187835693359375,
0.039459228515625,
0.01483154296875,
-0.033172607421875,
0.00281524658203125,
-0.010467529296875,
-0.069580078125,
0.011199951171875,
0.0330810546875,
0.02069091796875,
-0.02197265625,
-0.03826904296875,
-0.049774169921875,
0.0180511474609375,
0.0330810546875,
0.01274871826171875,
0.0076751708984375,
-0.0205078125,
-0.0377197265625,
-0.03875732421875,
-0.01220703125,
-0.020477294921875,
0.022796630859375,
-0.023101806640625,
0.15478515625,
-0.0609130859375,
0.01045989990234375,
-0.025238037109375,
-0.0113983154296875,
-0.0172119140625,
0.011322021484375,
-0.030517578125,
0.01454925537109375,
0.01279449462890625,
-0.0108489990234375,
-0.06097412109375,
0.008636474609375,
0.000018417835235595703,
-0.016357421875,
0.007579803466796875,
-0.03466796875,
0.02423095703125,
0.0126190185546875,
0.04205322265625,
-0.0168304443359375,
-0.083251953125,
-0.008575439453125,
0.060211181640625,
-0.0280609130859375,
0.0187835693359375,
-0.0161285400390625,
0.031646728515625,
-0.0307769775390625,
-0.0343017578125,
0.03692626953125,
-0.0745849609375,
0.0313720703125,
0.02203369140625,
-0.01497650146484375,
-0.05078125,
0.007656097412109375,
-0.0018911361694335938,
0.01261138916015625,
0.004444122314453125,
0.06390380859375,
0.00368499755859375,
0.024810791015625,
-0.0049285888671875,
-0.02630615234375,
-0.00638580322265625,
-0.0260772705078125,
-0.019775390625,
0.004894256591796875,
-0.00814056396484375,
0.0280609130859375,
0.00876617431640625,
-0.00698089599609375,
-0.0005359649658203125,
-0.0229339599609375,
0.00787353515625,
0.0003437995910644531,
-0.02117919921875,
-0.0083160400390625,
-0.0020008087158203125,
-0.01263427734375,
-0.0290985107421875,
0.006893157958984375,
0.00484466552734375,
-0.033966064453125,
0.01629638671875,
-0.058135986328125,
-0.03436279296875,
0.018829345703125,
0.03240966796875,
-0.021636962890625,
-0.01535797119140625,
-0.014556884765625,
-0.00434112548828125,
-0.00951385498046875,
0.00896453857421875,
0.030181884765625,
-0.01068878173828125,
-0.0265655517578125,
0.00615692138671875,
0.0195465087890625,
0.05047607421875,
-0.0162353515625,
-0.0216522216796875,
0.02490234375,
-0.020172119140625,
-0.028167724609375,
-0.050201416015625,
0.018280029296875,
-0.0909423828125,
-0.01032257080078125,
0.0008068084716796875,
0.004058837890625,
0.02099609375,
-0.0494384765625,
-0.084716796875,
0.0201263427734375,
0.00597381591796875,
-0.0361328125,
-0.064697265625,
-0.006008148193359375,
-0.007625579833984375,
0.056549072265625,
-0.0151824951171875,
0.0005574226379394531,
-0.040985107421875,
0.034698486328125,
0.00911712646484375,
0.0372314453125,
-0.017333984375,
0.01317596435546875,
-0.0132293701171875,
0.046539306640625,
0.037078857421875,
-0.00890350341796875,
-0.00936126708984375,
0.01123809814453125,
0.02899169921875,
0.0694580078125,
0.001010894775390625,
-0.002735137939453125,
0.01293182373046875,
-0.06671142578125,
-0.02362060546875,
-0.06573486328125,
-0.0229644775390625,
-0.036407470703125,
0.0775146484375,
0.0252685546875,
0.01398468017578125,
-0.01303863525390625,
-0.07904052734375,
-0.06414794921875,
-0.031402587890625,
-0.04052734375,
0.047943115234375,
-0.12445068359375,
0.0084991455078125,
0.0253143310546875,
0.0037174224853515625,
0.01806640625,
-0.0323486328125,
-0.0184173583984375,
-0.01300048828125,
-0.0270538330078125,
-0.027801513671875,
-0.0213165283203125,
-0.05303955078125,
0.103759765625,
-0.052154541015625,
0.00724029541015625,
0.01788330078125,
0.03167724609375,
0.0474853515625,
0.01107025146484375,
0.0159454345703125,
-0.0042572021484375,
0.0242767333984375,
0.034393310546875,
0.038818359375,
-0.0157470703125,
-0.0081024169921875,
-0.0280609130859375,
-0.021240234375,
0.011260986328125,
0.0181732177734375,
0.01242828369140625,
0.01543426513671875,
-0.01029205322265625,
-0.00357818603515625,
0.07501220703125,
0.0108184814453125,
-0.020050048828125,
-0.0184173583984375,
0.044464111328125,
-0.036102294921875,
-0.003795623779296875,
-0.03509521484375,
-0.020843505859375,
0.002349853515625,
0.039276123046875,
-0.026824951171875,
-0.032806396484375,
0.00516510009765625,
-0.0016679763793945312,
0.0238189697265625,
0.00576019287109375
] |
25f2b415d111f0f90a06825381591a329fe1e638 | Wordpress Stackexchange
Q: How do I get the name of a menu in WordPress? I'm currently setting up a sidebar menu with multiple menus and sections. Each section with the title (the menu name) and a bunch of links underneath (the menu items) - I printed the items, but how do I print the menu name?
Thanks,
Jacob
A: You can get the name like this, using the menu location, so if the menu is updated or you assign other menu you dont have to update anything here:
$locations = get_nav_menu_locations(); //get all menu locations
$menu = wp_get_nav_menu_object($locations['name_of_the_menu_location']);//get the menu object
echo $menu->name; // name of the menu
the 'name_of_the_menu_location' is the one you use to output a menu using wp_nav_menu
<?php
wp_nav_menu(array(
'theme_location' => 'footer'//this value
));
?>
| Q: How do I get the name of a menu in WordPress? I'm currently setting up a sidebar menu with multiple menus and sections. Each section with the title (the menu name) and a bunch of links underneath (the menu items) - I printed the items, but how do I print the menu name?
Thanks,
Jacob
A: You can get the name like this, using the menu location, so if the menu is updated or you assign other menu you dont have to update anything here:
$locations = get_nav_menu_locations(); //get all menu locations
$menu = wp_get_nav_menu_object($locations['name_of_the_menu_location']);//get the menu object
echo $menu->name; // name of the menu
the 'name_of_the_menu_location' is the one you use to output a menu using wp_nav_menu
<?php
wp_nav_menu(array(
'theme_location' => 'footer'//this value
));
?>
A: On WordPress version 4.9.0 and above you can use
wp_get_nav_menu_name($location)
wp_nav_menu_name for more
A: You can access the menu metadata using the wp_get_nav_menu_object function
BY NAME:
$menu = wp_get_nav_menu_object("my mainmenu" );
BY SLUG:
$menu = wp_get_nav_menu_object("my-mainmenu" );
The return object as follows:
Object (
term_id => 4
name => My Menu Name
slug => my-menu-name
term_group => 0
term_taxonomy_id => 4
taxonomy => nav_menu
description =>
parent => 0
count => 6
)
To display the name:
echo $menu->name;
| wordpress | {
"language": "en",
"length": 207,
"provenance": "stackexchange_00019.jsonl.gz:473275",
"question_score": "10",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/256976"
} | [
0.0173797607421875,
0.007328033447265625,
0.01318359375,
0.052215576171875,
0.017547607421875,
-0.0379638671875,
0.0880126953125,
-0.05419921875,
-0.01282501220703125,
0.019805908203125,
-0.024688720703125,
0.0307769775390625,
-0.0296630859375,
-0.00908660888671875,
0.0029582977294921875,
-0.031219482421875,
0.052337646484375,
-0.0200653076171875,
0.0250091552734375,
0.009033203125,
-0.0018892288208007812,
0.0447998046875,
0.007007598876953125,
0.0545654296875,
0.042205810546875,
-0.0635986328125,
0.0291900634765625,
0.003940582275390625,
0.0272369384765625,
-0.01165771484375,
0.0309906005859375,
-0.0189971923828125,
0.0089263916015625,
0.0016355514526367188,
0.055328369140625,
0.036834716796875,
0.00936126708984375,
0.005146026611328125,
0.027618408203125,
0.01206207275390625,
0.0269012451171875,
-0.024139404296875,
0.00508880615234375,
-0.000018656253814697266,
-0.0008769035339355469,
-0.0235595703125,
0.0191497802734375,
-0.03857421875,
-0.0259246826171875,
0.0276947021484375,
0.039794921875,
-0.006103515625,
0.03765869140625,
0.03912353515625,
-0.023223876953125,
-0.022491455078125,
0.021453857421875,
-0.021392822265625,
0.0209503173828125,
-0.0035858154296875,
-0.0338134765625,
0.00461578369140625,
0.0323486328125,
-0.01354217529296875,
-0.0207061767578125,
0.018707275390625,
0.037261962890625,
0.0019521713256835938,
-0.0181884765625,
-0.0006093978881835938,
0.01385498046875,
-0.013458251953125,
-0.00241851806640625,
0.0232391357421875,
-0.013427734375,
-0.06976318359375,
0.004634857177734375,
-0.037750244140625,
0.0178375244140625,
0.01873779296875,
0.003833770751953125,
-0.00545501708984375,
-0.09210205078125,
0.024017333984375,
0.014862060546875,
0.03387451171875,
-0.005199432373046875,
-0.0298309326171875,
-0.00446319580078125,
-0.01514434814453125,
-0.01212310791015625,
0.00550079345703125,
-0.0309295654296875,
0.023162841796875,
-0.0167694091796875,
-0.0141754150390625,
0.0192413330078125,
0.08349609375,
-0.045654296875,
0.01412200927734375,
-0.04058837890625,
-0.0205535888671875,
0.035675048828125,
-0.06256103515625,
0.00017583370208740234,
0.037628173828125,
0.036376953125,
0.027435302734375,
0.0261688232421875,
0.0118865966796875,
0.0029430389404296875,
0.003570556640625,
-0.052581787109375,
-0.05841064453125,
-0.0007920265197753906,
0.0625,
-0.04241943359375,
0.0161895751953125,
0.02587890625,
0.0249176025390625,
-0.01262664794921875,
0.018890380859375,
-0.030242919921875,
0.055267333984375,
-0.0102081298828125,
0.01885986328125,
0.0287628173828125,
-0.016876220703125,
-0.046966552734375,
0.041473388671875,
-0.0223541259765625,
-0.006191253662109375,
0.031707763671875,
0.037078857421875,
0.00036072731018066406,
-0.036041259765625,
0.002964019775390625,
0.0021533966064453125,
0.0036373138427734375,
0.0052947998046875,
-0.00140380859375,
0.0238037109375,
0.053863525390625,
-0.05230712890625,
-0.022064208984375,
-0.006061553955078125,
0.01959228515625,
0.024505615234375,
-0.0137176513671875,
-0.00957489013671875,
-0.01329803466796875,
0.01134490966796875,
0.01326751708984375,
0.02105712890625,
-0.0305938720703125,
0.0064849853515625,
-0.0004398822784423828,
-0.021240234375,
-0.0095062255859375,
-0.0261383056640625,
-0.0184478759765625,
0.004241943359375,
0.023681640625,
-0.0197906494140625,
-0.0225067138671875,
0.01056671142578125,
-0.0178680419921875,
-0.00736236572265625,
0.01190948486328125,
-0.0036411285400390625,
-0.0092926025390625,
0.0017919540405273438,
-0.015380859375,
-0.003692626953125,
-0.002895355224609375,
0.0170745849609375,
-0.0200042724609375,
-0.00243377685546875,
0.005092620849609375,
0.03887939453125,
-0.0137481689453125,
-0.0399169921875,
-0.01529693603515625,
-0.006378173828125,
-0.059722900390625,
0.041839599609375,
-0.006290435791015625,
0.072265625,
0.0433349609375,
0.01678466796875,
-0.002559661865234375,
-0.0191802978515625,
-0.07537841796875,
0.02154541015625,
0.006805419921875,
0.0210723876953125,
0.007297515869140625,
0.0228118896484375,
0.00011420249938964844,
-0.047607421875,
0.0005860328674316406,
0.0071258544921875,
0.0032825469970703125,
-6.556510925292969e-7,
-0.031646728515625,
0.005695343017578125,
-0.00777435302734375,
0.032958984375,
0.043731689453125,
0.006328582763671875,
-0.0240478515625,
-0.00408172607421875,
0.022552490234375,
-0.09490966796875,
-0.064208984375,
0.0281524658203125,
-0.0364990234375,
-0.004131317138671875,
-0.0227203369140625,
-0.00647735595703125,
-0.02276611328125,
0.0188140869140625,
-0.0191192626953125,
0.01654052734375,
0.006992340087890625,
-0.023406982421875,
-0.0198974609375,
-0.0232086181640625,
0.002079010009765625,
0.00868988037109375,
-0.0166015625,
0.0303192138671875,
0.03179931640625,
0.050628662109375,
0.01056671142578125,
0.007965087890625,
0.034637451171875,
-0.033203125,
0.00278472900390625,
0.01276397705078125,
0.03472900390625,
0.050567626953125,
-0.0083160400390625,
-0.026092529296875,
0.05084228515625,
-0.058807373046875,
-0.00798797607421875,
-0.027618408203125,
-0.0021877288818359375,
0.026275634765625,
0.025848388671875,
0.006137847900390625,
-0.0015611648559570312,
0.007678985595703125,
0.00567626953125,
0.026153564453125,
-0.027099609375,
-0.0005526542663574219,
0.005405426025390625,
0.004688262939453125,
0.009185791015625,
0.0100860595703125,
0.00658416748046875,
-0.0082550048828125,
0.00702667236328125,
0.031585693359375,
-0.00418853759765625,
0.00934600830078125,
-0.048736572265625,
0.0176849365234375,
0.0283355712890625,
0.016876220703125,
-0.006683349609375,
-0.0010747909545898438,
0.0164947509765625,
-0.0186614990234375,
0.00458526611328125,
-0.015960693359375,
-0.007598876953125,
-0.0173492431640625,
-0.023651123046875,
0.00736236572265625,
0.0167388916015625,
-0.00817108154296875,
-0.016357421875,
-0.04388427734375,
0.033447265625,
-0.004917144775390625,
-0.035675048828125,
0.033721923828125,
0.029815673828125,
0.04791259765625,
0.0019989013671875,
-0.0011014938354492188,
-0.0289154052734375,
0.0419921875,
0.0919189453125,
0.0390625,
-0.0214080810546875,
0.02862548828125,
0.05316162109375,
0.02001953125,
-0.0030078887939453125,
-0.0157928466796875,
-0.0059051513671875,
-0.0085906982421875,
0.00733184814453125,
-0.0125732421875,
-0.0206298828125,
-0.01457977294921875,
-0.031341552734375,
0.03668212890625,
0.0016870498657226562,
0.010101318359375,
-0.0293426513671875,
-0.04815673828125,
-0.033905029296875,
-0.0285186767578125,
-0.08935546875,
-0.03900146484375,
-0.0038738250732421875,
-0.024261474609375,
0.029052734375,
0.0263671875,
-0.000919342041015625,
-0.0298004150390625,
0.0648193359375,
0.0178375244140625,
0.0452880859375,
-0.016448974609375,
-0.05029296875,
0.006587982177734375,
-0.05810546875,
-0.00021839141845703125,
-0.01385498046875,
-0.0072479248046875,
0.009124755859375,
-0.0081024169921875,
-0.001110076904296875,
-0.03106689453125,
0.0212860107421875,
0.0166473388671875,
-0.0025005340576171875,
0.0031871795654296875,
0.014129638671875,
-0.003971099853515625,
-0.0262451171875,
0.00826263427734375,
0.01702880859375,
0.005573272705078125,
-0.01493072509765625,
-0.0158233642578125,
-0.0172271728515625,
0.00460052490234375,
0.03692626953125,
-0.0050201416015625,
-0.00901031494140625,
0.038848876953125,
0.035980224609375,
-0.0301361083984375,
-0.039520263671875,
-0.031829833984375,
-0.049896240234375,
0.043060302734375,
0.040618896484375,
0.006679534912109375,
-0.034332275390625,
0.036895751953125,
0.005489349365234375,
-0.0015926361083984375,
0.00835418701171875,
-0.0006513595581054688,
0.01300811767578125,
-0.013824462890625,
0.007083892822265625,
-0.004161834716796875,
0.020721435546875,
-0.0189971923828125,
0.0100555419921875,
0.005390167236328125,
0.0081787109375,
-0.00797271728515625,
0.01375579833984375,
-0.011993408203125,
-0.0631103515625,
0.041778564453125,
-0.05352783203125,
0.023193359375,
-0.0308380126953125,
-0.019378662109375,
0.011627197265625,
0.11590576171875,
-0.005886077880859375,
-0.0316162109375,
-0.0038299560546875,
0.01050567626953125,
-0.006618499755859375,
-0.033843994140625,
-0.01202392578125,
-0.026580810546875,
-0.1502685546875,
0.0199737548828125,
-0.0102386474609375,
-0.05291748046875,
-0.004970550537109375,
-0.01082611083984375,
-0.06646728515625,
-0.054718017578125,
0.034423828125,
-0.06719970703125,
0.0130615234375,
0.00955963134765625,
-0.0189971923828125,
-0.020477294921875,
-0.037994384765625,
-0.01922607421875,
-0.043853759765625,
-0.014068603515625,
-0.018951416015625,
0.046234130859375,
0.028961181640625,
-0.059661865234375,
0.01184844970703125,
0.040496826171875,
0.0260772705078125,
0.052459716796875,
0.0179443359375,
0.01363372802734375,
0.040252685546875,
-0.01317596435546875,
0.021575927734375,
-0.027679443359375,
0.00981903076171875,
0.01580810546875,
-0.032379150390625,
0.02899169921875,
-0.012481689453125,
0.01910400390625,
0.03265380859375,
-0.04150390625,
-0.028717041015625,
-0.0178375244140625,
0.03662109375,
0.004150390625,
0.0029735565185546875,
0.0185546875,
0.00627899169921875,
-0.0170135498046875,
0.0180816650390625,
-0.0440673828125,
-0.0235443115234375,
0.017120361328125,
0.0811767578125,
0.023773193359375,
-0.002101898193359375,
-0.020904541015625,
0.0340576171875,
0.050567626953125,
-0.01529693603515625,
0.03448486328125,
0.027679443359375,
-0.0251312255859375,
0.0307464599609375,
0.019439697265625,
0.0113525390625,
0.033203125,
0.0042266845703125,
0.0178070068359375,
-0.00948333740234375,
0.003925323486328125,
0.011383056640625,
-0.055755615234375,
0.03192138671875,
-0.018310546875,
-0.027069091796875,
-0.039215087890625,
0.061187744140625,
-0.0193939208984375,
0.033538818359375,
-0.06304931640625,
0.00720977783203125,
-0.01357269287109375,
-0.01195526123046875,
0.054962158203125,
0.044097900390625,
-0.005035400390625,
0.00970458984375,
0.03607177734375,
-0.011474609375,
-0.007354736328125,
-0.035247802734375,
0.015625,
0.0161895751953125,
-0.03125,
-0.0005040168762207031,
0.0205078125,
-0.006641387939453125,
0.08331298828125,
0.0316162109375,
-0.006023406982421875,
-0.0274505615234375,
-0.00868988037109375,
0.01837158203125,
-0.01406097412109375,
0.017486572265625,
0.02093505859375,
0.0168914794921875,
0.004299163818359375,
0.00754547119140625,
-0.0247955322265625,
0.01398468017578125,
-0.0164947509765625,
0.0256805419921875,
0.01561737060546875,
0.0059356689453125,
0.005405426025390625,
0.06976318359375,
-0.00743865966796875,
0.037841796875,
-0.0195770263671875,
-0.01265716552734375,
-0.022552490234375,
0.041748046875,
0.025390625,
-0.015625,
0.0152740478515625,
-0.0148162841796875,
0.023895263671875,
-0.0254669189453125,
-0.0169830322265625,
0.0205535888671875,
0.0260467529296875,
0.0088043212890625,
-0.0016489028930664062,
0.0045928955078125,
-0.0156402587890625,
-0.00330352783203125,
0.04351806640625,
-0.046783447265625,
-0.058258056640625,
-0.061004638671875,
-0.01328277587890625,
0.060333251953125,
-0.042449951171875,
0.0036029815673828125,
-0.004703521728515625,
0.031158447265625,
0.004962921142578125,
-0.017303466796875,
-0.049530029296875,
0.032562255859375,
0.047821044921875,
-0.067626953125,
-0.0025653839111328125,
0.032318115234375,
-0.07684326171875,
-0.053985595703125,
0.0025157928466796875,
-0.0418701171875,
0.039520263671875,
-0.05731201171875,
0.03302001953125,
-0.04364013671875,
0.0218353271484375,
-0.038909912109375,
0.00860595703125,
0.039886474609375,
0.051361083984375,
-0.035400390625,
0.01251220703125,
-0.0253753662109375,
0.0013875961303710938,
0.03338623046875,
-0.01007080078125,
-0.018280029296875,
-0.03955078125,
-0.01617431640625,
-0.002254486083984375,
0.02679443359375,
0.06402587890625,
-0.0272064208984375,
0.02947998046875,
-0.00731658935546875,
0.005878448486328125,
-0.0186767578125,
0.0214996337890625,
0.026275634765625,
0.01345062255859375,
0.0017690658569335938,
-0.00482177734375,
-0.0267333984375,
-0.01416015625,
0.031280517578125,
-0.0020847320556640625,
-0.032745361328125,
-0.045501708984375,
-0.0147247314453125,
-0.03204345703125,
0.03375244140625,
-0.0100555419921875,
0.04095458984375,
-0.0000330805778503418,
0.0185546875,
0.00040912628173828125,
-0.029022216796875,
-0.0230865478515625,
0.002285003662109375,
0.037933349609375,
-0.051727294921875,
-0.0152587890625,
-0.002361297607421875,
-0.004085540771484375,
0.05615234375,
-0.0408935546875,
0.020355224609375,
0.034820556640625,
-0.05633544921875,
0.06451416015625,
0.0765380859375,
0.01898193359375,
0.04669189453125,
0.00698089599609375,
0.0117034912109375,
0.021148681640625,
-0.00731658935546875,
0.034271240234375,
0.029205322265625,
0.06884765625,
-0.002109527587890625,
0.004817962646484375,
0.03460693359375,
-0.03985595703125,
0.01314544677734375,
0.0168304443359375,
0.06549072265625,
-0.04791259765625,
0.01885986328125,
0.037506103515625,
-0.00287628173828125,
0.01568603515625,
0.0230712890625,
-0.042572021484375,
-0.047576904296875,
0.03875732421875,
-0.05499267578125,
-0.0166168212890625,
0.0178985595703125,
0.002208709716796875,
0.0013399124145507812,
-0.00182342529296875,
0.050079345703125,
0.003910064697265625,
0.0259857177734375,
-0.05474853515625,
-0.0034332275390625,
-0.002017974853515625,
-0.03466796875,
-0.011474609375,
0.0291290283203125,
-0.0080718994140625,
-0.0276031494140625,
0.0633544921875,
-0.042877197265625,
0.054351806640625,
0.00399017333984375,
0.0011434555053710938,
0.006580352783203125,
0.0428466796875,
-0.03729248046875,
0.04083251953125,
-0.00152587890625,
0.007579803466796875,
0.033203125,
0.002376556396484375,
-0.0064544677734375,
-0.0158843994140625,
-0.0100250244140625,
-0.0005307197570800781,
-0.0255889892578125,
0.0081939697265625,
-0.0297698974609375,
-0.018096923828125,
0.113525390625,
-0.025054931640625,
-0.03826904296875,
-0.0233612060546875,
0.006778717041015625,
0.023284912109375,
0.00824737548828125,
0.055267333984375,
-0.041229248046875,
0.01241302490234375,
0.0299224853515625,
0.034423828125,
-0.0217132568359375,
0.01007080078125,
-0.026611328125,
0.040008544921875,
-0.004119873046875,
-0.02325439453125,
0.01149749755859375,
0.0295867919921875,
-0.01495361328125,
0.01776123046875,
-0.053466796875,
0.06475830078125,
0.045989990234375,
0.06781005859375,
-0.0589599609375,
-0.0260772705078125,
0.0263519287109375,
0.042938232421875,
-0.0164794921875,
0.00550079345703125,
0.00787353515625,
-0.013336181640625,
0.0192413330078125,
0.050384521484375,
0.01374053955078125,
-0.01018524169921875,
0.00962066650390625,
-0.02130126953125,
0.034576416015625,
-0.0108642578125,
0.03424072265625,
-0.035736083984375,
0.01103973388671875,
0.00785064697265625,
0.0177001953125,
0.012908935546875,
-0.02947998046875,
-0.0213775634765625,
0.01349639892578125,
-0.03131103515625,
-0.025543212890625,
-0.00479888916015625,
-0.0241241455078125,
0.03289794921875,
0.0247039794921875,
-0.0419921875,
0.0191802978515625,
-0.046142578125,
0.052459716796875,
0.0159149169921875,
-0.0021572113037109375,
-0.0021686553955078125,
0.0234222412109375,
-0.0247955322265625,
-0.00716400146484375,
-0.007625579833984375,
0.0207061767578125,
-0.0183563232421875,
0.0562744140625,
0.032135009765625,
0.04150390625,
-0.032928466796875,
-0.054046630859375,
0.046966552734375,
0.0875244140625,
-0.0171966552734375,
-0.03863525390625,
0.0003368854522705078,
0.000324249267578125,
0.0205841064453125,
0.0056915283203125,
0.0262298583984375,
0.0423583984375,
0.0628662109375,
-0.012054443359375,
-0.0031948089599609375,
0.038238525390625,
0.04412841796875,
0.005458831787109375,
0.01078033447265625,
-0.04248046875,
-0.021820068359375,
-0.04571533203125,
0.043212890625,
0.0228271484375,
0.035003662109375,
-0.0247802734375,
0.050811767578125,
-0.03271484375,
-0.0028533935546875,
0.01108551025390625,
0.0132293701171875,
0.01523590087890625,
-0.01100921630859375,
0.0133056640625,
-0.00768280029296875,
0.0019855499267578125,
0.004726409912109375,
0.048248291015625,
0.03460693359375,
0.059661865234375,
0.0052032470703125,
-0.039703369140625,
0.00853729248046875,
0.0177764892578125,
-0.030303955078125,
-0.021026611328125,
-0.028045654296875,
-0.00652313232421875,
0.009521484375,
-0.0110015869140625,
-0.004520416259765625,
0.0149688720703125,
0.01306915283203125,
-0.0152130126953125,
0.0238189697265625,
-0.00040841102600097656,
0.0015048980712890625,
-0.00075531005859375,
-0.0275726318359375,
0.005035400390625,
-0.0007715225219726562,
-0.128662109375,
-0.035491943359375,
-0.0300445556640625,
0.0107269287109375,
0.0238800048828125,
0.03515625,
0.00444793701171875,
0.01617431640625,
0.003681182861328125,
-0.01873779296875,
0.015777587890625,
0.01910400390625,
0.00738525390625,
0.0770263671875,
0.0241851806640625,
0.03533935546875,
-0.042572021484375,
-0.0096588134765625,
-0.019805908203125,
-0.0100250244140625,
0.046356201171875,
-0.01145172119140625,
0.0430908203125,
0.0280609130859375,
-0.048065185546875,
0.029937744140625,
-0.06646728515625,
-0.070068359375,
0.031646728515625,
-0.007671356201171875,
-0.005771636962890625,
0.002079010009765625,
-0.0469970703125,
0.0396728515625,
0.055511474609375,
-0.0264739990234375,
0.028228759765625,
0.0153045654296875,
0.005126953125,
-0.050384521484375,
0.031341552734375,
-0.006992340087890625,
-0.0275115966796875,
0.0279693603515625,
0.006313323974609375,
0.0021877288818359375,
0.0599365234375,
0.044677734375,
0.007534027099609375,
0.03729248046875,
-0.0283355712890625,
0.0103912353515625,
-0.01540374755859375,
0.036468505859375,
0.04547119140625,
0.008697509765625,
-0.0091400146484375,
-0.0231475830078125,
-0.0190277099609375,
-0.00746917724609375,
0.008636474609375,
-0.0082244873046875,
-0.0167694091796875,
0.0281982421875,
0.062255859375,
-0.0131072998046875,
0.05841064453125,
-0.019744873046875,
0.0198822021484375,
-0.0155792236328125,
0.05328369140625,
0.00794219970703125,
-0.038299560546875,
-0.035369873046875,
-0.0714111328125,
0.031585693359375,
0.042449951171875,
-0.0216217041015625,
0.0361328125,
-0.038543701171875,
-0.043426513671875,
0.027191162109375,
-0.01204681396484375,
0.03173828125,
-0.02081298828125,
-0.00786590576171875,
-0.028106689453125,
-0.011566162109375,
-0.01201629638671875,
0.01078033447265625,
0.007434844970703125,
-0.01482391357421875,
0.00951385498046875,
-0.00817108154296875,
0.01187896728515625,
0.0145416259765625,
-0.011749267578125,
0.0193023681640625,
-0.00884246826171875,
-0.01403045654296875,
-0.0318603515625,
0.009613037109375,
0.0078887939453125,
0.0166473388671875,
-0.03387451171875,
-0.01800537109375,
0.00824737548828125,
-0.0020198822021484375,
-0.00751495361328125,
0.023651123046875,
-0.036956787109375,
-0.01763916015625,
0.004764556884765625,
-0.00434112548828125,
0.00763702392578125,
-0.03082275390625,
-0.0308685302734375,
0.02008056640625,
0.01499176025390625,
-0.037689208984375,
0.0038547515869140625,
-0.0147705078125,
-0.0270538330078125,
0.020050048828125,
0.0005435943603515625,
-0.0160675048828125,
-0.0085601806640625,
0.03521728515625,
0.01183319091796875,
0.06103515625,
-0.02490234375,
0.023590087890625,
-0.052947998046875,
0.0211181640625,
-0.005077362060546875,
0.0235443115234375,
-0.004364013671875,
-0.0151519775390625,
-0.00272369384765625,
0.007610321044921875,
-0.052154541015625,
-0.034820556640625,
0.00040078163146972656,
0.026641845703125,
-0.00650787353515625,
0.006771087646484375,
-0.051025390625,
-0.00433349609375,
0.061798095703125,
0.09320068359375,
0.029815673828125,
-0.04388427734375,
-0.007778167724609375,
0.00548553466796875,
-0.046356201171875,
-0.009521484375,
0.0259857177734375,
-0.054290771484375,
-0.003749847412109375,
-0.0017347335815429688,
-0.0255279541015625,
-0.03668212890625,
0.01374053955078125,
-0.0648193359375,
0.004390716552734375,
-0.0081329345703125,
0.0128631591796875,
-0.04425048828125,
-0.0552978515625,
0.07867431640625,
-0.049468994140625,
-0.0246734619140625,
-0.016357421875,
0.051788330078125,
0.01345062255859375,
-0.03167724609375,
-0.0208282470703125,
0.039031982421875,
-0.037017822265625,
0.0037994384765625,
-0.01384735107421875,
0.0269012451171875,
-0.031219482421875,
0.01540374755859375,
-0.0113983154296875,
0.03021240234375,
0.00351715087890625,
0.034027099609375,
-0.00972747802734375,
0.056549072265625,
0.021209716796875,
0.0186004638671875,
0.01230621337890625,
0.08856201171875,
0.0220794677734375,
0.08001708984375,
-0.004589080810546875,
-0.0562744140625,
0.036041259765625,
-0.10333251953125,
-0.0009365081787109375,
0.004550933837890625,
-0.0021190643310546875,
-0.048187255859375,
0.027984619140625,
-0.020416259765625,
0.01055145263671875,
0.0310821533203125
] |
44cb1a32818d6615dfdff03a95a594d510959730 | Wordpress Stackexchange
Q: Get posts from Network (Multisite) The following code gives all posts from the network.
What I am trying to achieve :
*
*Select which blogs to display (by ID)
*Select how many post to display (My code selects how many post per blog)
*Order by date or random
$blogs = get_last_updated();
foreach ($blogs AS $blog) {
switch_to_blog($blog["blog_id"]);
$lastposts = get_posts('numberposts=3');
foreach($lastposts as $post) : ?>
<a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php endforeach;
restore_current_blog();
}
A: I created a plugin which does something similar (called Multisite Post Display https://wordpress.org/plugins/multisite-post-reader/ ) . It displays posts from all multisite sub-sites.
The code in there might be helpful for what you are doing. You are welcome to dig into it and use the code to help with your project. (After all, I used other people's code snippets to develop it.)
I wrote it after I did the Multisite Media Display, since I wanted a way to display media from subsites on one page, and couldn't find any plugin that did that. Both have been useful to monitor posted media and content from my multisite.
Free, open source, and all that. Hope it is helpful.
| Q: Get posts from Network (Multisite) The following code gives all posts from the network.
What I am trying to achieve :
*
*Select which blogs to display (by ID)
*Select how many post to display (My code selects how many post per blog)
*Order by date or random
$blogs = get_last_updated();
foreach ($blogs AS $blog) {
switch_to_blog($blog["blog_id"]);
$lastposts = get_posts('numberposts=3');
foreach($lastposts as $post) : ?>
<a href="<?php echo get_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php endforeach;
restore_current_blog();
}
A: I created a plugin which does something similar (called Multisite Post Display https://wordpress.org/plugins/multisite-post-reader/ ) . It displays posts from all multisite sub-sites.
The code in there might be helpful for what you are doing. You are welcome to dig into it and use the code to help with your project. (After all, I used other people's code snippets to develop it.)
I wrote it after I did the Multisite Media Display, since I wanted a way to display media from subsites on one page, and couldn't find any plugin that did that. Both have been useful to monitor posted media and content from my multisite.
Free, open source, and all that. Hope it is helpful.
A: Ricks Answer is surely helpful but I wanted to share my approach, which is an adoption or extension of your code:
First get a list of selected blogs in your network.:
$args = array('site__in' => array(2, 3, 6))
$sitesObj = get_sites($args);
$sites = object_to_array($sitesObj);
You can also exclude sites by using 'site__not_in' in the arguments of get_sites().
Convert the $sitesObj object into an array:
$sites = object_to_array($sitesObj);
object_to_array($object) {
if (!is_object($object) && !is_array($object)) {
return $object;
}
return array_map('object_to_array', (array) $object) ;
}
Then initialize a counter to control the total of posts to show and switch to each selected blog to fire the loop with your custom arguments:
$postCounter = 0;
$maxPosts = 5; // total number of posts to show
foreach ($sites as $site) {
switch_to_blog($site['blog_id']);
$args = array(
'post_type' => 'post', // or custom post type
'posts_per_page' => 2, // number of posts per blog
'order' => 'DESC',
'orderby' => 'date' // you could also use 'rand' here
);
$loop = new WP_Query($args);
if ($loop->have_posts()) :
while ($loop->have_posts() && $counter < $maxPosts) : $loop->the_post();
// your output
endwhile;
endif;
restore_current_blog();
}
I hope that helps :)
A: This
function wolpostcount_shortcode($atts) {
function object_to_array($object) {
if (!is_object($object) && !is_array($object)) {
return $object;
}
return array_map('object_to_array', (array) $object) ;
}
$args = array('site__in' => array(1,7,8,12,14,15,20,21,22,25,32,33,36,41,42,46,47,48,49));
$sitesObj = get_sites($args);
$sites = object_to_array($sitesObj);
foreach ($sites as $site) {
switch_to_blog($site['blog_id']);
$postcount = wp_count_posts('post')->publish;
$pagecount = wp_count_posts('page')->publish;
echo 'Posts:'.$postcount.' Pages:'.$pagecount.'<br>';
$totalpostcount = $totalpostcount + $postcount;
$totalpagecount = $totalpagecount + $pagecount;
restore_current_blog();
}
echo 'number of posts '.$totalpostcount.'<br>';
echo 'number of pages '.$totalpagecount.'<br>';
A: function get_all_networks_posts($args){
if(!$args){
return false;
}
$sites = get_sites();
$blog_posts = array();
if($sites){
foreach ($sites as $site) {
switch_to_blog($site->id);
$posts = get_posts($args);
$blog_posts[$site->id] = $posts; // this is the above line
//$blog_posts[] = $posts;If you do not need site ids then use this line removing just the above line
}
}
restore_current_blog();
if($blog_posts){
return $blog_posts;
}
}
// Print a demo
$args = arrat(
'post_type' => 'post',
'posts_per_page' => -1,
);
print_r(get_all_networks_posts($args));
A: A while ago I wrote a little internal plugin to show posts from the main site (where the blog is) on the subsite in the network. Also I wanted to only show posts from a specific category on a certain subsite.
function custom_multiblog ( $atts ) {
// Get current blog
$original_blog_id = get_current_blog_id();
// Setup a category for each blog id you want to loop through - EDIT
if ( 19 == $original_blog_id ) {
$catslug_per_blog_id = array( 1 => 'category1', );
} else if ( 22 == $original_blog_id ) {
$catslug_per_blog_id = array( 1 => 'category2', );
} else if ( 23 == $original_blog_id ) {
$catslug_per_blog_id = array( 1 => 'category3', );
} else {
$catslug_per_blog_id = array( 1 => 'category1, category2, category3', );
}
foreach( $catslug_per_blog_id as $bid => $catslug ) {
//Switch to the blog with the blog id $bid
switch_to_blog( $bid );
$args = array(
//'post_type' => 'post',
'category_name' => $catslug,
'posts_per_page' => 10,
);
$args['paged'] = get_query_var( 'paged' ) ? get_query_var( 'paged' ) : 1;
echo '<div class="multiblog-wrapper">';
$query = new WP_Query( $args );
while( $query->have_posts() ) : $query->the_post();
echo '<article class="multiblog-item">';
echo '<div class="multiblog-img"><a href="' .get_the_permalink() . '">';
the_post_thumbnail ('large');
echo '</a></div>';
echo '<div class="multiblog-content">';
echo '<h2 style="line-height: 1em;"><a href="' .get_the_permalink() . '">' . get_the_title() . '</a></h2>';
echo '<p>' . get_the_excerpt() . '</p>';
echo '</div>';
echo '<div class="clearfix"></div>';
echo '</article>';
endwhile;
echo '</div>';
}
switch_to_blog( $original_blog_id );
wp_reset_postdata();
echo '<div class="clearfix"></div>';
echo '<div class="multiblog-navigation">';
previous_posts_link( '<< newer' );
next_posts_link( 'older >>', $query->max_num_pages );
echo '</div>';
}
add_shortcode( 'multiblog', 'jetzt_konf_multiblog' );
| wordpress | {
"language": "en",
"length": 785,
"provenance": "stackexchange_00019.jsonl.gz:473293",
"question_score": "7",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/257024"
} | [
0.03460693359375,
-0.0157623291015625,
0.01129913330078125,
0.0240020751953125,
-0.0047149658203125,
-0.0234375,
0.048797607421875,
-0.041900634765625,
0.01491546630859375,
0.0230560302734375,
-0.05438232421875,
0.01056671142578125,
-0.049530029296875,
-0.004276275634765625,
-0.0200042724609375,
-0.05316162109375,
0.0594482421875,
-0.026763916015625,
0.039154052734375,
0.025299072265625,
-0.029571533203125,
0.06341552734375,
0.048614501953125,
0.03887939453125,
-0.00571441650390625,
-0.0210723876953125,
0.0762939453125,
-0.01413726806640625,
-0.00264739990234375,
-0.01428985595703125,
0.0019989013671875,
0.013824462890625,
0.02362060546875,
0.001682281494140625,
-0.02508544921875,
-0.051666259765625,
0.03363037109375,
-0.0181427001953125,
-0.01222991943359375,
0.037750244140625,
0.00247955322265625,
0.01485443115234375,
0.056060791015625,
0.02294921875,
0.012451171875,
-0.03924560546875,
0.0094146728515625,
-0.06781005859375,
0.004367828369140625,
0.00991058349609375,
0.002216339111328125,
-0.044219970703125,
0.017669677734375,
0.008514404296875,
-0.0390625,
-0.05133056640625,
0.03179931640625,
-0.035888671875,
0.045257568359375,
-0.042144775390625,
-0.053192138671875,
-0.022918701171875,
0.053375244140625,
-0.005512237548828125,
-0.0308074951171875,
0.0132293701171875,
0.025604248046875,
0.00676727294921875,
-0.06109619140625,
-0.049407958984375,
0.0360107421875,
-0.0269775390625,
0.038482666015625,
-0.02154541015625,
-0.0214691162109375,
-0.023040771484375,
-0.0214385986328125,
-0.04083251953125,
0.045745849609375,
-0.06280517578125,
-0.016693115234375,
0.005870819091796875,
-0.045745849609375,
-0.0419921875,
0.0009365081787109375,
-0.009735107421875,
-0.0088043212890625,
-0.0003936290740966797,
-0.035186767578125,
-0.004863739013671875,
-0.016357421875,
-0.006725311279296875,
-0.03424072265625,
0.01149749755859375,
0.000713348388671875,
-0.0242767333984375,
0.02423095703125,
0.07025146484375,
-0.046722412109375,
-0.03265380859375,
-0.0301055908203125,
-0.005382537841796875,
-0.053741455078125,
-0.016357421875,
-0.004154205322265625,
0.01192474365234375,
0.0184478759765625,
0.0042724609375,
0.034576416015625,
0.031402587890625,
-0.0032958984375,
0.038787841796875,
-0.01812744140625,
-0.016357421875,
-0.030548095703125,
0.00372314453125,
-0.04449462890625,
-0.015838623046875,
-0.01224517822265625,
-0.0167694091796875,
-0.0014057159423828125,
0.032684326171875,
-0.0447998046875,
-0.00009161233901977539,
-0.0207366943359375,
-0.01323699951171875,
0.0103912353515625,
-0.013702392578125,
-0.0175933837890625,
0.03369140625,
-0.0289306640625,
0.01293182373046875,
0.03485107421875,
0.0026950836181640625,
-0.00611114501953125,
-0.019683837890625,
-0.0008254051208496094,
0.0157012939453125,
-0.00023865699768066406,
-0.0025539398193359375,
0.0104522705078125,
-0.02606201171875,
0.00318145751953125,
-0.00540924072265625,
-0.001720428466796875,
0.0152740478515625,
0.0273284912109375,
0.00894927978515625,
-0.02117919921875,
-0.0269012451171875,
-0.002101898193359375,
0.0184173583984375,
0.01898193359375,
-0.017822265625,
0.0228118896484375,
-0.040679931640625,
0.05560302734375,
-0.040008544921875,
0.007465362548828125,
-0.033233642578125,
0.01529693603515625,
0.01013946533203125,
0.029052734375,
-0.025848388671875,
-0.0303192138671875,
-0.023651123046875,
-0.039825439453125,
-0.008941650390625,
0.038482666015625,
-0.0118560791015625,
-0.01251220703125,
-0.0283050537109375,
0.07049560546875,
0.02886962890625,
-0.0094146728515625,
0.0592041015625,
-0.0187530517578125,
-0.002620697021484375,
0.038116455078125,
0.0183258056640625,
-0.0211334228515625,
-0.0215911865234375,
0.043701171875,
0.0078887939453125,
-0.07171630859375,
0.037139892578125,
0.003833770751953125,
0.054351806640625,
0.0182037353515625,
0.01739501953125,
0.050933837890625,
0.0203094482421875,
-0.022308349609375,
0.01654052734375,
-0.00301361083984375,
-0.0020084381103515625,
-0.0294952392578125,
0.0215606689453125,
-0.014984130859375,
-0.035400390625,
-0.017333984375,
0.00980377197265625,
0.0009412765502929688,
0.02587890625,
-0.0281524658203125,
0.00867462158203125,
-0.0129852294921875,
0.01898193359375,
0.0302886962890625,
0.01995849609375,
0.00698089599609375,
0.01200103759765625,
-0.0169525146484375,
-0.0421142578125,
-0.04718017578125,
0.0235137939453125,
-0.041656494140625,
1.7881393432617188e-7,
-0.01416015625,
0.005374908447265625,
-0.0148162841796875,
-0.017730712890625,
-0.02197265625,
0.0028057098388671875,
0.0831298828125,
-0.02410888671875,
-0.002117156982421875,
-0.0357666015625,
0.040618896484375,
0.024993896484375,
-0.061370849609375,
0.0079345703125,
-0.004756927490234375,
0.01085662841796875,
-0.0288848876953125,
0.0038089752197265625,
0.0295867919921875,
-0.01690673828125,
0.006175994873046875,
0.028961181640625,
0.029327392578125,
0.03314208984375,
-0.01062774658203125,
-0.02203369140625,
0.048553466796875,
-0.0224609375,
0.0234222412109375,
-0.02008056640625,
0.0206298828125,
0.0723876953125,
-0.0227508544921875,
0.0183563232421875,
0.0101470947265625,
-0.032745361328125,
0.020172119140625,
0.0391845703125,
0.034454345703125,
0.032379150390625,
-0.02813720703125,
0.0057220458984375,
0.012481689453125,
0.0232086181640625,
-0.032073974609375,
0.0188140869140625,
0.06158447265625,
0.005443572998046875,
0.0382080078125,
0.023773193359375,
-0.019256591796875,
0.01345062255859375,
-0.002376556396484375,
-0.03570556640625,
0.00849151611328125,
0.039825439453125,
0.0004146099090576172,
-0.007320404052734375,
-0.04022216796875,
-0.01131439208984375,
0.00557708740234375,
0.0010728836059570312,
-0.01422882080078125,
0.0269012451171875,
-0.04364013671875,
-0.0257568359375,
0.0016946792602539062,
-0.038818359375,
-0.0396728515625,
-0.0274200439453125,
-0.0231170654296875,
0.006175994873046875,
0.011749267578125,
0.03546142578125,
-0.03466796875,
0.047119140625,
-0.0136871337890625,
0.0029811859130859375,
0.01052093505859375,
-0.09197998046875,
0.069091796875,
-0.05084228515625,
0.06756591796875,
0.08221435546875,
-0.01213836669921875,
0.02618408203125,
-0.0074462890625,
-0.0013904571533203125,
-0.003971099853515625,
0.01099395751953125,
-0.02288818359375,
-0.044281005859375,
-0.052337646484375,
-0.03826904296875,
0.007015228271484375,
-0.01580810546875,
-0.0238189697265625,
-0.042999267578125,
-0.0279693603515625,
-0.02685546875,
-0.119873046875,
-0.05731201171875,
0.00763702392578125,
-0.07684326171875,
-0.0194854736328125,
-0.032806396484375,
-0.03948974609375,
-0.005352020263671875,
-0.0179443359375,
0.005352020263671875,
-0.014495849609375,
0.0160675048828125,
-0.05810546875,
-0.013458251953125,
-0.06414794921875,
0.02899169921875,
-0.008453369140625,
0.017364501953125,
0.009429931640625,
0.05206298828125,
0.01702880859375,
-0.040008544921875,
0.00998687744140625,
0.0174102783203125,
-0.044189453125,
-0.0264434814453125,
-0.005985260009765625,
-0.00777435302734375,
-0.007274627685546875,
0.0220794677734375,
-0.00838470458984375,
0.017791748046875,
-0.015167236328125,
-0.015411376953125,
-0.0252838134765625,
-0.018829345703125,
0.018890380859375,
-0.021209716796875,
0.0192108154296875,
0.02154541015625,
0.00975799560546875,
-0.0210723876953125,
-0.0024280548095703125,
-0.04339599609375,
-0.0250396728515625,
0.018341064453125,
0.006977081298828125,
0.014190673828125,
-0.03558349609375,
0.0357666015625,
-0.0027141571044921875,
-0.0156097412109375,
0.0182342529296875,
-0.038726806640625,
0.0296630859375,
0.008575439453125,
0.0171661376953125,
-0.013519287109375,
-0.00696563720703125,
-0.019073486328125,
0.0185699462890625,
-0.0186920166015625,
0.0141754150390625,
-0.022918701171875,
0.053253173828125,
-0.01338958740234375,
-0.0035190582275390625,
0.0362548828125,
-0.01727294921875,
0.01885986328125,
-0.035614013671875,
-0.0245513916015625,
-0.0171356201171875,
0.062164306640625,
-0.038330078125,
-0.01117706298828125,
-0.0250701904296875,
-0.00489044189453125,
0.007537841796875,
-0.0311126708984375,
-0.0250396728515625,
-0.021514892578125,
-0.07342529296875,
-0.006969451904296875,
-0.0197906494140625,
-0.0261993408203125,
0.00897216796875,
-0.006801605224609375,
-0.020904541015625,
-0.044830322265625,
0.0098724365234375,
0.044830322265625,
0.006298065185546875,
-0.038482666015625,
0.0121612548828125,
-0.032470703125,
0.017486572265625,
-0.0155181884765625,
-0.0249176025390625,
-0.00243377685546875,
-0.006694793701171875,
0.019287109375,
0.042327880859375,
-0.058349609375,
0.01213836669921875,
0.0239105224609375,
-0.0034923553466796875,
0.033233642578125,
-0.0024547576904296875,
0.00949859619140625,
-0.0118408203125,
-0.0190277099609375,
0.0097198486328125,
-0.032562255859375,
-0.0197906494140625,
-0.02978515625,
0.00981903076171875,
0.00830841064453125,
-0.04193115234375,
0.0008549690246582031,
-0.041351318359375,
0.0023441314697265625,
-0.0309906005859375,
-0.005626678466796875,
0.028533935546875,
-0.0016193389892578125,
-0.01108551025390625,
-0.00205230712890625,
0.001979827880859375,
-0.0009832382202148438,
-0.0214080810546875,
0.04638671875,
-0.04754638671875,
0.0182342529296875,
0.040740966796875,
0.03729248046875,
-0.004581451416015625,
-0.0828857421875,
-0.01219940185546875,
0.0202178955078125,
0.0011043548583984375,
0.04327392578125,
0.03399658203125,
-0.0164031982421875,
0.034393310546875,
-0.0035114288330078125,
0.00792694091796875,
0.030670166015625,
-0.0023899078369140625,
0.0087738037109375,
-0.03448486328125,
0.0295867919921875,
0.0254669189453125,
-0.033782958984375,
0.008819580078125,
-0.0228729248046875,
-0.030181884765625,
-0.034454345703125,
0.0684814453125,
-0.001682281494140625,
0.037872314453125,
-0.05780029296875,
-0.0438232421875,
0.01139068603515625,
-0.0122528076171875,
0.047332763671875,
0.031341552734375,
-0.016357421875,
0.035614013671875,
0.0210723876953125,
-0.00873565673828125,
0.02593994140625,
0.030181884765625,
0.00354766845703125,
0.018707275390625,
0.01885986328125,
-0.038177490234375,
0.00027680397033691406,
-0.0108489990234375,
0.023468017578125,
-0.0204010009765625,
-0.05450439453125,
0.01165008544921875,
-0.02923583984375,
0.0274505615234375,
0.027740478515625,
-0.0214080810546875,
0.0380859375,
0.03973388671875,
-0.052642822265625,
-0.00968170166015625,
-0.0042572021484375,
-0.01245880126953125,
-0.061553955078125,
-0.0008382797241210938,
-0.03070068359375,
0.018402099609375,
0.00301361083984375,
0.0740966796875,
-0.056549072265625,
0.0687255859375,
-0.00807952880859375,
0.055877685546875,
0.0633544921875,
0.0035953521728515625,
0.021636962890625,
-0.0035953521728515625,
-0.024993896484375,
-0.00339508056640625,
-0.017364501953125,
-0.0097503662109375,
-0.01424407958984375,
0.04443359375,
0.049896240234375,
0.03607177734375,
0.0211334228515625,
-0.042144775390625,
-0.0182342529296875,
-0.049468994140625,
0.09503173828125,
0.0386962890625,
-0.0596923828125,
-0.037750244140625,
-0.0118560791015625,
0.04071044921875,
0.00634002685546875,
0.01334381103515625,
-0.0223541259765625,
0.01271820068359375,
-0.00970458984375,
-0.042022705078125,
-0.047821044921875,
0.00665283203125,
0.03448486328125,
-0.0222930908203125,
-0.01044464111328125,
0.01125335693359375,
-0.04443359375,
-0.02239990234375,
-0.018829345703125,
-0.0214996337890625,
0.051361083984375,
-0.02655029296875,
0.02362060546875,
-0.0255279541015625,
0.00016379356384277344,
-0.0516357421875,
0.0259552001953125,
0.032958984375,
0.027099609375,
-0.042266845703125,
0.0177764892578125,
-0.002681732177734375,
-0.00788116455078125,
0.015777587890625,
-0.022552490234375,
-0.043212890625,
-0.033905029296875,
0.01029205322265625,
0.01214599609375,
-0.003932952880859375,
-0.054656982421875,
-0.001308441162109375,
-0.017822265625,
0.01090240478515625,
0.0032024383544921875,
0.0028553009033203125,
0.03460693359375,
0.007205963134765625,
0.06512451171875,
0.03765869140625,
0.04095458984375,
-0.0267181396484375,
-0.034271240234375,
-0.0016698837280273438,
-0.074462890625,
-0.0252532958984375,
0.048675537109375,
-0.047149658203125,
0.006633758544921875,
-0.019378662109375,
0.0068817138671875,
-0.00022017955780029297,
0.007175445556640625,
0.0003581047058105469,
-0.01873779296875,
-0.042022705078125,
0.0257415771484375,
-0.0146331787109375,
0.031158447265625,
-0.0298614501953125,
-0.017486572265625,
0.00628662109375,
-0.0273895263671875,
0.01490020751953125,
0.01030731201171875,
-0.00415802001953125,
0.01099395751953125,
-0.017486572265625,
0.03948974609375,
0.077880859375,
0.00421142578125,
0.043060302734375,
0.0345458984375,
0.0030956268310546875,
0.01016998291015625,
-0.0238037109375,
0.042205810546875,
0.004245758056640625,
0.02447509765625,
-0.03509521484375,
0.00519561767578125,
0.01131439208984375,
-0.0207672119140625,
-0.004974365234375,
-0.025543212890625,
0.0057373046875,
-0.0062408447265625,
0.031463623046875,
0.00408935546875,
0.0017576217651367188,
-0.0012359619140625,
-0.0183868408203125,
-0.0063018798828125,
-0.03375244140625,
0.03973388671875,
0.030853271484375,
-0.03271484375,
-0.005130767822265625,
-0.002597808837890625,
-0.005496978759765625,
0.005039215087890625,
0.06451416015625,
0.0190277099609375,
-0.0285186767578125,
-0.018768310546875,
-0.0015392303466796875,
-0.0014104843139648438,
-0.0149078369140625,
0.004314422607421875,
-0.0304718017578125,
-0.01047515869140625,
-0.0241851806640625,
-0.005481719970703125,
-0.01366424560546875,
-0.0029735565185546875,
0.005069732666015625,
0.0206451416015625,
-0.021728515625,
0.0682373046875,
-0.027374267578125,
0.0096282958984375,
0.050811767578125,
-0.06829833984375,
-0.02545166015625,
-0.022308349609375,
0.0252532958984375,
0.0240478515625,
-0.038848876953125,
0.032470703125,
-0.009033203125,
-0.0218963623046875,
-0.0103607177734375,
0.0160369873046875,
0.061859130859375,
-0.0225677490234375,
-0.0158538818359375,
0.050628662109375,
0.0260467529296875,
-0.034088134765625,
-0.02880859375,
0.0270233154296875,
-0.06634521484375,
-0.01214599609375,
-0.001636505126953125,
0.00919342041015625,
-0.00748443603515625,
-0.00661468505859375,
-0.08258056640625,
0.10107421875,
-0.01141357421875,
0.06732177734375,
0.0241241455078125,
0.0199432373046875,
-0.0276641845703125,
-0.019622802734375,
-0.037506103515625,
0.0428466796875,
-0.026214599609375,
0.0557861328125,
-0.09014892578125,
-0.005130767822265625,
0.0169830322265625,
0.060302734375,
0.0214385986328125,
0.0073089599609375,
-0.058837890625,
-0.0291595458984375,
-0.016357421875,
0.02880859375,
0.0094451904296875,
0.041717529296875,
0.0012559890747070312,
0.046142578125,
0.0699462890625,
-0.060150146484375,
0.032196044921875,
0.005245208740234375,
0.00641632080078125,
0.0273895263671875,
0.00028824806213378906,
-0.002574920654296875,
-0.0038242340087890625,
-0.039886474609375,
-0.047119140625,
0.00878143310546875,
0.02606201171875,
-0.01222991943359375,
0.04266357421875,
0.044647216796875,
0.041473388671875,
-0.01557159423828125,
0.047821044921875,
-0.0193634033203125,
0.0491943359375,
-0.0181732177734375,
-0.0118255615234375,
0.040008544921875,
0.013702392578125,
0.02935791015625,
0.0201873779296875,
0.00273895263671875,
0.0120697021484375,
0.0260162353515625,
0.0313720703125,
0.0099639892578125,
0.0248565673828125,
-0.0791015625,
-0.058990478515625,
0.061920166015625,
0.0609130859375,
-0.0006842613220214844,
-0.03399658203125,
0.0208892822265625,
0.003894805908203125,
0.0010128021240234375,
0.0213165283203125,
0.007328033447265625,
-0.01971435546875,
0.016815185546875,
-0.029022216796875,
-0.0263671875,
-0.0198516845703125,
0.053131103515625,
0.0015726089477539062,
-0.00933074951171875,
-0.00634765625,
-0.053985595703125,
-0.033966064453125,
0.03668212890625,
0.0142059326171875,
0.04412841796875,
-0.0159912109375,
0.0836181640625,
-0.05157470703125,
-0.016082763671875,
-0.01445770263671875,
0.031402587890625,
-0.0016698837280273438,
0.0138092041015625,
-0.0283203125,
-0.046478271484375,
0.023895263671875,
0.035858154296875,
0.061859130859375,
0.00679779052734375,
0.046142578125,
0.0438232421875,
-0.00490570068359375,
0.01450347900390625,
0.061553955078125,
0.00998687744140625,
-0.0012273788452148438,
-0.036224365234375,
-0.0306243896484375,
-0.0277557373046875,
-0.03863525390625,
0.0161285400390625,
-0.0167999267578125,
0.0229034423828125,
-0.014801025390625,
0.0281829833984375,
-0.00409698486328125,
-0.00042724609375,
0.027557373046875,
-0.01157379150390625,
0.02740478515625,
-0.00957489013671875,
-0.089599609375,
0.0006241798400878906,
-0.07440185546875,
-0.0081787109375,
0.0311737060546875,
0.025238037109375,
-0.0178375244140625,
0.0301971435546875,
-0.01508331298828125,
-0.01488494873046875,
0.053924560546875,
-0.0225067138671875,
-0.007411956787109375,
0.0221099853515625,
0.00739288330078125,
-0.0212249755859375,
-0.07086181640625,
-0.04937744140625,
-0.03515625,
0.0452880859375,
0.0250244140625,
0.062255859375,
-0.0030231475830078125,
0.036834716796875,
0.002353668212890625,
-0.010498046875,
-0.0174713134765625,
-0.0011463165283203125,
-0.03662109375,
-0.012451171875,
-0.00901031494140625,
-0.0038909912109375,
0.01032257080078125,
0.006252288818359375,
0.059722900390625,
-0.04547119140625,
0.0027332305908203125,
-0.015777587890625,
-0.000545501708984375,
-0.048004150390625,
0.0178070068359375,
-0.019775390625,
-0.01291656494140625,
-0.054656982421875,
-0.025054931640625,
0.053131103515625,
0.026824951171875,
-0.0233154296875,
0.0254364013671875,
0.0236968994140625,
-0.04779052734375,
0.0273284912109375,
-0.037139892578125,
0.047454833984375,
0.038848876953125,
0.0066986083984375,
0.0193328857421875,
0.0302734375,
-0.0129241943359375,
0.018463134765625,
0.0270538330078125,
0.0067291259765625,
0.0182037353515625,
-0.004100799560546875,
0.042083740234375,
0.01226043701171875,
0.0299530029296875,
-0.039276123046875,
0.01108551025390625,
0.052459716796875,
0.01398468017578125,
-0.0308837890625,
-0.036895751953125,
-0.01119232177734375,
-0.06890869140625,
-0.0155792236328125,
0.0033721923828125,
-0.05426025390625,
-0.042388916015625,
-0.0243682861328125,
0.0017728805541992188,
0.0263519287109375,
-0.015350341796875,
-0.0283050537109375,
0.0121002197265625,
-0.046142578125,
0.03778076171875,
-0.02197265625,
-0.00945281982421875,
-0.0160369873046875,
0.01678466796875,
0.023193359375,
-0.00626373291015625,
-0.034515380859375,
0.030029296875,
0.00553131103515625,
0.0162506103515625,
0.0186309814453125,
-0.036773681640625,
0.021728515625,
0.0302276611328125,
0.0267181396484375,
0.064697265625,
0.038421630859375,
-0.0005693435668945312,
-0.005931854248046875,
0.0164794921875,
-0.036285400390625,
-0.056060791015625,
0.03216552734375,
-0.05767822265625,
-0.0259246826171875,
-0.0257415771484375,
-0.0011739730834960938,
0.00044274330139160156,
-0.02484130859375,
-0.005855560302734375,
0.06854248046875,
-0.0169830322265625,
-0.0086517333984375,
-0.061767578125,
-0.00012683868408203125,
0.006168365478515625,
0.0372314453125,
-0.00335693359375,
-0.023162841796875,
-0.051116943359375,
0.016387939453125,
0.005657196044921875,
-0.0086669921875,
0.0272369384765625,
-0.0250091552734375,
-0.0233154296875,
0.004657745361328125,
0.019744873046875,
-0.0179443359375,
0.007411956787109375,
-0.0128173828125,
0.036346435546875,
0.0305328369140625,
-0.03057861328125,
-0.018768310546875,
0.0280609130859375,
0.022705078125,
-0.0021114349365234375,
-0.0340576171875,
-0.05059814453125,
-0.0189971923828125,
0.09417724609375,
0.039276123046875,
0.033843994140625,
-0.050048828125,
0.0203704833984375,
-0.00995635986328125,
-0.056610107421875,
0.0142822265625,
0.03350830078125,
-0.050201416015625,
0.004528045654296875,
0.01439666748046875,
-0.0294036865234375,
0.0280609130859375,
-0.0096282958984375,
-0.048858642578125,
0.00511932373046875,
-0.024261474609375,
-0.00494384765625,
-0.041412353515625,
0.0250244140625,
0.05078125,
-0.033721923828125,
-0.01264190673828125,
0.008514404296875,
-0.023101806640625,
0.001331329345703125,
0.00951385498046875,
-0.0008721351623535156,
-0.002452850341796875,
-0.00946044921875,
0.028350830078125,
0.0168304443359375,
0.007541656494140625,
0.0038890838623046875,
-0.0079193115234375,
-0.00957489013671875,
0.0004818439483642578,
-0.002471923828125,
-0.00812530517578125,
0.037109375,
-0.03643798828125,
-0.01296234130859375,
0.033935546875,
-0.0115509033203125,
0.045379638671875,
-0.00847625732421875,
0.035736083984375,
-0.0228118896484375,
-0.0028018951416015625,
0.0142059326171875,
-0.039031982421875,
-0.01486968994140625,
0.001949310302734375,
-0.034759521484375,
-0.07598876953125,
0.047088623046875,
0.01134490966796875,
0.01611328125,
0.033233642578125
] |
5459341ec7b66ab90a728ff663a0e186e2473917 | Wordpress Stackexchange
Q: Set cookie using GET variable I need to set a cookie based on a GET variable so my customers can get a coupon code on our site even if they move around after selecting the coupon link.
I am using the code here: Gravity Help to populate the coupon field based on the cookie. Just the second half of the code.
I need to set the coupon code in a cookie. There is a piece here: Setting a Cookie using a variable from the URL But I think that will also set an empty cookie if there is no variable which I think would over write the code if they user browses around the site. What would be the best way to make sure that function only runs if the variable is set?
A: Just check if the variable is set, using the code from your link:
add_action( 'init', 'set_agent_cookie' );
function set_agent_cookie() {
if (isset($_GET['code'])) {
$name = 'agent';
$id = $_GET['code'];
setcookie( $name, $id, time() + 3600, "/", COOKIE_DOMAIN );
}
}
| Q: Set cookie using GET variable I need to set a cookie based on a GET variable so my customers can get a coupon code on our site even if they move around after selecting the coupon link.
I am using the code here: Gravity Help to populate the coupon field based on the cookie. Just the second half of the code.
I need to set the coupon code in a cookie. There is a piece here: Setting a Cookie using a variable from the URL But I think that will also set an empty cookie if there is no variable which I think would over write the code if they user browses around the site. What would be the best way to make sure that function only runs if the variable is set?
A: Just check if the variable is set, using the code from your link:
add_action( 'init', 'set_agent_cookie' );
function set_agent_cookie() {
if (isset($_GET['code'])) {
$name = 'agent';
$id = $_GET['code'];
setcookie( $name, $id, time() + 3600, "/", COOKIE_DOMAIN );
}
}
A: Yes you just need to wrap in an isset check before setting the cookie:
$name = 'cookiename';
$expires = time() + 3600;
if (isset($_GET['code'])) {
$value = $_GET['code'];
setcookie($name, $value, $expires, '/', COOKIE_DOMAIN);
}
| wordpress | {
"language": "en",
"length": 210,
"provenance": "stackexchange_00019.jsonl.gz:473301",
"question_score": "5",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/257046"
} | [
0.0330810546875,
0.010040283203125,
0.00498199462890625,
0.0251922607421875,
-0.0014476776123046875,
-0.0182647705078125,
0.040985107421875,
-0.047760009765625,
-0.0192718505859375,
-0.0204925537109375,
-0.0482177734375,
0.002803802490234375,
-0.027984619140625,
-0.0262603759765625,
0.039520263671875,
-0.048828125,
0.031463623046875,
-0.04833984375,
-0.01071929931640625,
-0.0288848876953125,
0.0268707275390625,
-0.0160980224609375,
0.0180816650390625,
0.028656005859375,
0.052398681640625,
-0.080810546875,
0.04241943359375,
0.0163421630859375,
0.020416259765625,
-0.004261016845703125,
0.022796630859375,
0.0027618408203125,
0.00516510009765625,
0.0054168701171875,
0.0037441253662109375,
0.035400390625,
0.012725830078125,
-0.00882720947265625,
0.00891876220703125,
0.0301055908203125,
0.05181884765625,
-0.030426025390625,
0.007251739501953125,
0.018402099609375,
-0.007030487060546875,
-0.0148162841796875,
0.0211639404296875,
-0.042388916015625,
0.01032257080078125,
0.042388916015625,
0.0079498291015625,
0.062286376953125,
-0.00022745132446289062,
0.05950927734375,
-0.00180816650390625,
0.01268768310546875,
0.022186279296875,
-0.017791748046875,
0.022857666015625,
-0.0411376953125,
-0.038970947265625,
0.00846099853515625,
0.0233917236328125,
0.0084686279296875,
0.0279541015625,
-0.01218414306640625,
-0.033447265625,
0.018218994140625,
-0.06085205078125,
0.032958984375,
0.06512451171875,
-0.057037353515625,
-0.01079559326171875,
0.00833892822265625,
-0.042205810546875,
-0.0117645263671875,
0.03326416015625,
-0.01422119140625,
-0.01007843017578125,
0.01090240478515625,
-0.006130218505859375,
-0.006671905517578125,
-0.0287933349609375,
0.006870269775390625,
0.00420379638671875,
0.0307159423828125,
-0.0121612548828125,
-0.019012451171875,
-0.00452423095703125,
-0.04095458984375,
-0.0191192626953125,
0.00774383544921875,
0.00032520294189453125,
-0.0248565673828125,
-0.0474853515625,
-0.02618408203125,
0.004207611083984375,
0.043060302734375,
0.00641632080078125,
0.0208892822265625,
-0.031768798828125,
-0.0091552734375,
0.0159454345703125,
-0.03790283203125,
-0.0229034423828125,
0.0213470458984375,
0.027008056640625,
0.0599365234375,
0.0108795166015625,
0.0037364959716796875,
-0.0124969482421875,
-0.01155853271484375,
-0.0178070068359375,
0.0006670951843261719,
-0.041473388671875,
-0.033172607421875,
-0.06561279296875,
0.0179595947265625,
0.004573822021484375,
-0.01338958740234375,
-0.03668212890625,
-0.0109405517578125,
-0.01512908935546875,
0.01194000244140625,
0.0112762451171875,
0.007354736328125,
0.00997161865234375,
-0.004383087158203125,
-0.034088134765625,
0.038482666015625,
-0.0491943359375,
-0.00417327880859375,
0.05194091796875,
0.0306549072265625,
0.0199127197265625,
-0.026763916015625,
-0.01081085205078125,
-0.0038700103759765625,
0.0199432373046875,
-0.01226043701171875,
-0.01416015625,
-0.012664794921875,
0.0357666015625,
0.00946044921875,
-0.0100860595703125,
0.033782958984375,
0.0152587890625,
0.006191253662109375,
-0.022613525390625,
-0.045166015625,
0.0012407302856445312,
-0.01568603515625,
0.01434326171875,
-0.003139495849609375,
0.0025177001953125,
-0.01175689697265625,
-0.001552581787109375,
-0.01262664794921875,
0.005580902099609375,
0.00540924072265625,
-0.04046630859375,
-0.017822265625,
0.0322265625,
-0.0308837890625,
-0.01885986328125,
0.019195556640625,
-0.01910400390625,
0.004924774169921875,
0.01102447509765625,
0.0156402587890625,
0.00016188621520996094,
0.004650115966796875,
0.007476806640625,
0.016357421875,
-0.0044403076171875,
0.0018301010131835938,
-0.0171051025390625,
0.005218505859375,
0.051513671875,
-0.070556640625,
-0.0374755859375,
-0.040252685546875,
0.0501708984375,
-0.021636962890625,
-0.03228759765625,
0.051727294921875,
-0.0187835693359375,
0.0260467529296875,
-0.008056640625,
-0.0066680908203125,
-0.0270843505859375,
0.0628662109375,
-0.04541015625,
0.033905029296875,
0.02728271484375,
-0.00966644287109375,
-0.035186767578125,
-0.017181396484375,
0.0004119873046875,
-0.025146484375,
-0.023468017578125,
0.007717132568359375,
0.01239776611328125,
0.004909515380859375,
0.047760009765625,
-0.006984710693359375,
0.012420654296875,
0.00965118408203125,
0.0247955322265625,
0.01751708984375,
-0.0008215904235839844,
0.0133056640625,
-0.0244903564453125,
0.0036144256591796875,
-0.0242156982421875,
0.0226898193359375,
0.002979278564453125,
0.09619140625,
0.002559661865234375,
0.035552978515625,
0.0261688232421875,
-0.05352783203125,
0.057647705078125,
0.0291748046875,
0.01006317138671875,
-0.004673004150390625,
-0.0202789306640625,
-0.00901031494140625,
-0.01157379150390625,
0.006732940673828125,
-0.0280303955078125,
0.040679931640625,
0.003406524658203125,
0.004364013671875,
-0.038604736328125,
-0.015716552734375,
-0.044403076171875,
-0.045623779296875,
0.002704620361328125,
0.05694580078125,
0.033966064453125,
0.0156097412109375,
-0.01030731201171875,
-0.01253509521484375,
0.0172271728515625,
-0.05511474609375,
0.00835418701171875,
-0.0254364013671875,
0.01088714599609375,
0.0692138671875,
-0.0011491775512695312,
-0.005329132080078125,
-0.0216522216796875,
-0.052154541015625,
-0.0272674560546875,
0.01739501953125,
-0.005619049072265625,
-0.0026493072509765625,
0.034698486328125,
0.0212249755859375,
-0.0113067626953125,
0.046600341796875,
0.025360107421875,
-0.007843017578125,
-0.0255126953125,
-0.0009851455688476562,
-0.011474609375,
-0.00725555419921875,
-0.028717041015625,
-0.0001246929168701172,
0.023834228515625,
0.0006036758422851562,
-0.020599365234375,
0.0137481689453125,
0.01282501220703125,
-0.019439697265625,
-0.03411865234375,
0.01427459716796875,
-0.01024627685546875,
-0.003009796142578125,
-0.011444091796875,
0.029022216796875,
-0.031280517578125,
-0.033721923828125,
0.00864410400390625,
0.048828125,
-0.022125244140625,
-0.0489501953125,
0.0110015869140625,
-0.004673004150390625,
0.052276611328125,
-0.0301513671875,
-0.0477294921875,
0.01267242431640625,
-0.0322265625,
-0.037872314453125,
0.048431396484375,
-0.005626678466796875,
0.0032901763916015625,
-0.00843048095703125,
0.0511474609375,
0.050384521484375,
0.00812530517578125,
-0.021392822265625,
-0.01497650146484375,
-0.02008056640625,
-0.024566650390625,
0.0249481201171875,
0.003131866455078125,
-0.0469970703125,
-0.00528717041015625,
0.0257720947265625,
0.0300445556640625,
0.0302886962890625,
0.005855560302734375,
-0.021209716796875,
-0.0152740478515625,
0.01861572265625,
-0.09820556640625,
-0.10565185546875,
0.0299072265625,
-0.0305023193359375,
0.0129241943359375,
-0.0135040283203125,
-0.002471923828125,
-0.024688720703125,
0.0023403167724609375,
-0.0013246536254882812,
0.024749755859375,
-0.00004458427429199219,
-0.0027256011962890625,
0.0302276611328125,
-0.016387939453125,
0.017425537109375,
-0.0013141632080078125,
-0.0141754150390625,
-0.0220184326171875,
0.05230712890625,
-0.0306854248046875,
-0.046417236328125,
-0.0374755859375,
0.0022869110107421875,
0.004611968994140625,
-0.0153961181640625,
-0.0229034423828125,
-0.016357421875,
0.037750244140625,
-0.0217742919921875,
-0.046112060546875,
0.0227203369140625,
0.0131072998046875,
-0.01483154296875,
-0.012481689453125,
0.00316619873046875,
0.0069122314453125,
0.003345489501953125,
0.011199951171875,
0.0193634033203125,
0.007389068603515625,
-0.03466796875,
0.01142120361328125,
-0.011138916015625,
-0.02020263671875,
-0.00922393798828125,
0.01580810546875,
-0.01123809814453125,
-0.0086212158203125,
-0.01082611083984375,
0.01751708984375,
-0.007770538330078125,
0.0011043548583984375,
-0.0230560302734375,
0.0301361083984375,
0.00984954833984375,
0.022216796875,
-0.0179290771484375,
0.0604248046875,
0.003978729248046875,
-0.01302337646484375,
0.0190887451171875,
0.0209808349609375,
-0.0114288330078125,
-0.0023136138916015625,
-0.057891845703125,
-0.041046142578125,
0.0654296875,
0.0021190643310546875,
0.011962890625,
-0.05889892578125,
-0.0450439453125,
-0.047149658203125,
0.06787109375,
0.027801513671875,
-0.0170745849609375,
0.0121307373046875,
0.0099639892578125,
-0.040985107421875,
-0.0277557373046875,
-0.0155487060546875,
-0.01222991943359375,
-0.06158447265625,
0.043731689453125,
0.015045166015625,
0.0057373046875,
-0.037841796875,
0.004913330078125,
-0.042572021484375,
-0.031005859375,
0.0258026123046875,
-0.01215362548828125,
-0.0115203857421875,
0.02178955078125,
-0.007076263427734375,
-0.01424407958984375,
-0.025604248046875,
-0.01129150390625,
0.01678466796875,
-0.014892578125,
0.038787841796875,
0.005748748779296875,
0.0164337158203125,
-0.07470703125,
0.015167236328125,
0.0305938720703125,
0.0014791488647460938,
-0.0206451416015625,
0.03704833984375,
0.0233001708984375,
-0.0005064010620117188,
-0.004688262939453125,
-0.004756927490234375,
-0.041259765625,
-0.0064849853515625,
-0.008453369140625,
0.004093170166015625,
0.08404541015625,
-0.0191192626953125,
0.0257110595703125,
-0.0118255615234375,
-0.015869140625,
-0.0755615234375,
-0.045074462890625,
0.01375579833984375,
0.01294708251953125,
0.00691986083984375,
-0.0028057098388671875,
-0.04156494140625,
-0.0643310546875,
0.0216522216796875,
-0.0160369873046875,
-0.02813720703125,
-0.0100250244140625,
0.08013916015625,
0.0355224609375,
-0.005016326904296875,
0.058685302734375,
-0.002552032470703125,
0.01151275634765625,
-0.034881591796875,
0.035888671875,
-0.0185546875,
-0.033538818359375,
0.084716796875,
-0.035003662109375,
0.01494598388671875,
-0.018646240234375,
0.036224365234375,
-0.01904296875,
-0.0178375244140625,
0.01206207275390625,
-0.01183319091796875,
0.005405426025390625,
0.036346435546875,
-0.01000213623046875,
-0.0033664703369140625,
0.0078277587890625,
0.0267791748046875,
-0.036407470703125,
0.01727294921875,
-0.0019092559814453125,
-0.0164642333984375,
0.00852203369140625,
0.01556396484375,
0.010040283203125,
0.004718780517578125,
0.019378662109375,
-0.01727294921875,
0.018402099609375,
0.032867431640625,
-0.01021575927734375,
0.02886962890625,
-0.01165771484375,
0.06103515625,
-0.0111236572265625,
0.03448486328125,
-0.037017822265625,
-0.010772705078125,
0.056488037109375,
0.0175628662109375,
-0.052581787109375,
0.0308380126953125,
-0.0028400421142578125,
-0.00913238525390625,
0.00952911376953125,
0.00009000301361083984,
0.05810546875,
0.011810302734375,
0.0010862350463867188,
-0.00040912628173828125,
-0.0390625,
0.01165771484375,
-0.049163818359375,
0.041290283203125,
0.0174102783203125,
0.003143310546875,
-0.020965576171875,
0.09674072265625,
0.038909912109375,
0.0252838134765625,
-0.0276336669921875,
0.057647705078125,
0.050537109375,
0.021087646484375,
0.022369384765625,
0.003265380859375,
-0.0182037353515625,
-0.0051116943359375,
-0.03302001953125,
0.0010519027709960938,
-0.0236358642578125,
-0.0083770751953125,
0.0114288330078125,
-0.0233154296875,
0.0193939208984375,
0.0306243896484375,
-0.0027904510498046875,
0.003917694091796875,
-0.002044677734375,
0.00855255126953125,
0.0021381378173828125,
-0.01247406005859375,
-0.005634307861328125,
0.018310546875,
0.011505126953125,
-0.00368499755859375,
0.002933502197265625,
-0.037109375,
0.02618408203125,
0.050201416015625,
0.0199737548828125,
-0.01995849609375,
-0.03302001953125,
0.030853271484375,
-0.003871917724609375,
-0.0157928466796875,
-0.03179931640625,
-0.02044677734375,
-0.0323486328125,
-0.0038051605224609375,
0.07440185546875,
-0.045135498046875,
0.021575927734375,
-0.0178375244140625,
0.0004520416259765625,
0.0261688232421875,
0.010650634765625,
0.046875,
0.025726318359375,
-0.0154876708984375,
-0.00034689903259277344,
-0.09521484375,
-0.0242462158203125,
-0.03643798828125,
-0.01519012451171875,
-0.03125,
0.01885986328125,
0.0017452239990234375,
0.042572021484375,
0.0166778564453125,
0.022125244140625,
0.04132080078125,
-0.009918212890625,
-0.040496826171875,
0.054901123046875,
-0.0027980804443359375,
0.0231170654296875,
0.021240234375,
-0.01523590087890625,
0.011962890625,
0.0005431175231933594,
-0.007526397705078125,
-0.00246429443359375,
-0.0015344619750976562,
0.01290130615234375,
-0.0233917236328125,
-0.0377197265625,
0.00716400146484375,
0.035552978515625,
0.123046875,
-0.0089874267578125,
0.01544189453125,
-0.0033321380615234375,
0.005168914794921875,
-0.026214599609375,
0.025634765625,
0.0165252685546875,
0.040924072265625,
-0.005115509033203125,
-0.0168304443359375,
-0.00738525390625,
0.02099609375,
0.01280975341796875,
-0.01369476318359375,
-0.00875091552734375,
0.00205230712890625,
-0.0309600830078125,
-0.0149993896484375,
-0.0009207725524902344,
0.08416748046875,
0.01479339599609375,
0.07489013671875,
0.01073455810546875,
0.042572021484375,
0.0728759765625,
-0.005397796630859375,
0.028839111328125,
-0.036346435546875,
0.0325927734375,
-0.0198211669921875,
-0.01042938232421875,
0.0186004638671875,
-0.0316162109375,
0.01483154296875,
0.10687255859375,
0.10491943359375,
-0.1290283203125,
-0.00048065185546875,
0.07373046875,
-0.0102691650390625,
-0.04449462890625,
0.029296875,
-0.016448974609375,
-0.018768310546875,
-0.0038433074951171875,
-0.05596923828125,
-0.0205841064453125,
0.0016613006591796875,
0.012359619140625,
-0.0118255615234375,
0.01226043701171875,
0.01203155517578125,
0.0140380859375,
-0.017822265625,
0.01358795166015625,
0.0411376953125,
0.01519012451171875,
-0.01812744140625,
-0.0053253173828125,
0.05865478515625,
-0.0645751953125,
-0.07708740234375,
0.023193359375,
0.01277923583984375,
-0.03741455078125,
-0.0159759521484375,
0.0054779052734375,
0.026824951171875,
0.014617919921875,
0.018890380859375,
-0.059051513671875,
0.01261138916015625,
-0.010345458984375,
0.01053619384765625,
-0.0228729248046875,
0.0236053466796875,
-0.0055084228515625,
-0.005496978759765625,
0.01287078857421875,
0.0092010498046875,
-0.06451416015625,
-0.01265716552734375,
0.01485443115234375,
0.019378662109375,
-0.007244110107421875,
-0.025970458984375,
0.048492431640625,
0.02435302734375,
-0.0261077880859375,
-0.0105743408203125,
0.033660888671875,
-0.039154052734375,
-0.0190582275390625,
0.024658203125,
-0.0277099609375,
-0.04058837890625,
-0.0019683837890625,
-0.05450439453125,
0.052490234375,
-0.0275726318359375,
0.0226898193359375,
0.0004146099090576172,
0.0223236083984375,
0.009124755859375,
-0.0015277862548828125,
-0.04217529296875,
0.0521240234375,
-0.04022216796875,
0.06707763671875,
-0.08984375,
-0.01416015625,
0.003215789794921875,
0.037811279296875,
0.0556640625,
0.014190673828125,
-0.04876708984375,
-0.0225982666015625,
-0.004955291748046875,
-0.0013027191162109375,
-0.023834228515625,
0.062255859375,
-0.0165863037109375,
0.052703857421875,
0.08245849609375,
-0.05938720703125,
0.0279388427734375,
0.007503509521484375,
-0.023773193359375,
-0.01116943359375,
-0.005123138427734375,
-0.032958984375,
0.004787445068359375,
0.02215576171875,
-0.07977294921875,
0.0166778564453125,
0.04229736328125,
-0.0032291412353515625,
-0.021514892578125,
0.049468994140625,
0.0097808837890625,
0.0301361083984375,
-0.034393310546875,
-0.00646209716796875,
0.0291748046875,
0.012298583984375,
-0.00605010986328125,
0.031494140625,
0.0050048828125,
-0.0096893310546875,
0.050262451171875,
0.002471923828125,
0.0289306640625,
0.03643798828125,
0.0198516845703125,
0.062347412109375,
0.03271484375,
0.0218963623046875,
0.0367431640625,
0.045257568359375,
0.036895751953125,
-0.047454833984375,
0.00533294677734375,
-0.01007080078125,
-0.018524169921875,
0.0433349609375,
-0.03704833984375,
0.06256103515625,
0.01177215576171875,
-0.040740966796875,
-0.01120758056640625,
0.036224365234375,
0.054443359375,
0.05206298828125,
0.0283355712890625,
0.06640625,
-0.1451416015625,
-0.0035686492919921875,
-0.024749755859375,
-0.01035308837890625,
0.01020050048828125,
0.060272216796875,
0.0234527587890625,
0.0050048828125,
-0.04852294921875,
-0.01593017578125,
0.0228271484375,
0.034393310546875,
0.052032470703125,
-0.0294189453125,
0.00014019012451171875,
-0.0266571044921875,
0.034515380859375,
0.014556884765625,
0.0386962890625,
0.007785797119140625,
0.04071044921875,
0.004314422607421875,
-0.0172119140625,
0.00418853759765625,
0.03240966796875,
-0.0291748046875,
0.04632568359375,
-0.0045928955078125,
0.00400543212890625,
-0.004825592041015625,
-0.042236328125,
-0.03851318359375,
0.0077056884765625,
0.0240631103515625,
-0.01143646240234375,
0.0013189315795898438,
0.0086822509765625,
-0.0262603759765625,
0.0294036865234375,
0.002849578857421875,
0.04864501953125,
0.019287109375,
0.0252685546875,
0.036529541015625,
-0.023193359375,
-0.07196044921875,
-0.0211944580078125,
0.0206451416015625,
-0.0284881591796875,
0.03472900390625,
0.006198883056640625,
0.01068878173828125,
-0.0018815994262695312,
0.01331329345703125,
-0.0208892822265625,
-0.02740478515625,
0.049560546875,
-0.017547607421875,
0.0018768310546875,
-0.0134429931640625,
0.04083251953125,
0.0150604248046875,
0.0126953125,
-0.0299224853515625,
0.035430908203125,
-0.0028820037841796875,
0.006092071533203125,
-0.0161590576171875,
0.039306640625,
-0.004009246826171875,
0.00408935546875,
0.020477294921875,
-0.0016613006591796875,
-0.0274810791015625,
0.004657745361328125,
0.080078125,
-0.021484375,
0.0003972053527832031,
0.04193115234375,
-0.017852783203125,
0.0001252889633178711,
0.03204345703125,
0.0274810791015625,
-0.0186767578125,
-0.06988525390625,
-0.04254150390625,
0.00472259521484375,
0.0018863677978515625,
0.048858642578125,
0.003551483154296875,
0.0262908935546875,
-0.0158538818359375,
0.006809234619140625,
0.0003345012664794922,
-0.01548004150390625,
-0.0171356201171875,
0.027008056640625,
-0.01071929931640625,
0.0450439453125,
-0.049957275390625,
-0.03094482421875,
-0.00482940673828125,
-0.0156707763671875,
-0.05859375,
-0.01528167724609375,
0.012115478515625,
0.043975830078125,
0.032562255859375,
0.03033447265625,
-0.03729248046875,
-0.0076446533203125,
0.06683349609375,
-0.01171112060546875,
-0.0259552001953125,
-0.0215301513671875,
-0.0161895751953125,
-0.016082763671875,
-0.0009512901306152344,
0.01422882080078125,
0.002899169921875,
-0.023956298828125,
-0.0212554931640625,
0.03070068359375,
0.0341796875,
-0.0029697418212890625,
-0.034759521484375,
-0.006946563720703125,
-0.042877197265625,
0.07757568359375,
-0.00705718994140625,
-0.0085601806640625,
0.0010080337524414062,
0.0189971923828125,
-0.048370361328125,
0.004726409912109375,
-0.05255126953125,
-0.0380859375,
-0.03826904296875,
0.004909515380859375,
0.03662109375,
0.01947021484375,
-0.051727294921875,
-0.0130615234375,
-0.0203857421875,
0.0240631103515625,
-0.058990478515625,
-0.020843505859375,
0.018646240234375,
0.0020847320556640625,
-0.038116455078125,
-0.045440673828125,
0.022705078125,
-0.0447998046875,
0.02154541015625,
0.001194000244140625,
-0.01473236083984375,
0.00872039794921875,
-0.040496826171875,
-0.072021484375,
0.05181884765625,
-0.001453399658203125,
-0.035797119140625,
-0.021697998046875,
-0.0286712646484375,
0.0009627342224121094,
0.011260986328125,
-0.0011987686157226562,
-0.0208740234375,
-0.037109375,
0.010894775390625,
0.01317596435546875,
0.022369384765625,
0.019439697265625,
0.039520263671875,
-0.0433349609375,
0.0174407958984375,
-0.01068878173828125,
-0.0196990966796875,
-0.00000852346420288086,
0.015167236328125,
0.01114654541015625,
0.035064697265625,
-0.02069091796875,
0.01206207275390625,
0.0072021484375,
-0.021087646484375,
-0.0100250244140625,
-0.006969451904296875,
0.0179595947265625,
-0.006473541259765625,
0.0289306640625,
-0.0200042724609375,
0.00185394287109375,
-0.0082550048828125,
-0.045379638671875,
0.002197265625,
-0.00968170166015625,
-0.0256805419921875,
0.01099395751953125,
-0.05615234375,
-0.0028438568115234375,
-0.04864501953125,
0.002532958984375,
-0.0008950233459472656,
0.006282806396484375,
-0.032196044921875,
-0.0241241455078125,
-0.0193023681640625,
-0.0026798248291015625,
-0.06561279296875,
-0.005046844482421875,
0.044677734375,
-0.0269927978515625,
-0.01445770263671875,
-0.0160369873046875,
0.01995849609375,
0.00811004638671875,
-0.004871368408203125,
0.0355224609375,
0.0616455078125,
-0.0870361328125,
-0.0269775390625,
0.0187835693359375,
0.01349639892578125,
-0.0132293701171875,
-0.0282745361328125,
-0.0369873046875,
0.0176239013671875,
0.02178955078125,
0.025054931640625,
0.0139007568359375,
-0.01244354248046875,
0.0343017578125,
-0.043426513671875,
-0.0143890380859375,
-0.048858642578125,
-0.0118560791015625,
0.056976318359375,
0.02606201171875,
-0.0178070068359375,
0.054718017578125,
-0.04400634765625,
0.006237030029296875,
-0.0195770263671875,
0.027130126953125,
-0.05224609375,
0.03857421875,
-0.049957275390625,
0.024017333984375,
0.0364990234375
] |
990dbb07d36b89daa343698ace116c60ac84b352 | Wordpress Stackexchange
Q: WordPress Import shows an error when uploading previously exported xml file First time I faced this problem & trying to find out solution but it seems to me that it happens very few and that is why no more solution has been found like this & that is why I am here.
WordPress Import Message:
File is empty. Please upload something more
substantial. This error could also be caused by uploads being disabled
in your php.ini or by post_max_size being defined as smaller than
upload_max_filesize in php.ini.
I am getting above message when trying to import a previously imported file like the bellow image. Could you please tell me how to solve this?
I already tried to find the solution by googling but could not yet?
A: You need to increase the upload limit in your php.ini.
To increase the maximum upload file size, open your php.ini file in the "xampp/php/php.ini" directory. search for upload_max_filesize and increase the value like :
upload_max_filesize = 128M
| Q: WordPress Import shows an error when uploading previously exported xml file First time I faced this problem & trying to find out solution but it seems to me that it happens very few and that is why no more solution has been found like this & that is why I am here.
WordPress Import Message:
File is empty. Please upload something more
substantial. This error could also be caused by uploads being disabled
in your php.ini or by post_max_size being defined as smaller than
upload_max_filesize in php.ini.
I am getting above message when trying to import a previously imported file like the bellow image. Could you please tell me how to solve this?
I already tried to find the solution by googling but could not yet?
A: You need to increase the upload limit in your php.ini.
To increase the maximum upload file size, open your php.ini file in the "xampp/php/php.ini" directory. search for upload_max_filesize and increase the value like :
upload_max_filesize = 128M
A: In order to fix this problem, you need to navigate into your cpanel and change the PHP functions to increase the size.
Source: https://www.youtube.com/watch?v=lGJrlvV_vQ4
| wordpress | {
"language": "en",
"length": 190,
"provenance": "stackexchange_00019.jsonl.gz:473303",
"question_score": "4",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/257055"
} | [
0.0253753662109375,
-0.015960693359375,
0.034027099609375,
0.0310516357421875,
-0.015716552734375,
-0.0204315185546875,
0.061492919921875,
-0.06591796875,
0.01026153564453125,
-0.01052093505859375,
-0.0677490234375,
0.009185791015625,
-0.058349609375,
-0.018890380859375,
0.00768280029296875,
-0.07373046875,
0.010162353515625,
-0.0189971923828125,
0.003612518310546875,
-0.0110626220703125,
0.0145416259765625,
0.0150146484375,
0.010650634765625,
-0.0303192138671875,
-0.0233306884765625,
0.0118560791015625,
0.045745849609375,
-0.02392578125,
-0.032073974609375,
-0.034027099609375,
-0.0110015869140625,
0.038543701171875,
0.0031642913818359375,
0.04901123046875,
-0.0711669921875,
-0.027435302734375,
-0.0007104873657226562,
0.01479339599609375,
-0.0214996337890625,
0.03851318359375,
0.0103302001953125,
-0.006866455078125,
0.060394287109375,
-0.0233612060546875,
0.00867462158203125,
-0.0082244873046875,
0.0185699462890625,
-0.036529541015625,
0.004611968994140625,
0.0166778564453125,
0.0129241943359375,
-0.00885772705078125,
0.0224609375,
-0.0003001689910888672,
-0.014190673828125,
-0.020050048828125,
-0.054534912109375,
0.0789794921875,
0.0195159912109375,
0.041351318359375,
-0.014434814453125,
0.020904541015625,
-0.02545166015625,
-0.050445556640625,
-0.0178680419921875,
-0.00263214111328125,
-0.008544921875,
0.0081939697265625,
-0.018402099609375,
-0.0190277099609375,
0.0115966796875,
0.004291534423828125,
-0.0125885009765625,
0.01514434814453125,
-0.00806427001953125,
-0.023162841796875,
0.0577392578125,
-0.0164642333984375,
0.0023784637451171875,
0.03411865234375,
-0.01317596435546875,
-0.027587890625,
-0.03594970703125,
-0.03204345703125,
0.0244293212890625,
0.007320404052734375,
-0.005054473876953125,
0.0093231201171875,
0.0073089599609375,
0.007472991943359375,
-0.01458740234375,
-0.004772186279296875,
0.0163726806640625,
0.0246124267578125,
-0.0159454345703125,
-0.004985809326171875,
-0.006938934326171875,
-0.00319671630859375,
-0.004261016845703125,
0.0178070068359375,
-0.01059722900390625,
-0.032379150390625,
0.042236328125,
-0.033203125,
0.023406982421875,
0.033233642578125,
-0.0091705322265625,
-0.05267333984375,
0.025299072265625,
0.00804901123046875,
0.00522613525390625,
0.0400390625,
0.003177642822265625,
-0.0276031494140625,
-0.02398681640625,
0.0290374755859375,
0.00917816162109375,
0.0114593505859375,
0.01062774658203125,
0.0186004638671875,
-0.011444091796875,
0.0302886962890625,
-0.11077880859375,
-0.0221710205078125,
0.0298309326171875,
-0.027130126953125,
0.006061553955078125,
0.0726318359375,
0.009307861328125,
0.05328369140625,
-0.0158233642578125,
-0.01053619384765625,
0.021820068359375,
0.01039886474609375,
-0.0194091796875,
-0.033538818359375,
0.017425537109375,
0.006198883056640625,
-0.0127716064453125,
0.009185791015625,
0.004825592041015625,
-0.042938232421875,
-0.024871826171875,
0.004184722900390625,
-0.0034542083740234375,
0.0301055908203125,
0.01190948486328125,
0.01284027099609375,
-0.0022792816162109375,
-0.05743408203125,
0.0165252685546875,
-0.0174560546875,
0.0291900634765625,
0.0163116455078125,
-0.01436614990234375,
-0.048828125,
0.03173828125,
-0.046173095703125,
0.00623321533203125,
-0.06402587890625,
0.0010004043579101562,
-0.01025390625,
0.0164794921875,
-0.024871826171875,
-0.037109375,
0.010284423828125,
-0.0435791015625,
-0.00568389892578125,
0.0162353515625,
0.01319122314453125,
-0.0203857421875,
0.029998779296875,
0.0108184814453125,
-0.012451171875,
-0.01074981689453125,
-0.0159912109375,
0.0196990966796875,
-0.039093017578125,
0.006656646728515625,
0.02398681640625,
-0.018585205078125,
-0.022186279296875,
0.01232147216796875,
-0.005828857421875,
-0.0302276611328125,
-0.01056671142578125,
0.0276336669921875,
0.02398681640625,
0.00473785400390625,
0.0174560546875,
0.05157470703125,
0.017669677734375,
-0.00260162353515625,
-0.0189056396484375,
-0.0244598388671875,
-0.027740478515625,
-0.01357269287109375,
-0.0113677978515625,
-0.0250091552734375,
0.047821044921875,
-0.006069183349609375,
0.003101348876953125,
0.001056671142578125,
-0.003520965576171875,
-0.034210205078125,
0.0072479248046875,
-0.0186767578125,
0.021514892578125,
-0.0181121826171875,
0.0276641845703125,
0.027496337890625,
0.0220184326171875,
-0.051300048828125,
-0.004268646240234375,
0.00022745132446289062,
-0.0038433074951171875,
-0.0269622802734375,
0.031494140625,
0.0003762245178222656,
0.0599365234375,
-0.02545166015625,
-0.0189666748046875,
-0.02294921875,
-0.03741455078125,
-0.01123809814453125,
0.036407470703125,
-0.046478271484375,
0.0310821533203125,
-0.002765655517578125,
0.01271820068359375,
0.050567626953125,
0.009002685546875,
0.02911376953125,
0.046356201171875,
-0.0183868408203125,
-0.0113983154296875,
-0.035675048828125,
-0.06695556640625,
0.01019287109375,
0.04974365234375,
0.0231781005859375,
0.0174102783203125,
0.0220489501953125,
0.0867919921875,
0.0474853515625,
0.00844573974609375,
0.034210205078125,
0.02490234375,
-0.02301025390625,
-0.0210723876953125,
-0.01885986328125,
-0.009490966796875,
0.045623779296875,
-0.0169677734375,
-0.0116729736328125,
0.043365478515625,
-0.0144805908203125,
-0.046234130859375,
-0.0460205078125,
0.038116455078125,
0.01245880126953125,
-0.028533935546875,
-0.035308837890625,
-0.004467010498046875,
-0.006927490234375,
0.03240966796875,
0.0401611328125,
0.042938232421875,
-0.00351715087890625,
-0.0007801055908203125,
0.00325775146484375,
-0.018157958984375,
0.01528167724609375,
0.001827239990234375,
-0.0010509490966796875,
0.07708740234375,
-0.034088134765625,
-0.0129241943359375,
0.028472900390625,
0.01873779296875,
-0.030303955078125,
-0.0406494140625,
-0.0281982421875,
-0.001552581787109375,
0.005115509033203125,
-0.0594482421875,
0.03265380859375,
0.01526641845703125,
-0.01458740234375,
-0.021209716796875,
-0.00858306884765625,
0.0650634765625,
0.00048279762268066406,
0.043975830078125,
0.035797119140625,
0.007282257080078125,
0.038330078125,
-0.058074951171875,
0.044342041015625,
-0.025634765625,
0.056365966796875,
0.06097412109375,
-0.0189056396484375,
0.0210723876953125,
-0.007419586181640625,
0.018585205078125,
0.0003452301025390625,
0.02838134765625,
-0.0121612548828125,
-0.0240631103515625,
-0.06292724609375,
-0.0506591796875,
0.018218994140625,
0.0159454345703125,
-0.0174102783203125,
-0.038055419921875,
-0.0394287109375,
-0.00978851318359375,
-0.056640625,
-0.02880859375,
-0.04132080078125,
-0.06854248046875,
0.0085601806640625,
-0.0105133056640625,
-0.02301025390625,
0.00467681884765625,
0.00936126708984375,
0.0194549560546875,
0.041412353515625,
-0.060760498046875,
-0.050689697265625,
-0.07379150390625,
-0.0672607421875,
-0.05999755859375,
0.0058135986328125,
-0.0226898193359375,
-0.0005006790161132812,
0.055908203125,
0.006526947021484375,
-0.046051025390625,
-0.02020263671875,
0.0153656005859375,
-0.0185394287109375,
-0.0159912109375,
0.004058837890625,
-0.00771331787109375,
0.0237579345703125,
0.0035686492919921875,
0.055999755859375,
0.040374755859375,
-0.04815673828125,
-0.0181884765625,
-0.00954437255859375,
-0.046478271484375,
-0.04541015625,
0.0460205078125,
0.03466796875,
-0.06658935546875,
-0.0253448486328125,
-0.08453369140625,
-0.020965576171875,
0.0142364501953125,
-0.0330810546875,
-0.019805908203125,
0.00496673583984375,
-0.024139404296875,
-0.0022449493408203125,
-0.005535125732421875,
-0.038665771484375,
-0.00438690185546875,
0.003265380859375,
-0.035064697265625,
0.0294189453125,
-0.0184326171875,
-0.041351318359375,
0.005489349365234375,
0.07440185546875,
0.00873565673828125,
0.02313232421875,
0.0469970703125,
0.01348876953125,
-0.0051727294921875,
-0.03717041015625,
-0.07440185546875,
-0.0386962890625,
0.02642822265625,
-0.030731201171875,
0.002574920654296875,
-0.029693603515625,
-0.0131988525390625,
-0.00760650634765625,
0.053924560546875,
-0.01165008544921875,
-0.00858306884765625,
0.007266998291015625,
0.0093536376953125,
-0.03692626953125,
-0.01059722900390625,
-0.045379638671875,
0.00704193115234375,
0.032989501953125,
0.0010061264038085938,
-0.005619049072265625,
-0.001483917236328125,
0.0025730133056640625,
-0.0892333984375,
0.031768798828125,
-0.012115478515625,
0.023162841796875,
0.0023365020751953125,
0.035919189453125,
0.015106201171875,
0.0262451171875,
-0.0124969482421875,
0.0023441314697265625,
-0.022705078125,
-0.10498046875,
-0.0106201171875,
-0.0242156982421875,
0.050384521484375,
-0.0399169921875,
0.07232666015625,
-0.042724609375,
0.03302001953125,
-0.0269927978515625,
0.0009732246398925781,
-0.01123046875,
0.007488250732421875,
0.0186767578125,
0.01404571533203125,
-0.01500701904296875,
0.0012664794921875,
-0.01436614990234375,
-0.0333251953125,
-0.0341796875,
-0.01849365234375,
-0.0259552001953125,
-0.0283660888671875,
-0.0067901611328125,
-0.01442718505859375,
-0.005157470703125,
-0.02288818359375,
-0.0024700164794921875,
0.0396728515625,
0.0223236083984375,
-0.0194549560546875,
-0.04052734375,
-0.043304443359375,
0.01824951171875,
-0.01245880126953125,
-0.011505126953125,
0.0203857421875,
0.073974609375,
-0.000133514404296875,
-0.00022113323211669922,
-0.1279296875,
-0.01477813720703125,
0.005367279052734375,
0.015716552734375,
0.026947021484375,
-0.003604888916015625,
0.0054931640625,
0.00403594970703125,
-0.01934814453125,
0.021484375,
-0.0271759033203125,
0.023529052734375,
-0.0128326416015625,
-0.034271240234375,
0.0322265625,
-0.0096435546875,
0.00345611572265625,
0.03619384765625,
0.01314544677734375,
-0.0179443359375,
0.0048980712890625,
0.01068878173828125,
-0.00955963134765625,
0.0015935897827148438,
-0.00009101629257202148,
-0.0302276611328125,
0.028594970703125,
-0.0031909942626953125,
-0.0164794921875,
-0.034515380859375,
0.0235137939453125,
-0.02587890625,
-0.00846099853515625,
-0.00408172607421875,
0.020965576171875,
0.08270263671875,
-0.0115814208984375,
0.0265655517578125,
0.04376220703125,
-0.0266876220703125,
-0.04083251953125,
0.00719451904296875,
-0.018463134765625,
0.00998687744140625,
-0.0306549072265625,
-0.05609130859375,
0.009002685546875,
0.0030612945556640625,
-0.01971435546875,
-0.00493621826171875,
0.0211029052734375,
0.018951416015625,
0.002655029296875,
0.0223846435546875,
0.006954193115234375,
0.014617919921875,
-0.0196075439453125,
-0.0265960693359375,
0.01450347900390625,
-0.0284881591796875,
-0.006256103515625,
0.0084991455078125,
-0.0296783447265625,
-0.0097503662109375,
0.00782012939453125,
-0.0245513916015625,
-0.01482391357421875,
0.08367919921875,
0.0235595703125,
-0.05657958984375,
-0.0251007080078125,
0.077392578125,
0.00982666015625,
-0.050872802734375,
0.01154327392578125,
0.01019287109375,
0.05987548828125,
-0.051910400390625,
-0.06036376953125,
0.05560302734375,
-0.04547119140625,
0.0012989044189453125,
0.05084228515625,
0.00390625,
-0.057159423828125,
-0.017730712890625,
0.0063018798828125,
0.036865234375,
-0.046966552734375,
-0.01305389404296875,
0.04888916015625,
-0.0006284713745117188,
0.0212860107421875,
0.034271240234375,
-0.03082275390625,
-0.005950927734375,
-0.0006227493286132812,
0.00848388671875,
-0.04473876953125,
-0.0150299072265625,
-0.050201416015625,
0.0406494140625,
-0.0333251953125,
-0.0296783447265625,
0.0302276611328125,
-0.0020122528076171875,
-0.0251922607421875,
-0.020263671875,
0.01971435546875,
-0.0302886962890625,
0.017120361328125,
-0.0025043487548828125,
-0.0372314453125,
0.0127410888671875,
-0.0185089111328125,
-0.032958984375,
-0.031463623046875,
0.039154052734375,
-0.00405120849609375,
-0.030731201171875,
-0.0091094970703125,
-0.00722503662109375,
0.0259246826171875,
-0.00434112548828125,
0.0103607177734375,
-0.0033817291259765625,
0.0350341796875,
-0.002719879150390625,
0.053863525390625,
-0.043487548828125,
0.0278472900390625,
0.0469970703125,
-0.0013866424560546875,
-0.0120849609375,
0.033294677734375,
0.038970947265625,
-0.00977325439453125,
-0.004428863525390625,
-0.002513885498046875,
-0.002803802490234375,
-0.0173492431640625,
0.034820556640625,
-0.0006351470947265625,
0.02777099609375,
0.001781463623046875,
0.0207366943359375,
-0.031646728515625,
0.0035152435302734375,
-0.01433563232421875,
0.046539306640625,
-0.0131988525390625,
-0.005214691162109375,
0.055084228515625,
-0.0200347900390625,
0.00399017333984375,
-0.0005474090576171875,
0.00902557373046875,
-0.0014715194702148438,
-0.0111236572265625,
-0.01291656494140625,
-0.00214385986328125,
0.0172119140625,
0.0032978057861328125,
0.017486572265625,
-0.0196380615234375,
0.0171051025390625,
0.0306854248046875,
0.0136260986328125,
0.0167694091796875,
0.04107666015625,
-0.005298614501953125,
-0.0242156982421875,
0.0100250244140625,
-0.0033321380615234375,
0.003978729248046875,
-0.015625,
-0.00760650634765625,
0.0273284912109375,
0.040191650390625,
0.0740966796875,
-0.025665283203125,
0.0040435791015625,
0.04217529296875,
-0.041473388671875,
-0.0189056396484375,
-0.00786590576171875,
-0.00127410888671875,
-0.06494140625,
0.04229736328125,
0.0091400146484375,
0.00559234619140625,
0.0021514892578125,
-0.020416259765625,
-0.0155792236328125,
-0.0079803466796875,
0.0306854248046875,
0.032745361328125,
-0.03656005859375,
0.016387939453125,
0.03497314453125,
-0.0017547607421875,
0.01369476318359375,
0.039215087890625,
-0.049774169921875,
-0.005512237548828125,
-0.0253448486328125,
-0.03131103515625,
-0.040771484375,
-0.0220947265625,
-0.023651123046875,
-0.001995086669921875,
0.0548095703125,
0.0232391357421875,
0.007381439208984375,
-0.032684326171875,
0.007022857666015625,
0.036529541015625,
0.048095703125,
-0.05340576171875,
-0.01500701904296875,
0.0560302734375,
-0.0227203369140625,
0.0230712890625,
0.055084228515625,
-0.03155517578125,
0.004779815673828125,
0.0005407333374023438,
0.00982666015625,
-0.0005106925964355469,
-0.012908935546875,
0.04254150390625,
-0.01470947265625,
-0.0171966552734375,
0.01800537109375,
0.069580078125,
-0.039581298828125,
-0.0265350341796875,
0.03936767578125,
-0.0146484375,
-0.041351318359375,
0.03399658203125,
-0.078369140625,
0.118896484375,
0.0201416015625,
0.047515869140625,
0.027923583984375,
0.0272979736328125,
-0.06256103515625,
-0.005733489990234375,
-0.006992340087890625,
0.043853759765625,
0.037933349609375,
-0.021087646484375,
-0.0245819091796875,
-0.0129547119140625,
-0.02679443359375,
0.038726806640625,
0.005504608154296875,
-0.00804901123046875,
-0.01953125,
0.0242462158203125,
0.06622314453125,
0.0140533447265625,
0.00785064697265625,
0.04119873046875,
-0.0125732421875,
-0.01078033447265625,
0.0251617431640625,
-0.037811279296875,
0.0246734619140625,
-0.0301666259765625,
0.005069732666015625,
-0.0057220458984375,
0.002407073974609375,
-0.00006496906280517578,
-0.0025272369384765625,
-0.01116180419921875,
0.0088653564453125,
-0.0083160400390625,
-0.01605224609375,
0.018768310546875,
0.045257568359375,
-0.01953125,
-0.001239776611328125,
-0.032196044921875,
-0.006412506103515625,
0.001895904541015625,
0.02752685546875,
-0.0166015625,
0.040924072265625,
0.0199127197265625,
0.0083770751953125,
0.10931396484375,
-0.034515380859375,
0.004947662353515625,
-0.00513458251953125,
0.00481414794921875,
0.0128326416015625,
0.034576416015625,
0.044921875,
0.024017333984375,
0.0152130126953125,
0.00263214111328125,
0.0031032562255859375,
-0.016021728515625,
-0.044647216796875,
0.0048828125,
0.0318603515625,
0.0119476318359375,
0.007022857666015625,
0.00762176513671875,
-0.01482391357421875,
0.052978515625,
-0.012115478515625,
0.01209259033203125,
0.0307159423828125,
0.01136016845703125,
0.01352691650390625,
0.04437255859375,
-0.061370849609375,
0.0005064010620117188,
-0.0110626220703125,
0.0134124755859375,
0.0330810546875,
0.042938232421875,
-0.04833984375,
0.0631103515625,
-0.033966064453125,
0.006511688232421875,
-0.0021152496337890625,
0.0140228271484375,
0.01184844970703125,
-0.005733489990234375,
0.0017957687377929688,
-0.0121612548828125,
0.01030731201171875,
0.0316162109375,
-0.0040130615234375,
0.034210205078125,
0.0491943359375,
0.0219573974609375,
-0.0655517578125,
-0.00823211669921875,
0.01018524169921875,
-0.048370361328125,
-0.035797119140625,
-0.039459228515625,
0.00647735595703125,
0.0159454345703125,
0.00646209716796875,
0.02557373046875,
0.011993408203125,
0.044708251953125,
-0.0207061767578125,
0.03326416015625,
-0.00943756103515625,
-0.04132080078125,
0.0236968994140625,
-0.02801513671875,
0.076904296875,
-0.0034542083740234375,
-0.03839111328125,
-0.017181396484375,
-0.0199737548828125,
0.07318115234375,
-0.01152801513671875,
0.006855010986328125,
0.005157470703125,
0.053253173828125,
0.015472412109375,
-0.0192413330078125,
-0.005706787109375,
0.01444244384765625,
0.009307861328125,
0.0303802490234375,
0.0246734619140625,
0.01800537109375,
-0.05224609375,
-0.030731201171875,
-0.025634765625,
0.033843994140625,
0.03826904296875,
0.0469970703125,
0.004665374755859375,
0.0268096923828125,
0.026397705078125,
0.01494598388671875,
-0.0030689239501953125,
0.01806640625,
-0.00800323486328125,
-0.0253143310546875,
0.0228271484375,
-0.00836944580078125,
-0.0738525390625,
0.0103607177734375,
0.00353240966796875,
0.0023555755615234375,
0.004058837890625,
-0.0308074951171875,
0.03570556640625,
0.04486083984375,
0.03338623046875,
-0.0247344970703125,
-0.037994384765625,
-0.0305938720703125,
0.01335906982421875,
0.0102386474609375,
-0.00032401084899902344,
-0.0245361328125,
-0.00923919677734375,
0.0057220458984375,
-0.04364013671875,
0.017364501953125,
-0.015594482421875,
0.014007568359375,
0.025665283203125,
0.0077667236328125,
-0.050445556640625,
-0.01209259033203125,
-0.025421142578125,
0.004589080810546875,
-0.016082763671875,
0.07177734375,
-0.0237274169921875,
-0.0167083740234375,
0.01190185546875,
0.0135650634765625,
0.0235443115234375,
-0.039947509765625,
-0.00688934326171875,
0.039154052734375,
-0.002994537353515625,
0.0003333091735839844,
-0.023162841796875,
-0.009918212890625,
-0.054718017578125,
0.0026264190673828125,
0.01557159423828125,
-0.0308380126953125,
-0.00717926025390625,
-0.00927734375,
0.0210418701171875,
-0.0026302337646484375,
-0.01181793212890625,
-0.0198211669921875,
0.03643798828125,
-0.043975830078125,
0.01110076904296875,
-0.034210205078125,
-0.0204315185546875,
0.0139007568359375,
0.0312042236328125,
-0.037261962890625,
-0.05426025390625,
-0.0263824462890625,
0.036163330078125,
-0.04620361328125,
-0.0115203857421875,
0.0228118896484375,
-0.018157958984375,
-0.0113983154296875,
-0.00373077392578125,
0.011749267578125,
0.03570556640625,
-0.0028839111328125,
-0.04241943359375,
-0.0021991729736328125,
-0.00666046142578125,
0.0262908935546875,
-0.050048828125,
-0.0037746429443359375,
-0.0738525390625,
0.0155029296875,
-0.07781982421875,
0.0181427001953125,
0.0013895034790039062,
-0.060516357421875,
-0.1478271484375,
0.02294921875,
-0.05487060546875,
-0.044586181640625,
-0.006786346435546875,
-0.0361328125,
-0.03472900390625,
0.0655517578125,
0.01381683349609375,
-0.0215911865234375,
0.0064239501953125,
0.05322265625,
-0.04022216796875,
0.005023956298828125,
0.041656494140625,
-0.07305908203125,
0.00395965576171875,
-0.039947509765625,
0.001605987548828125,
-0.04595947265625,
0.0155792236328125,
-0.00801849365234375,
0.0274658203125,
0.07958984375,
-0.0132293701171875,
0.0018434524536132812,
-0.0234375,
-0.059356689453125,
-0.005615234375,
0.01116180419921875,
-0.034912109375,
0.001964569091796875,
0.06744384765625,
0.05340576171875,
0.016510009765625,
-0.020721435546875,
0.011932373046875,
0.006961822509765625,
0.0289154052734375,
-0.007518768310546875,
-0.00502777099609375,
-0.04010009765625,
-0.03118896484375,
-0.0003104209899902344,
-0.0208282470703125,
0.0206756591796875,
-0.0229949951171875,
-0.055023193359375,
0.00045180320739746094,
-0.041595458984375,
-0.01280975341796875,
-0.07012939453125,
-0.0103759765625,
0.052276611328125,
-0.02923583984375,
0.006801605224609375,
0.00864410400390625,
-0.0032405853271484375,
0.019073486328125,
0.0163116455078125,
-0.006374359130859375,
0.0083160400390625,
-0.046417236328125,
0.0025959014892578125,
-0.013885498046875,
0.034576416015625,
-0.03729248046875,
-0.005340576171875,
0.0169677734375,
-0.0164642333984375,
-0.020477294921875,
-0.0275726318359375,
0.0386962890625,
-0.044830322265625,
-0.054718017578125,
0.0265350341796875,
-0.01812744140625,
-0.0275421142578125,
-0.04156494140625,
0.03631591796875,
-0.0474853515625,
-0.0004401206970214844,
-0.0209197998046875,
-0.00571441650390625,
0.0106048583984375,
0.054290771484375,
0.0110321044921875,
-0.01580810546875,
0.022796630859375,
-0.0017309188842773438,
0.016693115234375,
0.002429962158203125
] |
65949e78b0ed531097372c3ae73177500714df6b | Wordpress Stackexchange
Q: could not upload image in media library I am trying upload an image in media library, on browsing the images its shows that the image is uploading, but after that image could not be uploaded and it shows this error--
top-long-bg.jpg Missing a temporary folder.
A: open file wp_config.php and add code
define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');
via ftp in the folder /wp-content, create a new catalog /temp/
| Q: could not upload image in media library I am trying upload an image in media library, on browsing the images its shows that the image is uploading, but after that image could not be uploaded and it shows this error--
top-long-bg.jpg Missing a temporary folder.
A: open file wp_config.php and add code
define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');
via ftp in the folder /wp-content, create a new catalog /temp/
| wordpress | {
"language": "en",
"length": 68,
"provenance": "stackexchange_00019.jsonl.gz:473310",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/257067"
} | [
0.05059814453125,
-0.0257110595703125,
0.04766845703125,
0.0159912109375,
-0.0234375,
-0.020660400390625,
0.066162109375,
-0.03790283203125,
0.032379150390625,
0.00933837890625,
0.0095672607421875,
-0.02178955078125,
-0.0216522216796875,
-0.0418701171875,
-0.033050537109375,
-0.0255889892578125,
0.009765625,
-0.02001953125,
0.01155853271484375,
-0.01158905029296875,
-0.0168914794921875,
-0.0016984939575195312,
0.03863525390625,
0.00373077392578125,
-0.0183868408203125,
0.0205841064453125,
0.01438140869140625,
-0.0189056396484375,
-0.017425537109375,
-0.03857421875,
-0.0080108642578125,
0.054656982421875,
0.02447509765625,
-0.00344085693359375,
-0.013031005859375,
-0.0090179443359375,
0.02935791015625,
-0.0086822509765625,
0.00591278076171875,
-0.01093292236328125,
-0.00909423828125,
0.02386474609375,
0.057403564453125,
0.02020263671875,
-0.01419830322265625,
0.007495880126953125,
-0.0484619140625,
-0.042938232421875,
0.032470703125,
0.02020263671875,
0.0153656005859375,
0.00980377197265625,
0.0219573974609375,
-0.0003521442413330078,
-0.0251312255859375,
-0.0247344970703125,
0.037139892578125,
-0.0284576416015625,
0.0139312744140625,
-0.025909423828125,
-0.03857421875,
0.005825042724609375,
0.024566650390625,
-0.0031375885009765625,
-0.01142120361328125,
-0.0017004013061523438,
-0.0223236083984375,
0.0165252685546875,
-0.032470703125,
-0.032562255859375,
0.006763458251953125,
-0.04278564453125,
0.006214141845703125,
-0.0225372314453125,
0.0205841064453125,
0.00966644287109375,
-0.01023101806640625,
-0.01453399658203125,
0.021209716796875,
-0.0029697418212890625,
-0.00409698486328125,
-0.01384735107421875,
-0.046875,
-0.0010385513305664062,
0.0264434814453125,
0.03485107421875,
-0.007720947265625,
-0.01837158203125,
0.00019478797912597656,
0.049468994140625,
-0.0185394287109375,
0.023040771484375,
0.039459228515625,
0.02685546875,
-0.0224456787109375,
0.021759033203125,
0.0255889892578125,
0.051055908203125,
-0.0071258544921875,
0.032989501953125,
-0.0267791748046875,
-0.0250701904296875,
0.0249481201171875,
-0.046051025390625,
0.0145263671875,
-0.032684326171875,
-0.0058746337890625,
-0.034088134765625,
0.038177490234375,
0.03948974609375,
-0.027008056640625,
0.03607177734375,
0.011688232421875,
-0.043792724609375,
0.018341064453125,
0.0030002593994140625,
-0.004192352294921875,
0.033416748046875,
0.007389068603515625,
-0.03924560546875,
-0.0189666748046875,
0.029205322265625,
-0.04974365234375,
-0.06756591796875,
0.033660888671875,
-0.0270843505859375,
-0.016998291015625,
0.03839111328125,
0.01021575927734375,
0.013458251953125,
-0.0399169921875,
0.01407623291015625,
0.027435302734375,
-0.00360870361328125,
-0.003299713134765625,
-0.0241546630859375,
-0.035064697265625,
-0.0236968994140625,
-0.01117706298828125,
-0.0009546279907226562,
0.03839111328125,
-0.0234527587890625,
0.01221466064453125,
0.03265380859375,
-0.03289794921875,
0.035888671875,
-0.000858306884765625,
0.012115478515625,
-0.01551055908203125,
-0.09185791015625,
0.0164337158203125,
-0.041351318359375,
0.03204345703125,
0.0211334228515625,
-0.01219940185546875,
-0.05206298828125,
0.05572509765625,
-0.06829833984375,
0.00499725341796875,
-0.07611083984375,
0.01084136962890625,
0.01322174072265625,
0.044677734375,
0.001949310302734375,
-0.001049041748046875,
-0.034759521484375,
-0.04888916015625,
-0.01432037353515625,
0.029296875,
0.01104736328125,
0.0028514862060546875,
-0.0164031982421875,
0.00902557373046875,
0.00012058019638061523,
-0.01015472412109375,
0.01395416259765625,
0.0294036865234375,
0.012603759765625,
0.008880615234375,
0.056610107421875,
0.00384521484375,
-0.008697509765625,
0.06048583984375,
-0.0204620361328125,
-0.0177459716796875,
-0.03973388671875,
0.035919189453125,
0.035980224609375,
0.006725311279296875,
0.038177490234375,
0.055389404296875,
-0.0136260986328125,
-0.009185791015625,
-0.0107574462890625,
-0.00919342041015625,
-0.03704833984375,
-0.0272064208984375,
-0.019439697265625,
-0.0214691162109375,
0.04443359375,
0.019744873046875,
0.0587158203125,
-0.0372314453125,
-0.0010023117065429688,
0.009979248046875,
-0.0199737548828125,
0.0187835693359375,
0.01904296875,
-0.003814697265625,
0.0181427001953125,
0.00806427001953125,
0.01284027099609375,
-0.0036220550537109375,
-0.0660400390625,
-0.0164947509765625,
0.01666259765625,
-0.044403076171875,
0.022918701171875,
-0.007564544677734375,
0.0712890625,
-0.062225341796875,
-0.00396728515625,
-0.056793212890625,
-0.054901123046875,
0.01157379150390625,
0.0311431884765625,
-0.033203125,
0.01383209228515625,
-0.0135650634765625,
0.0352783203125,
-0.03411865234375,
0.00830841064453125,
-0.0162353515625,
-0.0206451416015625,
-0.03619384765625,
-0.01308441162109375,
-0.0224151611328125,
-0.0679931640625,
0.0211029052734375,
0.0518798828125,
0.02471923828125,
0.03765869140625,
0.0180511474609375,
0.0631103515625,
0.08734130859375,
-0.00467681884765625,
0.0027179718017578125,
0.024505615234375,
-0.03375244140625,
-0.00777435302734375,
-0.0076904296875,
-0.00017726421356201172,
0.0140380859375,
-0.047882080078125,
-0.0151519775390625,
0.0148468017578125,
-0.0050811767578125,
-0.043853759765625,
-0.005222320556640625,
0.03094482421875,
0.0272216796875,
0.019378662109375,
-0.050384521484375,
0.0193634033203125,
0.01479339599609375,
0.03765869140625,
0.03753662109375,
0.0328369140625,
-0.0175933837890625,
0.0274658203125,
0.004241943359375,
-0.045257568359375,
0.007717132568359375,
0.033660888671875,
0.04779052734375,
0.006443023681640625,
-0.0301971435546875,
-0.01432037353515625,
0.01496124267578125,
0.0207061767578125,
-0.0201873779296875,
0.005496978759765625,
-0.005382537841796875,
-0.00296783447265625,
-0.051971435546875,
-0.05010986328125,
0.039031982421875,
0.01323699951171875,
-0.04058837890625,
-0.041046142578125,
-0.0053558349609375,
0.02984619140625,
-0.0030670166015625,
0.0176849365234375,
-0.0071258544921875,
-0.0114593505859375,
0.04925537109375,
-0.015350341796875,
0.0262603759765625,
-0.0160675048828125,
0.05865478515625,
0.0577392578125,
-0.034393310546875,
0.031402587890625,
-0.013946533203125,
0.0229339599609375,
-0.0014591217041015625,
0.0169219970703125,
-0.0013208389282226562,
-0.0280914306640625,
-0.0226593017578125,
-0.0262451171875,
0.0089569091796875,
-0.03314208984375,
0.007358551025390625,
0.00145721435546875,
-0.02130126953125,
-0.006649017333984375,
-0.04010009765625,
-0.0164031982421875,
-0.044281005859375,
-0.04547119140625,
0.0192718505859375,
0.0118560791015625,
-0.00820159912109375,
-0.0144500732421875,
0.039825439453125,
0.011444091796875,
-0.00675201416015625,
-0.0138397216796875,
-0.0030956268310546875,
-0.046722412109375,
-0.047332763671875,
-0.0567626953125,
0.009796142578125,
-0.006580352783203125,
-0.0014505386352539062,
0.0252227783203125,
-0.007617950439453125,
-0.051971435546875,
0.0022716522216796875,
0.0105133056640625,
0.01885986328125,
0.0289459228515625,
0.01247406005859375,
0.0095062255859375,
-0.01971435546875,
-0.0007524490356445312,
0.038482666015625,
0.06268310546875,
-0.06884765625,
0.0116119384765625,
-0.031707763671875,
-0.077880859375,
-0.05975341796875,
0.0011911392211914062,
0.06317138671875,
-0.0911865234375,
-0.05157470703125,
-0.08380126953125,
-0.01470184326171875,
-0.048614501953125,
-0.039306640625,
0.06341552734375,
0.01629638671875,
0.0028591156005859375,
-0.00708770751953125,
0.044769287109375,
-0.006744384765625,
0.0256805419921875,
-0.007503509521484375,
-0.0391845703125,
0.042999267578125,
-0.0028324127197265625,
0.003948211669921875,
-0.0003478527069091797,
0.0274200439453125,
-0.0243072509765625,
0.01039886474609375,
0.0016984939575195312,
-0.00237274169921875,
-0.0203399658203125,
-0.006725311279296875,
-0.043853759765625,
-0.05438232421875,
0.034515380859375,
-0.04803466796875,
0.022491455078125,
-0.049713134765625,
-0.01146697998046875,
-0.0214080810546875,
0.07269287109375,
0.0017213821411132812,
-0.00750732421875,
-0.033538818359375,
0.00212860107421875,
-0.0360107421875,
-0.037261962890625,
-0.01397705078125,
0.006473541259765625,
-0.020660400390625,
0.007389068603515625,
0.0091705322265625,
-0.0163116455078125,
0.0289459228515625,
-0.032928466796875,
0.010528564453125,
-0.0362548828125,
0.0338134765625,
-0.006626129150390625,
0.03668212890625,
-0.0025615692138671875,
0.0265045166015625,
-0.017303466796875,
-0.0117950439453125,
-0.01690673828125,
-0.1453857421875,
-0.018524169921875,
-0.031982421875,
0.0789794921875,
-0.0139617919921875,
0.035552978515625,
-0.04608154296875,
0.050872802734375,
0.03900146484375,
0.0085296630859375,
0.004337310791015625,
-0.039825439453125,
0.029876708984375,
-0.00536346435546875,
-0.00006949901580810547,
-0.0098114013671875,
0.003391265869140625,
-0.0640869140625,
-0.03594970703125,
-0.03997802734375,
-0.047760009765625,
0.031402587890625,
-0.05401611328125,
-0.011383056640625,
-0.0010519027709960938,
-0.015838623046875,
-0.024810791015625,
0.017547607421875,
-0.0007562637329101562,
-0.01458740234375,
-0.0297698974609375,
-0.0157623291015625,
0.0302581787109375,
0.02044677734375,
0.0175323486328125,
0.0255279541015625,
0.05767822265625,
-0.0036296844482421875,
-0.02008056640625,
-0.10980224609375,
0.01357269287109375,
0.04669189453125,
0.024444580078125,
0.006168365478515625,
0.0094451904296875,
-0.0207061767578125,
0.00946807861328125,
0.0250244140625,
-0.01806640625,
0.0263671875,
0.032928466796875,
0.0125885009765625,
-0.032684326171875,
0.00681304931640625,
-0.0009489059448242188,
-0.0196990966796875,
0.0187835693359375,
-0.0299530029296875,
0.0307159423828125,
-0.06744384765625,
0.007099151611328125,
0.01003265380859375,
0.0124969482421875,
-0.0306549072265625,
-0.08428955078125,
0.0223541259765625,
-0.04571533203125,
0.02685546875,
-0.0090484619140625,
0.01023101806640625,
0.044464111328125,
0.039398193359375,
0.003833770751953125,
0.0110931396484375,
-0.0294189453125,
-0.0138092041015625,
0.02166748046875,
0.02923583984375,
-0.004627227783203125,
0.024993896484375,
-0.004863739013671875,
0.026519775390625,
0.02508544921875,
-0.0175628662109375,
0.004741668701171875,
-0.0196533203125,
0.006988525390625,
-0.0028934478759765625,
0.002429962158203125,
0.01280975341796875,
0.01305389404296875,
-0.01045989990234375,
0.004730224609375,
-0.0260009765625,
0.02374267578125,
-0.035400390625,
0.046234130859375,
0.02203369140625,
-0.01454925537109375,
0.01068878173828125,
0.00836181640625,
-0.021728515625,
-0.003070831298828125,
0.006626129150390625,
0.01274871826171875,
-0.0031719207763671875,
0.0494384765625,
0.0248565673828125,
-0.0229034423828125,
0.00620269775390625,
0.00788116455078125,
0.015716552734375,
-0.064208984375,
0.01514434814453125,
0.004238128662109375,
0.054931640625,
-0.0148162841796875,
-0.055511474609375,
0.038299560546875,
-0.0447998046875,
-0.01264190673828125,
0.0160064697265625,
-0.033538818359375,
-0.0753173828125,
-0.0222625732421875,
0.0056915283203125,
0.040008544921875,
-0.02947998046875,
-0.0279083251953125,
-0.00978851318359375,
-0.0240020751953125,
0.0266876220703125,
0.01195526123046875,
-0.0141754150390625,
0.010772705078125,
-0.0020236968994140625,
-0.0028076171875,
-0.0303192138671875,
-0.00937652587890625,
-0.0010290145874023438,
0.031494140625,
-0.04071044921875,
-0.0253448486328125,
0.059478759765625,
-0.0240631103515625,
-0.01290130615234375,
0.004791259765625,
0.0016870498657226562,
-0.037017822265625,
0.028717041015625,
0.016326904296875,
0.004283905029296875,
-0.00988006591796875,
-0.010711669921875,
-0.0195159912109375,
-0.006801605224609375,
0.01560211181640625,
-0.01558685302734375,
-0.00342559814453125,
-0.022064208984375,
-0.01018524169921875,
0.0269927978515625,
-0.020904541015625,
-0.022857666015625,
-0.01464080810546875,
0.03399658203125,
0.0288848876953125,
0.057373046875,
-0.0162200927734375,
0.0023097991943359375,
0.0002377033233642578,
-0.0041351318359375,
-0.01555633544921875,
-0.0160675048828125,
-0.002483367919921875,
-0.00795745849609375,
-0.022705078125,
-0.040924072265625,
0.0070953369140625,
0.0030117034912109375,
-0.0015125274658203125,
0.058441162109375,
0.062286376953125,
0.0306549072265625,
0.0183868408203125,
-0.034942626953125,
-0.00777435302734375,
-0.02752685546875,
0.032073974609375,
-0.045928955078125,
-0.01543426513671875,
-0.006168365478515625,
-0.033599853515625,
0.035064697265625,
-0.01036834716796875,
-0.0260772705078125,
0.03826904296875,
-0.0275115966796875,
0.0159912109375,
0.052825927734375,
0.020660400390625,
0.0189056396484375,
0.08685302734375,
-0.0016078948974609375,
0.040313720703125,
0.043121337890625,
0.0122222900390625,
0.006610870361328125,
0.0694580078125,
0.00905609130859375,
-0.059844970703125,
0.048736572265625,
0.0169219970703125,
-0.01337432861328125,
0.0234375,
-0.021087646484375,
0.0174713134765625,
0.00653839111328125,
0.066650390625,
0.0001342296600341797,
0.003448486328125,
0.03179931640625,
-0.025177001953125,
0.0164794921875,
0.0005021095275878906,
0.0250091552734375,
0.01473236083984375,
-0.002124786376953125,
-0.01352691650390625,
-0.033050537109375,
-0.00872802734375,
-0.0122833251953125,
-0.0097198486328125,
0.01050567626953125,
0.01433563232421875,
0.0142974853515625,
-0.056060791015625,
-0.045257568359375,
0.07403564453125,
-0.031982421875,
0.0311126708984375,
0.046539306640625,
-0.047027587890625,
0.005855560302734375,
-0.004383087158203125,
-0.007110595703125,
-0.0211334228515625,
-0.0242767333984375,
0.01238250732421875,
-0.0089263916015625,
0.0149688720703125,
0.01560211181640625,
-0.01059722900390625,
-0.0106201171875,
-0.0110015869140625,
-0.034332275390625,
0.0733642578125,
-0.019622802734375,
0.0184783935546875,
0.011932373046875,
-0.048675537109375,
-0.006938934326171875,
-0.0132598876953125,
-0.003780364990234375,
0.003559112548828125,
-0.032379150390625,
0.034271240234375,
-0.054931640625,
0.0245819091796875,
0.037994384765625,
0.0260009765625,
-0.01416778564453125,
0.0157928466796875,
0.07281494140625,
-0.04388427734375,
-0.0042724609375,
0.0218353271484375,
-0.005992889404296875,
-0.01062774658203125,
0.0052032470703125,
-0.055633544921875,
0.059722900390625,
-0.025604248046875,
0.034881591796875,
0.041748046875,
0.0128021240234375,
-0.01364898681640625,
-0.01200103759765625,
-0.04669189453125,
0.053436279296875,
-0.032073974609375,
0.030914306640625,
-0.07061767578125,
0.007755279541015625,
-0.01097869873046875,
0.014190673828125,
0.0745849609375,
0.026611328125,
-0.059722900390625,
-0.019287109375,
0.030181884765625,
0.048675537109375,
0.0182342529296875,
0.053466796875,
-0.034271240234375,
-0.029876708984375,
0.042633056640625,
-0.01213836669921875,
0.0295867919921875,
0.029449462890625,
-0.0296783447265625,
-0.0174102783203125,
-0.0027179718017578125,
-0.0167083740234375,
0.048370361328125,
0.037841796875,
-0.011199951171875,
0.017578125,
0.0270843505859375,
-0.0711669921875,
0.0079345703125,
0.004924774169921875,
-0.01461029052734375,
0.01812744140625,
-0.028900146484375,
0.01108551025390625,
0.0161590576171875,
-0.0166015625,
0.0305023193359375,
0.024749755859375,
0.0155487060546875,
0.0271453857421875,
-0.0003170967102050781,
0.0124053955078125,
0.016357421875,
-0.0036373138427734375,
0.041595458984375,
0.0024509429931640625,
0.0186004638671875,
-0.05389404296875,
0.0266571044921875,
0.0229949951171875,
0.054473876953125,
-0.0546875,
-0.039825439453125,
0.00010800361633300781,
-0.0266571044921875,
-0.01351165771484375,
-0.0216064453125,
-0.032745361328125,
-0.040985107421875,
-0.00713348388671875,
-0.05999755859375,
0.0044097900390625,
0.05316162109375,
0.06134033203125,
-0.00603485107421875,
-0.0104217529296875,
-0.059356689453125,
-0.0545654296875,
-0.0122528076171875,
0.0159149169921875,
-0.0015516281127929688,
0.027252197265625,
-0.0011148452758789062,
0.006206512451171875,
-0.0396728515625,
0.00400543212890625,
0.01345062255859375,
0.028839111328125,
-0.01392364501953125,
-0.002315521240234375,
-0.042449951171875,
-0.082275390625,
0.0462646484375,
0.033905029296875,
-0.01009368896484375,
0.038299560546875,
0.023895263671875,
0.0223236083984375,
-0.01125335693359375,
-0.004657745361328125,
0.049835205078125,
-0.02740478515625,
-0.005588531494140625,
-0.0169219970703125,
0.020477294921875,
0.022247314453125,
-0.0227813720703125,
-0.0160980224609375,
-0.0124053955078125,
0.06744384765625,
-0.016021728515625,
0.028961181640625,
-0.0091400146484375,
-0.057952880859375,
0.01558685302734375,
0.0026607513427734375,
0.09716796875,
-0.0035457611083984375,
-0.040740966796875,
-0.0217437744140625,
0.0216217041015625,
-0.02001953125,
0.00234222412109375,
0.03509521484375,
-0.00691986083984375,
-0.00782012939453125,
-0.0213165283203125,
-0.0302734375,
0.0008139610290527344,
-0.00804901123046875,
0.036773681640625,
0.00618743896484375,
-0.0238494873046875,
-0.001384735107421875,
-0.053802490234375,
-0.0223388671875,
-0.0267791748046875,
0.037567138671875,
0.022918701171875,
0.08697509765625,
-0.0274658203125,
0.031585693359375,
-0.014801025390625,
-0.02386474609375,
-0.0158843994140625,
0.02020263671875,
-0.06268310546875,
-0.0034503936767578125,
-0.00849151611328125,
0.004550933837890625,
0.00290679931640625,
0.0299072265625,
-0.0054779052734375,
-0.0304107666015625,
-0.0390625,
-0.0252532958984375,
0.028778076171875,
0.072509765625,
0.005680084228515625,
-0.0198974609375,
-0.011444091796875,
-0.0261688232421875,
0.0062103271484375,
0.03662109375,
0.005855560302734375,
-0.04998779296875,
0.00510406494140625,
-0.025604248046875,
-0.036346435546875,
0.0183868408203125,
-0.0308837890625,
0.03656005859375,
0.04150390625,
-0.045928955078125,
-0.06927490234375,
-0.048858642578125,
-0.00778961181640625,
-0.0465087890625,
0.00018346309661865234,
0.032440185546875,
-0.034637451171875,
0.0221405029296875,
0.044952392578125,
-0.00870513916015625,
0.00672149658203125,
-0.055206298828125,
-0.020904541015625,
0.039215087890625,
0.0031032562255859375,
0.005207061767578125,
0.01181793212890625,
-0.006183624267578125,
-0.02423095703125,
-0.0168609619140625,
0.0252685546875,
-0.0033473968505859375,
0.00440216064453125,
-0.032562255859375,
-0.01201629638671875,
0.0216522216796875,
0.011199951171875,
-0.07159423828125,
0.028228759765625,
-0.0029754638671875,
0.0423583984375,
-0.01377105712890625,
-0.009796142578125,
0.0020008087158203125,
0.035736083984375,
-0.03765869140625,
-0.076171875,
-0.0309600830078125,
0.031494140625,
-0.04718017578125,
0.0305328369140625,
0.0284881591796875,
-0.038848876953125,
0.014495849609375,
0.0290679931640625,
0.033966064453125,
0.09832763671875,
0.006622314453125,
-0.03173828125,
-0.02069091796875,
0.0139617919921875,
0.003337860107421875,
0.004608154296875,
0.0200347900390625,
-0.01502227783203125,
-0.022979736328125,
-0.0188751220703125,
0.00820159912109375,
0.0129547119140625,
-0.039093017578125,
-0.0894775390625,
0.01282501220703125,
-0.0030975341796875,
-0.04302978515625,
-0.015655517578125,
0.0251922607421875,
-0.02532958984375,
0.08154296875,
0.0265045166015625,
-0.046630859375,
0.0194091796875,
0.011993408203125,
0.00832366943359375,
0.0040435791015625,
0.0002148151397705078,
0.017913818359375,
-0.074462890625,
0.00821685791015625,
-0.0233917236328125,
0.0115509033203125,
0.0260772705078125,
-0.0212249755859375,
0.0311279296875,
0.03204345703125,
-0.036407470703125,
-0.03704833984375,
-0.0200653076171875,
-0.03741455078125,
-0.00937652587890625,
-0.043548583984375,
-0.038543701171875,
-0.019744873046875,
0.04827880859375,
0.06292724609375,
0.0137481689453125,
-0.0204925537109375,
0.01233673095703125,
0.004009246826171875,
0.027679443359375,
0.002349853515625,
-0.005260467529296875,
-0.0283966064453125,
-0.0200653076171875,
-0.0146636962890625,
0.0010480880737304688,
-0.006946563720703125,
-0.004840850830078125,
-0.0244598388671875,
-0.00910186767578125,
-0.020599365234375,
-0.037872314453125,
0.00676727294921875,
-0.0149688720703125,
0.066650390625,
-0.0285491943359375,
0.034912109375,
-0.04095458984375,
0.0401611328125,
0.039276123046875,
-0.045135498046875,
0.005340576171875,
-0.00943756103515625,
0.0096282958984375,
0.02813720703125,
0.014190673828125,
-0.001583099365234375,
-0.004772186279296875,
-0.00970458984375,
0.0218048095703125,
-0.01232147216796875,
-0.017669677734375,
-0.025665283203125,
0.0165252685546875,
0.00789642333984375,
-0.041961669921875,
0.0628662109375,
-0.004486083984375,
0.0088958740234375,
-0.0065155029296875,
0.02227783203125,
-0.038543701171875,
-0.00148773193359375,
-0.0027256011962890625,
-0.0276947021484375,
0.01812744140625,
0.0252685546875,
0.007358551025390625,
-0.02215576171875,
0.0209503173828125,
-0.047943115234375,
0.0014410018920898438,
0.00795745849609375
] |
f40a0a114cff4aa70b52bf706f36b33d23c90fa5 | Wordpress Stackexchange
Q: Eliminate render blocking javascript After running my Wordpress site through Page Speed Insights I'm told that I need to eliminate render blocking javascript.
So I have moved the vast majority of javascript to just before the closing body tag but the warning still appears in Page Speed Insights.
Can anyone suggest what I can do to resolve this issue please?
The site is http://www.stewartandsonsroofingliverpool.co.uk/
Thanks in advance
A: You can install a plugin to load your JavaScript asynchronously or try to do it manually adding code to your functions.php to load your scripts asynchronously.
This can get you started,
Warning
loading JavaScript asynchronously will cause several issues with dependencies:
/*function to add async to all scripts*/
function js_async_attr($tag){
//Add async to all scripts tags
return str_replace( ' src', ' async="async" src', $tag );
}
add_filter( 'script_loader_tag', 'js_async_attr', 10 );
so you have to check your JS code and update it.
| Q: Eliminate render blocking javascript After running my Wordpress site through Page Speed Insights I'm told that I need to eliminate render blocking javascript.
So I have moved the vast majority of javascript to just before the closing body tag but the warning still appears in Page Speed Insights.
Can anyone suggest what I can do to resolve this issue please?
The site is http://www.stewartandsonsroofingliverpool.co.uk/
Thanks in advance
A: You can install a plugin to load your JavaScript asynchronously or try to do it manually adding code to your functions.php to load your scripts asynchronously.
This can get you started,
Warning
loading JavaScript asynchronously will cause several issues with dependencies:
/*function to add async to all scripts*/
function js_async_attr($tag){
//Add async to all scripts tags
return str_replace( ' src', ' async="async" src', $tag );
}
add_filter( 'script_loader_tag', 'js_async_attr', 10 );
so you have to check your JS code and update it.
A: Use defer attribute
Instead of converting all script to async as this answer suggested, it's better to use defer. That way, you'll not have dependency errors.
For example, you use a custom script and that script depends on jQuery. Since jQuery is more likely to be bigger than your custom script, it'll probably end loading before jQuery, so your CODE will behave unpredictably.
Instead you can use the following CODE to make sure dependency works:
function js_defer_attr( $tag ){
// add defer to all scripts tags
return str_replace( ' src', ' defer="defer" src', $tag );
}
add_filter( 'script_loader_tag', 'js_defer_attr', 10 );
Here's more about the defer attribute.
Alternative: place script to footer
It's also possible to replace all scripts to footer. Use the following CODE (instead of the above) to place all scripts in the footer:
function move_scripts_to_footer() {
remove_action( 'wp_head', 'wp_print_scripts' );
remove_action( 'wp_head', 'wp_print_head_scripts', 9 );
remove_action( 'wp_head', 'wp_enqueue_scripts', 1 );
add_action( 'wp_footer', 'wp_print_scripts', 5 );
add_action( 'wp_footer', 'wp_enqueue_scripts', 5 );
add_action( 'wp_footer', 'wp_print_head_scripts', 5 );
}
add_action( 'wp_head', 'move_scripts_to_footer', -1 );
A: You can eliminate render blocking JavaScript very easily by using different plugins, like Autoptimize. Follow these steps:
*
*Install and activate Autoptimize.
*Head to Settings > Autoptimize.
*Check the boxes beside "Optimize JavaScript Code?" and "Optimize
JavaScript Code?" options.
*Click on Save Changes button.
You can also use W3 Total Cache plugin to solve the issue. You will find the steps for applying it right here.
| wordpress | {
"language": "en",
"length": 393,
"provenance": "stackexchange_00019.jsonl.gz:473379",
"question_score": "3",
"source": "stackexchange",
"timestamp": "2023-03-29",
"url": "https://wordpress.stackexchange.com/questions/257235"
} | [
0.045379638671875,
-0.006763458251953125,
-0.0291290283203125,
-0.054931640625,
0.0196685791015625,
-0.033660888671875,
0.0007524490356445312,
0.0138702392578125,
-0.029052734375,
-0.00292205810546875,
-0.01611328125,
0.0000622868537902832,
-0.0560302734375,
-0.034210205078125,
0.0202789306640625,
-0.07061767578125,
0.05914306640625,
0.01224517822265625,
0.034881591796875,
-0.01483917236328125,
-0.00496673583984375,
0.0195465087890625,
0.034149169921875,
0.09765625,
0.003173828125,
-0.026458740234375,
0.07647705078125,
-0.014007568359375,
-0.008544921875,
-0.02288818359375,
0.01480865478515625,
0.0116729736328125,
0.00565338134765625,
0.04327392578125,
-0.061431884765625,
-0.0267181396484375,
0.004222869873046875,
0.0243682861328125,
-0.00858306884765625,
0.0164642333984375,
-0.0011472702026367188,
0.0079803466796875,
-0.004322052001953125,
0.0034503936767578125,
-0.044952392578125,
0.0036296844482421875,
-0.024383544921875,
-0.032440185546875,
-0.003879547119140625,
-0.032623291015625,
0.006420135498046875,
-0.0003635883331298828,
0.012542724609375,
0.029541015625,
-0.01355743408203125,
0.01287841796875,
-0.027099609375,
0.028900146484375,
0.01416778564453125,
0.058868408203125,
0.0171966552734375,
0.035400390625,
-0.0299530029296875,
-0.051239013671875,
0.004085540771484375,
-0.01525115966796875,
-0.0345458984375,
0.0291290283203125,
0.0124969482421875,
0.001361846923828125,
-0.00811004638671875,
-0.031707763671875,
-0.00299835205078125,
-0.0172119140625,
0.0225982666015625,
-0.0021800994873046875,
-0.0069732666015625,
0.0018157958984375,
0.001590728759765625,
0.025177001953125,
0.0028247833251953125,
-0.042388916015625,
-0.0223236083984375,
-0.0081634521484375,
0.0226287841796875,
0.027313232421875,
-0.005962371826171875,
-0.0078582763671875,
-0.0430908203125,
-0.0309295654296875,
-0.03466796875,
-0.0028400421142578125,
-0.039093017578125,
-0.040496826171875,
-0.0377197265625,
-0.02581787109375,
0.00394439697265625,
0.0119476318359375,
-0.0093536376953125,
-0.0018930435180664062,
0.020965576171875,
-0.015350341796875,
0.00443267822265625,
-0.01332855224609375,
-0.00101470947265625,
0.057403564453125,
-0.03472900390625,
-0.0323486328125,
0.0233306884765625,
0.0300750732421875,
0.0184173583984375,
-0.053131103515625,
-0.0174407958984375,
0.026641845703125,
-0.05047607421875,
0.0030689239501953125,
-0.03125,
-0.043792724609375,
-0.033966064453125,
-0.00775909423828125,
0.01299285888671875,
0.0243682861328125,
-0.02691650390625,
0.0293121337890625,
0.040130615234375,
0.038360595703125,
-0.004390716552734375,
-0.00249481201171875,
0.00499725341796875,
0.0028076171875,
-0.0263671875,
-0.011444091796875,
0.0516357421875,
0.062225341796875,
0.036163330078125,
-0.0135955810546875,
0.04217529296875,
-0.027740478515625,
-0.028350830078125,
0.03521728515625,
-0.0188446044921875,
-0.05609130859375,
-0.0243988037109375,
-0.02484130859375,
0.032958984375,
0.00453948974609375,
-0.01824951171875,
0.0235443115234375,
0.058837890625,
-0.0094757080078125,
0.036407470703125,
-0.0191497802734375,
0.05474853515625,
-0.01910400390625,
-0.026214599609375,
-0.08599853515625,
0.0109710693359375,
-0.056060791015625,
0.00936126708984375,
-0.06402587890625,
0.03155517578125,
0.0245361328125,
0.0153656005859375,
-0.0070037841796875,
-0.0307159423828125,
-0.04412841796875,
-0.038299560546875,
-0.011993408203125,
0.019378662109375,
0.031951904296875,
-0.044097900390625,
-0.0133209228515625,
-0.0031185150146484375,
0.01873779296875,
-0.0021038055419921875,
0.0303497314453125,
-0.033233642578125,
-0.0033740997314453125,
0.053070068359375,
-0.0732421875,
-0.057891845703125,
-0.05926513671875,
0.03790283203125,
-0.00492095947265625,
-0.0657958984375,
0.052276611328125,
0.01056671142578125,
0.04754638671875,
0.0009593963623046875,
0.014129638671875,
0.0391845703125,
0.04193115234375,
0.015838623046875,
0.038909912109375,
0.017547607421875,
-0.0748291015625,
-0.006366729736328125,
-0.0226287841796875,
-0.009613037109375,
-0.002643585205078125,
0.0237579345703125,
0.015838623046875,
-0.02606201171875,
-0.005214691162109375,
-0.045654296875,
-0.0172882080078125,
-0.006786346435546875,
0.024993896484375,
0.0006289482116699219,
0.0267333984375,
-0.0024776458740234375,
-0.0110015869140625,
-0.011474609375,
-0.017608642578125,
-0.0036716461181640625,
0.0197601318359375,
-0.0275726318359375,
0.037506103515625,
-0.0019817352294921875,
0.038848876953125,
0.0035552978515625,
-0.03619384765625,
0.004390716552734375,
-0.014190673828125,
0.01470184326171875,
0.0180206298828125,
-0.045684814453125,
-0.0053863525390625,
-0.024810791015625,
0.006656646728515625,
-0.0386962890625,
0.06903076171875,
0.01119232177734375,
0.0670166015625,
-0.02789306640625,
-0.008941650390625,
0.004913330078125,
0.0029239654541015625,
0.0002065896987915039,
0.0191497802734375,
0.04144287109375,
0.0364990234375,
-0.026275634765625,
-0.0255279541015625,
0.01052093505859375,
-0.08551025390625,
0.01148223876953125,
-0.01406097412109375,
0.0450439453125,
0.005184173583984375,
-0.006320953369140625,
-0.053314208984375,
0.04229736328125,
-0.0643310546875,
0.037353515625,
0.032012939453125,
-0.01279449462890625,
-0.0184783935546875,
0.01430511474609375,
-0.0138702392578125,
0.015869140625,
-0.0221405029296875,
-0.04681396484375,
-0.0027904510498046875,
0.036712646484375,
0.0035610198974609375,
0.031341552734375,
0.0221099853515625,
-0.004436492919921875,
-0.00600433349609375,
0.00991058349609375,
-0.03533935546875,
-0.005977630615234375,
0.0321044921875,
0.0116424560546875,
0.0223236083984375,
-0.02679443359375,
-0.004558563232421875,
-0.01200103759765625,
0.0214385986328125,
-0.0011320114135742188,
0.023406982421875,
-0.0169219970703125,
-0.007476806640625,
-0.0161895751953125,
-0.005229949951171875,
0.0214080810546875,
0.027587890625,
0.047119140625,
0.037109375,
0.04595947265625,
-0.00856781005859375,
-0.0180206298828125,
0.04595947265625,
-0.01238250732421875,
-0.040435791015625,
0.0743408203125,
-0.0182952880859375,
0.006072998046875,
0.01216888427734375,
0.10882568359375,
0.056060791015625,
0.00960540771484375,
0.0072479248046875,
-0.006099700927734375,
0.0212860107421875,
0.03338623046875,
-0.02386474609375,
-0.032012939453125,
0.034423828125,
-0.0941162109375,
-0.040802001953125,
0.0005559921264648438,
-0.005565643310546875,
-0.005970001220703125,
-0.03912353515625,
-0.0245513916015625,
-0.031829833984375,
-0.10150146484375,
-0.049224853515625,
0.00018799304962158203,
-0.060760498046875,
-0.00818634033203125,
0.0005035400390625,
-0.02630615234375,
-0.01094818115234375,
0.018341064453125,
0.0119476318359375,
-0.0245208740234375,
-0.01058197021484375,
-0.08575439453125,
-0.0447998046875,
-0.07037353515625,
0.048675537109375,
-0.020965576171875,
0.0189361572265625,
0.00733184814453125,
0.05743408203125,
0.00609588623046875,
-0.075439453125,
-0.0150146484375,
-0.01427459716796875,
-0.03131103515625,
0.0192413330078125,
-0.01251983642578125,
-0.059600830078125,
-0.016021728515625,
0.0021800994873046875,
-0.0728759765625,
-0.02496337890625,
0.058807373046875,
-0.022369384765625,
-0.053558349609375,
-0.016021728515625,
-0.0213470458984375,
0.09075927734375,
0.061309814453125,
-0.01300811767578125,
0.0304412841796875,
-0.033447265625,
-0.022796630859375,
0.01519775390625,
-0.025726318359375,
-0.04217529296875,
0.034332275390625,
-0.03485107421875,
-0.0184326171875,
-0.0166015625,
0.054443359375,
0.025848388671875,
-0.000301361083984375,
0.01470184326171875,
0.041595458984375,
-0.00730133056640625,
0.043975830078125,
-0.04730224609375,
0.08087158203125,
0.003086090087890625,
0.012359619140625,
0.049591064453125,
0.00817108154296875,
-0.01258087158203125,
-0.0242919921875,
-0.03515625,
0.0229339599609375,
-0.00437164306640625,
0.0076904296875,
0.05511474609375,
-0.0099334716796875,
-0.0026111602783203125,
-0.0214080810546875,
0.0357666015625,
-0.0120849609375,
-0.0033512115478515625,
0.0174407958984375,
0.0090789794921875,
-0.050994873046875,
-0.0005931854248046875,
-0.0758056640625,
0.005802154541015625,
0.017120361328125,
0.00936126708984375,
0.003170013427734375,
0.003704071044921875,
-0.0257568359375,
0.021728515625,
0.0171661376953125,
-0.00412750244140625,
0.0279083251953125,
-0.03155517578125,
-0.01007080078125,
-0.011474609375,
0.0013227462768554688,
-0.04296875,
-0.01444244384765625,
-0.011016845703125,
-0.043121337890625,
-0.0120086669921875,
-0.057830810546875,
0.0546875,
0.00861358642578125,
0.0228271484375,
-0.028045654296875,
0.03369140625,
0.027984619140625,
-0.0011434555053710938,
0.01312255859375,
-0.01849365234375,
0.0322265625,
0.003330230712890625,
0.0127410888671875,
-0.00868988037109375,
-0.00305938720703125,
-0.0018167495727539062,
-0.0136566162109375,
0.01554107666015625,
-0.0173797607421875,
-0.0014333724975585938,
0.0028705596923828125,
-0.01568603515625,
-0.0185394287109375,
-0.036529541015625,
-0.0173187255859375,
0.049530029296875,
0.0008296966552734375,
0.007244110107421875,
-0.061279296875,
-0.042327880859375,
0.021575927734375,
-0.0166778564453125,
-0.0078125,
-0.01448822021484375,
0.03948974609375,
0.019439697265625,
-0.00028324127197265625,
0.0577392578125,
0.03009033203125,
0.042633056640625,
0.005840301513671875,
0.06982421875,
0.0187530517578125,
-0.02911376953125,
0.10296630859375,
0.00501251220703125,
0.005584716796875,
0.01273345947265625,
0.016082763671875,
0.00794219970703125,
-0.018096923828125,
0.00782012939453125,
0.03125,
-0.016815185546875,
0.04449462890625,
-0.0263214111328125,
0.02117919921875,
-0.013916015625,
0.00632476806640625,
-0.01136016845703125,
-0.015106201171875,
-0.032073974609375,
-0.030426025390625,
0.0007166862487792969,
0.048797607421875,
0.045928955078125,
0.032684326171875,
0.003143310546875,
0.036468505859375,
0.046417236328125,
0.00223541259765625,
-0.043853759765625,
-0.036956787109375,
-0.0259246826171875,
-0.0020618438720703125,
0.0126953125,
-0.01494598388671875,
-0.017486572265625,
-0.0027332305908203125,
0.0084991455078125,
0.003467559814453125,
-0.0220184326171875,
-0.048126220703125,
0.01195526123046875,
-0.00045990943908691406,
-0.01873779296875,
0.03369140625,
0.06005859375,
0.030364990234375,
0.00843048095703125,
-0.019805908203125,
-0.0084228515625,
0.004486083984375,
-0.054351806640625,
0.0098114013671875,
0.012359619140625,
-0.01093292236328125,
-0.031646728515625,
0.048858642578125,
0.007160186767578125,
-0.006481170654296875,
-0.00020039081573486328,
0.042938232421875,
0.03448486328125,
0.0034885406494140625,
-0.000621795654296875,
0.0225677490234375,
0.00412750244140625,
-0.004016876220703125,
0.0106201171875,
-0.0345458984375,
0.002384185791015625,
0.0121307373046875,
0.016937255859375,
-0.01540374755859375,
-0.02337646484375,
0.02880859375,
-0.01763916015625,
-0.0005645751953125,
0.0296783447265625,
0.004856109619140625,
0.0008387565612792969,
-0.0340576171875,
-0.0460205078125,
0.03607177734375,
0.01678466796875,
0.020477294921875,
0.0251617431640625,
0.036285400390625,
0.046783447265625,
-0.00478363037109375,
0.0121612548828125,
-0.03033447265625,
-0.0171966552734375,
0.005157470703125,
-0.036468505859375,
-0.031494140625,
-0.03216552734375,
0.00772857666015625,
-0.00931549072265625,
0.00568389892578125,
0.02734375,
-0.01276397705078125,
0.00894927978515625,
-0.0182647705078125,
0.0035533905029296875,
-0.05029296875,
0.02490234375,
-0.0136260986328125,
-0.0218658447265625,
-0.0322265625,
-0.010833740234375,
-0.06512451171875,
-0.044464111328125,
-0.10125732421875,
-0.0275421142578125,
-0.0626220703125,
0.04364013671875,
-0.0125732421875,
0.0218505859375,
-0.029815673828125,
-0.0119781494140625,
0.02001953125,
0.01079559326171875,
-0.00295257568359375,
0.04248046875,
-0.0226898193359375,
0.022308349609375,
-0.0018749237060546875,
-0.00586700439453125,
0.0001068115234375,
0.0128631591796875,
0.022064208984375,
-0.01001739501953125,
0.0156097412109375,
-0.042572021484375,
-0.033416748046875,
0.007724761962890625,
-0.03924560546875,
0.006313323974609375,
0.02874755859375,
-0.009613037109375,
0.006694793701171875,
0.007526397705078125,
0.0223846435546875,
-0.004695892333984375,
0.00983428955078125,
0.007022857666015625,
-0.011383056640625,
0.03546142578125,
0.04718017578125,
0.01568603515625,
-0.01526641845703125,
-0.096923828125,
0.03338623046875,
0.0750732421875,
0.0174407958984375,
-0.07562255859375,
0.0077362060546875,
-0.036651611328125,
-0.00785064697265625,
-0.0192413330078125,
0.023773193359375,
0.015869140625,
0.02349853515625,
0.057373046875,
0.0300445556640625,
0.00458526611328125,
-0.05078125,
0.0264434814453125,
-0.005283355712890625,
-0.0189208984375,
0.0186767578125,
-0.0245513916015625,
-0.022918701171875,
0.056365966796875,
0.033966064453125,
-0.04180908203125,
-0.02001953125,
-0.01263427734375,
-0.0212860107421875,
-0.006397247314453125,
-0.0293731689453125,
0.0200347900390625,
-0.028717041015625,
0.0289154052734375,
0.0267181396484375,
-0.032806396484375,
-0.0107421875,
-0.00681304931640625,
0.00775146484375,
-0.030426025390625,
-0.000040531158447265625,
-0.0114898681640625,
-0.06719970703125,
-0.006015777587890625,
0.033905029296875,
-0.00140380859375,
-0.01201629638671875,
-0.00844573974609375,
0.019866943359375,
-0.038909912109375,
-0.050384521484375,
0.01216888427734375,
-0.0006928443908691406,
-0.0244293212890625,
0.039276123046875,
0.0280303955078125,
-0.01071929931640625,
0.04888916015625,
-0.02099609375,
0.057830810546875,
0.0021610260009765625,
-0.0034236907958984375,
0.005092620849609375,
-0.017120361328125,
-0.002918243408203125,
-0.0037670135498046875,
-0.046600341796875,
0.00870513916015625,
-0.021759033203125,
-0.0030002593994140625,
-0.0200042724609375,
-0.0010557174682617188,
0.03802490234375,
0.0241851806640625,
-0.03070068359375,
0.03094482421875,
0.044891357421875,
-0.0270843505859375,
-0.014495849609375,
0.020416259765625,
-0.0278472900390625,
0.01544952392578125,
0.0013113021850585938,
-0.01165771484375,
-0.0264434814453125,
-0.0305023193359375,
-0.0660400390625,
0.03887939453125,
0.002140045166015625,
0.0251922607421875,
0.021453857421875,
-0.005199432373046875,
-0.0333251953125,
-0.0195770263671875,
-0.01142120361328125,
0.030517578125,
0.0268096923828125,
0.00783538818359375,
-0.00624847412109375,
-0.0005064010620117188,
0.00098419189453125,
0.0035724639892578125,
-0.01296234130859375,
-0.00521087646484375,
-0.01385498046875,
-0.03369140625,
-0.006404876708984375,
0.053131103515625,
0.0176849365234375,
-0.0038738250732421875,
-0.0186309814453125,
0.047149658203125,
-0.004428863525390625,
-0.08319091796875,
-0.00684356689453125,
-0.036956787109375,
-0.020843505859375,
0.0224761962890625,
0.033599853515625,
0.0287017822265625,
-0.033843994140625,
0.006954193115234375,
-0.0640869140625,
0.005016326904296875,
0.04461669921875,
0.0657958984375,
-0.01165008544921875,
0.043060302734375,
0.01271820068359375,
-0.01097869873046875,
-0.0394287109375,
-0.0164031982421875,
0.0308380126953125,
0.0107269287109375,
-0.01436614990234375,
0.0013570785522460938,
0.0168609619140625,
-0.05462646484375,
0.0163421630859375,
-0.01800537109375,
0.050140380859375,
-0.0302886962890625,
-0.0226287841796875,
0.011810302734375,
0.03656005859375,
-0.0307159423828125,
-0.02227783203125,
0.055511474609375,
0.01090240478515625,
0.0088348388671875,
0.005977630615234375,
0.01049041748046875,
-0.0016994476318359375,
0.007656097412109375,
-0.048492431640625,
0.005435943603515625,
-0.01068878173828125,
-0.0238189697265625,
0.02313232421875,
-0.027069091796875,
-0.0192108154296875,
0.031463623046875,
0.01434326171875,
0.026397705078125,
-0.011474609375,
-0.0310211181640625,
-0.07293701171875,
0.0280303955078125,
0.0175018310546875,
0.05682373046875,
0.01126861572265625,
0.055389404296875,
0.040618896484375,
-0.038360595703125,
-0.0289459228515625,
-0.004558563232421875,
0.0025730133056640625,
0.0215911865234375,
-0.0288543701171875,
0.01323699951171875,
0.0003571510314941406,
0.03643798828125,
-0.00908660888671875,
0.0307769775390625,
0.00933074951171875,
-0.0014066696166992188,
-0.01399993896484375,
-0.004581451416015625,
0.03900146484375,
-0.0296783447265625,
-0.0191497802734375,
-0.018951416015625,
0.0069122314453125,
0.030181884765625,
-0.00225067138671875,
0.031219482421875,
0.0071563720703125,
0.025665283203125,
-0.0302734375,
-0.0010900497436523438,
-0.0010089874267578125,
-0.03814697265625,
0.07196044921875,
0.02587890625,
0.0718994140625,
0.013153076171875,
-0.043914794921875,
0.00315093994140625,
-0.0394287109375,
-0.01007843017578125,
0.0230560302734375,
0.0258026123046875,
-0.039337158203125,
0.0667724609375,
0.05712890625,
-0.010772705078125,
0.005023956298828125,
-0.015838623046875,
0.039825439453125,
0.0264434814453125,
0.00945281982421875,
0.035003662109375,
-0.02423095703125,
-0.0213775634765625,
-0.0031280517578125,
0.03143310546875,
-0.02069091796875,
0.08843994140625,
-0.0272979736328125,
0.0046234130859375,
0.041351318359375,
-0.024993896484375,
0.059173583984375,
0.039581298828125,
-0.01171875,
0.018829345703125,
0.00841522216796875,
-0.03790283203125,
-0.0771484375,
0.03826904296875,
-0.0002663135528564453,
0.00925445556640625,
0.045928955078125,
-0.0207672119140625,
-0.0019321441650390625,
-0.0123748779296875,
-0.0401611328125,
-0.0400390625,
-0.045623779296875,
0.01119232177734375,
0.036346435546875,
-0.01509857177734375,
0.01245880126953125,
-0.01824951171875,
0.00763702392578125,
0.049072265625,
0.0022792816162109375,
0.0219573974609375,
0.00852203369140625,
0.0175018310546875,
0.024658203125,
0.0260162353515625,
0.0411376953125,
0.0258331298828125,
-0.0166473388671875,
0.05828857421875,
0.01593017578125,
-0.0198974609375,
0.0258026123046875,
0.00010311603546142578,
0.0012683868408203125,
0.046600341796875,
0.034210205078125,
-0.035186767578125,
0.0159454345703125,
0.0244140625,
-0.02099609375,
0.0038814544677734375,
0.040679931640625,
-0.00679779052734375,
0.0191650390625,
-0.0311431884765625,
-0.00020766258239746094,
0.006946563720703125,
-0.047119140625,
-0.03253173828125,
-0.038482666015625,
0.0211639404296875,
-0.0099639892578125,
0.001064300537109375,
-0.011016845703125,
-0.03485107421875,
-0.017364501953125,
0.005863189697265625,
0.05389404296875,
-0.0274505615234375,
0.034393310546875,
-0.00027823448181152344,
-0.07550048828125,
-0.01190948486328125,
0.11956787109375,
-0.027740478515625,
-0.0159149169921875,
0.0187530517578125,
0.008758544921875,
0.032196044921875,
-0.05511474609375,
-0.004322052001953125,
0.0105743408203125,
-0.03192138671875,
-0.01519012451171875,
0.007732391357421875,
0.044952392578125,
-0.00850677490234375,
-0.04937744140625,
-0.0310211181640625,
0.02703857421875,
0.035308837890625,
-0.033416748046875,
0.015380859375,
0.00821685791015625,
-0.030029296875,
-0.04345703125,
0.045562744140625,
-0.01558685302734375,
-0.0234832763671875,
-0.02716064453125,
-0.00689697265625,
-0.0011510848999023438,
-0.0037937164306640625,
-0.02239990234375,
-0.0027408599853515625,
-0.0222625732421875,
0.0131988525390625,
0.026947021484375,
-0.034088134765625,
0.05853271484375,
-0.05401611328125,
-0.044219970703125,
-0.0020160675048828125,
0.022979736328125,
0.0273590087890625,
-0.071533203125,
0.05657958984375,
-0.017822265625,
0.0183258056640625,
0.0180511474609375,
0.02978515625,
0.032012939453125,
-0.01479339599609375,
0.004314422607421875,
-0.03692626953125,
-0.005504608154296875,
0.006725311279296875,
0.047882080078125,
0.0277862548828125,
0.01235198974609375,
-0.042572021484375,
-0.01153564453125,
-0.01033782958984375,
-0.011505126953125,
-0.00949859619140625,
0.00922393798828125,
-0.046844482421875,
-0.0013580322265625,
-0.0006661415100097656,
-0.00730133056640625,
-0.0009012222290039062,
-0.006916046142578125,
-0.04144287109375,
-0.00936126708984375,
-0.0069732666015625,
0.0123138427734375,
-0.07861328125,
0.021881103515625,
0.0200653076171875,
-0.0186767578125,
-0.0004334449768066406,
-0.01113128662109375,
0.006946563720703125,
0.0155487060546875,
-0.0008425712585449219,
-0.0092926025390625,
-0.007205963134765625,
0.00408935546875,
0.02618408203125,
0.00433349609375,
0.04766845703125,
-0.002246856689453125,
-0.0172271728515625,
-0.001903533935546875,
-0.0039520263671875,
0.004154205322265625,
-0.00872039794921875,
-0.01099395751953125,
-0.042266845703125,
-0.02008056640625,
0.0199127197265625,
-0.0645751953125,
0.042572021484375,
-0.01070404052734375,
-0.03533935546875,
0.01519775390625,
0.042938232421875,
0.12030029296875,
-0.025238037109375,
0.000644683837890625,
0.04876708984375,
-0.01032257080078125,
-0.024139404296875,
0.0129241943359375,
-0.0225982666015625,
0.0218048095703125,
0.005916595458984375
] |